@storybook/addon-highlight 8.3.0-alpha.3 → 8.3.0-alpha.5

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/README.md CHANGED
@@ -32,7 +32,6 @@ Add `"@storybook/addon-highlight"` to the addons array in your `.storybook/main.
32
32
 
33
33
  ```ts
34
34
  // .storybook/main.ts
35
-
36
35
  // Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
37
36
  import type { StorybookConfig } from '@storybook/your-framework';
38
37
 
@@ -49,11 +48,9 @@ Highlight DOM nodes by emitting the `HIGHLIGHT` event from within a story or an
49
48
 
50
49
  ```ts
51
50
  // MyComponent.stories.ts
52
-
53
51
  import type { Meta, StoryObj } from '@storybook/react';
54
52
  import { useChannel } from '@storybook/preview-api';
55
53
  import { HIGHLIGHT } from '@storybook/addon-highlight';
56
-
57
54
  import { MyComponent } from './MyComponent';
58
55
 
59
56
  const meta: Meta<typeof MyComponent> = {
@@ -82,11 +79,9 @@ Highlights are automatically cleared when the story changes. You can also manual
82
79
 
83
80
  ```ts
84
81
  // MyComponent.stories.ts|tsx
85
-
86
82
  import type { Meta, StoryObj } from '@storybook/react';
87
83
  import { useChannel } from '@storybook/preview-api';
88
84
  import { HIGHLIGHT, RESET_HIGHLIGHT } from '@storybook/addon-highlight';
89
-
90
85
  import { MyComponent } from './MyComponent';
91
86
 
92
87
  const meta: Meta<typeof MyComponent> = {
@@ -116,11 +111,9 @@ The addon applies a standard style to the highlighted elements you've enabled fo
116
111
 
117
112
  ```ts
118
113
  // MyComponent.stories.ts
119
-
120
114
  import type { Meta, StoryObj } from '@storybook/react';
121
115
  import { useChannel } from '@storybook/preview-api';
122
116
  import { HIGHLIGHT } from '@storybook/addon-highlight';
123
-
124
117
  import { MyComponent } from './MyComponent';
125
118
 
126
119
  const meta: Meta<typeof MyComponent> = {
package/dist/preview.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var global = require('@storybook/global');
4
- var previewApi = require('storybook/internal/preview-api');
5
3
  var coreEvents = require('storybook/internal/core-events');
4
+ var previewApi = require('storybook/internal/preview-api');
5
+ var global = require('@storybook/global');
6
6
 
7
7
  var ADDON_ID="storybook/highlight",HIGHLIGHT_STYLE_ID="storybookHighlight",HIGHLIGHT=`${ADDON_ID}/add`,RESET_HIGHLIGHT=`${ADDON_ID}/reset`;var{document}=global.global,highlightStyle=(color="#FF4785",style="dashed")=>`
8
8
  outline: 2px ${style} ${color};
package/dist/preview.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { global } from '@storybook/global';
2
- import { addons } from 'storybook/internal/preview-api';
3
1
  import { STORY_CHANGED } from 'storybook/internal/core-events';
2
+ import { addons } from 'storybook/internal/preview-api';
3
+ import { global } from '@storybook/global';
4
4
 
5
5
  var 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")=>`
6
6
  outline: 2px ${style} ${color};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-highlight",
3
- "version": "8.3.0-alpha.3",
3
+ "version": "8.3.0-alpha.5",
4
4
  "description": "Highlight DOM nodes within your stories",
5
5
  "keywords": [
6
6
  "storybook-addons",
@@ -26,9 +26,9 @@
26
26
  "exports": {
27
27
  ".": {
28
28
  "types": "./dist/index.d.ts",
29
- "node": "./dist/index.js",
30
29
  "import": "./dist/index.mjs",
31
- "require": "./dist/index.js"
30
+ "require": "./dist/index.js",
31
+ "node": "./dist/index.js"
32
32
  },
33
33
  "./preview": {
34
34
  "types": "./dist/preview.d.ts",
@@ -48,8 +48,8 @@
48
48
  "!src/**/*"
49
49
  ],
50
50
  "scripts": {
51
- "check": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/check.ts",
52
- "prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/addon-bundle.ts"
51
+ "check": "jiti ../../../scripts/prepare/check.ts",
52
+ "prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
53
53
  },
54
54
  "dependencies": {
55
55
  "@storybook/global": "^5.0.0"
@@ -59,7 +59,7 @@
59
59
  "typescript": "^5.3.2"
60
60
  },
61
61
  "peerDependencies": {
62
- "storybook": "^8.3.0-alpha.3"
62
+ "storybook": "^8.3.0-alpha.5"
63
63
  },
64
64
  "publishConfig": {
65
65
  "access": "public"