@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom-worker",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -1,3 +1,7 @@
1
1
  export const px = (value: number): string => {
2
2
  return `${value}px`
3
3
  }
4
+
5
+ export const position = (x: number, y: number): string => {
6
+ return `${x}px ${y}px`
7
+ }