mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 06:01:22 +08:00
fix
This commit is contained in:
parent
ef7874bed2
commit
6cde3ad106
@ -55,7 +55,7 @@ const storybookPaths: Record<string, string> = {
|
|||||||
...acc,
|
...acc,
|
||||||
[`@storybook/${sbPackage}`]: join(
|
[`@storybook/${sbPackage}`]: join(
|
||||||
dirname(require.resolve(`@storybook/preview/package.json`)),
|
dirname(require.resolve(`@storybook/preview/package.json`)),
|
||||||
`dist/global/${sbPackage}.mjs`
|
`dist/global/${sbPackage}`
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
{}
|
{}
|
||||||
|
@ -71,6 +71,11 @@
|
|||||||
"require": "./dist/global/preview-web.js",
|
"require": "./dist/global/preview-web.js",
|
||||||
"types": "./dist/global/preview-web.d.ts"
|
"types": "./dist/global/preview-web.d.ts"
|
||||||
},
|
},
|
||||||
|
"./dist/global/preview-api": {
|
||||||
|
"import": "./dist/global/preview-api.mjs",
|
||||||
|
"require": "./dist/global/preview-api.js",
|
||||||
|
"types": "./dist/global/preview-api.d.ts"
|
||||||
|
},
|
||||||
"./dist/global/store": {
|
"./dist/global/store": {
|
||||||
"import": "./dist/global/store.mjs",
|
"import": "./dist/global/store.mjs",
|
||||||
"require": "./dist/global/store.js",
|
"require": "./dist/global/store.js",
|
||||||
@ -139,6 +144,7 @@
|
|||||||
"./src/global/core-client.ts",
|
"./src/global/core-client.ts",
|
||||||
"./src/global/core-events.ts",
|
"./src/global/core-events.ts",
|
||||||
"./src/global/preview-web.ts",
|
"./src/global/preview-web.ts",
|
||||||
|
"./src/global/preview-api.ts",
|
||||||
"./src/global/store.ts"
|
"./src/global/store.ts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable no-underscore-dangle */
|
/* eslint-disable no-underscore-dangle */
|
||||||
import type * as MODULE from '../preview-web';
|
import type * as MODULE from '../preview-api';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
DocsContext,
|
DocsContext,
|
||||||
@ -8,7 +8,51 @@ const {
|
|||||||
composeConfigs,
|
composeConfigs,
|
||||||
simulateDOMContentLoaded,
|
simulateDOMContentLoaded,
|
||||||
simulatePageLoad,
|
simulatePageLoad,
|
||||||
} = (globalThis as any).__STORYBOOK_MODULE_PREVIEW_WEB__ as typeof MODULE;
|
ClientApi,
|
||||||
|
StoryStore,
|
||||||
|
HooksContext,
|
||||||
|
addArgTypes,
|
||||||
|
addArgTypesEnhancer,
|
||||||
|
addArgs,
|
||||||
|
addArgsEnhancer,
|
||||||
|
addDecorator,
|
||||||
|
addLoader,
|
||||||
|
addParameters,
|
||||||
|
addStepRunner,
|
||||||
|
addons,
|
||||||
|
applyHooks,
|
||||||
|
combineArgs,
|
||||||
|
combineParameters,
|
||||||
|
composeStepRunners,
|
||||||
|
composeStories,
|
||||||
|
composeStory,
|
||||||
|
decorateStory,
|
||||||
|
defaultDecorateStory,
|
||||||
|
filterArgTypes,
|
||||||
|
getQueryParam,
|
||||||
|
getQueryParams,
|
||||||
|
inferControls,
|
||||||
|
normalizeStory,
|
||||||
|
prepareStory,
|
||||||
|
sanitizeStoryContextUpdate,
|
||||||
|
setGlobalRender,
|
||||||
|
setProjectAnnotations,
|
||||||
|
sortStoriesV7,
|
||||||
|
userOrAutoTitleFromSpecifier,
|
||||||
|
makeDecorator,
|
||||||
|
start,
|
||||||
|
useArgs,
|
||||||
|
useCallback,
|
||||||
|
useChannel,
|
||||||
|
useEffect,
|
||||||
|
useGlobals,
|
||||||
|
useMemo,
|
||||||
|
useParameter,
|
||||||
|
useReducer,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
|
useStoryContext,
|
||||||
|
} = (globalThis as any).__STORYBOOK_MODULE_PREVIEW_API__ as typeof MODULE;
|
||||||
|
|
||||||
export {
|
export {
|
||||||
DocsContext,
|
DocsContext,
|
||||||
@ -17,4 +61,48 @@ export {
|
|||||||
composeConfigs,
|
composeConfigs,
|
||||||
simulateDOMContentLoaded,
|
simulateDOMContentLoaded,
|
||||||
simulatePageLoad,
|
simulatePageLoad,
|
||||||
|
ClientApi,
|
||||||
|
StoryStore,
|
||||||
|
HooksContext,
|
||||||
|
addArgTypes,
|
||||||
|
addArgTypesEnhancer,
|
||||||
|
addArgs,
|
||||||
|
addArgsEnhancer,
|
||||||
|
addDecorator,
|
||||||
|
addLoader,
|
||||||
|
addParameters,
|
||||||
|
addStepRunner,
|
||||||
|
addons,
|
||||||
|
applyHooks,
|
||||||
|
combineArgs,
|
||||||
|
combineParameters,
|
||||||
|
composeStepRunners,
|
||||||
|
composeStories,
|
||||||
|
composeStory,
|
||||||
|
decorateStory,
|
||||||
|
defaultDecorateStory,
|
||||||
|
filterArgTypes,
|
||||||
|
getQueryParam,
|
||||||
|
getQueryParams,
|
||||||
|
inferControls,
|
||||||
|
normalizeStory,
|
||||||
|
prepareStory,
|
||||||
|
sanitizeStoryContextUpdate,
|
||||||
|
setGlobalRender,
|
||||||
|
setProjectAnnotations,
|
||||||
|
sortStoriesV7,
|
||||||
|
userOrAutoTitleFromSpecifier,
|
||||||
|
makeDecorator,
|
||||||
|
start,
|
||||||
|
useArgs,
|
||||||
|
useCallback,
|
||||||
|
useChannel,
|
||||||
|
useEffect,
|
||||||
|
useGlobals,
|
||||||
|
useMemo,
|
||||||
|
useParameter,
|
||||||
|
useReducer,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
|
useStoryContext,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user