Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future - restructure storybook types #19580

Merged
merged 49 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4f174f2
add package
ndelangen Oct 20, 2022
11a73d4
fix
ndelangen Oct 20, 2022
13e89f6
Merge branch 'deprecate/remaining-lib-cli' into norbert/sb-799-create…
ndelangen Oct 20, 2022
a899800
import all csf types through types package
ndelangen Oct 20, 2022
5f15517
step 1
ndelangen Oct 21, 2022
f968dbe
step 2
ndelangen Oct 21, 2022
c871510
step 3
ndelangen Oct 21, 2022
2ff0db7
step 4
ndelangen Oct 21, 2022
67581a3
step 5
ndelangen Oct 21, 2022
c52e17c
step 6
ndelangen Oct 21, 2022
fb5bbd7
part 7
ndelangen Oct 21, 2022
0b474de
step 8
ndelangen Oct 21, 2022
e3e1e62
step 9
ndelangen Oct 22, 2022
fbb0895
step 9
ndelangen Oct 22, 2022
790c72b
step 10
ndelangen Oct 22, 2022
9ca1832
step 11
ndelangen Oct 22, 2022
6f9940b
fix lockfile
ndelangen Oct 22, 2022
77ae544
Merge branch 'next' into norbert/sb-799-create-a-storybooktypes
ndelangen Oct 22, 2022
9b3eeea
fixes
ndelangen Oct 22, 2022
33d47b7
fix dumb mistake
ndelangen Oct 22, 2022
4ceb1c6
force it to work in the correct build-order
ndelangen Oct 22, 2022
4a1bb57
fixes
ndelangen Oct 22, 2022
7e8144b
cleanup
ndelangen Oct 22, 2022
0aefffe
fixes
ndelangen Oct 22, 2022
4c1925f
fix
ndelangen Oct 22, 2022
d1b725d
fixes & linting
ndelangen Oct 22, 2022
0f69691
fix lockfile
ndelangen Oct 22, 2022
6369128
a bit of linting left
ndelangen Oct 22, 2022
49ae7f9
Merge branch 'next' into norbert/sb-799-create-a-storybooktypes
ndelangen Oct 22, 2022
d027614
fix things
ndelangen Oct 22, 2022
6ba53de
fix lockfile
ndelangen Oct 22, 2022
06d0004
fix linting
ndelangen Oct 22, 2022
9cdedc4
oops
ndelangen Oct 22, 2022
d28b024
fix backgrounds not getting applied
ndelangen Oct 22, 2022
aaecde6
I'm going to revert this for a bit, see if it makes the e2e pass
ndelangen Oct 22, 2022
56e3193
Merge branch 'deprecate/remaining-lib-cli' into norbert/sb-799-create…
ndelangen Oct 23, 2022
de03644
Merge branch 'deprecate/remaining-lib-cli' into norbert/sb-799-create…
ndelangen Oct 23, 2022
367cc69
Merge branch 'deprecate/remaining-lib-cli' into norbert/sb-799-create…
ndelangen Oct 23, 2022
f7b78e3
cleanup
ndelangen Oct 23, 2022
464c671
add missing export
ndelangen Oct 23, 2022
2342173
fixes
ndelangen Oct 23, 2022
037620f
Merge branch 'deprecate/remaining-lib-cli' into norbert/sb-799-create…
ndelangen Oct 24, 2022
2f6d16d
fixes
ndelangen Oct 24, 2022
8e3e508
Merge branch 'deprecate/remaining-lib-cli' into norbert/sb-799-create…
ndelangen Oct 25, 2022
554be96
fixes
ndelangen Oct 25, 2022
b9ae97c
fixes
ndelangen Oct 25, 2022
0194680
Merge branch 'deprecate/remaining-lib-cli' into norbert/sb-799-create…
ndelangen Oct 25, 2022
bc19711
Merge branch 'next' into norbert/sb-799-create-a-storybooktypes
ndelangen Oct 25, 2022
113ee50
Merge branch 'next' into norbert/sb-799-create-a-storybooktypes
ndelangen Oct 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion code/addons/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"@storybook/client-logger": "7.0.0-alpha.43",
"@storybook/components": "7.0.0-alpha.43",
"@storybook/core-events": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/theming": "7.0.0-alpha.43",
"@storybook/types": "7.0.0-alpha.43",
"axe-core": "^4.2.0",
"global": "^4.4.0",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"@storybook/client-logger": "7.0.0-alpha.43",
"@storybook/components": "7.0.0-alpha.43",
"@storybook/core-events": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/theming": "7.0.0-alpha.43",
"@storybook/types": "7.0.0-alpha.43",
"dequal": "^2.0.2",
"global": "^4.4.0",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/src/addArgsHelpers.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { StoryContext } from '@storybook/addons';
import type { StoryContext } from '@storybook/types';
import { inferActionsFromArgTypesRegex, addActionsFromArgTypes } from './addArgsHelpers';

