{"version":3,"file":"CodeBaseHorizontalList.8Qkn0uGL.mjs","names":["BaseHorizontalList","Children"],"sources":["https:/framerusercontent.com/modules/OPJlnSDokJ2eD9lIXljn/mr2QJ5zw4xvkJ1Vbvzgr/CMSLibrary.js","https:/framer.com/m/CMSLibrary-09eo.js","https:/framerusercontent.com/modules/pf8wcpeRLc8n84Ywlntu/YmalJVdwRC2L15ujc7gu/CodeBaseHorizontalList.js"],"sourcesContent":["export function getCollectionData(collectionList){var _collectionList_props,_collectionList_props_children_props,_collectionList_props_children,_collectionList_props1,_collectionList_props_children_props_children_props,_collectionList_props_children_props_children,_collectionList_props_children_props1,_collectionList_props_children1,_collectionList_props2,_queryParent_props;let queryParent=null;if(collectionList===null||collectionList===void 0?void 0:(_collectionList_props=collectionList.props)===null||_collectionList_props===void 0?void 0:_collectionList_props.query){queryParent=collectionList;}else if(collectionList===null||collectionList===void 0?void 0:(_collectionList_props1=collectionList.props)===null||_collectionList_props1===void 0?void 0:(_collectionList_props_children=_collectionList_props1.children)===null||_collectionList_props_children===void 0?void 0:(_collectionList_props_children_props=_collectionList_props_children.props)===null||_collectionList_props_children_props===void 0?void 0:_collectionList_props_children_props.query){queryParent=collectionList.props.children;}else if(collectionList===null||collectionList===void 0?void 0:(_collectionList_props2=collectionList.props)===null||_collectionList_props2===void 0?void 0:(_collectionList_props_children1=_collectionList_props2.children)===null||_collectionList_props_children1===void 0?void 0:(_collectionList_props_children_props1=_collectionList_props_children1.props)===null||_collectionList_props_children_props1===void 0?void 0:(_collectionList_props_children_props_children=_collectionList_props_children_props1.children)===null||_collectionList_props_children_props_children===void 0?void 0:(_collectionList_props_children_props_children_props=_collectionList_props_children_props_children.props)===null||_collectionList_props_children_props_children_props===void 0?void 0:_collectionList_props_children_props_children_props.query){queryParent=collectionList.props.children.props.children;}const query=queryParent===null||queryParent===void 0?void 0:(_queryParent_props=queryParent.props)===null||_queryParent_props===void 0?void 0:_queryParent_props.query;let queryData=null;if(query===null||query===void 0?void 0:query.from){if(query.from.data){queryData=query.from.data;}else if(query.from.left){let left=query.from.left;for(let i=0;i<100;i++){if(left.type==\"Collection\"){queryData=left.data;break;}else if(left.left){left=left.left;}else{break;}}}}// Get property controls\nconst propertyControlsById=(queryData===null||queryData===void 0?void 0:queryData.propertyControls)||{};const propertyControlsByName={};for(const id in propertyControlsById){const control=propertyControlsById[id];propertyControlsByName[control.title]={id,...control};}// Get children function\nlet childrenFunction=null;if(collectionList){var _collectionList_props3,_clpc_props,_clpc_props_children_props,_clpc_props_children,_clpc_props1;const clpc=(_collectionList_props3=collectionList.props)===null||_collectionList_props3===void 0?void 0:_collectionList_props3.children;if(typeof clpc==\"function\"){childrenFunction=clpc;}else if(typeof(clpc===null||clpc===void 0?void 0:(_clpc_props=clpc.props)===null||_clpc_props===void 0?void 0:_clpc_props.children)==\"function\"){childrenFunction=clpc.props.children;}else if(typeof(clpc===null||clpc===void 0?void 0:(_clpc_props1=clpc.props)===null||_clpc_props1===void 0?void 0:(_clpc_props_children=_clpc_props1.children)===null||_clpc_props_children===void 0?void 0:(_clpc_props_children_props=_clpc_props_children.props)===null||_clpc_props_children_props===void 0?void 0:_clpc_props_children_props.children)==\"function\"){childrenFunction=clpc.props.children.props.children;}}return{query,queryParent,queryData,propertyControlsById,propertyControlsByName,childrenFunction};}export function addFieldsToSelect(fields,query,propertyControlsByName){const alias=query.alias;const select=Array.isArray(query===null||query===void 0?void 0:query.select)?[...query.select]:[];for(const fieldName of fields){var _propertyControlsByName_fieldName;const fieldId=(_propertyControlsByName_fieldName=propertyControlsByName[fieldName])===null||_propertyControlsByName_fieldName===void 0?void 0:_propertyControlsByName_fieldName.id;if(!fieldId){continue;}let matchFound=false;for(const item of select){if(item.name===fieldId&&item.type===\"Identifier\"&&item.collection===alias){matchFound=true;continue;}}if(matchFound){continue;}select.push({collection:alias,name:fieldId,type:\"Identifier\"});}return select;}\nexport const __FramerMetadata__ = {\"exports\":{\"getCollectionData\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addFieldsToSelect\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CMSLibrary.map","/*\n * CMSLibrary\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/OPJlnSDokJ2eD9lIXljn/mr2QJ5zw4xvkJ1Vbvzgr/CMSLibrary.js\"\n","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{Children}from\"react\";import{addPropertyControls,ControlType,RenderTarget,// @ts-ignore\nuseQueryData}from\"framer\";import{getCollectionData}from\"https://framer.com/m/CMSLibrary-09eo.js\";import{BaseHorizontalList}from\"https://framer-tkd-ui.vercel.app/framer/britishtheatre.js\";// import { BaseHorizontalList } from \"http://localhost:3001/framer/britishtheatre.js\"\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 300\n */export default function CodeBaseHorizontalList(props){const{collectionList,startLayers,endLayers,gap,itemMinWidth,itemsInViewSm,itemsInViewMd,padding,fade,chevron}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const items=isCanvas?[]:getCollectionListItems(collectionList?.[0]);// Build layers array\nlet layers=[];if(startLayers){layers=layers.concat(startLayers);}if(!isCanvas){for(let i=0;i<items.length;i++){layers.push(items[i].props.children.props.children);}}else{// Show placeholders in canvas mode\nconst placeholderCount=Math.max(itemsInViewMd||itemsInViewSm||4,4);for(let i=0;i<placeholderCount;i++){layers.push(/*#__PURE__*/_jsx(CanvasPlaceholder,{title:\"Run project to view list content\",subtitle:\"Collection List content is not accessible to the component in the editor. Run your project or visit the live website to view the list with CMS content.\",style:{minWidth:itemMinWidth}},`placeholder-${i}`));}}if(endLayers){layers=layers.concat(endLayers);}// Compute chevron position\nlet chevronPosition=chevron?.position??\"center\";if(chevron?.position===\"custom\"){chevronPosition={top:chevron?.customTop??80};}// Add inset if provided\nif(chevron?.inset!==undefined){if(typeof chevronPosition===\"string\"){// Convert string position to object with inset\n// For \"center\", we keep it as string and let component handle transform\n// For \"top\", we need to calculate top value based on chevronSize\nif(chevronPosition===\"top\"){const chevronSize=chevron?.size??40;chevronPosition={top:chevronSize/2,inset:chevron.inset};}else{// For \"center\", convert to object but component will handle transform\nchevronPosition={top:\"50%\",inset:chevron.inset};}}else{// Add inset to existing object\nchevronPosition={...chevronPosition,inset:chevron.inset};}}return /*#__PURE__*/_jsx(BaseHorizontalList,{gap:gap,itemsInViewSm:itemsInViewSm,itemsInViewMd:itemsInViewMd,showFade:fade?.show,fadeColor:fade?.color,showChevrons:chevron?.show,showChevronsFrom:chevron?.showFrom,chevronSize:chevron?.size,chevronPosition:chevronPosition,twScope:true,children:layers});}CodeBaseHorizontalList.displayName=\"Code Base Horizontal List\";addPropertyControls(CodeBaseHorizontalList,{collectionList:{type:ControlType.Slot},startLayers:{type:ControlType.Slot,title:\"Start\"},endLayers:{type:ControlType.Slot,title:\"End\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:16,min:0,max:64,step:1,displayStepper:true},itemsInViewSm:{type:ControlType.Number,title:\"Items @sm (>=768px)\",description:\"Items visible at >=768px container width\",defaultValue:3,min:1,max:6,step:1,displayStepper:true},itemsInViewMd:{type:ControlType.Number,title:\"Items @md (>=1024px)\",description:\"Items visible at >=1024px container width\",defaultValue:4,min:1,max:8,step:1,displayStepper:true},fade:{type:ControlType.Object,controls:{show:{type:ControlType.Boolean,title:\"Show Fade\",defaultValue:false},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"white\",hidden:props=>!props.show}}},chevron:{type:ControlType.Object,controls:{show:{type:ControlType.Boolean,title:\"Show Chevrons\",defaultValue:true},showFrom:{type:ControlType.Enum,title:\"Show From\",options:[\"always\",\"sm\",\"md\"],optionTitles:[\"Always\",\">=768px\",\">=1024px\"],defaultValue:\"sm\",hidden:props=>!props.show},size:{type:ControlType.Number,title:\"Size\",defaultValue:40,min:24,max:80,step:2,displayStepper:true,hidden:props=>!props.show},position:{type:ControlType.Enum,title:\"Position\",options:[\"center\",\"top\",\"custom\"],optionTitles:[\"Center\",\"Top\",\"Custom\"],defaultValue:\"center\",hidden:props=>!props.show},customTop:{type:ControlType.Number,title:\"Custom Top (px)\",defaultValue:80,min:0,max:400,step:5,displayStepper:true,hidden:props=>!props.show||props.position!==\"custom\"},inset:{type:ControlType.Number,title:\"Inset X (px)\",description:\"Horizontal inset from edges for both chevrons\",defaultValue:0,min:0,max:200,step:1,displayStepper:true,hidden:props=>!props.show}}}});// --- Helper Functions ---\nfunction getCollectionListItems(collectionList){const{query,childrenFunction}=getCollectionData(collectionList);if(query&&childrenFunction){const data=useQueryData(query);let children=[];const clChildren=childrenFunction(data);if(Array.isArray(clChildren)){children=clChildren;}else if(Array.isArray(clChildren?.props?.children?.[0])){children=clChildren.props.children[0];}else if(Array.isArray(clChildren?.props?.children)){children=clChildren.props.children;}if(children){return Children.toArray(children);}}return[];}const CanvasPlaceholder=({title,subtitle,style})=>{return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",width:\"100%\",height:\"100%\",minHeight:200,placeContent:\"center\",placeItems:\"center\",flexDirection:\"column\",backgroundColor:\"rgba(136, 85, 255, 0.1)\",borderRadius:6,border:\"1px dashed rgb(136, 85, 255)\",color:\"rgb(136, 85, 255)\",fontSize:12,padding:24,...style},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0,marginBottom:10,fontWeight:600,textAlign:\"center\"},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,opacity:.7,maxWidth:500,lineHeight:1.5,textAlign:\"center\"},children:subtitle})]});};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CodeBaseHorizontalList\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"300\",\"framerContractVersion\":\"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