@blocksuite/store
Advanced tools
Comparing version 0.0.0-canary-20240904001311 to 0.0.0-canary-20240904094417
@@ -38,2 +38,3 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { | ||
import { AwarenessEngine, BlobEngine, DocEngine, MemoryBlobSource, NoopDocSource, } from '@blocksuite/sync'; | ||
import clonedeep from 'lodash.clonedeep'; | ||
import merge from 'lodash.merge'; | ||
@@ -93,3 +94,3 @@ import { Awareness } from 'y-protocols/awareness.js'; | ||
this.doc = new BlockSuiteDoc({ guid: id }); | ||
this.awarenessStore = new AwarenessStore(new Awareness(this.doc), merge({ ...FLAGS_PRESET }, defaultFlags)); | ||
this.awarenessStore = new AwarenessStore(new Awareness(this.doc), merge(clonedeep(FLAGS_PRESET), defaultFlags)); | ||
this.awarenessSync = new AwarenessEngine(this.awarenessStore.awareness, awarenessSources); | ||
@@ -96,0 +97,0 @@ this.docSync = new DocEngine(this.doc, docSources.main, docSources.shadows ?? [], logger); |
import { Slot } from '@blocksuite/global/utils'; | ||
import { signal } from '@preact/signals-core'; | ||
import clonedeep from 'lodash.clonedeep'; | ||
import merge from 'lodash.merge'; | ||
@@ -42,3 +43,3 @@ export class AwarenessStore { | ||
const upstreamFlags = this.awareness.getLocalState()?.flags; | ||
const flags = { ...defaultFlags }; | ||
const flags = clonedeep(defaultFlags); | ||
if (upstreamFlags) { | ||
@@ -45,0 +46,0 @@ merge(flags, upstreamFlags); |
{ | ||
"name": "@blocksuite/store", | ||
"version": "0.0.0-canary-20240904001311", | ||
"version": "0.0.0-canary-20240904094417", | ||
"description": "BlockSuite data store built for general purpose state management.", | ||
@@ -16,2 +16,3 @@ "type": "module", | ||
"lib0": "^0.2.97", | ||
"lodash.clonedeep": "^4.5.0", | ||
"lodash.ismatch": "^4.4.0", | ||
@@ -23,7 +24,8 @@ "lodash.merge": "^4.6.2", | ||
"zod": "^3.23.8", | ||
"@blocksuite/global": "0.0.0-canary-20240904001311", | ||
"@blocksuite/inline": "0.0.0-canary-20240904001311", | ||
"@blocksuite/sync": "0.0.0-canary-20240904001311" | ||
"@blocksuite/global": "0.0.0-canary-20240904094417", | ||
"@blocksuite/inline": "0.0.0-canary-20240904094417", | ||
"@blocksuite/sync": "0.0.0-canary-20240904094417" | ||
}, | ||
"devDependencies": { | ||
"@types/lodash.clonedeep": "^4.5.9", | ||
"@types/lodash.merge": "^4.6.9", | ||
@@ -30,0 +32,0 @@ "lit": "^3.2.0", |
@@ -13,2 +13,3 @@ import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions'; | ||
} from '@blocksuite/sync'; | ||
import clonedeep from 'lodash.clonedeep'; | ||
import merge from 'lodash.merge'; | ||
@@ -122,3 +123,3 @@ import { Awareness } from 'y-protocols/awareness.js'; | ||
new Awareness<RawAwarenessState>(this.doc), | ||
merge({ ...FLAGS_PRESET }, defaultFlags) | ||
merge(clonedeep(FLAGS_PRESET), defaultFlags) | ||
); | ||
@@ -125,0 +126,0 @@ |
@@ -5,2 +5,3 @@ import type { Awareness as YAwareness } from 'y-protocols/awareness.js'; | ||
import { type Signal, signal } from '@preact/signals-core'; | ||
import clonedeep from 'lodash.clonedeep'; | ||
import merge from 'lodash.merge'; | ||
@@ -91,3 +92,3 @@ | ||
const upstreamFlags = this.awareness.getLocalState()?.flags; | ||
const flags = { ...defaultFlags }; | ||
const flags = clonedeep(defaultFlags); | ||
if (upstreamFlags) { | ||
@@ -94,0 +95,0 @@ merge(flags, upstreamFlags); |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
773753
11380
16
4
+ Addedlodash.clonedeep@^4.5.0
+ Added@blocksuite/global@0.0.0-canary-20240904094417(transitive)
+ Added@blocksuite/inline@0.0.0-canary-20240904094417(transitive)
+ Added@blocksuite/sync@0.0.0-canary-20240904094417(transitive)
+ Addedlodash.clonedeep@4.5.0(transitive)
- Removed@blocksuite/global@0.0.0-canary-20240904001311(transitive)
- Removed@blocksuite/inline@0.0.0-canary-20240904001311(transitive)
- Removed@blocksuite/sync@0.0.0-canary-20240904001311(transitive)