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/e2e-tests/json-files.spec.ts
code/e2e-tests/json-files.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; test.describe('JSON files', () => { test.beforeEach(async ({ page }) => { await page.goto(storybookUrl); }); test('should have index.json', async ({ pag...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/addon-a11y.spec.ts
code/e2e-tests/addon-a11y.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; test.describe('addon-a11y', () => { test.beforeEach(async ({ page }) => { await page.goto(storybookUrl); await new SbPa...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/navigation.spec.ts
code/e2e-tests/navigation.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; test.describe('navigating', () => { test('a URL with a partial storyId will redirect to the first story', async ({ page }) => {...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/util.ts
code/e2e-tests/util.ts
/* eslint-disable local-rules/no-uncategorized-errors */ import { toId } from 'storybook/internal/csf'; import type { Expect, Page } from '@playwright/test'; import { allTemplates } from '../lib/cli-storybook/src/sandbox-templates'; export class SbPage { readonly page: Page; readonly expect: Expect; construc...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/addon-docs.spec.ts
code/e2e-tests/addon-docs.spec.ts
/* eslint-disable playwright/no-conditional-expect */ /* eslint-disable playwright/no-conditional-in-test */ import { expect, test } from '@playwright/test'; import process from 'process'; import { dedent } from 'ts-dedent'; import { SbPage, isReactSandbox } from './util'; const storybookUrl = process.env.STORYBOOK_U...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/addon-actions.spec.ts
code/e2e-tests/addon-actions.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; test.describe('addon-actions', () => { test('should trigger an ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/component-tests.spec.ts
code/e2e-tests/component-tests.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage, checkTemplate } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:6006'; const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; test.describe('interactions', () => { test.befor...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/preview-api.spec.ts
code/e2e-tests/preview-api.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; const wait = (ms: number) => new Promise((resolve) => setTimeout(...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/framework-nextjs.spec.ts
code/e2e-tests/framework-nextjs.spec.ts
import type { Locator } from '@playwright/test'; import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:6006'; const templateName = process.env.STORYBOOK_TEMPLATE_NAME; test.describe('Next.js...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/addon-controls.spec.ts
code/e2e-tests/addon-controls.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage, isReactSandbox } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; test.describe('addon-controls', () => { test('s...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/addon-onboarding.spec.ts
code/e2e-tests/addon-onboarding.spec.ts
import { rm } from 'node:fs/promises'; import { homedir } from 'node:os'; import { expect, test } from '@playwright/test'; import { join } from 'pathe'; import process from 'process'; import { SbPage, hasOnboardingFeature } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; con...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/tags.spec.ts
code/e2e-tests/tags.spec.ts
import { expect, test } from '@playwright/test'; import { SbPage, isReactSandbox } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; test.describe('tags', () => { test.beforeEach(async ({ page }) => { await ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/addon-toolbars.spec.ts
code/e2e-tests/addon-toolbars.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; test.describe('addon-toolbars', () => { test.beforeEach(async ({ page }) => { await page.goto(storybookUrl); await new ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/framework-svelte.spec.ts
code/e2e-tests/framework-svelte.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:6006'; const templateName = process.env.STORYBOOK_TEMPLATE_NAME; test.describe('Svelte', () => { test.beforeEach(async ({ page }) => {...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/addon-backgrounds.spec.ts
code/e2e-tests/addon-backgrounds.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; test.describe('addon-backgrounds', () => { test.beforeEach(asyn...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/sb-module-mocking.spec.ts
code/e2e-tests/sb-module-mocking.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:6006'; test.describe('sb-module-mocking', () => { test.beforeEach(async ({ page }) => { await page.goto(storybookUrl); await n...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/e2e-tests/addon-viewport.spec.ts
code/e2e-tests/addon-viewport.spec.ts
import { expect, test } from '@playwright/test'; import process from 'process'; import { SbPage } from './util'; const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; test.describe('addon-viewport', () => { test.beforeEach(async ({ page }) => { await page.goto(storybookUrl); await new ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/vitest.config.ts
code/frameworks/web-components-vite/vitest.config.ts
import { defineConfig, mergeConfig } from 'vitest/config'; import { vitestCommonConfig } from '../../vitest.shared'; export default mergeConfig( vitestCommonConfig, defineConfig({ // Add custom config here }) );
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/build-config.ts
code/frameworks/web-components-vite/build-config.ts
import type { BuildEntries } from '../../../scripts/build/utils/entry-utils'; const config: BuildEntries = { entries: { browser: [ { exportEntries: ['.'], entryPoint: './src/index.ts', }, ], node: [ { exportEntries: ['./preset'], entryPoint: './src/preset...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/src/preset.ts
code/frameworks/web-components-vite/src/preset.ts
import type { PresetProperty } from 'storybook/internal/types'; export const core: PresetProperty<'core'> = { builder: import.meta.resolve('@storybook/builder-vite'), renderer: import.meta.resolve('@storybook/web-components/preset'), };
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/src/types.ts
code/frameworks/web-components-vite/src/types.ts
import type { CompatibleString, StorybookConfig as StorybookConfigBase, } from 'storybook/internal/types'; import type { BuilderOptions, StorybookConfigVite } from '@storybook/builder-vite'; type FrameworkName = CompatibleString<'@storybook/web-components-vite'>; type BuilderName = CompatibleString<'@storybook/bu...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/src/index.ts
code/frameworks/web-components-vite/src/index.ts
export * from '@storybook/web-components'; export * from './types';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/src/node/index.ts
code/frameworks/web-components-vite/src/node/index.ts
import type { StorybookConfig } from '../types'; export function defineMain(config: StorybookConfig) { return config; } export type { StorybookConfig };
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/template/cli/ts/Button.stories.ts
code/frameworks/web-components-vite/template/cli/ts/Button.stories.ts
import type { Meta, StoryObj } from '@storybook/web-components-vite'; import { fn } from 'storybook/test'; import type { ButtonProps } from './Button'; import { Button } from './Button'; // More on how to set up stories at: https://storybook.js.org/docs/writing-stories const meta = { title: 'Example/Button', tag...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/template/cli/ts/Page.stories.ts
code/frameworks/web-components-vite/template/cli/ts/Page.stories.ts
import type { Meta, StoryObj } from '@storybook/web-components-vite'; import * as HeaderStories from './Header.stories'; import type { PageProps } from './Page'; import { Page } from './Page'; const meta = { title: 'Example/Page', render: (args: PageProps) => Page(args), } satisfies Meta<PageProps>; export defau...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/template/cli/ts/Header.ts
code/frameworks/web-components-vite/template/cli/ts/Header.ts
import { html } from 'lit'; import { Button } from './Button'; import './header.css'; type User = { name: string; }; export interface HeaderProps { user?: User; onLogin?: () => void; onLogout?: () => void; onCreateAccount?: () => void; } export const Header = ({ user, onLogin, onLogout, onCreateAccount }:...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/template/cli/ts/Button.ts
code/frameworks/web-components-vite/template/cli/ts/Button.ts
import { html } from 'lit'; import { styleMap } from 'lit/directives/style-map.js'; import './button.css'; export interface ButtonProps { /** Is this the principal call to action on the page? */ primary?: boolean; /** What background color to use */ backgroundColor?: string; /** How large should the button ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/template/cli/ts/Header.stories.ts
code/frameworks/web-components-vite/template/cli/ts/Header.stories.ts
import type { Meta, StoryObj } from '@storybook/web-components-vite'; import { fn } from 'storybook/test'; import type { HeaderProps } from './Header'; import { Header } from './Header'; const meta = { title: 'Example/Header', // This component will have an automatically generated Autodocs entry: https://storybo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/web-components-vite/template/cli/ts/Page.ts
code/frameworks/web-components-vite/template/cli/ts/Page.ts
import { html } from 'lit'; import { Header } from './Header'; import './page.css'; type User = { name: string; }; export interface PageProps { user?: User; onLogin?: () => void; onLogout?: () => void; onCreateAccount?: () => void; } export const Page = ({ user, onLogin, onLogout, onCreateAccount }: PageP...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/vitest.config.ts
code/frameworks/sveltekit/vitest.config.ts
import { defineConfig, mergeConfig } from 'vitest/config'; import { vitestCommonConfig } from '../../vitest.shared'; export default mergeConfig( vitestCommonConfig, defineConfig({ // Add custom config here }) );
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/build-config.ts
code/frameworks/sveltekit/build-config.ts
import type { BuildEntries } from '../../../scripts/build/utils/entry-utils'; const config: BuildEntries = { entries: { browser: [ { exportEntries: ['.'], entryPoint: './src/index.ts', }, { exportEntries: ['./preview'], entryPoint: './src/preview.ts', dts...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/preview.ts
code/frameworks/sveltekit/src/preview.ts
import type { Decorator, Preview } from '@storybook/svelte'; import MockProvider from '@storybook/sveltekit/internal/MockProvider.svelte'; import { setAppStateNavigating, setAppStatePage, setAppStateUpdated, // @ts-expect-error no declaration file for this JS module } from '@storybook/sveltekit/internal/mocks/app...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/preset.ts
code/frameworks/sveltekit/src/preset.ts
import { fileURLToPath } from 'node:url'; import type { PresetProperty } from 'storybook/internal/types'; import { withoutVitePlugins } from '@storybook/builder-vite'; import { viteFinal as svelteViteFinal } from '@storybook/svelte-vite/preset'; import { configOverrides } from './plugins/config-overrides'; import { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/vite-plugin.ts
code/frameworks/sveltekit/src/vite-plugin.ts
import { mockSveltekitStores } from './plugins/mock-sveltekit-stores'; export const storybookSveltekitPlugin = () => { return [mockSveltekitStores()]; };
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/types.ts
code/frameworks/sveltekit/src/types.ts
import type { CompatibleString, StorybookConfig as StorybookConfigBase, } from 'storybook/internal/types'; import type { BuilderOptions, StorybookConfigVite } from '@storybook/builder-vite'; import type { enhance } from './mocks/app/forms'; import type { goto, invalidate, invalidateAll } from './mocks/app/navigat...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/portable-stories.ts
code/frameworks/sveltekit/src/portable-stories.ts
import type { NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations, ProjectAnnotations, } from 'storybook/internal/types'; import type { SvelteRenderer } from '@storybook/svelte'; import { INTERNAL_DEFAULT_PROJECT_ANNOTATIONS as svelteAnnotations } from '@storybook/svelte'; import { composeConfigs, ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/index.ts
code/frameworks/sveltekit/src/index.ts
export * from '@storybook/svelte'; export * from './types'; // @ts-expect-error (double exports) export * from './portable-stories';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/mocks/app/stores.ts
code/frameworks/sveltekit/src/mocks/app/stores.ts
import { getContext, setContext } from 'svelte'; function createMockedStore(contextName: string) { return [ { subscribe(runner: any) { const page = getContext(contextName); runner(page); return () => {}; }, }, (value: unknown) => { setContext(contextName, value);...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/mocks/app/navigation.ts
code/frameworks/sveltekit/src/mocks/app/navigation.ts
import { getContext, onMount, setContext } from 'svelte'; export async function goto(...args: any[]) { const event = new CustomEvent('storybook:goto', { detail: args, }); window.dispatchEvent(event); } export function setAfterNavigateArgument(afterNavigateArgs: any) { setContext('after-navigate-args', aft...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/mocks/app/forms.ts
code/frameworks/sveltekit/src/mocks/app/forms.ts
export function enhance(form: HTMLFormElement) { const listener = (...args: any[]) => { const e = args[0]; e.preventDefault(); const event = new CustomEvent('storybook:enhance', { detail: args, }); window.dispatchEvent(event); }; form.addEventListener('submit', listener); return { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/node/index.ts
code/frameworks/sveltekit/src/node/index.ts
import type { StorybookConfig } from '../types'; export function defineMain(config: StorybookConfig) { return config; } export type { StorybookConfig };
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/plugins/mock-sveltekit-stores.ts
code/frameworks/sveltekit/src/plugins/mock-sveltekit-stores.ts
import type { Plugin } from 'vite'; export function mockSveltekitStores() { return { name: 'storybook:sveltekit-mock-stores', config: () => ({ resolve: { alias: { '$app/forms': '@storybook/sveltekit/internal/mocks/app/forms', '$app/navigation': '@storybook/sveltekit/internal...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/sveltekit/src/plugins/config-overrides.ts
code/frameworks/sveltekit/src/plugins/config-overrides.ts
import type { Plugin } from 'vite'; export function configOverrides() { return { // SvelteKit sets SSR, we need it to be false when building name: 'storybook:sveltekit-overrides', apply: 'build', config: () => { return { build: { ssr: false } }; }, } satisfies Plugin; }
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/vitest.config.ts
code/frameworks/angular/vitest.config.ts
import { defineConfig, mergeConfig } from 'vitest/config'; import { vitestCommonConfig } from '../../vitest.shared'; export default mergeConfig( vitestCommonConfig, defineConfig({ // Add custom config here test: { globals: true, setupFiles: ['src/test-setup.ts'], }, }) );
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/build-config.ts
code/frameworks/angular/build-config.ts
import type { BuildEntries } from '../../../scripts/build/utils/entry-utils'; const config: BuildEntries = { entries: { browser: [ { exportEntries: ['.'], entryPoint: './src/index.ts', }, { exportEntries: ['./client'], entryPoint: './src/client/index.ts', ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/test-setup.ts
code/frameworks/angular/src/test-setup.ts
import '@analogjs/vite-plugin-angular/setup-vitest'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting, } from '@angular/platform-browser-dynamic/testing'; getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesti...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/typings.d.ts
code/frameworks/angular/src/typings.d.ts
// will be provided by the webpack define plugin declare var NODE_ENV: string | undefined; declare var __STORYBOOK_ADDONS_CHANNEL__: any; declare var __STORYBOOK_ADDONS_PREVIEW: any; declare var __STORYBOOK_COMPODOC_JSON__: any; declare var __STORYBOOK_PREVIEW__: any; declare var __STORYBOOK_STORY_STORE__: any; declar...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/renderer.ts
code/frameworks/angular/src/renderer.ts
export { storyPropsProvider } from './client/angular-beta/StorybookProvider'; export { computesTemplateSourceFromComponent } from './client/angular-beta/ComputesTemplateFromComponent'; export { rendererFactory } from './client/render'; export { AbstractRenderer } from './client/angular-beta/AbstractRenderer'; export { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/preset.ts
code/frameworks/angular/src/preset.ts
import type { PresetProperty } from 'storybook/internal/types'; import type { StandaloneOptions } from './builders/utils/standalone-options'; import { fileURLToPath } from 'node:url'; export const addons: PresetProperty<'addons'> = [ fileURLToPath(import.meta.resolve('@storybook/angular/server/framework-preset-angu...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/types.ts
code/frameworks/angular/src/types.ts
import type { CompatibleString } from 'storybook/internal/types'; import type { BuilderOptions, StorybookConfigWebpack, TypescriptOptions as TypescriptOptionsBuilder, } from '@storybook/builder-webpack5'; import type { StorybookConfig as StorybookConfigBase, TypescriptOptions as TypescriptOptionsReact, } fro...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/index.ts
code/frameworks/angular/src/index.ts
export * from './client/index'; export * from './types'; /* * ATTENTION: * - moduleMetadata * - NgModuleMetadata * - ICollection * * These typings are coped out of decorators.d.ts and types.d.ts in order to fix a bug with tsc * It was imported out of dist before which was not the proper way of exporting public ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/node/index.ts
code/frameworks/angular/src/node/index.ts
import type { StorybookConfig } from '../types'; export function defineMain(config: StorybookConfig) { return config; } export type { StorybookConfig };
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/builders/start-storybook/index.spec.ts
code/frameworks/angular/src/builders/start-storybook/index.spec.ts
import { Architect, createBuilder } from '@angular-devkit/architect'; import { TestingArchitectHost } from '@angular-devkit/architect/testing'; import { schema } from '@angular-devkit/core'; import { join } from 'node:path'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; const buildDevStanda...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/builders/start-storybook/index.ts
code/frameworks/angular/src/builders/start-storybook/index.ts
import { readFileSync } from 'node:fs'; import { getEnvConfig, getProjectRoot, versions } from 'storybook/internal/common'; import { buildDevStandalone, withTelemetry } from 'storybook/internal/core-server'; import { addToGlobalContext } from 'storybook/internal/telemetry'; import type { CLIOptions } from 'storybook/i...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/builders/build-storybook/index.spec.ts
code/frameworks/angular/src/builders/build-storybook/index.spec.ts
import { Architect, createBuilder } from '@angular-devkit/architect'; import { TestingArchitectHost } from '@angular-devkit/architect/testing'; import { schema } from '@angular-devkit/core'; import * as path from 'node:path'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; const buildDevStand...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/builders/build-storybook/index.ts
code/frameworks/angular/src/builders/build-storybook/index.ts
import { readFileSync } from 'node:fs'; import { getEnvConfig, getProjectRoot, versions } from 'storybook/internal/common'; import { buildStaticStandalone, withTelemetry } from 'storybook/internal/core-server'; import { addToGlobalContext } from 'storybook/internal/telemetry'; import type { CLIOptions } from 'storyboo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/builders/utils/standalone-options.ts
code/frameworks/angular/src/builders/utils/standalone-options.ts
import type { BuilderOptions, CLIOptions, LoadOptions } from 'storybook/internal/types'; import type { BuilderContext } from '@angular-devkit/architect'; import type { AssetPattern, SourceMapUnion, StyleElement, StylePreprocessorOptions, } from '@angular-devkit/build-angular/src/builders/browser/schema'; expo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/builders/utils/run-compodoc.ts
code/frameworks/angular/src/builders/utils/run-compodoc.ts
import { isAbsolute, relative } from 'node:path'; import { JsPackageManagerFactory } from 'storybook/internal/common'; import type { BuilderContext } from '@angular-devkit/architect'; import { prompt } from 'storybook/internal/node-logger'; const hasTsConfigArg = (args: string[]) => args.indexOf('-p') !== -1; const ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/builders/utils/error-handler.ts
code/frameworks/angular/src/builders/utils/error-handler.ts
import { logger, instance as npmLog } from 'storybook/internal/node-logger'; import { dedent } from 'ts-dedent'; export const printErrorDetails = (error: any): void => { // Duplicate code for Standalone error handling // Source: https://github.com/storybookjs/storybook/blob/39c7ba09ad84fbd466f9c25d5b92791a5450b9f...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/builders/utils/run-compodoc.spec.ts
code/frameworks/angular/src/builders/utils/run-compodoc.spec.ts
import type { BuilderContext } from '@angular-devkit/architect'; // @ts-expect-error (TODO) import type { LoggerApi } from '@angular-devkit/core/src/logger'; import { afterEach, describe, expect, it, vi } from 'vitest'; import { runCompodoc } from './run-compodoc'; const mockRunScript = vi.fn().mockResolvedValue({ st...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/angular-cli-webpack.d.ts
code/frameworks/angular/src/server/angular-cli-webpack.d.ts
import type { BuilderContext } from '@angular-devkit/architect'; import type { JsonObject } from '@angular-devkit/core'; export declare function getWebpackConfig( baseConfig: any, options: { builderOptions: JsonObject; builderContext: BuilderContext } ): any;
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts
code/frameworks/angular/src/server/framework-preset-angular-ivy.ts
import { join } from 'node:path'; import type { Preset } from 'storybook/internal/types'; import type { Configuration } from 'webpack'; import type { AngularOptions } from '../types'; import type { PresetOptions } from './preset-options'; import { createRequire } from 'node:module'; const require = createRequire(im...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/framework-preset-angular-cli.ts
code/frameworks/angular/src/server/framework-preset-angular-cli.ts
import { logger } from 'storybook/internal/node-logger'; import { AngularLegacyBuildOptionsError } from 'storybook/internal/server-errors'; import { WebpackDefinePlugin, WebpackIgnorePlugin } from '@storybook/builder-webpack5'; import type { BuilderContext } from '@angular-devkit/architect'; import { targetFromTargetS...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/framework-preset-angular-cli.test.ts
code/frameworks/angular/src/server/framework-preset-angular-cli.test.ts
import { vi, expect, describe, it, beforeEach } from 'vitest'; import { logger } from 'storybook/internal/node-logger'; import type { BuilderContext } from '@angular-devkit/architect'; import { logging } from '@angular-devkit/core'; import { getBuilderOptions } from './framework-preset-angular-cli'; import type { Pr...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/preset-options.ts
code/frameworks/angular/src/server/preset-options.ts
import type { Options as CoreOptions } from 'storybook/internal/types'; import type { BuilderContext } from '@angular-devkit/architect'; import type { StandaloneOptions } from '../builders/utils/standalone-options'; export type PresetOptions = CoreOptions & { /* Allow to get the options of a targeted "browser build...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/utils/filter-out-styling-rules.ts
code/frameworks/angular/src/server/utils/filter-out-styling-rules.ts
import type { Configuration, RuleSetRule } from 'webpack'; const isStylingRule = (rule: RuleSetRule) => { const { test } = rule; if (!test) { return false; } if (!(test instanceof RegExp)) { return false; } return test.test('.css') || test.test('.scss') || test.test('.sass'); }; export const fi...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.ts
code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.ts
// To avoid "No inputs were found in config file" tsc error export const not = 'empty';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/main.ts
code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/main.ts
// To avoid "No inputs were found in config file" tsc error export const not = 'empty';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/src/main.ts
code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/src/main.ts
// To avoid "No inputs were found in config file" tsc error export const not = 'empty';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.ts
code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.ts
// To avoid "No inputs were found in config file" tsc error export const not = 'empty';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.ts
code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.ts
// To avoid "No inputs were found in config file" tsc error export const not = 'empty';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/main.ts
code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/main.ts
// To avoid "No inputs were found in config file" tsc error export const not = 'empty';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/main.ts
code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/main.ts
// To avoid "No inputs were found in config file" tsc error export const not = 'empty';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/src/main.ts
code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/src/main.ts
// To avoid "No inputs were found in config file" tsc error export const not = 'empty';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/main.ts
code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/main.ts
// To avoid "No inputs were found in config file" tsc error export const not = 'empty';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/config.ts
code/frameworks/angular/src/client/config.ts
import './globals'; export { render, renderToCanvas } from './render'; export { decorateStory as applyDecorators } from './decorateStory'; import { enhanceArgTypes } from 'storybook/internal/docs-tools'; import type { ArgTypesEnhancer, Parameters } from 'storybook/internal/types'; import { extractArgTypes, extractCo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/public-types.ts
code/frameworks/angular/src/client/public-types.ts
/* eslint-disable @typescript-eslint/ban-ts-comment */ import type { AnnotatedStoryFn, Args, ComponentAnnotations, DecoratorFunction, LoaderFunction, StoryAnnotations, StoryContext as GenericStoryContext, StrictArgs, ProjectAnnotations, } from 'storybook/internal/types'; import type * as AngularCore f...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/render.ts
code/frameworks/angular/src/client/render.ts
import type { ArgsStoryFn, RenderContext } from 'storybook/internal/types'; import '@angular/compiler'; import { RendererFactory } from './angular-beta/RendererFactory'; import type { AngularRenderer } from './types'; export const rendererFactory = new RendererFactory(); export const render: ArgsStoryFn<AngularRend...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/argsToTemplate.test.ts
code/frameworks/angular/src/client/argsToTemplate.test.ts
import { describe, expect, it } from 'vitest'; import type { ArgsToTemplateOptions } from './argsToTemplate'; import { argsToTemplate } from './argsToTemplate'; // adjust path describe('argsToTemplate', () => { it('should correctly convert args to template string and exclude undefined values', () => { const ar...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/preview-prod.ts
code/frameworks/angular/src/client/preview-prod.ts
import { enableProdMode } from '@angular/core'; enableProdMode();
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/compodoc.test.ts
code/frameworks/angular/src/client/compodoc.test.ts
import { describe, expect, it } from 'vitest'; import { extractType, setCompodocJson } from './compodoc'; import type { CompodocJson, Decorator } from './compodoc-types'; const makeProperty = (compodocType?: string) => ({ type: compodocType, name: 'dummy', decorators: [] as Decorator[], optional: true, }); c...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/compodoc.ts
code/frameworks/angular/src/client/compodoc.ts
import { logger } from 'storybook/internal/client-logger'; import type { ArgTypes, InputType, SBType } from 'storybook/internal/types'; import { global } from '@storybook/global'; import type { Argument, Class, CompodocJson, Component, Directive, Injectable, JsDocTag, Method, Pipe, Property, } fro...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/compodoc-types.ts
code/frameworks/angular/src/client/compodoc-types.ts
export interface Method { name: string; args: Argument[]; returnType: string; decorators?: Decorator[]; description?: string; rawdescription?: string; } export interface JsDocTag { comment?: string; tagName?: { escapedText?: string; }; } export interface Property { name: string; decorators?:...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/decorators.ts
code/frameworks/angular/src/client/decorators.ts
import type { DecoratorFunction, StoryContext } from 'storybook/internal/types'; import type { ApplicationConfig, Type } from '@angular/core'; import { computesTemplateFromComponent } from './angular-beta/ComputesTemplateFromComponent'; import { isComponent } from './angular-beta/utils/NgComponentAnalyzer'; import ty...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/decorators.test.ts
code/frameworks/angular/src/client/decorators.test.ts
import type { Addon_StoryContext } from 'storybook/internal/types'; import { vi, expect, describe, it } from 'vitest'; import { Component } from '@angular/core'; import { moduleMetadata, applicationConfig } from './decorators'; import type { AngularRenderer } from './types'; const defaultContext: Addon_StoryContext<A...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/decorateStory.test.ts
code/frameworks/angular/src/client/decorateStory.test.ts
import { Component, Input, Output } from '@angular/core'; import type { DecoratorFunction, StoryContext } from 'storybook/internal/types'; import { describe, expect, it } from 'vitest'; import { componentWrapperDecorator } from './decorators'; import decorateStory from './decorateStory'; import type { AngularRenderer ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/argsToTemplate.ts
code/frameworks/angular/src/client/argsToTemplate.ts
import { formatPropInTemplate } from './angular-beta/ComputesTemplateFromComponent'; /** * Options for controlling the behavior of the argsToTemplate function. * * @template T The type of the keys in the target object. */ export interface ArgsToTemplateOptions<T> { /** * An array of keys to specifically inclu...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/decorateStory.ts
code/frameworks/angular/src/client/decorateStory.ts
import { sanitizeStoryContextUpdate } from 'storybook/preview-api'; import type { DecoratorFunction, LegacyStoryFn, StoryContext } from 'storybook/internal/types'; import { computesTemplateFromComponent } from './angular-beta/ComputesTemplateFromComponent'; import type { AngularRenderer } from './types'; export defau...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/types.ts
code/frameworks/angular/src/client/types.ts
import type { Parameters as DefaultParameters, StoryContext as DefaultStoryContext, WebRenderer, } from 'storybook/internal/types'; import type { ApplicationConfig, Provider } from '@angular/core'; export interface NgModuleMetadata { /** List of components, directives, and pipes that belong to your component....
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/portable-stories.ts
code/frameworks/angular/src/client/portable-stories.ts
import { setProjectAnnotations as originalSetProjectAnnotations, setDefaultProjectAnnotations, } from 'storybook/preview-api'; import type { NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations, } from 'storybook/internal/types'; import * as INTERNAL_DEFAULT_PROJECT_ANNOTATIONS from './render'; impor...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/index.ts
code/frameworks/angular/src/client/index.ts
import './globals'; export * from './public-types'; export * from './portable-stories'; export type { StoryFnAngularReturnType as IStory } from './types'; export { moduleMetadata, componentWrapperDecorator, applicationConfig } from './decorators'; export { argsToTemplate } from './argsToTemplate';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/globals.ts
code/frameworks/angular/src/client/globals.ts
import { global } from '@storybook/global'; /** * This file includes polyfills needed by Angular and is loaded before the app. You can add your own * extra polyfills to this file. * * This file is divided into 2 sections: * * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browser...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/docs/config.ts
code/frameworks/angular/src/client/docs/config.ts
import { SourceType } from 'storybook/internal/docs-tools'; import type { DecoratorFunction, Parameters } from 'storybook/internal/types'; import { sourceDecorator } from './sourceDecorator'; export const parameters: Parameters = { docs: { source: { type: SourceType.DYNAMIC, language: 'html', },...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/docs/angular-properties.test.ts
code/frameworks/angular/src/client/docs/angular-properties.test.ts
import { readdirSync } from 'node:fs'; import { join } from 'node:path'; import { describe, expect, it } from 'vitest'; // File hierarchy: __testfixtures__ / some-test-case / input.* const inputRegExp = /^input\..*$/; describe('angular component properties', () => { const fixturesDir = join(__dirname, '__testfixtu...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/docs/sourceDecorator.ts
code/frameworks/angular/src/client/docs/sourceDecorator.ts
import { SourceType } from 'storybook/internal/docs-tools'; import { useRef, emitTransformCode, useEffect } from 'storybook/preview-api'; import type { ArgsStoryFn, PartialStoryFn } from 'storybook/internal/types'; import { computesTemplateSourceFromComponent } from '../../renderer'; import type { AngularRenderer, Sto...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts
code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck import type { ElementRef } from '@angular/core'; import { Component, EventEmitter, HostBinding, HostListener, Input, Output, ViewChild, } from '@angular/core'; export const exportedConstant = 'An exported constant'; export typ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/RendererFactory.ts
code/frameworks/angular/src/client/angular-beta/RendererFactory.ts
import { AbstractRenderer } from './AbstractRenderer'; import { CanvasRenderer } from './CanvasRenderer'; import { DocsRenderer } from './DocsRenderer'; type RenderType = 'canvas' | 'docs'; export class RendererFactory { private lastRenderType: RenderType; private rendererMap = new Map<string, AbstractRenderer>()...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/DocsRenderer.ts
code/frameworks/angular/src/client/angular-beta/DocsRenderer.ts
import { DOCS_RENDERED, STORY_CHANGED } from 'storybook/internal/core-events'; import { addons } from 'storybook/preview-api'; import type { Parameters, StoryFnAngularReturnType } from '../types'; import { AbstractRenderer, STORY_UID_ATTRIBUTE } from './AbstractRenderer'; import { getNextStoryUID } from './utils/Story...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.ts
code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.ts
import type { ArgTypes } from 'storybook/internal/types'; import type { Type } from '@angular/core'; import type { ICollection } from '../types'; import type { ComponentInputsOutputs } from './utils/NgComponentAnalyzer'; import { getComponentDecoratorMetadata, getComponentInputsOutputs, } from './utils/NgComponen...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/frameworks/angular/src/client/angular-beta/StorybookWrapperComponent.ts
code/frameworks/angular/src/client/angular-beta/StorybookWrapperComponent.ts
import type { AfterViewInit, ElementRef, OnDestroy, Type } from '@angular/core'; import { ChangeDetectorRef, Component, Inject, NgModule, ViewChild, ViewContainerRef, } from '@angular/core'; import type { Subject, Subscription } from 'rxjs'; import { map, skip } from 'rxjs/operators'; import type { ICollec...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false