@wordpress/style-engine 0.5.1 → 0.8.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 (98) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/index.js +13 -2
  3. package/build/index.js.map +1 -1
  4. package/build/styles/color/background.js +21 -0
  5. package/build/styles/color/background.js.map +1 -0
  6. package/build/styles/color/gradient.js +21 -0
  7. package/build/styles/color/gradient.js.map +1 -0
  8. package/build/styles/color/index.js +21 -0
  9. package/build/styles/color/index.js.map +1 -0
  10. package/build/styles/color/text.js +21 -0
  11. package/build/styles/color/text.js.map +1 -0
  12. package/build/styles/constants.js +13 -0
  13. package/build/styles/constants.js.map +1 -0
  14. package/build/styles/index.js +5 -3
  15. package/build/styles/index.js.map +1 -1
  16. package/build/styles/spacing/index.js +19 -0
  17. package/build/styles/spacing/index.js.map +1 -0
  18. package/build/styles/{margin.js → spacing/margin.js} +1 -1
  19. package/build/styles/spacing/margin.js.map +1 -0
  20. package/build/styles/{padding.js → spacing/padding.js} +1 -1
  21. package/build/styles/spacing/padding.js.map +1 -0
  22. package/build/styles/typography/index.js +57 -0
  23. package/build/styles/typography/index.js.map +1 -0
  24. package/build/styles/utils.js +54 -2
  25. package/build/styles/utils.js.map +1 -1
  26. package/build-module/index.js +13 -2
  27. package/build-module/index.js.map +1 -1
  28. package/build-module/styles/color/background.js +12 -0
  29. package/build-module/styles/color/background.js.map +1 -0
  30. package/build-module/styles/color/gradient.js +12 -0
  31. package/build-module/styles/color/gradient.js.map +1 -0
  32. package/build-module/styles/color/index.js +8 -0
  33. package/build-module/styles/color/index.js.map +1 -0
  34. package/build-module/styles/color/text.js +12 -0
  35. package/build-module/styles/color/text.js.map +1 -0
  36. package/build-module/styles/constants.js +4 -0
  37. package/build-module/styles/constants.js.map +1 -0
  38. package/build-module/styles/index.js +4 -3
  39. package/build-module/styles/index.js.map +1 -1
  40. package/build-module/styles/spacing/index.js +7 -0
  41. package/build-module/styles/spacing/index.js.map +1 -0
  42. package/build-module/styles/{margin.js → spacing/margin.js} +1 -1
  43. package/build-module/styles/spacing/margin.js.map +1 -0
  44. package/build-module/styles/{padding.js → spacing/padding.js} +1 -1
  45. package/build-module/styles/spacing/padding.js.map +1 -0
  46. package/build-module/styles/typography/index.js +48 -0
  47. package/build-module/styles/typography/index.js.map +1 -0
  48. package/build-module/styles/utils.js +49 -2
  49. package/build-module/styles/utils.js.map +1 -1
  50. package/build-types/index.d.ts.map +1 -1
  51. package/build-types/styles/color/background.d.ts +14 -0
  52. package/build-types/styles/color/background.d.ts.map +1 -0
  53. package/build-types/styles/color/gradient.d.ts +14 -0
  54. package/build-types/styles/color/gradient.d.ts.map +1 -0
  55. package/build-types/styles/color/index.d.ts +10 -0
  56. package/build-types/styles/color/index.d.ts.map +1 -0
  57. package/build-types/styles/color/text.d.ts +14 -0
  58. package/build-types/styles/color/text.d.ts.map +1 -0
  59. package/build-types/styles/constants.d.ts +4 -0
  60. package/build-types/styles/constants.d.ts.map +1 -0
  61. package/build-types/styles/index.d.ts +5 -1
  62. package/build-types/styles/index.d.ts.map +1 -1
  63. package/build-types/styles/spacing/index.d.ts +6 -0
  64. package/build-types/styles/spacing/index.d.ts.map +1 -0
  65. package/build-types/styles/{margin.d.ts → spacing/margin.d.ts} +2 -2
  66. package/build-types/styles/spacing/margin.d.ts.map +1 -0
  67. package/build-types/styles/{padding.d.ts → spacing/padding.d.ts} +2 -2
  68. package/build-types/styles/spacing/padding.d.ts.map +1 -0
  69. package/build-types/styles/typography/index.d.ts +14 -0
  70. package/build-types/styles/typography/index.d.ts.map +1 -0
  71. package/build-types/styles/utils.d.ts +33 -0
  72. package/build-types/styles/utils.d.ts.map +1 -1
  73. package/build-types/types.d.ts +14 -1
  74. package/build-types/types.d.ts.map +1 -1
  75. package/class-wp-style-engine.php +189 -61
  76. package/package.json +2 -2
  77. package/phpunit/class-wp-style-engine-test.php +86 -67
  78. package/src/index.ts +13 -1
  79. package/src/styles/color/background.ts +19 -0
  80. package/src/styles/color/gradient.ts +19 -0
  81. package/src/styles/color/index.ts +8 -0
  82. package/src/styles/color/text.ts +14 -0
  83. package/src/styles/constants.ts +3 -0
  84. package/src/styles/index.ts +4 -3
  85. package/src/styles/spacing/index.ts +7 -0
  86. package/src/styles/{margin.ts → spacing/margin.ts} +2 -2
  87. package/src/styles/{padding.ts → spacing/padding.ts} +2 -2
  88. package/src/styles/typography/index.ts +99 -0
  89. package/src/styles/utils.ts +67 -2
  90. package/src/test/index.js +101 -2
  91. package/src/types.ts +14 -1
  92. package/tsconfig.tsbuildinfo +1 -1
  93. package/build/styles/margin.js.map +0 -1
  94. package/build/styles/padding.js.map +0 -1
  95. package/build-module/styles/margin.js.map +0 -1
  96. package/build-module/styles/padding.js.map +0 -1
  97. package/build-types/styles/margin.d.ts.map +0 -1
  98. package/build-types/styles/padding.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/style-engine/src/styles/spacing/margin.ts"],"names":["generateBoxRules","margin","name","generate","style","options"],"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,CACtBI,KADsB,EAEtBC,OAFsB,EAGtB,CAAE,SAAF,EAAa,QAAb,CAHsB,EAItB,QAJsB,CAAvB;AAMA;AATa,CAAf;AAYA,eAAeJ,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(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'spacing', 'margin' ],\n\t\t\t'margin'\n\t\t);\n\t},\n};\n\nexport default margin;\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import { generateBoxRules } from './utils';
