creevey 0.8.1 → 0.8.2-fix-wait.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/lib/cjs/client/web/32.js +1 -1
  2. package/lib/cjs/client/web/551.js +1 -1
  3. package/lib/cjs/client/web/691.js +1 -1
  4. package/lib/cjs/client/web/725.js +1 -1
  5. package/lib/cjs/client/web/main.js +1 -1
  6. package/lib/cjs/server/selenium/browser.js +1 -1
  7. package/lib/esm/server/selenium/browser.js +1 -1
  8. package/lib/types/cli.d.ts +1 -1
  9. package/lib/types/client/addon/Manager.d.ts +37 -37
  10. package/lib/types/client/addon/components/Addon.d.ts +8 -8
  11. package/lib/types/client/addon/components/Icons.d.ts +7 -7
  12. package/lib/types/client/addon/components/Panel.d.ts +9 -9
  13. package/lib/types/client/addon/components/TestSelect.d.ts +8 -8
  14. package/lib/types/client/addon/components/Tools.d.ts +6 -6
  15. package/lib/types/client/addon/decorator.d.ts +1 -1
  16. package/lib/types/client/addon/index.d.ts +2 -2
  17. package/lib/types/client/addon/preset.d.ts +23 -23
  18. package/lib/types/client/addon/preset.ie11.d.ts +10 -10
  19. package/lib/types/client/addon/readyForCapture.d.ts +6 -6
  20. package/lib/types/client/addon/register.d.ts +3 -3
  21. package/lib/types/client/addon/utils.d.ts +3 -3
  22. package/lib/types/client/addon/withCreevey.d.ts +24 -24
  23. package/lib/types/client/shared/components/ImagesView/BlendView.d.ts +3 -3
  24. package/lib/types/client/shared/components/ImagesView/ImagesView.d.ts +24 -24
  25. package/lib/types/client/shared/components/ImagesView/SideBySideView.d.ts +3 -3
  26. package/lib/types/client/shared/components/ImagesView/SlideView.d.ts +3 -3
  27. package/lib/types/client/shared/components/ImagesView/SwapView.d.ts +3 -3
  28. package/lib/types/client/shared/components/ImagesView/index.d.ts +5 -5
  29. package/lib/types/client/shared/components/PageFooter/PageFooter.d.ts +8 -8
  30. package/lib/types/client/shared/components/PageFooter/Paging.d.ts +7 -7
  31. package/lib/types/client/shared/components/PageHeader/ImagePreview.d.ts +12 -12
  32. package/lib/types/client/shared/components/PageHeader/PageHeader.d.ts +16 -16
  33. package/lib/types/client/shared/components/ResultsPage.d.ts +18 -18
  34. package/lib/types/client/shared/creeveyClientApi.d.ts +9 -9
  35. package/lib/types/client/shared/helpers.d.ts +46 -46
  36. package/lib/types/client/shared/viewMode.d.ts +4 -4
  37. package/lib/types/client/web/CreeveyApp.d.ts +11 -11
  38. package/lib/types/client/web/CreeveyContext.d.ts +11 -11
  39. package/lib/types/client/web/CreeveyLoader.d.ts +2 -2
  40. package/lib/types/client/web/CreeveyView/SideBar/Checkbox.d.ts +19 -19
  41. package/lib/types/client/web/CreeveyView/SideBar/Search.d.ts +6 -6
  42. package/lib/types/client/web/CreeveyView/SideBar/SideBar.d.ts +14 -14
  43. package/lib/types/client/web/CreeveyView/SideBar/SideBarHeader.d.ts +12 -12
  44. package/lib/types/client/web/CreeveyView/SideBar/SuiteLink.d.ts +33 -33
  45. package/lib/types/client/web/CreeveyView/SideBar/TestLink.d.ts +7 -7
  46. package/lib/types/client/web/CreeveyView/SideBar/TestStatusIcon.d.ts +10 -10
  47. package/lib/types/client/web/CreeveyView/SideBar/TestsStatus.d.ts +9 -9
  48. package/lib/types/client/web/CreeveyView/SideBar/Toggle.d.ts +6 -6
  49. package/lib/types/client/web/CreeveyView/SideBar/index.d.ts +1 -1
  50. package/lib/types/client/web/KeyboardEventsContext.d.ts +13 -13
  51. package/lib/types/client/web/index.d.ts +4 -4
  52. package/lib/types/creevey.d.ts +1 -1
  53. package/lib/types/server/config.d.ts +4 -4
  54. package/lib/types/server/docker.d.ts +7 -7
  55. package/lib/types/server/extract.d.ts +2 -2
  56. package/lib/types/server/index.d.ts +2 -2
  57. package/lib/types/server/loaders/babel/creevey-plugin.d.ts +1 -1
  58. package/lib/types/server/loaders/babel/helpers.d.ts +19 -19
  59. package/lib/types/server/loaders/babel/register.d.ts +5 -5
  60. package/lib/types/server/loaders/hooks/mdx.d.ts +1 -1
  61. package/lib/types/server/loaders/hooks/svelte.d.ts +1 -1
  62. package/lib/types/server/loaders/webpack/compile.d.ts +2 -2
  63. package/lib/types/server/loaders/webpack/creevey-loader.d.ts +4 -4
  64. package/lib/types/server/loaders/webpack/dummy-hmr.d.ts +10 -10
  65. package/lib/types/server/loaders/webpack/mdx-loader.d.ts +6 -6
  66. package/lib/types/server/loaders/webpack/start.d.ts +1 -1
  67. package/lib/types/server/logger.d.ts +10 -10
  68. package/lib/types/server/master/api.d.ts +7 -7
  69. package/lib/types/server/master/index.d.ts +3 -3
  70. package/lib/types/server/master/master.d.ts +7 -7
  71. package/lib/types/server/master/pool.d.ts +31 -31
  72. package/lib/types/server/master/runner.d.ts +26 -26
  73. package/lib/types/server/master/server.d.ts +2 -2
  74. package/lib/types/server/messages.d.ts +29 -29
  75. package/lib/types/server/selenium/browser.d.ts +19 -19
  76. package/lib/types/server/selenium/index.d.ts +2 -2
  77. package/lib/types/server/selenium/selenoid.d.ts +3 -3
  78. package/lib/types/server/stories.d.ts +8 -8
  79. package/lib/types/server/storybook/entry.d.ts +17 -17
  80. package/lib/types/server/storybook/helpers.d.ts +24 -24
  81. package/lib/types/server/storybook/providers/browser.d.ts +2 -2
  82. package/lib/types/server/storybook/providers/nodejs.d.ts +6 -6
  83. package/lib/types/server/update.d.ts +2 -2
  84. package/lib/types/server/utils.d.ts +23 -23
  85. package/lib/types/server/worker/chai-image.d.ts +6 -6
  86. package/lib/types/server/worker/helpers.d.ts +8 -8
  87. package/lib/types/server/worker/index.d.ts +1 -1
  88. package/lib/types/server/worker/reporter.d.ts +8 -8
  89. package/lib/types/server/worker/worker.d.ts +4 -4
  90. package/lib/types/shared/index.d.ts +7 -7
  91. package/lib/types/shared/serializeRegExp.d.ts +9 -9
  92. package/lib/types/types.d.ts +486 -486
  93. package/package.json +1 -1
