{"version":3,"file":"ChapterMarkerItem.DfDCEDoC.mjs","names":[],"sources":["https:/framerusercontent.com/modules/oF04h8P7AW2m4kKC1gwU/l8RgjopF54bfXnraFXZl/ChapterMarkerItem.js"],"sourcesContent":["/**\n * ChapterMarkerItem — Movement Wisdom Yoga\n *\n * One clickable chapter/timestamp row for a Spotlightr video, paired with\n * SpotlightrAdvancedEmbed. Deliberately a single-row component rather than\n * an array-controlled list: stack these as ordinary Framer layers so\n * chapters can be added, removed, or reordered with normal canvas editing\n * (select a row, Cmd+D to duplicate, edit its Timestamp/Label fields, or\n * delete the layer) instead of fighting Framer's array-of-object panel.\n *\n * Wiring: set \"Video ID\" to the same Spotlightr id used in the paired\n * SpotlightrAdvancedEmbed — the base64 slug in the /watch/<id> URL (e.g.\n * \"MTg0ODYyNQ==\"). Advanced Embed Code must be enabled for that video.\n * Turn \"Show Divider\" off on the last row in a stack.\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";function parseTimestamp(ts){if(!ts)return 0;const parts=ts.split(\":\").map(p=>parseInt(p,10)||0);if(parts.length===2)return parts[0]*60+parts[1];if(parts.length===3)return parts[0]*3600+parts[1]*60+parts[2];return 0;}export default function ChapterMarkerItem({videoId=\"\",timestamp=\"00:00\",label=\"Chapter title\",font,textColor=\"rgb(28, 22, 19)\",timeColor=\"rgb(138, 136, 128)\",backgroundColor=\"rgba(0, 0, 0, 0)\",dividerColor=\"rgb(209, 207, 201)\",itemPadding=14,dividerThickness=1,showDivider=true,style}){const fontFamily=font?.fontFamily||\"Satoshi, sans-serif\";const fontWeight=font?.fontWeight??500;const labelSize=font?.fontSize??17;const timeSize=Math.max(11,Math.round(labelSize*.88));const handleClick=()=>{if(typeof window===\"undefined\"||!videoId)return;const seconds=parseTimestamp(timestamp);const w=window;const seek=w.__mwSeekVideo?.[videoId];if(seek){seek(seconds);}else{// The paired SpotlightrAdvancedEmbed may not have registered yet.\nsetTimeout(()=>w.__mwSeekVideo?.[videoId]?.(seconds),300);}};return /*#__PURE__*/_jsxs(\"div\",{role:\"button\",tabIndex:0,onClick:handleClick,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();handleClick();}},style:{display:\"flex\",alignItems:\"center\",gap:20,width:\"100%\",fontFamily,padding:`${itemPadding}px 4px`,backgroundColor,borderBottom:showDivider&&dividerThickness>0?`${dividerThickness}px solid ${dividerColor}`:\"none\",cursor:videoId?\"pointer\":\"default\",outline:\"none\",...style},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontSize:timeSize,fontWeight,color:timeColor,minWidth:44,flexShrink:0},children:timestamp}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:labelSize,fontWeight,color:textColor},children:label})]});}addPropertyControls(ChapterMarkerItem,{videoId:{type:ControlType.String,title:\"Video ID\",placeholder:\"e.g. MTg0ODYyNQ==\",description:\"Must match the paired SpotlightrAdvancedEmbed's Video ID.\"},timestamp:{type:ControlType.String,title:\"Timestamp\",defaultValue:\"00:00\",placeholder:\"mm:ss\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Chapter title\",placeholder:\"Chapter title\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontSize:17},description:\"Sets the label size directly; the timestamp scales proportionally (≈88%).\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgb(28, 22, 19)\"},timeColor:{type:ControlType.Color,title:\"Timestamp\",defaultValue:\"rgb(138, 136, 128)\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(0, 0, 0, 0)\"},itemPadding:{type:ControlType.Number,title:\"Item Padding\",defaultValue:14,min:0,max:60,step:1,displayStepper:true,description:\"Vertical padding above/below this row.\"},dividerColor:{type:ControlType.Color,title:\"Divider Color\",defaultValue:\"rgb(209, 207, 201)\"},dividerThickness:{type:ControlType.Number,title:\"Divider Thickness\",defaultValue:1,min:0,max:8,step:.5,displayStepper:true},showDivider:{type:ControlType.Boolean,title:\"Show Divider\",defaultValue:true,description:\"Turn off on the last row in a stack.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ChapterMarkerItem\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ChapterMarkerItem.map"],"mappings":"iLAcgH,SAAS,EAAe,EAAG,CAAC,GAAG,CAAC,EAAG,MAAO,GAAE,IAAM,EAAM,EAAG,MAAM,GAAG,CAAC,CAAC,IAAI,GAAG,SAAS,EAAE,EAAE,GAAG,CAAC,EAAgH,OAA3G,EAAM,SAAS,EAAS,EAAM,GAAG,GAAG,EAAM,GAAM,EAAM,SAAS,EAAS,EAAM,GAAG,KAAK,EAAM,GAAG,GAAG,EAAM,GAAU,CAAE,CAAC,SAAwB,EAAkB,CAAC,UAAQ,GAAG,YAAU,QAAQ,QAAM,gBAAgB,OAAK,YAAU,kBAAkB,YAAU,qBAAqB,kBAAgB,mBAAmB,eAAa,qBAAqB,cAAY,GAAG,mBAAiB,EAAE,cAAY,GAAK,SAAO,CAAC,IAAM,EAAW,GAAM,YAAY,sBAA4B,EAAW,GAAM,YAAY,IAAU,EAAU,GAAM,UAAU,GAAS,EAAS,KAAK,IAAI,GAAG,KAAK,MAAM,EAAU,GAAG,CAAC,EAAQ,MAAgB,CAAC,GAAU,IAAS,QAAa,CAAC,EAAQ,OAAO,IAAM,EAAQ,EAAe,CAAS,EAAQ,EAAE,EAAa,EAAK,EAAE,gBAAgB,GAAY,EAAM,EAAK,CAAO,EACx9B,eAAe,EAAE,gBAAgB,EAAQ,GAAG,CAAO,EAAE,GAAG,CAAG,EAAE,OAAoB,EAAM,MAAM,CAAC,KAAK,SAAS,SAAS,EAAE,QAAQ,EAAY,UAAU,GAAG,EAAI,EAAE,MAAM,SAAS,EAAE,MAAM,OAAK,EAAE,eAAe,EAAE,EAAY,EAAG,EAAE,MAAM,CAAC,QAAQ,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