Skip to content

Commit

Permalink
Merge branch 'next' into yann/automatic-stories-glob
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen authored Dec 4, 2024
2 parents 3b9f33e + 4489350 commit 5c9c675
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export async function generateModernIframeScriptCode(options: Options, projectRo
* @todo Inline variable and remove `noinspection`
*/
const code = `
import { setup } from '@storybook/core/preview/runtime';
import { setup } from 'storybook/internal/preview/runtime';
import '${SB_VIRTUAL_FILES.VIRTUAL_ADDON_SETUP_FILE}';
setup();
Expand Down
2 changes: 2 additions & 0 deletions code/core/src/common/utils/get-storybook-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const frameworkPackages: Record<string, SupportedFrameworks> = {
'@storybook/svelte-webpack5': 'svelte-webpack5',
'@storybook/sveltekit': 'sveltekit',
'@storybook/vue3-vite': 'vue3-vite',
'@storybook/experimental-nextjs-vite': 'experimental-nextjs-vite',
'@storybook/react-native-web-vite': 'react-native-web-vite',
'@storybook/vue3-webpack5': 'vue3-webpack5',
'@storybook/web-components-vite': 'web-components-vite',
'@storybook/web-components-webpack5': 'web-components-webpack5',
Expand Down
5 changes: 4 additions & 1 deletion code/core/src/manager/components/sidebar/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ const Node = React.memo<NodeProps>(function Node({
]);

const id = createId(item.id, refId);
const contextMenu = useContextMenu(item, statusLinks, api);
const contextMenu =
refId === 'storybook_internal'
? useContextMenu(item, statusLinks, api)
: { node: null, onMouseEnter: () => {} };

if (item.type === 'story' || item.type === 'docs') {
const LeafNode = item.type === 'docs' ? DocumentNode : StoryNode;
Expand Down
6 changes: 6 additions & 0 deletions code/frameworks/react-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,17 @@
"vite": "^4.0.0"
},
"peerDependencies": {
"@storybook/test": "workspace:*",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
"storybook": "workspace:^",
"vite": "^4.0.0 || ^5.0.0 || ^6.0.0"
},
"peerDependenciesMeta": {
"@storybook/test": {
"optional": true
}
},
"engines": {
"node": ">=18.0.0"
},
Expand Down
4 changes: 4 additions & 0 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7147,10 +7147,14 @@ __metadata:
typescript: "npm:^5.3.2"
vite: "npm:^4.0.0"
peerDependencies:
"@storybook/test": "workspace:*"
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
storybook: "workspace:^"
vite: ^4.0.0 || ^5.0.0 || ^6.0.0
peerDependenciesMeta:
"@storybook/test":
optional: true
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 5c9c675

Please sign in to comment.