@lvce-editor/virtual-dom-worker 1.2.0 → 1.4.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
|
@@ -4,6 +4,11 @@ var __export = (target, all) => {
|
|
|
4
4
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
+
// src/parts/MergeClassNames/MergeClassNames.ts
|
|
8
|
+
var mergeClassNames = (...classNames) => {
|
|
9
|
+
return classNames.filter(Boolean).join(" ");
|
|
10
|
+
};
|
|
11
|
+
|
|
7
12
|
// src/parts/VirtualDomElements/VirtualDomElements.ts
|
|
8
13
|
var VirtualDomElements_exports = {};
|
|
9
14
|
__export(VirtualDomElements_exports, {
|
|
@@ -116,6 +121,17 @@ var Video = 61;
|
|
|
116
121
|
var TextArea = 62;
|
|
117
122
|
var Select = 63;
|
|
118
123
|
var Option = 64;
|
|
124
|
+
|
|
125
|
+
// src/parts/Text/Text.ts
|
|
126
|
+
var text = (data) => {
|
|
127
|
+
return {
|
|
128
|
+
type: Text,
|
|
129
|
+
text: data,
|
|
130
|
+
childCount: 0
|
|
131
|
+
};
|
|
132
|
+
};
|
|
119
133
|
export {
|
|
120
|
-
VirtualDomElements_exports as VirtualDomElements
|
|
134
|
+
VirtualDomElements_exports as VirtualDomElements,
|
|
135
|
+
mergeClassNames,
|
|
136
|
+
text
|
|
121
137
|
};
|
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
|
+
}
|