@tldraw/store
Advanced tools
Comparing version 3.7.0-canary.38289a975950 to 3.7.0-canary.383dfd14bf86
import { Atom } from '@tldraw/state'; | ||
import { Computed } from '@tldraw/state'; | ||
import { Expand } from '@tldraw/utils'; | ||
import { Result } from '@tldraw/utils'; | ||
@@ -323,3 +324,3 @@ | ||
*/ | ||
create(properties: Pick<R, RequiredProperties> & Omit<Partial<R>, RequiredProperties>): R; | ||
create(properties: Expand<Pick<R, RequiredProperties> & Omit<Partial<R>, RequiredProperties>>): R; | ||
/** | ||
@@ -685,3 +686,3 @@ * Clone a record of this type. | ||
* @param derive - A function used to derive the value of the cache. | ||
* @param isEqual - A function that determins equality between two records. | ||
* @param isEqual - A function that determines equality between two records. | ||
* @public | ||
@@ -688,0 +689,0 @@ */ |
@@ -56,5 +56,5 @@ "use strict"; | ||
"@tldraw/store", | ||
"3.7.0-canary.38289a975950", | ||
"3.7.0-canary.383dfd14bf86", | ||
"cjs" | ||
); | ||
//# sourceMappingURL=index.js.map |
@@ -474,6 +474,7 @@ "use strict"; | ||
}; | ||
this.listeners.add(listener); | ||
if (!this.historyReactor.scheduler.isActivelyListening) { | ||
this.historyReactor.start(); | ||
this.historyReactor.scheduler.execute(); | ||
} | ||
this.listeners.add(listener); | ||
return () => { | ||
@@ -562,3 +563,3 @@ this.listeners.delete(listener); | ||
* @param derive - A function used to derive the value of the cache. | ||
* @param isEqual - A function that determins equality between two records. | ||
* @param isEqual - A function that determines equality between two records. | ||
* @public | ||
@@ -565,0 +566,0 @@ */ |
{ | ||
"name": "@tldraw/store", | ||
"description": "A tiny little drawing app (store).", | ||
"version": "3.7.0-canary.38289a975950", | ||
"version": "3.7.0-canary.383dfd14bf86", | ||
"author": { | ||
@@ -45,4 +45,4 @@ "name": "tldraw Inc.", | ||
"dependencies": { | ||
"@tldraw/state": "3.7.0-canary.38289a975950", | ||
"@tldraw/utils": "3.7.0-canary.38289a975950", | ||
"@tldraw/state": "3.7.0-canary.383dfd14bf86", | ||
"@tldraw/utils": "3.7.0-canary.383dfd14bf86", | ||
"lodash.isequal": "^4.5.0" | ||
@@ -49,0 +49,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
import { objectMapEntries, structuredClone, uniqueId } from '@tldraw/utils' | ||
import { Expand, objectMapEntries, structuredClone, uniqueId } from '@tldraw/utils' | ||
import { IdOf, UnknownRecord } from './BaseRecord' | ||
@@ -73,3 +73,5 @@ import { StoreValidator } from './Store' | ||
*/ | ||
create(properties: Pick<R, RequiredProperties> & Omit<Partial<R>, RequiredProperties>): R { | ||
create( | ||
properties: Expand<Pick<R, RequiredProperties> & Omit<Partial<R>, RequiredProperties>> | ||
): R { | ||
const result = { ...this.createDefaultProperties(), id: this.createId() } as any | ||
@@ -76,0 +78,0 @@ |
@@ -663,8 +663,9 @@ import { Atom, Computed, Reactor, atom, computed, reactor, transact } from '@tldraw/state' | ||
this.listeners.add(listener) | ||
if (!this.historyReactor.scheduler.isActivelyListening) { | ||
this.historyReactor.start() | ||
this.historyReactor.scheduler.execute() | ||
} | ||
this.listeners.add(listener) | ||
return () => { | ||
@@ -767,3 +768,3 @@ this.listeners.delete(listener) | ||
* @param derive - A function used to derive the value of the cache. | ||
* @param isEqual - A function that determins equality between two records. | ||
* @param isEqual - A function that determines equality between two records. | ||
* @public | ||
@@ -770,0 +771,0 @@ */ |
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
791768
12827
+ Added@tldraw/state@3.7.0-canary.383dfd14bf86(transitive)
+ Added@tldraw/utils@3.7.0-canary.383dfd14bf86(transitive)
- Removed@tldraw/state@3.7.0-canary.38289a975950(transitive)
- Removed@tldraw/utils@3.7.0-canary.38289a975950(transitive)