@tldraw/store 3.15.0-next.f1dfcef63951 → 3.15.1
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/README.md +2 -2
- package/dist-cjs/index.js +4 -4
- package/dist-cjs/index.js.map +2 -2
- package/dist-esm/index.mjs +13 -13
- package/dist-esm/index.mjs.map +2 -2
- package/package.json +5 -4
- package/src/index.ts +20 -20
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ const tolkeinId = Author.createCustomId('tolkein')
|
|
|
44
44
|
|
|
45
45
|
store.put([
|
|
46
46
|
Author.create({
|
|
47
|
-
id:
|
|
47
|
+
id: tolkeinId,
|
|
48
48
|
name: 'J.R.R Tolkein',
|
|
49
49
|
}),
|
|
50
50
|
])
|
|
@@ -163,7 +163,7 @@ store.deserialize(serialized)
|
|
|
163
163
|
|
|
164
164
|
### `listen(listener: ((entry: HistoryEntry) => void): () => void`
|
|
165
165
|
|
|
166
|
-
Add a new listener to the store The store will call the function each time the history changes. Returns a function to remove the listener.
|
|
166
|
+
Add a new listener to the store. The store will call the function each time the history changes. Returns a function to remove the listener.
|
|
167
167
|
|
|
168
168
|
```ts
|
|
169
169
|
store.listen((entry) => doSomethingWith(entry))
|
package/dist-cjs/index.js
CHANGED
|
@@ -44,18 +44,18 @@ __export(index_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(index_exports);
|
|
45
45
|
var import_utils = require("@tldraw/utils");
|
|
46
46
|
var import_AtomMap = require("./lib/AtomMap");
|
|
47
|
+
var import_devFreeze = require("./lib/devFreeze");
|
|
47
48
|
var import_IncrementalSetConstructor = require("./lib/IncrementalSetConstructor");
|
|
48
|
-
var
|
|
49
|
+
var import_migrate = require("./lib/migrate");
|
|
49
50
|
var import_RecordsDiff = require("./lib/RecordsDiff");
|
|
51
|
+
var import_RecordType = require("./lib/RecordType");
|
|
50
52
|
var import_Store = require("./lib/Store");
|
|
51
53
|
var import_StoreQueries = require("./lib/StoreQueries");
|
|
52
54
|
var import_StoreSchema = require("./lib/StoreSchema");
|
|
53
55
|
var import_StoreSideEffects = require("./lib/StoreSideEffects");
|
|
54
|
-
var import_devFreeze = require("./lib/devFreeze");
|
|
55
|
-
var import_migrate = require("./lib/migrate");
|
|
56
56
|
(0, import_utils.registerTldrawLibraryVersion)(
|
|
57
57
|
"@tldraw/store",
|
|
58
|
-
"3.15.
|
|
58
|
+
"3.15.1",
|
|
59
59
|
"cjs"
|
|
60
60
|
);
|
|
61
61
|
//# sourceMappingURL=index.js.map
|
package/dist-cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\nexport { AtomMap } from './lib/AtomMap'\nexport type { BaseRecord, IdOf, RecordId, UnknownRecord } from './lib/BaseRecord'\nexport { IncrementalSetConstructor } from './lib/IncrementalSetConstructor'\nexport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6C;AAC7C,qBAAwB;AAExB,uCAA0C;AAC1C,
|
|
4
|
+
"sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\nexport { AtomMap } from './lib/AtomMap'\nexport type { BaseRecord, IdOf, RecordId, UnknownRecord } from './lib/BaseRecord'\nexport { devFreeze } from './lib/devFreeze'\nexport { type QueryExpression, type QueryValueMatcher } from './lib/executeQuery'\nexport { IncrementalSetConstructor } from './lib/IncrementalSetConstructor'\nexport {\n\tcreateMigrationIds,\n\tcreateMigrationSequence,\n\tcreateRecordMigrationSequence,\n\tdefineMigrations,\n\tMigrationFailureReason,\n\tparseMigrationId,\n\ttype LegacyBaseMigrationsInfo,\n\ttype LegacyMigration,\n\ttype LegacyMigrations,\n\ttype Migration,\n\ttype MigrationId,\n\ttype MigrationResult,\n\ttype MigrationSequence,\n\ttype StandaloneDependsOn,\n} from './lib/migrate'\nexport {\n\tcreateEmptyRecordsDiff,\n\tisRecordsDiffEmpty,\n\treverseRecordsDiff,\n\tsquashRecordDiffs,\n\tsquashRecordDiffsMutable,\n\ttype RecordsDiff,\n} from './lib/RecordsDiff'\nexport { assertIdType, createRecordType, RecordType, type RecordScope } from './lib/RecordType'\nexport {\n\tcreateComputedCache,\n\tStore,\n\ttype ChangeSource,\n\ttype CollectionDiff,\n\ttype ComputedCache,\n\ttype CreateComputedCacheOpts,\n\ttype HistoryEntry,\n\ttype RecordFromId,\n\ttype SerializedStore,\n\ttype StoreError,\n\ttype StoreListener,\n\ttype StoreListenerFilters,\n\ttype StoreObject,\n\ttype StoreObjectRecordType,\n\ttype StoreRecord,\n\ttype StoreSnapshot,\n\ttype StoreValidator,\n\ttype StoreValidators,\n} from './lib/Store'\nexport { StoreQueries, type RSIndex, type RSIndexDiff, type RSIndexMap } from './lib/StoreQueries'\nexport { StoreSchema, type StoreValidationFailure } from './lib/StoreSchema'\nexport type {\n\tSerializedSchema,\n\tSerializedSchemaV1,\n\tSerializedSchemaV2,\n\tStoreSchemaOptions,\n} from './lib/StoreSchema'\nexport {\n\tStoreSideEffects,\n\ttype StoreAfterChangeHandler,\n\ttype StoreAfterCreateHandler,\n\ttype StoreAfterDeleteHandler,\n\ttype StoreBeforeChangeHandler,\n\ttype StoreBeforeCreateHandler,\n\ttype StoreBeforeDeleteHandler,\n\ttype StoreOperationCompleteHandler,\n} from './lib/StoreSideEffects'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6C;AAC7C,qBAAwB;AAExB,uBAA0B;AAE1B,uCAA0C;AAC1C,qBAeO;AACP,yBAOO;AACP,wBAA6E;AAC7E,mBAmBO;AACP,0BAA8E;AAC9E,yBAAyD;AAOzD,8BASO;AAAA,IAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist-esm/index.mjs
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { registerTldrawLibraryVersion } from "@tldraw/utils";
|
|
2
2
|
import { AtomMap } from "./lib/AtomMap.mjs";
|
|
3
|
+
import { devFreeze } from "./lib/devFreeze.mjs";
|
|
3
4
|
import { IncrementalSetConstructor } from "./lib/IncrementalSetConstructor.mjs";
|
|
4
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
createMigrationIds,
|
|
7
|
+
createMigrationSequence,
|
|
8
|
+
createRecordMigrationSequence,
|
|
9
|
+
defineMigrations,
|
|
10
|
+
MigrationFailureReason,
|
|
11
|
+
parseMigrationId
|
|
12
|
+
} from "./lib/migrate.mjs";
|
|
5
13
|
import {
|
|
6
14
|
createEmptyRecordsDiff,
|
|
7
15
|
isRecordsDiffEmpty,
|
|
@@ -9,27 +17,19 @@ import {
|
|
|
9
17
|
squashRecordDiffs,
|
|
10
18
|
squashRecordDiffsMutable
|
|
11
19
|
} from "./lib/RecordsDiff.mjs";
|
|
20
|
+
import { assertIdType, createRecordType, RecordType } from "./lib/RecordType.mjs";
|
|
12
21
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
createComputedCache,
|
|
23
|
+
Store
|
|
15
24
|
} from "./lib/Store.mjs";
|
|
16
25
|
import { StoreQueries } from "./lib/StoreQueries.mjs";
|
|
17
26
|
import { StoreSchema } from "./lib/StoreSchema.mjs";
|
|
18
27
|
import {
|
|
19
28
|
StoreSideEffects
|
|
20
29
|
} from "./lib/StoreSideEffects.mjs";
|
|
21
|
-
import { devFreeze } from "./lib/devFreeze.mjs";
|
|
22
|
-
import {
|
|
23
|
-
MigrationFailureReason,
|
|
24
|
-
createMigrationIds,
|
|
25
|
-
createMigrationSequence,
|
|
26
|
-
createRecordMigrationSequence,
|
|
27
|
-
defineMigrations,
|
|
28
|
-
parseMigrationId
|
|
29
|
-
} from "./lib/migrate.mjs";
|
|
30
30
|
registerTldrawLibraryVersion(
|
|
31
31
|
"@tldraw/store",
|
|
32
|
-
"3.15.
|
|
32
|
+
"3.15.1",
|
|
33
33
|
"esm"
|
|
34
34
|
);
|
|
35
35
|
export {
|
package/dist-esm/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\nexport { AtomMap } from './lib/AtomMap'\nexport type { BaseRecord, IdOf, RecordId, UnknownRecord } from './lib/BaseRecord'\nexport { IncrementalSetConstructor } from './lib/IncrementalSetConstructor'\nexport {
|
|
5
|
-
"mappings": "AAAA,SAAS,oCAAoC;AAC7C,SAAS,eAAe;AAExB,SAAS,
|
|
4
|
+
"sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\nexport { AtomMap } from './lib/AtomMap'\nexport type { BaseRecord, IdOf, RecordId, UnknownRecord } from './lib/BaseRecord'\nexport { devFreeze } from './lib/devFreeze'\nexport { type QueryExpression, type QueryValueMatcher } from './lib/executeQuery'\nexport { IncrementalSetConstructor } from './lib/IncrementalSetConstructor'\nexport {\n\tcreateMigrationIds,\n\tcreateMigrationSequence,\n\tcreateRecordMigrationSequence,\n\tdefineMigrations,\n\tMigrationFailureReason,\n\tparseMigrationId,\n\ttype LegacyBaseMigrationsInfo,\n\ttype LegacyMigration,\n\ttype LegacyMigrations,\n\ttype Migration,\n\ttype MigrationId,\n\ttype MigrationResult,\n\ttype MigrationSequence,\n\ttype StandaloneDependsOn,\n} from './lib/migrate'\nexport {\n\tcreateEmptyRecordsDiff,\n\tisRecordsDiffEmpty,\n\treverseRecordsDiff,\n\tsquashRecordDiffs,\n\tsquashRecordDiffsMutable,\n\ttype RecordsDiff,\n} from './lib/RecordsDiff'\nexport { assertIdType, createRecordType, RecordType, type RecordScope } from './lib/RecordType'\nexport {\n\tcreateComputedCache,\n\tStore,\n\ttype ChangeSource,\n\ttype CollectionDiff,\n\ttype ComputedCache,\n\ttype CreateComputedCacheOpts,\n\ttype HistoryEntry,\n\ttype RecordFromId,\n\ttype SerializedStore,\n\ttype StoreError,\n\ttype StoreListener,\n\ttype StoreListenerFilters,\n\ttype StoreObject,\n\ttype StoreObjectRecordType,\n\ttype StoreRecord,\n\ttype StoreSnapshot,\n\ttype StoreValidator,\n\ttype StoreValidators,\n} from './lib/Store'\nexport { StoreQueries, type RSIndex, type RSIndexDiff, type RSIndexMap } from './lib/StoreQueries'\nexport { StoreSchema, type StoreValidationFailure } from './lib/StoreSchema'\nexport type {\n\tSerializedSchema,\n\tSerializedSchemaV1,\n\tSerializedSchemaV2,\n\tStoreSchemaOptions,\n} from './lib/StoreSchema'\nexport {\n\tStoreSideEffects,\n\ttype StoreAfterChangeHandler,\n\ttype StoreAfterCreateHandler,\n\ttype StoreAfterDeleteHandler,\n\ttype StoreBeforeChangeHandler,\n\ttype StoreBeforeCreateHandler,\n\ttype StoreBeforeDeleteHandler,\n\ttype StoreOperationCompleteHandler,\n} from './lib/StoreSideEffects'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,oCAAoC;AAC7C,SAAS,eAAe;AAExB,SAAS,iBAAiB;AAE1B,SAAS,iCAAiC;AAC1C;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OASM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEM;AACP,SAAS,cAAc,kBAAkB,kBAAoC;AAC7E;AAAA,EACC;AAAA,EACA;AAAA,OAiBM;AACP,SAAS,oBAAqE;AAC9E,SAAS,mBAAgD;AAOzD;AAAA,EACC;AAAA,OAQM;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tldraw/store",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "3.15.
|
|
3
|
+
"description": "tldraw infinite canvas SDK (store).",
|
|
4
|
+
"version": "3.15.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"tldraw",
|
|
20
|
+
"sdk",
|
|
20
21
|
"drawing",
|
|
21
22
|
"app",
|
|
22
23
|
"development",
|
|
@@ -42,8 +43,8 @@
|
|
|
42
43
|
"lint": "yarn run -T tsx ../../internal/scripts/lint.ts"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
|
-
"@tldraw/state": "3.15.
|
|
46
|
-
"@tldraw/utils": "3.15.
|
|
46
|
+
"@tldraw/state": "3.15.1",
|
|
47
|
+
"@tldraw/utils": "3.15.1"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"react": "^18.2.0 || ^19.0.0"
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { registerTldrawLibraryVersion } from '@tldraw/utils'
|
|
2
2
|
export { AtomMap } from './lib/AtomMap'
|
|
3
3
|
export type { BaseRecord, IdOf, RecordId, UnknownRecord } from './lib/BaseRecord'
|
|
4
|
+
export { devFreeze } from './lib/devFreeze'
|
|
5
|
+
export { type QueryExpression, type QueryValueMatcher } from './lib/executeQuery'
|
|
4
6
|
export { IncrementalSetConstructor } from './lib/IncrementalSetConstructor'
|
|
5
|
-
export {
|
|
7
|
+
export {
|
|
8
|
+
createMigrationIds,
|
|
9
|
+
createMigrationSequence,
|
|
10
|
+
createRecordMigrationSequence,
|
|
11
|
+
defineMigrations,
|
|
12
|
+
MigrationFailureReason,
|
|
13
|
+
parseMigrationId,
|
|
14
|
+
type LegacyBaseMigrationsInfo,
|
|
15
|
+
type LegacyMigration,
|
|
16
|
+
type LegacyMigrations,
|
|
17
|
+
type Migration,
|
|
18
|
+
type MigrationId,
|
|
19
|
+
type MigrationResult,
|
|
20
|
+
type MigrationSequence,
|
|
21
|
+
type StandaloneDependsOn,
|
|
22
|
+
} from './lib/migrate'
|
|
6
23
|
export {
|
|
7
24
|
createEmptyRecordsDiff,
|
|
8
25
|
isRecordsDiffEmpty,
|
|
@@ -11,9 +28,10 @@ export {
|
|
|
11
28
|
squashRecordDiffsMutable,
|
|
12
29
|
type RecordsDiff,
|
|
13
30
|
} from './lib/RecordsDiff'
|
|
31
|
+
export { assertIdType, createRecordType, RecordType, type RecordScope } from './lib/RecordType'
|
|
14
32
|
export {
|
|
15
|
-
Store,
|
|
16
33
|
createComputedCache,
|
|
34
|
+
Store,
|
|
17
35
|
type ChangeSource,
|
|
18
36
|
type CollectionDiff,
|
|
19
37
|
type ComputedCache,
|
|
@@ -49,24 +67,6 @@ export {
|
|
|
49
67
|
type StoreBeforeDeleteHandler,
|
|
50
68
|
type StoreOperationCompleteHandler,
|
|
51
69
|
} from './lib/StoreSideEffects'
|
|
52
|
-
export { devFreeze } from './lib/devFreeze'
|
|
53
|
-
export { type QueryExpression, type QueryValueMatcher } from './lib/executeQuery'
|
|
54
|
-
export {
|
|
55
|
-
MigrationFailureReason,
|
|
56
|
-
createMigrationIds,
|
|
57
|
-
createMigrationSequence,
|
|
58
|
-
createRecordMigrationSequence,
|
|
59
|
-
defineMigrations,
|
|
60
|
-
parseMigrationId,
|
|
61
|
-
type LegacyBaseMigrationsInfo,
|
|
62
|
-
type LegacyMigration,
|
|
63
|
-
type LegacyMigrations,
|
|
64
|
-
type Migration,
|
|
65
|
-
type MigrationId,
|
|
66
|
-
type MigrationResult,
|
|
67
|
-
type MigrationSequence,
|
|
68
|
-
type StandaloneDependsOn,
|
|
69
|
-
} from './lib/migrate'
|
|
70
70
|
|
|
71
71
|
registerTldrawLibraryVersion(
|
|
72
72
|
(globalThis as any).TLDRAW_LIBRARY_NAME,
|