@wix/zero-config-implementation 1.24.0 → 1.25.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/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "registry": "https://registry.npmjs.org/",
5
5
  "access": "public"
6
6
  },
7
- "version": "1.24.0",
7
+ "version": "1.25.0",
8
8
  "description": "Core library for extracting component manifests from JS and CSS files",
9
9
  "type": "module",
10
10
  "main": "dist/index.js",
@@ -83,5 +83,5 @@
83
83
  ]
84
84
  }
85
85
  },
86
- "falconPackageHash": "79d9ab055f999610e162c914b9c616eed125490c1816f8b91e2dac53"
86
+ "falconPackageHash": "e76e4e02feadede0d8c9d011d32118218b349b5ab948a12605907e98"
87
87
  }
@@ -5,6 +5,7 @@
5
5
  * based on its tag, role, and whether it has text content.
6
6
  */
7
7
 
8
+ import { CSS_PROPERTIES } from '@wix/zero-config-schema'
8
9
  import type { CreateElementEvent, ReactExtractor } from './core/types'
9
10
 
10
11
  // ─────────────────────────────────────────────────────────────────────────────
@@ -62,41 +63,50 @@ const INTERACTIVE_TAGS = new Set(['button', 'input', 'textarea', 'select'])
62
63
  /**
63
64
  * CSS properties for Layout Containers and Interactive Elements
64
65
  */
66
+ const { CSS_PROPERTY_TYPE } = CSS_PROPERTIES
67
+
65
68
  const CONTAINER_CSS_PROPERTIES = [
66
- 'background',
67
- 'border-block-start',
68
- 'border-block-end',
69
- 'border-inline-start',
70
- 'border-inline-end',
71
- 'padding-block-start',
72
- 'padding-block-end',
73
- 'padding-inline-start',
74
- 'padding-inline-end',
75
- 'border-start-start-radius',
76
- 'border-start-end-radius',
77
- 'border-end-start-radius',
78
- 'border-end-end-radius',
79
- 'box-shadow',
69
+ CSS_PROPERTY_TYPE.background,
70
+ CSS_PROPERTY_TYPE.borderTop,
71
+ CSS_PROPERTY_TYPE.borderBottom,
72
+ CSS_PROPERTY_TYPE.borderInlineStart,
73
+ CSS_PROPERTY_TYPE.borderInlineEnd,
74
+ CSS_PROPERTY_TYPE.paddingTop,
75
+ CSS_PROPERTY_TYPE.paddingBottom,
76
+ CSS_PROPERTY_TYPE.paddingInlineStart,
77
+ CSS_PROPERTY_TYPE.paddingInlineEnd,
78
+ CSS_PROPERTY_TYPE.borderStartStartRadius,
79
+ CSS_PROPERTY_TYPE.borderStartEndRadius,
80
+ CSS_PROPERTY_TYPE.borderEndStartRadius,
81
+ CSS_PROPERTY_TYPE.borderEndEndRadius,
82
+ CSS_PROPERTY_TYPE.boxShadow,
80
83
  ]
81
84
 
82
85
  /**
83
86
  * CSS properties for Text elements and leaf elements with textContent
84
87
  */
85
- const TEXT_CSS_PROPERTIES = ['font', 'line-height', 'letter-spacing', 'text-decoration']
88
+ const TEXT_CSS_PROPERTIES = [
89
+ CSS_PROPERTY_TYPE.font,
90
+ CSS_PROPERTY_TYPE.lineHeight,
91
+ CSS_PROPERTY_TYPE.letterSpacing,
92
+ CSS_PROPERTY_TYPE.textDecorationLine,
93
+ CSS_PROPERTY_TYPE.textTransform,
94
+ CSS_PROPERTY_TYPE.color,
95
+ ]
86
96
 
87
97
  /**
88
98
  * CSS properties for Media elements (excluding svg)
89
99
  */
90
100
  const MEDIA_CSS_PROPERTIES = [
91
- 'border-block-start',
92
- 'border-block-end',
93
- 'border-inline-start',
94
- 'border-inline-end',
95
- 'border-start-start-radius',
96
- 'border-start-end-radius',
97
- 'border-end-start-radius',
98
- 'border-end-end-radius',
99
- 'box-shadow',
101
+ CSS_PROPERTY_TYPE.borderTop,
102
+ CSS_PROPERTY_TYPE.borderBottom,
103
+ CSS_PROPERTY_TYPE.borderInlineStart,
104
+ CSS_PROPERTY_TYPE.borderInlineEnd,
105
+ CSS_PROPERTY_TYPE.borderStartStartRadius,
106
+ CSS_PROPERTY_TYPE.borderStartEndRadius,
107
+ CSS_PROPERTY_TYPE.borderEndStartRadius,
108
+ CSS_PROPERTY_TYPE.borderEndEndRadius,
109
+ CSS_PROPERTY_TYPE.boxShadow,
100
110
  ]
101
111
 
102
112
  // ─────────────────────────────────────────────────────────────────────────────