chore(editor): reorg packages (#10702)

This commit is contained in:
Saul-Mirone
2025-03-08 03:57:04 +00:00
parent 334912e85b
commit 8aedef0a36
961 changed files with 837 additions and 927 deletions
@@ -0,0 +1,32 @@
import { getSelectedModelsCommand } from '@blocksuite/affine-shared/commands';
import { type SlashMenuConfig } from '@blocksuite/affine-widget-slash-menu';
import { ImageIcon } from '@blocksuite/icons/lit';
import { insertImagesCommand } from '../commands';
import { PhotoTooltip } from './tooltips';
export const imageSlashMenuConfig: SlashMenuConfig = {
items: [
{
name: 'Image',
description: 'Insert an image.',
icon: ImageIcon(),
tooltip: {
figure: PhotoTooltip,
caption: 'Photo',
},
group: '4_Content & Media@1',
when: ({ model }) =>
model.doc.schema.flavourSchemaMap.has('affine:image'),
action: ({ std }) => {
const [success, ctx] = std.command
.chain()
.pipe(getSelectedModelsCommand)
.pipe(insertImagesCommand, { removeEmptyLine: true })
.run();
if (success) ctx.insertedImageIds.catch(console.error);
},
},
],
};
File diff suppressed because one or more lines are too long