{"version":3,"file":"TextWithIllustrations.kFCfmVTb.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/xZftLaASEYHL6BbKK00B/XaUhC5zpgqn2svNsXHnW/TextWithIllustrations.js"],"sourcesContent":["// Component for displaying text with interspersed illustrations from connected layers\n// Text is wrapped in p tag with illustrations in aria-hidden spans for SEO\n// Illustrations are connected via ComponentInstance slots and positioned after specified word counts\n// Illustration height follows text line height\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function TextWithIllustrations(props){const{text=\"Welcome to our amazing kindergarten where children learn and play\",illustration1,afterWord1=3,illustration2,afterWord2=6,illustration3,afterWord3=9,illustration4,afterWord4=12,illustration5,afterWord5=15,textColor,font}=props;const content=useMemo(()=>{const words=text.split(/\\s+/);const slots=[{afterWord:afterWord1,content:illustration1},{afterWord:afterWord2,content:illustration2},{afterWord:afterWord3,content:illustration3},{afterWord:afterWord4,content:illustration4},{afterWord:afterWord5,content:illustration5}].filter(slot=>slot.content).sort((a,b)=>a.afterWord-b.afterWord);const elements=[];let wordIndex=0;slots.forEach((slot,slotIndex)=>{const wordsBeforeSlot=words.slice(wordIndex,slot.afterWord);if(wordsBeforeSlot.length>0){elements.push(wordsBeforeSlot.join(\" \"));if(slot.afterWord<words.length){elements.push(\" \");}}if(slot.afterWord<=words.length){elements.push(/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"inline-block\",verticalAlign:\"top\",height:font.lineHeight||\"inherit\",lineHeight:font.lineHeight||\"inherit\",width:\"auto\",overflow:\"visible\"},children:slot.content},`illustration-${slotIndex}`));if(slot.afterWord<words.length){elements.push(\" \");}}wordIndex=slot.afterWord;});const remainingWords=words.slice(wordIndex);if(remainingWords.length>0){elements.push(remainingWords.join(\" \"));}return elements;},[text,illustration1,afterWord1,illustration2,afterWord2,illustration3,afterWord3,illustration4,afterWord4,illustration5,afterWord5,font.lineHeight]);return /*#__PURE__*/_jsx(\"div\",{role:\"paragraph\",style:{margin:0,padding:0,color:textColor,...font,width:\"100%\"},children:content});}addPropertyControls(TextWithIllustrations,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Welcome to our amazing kindergarten where children learn and play\",displayTextArea:true},illustration1:{type:ControlType.ComponentInstance,title:\"Illustration 1\"},afterWord1:{type:ControlType.Number,title:\"After Word\",defaultValue:3,min:0,step:1,displayStepper:true},illustration2:{type:ControlType.ComponentInstance,title:\"Illustration 2\"},afterWord2:{type:ControlType.Number,title:\"After Word\",defaultValue:6,min:0,step:1,displayStepper:true},illustration3:{type:ControlType.ComponentInstance,title:\"Illustration 3\"},afterWord3:{type:ControlType.Number,title:\"After Word\",defaultValue:9,min:0,step:1,displayStepper:true},illustration4:{type:ControlType.ComponentInstance,title:\"Illustration 4\"},afterWord4:{type:ControlType.Number,title:\"After Word\",defaultValue:12,min:0,step:1,displayStepper:true},illustration5:{type:ControlType.ComponentInstance,title:\"Illustration 5\"},afterWord5:{type:ControlType.Number,title:\"After Word\",defaultValue:15,min:0,step:1,displayStepper:true},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"32px\",variant:\"Semibold\",letterSpacing:\"-0.03em\",lineHeight:\"1.2em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextWithIllustrations\",\"slots\":[\"illustration1\",\"illustration2\",\"illustration3\",\"illustration4\",\"illustration5\"],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextWithIllustrations.map"],"mappings":"0KAOG,SAAwB,EAAsB,EAAM,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