repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/csf-tools/CsfFile.ts | code/core/src/csf-tools/CsfFile.ts | import { readFile, writeFile } from 'node:fs/promises';
import {
BabelFileClass,
type GeneratorOptions,
type NodePath,
type RecastOptions,
babelParse,
generate,
recast,
types as t,
traverse,
} from 'storybook/internal/babel';
import { isExportStory, storyNameFromExport, toId, toTestId } from 'storybo... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | true |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/csf-tools/ConfigFile.ts | code/core/src/csf-tools/ConfigFile.ts | import { readFile, writeFile } from 'node:fs/promises';
import {
type RecastOptions,
babelParse,
generate,
recast,
types as t,
traverse,
} from 'storybook/internal/babel';
import { logger } from 'storybook/internal/node-logger';
import { dedent } from 'ts-dedent';
import type { PrintResultType } from './... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | true |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/csf-tools/CsfFile.test.ts | code/core/src/csf-tools/CsfFile.test.ts | import { describe, expect, it, vi } from 'vitest';
import { logger } from 'storybook/internal/node-logger';
// eslint-disable-next-line depend/ban-dependencies
import yaml from 'js-yaml';
import { dedent } from 'ts-dedent';
import { type CsfOptions, formatCsf, isModuleMock, isValidPreviewPath, loadCsf } from './CsfF... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | true |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/csf-tools/index.ts | code/core/src/csf-tools/index.ts | export * from './CsfFile';
export * from './ConfigFile';
export * from './getStorySortParameter';
export * from './enrichCsf';
export { babelParse } from 'storybook/internal/babel';
export { vitestTransform } from './vitest-plugin/transformer';
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/csf-tools/enrichCsf.ts | code/core/src/csf-tools/enrichCsf.ts | import { generate, types as t } from 'storybook/internal/babel';
import { type CsfEnricher } from 'storybook/internal/types';
import type { CsfFile } from './CsfFile';
export interface EnrichCsfOptions {
disableSource?: boolean;
disableDescription?: boolean;
enrichCsf?: CsfEnricher;
}
export const enrichCsfSto... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/csf-tools/getStorySortParameter.test.ts | code/core/src/csf-tools/getStorySortParameter.test.ts | import { describe, expect, it } from 'vitest';
import { dedent } from 'ts-dedent';
import { getStorySortParameter } from './getStorySortParameter';
describe('getStorySortParameter', () => {
describe('named exports', () => {
describe('supported', () => {
it('no parameters', () => {
expect(
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/csf-tools/vitest-plugin/transformer.ts | code/core/src/csf-tools/vitest-plugin/transformer.ts | /* eslint-disable local-rules/no-uncategorized-errors */
import { types as t } from 'storybook/internal/babel';
import { getStoryTitle } from 'storybook/internal/common';
import { combineTags } from 'storybook/internal/csf';
import { logger } from 'storybook/internal/node-logger';
import type { StoriesEntry, Tag } from... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/csf-tools/vitest-plugin/transformer.test.ts | code/core/src/csf-tools/vitest-plugin/transformer.test.ts | import { beforeEach, describe, expect, it, vi } from 'vitest';
import { getStoryTitle } from 'storybook/internal/common';
import { logger } from 'storybook/internal/node-logger';
import { type RawSourceMap, SourceMapConsumer } from 'source-map';
import { vitestTransform as originalTransform } from './transformer';
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | true |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/App.tsx | code/core/src/manager/App.tsx | import type { ComponentProps } from 'react';
import React, { useEffect } from 'react';
import Events from 'storybook/internal/core-events';
import type { Addon_PageType } from 'storybook/internal/types';
import { addons } from 'storybook/manager-api';
import { Global, createGlobal } from 'storybook/theming';
import ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/globals-runtime.ts | code/core/src/manager/globals-runtime.ts | /// <reference path="./typings.d.ts" />
import { TELEMETRY_ERROR } from 'storybook/internal/core-events';
import { globalPackages, globalsNameReferenceMap } from './globals/globals';
import { globalsNameValueMap } from './globals/runtime';
import { prepareForTelemetry, shouldSkipError } from './utils/prepareForTelemet... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/keybinding.ts | code/core/src/manager/keybinding.ts | const codeToKeyMap = {
// event.code => event.key
Space: ' ',
Slash: '/',
ArrowLeft: 'ArrowLeft',
ArrowUp: 'ArrowUp',
ArrowRight: 'ArrowRight',
ArrowDown: 'ArrowDown',
Escape: 'Escape',
Enter: 'Enter',
};
interface Modifiers {
alt?: boolean;
ctrl?: boolean;
meta?: boolean;
shift?: boolean;
}
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/typings.d.ts | code/core/src/manager/typings.d.ts | declare var DOCS_OPTIONS: any;
declare var CONFIG_TYPE: 'DEVELOPMENT' | 'PRODUCTION';
declare var PREVIEW_URL: any;
/**
* The network address of the Storybook instance. Used by Storybook to generate a QR code so users
* can access the story on mobile devices.
*/
declare var STORYBOOK_NETWORK_ADDRESS: string | undefi... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/manager-stores.ts | code/core/src/manager/manager-stores.ts | export {
internal_fullStatusStore,
experimental_getStatusStore,
experimental_useStatusStore,
internal_fullTestProviderStore,
experimental_getTestProviderStore,
experimental_useTestProviderStore,
internal_checklistStore,
internal_universalChecklistStore,
} from 'storybook/manager-api';
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/index.tsx | code/core/src/manager/index.tsx | import type { ComponentProps, FC } from 'react';
import React, { useCallback, useMemo } from 'react';
import { createRoot } from 'react-dom/client';
import { ProviderDoesNotExtendBaseProviderError } from 'storybook/internal/manager-errors';
import { Location, LocationProvider, useNavigate } from 'storybook/internal/ro... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/provider.ts | code/core/src/manager/provider.ts | import type { Addon_Types } from 'storybook/internal/types';
export default class Provider {
getElements(_type: Addon_Types) {
throw new Error('Provider.getElements() is not implemented!');
}
handleAPI(_api: unknown) {
throw new Error('Provider.handleAPI() is not implemented!');
}
getConfig() {
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/constants.ts | code/core/src/manager/constants.ts | export const BREAKPOINT = 600;
export const MEDIA_DESKTOP_BREAKPOINT = `@media (min-width: ${BREAKPOINT}px)`;
export const MOBILE_TRANSITION_DURATION = 300;
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/runtime.tsx | code/core/src/manager/runtime.tsx | import React from 'react';
import type { Channel } from 'storybook/internal/channels';
import { createBrowserChannel } from 'storybook/internal/channels';
import { CHANNEL_CREATED, CHANNEL_WS_DISCONNECT } from 'storybook/internal/core-events';
import type { Addon_Config, Addon_Types } from 'storybook/internal/types';
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/manager-stores.mock.ts | code/core/src/manager/manager-stores.mock.ts | import {
experimental_MockUniversalStore,
experimental_useUniversalStore,
} from 'storybook/manager-api';
import * as testUtils from 'storybook/test';
import {
type StoreEvent,
type StoreState,
UNIVERSAL_CHECKLIST_STORE_OPTIONS,
createChecklistStore,
} from '../shared/checklist-store';
import {
type Stat... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/globals.ts | code/core/src/manager/globals.ts | export * from './globals/globals';
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/About.tsx | code/core/src/manager/settings/About.tsx | import type { FC } from 'react';
import React from 'react';
import { Button, Link, StorybookLogo } from 'storybook/internal/components';
import { DocumentIcon, GithubIcon } from '@storybook/icons';
import { styled } from 'storybook/theming';
import { UpgradeBlock } from '../components/upgrade/UpgradeBlock';
const ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/GuidePage.stories.tsx | code/core/src/manager/settings/GuidePage.stories.tsx | import React from 'react';
import { ManagerContext } from 'storybook/manager-api';
import { fn } from 'storybook/test';
import preview from '../../../../.storybook/preview';
import { initialState } from '../../shared/checklist-store/checklistData.state';
import { internal_universalChecklistStore as mockStore } from '... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/SettingsFooter.stories.tsx | code/core/src/manager/settings/SettingsFooter.stories.tsx | import React from 'react';
import type { Decorator } from '@storybook/react-vite';
import SettingsFooter from './SettingsFooter';
export default {
component: SettingsFooter,
title: 'Settings/SettingsFooter',
decorators: [
((StoryFn, c) => (
<div style={{ width: '600px', margin: '2rem auto' }}>
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/whats_new_page.tsx | code/core/src/manager/settings/whats_new_page.tsx | import type { FC } from 'react';
import React from 'react';
import { WhatsNewScreen } from './whats_new';
const WhatsNewPage: FC = () => {
return <WhatsNewScreen />;
};
export { WhatsNewPage };
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/ShortcutsPage.tsx | code/core/src/manager/settings/ShortcutsPage.tsx | import type { FC } from 'react';
import React from 'react';
import { Consumer } from 'storybook/manager-api';
import { ShortcutsScreen } from './shortcuts';
const ShortcutsPage: FC = () => (
<Consumer>
{({
api: {
getShortcutKeys,
getAddonsShortcutLabels,
setShortcut,
resto... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/defaultShortcuts.tsx | code/core/src/manager/settings/defaultShortcuts.tsx | import type { State } from 'storybook/manager-api';
export const defaultShortcuts: State['shortcuts'] = {
fullScreen: ['F'],
togglePanel: ['A'],
panelPosition: ['D'],
toggleNav: ['S'],
toolbar: ['T'],
search: ['/'],
focusNav: ['1'],
focusIframe: ['2'],
focusPanel: ['3'],
prevComponent: ['alt', 'Arr... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/index.tsx | code/core/src/manager/settings/index.tsx | import type { FC, ReactNode, SyntheticEvent } from 'react';
import React, { useMemo } from 'react';
import { Button, ScrollArea, TabsView } from 'storybook/internal/components';
import { Location, Route } from 'storybook/internal/router';
import type { Addon_PageType } from 'storybook/internal/types';
import { global... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/about.stories.tsx | code/core/src/manager/settings/about.stories.tsx | import React from 'react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { fn } from 'storybook/test';
import UpgradeBlockStoriesMeta from '../components/upgrade/UpgradeBlock.stories';
import { AboutScreen } from './About';
const meta = {
component: AboutScreen,
title: 'Settings/AboutScree... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/shortcuts.tsx | code/core/src/manager/settings/shortcuts.tsx | import type { ComponentProps, FC } from 'react';
import React, { Component } from 'react';
import { Button, Form } from 'storybook/internal/components';
import { CheckIcon } from '@storybook/icons';
import {
eventToShortcut,
shortcutMatchesShortcut,
shortcutToHumanString,
} from 'storybook/manager-api';
import... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/GuidePage.tsx | code/core/src/manager/settings/GuidePage.tsx | import React from 'react';
import { Link } from 'storybook/internal/components';
import { styled } from 'storybook/theming';
import { useChecklist } from '../components/sidebar/useChecklist';
import { Checklist } from './Checklist/Checklist';
const Container = styled.div(({ theme }) => ({
display: 'flex',
flexD... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/SettingsFooter.tsx | code/core/src/manager/settings/SettingsFooter.tsx | import type { FC } from 'react';
import React from 'react';
import { Link } from 'storybook/internal/components';
import { styled } from 'storybook/theming';
const Footer = styled.div(({ theme }) => ({
display: 'flex',
paddingTop: 20,
marginTop: 20,
borderTop: `1px solid ${theme.appBorderColor}`,
fontWeigh... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/shortcuts.stories.tsx | code/core/src/manager/settings/shortcuts.stories.tsx | import React from 'react';
import type { Decorator } from '@storybook/react-vite';
import { actions as makeActions } from 'storybook/actions';
import { defaultShortcuts } from './defaultShortcuts';
import { ShortcutsScreen } from './shortcuts';
const actions = makeActions(
'setShortcut',
'restoreDefaultShortcut... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/AboutPage.tsx | code/core/src/manager/settings/AboutPage.tsx | import type { FC, PropsWithChildren } from 'react';
import React, { Component, useCallback } from 'react';
import { type API, useStorybookApi, useStorybookState } from 'storybook/manager-api';
import { AboutScreen } from './About';
// Clear a notification on mount. This could be exported by core/notifications.js per... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/whats_new_footer.stories.tsx | code/core/src/manager/settings/whats_new_footer.stories.tsx | import type { Meta, StoryObj } from '@storybook/react-vite';
import { WhatsNewFooter } from './whats_new';
const meta = {
component: WhatsNewFooter,
} satisfies Meta<typeof WhatsNewFooter>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
isNotificationsEnabl... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/whats_new.tsx | code/core/src/manager/settings/whats_new.tsx | import type { ComponentProps, FC } from 'react';
import React, { Fragment, useEffect, useState } from 'react';
import { Button, Loader } from 'storybook/internal/components';
import { global } from '@storybook/global';
import { AlertIcon as AlertIconSvg, EyeCloseIcon, EyeIcon, HeartIcon } from '@storybook/icons';
im... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/Checklist/Checklist.tsx | code/core/src/manager/settings/Checklist/Checklist.tsx | import React, { useMemo } from 'react';
import { ActionList, Button, Collapsible } from 'storybook/internal/components';
import {
CheckIcon,
ChevronSmallDownIcon,
LockIcon,
StatusPassIcon,
UndoIcon,
} from '@storybook/icons';
import { useStorybookApi } from 'storybook/manager-api';
import { styled } from '... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/settings/Checklist/Checklist.stories.tsx | code/core/src/manager/settings/Checklist/Checklist.stories.tsx | import React from 'react';
import { internal_checklistStore as checklistStore } from '#manager-stores';
import { ManagerContext } from 'storybook/manager-api';
import { fn } from 'storybook/test';
import { styled } from 'storybook/theming';
import preview from '../../../../../.storybook/preview';
import { checklistDa... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/container/Panel.tsx | code/core/src/manager/container/Panel.tsx | import type { FC } from 'react';
import React, { useMemo, useState } from 'react';
import { Addon_TypesEnum } from 'storybook/internal/types';
import { useChannel, useStorybookApi, useStorybookState } from 'storybook/manager-api';
import { STORY_PREPARED } from '../../core-events';
import { AddonPanel } from '../com... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/container/Preview.tsx | code/core/src/manager/container/Preview.tsx | import type { ComponentProps } from 'react';
import React from 'react';
import type { Addon_BaseType, Addon_Collection, Addon_WrapperType } from 'storybook/internal/types';
import { Addon_TypesEnum } from 'storybook/internal/types';
import { global } from '@storybook/global';
import memoizerific from 'memoizerific';... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/container/Menu.stories.tsx | code/core/src/manager/container/Menu.stories.tsx | import React from 'react';
import { Button, PopoverProvider, TooltipLinkList } from 'storybook/internal/components';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { action } from 'storybook/actions';
import { initialState } from '../../shared/checklist-store/checklistData.state';
import { inte... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/container/Panel.stories.tsx | code/core/src/manager/container/Panel.stories.tsx | import React from 'react';
export default {
title: 'Addon Panel',
};
export const AllAddons = () => <div>By default all addon panels are rendered</div>;
/*
TODO: this story currently breaks the whole Storybook UI (including the manager).
Current findings:
- Only happens when actions below are disabled, not when a1... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/container/Notifications.tsx | code/core/src/manager/container/Notifications.tsx | import type { FC } from 'react';
import React from 'react';
import type { Combo } from 'storybook/manager-api';
import { Consumer } from 'storybook/manager-api';
import { NotificationList } from '../components/notifications/NotificationList';
const mapper = ({ state, api }: Combo) => {
return {
notifications: ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/container/Menu.tsx | code/core/src/manager/container/Menu.tsx | import type { FC } from 'react';
import React, { useCallback, useMemo } from 'react';
import { ActionList, ProgressSpinner } from 'storybook/internal/components';
import { STORIES_COLLAPSE_ALL } from 'storybook/internal/core-events';
import { global } from '@storybook/global';
import {
CheckIcon,
CommandIcon,
D... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/container/Sidebar.tsx | code/core/src/manager/container/Sidebar.tsx | import React from 'react';
import type { Combo, StoriesHash } from 'storybook/manager-api';
import { Consumer, experimental_useStatusStore } from 'storybook/manager-api';
import type { SidebarProps as SidebarComponentProps } from '../components/sidebar/Sidebar';
import { Sidebar as SidebarComponent } from '../compone... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/hooks/useModalDialog.ts | code/core/src/manager/hooks/useModalDialog.ts | import { useEffect, useRef } from 'react';
interface UseModalDialogOptions {
isOpen: boolean;
onClose: () => void;
}
export function useModalDialog({ isOpen, onClose }: UseModalDialogOptions) {
const dialogRef = useRef<HTMLDialogElement>(null);
useEffect(() => {
const dialogNode = dialogRef.current;
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/hooks/useDebounce.ts | code/core/src/manager/hooks/useDebounce.ts | import { useEffect, useState } from 'react';
export function useDebounce<T>(value: T, delay: number): T {
const [debouncedValue, setDebouncedValue] = useState(value);
useEffect(() => {
const handler = setTimeout(() => {
setDebouncedValue(value);
}, delay);
return () => {
clearTimeout(hand... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/hooks/useLocation.ts | code/core/src/manager/hooks/useLocation.ts | import { useEffect, useState } from 'react';
export const LocationMonitor = {
_currentHref: globalThis.window?.location.href ?? '',
_intervalId: null as ReturnType<typeof setInterval> | null,
_listeners: new Set<(location: Location) => void>(),
start() {
if (this._intervalId === null) {
this._interv... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/hooks/useMedia.tsx | code/core/src/manager/hooks/useMedia.tsx | import { useEffect, useState } from 'react';
// The hook is taken from this library:
// https://usehooks-ts.com/react-hook/use-media-query
// The good thing about it is that is uses window.matchMedia
export function useMediaQuery(query: string): boolean {
const getMatches = (queryMatch: string): boolean => {
//... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/hooks/useMeasure.tsx | code/core/src/manager/hooks/useMeasure.tsx | import React from 'react';
// Copied and modified from https://usehooks.com/usemeasure
export function useMeasure<T extends Element>() {
const [dimensions, setDimensions] = React.useState({
width: null,
height: null,
});
const prevObserver = React.useRef(null);
const customRef = React.useCallback((no... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/TextFlip.stories.tsx | code/core/src/manager/components/TextFlip.stories.tsx | import type { ComponentProps } from 'react';
import { useState } from 'react';
import preview from '../../../../.storybook/preview';
import { Button } from '../../components';
import { TextFlip } from './TextFlip';
const Counter = ({
text,
reverse = false,
...props
}: { text: string; reverse?: boolean } & Compo... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/TextFlip.tsx | code/core/src/manager/components/TextFlip.tsx | import type { ComponentProps } from 'react';
import React, { useRef, useState } from 'react';
import { keyframes, styled } from 'storybook/theming';
const slideIn = keyframes({
from: {
transform: 'translateY(var(--slide-in-from))',
opacity: 0,
},
});
const slideOut = keyframes({
to: {
transform: 't... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/TourGuide/TourTooltip.tsx | code/core/src/manager/components/TourGuide/TourTooltip.tsx | import type { FC } from 'react';
import React, { useEffect } from 'react';
import { Button } from 'storybook/internal/components';
import { CloseAltIcon } from '@storybook/icons';
import { darken, lighten, transparentize } from 'polished';
import type { Step, TooltipRenderProps } from 'react-joyride';
import { color... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/TourGuide/TourGuide.tsx | code/core/src/manager/components/TourGuide/TourGuide.tsx | import type { ComponentProps } from 'react';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { createRoot } from 'react-dom/client';
import { darken } from 'polished';
import type { CallBackProps } from 'react-joyride';
import Joyride, { ACTIONS, type Step } from 'react-joyride... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/TourGuide/HighlightElement.stories.tsx | code/core/src/manager/components/TourGuide/HighlightElement.stories.tsx | import { Button } from 'storybook/internal/components';
import preview from '../../../../../.storybook/preview';
import { HighlightElement } from './HighlightElement';
const meta = preview.meta({
component: HighlightElement,
parameters: {
layout: 'centered',
},
});
export const Default = meta.story({
arg... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/TourGuide/TourGuide.stories.tsx | code/core/src/manager/components/TourGuide/TourGuide.stories.tsx | import { useState } from 'react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { fn } from 'storybook/test';
import { TourGuide } from './TourGuide';
const meta = {
component: TourGuide,
args: {
onComplete: fn(),
onDismiss: fn(),
},
} satisfies Meta<typeof TourGuide>;
export de... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/TourGuide/HighlightElement.tsx | code/core/src/manager/components/TourGuide/HighlightElement.tsx | import { useEffect } from 'react';
const HIGHLIGHT_KEYFRAMES_ID = 'storybook-highlight-element-keyframes';
const keyframes = `
@keyframes sb-highlight-pulsate {
0% {
box-shadow: rgba(2,156,253,1) 0 0 2px 1px, 0 0 0 0 rgba(2, 156, 253, 0.7), 0 0 0 0 rgba(2, 156, 253, 0.4);
}
50% {
box-shadow:... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/upgrade/UpgradeBlock.tsx | code/core/src/manager/components/upgrade/UpgradeBlock.tsx | import type { FC } from 'react';
import React, { useState } from 'react';
import { Link } from 'storybook/internal/components';
import { useStorybookApi } from 'storybook/manager-api';
import { styled } from 'storybook/theming';
import { MEDIA_DESKTOP_BREAKPOINT } from '../../constants';
interface UpgradeBlockProps... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/upgrade/UpgradeBlock.stories.tsx | code/core/src/manager/components/upgrade/UpgradeBlock.stories.tsx | import React from 'react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { ManagerContext } from 'storybook/manager-api';
import { fn } from 'storybook/test';
import { UpgradeBlock } from './UpgradeBlock';
const meta = {
component: UpgradeBlock,
title: 'UpgradeBlock',
decorators: [
(... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/Iframe.stories.tsx | code/core/src/manager/components/preview/Iframe.stories.tsx | import type { CSSProperties } from 'react';
import React from 'react';
import { IFrame } from './Iframe';
export default {
component: IFrame,
title: 'Iframe',
parameters: {
layout: 'fullscreen',
viewport: {
defaultViewport: 'sized',
viewports: {
sized: {
name: 'Sized',
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/Preview.tsx | code/core/src/manager/components/preview/Preview.tsx | import type { FC } from 'react';
import React, { Fragment, useEffect, useRef, useState } from 'react';
import { deprecate } from 'storybook/internal/client-logger';
import { Loader, useTabsState } from 'storybook/internal/components';
import { PREVIEW_BUILDER_PROGRESS, SET_CURRENT_STORY } from 'storybook/internal/core... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/FramesRenderer.tsx | code/core/src/manager/components/preview/FramesRenderer.tsx | import type { FC } from 'react';
import React, { Fragment, useRef } from 'react';
import { Button, getStoryHref } from 'storybook/internal/components';
import type { Combo } from 'storybook/manager-api';
import { Consumer } from 'storybook/manager-api';
import { Global, styled } from 'storybook/theming';
import type ... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/Toolbar.tsx | code/core/src/manager/components/preview/Toolbar.tsx | import React from 'react';
import { AbstractToolbar, Button, Separator, TabList } from 'storybook/internal/components';
import { type Addon_BaseType, Addon_TypesEnum } from 'storybook/internal/types';
import { CloseIcon, ExpandIcon } from '@storybook/icons';
import type { TabListState } from '@react-stately/tabs';
i... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/Iframe.tsx | code/core/src/manager/components/preview/Iframe.tsx | import type { IframeHTMLAttributes } from 'react';
import React from 'react';
import { Zoom } from 'storybook/internal/components';
import { styled } from 'storybook/theming';
const StyledIframe = styled.iframe(({ theme }) => ({
backgroundColor: theme.background.preview,
display: 'block',
boxSizing: 'content-b... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/Wrappers.tsx | code/core/src/manager/components/preview/Wrappers.tsx | import type { FC, PropsWithChildren } from 'react';
import React, { Fragment } from 'react';
import { Addon_TypesEnum } from 'storybook/internal/types';
import type { Addon_WrapperType } from 'storybook/internal/types';
import { IframeWrapper } from './utils/components';
import type { ApplyWrappersProps } from './uti... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/tools/open-in-editor.tsx | code/core/src/manager/components/preview/tools/open-in-editor.tsx | import React from 'react';
import { Button } from 'storybook/internal/components';
import type { Addon_BaseType } from 'storybook/internal/types';
import { global } from '@storybook/global';
import { EditorIcon } from '@storybook/icons';
import { Consumer, types, useStorybookApi } from 'storybook/manager-api';
impor... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/tools/zoom.tsx | code/core/src/manager/components/preview/tools/zoom.tsx | import type { EventHandler, PropsWithChildren, SyntheticEvent } from 'react';
import React, { Component, createContext, memo, useCallback } from 'react';
import { Button, Separator } from 'storybook/internal/components';
import type { Addon_BaseType } from 'storybook/internal/types';
import { ZoomIcon, ZoomOutIcon, Z... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/tools/share.tsx | code/core/src/manager/components/preview/tools/share.tsx | import React, { useMemo, useState } from 'react';
import {
Button,
PopoverProvider,
TooltipLinkList,
getStoryHref,
} from 'storybook/internal/components';
import type { Addon_BaseType } from 'storybook/internal/types';
import { global } from '@storybook/global';
import { BugIcon, LinkIcon, ShareIcon } from '@... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/tools/menu.tsx | code/core/src/manager/components/preview/tools/menu.tsx | import React from 'react';
import { Button, Separator } from 'storybook/internal/components';
import type { Addon_BaseType } from 'storybook/internal/types';
import { MenuIcon } from '@storybook/icons';
import { Consumer, types } from 'storybook/manager-api';
import type { Combo } from 'storybook/manager-api';
cons... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/tools/remount.tsx | code/core/src/manager/components/preview/tools/remount.tsx | import type { ComponentProps } from 'react';
import React, { useEffect, useState } from 'react';
import { Button } from 'storybook/internal/components';
import { FORCE_REMOUNT } from 'storybook/internal/core-events';
import type { Addon_BaseType } from 'storybook/internal/types';
import { SyncIcon } from '@storybook/... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/tools/share.stories.tsx | code/core/src/manager/components/preview/tools/share.stories.tsx | import React from 'react';
import { global } from '@storybook/global';
import type { StoryObj } from '@storybook/react-vite';
import { ManagerContext } from 'storybook/manager-api';
import { expect, screen, waitFor } from 'storybook/test';
import { shareTool } from './share';
const managerContext = {
state: {
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/tools/addons.tsx | code/core/src/manager/components/preview/tools/addons.tsx | import React from 'react';
import { Button } from 'storybook/internal/components';
import type { Addon_BaseType } from 'storybook/internal/types';
import { BottomBarIcon, SidebarAltIcon } from '@storybook/icons';
import { Consumer, types } from 'storybook/manager-api';
import type { Combo } from 'storybook/manager-a... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/utils/stringifyQueryParams.tsx | code/core/src/manager/components/preview/utils/stringifyQueryParams.tsx | import { stringify } from 'picoquery';
export const stringifyQueryParams = (queryParams: Record<string, string>) => {
const result = stringify(queryParams);
if (result === '') {
return '';
}
return `&${result}`;
};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/utils/components.ts | code/core/src/manager/components/preview/utils/components.ts | import { Link } from 'storybook/internal/router';
import { styled } from 'storybook/theming';
export const PreviewContainer = styled.main({
display: 'flex',
flexDirection: 'column',
width: '100%',
height: '100%',
overflow: 'hidden',
});
export const FrameWrap = styled.section({
overflow: 'auto',
width:... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/preview/utils/types.tsx | code/core/src/manager/components/preview/utils/types.tsx | import type { ReactElement } from 'react';
import type {
API_ViewMode,
Addon_BaseType,
Addon_WrapperType,
StoryId,
} from 'storybook/internal/types';
import type { API, LeafEntry, State } from 'storybook/manager-api';
export interface PreviewProps {
api: API;
viewMode: API_ViewMode;
refs: State['refs']... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/mobile/about/MobileAbout.stories.tsx | code/core/src/manager/components/mobile/about/MobileAbout.stories.tsx | import React, { useEffect } from 'react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { ManagerContext } from 'storybook/manager-api';
import { within } from 'storybook/test';
import { LayoutProvider, useLayout } from '../../layout/LayoutProvider';
import { MobileAbout } from './MobileAbout';... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/mobile/about/MobileAbout.tsx | code/core/src/manager/components/mobile/about/MobileAbout.tsx | import type { FC } from 'react';
import React, { useEffect, useRef } from 'react';
import { Button, Link, ScrollArea } from 'storybook/internal/components';
import { ArrowLeftIcon, GithubIcon, ShareAltIcon, StorybookIcon } from '@storybook/icons';
import { useTransitionState } from 'react-transition-state';
import {... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/mobile/navigation/MobileNavigation.stories.tsx | code/core/src/manager/components/mobile/navigation/MobileNavigation.stories.tsx | import React from 'react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { startCase } from 'es-toolkit/string';
import { ManagerContext } from 'storybook/manager-api';
import { fn, screen, userEvent } from 'storybook/test';
import { LayoutProvider, useLayout } from '../../layout/LayoutProvider... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/mobile/navigation/MobileNavigation.tsx | code/core/src/manager/components/mobile/navigation/MobileNavigation.tsx | import React from 'react';
import type { ComponentProps, FC } from 'react';
import { Button } from 'storybook/internal/components';
import type { API_IndexHash, API_Refs } from 'storybook/internal/types';
import { BottomBarToggleIcon, MenuIcon } from '@storybook/icons';
import { useId } from '@react-aria/utils';
imp... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/mobile/navigation/MobileMenuDrawer.tsx | code/core/src/manager/components/mobile/navigation/MobileMenuDrawer.tsx | import type { FC, ReactNode } from 'react';
import React from 'react';
import { Modal } from 'storybook/internal/components';
import { styled } from 'storybook/theming';
import { MOBILE_TRANSITION_DURATION } from '../../../constants';
import { MobileAbout } from '../about/MobileAbout';
interface MobileMenuDrawerPro... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/mobile/navigation/MobileAddonsDrawer.tsx | code/core/src/manager/components/mobile/navigation/MobileAddonsDrawer.tsx | import type { FC, ReactNode } from 'react';
import React from 'react';
import { Modal } from 'storybook/internal/components';
import { styled } from 'storybook/theming';
import { MOBILE_TRANSITION_DURATION } from '../../../constants';
interface MobileAddonsDrawerProps {
children: ReactNode;
id?: string;
isOpe... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/panel/Panel.tsx | code/core/src/manager/components/panel/Panel.tsx | import type { ReactNode } from 'react';
import React, { Component, useMemo } from 'react';
import {
Button,
EmptyTabContent,
Link,
StatelessTab,
StatelessTabList,
StatelessTabPanel,
StatelessTabsView,
} from 'storybook/internal/components';
import type { Addon_BaseType } from 'storybook/internal/types';
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/panel/Panel.stories.tsx | code/core/src/manager/components/panel/Panel.stories.tsx | import type { EventHandler, FocusEvent, MouseEvent } from 'react';
import React, { useCallback, useRef, useState } from 'react';
import { Badge, Spaced } from 'storybook/internal/components';
import type { Addon_BaseType, Addon_Collection } from 'storybook/internal/types';
import { Addon_TypesEnum } from 'storybook/in... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/Focus/Focus.tsx | code/core/src/manager/components/Focus/Focus.tsx | import React, { useEffect, useRef, useState } from 'react';
import { styled } from 'storybook/theming';
import { useLocationHash } from '../../hooks/useLocation';
const FocusOutline = styled.div<{ active?: boolean; outlineOffset?: number }>(
({ theme, active = false, outlineOffset = 0 }) => ({
width: '100%',
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/IconSymbols.tsx | code/core/src/manager/components/sidebar/IconSymbols.tsx | import type { FC } from 'react';
import React from 'react';
import { styled } from 'storybook/theming';
const Svg = styled.svg`
position: absolute;
width: 0;
height: 0;
display: inline-block;
shape-rendering: inherit;
vertical-align: middle;
`;
// We are importing the icons from @storybook/icons as we ne... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/FileSearchModal.tsx | code/core/src/manager/components/sidebar/FileSearchModal.tsx | import React, { useEffect, useState, useTransition } from 'react';
import { Form, Modal } from 'storybook/internal/components';
import { CloseAltIcon, SearchIcon, SyncIcon } from '@storybook/icons';
import { styled } from 'storybook/theming';
import { useMeasure } from '../../hooks/useMeasure';
import type { NewSto... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/RefIndicator.tsx | code/core/src/manager/components/sidebar/RefIndicator.tsx | import type { FC, MouseEventHandler, ReactNode } from 'react';
import React, { forwardRef, useCallback, useMemo } from 'react';
import { Button, PopoverProvider, Select, Spaced } from 'storybook/internal/components';
import { global } from '@storybook/global';
import {
AlertIcon,
DocumentIcon,
GlobeIcon,
Ligh... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/Heading.tsx | code/core/src/manager/components/sidebar/Heading.tsx | import type { ComponentProps, FC } from 'react';
import React from 'react';
import { Button } from 'storybook/internal/components';
import { styled } from 'storybook/theming';
import { Brand } from './Brand';
import type { MenuList, SidebarMenuProps } from './Menu';
import { SidebarMenu } from './Menu';
export inte... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/FileSearchList.tsx | code/core/src/manager/components/sidebar/FileSearchList.tsx | import React, { memo, useCallback, useMemo, useState } from 'react';
import { TooltipNote, TooltipProvider } from 'storybook/internal/components';
import type {
CreateNewStoryRequestPayload,
FileComponentSearchResponsePayload,
} from 'storybook/internal/core-events';
import {
BookmarkHollowIcon,
ChevronSmallD... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/useChecklist.ts | code/core/src/manager/components/sidebar/useChecklist.ts | import { useEffect, useMemo, useState } from 'react';
import { PREVIEW_INITIALIZED } from 'storybook/internal/core-events';
import { type API_IndexHash } from 'storybook/internal/types';
import {
internal_checklistStore as checklistStore,
internal_universalChecklistStore as universalChecklistStore,
} from '#manag... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/ContextMenu.tsx | code/core/src/manager/components/sidebar/ContextMenu.tsx | import type { ComponentProps, FC, SyntheticEvent } from 'react';
import React, { useContext, useMemo, useState } from 'react';
import { PopoverProvider, TooltipLinkList } from 'storybook/internal/components';
import {
type API_HashEntry,
type Addon_Collection,
type Addon_TestProviderType,
Addon_TypesEnum,
ty... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/FIleSearchList.utils.tsx | code/core/src/manager/components/sidebar/FIleSearchList.utils.tsx | import { useEffect } from 'react';
import { flushSync } from 'react-dom';
import type { Virtualizer } from '@tanstack/react-virtual';
interface UseArrowKeyNavigationProps {
rowVirtualizer: Virtualizer<HTMLDivElement, Element>;
parentRef: React.MutableRefObject<HTMLDivElement>;
selectedItem: number | null;
}
/*... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/FileSearchModal.utils.test.tsx | code/core/src/manager/components/sidebar/FileSearchModal.utils.test.tsx | import { describe, expect, it } from 'vitest';
import type { ArgTypes } from 'storybook/internal/csf';
import { extractSeededRequiredArgs } from './FileSearchModal.utils';
describe('FileSearchModal.utils', () => {
describe('extractSeededRequiredArgs', () => {
it('should extract seeded required args', () => {
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/Menu.stories.tsx | code/core/src/manager/components/sidebar/Menu.stories.tsx | import React from 'react';
import { TooltipLinkList } from 'storybook/internal/components';
import { LinkIcon } from '@storybook/icons';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { ManagerContext } from 'storybook/manager-api';
import { expect, fn, screen, userEvent, waitFor, within } from... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/SearchResults.tsx | code/core/src/manager/components/sidebar/SearchResults.tsx | import type { FC, MouseEventHandler, PropsWithChildren, ReactNode } from 'react';
import React, { useCallback, useEffect } from 'react';
import { Button } from 'storybook/internal/components';
import { PRELOAD_ENTRIES } from 'storybook/internal/core-events';
import { global } from '@storybook/global';
import { TrashI... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/IconSymbols.stories.tsx | code/core/src/manager/components/sidebar/IconSymbols.stories.tsx | import type { Meta, StoryObj } from '@storybook/react-vite';
import { IconSymbols } from './IconSymbols';
const meta = {
component: IconSymbols,
title: 'Sidebar/IconSymbols',
} satisfies Meta<typeof IconSymbols>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {};
| typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/Explorer.tsx | code/core/src/manager/components/sidebar/Explorer.tsx | import type { FC } from 'react';
import React, { useRef } from 'react';
import { HighlightStyles } from './HighlightStyles';
import { Ref } from './Refs';
import type { CombinedDataset, Selection } from './types';
import { useHighlighted } from './useHighlighted';
export interface ExplorerProps {
isLoading: boolean... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/TestingWidget.stories.tsx | code/core/src/manager/components/sidebar/TestingWidget.stories.tsx | import React from 'react';
import type { Listener } from 'storybook/internal/channels';
import type { TestProviderStateByProviderId } from 'storybook/internal/types';
import {
type Addon_Collection,
type Addon_TestProviderType,
Addon_TypesEnum,
} from 'storybook/internal/types';
import type { Meta, StoryObj } f... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/RefBlocks.tsx | code/core/src/manager/components/sidebar/RefBlocks.tsx | import type { FC } from 'react';
import React, { Fragment, useCallback, useState } from 'react';
import { logger } from 'storybook/internal/client-logger';
import {
Button,
ErrorFormatter,
Link,
PopoverProvider,
Spaced,
} from 'storybook/internal/components';
import { global } from '@storybook/global';
impo... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/FileSearchModal.utils.tsx | code/core/src/manager/components/sidebar/FileSearchModal.utils.tsx | import type { ArgTypes, SBType } from 'storybook/internal/csf';
export function extractSeededRequiredArgs(argTypes: ArgTypes) {
const extractedArgTypes = Object.keys(argTypes).reduce(
(acc, key: keyof typeof argTypes) => {
const argType = argTypes[key];
if (typeof argType.control === 'object' && 'ty... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/Refs.tsx | code/core/src/manager/components/sidebar/Refs.tsx | import type { FC, MutableRefObject } from 'react';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useStorybookApi, useStorybookState } from 'storybook/manager-api';
import { styled } from 'storybook/theming';
import { getStateType } from '../../utils/tree';
import { AuthBlo... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
storybookjs/storybook | https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/core/src/manager/components/sidebar/useHighlighted.ts | code/core/src/manager/components/sidebar/useHighlighted.ts | import type { Dispatch, MutableRefObject, RefObject, SetStateAction } from 'react';
import { useCallback, useEffect, useRef, useState } from 'react';
import { PRELOAD_ENTRIES } from 'storybook/internal/core-events';
import { global } from '@storybook/global';
import { useStorybookApi } from 'storybook/manager-api';
... | typescript | MIT | 7f193d38eec36246a211339c1f352cca246de779 | 2026-01-04T15:25:31.846427Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.