@storybook/addon-highlight
Advanced tools
Comparing version 7.0.0-beta.61 to 7.0.0-beta.62
@@ -1,1 +0,1 @@ | ||
var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var src_exports={};__export(src_exports,{HIGHLIGHT:()=>HIGHLIGHT,RESET_HIGHLIGHT:()=>RESET_HIGHLIGHT,default:()=>src_default});module.exports=__toCommonJS(src_exports);var ADDON_ID="storybook/highlight";var HIGHLIGHT=`${ADDON_ID}/add`,RESET_HIGHLIGHT=`${ADDON_ID}/reset`;module&&module.hot&&module.hot.decline&&module.hot.decline();var src_default={};0&&(module.exports={HIGHLIGHT,RESET_HIGHLIGHT}); | ||
var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var src_exports={};__export(src_exports,{HIGHLIGHT:()=>HIGHLIGHT,RESET_HIGHLIGHT:()=>RESET_HIGHLIGHT,default:()=>src_default});module.exports=__toCommonJS(src_exports);var ADDON_ID="storybook/highlight";var HIGHLIGHT=`${ADDON_ID}/add`,RESET_HIGHLIGHT=`${ADDON_ID}/reset`;var src_default={};0&&(module.exports={HIGHLIGHT,RESET_HIGHLIGHT}); |
@@ -5,4 +5,4 @@ var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preview_exports={};__export(preview_exports,{highlightObject:()=>highlightObject,highlightStyle:()=>highlightStyle});module.exports=__toCommonJS(preview_exports);var import_global=require("@storybook/global"),import_preview_api=require("@storybook/preview-api"),import_core_events=require("@storybook/core-events");var ADDON_ID="storybook/highlight",HIGHLIGHT_STYLE_ID="storybookHighlight",HIGHLIGHT=`${ADDON_ID}/add`,RESET_HIGHLIGHT=`${ADDON_ID}/reset`;var{document}=import_global.global,highlightStyle=(color="#FF4785",style="dashed")=>` | ||
box-shadow: 0 0 0 6px rgba(255,255,255,0.6); | ||
`,highlightObject=color=>({outline:`2px dashed ${color}`,outlineOffset:2,boxShadow:"0 0 0 6px rgba(255,255,255,0.6)"});module&&module.hot&&module.hot.decline&&module.hot.decline();var channel=import_preview_api.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}{ | ||
`,highlightObject=color=>({outline:`2px dashed ${color}`,outlineOffset:2,boxShadow:"0 0 0 6px rgba(255,255,255,0.6)"}),channel=import_preview_api.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}{ | ||
${highlightStyle(infos.color,infos.style)} | ||
}`).join(" "),document.head.appendChild(sheet)},resetHighlight=()=>{let id=HIGHLIGHT_STYLE_ID,sheetToBeRemoved=document.getElementById(id);sheetToBeRemoved&&sheetToBeRemoved.parentNode.removeChild(sheetToBeRemoved)};channel.on(import_core_events.STORY_CHANGED,resetHighlight);channel.on(RESET_HIGHLIGHT,resetHighlight);channel.on(HIGHLIGHT,highlight);0&&(module.exports={highlightObject,highlightStyle}); |
{ | ||
"name": "@storybook/addon-highlight", | ||
"version": "7.0.0-beta.61", | ||
"version": "7.0.0-beta.62", | ||
"description": "Highlight DOM nodes within your stories", | ||
@@ -64,5 +64,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@storybook/core-events": "7.0.0-beta.61", | ||
"@storybook/core-events": "7.0.0-beta.62", | ||
"@storybook/global": "^5.0.0", | ||
"@storybook/preview-api": "7.0.0-beta.61" | ||
"@storybook/preview-api": "7.0.0-beta.62" | ||
}, | ||
@@ -82,3 +82,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "c4707c66fa1b173da15d232f35e03dd647aa6a42", | ||
"gitHead": "f70dcdb599363bfd6e6d2b63f8fadd02e9cbe00a", | ||
"sbmodern": "dist/modern/index.js", | ||
@@ -85,0 +85,0 @@ "storybook": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9516
48
+ Added@storybook/channel-postmessage@7.0.0-beta.62(transitive)
+ Added@storybook/channels@7.0.0-beta.62(transitive)
+ Added@storybook/client-logger@7.0.0-beta.62(transitive)
+ Added@storybook/core-events@7.0.0-beta.62(transitive)
+ Added@storybook/preview-api@7.0.0-beta.62(transitive)
+ Added@storybook/types@7.0.0-beta.62(transitive)
- Removed@storybook/channel-postmessage@7.0.0-beta.61(transitive)
- Removed@storybook/channels@7.0.0-beta.61(transitive)
- Removed@storybook/client-logger@7.0.0-beta.61(transitive)
- Removed@storybook/core-events@7.0.0-beta.61(transitive)
- Removed@storybook/preview-api@7.0.0-beta.61(transitive)
- Removed@storybook/types@7.0.0-beta.61(transitive)