4
+ import { generateBoxRules } from '../utils';
5
5
  const padding = {
6
6
  name: 'padding',
7
7
  generate: (style, options) => {
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/style-engine/src/styles/spacing/padding.ts"],"names":["generateBoxRules","padding","name","generate","style","options"],"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,CACtBI,KADsB,EAEtBC,OAFsB,EAGtB,CAAE,SAAF,EAAa,SAAb,CAHsB,EAItB,SAJsB,CAAvB;AAMA;AATc,CAAhB;AAYA,eAAeJ,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(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'spacing', 'padding' ],\n\t\t\t'padding'\n\t\t);\n\t},\n};\n\nexport default padding;\n"]}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import { generateRule } from '../utils';
5
+ const fontSize = {
6
+ name: 'fontSize',
7
+ generate: (style, options) => {
8
+ return generateRule(style, options, ['typography', 'fontSize'], 'fontSize');
9
+ }
10
+ };
11
+ const fontStyle = {
12
+ name: 'fontStyle',
13
+ generate: (style, options) => {
14
+ return generateRule(style, options, ['typography', 'fontStyle'], 'fontStyle');
15
+ }
16
+ };
17
+ const fontWeight = {
18
+ name: 'fontWeight',
19
+ generate: (style, options) => {
20
+ return generateRule(style, options, ['typography', 'fontWeight'], 'fontWeight');
21
+ }
22
+ };
23
+ const letterSpacing = {
24
+ name: 'letterSpacing',
25
+ generate: (style, options) => {
26
+ return generateRule(style, options, ['typography', 'letterSpacing'], 'letterSpacing');
27
+ }
28
+ };
29
+ const lineHeight = {
30
+ name: 'letterSpacing',
31
+ generate: (style, options) => {
32
+ return generateRule(style, options, ['typography', 'lineHeight'], 'lineHeight');
33
+ }
34
+ };
35
+ const textDecoration = {
36
+ name: 'textDecoration',
37
+ generate: (style, options) => {
38
+ return generateRule(style, options, ['typography', 'textDecoration'], 'textDecoration');
39
+ }
40
+ };
41
+ const textTransform = {
42
+ name: 'textTransform',
43
+ generate: (style, options) => {
44
+ return generateRule(style, options, ['typography', 'textTransform'], 'textTransform');
45
+ }
46
+ };
47
+ export default [fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textDecoration, textTransform];
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/style-engine/src/styles/typography/index.ts"],"names":["generateRule","fontSize","name","generate","style","options","fontStyle","fontWeight","letterSpacing","lineHeight","textDecoration","textTransform"],"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,CAAl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;AAMA;AAToB,CAAtB;AAYA,eAAe,CACdJ,QADc,EAEdK,SAFc,EAGdC,UAHc,EAIdC,aAJc,EAKdC,UALc,EAMdC,cANc,EAOdC,aAPc,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 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: 'letterSpacing',\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 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\nexport default [\n\tfontSize,\n\tfontStyle,\n\tfontWeight,\n\tletterSpacing,\n\tlineHeight,\n\ttextDecoration,\n\ttextTransform,\n];\n"]}
@@ -6,6 +6,37 @@ import { get, upperFirst } from 'lodash';
6
6
  * Internal dependencies
