{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/0GgVEvgiKyqMqFi6hWSA/bssX0sZtozNLwSUgS7Fj/TextLists.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @copyright \u00A9framersnippets.com\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerDisableUnlink\n **/export default function TextLists(props){const{content,lists,font}=props;const baseStyles=useMemo(()=>({fontFamily:font.fontFamily,fontSize:font.fontSize,fontWeight:font.fontWeight,lineHeight:font.lineHeight,letterSpacing:font.letterSpacing,margin:0,padding:0}),[font]);const parsedLists=useMemo(()=>{// Replace literal \"\\n\" with actual newline characters\nconst processedContent=content.replace(/\\\\n/g,\"\\n\");const lines=processedContent.split(\"\\n\");// Rest of your parsing logic remains the same\nconst result=[];let currentList=[];let currentIndent=-1;lines.forEach(line=>{const indent=line.search(/\\S/);if(indent===-1)return;if(indent!==currentIndent){if(currentList.length>0){result.push(currentList);}currentList=[];currentIndent=indent;}currentList.push({content:line.trim(),indent});});if(currentList.length>0){result.push(currentList);}return result;},[content]);const renderListItem=useMemo(()=>(item,itemIndex,listStyle)=>{const isCustomMarker=listStyle.listStyleType===\"image\"||listStyle.listStyleType===\"content\";return /*#__PURE__*/_jsxs(\"li\",{style:{margin:listStyle.margin,display:isCustomMarker?\"flex\":\"list-item\",alignItems:listStyle.align===\"middle\"?\"center\":listStyle.align===\"bottom\"?\"flex-end\":\"flex-start\"},children:[listStyle.listStyleType===\"image\"&&listStyle.image&&/*#__PURE__*/_jsx(\"img\",{src:listStyle.image,alt:\"List marker\",style:{width:listStyle.imageSize,height:listStyle.imageSize,marginRight:listStyle.imageGap,flexShrink:0}}),listStyle.listStyleType===\"content\"&&listStyle.content&&/*#__PURE__*/_jsx(\"span\",{style:{marginRight:listStyle.imageGap,flexShrink:0,color:listStyle.markerColor||\"inherit\"},children:listStyle.content}),/*#__PURE__*/_jsx(\"span\",{style:isCustomMarker?{flex:1}:undefined,children:item.content})]},itemIndex);},[]);return /*#__PURE__*/_jsx(\"div\",{children:parsedLists.map((list,listIndex)=>{const listStyle=lists[listIndex]||{};const markerColor=listStyle.markerColor||listStyle.color||\"inherit\";return /*#__PURE__*/_jsxs(\"ul\",{style:{...baseStyles,...listStyle,[\"--marker-color\"]:markerColor,paddingLeft:`${list[0].indent*(listStyle.indent||10)}px`,paddingBottom:listStyle.gap,listStyleType:listStyle.listStyleType||\"none\",listStylePosition:\"inside\",color:listStyle.color||\"inherit\",\"--marker-color\":markerColor},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                            ul[style*=\"--marker-color\"] > li::marker {\n                                color: var(--marker-color);\n                            }\n                        `}),list.map((item,itemIndex)=>renderListItem(item,itemIndex,listStyle))]},listIndex);})});}addPropertyControls(TextLists,{content:{type:ControlType.String,title:\"Content\",defaultValue:\"Item\\n  Sub-item\\n    Sub-sub-item\",placeholder:\"Type something\u2026\",displayTextArea:true,description:\"How to:\\n Type items, one per line\\n Use spaces to nest\\n Each space = new list style\\n Add items to style each lists\\n\\n CMS: [Tutorial](https://www.framersnippets.com/articles/styling-lists-in-framer-a-comprehensive-solution-for-nested-lists-and-cms-connected-lists)\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",displayTextAlignment:false,defaultFontType:\"sans-serif\",defaultValue:{fontSize:15,lineHeight:1.4,letterSpacing:0}},lists:{type:ControlType.Array,title:\"Lists\",control:{type:ControlType.Object,controls:{listStyleType:{type:ControlType.Enum,title:\"Style\",options:[\"none\",\"image\",\"content\",\"disc\",\"circle\",\"square\",\"decimal\",\"decimal-leading-zero\",\"lower-alpha\",\"upper-alpha\",\"lower-roman\",\"upper-roman\",\"lower-greek\",\"upper-greek\",\"armenian\",\"georgian\",\"cjk-decimal\",\"hebrew\",\"hiragana\",\"hiragana-iroha\",\"katakana\",\"katakana-iroha\"],defaultValue:\"disc\"},image:{type:ControlType.Image,title:\"Image\",hidden:props=>props.listStyleType!==\"image\"},content:{type:ControlType.String,title:\"Content\",placeholder:\"Enter content (e.g., emoji)\",hidden:props=>props.listStyleType!==\"content\"},align:{type:ControlType.Enum,title:\"\u200E\",options:[\"top\",\"middle\",\"bottom\"],optionIcons:[\"text-align-top\",\"text-align-middle\",\"text-align-bottom\"],defaultValue:\"middle\",displaySegmentedControl:true,hidden:props=>props.listStyleType!==\"image\"&&props.listStyleType!==\"content\"},imageSize:{type:ControlType.Number,title:\"Size\",defaultValue:14,min:0,max:100,displayStepper:true,hidden:props=>props.listStyleType!==\"image\"},imageGap:{type:ControlType.Number,title:\"Spacing\",defaultValue:10,min:0,max:50,displayStepper:true,hidden:props=>props.listStyleType!==\"image\"&&props.listStyleType!==\"content\"},color:{type:ControlType.Color,title:\"Text\",defaultValue:\"#000000\"},markerColor:{type:ControlType.Color,title:\"Marker\"},indent:{type:ControlType.Number,title:\"Indent\",defaultValue:10,min:0,max:100,displayStepper:true},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:0,min:0,max:100,displayStepper:true},margin:{type:ControlType.Padding,title:\"Item Margin\",defaultValue:\"0\"}}},defaultValue:[]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextLists\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextLists.map"],
  "mappings": "uEAKmB,SAARA,EAA2BC,EAAM,CAAC,GAAK,CAAC,QAAAC,EAAQ,MAAAC,EAAM,KAAAC,CAAI,EAAEH,EAAYI,EAAWC,EAAQ,KAAK,CAAC,WAAWF,EAAK,WAAW,SAASA,EAAK,SAAS,WAAWA,EAAK,WAAW,WAAWA,EAAK,WAAW,cAAcA,EAAK,cAAc,OAAO,EAAE,QAAQ,CAAC,G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"parsedLists", "lines", "result", "currentList", "currentIndent", "line", "indent", "renderListItem", "item", "itemIndex", "listStyle", "isCustomMarker", "u", "p", "list", "listIndex", "markerColor", "addPropertyControls", "ControlType"]
}
