diff --git a/packages/core/package.json b/packages/core/package.json index 272ea1886..dd9536aa7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -48,6 +48,11 @@ "react-dom": "^17.0.2" }, "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", "ismobilejs": "^1.1.1", "react-use-gesture": "^9.1.3" diff --git a/packages/core/src/hooks/useBoundsEvents.tsx b/packages/core/src/hooks/useBoundsEvents.tsx index ae3ed4d67..17a14d0af 100644 --- a/packages/core/src/hooks/useBoundsEvents.tsx +++ b/packages/core/src/hooks/useBoundsEvents.tsx @@ -41,8 +41,6 @@ export function useBoundsEvents() { const onPointerMove = React.useCallback( (e: React.PointerEvent) => { - e.stopPropagation() - if (inputs.pointer && e.pointerId !== inputs.pointer.pointerId) return if (e.currentTarget.hasPointerCapture(e.pointerId)) { diff --git a/packages/core/src/hooks/useBoundsHandleEvents.tsx b/packages/core/src/hooks/useBoundsHandleEvents.tsx index 1b76af53b..676511eb8 100644 --- a/packages/core/src/hooks/useBoundsHandleEvents.tsx +++ b/packages/core/src/hooks/useBoundsHandleEvents.tsx @@ -42,7 +42,6 @@ export function useBoundsHandleEvents(id: TLBoundsCorner | TLBoundsEdge | 'rotat const onPointerMove = React.useCallback( (e: React.PointerEvent) => { - e.stopPropagation() if (e.currentTarget.hasPointerCapture(e.pointerId)) { callbacks.onDragBoundsHandle?.(inputs.pointerMove(e, id), e) } diff --git a/packages/core/src/hooks/useCanvasEvents.tsx b/packages/core/src/hooks/useCanvasEvents.tsx index 987941775..b49c2ec0a 100644 --- a/packages/core/src/hooks/useCanvasEvents.tsx +++ b/packages/core/src/hooks/useCanvasEvents.tsx @@ -21,7 +21,6 @@ export function useCanvasEvents() { const onPointerMove = React.useCallback( (e: React.PointerEvent) => { - e.stopPropagation() if (e.currentTarget.hasPointerCapture(e.pointerId)) { const info = inputs.pointerMove(e, 'canvas') callbacks.onDragCanvas?.(info, e) diff --git a/packages/core/src/hooks/useHandleEvents.tsx b/packages/core/src/hooks/useHandleEvents.tsx index be075491c..5b67cd754 100644 --- a/packages/core/src/hooks/useHandleEvents.tsx +++ b/packages/core/src/hooks/useHandleEvents.tsx @@ -41,7 +41,6 @@ export function useHandleEvents(id: string) { const onPointerMove = React.useCallback( (e: React.PointerEvent) => { - e.stopPropagation() if (e.currentTarget.hasPointerCapture(e.pointerId)) { const info = inputs.pointerMove(e, id) callbacks.onDragHandle?.(info, e) diff --git a/packages/core/src/hooks/useShapeEvents.tsx b/packages/core/src/hooks/useShapeEvents.tsx index 9da82bb78..3b6bb5f40 100644 --- a/packages/core/src/hooks/useShapeEvents.tsx +++ b/packages/core/src/hooks/useShapeEvents.tsx @@ -66,7 +66,6 @@ export function useShapeEvents(id: string, disable = false) { const onPointerMove = React.useCallback( (e: React.PointerEvent) => { if (disable) return - e.stopPropagation() if (inputs.pointer && e.pointerId !== inputs.pointer.pointerId) return diff --git a/packages/tldraw/package.json b/packages/tldraw/package.json index 68a80eba2..49143091d 100644 --- a/packages/tldraw/package.json +++ b/packages/tldraw/package.json @@ -50,14 +50,14 @@ }, "dependencies": { "@radix-ui/react-alert-dialog": "^0.0.20", - "@radix-ui/react-checkbox": "^0.0.16", - "@radix-ui/react-context-menu": "^0.0.23", - "@radix-ui/react-dropdown-menu": "^0.0.22", + "@radix-ui/react-checkbox": "^0.0.17", + "@radix-ui/react-context-menu": "^0.0.24", + "@radix-ui/react-dropdown-menu": "^0.0.23", "@radix-ui/react-icons": "^1.0.3", "@radix-ui/react-id": "^0.0.6", - "@radix-ui/react-radio-group": "^0.0.18", - "@radix-ui/react-tooltip": "^0.0.20", - "@stitches/react": "^0.2.3", + "@radix-ui/react-radio-group": "^0.0.19", + "@radix-ui/react-tooltip": "^0.0.21", + "@stitches/react": "^1.0.0", "@tldraw/core": "^0.0.57", "ismobilejs": "^1.1.1", "perfect-freehand": "^0.5.3", diff --git a/packages/tldraw/src/styles/stitches.config.ts b/packages/tldraw/src/styles/stitches.config.ts index d48dfb840..c6d8f9257 100644 --- a/packages/tldraw/src/styles/stitches.config.ts +++ b/packages/tldraw/src/styles/stitches.config.ts @@ -1,6 +1,6 @@ -import { createCss, defaultThemeMap } from '@stitches/react' +import { createStitches, defaultThemeMap } from '@stitches/react' -const { styled, css, theme, getCssString } = createCss({ +const { styled, css, createTheme, getCssText } = createStitches({ themeMap: { ...defaultThemeMap, }, @@ -99,7 +99,7 @@ const { styled, css, theme, getCssString } = createCss({ }, }) -const dark = theme({ +const dark = createTheme({ colors: { brushFill: 'rgba(180, 180, 180, .05)', brushStroke: 'rgba(180, 180, 180, .25)', @@ -136,4 +136,4 @@ const dark = theme({ export default styled -export { css, getCssString, dark } +export { css, getCssText, dark }