@@ -136,7 +136,7 @@ async function waitForStorybook(browser) {
136
136
  isTimeout = true;
137
137
  }, 60000);
138
138
 
139
- while (wait) {
139
+ while (wait !== false) {
140
140
  wait = await browser.executeAsyncScript(function (SET_STORIES, callback) {
141
141
  if (typeof window.__STORYBOOK_ADDONS_CHANNEL__ == 'undefined') return callback(true);
142
142
  if (window.__STORYBOOK_ADDONS_CHANNEL__.last(SET_STORIES) == undefined) return callback(true);
@@ -108,7 +108,7 @@ async function waitForStorybook(browser) {
108
108
  isTimeout = true;
109
109
  }, 60000);
110
110
 
111
- while (wait) {
111
+ while (wait !== false) {
112
112
  wait = await browser.executeAsyncScript(function (SET_STORIES, callback) {
113
113
  if (typeof window.__STORYBOOK_ADDONS_CHANNEL__ == 'undefined') return callback(true);
114
114
  if (window.__STORYBOOK_ADDONS_CHANNEL__.last(SET_STORIES) == undefined) return callback(true);
@@ -1 +1 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
@@ -1,37 +1,37 @@
1
- import { API } from '@storybook/api';
2
- import { denormalizeStoryParameters } from '../../shared';
3
- import { CreeveyStatus, CreeveyUpdate, TestData, TestStatus, StoriesRaw } from '../../types';
4
- import { CreeveyClientApi } from '../shared/creeveyClientApi';
5
- export declare class CreeveyManager {
6
- storybookApi: API;
7
- storyId: string;
8
- activeBrowser: string;
9
- selectedTestId: string;
10
- status: CreeveyStatus;
11
- creeveyApi: CreeveyClientApi | null;
12
- stories: StoriesRaw;
13
- updateStatusListeners: Array<(update: CreeveyUpdate) => void>;
14
- changeTestListeners: Array<(testId: string) => void>;
15
- constructor(storybookApi: API);
16
- initAll: () => Promise<void>;
17
- onUpdateStatus(listener: (update: CreeveyUpdate) => void): () => void;
18
- onChangeTest(listener: (testId: string) => void): () => void;
19
- handleCreeveyUpdate: (update: CreeveyUpdate) => void;
20
- getCurrentTest: () => TestData | undefined;
21
- onStoryRendered: (storyId: string) => void;
22
- onStart: () => void;
23
- onStop: () => void;
24
- onImageApprove: (id: string, retry: number, image: string) => void;
25
- onStartAllStoryTests: () => void;
26
- onStartAllTests: () => void;
27
- onSetStories: (data: Parameters<typeof denormalizeStoryParameters>['0']) => void;
28
- setActiveBrowser: (browser: string) => void;
29
- setSelectedTestId: (testId: string) => void;
30
- getStoryTests: (storyId: string) => TestData[];
31
- getBrowsers: () => string[];
32
- getTestsByStoryIdAndBrowser: (browser: string) => TestData[];
33
- getTabTitle: (browser: string) => string;
34
- setPanelsTitle: () => void;
35
- addStatusesToSideBar(): Promise<void>;
36
- addStatusToStoryName(name: string, status: TestStatus | undefined, skip: string | boolean): string;
37
- }
1
+ import { API } from '@storybook/api';
2
+ import { denormalizeStoryParameters } from '../../shared';
3
+ import { CreeveyStatus, CreeveyUpdate, TestData, TestStatus, StoriesRaw } from '../../types';
4
+ import { CreeveyClientApi } from '../shared/creeveyClientApi';
5
+ export declare class CreeveyManager {
6
+ storybookApi: API;
7
+ storyId: string;
8
+ activeBrowser: string;
9
+ selectedTestId: string;
10
+ status: CreeveyStatus;
11
+ creeveyApi: CreeveyClientApi | null;
12
+ stories: StoriesRaw;
13
+ updateStatusListeners: Array<(update: CreeveyUpdate) => void>;
14
+ changeTestListeners: Array<(testId: string) => void>;
15
+ constructor(storybookApi: API);
16
+ initAll: () => Promise<void>;
17
+ onUpdateStatus(listener: (update: CreeveyUpdate) => void): () => void;
18
+ onChangeTest(listener: (testId: string) => void): () => void;
19
+ handleCreeveyUpdate: (update: CreeveyUpdate) => void;
20
+ getCurrentTest: () => TestData | undefined;
21
+ onStoryRendered: (storyId: string) => void;
22
+ onStart: () => void;
23
+ onStop: () => void;
24
+ onImageApprove: (id: string, retry: number, image: string) => void;
25
+ onStartAllStoryTests: () => void;
26
+ onStartAllTests: () => void;
27
+ onSetStories: (data: Parameters<typeof denormalizeStoryParameters>['0']) => void;
28
+ setActiveBrowser: (browser: string) => void;
29
+ setSelectedTestId: (testId: string) => void;
30
+ getStoryTests: (storyId: string) => TestData[];
31
+ getBrowsers: () => string[];
32
+ getTestsByStoryIdAndBrowser: (browser: string) => TestData[];
33
+ getTabTitle: (browser: string) => string;
34
+ setPanelsTitle: () => void;
35
+ addStatusesToSideBar(): Promise<void>;
36
+ addStatusToStoryName(name: string, status: TestStatus | undefined, skip: string | boolean): string;
37
+ }
@@ -1,8 +1,8 @@
1
- import { CreeveyManager } from '../Manager';
2
- interface AddonProps {
3
- active?: boolean;
4
- browser: string;
5
- manager: CreeveyManager;
6
- }
7
- export declare const Addon: ({ active, browser, manager }: AddonProps) => JSX.Element | null;
8
- export {};
1
+ import { CreeveyManager } from '../Manager';
2
+ interface AddonProps {
3
+ active?: boolean;
4
+ browser: string;
5
+ manager: CreeveyManager;
6
+ }
7
+ export declare const Addon: ({ active, browser, manager }: AddonProps) => JSX.Element | null;
8
+ export {};
@@ -1,7 +1,7 @@
1
- interface IconProps {
2
- width?: number;
3
- height?: number;
4
- }
5
- export declare const NextIcon: ({ width, height }: IconProps) => JSX.Element;
6
- export declare const ForwardIcon: ({ width, height }: IconProps) => JSX.Element;
7
- export {};
1
+ interface IconProps {
2
+ width?: number;
3
+ height?: number;
4
+ }
5
+ export declare const NextIcon: ({ width, height }: IconProps) => JSX.Element;
6
+ export declare const ForwardIcon: ({ width, height }: IconProps) => JSX.Element;
7
+ export {};
@@ -1,9 +1,9 @@
1
- import { TestData } from '../../../types';
2
- interface PanelProps {
3
- tests: TestData[];
4
- selectedTestId: string;
5
- onChangeTest: (testId: string) => void;
6
- onImageApprove: (id: string, retry: number, image: string) => void;
7
- }
8
- export declare const Panel: ({ tests, selectedTestId, onChangeTest, onImageApprove }: PanelProps) => JSX.Element;
9
- export {};
1
+ import { TestData } from '../../../types';
2
+ interface PanelProps {
3
+ tests: TestData[];
4
+ selectedTestId: string;
5
+ onChangeTest: (testId: string) => void;
6
+ onImageApprove: (id: string, retry: number, image: string) => void;
7
+ }
8
+ export declare const Panel: ({ tests, selectedTestId, onChangeTest, onImageApprove }: PanelProps) => JSX.Element;
9
+ export {};
@@ -1,8 +1,8 @@
1
- import { TestData } from '../../../types';
2
- interface TestSelectProps {
3
- tests: TestData[];
4
- selectedTestId: string;
5
- onChangeTest: (testId: string) => void;
6
- }
7
- export default function TestSelect(props: TestSelectProps): JSX.Element;
8
- export {};
1
+ import { TestData } from '../../../types';
2
+ interface TestSelectProps {
3
+ tests: TestData[];
4
+ selectedTestId: string;
5
+ onChangeTest: (testId: string) => void;
6
+ }
7
+ export default function TestSelect(props: TestSelectProps): JSX.Element;
8
+ export {};
@@ -1,6 +1,6 @@
1
- import { CreeveyManager } from '../Manager';
2
- interface ToolsProps {
3
- manager: CreeveyManager;
4
- }
5
- export declare const Tools: ({ manager }: ToolsProps) => JSX.Element | null;
6
- export {};
1
+ import { CreeveyManager } from '../Manager';
2
+ interface ToolsProps {
3
+ manager: CreeveyManager;
4
+ }
5
+ export declare const Tools: ({ manager }: ToolsProps) => JSX.Element | null;
6
+ export {};
@@ -1 +1 @@
1
- export declare const decorators: import("@storybook/addons").MakeDecoratorResult[];
1
+ export declare const decorators: import("@storybook/addons").MakeDecoratorResult[];
@@ -1,2 +1,2 @@
1
- export * from './withCreevey';
2
- export * from './readyForCapture';
1
+ export * from './withCreevey';
2
+ export * from './readyForCapture';
@@ -1,23 +1,23 @@
1
- import { Configuration } from 'webpack';
2
- export declare function config(entry?: string[]): string[];
3
- export declare function managerEntries(entry?: string[]): string[];
4
- declare global {
5
- const __CREEVEY_SERVER_HOST__: string;
6
- const __CREEVEY_SERVER_PORT__: number;
7
- const __CREEVEY_CLIENT_PORT__: number | null;
8
- }
9
- export interface CreeveyAddonOptions {
10
- creeveyConfigPath?: string;
11
- creeveyPreExtract?: string;
12
- creeveyHost?: string;
13
- creeveyPort?: number;
14
- clientPort?: number;
15
- configType: string;
16
- configDir: string;
17
- outputDir: string;
18
- skipExtract?: boolean;
19
- presets?: {
20
- apply: <T>(preset: string) => Promise<T | undefined>;
21
- };
22
- }
23
- export declare function managerWebpack(config: Configuration, options: CreeveyAddonOptions): Promise<Configuration>;
1
+ import { Configuration } from 'webpack';
2
+ export declare function config(entry?: string[]): string[];
3
+ export declare function managerEntries(entry?: string[]): string[];
4
+ declare global {
5
+ const __CREEVEY_SERVER_HOST__: string;
6
+ const __CREEVEY_SERVER_PORT__: number;
7
+ const __CREEVEY_CLIENT_PORT__: number | null;
8
+ }
9
+ export interface CreeveyAddonOptions {
10
+ creeveyConfigPath?: string;
11
+ creeveyPreExtract?: string;
12
+ creeveyHost?: string;
13
+ creeveyPort?: number;
14
+ clientPort?: number;
15
+ configType: string;
16
+ configDir: string;
17
+ outputDir: string;
18
+ skipExtract?: boolean;
19
+ presets?: {
20
+ apply: <T>(preset: string) => Promise<T | undefined>;
21
+ };
22
+ }
23
+ export declare function managerWebpack(config: Configuration, options: CreeveyAddonOptions): Promise<Configuration>;
@@ -1,10 +1,10 @@
1
- import type { Configuration } from 'webpack';
2
- import { PluginItem } from '@babel/core';
3
- interface BabelOptions {
4
- extends: string | null;
5
- presets: PluginItem[] | null;
6
- }
7
- export declare const babel: (config: BabelOptions) => BabelOptions;
8
- export declare const managerWebpack: (webpackConfig?: Configuration) => Configuration;
9
- export declare const webpack: (webpackConfig?: Configuration) => Configuration;
10
- export {};
1
+ import type { Configuration } from 'webpack';
2
+ import { PluginItem } from '@babel/core';
3
+ interface BabelOptions {
4
+ extends: string | null;
5
+ presets: PluginItem[] | null;
6
+ }
7
+ export declare const babel: (config: BabelOptions) => BabelOptions;
8
+ export declare const managerWebpack: (webpackConfig?: Configuration) => Configuration;
9
+ export declare const webpack: (webpackConfig?: Configuration) => Configuration;
10
+ export {};
@@ -1,6 +1,6 @@
1
- declare global {
2
- interface Window {
3
- __CREEVEY_SET_READY_FOR_CAPTURE__?: () => void;
4
- }
5
- }
6
- export declare function readyForCapture(): void;
1
+ declare global {
2
+ interface Window {
3
+ __CREEVEY_SET_READY_FOR_CAPTURE__?: () => void;
4
+ }
5
+ }
6
+ export declare function readyForCapture(): void;
@@ -1,3 +1,3 @@
1
- import { API } from '@storybook/api';
2
- export declare const ADDON_ID = "creevey";
3
- export declare function registerCreeveyPanels(storybookApi: API): Promise<void>;
1
+ import { API } from '@storybook/api';
2
+ export declare const ADDON_ID = "creevey";
3
+ export declare function registerCreeveyPanels(storybookApi: API): Promise<void>;
@@ -1,3 +1,3 @@
1
- import { TestStatus } from '../../types';
2
- export declare function getEmojiByTestStatus(status: TestStatus | undefined, skip?: string | boolean): string;
3
- export declare const isInternetExplorer: boolean;
1
+ import { TestStatus } from '../../types';
2
+ export declare function getEmojiByTestStatus(status: TestStatus | undefined, skip?: string | boolean): string;
3
+ export declare const isInternetExplorer: boolean;
@@ -1,24 +1,24 @@
1
- import type { PreviewWeb } from '@storybook/preview-web';
2
- import type { AnyFramework } from '@storybook/csf';
3
- import type { StoryStore } from '@storybook/client-api';
4
- import { MakeDecoratorResult, Channel } from '@storybook/addons';
5
- import { CaptureOptions, StoriesRaw, StorybookGlobals } from '../../types';
6
- declare global {
7
- interface Window {
8
- __CREEVEY_SERVER_HOST__: string;
9
- __CREEVEY_SERVER_PORT__: number;
10
- __CREEVEY_WORKER_ID__: number;
11
- __CREEVEY_GET_STORIES__: () => Promise<StoriesRaw | void>;
12
- __CREEVEY_SELECT_STORY__: (storyId: string, kind: string, name: string, shouldWaitForReady: boolean, callback: (response: [error?: string | null, isCaptureCalled?: boolean]) => void) => Promise<void>;
13
- __CREEVEY_UPDATE_GLOBALS__: (globals: StorybookGlobals) => void;
14
- __CREEVEY_INSERT_IGNORE_STYLES__: (ignoreElements: string[]) => HTMLStyleElement;
15
- __CREEVEY_REMOVE_IGNORE_STYLES__: (ignoreStyles: HTMLStyleElement) => void;
16
- __CREEVEY_HAS_PLAY_COMPLETED_YET__: (callback: (isPlayCompleted: boolean) => void) => void;
17
- __CREEVEY_SET_READY_FOR_CAPTURE__?: () => void;
18
- __STORYBOOK_ADDONS_CHANNEL__: Channel;
19
- __STORYBOOK_STORY_STORE__: StoryStore<AnyFramework>;
20
- __STORYBOOK_PREVIEW__: PreviewWeb<AnyFramework>;
21
- }
22
- }
23
- export declare function withCreevey(): MakeDecoratorResult;
24
- export declare function capture(options?: CaptureOptions): Promise<void>;
1
+ import type { PreviewWeb } from '@storybook/preview-web';
2
+ import type { AnyFramework } from '@storybook/csf';
3
+ import type { StoryStore } from '@storybook/client-api';
4
+ import { MakeDecoratorResult, Channel } from '@storybook/addons';
5
+ import { CaptureOptions, StoriesRaw, StorybookGlobals } from '../../types';
6
+ declare global {
7
+ interface Window {
8
+ __CREEVEY_SERVER_HOST__: string;
9
+ __CREEVEY_SERVER_PORT__: number;
10
+ __CREEVEY_WORKER_ID__: number;
11
+ __CREEVEY_GET_STORIES__: () => Promise<StoriesRaw | void>;
12
+ __CREEVEY_SELECT_STORY__: (storyId: string, kind: string, name: string, shouldWaitForReady: boolean, callback: (response: [error?: string | null, isCaptureCalled?: boolean]) => void) => Promise<void>;
13
+ __CREEVEY_UPDATE_GLOBALS__: (globals: StorybookGlobals) => void;
14
+ __CREEVEY_INSERT_IGNORE_STYLES__: (ignoreElements: string[]) => HTMLStyleElement;
15
+ __CREEVEY_REMOVE_IGNORE_STYLES__: (ignoreStyles: HTMLStyleElement) => void;
16
+ __CREEVEY_HAS_PLAY_COMPLETED_YET__: (callback: (isPlayCompleted: boolean) => void) => void;
17
+ __CREEVEY_SET_READY_FOR_CAPTURE__?: () => void;
18
+ __STORYBOOK_ADDONS_CHANNEL__: Channel;
19
+ __STORYBOOK_STORY_STORE__: StoryStore<AnyFramework>;
20
+ __STORYBOOK_PREVIEW__: PreviewWeb<AnyFramework>;
21
+ }
22
+ }
23
+ export declare function withCreevey(): MakeDecoratorResult;
24
+ export declare function capture(options?: CaptureOptions): Promise<void>;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { ViewPropsWithTheme } from './ImagesView';
3
- export declare const BlendView: React.FC<import("@storybook/theming").AddOptionalTo<ViewPropsWithTheme, "theme">>;
1
+ import React from 'react';
2
+ import { ViewPropsWithTheme } from './ImagesView';
3
+ export declare const BlendView: React.FC<import("@storybook/theming").AddOptionalTo<ViewPropsWithTheme, "theme">>;
@@ -1,24 +1,24 @@
1
- import { Images, ImagesViewMode } from '../../../../types';
2
- import { Theme } from '@storybook/theming';
3
- export declare const themeBorderColors: {
4
- actual: string;
5
- expect: string;
6
- diff: string;
7
- };
8
- export declare function getBorderColor(theme: Theme, color: string): string;
9
- interface ViewProps {
10
- actual: string;
11
- diff: string;
12
- expect: string;
13
- }
14
- export interface ViewPropsWithTheme extends ViewProps {
15
- theme: Theme;
16
- }
17
- interface ImagesViewProps {
18
- url: string;
19
- image: Images;
20
- canApprove: boolean;
21
- mode: ImagesViewMode;
22
- }
23
- export declare function ImagesView({ url, image, canApprove, mode }: ImagesViewProps): JSX.Element;
24
- export {};
1
+ import { Images, ImagesViewMode } from '../../../../types';
2
+ import { Theme } from '@storybook/theming';
3
+ export declare const themeBorderColors: {
4
+ actual: string;
5
+ expect: string;
6
+ diff: string;
7
+ };
8
+ export declare function getBorderColor(theme: Theme, color: string): string;
9
+ interface ViewProps {
10
+ actual: string;
11
+ diff: string;
12
+ expect: string;
13
+ }
14
+ export interface ViewPropsWithTheme extends ViewProps {
15
+ theme: Theme;
16
+ }
17
+ interface ImagesViewProps {
18
+ url: string;
19
+ image: Images;
20
+ canApprove: boolean;
21
+ mode: ImagesViewMode;
22
+ }
23
+ export declare function ImagesView({ url, image, canApprove, mode }: ImagesViewProps): JSX.Element;
24
+ export {};
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { ViewPropsWithTheme } from './ImagesView';
3
- export declare const SideBySideView: React.FC<import("@storybook/theming").AddOptionalTo<ViewPropsWithTheme, "theme">>;
1
+ import React from 'react';
2
+ import { ViewPropsWithTheme } from './ImagesView';
3
+ export declare const SideBySideView: React.FC<import("@storybook/theming").AddOptionalTo<ViewPropsWithTheme, "theme">>;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { ViewPropsWithTheme } from './ImagesView';
3
- export declare const SlideView: React.FC<import("@storybook/theming").AddOptionalTo<ViewPropsWithTheme, "theme">>;
1
+ import React from 'react';
2
+ import { ViewPropsWithTheme } from './ImagesView';
3
+ export declare const SlideView: React.FC<import("@storybook/theming").AddOptionalTo<ViewPropsWithTheme, "theme">>;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { ViewPropsWithTheme } from './ImagesView';
3
- export declare const SwapView: React.FC<import("@storybook/theming").AddOptionalTo<ViewPropsWithTheme, "theme">>;
1
+ import React from 'react';
2
+ import { ViewPropsWithTheme } from './ImagesView';
3
+ export declare const SwapView: React.FC<import("@storybook/theming").AddOptionalTo<ViewPropsWithTheme, "theme">>;
@@ -1,5 +1,5 @@
1
- export { ImagesView } from './ImagesView';
2
- export { BlendView } from './BlendView';
3
- export { SideBySideView } from './SideBySideView';
4
- export { SlideView } from './SlideView';
5
- export { SwapView } from './SwapView';
1
+ export { ImagesView } from './ImagesView';
2
+ export { BlendView } from './BlendView';
3
+ export { SideBySideView } from './SideBySideView';
4
+ export { SlideView } from './SlideView';
5
+ export { SwapView } from './SwapView';
@@ -1,8 +1,8 @@
1
- export interface PageFooterProps {
2
- canApprove: boolean;
3
- retriesCount: number;
4
- retry: number;
5
- onRetryChange: (retry: number) => void;
6
- onApprove: () => void;
7
- }
8
- export declare function PageFooter({ canApprove, retriesCount, retry, onRetryChange, onApprove, }: PageFooterProps): JSX.Element;
1
+ export interface PageFooterProps {
2
+ canApprove: boolean;
3
+ retriesCount: number;
4
+ retry: number;
5
+ onRetryChange: (retry: number) => void;
6
+ onApprove: () => void;
7
+ }
8
+ export declare function PageFooter({ canApprove, retriesCount, retry, onRetryChange, onApprove, }: PageFooterProps): JSX.Element;
@@ -1,7 +1,7 @@
1
- export interface PagingProps {
2
- activePage: number;
3
- onPageChange: (pageNumber: number) => void;
4
- pagesCount: number;
5
- }
6
- export declare type ItemType = number | '.' | 'forward';
7
- export declare function Paging(props: PagingProps): JSX.Element;
1
+ export interface PagingProps {
2
+ activePage: number;
3
+ onPageChange: (pageNumber: number) => void;
4
+ pagesCount: number;
5
+ }
6
+ export declare type ItemType = number | '.' | 'forward';
7
+ export declare function Paging(props: PagingProps): JSX.Element;
@@ -1,12 +1,12 @@
1
- import React from 'react';
2
- import { Theme } from '@storybook/theming';
3
- interface ImageSwapProps {
4
- url: string;
5
- isActive: boolean;
6
- onClick: (imageName: string) => void;
7
- imageName: string;
8
- theme: Theme;
9
- error?: boolean;
10
- }
11
- export declare const ImagePreview: React.FC<import("@storybook/theming").AddOptionalTo<ImageSwapProps, "theme">>;
12
- export {};
1
+ import React from 'react';
2
+ import { Theme } from '@storybook/theming';
3
+ interface ImageSwapProps {
4
+ url: string;
5
+ isActive: boolean;
6
+ onClick: (imageName: string) => void;
7
+ imageName: string;
8
+ theme: Theme;
9
+ error?: boolean;
10
+ }
11
+ export declare const ImagePreview: React.FC<import("@storybook/theming").AddOptionalTo<ImageSwapProps, "theme">>;
12
+ export {};
@@ -1,16 +1,16 @@
1
- import { ImagesViewMode, Images } from '../../../../types';
2
- interface PageHeaderProps {
3
- title: string[];
4
- images?: Partial<{
5
- [name: string]: Images;
6
- }>;
7
- errorMessage?: string | null;
8
- showViewModes: boolean;
9
- showTitle?: boolean;
10
- viewMode: ImagesViewMode;
11
- imagesWithError?: string[];
12
- onImageChange: (name: string) => void;
13
- onViewModeChange: (viewMode: ImagesViewMode) => void;
14
- }
15
- export declare function PageHeader({ title, images, errorMessage, showViewModes, showTitle, viewMode, imagesWithError, onImageChange, onViewModeChange, }: PageHeaderProps): JSX.Element | null;
16
- export {};
1
+ import { ImagesViewMode, Images } from '../../../../types';
2
+ interface PageHeaderProps {
3
+ title: string[];
4
+ images?: Partial<{
5
+ [name: string]: Images;
6
+ }>;
7
+ errorMessage?: string | null;
8
+ showViewModes: boolean;
9
+ showTitle?: boolean;
10
+ viewMode: ImagesViewMode;
11
+ imagesWithError?: string[];
12
+ onImageChange: (name: string) => void;
13
+ onViewModeChange: (viewMode: ImagesViewMode) => void;
14
+ }
15
+ export declare function PageHeader({ title, images, errorMessage, showViewModes, showTitle, viewMode, imagesWithError, onImageChange, onViewModeChange, }: PageHeaderProps): JSX.Element | null;
16
+ export {};
@@ -1,18 +1,18 @@
1
- import React from 'react';
2
- import { Theme } from '@storybook/theming';
3
- import { TestResult } from '../../../types';
4
- interface TestResultsProps {
5
- id: string;
6
- path: string[];
7
- results?: TestResult[];
8
- approved?: Partial<{
9
- [image: string]: number;
10
- }>;
11
- showTitle?: boolean;
12
- onImageApprove: (id: string, retry: number, image: string) => void;
13
- theme: Theme;
14
- height?: string;
15
- }
16
- export declare function ResultsPageInternal({ id, path, results, approved, theme, onImageApprove, showTitle, height, }: TestResultsProps): JSX.Element;
17
- export declare const ResultsPage: React.FC<import("@storybook/theming").AddOptionalTo<TestResultsProps, "theme">>;
18
- export {};
1
+ import React from 'react';
2
+ import { Theme } from '@storybook/theming';
3
+ import { TestResult } from '../../../types';
4
+ interface TestResultsProps {
5
+ id: string;
6
+ path: string[];
7
+ results?: TestResult[];
8
+ approved?: Partial<{
9
+ [image: string]: number;
10
+ }>;
11
+ showTitle?: boolean;
12
+ onImageApprove: (id: string, retry: number, image: string) => void;
13
+ theme: Theme;
14
+ height?: string;
15
+ }
16
+ export declare function ResultsPageInternal({ id, path, results, approved, theme, onImageApprove, showTitle, height, }: TestResultsProps): JSX.Element;
17
+ export declare const ResultsPage: React.FC<import("@storybook/theming").AddOptionalTo<TestResultsProps, "theme">>;
18
+ export {};
@@ -1,9 +1,9 @@
1
- import { CreeveyUpdate, CreeveyStatus } from '../../types';
2
- export interface CreeveyClientApi {
3
- start: (ids: string[]) => void;
4
- stop: () => void;
5
- approve: (id: string, retry: number, image: string) => void;
6
- onUpdate: (fn: (update: CreeveyUpdate) => void) => () => void;
7
- readonly status: Promise<CreeveyStatus>;
8
- }
9
- export declare function initCreeveyClientApi(): Promise<CreeveyClientApi>;
1
+ import { CreeveyUpdate, CreeveyStatus } from '../../types';
2
+ export interface CreeveyClientApi {
3
+ start: (ids: string[]) => void;
4
+ stop: () => void;
5
+ approve: (id: string, retry: number, image: string) => void;
6
+ onUpdate: (fn: (update: CreeveyUpdate) => void) => () => void;
7
+ readonly status: Promise<CreeveyStatus>;
8
+ }
9
+ export declare function initCreeveyClientApi(): Promise<CreeveyClientApi>;