mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
Close [BS-2392](https://linear.app/affine-design/issue/BS-2392/page-block-需要显示文章title) ### What Changes - Add `<doc-title>` to edgeless page block (a.k.a the first page visible note block) - Refactors: - Move `<doc-title>` to `@blocksuite/affine-component`, but you can aslo import it from `@blocksuite/preset` - Extract `<edgeless-note-mask>` and `<edgeless-note-background>` from `<affine-edgeless-note>` to a seperate file - Rewrite styles of `<affine-edgeless-note>` with `@vanilla-extract/css` https://github.com/user-attachments/assets/a0c03239-803e-4bfa-b30e-33b919213b12
38 lines
995 B
TypeScript
38 lines
995 B
TypeScript
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
esbuild: {
|
|
target: 'es2018',
|
|
},
|
|
plugins: [vanillaExtractPlugin()],
|
|
test: {
|
|
globalSetup: '../../scripts/vitest-global.js',
|
|
include: ['src/__tests__/**/*.unit.spec.ts'],
|
|
testTimeout: 1000,
|
|
coverage: {
|
|
provider: 'istanbul', // or 'c8'
|
|
reporter: ['lcov'],
|
|
reportsDirectory: '../../.coverage/blocks',
|
|
},
|
|
/**
|
|
* Custom handler for console.log in tests.
|
|
*
|
|
* Return `false` to ignore the log.
|
|
*/
|
|
onConsoleLog(log, type) {
|
|
if (
|
|
log.includes('https://lit.dev/msg/dev-mode') ||
|
|
log.includes(
|
|
`KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`
|
|
)
|
|
) {
|
|
return false;
|
|
}
|
|
console.warn(`Unexpected ${type} log`, log);
|
|
throw new Error(log);
|
|
},
|
|
environment: 'happy-dom',
|
|
},
|
|
});
|