-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
Copy pathruntime.ts
34 lines (31 loc) · 1.42 KB
/
runtime.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import * as REACT from 'react';
import * as REACTDOM from 'react-dom';
import * as STORYBOOKCOMPONENTS from '@storybook/components';
import * as STORYBOOKCOMPONENTSEXPERIMENTAL from '@storybook/components/experimental';
import * as STORYBOOKCHANNELS from '@storybook/channels';
import * as STORYBOOKEVENTS from '@storybook/core-events';
import * as STORYBOOKROUTER from '@storybook/router';
import * as STORYBOOKTHEMING from '@storybook/theming';
import * as STORYBOOKMANAGERAPI from '@storybook/manager-api';
import * as STORYBOOKCLIENTLOGGER from '@storybook/client-logger';
import type { Keys } from './types';
// Here we map the name of a module to their VALUE in the global scope.
export const values: Required<Record<keyof typeof Keys, any>> = {
react: REACT as any,
'react-dom': REACTDOM,
'@storybook/components': STORYBOOKCOMPONENTS,
'@storybook/components/experimental': STORYBOOKCOMPONENTSEXPERIMENTAL,
'@storybook/channels': STORYBOOKCHANNELS,
'@storybook/core-events': STORYBOOKEVENTS,
'@storybook/router': STORYBOOKROUTER,
'@storybook/theming': STORYBOOKTHEMING,
'@storybook/api': STORYBOOKMANAGERAPI, // deprecated, remove in 8.0
'@storybook/manager-api': STORYBOOKMANAGERAPI,
// backwards compatibility
'@storybook/addons': {
addons: STORYBOOKMANAGERAPI.addons,
types: STORYBOOKMANAGERAPI.types,
mockChannel: STORYBOOKMANAGERAPI.mockChannel,
},
'@storybook/client-logger': STORYBOOKCLIENTLOGGER,
};