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:
parent
10bb677035
commit
0f89309604
175 changed files with 1804 additions and 1921 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue