Skip to content

Commit

Permalink
drop the /dist part
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jun 19, 2024
1 parent 6263439 commit e35b884
Show file tree
Hide file tree
Showing 623 changed files with 1,215 additions and 1,032 deletions.
2 changes: 1 addition & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -5616,7 +5616,7 @@ Also, here's the error you'll get if you're running an older version of React:
```

core.browser.esm.js:15 Uncaught TypeError: Object(...) is not a function
at Module../node_modules/@emotion/core/dist/core.browser.esm.js (core.browser.esm.js:15)
at Module../node_modules/@emotion/core/core.browser.esm.js (core.browser.esm.js:15)
at **webpack_require** (bootstrap:724)
at fn (bootstrap:101)
at Module../node_modules/@emotion/styled-base/dist/styled-base.browser.esm.js (styled-base.browser.esm.js:1)
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/src/a11yRunner.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Mock } from 'vitest';
import { describe, beforeEach, it, expect, vi } from 'vitest';
import { addons } from '@storybook/core/dist/preview-api';
import { addons } from '@storybook/core/preview-api';
import { EVENTS } from './constants';

vi.mock('@storybook/core/dist/preview-api');
vi.mock('@storybook/core/preview-api');
const mockedAddons = vi.mocked(addons);

describe('a11yRunner', () => {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/a11yRunner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { global } from '@storybook/global';
import { addons } from '@storybook/core/dist/preview-api';
import { addons } from '@storybook/core/preview-api';
import { EVENTS } from './constants';
import type { A11yParameters } from './params';

Expand Down
6 changes: 3 additions & 3 deletions code/addons/a11y/src/components/A11YPanel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { describe, beforeEach, afterEach, it, expect, vi } from 'vitest';
import React from 'react';
import { render, waitFor, fireEvent, act, cleanup } from '@testing-library/react';

import { ThemeProvider, themes, convert } from '@storybook/core/dist/theming';
import * as api from '@storybook/core/dist/manager-api';
import { ThemeProvider, themes, convert } from '@storybook/core/theming';
import * as api from '@storybook/core/manager-api';

import { A11YPanel } from './A11YPanel';
import { EVENTS } from '../constants';

vi.mock('@storybook/core/dist/manager-api');
vi.mock('@storybook/core/manager-api');

global.ResizeObserver = require('resize-observer-polyfill');

Expand Down
6 changes: 3 additions & 3 deletions code/addons/a11y/src/components/A11YPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useCallback, useMemo, useState } from 'react';

import { styled } from '@storybook/core/dist/theming';
import { styled } from '@storybook/core/theming';

import { ActionBar, ScrollArea } from '@storybook/core/dist/components';
import { ActionBar, ScrollArea } from '@storybook/core/components';
import { SyncIcon, CheckIcon } from '@storybook/icons';

import type { AxeResults } from 'axe-core';
Expand All @@ -11,7 +11,7 @@ import {
useParameter,
useStorybookApi,
useStorybookState,
} from '@storybook/core/dist/manager-api';
} from '@storybook/core/manager-api';

import { Report } from './Report';

Expand Down
6 changes: 3 additions & 3 deletions code/addons/a11y/src/components/A11yContext.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { describe, beforeEach, afterEach, it, expect, vi } from 'vitest';
import * as React from 'react';
import type { AxeResults } from 'axe-core';
import { render, act, cleanup } from '@testing-library/react';
import * as api from '@storybook/core/dist/manager-api';
import { STORY_CHANGED } from '@storybook/core/dist/core-events';
import * as api from '@storybook/core/manager-api';
import { STORY_CHANGED } from '@storybook/core/core-events';
import { HIGHLIGHT } from '@storybook/addon-highlight';

import { A11yContextProvider, useA11yContext } from './A11yContext';
import { EVENTS } from '../constants';

vi.mock('@storybook/core/dist/manager-api');
vi.mock('@storybook/core/manager-api');
const mockedApi = vi.mocked(api);

const storyId = 'jest';
Expand Down
6 changes: 3 additions & 3 deletions code/addons/a11y/src/components/A11yContext.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';
import { themes, convert } from '@storybook/core/dist/theming';
import { themes, convert } from '@storybook/core/theming';
import type { Result } from 'axe-core';
import { useChannel, useAddonState, useStorybookApi } from '@storybook/core/dist/manager-api';
import { STORY_CHANGED, STORY_RENDERED } from '@storybook/core/dist/core-events';
import { useChannel, useAddonState, useStorybookApi } from '@storybook/core/manager-api';
import { STORY_CHANGED, STORY_RENDERED } from '@storybook/core/core-events';
import { HIGHLIGHT } from '@storybook/addon-highlight';
import { ADDON_ID, EVENTS } from '../constants';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/Elements.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';
import React from 'react';

import { styled } from '@storybook/core/dist/theming';
import { styled } from '@storybook/core/theming';

import type { NodeResult } from 'axe-core';
import { Rules } from './Rules';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/HighlightToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { styled } from '@storybook/core/dist/theming';
import { styled } from '@storybook/core/theming';

import type { NodeResult } from 'axe-core';
import { useA11yContext } from '../A11yContext';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/Info.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';
import React from 'react';

import { styled } from '@storybook/core/dist/theming';
import { styled } from '@storybook/core/theming';
import type { Result } from 'axe-core';

const Wrapper = styled.div({
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/Item.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Fragment, useState } from 'react';

import { styled } from '@storybook/core/dist/theming';
import { styled } from '@storybook/core/theming';

import type { Result } from 'axe-core';
import { Info } from './Info';
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/src/components/Report/Rules.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';
import React from 'react';
import { styled } from '@storybook/core/dist/theming';
import { Badge } from '@storybook/core/dist/components';
import { styled } from '@storybook/core/theming';
import { Badge } from '@storybook/core/components';
import type { CheckResult } from 'axe-core';
import { useResizeDetector } from 'react-resize-detector';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/Tags.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';
import React from 'react';

import { styled } from '@storybook/core/dist/theming';
import { styled } from '@storybook/core/theming';
import type { TagValue } from 'axe-core';

const Wrapper = styled.div({
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Report/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC } from 'react';
import React, { Fragment } from 'react';
import { EmptyTabContent } from '@storybook/core/dist/components';
import { EmptyTabContent } from '@storybook/core/components';
import type { Result } from 'axe-core';

import { Item } from './Item';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import { styled } from '@storybook/core/dist/theming';
import { styled } from '@storybook/core/theming';
import type { NodeResult, Result } from 'axe-core';
import { useResizeDetector } from 'react-resize-detector';
import HighlightToggle from './Report/HighlightToggle';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/components/VisionSimulator.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { describe, it, expect } from 'vitest';
import React from 'react';
import { render, fireEvent, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { ThemeProvider, themes, convert } from '@storybook/core/dist/theming';
import { ThemeProvider, themes, convert } from '@storybook/core/theming';
import { VisionSimulator, baseList } from './VisionSimulator';

const getOptionByNameAndPercentage = (option: string, percentage?: number) =>
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/src/components/VisionSimulator.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ReactNode } from 'react';
import React, { useState } from 'react';
import { Global, styled } from '@storybook/core/dist/theming';
import { IconButton, WithTooltip, TooltipLinkList } from '@storybook/core/dist/components';
import { Global, styled } from '@storybook/core/theming';
import { IconButton, WithTooltip, TooltipLinkList } from '@storybook/core/components';

import { AccessibilityIcon } from '@storybook/icons';
import { Filters } from './ColorFilters';
Expand Down
6 changes: 3 additions & 3 deletions code/addons/a11y/src/manager.test.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// @vitest-environment happy-dom

import { describe, it, expect, vi } from 'vitest';
import * as api from '@storybook/core/dist/manager-api';
import type { Addon_BaseType } from '@storybook/core/dist/types';
import * as api from '@storybook/core/manager-api';
import type { Addon_BaseType } from '@storybook/core/types';
import { PANEL_ID } from './constants';
import './manager';

vi.mock('@storybook/core/dist/manager-api');
vi.mock('@storybook/core/manager-api');
const mockedApi = vi.mocked<api.API>(api as any);
mockedApi.useAddonState = vi.fn();
const mockedAddons = vi.mocked(api.addons);
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/src/manager.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { addons, types, useAddonState } from '@storybook/core/dist/manager-api';
import { Badge, Spaced } from '@storybook/core/dist/components';
import { addons, types, useAddonState } from '@storybook/core/manager-api';
import { Badge, Spaced } from '@storybook/core/components';
import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants';
import { VisionSimulator } from './components/VisionSimulator';
import { A11YPanel } from './components/A11YPanel';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/src/addArgs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ArgsEnhancer } from '@storybook/core/dist/types';
import type { ArgsEnhancer } from '@storybook/core/types';
import { addActionsFromArgTypes, inferActionsFromArgTypesRegex } from './addArgsHelpers';

export const argsEnhancers: ArgsEnhancer[] = [
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/src/addArgsHelpers.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest';
import type { StoryContext } from '@storybook/core/dist/types';
import type { StoryContext } from '@storybook/core/types';
import { inferActionsFromArgTypesRegex, addActionsFromArgTypes } from './addArgsHelpers';

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

// interface ActionsParameter {
Expand Down
6 changes: 3 additions & 3 deletions code/addons/actions/src/components/ActionLogger/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { ElementRef, ReactNode } from 'react';
import React, { forwardRef, Fragment, useEffect, useRef } from 'react';
import type { Theme } from '@storybook/core/dist/theming';
import { styled, withTheme } from '@storybook/core/dist/theming';
import type { Theme } from '@storybook/core/theming';
import { styled, withTheme } from '@storybook/core/theming';

import { Inspector } from 'react-inspector';
import { ActionBar, ScrollArea } from '@storybook/core/dist/components';
import { ActionBar, ScrollArea } from '@storybook/core/components';

import { Action, Counter, InspectorContainer } from './style';
import type { ActionDisplay } from '../../models';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/src/components/ActionLogger/style.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@storybook/core/dist/theming';
import { styled } from '@storybook/core/theming';
import { opacify } from 'polished';

export const Action = styled.div({
Expand Down
4 changes: 2 additions & 2 deletions code/addons/actions/src/containers/ActionLogger/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Component } from 'react';
import { dequal as deepEqual } from 'dequal';

import type { API } from '@storybook/core/dist/manager-api';
import { STORY_CHANGED } from '@storybook/core/dist/core-events';
import type { API } from '@storybook/core/manager-api';
import { STORY_CHANGED } from '@storybook/core/core-events';

import { ActionLogger as ActionLoggerComponent } from '../../components/ActionLogger';
import type { ActionDisplay } from '../../models';
Expand Down
4 changes: 2 additions & 2 deletions code/addons/actions/src/decorator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { global } from '@storybook/global';
import { useEffect, makeDecorator } from '@storybook/core/dist/preview-api';
import type { PartialStoryFn, Renderer } from '@storybook/core/dist/types';
import { useEffect, makeDecorator } from '@storybook/core/preview-api';
import type { PartialStoryFn, Renderer } from '@storybook/core/types';
import { actions } from './runtime/actions';

import { PARAM_KEY } from './constants';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/src/loaders.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-underscore-dangle */
import type { LoaderFunction } from '@storybook/core/dist/types';
import type { LoaderFunction } from '@storybook/core/types';
import { global } from '@storybook/global';
import type { onMockCall as onMockCallType } from '@storybook/test';
import { action } from './runtime';
Expand Down
6 changes: 3 additions & 3 deletions code/addons/actions/src/manager.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { addons, types, useAddonState, useChannel } from '@storybook/core/dist/manager-api';
import { STORY_CHANGED } from '@storybook/core/dist/core-events';
import { Badge, Spaced } from '@storybook/core/dist/components';
import { addons, types, useAddonState, useChannel } from '@storybook/core/manager-api';
import { STORY_CHANGED } from '@storybook/core/core-events';
import { Badge, Spaced } from '@storybook/core/components';
import ActionLogger from './containers/ActionLogger';
import { ADDON_ID, CLEAR_ID, EVENT_ID, PANEL_ID, PARAM_KEY } from './constants';

Expand Down
4 changes: 2 additions & 2 deletions code/addons/actions/src/runtime/__tests__/action.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { describe, it, expect, vi } from 'vitest';
import { addons } from '@storybook/core/dist/preview-api';
import { addons } from '@storybook/core/preview-api';
import { action, configureActions } from '../..';

vi.mock('@storybook/core/dist/preview-api');
vi.mock('@storybook/core/preview-api');

const createChannel = () => {
const channel = { emit: vi.fn() };
Expand Down
4 changes: 2 additions & 2 deletions code/addons/actions/src/runtime/__tests__/actions.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { describe, it, expect, vi } from 'vitest';
import { addons } from '@storybook/core/dist/preview-api';
import { addons } from '@storybook/core/preview-api';
import { actions } from '../..';

vi.mock('@storybook/core/dist/preview-api');
vi.mock('@storybook/core/preview-api');

const createChannel = () => {
const channel = { emit: vi.fn() };
Expand Down
8 changes: 4 additions & 4 deletions code/addons/actions/src/runtime/action.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { v4 as uuidv4 } from 'uuid';
import type { PreviewWeb } from '@storybook/core/dist/preview-api';
import { addons } from '@storybook/core/dist/preview-api';
import type { Renderer } from '@storybook/core/dist/types';
import type { PreviewWeb } from '@storybook/core/preview-api';
import { addons } from '@storybook/core/preview-api';
import type { Renderer } from '@storybook/core/types';
import { global } from '@storybook/global';
import { ImplicitActionsDuringRendering } from '@storybook/core/dist/preview-errors';
import { ImplicitActionsDuringRendering } from '@storybook/core/preview-errors';
import { EVENT_ID } from '../constants';
import type { ActionDisplay, ActionOptions, HandlerFunction } from '../models';
import { config } from './configureActions';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
declare var FEATURES: import('@storybook/core/dist/types').StorybookConfigRaw['features'];
declare var FEATURES: import('@storybook/core/types').StorybookConfigRaw['features'];
2 changes: 1 addition & 1 deletion code/addons/backgrounds/src/components/ColorIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@storybook/core/dist/theming';
import { styled } from '@storybook/core/theming';

export const ColorIcon = styled.span(
({ background }: { background: string }) => ({
Expand Down
6 changes: 3 additions & 3 deletions code/addons/backgrounds/src/containers/BackgroundSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { FC } from 'react';
import React, { useState, Fragment, useCallback, useMemo, memo } from 'react';
import memoize from 'memoizerific';

import { useParameter, useGlobals } from '@storybook/core/dist/manager-api';
import { logger } from '@storybook/core/dist/client-logger';
import { IconButton, WithTooltip, TooltipLinkList } from '@storybook/core/dist/components';
import { useParameter, useGlobals } from '@storybook/core/manager-api';
import { logger } from '@storybook/core/client-logger';
import { IconButton, WithTooltip, TooltipLinkList } from '@storybook/core/components';

import { PhotoIcon } from '@storybook/icons';
import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants';
Expand Down
4 changes: 2 additions & 2 deletions code/addons/backgrounds/src/containers/GridSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { FC } from 'react';
import React, { memo } from 'react';

import { useGlobals, useParameter } from '@storybook/core/dist/manager-api';
import { IconButton } from '@storybook/core/dist/components';
import { useGlobals, useParameter } from '@storybook/core/manager-api';
import { IconButton } from '@storybook/core/components';

import { GridIcon } from '@storybook/icons';
import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants';
Expand Down
4 changes: 2 additions & 2 deletions code/addons/backgrounds/src/decorators/withBackground.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useMemo, useEffect } from '@storybook/core/dist/preview-api';
import { useMemo, useEffect } from '@storybook/core/preview-api';
import type {
Renderer,
PartialStoryFn as StoryFunction,
StoryContext,
} from '@storybook/core/dist/types';
} from '@storybook/core/types';

import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants';
import {
Expand Down
4 changes: 2 additions & 2 deletions code/addons/backgrounds/src/decorators/withGrid.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useMemo, useEffect } from '@storybook/core/dist/preview-api';
import { useMemo, useEffect } from '@storybook/core/preview-api';
import type {
Renderer,
PartialStoryFn as StoryFunction,
StoryContext,
} from '@storybook/core/dist/types';
} from '@storybook/core/types';

import { clearStyles, addGridStyle } from '../helpers';
import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/src/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { global } from '@storybook/global';
import { dedent } from 'ts-dedent';

import { logger } from '@storybook/core/dist/client-logger';
import { logger } from '@storybook/core/client-logger';

import type { Background } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/src/manager.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Fragment } from 'react';
import { addons, types } from '@storybook/core/dist/manager-api';
import { addons, types } from '@storybook/core/manager-api';

import { ADDON_ID } from './constants';
import { BackgroundSelector } from './containers/BackgroundSelector';
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/src/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Addon_DecoratorFunction } from '@storybook/core/dist/types';
import type { Addon_DecoratorFunction } from '@storybook/core/types';
import { withBackground } from './decorators/withBackground';
import { withGrid } from './decorators/withGrid';
import { PARAM_KEY } from './constants';
Expand Down
Loading

0 comments on commit e35b884

Please sign in to comment.