Renaming types, shape utils, tools (#1513)

This PR renames all exported types to include the `TL` prefix. It also
removes the `TL` prefix from things that are not types, including:
- shape utils (e.g. `TLArrowUtil` becomes `ArrowShapeUtil`)
- tools (e.g. `TLArrowTool` becomes `ArrowShapeTool`, `TLSelectTool`
becomes `SelectTool`)

### Change Type

- [x] `major` — Breaking Change

### Release Notes

- Renaming of types, shape utils, tools
This commit is contained in:
Steve Ruiz 2023-06-04 11:38:53 +01:00 committed by GitHub
parent 10bb677035
commit 0f89309604
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
175 changed files with 1804 additions and 1921 deletions

View file

@ -7,18 +7,18 @@ import {
TLStore,
createTLSchema,
} from '@tldraw/tlschema'
import { TLShapeUtilConstructor } from '../app/shapeutils/TLShapeUtil'
import { TLShapeUtilConstructor } from '../app/shapeutils/ShapeUtil'
/** @public */
export type ShapeInfo = {
export type TLShapeInfo = {
util: TLShapeUtilConstructor<any>
migrations?: Migrations
validator?: { validate: (record: any) => any }
}
/** @public */
export type StoreOptions = {
customShapes?: Record<string, ShapeInfo>
export type TLStoreOptions = {
customShapes?: Record<string, TLShapeInfo>
instanceId?: TLInstanceId
initialData?: StoreSnapshot<TLRecord>
defaultName?: string
@ -30,7 +30,7 @@ export type StoreOptions = {
* @param opts - Options for creating the store.
*
* @public */
export function createTLStore(opts = {} as StoreOptions): TLStore {
export function createTLStore(opts = {} as TLStoreOptions): TLStore {
const {
customShapes = {},
instanceId = InstanceRecordType.createId(),