{"version":3,"file":"TextIndenter.DCK4_P4m.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/XBLQKNP4H4SunjkAGBSw/VJkxmkFVML31c5bBRko6/TextIndenter.js"],"sourcesContent":["// Text component with first-line indent functionality and overflow protection\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function TextIndenter(props){const{text,indentSpaces,font,textColor}=props;const processedText=useMemo(()=>{// Handle empty or whitespace-only text\nif(!text||text.trim().length===0){return text||\"\";}// Apply indent\nconst spaces=\" \".repeat(Math.max(0,Math.min(indentSpaces,50)));return spaces+text;},[text,indentSpaces]);const isFixedWidth=props?.style&&props.style.width===\"100%\";return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",...isFixedWidth?{...props?.style}:{minWidth:\"max-content\"}},children:/*#__PURE__*/_jsx(\"div\",{style:{...font,color:textColor,whiteSpace:\"pre-wrap\",wordBreak:\"break-word\",overflowWrap:\"break-word\",...isFixedWidth?{}:{width:\"max-content\"}},children:processedText||\"Enter your text here...\"})});}addPropertyControls(TextIndenter,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"This is a sample paragraph that will have its first line indented. The indent will only apply to the very beginning of this text, creating a traditional paragraph formatting style.\",displayTextArea:true},indentSpaces:{type:ControlType.Number,title:\"Indent Spaces\",defaultValue:4,min:0,max:50,step:1,displayStepper:true},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextIndenter\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":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