@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
package/config/metro.cjs
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
const fs = require('node:fs');
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
const { makeMetroConfig } = require('@rnx-kit/metro-config');
|
|
4
|
+
const MetroSymlinksResolver = require('@rnx-kit/metro-resolver-symlinks');
|
|
5
|
+
const { withStorybook } = require('@storybook/react-native/withStorybook');
|
|
6
|
+
|
|
7
|
+
const safeAreaStub = path.resolve(__dirname, 'react-native-safe-area-context.cjs');
|
|
8
|
+
|
|
9
|
+
function resolvePlatformModule(moduleName, platform) {
|
|
10
|
+
if (platform !== 'win32') {
|
|
11
|
+
return moduleName;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (moduleName === 'react-native') {
|
|
15
|
+
return '@office-iss/react-native-win32';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (moduleName.startsWith('react-native/')) {
|
|
19
|
+
return `@office-iss/react-native-win32/${moduleName.slice('react-native/'.length)}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return moduleName;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function createDesktopStorybookMetroConfig({ configPath }) {
|
|
26
|
+
if (!configPath) {
|
|
27
|
+
throw new TypeError('createDesktopStorybookMetroConfig requires an app-owned Storybook configPath.');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const runtimeModulePath = writeRuntimeInstanceModule(path.dirname(configPath));
|
|
31
|
+
const symlinkResolver = MetroSymlinksResolver({
|
|
32
|
+
resolver: 'oxc-resolver',
|
|
33
|
+
});
|
|
34
|
+
const config = makeMetroConfig({
|
|
35
|
+
resolver: {
|
|
36
|
+
resolveRequest: (context, moduleName, platform) => {
|
|
37
|
+
// Storybook's path-based lite-mode mock does not recognize Yarn's virtual pnpm paths.
|
|
38
|
+
if (moduleName === '@storybook/react-native-ui' || moduleName.startsWith('@storybook/react-native-ui/')) {
|
|
39
|
+
return { type: 'empty' };
|
|
40
|
+
}
|
|
41
|
+
if (moduleName === 'react-native-safe-area-context') {
|
|
42
|
+
return { type: 'sourceFile', filePath: safeAreaStub };
|
|
43
|
+
}
|
|
44
|
+
return symlinkResolver(context, resolvePlatformModule(moduleName, platform), platform);
|
|
45
|
+
},
|
|
46
|
+
unstable_enablePackageExports: true,
|
|
47
|
+
unstable_conditionNames: ['react-native', 'import', 'require'],
|
|
48
|
+
disableHierarchicalLookup: true,
|
|
49
|
+
enableSymlinks: true,
|
|
50
|
+
},
|
|
51
|
+
transformer: {
|
|
52
|
+
unstable_allowRequireContext: true,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const storybookConfig = withStorybook(config, {
|
|
57
|
+
configPath,
|
|
58
|
+
liteMode: true,
|
|
59
|
+
});
|
|
60
|
+
const getPolyfills = storybookConfig.serializer?.getPolyfills;
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
...storybookConfig,
|
|
64
|
+
serializer: {
|
|
65
|
+
...storybookConfig.serializer,
|
|
66
|
+
getPolyfills: (...args) => [...(getPolyfills?.(...args) ?? []), runtimeModulePath],
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function writeRuntimeInstanceModule(projectRoot) {
|
|
72
|
+
const generatedDirectory = path.join(projectRoot, 'storybook-desktop.generated');
|
|
73
|
+
const runtimeModulePath = path.join(generatedDirectory, 'runtime-instance.js');
|
|
74
|
+
const storybookPort = readPort(process.env.STORYBOOK_WS_PORT, 7007);
|
|
75
|
+
const instanceId = process.env.FURN_STORYBOOK_INSTANCE_ID || 'default';
|
|
76
|
+
const driverManifest = readDriverManifest(process.env.STORYBOOK_DRIVER_MANIFEST);
|
|
77
|
+
const runtimeInstance = {
|
|
78
|
+
instanceId,
|
|
79
|
+
storybookPort,
|
|
80
|
+
...(driverManifest
|
|
81
|
+
? {
|
|
82
|
+
bridgeNonce: driverManifest.bridgeNonce,
|
|
83
|
+
endpoint: driverManifest.endpoint,
|
|
84
|
+
platformManifestDigest: driverManifest.platformManifestDigest,
|
|
85
|
+
portablePlanDigest: driverManifest.portablePlanDigest,
|
|
86
|
+
targetId: driverManifest.targetId,
|
|
87
|
+
testIDPrefix: driverManifest.testIDPrefix,
|
|
88
|
+
}
|
|
89
|
+
: {}),
|
|
90
|
+
};
|
|
91
|
+
const content = `globalThis.__FURN_DESKTOP_STORYBOOK_INSTANCE__ = Object.freeze(${JSON.stringify(runtimeInstance)});\n`;
|
|
92
|
+
|
|
93
|
+
fs.mkdirSync(generatedDirectory, { recursive: true });
|
|
94
|
+
if (!fs.existsSync(runtimeModulePath) || fs.readFileSync(runtimeModulePath, 'utf8') !== content) {
|
|
95
|
+
fs.writeFileSync(runtimeModulePath, content);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return runtimeModulePath;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function readDriverManifest(manifestPath) {
|
|
102
|
+
if (!manifestPath) {
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
if (!fs.existsSync(manifestPath)) {
|
|
106
|
+
throw new Error(`Desktop Driver manifest does not exist at ${manifestPath}.`);
|
|
107
|
+
}
|
|
108
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
109
|
+
if (manifest.schemaVersion !== 1) {
|
|
110
|
+
throw new Error(`Unsupported Desktop Driver manifest schema "${manifest.schemaVersion}".`);
|
|
111
|
+
}
|
|
112
|
+
return manifest;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function readPort(value, fallback) {
|
|
116
|
+
const port = Number(value) || fallback;
|
|
117
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
118
|
+
throw new RangeError(`Invalid Storybook port "${value}".`);
|
|
119
|
+
}
|
|
120
|
+
return port;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
module.exports = {
|
|
124
|
+
createDesktopStorybookMetroConfig,
|
|
125
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const React = require('react');
|
|
2
|
+
const { View } = require('react-native');
|
|
3
|
+
|
|
4
|
+
const insets = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
5
|
+
const frame = { x: 0, y: 0, width: 0, height: 0 };
|
|
6
|
+
|
|
7
|
+
const SafeAreaInsetsContext = React.createContext(insets);
|
|
8
|
+
const SafeAreaFrameContext = React.createContext(frame);
|
|
9
|
+
|
|
10
|
+
const SafeAreaProvider = ({ children }) => React.createElement(View, { style: { flex: 1 } }, children);
|
|
11
|
+
const SafeAreaView = React.forwardRef((props, ref) => React.createElement(View, { ref, ...props }));
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
SafeAreaProvider,
|
|
15
|
+
SafeAreaConsumer: SafeAreaInsetsContext.Consumer,
|
|
16
|
+
SafeAreaInsetsContext,
|
|
17
|
+
SafeAreaFrameContext,
|
|
18
|
+
SafeAreaView,
|
|
19
|
+
useSafeAreaInsets: () => insets,
|
|
20
|
+
useSafeAreaFrame: () => frame,
|
|
21
|
+
initialWindowMetrics: { insets, frame },
|
|
22
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const desktopPrepareStoryEvent = "furn:desktop:prepare-story";
|
|
2
|
+
export declare const desktopRequestHelloEvent = "furn:desktop:request-hello";
|
|
3
|
+
export declare const desktopRuntimeHelloEvent = "furn:desktop:hello";
|
|
4
|
+
export declare const desktopStoryErrorEvent = "furn:desktop:story-error";
|
|
5
|
+
export declare const desktopStoryReadyEvent = "furn:desktop:story-ready";
|
|
6
|
+
export declare function DesktopDriverBridge(): null;
|
|
7
|
+
//# sourceMappingURL=DesktopDriverBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesktopDriverBridge.d.ts","sourceRoot":"","sources":["../src/DesktopDriverBridge.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAC7D,eAAO,MAAM,sBAAsB,6BAA6B,CAAC;AACjE,eAAO,MAAM,sBAAsB,6BAA6B,CAAC;AAQjE,wBAAgB,mBAAmB,IAAI,IAAI,CAwC1C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { addons } from 'storybook/preview-api';
|
|
3
|
+
import { useDesktopStorybookConfig } from './DesktopStorybookConfig';
|
|
4
|
+
export const desktopPrepareStoryEvent = 'furn:desktop:prepare-story';
|
|
5
|
+
export const desktopRequestHelloEvent = 'furn:desktop:request-hello';
|
|
6
|
+
export const desktopRuntimeHelloEvent = 'furn:desktop:hello';
|
|
7
|
+
export const desktopStoryErrorEvent = 'furn:desktop:story-error';
|
|
8
|
+
export const desktopStoryReadyEvent = 'furn:desktop:story-ready';
|
|
9
|
+
export function DesktopDriverBridge() {
|
|
10
|
+
const { prepareStory, runtimeInstance } = useDesktopStorybookConfig();
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
if (!runtimeInstance?.bridgeNonce ||
|
|
13
|
+
!runtimeInstance.endpoint ||
|
|
14
|
+
!runtimeInstance.instanceId ||
|
|
15
|
+
!runtimeInstance.platformManifestDigest ||
|
|
16
|
+
!runtimeInstance.targetId) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
const channel = addons.getChannel();
|
|
20
|
+
const emitHello = () => {
|
|
21
|
+
channel.emit(desktopRuntimeHelloEvent, {
|
|
22
|
+
endpoint: runtimeInstance.endpoint,
|
|
23
|
+
instanceId: runtimeInstance.instanceId,
|
|
24
|
+
nonce: runtimeInstance.bridgeNonce,
|
|
25
|
+
platformManifestDigest: runtimeInstance.platformManifestDigest,
|
|
26
|
+
targetId: runtimeInstance.targetId,
|
|
27
|
+
version: 1,
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const onPrepare = (payload) => {
|
|
31
|
+
if (isPrepareStoryPayload(payload)) {
|
|
32
|
+
prepareStory(payload);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
channel.on(desktopPrepareStoryEvent, onPrepare);
|
|
36
|
+
channel.on(desktopRequestHelloEvent, emitHello);
|
|
37
|
+
emitHello();
|
|
38
|
+
return () => {
|
|
39
|
+
channel.off(desktopPrepareStoryEvent, onPrepare);
|
|
40
|
+
channel.off(desktopRequestHelloEvent, emitHello);
|
|
41
|
+
};
|
|
42
|
+
}, [prepareStory, runtimeInstance]);
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
function isPrepareStoryPayload(value) {
|
|
46
|
+
if (!value || typeof value !== 'object') {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
const payload = value;
|
|
50
|
+
return typeof payload.requestId === 'string' && typeof payload.runId === 'string' && typeof payload.storyId === 'string';
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=DesktopDriverBridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesktopDriverBridge.js","sourceRoot":"","sources":["../src/DesktopDriverBridge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,MAAM,CAAC,MAAM,wBAAwB,GAAG,4BAA4B,CAAC;AACrE,MAAM,CAAC,MAAM,wBAAwB,GAAG,4BAA4B,CAAC;AACrE,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAC7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,0BAA0B,CAAC;AACjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,0BAA0B,CAAC;AAQjE,MAAM,UAAU,mBAAmB;IACjC,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,GAAG,yBAAyB,EAAE,CAAC;IAEtE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IACE,CAAC,eAAe,EAAE,WAAW;YAC7B,CAAC,eAAe,CAAC,QAAQ;YACzB,CAAC,eAAe,CAAC,UAAU;YAC3B,CAAC,eAAe,CAAC,sBAAsB;YACvC,CAAC,eAAe,CAAC,QAAQ,EACzB,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACpC,MAAM,SAAS,GAAG,GAAG,EAAE;YACrB,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE;gBACrC,Q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
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
storyId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function DesktopStoryRoot({ children, storyId }: DesktopStoryRootProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=DesktopStoryRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesktopStoryRoot.d.ts","sourceRoot":"","sources":["../src/DesktopStoryRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,qBAAqB,2CA4C5E"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { addons } from 'storybook/preview-api';
|
|
5
|
+
import { desktopStoryErrorEvent, desktopStoryReadyEvent } from './DesktopDriverBridge';
|
|
6
|
+
import { useDesktopStorybookConfig, useDesktopStorybookTestID } from './DesktopStorybookConfig';
|
|
7
|
+
export function DesktopStoryRoot({ children, storyId }) {
|
|
8
|
+
const { runtimeInstance, selection } = useDesktopStorybookConfig();
|
|
9
|
+
const testID = useDesktopStorybookTestID('story-root');
|
|
10
|
+
const activeSelection = selection?.storyId === storyId ? selection : undefined;
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
if (!activeSelection || !runtimeInstance?.portablePlanDigest) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
addons.getChannel().emit(desktopStoryReadyEvent, {
|
|
16
|
+
portablePlanDigest: runtimeInstance.portablePlanDigest,
|
|
17
|
+
previewGeneration: activeSelection.previewGeneration,
|
|
18
|
+
requestId: activeSelection.requestId,
|
|
19
|
+
runId: activeSelection.runId,
|
|
20
|
+
storyId,
|
|
21
|
+
});
|
|
22
|
+
}, [activeSelection, runtimeInstance?.portablePlanDigest, storyId]);
|
|
23
|
+
const marker = JSON.stringify({
|
|
24
|
+
previewGeneration: activeSelection?.previewGeneration ?? 0,
|
|
25
|
+
runId: activeSelection?.runId,
|
|
26
|
+
storyId,
|
|
27
|
+
});
|
|
28
|
+
const key = activeSelection ? `${activeSelection.runId}:${activeSelection.previewGeneration}` : storyId;
|
|
29
|
+
return (_jsx(StoryRenderErrorBoundary, { onError: (message) => {
|
|
30
|
+
if (activeSelection) {
|
|
31
|
+
addons.getChannel().emit(desktopStoryErrorEvent, {
|
|
32
|
+
message,
|
|
33
|
+
requestId: activeSelection.requestId,
|
|
34
|
+
runId: activeSelection.runId,
|
|
35
|
+
storyId,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}, children: _jsx(View, { accessibilityLabel: marker, style: styles.root, testID: testID, children: children }) }, key));
|
|
39
|
+
}
|
|
40
|
+
class StoryRenderErrorBoundary extends React.Component {
|
|
41
|
+
state = {};
|
|
42
|
+
static getDerivedStateFromError(error) {
|
|
43
|
+
return { error };
|
|
44
|
+
}
|
|
45
|
+
componentDidCatch(error) {
|
|
46
|
+
this.props.onError(error.message);
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
return this.state.error ? null : this.props.children;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const styles = StyleSheet.create({
|
|
53
|
+
root: {
|
|
54
|
+
flex: 1,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=DesktopStoryRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesktopStoryRoot.js","sourceRoot":"","sources":["../src/DesktopStoryRoot.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAA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
|
+
requestId: string;
|
|
5
|
+
runId: string;
|
|
6
|
+
storyId: string;
|
|
7
|
+
};
|
|
8
|
+
export type DesktopStorybookRuntimeInstance = {
|
|
9
|
+
bridgeNonce?: string;
|
|
10
|
+
endpoint?: 'macos' | 'windows' | 'win32';
|
|
11
|
+
instanceId?: string;
|
|
12
|
+
platformManifestDigest?: string;
|
|
13
|
+
portablePlanDigest?: string;
|
|
14
|
+
storybookPort?: number;
|
|
15
|
+
targetId?: string;
|
|
16
|
+
testIDPrefix?: string;
|
|
17
|
+
};
|
|
18
|
+
type DesktopStorybookConfig = {
|
|
19
|
+
prepareStory(selection: Omit<DesktopRuntimeSelection, 'previewGeneration'>): void;
|
|
20
|
+
runtimeInstance?: DesktopStorybookRuntimeInstance;
|
|
21
|
+
selection?: DesktopRuntimeSelection;
|
|
22
|
+
testIDPrefix: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function DesktopStorybookConfigProvider({ children, runtimeInstance, testIDPrefix, }: React.PropsWithChildren<Pick<DesktopStorybookConfig, 'runtimeInstance' | 'testIDPrefix'>>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function useDesktopStorybookConfig(): DesktopStorybookConfig;
|
|
26
|
+
export declare function useDesktopStorybookTestID(suffix: string): string;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=DesktopStorybookConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesktopStorybookConfig.d.ts","sourceRoot":"","sources":["../src/DesktopStorybookConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAClF,eAAe,CAAC,EAAE,+BAA+B,CAAC;IAClD,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AASF,wBAAgB,8BAA8B,CAAC,EAC7C,QAAQ,EACR,eAAe,EACf,YAAY,GACb,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,sBAAsB,EAAE,iBAAiB,GAAG,cAAc,CAAC,CAAC,2CAU3F;AAED,wBAAgB,yBAAyB,IAAI,sBAAsB,CAElE;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGhE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
const defaultConfig = {
|
|
4
|
+
prepareStory: () => undefined,
|
|
5
|
+
testIDPrefix: 'storybook-desktop',
|
|
6
|
+
};
|
|
7
|
+
const DesktopStorybookConfigContext = React.createContext(defaultConfig);
|
|
8
|
+
export function DesktopStorybookConfigProvider({ children, runtimeInstance, testIDPrefix, }) {
|
|
9
|
+
const [selection, setSelection] = React.useState();
|
|
10
|
+
const prepareStory = React.useCallback((next) => {
|
|
11
|
+
setSelection((current) => ({ ...next, previewGeneration: (current?.previewGeneration ?? 0) + 1 }));
|
|
12
|
+
}, []);
|
|
13
|
+
const value = React.useMemo(() => ({ prepareStory, runtimeInstance, selection, testIDPrefix }), [prepareStory, runtimeInstance, selection, testIDPrefix]);
|
|
14
|
+
return _jsx(DesktopStorybookConfigContext.Provider, { value: value, children: children });
|
|
15
|
+
}
|
|
16
|
+
export function useDesktopStorybookConfig() {
|
|
17
|
+
return React.useContext(DesktopStorybookConfigContext);
|
|
18
|
+
}
|
|
19
|
+
export function useDesktopStorybookTestID(suffix) {
|
|
20
|
+
const { testIDPrefix } = useDesktopStorybookConfig();
|
|
21
|
+
return `${testIDPrefix}-${suffix}`;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=DesktopStorybookConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesktopStorybookConfig.js","sourceRoot":"","sources":["../src/DesktopStorybookConfig.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2B/B,MAAM,aAAa,GAA2B;IAC5C,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;IAC7B,YAAY,EAAE,mBAAmB;CAClC,CAAC;AAEF,MAAM,6BAA6B,GAAG,KAAK,CAAC,aAAa,CAAyB,aAAa,CAAC,CAAC;AAEjG,MAAM,UAAU,8BAA8B,CAAC,EAC7C,QAAQ,EACR,eAAe,EACf,YAAY,GAC8E;IAC1F,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,EAA2B,CAAC;IAC5E,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,IAAwD,EAAE,EAAE;QAClG,YAAY,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,iBAAiB,EAAE,CAAC,OAAO,EAAE,iBAAiB,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACrG,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CACzB,GAAG,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,EAClE,CAAC,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,CAAC,CACzD,CAAC;IACF,OAAO,KAAC,6BAA6B,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAA0C,CAAC;AACnH,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,OAAO,KAAK,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,MAAc;IACtD,MAAM,EAAE,YAAY,EAAE,GAAG,yBAAyB,EAAE,CAAC;IACrD,OAAO,GAAG,YAAY,IAAI,MAAM,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function StorybookThemeHost({ children }: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function StorybookThemeProvider({ children }: React.PropsWithChildren): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal>;
|
|
4
|
+
//# sourceMappingURL=StorybookTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorybookTheme.d.ts","sourceRoot":"","sources":["../src/StorybookTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0B/B,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,iBAAiB,2CAgCvE;AAED,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,iBAAiB,mRAG3E"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Pressable, StyleSheet, Text, View } from 'react-native';
|
|
4
|
+
import { createDefaultTheme } from '@fluentui-react-native/default-theme';
|
|
5
|
+
import { ThemeProvider } from '@fluentui-react-native/design/theming';
|
|
6
|
+
import { useDesktopStorybookTestID } from './DesktopStorybookConfig';
|
|
7
|
+
const themeChoiceNames = ['none', 'light', 'dark', 'highContrast'];
|
|
8
|
+
const themeChoices = {
|
|
9
|
+
none: { label: 'No theme' },
|
|
10
|
+
light: { label: 'Light', theme: createDefaultTheme({ appearance: 'light' }) },
|
|
11
|
+
dark: { label: 'Dark', theme: createDefaultTheme({ appearance: 'dark' }) },
|
|
12
|
+
highContrast: { label: 'High contrast', theme: createDefaultTheme({ appearance: 'highContrast' }) },
|
|
13
|
+
};
|
|
14
|
+
const StorybookThemeContext = React.createContext(undefined);
|
|
15
|
+
export function StorybookThemeHost({ children }) {
|
|
16
|
+
const [selectedName, setSelectedName] = React.useState('none');
|
|
17
|
+
const selectedTheme = themeChoices[selectedName].theme;
|
|
18
|
+
const toolbarTestID = useDesktopStorybookTestID('theme-toolbar');
|
|
19
|
+
const optionTestID = useDesktopStorybookTestID('theme');
|
|
20
|
+
return (_jsx(StorybookThemeContext.Provider, { value: selectedTheme, children: _jsxs(View, { style: styles.root, children: [_jsxs(View, { accessibilityRole: "toolbar", style: styles.header, testID: toolbarTestID, children: [_jsx(Text, { style: styles.label, children: "Theme" }), themeChoiceNames.map((name) => {
|
|
21
|
+
const choice = themeChoices[name];
|
|
22
|
+
const selected = name === selectedName;
|
|
23
|
+
return (_jsx(Pressable, { accessibilityRole: "button", accessibilityState: { selected }, onPress: () => setSelectedName(name), style: ({ pressed }) => [styles.option, selected && styles.selectedOption, pressed && styles.pressedOption], testID: `${optionTestID}-${name}`, children: _jsx(Text, { style: [styles.optionText, selected && styles.selectedOptionText], children: choice.label }) }, name));
|
|
24
|
+
})] }), _jsx(View, { style: styles.storybook, children: children })] }) }));
|
|
25
|
+
}
|
|
26
|
+
export function StorybookThemeProvider({ children }) {
|
|
27
|
+
const theme = React.useContext(StorybookThemeContext);
|
|
28
|
+
return theme ? _jsx(ThemeProvider, { theme: theme, children: children }) : children;
|
|
29
|
+
}
|
|
30
|
+
const styles = StyleSheet.create({
|
|
31
|
+
root: {
|
|
32
|
+
flex: 1,
|
|
33
|
+
},
|
|
34
|
+
header: {
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
backgroundColor: '#f5f5f5',
|
|
37
|
+
borderBottomColor: '#d1d1d1',
|
|
38
|
+
borderBottomWidth: 1,
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
flexWrap: 'wrap',
|
|
41
|
+
gap: 8,
|
|
42
|
+
minHeight: 44,
|
|
43
|
+
paddingHorizontal: 12,
|
|
44
|
+
paddingVertical: 6,
|
|
45
|
+
},
|
|
46
|
+
label: {
|
|
47
|
+
color: '#242424',
|
|
48
|
+
fontSize: 14,
|
|
49
|
+
fontWeight: '600',
|
|
50
|
+
marginEnd: 4,
|
|
51
|
+
},
|
|
52
|
+
option: {
|
|
53
|
+
backgroundColor: '#ffffff',
|
|
54
|
+
borderColor: '#b3b3b3',
|
|
55
|
+
borderRadius: 4,
|
|
56
|
+
borderWidth: 1,
|
|
57
|
+
paddingHorizontal: 10,
|
|
58
|
+
paddingVertical: 5,
|
|
59
|
+
},
|
|
60
|
+
selectedOption: {
|
|
61
|
+
backgroundColor: '#0f6cbd',
|
|
62
|
+
borderColor: '#0f6cbd',
|
|
63
|
+
},
|
|
64
|
+
pressedOption: {
|
|
65
|
+
opacity: 0.75,
|
|
66
|
+
},
|
|
67
|
+
optionText: {
|
|
68
|
+
color: '#242424',
|
|
69
|
+
fontSize: 12,
|
|
70
|
+
},
|
|
71
|
+
selectedOptionText: {
|
|
72
|
+
color: '#ffffff',
|
|
73
|
+
fontWeight: '600',
|
|
74
|
+
},
|
|
75
|
+
storybook: {
|
|
76
|
+
flex: 1,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=StorybookTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorybookTheme.js","sourceRoot":"","sources":["../src/StorybookTheme.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAGtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAOrE,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,CAAU,CAAC;AAG5E,MAAM,YAAY,GAAyC;IACzD,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE;IAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,EAAE;IAC7E,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE;IAC1E,YAAY,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,kBAAkB,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC,EAAE;CACpG,CAAC;AAEF,MAAM,qBAAqB,GAAG,KAAK,CAAC,aAAa,CAA6B,SAAS,CAAC,CAAC;AAEzF,MAAM,UAAU,kBAAkB,CAAC,EAAE,QAAQ,EAA2B;IACtE,MAAM,CAAC,YAAY,EAAE,eAAe,CA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AkB,EAAE;QAClB,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,KAAK;KAClB;IACD,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorybookUI.d.ts","sourceRoot":"","sources":["../src/StorybookUI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorybookUI.js","sourceRoot":"","sources":["../src/StorybookUI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorybookUI.win32.d.ts","sourceRoot":"","sources":["../src/StorybookUI.win32.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAa,MAAM,mCAAmC,CAAC;AAWzE,eAAO,MAAM,oBAAoB,EAAE,IAuOlC,CAAC"}
|