From a257f78d8e626da876b7cd9ae652db40bd7f4d43 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 10 Jun 2026 13:09:36 +0530 Subject: [PATCH] feat: add example picker dropdown to sample diagrams Each diagram type in the Sample Diagrams panel is now a split button: clicking the diagram name loads its default example, and a dropdown arrow on the right (shown when a diagram has more than one example) opens a popover listing all examples for that diagram. - getSampleDiagrams now returns all examples per diagram with the default example first, instead of flattening to the default's code - loadSampleDiagram analytics now include the chosen example title https://claude.ai/code/session_015rUgHChBEkquLu77fMxmQ6 Co-Authored-By: Claude Fable 5 --- src/lib/components/Preset.svelte | 69 ++++++++++++++++++++++++-------- src/lib/util/mermaid.test.ts | 23 +++++++++++ src/lib/util/mermaid.ts | 22 +++++----- 3 files changed, 87 insertions(+), 27 deletions(-) create mode 100644 src/lib/util/mermaid.test.ts diff --git a/src/lib/components/Preset.svelte b/src/lib/components/Preset.svelte index 079606b2..8bc7784a 100644 --- a/src/lib/components/Preset.svelte +++ b/src/lib/components/Preset.svelte @@ -1,13 +1,20 @@