describe('actions parameter enhancers', () => {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/src/addArgsHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Args, AnyFramework, ArgsEnhancer } from '@storybook/csf';
import type { Args, AnyFramework, ArgsEnhancer } from '@storybook/types';
import { action } from './runtime/action';

// interface ActionsParameter {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"@storybook/client-logger": "7.0.0-alpha.43",
"@storybook/components": "7.0.0-alpha.43",
"@storybook/core-events": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/theming": "7.0.0-alpha.43",
"@storybook/types": "7.0.0-alpha.43",
"global": "^4.4.0",
"memoizerific": "^1.11.3",
"ts-dedent": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/src/decorators/withBackground.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMemo, useEffect } from '@storybook/addons';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/csf';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/types';

import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants';
import {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/src/decorators/withGrid.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMemo, useEffect } from '@storybook/addons';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/csf';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/types';

import { clearStyles, addGridStyle } from '../helpers';
import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
"@storybook/client-logger": "7.0.0-alpha.43",
"@storybook/components": "7.0.0-alpha.43",
"@storybook/core-common": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/node-logger": "7.0.0-alpha.43",
"@storybook/store": "7.0.0-alpha.43",
"@storybook/theming": "7.0.0-alpha.43",
"@storybook/types": "7.0.0-alpha.43",
"lodash": "^4.17.21",
"ts-dedent": "^2.0.0"
},
Expand Down
17 changes: 6 additions & 11 deletions code/addons/controls/src/ControlsPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
/* eslint-disable camelcase */
import React, { FC } from 'react';
import {
ArgTypes,
useArgs,
useGlobals,
useArgTypes,
useParameter,
useStorybookState,
} from '@storybook/api';
import { useArgs, useGlobals, useArgTypes, useParameter, useStorybookState } from '@storybook/api';
import {
PureArgsTable as ArgsTable,
NoControlsWarning,
PresetColor,
SortType,
type PresetColor,
type SortType,
} from '@storybook/blocks';

import type { API_ArgTypes } from '@storybook/types';
import { PARAM_KEY } from './constants';

interface ControlsParameters {
Expand Down Expand Up @@ -43,7 +38,7 @@ export const ControlsPanel: FC = () => {
if (arg?.control?.type !== 'color' || arg?.control?.presetColors) acc[key] = arg;
else acc[key] = { ...arg, control: { ...arg.control, presetColors } };
return acc;
}, {} as ArgTypes);
}, {} as API_ArgTypes);

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion code/addons/controls/src/manager.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { addons, types } from '@storybook/addons';
import { AddonPanel } from '@storybook/components';
import { API, useArgTypes } from '@storybook/api';
import { type API, useArgTypes } from '@storybook/api';
import { ControlsPanel } from './ControlsPanel';
import { ADDON_ID, PARAM_KEY } from './constants';

Expand Down
4 changes: 2 additions & 2 deletions code/addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@
"@storybook/components": "7.0.0-alpha.43",
"@storybook/core-common": "7.0.0-alpha.43",
"@storybook/core-events": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/csf-tools": "7.0.0-alpha.43",
"@storybook/docs-tools": "7.0.0-alpha.43",
"@storybook/mdx2-csf": "next",
"@storybook/mdx2-csf": "0.1.0-next.0",
"@storybook/node-logger": "7.0.0-alpha.43",
"@storybook/postinstall": "7.0.0-alpha.43",
"@storybook/preview-web": "7.0.0-alpha.43",
"@storybook/source-loader": "7.0.0-alpha.43",
"@storybook/store": "7.0.0-alpha.43",
"@storybook/theming": "7.0.0-alpha.43",
"@storybook/types": "7.0.0-alpha.43",
"dequal": "^2.0.2",
"fs-extra": "^9.0.1",
"global": "^4.4.0",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/docs/src/DocsRenderer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { AnyFramework, Parameters } from '@storybook/csf';
import { DocsContextProps, DocsRenderFunction } from '@storybook/preview-web';
import type { AnyFramework, Parameters } from '@storybook/types';
import type { DocsContextProps, DocsRenderFunction } from '@storybook/preview-web';
import { components as htmlComponents } from '@storybook/components';
import { Docs, CodeOrSourceMdx, AnchorMdx, HeadersMdx } from '@storybook/blocks';
import { MDXProvider } from '@mdx-js/react';
Expand Down
12 changes: 9 additions & 3 deletions code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
/* eslint-disable camelcase */
import fs from 'fs-extra';
import remarkSlug from 'remark-slug';
import remarkExternalLinks from 'remark-external-links';

