@lvce-editor/virtual-dom 1.9.0 → 1.10.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 @@ var Video = "video";
50
50
  var TextArea = "textarea";
51
51
  var Select = "select";
52
52
  var Option = "option";
53
+ var Code = "code";
53
54
 
54
55
  // src/parts/VirtualDomElements/VirtualDomElements.ts
55
56
  var Audio2 = 0;
@@ -104,6 +105,7 @@ var Video2 = 61;
104
105
  var TextArea2 = 62;
105
106
  var Select2 = 63;
106
107
  var Option2 = 64;
108
+ var Code2 = 65;
107
109
 
108
110
  // src/parts/ElementTagMap/ElementTagMap.ts
109
111
  var getElementTag = (type) => {
@@ -210,6 +212,8 @@ var getElementTag = (type) => {
210
212
  return Select;
211
213
  case Option2:
212
214
  return Option;
215
+ case Code2:
216
+ return Code;
213
217
  default:
214
218
  throw new Error(`element tag not found ${type}`);
215
219
  }
@@ -472,9 +476,6 @@ var setText = ($Element, value) => {
472
476
  $Element.nodeValue = value;
473
477
  };
474
478
  var removeChild = ($Element, index) => {
475
- console.log("el", $Element.className);
476
- console.log("index", index);
477
- console.log("ch", $Element.children.length);
478
479
  const $Child = $Element.children[index];
479
480
  $Child.remove();
480
481
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -105,6 +105,8 @@ export const getElementTag = (type) => {
105
105
  return ElementTag.Select
106
106
  case VirtualDomElements.Option:
107
107
  return ElementTag.Option
108
+ case VirtualDomElements.Code:
109
+ return ElementTag.Code
108
110
  default:
109
111
  throw new Error(`element tag not found ${type}`)
110
112
  }
@@ -50,3 +50,4 @@ export const Video = 'video'
50
50
  export const TextArea = 'textarea'
51
51
  export const Select = 'select'
52
52
  export const Option = 'option'
53
+ export const Code = 'code'
@@ -18,9 +18,6 @@ export const setText = ($Element: Text, value: string): void => {
18
18
  }
19
19
 
20
20
  export const removeChild = ($Element: HTMLElement, index: number): void => {
21
- console.log('el', $Element.className)
22
- console.log('index', index)
23
- console.log('ch', $Element.children.length)
24
21
  const $Child = $Element.children[index]
25
22
  $Child.remove()
26
23
  }
@@ -1,5 +1,4 @@
1
1
  export interface RemoveAttributePatch {
2
2
  readonly type: 4
3
- readonly index: number
4
3
  readonly key: string
5
4
  }
@@ -52,3 +52,4 @@ export const Video = 61
52
52
  export const TextArea = 62
53
53
  export const Select = 63
54
54
  export const Option = 64
55
+ export const Code = 65