@blocksuite/block-std
Advanced tools
Comparing version 0.0.0-20230916185147-0c6fecc0-nightly to 0.0.0-20230917124854-21f7463c-nightly
@@ -6,3 +6,3 @@ import type { BlockStdProvider } from '../provider/index.js'; | ||
export type CommandKeyToData<K extends BlockSuite.CommandDataName> = Pick<BlockSuite.CommandData, K>; | ||
export type Command<In extends BlockSuite.CommandDataName = never, Out extends BlockSuite.CommandDataName = never, InData extends object = {}> = (ctx: CommandKeyToData<In> & InitCommandCtx & InData, next: (ctx?: CommandKeyToData<Out>) => Promise<void>) => Promise<void>; | ||
export type Command<In extends BlockSuite.CommandDataName = never, Out extends BlockSuite.CommandDataName = never, InData extends object = {}> = (ctx: CommandKeyToData<In> & InitCommandCtx & InData, next: (ctx?: CommandKeyToData<Out>) => Promise<void>) => void | Promise<void>; | ||
type Omit1<A, B> = [keyof Omit<A, keyof B>] extends [never] ? void : Omit<A, keyof B>; | ||
@@ -9,0 +9,0 @@ type InDataOfCommand<C> = C extends Command<infer K, any, infer R> ? CommandKeyToData<K> & R : never; |
@@ -42,3 +42,3 @@ const cmdSymbol = Symbol('cmds'); | ||
for (const chain of chains) { | ||
chain.run(); | ||
await chain.run(); | ||
if (success) { | ||
@@ -45,0 +45,0 @@ await next(); |
import type { Page, Workspace } from '@blocksuite/store'; | ||
import { Clipboard } from '../clipboard/index.js'; | ||
import { CommandManager } from '../command/index.js'; | ||
@@ -21,2 +22,3 @@ import { UIEventDispatcher } from '../event/index.js'; | ||
readonly view: ViewStore<NodeView>; | ||
readonly clipboard: Clipboard; | ||
constructor(options: BlockStdProviderOptions); | ||
@@ -23,0 +25,0 @@ mount(): void; |
@@ -0,1 +1,2 @@ | ||
import { Clipboard } from '../clipboard/index.js'; | ||
import { CommandManager } from '../command/index.js'; | ||
@@ -16,2 +17,3 @@ import { UIEventDispatcher } from '../event/index.js'; | ||
this.view = new ViewStore(this); | ||
this.clipboard = new Clipboard(this); | ||
} | ||
@@ -18,0 +20,0 @@ mount() { |
{ | ||
"name": "@blocksuite/block-std", | ||
"version": "0.0.0-20230916185147-0c6fecc0-nightly", | ||
"version": "0.0.0-20230917124854-21f7463c-nightly", | ||
"description": "Std for blocksuite blocks", | ||
@@ -11,3 +11,3 @@ "type": "module", | ||
"peerDependencies": { | ||
"@blocksuite/store": "0.0.0-20230916185147-0c6fecc0-nightly" | ||
"@blocksuite/store": "0.0.0-20230917124854-21f7463c-nightly" | ||
}, | ||
@@ -17,6 +17,6 @@ "dependencies": { | ||
"zod": "^3.22.2", | ||
"@blocksuite/global": "0.0.0-20230916185147-0c6fecc0-nightly" | ||
"@blocksuite/global": "0.0.0-20230917124854-21f7463c-nightly" | ||
}, | ||
"devDependencies": { | ||
"@blocksuite/store": "0.0.0-20230916185147-0c6fecc0-nightly" | ||
"@blocksuite/store": "0.0.0-20230917124854-21f7463c-nightly" | ||
}, | ||
@@ -23,0 +23,0 @@ "exports": { |
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
169943
2130
+ Added@blocksuite/global@0.0.0-20230917124854-21f7463c-nightly(transitive)
+ Added@blocksuite/store@0.0.0-20230917124854-21f7463c-nightly(transitive)
+ Added@blocksuite/virgo@0.0.0-20230917124854-21f7463c-nightly(transitive)
- Removed@blocksuite/global@0.0.0-20230916185147-0c6fecc0-nightly(transitive)
- Removed@blocksuite/store@0.0.0-20230916185147-0c6fecc0-nightly(transitive)
- Removed@blocksuite/virgo@0.0.0-20230916185147-0c6fecc0-nightly(transitive)
Updated@blocksuite/global@0.0.0-20230917124854-21f7463c-nightly