From 4829dfa8c5e923b364c9e1ee4652fd41d3fdf5d5 Mon Sep 17 00:00:00 2001 From: rajat-ht Date: Tue, 9 Sep 2025 22:16:52 +0530 Subject: [PATCH] Chore: Simplify editor selection to single version --- .../components/EditorSelectionModal.vue | 117 +++--------------- 1 file changed, 19 insertions(+), 98 deletions(-) diff --git a/packages/mermaid/src/docs/.vitepress/components/EditorSelectionModal.vue b/packages/mermaid/src/docs/.vitepress/components/EditorSelectionModal.vue index 2334d446f..a0a719d3d 100644 --- a/packages/mermaid/src/docs/.vitepress/components/EditorSelectionModal.vue +++ b/packages/mermaid/src/docs/.vitepress/components/EditorSelectionModal.vue @@ -40,105 +40,26 @@ const openSourceFeatures: Feature[] = [ { iconUrl: '/icons/version-history.svg', featureName: 'Version history' }, ]; -const playgroundFeatures: Feature[] = [ - { iconUrl: '/icons/public.svg', featureName: 'Diagram stored in URL' }, - { iconUrl: '/icons/terminal.svg', featureName: 'Code editor' }, - { iconUrl: '/icons/whiteboard.svg', featureName: 'Whiteboard' }, +const editorColumn: EditorColumn[] = [ + { + title: 'Mermaid Pro', + description: 'Unlock AI and real-time collaboration', + highlighted: true, + redBarText: 'Recommended', + proTrialButtonText: 'Start free trial', + proTrialUrl: + 'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=2_editor_selection&utm_campaign=start_pro&redirect=%2Fapp%2Fuser%2Fbilling%2Fcheckout%3FisFromMermaid%3Dtrue', + features: mermaidChartFeatures, + }, + { + title: 'Open Source', + description: 'Code only, no login', + buttonText: 'Start free', + redirectUrl: 'https://mermaid.live/edit', + features: openSourceFeatures, + }, ]; -const editorColumnVariants: EditorColumn[][] = [ - [ - { - title: 'Playground', - description: 'Basic features, no login', - redirectUrl: - 'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=3_editor_selection_A&utm_campaign=start_playground', - buttonText: 'Start free', - features: playgroundFeatures, - }, - { - title: 'Free or Pro', - description: 'Advanced features, Free or Pro account', - proTrialUrl: - 'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=3_editor_selection_A&utm_campaign=start_free', - proTrialButtonText: 'Start free', - highlighted: true, - redBarText: 'Best for collaboration', - features: mermaidChartFeatures, - }, - { - title: 'Open Source', - description: 'Code only, no login', - redirectUrl: 'https://mermaid.live/edit', - buttonText: 'Start free', - features: openSourceFeatures, - }, - ], - [ - { - title: 'Mermaid Pro', - description: 'Unlock AI and real-time collaboration', - redirectUrl: - 'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=editor_selection_B&utm_campaign=start_free', - buttonText: 'Start Free', - highlighted: true, - redBarText: 'Recommended', - proTrialButtonText: 'Start Pro trial', - proTrialUrl: - 'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=editor_selection_B&utm_campaign=start_trial&redirect=%2Fapp%2Fuser%2Fbilling%2Fcheckout%3FisFromMermaid%3Dtrue', - features: mermaidChartFeatures, - }, - { - title: 'Open Source', - description: 'Code only, no login', - buttonText: 'Start free', - redirectUrl: 'https://mermaid.live/edit', - isButtonMargined: true, - features: openSourceFeatures, - }, - ], - [ - { - title: 'Mermaid Pro', - description: 'Unlock AI and real-time collaboration', - highlighted: true, - redBarText: 'Recommended', - proTrialButtonText: 'Start free trial', - proTrialUrl: - 'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=editor_selection_C&utm_campaign=start_trial&redirect=%2Fapp%2Fuser%2Fbilling%2Fcheckout%3FisFromMermaid%3Dtrue', - features: mermaidChartFeatures, - }, - { - title: 'Open Source', - description: 'Code only, no login', - buttonText: 'Start free', - redirectUrl: 'https://mermaid.live/edit', - features: openSourceFeatures, - }, - ], - [ - { - title: 'Mermaid Pro', - description: 'Unlock AI and real-time collaboration', - highlighted: true, - redBarText: 'Recommended', - proTrialButtonText: 'Start free', - proTrialUrl: - 'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=editor_selection_D&utm_campaign=start_free', - features: mermaidChartFeatures, - }, - { - title: 'Open Source', - description: 'Code only, no login', - redirectUrl: 'https://mermaid.live/edit', - buttonText: 'Start free', - features: openSourceFeatures, - }, - ], -]; - -const editorColumns = editorColumnVariants[Math.floor(Math.random() * editorColumnVariants.length)]; - const isVisible = ref(false); const handleMouseDown = (e: MouseEvent) => { @@ -171,7 +92,7 @@ onUnmounted(() => { class="flex flex-col sm:flex-row rounded-3xl shadow relative gap-5 pt-10 sm:pt-20 pb-10 px-4 sm:px-10 bg-[#F1F8FA] overflow-y-auto max-h-full" >