7
7
  */
8
8
 
9
+ import { VARIABLE_REFERENCE_PREFIX, VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE, VARIABLE_PATH_SEPARATOR_TOKEN_STYLE } from './constants';
10
+ /**
11
+ * Returns a JSON representation of the generated CSS rules.
12
+ *
13
+ * @param style Style object.
14
+ * @param options Options object with settings to adjust how the styles are generated.
15
+ * @param path An array of strings representing the path to the style value in the style object.
16
+ * @param ruleKey A CSS property key.
17
+ *
18
+ * @return GeneratedCSSRule[] CSS rules.
19
+ */
20
+
21
+ export function generateRule(style, options, path, ruleKey) {
22
+ const styleValue = get(style, path);
23
+ return styleValue ? [{
24
+ selector: options === null || options === void 0 ? void 0 : options.selector,
25
+ key: ruleKey,
26
+ value: getCSSVarFromStyleValue(styleValue)
27
+ }] : [];
28
+ }
29
+ /**
30
+ * Returns a JSON representation of the generated CSS rules taking into account box model properties, top, right, bottom, left.
31
+ *
32
+ * @param style Style object.
33
+ * @param options Options object with settings to adjust how the styles are generated.
34
+ * @param path An array of strings representing the path to the style value in the style object.
35
+ * @param ruleKey A CSS property key.
36
+ *
37
+ * @return GeneratedCSSRule[] CSS rules.
38
+ */
39
+
9
40
  export function generateBoxRules(style, options, path, ruleKey) {
10
41
  const boxStyle = get(style, path);
11
42
 
@@ -17,7 +48,7 @@ export function generateBoxRules(style, options, path, ruleKey) {
17
48
 
18
49
  if (typeof boxStyle === 'string') {
19
50
  rules.push({
20
- selector: options.selector,
51
+ selector: options === null || options === void 0 ? void 0 : options.selector,
21
52
  key: ruleKey,
22
53
  value: boxStyle
23
54
  });
@@ -27,7 +58,7 @@ export function generateBoxRules(style, options, path, ruleKey) {
27
58
 
28
59
  if (value) {
29
60
  acc.push({
30
- selector: options.selector,
61
+ selector: options === null || options === void 0 ? void 0 : options.selector,
31
62
  key: `${ruleKey}${upperFirst(side)}`,
32
63
  value
33
64
  });
@@ -40,4 +71,20 @@ export function generateBoxRules(style, options, path, ruleKey) {
40
71
 
41
72
  return rules;
42
73
  }
74
+ /**
75
+ * Returns a CSS var value from incoming style value following the pattern `var:description|context|slug`.
76
+ *
77
+ * @param styleValue A raw style value.
78
+ *
79
+ * @return string A CSS var value.
80
+ */
81
+
82
+ export function getCSSVarFromStyleValue(styleValue) {
83
+ if (typeof styleValue === 'string' && styleValue.startsWith(VARIABLE_REFERENCE_PREFIX)) {
84
+ const variable = styleValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
85
+ return `var(--wp--${variable})`;
86
+ }
87
+
88
+ return styleValue;
89
+ }
43
90
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/utils.ts"],"names":["get","upperFirst","generateBoxRules","style","options","path","ruleKey","boxStyle","rules","push","selector","key","value","sideRules","reduce","acc","side"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAT,EAAcC,UAAd,QAAgC,QAAhC;AAEA;AACA;AACA;;AAGA,OAAO,SAASC,gBAAT,CACNC,KADM,EAENC,OAFM,EAGNC,IAHM,EAINC,OAJM,EAKe;AACrB,QAAMC,QAAkC,GAAGP,GAAG,CAAEG,KAAF,EAASE,IAAT,CAA9C;;AACA,MAAK,CAAEE,QAAP,EAAkB;AACjB,WAAO,EAAP;AACA;;AAED,QAAMC,KAAyB,GAAG,EAAlC;;AACA,MAAK,OAAOD,QAAP,KAAoB,QAAzB,EAAoC;AACnCC,IAAAA,KAAK,CAACC,IAAN,CAAY;AACXC,MAAAA,QAAQ,EAAEN,OAAO,CAACM,QADP;AAEXC,MAAAA,GAAG,EAAEL,OAFM;AAGXM,MAAAA,KAAK,EAAEL;AAHI,KAAZ;AAKA,GAND,MAMO;AACN,UAAMM,SAAS,GAAG,CAAE,KAAF,EAAS,OAAT,EAAkB,QAAlB,EAA4B,MAA5B,EAAqCC,MAArC,CACjB,CAAEC,GAAF,EAA2BC,IAA3B,KAA6C;AAC5C,YAAMJ,KAAyB,GAAGZ,GAAG,CAAEO,QAAF,EAAY,CAAES,IAAF,CAAZ,CAArC;;AACA,UAAKJ,KAAL,EAAa;AACZG,QAAAA,GAAG,CAACN,IAAJ,CAAU;AACTC,UAAAA,QAAQ,EAAEN,OAAO,CAACM,QADT;AAETC,UAAAA,GAAG,EAAG,GAAGL,OAAS,GAAGL,UAAU,CAAEe,IAAF,CAAU,EAFhC;AAGTJ,UAAAA;AAHS,SAAV;AAKA;;AACD,aAAOG,GAAP;AACA,KAXgB,EAYjB,EAZiB,CAAlB;AAcAP,IAAAA,KAAK,CAACC,IAAN,CAAY,GAAGI,SAAf;AACA;;AAED,SAAOL,KAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { get, upperFirst } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport type { GeneratedCSSRule, Style, Box, StyleOptions } from '../types';\n\nexport function generateBoxRules(\n\tstyle: Style,\n\toptions: StyleOptions,\n\tpath: string[],\n\truleKey: string\n): GeneratedCSSRule[] {\n\tconst boxStyle: Box | string | undefined = get( style, path );\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: ruleKey,\n\t\t\tvalue: boxStyle,\n\t\t} );\n\t} else {\n\t\tconst sideRules = [ 'top', 'right', 'bottom', 'left' ].reduce(\n\t\t\t( acc: GeneratedCSSRule[], side: string ) => {\n\t\t\t\tconst value: string | undefined = get( boxStyle, [ side ] );\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: `${ ruleKey }${ upperFirst( side ) }`,\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"]}
1
+ {"version":3,"sources":["@wordpress/style-engine/src/styles/utils.ts"],"names":["get","upperFirst","VARIABLE_REFERENCE_PREFIX","VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE","VARIABLE_PATH_SEPARATOR_TOKEN_STYLE","generateRule","style","options","path","ruleKey","styleValue","selector","key","value","getCSSVarFromStyleValue","generateBoxRules","boxStyle","rules","push","sideRules","reduce","acc","side","startsWith","variable","slice","length","split","join"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAT,EAAcC,UAAd,QAAgC,QAAhC;AAEA;AACA;AACA;;AAEA,SACCC,yBADD,EAECC,uCAFD,EAGCC,mCAHD,QAIO,aAJP;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CACNC,KADM,EAENC,OAFM,EAGNC,IAHM,EAINC,OAJM,EAKL;AACD,QAAMC,UAA8B,GAAGV,GAAG,CAAEM,KAAF,EAASE,IAAT,CAA1C;AAEA,SAAOE,UAAU,GACd,CACA;AACCC,IAAAA,QAAQ,EAAEJ,OAAF,aAAEA,OAAF,uBAAEA,OAAO,CAAEI,QADpB;AAECC,IAAAA,GAAG,EAAEH,OAFN;AAGCI,IAAAA,KAAK,EAAEC,uBAAuB,CAAEJ,UAAF;AAH/B,GADA,CADc,GAQd,EARH;AASA;AAED;AAC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,UAAP,KAAsB,QAAtB,IACAA,UAAU,CAACa,UAAX,CAAuBrB,yBAAvB,CAFD,EAGE;AACD,UAAMsB,QAAQ,GAAGd,UAAU,CACzBe,KADe,CACRvB,yBAAyB,CAACwB,MADlB,EAEfC,KAFe,CAERxB,uCAFQ,EAGfyB,IAHe,CAGTxB,mCAHS,CAAjB;AAIA,WAAQ,aAAaoB,QAAU,GAA/B;AACA;;AACD,SAAOd,UAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { get, upperFirst } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport type { GeneratedCSSRule, Style, Box, StyleOptions } 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 * 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) {\n\tconst styleValue: string | undefined = get( 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 ruleKey A CSS property key.\n *\n * @return GeneratedCSSRule[] CSS rules.\n */\nexport function generateBoxRules(\n\tstyle: Style,\n\toptions: StyleOptions,\n\tpath: string[],\n\truleKey: string\n): GeneratedCSSRule[] {\n\tconst boxStyle: Box | string | undefined = get( style, path );\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: ruleKey,\n\t\t\tvalue: boxStyle,\n\t\t} );\n\t} else {\n\t\tconst sideRules = [ 'top', 'right', 'bottom', 'left' ].reduce(\n\t\t\t( acc: GeneratedCSSRule[], side: string ) => {\n\t\t\t\tconst value: string | undefined = get( boxStyle, [ side ] );\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: `${ ruleKey }${ upperFirst( side ) }`,\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.join( VARIABLE_PATH_SEPARATOR_TOKEN_STYLE );\n\t\treturn `var(--wp--${ variable })`;\n\t}\n\treturn styleValue;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,KAAK,EACL,YAAY,EACZ,gBAAgB,EAEhB,MAAM,SAAS,CAAC;AAGjB;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,GAAI,MAAM,CAmBtE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAC1B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAY,GACnB,gBAAgB,EAAE,CAOpB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EACX,KAAK,EACL,YAAY,EACZ,gBAAgB,EAEhB,MAAM,SAAS,CAAC;AAGjB;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,GAAI,MAAM,CA6BtE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAC1B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAY,GACnB,gBAAgB,EAAE,CASpB"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { Style, StyleOptions } from '../../types';
5
+ declare const background: {
6
+ name: string;
7
+ generate: (style: Style, options: StyleOptions) => {
8
+ selector: string;
9
+ key: string;
10
+ value: string;
11
+ }[];
12
+ };
13
+ export default background;
14
+ //# sourceMappingURL=background.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../src/styles/color/background.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGvD,QAAA,MAAM,UAAU;;sBAEI,KAAK,WAAW,YAAY;;;;;CAQ/C,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { Style, StyleOptions } from '../../types';
5
+ declare const gradient: {
6
+ name: string;
7
+ generate: (style: Style, options: StyleOptions) => {
8
+ selector: string;
9
+ key: string;
10
+ value: string;
11
+ }[];
12
+ };
13
+ export default gradient;
14
+ //# sourceMappingURL=gradient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradient.d.ts","sourceRoot":"","sources":["../../../src/styles/color/gradient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGvD,QAAA,MAAM,QAAQ;;sBAEM,KAAK,WAAW,YAAY;;;;;CAQ/C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,10 @@
1
+ declare const _default: {
2
+ name: string;
3
+ generate: (style: import("../../types").Style, options: import("../../types").StyleOptions) => {
4
+ selector: string;
5
+ key: string;
6
+ value: string;
7
+ }[];
8
+ }[];
9
+ export default _default;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/styles/color/index.ts"],"names":[],"mappings":";;;;;;;;AAOA,wBAA8C"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { Style, StyleOptions } from '../../types';
5
+ declare const text: {
6
+ name: string;
7
+ generate: (style: Style, options: StyleOptions) => {
8
+ selector: string;
9
+ key: string;
10
+ value: string;
11
+ }[];
12
+ };
13
+ export default text;
14
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/styles/color/text.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGvD,QAAA,MAAM,IAAI;;sBAEU,KAAK,WAAW,YAAY;;;;;CAG/C,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const VARIABLE_REFERENCE_PREFIX = "var:";
2
+ export declare const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = "|";
3
+ export declare const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = "--";
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/styles/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,SAAS,CAAC;AAChD,eAAO,MAAM,uCAAuC,MAAM,CAAC;AAC3D,eAAO,MAAM,mCAAmC,OAAO,CAAC"}
@@ -1,5 +1,9 @@
1
1
  export declare const styleDefinitions: {
2
2
  name: string;
3
- generate: (style: import("../types").Style, options: import("../types").StyleOptions) => import("../types").GeneratedCSSRule[];
3
+ generate: (style: import("../types").Style, options: import("../types").StyleOptions) => {
4
+ selector: string;
5
+ key: string;
6
+ value: string;
7
+ }[];
4
8
  }[];
5
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;GAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;;GAA0C,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ name: string;
3
+ generate: (style: import("../../types").Style, options: import("../../types").StyleOptions) => import("../../types").GeneratedCSSRule[];
4
+ }[];
5
+ export default _default;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/styles/spacing/index.ts"],"names":[],"mappings":";;;;AAMA,wBAAmC"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { Style, StyleOptions } from '../types';
4
+ import type { Style, StyleOptions } from '../../types';
5
5
  declare const margin: {
6
6
  name: string;
7
- generate: (style: Style, options: StyleOptions) => import("../types").GeneratedCSSRule[];
7
+ generate: (style: Style, options: StyleOptions) => import("../../types").GeneratedCSSRule[];
8
8
  };
9
9
  export default margin;
10
10
  //# sourceMappingURL=margin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"margin.d.ts","sourceRoot":"","sources":["../../../src/styles/spacing/margin.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGvD,QAAA,MAAM,MAAM;;sBAEQ,KAAK,WAAW,YAAY;CAQ/C,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
- import type { Style, StyleOptions } from '../types';
4
+ import type { Style, StyleOptions } from '../../types';
5
5
  declare const padding: {
6
6
  name: string;
7
- generate: (style: Style, options: StyleOptions) => import("../types").GeneratedCSSRule[];
7
+ generate: (style: Style, options: StyleOptions) => import("../../types").GeneratedCSSRule[];
8
8
  };
9
9
  export default padding;
10
10
  //# sourceMappingURL=padding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"padding.d.ts","sourceRoot":"","sources":["../../../src/styles/spacing/padding.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGvD,QAAA,MAAM,OAAO;;sBAEO,KAAK,WAAW,YAAY;CAQ/C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { Style, StyleOptions } from '../../types';
5
+ declare const _default: {
6
+ name: string;
7
+ generate: (style: Style, options: StyleOptions) => {
8
+ selector: string;
9
+ key: string;
10
+ value: string;
11
+ }[];
12
+ }[];
13
+ export default _default;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/styles/typography/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;;;;;;;;;AAuFvD,wBAQE"}
@@ -2,5 +2,38 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import type { GeneratedCSSRule, Style, StyleOptions } from '../types';
5
+ /**
6
+ * Returns a JSON representation of the generated CSS rules.
7
+ *
8
+ * @param style Style object.
9
+ * @param options Options object with settings to adjust how the styles are generated.
10
+ * @param path An array of strings representing the path to the style value in the style object.
11
+ * @param ruleKey A CSS property key.
12
+ *
13
+ * @return GeneratedCSSRule[] CSS rules.
14
+ */
15
+ export declare function generateRule(style: Style, options: StyleOptions, path: string[], ruleKey: string): {
16
+ selector: string;
17
+ key: string;
18
+ value: string;
19
+ }[];
20
+ /**
21
+ * Returns a JSON representation of the generated CSS rules taking into account box model properties, top, right, bottom, left.
22
+ *
23
+ * @param style Style object.
24
+ * @param options Options object with settings to adjust how the styles are generated.
25
+ * @param path An array of strings representing the path to the style value in the style object.
26
+ * @param ruleKey A CSS property key.
27
+ *
28
+ * @return GeneratedCSSRule[] CSS rules.
29
+ */
5
30
  export declare function generateBoxRules(style: Style, options: StyleOptions, path: string[], ruleKey: string): GeneratedCSSRule[];
31
+ /**
32
+ * Returns a CSS var value from incoming style value following the pattern `var:description|context|slug`.
33
+ *
34
+ * @param styleValue A raw style value.
35
+ *
36
+ * @return string A CSS var value.
37
+ */
38
+ export declare function getCSSVarFromStyleValue(styleValue: string): string;
6
39
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/styles/utils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAO,YAAY,EAAE,MAAM,UAAU,CAAC;AAE3E,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,MAAM,GACb,gBAAgB,EAAE,CAgCpB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/styles/utils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAO,YAAY,EAAE,MAAM,UAAU,CAAC;AAO3E;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC3B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,MAAM;;;;IAaf;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,MAAM,GACb,gBAAgB,EAAE,CAgCpB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAE,UAAU,EAAE,MAAM,GAAI,MAAM,CAYpE"}
@@ -24,6 +24,18 @@ export interface Style {
24
24
  textDecoration?: CSSProperties['textDecoration'];
25
25
  textTransform?: CSSProperties['textTransform'];
26
26
  };
27
+ color?: {
28
+ text?: CSSProperties['color'];
29
+ background?: CSSProperties['backgroundColor'];
30
+ gradient?: CSSProperties['background'];
31
+ };
32
+ elements?: {
33
+ link?: {
34
+ color?: {
35
+ text?: CSSProperties['color'];
36
+ };
37
+ };
38
+ };
27
39
  }
28
40
  export declare type StyleOptions = {
29
41
  /**
@@ -42,7 +54,8 @@ export declare type GeneratedCSSRule = {
42
54
  };
43
55
  export interface StyleDefinition {
44
56
  name: string;
45
- generate: (style: Style, options: StyleOptions) => GeneratedCSSRule[];
57
+ generate?: (style: Style, options: StyleOptions) => GeneratedCSSRule[];
58
+ getClassNames?: (style: Style) => string[];
46
59
  }
47
60
  export {};
48
61
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version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