Skip to content

Commit f6dd349

Browse files
tayeinteractjs-ci
authored andcommitted
chore: update types
# Conflicts: # .gitlab-ci.yml # packages/@interactjs/arrange/getPos.ts # packages/@interactjs/arrange/start.ts # packages/@interactjs/arrange/stop.ts # packages/@interactjs/arrange/types.ts # packages/@interactjs/arrange/updateTree.ts # packages/@interactjs/multi-target/plugin.ts # packages/@interactjs/symbol-tree/SymbolTree.ts # packages/@interactjs/symbol-tree/package.json # packages/@interactjs/utils/exchange.ts
1 parent f8c60cb commit f6dd349

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@types/node": "^17.0.42",
3535
"@types/react": "^18.0.12",
3636
"@types/shelljs": "^0.8.11",
37+
"@types/symbol-tree": "^3.2.3",
3738
"@types/tape": "^4.13.2",
3839
"@typescript-eslint/eslint-plugin": "^5.27.1",
3940
"@typescript-eslint/eslint-plugin-tslint": "^5.27.1",
@@ -104,7 +105,8 @@
104105
},
105106
"sideEffects": false,
106107
"lint-staged": {
107-
"**/*.((ts|js)?(x)|vue|md)": "bin/_lint --fix"
108+
"**/*.((ts|js)?(x)|vue|md)": "bin/_lint --fix",
109+
"**/*.(yaml|json|css)": "prettier --write"
108110
},
109111
"license": "MIT"
110112
}

packages/@interactjs/utils/rect.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ export function resolveRectLike<T extends any[]> (
4444
return returnValue as Rect
4545
}
4646

47+
export function toFullRect (rect: Rect): FullRect {
48+
const { top, left, bottom, right } = rect
49+
const width = rect.width ?? rect.right - rect.left
50+
const height = rect.height ?? rect.bottom - rect.top
51+
52+
return { top, left, bottom, right, width, height }
53+
}
54+
4755
export function rectToXY (rect: Rect | Point) {
4856
return (
4957
rect && {

yarn.lock

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,6 +1606,11 @@
16061606
resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
16071607
integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==
16081608

1609+
"@types/symbol-tree@^3.2.3":
1610+
version "3.2.3"
1611+
resolved "https://registry.npmjs.org/@types/symbol-tree/-/symbol-tree-3.2.3.tgz#0c41e54b473865e67e292062ee28363999c7f320"
1612+
integrity sha512-xEgtqLaxjlEf4G2LOt9bYBQ/cPFpcuvRVReuuRfSV6yFcAD8KWtq012nQ3Zp9A+kNrtg8pprv6X39iyD/DJ+wA==
1613+
16091614
"@types/tape@^4.13.2":
16101615
version "4.13.2"
16111616
resolved "https://registry.npmjs.org/@types/tape/-/tape-4.13.2.tgz#77215c065b1c7840da3ca5e061337bb4c7258122"
@@ -5991,7 +5996,7 @@ nanobench@^2.1.1:
59915996
mutexify "^1.1.0"
59925997
pretty-hrtime "^1.0.2"
59935998

5994-
nanoid@^3.3.4, nanoid@^3.3.6:
5999+
nanoid@^3.3.6:
59956000
version "3.3.6"
59966001
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
59976002
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==

0 commit comments

Comments
 (0)