Biome as it is now didn't work out for us 😢 

Summary for posterity:

* it IS much, much faster, fast enough to skip any sort of caching
* we couldn't fully replace Prettier just yet. We use Prettier
programmatically to format code in docs, and Biome's JS interface is
officially alpha and [had legacy peer deps
set](https://github.com/biomejs/biome/pull/1756) (which would fail our
CI build as we don't allow installation warnings)
* ternary formatting differs from Prettier, leading to a large diff
https://github.com/biomejs/biome/issues/1661
* import sorting differs from Prettier's
`prettier-plugin-organize-imports`, making the diff even bigger
* the deal breaker is a multi-second delay on saving large files (for us
it's
[Editor.ts](https://github.com/tldraw/tldraw/blob/main/packages/editor/src/lib/editor/Editor.ts))
in VSCode when import sorting is enabled. There is a seemingly relevant
Biome issue where I posted a small summary of our findings:
https://github.com/biomejs/biome/issues/1569#issuecomment-1930411623

Further actions:

* reevaluate in a few months as Biome matures

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package
alex/reactive-context-menus-again
Dan Groshev 2024-02-07 16:02:22 +00:00 zatwierdzone przez GitHub
rodzic f185edcb76
commit 86cce6d161
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
65 zmienionych plików z 502 dodań i 502 usunięć

Wyświetl plik

@ -38,12 +38,6 @@ jobs:
- name: Check for installation warnings
run: 'yarn | grep -vzq "with warnings"'
- name: Setup Biome CLI
uses: biomejs/setup-biome@v2
- name: Run Biome
run: biome ci --formatter-enabled=true --linter-enabled=false --organize-imports-enabled=false .
- name: Typecheck
run: yarn build-types

Wyświetl plik

@ -2,7 +2,7 @@ dist
.tsbuild-dev
.tsbuild-pub
.tsbuild
node_modules
node\*modules
*.d.ts
*.md
**/_archive
@ -18,6 +18,4 @@ apps/example/www/index.css
*.cjs
apps/docs/.next
e2e/**/*.png
packages/tldraw/tldraw.css

25
.prettierignore 100644
Wyświetl plik

@ -0,0 +1,25 @@
**/node_modules/*
**/out/*
**/dist/*
**/dist-cjs/*
**/dist-esm/*
**/.next/*
**/api/*
!**/pages/api/*
**/.tsbuild*
**/.next/*
*.mdx
**/_archive/*
apps/docs/api-content.json
apps/docs/content.json
apps/vscode/extension/editor/*
apps/examples/www
content.json
apps/docs/utils/vector-db/index.json
**/gen/**/*.md
**/.vercel/*
**/.wrangler/*
**/.out/*
**/.temp/*
apps/dotcom/public/**/*.*

Wyświetl plik

@ -5,5 +5,5 @@
"printWidth": 100,
"tabWidth": 2,
"useTabs": true,
"plugins": []
"plugins": ["prettier-plugin-organize-imports"]
}

Wyświetl plik

@ -1,3 +0,0 @@
{
"recommendations": ["tldraw-org.tldraw-vscode", "biomejs.biome"]
}

Wyświetl plik

@ -39,7 +39,7 @@
"refresh-embeddings": "yarn run -T tsx --tsconfig ./tsconfig.content.json ./scripts/refresh-embeddings.ts",
"refresh-everything": "yarn fetch-api-source && yarn fetch-releases && yarn create-api-markdown && yarn refresh-content && yarn refresh-embeddings && yarn format",
"clean": "rm -rf node_modules .yarn",
"format": "biome format --write .",
"format": "yarn run -T prettier --write .",
"watch-content": "tsx ./watcher.ts"
},
"dependencies": {
@ -67,7 +67,10 @@
"next-themes": "^0.2.1",
"octokit": "^3.1.1",
"openai": "^4.11.1",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.0.3",
"prettier-plugin-organize-imports": "^3.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hotkeys-hook": "^4.4.1",

Wyświetl plik

@ -115,8 +115,8 @@ export function generateSection(section: InputSection, articles: Articles, index
section.id === 'getting-started'
? `/${articleId}`
: isUncategorized
? `/${section.id}/${articleId}`
: `/${section.id}/${categoryId}/${articleId}`,
? `/${section.id}/${articleId}`
: `/${section.id}/${categoryId}/${articleId}`,
}
if (isExamples) {

Wyświetl plik

@ -161,8 +161,8 @@ export class ContentDatabase {
sectionId === 'examples'
? this._sidebarExamplesContentLinks
: sectionId === 'reference'
? this._sidebarReferenceContentLinks
: this._sidebarContentLinks
? this._sidebarReferenceContentLinks
: this._sidebarContentLinks
if (cachedLinks && process.env.NODE_ENV !== 'development') {
// Use the previously cached sidebar links
links = cachedLinks

Wyświetl plik

@ -217,8 +217,8 @@ export async function getVectorDb(
INCLUDE_API_CONTENT && INCLUDE_CONTENT
? await db.all('SELECT * FROM articles')
: INCLUDE_API_CONTENT
? await db.all('SELECT * FROM articles WHERE articles.sectionId = ?', 'reference')
: await db.all('SELECT * FROM articles WHERE articles.sectionId != ?', 'reference')
? await db.all('SELECT * FROM articles WHERE articles.sectionId = ?', 'reference')
: await db.all('SELECT * FROM articles WHERE articles.sectionId != ?', 'reference')
nicelog(`Adding articles to index`)
const max = Math.min(articles.length, MAX_ARTICLES)

Wyświetl plik

@ -3,11 +3,9 @@ import { AlarmScheduler } from './AlarmScheduler'
jest.useFakeTimers()
function makeMockAlarmScheduler<Key extends string>(
alarms: {
[K in Key]: jest.Mock<Promise<void>, []>
}
) {
function makeMockAlarmScheduler<Key extends string>(alarms: {
[K in Key]: jest.Mock<Promise<void>, []>
}) {
const data = new Map<string, number>()
let scheduledAlarm: number | null = null

Wyświetl plik

@ -38,7 +38,7 @@ export function BoardHistorySnapshot({
...(token
? {
Authorization: 'Bearer ' + token,
}
}
: {}),
},
body: JSON.stringify({ timestamp }),

Wyświetl plik

@ -50,8 +50,8 @@ export const PeopleMenuItem = track(function PeopleMenuItem({ userId }: { userId
theyAreFollowingYou
? msg('people-menu.leading')
: youAreFollowingThem
? msg('people-menu.following')
: msg('people-menu.follow')
? msg('people-menu.following')
: msg('people-menu.follow')
}
icon={theyAreFollowingYou ? 'leading' : youAreFollowingThem ? 'following' : 'follow'}
onClick={handleFollowClick}

Wyświetl plik

@ -188,8 +188,8 @@ export const ShareMenu = React.memo(function ShareMenu() {
shareState.state === 'offline'
? 'share-menu.offline-note'
: isReadOnlyLink
? 'share-menu.copy-readonly-link-note'
: 'share-menu.copy-link-note'
? 'share-menu.copy-readonly-link-note'
: 'share-menu.copy-link-note'
)}
</p>
</div>

Wyświetl plik

@ -10,7 +10,7 @@ const { loader, useData } = defineLoader(async (args) => {
? ((await result.json()) as {
schema: SerializedSchema
records: TLRecord[]
})
})
: null
})

Wyświetl plik

@ -97,7 +97,7 @@ export function useFileSystem({ isMultiplayer }: { isMultiplayer: boolean }): TL
const newItem = menuItem(actions[NEW_PROJECT_ACTION])
const group = isMultiplayer
? // open is not currently supported in multiplayer
menuGroup('filesystem', saveItem)
menuGroup('filesystem', saveItem)
: menuGroup('filesystem', newItem, openItem, saveItem)
fileMenu.children.unshift(group!)

Wyświetl plik

@ -60,11 +60,11 @@ export default function UserPresenceExample() {
t < 1
? ''
: t > 2
? CURSOR_CHAT_MESSAGE
: CURSOR_CHAT_MESSAGE.slice(
? CURSOR_CHAT_MESSAGE
: CURSOR_CHAT_MESSAGE.slice(
0,
Math.ceil((t - 1) * CURSOR_CHAT_MESSAGE.length)
)
)
}
editor.store.put([

Wyświetl plik

@ -1,77 +0,0 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"organizeImports": {
"enabled": true
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"files": {
"ignoreUnknown": true,
"ignore": [
"dist",
"node_modules",
"**/*.d.ts",
".next",
".vercel",
".vscode",
".lazy",
".husky",
"index.json",
"*.api.json",
"api.json",
"**/out/*",
"**/dist/*",
"**/dist-cjs/*",
"**/dist-esm/*",
"**/.next/*",
"**/packages/**/api/*",
"**/.tsbuild*",
"*.mdx",
"**/_archive/*",
"apps/docs/api-content.json",
"apps/docs/content.json",
"apps/vscode/extension/editor/*",
"apps/examples/www",
"content.json",
"apps/docs/utils/vector-db/index.json",
"**/gen/**/*.md",
"**/.vercel/*",
"**/.wrangler/*",
"**/.out/*",
"**/.temp/*",
"apps/dotcom/public/**/*.*"
]
},
"formatter": {
"enabled": true,
"formatWithErrors": true,
"indentStyle": "tab",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 100
},
"javascript": {
"formatter": {
"semicolons": "asNeeded",
"trailingComma": "es5",
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"arrowParentheses": "always",
"bracketSameLine": false,
"bracketSpacing": true
}
},
"json": {
"formatter": {
"lineWidth": 80
}
},
"linter": {
"enabled": false
}
}

Wyświetl plik

@ -50,7 +50,7 @@
"build-package": "lazy build-package",
"preview-app": "VITE_PREVIEW=1 yarn dev-app",
"lint": "lazy lint",
"format": "biome format --write .",
"format": "prettier --write --cache \"**/*.{ts,tsx,js,jsx,json}\"",
"typecheck": "yarn refresh-assets && tsx scripts/typecheck.ts",
"check-scripts": "tsx scripts/check-scripts.ts",
"api-check": "lazy api-check",
@ -65,11 +65,10 @@
"packageManager": "yarn@4.0.2",
"lint-staged": {
"*.{js,jsx,ts,tsx,json}": [
"biome format --write --no-errors-on-unmatched"
"prettier --write --cache"
]
},
"devDependencies": {
"@biomejs/biome": "1.5.3",
"@microsoft/api-extractor": "^7.35.4",
"@next/eslint-plugin-next": "^13.3.0",
"@swc/core": "^1.3.55",
@ -96,14 +95,13 @@
"json5": "^2.2.3",
"lazyrepo": "0.0.0-alpha.27",
"lint-staged": ">=10",
"prettier": "^3.0.3",
"prettier-plugin-organize-imports": "^3.2.3",
"rimraf": "^4.4.0",
"tsx": "^4.0.0",
"typescript": "^5.2.2",
"vercel": "^28.16.15"
},
"devDependenciesComments": {
"@biomejs/biome": "biome recommends pinning the particular version, see https://github.com/marketplace/actions/setup-biome"
},
"resolutions": {
"@microsoft/api-extractor@^7.35.4": "patch:@microsoft/api-extractor@npm%3A7.35.4#./.yarn/patches/@microsoft-api-extractor-npm-7.35.4-5f4f0357b4.patch",
"vectra@^0.4.4": "patch:vectra@npm%3A0.4.4#./.yarn/patches/vectra-npm-0.4.4-6aac3f6c29.patch",

Wyświetl plik

@ -5,6 +5,23 @@
/// <reference path="./modules.d.ts" />
import { formatAssetUrl } from './utils.js'
import embedIconsCodepen from './embed-icons/codepen.png'
import embedIconsCodesandbox from './embed-icons/codesandbox.png'
import embedIconsExcalidraw from './embed-icons/excalidraw.png'
import embedIconsFelt from './embed-icons/felt.png'
import embedIconsFigma from './embed-icons/figma.png'
import embedIconsGithubGist from './embed-icons/github_gist.png'
import embedIconsGoogleCalendar from './embed-icons/google_calendar.png'
import embedIconsGoogleMaps from './embed-icons/google_maps.png'
import embedIconsGoogleSlides from './embed-icons/google_slides.png'
import embedIconsObservable from './embed-icons/observable.png'
import embedIconsReplit from './embed-icons/replit.png'
import embedIconsScratch from './embed-icons/scratch.png'
import embedIconsSpotify from './embed-icons/spotify.png'
import embedIconsTldraw from './embed-icons/tldraw.png'
import embedIconsValTown from './embed-icons/val_town.png'
import embedIconsVimeo from './embed-icons/vimeo.png'
import embedIconsYoutube from './embed-icons/youtube.png'
import fontsMonospace from './fonts/IBMPlexMono-Medium.woff2'
import fontsSansSerif from './fonts/IBMPlexSans-Medium.woff2'
import fontsSerif from './fonts/IBMPlexSerif-Medium.woff2'
@ -209,23 +226,6 @@ import translationsUk from './translations/uk.json'
import translationsVi from './translations/vi.json'
import translationsZhCn from './translations/zh-cn.json'
import translationsZhTw from './translations/zh-tw.json'
import embedIconsCodepen from './embed-icons/codepen.png'
import embedIconsCodesandbox from './embed-icons/codesandbox.png'
import embedIconsExcalidraw from './embed-icons/excalidraw.png'
import embedIconsFelt from './embed-icons/felt.png'
import embedIconsFigma from './embed-icons/figma.png'
import embedIconsGithubGist from './embed-icons/github_gist.png'
import embedIconsGoogleCalendar from './embed-icons/google_calendar.png'
import embedIconsGoogleMaps from './embed-icons/google_maps.png'
import embedIconsGoogleSlides from './embed-icons/google_slides.png'
import embedIconsObservable from './embed-icons/observable.png'
import embedIconsReplit from './embed-icons/replit.png'
import embedIconsScratch from './embed-icons/scratch.png'
import embedIconsSpotify from './embed-icons/spotify.png'
import embedIconsTldraw from './embed-icons/tldraw.png'
import embedIconsValTown from './embed-icons/val_town.png'
import embedIconsVimeo from './embed-icons/vimeo.png'
import embedIconsYoutube from './embed-icons/youtube.png'
/**
* @param {AssetUrlOptions} [opts]

Wyświetl plik

@ -5,6 +5,23 @@
/// <reference path="./modules.d.ts" />
import { formatAssetUrl } from './utils.js'
import embedIconsCodepen from './embed-icons/codepen.png?url'
import embedIconsCodesandbox from './embed-icons/codesandbox.png?url'
import embedIconsExcalidraw from './embed-icons/excalidraw.png?url'
import embedIconsFelt from './embed-icons/felt.png?url'
import embedIconsFigma from './embed-icons/figma.png?url'
import embedIconsGithubGist from './embed-icons/github_gist.png?url'
import embedIconsGoogleCalendar from './embed-icons/google_calendar.png?url'
import embedIconsGoogleMaps from './embed-icons/google_maps.png?url'
import embedIconsGoogleSlides from './embed-icons/google_slides.png?url'
import embedIconsObservable from './embed-icons/observable.png?url'
import embedIconsReplit from './embed-icons/replit.png?url'
import embedIconsScratch from './embed-icons/scratch.png?url'
import embedIconsSpotify from './embed-icons/spotify.png?url'
import embedIconsTldraw from './embed-icons/tldraw.png?url'
import embedIconsValTown from './embed-icons/val_town.png?url'
import embedIconsVimeo from './embed-icons/vimeo.png?url'
import embedIconsYoutube from './embed-icons/youtube.png?url'
import fontsMonospace from './fonts/IBMPlexMono-Medium.woff2?url'
import fontsSansSerif from './fonts/IBMPlexSans-Medium.woff2?url'
import fontsSerif from './fonts/IBMPlexSerif-Medium.woff2?url'
@ -209,23 +226,6 @@ import translationsUk from './translations/uk.json?url'
import translationsVi from './translations/vi.json?url'
import translationsZhCn from './translations/zh-cn.json?url'
import translationsZhTw from './translations/zh-tw.json?url'
import embedIconsCodepen from './embed-icons/codepen.png?url'
import embedIconsCodesandbox from './embed-icons/codesandbox.png?url'
import embedIconsExcalidraw from './embed-icons/excalidraw.png?url'
import embedIconsFelt from './embed-icons/felt.png?url'
import embedIconsFigma from './embed-icons/figma.png?url'
import embedIconsGithubGist from './embed-icons/github_gist.png?url'
import embedIconsGoogleCalendar from './embed-icons/google_calendar.png?url'
import embedIconsGoogleMaps from './embed-icons/google_maps.png?url'
import embedIconsGoogleSlides from './embed-icons/google_slides.png?url'
import embedIconsObservable from './embed-icons/observable.png?url'
import embedIconsReplit from './embed-icons/replit.png?url'
import embedIconsScratch from './embed-icons/scratch.png?url'
import embedIconsSpotify from './embed-icons/spotify.png?url'
import embedIconsTldraw from './embed-icons/tldraw.png?url'
import embedIconsValTown from './embed-icons/val_town.png?url'
import embedIconsVimeo from './embed-icons/vimeo.png?url'
import embedIconsYoutube from './embed-icons/youtube.png?url'
/**
* @param {AssetUrlOptions} [opts]

Wyświetl plik

@ -157,8 +157,8 @@ function getStateFromElapsedTime(elapsed: number) {
return elapsed > COLLABORATOR_INACTIVE_TIMEOUT
? 'inactive'
: elapsed > COLLABORATOR_IDLE_TIMEOUT
? 'idle'
: 'active'
? 'idle'
: 'active'
}
function useCollaboratorState(latestPresence: TLInstancePresence | null) {

Wyświetl plik

@ -32,13 +32,13 @@ export function createTLStore({ initialData, defaultName = '', ...rest }: TLStor
const schema =
'schema' in rest && rest.schema
? // we have a schema
rest.schema
rest.schema
: // we need a schema
createTLSchema({
createTLSchema({
shapes: currentPageShapesToShapeMap(
checkShapesAndAddCore('shapeUtils' in rest && rest.shapeUtils ? rest.shapeUtils : [])
),
})
})
return new Store({
schema,

Wyświetl plik

@ -5759,12 +5759,12 @@ export class Editor extends EventEmitter<TLEventMap> {
? {
...translateStartChanges,
[val]: shape[val] + localDelta[val],
}
}
: {
id: shape.id as any,
type: shape.type,
[val]: shape[val] + localDelta[val],
}
}
)
v += pageBounds[shape.id][dim] + shapeGap
@ -7850,16 +7850,16 @@ export class Editor extends EventEmitter<TLEventMap> {
newShape.props.start = mappedId
? { ...newShape.props.start, boundShapeId: mappedId }
: // this shouldn't happen, if you copy an arrow but not it's bound shape it should
// convert the binding to a point at the time of copying
{ type: 'point', x: 0, y: 0 }
// convert the binding to a point at the time of copying
{ type: 'point', x: 0, y: 0 }
}
if (newShape.props.end.type === 'binding') {
const mappedId = idMap.get(newShape.props.end.boundShapeId)
newShape.props.end = mappedId
? { ...newShape.props.end, boundShapeId: mappedId }
: // this shouldn't happen, if you copy an arrow but not it's bound shape it should
// convert the binding to a point at the time of copying
{ type: 'point', x: 0, y: 0 }
// convert the binding to a point at the time of copying
{ type: 'point', x: 0, y: 0 }
}
}

Wyświetl plik

@ -499,8 +499,8 @@ export class BoundsSnaps {
? 'x'
: 'y'
: nearestSnapsX.length
? 'x'
: 'y'
? 'x'
: 'y'
const ratio = initialSelectionPageBounds.aspectRatio
@ -1049,7 +1049,7 @@ export class BoundsSnaps {
'forward',
gapBreadthIntersection
),
]
]
: [
...findAdjacentGaps(
horizontal,
@ -1065,7 +1065,7 @@ export class BoundsSnaps {
) as [Vec, Vec],
endEdge: selectionSides.left,
},
],
],
})
break
@ -1153,7 +1153,7 @@ export class BoundsSnaps {
'forward',
gapBreadthIntersection
),
]
]
: [
...findAdjacentGaps(
vertical,
@ -1169,7 +1169,7 @@ export class BoundsSnaps {
) as [Vec, Vec],
endEdge: selectionSides.top,
},
],
],
})
}
break

Wyświetl plik

@ -23,10 +23,10 @@ export const EASINGS = {
t <= 0
? 0
: t >= 1
? 1
: t < 0.5
? Math.pow(2, 20 * t - 10) / 2
: (2 - Math.pow(2, -20 * t + 10)) / 2,
? 1
: t < 0.5
? Math.pow(2, 20 * t - 10) / 2
: (2 - Math.pow(2, -20 * t + 10)) / 2,
} as const
/** @public */

Wyświetl plik

@ -14,7 +14,7 @@ export function getIncrementedName(name: string, others: string[]) {
result = /^.*(\d+)$/.exec(result)?.[1]
? result.replace(/(\d+)(?=\D?)$/, (m) => {
return (+m + 1).toString()
})
})
: `${result} 1`
}

Wyświetl plik

@ -1,8 +1,5 @@
[
[
"functions",
["atom-1", "computed-1", "react", "reactor-1", "transact", "transaction"]
],
["functions", ["atom-1", "computed-1", "react", "reactor-1", "transact", "transaction"]],
["classes"],
["interfaces", ["Signal"]]
]

Wyświetl plik

@ -121,13 +121,13 @@ export class StoreSchema<R extends UnknownRecord, P = unknown> {
migrations: ourType.migrations,
fromVersion: persistedVersion,
toVersion: ourVersion,
})
})
: migrateRecord<R>({
record,
migrations: ourType.migrations,
fromVersion: ourVersion,
toVersion: persistedVersion,
})
})
if (result.type === 'error') {
return result
}
@ -174,13 +174,13 @@ export class StoreSchema<R extends UnknownRecord, P = unknown> {
migrations: ourSubTypeMigrations,
fromVersion: persistedSubTypeVersion,
toVersion: ourSubTypeMigrations.currentVersion,
})
})
: migrateRecord<R>({
record,
migrations: ourSubTypeMigrations,
fromVersion: ourSubTypeMigrations.currentVersion,
toVersion: persistedSubTypeVersion,
})
})
if (result.type === 'error') {
return result
@ -258,12 +258,12 @@ export class StoreSchema<R extends UnknownRecord, P = unknown> {
k,
v.currentVersion,
])
)
)
: undefined,
}
}
: {
version: type.migrations.currentVersion,
},
},
])
),
}
@ -286,12 +286,12 @@ export class StoreSchema<R extends UnknownRecord, P = unknown> {
k,
v.firstVersion,
])
)
)
: undefined,
}
}
: {
version: type.migrations.firstVersion,
},
},
])
),
}

