{"project":"carousel","branch":"main","commit":"f10e48131628c32158a516c33fd594ff42b2cd71","component":{"name":"HomePage","nodes":{"root":{"tag":"div","type":"element","children":["Z6tVrHuTv7k0cK4wvaJrt"],"classes":{"bTqdax":{"formula":{"type":"value","value":true}}},"customProperties":{}},"-RtWHU46UnRsUzYl08WPS":{"tag":"img","type":"element","attrs":{"alt":{"type":"value","value":""},"src":{"type":"value","value":"/cdn-cgi/imagedelivery/ZIty0Vhmkm0nD-fBKJrTZQ/carousel:CoolCat1/public"}},"classes":{"chAEml":{"formula":{"type":"value","value":true}}},"customProperties":{}},"2EW9PRR8siWEXO_wjoJFb":{"tag":"div","type":"element","children":["QeCsnALNjVgVvOz-9WyPR","boX5snZpozQWWhULHc-nM"],"classes":{"eYYyhs":{"formula":{"type":"value","value":true}}},"customProperties":{}},"2LGHBxYTwrqNPSUDQeKda":{"tag":"img","type":"element","attrs":{"alt":{"type":"value","value":"The carousel-main component that host the main functionality of the carousel"},"src":{"type":"value","value":"/cdn-cgi/imagedelivery/ZIty0Vhmkm0nD-fBKJrTZQ/carousel:CleanShot2024-02-22at16.11.28/public"}},"classes":{"MMiuw":{"formula":{"type":"value","value":true}}},"customProperties":{}},"2_nXwgR7-94Bfpne_1H3U":{"tag":"iframe","type":"element","attrs":{"src":{"type":"value","value":"https://www.youtube.com/embed/YKIsQ64N-2w?si=nEaWZKPI0cjHkJpi"},"allow":{"type":"value","value":"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"},"title":{"type":"value","value":"How to use this package!"},"height":{"type":"value","value":"100%"},"frameborder":{"type":"value","value":"0"},"allowfullscreen":{"type":"value","value":""}},"classes":{"cVtOXD":{"formula":{"type":"value","value":true}}},"customProperties":{}},"35p2CL4nyPkzIoCs6LGEH":{"type":"text","value":{"type":"value","value":"Intro"}},"3Z547qTsNMtNigwem9K5U":{"type":"text","value":{"type":"value","value":"A carousel is a dynamic element commonly used to showcase multiple images or pieces of content within a confined space. A carousel is excellent for user interfaces that have confined elements for content. Social networks like Facebook or Instagram use carousels for images. It allows them to show multiple images in a single card in their feeds.\n"}},"3mHgNnj_9yqKYCJ3qX1VQ":{"tag":"img","type":"element","attrs":{"alt":{"type":"value","value":""},"src":{"type":"value","value":"/cdn-cgi/imagedelivery/ZIty0Vhmkm0nD-fBKJrTZQ/carousel:carousel-slide/public"}},"classes":{"MMiuw":{"formula":{"type":"value","value":true}}},"customProperties":{}},"51JAHw8fRQP4L1sOHFCza":{"name":"carousel-slide","type":"component","children":["-RtWHU46UnRsUzYl08WPS"],"customProperties":{}},"6n1L2H0G66ZEJrvUet_-F":{"tag":"img","type":"element","attrs":{"alt":{"type":"value","value":""},"src":{"type":"value","value":"/cdn-cgi/imagedelivery/ZIty0Vhmkm0nD-fBKJrTZQ/carousel:CoolCat2/public"}},"classes":{"chAEml":{"formula":{"type":"value","value":true}}},"customProperties":{}},"CcZQXPZLUDeNptvM8CLg5":{"tag":"div","type":"element","children":["eu0KbD93wVtJIACji7CXD","PZgAVHkOKcE5QEBg9e1Vn"],"classes":{"eozNhk":{"formula":{"type":"value","value":true}}},"customProperties":{}},"Cl_Z7ih-pqRFpjdrw0XXX":{"type":"text","value":{"type":"value","value":"carousel-main"}},"DYO-Tzp_wUiYGzKvB0W_q":{"tag":"h3","type":"element","children":["U0zF0pKkq-eL8kZ37U2dn"],"classes":{"blVCsl":{"formula":{"type":"value","value":true}}},"customProperties":{}},"JJyUv7HKnfCULAmaudxV6":{"tag":"img","type":"element","attrs":{"alt":{"type":"value","value":""},"src":{"type":"value","value":"/cdn-cgi/imagedelivery/ZIty0Vhmkm0nD-fBKJrTZQ/carousel:CoolCat4/public"}},"classes":{"chAEml":{"formula":{"type":"value","value":true}}},"customProperties":{}},"LgWPLAFmFmS7PllE8HSuz":{"name":"carousel-slide","type":"component","children":["jM-ME7jtHWPf6EqtfbDKb"],"customProperties":{}},"Mwnd3j72YPUa2P4095X_U":{"type":"text","value":{"type":"value","value":"The main component holds the slot for the slide. It's the main wrapper for all the content. It's divided in three main div's. \n1. A div that contains the left arrow.\n2. A div that contains a slot for your div slide.\n3. A div that contains  the right arrow.\n"}},"PZgAVHkOKcE5QEBg9e1Vn":{"tag":"p","type":"element","children":["3Z547qTsNMtNigwem9K5U","rfiCiC0THt8n9IIdNgXO9"],"classes":{"sahaH":{"formula":{"type":"value","value":true}}},"customProperties":{}},"QeCsnALNjVgVvOz-9WyPR":{"tag":"h1","type":"element","children":["mm8biyrAO7ydL76l5AeP-"],"classes":{"euZEyd":{"formula":{"type":"value","value":true}}},"customProperties":{}},"Rt-gijAVJhK-NAnA1YroZ":{"tag":"div","type":"element","children":["2_nXwgR7-94Bfpne_1H3U","CcZQXPZLUDeNptvM8CLg5"],"classes":{"bCauLL":{"formula":{"type":"value","value":true}}},"customProperties":{}},"SJNXaUH9h9RPyDgyIaiOp":{"tag":"h2","type":"element","children":["35p2CL4nyPkzIoCs6LGEH"],"classes":{"izyDZ":{"formula":{"type":"value","value":true}}},"customProperties":{}},"U0zF0pKkq-eL8kZ37U2dn":{"type":"text","value":{"type":"value","value":"carousel-slide\n"}},"U3Jbt8uhgaWQviL2IVeF2":{"tag":"h3","type":"element","children":["Cl_Z7ih-pqRFpjdrw0XXX"],"classes":{"blVCsl":{"formula":{"type":"value","value":true}}},"customProperties":{}},"VwwNihy7tfBNZtuxHm7fN":{"tag":"li","type":"element","value":{"type":"value","value":"The main component holds the slot for the slide. It's the main wrapper for all the content. It's divided in three main div's. \n1. A div that contains the left arrow.\n2. A div that contains a slot for your div slide.\n3. A div that contains  the right arrow.\n\nTo install the carousel:\n1. Add carousel-main to a div\n2. Add a carousel-slide to "},"children":["U3Jbt8uhgaWQviL2IVeF2","xu87yQ3IlDqo0C7RupW9d","Wr90SZ-P_JCipklvTV_kb"],"classes":{"cEskVI":{"formula":{"type":"value","value":true}}},"customProperties":{}},"Wr90SZ-P_JCipklvTV_kb":{"tag":"div","type":"element","children":["2LGHBxYTwrqNPSUDQeKda"],"classes":{"eybmGA":{"formula":{"type":"value","value":true}}},"customProperties":{}},"XYvhdwoNHC-1YEieFX1aW":{"type":"text","value":{"type":"value","value":"This is a placeholder slide with a slot where you can insert content. You can insert individual or repeat items that will populate the slider. \n\nIt's easy to add a Carousel to your web app:\nStep 1: Add a carousel-main component where you want the carousel\nStep 2: Add a carousel-slide component to the carousel-main component (As many as you want to display)\nStep 3: Add content to each of the carousel-slide components.\n"}},"XsEDgCz5DD_Codh5DC1K8":{"tag":"section","type":"element","children":["SJNXaUH9h9RPyDgyIaiOp","Rt-gijAVJhK-NAnA1YroZ"],"classes":{"tSDEA":{"formula":{"type":"value","value":true}}},"customProperties":{}},"Z6tVrHuTv7k0cK4wvaJrt":{"tag":"main","type":"element","children":["XsEDgCz5DD_Codh5DC1K8","bApwukaoaZzimTKDgTCK3","a8o6btiQWSFFv1k3e7zfm"],"classes":{"drWRwT":{"formula":{"type":"value","value":true}}},"customProperties":{}},"ZHfzeDUwu7v6DrP7t3Bdq":{"tag":"p","type":"element","children":["XYvhdwoNHC-1YEieFX1aW"],"classes":{"eleUpJ":{"formula":{"type":"value","value":true}}},"customProperties":{}},"a-eAluGYxSihtKtnSnfXW":{"tag":"div","type":"element","children":["2EW9PRR8siWEXO_wjoJFb"],"classes":{"YTJFj":{"formula":{"type":"value","value":true}}},"customProperties":{}},"a8o6btiQWSFFv1k3e7zfm":{"tag":"section","type":"element","children":["fY0u9nig9fhogxMP1U2pA","nnI_HuxK_7Ukkcr5QazQY","yjk89zJT4oIfadXn9cj5B"],"classes":{"tSDEA":{"formula":{"type":"value","value":true}}},"customProperties":{}},"bApwukaoaZzimTKDgTCK3":{"tag":"section","type":"element","children":["tUFs8bp48t5KYIt31vLC7","a-eAluGYxSihtKtnSnfXW"],"classes":{"tSDEA":{"formula":{"type":"value","value":true}}},"customProperties":{}},"boX5snZpozQWWhULHc-nM":{"name":"carousel-main","type":"component","children":["51JAHw8fRQP4L1sOHFCza","yZrTGv9d6B36q1K6z63pU","LgWPLAFmFmS7PllE8HSuz","yj4fDpurgo964J8h7-l55","c5f2CEwt-GjHAY9FqJa-q"],"customProperties":{}},"c5f2CEwt-GjHAY9FqJa-q":{"name":"carousel-slide","type":"component","children":["dAy-8xWmZ1RBT7tG1lHF4"],"customProperties":{}},"dAy-8xWmZ1RBT7tG1lHF4":{"tag":"img","type":"element","attrs":{"alt":{"type":"value","value":""},"src":{"type":"value","value":"/cdn-cgi/imagedelivery/ZIty0Vhmkm0nD-fBKJrTZQ/carousel:CoolCat5/public"}},"classes":{"chAEml":{"formula":{"type":"value","value":true}}},"customProperties":{}},"eu0KbD93wVtJIACji7CXD":{"tag":"h3","type":"element","children":["ixBit01D_lDkm6iH2rHXY"],"classes":{"izyDZ":{"formula":{"type":"value","value":true}}},"customProperties":{}},"fY0u9nig9fhogxMP1U2pA":{"tag":"h2","type":"element","children":["wdpWA1zUCQ1brShtAwglS"],"classes":{"izyDZ":{"formula":{"type":"value","value":true}}},"customProperties":{}},"ixBit01D_lDkm6iH2rHXY":{"type":"text","value":{"type":"value","value":"Carousel"}},"jM-ME7jtHWPf6EqtfbDKb":{"tag":"img","type":"element","attrs":{"alt":{"type":"value","value":""},"src":{"type":"value","value":"/cdn-cgi/imagedelivery/ZIty0Vhmkm0nD-fBKJrTZQ/carousel:CoolCat3/public"}},"classes":{"chAEml":{"formula":{"type":"value","value":true}}},"customProperties":{}},"kaUh9RCl6KHGW6VhjIJBn":{"tag":"li","type":"element","children":["DYO-Tzp_wUiYGzKvB0W_q","ZHfzeDUwu7v6DrP7t3Bdq","lYr4_RykPcUyOXWXjPbpA"],"classes":{"cEskVI":{"formula":{"type":"value","value":true}}},"customProperties":{}},"lYr4_RykPcUyOXWXjPbpA":{"tag":"div","type":"element","children":["3mHgNnj_9yqKYCJ3qX1VQ"],"classes":{"eybmGA":{"formula":{"type":"value","value":true}}},"customProperties":{}},"mCpVmMnnzNpDIaKaiKQEk":{"type":"text","value":{"type":"value","value":"Demo"}},"mm8biyrAO7ydL76l5AeP-":{"type":"text","value":{"type":"value","value":"The cool cats carousel"}},"nnI_HuxK_7Ukkcr5QazQY":{"id":"G9NMRjsMq6XnzpGNemg81","tag":"ul","type":"element","children":["VwwNihy7tfBNZtuxHm7fN"],"classes":{"erbmxD":{"formula":{"type":"value","value":true}}},"customProperties":{}},"r1OlgJ5CsE6uUFvgJfzyr":{"type":"text","value":{"type":"value","value":"Try the demo below"}},"rfiCiC0THt8n9IIdNgXO9":{"tag":"span","type":"element","children":["r1OlgJ5CsE6uUFvgJfzyr"],"classes":{"eLzByc":{"formula":{"type":"value","value":true}}},"customProperties":{}},"tUFs8bp48t5KYIt31vLC7":{"tag":"h2","type":"element","children":["mCpVmMnnzNpDIaKaiKQEk"],"classes":{"izyDZ":{"formula":{"type":"value","value":true}}},"customProperties":{}},"wdpWA1zUCQ1brShtAwglS":{"type":"text","value":{"type":"value","value":"Components"}},"xu87yQ3IlDqo0C7RupW9d":{"tag":"p","type":"element","children":["Mwnd3j72YPUa2P4095X_U"],"classes":{"eleUpJ":{"formula":{"type":"value","value":true}}},"customProperties":{}},"yZrTGv9d6B36q1K6z63pU":{"name":"carousel-slide","type":"component","children":["6n1L2H0G66ZEJrvUet_-F"],"customProperties":{}},"yj4fDpurgo964J8h7-l55":{"name":"carousel-slide","type":"component","children":["JJyUv7HKnfCULAmaudxV6"],"customProperties":{}},"yjk89zJT4oIfadXn9cj5B":{"id":"G9NMRjsMq6XnzpGNemg81","tag":"ul","type":"element","children":["kaUh9RCl6KHGW6VhjIJBn"],"classes":{"erbmxD":{"formula":{"type":"value","value":true}}},"customProperties":{}}},"route":{"path":[],"query":{}},"onLoad":{"actions":[],"trigger":"load"},"functions":{}},"components":[{"name":"carousel-slide","nodes":{"root":{"tag":"carousel-slide","type":"element","attrs":{"data-slide":{"name":"@toddle/string","type":"function","arguments":[{"name":"Input","type":{"type":"Any"},"formula":{"type":"value","value":""}}],"display_name":"String"}},"children":["PrMjPdnoEYnPoTrXWO1H8"],"customProperties":{}},"PrMjPdnoEYnPoTrXWO1H8":{"type":"slot"}},"version":2,"exported":true},{"name":"carousel-main","nodes":{"root":{"tag":"carousel-main","type":"element","children":["JOFi4iYM8OQq7GGD9cJlI","djimuOV5ssMV8cDZrAR7x","iGw-qDi3sEJMjxtwo4gKw"],"classes":{"eYSUQF":{"formula":{"type":"value","value":true}}},"customProperties":{}},"9yE6ivyNcyr106ghKmSFK":{"tag":"polyline","type":"element","attrs":{"points":{"type":"value","value":"15 6 9 12 15 18"}},"customProperties":{}},"JOFi4iYM8OQq7GGD9cJlI":{"tag":"div","type":"element","events":{"click":{"trigger":"click","actions":[{"name":"Scroll","version":2,"arguments":[{"name":"elementId","formula":{"type":"function","name":"@toddle/concatenate","arguments":[{"name":"0","formula":{"type":"function","name":"@toddle/string","arguments":[{"name":"Input","formula":{"type":"value","value":"scroll-container-"},"type":{"type":"Any"}}],"display_name":"String"},"type":{"type":"Union","types":[{"type":"String"},{"type":"Array","ofType":{"type":"Any"}}]}},{"name":"0","formula":{"type":"path","path":["Variables","id"]},"type":{"type":"Union","types":[{"type":"String"},{"type":"Array","ofType":{"type":"Any"}}]}}],"variableArguments":true,"display_name":"Concatenate"}},{"name":"direction","formula":{"name":"@toddle/number","type":"function","arguments":[{"name":"Input","type":{"type":"Any"},"formula":{"type":"value","value":"-1"}}],"display_name":"Number"}}],"handlerRaw":"function Scroll({ elementId, direction }, { root }) {\n  if (typeof elementId !== \"string\") {\n    return;\n  }\n\n  const elem = root.getElementById(elementId);\n  if (!elem) {\n    return; // Ensure the element exists\n  }\n\n  const slides = elem.querySelectorAll('[slide-item]');\n  if (slides.length === 0) {\n    return; // Ensure there are slides\n  }\n\n  // Assuming a horizontal scroll, get the bounding rectangle of the scroll container\n  const elemRect = elem.getBoundingClientRect();\n\n  // Find the leftmost visible slide\n  let nextSlide = null;\n  for (let slide of slides) {\n    const slideRect = slide.getBoundingClientRect();\n    // Check if slide is fully or partially visible\n    if (slideRect.left >= elemRect.left && slideRect.right <= elemRect.right) {\n      const nextIndex = Array.from(slides).indexOf(slide) + 1;\n      if (nextIndex < slides.length) {\n        nextSlide = slides[nextIndex];\n      }\n      break; // Found the leftmost visible slide, no need to continue\n    }\n  }\n\n  if (nextSlide) {\n    // Scroll the next slide into view\n    nextSlide.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\n  }\n}\n"}]}},"children":["MGoyKhQUyesCgdqf_vaw6"],"classes":{"cMDvlk":{"formula":{"type":"value","value":true}}},"customProperties":{}},"MGoyKhQUyesCgdqf_vaw6":{"tag":"svg","type":"element","attrs":{"fill":{"type":"value","value":"none"},"width":{"type":"value","value":"18"},"xmlns":{"type":"value","value":"http://www.w3.org/2000/svg"},"height":{"type":"value","value":"18"},"stroke":{"type":"value","value":"currentColor"},"viewBox":{"type":"value","value":"0 0 24 24"},"stroke-width":{"type":"value","value":"1.5"},"stroke-linecap":{"type":"value","value":"round"},"stroke-linejoin":{"type":"value","value":"round"}},"children":["Tg0awmr0isd9cpkaGEUjB","gKBPLUaKPes48Y9zZiiHz"],"customProperties":{}},"Tg0awmr0isd9cpkaGEUjB":{"tag":"path","type":"element","attrs":{"d":{"type":"value","value":"M0 0h24v24H0z"},"fill":{"type":"value","value":"none"},"stroke":{"type":"value","value":"none"}},"customProperties":{}},"djimuOV5ssMV8cDZrAR7x":{"id":"eXWe0uJvzyb-nfWm_4fvI","tag":"div","type":"element","attrs":{"id":{"type":"function","name":"@toddle/concatenate","arguments":[{"name":"0","formula":{"type":"function","name":"@toddle/string","arguments":[{"name":"Input","formula":{"type":"value","value":"scroll-container-"},"type":{"type":"Any"}}],"display_name":"String"},"type":{"type":"Union","types":[{"type":"String"},{"type":"Array","ofType":{"type":"Any"}}]}},{"name":"0","formula":{"type":"path","path":["Variables","id"]},"type":{"type":"Union","types":[{"type":"String"},{"type":"Array","ofType":{"type":"Any"}}]}}],"variableArguments":true,"display_name":"Concatenate"}},"children":["mbLL_56uLL9OXpf7cfXYo"],"classes":{"bStUcM":{"formula":{"type":"value","value":true}}},"customProperties":{}},"gKBPLUaKPes48Y9zZiiHz":{"tag":"polyline","type":"element","attrs":{"points":{"type":"value","value":"15 6 9 12 15 18"}},"customProperties":{}},"gco9oYrT0JDyQGh1IxWxy":{"tag":"path","type":"element","attrs":{"d":{"type":"value","value":"M0 0h24v24H0z"},"fill":{"type":"value","value":"none"},"stroke":{"type":"value","value":"none"}},"customProperties":{}},"iGw-qDi3sEJMjxtwo4gKw":{"tag":"div","type":"element","events":{"click":{"trigger":"click","actions":[{"name":"Scroll","version":2,"arguments":[{"name":"elementId","formula":{"type":"function","name":"@toddle/concatenate","arguments":[{"name":"0","formula":{"type":"function","name":"@toddle/string","arguments":[{"name":"Input","formula":{"type":"value","value":"scroll-container-"},"type":{"type":"Any"}}],"display_name":"String"},"type":{"type":"Union","types":[{"type":"String"},{"type":"Array","ofType":{"type":"Any"}}]}},{"name":"0","formula":{"type":"path","path":["Variables","id"]},"type":{"type":"Union","types":[{"type":"String"},{"type":"Array","ofType":{"type":"Any"}}]}}],"variableArguments":true,"display_name":"Concatenate"}},{"name":"direction","formula":{"name":"@toddle/number","type":"function","arguments":[{"name":"Input","type":{"type":"Any"},"formula":{"type":"value","value":"1"}}],"display_name":"Number"}}],"handlerRaw":"function Scroll({ elementId, direction }, { root }) {\n  if (typeof elementId !== \"string\") {\n    return;\n  }\n\n  const elem = root.getElementById(elementId);\n  if (!elem) {\n    return; // Ensure the element exists\n  }\n\n  const slides = elem.querySelectorAll('[slide-item]');\n  if (slides.length === 0) {\n    return; // Ensure there are slides\n  }\n\n  // Assuming a horizontal scroll, get the bounding rectangle of the scroll container\n  const elemRect = elem.getBoundingClientRect();\n\n  // Find the leftmost visible slide\n  let nextSlide = null;\n  for (let slide of slides) {\n    const slideRect = slide.getBoundingClientRect();\n    // Check if slide is fully or partially visible\n    if (slideRect.left >= elemRect.left && slideRect.right <= elemRect.right) {\n      const nextIndex = Array.from(slides).indexOf(slide) + 1;\n      if (nextIndex < slides.length) {\n        nextSlide = slides[nextIndex];\n      }\n      break; // Found the leftmost visible slide, no need to continue\n    }\n  }\n\n  if (nextSlide) {\n    // Scroll the next slide into view\n    nextSlide.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\n  }\n}\n"}]}},"children":["ihxtqwsOJYilq9U5WvPND"],"classes":{"hQVqf":{"formula":{"type":"value","value":true}}},"customProperties":{}},"ihxtqwsOJYilq9U5WvPND":{"tag":"svg","type":"element","attrs":{"fill":{"type":"value","value":"none"},"width":{"type":"value","value":"18"},"xmlns":{"type":"value","value":"http://www.w3.org/2000/svg"},"height":{"type":"value","value":"18"},"stroke":{"type":"value","value":"currentColor"},"viewBox":{"type":"value","value":"0 0 24 24"},"stroke-width":{"type":"value","value":"1.5"},"stroke-linecap":{"type":"value","value":"round"},"stroke-linejoin":{"type":"value","value":"round"}},"children":["gco9oYrT0JDyQGh1IxWxy","9yE6ivyNcyr106ghKmSFK"],"customProperties":{}},"mbLL_56uLL9OXpf7cfXYo":{"type":"slot"}},"version":2,"exported":true,"variables":{"id":{"initialValue":{"type":"function","name":"@toddle/takeLast","arguments":[{"name":"Array","formula":{"type":"function","name":"@toddle/string","arguments":[{"name":"Input","formula":{"type":"function","name":"@toddle/randomNumber","arguments":[],"display_name":"Random number"},"type":{"type":"Any"}}],"display_name":"String"},"type":{"type":"Union","types":[{"type":"String"},{"type":"Array"}]}},{"name":"Count","formula":{"type":"value","value":6},"type":{"type":"Number"}}],"display_name":"Take last"}}}}]}