feat: bump blocksuite (#5286)

Co-authored-by: donteatfriedrice <huisheng.chen7788@outlook.com>
This commit is contained in:
Yifeng Wang
2023-12-15 12:57:52 +08:00
committed by GitHub
parent 136b4ccb4e
commit af15aa06d4
37 changed files with 302 additions and 259 deletions

View File

@@ -146,7 +146,7 @@ function createSetupImpl(rootStore: ReturnType<typeof createStore>) {
'@affine/component': import('@affine/component'),
'@blocksuite/icons': import('@blocksuite/icons'),
'@blocksuite/blocks': import('@blocksuite/blocks'),
'@blocksuite/virgo': import('@blocksuite/virgo'),
'@blocksuite/inline': import('@blocksuite/inline'),
'@affine/sdk/entry': {
rootStore,
currentWorkspaceAtom: currentWorkspaceAtom,
@@ -541,7 +541,7 @@ function createSetupImpl(rootStore: ReturnType<typeof createStore>) {
} else if (part === 'formatBar') {
const register = (widget: AffineFormatBarWidget) => {
const div = document.createElement('div');
const root = widget.root;
const root = widget.host;
const cleanup = (callback as CallbackMap['formatBar'])(
div,
widget.page,

View File

@@ -1,6 +1,18 @@
import { registerTOCComponents } from '@blocksuite/blocks';
import { registerTOCPanelComponents } from '@blocksuite/presets';
import { registerFramePanelComponents } from '@blocksuite/presets';
registerTOCComponents(components => {
registerTOCPanelComponents(components => {
for (const compName in components) {
if (window.customElements.get(compName)) continue;
window.customElements.define(
compName,
components[compName as keyof typeof components]
);
}
});
registerFramePanelComponents(components => {
for (const compName in components) {
if (window.customElements.get(compName)) continue;