{"version":3,"file":"BrushDraw.eOYOGApz.mjs","names":["useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/rLCd7CnG7VX0cYLDnsIf/sFJPtR0izHJ8TL8UEvpG/BrushDraw.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useRef}from\"react\";import{useIsStaticRenderer}from\"framer\";import{useInView,useReducedMotion}from\"framer-motion\";/**\n * Brush Draw\n *\n * Overrides for the Eat Street Northshore hand-drawn brand marks.\n * Each mark is a canvas FrameNode whose fill is a pre-tinted brush PNG.\n * These overrides make the mark DRAW ITSELF IN when it scrolls into view,\n * wiping a clip-path across the stroke instead of popping the whole image\n * in at once.\n *\n * Wipe direction matches the stroke direction:\n *   - underlines are drawn left to right\n *   - the ring around a numeral is drawn left to right with a small\n *     rotational settle, the way a circle is scribbled by hand\n *\n * Reduced motion and the Framer canvas both render the finished mark.\n */const DRAW_EASE=\"cubic-bezier(0.22, 1, 0.36, 1)\";function createBrushDraw(options){const{delay,duration,rotate,scale}=options;const cache=new WeakMap;return function applyBrushDraw(Component){const cached=cache.get(Component);if(cached)return cached;const Wrapped=/*#__PURE__*/forwardRef((props,ref)=>{const targetRef=useRef(null);const isStatic=useIsStaticRenderer();const reduceMotion=useReducedMotion();const isInView=useInView(targetRef,{once:true,amount:.3});const setRef=useCallback(node=>{targetRef.current=node;if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;},[ref]);const showComplete=isStatic||reduceMotion===true;const drawn=showComplete||isInView;const transition=showComplete?undefined:[`clip-path ${duration}s ${DRAW_EASE} ${delay}s`,`opacity 0.12s linear ${delay}s`,`transform ${duration}s ${DRAW_EASE} ${delay}s`].join(\", \");return /*#__PURE__*/_jsx(Component,{ref:setRef,...props,style:{...props.style,clipPath:drawn?\"inset(-15% -15% -15% 0%)\":\"inset(-15% 100% -15% 0%)\",opacity:drawn?1:0,transform:drawn?undefined:`rotate(${rotate}deg) scale(${scale})`,transformOrigin:\"left center\",transition,willChange:showComplete?undefined:\"clip-path\"}});});cache.set(Component,Wrapped);return Wrapped;};}const underlineDraw=createBrushDraw({delay:.25,duration:.62,rotate:0,scale:1});const underlineDrawLate=createBrushDraw({delay:.55,duration:.62,rotate:0,scale:1});const circleDraw=createBrushDraw({delay:.55,duration:.72,rotate:-5,scale:.92});/** Underline under a headline's last-line word. Draws left to right. */export function withBrushUnderline(Component){return underlineDraw(Component);}/** Same underline, held back so it lands after a headline has settled. */export function withBrushUnderlineLate(Component){return underlineDrawLate(Component);}/** Ring around a numeral. Scribes left to right with a small settle. */export function withBrushCircle(Component){return circleDraw(Component);}\nexport const __FramerMetadata__ = {\"exports\":{\"withBrushUnderlineLate\":{\"type\":\"reactHoc\",\"name\":\"withBrushUnderlineLate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBrushCircle\":{\"type\":\"reactHoc\",\"name\":\"withBrushCircle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBrushUnderline\":{\"type\":\"reactHoc\",\"name\":\"withBrushUnderline\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BrushDraw.map"],"mappings":"0OAeoD,SAAS,EAAgB,EAAQ,CAAC,GAAK,CAAC,QAAM,WAAS,SAAO,SAAO,EAAc,EAAM,IAAI,QAAQ,OAAO,SAAwB,EAAU,CAAC,IAAM,EAAO,EAAM,IAAI,CAAS,EAAE,GAAG,EAAO,OAAO,EAAO,IAAM,EAAqB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAUA,EAAO,IAAI,EAAQ,EAAS,EAAoB,EAAQ,EAAa,EAAiB,EAAQ,EAAS,EAAU,EAAU,CAAC,KAAK,GAAK,OAAO,EAAE,CAAC,EAAQ,EAAOC,EAAY,GAAM,CAAC,EAAU,QAAQ,EAAQ,OAAO,GAAM,WAAW,EAAI,CAAI,EAAU,IAAI,EAAI,QAAQ,EAAK,EAAE,CAAC,CAAG,CAAC,EAAQ,EAAa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