Wyświetl plik

@ -213,105 +213,105 @@ type Range<From extends number, To extends number> = To extends From
type Decrement<n extends number> = n extends 0
? never
: n extends 1
? 0
: n extends 2
? 1
: n extends 3
? 2
: n extends 4
? 3
: n extends 5
? 4
: n extends 6
? 5
: n extends 7
? 6
: n extends 8
? 7
: n extends 9
? 8
: n extends 10
? 9
: n extends 11
? 10
: n extends 12
? 11
: n extends 13
? 12
: n extends 14
? 13
: n extends 15
? 14
: n extends 16
? 15
: n extends 17
? 16
: n extends 18
? 17
: n extends 19
? 18
: n extends 20
? 19
: n extends 21
? 20
: n extends 22
? 21
: n extends 23
? 22
: n extends 24
? 23
: n extends 25
? 24
: n extends 26
? 25
: n extends 27
? 26
: n extends 28
? 27
: n extends 29
? 28
: n extends 30
? 29
: n extends 31
? 30
: n extends 32
? 31
: n extends 33
? 32
: n extends 34
? 33
: n extends 35
? 34
: n extends 36
? 35
: n extends 37
? 36
: n extends 38
? 37
: n extends 39
? 38
: n extends 40
? 39
: n extends 41
? 40
: n extends 42
? 41
: n extends 43
? 42
: n extends 44
? 43
: n extends 45
? 44
: n extends 46
? 45
: n extends 47
? 46
: n extends 48
? 47
: n extends 49
? 48
: n extends 50
? 49
: n extends 51
? 50
: never
? 0
: n extends 2
? 1
: n extends 3
? 2
: n extends 4
? 3
: n extends 5
? 4
: n extends 6
? 5
: n extends 7
? 6
: n extends 8
? 7
: n extends 9
? 8
: n extends 10
? 9
: n extends 11
? 10
: n extends 12
? 11
: n extends 13
? 12
: n extends 14
? 13
: n extends 15
? 14
: n extends 16
? 15
: n extends 17
? 16
: n extends 18
? 17
: n extends 19
? 18
: n extends 20
? 19
: n extends 21
? 20
: n extends 22
? 21
: n extends 23
? 22
: n extends 24
? 23
: n extends 25
? 24
: n extends 26
? 25
: n extends 27
? 26
: n extends 28
? 27
: n extends 29
? 28
: n extends 30
? 29
: n extends 31
? 30
: n extends 32
? 31
: n extends 33
? 32
: n extends 34
? 33
: n extends 35
? 34
: n extends 36
? 35
: n extends 37
? 36
: n extends 38
? 37
: n extends 39
? 38
: n extends 40
? 39
: n extends 41
? 40
: n extends 42
? 41
: n extends 43
? 42
: n extends 44
? 43
: n extends 45
? 44
: n extends 46
? 45
: n extends 47
? 46
: n extends 48
? 47
: n extends 49
? 48
: n extends 50
? 49
: n extends 51
? 50
: never

