@playfast/reform-react-native 0.0.7 → 0.0.9
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/package.json +2 -2
- package/{dist/index.js → src/index.tsx} +9 -7
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playfast/reform-react-native",
|
|
3
3
|
"playbook": "./playbook",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "React Native host for reform — registers a scene as a zero-arg root component for Expo or bare React Native.",
|
|
7
7
|
"keywords": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"./*": "./src/*.tsx"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
|
-
"
|
|
30
|
+
"src",
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"scripts": {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { createElement } from 'react'
|
|
2
|
-
import { Reform } from '@playfast/reform-react'
|
|
1
|
+
import { type ComponentType, createElement } from 'react'
|
|
2
|
+
import { Reform } from '@playfast/reform-react'
|
|
3
|
+
import type { Scene } from '@playfast/reform'
|
|
4
|
+
|
|
3
5
|
// The React-Native host. Unlike the DOM target (which renders a scene into a
|
|
4
6
|
// container the app owns), React Native registers a *root component*. So this
|
|
5
7
|
// wraps the renderer-neutral `Reform` component — which already owns the
|
|
6
8
|
// `ManagedRuntime`, boots, and renders the scene — in a zero-arg component for
|
|
7
9
|
// Expo's `registerRootComponent` / `AppRegistry.registerComponent`.
|
|
10
|
+
|
|
8
11
|
/**
|
|
9
12
|
* Build a React-Native root component that hosts a scene. Register the returned
|
|
10
13
|
* component with Expo's `registerRootComponent` (or `AppRegistry`).
|
|
11
14
|
*/
|
|
12
|
-
export const createReformRoot = (scene) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
15
|
+
export const createReformRoot = (scene: Scene): ComponentType => {
|
|
16
|
+
const ReformRoot = (): ReturnType<typeof createElement> => createElement(Reform, { scene })
|
|
17
|
+
return ReformRoot
|
|
18
|
+
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ComponentType } from 'react';
|
|
2
|
-
import type { Scene } from '@playfast/reform';
|
|
3
|
-
/**
|
|
4
|
-
* Build a React-Native root component that hosts a scene. Register the returned
|
|
5
|
-
* component with Expo's `registerRootComponent` (or `AppRegistry`).
|
|
6
|
-
*/
|
|
7
|
-
export declare const createReformRoot: (scene: Scene) => ComponentType;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,OAAO,CAAA;AAEzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAQ7C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,KAAG,aAG/C,CAAA"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,aAAa,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAG/C,6EAA6E;AAC7E,8EAA8E;AAC9E,yEAAyE;AACzE,+EAA+E;AAC/E,oEAAoE;AAEpE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAY,EAAiB,EAAE;IAC9D,MAAM,UAAU,GAAG,GAAqC,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAC3F,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA"}
|