@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.
Files changed (67) hide show
  1. package/.cache/tsconfig.tsbuildinfo +1 -0
  2. package/CHANGELOG.md +25 -0
  3. package/README.md +21 -0
  4. package/config/metro.cjs +125 -0
  5. package/config/react-native-safe-area-context.cjs +22 -0
  6. package/lib/DesktopDriverBridge.d.ts +7 -0
  7. package/lib/DesktopDriverBridge.d.ts.map +1 -0
  8. package/lib/DesktopDriverBridge.js +52 -0
  9. package/lib/DesktopDriverBridge.js.map +1 -0
  10. package/lib/DesktopStoryRoot.d.ts +8 -0
  11. package/lib/DesktopStoryRoot.d.ts.map +1 -0
  12. package/lib/DesktopStoryRoot.js +57 -0
  13. package/lib/DesktopStoryRoot.js.map +1 -0
  14. package/lib/DesktopStorybookConfig.d.ts +28 -0
  15. package/lib/DesktopStorybookConfig.d.ts.map +1 -0
  16. package/lib/DesktopStorybookConfig.js +23 -0
  17. package/lib/DesktopStorybookConfig.js.map +1 -0
  18. package/lib/StorybookTheme.d.ts +4 -0
  19. package/lib/StorybookTheme.d.ts.map +1 -0
  20. package/lib/StorybookTheme.js +79 -0
  21. package/lib/StorybookTheme.js.map +1 -0
  22. package/lib/StorybookUI.d.ts +2 -0
  23. package/lib/StorybookUI.d.ts.map +1 -0
  24. package/lib/StorybookUI.js +2 -0
  25. package/lib/StorybookUI.js.map +1 -0
  26. package/lib/StorybookUI.win32.d.ts +3 -0
  27. package/lib/StorybookUI.win32.d.ts.map +1 -0
  28. package/lib/StorybookUI.win32.js +171 -0
  29. package/lib/StorybookUI.win32.js.map +1 -0
  30. package/lib/Win32AddonsPanel.d.ts +9 -0
  31. package/lib/Win32AddonsPanel.d.ts.map +1 -0
  32. package/lib/Win32AddonsPanel.js +72 -0
  33. package/lib/Win32AddonsPanel.js.map +1 -0
  34. package/lib/Win32CalloutPortal.d.ts +16 -0
  35. package/lib/Win32CalloutPortal.d.ts.map +1 -0
  36. package/lib/Win32CalloutPortal.js +17 -0
  37. package/lib/Win32CalloutPortal.js.map +1 -0
  38. package/lib/Win32ResizeHandle.d.ts +8 -0
  39. package/lib/Win32ResizeHandle.d.ts.map +1 -0
  40. package/lib/Win32ResizeHandle.js +46 -0
  41. package/lib/Win32ResizeHandle.js.map +1 -0
  42. package/lib/createDesktopStorybookApp.d.ts +9 -0
  43. package/lib/createDesktopStorybookApp.d.ts.map +1 -0
  44. package/lib/createDesktopStorybookApp.js +38 -0
  45. package/lib/createDesktopStorybookApp.js.map +1 -0
  46. package/lib/createDesktopStorybookPreview.d.ts +3 -0
  47. package/lib/createDesktopStorybookPreview.d.ts.map +1 -0
  48. package/lib/createDesktopStorybookPreview.js +21 -0
  49. package/lib/createDesktopStorybookPreview.js.map +1 -0
  50. package/lib/index.d.ts +7 -0
  51. package/lib/index.d.ts.map +1 -0
  52. package/lib/index.js +5 -0
  53. package/lib/index.js.map +1 -0
  54. package/package.json +106 -0
  55. package/src/DesktopDriverBridge.tsx +66 -0
  56. package/src/DesktopStoryRoot.tsx +88 -0
  57. package/src/DesktopStorybookConfig.tsx +58 -0
  58. package/src/StorybookTheme.tsx +114 -0
  59. package/src/StorybookUI.ts +1 -0
  60. package/src/StorybookUI.win32.tsx +330 -0
  61. package/src/Win32AddonsPanel.tsx +135 -0
  62. package/src/Win32CalloutPortal.tsx +73 -0
  63. package/src/Win32ResizeHandle.tsx +67 -0
  64. package/src/createDesktopStorybookApp.tsx +72 -0
  65. package/src/createDesktopStorybookPreview.tsx +31 -0
  66. package/src/index.ts +12 -0
  67. 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
+ }