@lvce-editor/preview-worker 1.7.0 → 1.8.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.
@@ -2209,7 +2209,8 @@ const parseHtml = (html, allowedAttributes = [], defaultAllowedAttributes = [])
2209
2209
  break;
2210
2210
  case AttributeValue:
2211
2211
  if (skipDepth === 0 && !captureCss && (allAllowedAttributes.has(attributeName) || useBuiltInDefaults && isDefaultAllowedAttribute(attributeName, defaultAllowedAttributes))) {
2212
- const finalAttributeName = attributeName === 'class' ? 'className' : attributeName;
2212
+ let finalAttributeName = attributeName;
2213
+ if (attributeName === 'class') finalAttributeName = 'className';else if (attributeName === 'type') finalAttributeName = 'inputType';
2213
2214
  current[finalAttributeName] = token.text;
2214
2215
  }
2215
2216
  attributeName = '';
@@ -2218,7 +2219,8 @@ const parseHtml = (html, allowedAttributes = [], defaultAllowedAttributes = [])
2218
2219
  if (skipDepth === 0 && !captureCss) {
2219
2220
  // Handle boolean attributes (attributes without values)
2220
2221
  if (attributeName && (allAllowedAttributes.has(attributeName) || useBuiltInDefaults && isDefaultAllowedAttribute(attributeName, defaultAllowedAttributes))) {
2221
- const finalAttributeName = attributeName === 'class' ? 'className' : attributeName;
2222
+ let finalAttributeName = attributeName;
2223
+ if (attributeName === 'class') finalAttributeName = 'className';else if (attributeName === 'type') finalAttributeName = 'inputType';
2222
2224
  current[finalAttributeName] = attributeName;
2223
2225
  }
2224
2226
  attributeName = '';
@@ -2305,7 +2307,8 @@ const parseHtml = (html, allowedAttributes = [], defaultAllowedAttributes = [])
2305
2307
  if (skipDepth === 0 && !captureCss &&
2306
2308
  // Handle boolean attributes (attributes without values)
2307
2309
  attributeName && (allAllowedAttributes.has(attributeName) || useBuiltInDefaults && isDefaultAllowedAttribute(attributeName, defaultAllowedAttributes))) {
2308
- const finalAttributeName = attributeName === 'class' ? 'className' : attributeName;
2310
+ let finalAttributeName = attributeName;
2311
+ if (attributeName === 'class') finalAttributeName = 'className';else if (attributeName === 'type') finalAttributeName = 'inputType';
2309
2312
  current[finalAttributeName] = attributeName;
2310
2313
  }
2311
2314
  attributeName = '';
@@ -2586,7 +2589,7 @@ const getPreviewDom = state => {
2586
2589
  childCount: 1,
2587
2590
  type: H1$1
2588
2591
  }, {
2589
- text: 'hello from preview',
2592
+ text: 'Edit the file on the left to get started.',
2590
2593
  type: Text$1
2591
2594
  }];
2592
2595
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/preview-worker",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Preview Worker",
5
5
  "repository": {
6
6
  "type": "git",