@tldraw/tlschema 4.4.0 → 4.5.0-canary.034ea85352da
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.d.ts +6 -6
- package/dist-cjs/index.js +1 -1
- package/dist-esm/index.d.mts +6 -6
- package/dist-esm/index.mjs +1 -1
- package/package.json +5 -5
package/dist-cjs/index.d.ts
CHANGED
|
@@ -547,13 +547,13 @@ meta: JsonObject;
|
|
|
547
547
|
props: Props;
|
|
548
548
|
type: Type;
|
|
549
549
|
typeName: "asset";
|
|
550
|
-
}[P]; } & { [
|
|
550
|
+
}[P]; } & { [P in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: {
|
|
551
551
|
id: TLAssetId;
|
|
552
552
|
meta: JsonObject;
|
|
553
553
|
props: Props;
|
|
554
554
|
type: Type;
|
|
555
555
|
typeName: "asset";
|
|
556
|
-
}[
|
|
556
|
+
}[P] | undefined; }>>;
|
|
557
557
|
|
|
558
558
|
/**
|
|
559
559
|
* Creates a new TLBindingId with proper formatting.
|
|
@@ -715,7 +715,7 @@ export declare function createBindingValidator<Type extends string, Props extend
|
|
|
715
715
|
[K in keyof Props]: T.Validatable<Props[K]>;
|
|
716
716
|
}, meta?: {
|
|
717
717
|
[K in keyof Meta]: T.Validatable<Meta[K]>;
|
|
718
|
-
}): T.ObjectValidator<Expand< { [P in "fromId" | "id" | "meta" | "toId" | "typeName" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseBinding<Type, Props>[P]; } & { [
|
|
718
|
+
}): T.ObjectValidator<Expand< { [P in "fromId" | "id" | "meta" | "toId" | "typeName" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseBinding<Type, Props>[P]; } & { [P in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: TLBaseBinding<Type, Props>[P] | undefined; }>>;
|
|
719
719
|
|
|
720
720
|
/**
|
|
721
721
|
* Creates a derivation that represents the current presence state of the current user.
|
|
@@ -744,7 +744,7 @@ export declare function createBindingValidator<Type extends string, Props extend
|
|
|
744
744
|
*
|
|
745
745
|
* @public
|
|
746
746
|
*/
|
|
747
|
-
export declare function createPresenceStateDerivation($user: Signal<TLPresenceUserInfo>, instanceId?: TLInstancePresence['id']): (store: TLStore) => Signal<null | TLInstancePresence>;
|
|
747
|
+
export declare function createPresenceStateDerivation($user: Signal<TLPresenceUserInfo>, instanceId?: TLInstancePresence['id']): (store: TLStore) => Signal<null | TLInstancePresence, unknown>;
|
|
748
748
|
|
|
749
749
|
/**
|
|
750
750
|
* Creates a new shape ID.
|
|
@@ -875,7 +875,7 @@ export declare function createShapeValidator<Type extends string, Props extends
|
|
|
875
875
|
[K in keyof Props]: T.Validatable<Props[K]>;
|
|
876
876
|
}, meta?: {
|
|
877
877
|
[K in keyof Meta]: T.Validatable<Meta[K]>;
|
|
878
|
-
}): T.ObjectValidator<Expand< { [P in "id" | "index" | "isLocked" | "meta" | "opacity" | "parentId" | "rotation" | "typeName" | "x" | "y" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseShape<Type, Props>[P]; } & { [
|
|
878
|
+
}): T.ObjectValidator<Expand< { [P in "id" | "index" | "isLocked" | "meta" | "opacity" | "parentId" | "rotation" | "typeName" | "x" | "y" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseShape<Type, Props>[P]; } & { [P in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: TLBaseShape<Type, Props>[P] | undefined; }>>;
|
|
879
879
|
|
|
880
880
|
/**
|
|
881
881
|
* Creates a complete TLSchema for use with tldraw stores. This schema defines the structure,
|
|
@@ -929,7 +929,7 @@ export declare function createShapeValidator<Type extends string, Props extends
|
|
|
929
929
|
* })
|
|
930
930
|
* ```
|
|
931
931
|
*/
|
|
932
|
-
export declare function createTLSchema({ shapes, bindings, migrations
|
|
932
|
+
export declare function createTLSchema({ shapes, bindings, migrations }?: {
|
|
933
933
|
bindings?: Record<string, SchemaPropsInfo>;
|
|
934
934
|
migrations?: readonly MigrationSequence[];
|
|
935
935
|
shapes?: Record<string, SchemaPropsInfo>;
|
package/dist-cjs/index.js
CHANGED
|
@@ -181,7 +181,7 @@ var import_translations = require("./translations/translations");
|
|
|
181
181
|
var import_b64Vecs = require("./misc/b64Vecs");
|
|
182
182
|
(0, import_utils.registerTldrawLibraryVersion)(
|
|
183
183
|
"@tldraw/tlschema",
|
|
184
|
-
"4.
|
|
184
|
+
"4.5.0-canary.034ea85352da",
|
|
185
185
|
"cjs"
|
|
186
186
|
);
|
|
187
187
|
//# sourceMappingURL=index.js.map
|
package/dist-esm/index.d.mts
CHANGED
|
@@ -547,13 +547,13 @@ meta: JsonObject;
|
|
|
547
547
|
props: Props;
|
|
548
548
|
type: Type;
|
|
549
549
|
typeName: "asset";
|
|
550
|
-
}[P]; } & { [
|
|
550
|
+
}[P]; } & { [P in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: {
|
|
551
551
|
id: TLAssetId;
|
|
552
552
|
meta: JsonObject;
|
|
553
553
|
props: Props;
|
|
554
554
|
type: Type;
|
|
555
555
|
typeName: "asset";
|
|
556
|
-
}[
|
|
556
|
+
}[P] | undefined; }>>;
|
|
557
557
|
|
|
558
558
|
/**
|
|
559
559
|
* Creates a new TLBindingId with proper formatting.
|
|
@@ -715,7 +715,7 @@ export declare function createBindingValidator<Type extends string, Props extend
|
|
|
715
715
|
[K in keyof Props]: T.Validatable<Props[K]>;
|
|
716
716
|
}, meta?: {
|
|
717
717
|
[K in keyof Meta]: T.Validatable<Meta[K]>;
|
|
718
|
-
}): T.ObjectValidator<Expand< { [P in "fromId" | "id" | "meta" | "toId" | "typeName" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseBinding<Type, Props>[P]; } & { [
|
|
718
|
+
}): T.ObjectValidator<Expand< { [P in "fromId" | "id" | "meta" | "toId" | "typeName" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseBinding<Type, Props>[P]; } & { [P in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: TLBaseBinding<Type, Props>[P] | undefined; }>>;
|
|
719
719
|
|
|
720
720
|
/**
|
|
721
721
|
* Creates a derivation that represents the current presence state of the current user.
|
|
@@ -744,7 +744,7 @@ export declare function createBindingValidator<Type extends string, Props extend
|
|
|
744
744
|
*
|
|
745
745
|
* @public
|
|
746
746
|
*/
|
|
747
|
-
export declare function createPresenceStateDerivation($user: Signal<TLPresenceUserInfo>, instanceId?: TLInstancePresence['id']): (store: TLStore) => Signal<null | TLInstancePresence>;
|
|
747
|
+
export declare function createPresenceStateDerivation($user: Signal<TLPresenceUserInfo>, instanceId?: TLInstancePresence['id']): (store: TLStore) => Signal<null | TLInstancePresence, unknown>;
|
|
748
748
|
|
|
749
749
|
/**
|
|
750
750
|
* Creates a new shape ID.
|
|
@@ -875,7 +875,7 @@ export declare function createShapeValidator<Type extends string, Props extends
|
|
|
875
875
|
[K in keyof Props]: T.Validatable<Props[K]>;
|
|
876
876
|
}, meta?: {
|
|
877
877
|
[K in keyof Meta]: T.Validatable<Meta[K]>;
|
|
878
|
-
}): T.ObjectValidator<Expand< { [P in "id" | "index" | "isLocked" | "meta" | "opacity" | "parentId" | "rotation" | "typeName" | "x" | "y" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseShape<Type, Props>[P]; } & { [
|
|
878
|
+
}): T.ObjectValidator<Expand< { [P in "id" | "index" | "isLocked" | "meta" | "opacity" | "parentId" | "rotation" | "typeName" | "x" | "y" | (undefined extends Props ? never : "props") | (undefined extends Type ? never : "type")]: TLBaseShape<Type, Props>[P]; } & { [P in (undefined extends Props ? "props" : never) | (undefined extends Type ? "type" : never)]?: TLBaseShape<Type, Props>[P] | undefined; }>>;
|
|
879
879
|
|
|
880
880
|
/**
|
|
881
881
|
* Creates a complete TLSchema for use with tldraw stores. This schema defines the structure,
|
|
@@ -929,7 +929,7 @@ export declare function createShapeValidator<Type extends string, Props extends
|
|
|
929
929
|
* })
|
|
930
930
|
* ```
|
|
931
931
|
*/
|
|
932
|
-
export declare function createTLSchema({ shapes, bindings, migrations
|
|
932
|
+
export declare function createTLSchema({ shapes, bindings, migrations }?: {
|
|
933
933
|
bindings?: Record<string, SchemaPropsInfo>;
|
|
934
934
|
migrations?: readonly MigrationSequence[];
|
|
935
935
|
shapes?: Record<string, SchemaPropsInfo>;
|
package/dist-esm/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tldraw/tlschema",
|
|
3
3
|
"description": "tldraw infinite canvas SDK (schema).",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.5.0-canary.034ea85352da",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"vitest": "^3.2.4"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@tldraw/state": "4.
|
|
54
|
-
"@tldraw/store": "4.
|
|
55
|
-
"@tldraw/utils": "4.
|
|
56
|
-
"@tldraw/validate": "4.
|
|
53
|
+
"@tldraw/state": "4.5.0-canary.034ea85352da",
|
|
54
|
+
"@tldraw/store": "4.5.0-canary.034ea85352da",
|
|
55
|
+
"@tldraw/utils": "4.5.0-canary.034ea85352da",
|
|
56
|
+
"@tldraw/validate": "4.5.0-canary.034ea85352da"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"react": "^18.2.0 || ^19.2.1",
|