your personal website on atproto - mirror
blento.app
1import type { CardDefinition } from '../../types';
2import DrawCard from './DrawCard.svelte';
3import EditingDrawCard from './EditingDrawCard.svelte';
4
5export const DrawCardDefinition = {
6 type: 'draw',
7 name: 'Drawing',
8 contentComponent: DrawCard,
9 editingContentComponent: EditingDrawCard,
10 defaultColor: 'base',
11 allowSetColor: true,
12 minW: 2,
13 minH: 2,
14 createNew: (item) => {
15 item.w = 4;
16 item.h = 4;
17 item.mobileW = 4;
18 item.mobileH = 4;
19 item.cardData = {
20 strokesJson: '[]',
21 viewBox: '',
22 strokeWidth: 1,
23 locked: true
24 };
25 },
26
27 keywords: ['paint', 'sketch', 'doodle', 'canvas', 'art'],
28 groups: ['Visual'],
29 icon: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-4"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125" /></svg>`
30} as CardDefinition & { type: 'draw' };