@embeddables/cli 0.7.2 → 0.7.3

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.
@@ -1218,16 +1218,16 @@ function htmlToJSXChildren(html, indent) {
1218
1218
  if (!attrMatch[0].includes('=')) {
1219
1219
  continue;
1220
1220
  }
1221
- // Convert HTML attribute names to JSX (e.g., class -> className, for -> htmlFor).
1222
- // Normalize classname (wrong serialization) to className so round-trip fixes bad HTML.
1221
+ // In CustomHTML we emit HTML-like attribute names (class, for, tabindex) so the
1222
+ // TSX matches the serialized HTML. Normalize classname (wrong serialization) to class.
1223
1223
  let jsxAttrName = attrName;
1224
1224
  const attrLower = attrName.toLowerCase();
1225
1225
  if (attrLower === 'class' || attrLower === 'classname')
1226
- jsxAttrName = 'className';
1226
+ jsxAttrName = 'class';
1227
1227
  else if (attrLower === 'for')
1228
- jsxAttrName = 'htmlFor';
1228
+ jsxAttrName = 'for';
1229
1229
  else if (attrLower === 'tabindex')
1230
- jsxAttrName = 'tabIndex';
1230
+ jsxAttrName = 'tabindex';
1231
1231
  // Handle style attribute: convert CSS string to JSX object
1232
1232
  if (attrName === 'style' && attrValue) {
1233
1233
  const styleObj = cssStringToStyleObject(attrValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embeddables/cli",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "embeddables": "./bin/embeddables.mjs"