Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/addons/a11y/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import type { A11yTypes } from './types';

export { PARAM_KEY } from './constants';
export * from './params';
export type { A11yTypes } from './types';
export type { A11yGlobals, A11yTypes } from './types';

export default () => definePreviewAddon<A11yTypes>(addonAnnotations);
9 changes: 7 additions & 2 deletions code/core/src/backgrounds/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { definePreviewAddon } from 'storybook/internal/csf';

import { PARAM_KEY } from './constants';
import { withBackgroundAndGrid } from './decorator';
import type { BackgroundTypes, BackgroundsParameters, GlobalState } from './types';
import type {
BackgroundTypes,
BackgroundsGlobals,
BackgroundsParameters,
GlobalState,
} from './types';

const decorators = globalThis.FEATURES?.backgrounds ? [withBackgroundAndGrid] : [];

Expand All @@ -21,7 +26,7 @@ const initialGlobals: Record<string, GlobalState> = {
[PARAM_KEY]: { value: undefined, grid: false },
};

export type { BackgroundTypes };
export type { BackgroundTypes, BackgroundsGlobals };

export default () =>
definePreviewAddon<BackgroundTypes>({
Expand Down
4 changes: 2 additions & 2 deletions code/core/src/viewport/preview.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { definePreviewAddon } from 'storybook/internal/csf';

import { PARAM_KEY } from './constants';
import type { GlobalState, ViewportTypes } from './types';
import type { GlobalState, ViewportGlobals, ViewportTypes } from './types';

export const initialGlobals: Record<string, GlobalState> = {
[PARAM_KEY]: { value: undefined, isRotated: false },
};

export type { ViewportTypes };
export type { ViewportGlobals, ViewportTypes };

export default () =>
definePreviewAddon<ViewportTypes>({
Expand Down
2 changes: 2 additions & 0 deletions code/frameworks/angular/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
Comment on lines 3 to +7

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we explicitly stated the return type, would the type export still be needed? @kasperpeulen

2 changes: 2 additions & 0 deletions code/frameworks/ember/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/html-vite/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/nextjs/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/preact-vite/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/react-native-web-vite/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/react-vite/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/react-webpack5/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/server-webpack5/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/svelte-vite/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/sveltekit/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/vue3-vite/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
2 changes: 2 additions & 0 deletions code/frameworks/web-components-vite/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ import type { StorybookConfig } from '../types';
export function defineMain(config: StorybookConfig) {
return config;
}

export type { StorybookConfig };
Loading