Skip to content

Commit

Permalink
feat(blocks): minimap widget
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed May 7, 2024
1 parent 0157d86 commit 9e02568
Show file tree
Hide file tree
Showing 5 changed files with 399 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/blocks/src/_specs/_specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { PageRootService } from '../root-block/page/page-root-service.js';
import { RootBlockSchema } from '../root-block/root-model.js';
import { AFFINE_DOC_REMOTE_SELECTION_WIDGET } from '../root-block/widgets/doc-remote-selection/doc-remote-selection.js';
import { AFFINE_DRAG_HANDLE_WIDGET } from '../root-block/widgets/drag-handle/drag-handle.js';
import { AFFINE_EDGELESS_MINIMAP_WIDGET } from '../root-block/widgets/edgeless-minimap/index.js';
import { AFFINE_EDGELESS_REMOTE_SELECTION_WIDGET } from '../root-block/widgets/edgeless-remote-selection/index.js';
import { AFFINE_EDGELESS_ZOOM_TOOLBAR_WIDGET } from '../root-block/widgets/edgeless-zoom-toolbar/index.js';
import { EDGELESS_ELEMENT_TOOLBAR_WIDGET } from '../root-block/widgets/element-toolbar/index.js';
Expand Down Expand Up @@ -125,6 +126,7 @@ const EdgelessPageSpec: BlockSpec<EdgelessRootBlockWidgetName> = {
AFFINE_EDGELESS_ZOOM_TOOLBAR_WIDGET
)}`,
[EDGELESS_ELEMENT_TOOLBAR_WIDGET]: literal`${unsafeStatic(EDGELESS_ELEMENT_TOOLBAR_WIDGET)}`,
[AFFINE_EDGELESS_MINIMAP_WIDGET]: literal`${unsafeStatic(AFFINE_EDGELESS_MINIMAP_WIDGET)}`,
},
},
};
Expand Down
4 changes: 3 additions & 1 deletion packages/blocks/src/root-block/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { EdgelessRootBlockComponent } from './edgeless/edgeless-root-block.
import type { PageRootBlockComponent } from './page/page-root-block.js';
import type { AFFINE_DOC_REMOTE_SELECTION_WIDGET } from './widgets/doc-remote-selection/doc-remote-selection.js';
import type { AFFINE_DRAG_HANDLE_WIDGET } from './widgets/drag-handle/drag-handle.js';
import type { AFFINE_EDGELESS_MINIMAP_WIDGET } from './widgets/edgeless-minimap/index.js';
import type { AFFINE_EDGELESS_REMOTE_SELECTION_WIDGET } from './widgets/edgeless-remote-selection/index.js';
import type { AFFINE_EDGELESS_ZOOM_TOOLBAR_WIDGET } from './widgets/edgeless-zoom-toolbar/index.js';
import type { EDGELESS_ELEMENT_TOOLBAR_WIDGET } from './widgets/element-toolbar/index.js';
Expand Down Expand Up @@ -39,7 +40,8 @@ export type EdgelessRootBlockWidgetName =
| typeof AFFINE_DOC_REMOTE_SELECTION_WIDGET
| typeof AFFINE_EDGELESS_REMOTE_SELECTION_WIDGET
| typeof AFFINE_EDGELESS_ZOOM_TOOLBAR_WIDGET
| typeof EDGELESS_ELEMENT_TOOLBAR_WIDGET;
| typeof EDGELESS_ELEMENT_TOOLBAR_WIDGET
| typeof AFFINE_EDGELESS_MINIMAP_WIDGET;

export type RootBlockComponent =
| PageRootBlockComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Edgeless Minimap Widget
Loading

0 comments on commit 9e02568

Please sign in to comment.