Wyświetl plik

@ -140,7 +140,7 @@ export const TldrawSelectionForeground: TLSelectionForegroundComponent = track(
shouldDisplayControls &&
(onlyShape
? editor.getShapeUtil(onlyShape).canResize(onlyShape) &&
!editor.getShapeUtil(onlyShape).hideResizeHandles(onlyShape)
!editor.getShapeUtil(onlyShape).hideResizeHandles(onlyShape)
: true) &&
!showCropHandles &&
!isLockedShape

Wyświetl plik

@ -104,7 +104,7 @@ export class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
? new Edge2d({
start: Vec.From(info.start.point),
end: Vec.From(info.end.point),
})
})
: new Arc2d({
center: Vec.Cast(info.handleArc.center),
radius: info.handleArc.radius,
@ -112,7 +112,7 @@ export class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
end: Vec.Cast(info.end.point),
sweepFlag: info.bodyArc.sweepFlag,
largeArcFlag: info.bodyArc.largeArcFlag,
})
})
let labelGeom
if (shape.props.text.trim()) {
@ -583,8 +583,8 @@ export class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
? shape.props.start.isExact
? ''
: shape.props.start.isPrecise
? 'url(#arrowhead-cross)'
: 'url(#arrowhead-dot)'
? 'url(#arrowhead-cross)'
: 'url(#arrowhead-dot)'
: ''
}
markerEnd={
@ -592,8 +592,8 @@ export class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
? shape.props.end.isExact
? ''
: shape.props.end.isPrecise
? 'url(#arrowhead-cross)'
: 'url(#arrowhead-dot)'
? 'url(#arrowhead-cross)'
: 'url(#arrowhead-dot)'
: ''
}
opacity={0.16}

