@fluentui-react-native/storybook-desktop-runtime 0.2.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/.cache/tsconfig.tsbuildinfo +1 -0
- package/CHANGELOG.md +25 -0
- package/README.md +21 -0
- package/config/metro.cjs +125 -0
- package/config/react-native-safe-area-context.cjs +22 -0
- package/lib/DesktopDriverBridge.d.ts +7 -0
- package/lib/DesktopDriverBridge.d.ts.map +1 -0
- package/lib/DesktopDriverBridge.js +52 -0
- package/lib/DesktopDriverBridge.js.map +1 -0
- package/lib/DesktopStoryRoot.d.ts +8 -0
- package/lib/DesktopStoryRoot.d.ts.map +1 -0
- package/lib/DesktopStoryRoot.js +57 -0
- package/lib/DesktopStoryRoot.js.map +1 -0
- package/lib/DesktopStorybookConfig.d.ts +28 -0
- package/lib/DesktopStorybookConfig.d.ts.map +1 -0
- package/lib/DesktopStorybookConfig.js +23 -0
- package/lib/DesktopStorybookConfig.js.map +1 -0
- package/lib/StorybookTheme.d.ts +4 -0
- package/lib/StorybookTheme.d.ts.map +1 -0
- package/lib/StorybookTheme.js +79 -0
- package/lib/StorybookTheme.js.map +1 -0
- package/lib/StorybookUI.d.ts +2 -0
- package/lib/StorybookUI.d.ts.map +1 -0
- package/lib/StorybookUI.js +2 -0
- package/lib/StorybookUI.js.map +1 -0
- package/lib/StorybookUI.win32.d.ts +3 -0
- package/lib/StorybookUI.win32.d.ts.map +1 -0
- package/lib/StorybookUI.win32.js +171 -0
- package/lib/StorybookUI.win32.js.map +1 -0
- package/lib/Win32AddonsPanel.d.ts +9 -0
- package/lib/Win32AddonsPanel.d.ts.map +1 -0
- package/lib/Win32AddonsPanel.js +72 -0
- package/lib/Win32AddonsPanel.js.map +1 -0
- package/lib/Win32CalloutPortal.d.ts +16 -0
- package/lib/Win32CalloutPortal.d.ts.map +1 -0
- package/lib/Win32CalloutPortal.js +17 -0
- package/lib/Win32CalloutPortal.js.map +1 -0
- package/lib/Win32ResizeHandle.d.ts +8 -0
- package/lib/Win32ResizeHandle.d.ts.map +1 -0
- package/lib/Win32ResizeHandle.js +46 -0
- package/lib/Win32ResizeHandle.js.map +1 -0
- package/lib/createDesktopStorybookApp.d.ts +9 -0
- package/lib/createDesktopStorybookApp.d.ts.map +1 -0
- package/lib/createDesktopStorybookApp.js +38 -0
- package/lib/createDesktopStorybookApp.js.map +1 -0
- package/lib/createDesktopStorybookPreview.d.ts +3 -0
- package/lib/createDesktopStorybookPreview.d.ts.map +1 -0
- package/lib/createDesktopStorybookPreview.js +21 -0
- package/lib/createDesktopStorybookPreview.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -0
- package/package.json +106 -0
- package/src/DesktopDriverBridge.tsx +66 -0
- package/src/DesktopStoryRoot.tsx +88 -0
- package/src/DesktopStorybookConfig.tsx +58 -0
- package/src/StorybookTheme.tsx +114 -0
- package/src/StorybookUI.ts +1 -0
- package/src/StorybookUI.win32.tsx +330 -0
- package/src/Win32AddonsPanel.tsx +135 -0
- package/src/Win32CalloutPortal.tsx +73 -0
- package/src/Win32ResizeHandle.tsx +67 -0
- package/src/createDesktopStorybookApp.tsx +72 -0
- package/src/createDesktopStorybookPreview.tsx +31 -0
- package/src/index.ts +12 -0
- package/tsconfig.json +24 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { StyleSheet, View } from 'react-native';
|
|
2
|
+
import type { Preview } from '@storybook/react-native';
|
|
3
|
+
|
|
4
|
+
import { DesktopStoryRoot } from './DesktopStoryRoot';
|
|
5
|
+
import { StorybookThemeProvider } from './StorybookTheme';
|
|
6
|
+
|
|
7
|
+
export function createDesktopStorybookPreview(): Preview {
|
|
8
|
+
return {
|
|
9
|
+
decorators: [
|
|
10
|
+
(Story, context) => (
|
|
11
|
+
<StorybookThemeProvider>
|
|
12
|
+
<DesktopStoryRoot storyId={context.id}>
|
|
13
|
+
<View style={styles.story}>
|
|
14
|
+
<Story />
|
|
15
|
+
</View>
|
|
16
|
+
</DesktopStoryRoot>
|
|
17
|
+
</StorybookThemeProvider>
|
|
18
|
+
),
|
|
19
|
+
],
|
|
20
|
+
parameters: {},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const styles = StyleSheet.create({
|
|
25
|
+
story: {
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
flex: 1,
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
padding: 16,
|
|
30
|
+
},
|
|
31
|
+
});
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { createDesktopStorybookApp } from './createDesktopStorybookApp';
|
|
2
|
+
export type { DesktopStorybookOptions } from './createDesktopStorybookApp';
|
|
3
|
+
export { createDesktopStorybookPreview } from './createDesktopStorybookPreview';
|
|
4
|
+
export {
|
|
5
|
+
desktopPrepareStoryEvent,
|
|
6
|
+
desktopRequestHelloEvent,
|
|
7
|
+
desktopRuntimeHelloEvent,
|
|
8
|
+
desktopStoryErrorEvent,
|
|
9
|
+
desktopStoryReadyEvent,
|
|
10
|
+
} from './DesktopDriverBridge';
|
|
11
|
+
export { DesktopStoryRoot } from './DesktopStoryRoot';
|
|
12
|
+
export type { DesktopRuntimeSelection, DesktopStorybookRuntimeInstance } from './DesktopStorybookConfig';
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@fluentui-react-native/scripts/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "lib",
|
|
5
|
+
"rootDir": "src",
|
|
6
|
+
"composite": true,
|
|
7
|
+
"tsBuildInfoFile": ".cache/tsconfig.tsbuildinfo"
|
|
8
|
+
},
|
|
9
|
+
"include": ["src"],
|
|
10
|
+
"references": [
|
|
11
|
+
{
|
|
12
|
+
"path": "../../native/Callout/tsconfig.json"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"path": "../../theming/default-theme/tsconfig.json"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"path": "../design/tsconfig.json"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "../../../scripts/tsconfig.json"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|