{"version":3,"file":"SuperSet_Text.BVedquFW.mjs","names":["p"],"sources":["https:/framerusercontent.com/modules/2tjT78zD13lxMbiYaFgn/qkPIjyYUpmRIo2QxWALf/SuperSet_Text.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * TrademarkText\n *\n * A rich text block with:\n *   - A marker that gets replaced with a small, superscripted ™ (or ®, ℠, ©)\n *   - A list of link mappings (match text → URL) that get turned into <a> tags\n *   - Framer's native Font picker + Text Align control\n *\n * Example input in Framer:\n *   Text:  \"...the Executive Chef of The Roundtree[TM], Amagansett.\"\n *   Links: [{ match: \"The Roundtree\", link: \"https://theroundtree.com\" }]\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function TrademarkText(props){const{text,marker,symbol,font,color,textAlign,tmSizeRatio,tmOffsetEm,tmWeight,links,linkColor,linkUnderline,tag}=props;const baseStyle={...font,color,textAlign,margin:0,padding:0,width:\"100%\",whiteSpace:\"pre-wrap\"};const tmStyle={fontSize:`${tmSizeRatio}em`,position:\"relative\",top:`${tmOffsetEm}em`,fontWeight:tmWeight,letterSpacing:0,lineHeight:1,verticalAlign:\"baseline\",marginLeft:\"0.05em\"};const linkStyle={color:linkColor||\"inherit\",textDecoration:linkUnderline?\"underline\":\"none\",cursor:\"pointer\"};const tokens=tokenize(text,marker,links||[]);const rendered=tokens.map((t,i)=>{if(t.type===\"text\")return /*#__PURE__*/_jsx(\"span\",{children:t.value},i);if(t.type===\"tm\")return /*#__PURE__*/_jsx(\"sup\",{style:tmStyle,\"aria-label\":\"trademark\",children:symbol},i);// link\nreturn /*#__PURE__*/_jsx(\"a\",{href:normalizeUrl(t.link.link),target:t.link.newTab?\"_blank\":undefined,rel:t.link.newTab?\"noopener noreferrer\":undefined,style:linkStyle,children:t.value},i);});const Tag=tag||\"p\";return /*#__PURE__*/_jsx(Tag,{style:baseStyle,children:rendered});}// -----------------------------------------------------------------------------\n// URL normalization\n// -----------------------------------------------------------------------------\n/**\n * Make sure a bare domain like \"theroundtreehotels.com\" becomes a proper\n * absolute URL (\"https://theroundtreehotels.com\") so the browser doesn't\n * treat it as a path relative to the current page.\n *\n * Pass-through for: http(s), mailto, tel, sms, protocol-relative (//),\n * root-relative (/), query-only (?), and anchor (#) links.\n */function normalizeUrl(url){if(!url)return\"#\";const trimmed=url.trim();if(!trimmed)return\"#\";if(/^(https?:|mailto:|tel:|sms:|ftp:|ftps:|\\/\\/|\\/|#|\\?)/i.test(trimmed)){return trimmed;}return`https://${trimmed}`;}function tokenize(text,marker,links){const patterns=[];if(marker&&marker.length>0){patterns.push({kind:\"tm\",match:marker});}for(const l of links){if(l&&l.match&&l.match.length>0){patterns.push({kind:\"link\",match:l.match,link:l});}}const tokens=[];let i=0;while(i<text.length){// Find the earliest (and on tie, longest) match starting at or after i.\nlet best=null;for(const p of patterns){const idx=text.indexOf(p.match,i);if(idx===-1)continue;if(!best||idx<best.idx||idx===best.idx&&p.match.length>best.match.length){best={...p,idx};}}if(!best){tokens.push({type:\"text\",value:text.slice(i)});break;}if(best.idx>i){tokens.push({type:\"text\",value:text.slice(i,best.idx)});}if(best.kind===\"tm\"){tokens.push({type:\"tm\"});}else{tokens.push({type:\"link\",value:best.match,link:best.link});}i=best.idx+best.match.length;}return tokens;}TrademarkText.defaultProps={text:\"A new Hamptons restaurant celebrating the East End's seasonal bounty, guided by the Balinese heritage and wellness-forward philosophy of Chef Dewa Wijaya, the Executive Chef of The Roundtree[TM], Amagansett.\",marker:\"[TM]\",symbol:\"™\",color:\"#111111\",textAlign:\"left\",tmSizeRatio:.55,tmOffsetEm:-.5,tmWeight:400,links:[],linkColor:\"\",linkUnderline:true};addPropertyControls(TrademarkText,{tag:{type:ControlType.Enum,title:\"Tag\",options:[\"p\",\"h1\",\"h2\",\"h3\"],optionTitles:[\"p\",\"h1\",\"h2\",\"h3\"],defaultValue:\"p\"},text:{type:ControlType.String,title:\"Text\",displayTextArea:true,defaultValue:TrademarkText.defaultProps.text},marker:{type:ControlType.String,title:\"Marker\",description:\"Replace this string anywhere in Text with a styled ™. Default: [TM]\",defaultValue:\"[TM]\"},symbol:{type:ControlType.Enum,title:\"Symbol\",options:[\"™\",\"\\xae\",\"℠\",\"\\xa9\"],optionTitles:[\"TM\",\"R\",\"SM\",\"C\"],defaultValue:\"™\"},// Native Framer font picker — Google Fonts, uploaded fonts, weights,\n// size, line height, letter spacing, all in one panel.\nfont:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:18,variant:\"Regular\",lineHeight:1.5}},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#111111\"},textAlign:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\",\"justify\"],optionTitles:[\"Left\",\"Center\",\"Right\",\"Justify\"],defaultValue:\"left\",displaySegmentedControl:true},// Links — each entry wraps the first matching substring in an <a>.\n// If the same match text appears more than once, every occurrence becomes\n// a link. Longer matches win over shorter ones when they overlap.\nlinks:{type:ControlType.Array,title:\"Links\",control:{type:ControlType.Object,controls:{match:{type:ControlType.String,title:\"Match\",description:\"Exact substring in Text to turn into a link (case-sensitive).\",defaultValue:\"\"},link:{type:ControlType.Link,title:\"URL\"},newTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"}}},defaultValue:[]},linkColor:{type:ControlType.Color,title:\"Link Color\",description:\"Leave empty to inherit text color.\",defaultValue:\"\",optional:true},linkUnderline:{type:ControlType.Boolean,title:\"Underline\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},tmSizeRatio:{type:ControlType.Number,title:\"TM Size\",description:\"Size of the ™ as a fraction of the base font size.\",min:.2,max:1,step:.01,defaultValue:.55},tmOffsetEm:{type:ControlType.Number,title:\"TM Offset\",description:\"Vertical offset of the ™ in em. Negative moves it up.\",min:-1.5,max:.5,step:.01,defaultValue:-.5},tmWeight:{type:ControlType.Enum,title:\"TM Weight\",options:[100,200,300,400,500,600,700,800,900],optionTitles:[\"Thin 100\",\"ExtraLight 200\",\"Light 300\",\"Regular 400\",\"Medium 500\",\"SemiBold 600\",\"Bold 700\",\"ExtraBold 800\",\"Black 900\"],defaultValue:400}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TrademarkText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SuperSet_Text.map"],"mappings":"4JAcG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,SAAO,SAAO,OAAK,QAAM,YAAU,cAAY,aAAW,WAAS,QAAM,YAAU,gBAAc,OAAK,EAAY,EAAU,CAAC,GAAG,EAAK,QAAM,YAAU,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,WAAW,WAAW,CAAO,EAAQ,CAAC,SAAS,GAAG,EAAY,IAAI,SAAS,WAAW,IAAI,GAAG,EAAW,IAAI,WAAW,EAAS,cAAc,EAAE,WAAW,EAAE,cAAc,WAAW,WAAW,SAAS,CAAO,EAAU,CAAC,MAAM,GAAW,UAAU,eAAe,EAAc,YAAY,OAAO,OAAO,UAAU,CAAoD,EAAtC,EAAS,EAAK,EAAO,GAAO,EAAE,CAAC,CAAuB,KAAK,EAAE,IAAQ,EAAE,OAAO,OAA2B,EAAK,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,CAAI,EAAE,OAAO,KAAyB,EAAK,MAAM,CAAC,MAAM,EAAQ,aAAa,YAAY,SAAS,EAAO,CAAC,EAAE,CACxxB,EAAK,IAAI,CAAC,KAAK,EAAa,EAAE,KAAK,KAAK,CAAC,OAAO,EAAE,KAAK,OAAO,SAAS,IAAA,GAAU,IAAI,EAAE,KAAK,OAAO,sBAAsB,IAAA,GAAU,MAAM,EAAU,SAA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