Revert "Merge branch 'next' of https://github.com/tldraw/tldraw into next"
This reverts commit221eb7b10e
, reversing changes made tofbbaf08513
.
This commit is contained in:
parent
706ed57353
commit
37985f3842
8 changed files with 16 additions and 15 deletions
|
@ -48,11 +48,6 @@
|
||||||
"react-dom": "^17.0.2"
|
"react-dom": "^17.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.15.0",
|
|
||||||
"@babel/preset-env": "^7.15.0",
|
|
||||||
"@radix-ui/react-primitive": "^0.0.15",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^4.19.0",
|
|
||||||
"@typescript-eslint/parser": "^4.19.0",
|
|
||||||
"deepmerge": "^4.2.2",
|
"deepmerge": "^4.2.2",
|
||||||
"ismobilejs": "^1.1.1",
|
"ismobilejs": "^1.1.1",
|
||||||
"react-use-gesture": "^9.1.3"
|
"react-use-gesture": "^9.1.3"
|
||||||
|
|
|
@ -41,6 +41,8 @@ export function useBoundsEvents() {
|
||||||
|
|
||||||
const onPointerMove = React.useCallback(
|
const onPointerMove = React.useCallback(
|
||||||
(e: React.PointerEvent) => {
|
(e: React.PointerEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
|
||||||
if (inputs.pointer && e.pointerId !== inputs.pointer.pointerId) return
|
if (inputs.pointer && e.pointerId !== inputs.pointer.pointerId) return
|
||||||
|
|
||||||
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
||||||
|
|
|
@ -42,6 +42,7 @@ export function useBoundsHandleEvents(id: TLBoundsCorner | TLBoundsEdge | 'rotat
|
||||||
|
|
||||||
const onPointerMove = React.useCallback(
|
const onPointerMove = React.useCallback(
|
||||||
(e: React.PointerEvent) => {
|
(e: React.PointerEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
||||||
callbacks.onDragBoundsHandle?.(inputs.pointerMove(e, id), e)
|
callbacks.onDragBoundsHandle?.(inputs.pointerMove(e, id), e)
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ export function useCanvasEvents() {
|
||||||
|
|
||||||
const onPointerMove = React.useCallback(
|
const onPointerMove = React.useCallback(
|
||||||
(e: React.PointerEvent) => {
|
(e: React.PointerEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
||||||
const info = inputs.pointerMove(e, 'canvas')
|
const info = inputs.pointerMove(e, 'canvas')
|
||||||
callbacks.onDragCanvas?.(info, e)
|
callbacks.onDragCanvas?.(info, e)
|
||||||
|
|
|
@ -41,6 +41,7 @@ export function useHandleEvents(id: string) {
|
||||||
|
|
||||||
const onPointerMove = React.useCallback(
|
const onPointerMove = React.useCallback(
|
||||||
(e: React.PointerEvent) => {
|
(e: React.PointerEvent) => {
|
||||||
|
e.stopPropagation()
|
||||||
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
if (e.currentTarget.hasPointerCapture(e.pointerId)) {
|
||||||
const info = inputs.pointerMove(e, id)
|
const info = inputs.pointerMove(e, id)
|
||||||
callbacks.onDragHandle?.(info, e)
|
callbacks.onDragHandle?.(info, e)
|
||||||
|
|
|
@ -66,6 +66,7 @@ export function useShapeEvents(id: string, disable = false) {
|
||||||
const onPointerMove = React.useCallback(
|
const onPointerMove = React.useCallback(
|
||||||
(e: React.PointerEvent) => {
|
(e: React.PointerEvent) => {
|
||||||
if (disable) return
|
if (disable) return
|
||||||
|
e.stopPropagation()
|
||||||
|
|
||||||
if (inputs.pointer && e.pointerId !== inputs.pointer.pointerId) return
|
if (inputs.pointer && e.pointerId !== inputs.pointer.pointerId) return
|
||||||
|
|
||||||
|
|
|
@ -50,14 +50,14 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@radix-ui/react-alert-dialog": "^0.0.20",
|
"@radix-ui/react-alert-dialog": "^0.0.20",
|
||||||
"@radix-ui/react-checkbox": "^0.0.17",
|
"@radix-ui/react-checkbox": "^0.0.16",
|
||||||
"@radix-ui/react-context-menu": "^0.0.24",
|
"@radix-ui/react-context-menu": "^0.0.23",
|
||||||
"@radix-ui/react-dropdown-menu": "^0.0.23",
|
"@radix-ui/react-dropdown-menu": "^0.0.22",
|
||||||
"@radix-ui/react-icons": "^1.0.3",
|
"@radix-ui/react-icons": "^1.0.3",
|
||||||
"@radix-ui/react-id": "^0.0.6",
|
"@radix-ui/react-id": "^0.0.6",
|
||||||
"@radix-ui/react-radio-group": "^0.0.19",
|
"@radix-ui/react-radio-group": "^0.0.18",
|
||||||
"@radix-ui/react-tooltip": "^0.0.21",
|
"@radix-ui/react-tooltip": "^0.0.20",
|
||||||
"@stitches/react": "^1.0.0",
|
"@stitches/react": "^0.2.3",
|
||||||
"@tldraw/core": "^0.0.57",
|
"@tldraw/core": "^0.0.57",
|
||||||
"ismobilejs": "^1.1.1",
|
"ismobilejs": "^1.1.1",
|
||||||
"perfect-freehand": "^0.5.3",
|
"perfect-freehand": "^0.5.3",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { createStitches, defaultThemeMap } from '@stitches/react'
|
import { createCss, defaultThemeMap } from '@stitches/react'
|
||||||
|
|
||||||
const { styled, css, createTheme, getCssText } = createStitches({
|
const { styled, css, theme, getCssString } = createCss({
|
||||||
themeMap: {
|
themeMap: {
|
||||||
...defaultThemeMap,
|
...defaultThemeMap,
|
||||||
},
|
},
|
||||||
|
@ -99,7 +99,7 @@ const { styled, css, createTheme, getCssText } = createStitches({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const dark = createTheme({
|
const dark = theme({
|
||||||
colors: {
|
colors: {
|
||||||
brushFill: 'rgba(180, 180, 180, .05)',
|
brushFill: 'rgba(180, 180, 180, .05)',
|
||||||
brushStroke: 'rgba(180, 180, 180, .25)',
|
brushStroke: 'rgba(180, 180, 180, .25)',
|
||||||
|
@ -136,4 +136,4 @@ const dark = createTheme({
|
||||||
|
|
||||||
export default styled
|
export default styled
|
||||||
|
|
||||||
export { css, getCssText, dark }
|
export { css, getCssString, dark }
|
||||||
|
|
Loading…
Reference in a new issue