@webstudio-is/css-engine 0.205.0 → 0.206.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/lib/index.js
CHANGED
|
@@ -380,7 +380,10 @@ var mergeStyles = (styleMap) => {
|
|
|
380
380
|
};
|
|
381
381
|
|
|
382
382
|
// src/core/to-property.ts
|
|
383
|
-
var hyphenateProperty = (property) => property.replace(
|
|
383
|
+
var hyphenateProperty = (property) => property.replace(
|
|
384
|
+
/[A-Z]/g,
|
|
385
|
+
(match) => "-" + match.toLowerCase()
|
|
386
|
+
);
|
|
384
387
|
|
|
385
388
|
// src/core/rules.ts
|
|
386
389
|
var mapGroupBy = (array, getKey) => {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { StyleValue } from "../schema";
|
|
2
2
|
import { type TransformValue } from "./to-value";
|
|
3
|
+
/**
|
|
4
|
+
* Use CssStyleMap instead to enforce hyphenated properties.
|
|
5
|
+
* @deprecated
|
|
6
|
+
*/
|
|
3
7
|
export type StyleMap = Map<string, StyleValue>;
|
|
4
8
|
export declare const generateStyleMap: (style: StyleMap, { indent, transformValue, }?: {
|
|
5
9
|
indent?: number;
|
package/lib/types/schema.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { type TransformValue } from "./core/to-value";
|
|
|
4
4
|
export type CustomProperty = `--${string}`;
|
|
5
5
|
export type StyleProperty = CamelCasedProperty | CustomProperty;
|
|
6
6
|
export type CssProperty = HyphenatedProperty | CustomProperty;
|
|
7
|
+
export type CssStyleMap = Map<CssProperty, StyleValue>;
|
|
7
8
|
declare const Unit: z.ZodType<GeneratedUnit | "number">;
|
|
8
9
|
export type Unit = z.infer<typeof Unit>;
|
|
9
10
|
export declare const UnitValue: z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/css-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.206.0",
|
|
4
4
|
"description": "CSS Renderer for Webstudio",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@emotion/hash": "^0.9.2",
|
|
10
10
|
"zod": "^3.22.4",
|
|
11
|
-
"@webstudio-is/fonts": "0.
|
|
11
|
+
"@webstudio-is/fonts": "0.206.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/react": "^18.2.70",
|