@lvce-editor/virtual-dom-worker 1.20.0 → 1.22.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 +8 -0
- package/dist/index.js +8 -1
- package/package.json +1 -1
- package/src/parts/Main/Main.ts +1 -0
- package/src/parts/Px/Px.ts +7 -0
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export const text: (data: string) => VirtualDomNode
|
|
|
7
7
|
|
|
8
8
|
export const mergeClassNames: (...classNames: readonly string[]) => string
|
|
9
9
|
|
|
10
|
+
export const px: (value: number) => string
|
|
11
|
+
|
|
12
|
+
export const position: (x: number, y: number) => string
|
|
13
|
+
|
|
10
14
|
export interface Patch {}
|
|
11
15
|
|
|
12
16
|
export const diff: (
|
|
@@ -20,3 +24,7 @@ export interface DomEventListener {
|
|
|
20
24
|
readonly preventDefault?: boolean
|
|
21
25
|
readonly passive?: boolean
|
|
22
26
|
}
|
|
27
|
+
|
|
28
|
+
export interface VirtualDomElements {
|
|
29
|
+
readonly [key: number]: number
|
|
30
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -339,4 +339,11 @@ const diff = (oldNodes, newNodes) => {
|
|
|
339
339
|
return patches;
|
|
340
340
|
};
|
|
341
341
|
|
|
342
|
-
|
|
342
|
+
const px = value => {
|
|
343
|
+
return `${value}px`;
|
|
344
|
+
};
|
|
345
|
+
const position = (x, y) => {
|
|
346
|
+
return `${x}px ${y}px`;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
export { VirtualDomElements, diff, mergeClassNames, position, px, text };
|
package/package.json
CHANGED
package/src/parts/Main/Main.ts
CHANGED