From 82c39de7ea33a143c4048a1027862fec72adf7bc Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 26 Jun 2025 12:07:24 -0400 Subject: [PATCH] feat: implement enhanced bubble menu with text styles and color pickers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add ComposerBubbleMenu with formatting tools and dropdowns - Create BubbleTextStyleMenu for paragraph/heading/list selection - Add BubbleColorPicker with preset palettes and custom color selection - Use lighter pastel colors for highlight presets - Implement circle color swatches with even grid spacing - Add strikethrough support and improved hover states - Use absolute positioning to prevent scroll issues - Integrate with existing editor configuration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../admin/composer/BubbleColorPicker.svelte | 357 ++++++++++++++ .../admin/composer/BubbleTextStyleMenu.svelte | 138 ++++++ .../admin/composer/ComposerBubbleMenu.svelte | 437 ++++++++++++++++++ 3 files changed, 932 insertions(+) create mode 100644 src/lib/components/admin/composer/BubbleColorPicker.svelte create mode 100644 src/lib/components/admin/composer/BubbleTextStyleMenu.svelte create mode 100644 src/lib/components/admin/composer/ComposerBubbleMenu.svelte diff --git a/src/lib/components/admin/composer/BubbleColorPicker.svelte b/src/lib/components/admin/composer/BubbleColorPicker.svelte new file mode 100644 index 0000000..d62ca63 --- /dev/null +++ b/src/lib/components/admin/composer/BubbleColorPicker.svelte @@ -0,0 +1,357 @@ + + +{#if isOpen} +
+
+ {mode === 'text' ? 'Text Color' : 'Highlight Color'} + +
+ +
+ {#each presetColors as presetColor} + + {/each} +
+ +
+ {#if !showPicker} + + {:else} +
+ + +
+ {/if} +
+
+{/if} + + \ No newline at end of file diff --git a/src/lib/components/admin/composer/BubbleTextStyleMenu.svelte b/src/lib/components/admin/composer/BubbleTextStyleMenu.svelte new file mode 100644 index 0000000..4e2c341 --- /dev/null +++ b/src/lib/components/admin/composer/BubbleTextStyleMenu.svelte @@ -0,0 +1,138 @@ + + +{#if isOpen} +
+ {#each textStyles as style} + + {/each} +
+{/if} + + \ No newline at end of file diff --git a/src/lib/components/admin/composer/ComposerBubbleMenu.svelte b/src/lib/components/admin/composer/ComposerBubbleMenu.svelte new file mode 100644 index 0000000..e0198da --- /dev/null +++ b/src/lib/components/admin/composer/ComposerBubbleMenu.svelte @@ -0,0 +1,437 @@ + + + +
+ {#if isLinkMode} + + {:else} +
+ + + + + + {#each formattingCommands as command} + + {/each} + + + + + + + + + +
+ {/if} +
+
+ +