expo-module-template 10.7.9 → 10.7.11

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 CHANGED
@@ -31,7 +31,7 @@
31
31
  "dependencies": {},
32
32
  "devDependencies": {
33
33
  "expo-module-scripts": "^3.0.3",
34
- "expo-modules-core": "^1.0.0"
34
+ "expo-modules-core": "^1.0.1"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "expo": "*",
@@ -35,15 +35,9 @@ class <%- project.name %>Module : Module() {
35
35
  ))
36
36
  }
37
37
 
38
- // Enables the module to be used as a view manager. The view manager definition is built from
39
- // the definition components used in the closure passed to viewManager.
40
- // Definition components that are accepted as part of the view manager definition: `View`, `Prop`.
41
- ViewManager {
42
- // Defines the factory creating a native view when the module is used as a view.
43
- View { context ->
44
- <%- project.name %>View(context)
45
- }
46
-
38
+ // Enables the module to be used as a native view. Definition components that are accepted as part of
39
+ // the view definition: Prop, Events.
40
+ View(<%- project.name %>View::class) {
47
41
  // Defines a setter for the `name` prop.
48
42
  Prop("name") { view: <%- project.name %>View, prop: String ->
49
43
  println(prop)
@@ -1,6 +1,7 @@
1
1
  package <%- project.package %>
2
2
 
3
3
  import android.content.Context
4
- import android.view.View
4
+ import expo.modules.kotlin.AppContext
5
+ import expo.modules.kotlin.views.ExpoView
5
6
 
6
- class <%- project.name %>View(context: Context) : View(context)
7
+ class <%- project.name %>View(context: Context, appContext: AppContext) : ExpoView(context, appContext)
@@ -32,19 +32,12 @@ public class <%- project.name %>Module: Module {
32
32
  ])
33
33
  }
34
34
 
35
- // Enables the module to be used as a view manager. The view manager definition is built from
36
- // the definition components used in the closure passed to viewManager.
37
- // Definition components that are accepted as part of the view manager definition: `View`, `Prop`.
38
- ViewManager {
39
- // Defines the factory creating a native view when the module is used as a view.
40
- View {
41
- <%- project.name %>View()
42
- }
43
-
35
+ // Enables the module to be used as a native view. Definition components that are accepted as part of the
36
+ // view definition: Prop, Events.
37
+ View(<%- project.name %>View.self) {
44
38
  // Defines a setter for the `name` prop.
45
39
  Prop("name") { (view: <%- project.name %>View, prop: String) in
46
40
  print(prop)
47
41
  }
48
42
  }
49
- }
50
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-module-template",
3
- "version": "10.7.9",
3
+ "version": "10.7.11",
4
4
  "description": "ExpoModuleTemplate standalone module",
5
5
  "main": "build/ModuleTemplate.js",
6
6
  "types": "build/ModuleTemplate.d.ts",
@@ -24,5 +24,5 @@
24
24
  "dependencies": {},
25
25
  "devDependencies": {},
26
26
  "peerDependencies": {},
27
- "gitHead": "217c3166ac51082177c8ef5a97eeebe063dd9b3d"
27
+ "gitHead": "faecb9de0438b3972fc7a2672d944bddadb987ea"
28
28
  }