@lvce-editor/virtual-dom 1.43.0 → 1.45.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/dist/index.js CHANGED
@@ -50,6 +50,7 @@ const TextArea$1 = 'textarea';
50
50
  const Select$1 = 'select';
51
51
  const Option$1 = 'option';
52
52
  const Code$1 = 'code';
53
+ const Label$1 = 'label';
53
54
 
54
55
  const Audio = 0;
55
56
  const Button = 1;
@@ -104,6 +105,7 @@ const TextArea = 62;
104
105
  const Select = 63;
105
106
  const Option = 64;
106
107
  const Code = 65;
108
+ const Label = 66;
107
109
 
108
110
  const getElementTag = type => {
109
111
  switch (type) {
@@ -211,6 +213,8 @@ const getElementTag = type => {
211
213
  return Option$1;
212
214
  case Code:
213
215
  return Code$1;
216
+ case Label:
217
+ return Label$1;
214
218
  default:
215
219
  throw new Error(`element tag not found ${type}`);
216
220
  }
@@ -631,6 +635,8 @@ const getEventListenerArg = (param, event) => {
631
635
  return event.defaultPrevented;
632
636
  case 'event.target.dataset.name':
633
637
  return event.target.dataset.name;
638
+ case 'event.target.dataset.index':
639
+ return event.target.dataset.index;
634
640
  default:
635
641
  return param;
636
642
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom",
3
- "version": "1.43.0",
3
+ "version": "1.45.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -107,6 +107,8 @@ export const getElementTag = (type: number): string => {
107
107
  return ElementTag.Option
108
108
  case VirtualDomElements.Code:
109
109
  return ElementTag.Code
110
+ case VirtualDomElements.Label:
111
+ return ElementTag.Label
110
112
  default:
111
113
  throw new Error(`element tag not found ${type}`)
112
114
  }
@@ -51,3 +51,4 @@ export const TextArea = 'textarea'
51
51
  export const Select = 'select'
52
52
  export const Option = 'option'
53
53
  export const Code = 'code'
54
+ export const Label = 'label'
@@ -59,6 +59,8 @@ export const getEventListenerArg = (param: string, event: any): any => {
59
59
  return event.defaultPrevented
60
60
  case 'event.target.dataset.name':
61
61
  return event.target.dataset.name
62
+ case 'event.target.dataset.index':
63
+ return event.target.dataset.index
62
64
  default:
63
65
  return param
64
66
  }
@@ -53,3 +53,4 @@ export const TextArea = 62
53
53
  export const Select = 63
54
54
  export const Option = 64
55
55
  export const Code = 65
56
+ export const Label = 66