import type { DocsOptions, IndexerOptions, Options, StoryIndexer } from '@storybook/core-common';
import type {
DocsOptions,
CoreCommon_IndexerOptions,
Options,
CoreCommon_StoryIndexer,
} from '@storybook/types';
import { logger } from '@storybook/node-logger';
import { loadCsf } from '@storybook/csf-tools';

Expand Down Expand Up @@ -147,8 +153,8 @@ export async function webpack(
return result;
}

export const storyIndexers = async (indexers: StoryIndexer[] | null) => {
const mdxIndexer = async (fileName: string, opts: IndexerOptions) => {
export const storyIndexers = async (indexers: CoreCommon_StoryIndexer[] | null) => {
const mdxIndexer = async (fileName: string, opts: CoreCommon_IndexerOptions) => {
let code = (await fs.readFile(fileName, 'utf-8')).toString();
// @ts-expect-error (Converted from ts-ignore)
const { compile } = await import('@storybook/mdx2-csf');
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
"@storybook/components": "7.0.0-alpha.43",
"@storybook/core-common": "7.0.0-alpha.43",
"@storybook/core-events": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/instrumenter": "7.0.0-alpha.43",
"@storybook/theming": "7.0.0-alpha.43",
"@storybook/types": "7.0.0-alpha.43",
"global": "^4.4.0",
"jest-mock": "^27.0.6",
"polished": "^4.2.2",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/Panel.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Call, CallStates, LogItem } from '@storybook/instrumenter';
import { type Call, CallStates, type LogItem } from '@storybook/instrumenter';
import { getInteractions } from './Panel';

describe('Panel', () => {
Expand Down
11 changes: 9 additions & 2 deletions code/addons/interactions/src/Panel.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import global from 'global';
import * as React from 'react';
import { useChannel, useParameter, StoryId } from '@storybook/api';
import { useChannel, useParameter } from '@storybook/api';
import {
FORCE_REMOUNT,
IGNORED_EXCEPTION,
STORY_RENDER_PHASE_CHANGED,
STORY_THREW_EXCEPTION,
PLAY_FUNCTION_THREW_EXCEPTION,
} from '@storybook/core-events';
import { EVENTS, Call, CallStates, ControlStates, LogItem } from '@storybook/instrumenter';
import {
EVENTS,
type Call,
CallStates,
type ControlStates,
type LogItem,
} from '@storybook/instrumenter';

import type { StoryId } from '@storybook/types';
import { InteractionsPanel } from './components/InteractionsPanel';
import { TabIcon, TabStatus } from './components/TabStatus';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentStoryObj, ComponentMeta } from '@storybook/react';
import type { ComponentStoryObj, ComponentMeta } from '@storybook/react';
import { expect } from '@storybook/jest';
import { CallStates } from '@storybook/instrumenter';
import { userEvent, within } from '@storybook/testing-library';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/Interaction.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { IconButton, Icons, TooltipNote, WithTooltip } from '@storybook/components';
import { Call, CallStates, ControlStates } from '@storybook/instrumenter';
import { type Call, CallStates, type ControlStates } from '@storybook/instrumenter';
import { styled, typography } from '@storybook/theming';
import { transparentize } from 'polished';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { AddonPanel, Link, Placeholder } from '@storybook/components';
import { Call, CallStates, ControlStates } from '@storybook/instrumenter';
import { type Call, CallStates, type ControlStates } from '@storybook/instrumenter';
import { styled } from '@storybook/theming';
import { transparentize } from 'polished';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/List.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Fragment, useState } from 'react';
import { styled, themes, convert } from '@storybook/theming';
import { Icons, IconsProps } from '@storybook/components';
import { Icons, type IconsProps } from '@storybook/components';

const ListWrapper = styled.ul({
listStyle: 'none',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Call } from '@storybook/instrumenter';
import type { Call } from '@storybook/instrumenter';
import React from 'react';
import { styled, typography } from '@storybook/theming';
import { Node, MethodCall } from './MethodCall';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/MethodCall.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ObjectInspector } from '@devtools-ds/object-inspector';
import { Call, CallRef, ElementRef } from '@storybook/instrumenter';
import type { Call, CallRef, ElementRef } from '@storybook/instrumenter';
import { useTheme } from '@storybook/theming';
import React, { Fragment, ReactElement } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/components/StatusBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Call, CallStates } from '@storybook/instrumenter';
import { type Call, CallStates } from '@storybook/instrumenter';
import { styled, typography } from '@storybook/theming';

export interface StatusBadgeProps {
Expand Down
4 changes: 2 additions & 2 deletions code/addons/interactions/src/components/StatusIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Icons, IconsProps } from '@storybook/components';
import { Call, CallStates } from '@storybook/instrumenter';
import { Icons, type IconsProps } from '@storybook/components';
import { type Call, CallStates } from '@storybook/instrumenter';
import { styled } from '@storybook/theming';

import { transparentize } from 'polished';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/mocks/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CallStates, Call } from '@storybook/instrumenter';
import { CallStates, type Call } from '@storybook/instrumenter';

export const getCalls = (finalStatus: CallStates) => {
const calls: Call[] = [
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/preset/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
PlayFunction,
PlayFunctionContext,
StepLabel,
} from '@storybook/csf';
} from '@storybook/types';
import { instrument } from '@storybook/instrumenter';
import { ModuleMocker } from 'jest-mock';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/jest/src/hoc/provideJestResult.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component as ReactComponent, ComponentType } from 'react';
import { STORY_CHANGED } from '@storybook/core-events';
import { API } from '@storybook/api';
import type { API } from '@storybook/api';
import { ADD_TESTS } from '../shared';

