@blocksuite/store
Advanced tools
Comparing version 0.4.0-20230201063624-4e0463b to 0.4.0-20230201220903-262005c
import * as Y from 'yjs'; | ||
import { ProxyConfig } from './proxy.js'; | ||
import type { Transaction } from 'yjs'; | ||
export type BlockSuiteDocAllowedValue = Record<string, unknown> | unknown[] | Y.Text; | ||
@@ -7,3 +8,4 @@ export type BlockSuiteDocData = Record<string, BlockSuiteDocAllowedValue>; | ||
getMapProxy<Key extends keyof Data & string, Value extends Record<string, unknown> = Data[Key] extends Record<string, unknown> ? Data[Key] : never>(key: Key, config?: ProxyConfig<Value>): Value; | ||
transact(f: (arg0: Transaction) => void, origin?: number): void; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
@@ -0,3 +1,10 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
import * as Y from 'yjs'; | ||
import { createYMapProxy } from './proxy.js'; | ||
import { debug } from '@blocksuite/global/debug'; | ||
export class BlockSuiteDoc extends Y.Doc { | ||
@@ -8,3 +15,9 @@ getMapProxy(key, config) { | ||
} | ||
transact(f, origin) { | ||
super.transact(f, origin); | ||
} | ||
} | ||
__decorate([ | ||
debug('transact') | ||
], BlockSuiteDoc.prototype, "transact", null); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@blocksuite/store", | ||
"version": "0.4.0-20230201063624-4e0463b", | ||
"version": "0.4.0-20230201220903-262005c", | ||
"description": "BlockSuite data store built for general purpose state management.", | ||
@@ -11,3 +11,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@blocksuite/global": "0.4.0-20230201063624-4e0463b", | ||
"@blocksuite/global": "0.4.0-20230201220903-262005c", | ||
"@types/flexsearch": "^0.7.3", | ||
@@ -14,0 +14,0 @@ "buffer": "^6.0.3", |
import * as Y from 'yjs'; | ||
import { createYMapProxy, ProxyConfig } from './proxy.js'; | ||
import type { Transaction } from 'yjs'; | ||
import { debug } from '@blocksuite/global/debug'; | ||
@@ -25,2 +27,7 @@ export type BlockSuiteDocAllowedValue = | ||
} | ||
@debug('transact') | ||
transact(f: (arg0: Transaction) => void, origin?: number) { | ||
super.transact(f, origin); | ||
} | ||
} |
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
504448
8247
+ Added@blocksuite/global@0.4.0-20230201220903-262005c(transitive)
- Removed@blocksuite/global@0.4.0-20230201063624-4e0463b(transitive)