@webstudio-is/css-engine 0.163.0 → 0.167.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
@@ -87,12 +87,12 @@ var toValue = (styleValue, transformValue) => {
87
87
  };
88
88
 
89
89
  // src/core/to-property.ts
90
- import hyphenate from "hyphenate-style-name";
90
+ var hyphenateProperty = (property) => property.replace(/[A-Z]/g, (match) => "-" + match.toLowerCase());
91
91
  var toProperty = (property) => {
92
92
  if (property === "backgroundClip") {
93
93
  return "-webkit-background-clip";
94
94
  }
95
- return hyphenate(property);
95
+ return hyphenateProperty(property);
96
96
  };
97
97
 
98
98
  // src/core/rules.ts
@@ -787,8 +787,8 @@ export {
787
787
  equalMedia,
788
788
  findApplicableMedia,
789
789
  generateAtomic,
790
+ hyphenateProperty,
790
791
  isValidStaticStyleValue,
791
792
  matchMedia,
792
- toProperty,
793
793
  toValue
794
794
  };
@@ -2,7 +2,7 @@ export type { NestingRule, StyleRule, MediaRule, PlaintextRule, FontFaceRule, }
2
2
  export type { StyleSheetRegular } from "./style-sheet-regular";
3
3
  export * from "./create-style-sheet";
4
4
  export * from "./to-value";
5
- export * from "./to-property";
5
+ export { hyphenateProperty } from "./to-property";
6
6
  export * from "./match-media";
7
7
  export * from "./equal-media";
8
8
  export * from "./compare-media";
@@ -1,2 +1,6 @@
1
1
  import type { StyleProperty } from "../schema";
2
+ /**
3
+ * Hyphenates a camelcased CSS property name
4
+ */
5
+ export declare const hyphenateProperty: (property: string) => string;
2
6
  export declare const toProperty: (property: StyleProperty) => string;
package/package.json CHANGED
@@ -1,30 +1,24 @@
1
1
  {
2
2
  "name": "@webstudio-is/css-engine",
3
- "version": "0.163.0",
3
+ "version": "0.167.0",
4
4
  "description": "CSS Renderer for Webstudio",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
7
7
  "type": "module",
8
8
  "dependencies": {
9
9
  "@emotion/hash": "^0.9.1",
10
- "hyphenate-style-name": "^1.0.4",
11
10
  "zod": "^3.22.4",
12
- "@webstudio-is/fonts": "0.163.0",
13
- "@webstudio-is/error-utils": "0.163.0"
11
+ "@webstudio-is/error-utils": "0.167.0",
12
+ "@webstudio-is/fonts": "0.167.0"
14
13
  },
15
14
  "devDependencies": {
16
15
  "@jest/globals": "^29.7.0",
17
- "@storybook/addon-essentials": "^8.1.2",
18
- "@storybook/addon-links": "^8.1.2",
19
- "@storybook/react": "^8.1.2",
20
- "@types/hyphenate-style-name": "^1.0.0",
21
16
  "@types/react": "^18.2.70",
22
17
  "@types/react-dom": "^18.2.25",
23
18
  "react": "18.3.0-canary-14898b6a9-20240318",
24
19
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
25
20
  "typescript": "5.4.5",
26
21
  "@webstudio-is/jest-config": "1.0.7",
27
- "@webstudio-is/storybook-config": "0.0.0",
28
22
  "@webstudio-is/tsconfig": "1.0.7"
29
23
  },
30
24
  "exports": {
@@ -45,8 +39,6 @@
45
39
  "dev": "rm -rf lib && esbuild 'src/**/*.ts' 'src/**/*.tsx' --outdir=lib --watch",
46
40
  "build": "rm -rf lib && esbuild src/index.ts --outdir=lib --bundle --format=esm --packages=external",
47
41
  "dts": "tsc --project tsconfig.dts.json",
48
- "test": "NODE_OPTIONS=--experimental-vm-modules jest",
49
- "storybook:dev": "storybook dev -p 6006",
50
- "storybook:build": "storybook build"
42
+ "test": "NODE_OPTIONS=--experimental-vm-modules jest"
51
43
  }
52
44
  }