Wyświetl plik

@ -39,7 +39,7 @@ export function getArrowLabelSize(editor: Editor, shape: TLArrowShape) {
? new Edge2d({
start: Vec.From(info.start.point),
end: Vec.From(info.end.point),
})
})
: new Arc2d({
center: Vec.Cast(info.handleArc.center),
radius: info.handleArc.radius,
@ -47,7 +47,7 @@ export function getArrowLabelSize(editor: Editor, shape: TLArrowShape) {
end: Vec.Cast(info.end.point),
sweepFlag: info.bodyArc.sweepFlag,
largeArcFlag: info.bodyArc.largeArcFlag,
})
})
if (shape.props.text.trim()) {
const bodyBounds = bodyGeom.bounds

Wyświetl plik

@ -29,8 +29,8 @@ function getArrowPoints(
? ints[0]
: ints[1]
: info.handleArc.sweepFlag
? ints[1]
: ints[0]
? ints[1]
: ints[0]
}
if (Vec.IsNaN(P0)) {

Wyświetl plik

@ -72,10 +72,10 @@ export function getFreehandOptions(
...(forceSolid
? solidSettings(strokeWidth)
: shapeProps.dash === 'draw'
? shapeProps.isPen
? shapeProps.isPen
? realPressureSettings(strokeWidth)
: simulatePressureSettings(strokeWidth)
: solidSettings(strokeWidth)),
: solidSettings(strokeWidth)),
last: shapeProps.isComplete || forceComplete,
}
}

Wyświetl plik

@ -322,14 +322,14 @@ export class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
shape.props.align === 'start'
? 0
: shape.props.align === 'end'
? w - labelWidth
: (w - labelWidth) / 2,
? w - labelWidth
: (w - labelWidth) / 2,
y:
shape.props.verticalAlign === 'start'
? 0
: shape.props.verticalAlign === 'end'
? h - labelHeight
: (h - labelHeight) / 2,
? h - labelHeight
: (h - labelHeight) / 2,
width: labelWidth,
height: labelHeight,
isFilled: true,

Wyświetl plik

@ -59,7 +59,7 @@ export function getPillPoints(width: number, height: number, numPoints: number)
center: new Vec(radius, radius),
startAngle: PI / 2,
},
]
]
: [
{
type: 'straight',
@ -81,7 +81,7 @@ export function getPillPoints(width: number, height: number, numPoints: number)
center: new Vec(radius, radius),
startAngle: PI,
},
]
]
let sectionOffset = 0

Wyświetl plik

