@storybook/addon-highlight 7.0.0-beta.60 → 7.0.0-beta.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/preview.js +1 -1
- package/dist/preview.mjs +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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`;
|
|
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`;var src_default={};0&&(module.exports={HIGHLIGHT,RESET_HIGHLIGHT});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HIGHLIGHT,RESET_HIGHLIGHT}from"./chunk-33ALZPRS.mjs";
|
|
1
|
+
import{HIGHLIGHT,RESET_HIGHLIGHT}from"./chunk-33ALZPRS.mjs";var src_default={};export{HIGHLIGHT,RESET_HIGHLIGHT,src_default as default};
|
package/dist/preview.js
CHANGED
|
@@ -2,6 +2,6 @@ var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDe
|
|
|
2
2
|
outline: 2px ${style} ${color};
|
|
3
3
|
outline-offset: 2px;
|
|
4
4
|
box-shadow: 0 0 0 6px rgba(255,255,255,0.6);
|
|
5
|
-
`,highlightObject=color=>({outline:`2px dashed ${color}`,outlineOffset:2,boxShadow:"0 0 0 6px rgba(255,255,255,0.6)"})
|
|
5
|
+
`,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}{
|
|
6
6
|
${highlightStyle(infos.color,infos.style)}
|
|
7
7
|
}`).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});
|
package/dist/preview.mjs
CHANGED
|
@@ -2,6 +2,6 @@ import{HIGHLIGHT,HIGHLIGHT_STYLE_ID,RESET_HIGHLIGHT}from"./chunk-33ALZPRS.mjs";i
|
|
|
2
2
|
outline: 2px ${style} ${color};
|
|
3
3
|
outline-offset: 2px;
|
|
4
4
|
box-shadow: 0 0 0 6px rgba(255,255,255,0.6);
|
|
5
|
-
`,highlightObject=color=>({outline:`2px dashed ${color}`,outlineOffset:2,boxShadow:"0 0 0 6px rgba(255,255,255,0.6)"})
|
|
5
|
+
`,highlightObject=color=>({outline:`2px dashed ${color}`,outlineOffset:2,boxShadow:"0 0 0 6px rgba(255,255,255,0.6)"}),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}{
|
|
6
6
|
${highlightStyle(infos.color,infos.style)}
|
|
7
7
|
}`).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);export{highlightObject,highlightStyle};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-highlight",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.62",
|
|
4
4
|
"description": "Highlight DOM nodes within your stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook-addons",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"prep": "../../../scripts/prepare/bundle.ts"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@storybook/core-events": "7.0.0-beta.
|
|
64
|
+
"@storybook/core-events": "7.0.0-beta.62",
|
|
65
65
|
"@storybook/global": "^5.0.0",
|
|
66
|
-
"@storybook/preview-api": "7.0.0-beta.
|
|
66
|
+
"@storybook/preview-api": "7.0.0-beta.62"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/webpack-env": "^1.16.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"./src/preview.ts"
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "f70dcdb599363bfd6e6d2b63f8fadd02e9cbe00a",
|
|
82
82
|
"sbmodern": "dist/modern/index.js",
|
|
83
83
|
"storybook": {
|
|
84
84
|
"displayName": "Highlight",
|