react-cosmos-native 6.0.0-alpha.11 → 6.0.0-alpha.12
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.
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { FixtureId,
|
|
1
|
+
import { FixtureId, RendererConfig, UserModuleWrappers } from 'react-cosmos-core';
|
|
2
2
|
type Props = {
|
|
3
3
|
rendererConfig: RendererConfig;
|
|
4
|
-
|
|
5
|
-
decorators: ReactDecorators;
|
|
4
|
+
moduleWrappers: UserModuleWrappers;
|
|
6
5
|
initialFixtureId?: FixtureId;
|
|
7
6
|
};
|
|
8
|
-
export declare function NativeFixtureLoader({ rendererConfig: { playgroundUrl },
|
|
7
|
+
export declare function NativeFixtureLoader({ rendererConfig: { playgroundUrl }, moduleWrappers, initialFixtureId, }: Props): JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { createWebSocketsConnect,
|
|
2
|
+
import { createWebSocketsConnect, FixtureConnect, } from 'react-cosmos-core';
|
|
3
3
|
import * as ReactNative from 'react-native';
|
|
4
4
|
import { getSocketUrl } from './getSocketUrl.js';
|
|
5
5
|
const { View, Text, StyleSheet } = ReactNative;
|
|
6
6
|
// TODO: Generate unique ID per device
|
|
7
7
|
const rendererId = 'native-renderer';
|
|
8
|
-
export function NativeFixtureLoader({ rendererConfig: { playgroundUrl },
|
|
8
|
+
export function NativeFixtureLoader({ rendererConfig: { playgroundUrl }, moduleWrappers, initialFixtureId, }) {
|
|
9
9
|
const socketUrl = getSocketUrl(playgroundUrl);
|
|
10
|
-
return (React.createElement(
|
|
10
|
+
return (React.createElement(FixtureConnect, { rendererId: rendererId, rendererConnect: createWebSocketsConnect(socketUrl), moduleWrappers: moduleWrappers, systemDecorators: [], initialFixtureId: initialFixtureId, renderMessage: renderMessage }));
|
|
11
11
|
}
|
|
12
|
-
function renderMessage(
|
|
12
|
+
function renderMessage(msg) {
|
|
13
13
|
return (React.createElement(View, { style: styles.container },
|
|
14
14
|
React.createElement(Text, null, msg)));
|
|
15
15
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-cosmos-native",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.12",
|
|
4
4
|
"description": "React Cosmos Native",
|
|
5
5
|
"repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos-native",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"react-cosmos-core": "^6.0.0-alpha.
|
|
10
|
+
"react-cosmos-core": "^6.0.0-alpha.12"
|
|
11
11
|
},
|
|
12
|
-
"gitHead": "
|
|
12
|
+
"gitHead": "5987f899563ec2ddae727d4d57431a0400c49161"
|
|
13
13
|
}
|