@lvce-editor/virtual-dom-worker 1.21.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 +4 -0
- package/dist/index.js +4 -1
- package/package.json +1 -1
- package/src/parts/Px/Px.ts +4 -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: (
|
package/dist/index.js
CHANGED
|
@@ -342,5 +342,8 @@ const diff = (oldNodes, newNodes) => {
|
|
|
342
342
|
const px = value => {
|
|
343
343
|
return `${value}px`;
|
|
344
344
|
};
|
|
345
|
+
const position = (x, y) => {
|
|
346
|
+
return `${x}px ${y}px`;
|
|
347
|
+
};
|
|
345
348
|
|
|
346
|
-
export { VirtualDomElements, diff, mergeClassNames, px, text };
|
|
349
|
+
export { VirtualDomElements, diff, mergeClassNames, position, px, text };
|
package/package.json
CHANGED