@wordpress/style-engine 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/styles/index.js +3 -1
- package/build/styles/index.js.map +1 -1
- package/build/styles/margin.js +21 -0
- package/build/styles/margin.js.map +1 -0
- package/build-module/styles/index.js +2 -1
- package/build-module/styles/index.js.map +1 -1
- package/build-module/styles/margin.js +12 -0
- package/build-module/styles/margin.js.map +1 -0
- package/build-types/styles/index.d.ts.map +1 -1
- package/build-types/styles/margin.d.ts +10 -0
- package/build-types/styles/margin.d.ts.map +1 -0
- package/class-wp-style-engine.php +182 -0
- package/package.json +2 -2
- package/phpunit/class-wp-style-engine-test.php +158 -0
- package/src/styles/index.ts +2 -1
- package/src/styles/margin.ts +19 -0
- package/src/test/index.js +55 -7
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
package/build/styles/index.js
CHANGED
|
@@ -9,9 +9,11 @@ exports.styleDefinitions = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _padding = _interopRequireDefault(require("./padding"));
|
|
11
11
|
|
|
12
|
+
var _margin = _interopRequireDefault(require("./margin"));
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* Internal dependencies
|
|
14
16
|
*/
|
|
15
|
-
const styleDefinitions = [_padding.default];
|
|
17
|
+
const styleDefinitions = [_margin.default, _padding.default];
|
|
16
18
|
exports.styleDefinitions = styleDefinitions;
|
|
17
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/style-engine/src/styles/index.ts"],"names":["styleDefinitions","padding"],"mappings":";;;;;;;;;AAGA;;
|
|
1
|
+
{"version":3,"sources":["@wordpress/style-engine/src/styles/index.ts"],"names":["styleDefinitions","margin","padding"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIO,MAAMA,gBAAgB,GAAG,CAAEC,eAAF,EAAUC,gBAAV,CAAzB","sourcesContent":["/**\n * Internal dependencies\n */\nimport padding from './padding';\nimport margin from './margin';\n\nexport const styleDefinitions = [ margin, padding ];\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _utils = require("./utils");
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Internal dependencies
|
|
12
|
+
*/
|
|
13
|
+
const margin = {
|
|
14
|
+
name: 'margin',
|
|
15
|
+
generate: (style, options) => {
|
|
16
|
+
return (0, _utils.generateBoxRules)(style, options, ['spacing', 'margin'], 'margin');
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var _default = margin;
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
//# sourceMappingURL=margin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/style-engine/src/styles/margin.ts"],"names":["margin","name","generate","style","options"],"mappings":";;;;;;;AAIA;;AAJA;AACA;AACA;AAIA,MAAMA,MAAM,GAAG;AACdC,EAAAA,IAAI,EAAE,QADQ;AAEdC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAO,6BACND,KADM,EAENC,OAFM,EAGN,CAAE,SAAF,EAAa,QAAb,CAHM,EAIN,QAJM,CAAP;AAMA;AATa,CAAf;eAYeJ,M","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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/style-engine/src/styles/index.ts"],"names":["padding","styleDefinitions"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,OAAP,MAAoB,WAApB;AAEA,OAAO,MAAMC,gBAAgB,GAAG,CAAED,
|
|
1
|
+
{"version":3,"sources":["@wordpress/style-engine/src/styles/index.ts"],"names":["padding","margin","styleDefinitions"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,OAAP,MAAoB,WAApB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,OAAO,MAAMC,gBAAgB,GAAG,CAAED,MAAF,EAAUD,OAAV,CAAzB","sourcesContent":["/**\n * Internal dependencies\n */\nimport padding from './padding';\nimport margin from './margin';\n\nexport const styleDefinitions = [ margin, padding ];\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { generateBoxRules } from './utils';
|
|
5
|
+
const margin = {
|
|
6
|
+
name: 'margin',
|
|
7
|
+
generate: (style, options) => {
|
|
8
|
+
return generateBoxRules(style, options, ['spacing', 'margin'], 'margin');
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export default margin;
|
|
12
|
+
//# sourceMappingURL=margin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/style-engine/src/styles/margin.ts"],"names":["generateBoxRules","margin","name","generate","style","options"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,gBAAT,QAAiC,SAAjC;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;GAAsB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Style, StyleOptions } from '../types';
|
|
5
|
+
declare const margin: {
|
|
6
|
+
name: string;
|
|
7
|
+
generate: (style: Style, options: StyleOptions) => import("../types").GeneratedCSSRule[];
|
|
8
|
+
};
|
|
9
|
+
export default margin;
|
|
10
|
+
//# sourceMappingURL=margin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"margin.d.ts","sourceRoot":"","sources":["../../src/styles/margin.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGpD,QAAA,MAAM,MAAM;;sBAEQ,KAAK,WAAW,YAAY;CAQ/C,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* WP_Style_Engine
|
|
4
|
+
*
|
|
5
|
+
* Generates classnames and block styles.
|
|
6
|
+
*
|
|
7
|
+
* @package Gutenberg
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
if ( class_exists( 'WP_Style_Engine' ) ) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Singleton class representing the style engine.
|
|
16
|
+
*
|
|
17
|
+
* Consolidates rendering block styles to reduce duplication and streamline
|
|
18
|
+
* CSS styles generation.
|
|
19
|
+
*/
|
|
20
|
+
class WP_Style_Engine {
|
|
21
|
+
/**
|
|
22
|
+
* Container for the main instance of the class.
|
|
23
|
+
*
|
|
24
|
+
* @var WP_Style_Engine|null
|
|
25
|
+
*/
|
|
26
|
+
private static $instance = null;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Style definitions that contain the instructions to
|
|
30
|
+
* parse/output valid Gutenberg styles from a block's attributes.
|
|
31
|
+
* For every style definition, the follow properties are valid:
|
|
32
|
+
*
|
|
33
|
+
* - property_key => the key that represents a valid CSS property, e.g., "margin" or "border".
|
|
34
|
+
* - path => a path that accesses the corresponding style value in the block style object.
|
|
35
|
+
* - value_func => a function to generate an array of valid CSS rules for a particular style object.
|
|
36
|
+
* For example, `'padding' => 'array( 'top' => '1em' )` will return `array( 'padding-top' => '1em' )`
|
|
37
|
+
*/
|
|
38
|
+
const BLOCK_STYLE_DEFINITIONS_METADATA = array(
|
|
39
|
+
'spacing' => array(
|
|
40
|
+
'padding' => array(
|
|
41
|
+
'property_key' => 'padding',
|
|
42
|
+
'path' => array( 'spacing', 'padding' ),
|
|
43
|
+
'value_func' => 'static::get_css_box_rules',
|
|
44
|
+
),
|
|
45
|
+
'margin' => array(
|
|
46
|
+
'property_key' => 'margin',
|
|
47
|
+
'path' => array( 'spacing', 'margin' ),
|
|
48
|
+
'value_func' => 'static::get_css_box_rules',
|
|
49
|
+
),
|
|
50
|
+
),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Utility method to retrieve the main instance of the class.
|
|
55
|
+
*
|
|
56
|
+
* The instance will be created if it does not exist yet.
|
|
57
|
+
*
|
|
58
|
+
* @return WP_Style_Engine The main instance.
|
|
59
|
+
*/
|
|
60
|
+
public static function get_instance() {
|
|
61
|
+
if ( null === self::$instance ) {
|
|
62
|
+
self::$instance = new self();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return self::$instance;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Returns a CSS ruleset based on the instructions in BLOCK_STYLE_DEFINITIONS_METADATA.
|
|
70
|
+
*
|
|
71
|
+
* @param string|array $style_value A single raw Gutenberg style attributes value for a CSS property.
|
|
72
|
+
* @param array<string> $path An array of strings representing a path to the style value.
|
|
73
|
+
*
|
|
74
|
+
* @return array A CSS ruleset compatible with generate().
|
|
75
|
+
*/
|
|
76
|
+
protected function get_block_style_css_rules( $style_value, $path ) {
|
|
77
|
+
$style_definition = _wp_array_get( static::BLOCK_STYLE_DEFINITIONS_METADATA, $path, null );
|
|
78
|
+
|
|
79
|
+
if ( ! empty( $style_definition ) ) {
|
|
80
|
+
if (
|
|
81
|
+
isset( $style_definition['value_func'] ) &&
|
|
82
|
+
is_callable( $style_definition['value_func'] )
|
|
83
|
+
) {
|
|
84
|
+
return call_user_func( $style_definition['value_func'], $style_value, $style_definition['property_key'] );
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return array();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Returns an CSS ruleset.
|
|
93
|
+
* Styles are bundled based on the instructions in BLOCK_STYLE_DEFINITIONS_METADATA.
|
|
94
|
+
*
|
|
95
|
+
* @param array $block_styles An array of styles from a block's attributes.
|
|
96
|
+
* @param array $options = array(
|
|
97
|
+
* 'inline' => (boolean) Whether to return inline CSS rules destined to be inserted in an HTML `style` attribute.
|
|
98
|
+
* 'path' => (array) Specify a block style to generate, otherwise it'll try all in BLOCK_STYLE_DEFINITIONS_METADATA.
|
|
99
|
+
* );.
|
|
100
|
+
*
|
|
101
|
+
* @return string A CSS ruleset formatted to be placed in an HTML `style` attribute.
|
|
102
|
+
*/
|
|
103
|
+
public function generate( $block_styles, $options = array() ) {
|
|
104
|
+
$output = '';
|
|
105
|
+
|
|
106
|
+
if ( empty( $block_styles ) ) {
|
|
107
|
+
return $output;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
$rules = array();
|
|
111
|
+
|
|
112
|
+
// If a path to a specific block style is defined, only return rules for that style.
|
|
113
|
+
if ( isset( $options['path'] ) && is_array( $options['path'] ) ) {
|
|
114
|
+
$style_value = _wp_array_get( $block_styles, $options['path'], null );
|
|
115
|
+
if ( empty( $style_value ) ) {
|
|
116
|
+
return $output;
|
|
117
|
+
}
|
|
118
|
+
$rules = array_merge( $rules, $this->get_block_style_css_rules( $style_value, $options['path'] ) );
|
|
119
|
+
} else {
|
|
120
|
+
// Otherwise build them all.
|
|
121
|
+
foreach ( self::BLOCK_STYLE_DEFINITIONS_METADATA as $definition_group ) {
|
|
122
|
+
foreach ( $definition_group as $style_definition ) {
|
|
123
|
+
$style_value = _wp_array_get( $block_styles, $style_definition['path'], null );
|
|
124
|
+
if ( empty( $style_value ) ) {
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
$rules = array_merge( $rules, $this->get_block_style_css_rules( $style_value, $style_definition['path'] ) );
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if ( ! empty( $rules ) ) {
|
|
133
|
+
// Generate inline style rules.
|
|
134
|
+
if ( isset( $options['inline'] ) && true === $options['inline'] ) {
|
|
135
|
+
foreach ( $rules as $rule => $value ) {
|
|
136
|
+
$filtered_css = esc_html( safecss_filter_attr( "{$rule}:{$value}" ) );
|
|
137
|
+
if ( ! empty( $filtered_css ) ) {
|
|
138
|
+
$output .= $filtered_css . ';';
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return $output;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Returns a CSS ruleset for box model styles such as margins, padding, and borders.
|
|
149
|
+
*
|
|
150
|
+
* @param string|array $style_value A single raw Gutenberg style attributes value for a CSS property.
|
|
151
|
+
* @param string $style_property The CSS property for which we're creating a rule.
|
|
152
|
+
*
|
|
153
|
+
* @return array The class name for the added style.
|
|
154
|
+
*/
|
|
155
|
+
public static function get_css_box_rules( $style_value, $style_property ) {
|
|
156
|
+
$rules = array();
|
|
157
|
+
|
|
158
|
+
if ( ! $style_value ) {
|
|
159
|
+
return $rules;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if ( is_array( $style_value ) ) {
|
|
163
|
+
foreach ( $style_value as $key => $value ) {
|
|
164
|
+
$rules[ "$style_property-$key" ] = $value;
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
$rules[ $style_property ] = $style_value;
|
|
168
|
+
}
|
|
169
|
+
return $rules;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* This function returns the Style Engine instance.
|
|
175
|
+
*
|
|
176
|
+
* @return WP_Style_Engine
|
|
177
|
+
*/
|
|
178
|
+
function wp_get_style_engine() {
|
|
179
|
+
if ( class_exists( 'WP_Style_Engine' ) ) {
|
|
180
|
+
return WP_Style_Engine::get_instance();
|
|
181
|
+
}
|
|
182
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/style-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "WordPress Style engine.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "11eb1241e63c9240018323551c6753f8a5fa96f9"
|
|
38
38
|
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Tests the Style Engine class and associated functionality.
|
|
4
|
+
*
|
|
5
|
+
* @package Gutenberg
|
|
6
|
+
* @subpackage style-engine
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
require __DIR__ . '/../class-wp-style-engine.php';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Tests for registering, storing and generating styles.
|
|
13
|
+
*/
|
|
14
|
+
class WP_Style_Engine_Test extends WP_UnitTestCase {
|
|
15
|
+
/**
|
|
16
|
+
* Tests various manifestations of the $block_styles argument.
|
|
17
|
+
*
|
|
18
|
+
* @dataProvider data_block_styles_fixtures
|
|
19
|
+
*/
|
|
20
|
+
function test_generate_css( $block_styles, $options, $expected_output ) {
|
|
21
|
+
$style_engine = WP_Style_Engine::get_instance();
|
|
22
|
+
$generated_styles = $style_engine->generate(
|
|
23
|
+
$block_styles,
|
|
24
|
+
$options
|
|
25
|
+
);
|
|
26
|
+
$this->assertSame( $expected_output, $generated_styles );
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Data provider.
|
|
31
|
+
*
|
|
32
|
+
* @return array
|
|
33
|
+
*/
|
|
34
|
+
public function data_block_styles_fixtures() {
|
|
35
|
+
return array(
|
|
36
|
+
'default_return_value' => array(
|
|
37
|
+
'block_styles' => array(),
|
|
38
|
+
'options' => null,
|
|
39
|
+
'expected_output' => '',
|
|
40
|
+
),
|
|
41
|
+
|
|
42
|
+
'inline_invalid_block_styles_empty' => array(
|
|
43
|
+
'block_styles' => array(),
|
|
44
|
+
'options' => array(
|
|
45
|
+
'path' => array( 'spacing', 'padding' ),
|
|
46
|
+
'inline' => true,
|
|
47
|
+
),
|
|
48
|
+
'expected_output' => '',
|
|
49
|
+
),
|
|
50
|
+
|
|
51
|
+
'inline_invalid_block_styles_unknown_style' => array(
|
|
52
|
+
'block_styles' => array(
|
|
53
|
+
'pageBreakAfter' => 'verso',
|
|
54
|
+
),
|
|
55
|
+
'options' => array(
|
|
56
|
+
'inline' => true,
|
|
57
|
+
),
|
|
58
|
+
'expected_output' => '',
|
|
59
|
+
),
|
|
60
|
+
|
|
61
|
+
'inline_invalid_block_styles_unknown_definition' => array(
|
|
62
|
+
'block_styles' => array(
|
|
63
|
+
'pageBreakAfter' => 'verso',
|
|
64
|
+
),
|
|
65
|
+
'options' => array(
|
|
66
|
+
'path' => array( 'pageBreakAfter', 'verso' ),
|
|
67
|
+
'inline' => true,
|
|
68
|
+
),
|
|
69
|
+
'expected_output' => '',
|
|
70
|
+
),
|
|
71
|
+
|
|
72
|
+
'inline_invalid_block_styles_unknown_property' => array(
|
|
73
|
+
'block_styles' => array(
|
|
74
|
+
'spacing' => array(
|
|
75
|
+
'gap' => '1000vw',
|
|
76
|
+
),
|
|
77
|
+
),
|
|
78
|
+
'options' => array(
|
|
79
|
+
'path' => array( 'spacing', 'padding' ),
|
|
80
|
+
'inline' => true,
|
|
81
|
+
),
|
|
82
|
+
'expected_output' => '',
|
|
83
|
+
),
|
|
84
|
+
|
|
85
|
+
'inline_invalid_multiple_style_unknown_property' => array(
|
|
86
|
+
'block_styles' => array(
|
|
87
|
+
'spacing' => array(
|
|
88
|
+
'gavin' => '1000vw',
|
|
89
|
+
),
|
|
90
|
+
),
|
|
91
|
+
'options' => array(
|
|
92
|
+
'inline' => true,
|
|
93
|
+
),
|
|
94
|
+
'expected_output' => '',
|
|
95
|
+
),
|
|
96
|
+
|
|
97
|
+
'inline_valid_single_style_string' => array(
|
|
98
|
+
'block_styles' => array(
|
|
99
|
+
'spacing' => array(
|
|
100
|
+
'margin' => '111px',
|
|
101
|
+
),
|
|
102
|
+
),
|
|
103
|
+
'options' => array(
|
|
104
|
+
'path' => array( 'spacing', 'margin' ),
|
|
105
|
+
'inline' => true,
|
|
106
|
+
),
|
|
107
|
+
'expected_output' => 'margin:111px;',
|
|
108
|
+
),
|
|
109
|
+
|
|
110
|
+
'inline_valid_single_style' => array(
|
|
111
|
+
'block_styles' => array(
|
|
112
|
+
'spacing' => array(
|
|
113
|
+
'padding' => array(
|
|
114
|
+
'top' => '42px',
|
|
115
|
+
'left' => '2%',
|
|
116
|
+
'bottom' => '44px',
|
|
117
|
+
'right' => '5rem',
|
|
118
|
+
),
|
|
119
|
+
'margin' => array(
|
|
120
|
+
'top' => '12rem',
|
|
121
|
+
'left' => '2vh',
|
|
122
|
+
'bottom' => '2px',
|
|
123
|
+
'right' => '10em',
|
|
124
|
+
),
|
|
125
|
+
),
|
|
126
|
+
),
|
|
127
|
+
'options' => array(
|
|
128
|
+
'path' => array( 'spacing', 'padding' ),
|
|
129
|
+
'inline' => true,
|
|
130
|
+
),
|
|
131
|
+
'expected_output' => 'padding-top:42px;padding-left:2%;padding-bottom:44px;padding-right:5rem;',
|
|
132
|
+
),
|
|
133
|
+
|
|
134
|
+
'inline_valid_multiple_style' => array(
|
|
135
|
+
'block_styles' => array(
|
|
136
|
+
'spacing' => array(
|
|
137
|
+
'padding' => array(
|
|
138
|
+
'top' => '42px',
|
|
139
|
+
'left' => '2%',
|
|
140
|
+
'bottom' => '44px',
|
|
141
|
+
'right' => '5rem',
|
|
142
|
+
),
|
|
143
|
+
'margin' => array(
|
|
144
|
+
'top' => '12rem',
|
|
145
|
+
'left' => '2vh',
|
|
146
|
+
'bottom' => '2px',
|
|
147
|
+
'right' => '10em',
|
|
148
|
+
),
|
|
149
|
+
),
|
|
150
|
+
),
|
|
151
|
+
'options' => array(
|
|
152
|
+
'inline' => true,
|
|
153
|
+
),
|
|
154
|
+
'expected_output' => 'padding-top:42px;padding-left:2%;padding-bottom:44px;padding-right:5rem;margin-top:12rem;margin-left:2vh;margin-bottom:2px;margin-right:10em;',
|
|
155
|
+
),
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
}
|
package/src/styles/index.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Style, StyleOptions } from '../types';
|
|
5
|
+
import { generateBoxRules } from './utils';
|
|
6
|
+
|
|
7
|
+
const margin = {
|
|
8
|
+
name: 'margin',
|
|
9
|
+
generate: ( style: Style, options: StyleOptions ) => {
|
|
10
|
+
return generateBoxRules(
|
|
11
|
+
style,
|
|
12
|
+
options,
|
|
13
|
+
[ 'spacing', 'margin' ],
|
|
14
|
+
'margin'
|
|
15
|
+
);
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default margin;
|
package/src/test/index.js
CHANGED
|
@@ -8,29 +8,37 @@ describe( 'generate', () => {
|
|
|
8
8
|
expect( generate( {}, '.some-selector' ) ).toEqual( '' );
|
|
9
9
|
} );
|
|
10
10
|
|
|
11
|
-
it( 'should generate
|
|
11
|
+
it( 'should generate spacing styles', () => {
|
|
12
12
|
expect(
|
|
13
13
|
generate(
|
|
14
14
|
{
|
|
15
|
-
spacing: { padding: '10px' },
|
|
15
|
+
spacing: { padding: '10px', margin: '12px' },
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
selector: '.some-selector',
|
|
19
19
|
}
|
|
20
20
|
)
|
|
21
|
-
).toEqual( '.some-selector { padding: 10px; }' );
|
|
21
|
+
).toEqual( '.some-selector { margin: 12px; padding: 10px; }' );
|
|
22
22
|
|
|
23
23
|
expect(
|
|
24
24
|
generate(
|
|
25
25
|
{
|
|
26
|
-
spacing: {
|
|
26
|
+
spacing: {
|
|
27
|
+
padding: { top: '10px', bottom: '5px' },
|
|
28
|
+
margin: {
|
|
29
|
+
top: '11px',
|
|
30
|
+
right: '12px',
|
|
31
|
+
bottom: '13px',
|
|
32
|
+
left: '14px',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
27
35
|
},
|
|
28
36
|
{
|
|
29
37
|
selector: '.some-selector',
|
|
30
38
|
}
|
|
31
39
|
)
|
|
32
40
|
).toEqual(
|
|
33
|
-
'.some-selector { padding-top: 10px; padding-bottom: 5px; }'
|
|
41
|
+
'.some-selector { margin-top: 11px; margin-right: 12px; margin-bottom: 13px; margin-left: 14px; padding-top: 10px; padding-bottom: 5px; }'
|
|
34
42
|
);
|
|
35
43
|
} );
|
|
36
44
|
} );
|
|
@@ -40,10 +48,13 @@ describe( 'getCSSRules', () => {
|
|
|
40
48
|
expect( getCSSRules( {}, '.some-selector' ) ).toEqual( [] );
|
|
41
49
|
} );
|
|
42
50
|
|
|
43
|
-
it( 'should
|
|
51
|
+
it( 'should ignore unsupported styles', () => {
|
|
44
52
|
expect(
|
|
45
53
|
getCSSRules(
|
|
46
54
|
{
|
|
55
|
+
typography: {
|
|
56
|
+
fontVariantLigatures: 'no-common-ligatures',
|
|
57
|
+
},
|
|
47
58
|
spacing: { padding: '10px' },
|
|
48
59
|
},
|
|
49
60
|
{
|
|
@@ -57,17 +68,54 @@ describe( 'getCSSRules', () => {
|
|
|
57
68
|
value: '10px',
|
|
58
69
|
},
|
|
59
70
|
] );
|
|
71
|
+
} );
|
|
60
72
|
|
|
73
|
+
it( 'should return a rules array with CSS keys formatted in camelCase', () => {
|
|
61
74
|
expect(
|
|
62
75
|
getCSSRules(
|
|
63
76
|
{
|
|
64
|
-
spacing: { padding:
|
|
77
|
+
spacing: { padding: '10px', margin: '12px' },
|
|
65
78
|
},
|
|
66
79
|
{
|
|
67
80
|
selector: '.some-selector',
|
|
68
81
|
}
|
|
69
82
|
)
|
|
70
83
|
).toEqual( [
|
|
84
|
+
{
|
|
85
|
+
selector: '.some-selector',
|
|
86
|
+
key: 'margin',
|
|
87
|
+
value: '12px',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
selector: '.some-selector',
|
|
91
|
+
key: 'padding',
|
|
92
|
+
value: '10px',
|
|
93
|
+
},
|
|
94
|
+
] );
|
|
95
|
+
|
|
96
|
+
expect(
|
|
97
|
+
getCSSRules(
|
|
98
|
+
{
|
|
99
|
+
spacing: {
|
|
100
|
+
padding: { top: '10px', bottom: '5px' },
|
|
101
|
+
margin: { right: '2em', left: '1vw' },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
selector: '.some-selector',
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
).toEqual( [
|
|
109
|
+
{
|
|
110
|
+
selector: '.some-selector',
|
|
111
|
+
key: 'marginRight',
|
|
112
|
+
value: '2em',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
selector: '.some-selector',
|
|
116
|
+
key: 'marginLeft',
|
|
117
|
+
value: '1vw',
|
|
118
|
+
},
|
|
71
119
|
{
|
|
72
120
|
selector: '.some-selector',
|
|
73
121
|
key: 'paddingTop',
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","./src/types.ts","./src/styles/utils.ts","./src/styles/padding.ts","./src/styles/index.ts","./src/index.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"7ce243bcd20de992c3a726853892d2580c4ac0fde907920f93326ef51caac0ad","9e25da9dafdb1e51f83d551cdaf14b9f0b30bad86770ac23a25f413113010ac6","06323fb2db304c937fdcb3d840a4b14da96b4d26751fd277c0485f979311e507","75b8d3bc938a56af7454fa9ad2f29549e5f1260bfe8091a7d666fcd95c500a2e","9f5e49c49eadf457b182011135305f7290bd41fcba43cfda9c8934c9b6052a7f"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[45,47,48,49,50,51,52,53,54,55,56,57],[45,46,48,49,50,51,52,53,54,55,56,57],[46,47,48,49,50,51,52,53,54,55,56,57],[45,46,47,49,50,51,52,53,54,55,56,57],[45,46,47,48,50,51,52,53,54,55,56,57],[45,46,47,48,49,51,52,53,54,55,56,57],[45,46,47,48,49,50,52,53,54,55,56,57],[45,46,47,48,49,50,51,53,54,55,56,57],[45,46,47,48,49,50,51,52,54,55,56,57],[45,46,47,48,49,50,51,52,53,55,56,57],[45,46,47,48,49,50,51,52,53,54,56,57],[45,46,47,48,49,50,51,52,53,54,55,57],[45,46,47,48,49,50,51,52,53,54,55,56],[58,59,60,61],[57,63,66],[65],[63,64],[57,63],[62]],"referencedMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[62,14],[67,15],[66,16],[65,17],[64,18],[63,19]],"exportedModulesMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[62,14],[67,15],[66,16],[65,17],[64,18],[63,19]],"semanticDiagnosticsPerFile":[46,47,45,48,49,50,51,52,53,54,55,56,57,60,58,62,59,61,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,67,66,65,64,63]},"version":"4.4.2"}
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","./src/types.ts","./src/styles/utils.ts","./src/styles/padding.ts","./src/styles/margin.ts","./src/styles/index.ts","./src/index.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"7ce243bcd20de992c3a726853892d2580c4ac0fde907920f93326ef51caac0ad","9e25da9dafdb1e51f83d551cdaf14b9f0b30bad86770ac23a25f413113010ac6","06323fb2db304c937fdcb3d840a4b14da96b4d26751fd277c0485f979311e507","0dea1808a66f6454d343152aa05574117689dc804288bd063371d84d33e81631","937eaf10d261e9d206c218ede5ff2079164be4bb7a9fb3db3d65e04cd70fee9f","9f5e49c49eadf457b182011135305f7290bd41fcba43cfda9c8934c9b6052a7f"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[45,47,48,49,50,51,52,53,54,55,56,57],[45,46,48,49,50,51,52,53,54,55,56,57],[46,47,48,49,50,51,52,53,54,55,56,57],[45,46,47,49,50,51,52,53,54,55,56,57],[45,46,47,48,50,51,52,53,54,55,56,57],[45,46,47,48,49,51,52,53,54,55,56,57],[45,46,47,48,49,50,52,53,54,55,56,57],[45,46,47,48,49,50,51,53,54,55,56,57],[45,46,47,48,49,50,51,52,54,55,56,57],[45,46,47,48,49,50,51,52,53,55,56,57],[45,46,47,48,49,50,51,52,53,54,56,57],[45,46,47,48,49,50,51,52,53,54,55,57],[45,46,47,48,49,50,51,52,53,54,55,56],[58,59,60,61],[57,63,67],[65,66],[63,64],[57,63],[62]],"referencedMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[62,14],[68,15],[67,16],[66,17],[65,17],[64,18],[63,19]],"exportedModulesMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[62,14],[68,15],[67,16],[66,17],[65,17],[64,18],[63,19]],"semanticDiagnosticsPerFile":[46,47,45,48,49,50,51,52,53,54,55,56,57,60,58,62,59,61,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,68,67,66,65,64,63]},"version":"4.4.2"}
|