Anvil/assets/preview-BpcF_O6y.js.map

1 line
2.3 KiB
Text
Raw Permalink Normal View History

2024-07-31 10:01:28 +02:00
{"version":3,"file":"preview-BpcF_O6y.js","sources":["../../node_modules/@storybook/addon-highlight/dist/preview.mjs"],"sourcesContent":["import { global } from '@storybook/global';\nimport { addons } from 'storybook/internal/preview-api';\nimport { STORY_CHANGED } from 'storybook/internal/core-events';\n\nvar ADDON_ID=\"storybook/highlight\",HIGHLIGHT_STYLE_ID=\"storybookHighlight\",HIGHLIGHT=`${ADDON_ID}/add`,RESET_HIGHLIGHT=`${ADDON_ID}/reset`;var{document}=global,highlightStyle=(color=\"#FF4785\",style=\"dashed\")=>`\n outline: 2px ${style} ${color};\n outline-offset: 2px;\n box-shadow: 0 0 0 6px rgba(255,255,255,0.6);\n`,channel=addons.getChannel(),highlight=infos=>{let id=HIGHLIGHT_STYLE_ID;resetHighlight();let elements=Array.from(new Set(infos.elements)),sheet=document.createElement(\"style\");sheet.setAttribute(\"id\",id),sheet.innerHTML=elements.map(target=>`${target}{\n ${highlightStyle(infos.color,infos.style)}\n }`).join(\" \"),document.head.appendChild(sheet);},resetHighlight=()=>{let id=HIGHLIGHT_STYLE_ID,sheetToBeRemoved=document.getElementById(id);sheetToBeRemoved&&sheetToBeRemoved.parentNode?.removeChild(sheetToBeRemoved);};channel.on(STORY_CHANGED,resetHighlight);channel.on(RESET_HIGHLIGHT,resetHighlight);channel.on(HIGHLIGHT,highlight);\n"],"names":["global","addons","STORY_CHANGED","ADDON_ID","HIGHLIGHT_STYLE_ID","HIGHLIGHT","RESET_HIGHLIGHT","document","highlightStyle","color","style","channel","highlight","infos","id","resetHighlight","elements","sheet","target","_a","sheetToBeRemoved"],"mappings":"AAAA,KAAA,CAAA,OAAAA,CAAA,EAAA,4BACA,CAAA,OAAAC,CAAA,EAAA,iCACA,CAAA,cAAAC,CAAA,EAAA,iCAEA,IAAIC,EAAS,sBAAsBC,EAAmB,qBAAqBC,EAAU,GAAGF,CAAQ,OAAOG,EAAgB,GAAGH,CAAQ,SAAY,CAAC,SAAAI,CAAQ,EAAEP,EAAOQ,EAAe,CAACC,EAAM,UAAUC,EAAM,WAAW;AAAA,iBAChMA,CAAK,IAAID,CAAK;AAAA;AAAA;AAAA,EAG7BE,EAAQV,EAAO,WAAU,EAAGW,EAAUC,GAAO,CAAC,IAAIC,EAAGV,EAAmBW,EAAc,EAAG,IAAIC,EAAS,MAAM,KAAK,IAAI,IAAIH,EAAM,QAAQ,CAAC,EAAEI,EAAMV,EAAS,cAAc,OAAO,EAAEU,EAAM,aAAa,KAAKH,CAAE,EAAEG,EAAM,UAAUD,EAAS,IAAIE,GAAQ,GAAGA,CAAM;AAAA,YAChPV,EAAeK,EAAM,MAAMA,EAAM,KAAK,CAAC;AAAA,WACxC,EAAE,KAAK,GAAG,EAAEN,EAAS,KAAK,YAAYU,CAAK,CAAE,EAAEF,EAAe,IAAI,CAV7E,IAAAI,EAU8E,IAAIL,EAAGV,EAAmBgB,EAAiBb,EAAS,eAAeO,CAAE,EAAEM,KAAkBD,EAAAC,EAAiB,aAAjB,MAAAD,EAA6B,YAAYC,GAAkB,EAAET,EAAQ,GAAGT,EAAca,CAAc,EAAEJ,EAAQ,GAAGL,EAAgBS,CAAc,EAAEJ,EAAQ,GAAGN,EAAUO,CAAS","x_google_ignoreList":[0]}