@storybook/react-native 6.5.5 → 6.5.6-alpha.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.
- package/dist/index.d.ts +125 -18
- package/dist/index.js +1591 -41
- package/package.json +7 -8
- package/dist/constants.d.ts +0 -5
- package/dist/constants.js +0 -8
- package/dist/hooks.d.ts +0 -67
- package/dist/hooks.js +0 -168
- package/dist/preview/View.d.ts +0 -50
- package/dist/preview/View.js +0 -183
- package/dist/preview/components/OnDeviceUI/OnDeviceUI.d.ts +0 -12
- package/dist/preview/components/OnDeviceUI/OnDeviceUI.js +0 -163
- package/dist/preview/components/OnDeviceUI/Panel.d.ts +0 -9
- package/dist/preview/components/OnDeviceUI/Panel.js +0 -28
- package/dist/preview/components/OnDeviceUI/absolute-positioned-keyboard-aware-view.d.ts +0 -12
- package/dist/preview/components/OnDeviceUI/absolute-positioned-keyboard-aware-view.js +0 -31
- package/dist/preview/components/OnDeviceUI/addons/Addons.d.ts +0 -6
- package/dist/preview/components/OnDeviceUI/addons/Addons.js +0 -34
- package/dist/preview/components/OnDeviceUI/addons/AddonsSkeleton.d.ts +0 -14
- package/dist/preview/components/OnDeviceUI/addons/AddonsSkeleton.js +0 -78
- package/dist/preview/components/OnDeviceUI/addons/List.d.ts +0 -9
- package/dist/preview/components/OnDeviceUI/addons/List.js +0 -18
- package/dist/preview/components/OnDeviceUI/addons/Wrapper.d.ts +0 -8
- package/dist/preview/components/OnDeviceUI/addons/Wrapper.js +0 -31
- package/dist/preview/components/OnDeviceUI/addons/index.d.ts +0 -1
- package/dist/preview/components/OnDeviceUI/addons/index.js +0 -8
- package/dist/preview/components/OnDeviceUI/animation.d.ts +0 -61
- package/dist/preview/components/OnDeviceUI/animation.js +0 -116
- package/dist/preview/components/OnDeviceUI/index.d.ts +0 -1
- package/dist/preview/components/OnDeviceUI/index.js +0 -8
- package/dist/preview/components/OnDeviceUI/navigation/Navigation.d.ts +0 -9
- package/dist/preview/components/OnDeviceUI/navigation/Navigation.js +0 -54
- package/dist/preview/components/OnDeviceUI/navigation/NavigationBar.d.ts +0 -8
- package/dist/preview/components/OnDeviceUI/navigation/NavigationBar.js +0 -24
- package/dist/preview/components/OnDeviceUI/navigation/NavigationButton.d.ts +0 -2
- package/dist/preview/components/OnDeviceUI/navigation/NavigationButton.js +0 -23
- package/dist/preview/components/OnDeviceUI/navigation/constants.d.ts +0 -3
- package/dist/preview/components/OnDeviceUI/navigation/constants.js +0 -6
- package/dist/preview/components/OnDeviceUI/navigation/index.d.ts +0 -1
- package/dist/preview/components/OnDeviceUI/navigation/index.js +0 -8
- package/dist/preview/components/Shared/icons.d.ts +0 -53
- package/dist/preview/components/Shared/icons.js +0 -72
- package/dist/preview/components/Shared/layout.d.ts +0 -26
- package/dist/preview/components/Shared/layout.js +0 -24
- package/dist/preview/components/Shared/tabs.d.ts +0 -20
- package/dist/preview/components/Shared/tabs.js +0 -48
- package/dist/preview/components/StoryListView/StoryListView.d.ts +0 -7
- package/dist/preview/components/StoryListView/StoryListView.js +0 -201
- package/dist/preview/components/StoryListView/getNestedStories.d.ts +0 -10
- package/dist/preview/components/StoryListView/getNestedStories.js +0 -95
- package/dist/preview/components/StoryListView/getNestedStories.test.d.ts +0 -1
- package/dist/preview/components/StoryListView/getNestedStories.test.js +0 -237
- package/dist/preview/components/StoryListView/index.d.ts +0 -1
- package/dist/preview/components/StoryListView/index.js +0 -8
- package/dist/preview/components/StoryView/StoryView.d.ts +0 -3
- package/dist/preview/components/StoryView/StoryView.js +0 -47
- package/dist/preview/components/StoryView/index.d.ts +0 -1
- package/dist/preview/components/StoryView/index.js +0 -8
- package/dist/preview/executeLoadable.d.ts +0 -27
- package/dist/preview/executeLoadable.js +0 -95
- package/dist/preview/rn-host-detect.d.ts +0 -1
- package/dist/preview/rn-host-detect.js +0 -63
- package/dist/preview/start.d.ts +0 -16
- package/dist/preview/start.js +0 -124
- package/dist/types/types-6.0.d.ts +0 -72
- package/dist/types/types-6.0.js +0 -2
- package/dist/types/types.d.ts +0 -14
- package/dist/types/types.js +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,128 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Theme } from '@storybook/react-native-theming';
|
|
3
|
+
export { Theme, darkTheme, theme } from '@storybook/react-native-theming';
|
|
4
|
+
import * as _storybook_core_client from '@storybook/core-client';
|
|
3
5
|
import { StoryApi } from '@storybook/addons';
|
|
6
|
+
export { ArgTypes, Args, Parameters, StoryContext } from '@storybook/addons';
|
|
4
7
|
import { ClientApi } from '@storybook/client-api';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
import { ReactElement, ComponentType, JSXElementConstructor, ComponentProps, ReactNode } from 'react';
|
|
9
|
+
import { Args, ComponentAnnotations, AnnotatedStoryFn, StoryAnnotations } from '@storybook/csf';
|
|
10
|
+
|
|
11
|
+
type StoryFnReactReturnType = ReactElement<unknown>;
|
|
12
|
+
|
|
13
|
+
type ReactNativeFramework = {
|
|
14
|
+
component: ComponentType<any>;
|
|
15
|
+
storyResult: StoryFnReactReturnType;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* For the common case where a component's stories are simple components that receives args as props:
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* export default { ... } as ComponentMeta<typeof Button>;
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
type ComponentMeta<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = Meta<ComponentProps<T>>;
|
|
25
|
+
/**
|
|
26
|
+
* For the common case where a (CSFv2) story is a simple component that receives args as props:
|
|
27
|
+
*
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
type ComponentStoryFn<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = StoryFn<ComponentProps<T>>;
|
|
33
|
+
/**
|
|
34
|
+
* For the common case where a (CSFv3) story is a simple component that receives args as props:
|
|
35
|
+
*
|
|
36
|
+
* ```tsx
|
|
37
|
+
* const MyStory: ComponentStory<typeof Button> = {
|
|
38
|
+
* args: { buttonArg1: 'val' },
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
type ComponentStoryObj<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = StoryObj<ComponentProps<T>>;
|
|
43
|
+
/**
|
|
44
|
+
* For the common case where a (CSFv2) story is a simple component that receives args as props:
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* NOTE: this is an alias for `ComponentStoryFn`.
|
|
51
|
+
* In Storybook v7, `ComponentStory` will alias `ComponentStoryObj`
|
|
52
|
+
*/
|
|
53
|
+
type ComponentStory<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = Story<ComponentProps<T>>;
|
|
54
|
+
/**
|
|
55
|
+
* Metadata to configure the stories for a component.
|
|
56
|
+
*
|
|
57
|
+
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
|
|
58
|
+
*/
|
|
59
|
+
type Meta<TArgs = Args> = ComponentAnnotations<ReactNativeFramework, TArgs>;
|
|
60
|
+
/**
|
|
61
|
+
* Story function that represents a CSFv2 component example.
|
|
62
|
+
*
|
|
63
|
+
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
64
|
+
*/
|
|
65
|
+
type StoryFn<TArgs = Args> = AnnotatedStoryFn<ReactNativeFramework, TArgs>;
|
|
66
|
+
/**
|
|
67
|
+
* Story function that represents a CSFv3 component example.
|
|
68
|
+
*
|
|
69
|
+
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
70
|
+
*/
|
|
71
|
+
type StoryObj<TArgs = Args> = StoryAnnotations<ReactNativeFramework, TArgs>;
|
|
72
|
+
/**
|
|
73
|
+
* Story function that represents a CSFv2 component example.
|
|
74
|
+
*
|
|
75
|
+
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
76
|
+
*
|
|
77
|
+
* NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
type Story<TArgs = Args> = StoryFn<TArgs>;
|
|
81
|
+
|
|
82
|
+
type StoryKind = string;
|
|
83
|
+
type StoryName = string;
|
|
84
|
+
type InitialSelection = `${StoryKind}--${StoryName}` | {
|
|
85
|
+
/**
|
|
86
|
+
* Kind is the default export name or the storiesOf("name") name
|
|
87
|
+
*/
|
|
88
|
+
kind: StoryKind;
|
|
89
|
+
/**
|
|
90
|
+
* Name is the named export or the .add("name") name
|
|
91
|
+
*/
|
|
92
|
+
name: StoryName;
|
|
93
|
+
};
|
|
94
|
+
type DeepPartial<T> = T extends object ? {
|
|
95
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
96
|
+
} : T;
|
|
97
|
+
type Params = {
|
|
98
|
+
onDeviceUI?: boolean;
|
|
99
|
+
enableWebsockets?: boolean;
|
|
100
|
+
query?: string;
|
|
101
|
+
host?: string;
|
|
102
|
+
port?: number;
|
|
103
|
+
secured?: boolean;
|
|
104
|
+
initialSelection?: InitialSelection;
|
|
105
|
+
shouldPersistSelection?: boolean;
|
|
106
|
+
tabOpen?: number;
|
|
107
|
+
isUIHidden?: boolean;
|
|
108
|
+
isSplitPanelVisible?: boolean;
|
|
109
|
+
shouldDisableKeyboardAvoidingView?: boolean;
|
|
110
|
+
keyboardAvoidingViewVerticalOffset?: number;
|
|
111
|
+
theme: DeepPartial<Theme>;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
declare const configure: (loadable: _storybook_core_client.Loadable, m: NodeModule) => void;
|
|
115
|
+
|
|
9
116
|
type C = ClientApi<ReactNativeFramework>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export {
|
|
117
|
+
declare const setAddon: C['setAddon'];
|
|
118
|
+
declare const addDecorator: C['addDecorator'];
|
|
119
|
+
declare const addParameters: C['addParameters'];
|
|
120
|
+
declare const addArgsEnhancer: C['addArgsEnhancer'];
|
|
121
|
+
declare const addArgTypesEnhancer: C['addArgTypesEnhancer'];
|
|
122
|
+
declare const clearDecorators: C['clearDecorators'];
|
|
123
|
+
declare const getStorybook: C['getStorybook'];
|
|
124
|
+
declare const raw: C['raw'];
|
|
125
|
+
declare const storiesOf: (kind: string, _module: NodeModule) => StoryApi<ReactNode>;
|
|
126
|
+
declare const getStorybookUI: (params?: Partial<Params>) => () => react_jsx_runtime.JSX.Element;
|
|
127
|
+
|
|
128
|
+
export { ComponentMeta, ComponentStory, ComponentStoryFn, ComponentStoryObj, Meta, ReactNativeFramework, Story, StoryFn, StoryFnReactReturnType, StoryObj, addArgTypesEnhancer, addArgsEnhancer, addDecorator, addParameters, clearDecorators, configure, getStorybook, getStorybookUI, raw, setAddon, storiesOf };
|