From 7307282f1f38a056b1313b3e0d2f196b28bd5586 Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Sat, 3 Jun 2023 09:27:44 +0100 Subject: [PATCH] Rename tlvalidate to validate (#1508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR renames the @tldraw/tlvalidate package to @tldraw/validate. ### Change Type - [x] `major` — Breaking Change ### Release Notes - Rename tlvalidate to validate --- apps/docs/package.json | 2 +- packages/editor/package.json | 2 +- .../src/lib/config/TLUserPreferences.ts | 2 +- packages/editor/tsconfig.json | 2 +- packages/file-format/package.json | 4 +-- packages/file-format/src/lib/file.ts | 2 +- packages/file-format/tsconfig.json | 2 +- packages/tlschema/api-report.md | 2 +- packages/tlschema/package.json | 2 +- .../tlschema/src/assets/TLBookmarkAsset.ts | 2 +- packages/tlschema/src/assets/TLImageAsset.ts | 2 +- packages/tlschema/src/assets/TLVideoAsset.ts | 2 +- .../tlschema/src/assets/asset-validation.ts | 2 +- packages/tlschema/src/createTLSchema.ts | 2 +- packages/tlschema/src/records/TLAsset.ts | 2 +- packages/tlschema/src/records/TLCamera.ts | 2 +- packages/tlschema/src/records/TLDocument.ts | 2 +- packages/tlschema/src/records/TLInstance.ts | 2 +- .../src/records/TLInstancePageState.ts | 2 +- .../src/records/TLInstancePresence.ts | 2 +- packages/tlschema/src/records/TLPage.ts | 2 +- packages/tlschema/src/records/TLPointer.ts | 2 +- .../tlschema/src/records/TLUserDocument.ts | 2 +- packages/tlschema/src/shapes/TLArrowShape.ts | 2 +- .../tlschema/src/shapes/TLBookmarkShape.ts | 2 +- packages/tlschema/src/shapes/TLDrawShape.ts | 2 +- packages/tlschema/src/shapes/TLEmbedShape.ts | 2 +- packages/tlschema/src/shapes/TLFrameShape.ts | 2 +- packages/tlschema/src/shapes/TLGeoShape.ts | 2 +- packages/tlschema/src/shapes/TLGroupShape.ts | 2 +- .../tlschema/src/shapes/TLHighlightShape.ts | 2 +- packages/tlschema/src/shapes/TLIconShape.ts | 2 +- packages/tlschema/src/shapes/TLImageShape.ts | 2 +- packages/tlschema/src/shapes/TLLineShape.ts | 2 +- packages/tlschema/src/shapes/TLNoteShape.ts | 2 +- packages/tlschema/src/shapes/TLTextShape.ts | 2 +- packages/tlschema/src/shapes/TLVideoShape.ts | 2 +- .../tlschema/src/shapes/shape-validation.ts | 2 +- packages/tlschema/src/ui-types.ts | 2 +- packages/tlschema/src/validation.ts | 2 +- packages/tlschema/tsconfig.json | 2 +- .../{tlvalidate => validate}/CHANGELOG.md | 0 packages/{tlvalidate => validate}/LICENSE | 0 packages/{tlvalidate => validate}/README.md | 0 .../api-extractor.json | 0 .../{tlvalidate => validate}/api-report.md | 2 +- .../{tlvalidate => validate}/package.json | 4 +-- .../{tlvalidate => validate}/src/index.ts | 0 .../src/lib/validation.ts | 0 .../src/test/validation.test.ts | 0 .../{tlvalidate => validate}/tsconfig.json | 0 public-yarn.lock | 26 +++++++++---------- 52 files changed, 58 insertions(+), 58 deletions(-) rename packages/{tlvalidate => validate}/CHANGELOG.md (100%) rename packages/{tlvalidate => validate}/LICENSE (100%) rename packages/{tlvalidate => validate}/README.md (100%) rename packages/{tlvalidate => validate}/api-extractor.json (100%) rename packages/{tlvalidate => validate}/api-report.md (99%) rename packages/{tlvalidate => validate}/package.json (94%) rename packages/{tlvalidate => validate}/src/index.ts (100%) rename packages/{tlvalidate => validate}/src/lib/validation.ts (100%) rename packages/{tlvalidate => validate}/src/test/validation.test.ts (100%) rename packages/{tlvalidate => validate}/tsconfig.json (100%) diff --git a/apps/docs/package.json b/apps/docs/package.json index 799c0f758..cfdbc68e0 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -64,9 +64,9 @@ "@tldraw/tldraw": "workspace:*", "@tldraw/tlschema": "workspace:*", "@tldraw/tlstore": "workspace:*", - "@tldraw/tlvalidate": "workspace:*", "@tldraw/ui": "workspace:*", "@tldraw/utils": "workspace:*", + "@tldraw/validate": "workspace:*", "lazyrepo": "0.0.0-alpha.26", "rimraf": "^4.4.0", "ts-node": "^10.9.1" diff --git a/packages/editor/package.json b/packages/editor/package.json index 0c3a8e0d7..f983b9225 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -49,8 +49,8 @@ "@tldraw/primitives": "workspace:*", "@tldraw/tlschema": "workspace:*", "@tldraw/tlstore": "workspace:*", - "@tldraw/tlvalidate": "workspace:*", "@tldraw/utils": "workspace:*", + "@tldraw/validate": "workspace:*", "@use-gesture/react": "^10.2.27", "classnames": "^2.3.2", "crc": "^4.3.2", diff --git a/packages/editor/src/lib/config/TLUserPreferences.ts b/packages/editor/src/lib/config/TLUserPreferences.ts index 333a0a4fe..2eca7faf5 100644 --- a/packages/editor/src/lib/config/TLUserPreferences.ts +++ b/packages/editor/src/lib/config/TLUserPreferences.ts @@ -1,6 +1,6 @@ import { getDefaultTranslationLocale } from '@tldraw/tlschema' import { defineMigrations, migrate } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { atom } from 'signia' import { uniqueId } from '../utils/data' diff --git a/packages/editor/tsconfig.json b/packages/editor/tsconfig.json index 963125faa..aff4be8bb 100644 --- a/packages/editor/tsconfig.json +++ b/packages/editor/tsconfig.json @@ -14,7 +14,7 @@ { "path": "../primitives" }, { "path": "../tlschema" }, { "path": "../tlstore" }, - { "path": "../tlvalidate" }, + { "path": "../validate" }, { "path": "../utils" }, { "path": "../indices" } ] diff --git a/packages/file-format/package.json b/packages/file-format/package.json index 09ebd1667..b5e0a5b97 100644 --- a/packages/file-format/package.json +++ b/packages/file-format/package.json @@ -44,9 +44,9 @@ "@tldraw/editor": "workspace:*", "@tldraw/primitives": "workspace:*", "@tldraw/tlstore": "workspace:*", - "@tldraw/tlvalidate": "workspace:*", "@tldraw/ui": "workspace:*", - "@tldraw/utils": "workspace:*" + "@tldraw/utils": "workspace:*", + "@tldraw/validate": "workspace:*" }, "jest": { "preset": "config/jest/node", diff --git a/packages/file-format/src/lib/file.ts b/packages/file-format/src/lib/file.ts index 326979f1d..cb8a9ae5f 100644 --- a/packages/file-format/src/lib/file.ts +++ b/packages/file-format/src/lib/file.ts @@ -16,9 +16,9 @@ import { StoreSnapshot, UnknownRecord, } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' import { TLUiToastsContextType, TLUiTranslationKey } from '@tldraw/ui' import { exhaustiveSwitchError, Result } from '@tldraw/utils' +import { T } from '@tldraw/validate' import { buildFromV1Document } from './buildFromV1Document' /** @public */ diff --git a/packages/file-format/tsconfig.json b/packages/file-format/tsconfig.json index f2d4b975b..d5c8a01f6 100644 --- a/packages/file-format/tsconfig.json +++ b/packages/file-format/tsconfig.json @@ -9,7 +9,7 @@ "references": [ { "path": "../editor" }, { "path": "../tlstore" }, - { "path": "../tlvalidate" }, + { "path": "../validate" }, { "path": "../primitives" }, { "path": "../utils" }, { "path": "../ui" } diff --git a/packages/tlschema/api-report.md b/packages/tlschema/api-report.md index dc6c7d205..179945426 100644 --- a/packages/tlschema/api-report.md +++ b/packages/tlschema/api-report.md @@ -13,7 +13,7 @@ import { Store } from '@tldraw/tlstore'; import { StoreSchema } from '@tldraw/tlstore'; import { StoreSchemaOptions } from '@tldraw/tlstore'; import { StoreSnapshot } from '@tldraw/tlstore'; -import { T } from '@tldraw/tlvalidate'; +import { T } from '@tldraw/validate'; import { UnknownRecord } from '@tldraw/tlstore'; // @internal (undocumented) diff --git a/packages/tlschema/package.json b/packages/tlschema/package.json index 3350838f0..cf0671240 100644 --- a/packages/tlschema/package.json +++ b/packages/tlschema/package.json @@ -57,8 +57,8 @@ }, "dependencies": { "@tldraw/tlstore": "workspace:*", - "@tldraw/tlvalidate": "workspace:*", "@tldraw/utils": "workspace:*", + "@tldraw/validate": "workspace:*", "nanoid": "4.0.2" }, "peerDependencies": { diff --git a/packages/tlschema/src/assets/TLBookmarkAsset.ts b/packages/tlschema/src/assets/TLBookmarkAsset.ts index 04c637ddf..7604b3a07 100644 --- a/packages/tlschema/src/assets/TLBookmarkAsset.ts +++ b/packages/tlschema/src/assets/TLBookmarkAsset.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { createAssetValidator, TLBaseAsset } from './asset-validation' // --- DEFINITION --- diff --git a/packages/tlschema/src/assets/TLImageAsset.ts b/packages/tlschema/src/assets/TLImageAsset.ts index fc37a9990..80c4690a6 100644 --- a/packages/tlschema/src/assets/TLImageAsset.ts +++ b/packages/tlschema/src/assets/TLImageAsset.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { createAssetValidator, TLBaseAsset } from './asset-validation' // --- DEFINITION --- diff --git a/packages/tlschema/src/assets/TLVideoAsset.ts b/packages/tlschema/src/assets/TLVideoAsset.ts index eb7c68e48..908d425e6 100644 --- a/packages/tlschema/src/assets/TLVideoAsset.ts +++ b/packages/tlschema/src/assets/TLVideoAsset.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { createAssetValidator, TLBaseAsset } from './asset-validation' // --- DEFINITION --- diff --git a/packages/tlschema/src/assets/asset-validation.ts b/packages/tlschema/src/assets/asset-validation.ts index dad0bd904..4cba9afc5 100644 --- a/packages/tlschema/src/assets/asset-validation.ts +++ b/packages/tlschema/src/assets/asset-validation.ts @@ -1,5 +1,5 @@ import { BaseRecord } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLAssetId } from '../records/TLAsset' import { assetIdValidator } from '../validation' diff --git a/packages/tlschema/src/createTLSchema.ts b/packages/tlschema/src/createTLSchema.ts index c06a7b2e8..0c671d546 100644 --- a/packages/tlschema/src/createTLSchema.ts +++ b/packages/tlschema/src/createTLSchema.ts @@ -1,5 +1,5 @@ import { Migrations, StoreSchema, createRecordType, defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLRecord } from './TLRecord' import { TLStoreProps, createIntegrityChecker, onValidationFailure } from './TLStore' import { AssetRecordType } from './records/TLAsset' diff --git a/packages/tlschema/src/records/TLAsset.ts b/packages/tlschema/src/records/TLAsset.ts index e60af27d5..5d5151fe2 100644 --- a/packages/tlschema/src/records/TLAsset.ts +++ b/packages/tlschema/src/records/TLAsset.ts @@ -1,5 +1,5 @@ import { createRecordType, defineMigrations, ID } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLBaseAsset } from '../assets/asset-validation' import { bookmarkAssetMigrations, diff --git a/packages/tlschema/src/records/TLCamera.ts b/packages/tlschema/src/records/TLCamera.ts index fc13aa57f..78150f1db 100644 --- a/packages/tlschema/src/records/TLCamera.ts +++ b/packages/tlschema/src/records/TLCamera.ts @@ -1,5 +1,5 @@ import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { idValidator } from '../validation' /** diff --git a/packages/tlschema/src/records/TLDocument.ts b/packages/tlschema/src/records/TLDocument.ts index 2e4f7d8fb..7264518df 100644 --- a/packages/tlschema/src/records/TLDocument.ts +++ b/packages/tlschema/src/records/TLDocument.ts @@ -1,5 +1,5 @@ import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' /** * TLDocument diff --git a/packages/tlschema/src/records/TLInstance.ts b/packages/tlschema/src/records/TLInstance.ts index 6562d7d88..2c73e0a6e 100644 --- a/packages/tlschema/src/records/TLInstance.ts +++ b/packages/tlschema/src/records/TLInstance.ts @@ -1,5 +1,5 @@ import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { Box2dModel } from '../geometry-types' import { TL_STYLE_TYPES, TLStyleType } from '../style-types' import { cursorValidator, scribbleTypeValidator, TLCursor, TLScribble } from '../ui-types' diff --git a/packages/tlschema/src/records/TLInstancePageState.ts b/packages/tlschema/src/records/TLInstancePageState.ts index 924a88cfc..afadeedce 100644 --- a/packages/tlschema/src/records/TLInstancePageState.ts +++ b/packages/tlschema/src/records/TLInstancePageState.ts @@ -1,5 +1,5 @@ import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { idValidator, instanceIdValidator, pageIdValidator, shapeIdValidator } from '../validation' import { TLCamera, TLCameraId } from './TLCamera' import { TLInstance } from './TLInstance' diff --git a/packages/tlschema/src/records/TLInstancePresence.ts b/packages/tlschema/src/records/TLInstancePresence.ts index 79ad4be3c..022876033 100644 --- a/packages/tlschema/src/records/TLInstancePresence.ts +++ b/packages/tlschema/src/records/TLInstancePresence.ts @@ -1,5 +1,5 @@ import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { Box2dModel } from '../geometry-types' import { cursorTypeValidator, scribbleTypeValidator, TLCursor, TLScribble } from '../ui-types' import { idValidator } from '../validation' diff --git a/packages/tlschema/src/records/TLPage.ts b/packages/tlschema/src/records/TLPage.ts index 26fb1ab23..a0332730e 100644 --- a/packages/tlschema/src/records/TLPage.ts +++ b/packages/tlschema/src/records/TLPage.ts @@ -1,5 +1,5 @@ import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { pageIdValidator } from '../validation' /** diff --git a/packages/tlschema/src/records/TLPointer.ts b/packages/tlschema/src/records/TLPointer.ts index 708e916d6..0d8ca9f8f 100644 --- a/packages/tlschema/src/records/TLPointer.ts +++ b/packages/tlschema/src/records/TLPointer.ts @@ -1,5 +1,5 @@ import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { idValidator } from '../validation' /** diff --git a/packages/tlschema/src/records/TLUserDocument.ts b/packages/tlschema/src/records/TLUserDocument.ts index aac14ea9a..f5b5d34b4 100644 --- a/packages/tlschema/src/records/TLUserDocument.ts +++ b/packages/tlschema/src/records/TLUserDocument.ts @@ -1,5 +1,5 @@ import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { idValidator, instanceIdValidator, pageIdValidator } from '../validation' import { TLInstance } from './TLInstance' import { TLPage } from './TLPage' diff --git a/packages/tlschema/src/shapes/TLArrowShape.ts b/packages/tlschema/src/shapes/TLArrowShape.ts index 8a203b74e..6843dd3d6 100644 --- a/packages/tlschema/src/shapes/TLArrowShape.ts +++ b/packages/tlschema/src/shapes/TLArrowShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { Vec2dModel } from '../geometry-types' import { TLShapeId } from '../records/TLShape' import { diff --git a/packages/tlschema/src/shapes/TLBookmarkShape.ts b/packages/tlschema/src/shapes/TLBookmarkShape.ts index b79abbb5c..6b4dda4c1 100644 --- a/packages/tlschema/src/shapes/TLBookmarkShape.ts +++ b/packages/tlschema/src/shapes/TLBookmarkShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLAssetId } from '../records/TLAsset' import { TLOpacityType } from '../style-types' import { assetIdValidator, opacityValidator } from '../validation' diff --git a/packages/tlschema/src/shapes/TLDrawShape.ts b/packages/tlschema/src/shapes/TLDrawShape.ts index f1f326290..2e9d592c5 100644 --- a/packages/tlschema/src/shapes/TLDrawShape.ts +++ b/packages/tlschema/src/shapes/TLDrawShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { Vec2dModel } from '../geometry-types' import { TLColorType, TLDashType, TLFillType, TLOpacityType, TLSizeType } from '../style-types' import { SetValue } from '../util-types' diff --git a/packages/tlschema/src/shapes/TLEmbedShape.ts b/packages/tlschema/src/shapes/TLEmbedShape.ts index 6786473ba..4b5ca5991 100644 --- a/packages/tlschema/src/shapes/TLEmbedShape.ts +++ b/packages/tlschema/src/shapes/TLEmbedShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLOpacityType } from '../style-types' import { opacityValidator } from '../validation' import { createShapeValidator, TLBaseShape } from './shape-validation' diff --git a/packages/tlschema/src/shapes/TLFrameShape.ts b/packages/tlschema/src/shapes/TLFrameShape.ts index 853389cc5..2c2a48b5d 100644 --- a/packages/tlschema/src/shapes/TLFrameShape.ts +++ b/packages/tlschema/src/shapes/TLFrameShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLOpacityType } from '../style-types' import { opacityValidator } from '../validation' import { createShapeValidator, TLBaseShape } from './shape-validation' diff --git a/packages/tlschema/src/shapes/TLGeoShape.ts b/packages/tlschema/src/shapes/TLGeoShape.ts index 854cbef5c..4b6664915 100644 --- a/packages/tlschema/src/shapes/TLGeoShape.ts +++ b/packages/tlschema/src/shapes/TLGeoShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLAlignType, TLColorType, diff --git a/packages/tlschema/src/shapes/TLGroupShape.ts b/packages/tlschema/src/shapes/TLGroupShape.ts index adf1b6ad8..7d2d904f7 100644 --- a/packages/tlschema/src/shapes/TLGroupShape.ts +++ b/packages/tlschema/src/shapes/TLGroupShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLOpacityType } from '../style-types' import { opacityValidator } from '../validation' import { createShapeValidator, TLBaseShape } from './shape-validation' diff --git a/packages/tlschema/src/shapes/TLHighlightShape.ts b/packages/tlschema/src/shapes/TLHighlightShape.ts index 62e56418d..b0331a0c9 100644 --- a/packages/tlschema/src/shapes/TLHighlightShape.ts +++ b/packages/tlschema/src/shapes/TLHighlightShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLColorType, TLOpacityType, TLSizeType } from '../style-types' import { colorValidator, opacityValidator, sizeValidator } from '../validation' import { TLDrawShapeSegment, drawShapeSegmentValidator } from './TLDrawShape' diff --git a/packages/tlschema/src/shapes/TLIconShape.ts b/packages/tlschema/src/shapes/TLIconShape.ts index 87b453c8e..20aca0aa1 100644 --- a/packages/tlschema/src/shapes/TLIconShape.ts +++ b/packages/tlschema/src/shapes/TLIconShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLColorType, TLDashType, TLIconType, TLOpacityType, TLSizeType } from '../style-types' import { colorValidator, diff --git a/packages/tlschema/src/shapes/TLImageShape.ts b/packages/tlschema/src/shapes/TLImageShape.ts index df8b67739..84142aa44 100644 --- a/packages/tlschema/src/shapes/TLImageShape.ts +++ b/packages/tlschema/src/shapes/TLImageShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { Vec2dModel } from '../geometry-types' import { TLAssetId } from '../records/TLAsset' import { TLOpacityType } from '../style-types' diff --git a/packages/tlschema/src/shapes/TLLineShape.ts b/packages/tlschema/src/shapes/TLLineShape.ts index 8fc6fdfcd..157cdbe1c 100644 --- a/packages/tlschema/src/shapes/TLLineShape.ts +++ b/packages/tlschema/src/shapes/TLLineShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLColorType, TLDashType, TLOpacityType, TLSizeType, TLSplineType } from '../style-types' import { TLHandle, handleTypeValidator } from '../ui-types' import { diff --git a/packages/tlschema/src/shapes/TLNoteShape.ts b/packages/tlschema/src/shapes/TLNoteShape.ts index b1f88679c..ed43591b9 100644 --- a/packages/tlschema/src/shapes/TLNoteShape.ts +++ b/packages/tlschema/src/shapes/TLNoteShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLAlignType, TLColorType, TLFontType, TLOpacityType, TLSizeType } from '../style-types' import { alignValidator, diff --git a/packages/tlschema/src/shapes/TLTextShape.ts b/packages/tlschema/src/shapes/TLTextShape.ts index 50802eb7b..7a77cc09f 100644 --- a/packages/tlschema/src/shapes/TLTextShape.ts +++ b/packages/tlschema/src/shapes/TLTextShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLAlignType, TLColorType, TLFontType, TLOpacityType, TLSizeType } from '../style-types' import { alignValidator, diff --git a/packages/tlschema/src/shapes/TLVideoShape.ts b/packages/tlschema/src/shapes/TLVideoShape.ts index 44c702a73..d92cd2dc1 100644 --- a/packages/tlschema/src/shapes/TLVideoShape.ts +++ b/packages/tlschema/src/shapes/TLVideoShape.ts @@ -1,5 +1,5 @@ import { defineMigrations } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLAssetId } from '../records/TLAsset' import { TLOpacityType } from '../style-types' import { assetIdValidator, opacityValidator } from '../validation' diff --git a/packages/tlschema/src/shapes/shape-validation.ts b/packages/tlschema/src/shapes/shape-validation.ts index a0a607c0b..c794426a8 100644 --- a/packages/tlschema/src/shapes/shape-validation.ts +++ b/packages/tlschema/src/shapes/shape-validation.ts @@ -1,5 +1,5 @@ import { BaseRecord } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { TLParentId, TLShapeId } from '../records/TLShape' import { parentIdValidator, shapeIdValidator } from '../validation' diff --git a/packages/tlschema/src/ui-types.ts b/packages/tlschema/src/ui-types.ts index 91f9b58b9..635a96c10 100644 --- a/packages/tlschema/src/ui-types.ts +++ b/packages/tlschema/src/ui-types.ts @@ -1,4 +1,4 @@ -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import { Vec2dModel } from './geometry-types' import { SetValue } from './util-types' diff --git a/packages/tlschema/src/validation.ts b/packages/tlschema/src/validation.ts index 8ac0249a7..d0a0af615 100644 --- a/packages/tlschema/src/validation.ts +++ b/packages/tlschema/src/validation.ts @@ -1,5 +1,5 @@ import type { ID, UnknownRecord } from '@tldraw/tlstore' -import { T } from '@tldraw/tlvalidate' +import { T } from '@tldraw/validate' import type { TLAssetId } from './records/TLAsset' import type { TLInstanceId } from './records/TLInstance' import type { TLPageId } from './records/TLPage' diff --git a/packages/tlschema/tsconfig.json b/packages/tlschema/tsconfig.json index a9b030de2..b0e6858ab 100644 --- a/packages/tlschema/tsconfig.json +++ b/packages/tlschema/tsconfig.json @@ -6,5 +6,5 @@ "outDir": "./.tsbuild", "rootDir": "src" }, - "references": [{ "path": "../tlstore" }, { "path": "../tlvalidate" }, { "path": "../utils" }] + "references": [{ "path": "../tlstore" }, { "path": "../validate" }, { "path": "../utils" }] } diff --git a/packages/tlvalidate/CHANGELOG.md b/packages/validate/CHANGELOG.md similarity index 100% rename from packages/tlvalidate/CHANGELOG.md rename to packages/validate/CHANGELOG.md diff --git a/packages/tlvalidate/LICENSE b/packages/validate/LICENSE similarity index 100% rename from packages/tlvalidate/LICENSE rename to packages/validate/LICENSE diff --git a/packages/tlvalidate/README.md b/packages/validate/README.md similarity index 100% rename from packages/tlvalidate/README.md rename to packages/validate/README.md diff --git a/packages/tlvalidate/api-extractor.json b/packages/validate/api-extractor.json similarity index 100% rename from packages/tlvalidate/api-extractor.json rename to packages/validate/api-extractor.json diff --git a/packages/tlvalidate/api-report.md b/packages/validate/api-report.md similarity index 99% rename from packages/tlvalidate/api-report.md rename to packages/validate/api-report.md index 57a86f439..d8e22970b 100644 --- a/packages/tlvalidate/api-report.md +++ b/packages/validate/api-report.md @@ -1,4 +1,4 @@ -## API Report File for "@tldraw/tlvalidate" +## API Report File for "@tldraw/validate" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). diff --git a/packages/tlvalidate/package.json b/packages/validate/package.json similarity index 94% rename from packages/tlvalidate/package.json rename to packages/validate/package.json index 87ab5a576..4fedd5d02 100644 --- a/packages/tlvalidate/package.json +++ b/packages/validate/package.json @@ -1,6 +1,6 @@ { - "name": "@tldraw/tlvalidate", - "description": "A tiny little drawing app (validation).", + "name": "@tldraw/validate", + "description": "A runtime validation library by tldraw.", "version": "2.0.0-alpha.12", "packageManager": "yarn@3.5.0", "author": { diff --git a/packages/tlvalidate/src/index.ts b/packages/validate/src/index.ts similarity index 100% rename from packages/tlvalidate/src/index.ts rename to packages/validate/src/index.ts diff --git a/packages/tlvalidate/src/lib/validation.ts b/packages/validate/src/lib/validation.ts similarity index 100% rename from packages/tlvalidate/src/lib/validation.ts rename to packages/validate/src/lib/validation.ts diff --git a/packages/tlvalidate/src/test/validation.test.ts b/packages/validate/src/test/validation.test.ts similarity index 100% rename from packages/tlvalidate/src/test/validation.test.ts rename to packages/validate/src/test/validation.test.ts diff --git a/packages/tlvalidate/tsconfig.json b/packages/validate/tsconfig.json similarity index 100% rename from packages/tlvalidate/tsconfig.json rename to packages/validate/tsconfig.json diff --git a/public-yarn.lock b/public-yarn.lock index 3b37f1387..daf9e84ef 100644 --- a/public-yarn.lock +++ b/public-yarn.lock @@ -4297,9 +4297,9 @@ __metadata: "@tldraw/tldraw": "workspace:*" "@tldraw/tlschema": "workspace:*" "@tldraw/tlstore": "workspace:*" - "@tldraw/tlvalidate": "workspace:*" "@tldraw/ui": "workspace:*" "@tldraw/utils": "workspace:*" + "@tldraw/validate": "workspace:*" "@types/node": 18.15.0 "@types/react": ^18.0.24 "@types/react-dom": ^18.0.6 @@ -4335,8 +4335,8 @@ __metadata: "@tldraw/primitives": "workspace:*" "@tldraw/tlschema": "workspace:*" "@tldraw/tlstore": "workspace:*" - "@tldraw/tlvalidate": "workspace:*" "@tldraw/utils": "workspace:*" + "@tldraw/validate": "workspace:*" "@types/benchmark": ^2.1.2 "@types/crc": ^3.8.0 "@types/lodash.throttle": ^4.1.7 @@ -4375,9 +4375,9 @@ __metadata: "@tldraw/editor": "workspace:*" "@tldraw/primitives": "workspace:*" "@tldraw/tlstore": "workspace:*" - "@tldraw/tlvalidate": "workspace:*" "@tldraw/ui": "workspace:*" "@tldraw/utils": "workspace:*" + "@tldraw/validate": "workspace:*" lazyrepo: 0.0.0-alpha.26 languageName: unknown linkType: soft @@ -4496,8 +4496,8 @@ __metadata: resolution: "@tldraw/tlschema@workspace:packages/tlschema" dependencies: "@tldraw/tlstore": "workspace:*" - "@tldraw/tlvalidate": "workspace:*" "@tldraw/utils": "workspace:*" + "@tldraw/validate": "workspace:*" kleur: ^4.1.5 lazyrepo: 0.0.0-alpha.26 nanoid: 4.0.2 @@ -4522,15 +4522,6 @@ __metadata: languageName: unknown linkType: soft -"@tldraw/tlvalidate@workspace:*, @tldraw/tlvalidate@workspace:packages/tlvalidate": - version: 0.0.0-use.local - resolution: "@tldraw/tlvalidate@workspace:packages/tlvalidate" - dependencies: - "@tldraw/utils": "workspace:*" - lazyrepo: 0.0.0-alpha.26 - languageName: unknown - linkType: soft - "@tldraw/ui@workspace:*, @tldraw/ui@workspace:packages/ui": version: 0.0.0-use.local resolution: "@tldraw/ui@workspace:packages/ui" @@ -4576,6 +4567,15 @@ __metadata: languageName: unknown linkType: soft +"@tldraw/validate@workspace:*, @tldraw/validate@workspace:packages/validate": + version: 0.0.0-use.local + resolution: "@tldraw/validate@workspace:packages/validate" + dependencies: + "@tldraw/utils": "workspace:*" + lazyrepo: 0.0.0-alpha.26 + languageName: unknown + linkType: soft + "@tldraw/vscode-editor@workspace:apps/vscode/editor": version: 0.0.0-use.local resolution: "@tldraw/vscode-editor@workspace:apps/vscode/editor"