@wordpress/style-engine 2.32.0 → 2.32.1-next.47f435fc9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +62 -69
- package/build/index.js.map +7 -1
- package/build/styles/background/index.js +76 -34
- package/build/styles/background/index.js.map +7 -1
- package/build/styles/border/index.js +61 -48
- package/build/styles/border/index.js.map +7 -1
- package/build/styles/color/background.js +31 -13
- package/build/styles/color/background.js.map +7 -1
- package/build/styles/color/gradient.js +31 -13
- package/build/styles/color/gradient.js.map +7 -1
- package/build/styles/color/index.js +36 -13
- package/build/styles/color/index.js.map +7 -1
- package/build/styles/color/text.js +26 -13
- package/build/styles/color/text.js.map +7 -1
- package/build/styles/constants.js +33 -8
- package/build/styles/constants.js.map +7 -1
- package/build/styles/dimensions/index.js +38 -15
- package/build/styles/dimensions/index.js.map +7 -1
- package/build/styles/index.js +54 -19
- package/build/styles/index.js.map +7 -1
- package/build/styles/outline/index.js +36 -23
- package/build/styles/outline/index.js.map +7 -1
- package/build/styles/shadow/index.js +26 -13
- package/build/styles/shadow/index.js.map +7 -1
- package/build/styles/spacing/index.js +35 -12
- package/build/styles/spacing/index.js.map +7 -1
- package/build/styles/spacing/margin.js +28 -15
- package/build/styles/spacing/margin.js.map +7 -1
- package/build/styles/spacing/padding.js +28 -15
- package/build/styles/spacing/padding.js.map +7 -1
- package/build/styles/typography/index.js +105 -31
- package/build/styles/typography/index.js.map +7 -1
- package/build/styles/utils.js +90 -132
- package/build/styles/utils.js.map +7 -1
- package/build/types.js +16 -5
- package/build/types.js.map +7 -1
- package/build-module/index.js +40 -61
- package/build-module/index.js.map +7 -1
- package/build-module/styles/background/index.js +58 -30
- package/build-module/styles/background/index.js.map +7 -1
- package/build-module/styles/border/index.js +42 -44
- package/build-module/styles/border/index.js.map +7 -1
- package/build-module/styles/color/background.js +13 -9
- package/build-module/styles/color/background.js.map +7 -1
- package/build-module/styles/color/gradient.js +13 -9
- package/build-module/styles/color/gradient.js.map +7 -1
- package/build-module/styles/color/index.js +8 -8
- package/build-module/styles/color/index.js.map +7 -1
- package/build-module/styles/color/text.js +8 -9
- package/build-module/styles/color/text.js.map +7 -1
- package/build-module/styles/constants.js +9 -4
- package/build-module/styles/constants.js.map +7 -1
- package/build-module/styles/dimensions/index.js +20 -11
- package/build-module/styles/dimensions/index.js.map +7 -1
- package/build-module/styles/index.js +22 -13
- package/build-module/styles/index.js.map +7 -1
- package/build-module/styles/outline/index.js +14 -15
- package/build-module/styles/outline/index.js.map +7 -1
- package/build-module/styles/shadow/index.js +8 -9
- package/build-module/styles/shadow/index.js.map +7 -1
- package/build-module/styles/spacing/index.js +7 -7
- package/build-module/styles/spacing/index.js.map +7 -1
- package/build-module/styles/spacing/margin.js +10 -11
- package/build-module/styles/spacing/margin.js.map +7 -1
- package/build-module/styles/spacing/padding.js +10 -11
- package/build-module/styles/spacing/padding.js.map +7 -1
- package/build-module/styles/typography/index.js +87 -27
- package/build-module/styles/typography/index.js.map +7 -1
- package/build-module/styles/utils.js +72 -128
- package/build-module/styles/utils.js.map +7 -1
- package/build-module/types.js +1 -2
- package/build-module/types.js.map +7 -1
- package/package.json +10 -3
|
@@ -1,163 +1,107 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { VARIABLE_REFERENCE_PREFIX, VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE, VARIABLE_PATH_SEPARATOR_TOKEN_STYLE } from './constants';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Helper util to return a value from a certain path of the object.
|
|
14
|
-
* Path is specified as an array of properties, like `[ 'x', 'y' ]`.
|
|
15
|
-
*
|
|
16
|
-
* @param object Input object.
|
|
17
|
-
* @param path Path to the object property.
|
|
18
|
-
* @return Value of the object property at the specified path.
|
|
19
|
-
*/
|
|
20
|
-
export const getStyleValueByPath = (object, path) => {
|
|
1
|
+
import { paramCase as kebabCase } from "change-case";
|
|
2
|
+
import {
|
|
3
|
+
VARIABLE_REFERENCE_PREFIX,
|
|
4
|
+
VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE,
|
|
5
|
+
VARIABLE_PATH_SEPARATOR_TOKEN_STYLE
|
|
6
|
+
} from "./constants";
|
|
7
|
+
const getStyleValueByPath = (object, path) => {
|
|
21
8
|
let value = object;
|
|
22
|
-
path.forEach(fieldName => {
|
|
9
|
+
path.forEach((fieldName) => {
|
|
23
10
|
value = value?.[fieldName];
|
|
24
11
|
});
|
|
25
12
|
return value;
|
|
26
13
|
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Returns a JSON representation of the generated CSS rules.
|
|
30
|
-
*
|
|
31
|
-
* @param style Style object.
|
|
32
|
-
* @param options Options object with settings to adjust how the styles are generated.
|
|
33
|
-
* @param path An array of strings representing the path to the style value in the style object.
|
|
34
|
-
* @param ruleKey A CSS property key.
|
|
35
|
-
*
|
|
36
|
-
* @return GeneratedCSSRule[] CSS rules.
|
|
37
|
-
*/
|
|
38
|
-
export function generateRule(style, options, path, ruleKey) {
|
|
14
|
+
function generateRule(style, options, path, ruleKey) {
|
|
39
15
|
const styleValue = getStyleValueByPath(style, path);
|
|
40
|
-
return styleValue ? [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
16
|
+
return styleValue ? [
|
|
17
|
+
{
|
|
18
|
+
selector: options?.selector,
|
|
19
|
+
key: ruleKey,
|
|
20
|
+
value: getCSSValueFromRawStyle(styleValue)
|
|
21
|
+
}
|
|
22
|
+
] : [];
|
|
45
23
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @param options Options object with settings to adjust how the styles are generated.
|
|
52
|
-
* @param path An array of strings representing the path to the style value in the style object.
|
|
53
|
-
* @param ruleKeys An array of CSS property keys and patterns.
|
|
54
|
-
* @param individualProperties The "sides" or individual properties for which to generate rules.
|
|
55
|
-
*
|
|
56
|
-
* @return GeneratedCSSRule[] CSS rules.
|
|
57
|
-
*/
|
|
58
|
-
export function generateBoxRules(style, options, path, ruleKeys, individualProperties = ['top', 'right', 'bottom', 'left']) {
|
|
59
|
-
const boxStyle = getStyleValueByPath(style, path);
|
|
24
|
+
function generateBoxRules(style, options, path, ruleKeys, individualProperties = ["top", "right", "bottom", "left"]) {
|
|
25
|
+
const boxStyle = getStyleValueByPath(
|
|
26
|
+
style,
|
|
27
|
+
path
|
|
28
|
+
);
|
|
60
29
|
if (!boxStyle) {
|
|
61
30
|
return [];
|
|
62
31
|
}
|
|
63
32
|
const rules = [];
|
|
64
|
-
if (typeof boxStyle ===
|
|
33
|
+
if (typeof boxStyle === "string") {
|
|
65
34
|
rules.push({
|
|
66
35
|
selector: options?.selector,
|
|
67
36
|
key: ruleKeys.default,
|
|
68
37
|
value: getCSSValueFromRawStyle(boxStyle)
|
|
69
38
|
});
|
|
70
39
|
} else {
|
|
71
|
-
const sideRules = individualProperties.reduce(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
40
|
+
const sideRules = individualProperties.reduce(
|
|
41
|
+
(acc, side) => {
|
|
42
|
+
const value = getCSSValueFromRawStyle(
|
|
43
|
+
getStyleValueByPath(boxStyle, [side])
|
|
44
|
+
);
|
|
45
|
+
if (value) {
|
|
46
|
+
acc.push({
|
|
47
|
+
selector: options?.selector,
|
|
48
|
+
key: ruleKeys?.individual.replace(
|
|
49
|
+
"%s",
|
|
50
|
+
upperFirst(side)
|
|
51
|
+
),
|
|
52
|
+
value
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return acc;
|
|
56
|
+
},
|
|
57
|
+
[]
|
|
58
|
+
);
|
|
82
59
|
rules.push(...sideRules);
|
|
83
60
|
}
|
|
84
61
|
return rules;
|
|
85
62
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
export function getCSSValueFromRawStyle(styleValue) {
|
|
103
|
-
if (typeof styleValue === 'string' && styleValue.startsWith(VARIABLE_REFERENCE_PREFIX)) {
|
|
104
|
-
const variable = styleValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).map(presetVariable => kebabCase(presetVariable, {
|
|
105
|
-
splitRegexp: [/([a-z0-9])([A-Z])/g,
|
|
106
|
-
// fooBar => foo-bar, 3Bar => 3-bar
|
|
107
|
-
/([0-9])([a-z])/g,
|
|
108
|
-
// 3bar => 3-bar
|
|
109
|
-
/([A-Za-z])([0-9])/g,
|
|
110
|
-
// Foo3 => foo-3, foo3 => foo-3
|
|
111
|
-
/([A-Z])([A-Z][a-z])/g // FOOBar => foo-bar
|
|
112
|
-
]
|
|
113
|
-
})).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
|
|
63
|
+
function getCSSValueFromRawStyle(styleValue) {
|
|
64
|
+
if (typeof styleValue === "string" && styleValue.startsWith(VARIABLE_REFERENCE_PREFIX)) {
|
|
65
|
+
const variable = styleValue.slice(VARIABLE_REFERENCE_PREFIX.length).split(VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).map(
|
|
66
|
+
(presetVariable) => kebabCase(presetVariable, {
|
|
67
|
+
splitRegexp: [
|
|
68
|
+
/([a-z0-9])([A-Z])/g,
|
|
69
|
+
// fooBar => foo-bar, 3Bar => 3-bar
|
|
70
|
+
/([0-9])([a-z])/g,
|
|
71
|
+
// 3bar => 3-bar
|
|
72
|
+
/([A-Za-z])([0-9])/g,
|
|
73
|
+
// Foo3 => foo-3, foo3 => foo-3
|
|
74
|
+
/([A-Z])([A-Z][a-z])/g
|
|
75
|
+
// FOOBar => foo-bar
|
|
76
|
+
]
|
|
77
|
+
})
|
|
78
|
+
).join(VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
|
|
114
79
|
return `var(--wp--${variable})`;
|
|
115
80
|
}
|
|
116
81
|
return styleValue;
|
|
117
82
|
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Capitalizes the first letter in a string.
|
|
121
|
-
*
|
|
122
|
-
* @param string The string whose first letter the function will capitalize.
|
|
123
|
-
*
|
|
124
|
-
* @return String with the first letter capitalized.
|
|
125
|
-
*/
|
|
126
|
-
export function upperFirst(string) {
|
|
83
|
+
function upperFirst(string) {
|
|
127
84
|
const [firstLetter, ...rest] = string;
|
|
128
|
-
return firstLetter.toUpperCase() + rest.join(
|
|
85
|
+
return firstLetter.toUpperCase() + rest.join("");
|
|
129
86
|
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Converts an array of strings into a camelCase string.
|
|
133
|
-
*
|
|
134
|
-
* @param strings The strings to join into a camelCase string.
|
|
135
|
-
*
|
|
136
|
-
* @return camelCase string.
|
|
137
|
-
*/
|
|
138
|
-
export function camelCaseJoin(strings) {
|
|
87
|
+
function camelCaseJoin(strings) {
|
|
139
88
|
const [firstItem, ...rest] = strings;
|
|
140
|
-
return firstItem.toLowerCase() + rest.map(upperFirst).join(
|
|
89
|
+
return firstItem.toLowerCase() + rest.map(upperFirst).join("");
|
|
141
90
|
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Safely decodes a URI with `decodeURI`. Returns the URI unmodified if
|
|
145
|
-
* `decodeURI` throws an error.
|
|
146
|
-
*
|
|
147
|
-
* @param {string} uri URI to decode.
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```js
|
|
151
|
-
* const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'
|
|
152
|
-
* ```
|
|
153
|
-
*
|
|
154
|
-
* @return {string} Decoded URI if possible.
|
|
155
|
-
*/
|
|
156
|
-
export function safeDecodeURI(uri) {
|
|
91
|
+
function safeDecodeURI(uri) {
|
|
157
92
|
try {
|
|
158
93
|
return decodeURI(uri);
|
|
159
94
|
} catch (uriError) {
|
|
160
95
|
return uri;
|
|
161
96
|
}
|
|
162
97
|
}
|
|
163
|
-
|
|
98
|
+
export {
|
|
99
|
+
camelCaseJoin,
|
|
100
|
+
generateBoxRules,
|
|
101
|
+
generateRule,
|
|
102
|
+
getCSSValueFromRawStyle,
|
|
103
|
+
getStyleValueByPath,
|
|
104
|
+
safeDecodeURI,
|
|
105
|
+
upperFirst
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/styles/utils.ts"],
|
|
4
|
+
"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: getCSSValueFromRawStyle( 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: getCSSValueFromRawStyle( 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 = getCSSValueFromRawStyle(\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 WordPress CSS custom var value from incoming style preset value,\n * if one is detected.\n *\n * The preset value is a string and follows the pattern `var:description|context|slug`.\n *\n * Example:\n *\n * `getCSSValueFromRawStyle( 'var:preset|color|heavenlyBlue' )` // returns 'var(--wp--preset--color--heavenly-blue)'\n *\n * @param styleValue A string representing a raw CSS value. Non-strings won't be processed.\n *\n * @return A CSS custom var value if the incoming style value is a preset value.\n */\n\nexport function getCSSValueFromRawStyle< StyleValue = string >(\n\tstyleValue: StyleValue\n): StyleValue {\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 })` as StyleValue;\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\n/**\n * Safely decodes a URI with `decodeURI`. Returns the URI unmodified if\n * `decodeURI` throws an error.\n *\n * @param {string} uri URI to decode.\n *\n * @example\n * ```js\n * const badUri = safeDecodeURI( '%z' ); // does not throw an Error, simply returns '%z'\n * ```\n *\n * @return {string} Decoded URI if possible.\n */\nexport function safeDecodeURI( uri: string ): string {\n\ttry {\n\t\treturn decodeURI( uri );\n\t} catch ( uriError ) {\n\t\treturn uri;\n\t}\n}\n"],
|
|
5
|
+
"mappings": "AAGA,SAAS,aAAa,iBAAiB;AAYvC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAUA,MAAM,sBAAsB,CAClC,QACA,SACI;AACJ,MAAI,QAAa;AACjB,OAAK,QAAS,CAAE,cAAuB;AACtC,YAAQ,QAAS,SAAU;AAAA,EAC5B,CAAE;AACF,SAAO;AACR;AAYO,SAAS,aACf,OACA,SACA,MACA,SACqB;AACrB,QAAM,aAAiC,oBAAqB,OAAO,IAAK;AAExE,SAAO,aACJ;AAAA,IACA;AAAA,MACC,UAAU,SAAS;AAAA,MACnB,KAAK;AAAA,MACL,OAAO,wBAAyB,UAAW;AAAA,IAC5C;AAAA,EACA,IACA,CAAC;AACL;AAaO,SAAS,iBACf,OACA,SACA,MACA,UACA,uBAAiC,CAAE,OAAO,SAAS,UAAU,MAAO,GAC/C;AACrB,QAAM,WAAqC;AAAA,IAC1C;AAAA,IACA;AAAA,EACD;AACA,MAAK,CAAE,UAAW;AACjB,WAAO,CAAC;AAAA,EACT;AAEA,QAAM,QAA4B,CAAC;AACnC,MAAK,OAAO,aAAa,UAAW;AACnC,UAAM,KAAM;AAAA,MACX,UAAU,SAAS;AAAA,MACnB,KAAK,SAAS;AAAA,MACd,OAAO,wBAAyB,QAAS;AAAA,IAC1C,CAAE;AAAA,EACH,OAAO;AACN,UAAM,YAAY,qBAAqB;AAAA,MACtC,CAAE,KAAyB,SAAkB;AAC5C,cAAM,QAAQ;AAAA,UACb,oBAAqB,UAAU,CAAE,IAAK,CAAE;AAAA,QACzC;AACA,YAAK,OAAQ;AACZ,cAAI,KAAM;AAAA,YACT,UAAU,SAAS;AAAA,YACnB,KAAK,UAAU,WAAW;AAAA,cACzB;AAAA,cACA,WAAY,IAAK;AAAA,YAClB;AAAA,YACA;AAAA,UACD,CAAE;AAAA,QACH;AACA,eAAO;AAAA,MACR;AAAA,MACA,CAAC;AAAA,IACF;AACA,UAAM,KAAM,GAAG,SAAU;AAAA,EAC1B;AAEA,SAAO;AACR;AAiBO,SAAS,wBACf,YACa;AACb,MACC,OAAO,eAAe,YACtB,WAAW,WAAY,yBAA0B,GAChD;AACD,UAAM,WAAW,WACf,MAAO,0BAA0B,MAAO,EACxC,MAAO,uCAAwC,EAC/C;AAAA,MAAK,CAAE,mBACP,UAAW,gBAAgB;AAAA,QAC1B,aAAa;AAAA,UACZ;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,UACA;AAAA;AAAA,QACD;AAAA,MACD,CAAE;AAAA,IACH,EACC,KAAM,mCAAoC;AAC5C,WAAO,aAAc,QAAS;AAAA,EAC/B;AACA,SAAO;AACR;AASO,SAAS,WAAY,QAAyB;AACpD,QAAM,CAAE,aAAa,GAAG,IAAK,IAAI;AACjC,SAAO,YAAY,YAAY,IAAI,KAAK,KAAM,EAAG;AAClD;AASO,SAAS,cAAe,SAA4B;AAC1D,QAAM,CAAE,WAAW,GAAG,IAAK,IAAI;AAC/B,SAAO,UAAU,YAAY,IAAI,KAAK,IAAK,UAAW,EAAE,KAAM,EAAG;AAClE;AAeO,SAAS,cAAe,KAAsB;AACpD,MAAI;AACH,WAAO,UAAW,GAAI;AAAA,EACvB,SAAU,UAAW;AACpB,WAAO;AAAA,EACR;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/build-module/types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": [],
|
|
4
|
+
"sourcesContent": [],
|
|
5
|
+
"mappings": "",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/style-engine",
|
|
3
|
-
"version": "2.32.0",
|
|
3
|
+
"version": "2.32.1-next.47f435fc9.0",
|
|
4
4
|
"description": "A suite of parsers and compilers for WordPress styles.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -26,16 +26,23 @@
|
|
|
26
26
|
},
|
|
27
27
|
"main": "build/index.js",
|
|
28
28
|
"module": "build-module/index.js",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./build-types/index.d.ts",
|
|
32
|
+
"import": "./build-module/index.js",
|
|
33
|
+
"require": "./build/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
36
|
+
},
|
|
29
37
|
"react-native": "src/index",
|
|
30
38
|
"wpScript": true,
|
|
31
39
|
"types": "build-types",
|
|
32
40
|
"sideEffects": false,
|
|
33
41
|
"dependencies": {
|
|
34
|
-
"@babel/runtime": "7.25.7",
|
|
35
42
|
"change-case": "^4.1.2"
|
|
36
43
|
},
|
|
37
44
|
"publishConfig": {
|
|
38
45
|
"access": "public"
|
|
39
46
|
},
|
|
40
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "9720f22c138771d2ed1a0522725c3cdf1c242953"
|
|
41
48
|
}
|