@lvce-editor/virtual-dom-worker 1.2.0 → 1.3.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.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -116,6 +116,16 @@ var Video = 61;
|
|
|
116
116
|
var TextArea = 62;
|
|
117
117
|
var Select = 63;
|
|
118
118
|
var Option = 64;
|
|
119
|
+
|
|
120
|
+
// src/parts/Text/Text.ts
|
|
121
|
+
var text = (data) => {
|
|
122
|
+
return {
|
|
123
|
+
type: Text,
|
|
124
|
+
text: data,
|
|
125
|
+
childCount: 0
|
|
126
|
+
};
|
|
127
|
+
};
|
|
119
128
|
export {
|
|
120
|
-
VirtualDomElements_exports as VirtualDomElements
|
|
129
|
+
VirtualDomElements_exports as VirtualDomElements,
|
|
130
|
+
text
|
|
121
131
|
};
|
package/package.json
CHANGED
package/src/parts/Main/Main.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts'
|
|
2
|
+
import * as VirtualDomElements from '../VirtualDomElements/VirtualDomElements.ts'
|
|
3
|
+
|
|
4
|
+
export const text = (data: string): VirtualDomNode => {
|
|
5
|
+
return {
|
|
6
|
+
type: VirtualDomElements.Text,
|
|
7
|
+
text: data,
|
|
8
|
+
childCount: 0,
|
|
9
|
+
}
|
|
10
|
+
}
|