Remove a dep that may have been causing issues
This commit is contained in:
parent
d05807bbfb
commit
69462632a5
7 changed files with 11 additions and 15 deletions
|
@ -28,6 +28,9 @@
|
||||||
"docs": "typedoc --entryPoints src/index.ts"
|
"docs": "typedoc --entryPoints src/index.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.15.0",
|
||||||
|
"@babel/preset-env": "^7.15.0",
|
||||||
|
"@radix-ui/react-primitive": "^0.0.15",
|
||||||
"@types/jest": "^27.0.1",
|
"@types/jest": "^27.0.1",
|
||||||
"@types/node": "^16.7.6",
|
"@types/node": "^16.7.6",
|
||||||
"@types/react": "^17.0.16",
|
"@types/react": "^17.0.16",
|
||||||
|
@ -48,13 +51,7 @@
|
||||||
"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",
|
|
||||||
"react-use-gesture": "^9.1.3"
|
"react-use-gesture": "^9.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,7 +4,6 @@
|
||||||
/* eslint-disable no-redeclare */
|
/* eslint-disable no-redeclare */
|
||||||
import type React from 'react'
|
import type React from 'react'
|
||||||
import deepmerge from 'deepmerge'
|
import deepmerge from 'deepmerge'
|
||||||
import isMobilePkg from 'ismobilejs'
|
|
||||||
import { TLBezierCurveSegment, TLBounds, TLBoundsCorner, TLBoundsEdge } from '../types'
|
import { TLBezierCurveSegment, TLBounds, TLBoundsCorner, TLBoundsEdge } from '../types'
|
||||||
import vec from './vec'
|
import vec from './vec'
|
||||||
import './polyfills'
|
import './polyfills'
|
||||||
|
@ -1665,7 +1664,8 @@ left past the initial left edge) then swap points on that axis.
|
||||||
/* -------------------------------------------------- */
|
/* -------------------------------------------------- */
|
||||||
|
|
||||||
static isMobile() {
|
static isMobile() {
|
||||||
return isMobilePkg().any
|
if (typeof window === 'undefined') return false
|
||||||
|
return 'ontouchstart' in window || navigator?.maxTouchPoints > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// via https://github.com/bameyrick/throttle-typescript
|
// via https://github.com/bameyrick/throttle-typescript
|
||||||
|
@ -1702,6 +1702,7 @@ left past the initial left edge) then swap points on that axis.
|
||||||
* Find whether the current device is a Mac / iOS / iPadOS.
|
* Find whether the current device is a Mac / iOS / iPadOS.
|
||||||
*/
|
*/
|
||||||
static isDarwin(): boolean {
|
static isDarwin(): boolean {
|
||||||
|
if (typeof window === 'undefined') return false
|
||||||
return /Mac|iPod|iPhone|iPad/.test(window.navigator.platform)
|
return /Mac|iPod|iPhone|iPad/.test(window.navigator.platform)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,6 @@
|
||||||
"@radix-ui/react-tooltip": "^0.0.21",
|
"@radix-ui/react-tooltip": "^0.0.21",
|
||||||
"@stitches/react": "^1.0.0",
|
"@stitches/react": "^1.0.0",
|
||||||
"@tldraw/core": "^0.0.57",
|
"@tldraw/core": "^0.0.57",
|
||||||
"ismobilejs": "^1.1.1",
|
|
||||||
"perfect-freehand": "^0.5.3",
|
"perfect-freehand": "^0.5.3",
|
||||||
"react-hotkeys-hook": "^3.4.0",
|
"react-hotkeys-hook": "^3.4.0",
|
||||||
"rko": "^0.5.19"
|
"rko": "^0.5.19"
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import dynamic from 'next/dynamic'
|
import dynamic from 'next/dynamic'
|
||||||
|
const Editor = dynamic(() => import('../components/editor'), { ssr: false })
|
||||||
// import type { GetServerSideProps } from 'next'
|
// import type { GetServerSideProps } from 'next'
|
||||||
// import { getSession } from 'next-auth/client'
|
// import { getSession } from 'next-auth/client'
|
||||||
|
|
||||||
const Editor = dynamic(() => import('components/editor'), { ssr: false })
|
|
||||||
|
|
||||||
export default function Home(): JSX.Element {
|
export default function Home(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue