File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const sheets = new Map < string , HTMLDivElement > ( ) ;
2+ let isInitialized = false ;
23
34function initExplainCodeButtons ( ) {
5+ // Prevent multiple initializations
6+ if ( isInitialized ) return ;
7+ isInitialized = true ;
8+
49 // Use event delegation on document body to catch all clicks
510 document . body . addEventListener ( "click" , ( e ) => {
611 const target = e . target as HTMLElement ;
Original file line number Diff line number Diff line change 1- .sheet-overlay ,
21.sheet-content {
32 display : none;
43}
54
6- .sheet-overlay [data-state = "open" ],
75.sheet-content [data-state = "open" ] {
86 display : block;
97}
108
11- @keyframes fade-in {
12- from {
13- opacity : 0 ;
14- }
15- to {
16- opacity : 1 ;
17- }
18- }
19-
20- @keyframes fade-out {
21- from {
22- opacity : 1 ;
23- }
24- to {
25- opacity : 0 ;
26- }
27- }
28-
299@keyframes slide-in-from-right {
3010 from {
3111 transform : translateX (100% );
10686 animation-fill-mode : forwards;
10787}
10888
109- .fade-in-0 {
110- animation : fade-in 0.2s ease-in-out;
111- }
112-
113- .fade-out-0 {
114- animation : fade-out 0.2s ease-in-out;
115- }
116-
11789.slide-in-from-right {
11890 animation : slide-in-from-right 0.5s ease-in-out;
11991}
You can’t perform that action at this time.
0 commit comments