@ -39,10 +39,10 @@ export const DashStyleCloud = React.memo(function DashStylePolygon({
{arcs.map(({ leftPoint, rightPoint, center, radius }, i) => {
const arcLength = center
? radius *
canonicalizeRotation(
canonicalizeRotation(
canonicalizeRotation(Vec.Angle(center, rightPoint)) -
canonicalizeRotation(Vec.Angle(center, leftPoint))
)
)
: Vec.Dist(leftPoint, rightPoint)
const { strokeDasharray, strokeDashoffset } = getPerfectDashProps(
@ -99,10 +99,10 @@ export function DashStyleCloudSvg({
for (const { leftPoint, rightPoint, center, radius } of arcs) {
const arcLength = center
? radius *
canonicalizeRotation(
canonicalizeRotation(
canonicalizeRotation(Vec.Angle(center, rightPoint)) -
canonicalizeRotation(Vec.Angle(center, leftPoint))
)
)
: Vec.Dist(leftPoint, rightPoint)
const { strokeDasharray, strokeDashoffset } = getPerfectDashProps(arcLength, strokeWidth, {

Wyświetl plik

@ -94,8 +94,8 @@ export class Pointing extends StateNode {
shape.props.geo === 'star'
? new Box(0, 0, 200, 190)
: shape.props.geo === 'cloud'
? new Box(0, 0, 300, 180)
: new Box(0, 0, 200, 200)
? new Box(0, 0, 300, 180)
: new Box(0, 0, 200, 200)
const delta = bounds.center
const parentTransform = this.editor.getShapeParentTransform(shape)

Wyświetl plik

@ -82,7 +82,7 @@ export const TextLabel = React.memo(function TextLabel<
width: bounds.width,
height: bounds.height,
position: 'absolute',
}
}
: {}),
}}
>

Wyświetl plik

@ -59,8 +59,8 @@ export function createTextSvgElementFromSpans(
(opts.verticalTextAlign === 'start'
? padding
: opts.verticalTextAlign === 'end'
? opts.height - padding - bounds.height
: (Math.ceil(opts.height) - bounds.height) / 2)
? opts.height - padding - bounds.height
: (Math.ceil(opts.height) - bounds.height) / 2)
// Create text span elements for each word
let currentLineTop = null

Wyświetl plik

@ -207,15 +207,15 @@ export function getStrokeOutlinePoints(
start.taper === false
? 0
: start.taper === true
? Math.max(size, totalLength)
: (start.taper as number)
? Math.max(size, totalLength)
: (start.taper as number)
const taperEnd =
end.taper === false
? 0
: end.taper === true
? Math.max(size, totalLength)
: (end.taper as number)
? Math.max(size, totalLength)
: (end.taper as number)
// The minimum allowed distance between points (squared)
// Our collected left and right points

Wyświetl plik

@ -89,15 +89,15 @@ export function setStrokePointRadii(strokePoints: StrokePoint[], options: Stroke
start.taper === false
? 0
: start.taper === true
? Math.max(size, totalLength)
: (start.taper as number)
? Math.max(size, totalLength)
: (start.taper as number)
const taperEnd =
end.taper === false
? 0
: end.taper === true
? Math.max(size, totalLength)
: (end.taper as number)
? Math.max(size, totalLength)
: (end.taper as number)
if (taperStart || taperEnd) {
for (let i = 0; i < strokePoints.length; i++) {

Wyświetl plik

@ -378,7 +378,7 @@ function getTextSize(editor: Editor, props: TLTextShape['props']) {
const cw = autoSize
? null
: // `measureText` floors the number so we need to do the same here to avoid issues.
Math.floor(Math.max(minWidth, w))
Math.floor(Math.max(minWidth, w))
const result = editor.textMeasure.measureText(text, {
...TEXT_PROPS,

Wyświetl plik

@ -195,10 +195,10 @@ export class Idle extends StateNode {
hoveredShape && !this.editor.isShapeOfType<TLGroupShape>(hoveredShape, 'group')
? hoveredShape
: this.editor.getSelectedShapeAtPoint(this.editor.inputs.currentPagePoint) ??
this.editor.getShapeAtPoint(this.editor.inputs.currentPagePoint, {
this.editor.getShapeAtPoint(this.editor.inputs.currentPagePoint, {
margin: HIT_TEST_MARGIN / this.editor.getZoomLevel(),
hitInside: false,
})
})
const focusedGroupId = this.editor.getFocusedGroupId()
@ -354,7 +354,7 @@ export class Idle extends StateNode {
hitLabels: true,
hitFrameInside: false,
renderingOnly: true,
})
})
if (hitShape) {
this.onRightClick({
@ -585,8 +585,8 @@ export class Idle extends StateNode {
? gridSize * GRID_INCREMENT
: gridSize
: shiftKey
? MAJOR_NUDGE_FACTOR
: MINOR_NUDGE_FACTOR
? MAJOR_NUDGE_FACTOR
: MINOR_NUDGE_FACTOR
this.editor.nudgeShapes(this.editor.getSelectedShapeIds(), delta.mul(step))
}

Wyświetl plik

@ -39,7 +39,7 @@ export class PointingSelection extends StateNode {
hitInside: true,
margin: 0,
renderingOnly: true,
})
})
if (hitShape) {
// todo: extract the double click shape logic from idle so that we can share it here

Wyświetl plik

@ -35,8 +35,8 @@ export const ActionsMenu = memo(function ActionsMenu() {
? `${msg(label)} ${kbdStr(kbd)}`
: `${msg(label)}`
: kbd
? `${kbdStr(kbd)}`
: ''
? `${kbdStr(kbd)}`
: ''
}
onClick={() => onSelect('actions-menu')}
disabled={item.disabled}

Wyświetl plik

@ -93,14 +93,14 @@ const CurrentState = track(function CurrentState() {
shape && path.includes('select.')
? ` / ${shape.type || ''}${
'geo' in shape.props ? ' / ' + shape.props.geo : ''
} / [${Vec.ToFixed(editor.getPointInShapeSpace(shape, editor.inputs.currentPagePoint), 0)}]`
} / [${Vec.ToFixed(editor.getPointInShapeSpace(shape, editor.inputs.currentPagePoint), 0)}]`
: ''
const ruler =
path.startsWith('select.') && !path.includes('.idle')
? ` / [${Vec.ToFixed(editor.inputs.originPagePoint, 0)}] → [${Vec.ToFixed(
editor.inputs.currentPagePoint,
0
)}] = ${Vec.Dist(editor.inputs.originPagePoint, editor.inputs.currentPagePoint).toFixed(0)}`
)}] = ${Vec.Dist(editor.inputs.originPagePoint, editor.inputs.currentPagePoint).toFixed(0)}`
: ''
return <div className="tlui-debug-panel__current-state">{`${path}${shapeInfo}${ruler}`}</div>

Wyświetl plik

@ -65,8 +65,8 @@ function MenuContent() {
depth <= 1
? 'medium'
: breakpoint < 3 || (parent?.type === 'submenu' && depth > 2)
? 'tiny'
: 'medium'
? 'tiny'
: 'medium'
}
key={item.id}
>

Wyświetl plik

@ -129,7 +129,7 @@ function CommonStylePickerSet({
minBy(tldrawSupportedOpacities, (supportedOpacity) =>
Math.abs(supportedOpacity - opacity.value)
)!
)
)
return (
<>

Wyświetl plik

@ -244,12 +244,12 @@ export async function pasteExcalidrawContent(editor: Editor, clipboard: any, poi
normalizedAnchor: { x: 0.5, y: 0.5 },
isPrecise: false,
isExact: false,
}
}
: {
type: 'point',
x: start[0],
y: start[1],
},
},
end: endTargetId
? {
type: 'binding',
@ -257,12 +257,12 @@ export async function pasteExcalidrawContent(editor: Editor, clipboard: any, poi
normalizedAnchor: { x: 0.5, y: 0.5 },
isPrecise: false,
isExact: false,
}
}
: {
type: 'point',
x: end[0],
y: end[1],
},
},
arrowheadEnd: arrowheadsToArrowheadTypes[element.endArrowhead] ?? 'none',
arrowheadStart: arrowheadsToArrowheadTypes[element.startArrowhead] ?? 'none',
},

Wyświetl plik

@ -420,11 +420,11 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) {
? {
x: commonBounds.width + 10,
y: 0,
}
}
: {
x: 16 / editor.getZoomLevel(),
y: 16 / editor.getZoomLevel(),
}
}
}
editor.mark('duplicate shapes')

Wyświetl plik

@ -80,8 +80,8 @@ export const ActionsMenuSchemaProvider = ({
allowGroup
? menuItem(actions['group'], { disabled: !twoSelected })
: allowUngroup
? menuItem(actions['ungroup'])
: menuItem(actions['group'], { disabled: !twoSelected }),
? menuItem(actions['ungroup'])
: menuItem(actions['group'], { disabled: !twoSelected }),
]
if (overrides) {

Wyświetl plik

@ -50,12 +50,10 @@ type DefaultHelpers = ReturnType<typeof useDefaultHelpers>
export type TLUiOverride<Type, Helpers> = (editor: Editor, schema: Type, helpers: Helpers) => Type
type WithDefaultHelpers<T extends TLUiOverride<any, any>> = T extends TLUiOverride<
infer Type,
infer Helpers
>
? TLUiOverride<Type, Helpers extends undefined ? DefaultHelpers : Helpers & DefaultHelpers>
: never
type WithDefaultHelpers<T extends TLUiOverride<any, any>> =
T extends TLUiOverride<infer Type, infer Helpers>
? TLUiOverride<Type, Helpers extends undefined ? DefaultHelpers : Helpers & DefaultHelpers>
: never
/** @public */
export type TLUiOverrides = Partial<{

Wyświetl plik

@ -222,7 +222,7 @@ export class TestEditor extends Editor {
? ({
target: 'shape',
shape: this.getShape(info as any),
} as T)
} as T)
: info
}
@ -267,18 +267,18 @@ export class TestEditor extends Editor {
key === 'Shift'
? 'ShiftLeft'
: key === 'Alt'
? 'AltLeft'
: key === 'Control' || key === 'Meta'
? 'CtrlLeft'
: key === ' '
? 'Space'
: key === 'Enter' ||
? 'AltLeft'
: key === 'Control' || key === 'Meta'
? 'CtrlLeft'
: key === ' '
? 'Space'
: key === 'Enter' ||
key === 'ArrowRight' ||
key === 'ArrowLeft' ||
key === 'ArrowUp' ||
key === 'ArrowDown'
? key
: 'Key' + key[0].toUpperCase() + key.slice(1),
? key
: 'Key' + key[0].toUpperCase() + key.slice(1),
type: 'keyboard',
key,
}

Wyświetl plik

@ -34,6 +34,7 @@
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit",
"index": "node ./scripts/build-index.js && yarn format",
"format": "yarn run -T prettier --write --cache \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
"build": "yarn run -T tsx ../../scripts/build-package.ts",
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",
"prepack": "yarn run -T tsx ../../scripts/prepack.ts",

Wyświetl plik

@ -61,7 +61,7 @@ export type TLAssetPartial<T extends TLAsset = TLAsset> = T extends T
type: T['type']
props?: Partial<T['props']>
meta?: Partial<T['meta']>
} & Partial<Omit<T, 'type' | 'id' | 'props' | 'meta'>>
} & Partial<Omit<T, 'type' | 'id' | 'props' | 'meta'>>
: never
/** @public */

Wyświetl plik

@ -364,12 +364,12 @@ export const instanceMigrations = defineMigrations({
opacity < 0.175
? '0.1'
: opacity < 0.375
? '0.25'
: opacity < 0.625
? '0.5'
: opacity < 0.875
? '0.75'
: '1',
? '0.25'
: opacity < 0.625
? '0.5'
: opacity < 0.875
? '0.75'
: '1',
},
}
},

Wyświetl plik

@ -60,7 +60,7 @@ export type TLShapePartial<T extends TLShape = TLShape> = T extends T
type: T['type']
props?: Partial<T['props']>
meta?: Partial<T['meta']>
} & Partial<Omit<T, 'type' | 'id' | 'props' | 'meta'>>
} & Partial<Omit<T, 'type' | 'id' | 'props' | 'meta'>>
: never
/** @public */
@ -124,12 +124,12 @@ export const rootShapeMigrations = defineMigrations({
opacity < 0.175
? '0.1'
: opacity < 0.375
? '0.25'
: opacity < 0.625
? '0.5'
: opacity < 0.875
? '0.75'
: '1',
? '0.25'
: opacity < 0.625
? '0.5'
: opacity < 0.875
? '0.75'
: '1',
},
}
},

Wyświetl plik

@ -121,14 +121,14 @@ export const arrowShapeMigrations = defineMigrations({
isPrecise: !(
start.normalizedAnchor.x === 0.5 && start.normalizedAnchor.y === 0.5
),
}
}
: start,
end:
(end as TLArrowShapeTerminal).type === 'binding'
? {
...end,
isPrecise: !(end.normalizedAnchor.x === 0.5 && end.normalizedAnchor.y === 0.5),
}
}
: end,
},
}

Wyświetl plik

@ -58,11 +58,9 @@ export function deepCopy<T = unknown>(obj: T): T {
*
* @internal
*/
export function objectMapKeys<Key extends string>(
object: {
readonly [K in Key]: unknown
}
): Array<Key> {
export function objectMapKeys<Key extends string>(object: {
readonly [K in Key]: unknown
}): Array<Key> {
return Object.keys(object) as Key[]
}
@ -72,11 +70,9 @@ export function objectMapKeys<Key extends string>(
*
* @internal
*/
export function objectMapValues<Key extends string, Value>(
object: {
[K in Key]: Value
}
): Array<Value> {
export function objectMapValues<Key extends string, Value>(object: {
[K in Key]: Value
}): Array<Value> {
return Object.values(object) as Value[]
}
@ -86,11 +82,9 @@ export function objectMapValues<Key extends string, Value>(
*
* @internal
*/
export function objectMapEntries<Key extends string, Value>(
object: {
[K in Key]: Value
}
): Array<[Key, Value]> {
export function objectMapEntries<Key extends string, Value>(object: {
[K in Key]: Value
}): Array<[Key, Value]> {
return Object.entries(object) as [Key, Value][]
}

Wyświetl plik

@ -242,11 +242,9 @@ export class ObjectValidator<Shape extends object> extends Validator<Shape> {
* })
* ```
*/
extend<Extension extends Record<string, unknown>>(
extension: {
readonly [K in keyof Extension]: Validatable<Extension[K]>
}
): ObjectValidator<Shape & Extension> {
extend<Extension extends Record<string, unknown>>(extension: {
readonly [K in keyof Extension]: Validatable<Extension[K]>
}): ObjectValidator<Shape & Extension> {
return new ObjectValidator({ ...this.config, ...extension }) as ObjectValidator<
Shape & Extension
>
@ -472,11 +470,9 @@ export const unknownObject = new Validator<Record<string, unknown>>((value) => {
*
* @public
*/
export function object<Shape extends object>(
config: {
readonly [K in keyof Shape]: Validatable<Shape[K]>
}
): ObjectValidator<Shape> {
export function object<Shape extends object>(config: {
readonly [K in keyof Shape]: Validatable<Shape[K]>
}): ObjectValidator<Shape> {
return new ObjectValidator(config)
}

Wyświetl plik

@ -4,6 +4,7 @@ import { exec } from './lib/exec'
import { REPO_ROOT, readFileIfExists } from './lib/file'
const ESLINT_EXTENSIONS = ['js', 'jsx', 'ts', 'tsx']
const PRETTIER_EXTENSIONS = ['js', 'jsx', 'ts', 'tsx', 'json']
async function main() {
const shouldFix = process.argv.includes('--fix')
@ -26,10 +27,19 @@ async function main() {
files.push(file)
}
let prettierFiles = PRETTIER_EXTENSIONS.flatMap((ext) => filesByExtension.get(ext) ?? [])
let eslintFiles = ESLINT_EXTENSIONS.flatMap((ext) => filesByExtension.get(ext) ?? [])
const relativeCwd = path.relative(REPO_ROOT, process.cwd())
const prettierIgnoreFile = await readFileIfExists(path.join(REPO_ROOT, '.prettierignore'))
if (prettierIgnoreFile) {
prettierFiles = prettierFiles
.map((f) => path.join(relativeCwd, f))
.filter(ignore().add(prettierIgnoreFile).createFilter())
.map((f) => path.relative(relativeCwd, f))
}
const eslintIgnoreFile = await readFileIfExists(path.join(REPO_ROOT, '.eslintignore'))
if (eslintIgnoreFile) {
eslintFiles = eslintFiles
@ -39,6 +49,14 @@ async function main() {
}
try {
await exec('yarn', [
'run',
'-T',
'prettier',
shouldFix ? '--write' : '--check',
'--cache',
...prettierFiles,
])
await exec('yarn', [
'run',
'-T',

Wyświetl plik

@ -10,7 +10,7 @@ async function main() {
const nextVersion = latestVersion.prerelease.length
? // if the package is in prerelease mode, we want to release a canary for the current version rather than bumping
latestVersion
latestVersion
: latestVersion?.inc(bump)
const versionString = `${nextVersion.major}.${nextVersion.minor}.${nextVersion.patch}-canary.${sha}`

Wyświetl plik

@ -46,7 +46,7 @@ async function main() {
const nextVersion = prereleaseTag
? `${latestVersion.major}.${latestVersion.minor}.${latestVersion.patch}-${prereleaseTag}.${
Number(prereleaseNumber) + 1
}`
}`
: latestVersion.inc(bump).format()
setAllVersions(nextVersion)

252
yarn.lock
Wyświetl plik

@ -2338,97 +2338,6 @@ __metadata:
languageName: node
linkType: hard
"@biomejs/biome@npm:1.5.3":
version: 1.5.3
resolution: "@biomejs/biome@npm:1.5.3"
dependencies:
"@biomejs/cli-darwin-arm64": "npm:1.5.3"
"@biomejs/cli-darwin-x64": "npm:1.5.3"
"@biomejs/cli-linux-arm64": "npm:1.5.3"
"@biomejs/cli-linux-arm64-musl": "npm:1.5.3"
"@biomejs/cli-linux-x64": "npm:1.5.3"
"@biomejs/cli-linux-x64-musl": "npm:1.5.3"
"@biomejs/cli-win32-arm64": "npm:1.5.3"
"@biomejs/cli-win32-x64": "npm:1.5.3"
dependenciesMeta:
"@biomejs/cli-darwin-arm64":
optional: true
"@biomejs/cli-darwin-x64":
optional: true
"@biomejs/cli-linux-arm64":
optional: true
"@biomejs/cli-linux-arm64-musl":
optional: true
"@biomejs/cli-linux-x64":
optional: true
"@biomejs/cli-linux-x64-musl":
optional: true
"@biomejs/cli-win32-arm64":
optional: true
"@biomejs/cli-win32-x64":
optional: true
bin:
biome: bin/biome
checksum: 1bcdcc3a34de0871d91ecf37eae67f71847f3578723001f81616b1fd1d694d584accce37cf582f07aef3b920b47c32716e7244b7f67f52926c7c8526bc7cd5d9
languageName: node
linkType: hard
"@biomejs/cli-darwin-arm64@npm:1.5.3":
version: 1.5.3
resolution: "@biomejs/cli-darwin-arm64@npm:1.5.3"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@biomejs/cli-darwin-x64@npm:1.5.3":
version: 1.5.3
resolution: "@biomejs/cli-darwin-x64@npm:1.5.3"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@biomejs/cli-linux-arm64-musl@npm:1.5.3":
version: 1.5.3
resolution: "@biomejs/cli-linux-arm64-musl@npm:1.5.3"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@biomejs/cli-linux-arm64@npm:1.5.3":
version: 1.5.3
resolution: "@biomejs/cli-linux-arm64@npm:1.5.3"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@biomejs/cli-linux-x64-musl@npm:1.5.3":
version: 1.5.3
resolution: "@biomejs/cli-linux-x64-musl@npm:1.5.3"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@biomejs/cli-linux-x64@npm:1.5.3":
version: 1.5.3
resolution: "@biomejs/cli-linux-x64@npm:1.5.3"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@biomejs/cli-win32-arm64@npm:1.5.3":
version: 1.5.3
resolution: "@biomejs/cli-win32-arm64@npm:1.5.3"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@biomejs/cli-win32-x64@npm:1.5.3":
version: 1.5.3
resolution: "@biomejs/cli-win32-x64@npm:1.5.3"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@cloudflare/kv-asset-handler@npm:^0.2.0":
version: 0.2.0
resolution: "@cloudflare/kv-asset-handler@npm:0.2.0"
@ -7368,7 +7277,10 @@ __metadata:
next-themes: "npm:^0.2.1"
octokit: "npm:^3.1.1"
openai: "npm:^4.11.1"
patch-package: "npm:^8.0.0"
postinstall-postinstall: "npm:^2.1.0"
prettier: "npm:^3.0.3"
prettier-plugin-organize-imports: "npm:^3.2.3"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
react-hotkeys-hook: "npm:^4.4.1"
@ -7458,7 +7370,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@tldraw/monorepo@workspace:."
dependencies:
"@biomejs/biome": "npm:1.5.3"
"@microsoft/api-extractor": "npm:^7.35.4"
"@next/eslint-plugin-next": "npm:^13.3.0"
"@sentry/cli": "npm:^2.25.0"
@ -7488,6 +7399,8 @@ __metadata:
json5: "npm:^2.2.3"
lazyrepo: "npm:0.0.0-alpha.27"
lint-staged: "npm:>=10"
prettier: "npm:^3.0.3"
prettier-plugin-organize-imports: "npm:^3.2.3"
purgecss: "npm:^5.0.0"
rimraf: "npm:^4.4.0"
svgo: "npm:^3.0.2"
@ -9123,6 +9036,13 @@ __metadata:
languageName: node
linkType: hard
"@yarnpkg/lockfile@npm:^1.1.0":
version: 1.1.0
resolution: "@yarnpkg/lockfile@npm:1.1.0"
checksum: cd19e1114aaf10a05126aeea8833ef4ca8af8a46e88e12884f8359d19333fd19711036dbc2698dbe937f81f037070cf9a8da45c2e8c6ca19cafd7d15659094ed
languageName: node
linkType: hard
"@yarnpkg/types@npm:^4.0.0":
version: 4.0.0
resolution: "@yarnpkg/types@npm:4.0.0"
@ -9810,6 +9730,13 @@ __metadata:
languageName: node
linkType: hard
"at-least-node@npm:^1.0.0":
version: 1.0.0
resolution: "at-least-node@npm:1.0.0"
checksum: 463e2f8e43384f1afb54bc68485c436d7622acec08b6fad269b421cb1d29cebb5af751426793d0961ed243146fe4dc983402f6d5a51b720b277818dbf6f2e49e
languageName: node
linkType: hard
"author-regex@npm:^1.0.0":
version: 1.0.0
resolution: "author-regex@npm:1.0.0"
@ -10756,7 +10683,7 @@ __metadata:
languageName: node
linkType: hard
"ci-info@npm:^3.1.0, ci-info@npm:^3.2.0, ci-info@npm:^3.8.0":
"ci-info@npm:^3.1.0, ci-info@npm:^3.2.0, ci-info@npm:^3.7.0, ci-info@npm:^3.8.0":
version: 3.9.0
resolution: "ci-info@npm:3.9.0"
checksum: 75bc67902b4d1c7b435497adeb91598f6d52a3389398e44294f6601b20cfef32cf2176f7be0eb961d9e085bb333a8a5cae121cb22f81cf238ae7f58eb80e9397
@ -14060,6 +13987,15 @@ __metadata:
languageName: node
linkType: hard
"find-yarn-workspace-root@npm:^2.0.0":
version: 2.0.0
resolution: "find-yarn-workspace-root@npm:2.0.0"
dependencies:
micromatch: "npm:^4.0.2"
checksum: 7fa7942849eef4d5385ee96a0a9a5a9afe885836fd72ed6a4280312a38690afea275e7d09b343fe97daf0412d833f8ac4b78c17fc756386d9ebebf0759d707a7
languageName: node
linkType: hard
"flat-cache@npm:^3.0.4":
version: 3.2.0
resolution: "flat-cache@npm:3.2.0"
@ -14268,6 +14204,18 @@ __metadata:
languageName: node
linkType: hard
"fs-extra@npm:^9.0.0":
version: 9.1.0
resolution: "fs-extra@npm:9.1.0"
dependencies:
at-least-node: "npm:^1.0.0"
graceful-fs: "npm:^4.2.0"
jsonfile: "npm:^6.0.1"
universalify: "npm:^2.0.0"
checksum: 08600da1b49552ed23dfac598c8fc909c66776dd130fea54fbcad22e330f7fcc13488bb995f6bc9ce5651aa35b65702faf616fe76370ee56f1aade55da982dca
languageName: node
linkType: hard
"fs-extra@npm:~7.0.1":
version: 7.0.1
resolution: "fs-extra@npm:7.0.1"
@ -14817,7 +14765,7 @@ __metadata:
languageName: node
linkType: hard
"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9":
"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9":
version: 4.2.11
resolution: "graceful-fs@npm:4.2.11"
checksum: bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2
@ -15824,6 +15772,15 @@ __metadata:
languageName: node
linkType: hard
"is-docker@npm:^2.0.0":
version: 2.2.1
resolution: "is-docker@npm:2.2.1"
bin:
is-docker: cli.js
checksum: 3fef7ddbf0be25958e8991ad941901bf5922ab2753c46980b60b05c1bf9c9c2402d35e6dc32e4380b980ef5e1970a5d9d5e5aa2e02d77727c3b6b5e918474c56
languageName: node
linkType: hard
"is-extendable@npm:^0.1.0":
version: 0.1.1
resolution: "is-extendable@npm:0.1.1"
@ -16142,6 +16099,15 @@ __metadata:
languageName: node
linkType: hard
"is-wsl@npm:^2.1.1":
version: 2.2.0
resolution: "is-wsl@npm:2.2.0"
dependencies:
is-docker: "npm:^2.0.0"
checksum: 20849846ae414997d290b75e16868e5261e86ff5047f104027026fd61d8b5a9b0b3ade16239f35e1a067b3c7cc02f70183cb661010ed16f4b6c7c93dad1b19d8
languageName: node
linkType: hard
"isarray@npm:0.0.1":
version: 0.0.1
resolution: "isarray@npm:0.0.1"
@ -17093,6 +17059,18 @@ __metadata:
languageName: node
linkType: hard
"json-stable-stringify@npm:^1.0.2":
version: 1.1.0
resolution: "json-stable-stringify@npm:1.1.0"
dependencies:
call-bind: "npm:^1.0.5"
isarray: "npm:^2.0.5"
jsonify: "npm:^0.0.1"
object-keys: "npm:^1.1.1"
checksum: 2889eca4f39574905bde288791d3fcc79fc9952f445a5fefb82af175a7992ec48c64161421c1e142f553a14a5f541de2e173cb22ce61d7fffc36d4bb44720541
languageName: node
linkType: hard
"json-stringify-safe@npm:~5.0.1":
version: 5.0.1
resolution: "json-stringify-safe@npm:5.0.1"
@ -17152,6 +17130,13 @@ __metadata:
languageName: node
linkType: hard
"jsonify@npm:^0.0.1":
version: 0.0.1
resolution: "jsonify@npm:0.0.1"
checksum: 7b86b6f4518582ff1d8b7624ed6c6277affd5246445e864615dbdef843a4057ac58587684faf129ea111eeb80e01c15f0a4d9d03820eb3f3985fa67e81b12398
languageName: node
linkType: hard
"jsonwebtoken@npm:^9.0.0, jsonwebtoken@npm:^9.0.2":
version: 9.0.2
resolution: "jsonwebtoken@npm:9.0.2"
@ -17242,6 +17227,15 @@ __metadata:
languageName: node
linkType: hard
"klaw-sync@npm:^6.0.0":
version: 6.0.0
resolution: "klaw-sync@npm:6.0.0"
dependencies:
graceful-fs: "npm:^4.1.11"
checksum: 0da397f8961313c3ef8f79fb63af9002cde5a8fb2aeb1a37351feff0dd6006129c790400c3f5c3b4e757bedcabb13d21ec0a5eaef5a593d59515d4f2c291e475
languageName: node
linkType: hard
"kleur@npm:^4.0.3, kleur@npm:^4.1.5":
version: 4.1.5
resolution: "kleur@npm:4.1.5"
@ -19819,6 +19813,16 @@ __metadata:
languageName: node
linkType: hard
"open@npm:^7.4.2":
version: 7.4.2
resolution: "open@npm:7.4.2"
dependencies:
is-docker: "npm:^2.0.0"
is-wsl: "npm:^2.1.1"
checksum: 4fc02ed3368dcd5d7247ad3566433ea2695b0713b041ebc0eeb2f0f9e5d4e29fc2068f5cdd500976b3464e77fe8b61662b1b059c73233ccc601fe8b16d6c1cd6
languageName: node
linkType: hard
"openai@npm:^3.2.1":
version: 3.3.0
resolution: "openai@npm:3.3.0"
@ -20202,6 +20206,31 @@ __metadata:
languageName: node
linkType: hard
"patch-package@npm:^8.0.0":
version: 8.0.0
resolution: "patch-package@npm:8.0.0"
dependencies:
"@yarnpkg/lockfile": "npm:^1.1.0"
chalk: "npm:^4.1.2"
ci-info: "npm:^3.7.0"
cross-spawn: "npm:^7.0.3"
find-yarn-workspace-root: "npm:^2.0.0"
fs-extra: "npm:^9.0.0"
json-stable-stringify: "npm:^1.0.2"
klaw-sync: "npm:^6.0.0"
minimist: "npm:^1.2.6"
open: "npm:^7.4.2"
rimraf: "npm:^2.6.3"
semver: "npm:^7.5.3"
slash: "npm:^2.0.0"
tmp: "npm:^0.0.33"
yaml: "npm:^2.2.2"
bin:
patch-package: index.js
checksum: 8714322c35b29266e71c82d58443ce5322400a546a3327f1b8907b8eeb7e366dff33c4fdfbd25e3f0b3a9927189c26e9ac60636ca1e4140d6dbc11cca10f9b5d
languageName: node
linkType: hard
"path-browserify@npm:^1.0.1":
version: 1.0.1
resolution: "path-browserify@npm:1.0.1"
@ -20588,6 +20617,13 @@ __metadata:
languageName: node
linkType: hard
"postinstall-postinstall@npm:^2.1.0":
version: 2.1.0
resolution: "postinstall-postinstall@npm:2.1.0"
checksum: dae45fe6b22f3c1c1590721df1d4d4a7cdf848c48f55c1a37e72ce5df14c2f5103d86d857c8d7572e59b9228478c72c6888c5620c816b262b499ee5148b88553
languageName: node
linkType: hard
"prebuild-install@npm:^7.0.1, prebuild-install@npm:^7.1.1":
version: 7.1.1
resolution: "prebuild-install@npm:7.1.1"
@ -20624,6 +20660,23 @@ __metadata:
languageName: node
linkType: hard
"prettier-plugin-organize-imports@npm:^3.2.3":
version: 3.2.4
resolution: "prettier-plugin-organize-imports@npm:3.2.4"
peerDependencies:
"@volar/vue-language-plugin-pug": ^1.0.4
"@volar/vue-typescript": ^1.0.4
prettier: ">=2.0"
typescript: ">=2.9"
peerDependenciesMeta:
"@volar/vue-language-plugin-pug":
optional: true
"@volar/vue-typescript":
optional: true
checksum: 93c98d365af500aa4c72f5330d82c20a20d0e7661a9692e6f26a76a2f4f88b99e0f85dcb8871e98b6d687d6e19ea5f1dcc937f9e29fd0778e888675ecafed233
languageName: node
linkType: hard
"prettier@npm:2.7.1":
version: 2.7.1
resolution: "prettier@npm:2.7.1"
@ -21907,7 +21960,7 @@ __metadata:
languageName: node
linkType: hard
"rimraf@npm:^2.6.1":
"rimraf@npm:^2.6.1, rimraf@npm:^2.6.3":
version: 2.7.1
resolution: "rimraf@npm:2.7.1"
dependencies:
@ -22452,6 +22505,13 @@ __metadata:
languageName: node
linkType: hard
"slash@npm:^2.0.0":
version: 2.0.0
resolution: "slash@npm:2.0.0"
checksum: 512d4350735375bd11647233cb0e2f93beca6f53441015eea241fe784d8068281c3987fbaa93e7ef1c38df68d9c60013045c92837423c69115297d6169aa85e6
languageName: node
linkType: hard
"slash@npm:^3.0.0":
version: 3.0.0
resolution: "slash@npm:3.0.0"
@ -25667,7 +25727,7 @@ __metadata:
languageName: node
linkType: hard
"yaml@npm:2.3.4, yaml@npm:^2.0.0, yaml@npm:^2.2.1, yaml@npm:^2.3.4":
"yaml@npm:2.3.4, yaml@npm:^2.0.0, yaml@npm:^2.2.1, yaml@npm:^2.2.2, yaml@npm:^2.3.4":
version: 2.3.4
resolution: "yaml@npm:2.3.4"
checksum: f8207ce43065a22268a2806ea6a0fa3974c6fde92b4b2fa0082357e487bc333e85dc518910007e7ac001b532c7c84bd3eccb6c7757e94182b564028b0008f44b