From 6953389798975263e791279758192beeded65b3f Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Thu, 1 Apr 2021 02:26:56 +0200 Subject: [PATCH] Add exports for add-ons --- ts/editor-toolbar/index.ts | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/ts/editor-toolbar/index.ts b/ts/editor-toolbar/index.ts index 48bafb121..801510556 100644 --- a/ts/editor-toolbar/index.ts +++ b/ts/editor-toolbar/index.ts @@ -1,19 +1,19 @@ import type { SvelteComponent } from "svelte"; - -import { checkNightMode } from "anki/nightmode"; -import { setupI18n, ModuleName } from "anki/i18n"; +import { writable } from "svelte/store"; import EditorToolbarSvelte from "./EditorToolbar.svelte"; -// @ts-ignore -export { updateActiveButtons, clearActiveButtons } from "./CommandIconButton.svelte"; -import { writable } from "svelte/store"; +import { checkNightMode } from "anki/nightmode"; +import { setupI18n, ModuleName } from "anki/i18n"; import { notetypeButtons } from "./notetype"; import { formatButtons } from "./format"; import { colorButtons } from "./color"; import { templateButtons, templateMenus } from "./template"; +// @ts-ignore +export { updateActiveButtons, clearActiveButtons } from "./CommandIconButton.svelte"; + const defaultButtons = [notetypeButtons, formatButtons, colorButtons, templateButtons]; const defaultMenus = [...templateMenus]; @@ -55,3 +55,13 @@ class EditorToolbar extends HTMLElement { } customElements.define("anki-editor-toolbar", EditorToolbar); + +/* Exports for add-ons */ +export { default as LabelButton } from "./LabelButton.svelte"; +export { default as IconButton } from "./IconButton.svelte"; +export { default as CommandIconButton } from "./CommandIconButton.svelte"; +export { default as SelectButton } from "./SelectButton.svelte"; + +export { default as DropdownMenu } from "./DropdownMenu.svelte"; +export { default as DropdownItem } from "./DropdownItem.svelte"; +export { default as WithDropdownMenu } from "./WithDropdownMenu.svelte";