{"version":3,"file":"AutoTextColumns_2.B7mtR0e6.mjs","names":["Children","__esmMin","j","init_npm_react_18_3_1","p","c","init_jsx_runtime","init_framer_B1b760uK","ControlType","addPropertyControls","AutoTextColumns","sampleText","count","columns","spacing","gap","source","selector","target","adjacent","style","styledText","font","text","init_AutoTextColumns_2","props"],"sources":["https:/framerusercontent.com/modules/us2FIgyexDIZI6S29Gqq/UdDeNlncFSAkdAyiG1wX/AutoTextColumns_2.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{Children}from\"react\";const sampleText=\"Paste your text here. The component automatically distributes it between columns, reading from top to bottom and then continuing in the next column.\\n\\nChange Columns to choose how many columns to use. Set it to 1 to display a single continuous text block.\\n\\nThe text reflows automatically when you change its content, font, or the width of the component.\";/**\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 200\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function AutoTextColumns({source=\"plain\",styledText,text=sampleText,columns=2,gap=40,color=\"#E1DEDB\",font,style}){const count=Number.isFinite(columns)?Math.max(1,Math.floor(columns)):2;const spacing=Number.isFinite(gap)?Math.max(0,gap):40;if(source===\"native\"){const selector=`.atc-column-controller[data-columns=\"${count}\"][data-gap=\"${spacing}\"]`;const target='[data-framer-component-type=\"RichTextContainer\"]';const adjacent=`${selector} + ${target}, div:has(> ${selector}) + ${target}`;return /*#__PURE__*/_jsx(\"div\",{className:\"atc-column-controller\",\"data-columns\":count,\"data-gap\":spacing,style:{...style,width:0,height:0,pointerEvents:\"none\",position:\"absolute\"},children:/*#__PURE__*/_jsx(\"style\",{children:`${adjacent} { column-count: ${count} !important; column-gap: ${spacing}px !important; column-fill: balance; display: block !important; overflow: visible !important; }\n                ${selector} + ${target} > *, div:has(> ${selector}) + ${target} > * { orphans: 2; widows: 2; }`})});}if(source===\"styled\"){return /*#__PURE__*/_jsxs(\"div\",{className:\"auto-text-columns-native\",style:{...style,position:\"relative\",width:\"100%\",height:\"auto\",minWidth:0,\"--atc-columns\":count,\"--atc-gap\":`${spacing}px`},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .auto-text-columns-native > .atc-content,\n                    .auto-text-columns-native .atc-content div:has([data-framer-component-type=\"RichTextContainer\"]) {\n                        display: contents !important;\n                    }\n                    .auto-text-columns-native .atc-content [data-framer-component-type=\"RichTextContainer\"] {\n                        position: relative !important;\n                        inset: auto !important;\n                        transform: none !important;\n                        width: 100% !important;\n                        min-width: 0 !important;\n                        max-width: none !important;\n                        height: auto !important;\n                        min-height: 0 !important;\n                        max-height: none !important;\n                        display: block !important;\n                        overflow: visible !important;\n                        column-count: var(--atc-columns);\n                        column-gap: var(--atc-gap);\n                        column-fill: balance;\n                        overflow-wrap: anywhere;\n                    }\n                    .auto-text-columns-native .atc-content [data-framer-component-type=\"RichTextContainer\"] > * {\n                        orphans: 2;\n                        widows: 2;\n                    }\n                `}),Children.toArray(styledText).length>0?/*#__PURE__*/_jsx(\"div\",{className:\"atc-content\",children:styledText}):/*#__PURE__*/_jsx(\"div\",{style:{padding:16,font:\"14px/1.5 Inter, sans-serif\",color:\"#777\",background:\"rgba(128,128,128,0.08)\",borderRadius:8},children:\"Connect a frame containing one native Text layer to Styled Text. Apply your Framer Text Style to that layer.\"})]});}return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",height:\"auto\",minWidth:0,boxSizing:\"border-box\",fontFamily:\"Inter, sans-serif\",fontSize:16,lineHeight:\"1.3em\",letterSpacing:\"-0.02em\",...font,color,columnCount:count,columnGap:spacing,columnFill:\"balance\",whiteSpace:\"pre-wrap\",overflowWrap:\"anywhere\",orphans:2,widows:2},children:text});}AutoTextColumns.displayName=\"Auto Text Columns\";addPropertyControls(AutoTextColumns,{source:{type:ControlType.Enum,title:\"Source\",options:[\"plain\",\"styled\",\"native\"],optionTitles:[\"Plain Text\",\"Styled Layer\",\"Native Page Text\"],defaultValue:\"plain\",displaySegmentedControl:true},styledText:{type:ControlType.ComponentInstance,title:\"Styled Text\",hidden:props=>props.source!==\"styled\",description:\"Connect a frame with one native Text layer. Set its Text Style in Framer; content, links and typography stay connected.\"},text:{type:ControlType.String,title:\"Text\",displayTextArea:true,hidden:props=>props.source===\"styled\"||props.source===\"native\",defaultValue:sampleText},columns:{type:ControlType.Number,title:\"Columns\",defaultValue:2,min:1,max:6,step:1,displayStepper:true,description:\"1 = single text block. Text flows automatically between columns.\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:40,min:0,max:200,step:1,unit:\"px\",hidden:props=>props.columns===1},font:{type:ControlType.Font,title:\"Font\",hidden:props=>props.source===\"styled\"||props.source===\"native\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",lineHeight:\"1.3em\",letterSpacing:\"-0.02em\"}},color:{type:ControlType.Color,title:\"Color\",hidden:props=>props.source===\"styled\"||props.source===\"native\",defaultValue:\"#E1DEDB\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AutoTextColumns\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"800\",\"framerIntrinsicHeight\":\"200\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AutoTextColumns_2.map"],"mappings":"A,iLAKG,SAAwBU,EAAgB,CAAC,SAAO,QAAQ,aAAW,OAAKC,EAAW,UAAQ,EAAE,MAAI,GAAG,QAAM,UAAU,OAAK,SAAO,CAAC,IAAMC,EAAM,OAAO,SAASC,CAAO,EAAE,KAAK,IAAI,EAAE,KAAK,MAAMA,CAAO,CAAC,EAAE,EAAQC,EAAQ,OAAO,SAASC,CAAG,EAAE,KAAK,IAAI,EAAEA,CAAG,EAAE,GAAG,GAAGC,IAAS,SAAS,CAAC,IAAMC,EAAS,wCAA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