feat: move templates into AFFiNE (#5750)

Related to https://github.com/toeverything/blocksuite/pull/6156

### Change
Move the edgeless templates to AFFiNE. All templates are stored as zip files. Run `node build-edgeless.mjs` in `@affine/templates` to generate JSON-format templates and importing script. The template will be generated automatically during building and dev (`yarn dev`).
This commit is contained in:
Lye Hongtao
2024-02-21 06:26:01 +00:00
parent 53b312c06f
commit 4641bc422b
42 changed files with 896 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
import { builtInTemplates } from '@affine/templates/edgeless';
import {
EdgelessTemplatePanel,
type TemplateManager,
} from '@blocksuite/blocks';
EdgelessTemplatePanel.templates.extend(builtInTemplates as TemplateManager);

View File

@@ -1,4 +1,5 @@
import './register-blocksuite-components';
import './edgeless-template';
import { setupGlobal } from '@affine/env/global';
import * as Sentry from '@sentry/react';