// TODO: import type from @types/jest
Expand Down
2 changes: 1 addition & 1 deletion code/addons/jest/src/shared.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Parameters } from '@storybook/addons';
import type { Parameters } from '@storybook/types';

// addons, panels and events get unique names using a prefix
export const PARAM_KEY = 'test';
Expand Down
1 change: 1 addition & 0 deletions code/addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@storybook/core-events": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/router": "7.0.0-alpha.43",
"@storybook/types": "7.0.0-alpha.43",
"global": "^4.4.0",
"prop-types": "^15.7.2",
"ts-dedent": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion code/addons/links/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import global from 'global';
import { addons, makeDecorator } from '@storybook/addons';
import { STORY_CHANGED, SELECT_STORY } from '@storybook/core-events';
import type { StoryId, StoryName, ComponentTitle } from '@storybook/csf';
import type { StoryId, StoryName, ComponentTitle } from '@storybook/types';
import { toId } from '@storybook/csf';
import { PARAM_KEY } from './constants';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/measure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@storybook/client-logger": "7.0.0-alpha.43",
"@storybook/components": "7.0.0-alpha.43",
"@storybook/core-events": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/types": "7.0.0-alpha.43",
"global": "^4.4.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/measure/src/withMeasure.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env browser */
import { useEffect } from '@storybook/addons';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/csf';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/types';
import { drawSelectedElement } from './box-model/visualizer';
import { init, rescale, destroy } from './box-model/canvas';
import { deepElementFromPoint } from './util';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/outline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@storybook/client-logger": "7.0.0-alpha.43",
"@storybook/components": "7.0.0-alpha.43",
"@storybook/core-events": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/types": "7.0.0-alpha.43",
"global": "^4.4.0",
"ts-dedent": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion code/addons/outline/src/withOutline.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMemo, useEffect } from '@storybook/addons';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/csf';
import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/types';

import { clearStyles, addOutlineStyles } from './helpers';
import { PARAM_KEY } from './constants';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/storyshots/storyshots-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@storybook/core-client": "7.0.0-alpha.43",
"@storybook/core-common": "7.0.0-alpha.43",
"@storybook/core-webpack": "7.0.0-alpha.43",
"@storybook/csf": "next",
"@storybook/types": "7.0.0-alpha.43",
"@types/glob": "^7.1.3",
"@types/jest": "^26.0.16",
"@types/jest-specific-snapshot": "^0.5.3",
Expand Down
10 changes: 7 additions & 3 deletions code/addons/storyshots/storyshots-core/src/frameworks/Loader.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import type { AnyFramework } from '@storybook/csf';
import type { Loadable } from '@storybook/addons';
/* eslint-disable camelcase */
import type { AnyFramework, Addon_Loadable } from '@storybook/types';
import { ClientApi as ClientApiClass } from '@storybook/client-api';
import type { StoryshotsOptions } from '../api/StoryshotsOptions';
import type { SupportedFramework } from './SupportedFramework';

export type RenderTree = (story: any, context?: any, options?: any) => any;

export interface ClientApi<TFramework extends AnyFramework> extends ClientApiClass<AnyFramework> {
configure(loader: Loadable, module: NodeModule | false, showDeprecationWarning?: boolean): void;
configure(
loader: Addon_Loadable,
module: NodeModule | false,
showDeprecationWarning?: boolean
): void;
forceReRender(): void;
}

Expand Down
Loading