@storybook/addon-highlight 8.6.0-beta.4 → 8.6.0-beta.6

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 CHANGED
@@ -12,8 +12,8 @@ var ADDON_ID="storybook/highlight",HIGHLIGHT_STYLE_ID="storybookHighlight",HIGHL
12
12
  box-shadow: 0 0 0 6px rgba(255,255,255,0.6);
13
13
  `,channel=previewApi.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}{
14
14
  ${highlightStyle(infos.color,infos.style)}
15
- }`).join(" "),document.head.appendChild(sheet);},resetHighlight=()=>{let id=HIGHLIGHT_STYLE_ID,sheetToBeRemoved=document.getElementById(id);sheetToBeRemoved&&sheetToBeRemoved.parentNode?.removeChild(sheetToBeRemoved);};channel.on(coreEvents.STORY_CHANGED,resetHighlight);channel.on(RESET_HIGHLIGHT,resetHighlight);channel.on(HIGHLIGHT,highlight);var src_default=()=>previewApi.definePreview({});
15
+ }`).join(" "),document.head.appendChild(sheet);},resetHighlight=()=>{let id=HIGHLIGHT_STYLE_ID,sheetToBeRemoved=document.getElementById(id);sheetToBeRemoved&&sheetToBeRemoved.parentNode?.removeChild(sheetToBeRemoved);};channel.on(coreEvents.STORY_CHANGED,resetHighlight);channel.on(RESET_HIGHLIGHT,resetHighlight);channel.on(HIGHLIGHT,highlight);var index_default=()=>previewApi.definePreview({});
16
16
 
17
17
  exports.HIGHLIGHT = HIGHLIGHT;
18
18
  exports.RESET_HIGHLIGHT = RESET_HIGHLIGHT;
19
- exports.default = src_default;
19
+ exports.default = index_default;
package/dist/index.mjs CHANGED
@@ -8,6 +8,6 @@ var ADDON_ID="storybook/highlight",HIGHLIGHT_STYLE_ID="storybookHighlight",HIGHL
8
8
  box-shadow: 0 0 0 6px rgba(255,255,255,0.6);
9
9
  `,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}{
10
10
  ${highlightStyle(infos.color,infos.style)}
11
- }`).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);var src_default=()=>definePreview({});
11
+ }`).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);var index_default=()=>definePreview({});
12
12
 
13
- export { HIGHLIGHT, RESET_HIGHLIGHT, src_default as default };
13
+ export { HIGHLIGHT, RESET_HIGHLIGHT, index_default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-highlight",
3
- "version": "8.6.0-beta.4",
3
+ "version": "8.6.0-beta.6",
4
4
  "description": "Highlight DOM nodes within your stories",
5
5
  "keywords": [
6
6
  "storybook-addons",
@@ -68,7 +68,7 @@
68
68
  "typescript": "^5.7.3"
69
69
  },
70
70
  "peerDependencies": {
71
- "storybook": "^8.6.0-beta.4"
71
+ "storybook": "^8.6.0-beta.6"
72
72
  },
73
73
  "publishConfig": {
74
74
  "access": "public"