From aab3bfcd1021995fabd36f3f603ed148067f4fb8 Mon Sep 17 00:00:00 2001
From: Akshar Patel <123344143+AksharP5@users.noreply.github.com>
Date: Tue, 1 Sep 2026 23:07:03 -0400
Subject: [PATCH] fix(registry): clear flowchart selection after click-away
(#3262)
---
docs/catalog/blocks/flowchart-vertical.mdx | 12 ++----------
docs/catalog/blocks/flowchart.mdx | 12 ++----------
docs/public/catalog/blocks/flowchart-vertical.json | 2 +-
docs/public/catalog/blocks/flowchart.json | 2 +-
.../flowchart-vertical/flowchart-vertical.html | 12 ++----------
registry/blocks/flowchart/flowchart.html | 12 ++----------
6 files changed, 10 insertions(+), 42 deletions(-)
diff --git a/docs/catalog/blocks/flowchart-vertical.mdx b/docs/catalog/blocks/flowchart-vertical.mdx
index 62967bea2..bbe2c1ae2 100644
--- a/docs/catalog/blocks/flowchart-vertical.mdx
+++ b/docs/catalog/blocks/flowchart-vertical.mdx
@@ -144,6 +144,7 @@ That writes one file: `compositions/flowchart-vertical.html`.
/>
+
Try no-code first
@@ -335,7 +336,6 @@ That writes one file: `compositions/flowchart-vertical.html`.
(function () {
const tl = gsap.timeline({ paused: true });
const S = "#flowchart-vertical";
- const nodePython = document.querySelector(S + " #node-python");
const pythonText = document.querySelector(S + " #python-text");
// 1. Root node scales in
@@ -406,15 +406,7 @@ That writes one file: `compositions/flowchart-vertical.html`.
tl.to(S + " #cursor", { x: -1110, y: -1560, duration: 1, ease: "power1.inOut" }, "hold3");
// 10. Cursor clicks — selection border
- tl.add(() => {
- if (!nodePython) return;
- if (!nodePython.querySelector(".selection-border")) {
- const border = document.createElement("div");
- border.className = "selection-border";
- nodePython.appendChild(border);
- }
- gsap.set(S + " .selection-border", { opacity: 1 });
- }, "hold3+=1");
+ tl.set(S + " .selection-border", { opacity: 1 }, "hold3+=1");
tl.to(
S + " #cursor",
diff --git a/docs/catalog/blocks/flowchart.mdx b/docs/catalog/blocks/flowchart.mdx
index 2af213191..88b3b333e 100644
--- a/docs/catalog/blocks/flowchart.mdx
+++ b/docs/catalog/blocks/flowchart.mdx
@@ -144,6 +144,7 @@ That writes one file: `compositions/flowchart.html`.
/>
+
Try no-code first
@@ -335,7 +336,6 @@ That writes one file: `compositions/flowchart.html`.
(function () {
const tl = gsap.timeline({ paused: true });
const S = '[data-composition-id="flowchart"]';
- const nodePython = document.querySelector(S + " #node-python");
const pythonText = document.querySelector(S + " #python-text");
// 1. Root node scales in
@@ -406,15 +406,7 @@ That writes one file: `compositions/flowchart.html`.
tl.to(S + " #cursor", { x: -1470, y: -540, duration: 1, ease: "power1.inOut" }, "hold3");
// 10. Cursor clicks — selection border
- tl.add(() => {
- if (!nodePython) return;
- if (!nodePython.querySelector(".selection-border")) {
- const border = document.createElement("div");
- border.className = "selection-border";
- nodePython.appendChild(border);
- }
- gsap.set(S + " .selection-border", { opacity: 1 });
- }, "hold3+=1");
+ tl.set(S + " .selection-border", { opacity: 1 }, "hold3+=1");
tl.to(
S + " #cursor",
diff --git a/docs/public/catalog/blocks/flowchart-vertical.json b/docs/public/catalog/blocks/flowchart-vertical.json
index ad91852e6..8cdd25b5a 100644
--- a/docs/public/catalog/blocks/flowchart-vertical.json
+++ b/docs/public/catalog/blocks/flowchart-vertical.json
@@ -1 +1 @@
-{"html":"\n\n \n
\n
\n
Flowchart Vertical \n
\n
\n
\n \n \n \n \n
\n
\n
\n \n \n \n\n \n \n \n\n \n \n \n \n\n
Yes
\n
Not sure
\n\n \n
\n Should I learn to code?\n
\n\n \n
Yes
\n
Not sure
\n\n \n
\n
\n
Start with Pythom \n
\n \n \n
\n
\n
\n Try no-code first\n
\n
\n Build a personal website\n
\n
\n Take a free intro course\n
\n\n \n
\n\n \n
👍
\n\n \n
\n
\n\n \n\n \n
\n \n\n"}
\ No newline at end of file
+{"html":"\n\n \n
\n
\n
Flowchart Vertical \n
\n
\n
\n \n \n \n \n
\n
\n
\n \n \n \n\n \n \n \n\n \n \n \n \n\n
Yes
\n
Not sure
\n\n \n
\n Should I learn to code?\n
\n\n \n
Yes
\n
Not sure
\n\n \n
\n
\n
Start with Pythom \n
\n \n \n
\n
\n
\n
\n Try no-code first\n
\n
\n Build a personal website\n
\n
\n Take a free intro course\n
\n\n \n
\n\n \n
👍
\n\n \n
\n
\n\n \n\n \n
\n \n\n"}
\ No newline at end of file
diff --git a/docs/public/catalog/blocks/flowchart.json b/docs/public/catalog/blocks/flowchart.json
index 9ca0b524e..ba2a0bbe8 100644
--- a/docs/public/catalog/blocks/flowchart.json
+++ b/docs/public/catalog/blocks/flowchart.json
@@ -1 +1 @@
-{"html":"\n\n \n
\n
\n
Flowchart \n
\n
\n
\n \n \n \n \n
\n
\n
\n \n \n \n\n \n \n \n\n \n \n \n \n\n
Yes
\n
Not sure
\n\n \n
\n Should I learn to code?\n
\n\n \n
Yes
\n
Not sure
\n\n \n
\n
\n
Start with Pythom \n
\n \n \n
\n
\n
\n Try no-code first\n
\n
\n Build a personal website\n
\n
\n Take a free intro course\n
\n\n \n
\n\n \n
👍
\n\n \n
\n
\n\n \n\n \n
\n \n\n"}
\ No newline at end of file
+{"html":"\n\n \n
\n
\n
Flowchart \n
\n
\n
\n \n \n \n \n
\n
\n
\n \n \n \n\n \n \n \n\n \n \n \n \n\n
Yes
\n
Not sure
\n\n \n
\n Should I learn to code?\n
\n\n \n
Yes
\n
Not sure
\n\n \n
\n
\n
Start with Pythom \n
\n \n \n
\n
\n
\n
\n Try no-code first\n
\n
\n Build a personal website\n
\n
\n Take a free intro course\n
\n\n \n
\n\n \n
👍
\n\n \n
\n
\n\n \n\n \n
\n \n\n"}
\ No newline at end of file
diff --git a/registry/blocks/flowchart-vertical/flowchart-vertical.html b/registry/blocks/flowchart-vertical/flowchart-vertical.html
index 872a16d07..c904fe47e 100644
--- a/registry/blocks/flowchart-vertical/flowchart-vertical.html
+++ b/registry/blocks/flowchart-vertical/flowchart-vertical.html
@@ -119,6 +119,7 @@
/>
+
Try no-code first
@@ -310,7 +311,6 @@
(function () {
const tl = gsap.timeline({ paused: true });
const S = "#flowchart-vertical";
- const nodePython = document.querySelector(S + " #node-python");
const pythonText = document.querySelector(S + " #python-text");
// 1. Root node scales in
@@ -381,15 +381,7 @@
tl.to(S + " #cursor", { x: -1110, y: -1560, duration: 1, ease: "power1.inOut" }, "hold3");
// 10. Cursor clicks — selection border
- tl.add(() => {
- if (!nodePython) return;
- if (!nodePython.querySelector(".selection-border")) {
- const border = document.createElement("div");
- border.className = "selection-border";
- nodePython.appendChild(border);
- }
- gsap.set(S + " .selection-border", { opacity: 1 });
- }, "hold3+=1");
+ tl.set(S + " .selection-border", { opacity: 1 }, "hold3+=1");
tl.to(
S + " #cursor",
diff --git a/registry/blocks/flowchart/flowchart.html b/registry/blocks/flowchart/flowchart.html
index da31cbcac..88cd257d3 100644
--- a/registry/blocks/flowchart/flowchart.html
+++ b/registry/blocks/flowchart/flowchart.html
@@ -119,6 +119,7 @@
/>
+
Try no-code first
@@ -310,7 +311,6 @@
(function () {
const tl = gsap.timeline({ paused: true });
const S = '[data-composition-id="flowchart"]';
- const nodePython = document.querySelector(S + " #node-python");
const pythonText = document.querySelector(S + " #python-text");
// 1. Root node scales in
@@ -381,15 +381,7 @@
tl.to(S + " #cursor", { x: -1470, y: -540, duration: 1, ease: "power1.inOut" }, "hold3");
// 10. Cursor clicks — selection border
- tl.add(() => {
- if (!nodePython) return;
- if (!nodePython.querySelector(".selection-border")) {
- const border = document.createElement("div");
- border.className = "selection-border";
- nodePython.appendChild(border);
- }
- gsap.set(S + " .selection-border", { opacity: 1 });
- }, "hold3+=1");
+ tl.set(S + " .selection-border", { opacity: 1 }, "hold3+=1");
tl.to(
S + " #cursor",