File tree Expand file tree Collapse file tree 10 files changed +94
-0
lines changed
Expand file tree Collapse file tree 10 files changed +94
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @blocksuite/affine-widget-toolbar" ,
3+ "description" : " Affine toolbar widget." ,
4+ "type" : " module" ,
5+ "scripts" : {
6+ "build" : " tsc" ,
7+ "test:unit" : " nx vite:test --run --passWithNoTests" ,
8+ "test:unit:coverage" : " nx vite:test --run --coverage" ,
9+ "test:e2e" : " playwright test"
10+ },
11+ "sideEffects" : false ,
12+ "keywords" : [],
13+ "author" : " toeverything" ,
14+ "license" : " MIT" ,
15+ "dependencies" : {
16+ "@blocksuite/affine-model" : " workspace:*" ,
17+ "@blocksuite/affine-shared" : " workspace:*" ,
18+ "@blocksuite/block-std" : " workspace:*" ,
19+ "@blocksuite/global" : " workspace:*" ,
20+ "@preact/signals-core" : " ^1.8.0" ,
21+ "@toeverything/theme" : " ^1.1.3" ,
22+ "lit" : " ^3.2.0"
23+ },
24+ "exports" : {
25+ "." : " ./src/index.ts" ,
26+ "./effects" : " ./src/effects.ts"
27+ },
28+ "files" : [
29+ " src" ,
30+ " dist" ,
31+ " !src/__tests__" ,
32+ " !dist/__tests__"
33+ ],
34+ "version" : " 0.19.0"
35+ }
Original file line number Diff line number Diff line change 1+ import { AFFINE_TOOLBAR_WIDGET , AffineToolbarWidget } from './toolbar' ;
2+
3+ export function effects ( ) {
4+ customElements . define ( AFFINE_TOOLBAR_WIDGET , AffineToolbarWidget ) ;
5+ }
6+
7+ declare global {
8+ interface HTMLElementTagNameMap {
9+ [ AFFINE_TOOLBAR_WIDGET ] : AffineToolbarWidget ;
10+ }
11+ }
Original file line number Diff line number Diff line change 1+ export * from './toolbar' ;
Original file line number Diff line number Diff line change 1+ import { WidgetComponent } from '@blocksuite/block-std' ;
2+
3+ export const AFFINE_TOOLBAR_WIDGET = 'affine-toolbar-widget' ;
4+
5+ export class AffineToolbarWidget extends WidgetComponent { }
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ../../tsconfig.json" ,
3+ "compilerOptions" : {
4+ "rootDir" : " ./src/" ,
5+ "outDir" : " ./dist/" ,
6+ "noEmit" : false
7+ },
8+ "include" : [" ./src" ],
9+ "references" : [
10+ {
11+ "path" : " ../../framework"
12+ },
13+ {
14+ "path" : " ../model"
15+ },
16+ {
17+ "path" : " ../shared"
18+ }
19+ ]
20+ }
Original file line number Diff line number Diff line change 3737 "@blocksuite/affine-widget-frame-title" : " workspace:*" ,
3838 "@blocksuite/affine-widget-remote-selection" : " workspace:*" ,
3939 "@blocksuite/affine-widget-scroll-anchoring" : " workspace:*" ,
40+ "@blocksuite/affine-widget-toolbar" : " workspace:*" ,
4041 "@blocksuite/block-std" : " workspace:*" ,
4142 "@blocksuite/data-view" : " workspace:*" ,
4243 "@blocksuite/global" : " workspace:*" ,
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import { effects as widgetDragHandleEffects } from '@blocksuite/affine-widget-dr
3434import { effects as widgetFrameTitleEffects } from '@blocksuite/affine-widget-frame-title/effects' ;
3535import { effects as widgetRemoteSelectionEffects } from '@blocksuite/affine-widget-remote-selection/effects' ;
3636import { effects as widgetScrollAnchoringEffects } from '@blocksuite/affine-widget-scroll-anchoring/effects' ;
37+ import { effects as widgetToolbarEffects } from '@blocksuite/affine-widget-toolbar/effects' ;
3738import type { BlockComponent } from '@blocksuite/block-std' ;
3839import { effects as stdEffects } from '@blocksuite/block-std/effects' ;
3940import { effects as dataViewEffects } from '@blocksuite/data-view/effects' ;
@@ -223,6 +224,7 @@ export function effects() {
223224 widgetEdgelessElementToolbarEffects ( ) ;
224225 widgetRemoteSelectionEffects ( ) ;
225226 widgetDragHandleEffects ( ) ;
227+ widgetToolbarEffects ( ) ;
226228 dataViewEffects ( ) ;
227229
228230 customElements . define ( 'affine-page-root' , PageRootBlockComponent ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 AFFINE_EDGELESS_REMOTE_SELECTION_WIDGET ,
1414} from '@blocksuite/affine-widget-remote-selection' ;
1515import { AFFINE_SCROLL_ANCHORING_WIDGET } from '@blocksuite/affine-widget-scroll-anchoring' ;
16+ import { AFFINE_TOOLBAR_WIDGET } from '@blocksuite/affine-widget-toolbar' ;
1617import {
1718 BlockServiceWatcher ,
1819 BlockViewExtension ,
@@ -80,6 +81,7 @@ export const edgelessRootWidgetViewMap = {
8081 AFFINE_EDGELESS_AUTO_CONNECT_WIDGET
8182 ) } `,
8283 [ AFFINE_SCROLL_ANCHORING_WIDGET ] : literal `${ unsafeStatic ( AFFINE_SCROLL_ANCHORING_WIDGET ) } ` ,
84+ [ AFFINE_TOOLBAR_WIDGET ] : literal `${ unsafeStatic ( AFFINE_TOOLBAR_WIDGET ) } ` ,
8385 [ EDGELESS_DRAGGING_AREA_WIDGET ] : literal `${ unsafeStatic ( EDGELESS_DRAGGING_AREA_WIDGET ) } ` ,
8486 [ NOTE_SLICER_WIDGET ] : literal `${ unsafeStatic ( NOTE_SLICER_WIDGET ) } ` ,
8587 [ EDGELESS_NAVIGATOR_BLACK_BACKGROUND_WIDGET ] : literal `${ unsafeStatic ( EDGELESS_NAVIGATOR_BLACK_BACKGROUND_WIDGET ) } ` ,
Original file line number Diff line number Diff line change 99import { AFFINE_DRAG_HANDLE_WIDGET } from '@blocksuite/affine-widget-drag-handle' ;
1010import { AFFINE_DOC_REMOTE_SELECTION_WIDGET } from '@blocksuite/affine-widget-remote-selection' ;
1111import { AFFINE_SCROLL_ANCHORING_WIDGET } from '@blocksuite/affine-widget-scroll-anchoring' ;
12+ import { AFFINE_TOOLBAR_WIDGET } from '@blocksuite/affine-widget-toolbar' ;
1213import {
1314 BlockViewExtension ,
1415 CommandExtension ,
@@ -61,6 +62,7 @@ export const pageRootWidgetViewMap = {
6162 AFFINE_VIEWPORT_OVERLAY_WIDGET
6263 ) } `,
6364 [ AFFINE_SCROLL_ANCHORING_WIDGET ] : literal `${ unsafeStatic ( AFFINE_SCROLL_ANCHORING_WIDGET ) } ` ,
65+ [ AFFINE_TOOLBAR_WIDGET ] : literal `${ unsafeStatic ( AFFINE_TOOLBAR_WIDGET ) } ` ,
6466} ;
6567
6668const PageCommonExtension : ExtensionType [ ] = [
Original file line number Diff line number Diff line change @@ -3792,6 +3792,20 @@ __metadata:
37923792 languageName: unknown
37933793 linkType: soft
37943794
3795+ "@blocksuite/affine-widget-toolbar@workspace:*, @blocksuite/affine-widget-toolbar@workspace:blocksuite/affine/widget-toolbar":
3796+ version: 0.0.0-use.local
3797+ resolution: "@blocksuite/affine-widget-toolbar@workspace:blocksuite/affine/widget-toolbar"
3798+ dependencies:
3799+ "@blocksuite/affine-model": "workspace:*"
3800+ "@blocksuite/affine-shared": "workspace:*"
3801+ "@blocksuite/block-std": "workspace:*"
3802+ "@blocksuite/global": "workspace:*"
3803+ "@preact/signals-core": "npm:^1.8.0"
3804+ "@toeverything/theme": "npm:^1.1.3"
3805+ lit: "npm:^3.2.0"
3806+ languageName: unknown
3807+ linkType: soft
3808+
37953809"@blocksuite/affine@workspace:*, @blocksuite/affine@workspace:blocksuite/affine/all":
37963810 version: 0.0.0-use.local
37973811 resolution: "@blocksuite/affine@workspace:blocksuite/affine/all"
@@ -3856,6 +3870,7 @@ __metadata:
38563870 "@blocksuite/affine-widget-frame-title": "workspace:*"
38573871 "@blocksuite/affine-widget-remote-selection": "workspace:*"
38583872 "@blocksuite/affine-widget-scroll-anchoring": "workspace:*"
3873+ "@blocksuite/affine-widget-toolbar": "workspace:*"
38593874 "@blocksuite/block-std": "workspace:*"
38603875 "@blocksuite/data-view": "workspace:*"
38613876 "@blocksuite/global": "workspace:*"
You can’t perform that action at this time.
0 commit comments