@storybook/react-native 8.0.0-alpha.4 → 8.2.0-alpha.1

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.
package/dist/index.d.ts CHANGED
@@ -1,13 +1,12 @@
1
- import { S as StoryIndex, P as PreparedStory, N as NormalizedStoriesSpecifier, a as ProjectAnnotations, b as StorybookConfig$1 } from './index.d-3fb25d8d.js';
2
- import { Theme } from '@storybook/react-native-theming';
3
- export { Theme, darkTheme, theme } from '@storybook/react-native-theming';
1
+ import * as _storybook_core_types from '@storybook/core/types';
2
+ import { StoryIndex, PreparedStory, NormalizedStoriesSpecifier, StorybookConfig as StorybookConfig$1 } from '@storybook/core/types';
4
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { Channel } from '@storybook/core/channels';
5
5
  import { StoryContext } from '@storybook/csf';
6
- import { PreviewWithSelection } from '@storybook/preview-api';
6
+ import { PreviewWithSelection } from '@storybook/core/preview-api';
7
7
  import { ReactRenderer } from '@storybook/react';
8
- import { Channel } from '@storybook/channels';
9
- import 'file-system-cache';
10
- import 'http';
8
+ import { Theme } from '@storybook/react-native-theming';
9
+ export { Theme, darkTheme, theme } from '@storybook/react-native-theming';
11
10
 
12
11
  interface Storage {
13
12
  getItem: (key: string) => Promise<string | null>;
@@ -66,28 +65,38 @@ declare class View {
66
65
  getStorybookUI: (params?: Partial<Params>) => () => react_jsx_runtime.JSX.Element;
67
66
  }
68
67
 
69
- declare function prepareStories({ storyEntries, }: {
68
+ /** Configuration options that are needed at startup, only serialisable values are possible */
69
+ interface ReactNativeOptions {
70
+ /**
71
+ * Note that this is for future and play functions are not yet fully supported on native.
72
+ */
73
+ playFn?: boolean;
74
+ }
75
+ declare function prepareStories({ storyEntries, options, }: {
70
76
  storyEntries: Array<NormalizedStoriesSpecifier & {
71
77
  req: any;
72
78
  }>;
79
+ options?: ReactNativeOptions;
73
80
  }): {
74
81
  index: StoryIndex;
75
82
  importMap: Record<string, any>;
76
83
  };
77
- declare const getProjectAnnotations: (view: View, annotations: any[]) => () => Promise<ProjectAnnotations<ReactRenderer>>;
78
- declare function start({ annotations, storyEntries, }: {
84
+ declare const getProjectAnnotations: (view: View, annotations: any[]) => () => Promise<_storybook_core_types.ProjectAnnotations<ReactRenderer>>;
85
+ declare function start({ annotations, storyEntries, options, }: {
79
86
  storyEntries: Array<NormalizedStoriesSpecifier & {
80
87
  req: any;
81
88
  }>;
82
89
  annotations: any[];
90
+ options?: ReactNativeOptions;
83
91
  }): View;
84
92
  declare function updateView(viewInstance: View, annotations: any[], normalizedStories: Array<NormalizedStoriesSpecifier & {
85
93
  req: any;
86
- }>): void;
94
+ }>, options?: ReactNativeOptions): void;
87
95
 
88
96
  interface StorybookConfig {
89
97
  stories: StorybookConfig$1['stories'];
90
98
  addons: string[];
99
+ reactNative?: ReactNativeOptions;
91
100
  }
92
101
 
93
102
  export { StorybookConfig, getProjectAnnotations, prepareStories, start, updateView };