New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tldraw/tlstore

Package Overview
Dependencies
Maintainers
4
Versions
328
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tldraw/tlstore - npm Package Compare versions

Comparing version 2.0.0-canary.9fa4f176 to 2.0.0-canary.a1e72014c65a

src/index.ts

32

CHANGELOG.md

@@ -0,1 +1,33 @@

# v2.0.0-alpha.12 (Mon Apr 03 2023)
#### 🐛 Bug Fix
- Make sure all types and build stuff get run in CI [#1548](https://github.com/tldraw/tldraw-lite/pull/1548) ([@SomeHats](https://github.com/SomeHats))
- add pre-commit api report generation [#1517](https://github.com/tldraw/tldraw-lite/pull/1517) ([@SomeHats](https://github.com/SomeHats))
- [chore] restore api extractor [#1500](https://github.com/tldraw/tldraw-lite/pull/1500) ([@steveruizok](https://github.com/steveruizok))
- Asset loading overhaul [#1457](https://github.com/tldraw/tldraw-lite/pull/1457) ([@SomeHats](https://github.com/SomeHats))
- David/publish good [#1488](https://github.com/tldraw/tldraw-lite/pull/1488) ([@ds300](https://github.com/ds300))
- [chore] alpha 10 [#1486](https://github.com/tldraw/tldraw-lite/pull/1486) ([@ds300](https://github.com/ds300))
- [chore] package build improvements [#1484](https://github.com/tldraw/tldraw-lite/pull/1484) ([@ds300](https://github.com/ds300))
- [chore] bump for alpha 8 [#1485](https://github.com/tldraw/tldraw-lite/pull/1485) ([@steveruizok](https://github.com/steveruizok))
- [fix] page point offset [#1483](https://github.com/tldraw/tldraw-lite/pull/1483) ([@steveruizok](https://github.com/steveruizok))
- stop using broken-af turbo for publishing [#1476](https://github.com/tldraw/tldraw-lite/pull/1476) ([@ds300](https://github.com/ds300))
- [chore] add canary release script [#1423](https://github.com/tldraw/tldraw-lite/pull/1423) ([@ds300](https://github.com/ds300) [@steveruizok](https://github.com/steveruizok))
- [chore] upgrade yarn [#1430](https://github.com/tldraw/tldraw-lite/pull/1430) ([@ds300](https://github.com/ds300))
- flush store on attach [#1449](https://github.com/tldraw/tldraw-lite/pull/1449) ([@ds300](https://github.com/ds300))
- [fix] dev version number for tldraw/tldraw [#1434](https://github.com/tldraw/tldraw-lite/pull/1434) ([@steveruizok](https://github.com/steveruizok))
- repo cleanup [#1426](https://github.com/tldraw/tldraw-lite/pull/1426) ([@steveruizok](https://github.com/steveruizok))
- [fix] use polyfill for `structuredClone` [#1408](https://github.com/tldraw/tldraw-lite/pull/1408) ([@TodePond](https://github.com/TodePond) [@steveruizok](https://github.com/steveruizok))
- Run all the tests. Fix linting for tests. [#1389](https://github.com/tldraw/tldraw-lite/pull/1389) ([@MitjaBezensek](https://github.com/MitjaBezensek))
#### Authors: 5
- alex ([@SomeHats](https://github.com/SomeHats))
- David Sheldrick ([@ds300](https://github.com/ds300))
- Lu[ke] Wilson ([@TodePond](https://github.com/TodePond))
- Mitja Bezenšek ([@MitjaBezensek](https://github.com/MitjaBezensek))
- Steve Ruiz ([@steveruizok](https://github.com/steveruizok))
---
# @tldraw/tlstore

@@ -2,0 +34,0 @@

163

dist-cjs/index.d.ts
import { Atom } from 'signia';
import { Computed } from 'signia';
import { Signal } from 'signia';
/**
* Get the type of all records in a record store.
*
* @public

@@ -14,4 +16,5 @@ */

* @example
*
* ```ts
* assertIdType(myId, ID<MyRecord>)
* assertIdType(myId, ID<MyRecord>)
* ```

@@ -21,3 +24,2 @@ *

* @param type - The type of the record.
*
* @public

@@ -37,2 +39,3 @@ */

* The base record that all records must extend.
*
* @public

@@ -47,2 +50,3 @@ */

* A diff describing the changes to a collection.
*
* @public

@@ -56,9 +60,10 @@ */

/** @public */
export declare function compareRecordVersions(a: RecordVersion, b: RecordVersion): 0 | 1 | -1;
export declare function compareRecordVersions(a: RecordVersion, b: RecordVersion): -1 | 0 | 1;
/** @public */
export declare const compareSchemas: (a: SerializedSchema, b: SerializedSchema) => number;
export declare const compareSchemas: (a: SerializedSchema, b: SerializedSchema) => -1 | 0 | 1;
/**
* A record store is a collection of records of different types.
*
* @public

@@ -74,8 +79,8 @@ */

* @example
*
* ```ts
* const Book = createRecordType<Book>('book')
* const Book = createRecordType<Book>('book')
* ```
*
* @param typeName - The name of the type to create.
*
* @public

@@ -86,2 +91,3 @@ */

validator: StoreValidator<R>;
scope: Scope;
}): RecordType<R, keyof Omit<R, 'id' | 'typeName'>>;

@@ -103,6 +109,7 @@

/**
* Freeze an object when in development mode.
* Copied from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
* Freeze an object when in development mode. Copied from
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze
*
* @example
*
* ```ts

@@ -113,5 +120,3 @@ * const frozen = devFreeze({ a: 1 })

* @param object - The object to freeze.
*
* @returns The frozen object when in development mode, or else the object when in other modes.
*
* @public

@@ -130,2 +135,3 @@ */

* An entry containing changes that originated either by user actions or remote changes.
*
* @public

@@ -135,3 +141,3 @@ */

changes: RecordsDiff<R>;
source: 'user' | 'remote';
source: 'remote' | 'user';
};

@@ -180,7 +186,7 @@

export declare type MigrationResult<T> = {
type: 'error';
reason: MigrationFailureReason;
} | {
type: 'success';
value: T;
} | {
type: 'error';
reason: MigrationFailureReason;
};

@@ -200,3 +206,3 @@

declare type Range_2<From extends number, To extends number> = To extends From ? From : To | Range_2<From, Decrement<To>>;
declare type Range_2<From extends number, To extends number> = To extends From ? From : Range_2<From, Decrement<To>> | To;

@@ -207,2 +213,3 @@ declare type RecFromId<K extends ID> = K extends ID<infer R> ? R : never;

* A diff describing the changes to a record.
*
* @public

@@ -232,5 +239,6 @@ */

readonly migrations: Migrations;
readonly validator: StoreValidator<R> | {
readonly validator: {
validate: (r: unknown) => R;
};
} | StoreValidator<R>;
readonly scope: Scope;
constructor(

@@ -246,5 +254,6 @@ /**

readonly migrations: Migrations;
readonly validator?: StoreValidator<R> | {
readonly validator?: {
validate: (r: unknown) => R;
};
} | StoreValidator<R>;
readonly scope?: Scope;
});

@@ -255,3 +264,2 @@ /**

* @param properties - The properties of the record.
*
* @returns The new record.

@@ -264,4 +272,4 @@ */

* @param record - The record to clone.
* @returns The cloned record.
* @public
* @returns The cloned record.
*/

@@ -273,2 +281,3 @@ clone(record: R): R;

* @example
*
* ```ts

@@ -278,4 +287,4 @@ * const id = recordType.createId()

*
* @returns The new ID.
* @public
* @returns The new ID.
*/

@@ -287,4 +296,5 @@ createId(): ID<R>;

* @example
*
* ```ts
* const id = recordType.createCustomId("myId")
* const id = recordType.createCustomId('myId')
* ```

@@ -297,5 +307,13 @@ *

/**
* Takes an id like `user:123` and returns the part after the colon `123`
*
* @param id - The id
* @returns
*/
parseId(id: string): ID<R>;
/**
* Check whether a record is an instance of this record type.
*
* @example
*
* ```ts

@@ -313,4 +331,5 @@ * const result = recordType.isInstance(someRecord)

* @example
*
* ```ts
* const result = recordType.isIn("someId")
* const result = recordType.isIn('someId')
* ```

@@ -323,5 +342,7 @@ *

/**
* Create a new RecordType that has the same type name as this RecordType and includes the given default properties.
* Create a new RecordType that has the same type name as this RecordType and includes the given
* default properties.
*
* @example
*
* ```ts

@@ -333,10 +354,8 @@ * const authorType = createRecordType('author', () => ({ living: true }))

* @param fn - A function that returns the default properties of the new RecordType.
*
* @returns The new RecordType.
*/
withDefaultProperties<DefaultProps extends Omit<Partial<R>, 'typeName' | 'id'>>(createDefaultProperties: () => DefaultProps): RecordType<R, Exclude<RequiredProperties, keyof DefaultProps>>;
withDefaultProperties<DefaultProps extends Omit<Partial<R>, 'id' | 'typeName'>>(createDefaultProperties: () => DefaultProps): RecordType<R, Exclude<RequiredProperties, keyof DefaultProps>>;
/**
* Check that the passed in record passes the validations for this type.
* Returns its input correctly typed if it does, but throws an error
* otherwise.
* Check that the passed in record passes the validations for this type. Returns its input
* correctly typed if it does, but throws an error otherwise.
*/

@@ -359,22 +378,29 @@ validate(record: unknown): R;

/**
* Defines the scope of the record
*
* instance: The record belongs to a single instance of the store. It should not be synced, and any persistence logic should 'de-instance-ize' the record before persisting it, and apply the reverse when rehydrating.
* document: The record is persisted and synced. It is available to all store instances.
* presence: The record belongs to a single instance of the store. It may be synced to other instances, but other instances should not make changes to it. It should not be persisted.
*
* @public
* */
declare type Scope = 'document' | 'instance' | 'presence';
/** @public */
export declare interface SerializedSchema {
/**
* Schema version is the version for this type you're looking at right now
*/
/** Schema version is the version for this type you're looking at right now */
schemaVersion: number;
/**
* Store version is the version for the structure of the store. e.g. higher level
* structure like removing or renaming a record type.
* Store version is the version for the structure of the store. e.g. higher level structure like
* removing or renaming a record type.
*/
storeVersion: number;
/**
* Record versions are the versions for each record type. e.g. adding a new field to a record
*/
/** Record versions are the versions for each record type. e.g. adding a new field to a record */
recordVersions: Record<string, {
version: number;
subTypeVersions: Record<string, number>;
subTypeKey: string;
} | {
version: number;
subTypeVersions: Record<string, number>;
subTypeKey: string;
}>;

@@ -394,2 +420,3 @@ }

* A store of records.
*
* @public

@@ -419,9 +446,7 @@ */

constructor(config: {
/**
* The store's initial data.
*/
/** The store's initial data. */
initialData?: StoreSnapshot<R>;
/**
* A map of validators for each record type. A record's validator will be
* called when the record is created or updated. It should throw an error if the record is invalid.
* A map of validators for each record type. A record's validator will be called when the record
* is created or updated. It should throw an error if the record is invalid.
*/

@@ -438,6 +463,6 @@ schema: StoreSchema<R, Props>;

private updateHistory;
validate(phase: 'initialize' | 'createRecord' | 'updateRecord' | 'tests'): void;
validate(phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord'): void;
/**
* A callback fired after a record is created. Use this to perform
* related updates to other records in the store.
* A callback fired after a record is created. Use this to perform related updates to other
* records in the store.
*

@@ -503,3 +528,9 @@ * @param record - The record to be created

/**
* Opposite of `serialize`. Replace the store's current records with records as defined by a simple JSON structure into the stores.
* The same as `serialize`, but only serializes records with a scope of `document`.
* @returns The record store snapshot as a JSON payload.
*/
serializeDocumentState: () => StoreSnapshot<R>;
/**
* Opposite of `serialize`. Replace the store's current records with records as defined by a
* simple JSON structure into the stores.
*

@@ -513,4 +544,4 @@ * @param snapshot - The JSON snapshot to deserialize.

*
* @returns An array of all values in the store.
* @public
* @returns An array of all values in the store.
*/

@@ -525,3 +556,4 @@ allRecords: () => R[];

/**
* Update a record. To update multiple records at once, use the `update` method of the `TypedStore` class.
* Update a record. To update multiple records at once, use the `update` method of the
* `TypedStore` class.
*

@@ -573,2 +605,3 @@ * @param id - The id of the record to update.

createSelectedComputedCache: <T, J, V extends R = R>(name: string, selector: (record: V) => T | undefined, derive: (input: T) => J | undefined) => ComputedCache<J, V>;
private _integrityChecker?;
/* Excluded from this release type: ensureStoreIsUsable */

@@ -583,3 +616,3 @@ private _isPossiblyCorrupted;

error: Error;
phase: 'initialize' | 'createRecord' | 'updateRecord' | 'tests';
phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';
recordBefore?: unknown;

@@ -592,2 +625,3 @@ recordAfter: unknown;

* A function that will be called when the history changes.
*
* @public

@@ -598,4 +632,4 @@ */

/**
* A class that provides a 'namespace' for the various kinds of indexes
* one may wish to derive from the record store.
* A class that provides a 'namespace' for the various kinds of indexes one may wish to derive from
* the record store.
*/

@@ -612,3 +646,2 @@ declare class StoreQueries<R extends BaseRecord = BaseRecord> {

* @param typeName - The name of the type to filter by.
*
* @returns A derivation that returns the ids of all records of the given type.

@@ -625,3 +658,2 @@ * @public

* @param property - The name of the property.
*
* @public

@@ -695,6 +727,7 @@ */

get currentStoreVersion(): number;
validateRecord(store: Store<R>, record: R, phase: 'initialize' | 'createRecord' | 'updateRecord' | 'tests', recordBefore: R | null): R;
migratePersistedRecord(record: R, persistedSchema: SerializedSchema, direction?: 'up' | 'down'): MigrationResult<R>;
validateRecord(store: Store<R>, record: R, phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord', recordBefore: null | R): R;
migratePersistedRecord(record: R, persistedSchema: SerializedSchema, direction?: 'down' | 'up'): MigrationResult<R>;
migrateStoreSnapshot(storeSnapshot: StoreSnapshot<R>, persistedSchema: SerializedSchema): MigrationResult<StoreSnapshot<R>>;
/* Excluded from this release type: ensureStoreIsUsable */
/* Excluded from this release type: createIntegrityChecker */
/* Excluded from this release type: derivePresenceState */
serialize(): SerializedSchema;

@@ -713,6 +746,7 @@ serializeEarliestVersion(): SerializedSchema;

record: R;
phase: 'initialize' | 'createRecord' | 'updateRecord' | 'tests';
recordBefore: R | null;
phase: 'createRecord' | 'initialize' | 'tests' | 'updateRecord';
recordBefore: null | R;
}) => R;
/* Excluded from this release type: ensureStoreIsUsable */
/* Excluded from this release type: createIntegrityChecker */
/* Excluded from this release type: derivePresenceState */
};

@@ -722,2 +756,3 @@

* A serialized snapshot of the record store's values.
*
* @public

@@ -742,7 +777,7 @@ */

} | {
gt: number;
} | {
neq: T;
} | {
gt: number;
};
export { }

@@ -6,2 +6,6 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {

@@ -15,7 +19,30 @@ if (from && typeof from === "object" || typeof from === "function") {

};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var src_exports = {};
__export(src_exports, {
IncrementalSetConstructor: () => import_IncrementalSetConstructor.IncrementalSetConstructor,
MigrationFailureReason: () => import_migrate.MigrationFailureReason,
RecordType: () => import_RecordType.RecordType,
Store: () => import_Store.Store,
StoreSchema: () => import_StoreSchema.StoreSchema,
assertIdType: () => import_RecordType.assertIdType,
compareRecordVersions: () => import_migrate.compareRecordVersions,
compareSchemas: () => import_compareSchemas.compareSchemas,
createRecordType: () => import_RecordType.createRecordType,
defineMigrations: () => import_migrate.defineMigrations,
devFreeze: () => import_devFreeze.devFreeze,
getRecordVersion: () => import_migrate.getRecordVersion,
migrate: () => import_migrate.migrate,
migrateRecord: () => import_migrate.migrateRecord,
reverseRecordsDiff: () => import_Store.reverseRecordsDiff,
squashRecordDiffs: () => import_Store.squashRecordDiffs
});
module.exports = __toCommonJS(src_exports);
__reExport(src_exports, require("./lib"), module.exports);
var import_IncrementalSetConstructor = require("./lib/IncrementalSetConstructor");
var import_RecordType = require("./lib/RecordType");
var import_Store = require("./lib/Store");
var import_StoreSchema = require("./lib/StoreSchema");
var import_compareSchemas = require("./lib/compareSchemas");
var import_devFreeze = require("./lib/devFreeze");
var import_migrate = require("./lib/migrate");
//# sourceMappingURL=index.js.map

@@ -58,3 +58,2 @@ "use strict";

* @param wasAlreadyPresent - Whether the item was already present in the set.
*
* @internal

@@ -77,3 +76,2 @@ */

* @param item - The item to add.
*
* @public

@@ -99,3 +97,2 @@ */

* @param wasAlreadyPresent - Whether the item was already present in the set.
*
* @internal

@@ -118,3 +115,2 @@ */

* @param item - The item to remove.
*
* @public

@@ -121,0 +117,0 @@ */

@@ -34,2 +34,3 @@ "use strict";

this.validator = config.validator ?? { validate: (r) => r };
this.scope = config.scope ?? "document";
}

@@ -39,2 +40,3 @@ createDefaultProperties;

validator;
scope;
/**

@@ -44,3 +46,2 @@ * Create a new record of this type.

* @param properties - The properties of the record.
*
* @returns The new record.

@@ -62,4 +63,4 @@ */

* @param record - The record to clone.
* @returns The cloned record.
* @public
* @returns The cloned record.
*/

@@ -73,2 +74,3 @@ clone(record) {

* @example
*
* ```ts

@@ -78,4 +80,4 @@ * const id = recordType.createId()

*
* @returns The new ID.
* @public
* @returns The new ID.
*/

@@ -89,4 +91,5 @@ createId() {

* @example
*
* ```ts
* const id = recordType.createCustomId("myId")
* const id = recordType.createCustomId('myId')
* ```

@@ -101,5 +104,18 @@ *

/**
* Takes an id like `user:123` and returns the part after the colon `123`
*
* @param id - The id
* @returns
*/
parseId(id) {
if (!this.isId(id)) {
throw new Error(`ID "${id}" is not a valid ID for type "${this.typeName}"`);
}
return id.slice(this.typeName.length + 1);
}
/**
* Check whether a record is an instance of this record type.
*
* @example
*
* ```ts

@@ -119,4 +135,5 @@ * const result = recordType.isInstance(someRecord)

* @example
*
* ```ts
* const result = recordType.isIn("someId")
* const result = recordType.isIn('someId')
* ```

@@ -137,5 +154,7 @@ *

/**
* Create a new RecordType that has the same type name as this RecordType and includes the given default properties.
* Create a new RecordType that has the same type name as this RecordType and includes the given
* default properties.
*
* @example
*
* ```ts

@@ -147,3 +166,2 @@ * const authorType = createRecordType('author', () => ({ living: true }))

* @param fn - A function that returns the default properties of the new RecordType.
*
* @returns The new RecordType.

@@ -155,9 +173,9 @@ */

migrations: this.migrations,
validator: this.validator
validator: this.validator,
scope: this.scope
});
}
/**
* Check that the passed in record passes the validations for this type.
* Returns its input correctly typed if it does, but throws an error
* otherwise.
* Check that the passed in record passes the validations for this type. Returns its input
* correctly typed if it does, but throws an error otherwise.
*/

@@ -172,3 +190,4 @@ validate(record) {

migrations: config.migrations ?? { currentVersion: 0, firstVersion: 0, migrators: {} },
validator: config.validator
validator: config.validator,
scope: config.scope
});

@@ -175,0 +194,0 @@ }

@@ -26,2 +26,3 @@ "use strict";

module.exports = __toCommonJS(Store_exports);
var import_utils = require("@tldraw/utils");
var import_signia = require("signia");

@@ -68,4 +69,4 @@ var import_Cache = require("./Cache");

/**
* A reactor that responds to changes to the history by squashing the
* accumulated history and notifying listeners of the changes.
* A reactor that responds to changes to the history by squashing the accumulated history and
* notifying listeners of the changes.
*

@@ -97,3 +98,3 @@ * @internal

},
{ scheduleEffect: (cb) => requestAnimationFrame(cb) }
{ scheduleEffect: (cb) => (0, import_utils.throttledRaf)(cb) }
);

@@ -128,4 +129,4 @@ }

/**
* A callback fired after a record is created. Use this to perform
* related updates to other records in the store.
* A callback fired after a record is created. Use this to perform related updates to other
* records in the store.
*

@@ -301,3 +302,14 @@ * @param record - The record to be created

/**
* Opposite of `serialize`. Replace the store's current records with records as defined by a simple JSON structure into the stores.
* The same as `serialize`, but only serializes records with a scope of `document`.
* @returns The record store snapshot as a JSON payload.
*/
serializeDocumentState = () => {
return this.serialize((r) => {
const type = this.schema.types[r.typeName];
return type.scope === "document";
});
};
/**
* Opposite of `serialize`. Replace the store's current records with records as defined by a
* simple JSON structure into the stores.
*

@@ -316,4 +328,4 @@ * @param snapshot - The JSON snapshot to deserialize.

*
* @returns An array of all values in the store.
* @public
* @returns An array of all values in the store.
*/

@@ -332,3 +344,4 @@ allRecords = () => {

/**
* Update a record. To update multiple records at once, use the `update` method of the `TypedStore` class.
* Update a record. To update multiple records at once, use the `update` method of the
* `TypedStore` class.
*

@@ -471,5 +484,7 @@ * @param id - The id of the record to update.

};
_integrityChecker;
/** @internal */
ensureStoreIsUsable() {
this.schema.ensureStoreIsUsable(this);
this._integrityChecker ??= this.schema.createIntegrityChecker(this);
this._integrityChecker?.();
}

@@ -580,13 +595,3 @@ _isPossiblyCorrupted = false;

}
/**
* Ensure that the store is usable. A class that extends this store should override this method.
*
* @param config - The configuration object. This can be any object that allows the store to validate that it is usable; the extending class should specify the type.
*
* @public
*/
ensureStoreIsUsable(_config = {}) {
return;
}
}
//# sourceMappingURL=Store.js.map

@@ -60,3 +60,2 @@ "use strict";

* @param typeName - The name of the type to filter by.
*
* @returns A derivation that returns the ids of all records of the given type.

@@ -144,3 +143,2 @@ * @public

* @param property - The name of the property.
*
* @public

@@ -162,3 +160,2 @@ */

* @param property - The name of the property?.
*
* @internal

@@ -165,0 +162,0 @@ */

@@ -150,5 +150,9 @@ "use strict";

/** @internal */
ensureStoreIsUsable(store) {
this.options.ensureStoreIsUsable?.(store);
createIntegrityChecker(store) {
return this.options.createIntegrityChecker?.(store) ?? void 0;
}
/** @internal */
derivePresenceState(store) {
return this.options.derivePresenceState?.(store);
}
serialize() {

@@ -155,0 +159,0 @@ return {

{
"name": "@tldraw/tlstore",
"description": "A tiny little drawing app (store).",
"version": "2.0.0-canary.9fa4f176",
"version": "2.0.0-canary.a1e72014c65a",
"packageManager": "yarn@3.5.0",
"author": {

@@ -29,21 +30,20 @@ "name": "tldraw GB Ltd.",

"files": [
"dist-esm/**/*",
"dist-cjs/**/*"
"dist-esm",
"dist-cjs",
"src"
],
"scripts": {
"test": "yarn run -T jest",
"test:coverage": "yarn run -T jest --coverage",
"typecheck": "yarn run -T tsc --build",
"build": "echo 'build should be run by turbo'",
"build:package": "yarn run -T tsx ../../scripts/build-package.ts",
"build:types": "yarn run -T tsx ../../scripts/build-types.ts",
"build:api": "yarn run -T tsx ../../scripts/build-api.ts",
"test": "lazy inherit",
"test-coverage": "lazy inherit",
"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",
"postpack": "../../scripts/postpack.sh",
"pack-tarball": "yarn pack",
"lint": "yarn run -T tsx ../../scripts/lint.ts"
},
"dependencies": {
"@tldraw/utils": "2.0.0-canary.9fa4f176",
"@tldraw/utils": "2.0.0-canary.a1e72014c65a",
"lodash.isequal": "^4.5.0",
"nanoid": "^3.0.0"
"nanoid": "4.0.2"
},

@@ -56,2 +56,3 @@ "peerDependencies": {

"@types/lodash.isequal": "^4.5.6",
"lazyrepo": "0.0.0-alpha.26",
"raf": "^3.4.1"

@@ -58,0 +59,0 @@ },

@@ -7,3 +7,3 @@ # @tldraw/tlstore

`tlstore` is used by [tldraw](https://tldraw.com) to store its data.
`tlstore` is used by [tldraw](https://www.tldraw.com) to store its data.

@@ -352,1 +352,5 @@ It is designed to be used with `tlstate` (@tldraw/tlstate).

A diff describing the changes to a collection.
## License
The source code in this repository (as well as our 2.0+ distributions and releases) are currently licensed under Apache-2.0. These licenses are subject to change in our upcoming 2.0 release. If you are planning to use tldraw in a commercial product, please reach out at [hello@tldraw.com](mailto://hello@tldraw.com).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc