-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(editor): add affine toolbar widget
- Loading branch information
Showing
10 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "@blocksuite/affine-widget-toolbar", | ||
"description": "Affine toolbar widget.", | ||
"type": "module", | ||
"scripts": { | ||
"build": "tsc", | ||
"test:unit": "nx vite:test --run --passWithNoTests", | ||
"test:unit:coverage": "nx vite:test --run --coverage", | ||
"test:e2e": "playwright test" | ||
}, | ||
"sideEffects": false, | ||
"keywords": [], | ||
"author": "toeverything", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@blocksuite/affine-model": "workspace:*", | ||
"@blocksuite/affine-shared": "workspace:*", | ||
"@blocksuite/block-std": "workspace:*", | ||
"@blocksuite/global": "workspace:*", | ||
"@preact/signals-core": "^1.8.0", | ||
"@toeverything/theme": "^1.1.3", | ||
"lit": "^3.2.0" | ||
}, | ||
"exports": { | ||
".": "./src/index.ts", | ||
"./effects": "./src/effects.ts" | ||
}, | ||
"files": [ | ||
"src", | ||
"dist", | ||
"!src/__tests__", | ||
"!dist/__tests__" | ||
], | ||
"version": "0.19.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { AFFINE_TOOLBAR_WIDGET, AffineToolbarWidget } from './toolbar'; | ||
|
||
export function effects() { | ||
customElements.define(AFFINE_TOOLBAR_WIDGET, AffineToolbarWidget); | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
[AFFINE_TOOLBAR_WIDGET]: AffineToolbarWidget; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './toolbar'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { WidgetComponent } from '@blocksuite/block-std'; | ||
|
||
export const AFFINE_TOOLBAR_WIDGET = 'affine-toolbar-widget'; | ||
|
||
export class AffineToolbarWidget extends WidgetComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src/", | ||
"outDir": "./dist/", | ||
"noEmit": false | ||
}, | ||
"include": ["./src"], | ||
"references": [ | ||
{ | ||
"path": "../../framework" | ||
}, | ||
{ | ||
"path": "../model" | ||
}, | ||
{ | ||
"path": "../shared" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters