···55import * as emoji from 'emoji';
6677import Only from '../../only.tsx';
88-import { createFaviconURLFromImage } from '../../../utilities/create_favicon_url.ts';
88+import { createFaviconURLFromImage } from '../../../utilities/image_helpers.ts';
99import type { SetSwitch } from '../types.ts';
10101111export default function CustomUpload(
···11/* @jsx h */
22import type { OnSelected, SetSwitch } from '../types.ts';
33-import type { Emoji } from '../../../utilities/emoji.ts';
44-import type {
55- EmojiGroup,
66- EmojiGroups,
77-} from '../../../utilities/favicon_data.ts';
33+import type { Emoji, EmojiGroup, EmojiGroups } from '../../../models/emoji.ts';
8495import { Fragment, h } from 'preact';
106import { useCallback, useMemo } from 'preact/hooks';
···11+import type { Emoji } from './emoji.ts';
22+33+export interface Favicon {
44+ // String (inc RegExp string) representing the url to match
55+ matcher: string;
66+ /**
77+ * Unique ID representing favicon (emoji.description)
88+ * We store emojis by ID and retrieve from storage when we want to use.
99+ * This allows us to save custom emoji image data and access on demand,
1010+ * saving us space in chrome storage.
1111+ */
1212+ emojiId?: string;
1313+}
1414+1515+export function createFavicon(matcher = '', emoji?: Emoji): Favicon {
1616+ return { matcher, emojiId: emoji?.description };
1717+}
···11-import { assertStrictEquals } from 'asserts';
22-import { it } from 'bdd';
11+import { assertStrictEquals } from 'std/asserts';
22+import { it } from 'std/bdd';
3344import { isRegexString } from '../predicates.ts';
55