diff --git a/ts/components/BUILD.bazel b/ts/components/BUILD.bazel
index 54919451e..4eaa56dbd 100644
--- a/ts/components/BUILD.bazel
+++ b/ts/components/BUILD.bazel
@@ -41,7 +41,7 @@ ts_library(
"@npm//@types/bootstrap",
"@npm//bootstrap",
"@npm//svelte",
- ],
+ ] + svelte_names,
)
# Tests
diff --git a/ts/components/CommandIconButton.svelte b/ts/components/CommandIconButton.svelte
deleted file mode 100644
index 2ef784c64..000000000
--- a/ts/components/CommandIconButton.svelte
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/ts/components/IconButton.svelte b/ts/components/IconButton.svelte
index 5db161f44..0987167fe 100644
--- a/ts/components/IconButton.svelte
+++ b/ts/components/IconButton.svelte
@@ -3,18 +3,82 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
-
-
-
+
+
+
diff --git a/ts/components/SquareButton.svelte b/ts/components/SquareButton.svelte
deleted file mode 100644
index ae0ac2bdb..000000000
--- a/ts/components/SquareButton.svelte
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
diff --git a/ts/components/WithState.svelte b/ts/components/WithState.svelte
new file mode 100644
index 000000000..32e4facb3
--- /dev/null
+++ b/ts/components/WithState.svelte
@@ -0,0 +1,68 @@
+
+
+
+
+
+
diff --git a/ts/editor/BUILD.bazel b/ts/editor/BUILD.bazel
index 52dac8629..d9d4da081 100644
--- a/ts/editor/BUILD.bazel
+++ b/ts/editor/BUILD.bazel
@@ -19,7 +19,9 @@ filegroup(
compile_svelte(
name = "svelte",
srcs = svelte_files,
- deps = [],
+ deps = [
+ "//ts/components",
+ ],
visibility = ["//visibility:public"],
)
@@ -66,13 +68,11 @@ ts_library(
srcs = glob(["*.ts"]),
tsconfig = "//ts:tsconfig.json",
deps = [
- "//ts:image_module_support",
"//ts/lib",
"//ts/sveltelib",
"//ts/components",
"//ts/html-filter",
- # "svelte_components",
- # "//ts/components:svelte_components",
+ "//ts:image_module_support",
"@npm//svelte",
],
)
diff --git a/ts/editor/FormatBlockButtons.svelte b/ts/editor/FormatBlockButtons.svelte
index 2c7de3a9e..c186e7707 100644
--- a/ts/editor/FormatBlockButtons.svelte
+++ b/ts/editor/FormatBlockButtons.svelte
@@ -6,10 +6,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type { EditingArea } from "./editingArea";
import * as tr from "lib/i18n";
- import CommandIconButton from "components/CommandIconButton.svelte";
import IconButton from "components/IconButton.svelte";
import ButtonGroup from "components/ButtonGroup.svelte";
import ButtonDropdown from "components/ButtonDropdown.svelte";
+ import WithState from "components/WithState.svelte";
import WithDropdownMenu from "components/WithDropdownMenu.svelte";
import { getListItem } from "./helpers";
@@ -44,25 +44,25 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-
+
{@html justifyLeftIcon}
-
+
-
+
{@html justifyCenterIcon}
-
+
-
+
{@html justifyCenterIcon}
-
+
-
+
{@html justifyRightIcon}
-
+
-
+
{@html justifyFullIcon}
-
+
@@ -77,15 +77,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-
+
{@html ulIcon}
-
+
-
+
{@html olIcon}
-
+
diff --git a/ts/editor/FormatInlineButtons.svelte b/ts/editor/FormatInlineButtons.svelte
index 584e0612c..e8010edf4 100644
--- a/ts/editor/FormatInlineButtons.svelte
+++ b/ts/editor/FormatInlineButtons.svelte
@@ -5,9 +5,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html