diff --git a/apps/vscode/editor/scripts/build.mjs b/apps/vscode/editor/scripts/build.mjs index b7b5b34cd..4e6ea0a0a 100644 --- a/apps/vscode/editor/scripts/build.mjs +++ b/apps/vscode/editor/scripts/build.mjs @@ -5,6 +5,8 @@ import { createRequire } from 'module' const pkg = createRequire(import.meta.url)('../package.json') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -30,10 +32,10 @@ async function main() { }, }) - console.log(`✔ ${pkg.name}: Build completed.`) + jslog(`✔ ${pkg.name}: Build completed.`) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/apps/vscode/editor/scripts/dev.mjs b/apps/vscode/editor/scripts/dev.mjs index eb7cd069b..9b3dbb9fc 100644 --- a/apps/vscode/editor/scripts/dev.mjs +++ b/apps/vscode/editor/scripts/dev.mjs @@ -5,6 +5,8 @@ import dotenv from 'dotenv' dotenv.config() +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -28,7 +30,7 @@ async function main() { }, watch: { onRebuild(err) { - err ? error('❌ Failed') : log('✅ Updated') + err ? error('❌ Failed') : jslog('✅ Updated') }, }, }, diff --git a/apps/vscode/extension/scripts/build.js b/apps/vscode/extension/scripts/build.js index 7d6e96b64..97f75d281 100644 --- a/apps/vscode/extension/scripts/build.js +++ b/apps/vscode/extension/scripts/build.js @@ -2,6 +2,8 @@ const fs = require('fs') const esbuild = require('esbuild') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -25,10 +27,10 @@ async function main() { tsconfig: './tsconfig.json', external: ['vscode'], }) - console.log(`Built package.`) + jslog(`Built package.`) } catch (e) { - console.log(`× Build failed due to an error.`) - console.log(e) + jslog(`× Build failed due to an error.`) + jslog(e) } } diff --git a/apps/vscode/extension/scripts/dev.js b/apps/vscode/extension/scripts/dev.js index 42386d6fb..c7e176f4e 100644 --- a/apps/vscode/extension/scripts/dev.js +++ b/apps/vscode/extension/scripts/dev.js @@ -2,6 +2,8 @@ const fs = require('fs') const esbuild = require('esbuild') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -28,15 +30,15 @@ async function main() { incremental: true, watch: { onRebuild(err) { - err ? console.error('❌ Failed') : console.log('✅ Updated') + err ? console.error('❌ Failed') : jslog('✅ Updated') }, }, }) - console.log(`Built package.`) + jslog(`Built package.`) } catch (e) { - console.log(`× Build failed due to an error.`) - console.log(e) + jslog(`× Build failed due to an error.`) + jslog(e) } } diff --git a/apps/vscode/extension/scripts/package.js b/apps/vscode/extension/scripts/package.js index f3a8441f1..7073eb398 100644 --- a/apps/vscode/extension/scripts/package.js +++ b/apps/vscode/extension/scripts/package.js @@ -4,6 +4,8 @@ const fs = require('fs') const pkg = require('../package.json') const { exec } = require('child_process') +const { log: jslog } = console + async function main() { if (fs.existsSync('./editor')) { fs.rmSync('./editor', { recursive: true }, (e) => { @@ -35,8 +37,8 @@ async function main() { } ) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/apps/www/hooks/useAccountHandlers.ts b/apps/www/hooks/useAccountHandlers.ts index 3ceda9865..362585460 100644 --- a/apps/www/hooks/useAccountHandlers.ts +++ b/apps/www/hooks/useAccountHandlers.ts @@ -1,5 +1,5 @@ import * as React from 'react' -import { signIn, signOut } from 'next-auth/client' +import { signIn, signOut } from 'next-auth/react' export function useAccountHandlers() { const onSignIn = React.useCallback(() => { diff --git a/apps/www/next.config.js b/apps/www/next.config.js index a3de8510c..b58790779 100644 --- a/apps/www/next.config.js +++ b/apps/www/next.config.js @@ -5,7 +5,6 @@ const withTM = require('next-transpile-modules')(['@tldraw/tldraw', '@tldraw/cor const { GITHUB_ID, - GITHUB_SECRET, GITHUB_API_SECRET, NEXT_PUBLIC_SENTRY_DSN: SENTRY_DSN, SENTRY_ORG, @@ -34,7 +33,6 @@ module.exports = withPWA( NEXT_PUBLIC_COMMIT_SHA: VERCEL_GIT_COMMIT_SHA, GA_MEASUREMENT_ID, GITHUB_ID, - GITHUB_SECRET, GITHUB_API_SECRET, }, webpack: (config, options) => { diff --git a/apps/www/package.json b/apps/www/package.json index 8ef1f69a9..23ed03709 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -18,19 +18,19 @@ "lint": "next lint" }, "dependencies": { - "@liveblocks/client": "^0.13.0-beta.1", - "@liveblocks/react": "^0.13.0-beta.1", + "@liveblocks/client": "^0.13.1", + "@liveblocks/react": "^0.13.1", "@sentry/integrations": "^6.13.2", "@sentry/node": "^6.13.2", "@sentry/react": "^6.13.2", "@sentry/tracing": "^6.13.2", "@stitches/react": "^1.2.5", - "@tldraw/core": "^1.2.8", - "@tldraw/tldraw": "^1.2.8", + "@tldraw/core": "*", + "@tldraw/tldraw": "*", "@types/next-auth": "^3.15.0", - "next": "^12.0.1", - "next-auth": "^3.29.0", - "next-pwa": "^5.4.0", + "next": "^12.0.7", + "next-auth": "^4.0.5", + "next-pwa": "^5.4.4", "next-themes": "^0.0.15", "next-transpile-modules": "^9.0.0", "react": "17.0.2", diff --git a/apps/www/pages/api/auth/[...nextauth].ts b/apps/www/pages/api/auth/[...nextauth].ts index 49e6994b3..2a5c07692 100644 --- a/apps/www/pages/api/auth/[...nextauth].ts +++ b/apps/www/pages/api/auth/[...nextauth].ts @@ -1,34 +1,38 @@ -import { isSponsoringMe } from 'utils/isSponsoringMe' +import { isSignedInUserSponsoringMe } from 'utils/github' import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next' import NextAuth from 'next-auth' -import Providers from 'next-auth/providers' +import GithubProvider from 'next-auth/providers/github' export default function Auth( req: NextApiRequest, res: NextApiResponse ): ReturnType { return NextAuth(req, res, { + theme: { + colorScheme: 'light', + }, providers: [ - Providers.GitHub({ + GithubProvider({ clientId: process.env.GITHUB_ID, clientSecret: process.env.GITHUB_SECRET, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore scope: 'read:user', }), ], + secret: process.env.NEXTAUTH_SECRET, callbacks: { - async redirect(url, baseUrl) { + async redirect({ baseUrl }) { return baseUrl }, - async signIn(user, account, profile: { login?: string }) { - if (profile?.login) { - const canLogin = await isSponsoringMe(profile.login) - - if (canLogin) { - return canLogin - } + async signIn() { + return true + }, + async session({ session, token, user }) { + if (token) { + session.isSponsor = await isSignedInUserSponsoringMe() } - - return '/' + return session }, }, }) diff --git a/apps/www/pages/api/sponsors.ts b/apps/www/pages/api/sponsors.ts index 84477ed23..89d805386 100644 --- a/apps/www/pages/api/sponsors.ts +++ b/apps/www/pages/api/sponsors.ts @@ -19,7 +19,7 @@ export default async function GetSponsors(_req: NextApiRequest, res: NextApiResp method: 'POST', headers: { 'Content-Type': 'application/json', - Authorization: 'bearer ' + process.env.GITHUB_API_SECRET, + Authorization: 'bearer ' + process.env.GITHUB_SECRET, }, body: JSON.stringify({ query: `{ diff --git a/apps/www/pages/index.tsx b/apps/www/pages/index.tsx index d57579118..94a6f25fc 100644 --- a/apps/www/pages/index.tsx +++ b/apps/www/pages/index.tsx @@ -1,6 +1,6 @@ import dynamic from 'next/dynamic' import type { GetServerSideProps } from 'next' -import { getSession } from 'next-auth/client' +import { getSession } from 'next-auth/react' import Head from 'next/head' const Editor = dynamic(() => import('components/Editor'), { ssr: false }) @@ -27,7 +27,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => { return { props: { isUser: session?.user ? true : false, - isSponsor: session?.user ? true : false, + isSponsor: session?.isSponsor, }, } } diff --git a/apps/www/pages/r/[id].tsx b/apps/www/pages/r/[id].tsx index d19ce441e..cdbc286b5 100644 --- a/apps/www/pages/r/[id].tsx +++ b/apps/www/pages/r/[id].tsx @@ -1,6 +1,6 @@ import * as React from 'react' import type { GetServerSideProps } from 'next' -import { getSession } from 'next-auth/client' +import { getSession } from 'next-auth/react' import dynamic from 'next/dynamic' const MultiplayerEditor = dynamic(() => import('components/MultiplayerEditor'), { ssr: false }) @@ -16,14 +16,12 @@ export default function Room({ id, isUser, isSponsor }: RoomProps): JSX.Element export const getServerSideProps: GetServerSideProps = async (context) => { const session = await getSession(context) - const id = context.query.id?.toString() - return { props: { id, isUser: session?.user ? true : false, - isSponsor: session?.user ? true : false, + isSponsor: session.isSponsor, }, } } diff --git a/apps/www/pages/sponsorware.tsx b/apps/www/pages/sponsorware.tsx index 631f6fe4d..348de8011 100644 --- a/apps/www/pages/sponsorware.tsx +++ b/apps/www/pages/sponsorware.tsx @@ -1,12 +1,12 @@ import { styled } from 'styles' -import { getSession, signin, signout, useSession } from 'next-auth/client' +import { getSession, signIn, signOut, useSession } from 'next-auth/react' import type { GetServerSideProps } from 'next' import Link from 'next/link' import React from 'react' import Head from 'next/head' export default function Sponsorware(): JSX.Element { - const [session, loading] = useSession() + const { data, status } = useSession() return ( <> @@ -51,14 +51,14 @@ export default function Sponsorware(): JSX.Element { (at any level) and sign in below.

- {session ? ( + {data ? ( <> - signout()}> + signOut()}> Sign Out - Signed in as {session?.user?.name} ({session?.user?.email}), but it looks like - you're not yet a sponsor. + Signed in as {data.user?.name} ({data.user?.email}), but it looks like you're + not yet a sponsor.
Something wrong? Try reloading the page or DM me on{' '} ) : ( <> - signin('github')}> - {loading ? 'Loading...' : 'Sign in with GitHub'} + signIn('github')}> + {status === 'loading' ? 'Loading...' : 'Sign in with GitHub'} Already a sponsor? Just sign in to visit the app. diff --git a/apps/www/tsconfig.json b/apps/www/tsconfig.json index 357be3eba..624f1d3c0 100644 --- a/apps/www/tsconfig.json +++ b/apps/www/tsconfig.json @@ -19,7 +19,9 @@ "rootDir": ".", "baseUrl": ".", "paths": { - "*": ["./*"] + "*": ["./*"], + "@tldraw/core": ["../../packages/core"], + "@tldraw/tldraw": ["../../packages/tldraw"] } }, "references": [ diff --git a/apps/www/utils/github.ts b/apps/www/utils/github.ts new file mode 100644 index 000000000..85af068d3 --- /dev/null +++ b/apps/www/utils/github.ts @@ -0,0 +1,53 @@ +/** + * Send a GraphQL query to the Github API + */ +async function queryGithubApi(query: string) { + const res = await fetch('https://api.github.com/graphql', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'bearer ' + process.env.GITHUB_API_SECRET, + }, + body: JSON.stringify({ + query, + }), + }) + return await res.json() +} + +/** + * What is the signed in user's login name? + */ +async function getSignedInUser(): Promise<{ login: 'steveruizok ' }> { + const res = await queryGithubApi(` + query { + viewer { + login + } + }`) + return res?.data?.viewer +} + +/** + * Is user with the login A sponsoring the user with the login B? + */ +async function isASponsoringB(loginA: string, loginB: string) { + const res = await queryGithubApi(` + query { + user(login: "${loginB}") { + isSponsoredBy(accountLogin: "${loginA}") + } + }`) + return res?.data?.user?.isSponsoredBy +} + +const whitelist = ['steveruizok'] + +/** + * Is the current user sponsoring me? + */ +export async function isSignedInUserSponsoringMe() { + const user = await getSignedInUser() + if (whitelist.includes(user.login)) return true + return isASponsoringB('steveruizok', user.login) +} diff --git a/apps/www/utils/isSponsoringMe.ts b/apps/www/utils/isSponsoringMe.ts deleted file mode 100644 index 0e21fc88e..000000000 --- a/apps/www/utils/isSponsoringMe.ts +++ /dev/null @@ -1,24 +0,0 @@ -const whitelist = ['steveruizok'] - -export async function isSponsoringMe(login: string) { - if (whitelist.includes(login)) return true - - const res = await fetch('https://api.github.com/graphql', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: 'bearer ' + process.env.GITHUB_API_SECRET, - }, - body: JSON.stringify({ - query: ` - query { - user(login: "steveruizok") { - isSponsoredBy(accountLogin: "${login}") - } - } - `, - }), - }).then((res) => res.json()) - - return res?.data?.user?.isSponsoredBy -} diff --git a/examples/core-example-advanced/scripts/build.mjs b/examples/core-example-advanced/scripts/build.mjs index 2838da797..3820d35ce 100644 --- a/examples/core-example-advanced/scripts/build.mjs +++ b/examples/core-example-advanced/scripts/build.mjs @@ -5,6 +5,8 @@ import { createRequire } from 'module' const pkg = createRequire(import.meta.url)('../package.json') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -36,10 +38,10 @@ async function main() { if (err) throw err }) - console.log(`✔ ${pkg.name}: Build completed.`) + jslog(`✔ ${pkg.name}: Build completed.`) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/examples/core-example-advanced/scripts/dev.mjs b/examples/core-example-advanced/scripts/dev.mjs index c92e48dac..1b4c2d71b 100644 --- a/examples/core-example-advanced/scripts/dev.mjs +++ b/examples/core-example-advanced/scripts/dev.mjs @@ -2,6 +2,8 @@ import fs from 'fs' import esbuildServe from 'esbuild-serve' +const { log: jslog } = console + async function main() { if (!fs.existsSync('./dist')) { fs.mkdirSync('./dist') @@ -26,7 +28,7 @@ async function main() { }, watch: { onRebuild(err) { - err ? error('❌ Failed') : log('✅ Updated') + err ? error('❌ Failed') : jslog('✅ Updated') }, }, }, diff --git a/examples/core-example-advanced/src/app.tsx b/examples/core-example-advanced/src/app.tsx index 6e6795973..f4b8eab40 100644 --- a/examples/core-example-advanced/src/app.tsx +++ b/examples/core-example-advanced/src/app.tsx @@ -188,8 +188,6 @@ export default function App({ onMount }: AppProps): JSX.Element { const hideBounds = appState.isInAny('transformingSelection', 'translating', 'creating') - // const hideBounds = appState.isInAny('transformingSelection', 'translating', 'creating') - const firstShapeId = appState.data.pageState.selectedIds[0] const firstShape = firstShapeId ? appState.data.page.shapes[firstShapeId] : null const hideResizeHandles = firstShape diff --git a/examples/core-example/scripts/build.mjs b/examples/core-example/scripts/build.mjs index 2838da797..3820d35ce 100644 --- a/examples/core-example/scripts/build.mjs +++ b/examples/core-example/scripts/build.mjs @@ -5,6 +5,8 @@ import { createRequire } from 'module' const pkg = createRequire(import.meta.url)('../package.json') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -36,10 +38,10 @@ async function main() { if (err) throw err }) - console.log(`✔ ${pkg.name}: Build completed.`) + jslog(`✔ ${pkg.name}: Build completed.`) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/examples/core-example/scripts/dev.mjs b/examples/core-example/scripts/dev.mjs index 121897d57..84c5845d5 100644 --- a/examples/core-example/scripts/dev.mjs +++ b/examples/core-example/scripts/dev.mjs @@ -2,6 +2,8 @@ import fs from 'fs' import esbuildServe from 'esbuild-serve' +const { log: jslog } = console + async function main() { if (!fs.existsSync('./dist')) { fs.mkdirSync('./dist') @@ -26,7 +28,7 @@ async function main() { }, watch: { onRebuild(err) { - err ? error('❌ Failed') : log('✅ Updated') + err ? error('❌ Failed') : jslog('✅ Updated') }, }, }, diff --git a/examples/tldraw-example/scripts/build.mjs b/examples/tldraw-example/scripts/build.mjs index 70a59727b..4064a87df 100644 --- a/examples/tldraw-example/scripts/build.mjs +++ b/examples/tldraw-example/scripts/build.mjs @@ -6,6 +6,8 @@ import { createRequire } from 'module' const pkg = createRequire(import.meta.url)('../package.json') +const { log: jslog } = console + async function main() { try { esbuild.buildSync({ @@ -31,10 +33,10 @@ async function main() { if (err) throw err }) ) - console.log(`✔ ${pkg.name}: Build completed.`) + jslog(`✔ ${pkg.name}: Build completed.`) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/examples/tldraw-example/scripts/dev.mjs b/examples/tldraw-example/scripts/dev.mjs index c609f849a..fad15d56c 100644 --- a/examples/tldraw-example/scripts/dev.mjs +++ b/examples/tldraw-example/scripts/dev.mjs @@ -6,6 +6,8 @@ import dotenv from 'dotenv' dotenv.config() +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -40,7 +42,7 @@ async function main() { }, watch: { onRebuild(err) { - err ? error('❌ Failed') : log('✅ Updated') + err ? error('❌ Failed') : jslog('✅ Updated') }, }, }, diff --git a/examples/tldraw-example/tsconfig.json b/examples/tldraw-example/tsconfig.json index 4c2247330..b7c03bd57 100644 --- a/examples/tldraw-example/tsconfig.json +++ b/examples/tldraw-example/tsconfig.json @@ -9,10 +9,14 @@ "emitDeclarationOnly": false, "paths": { "~*": ["./src/*"], + "@tldraw/core": ["../../packages/core"], "@tldraw/tldraw": ["../../packages/tldraw"] } }, "references": [ + { + "path": "../../packages/core" + }, { "path": "../../packages/tldraw" } diff --git a/packages/core/scripts/build.js b/packages/core/scripts/build.js index e1162b3a0..5f1e336e3 100644 --- a/packages/core/scripts/build.js +++ b/packages/core/scripts/build.js @@ -4,6 +4,8 @@ const esbuild = require('esbuild') const { gzip } = require('zlib') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -51,7 +53,7 @@ async function main() { fs.readFile('./dist/esm/index.js', (_err, data) => { gzip(data, (_err, result) => { - console.log( + jslog( `✔ ${pkg.name}: Built package. ${(esmSize / 1000).toFixed(2)}kb (${( result.length / 1000 ).toFixed(2)}kb minified)` @@ -59,8 +61,8 @@ async function main() { }) }) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/packages/core/scripts/dev.js b/packages/core/scripts/dev.js index 329833ac4..9b415450e 100644 --- a/packages/core/scripts/dev.js +++ b/packages/core/scripts/dev.js @@ -2,6 +2,8 @@ const esbuild = require('esbuild') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { esbuild.build({ entryPoints: ['./src/index.ts'], @@ -19,10 +21,10 @@ async function main() { watch: { onRebuild(error) { if (error) { - console.log(`× ${pkg.name}: An error in prevented the rebuild.`) + jslog(`× ${pkg.name}: An error in prevented the rebuild.`) return } - console.log(`✔ ${pkg.name}: Rebuilt.`) + jslog(`✔ ${pkg.name}: Rebuilt.`) }, }, }) diff --git a/packages/core/src/components/User/User.tsx b/packages/core/src/components/User/User.tsx index ab0f37af3..9be17bebf 100644 --- a/packages/core/src/components/User/User.tsx +++ b/packages/core/src/components/User/User.tsx @@ -1,4 +1,8 @@ +/* eslint-disable no-inner-declarations */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ +import Vec from '@tldraw/vec' import * as React from 'react' +import { useCursorAnimation } from '~hooks' import type { TLShape, TLUser } from '~types' interface UserProps { @@ -6,15 +10,15 @@ interface UserProps { } export function User({ user }: UserProps) { - const rUser = React.useRef(null) - + const rCursor = React.useRef(null) + useCursorAnimation(rCursor, user.point) return (
) diff --git a/packages/core/src/hooks/index.ts b/packages/core/src/hooks/index.ts index 941b6a855..f3b91574e 100644 --- a/packages/core/src/hooks/index.ts +++ b/packages/core/src/hooks/index.ts @@ -15,3 +15,4 @@ export * from './usePreventNavigation' export * from './useBoundsEvents' export * from './usePosition' export * from './useKeyEvents' +export * from './useCursorAnimation' diff --git a/packages/core/src/hooks/useCursorAnimation.ts b/packages/core/src/hooks/useCursorAnimation.ts new file mode 100644 index 000000000..5bc11c969 --- /dev/null +++ b/packages/core/src/hooks/useCursorAnimation.ts @@ -0,0 +1,139 @@ +import Vec from '@tldraw/vec' +import * as React from 'react' + +type AnimationState = 'stopped' | 'idle' | 'animating' + +type Animation = { + curve: boolean + from: number[] + to: number[] + start: number + distance: number + timeStamp: number + duration: number +} + +export function useCursorAnimation(ref: any, point: number[]) { + const rState = React.useRef('idle') + const rPrevPoint = React.useRef(point) + const rQueue = React.useRef([]) + const rTimestamp = React.useRef(performance.now()) + const rLastRequestId = React.useRef(0) + const rTimeoutId = React.useRef(0) + const rSpline = React.useRef(new Spline()) + + // Animate an animation + const animateNext = React.useCallback((animation: Animation) => { + const start = performance.now() + function loop() { + const t = (performance.now() - start) / animation.duration + if (t <= 1) { + const elm = ref.current + if (!elm) return + const point = animation.curve + ? rSpline.current.getSplinePoint(t + animation.start) + : Vec.lrp(animation.from, animation.to, t) + elm.style.setProperty('transform', `translate(${point[0]}px, ${point[1]}px)`) + rLastRequestId.current = requestAnimationFrame(loop) + return + } + const next = rQueue.current.shift() + if (next) { + rState.current = 'animating' + animateNext(next) + } else { + rState.current = 'idle' + rTimeoutId.current = setTimeout(() => { + rState.current = 'stopped' + }, 250) + } + } + loop() + }, []) + + // When the point changes, add a new animation + React.useLayoutEffect(() => { + const now = performance.now() + const spline = rSpline.current + if (rState.current === 'stopped') { + rTimestamp.current = now + spline.clear() + } + spline.addPoint(point) + const animation: Animation = { + distance: spline.totalLength, + curve: spline.points.length > 3, + start: spline.points.length - 3, + from: rPrevPoint.current, + to: point, + timeStamp: now, + duration: Math.min(now - rTimestamp.current, 500), + } + rPrevPoint.current = point + rTimestamp.current = now + switch (rState.current) { + case 'stopped': { + rPrevPoint.current = point + rState.current = 'idle' + break + } + case 'idle': { + rState.current = 'animating' + animateNext(animation) + break + } + case 'animating': { + rQueue.current.push(animation) + break + } + } + + return () => { + clearTimeout(rTimeoutId.current) + } + }, [point]) +} + +class Spline { + points: number[][] = [] + lengths: number[] = [] + totalLength = 0 + + private prev?: number[] + + addPoint(point: number[]) { + if (this.prev) { + const length = Vec.dist(this.prev, point) + this.lengths.push(length) + this.totalLength += length + this.points.push(point) + } + this.prev = point + } + + getSplinePoint(t: number): number[] { + const { points } = this + const l = points.length - 1 + const d = Math.trunc(t) + const p1 = Math.min(d + 1, l) + const p2 = Math.min(p1 + 1, l) + const p3 = Math.min(p2 + 1, l) + const p0 = p1 - 1 + t = t - d + const tt = t * t, + ttt = tt * t, + q1 = -ttt + 2 * tt - t, + q2 = 3 * ttt - 5 * tt + 2, + q3 = -3 * ttt + 4 * tt + t, + q4 = ttt - tt + return [ + 0.5 * (points[p0][0] * q1 + points[p1][0] * q2 + points[p2][0] * q3 + points[p3][0] * q4), + 0.5 * (points[p0][1] * q1 + points[p1][1] * q2 + points[p2][1] * q3 + points[p3][1] * q4), + ] + } + + clear() { + this.points = [] + this.totalLength = 0 + } +} diff --git a/packages/curve/scripts/build.js b/packages/curve/scripts/build.js index 6c78641ec..a50b2ccf1 100644 --- a/packages/curve/scripts/build.js +++ b/packages/curve/scripts/build.js @@ -4,6 +4,8 @@ const esbuild = require('esbuild') const { gzip } = require('zlib') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -45,7 +47,7 @@ async function main() { fs.readFile('./dist/esm/index.js', (_err, data) => { gzip(data, (_err, result) => { - console.log( + jslog( `✔ ${pkg.name}: Built package. ${(esmSize / 1000).toFixed(2)}kb (${( result.length / 1000 ).toFixed(2)}kb minified)` @@ -53,8 +55,8 @@ async function main() { }) }) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/packages/curve/scripts/dev.js b/packages/curve/scripts/dev.js index 44bcf930f..d29e76eaf 100644 --- a/packages/curve/scripts/dev.js +++ b/packages/curve/scripts/dev.js @@ -2,6 +2,8 @@ const esbuild = require('esbuild') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { try { await esbuild.build({ @@ -17,7 +19,7 @@ async function main() { }, watch: { onRebuild(err) { - err ? error('❌ Failed') : log('✅ Updated') + err ? error('❌ Failed') : jslog('✅ Updated') }, }, }) diff --git a/packages/curve/src/index.ts b/packages/curve/src/index.ts index e97e7aff9..59d7fb664 100644 --- a/packages/curve/src/index.ts +++ b/packages/curve/src/index.ts @@ -82,63 +82,6 @@ export function getTLBezierCurveSegments( return results } -/** - * Find a point along a curve segment, via pomax. - * @param t - * @param points [cpx1, cpy1, cpx2, cpy2, px, py][] - */ -export function computePointOnCurve(t: number, points: number[][]): number[] { - // shortcuts - if (t === 0) { - return points[0] - } - - const order = points.length - 1 - - if (t === 1) { - return points[order] - } - - const mt = 1 - t - let p = points // constant? - - if (order === 0) { - return points[0] - } // linear? - - if (order === 1) { - return [mt * p[0][0] + t * p[1][0], mt * p[0][1] + t * p[1][1]] - } // quadratic/cubic curve? - - // if (order < 4) { - const mt2 = mt * mt - const t2 = t * t - - let a: number - let b: number - let c: number - let d = 0 - - if (order === 2) { - p = [p[0], p[1], p[2], [0, 0]] - a = mt2 - b = mt * t * 2 - c = t2 - // } else if (order === 3) { - } else { - a = mt2 * mt - b = mt2 * t * 3 - c = mt * t2 * 3 - d = t * t2 - } - - return [ - a * p[0][0] + b * p[1][0] + c * p[2][0] + d * p[3][0], - a * p[0][1] + b * p[1][1] + c * p[2][1] + d * p[3][1], - ] - // } // higher order curves: use de Casteljau's computation -} - /** * Evaluate a 2d cubic bezier at a point t on the x axis. * @param tx @@ -197,28 +140,11 @@ export function cubicBezier(tx: number, x1: number, y1: number, x2: number, y2: * @param points An array of points formatted as [x, y] * @param k Tension */ -export function getSpline( - pts: number[][], - k = 0.5 -): { - cp1x: number - cp1y: number - cp2x: number - cp2y: number - px: number - py: number -}[] { +export function getSpline(pts: number[][], k = 0.5): number[][] { let p0: number[] let [p1, p2, p3] = pts - const results: { - cp1x: number - cp1y: number - cp2x: number - cp2y: number - px: number - py: number - }[] = [] + const results: number[][] = [] for (let i = 1, len = pts.length; i < len; i++) { p0 = p1 @@ -226,19 +152,76 @@ export function getSpline( p2 = p3 p3 = pts[i + 2] ? pts[i + 2] : p2 - results.push({ - cp1x: p1[0] + ((p2[0] - p0[0]) / 6) * k, - cp1y: p1[1] + ((p2[1] - p0[1]) / 6) * k, - cp2x: p2[0] - ((p3[0] - p1[0]) / 6) * k, - cp2y: p2[1] - ((p3[1] - p1[1]) / 6) * k, - px: pts[i][0], - py: pts[i][1], - }) + results.push([ + p1[0] + ((p2[0] - p0[0]) / 6) * k, + p1[1] + ((p2[1] - p0[1]) / 6) * k, + p2[0] - ((p3[0] - p1[0]) / 6) * k, + p2[1] - ((p3[1] - p1[1]) / 6) * k, + pts[i][0], + pts[i][1], + ]) } return results } +/** + * Find a point along a curve segment, via pomax. + * @param t + * @param points [cpx1, cpy1, cpx2, cpy2, px, py][] + */ +export function computePointOnSpline(t: number, points: number[][]): number[] { + // shortcuts + if (t === 0) { + return points[0] + } + + const order = points.length - 1 + + if (t === 1) { + return points[order] + } + + const mt = 1 - t + let p = points // constant? + + if (order === 0) { + return points[0] + } // linear? + + if (order === 1) { + return [mt * p[0][0] + t * p[1][0], mt * p[0][1] + t * p[1][1]] + } // quadratic/cubic curve? + + // if (order < 4) { + const mt2 = mt * mt + const t2 = t * t + + let a: number + let b: number + let c: number + let d = 0 + + if (order === 2) { + p = [p[0], p[1], p[2], [0, 0]] + a = mt2 + b = mt * t * 2 + c = t2 + // } else if (order === 3) { + } else { + a = mt2 * mt + b = mt2 * t * 3 + c = mt * t2 * 3 + d = t * t2 + } + + return [ + a * p[0][0] + b * p[1][0] + c * p[2][0] + d * p[3][0], + a * p[0][1] + b * p[1][1] + c * p[2][1] + d * p[3][1], + ] + // } // higher order curves: use de Casteljau's computation +} + /** * Get a bezier curve data for a spline that fits an array of points. * @param pts @@ -271,7 +254,7 @@ export function getCurvePoints( // The algorithm require a previous and next point to the actual point array. // Check if we will draw closed or open curve. // If closed, copy end points to beginning and first points to end - // If open, duplicate first points to befinning, end points to end + // If open, duplicate first points to beginning, end points to end if (isClosed) { _pts.unshift(_pts[len - 1]) _pts.push(_pts[0]) diff --git a/packages/intersect/scripts/build.js b/packages/intersect/scripts/build.js index a3032ea5f..2b9b2bafb 100644 --- a/packages/intersect/scripts/build.js +++ b/packages/intersect/scripts/build.js @@ -4,6 +4,8 @@ const esbuild = require('esbuild') const { gzip } = require('zlib') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -47,7 +49,7 @@ async function main() { fs.readFile('./dist/esm/index.js', (_err, data) => { gzip(data, (_err, result) => { - console.log( + jslog( `✔ ${pkg.name}: Built package. ${(esmSize / 1000).toFixed(2)}kb (${( result.length / 1000 ).toFixed(2)}kb minified)` @@ -55,8 +57,8 @@ async function main() { }) }) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/packages/intersect/scripts/dev.js b/packages/intersect/scripts/dev.js index 44bcf930f..d29e76eaf 100644 --- a/packages/intersect/scripts/dev.js +++ b/packages/intersect/scripts/dev.js @@ -2,6 +2,8 @@ const esbuild = require('esbuild') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { try { await esbuild.build({ @@ -17,7 +19,7 @@ async function main() { }, watch: { onRebuild(err) { - err ? error('❌ Failed') : log('✅ Updated') + err ? error('❌ Failed') : jslog('✅ Updated') }, }, }) diff --git a/packages/tldraw/scripts/build.js b/packages/tldraw/scripts/build.js index b4c6556cc..384e5468f 100644 --- a/packages/tldraw/scripts/build.js +++ b/packages/tldraw/scripts/build.js @@ -4,6 +4,8 @@ const esbuild = require('esbuild') const { gzip } = require('zlib') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -49,7 +51,7 @@ async function main() { fs.readFile('./dist/esm/index.js', (_err, data) => { gzip(data, (_err, result) => { - console.log( + jslog( `✔ ${pkg.name}: Built pkg. ${(esmSize / 1000).toFixed(2)}kb (${( result.length / 1000 ).toFixed(2)}kb minified)` @@ -57,8 +59,8 @@ async function main() { }) }) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/packages/tldraw/scripts/dev.js b/packages/tldraw/scripts/dev.js index 089092e3b..b498cd29b 100644 --- a/packages/tldraw/scripts/dev.js +++ b/packages/tldraw/scripts/dev.js @@ -2,6 +2,8 @@ const esbuild = require('esbuild') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { esbuild.build({ entryPoints: ['./src/index.ts'], @@ -19,10 +21,10 @@ async function main() { watch: { onRebuild(error) { if (error) { - console.log(`× ${pkg.name}: An error in prevented the rebuild.`) + jslog(`× ${pkg.name}: An error in prevented the rebuild.`) return } - console.log(`✔ ${pkg.name}: Rebuilt.`) + jslog(`✔ ${pkg.name}: Rebuilt.`) }, }, }) diff --git a/packages/vec/scripts/build.js b/packages/vec/scripts/build.js index 6c78641ec..a50b2ccf1 100644 --- a/packages/vec/scripts/build.js +++ b/packages/vec/scripts/build.js @@ -4,6 +4,8 @@ const esbuild = require('esbuild') const { gzip } = require('zlib') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { if (fs.existsSync('./dist')) { fs.rmSync('./dist', { recursive: true }, (e) => { @@ -45,7 +47,7 @@ async function main() { fs.readFile('./dist/esm/index.js', (_err, data) => { gzip(data, (_err, result) => { - console.log( + jslog( `✔ ${pkg.name}: Built package. ${(esmSize / 1000).toFixed(2)}kb (${( result.length / 1000 ).toFixed(2)}kb minified)` @@ -53,8 +55,8 @@ async function main() { }) }) } catch (e) { - console.log(`× ${pkg.name}: Build failed due to an error.`) - console.log(e) + jslog(`× ${pkg.name}: Build failed due to an error.`) + jslog(e) } } diff --git a/packages/vec/scripts/dev.js b/packages/vec/scripts/dev.js index 44bcf930f..d29e76eaf 100644 --- a/packages/vec/scripts/dev.js +++ b/packages/vec/scripts/dev.js @@ -2,6 +2,8 @@ const esbuild = require('esbuild') const pkg = require('../package.json') +const { log: jslog } = console + async function main() { try { await esbuild.build({ @@ -17,7 +19,7 @@ async function main() { }, watch: { onRebuild(err) { - err ? error('❌ Failed') : log('✅ Updated') + err ? error('❌ Failed') : jslog('✅ Updated') }, }, }) diff --git a/yarn.lock b/yarn.lock index 731cf668f..508d368b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -901,7 +901,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.14.0", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.16.3" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.3.tgz#b86f0db02a04187a3c17caa77de69840165d42d5" integrity sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ== @@ -2004,11 +2004,21 @@ resolved "https://registry.yarnpkg.com/@liveblocks/client/-/client-0.13.0-beta.1.tgz#baee31dbefb7c40c954ab61b8c421562a85f729e" integrity sha512-LW1CygndCQeITYFsnaEZgbe2qqIZKo4iVH/qGYEXVLptc/1PP0nzEi8Hr2lfw4JOUw003FTeQ+BSI/raP22mgg== -"@liveblocks/react@0.13.0-beta.1", "@liveblocks/react@^0.13.0-beta.1": +"@liveblocks/client@^0.13.1": + version "0.13.1" + resolved "https://registry.yarnpkg.com/@liveblocks/client/-/client-0.13.1.tgz#601b7f077abb0220307ff57cae39887f17d582f7" + integrity sha512-0yOjcy3qx+qGJxTIJnsPYLzwdgZoJ53CrAKrjxAp1gKdg7T0Ub3LwDrUCw+ukgn1O2aE96FL71GQEscsvjD7TA== + +"@liveblocks/react@0.13.0-beta.1": version "0.13.0-beta.1" resolved "https://registry.yarnpkg.com/@liveblocks/react/-/react-0.13.0-beta.1.tgz#e71bc47511480967c2a11042aa920399674b5c3d" integrity sha512-odOO5WCVfV3B70Yy8k/11XFY/5dVSBpIPKnx+ZDxZkw/yzrA39NqS+GH7go/RvVAGSeHbg9phknOtg4X9gziAQ== +"@liveblocks/react@^0.13.1": + version "0.13.1" + resolved "https://registry.yarnpkg.com/@liveblocks/react/-/react-0.13.1.tgz#e134305575f38901f03a7db84596a9610a5467f0" + integrity sha512-//XYlFQZnhSrguRdfuGUu5G1sMl/rSBwHDB/pUHGoDCiS94zwVhweao5wKJpph3TklxVHEV2gR3n3+EYo7D91w== + "@malept/cross-spawn-promise@^1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz#504af200af6b98e198bce768bc1730c6936ae01d" @@ -2044,22 +2054,6 @@ resolved "https://registry.yarnpkg.com/@napi-rs/triples/-/triples-1.1.0.tgz#88c35b72e79a20b79bb4c9b3e2817241a1c9f4f9" integrity sha512-XQr74QaLeMiqhStEhLn1im9EOMnkypp7MZOwQhGzqp2Weu5eQJbpPxWxixxlYRKWPOmJjsk6qYfYH9kq43yc2w== -"@next-auth/prisma-legacy-adapter@0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@next-auth/prisma-legacy-adapter/-/prisma-legacy-adapter-0.1.2.tgz#d19b65696bf16bda5dbc88f85da98aee6f30e2f3" - integrity sha512-QpGcRvrnFERkvVFroqS89qDbnskw9AjhvWxO095u3xl/8QVI++Y+doluQdZWuV6PewjrV7xY+uVUEnRhnGM8yQ== - dependencies: - "@babel/runtime" "^7.14.0" - -"@next-auth/typeorm-legacy-adapter@0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@next-auth/typeorm-legacy-adapter/-/typeorm-legacy-adapter-0.1.4.tgz#a250498613669b736d76b36a2a46f7eafc9e6ed5" - integrity sha512-UDnctrPiUU0yaPNeFhD6uw0FAuWGvx6IUVwUYTEzZm26RCEe/BBjkpGLYk43M3rcnkBPfkiljomAs/O7Uzh12w== - dependencies: - "@babel/runtime" "^7.14.0" - require_optional "^1.0.1" - typeorm "^0.2.30" - "@next/env@12.0.7": version "12.0.7" resolved "https://registry.yarnpkg.com/@next/env/-/env-12.0.7.tgz#316f7bd1b6b69f554d2676cfc91a16bc7e32ee79" @@ -2379,11 +2373,6 @@ dependencies: "@octokit/openapi-types" "^11.2.0" -"@panva/asn1.js@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@panva/asn1.js/-/asn1.js-1.0.0.tgz#dd55ae7b8129e02049f009408b97c61ccf9032f6" - integrity sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw== - "@panva/hkdf@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@panva/hkdf/-/hkdf-1.0.1.tgz#ed0da773bd5f794d0603f5a5b5cee6d2354e5660" @@ -2971,11 +2960,6 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@sqltools/formatter@^1.2.2": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.3.tgz#1185726610acc37317ddab11c3c7f9066966bd20" - integrity sha512-O3uyB/JbkAEMZaP3YqyHH7TMnex7tWyCbCI4EfJdOCoN6HIhqdJBWTM6aCCiWQ/5f5wxjgU735QAIpJbjDvmzg== - "@state-designer/core@latest": version "3.0.0" resolved "https://registry.yarnpkg.com/@state-designer/core/-/core-3.0.0.tgz#c716d99f8862dd0e58fe48250c4cf875ecc76570" @@ -3443,11 +3427,6 @@ dependencies: "@types/node" "*" -"@types/zen-observable@0.8.3": - version "0.8.3" - resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3" - integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw== - "@typescript-eslint/eslint-plugin@^4.19.0", "@typescript-eslint/eslint-plugin@^4.31.1": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" @@ -3804,11 +3783,6 @@ app-module-path@^2.2.0: resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= -app-root-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.0.0.tgz#210b6f43873227e18a4b810a032283311555d5ad" - integrity sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw== - aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -4468,11 +4442,6 @@ buffer-crc32@~0.2.3: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= -buffer-equal-constant-time@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" - integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= - buffer-equal@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" @@ -4509,14 +4478,6 @@ buffer@^5.1.0, buffer@^5.2.1, buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - builder-util-runtime@8.9.1: version "8.9.1" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.9.1.tgz#25f066b3fbc20b3e6236a9b956b1ebb0e33ff66a" @@ -4907,18 +4868,6 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-highlight@^2.1.11: - version "2.1.11" - resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.11.tgz#49736fa452f0aaf4fae580e30acb26828d2dc1bf" - integrity sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg== - dependencies: - chalk "^4.0.0" - highlight.js "^10.7.1" - mz "^2.4.0" - parse5 "^5.1.1" - parse5-htmlparser2-tree-adapter "^6.0.0" - yargs "^16.0.0" - cli-truncate@2.1.0, cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" @@ -6164,11 +6113,6 @@ dotenv@^10.0.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== -dotenv@^8.2.0: - version "8.6.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" - integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== - dotenv@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-9.0.2.tgz#dacc20160935a37dea6364aa1bef819fb9b6ab05" @@ -6202,13 +6146,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ecdsa-sig-formatter@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" - integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== - dependencies: - safe-buffer "^5.0.1" - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -7360,6 +7297,13 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" +framesync@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/framesync/-/framesync-6.0.1.tgz#5e32fc01f1c42b39c654c35b16440e07a25d6f20" + integrity sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA== + dependencies: + tslib "^2.1.0" + fresh@~0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" @@ -7443,11 +7387,6 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -futoin-hkdf@^1.3.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/futoin-hkdf/-/futoin-hkdf-1.4.2.tgz#fd534e848e0e50339b8bfbd81250b09cbff10ba3" - integrity sha512-2BggwLEJOTfXzKq4Tl2bIT37p0IqqKkblH4e0cMp2sXTdmwg/ADBKMxvxaEytYYcgdxgng8+acsi3WgMVUl6CQ== - gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -7952,10 +7891,10 @@ he@1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -highlight.js@^10.7.1: - version "10.7.3" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" - integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== +hey-listen@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" + integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== history@^4.9.0: version "4.10.1" @@ -8186,7 +8125,7 @@ idb@^6.1.4: resolved "https://registry.yarnpkg.com/idb/-/idb-6.1.5.tgz#dbc53e7adf1ac7c59f9b2bf56e00b4ea4fce8c7b" integrity sha512-IJtugpKkiVXQn5Y+LteyBCNk1N8xpGV3wWZk9EVtZWH8DYkjBn0bX1XnGP9RkyZF0sAcywa6unHqSWKe7q4LGw== -ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: +ieee754@^1.1.13, ieee754@^1.1.4: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -9354,13 +9293,6 @@ joi@^17.4.2: "@sideway/formula" "^3.0.0" "@sideway/pinpoint" "^2.0.0" -jose@^1.27.2: - version "1.28.1" - resolved "https://registry.yarnpkg.com/jose/-/jose-1.28.1.tgz#34a0f851a534be59ffab82a6e8845f6874e8c128" - integrity sha512-6JK28rFu5ENp/yxMwM+iN7YeaInnY9B9Bggjkz5fuwLiJhbVrl2O4SJr65bdNBPl9y27fdC3Mymh+FVCvozLIg== - dependencies: - "@panva/asn1.js" "^1.0.0" - jose@^4.1.2, jose@^4.1.4: version "4.3.7" resolved "https://registry.yarnpkg.com/jose/-/jose-4.3.7.tgz#5000e4a2d41ae411a5abdd11e6baf63fc2973a69" @@ -9376,7 +9308,7 @@ jpeg-js@^0.4.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0, js-yaml@^4.0.0, js-yaml@^4.1.0: +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -9524,22 +9456,6 @@ jsonpointer@^5.0.0: resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.0.tgz#f802669a524ec4805fa7389eadbc9921d5dc8072" integrity sha512-PNYZIdMjVIvVgDSYKTT63Y+KZ6IZvGRNNWcxwD+GNnUz1MKPfv30J8ueCjdwcN0nDx2SlshgyB7Oy0epAzVRRg== -jsonwebtoken@^8.5.1: - version "8.5.1" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" - integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== - dependencies: - jws "^3.2.2" - lodash.includes "^4.3.0" - lodash.isboolean "^3.0.3" - lodash.isinteger "^4.0.4" - lodash.isnumber "^3.0.3" - lodash.isplainobject "^4.0.6" - lodash.isstring "^4.0.1" - lodash.once "^4.0.0" - ms "^2.1.1" - semver "^5.6.0" - jsprim@^1.2.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" @@ -9558,23 +9474,6 @@ jsprim@^1.2.2: array-includes "^3.1.3" object.assign "^4.1.2" -jwa@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" - integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== - dependencies: - buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jws@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== - dependencies: - jwa "^1.4.1" - safe-buffer "^5.0.1" - keygrip@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.1.0.tgz#871b1681d5e159c62a445b0c74b615e0917e7226" @@ -9944,51 +9843,16 @@ lodash.get@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= -lodash.includes@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" - integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= - -lodash.isboolean@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" - integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= - -lodash.isinteger@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" - integrity sha1-YZwK89A/iwTDH1iChAt3sRzWg0M= - lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= -lodash.isnumber@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" - integrity sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w= - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= - -lodash.isstring@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" - integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= - lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.once@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" - integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= - lodash.set@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" @@ -10494,7 +10358,7 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@^1.0.4: +mkdirp@*: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -10644,7 +10508,7 @@ mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mz@^2.4.0, mz@^2.5.0: +mz@^2.5.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== @@ -10720,25 +10584,22 @@ next-auth@*: preact-render-to-string "^5.1.19" uuid "^8.3.2" -next-auth@^3.29.0: - version "3.29.0" - resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-3.29.0.tgz#60ddbfc7ed8ae7d43ebb02c16dc58eebf5dcb337" - integrity sha512-B//4QTv/1Of0D+roZ82URmI6L2JSbkKgeaKI7Mdrioq8lAzp9ff8NdmouvZL/7zwrPe2cUyM6MLYlasfuI3ZIQ== +next-auth@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-4.0.5.tgz#a41cdbe41f8a8dad42f4b3fb510ef1fb7035667e" + integrity sha512-POrV6c29Uu3+kVhOe8h3go2ytjeB2jPdW4GJwudUbK6OB++dkpT6yialmm8whM7hyoW4Xy3FbsoldGn8bVHhYg== dependencies: - "@babel/runtime" "^7.14.0" - "@next-auth/prisma-legacy-adapter" "0.1.2" - "@next-auth/typeorm-legacy-adapter" "0.1.4" - futoin-hkdf "^1.3.2" - jose "^1.27.2" - jsonwebtoken "^8.5.1" - nodemailer "^6.4.16" + "@babel/runtime" "^7.15.4" + "@panva/hkdf" "^1.0.0" + cookie "^0.4.1" + jose "^4.1.2" oauth "^0.9.15" - pkce-challenge "^2.1.0" - preact "^10.4.1" - preact-render-to-string "^5.1.14" - querystring "^0.2.0" + openid-client "^5.0.2" + preact "^10.5.14" + preact-render-to-string "^5.1.19" + uuid "^8.3.2" -next-pwa@^5.4.0: +next-pwa@^5.4.4: version "5.4.4" resolved "https://registry.yarnpkg.com/next-pwa/-/next-pwa-5.4.4.tgz#00f1678091f05662e54c25106664e79c26c337ef" integrity sha512-Wo7DctXO9ZZzMCuRK/q2U3x5k49LBRv7p31woJIUfiR6tJChSMoojHUvvgeCY72gSo4mtovS5KRm6iHIs/kxeg== @@ -10763,7 +10624,7 @@ next-transpile-modules@^9.0.0: enhanced-resolve "^5.7.0" escalade "^3.1.1" -next@^12.0.1: +next@^12.0.7: version "12.0.7" resolved "https://registry.yarnpkg.com/next/-/next-12.0.7.tgz#33ebf229b81b06e583ab5ae7613cffe1ca2103fc" integrity sha512-sKO8GJJYfuk9c+q+zHSNumvff+wP7ufmOlwT6BuzwiYfFJ61VTTkfTcDLSJ+95ErQJiC54uS4Yg5JEE8H6jXRA== @@ -10924,11 +10785,6 @@ node-source-walk@^4.0.0, node-source-walk@^4.2.0: dependencies: "@babel/parser" "^7.0.0" -nodemailer@^6.4.16: - version "6.7.2" - resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.7.2.tgz#44b2ad5f7ed71b7067f7a21c4fedabaec62b85e0" - integrity sha512-Dz7zVwlef4k5R71fdmxwR8Q39fiboGbu3xgswkzGwczUfjp873rVxt1O46+Fh0j1ORnAC6L9+heI8uUpO6DT7Q== - nopt@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" @@ -11528,7 +11384,7 @@ parse-url@^6.0.0: parse-path "^4.0.0" protocols "^1.4.0" -parse5-htmlparser2-tree-adapter@^6.0.0, parse5-htmlparser2-tree-adapter@^6.0.1: +parse5-htmlparser2-tree-adapter@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== @@ -11540,11 +11396,6 @@ parse5@6.0.1, parse5@^6.0.1: resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== -parse5@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" - integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== - parseurl@^1.3.2, parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -11710,11 +11561,6 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" -pkce-challenge@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/pkce-challenge/-/pkce-challenge-2.2.0.tgz#02622e0498b82aab248c8c7dbf6507e8bbe20abf" - integrity sha512-Ly0Y0OwhtG2N1ynk5ruqoyJxkrWhAPmvdRk0teiLh9Dp2+J4URKpv1JSKWD0j1Sd+QCeiwO9lTl0EjmrB2jWeA== - pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" @@ -11790,6 +11636,16 @@ pngjs@^5.0.0: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== +popmotion@^11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.3.tgz#565c5f6590bbcddab7a33a074bb2ba97e24b0cc9" + integrity sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA== + dependencies: + framesync "6.0.1" + hey-listen "^1.0.8" + style-value-types "5.0.0" + tslib "^2.1.0" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -11822,14 +11678,14 @@ postcss@^8.1.7: picocolors "^1.0.0" source-map-js "^1.0.1" -preact-render-to-string@^5.1.14, preact-render-to-string@^5.1.19: +preact-render-to-string@^5.1.19: version "5.1.19" resolved "https://registry.yarnpkg.com/preact-render-to-string/-/preact-render-to-string-5.1.19.tgz#ffae7c3bd1680be5ecf5991d41fe3023b3051e0e" integrity sha512-bj8sn/oytIKO6RtOGSS/1+5CrQyRSC99eLUnEVbqUa6MzJX5dYh7wu9bmT0d6lm/Vea21k9KhCQwvr2sYN3rrQ== dependencies: pretty-format "^3.8.0" -preact@^10.4.1, preact@^10.5.14: +preact@^10.5.14: version "10.6.2" resolved "https://registry.yarnpkg.com/preact/-/preact-10.6.2.tgz#c849f91df9ad36bfa64d1a5d5880977f767c69e5" integrity sha512-ppDjurt75nSxyikpyali+uKwRl8CK9N6ntOPovGIEGQagjMLVzEgVqFEsUUyUrqyE9Ch90KE0jmFc9q2QcPLBA== @@ -12093,11 +11949,6 @@ querystring-es3@0.2.1: resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= -querystring@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" - integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -12445,11 +12296,6 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" -reflect-metadata@^0.1.13: - version "0.1.13" - resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" - integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== - regenerate-unicode-properties@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz#54d09c7115e1f53dc2314a974b32c1c344efe326" @@ -12596,14 +12442,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -require_optional@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.1.tgz#4cf35a4247f64ca3df8c2ef208cc494b1ca8fc2e" - integrity sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g== - dependencies: - resolve-from "^2.0.0" - semver "^5.1.0" - requirejs-config-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/requirejs-config-file/-/requirejs-config-file-4.0.0.tgz#4244da5dd1f59874038cc1091d078d620abb6ebc" @@ -12646,11 +12484,6 @@ resolve-dependency-path@^2.0.0: resolved "https://registry.yarnpkg.com/resolve-dependency-path/-/resolve-dependency-path-2.0.0.tgz#11700e340717b865d216c66cabeb4a2a3c696736" integrity sha512-DIgu+0Dv+6v2XwRaNWnumKu7GPufBBOr5I1gRPJHkvghrfCGOooJODFvgFimX/KRxk9j0whD2MnKHzM1jYvk9w== -resolve-from@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" - integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c= - resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -13013,7 +12846,7 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: +sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== @@ -13658,6 +13491,14 @@ strong-log-transformer@^2.0.0: minimist "^1.2.0" through "^2.3.4" +style-value-types@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-5.0.0.tgz#76c35f0e579843d523187989da866729411fc8ad" + integrity sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA== + dependencies: + hey-listen "^1.0.8" + tslib "^2.1.0" + styled-jsx@5.0.0-beta.3: version "5.0.0-beta.3" resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.0-beta.3.tgz#400d16179b5dff10d5954ab8be27a9a1b7780dd2" @@ -14273,28 +14114,6 @@ typedoc@^0.22.3: minimatch "^3.0.4" shiki "^0.9.12" -typeorm@^0.2.30: - version "0.2.41" - resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.41.tgz#88758101ac158dc0a0a903d70eaacea2974281cc" - integrity sha512-/d8CLJJxKPgsnrZWiMyPI0rz2MFZnBQrnQ5XP3Vu3mswv2WPexb58QM6BEtmRmlTMYN5KFWUz8SKluze+wS9xw== - dependencies: - "@sqltools/formatter" "^1.2.2" - app-root-path "^3.0.0" - buffer "^6.0.3" - chalk "^4.1.0" - cli-highlight "^2.1.11" - debug "^4.3.1" - dotenv "^8.2.0" - glob "^7.1.6" - js-yaml "^4.0.0" - mkdirp "^1.0.4" - reflect-metadata "^0.1.13" - sha.js "^2.4.11" - tslib "^2.1.0" - xml2js "^0.4.23" - yargs "^17.0.1" - zen-observable-ts "^1.0.0" - typescript@4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" @@ -15222,7 +15041,7 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0, yargs@^16.0.0, yargs@^16.2.0: +yargs@16.2.0, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -15290,19 +15109,6 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zen-observable-ts@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-1.1.0.tgz#2d1aa9d79b87058e9b75698b92791c1838551f83" - integrity sha512-1h4zlLSqI2cRLPJUHJFL8bCWHhkpuXkF+dbGkRaWjgDIG26DmzyshUMrdV/rL3UnR+mhaX4fRq8LPouq0MYYIA== - dependencies: - "@types/zen-observable" "0.8.3" - zen-observable "0.8.15" - -zen-observable@0.8.15: - version "0.8.15" - resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" - integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== - zustand@^3.6.5: version "3.6.6" resolved "https://registry.yarnpkg.com/zustand/-/zustand-3.6.6.tgz#3b7473a15813f7af9784233abd052c3b4560bbcc"