@blocksuite/global
Advanced tools
Comparing version 0.0.0-20230412114309-05fc8eec-nightly to 0.0.0-20230413112150-e058f87e-nightly
export * from './consts/affine-style-consts.js'; | ||
export * from './consts/block-hub.js'; | ||
export * from './consts/platform.js'; | ||
export declare const BLOCK_ID_ATTR = "data-block-id"; | ||
@@ -4,0 +5,0 @@ export declare const BLOCK_SERVICE_LOADING_ATTR = "data-service-loading"; |
@@ -0,3 +1,5 @@ | ||
import { SHORT_KEY } from './index.js'; | ||
export * from './consts/affine-style-consts.js'; | ||
export * from './consts/block-hub.js'; | ||
export * from './consts/platform.js'; | ||
export const BLOCK_ID_ATTR = 'data-block-id'; | ||
@@ -9,6 +11,6 @@ export const BLOCK_SERVICE_LOADING_ATTR = 'data-service-loading'; | ||
ANY_KEY: '*', | ||
UNDO: 'command+z,ctrl+z', | ||
REDO: 'command+shift+z,ctrl+shift+z,ctrl+y', | ||
UNDO: `${SHORT_KEY}+z`, | ||
REDO: `${SHORT_KEY}+shift+z,ctrl+y`, | ||
BACKSPACE: 'backspace', | ||
SELECT_ALL: 'command+a,ctrl+a', | ||
SELECT_ALL: `${SHORT_KEY}+a`, | ||
SHIFT_UP: 'shift+up', | ||
@@ -15,0 +17,0 @@ SHIFT_DOWN: 'shift+down', |
import { BulletedListIcon, CodeBlockIcon, DividerIcon, H1Icon, H2Icon, H3Icon, H4Icon, H5Icon, H6Icon, ImageIcon, NumberedListIcon, QuoteIcon, TextIcon, TodoIcon, } from '../icons.js'; | ||
import { SHORT_KEY } from './platform.js'; | ||
export const paragraphConfig = [ | ||
@@ -7,3 +8,3 @@ { | ||
name: 'Text', | ||
hotkey: 'command+option+0,ctrl+shift+0', | ||
hotkey: `${SHORT_KEY}+option+0,${SHORT_KEY}+shift+0`, | ||
icon: TextIcon, | ||
@@ -15,3 +16,3 @@ }, | ||
name: 'Heading 1', | ||
hotkey: 'command+option+1,ctrl+shift+1', | ||
hotkey: `${SHORT_KEY}+option+1,${SHORT_KEY}+shift+1`, | ||
icon: H1Icon, | ||
@@ -23,3 +24,3 @@ }, | ||
name: 'Heading 2', | ||
hotkey: 'command+option+2,ctrl+shift+2', | ||
hotkey: `${SHORT_KEY}+option+2,${SHORT_KEY}+shift+2`, | ||
icon: H2Icon, | ||
@@ -31,3 +32,3 @@ }, | ||
name: 'Heading 3', | ||
hotkey: 'command+option+3,ctrl+shift+3', | ||
hotkey: `${SHORT_KEY}+option+3,${SHORT_KEY}+shift+3`, | ||
icon: H3Icon, | ||
@@ -39,3 +40,3 @@ }, | ||
name: 'Heading 4', | ||
hotkey: 'command+option+4,ctrl+shift+4', | ||
hotkey: `${SHORT_KEY}+option+4,${SHORT_KEY}+shift+4`, | ||
icon: H4Icon, | ||
@@ -47,3 +48,3 @@ }, | ||
name: 'Heading 5', | ||
hotkey: 'command+option+5,ctrl+shift+5', | ||
hotkey: `${SHORT_KEY}+option+5,${SHORT_KEY}+shift+5`, | ||
icon: H5Icon, | ||
@@ -55,3 +56,3 @@ }, | ||
name: 'Heading 6', | ||
hotkey: 'command+option+6,ctrl+shift+6', | ||
hotkey: `${SHORT_KEY}+option+6,${SHORT_KEY}+shift+6`, | ||
icon: H6Icon, | ||
@@ -63,3 +64,3 @@ }, | ||
name: 'Bulleted List', | ||
hotkey: 'command+option+8,ctrl+shift+8', | ||
hotkey: `${SHORT_KEY}+option+8,${SHORT_KEY}+shift+8`, | ||
icon: BulletedListIcon, | ||
@@ -71,3 +72,3 @@ }, | ||
name: 'Numbered List', | ||
hotkey: 'command+option+9,ctrl+shift+9', | ||
hotkey: `${SHORT_KEY}+option+9,${SHORT_KEY}+shift+9`, | ||
icon: NumberedListIcon, | ||
@@ -86,3 +87,3 @@ }, | ||
name: 'Code Block', | ||
hotkey: 'command+option+c,ctrl+alt+c', | ||
hotkey: `command+option+c,ctrl+alt+c`, | ||
icon: CodeBlockIcon, | ||
@@ -101,3 +102,3 @@ }, | ||
name: 'Divider', | ||
hotkey: 'command+option+d,ctrl+shift+d', | ||
hotkey: `${SHORT_KEY}+option+d,${SHORT_KEY}+shift+d`, | ||
icon: DividerIcon, | ||
@@ -104,0 +105,0 @@ }, |
{ | ||
"name": "@blocksuite/global", | ||
"version": "0.0.0-20230412114309-05fc8eec-nightly", | ||
"version": "0.0.0-20230413112150-e058f87e-nightly", | ||
"types": "./index.d.ts", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -0,3 +1,6 @@ | ||
import { SHORT_KEY } from './index.js'; | ||
export * from './consts/affine-style-consts.js'; | ||
export * from './consts/block-hub.js'; | ||
export * from './consts/platform.js'; | ||
@@ -13,6 +16,6 @@ export const BLOCK_ID_ATTR = 'data-block-id'; | ||
ANY_KEY: '*', | ||
UNDO: 'command+z,ctrl+z', | ||
REDO: 'command+shift+z,ctrl+shift+z,ctrl+y', | ||
UNDO: `${SHORT_KEY}+z`, | ||
REDO: `${SHORT_KEY}+shift+z,ctrl+y`, | ||
BACKSPACE: 'backspace', | ||
SELECT_ALL: 'command+a,ctrl+a', | ||
SELECT_ALL: `${SHORT_KEY}+a`, | ||
SHIFT_UP: 'shift+up', | ||
@@ -19,0 +22,0 @@ SHIFT_DOWN: 'shift+down', |
@@ -20,2 +20,3 @@ import type { TemplateResult } from 'lit/html.js'; | ||
} from '../icons.js'; | ||
import { SHORT_KEY } from './platform.js'; | ||
@@ -39,3 +40,3 @@ export type BlockConfig< | ||
name: 'Text', | ||
hotkey: 'command+option+0,ctrl+shift+0', | ||
hotkey: `${SHORT_KEY}+option+0,${SHORT_KEY}+shift+0`, | ||
icon: TextIcon, | ||
@@ -47,3 +48,3 @@ }, | ||
name: 'Heading 1', | ||
hotkey: 'command+option+1,ctrl+shift+1', | ||
hotkey: `${SHORT_KEY}+option+1,${SHORT_KEY}+shift+1`, | ||
icon: H1Icon, | ||
@@ -55,3 +56,3 @@ }, | ||
name: 'Heading 2', | ||
hotkey: 'command+option+2,ctrl+shift+2', | ||
hotkey: `${SHORT_KEY}+option+2,${SHORT_KEY}+shift+2`, | ||
icon: H2Icon, | ||
@@ -63,3 +64,3 @@ }, | ||
name: 'Heading 3', | ||
hotkey: 'command+option+3,ctrl+shift+3', | ||
hotkey: `${SHORT_KEY}+option+3,${SHORT_KEY}+shift+3`, | ||
icon: H3Icon, | ||
@@ -71,3 +72,3 @@ }, | ||
name: 'Heading 4', | ||
hotkey: 'command+option+4,ctrl+shift+4', | ||
hotkey: `${SHORT_KEY}+option+4,${SHORT_KEY}+shift+4`, | ||
icon: H4Icon, | ||
@@ -79,3 +80,3 @@ }, | ||
name: 'Heading 5', | ||
hotkey: 'command+option+5,ctrl+shift+5', | ||
hotkey: `${SHORT_KEY}+option+5,${SHORT_KEY}+shift+5`, | ||
icon: H5Icon, | ||
@@ -87,3 +88,3 @@ }, | ||
name: 'Heading 6', | ||
hotkey: 'command+option+6,ctrl+shift+6', | ||
hotkey: `${SHORT_KEY}+option+6,${SHORT_KEY}+shift+6`, | ||
icon: H6Icon, | ||
@@ -95,3 +96,3 @@ }, | ||
name: 'Bulleted List', | ||
hotkey: 'command+option+8,ctrl+shift+8', | ||
hotkey: `${SHORT_KEY}+option+8,${SHORT_KEY}+shift+8`, | ||
icon: BulletedListIcon, | ||
@@ -103,3 +104,3 @@ }, | ||
name: 'Numbered List', | ||
hotkey: 'command+option+9,ctrl+shift+9', | ||
hotkey: `${SHORT_KEY}+option+9,${SHORT_KEY}+shift+9`, | ||
icon: NumberedListIcon, | ||
@@ -118,3 +119,3 @@ }, | ||
name: 'Code Block', | ||
hotkey: 'command+option+c,ctrl+alt+c', | ||
hotkey: `command+option+c,ctrl+alt+c`, | ||
icon: CodeBlockIcon, | ||
@@ -133,3 +134,3 @@ }, | ||
name: 'Divider', | ||
hotkey: 'command+option+d,ctrl+shift+d', | ||
hotkey: `${SHORT_KEY}+option+d,${SHORT_KEY}+shift+d`, | ||
icon: DividerIcon, | ||
@@ -136,0 +137,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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
511510
94
5680