turbo-native-initializer 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -1
  3. data/README.md +10 -0
  4. data/lib/turbo_native_initializer/generator.rb +4 -4
  5. data/lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NativeFragment.kt.tt +25 -0
  6. data/lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt +40 -0
  7. data/lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/main/MainSessionNavHostFragment.kt.tt +2 -1
  8. data/lib/turbo_native_initializer/templates/android_stack/base/app/build.gradle.kts.tt +16 -3
  9. data/lib/turbo_native_initializer/templates/android_stack/base/app/src/main/assets/json/configuration.json +2 -1
  10. data/lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/layout/fragment_native.xml +36 -0
  11. data/lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/values/colors.xml +2 -1
  12. data/lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/values/themes.xml.tt +3 -1
  13. data/lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NativeFragment.kt.tt +25 -0
  14. data/lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt +40 -0
  15. data/lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/main/BaseSessionNavHostFragment.kt.tt +2 -1
  16. data/lib/turbo_native_initializer/templates/android_tabs/base/app/build.gradle.kts.tt +16 -3
  17. data/lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/assets/json/configuration.json +2 -1
  18. data/lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/layout/fragment_native.xml +36 -0
  19. data/lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/values/colors.xml +2 -1
  20. data/lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/values/themes.xml.tt +3 -1
  21. data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Configuration/path-configuration.json +2 -1
  22. data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/NumbersViewController.swift +31 -0
  23. data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/TurboNavigationController.swift +11 -14
  24. data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ViewController.swift +1 -1
  25. data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Delegates/SceneDelegate.swift.tt +0 -2
  26. data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Resources/Assets.xcassets/AccentColor.colorset/Contents.json +27 -0
  27. data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Resources/Base.lproj/Main.storyboard.tt +1 -16
  28. data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject.xcodeproj/project.pbxproj.tt +4 -0
  29. data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Configuration/path-configuration.json +2 -1
  30. data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/NumbersViewController.swift +31 -0
  31. data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/TurboNavigationController.swift +11 -14
  32. data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ViewController.swift +1 -1
  33. data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Delegates/SceneDelegate.swift.tt +1 -3
  34. data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Resources/Assets.xcassets/AccentColor.colorset/Contents.json +27 -0
  35. data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Resources/Base.lproj/Main.storyboard +5 -22
  36. data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject.xcodeproj/project.pbxproj.tt +4 -0
  37. data/lib/turbo_native_initializer/version.rb +1 -1
  38. metadata +10 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 176b16802d0622c1efbf2b490120d975bfaff446f7c48728e7931c3145dc9bee
4
- data.tar.gz: 90bc9b58ac276531c18df91da08e1db2270fdf23e23c44749a4a557247bf49da
3
+ metadata.gz: 9b02a10e9fb3bdea77c7546d6a5c7ae4da7753f86232af13a88b53725a47d67f
4
+ data.tar.gz: 7be945f9a4ba16207cd4f69f9b5f56067d78f1a0dfc720f45a77c18b3d420b24
5
5
  SHA512:
6
- metadata.gz: 1e91a773673535adb6447794f9d224de54561d892c8ebe205e5cfc5ce580dcae807b5206b1f2811fe1885113f21aa8a3f53fc2ff30b5d61304930f223342a6ef
7
- data.tar.gz: 676a976889172ab21c01084db2dd1562788c9b54dfce7f3246b4ecc1c731f01e23ab704adfb1261705c15be044740c133145d27ec30885ece716ca1bd36d7bb3
6
+ metadata.gz: 7941d020b629c6ac4d2c754e666274758b972af5cb3c2481a777017f461571f6201e3fe9ba0bbe3b26bcc3baa96df7df6f9561f2a4e23327654eeb08e1a7e83a
7
+ data.tar.gz: 8a0a7ce879c65945d50209d54a19535cfcb9048ed2429f79dce9ab7a6d28acabee63dc11ce6296b095fa213f9245667e60e50d8a98690e5f54fe7e1c868108df
data/CHANGELOG.md CHANGED
@@ -1,8 +1,23 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.0.4] - 2023-09-09
4
+
5
+ - Added accent color (iOS)
6
+ - Added basic theme colors (Android)
7
+ - Fallback invalid "view-controller" navigations to web (iOS)
8
+ - Fix iOS modal navigation failing when not fullscreen
9
+
10
+ ## [0.0.3] - 2023-09-08
11
+
12
+ - Add a Swift UI native screen
13
+ - Add a jetpack compose screen
14
+ - Fix android package
15
+
16
+ ## [0.0.2] - 2023-09-07
17
+
3
18
  - Fix android tab navigation
4
19
  - General cleanup
5
20
 
6
- ## [0.0.1] - 2023-09-07
21
+ ## [0.0.1] - 2023-09-06
7
22
 
8
23
  - Initial release
data/README.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  A turbo native project generator for iOS and Android.
4
4
 
5
+ ## Differences when compared to the demos
6
+
7
+ - Added SwiftUI error screen. (iOS)
8
+ - Added SwiftUI numbers example screen. (iOS)
9
+ - Added Jetpack Compose numbers example screen. (Android)
10
+ - Added UIAlertController to handle `data-turbo-confirm`. (iOS)
11
+ - Added presentations `clear-all`, `replace-all`, `replace`, `pop`, `refresh`, and `none`. (iOS)
12
+ - Added visitable property in order to avoid visits. (iOS)
13
+ - Added support for tab navigation. (iOS/Android)
14
+
5
15
  ## Installation
6
16
 
7
17
  ```
@@ -36,14 +36,14 @@ module TurboNativeInitializer
36
36
  "#{options[:platform]}_#{options[:navigation]}"
37
37
  end
38
38
 
39
- def package_path
40
- options[:package].split(".").join("/")
41
- end
42
-
43
39
  def package_name
44
40
  "#{options[:package]}.#{name.downcase}"
45
41
  end
46
42
 
43
+ def package_path
44
+ package_name.split(".").join("/")
45
+ end
46
+
47
47
  def bundle_identifier
48
48
  "#{options[:package]}.#{name}"
49
49
  end
@@ -0,0 +1,25 @@
1
+ package <%= package_name %>.features.native
2
+
3
+ import android.view.LayoutInflater
4
+ import android.view.View
5
+ import android.view.ViewGroup
6
+ import androidx.compose.runtime.Composable
7
+ import androidx.compose.ui.platform.ComposeView
8
+ import androidx.compose.ui.platform.ViewCompositionStrategy
9
+ import dev.hotwire.turbo.fragments.TurboFragment
10
+ import <%= package_name %>.R
11
+ import <%= package_name %>.base.NavDestination
12
+
13
+ abstract class NativeFragment : TurboFragment(), NavDestination {
14
+ fun setContent(inflater: LayoutInflater, container: ViewGroup?, content: @Composable () -> Unit): View? {
15
+ val root = inflater.inflate(R.layout.fragment_native, container, false)
16
+ val composeView = root.findViewById<ComposeView>(R.id.compose_view)
17
+
18
+ composeView.apply {
19
+ setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
20
+ setContent { content.invoke() }
21
+ }
22
+
23
+ return root
24
+ }
25
+ }
@@ -0,0 +1,40 @@
1
+ package <%= package_name %>.features.native
2
+
3
+ import android.os.Bundle
4
+ import android.view.LayoutInflater
5
+ import android.view.View
6
+ import android.view.ViewGroup
7
+ import androidx.compose.foundation.lazy.LazyColumn
8
+ import androidx.compose.material3.Divider
9
+ import androidx.compose.material3.ListItem
10
+ import androidx.compose.material3.Text
11
+ import dev.hotwire.turbo.nav.TurboNavGraphDestination
12
+ import androidx.compose.runtime.Composable
13
+ import androidx.compose.ui.tooling.preview.Preview
14
+
15
+ @TurboNavGraphDestination(uri = "turbo://fragment/numbers")
16
+ class NumbersFragment : NativeFragment() {
17
+ override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
18
+ return setContent(inflater, container) {
19
+ NumbersList()
20
+ }
21
+ }
22
+ }
23
+
24
+ @Composable
25
+ fun NumbersList() {
26
+ val numbers = 1..100
27
+
28
+ LazyColumn {
29
+ items(numbers.count()) { index ->
30
+ ListItem(headlineContent = { Text("Row ${index + 1}") })
31
+ Divider()
32
+ }
33
+ }
34
+ }
35
+
36
+ @Preview
37
+ @Composable
38
+ fun PreviewNumbersList() {
39
+ NumbersList()
40
+ }
@@ -4,6 +4,7 @@ import android.webkit.WebView
4
4
  import androidx.appcompat.app.AppCompatActivity
5
5
  import androidx.fragment.app.Fragment
6
6
  import dev.hotwire.turbo.config.TurboPathConfiguration
7
+ import <%= package_name %>.features.native.NumbersFragment
7
8
  import <%= package_name %>.features.web.WebFragment
8
9
  import <%= package_name %>.features.web.WebHomeFragment
9
10
  import <%= package_name %>.features.web.WebModalFragment
@@ -21,7 +22,7 @@ class MainSessionNavHostFragment : TurboSessionNavHostFragment() {
21
22
  get() = listOf()
22
23
 
23
24
  override val registeredFragments: List<KClass<out Fragment>>
24
- get() = listOf(WebFragment::class, WebHomeFragment::class, WebModalFragment::class)
25
+ get() = listOf(WebFragment::class, WebHomeFragment::class, WebModalFragment::class, NumbersFragment::class)
25
26
 
26
27
  override val pathConfigurationLocation: TurboPathConfiguration.Location
27
28
  get() = TurboPathConfiguration.Location(assetFilePath = "json/configuration.json")
@@ -13,8 +13,6 @@ android {
13
13
  targetSdk = 33
14
14
  versionCode = 1
15
15
  versionName = "1.0"
16
-
17
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18
16
  }
19
17
 
20
18
  buildTypes {
@@ -33,12 +31,27 @@ android {
33
31
  kotlinOptions {
34
32
  jvmTarget = "1.8"
35
33
  }
34
+ buildFeatures {
35
+ compose = true
36
+ }
37
+ composeOptions {
38
+ kotlinCompilerExtensionVersion = "1.5.2"
39
+ }
36
40
  }
37
-
38
41
  dependencies {
42
+ // Android
39
43
  implementation("androidx.core:core-ktx:1.9.0")
40
44
  implementation("androidx.appcompat:appcompat:1.6.1")
41
45
  implementation("androidx.browser:browser:1.5.0")
42
46
  implementation("com.google.android.material:material:1.9.0")
47
+
48
+ // Jetpack Compose
49
+ implementation(platform("androidx.compose:compose-bom:2023.06.01"))
50
+ implementation("androidx.compose.material3:material3")
51
+ implementation("androidx.compose.ui:ui-tooling-preview")
52
+ debugImplementation("androidx.compose.ui:ui-tooling")
53
+ implementation("androidx.activity:activity-compose:1.7.2")
54
+
55
+ // Turbo Android
43
56
  implementation("dev.hotwire:turbo:7.0.0")
44
57
  }
@@ -6,6 +6,7 @@
6
6
  { "patterns": ["/recede_historical_location"], "properties": { "presentation": "pop" } },
7
7
  { "patterns": ["/resume_historical_location"], "properties": { "presentation": "none" } },
8
8
  { "patterns": ["^/$"], "properties": { "uri": "turbo://fragment/web/home", "presentation": "replace_all" } },
9
- { "patterns": ["/new$", "/edit$", "/signin$"], "properties": { "context": "modal", "uri": "turbo://fragment/web/modal" } }
9
+ { "patterns": ["/new$", "/edit$", "/signin$"], "properties": { "context": "modal", "uri": "turbo://fragment/web/modal" } },
10
+ { "patterns": ["/numbers$"], "properties": { "uri": "turbo://fragment/numbers", "title": "Numbers" } }
10
11
  ]
11
12
  }
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <androidx.constraintlayout.widget.ConstraintLayout
3
+ xmlns:android="http://schemas.android.com/apk/res/android"
4
+ xmlns:app="http://schemas.android.com/apk/res-auto"
5
+ android:layout_width="match_parent"
6
+ android:layout_height="match_parent">
7
+
8
+ <com.google.android.material.appbar.AppBarLayout
9
+ android:id="@+id/app_bar"
10
+ android:layout_width="match_parent"
11
+ android:layout_height="56dp"
12
+ app:layout_constraintEnd_toEndOf="parent"
13
+ app:layout_constraintStart_toStartOf="parent"
14
+ app:layout_constraintTop_toTopOf="parent">
15
+
16
+ <FrameLayout
17
+ android:layout_width="match_parent"
18
+ android:layout_height="match_parent">
19
+
20
+ <com.google.android.material.appbar.MaterialToolbar
21
+ android:id="@+id/toolbar"
22
+ android:layout_width="match_parent"
23
+ android:layout_height="wrap_content" />
24
+
25
+ </FrameLayout>
26
+
27
+ </com.google.android.material.appbar.AppBarLayout>
28
+
29
+ <androidx.compose.ui.platform.ComposeView
30
+ android:id="@+id/compose_view"
31
+ android:layout_width="match_parent"
32
+ android:layout_height="0dp"
33
+ app:layout_constraintBottom_toBottomOf="parent"
34
+ app:layout_constraintTop_toBottomOf="@+id/app_bar" />
35
+
36
+ </androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,5 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
+ <color name="color_brand">#5cd8e5</color>
3
4
  <color name="black">#FF000000</color>
4
5
  <color name="white">#FFFFFFFF</color>
5
- </resources>
6
+ </resources>
@@ -1,5 +1,7 @@
1
1
  <resources xmlns:tools="http://schemas.android.com/tools">
2
2
  <style name="Theme.<%= name %>" parent="Theme.Material3.DayNight.NoActionBar">
3
- <!-- Customize your theme here. -->
3
+ <item name="colorPrimary">@color/color_brand</item>
4
+ <item name="colorPrimaryDark">@color/color_brand</item>
5
+ <item name="colorAccent">@color/color_brand</item>
4
6
  </style>
5
7
  </resources>
@@ -0,0 +1,25 @@
1
+ package <%= package_name %>.features.native
2
+
3
+ import android.view.LayoutInflater
4
+ import android.view.View
5
+ import android.view.ViewGroup
6
+ import androidx.compose.runtime.Composable
7
+ import androidx.compose.ui.platform.ComposeView
8
+ import androidx.compose.ui.platform.ViewCompositionStrategy
9
+ import dev.hotwire.turbo.fragments.TurboFragment
10
+ import <%= package_name %>.R
11
+ import <%= package_name %>.base.NavDestination
12
+
13
+ abstract class NativeFragment : TurboFragment(), NavDestination {
14
+ fun setContent(inflater: LayoutInflater, container: ViewGroup?, content: @Composable () -> Unit): View? {
15
+ val root = inflater.inflate(R.layout.fragment_native, container, false)
16
+ val composeView = root.findViewById<ComposeView>(R.id.compose_view)
17
+
18
+ composeView.apply {
19
+ setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
20
+ setContent { content.invoke() }
21
+ }
22
+
23
+ return root
24
+ }
25
+ }
@@ -0,0 +1,40 @@
1
+ package <%= package_name %>.features.native
2
+
3
+ import android.os.Bundle
4
+ import android.view.LayoutInflater
5
+ import android.view.View
6
+ import android.view.ViewGroup
7
+ import androidx.compose.foundation.lazy.LazyColumn
8
+ import androidx.compose.material3.Divider
9
+ import androidx.compose.material3.ListItem
10
+ import androidx.compose.material3.Text
11
+ import dev.hotwire.turbo.nav.TurboNavGraphDestination
12
+ import androidx.compose.runtime.Composable
13
+ import androidx.compose.ui.tooling.preview.Preview
14
+
15
+ @TurboNavGraphDestination(uri = "turbo://fragment/numbers")
16
+ class NumbersFragment : NativeFragment() {
17
+ override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
18
+ return setContent(inflater, container) {
19
+ NumbersList()
20
+ }
21
+ }
22
+ }
23
+
24
+ @Composable
25
+ fun NumbersList() {
26
+ val numbers = 1..100
27
+
28
+ LazyColumn {
29
+ items(numbers.count()) { index ->
30
+ ListItem(headlineContent = { Text("Row ${index + 1}") })
31
+ Divider()
32
+ }
33
+ }
34
+ }
35
+
36
+ @Preview
37
+ @Composable
38
+ fun PreviewNumbersList() {
39
+ NumbersList()
40
+ }
@@ -4,6 +4,7 @@ import android.webkit.WebView
4
4
  import androidx.appcompat.app.AppCompatActivity
5
5
  import androidx.fragment.app.Fragment
6
6
  import dev.hotwire.turbo.config.TurboPathConfiguration
7
+ import <%= package_name %>.features.native.NumbersFragment
7
8
  import <%= package_name %>.features.web.WebFragment
8
9
  import <%= package_name %>.features.web.WebHomeFragment
9
10
  import <%= package_name %>.features.web.WebModalFragment
@@ -15,7 +16,7 @@ abstract class BaseSessionNavHostFragment : TurboSessionNavHostFragment() {
15
16
  get() = listOf()
16
17
 
17
18
  override val registeredFragments: List<KClass<out Fragment>>
18
- get() = listOf(WebFragment::class, WebHomeFragment::class, WebModalFragment::class)
19
+ get() = listOf(WebFragment::class, WebHomeFragment::class, WebModalFragment::class, NumbersFragment::class)
19
20
 
20
21
  override val pathConfigurationLocation: TurboPathConfiguration.Location
21
22
  get() = TurboPathConfiguration.Location(assetFilePath = "json/configuration.json")
@@ -13,8 +13,6 @@ android {
13
13
  targetSdk = 33
14
14
  versionCode = 1
15
15
  versionName = "1.0"
16
-
17
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18
16
  }
19
17
 
20
18
  buildTypes {
@@ -33,12 +31,27 @@ android {
33
31
  kotlinOptions {
34
32
  jvmTarget = "1.8"
35
33
  }
34
+ buildFeatures {
35
+ compose = true
36
+ }
37
+ composeOptions {
38
+ kotlinCompilerExtensionVersion = "1.5.2"
39
+ }
36
40
  }
37
-
38
41
  dependencies {
42
+ // Android
39
43
  implementation("androidx.core:core-ktx:1.9.0")
40
44
  implementation("androidx.appcompat:appcompat:1.6.1")
41
45
  implementation("androidx.browser:browser:1.5.0")
42
46
  implementation("com.google.android.material:material:1.9.0")
47
+
48
+ // Jetpack Compose
49
+ implementation(platform("androidx.compose:compose-bom:2023.06.01"))
50
+ implementation("androidx.compose.material3:material3")
51
+ implementation("androidx.compose.ui:ui-tooling-preview")
52
+ debugImplementation("androidx.compose.ui:ui-tooling")
53
+ implementation("androidx.activity:activity-compose:1.7.2")
54
+
55
+ // Turbo Android
43
56
  implementation("dev.hotwire:turbo:7.0.0")
44
57
  }
@@ -6,6 +6,7 @@
6
6
  { "patterns": ["/recede_historical_location"], "properties": { "presentation": "pop" } },
7
7
  { "patterns": ["/resume_historical_location"], "properties": { "presentation": "none" } },
8
8
  { "patterns": ["^/$"], "properties": { "uri": "turbo://fragment/web/home", "presentation": "replace_all" } },
9
- { "patterns": ["/new$", "/edit$"], "properties": { "context": "modal", "uri": "turbo://fragment/web/modal" } }
9
+ { "patterns": ["/new$", "/edit$"], "properties": { "context": "modal", "uri": "turbo://fragment/web/modal" } },
10
+ { "patterns": ["/numbers$"], "properties": { "uri": "turbo://fragment/numbers", "title": "Numbers" } }
10
11
  ]
11
12
  }
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <androidx.constraintlayout.widget.ConstraintLayout
3
+ xmlns:android="http://schemas.android.com/apk/res/android"
4
+ xmlns:app="http://schemas.android.com/apk/res-auto"
5
+ android:layout_width="match_parent"
6
+ android:layout_height="match_parent">
7
+
8
+ <com.google.android.material.appbar.AppBarLayout
9
+ android:id="@+id/app_bar"
10
+ android:layout_width="match_parent"
11
+ android:layout_height="56dp"
12
+ app:layout_constraintEnd_toEndOf="parent"
13
+ app:layout_constraintStart_toStartOf="parent"
14
+ app:layout_constraintTop_toTopOf="parent">
15
+
16
+ <FrameLayout
17
+ android:layout_width="match_parent"
18
+ android:layout_height="match_parent">
19
+
20
+ <com.google.android.material.appbar.MaterialToolbar
21
+ android:id="@+id/toolbar"
22
+ android:layout_width="match_parent"
23
+ android:layout_height="wrap_content" />
24
+
25
+ </FrameLayout>
26
+
27
+ </com.google.android.material.appbar.AppBarLayout>
28
+
29
+ <androidx.compose.ui.platform.ComposeView
30
+ android:id="@+id/compose_view"
31
+ android:layout_width="match_parent"
32
+ android:layout_height="0dp"
33
+ app:layout_constraintBottom_toBottomOf="parent"
34
+ app:layout_constraintTop_toBottomOf="@+id/app_bar" />
35
+
36
+ </androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,5 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
+ <color name="color_brand">#5cd8e5</color>
3
4
  <color name="black">#FF000000</color>
4
5
  <color name="white">#FFFFFFFF</color>
5
- </resources>
6
+ </resources>
@@ -1,5 +1,7 @@
1
1
  <resources xmlns:tools="http://schemas.android.com/tools">
2
2
  <style name="Theme.<%= name %>" parent="Theme.Material3.DayNight.NoActionBar">
3
- <!-- Customize your theme here. -->
3
+ <item name="colorPrimary">@color/color_brand</item>
4
+ <item name="colorPrimaryDark">@color/color_brand</item>
5
+ <item name="colorAccent">@color/color_brand</item>
4
6
  </style>
5
7
  </resources>
@@ -5,6 +5,7 @@
5
5
  { "patterns": ["/recede_historical_location"], "properties": { "presentation": "pop", "visitable": false } },
6
6
  { "patterns": ["/resume_historical_location"], "properties": { "presentation": "none", "visitable": false } },
7
7
  { "patterns": ["^/$"], "properties": { "presentation": "replace-all" } },
8
- { "patterns": ["/new$", "/edit$", "/signin$"], "properties": { "presentation": "modal" } }
8
+ { "patterns": ["/new$", "/edit$", "/signin$"], "properties": { "presentation": "modal" } },
9
+ { "patterns": ["/numbers$"], "properties": { "view-controller": "numbers" } }
9
10
  ]
10
11
  }
@@ -0,0 +1,31 @@
1
+ import SwiftUI
2
+
3
+ class NumbersViewController: UIHostingController<NumbersView> {
4
+ init() {
5
+ super.init(rootView: NumbersView())
6
+ }
7
+
8
+ required init(coder aDecoder: NSCoder) {
9
+ fatalError("init(coder:) has not been implemented")
10
+ }
11
+
12
+ override func viewDidLoad() {
13
+ super.viewDidLoad(); title = "Numbers"
14
+ }
15
+ }
16
+
17
+ struct NumbersView: View {
18
+ private let numbers = 1 ... 100
19
+
20
+ var body: some View {
21
+ List(numbers, id: \.self) { number in
22
+ Text("Row \(number)")
23
+ }
24
+ }
25
+ }
26
+
27
+ struct NumbersView_Preview: PreviewProvider {
28
+ static var previews: some View {
29
+ NumbersView()
30
+ }
31
+ }
@@ -26,9 +26,9 @@ class TurboNavigationController : UINavigationController {
26
26
  let viewController = makeViewController(for: url, properties: properties)
27
27
  navigate(to: viewController, action: options.action, properties: properties)
28
28
 
29
- // - Initiate the visit with Turbo
29
+ // Initiate the visit with Turbo
30
30
  if isVisitable(properties) {
31
- visit(viewController: viewController, with: options)
31
+ visit(viewController: viewController, with: options, modal: isModal(properties))
32
32
  }
33
33
  }
34
34
  }
@@ -75,35 +75,32 @@ extension TurboNavigationController {
75
75
  if let viewController = properties["view-controller"] as? String {
76
76
  switch viewController {
77
77
  case "numbers":
78
- assertionFailure("NumbersViewController is not implemented")
78
+ return NumbersViewController()
79
79
  default:
80
- assertionFailure("Invalid view controller, defaulting to WebView")
80
+ return ViewController(url: url)
81
81
  }
82
+ } else {
83
+ return ViewController(url: url)
82
84
  }
83
-
84
- return ViewController(url: url)
85
85
  }
86
86
 
87
- private func navigate(to viewController: UIViewController, action: VisitAction, properties: PathProperties = [:], animated: Bool = true) {
88
- let modalNavController = UINavigationController(rootViewController: viewController)
89
- modalNavController.modalPresentationStyle = .fullScreen
90
-
87
+ private func navigate(to viewController: UIViewController, action: VisitAction, properties: PathProperties = [:]) {
91
88
  if isModal(properties) {
92
- present(modalNavController, animated: animated)
93
- } else if isClearAll(properties) {
94
- popToRootViewController(animated: true)
89
+ present(UINavigationController(rootViewController: viewController), animated: true)
95
90
  } else if isPop(properties) {
96
91
  popViewController(animated: true)
97
92
  } else if isRefresh(properties) {
98
93
  session.reload()
99
94
  } else if isNone(properties) {
100
95
  // Will result in no navigation action being taken
96
+ } else if isClearAll(properties) {
97
+ popToRootViewController(animated: true)
101
98
  } else if isReplaceAll(properties) {
102
99
  setViewControllers([viewController], animated: false)
103
100
  } else if isReplace(properties) || action == .replace {
104
101
  setViewControllers(Array(viewControllers.dropLast()) + [viewController], animated: false)
105
102
  } else {
106
- pushViewController(viewController, animated: animated)
103
+ pushViewController(viewController, animated: true)
107
104
  }
108
105
  }
109
106
 
@@ -10,7 +10,7 @@ final class ViewController: VisitableViewController, ErrorPresenter {
10
10
  navigationItem.backButtonDisplayMode = .minimal
11
11
 
12
12
  if presentingViewController != nil {
13
- navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(dismissModal))
13
+ navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(dismissModal))
14
14
  }
15
15
  }
16
16
 
@@ -15,8 +15,6 @@ final class SceneDelegate: UIResponder {
15
15
  private func configureRootViewController() {
16
16
  guard let window = window else { fatalError() }
17
17
 
18
- window.tintColor = UIColor(named: "Tint")
19
-
20
18
  navigationController = window.rootViewController as? TurboNavigationController
21
19
  navigationController.session = session
22
20
  navigationController.modalSession = modalSession
@@ -1,6 +1,33 @@
1
1
  {
2
2
  "colors" : [
3
3
  {
4
+ "color" : {
5
+ "color-space" : "display-p3",
6
+ "components" : {
7
+ "alpha" : "1.000",
8
+ "blue" : "0.898",
9
+ "green" : "0.847",
10
+ "red" : "0.361"
11
+ }
12
+ },
13
+ "idiom" : "universal"
14
+ },
15
+ {
16
+ "appearances" : [
17
+ {
18
+ "appearance" : "luminosity",
19
+ "value" : "dark"
20
+ }
21
+ ],
22
+ "color" : {
23
+ "color-space" : "display-p3",
24
+ "components" : {
25
+ "alpha" : "1.000",
26
+ "blue" : "0.898",
27
+ "green" : "0.847",
28
+ "red" : "0.361"
29
+ }
30
+ },
4
31
  "idiom" : "universal"
5
32
  }
6
33
  ],
@@ -3,30 +3,15 @@
3
3
  <device id="retina6_12" orientation="portrait" appearance="light"/>
4
4
  <dependencies>
5
5
  <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
6
- <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7
- <capability name="System colors in document resources" minToolsVersion="11.0"/>
8
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9
6
  </dependencies>
10
7
  <scenes>
11
8
  <!--Turbo Navigation Controller-->
12
9
  <scene sceneID="s0d-6b-0kx">
13
10
  <objects>
14
- <viewController id="Y6W-OH-hqX" customClass="TurboNavigationController" customModule="<%= name %>" customModuleProvider="target" sceneMemberID="viewController">
15
- <view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
16
- <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
17
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18
- <viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
19
- <color key="backgroundColor" systemColor="systemBackgroundColor"/>
20
- </view>
21
- </viewController>
11
+ <viewController id="Y6W-OH-hqX" customClass="TurboNavigationController" customModule="TurboNativeProjectIos" customModuleProvider="target" sceneMemberID="viewController"/>
22
12
  <placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
23
13
  </objects>
24
14
  <point key="canvasLocation" x="130" y="-2"/>
25
15
  </scene>
26
16
  </scenes>
27
- <resources>
28
- <systemColor name="systemBackgroundColor">
29
- <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
30
- </systemColor>
31
- </resources>
32
17
  </document>
@@ -18,6 +18,7 @@
18
18
  5DCC50EE2A95A27600B529A0 /* ErrorPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC50ED2A95A27600B529A0 /* ErrorPresenter.swift */; };
19
19
  5DCC50F12A95A66700B529A0 /* Turbo in Frameworks */ = {isa = PBXBuildFile; productRef = 5DCC50F02A95A66700B529A0 /* Turbo */; };
20
20
  5DCC50F32A95A7E600B529A0 /* <%= name %>.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC50F22A95A7E600B529A0 /* <%= name %>.swift */; };
21
+ 5DDD58812AA9A8BE00FAC961 /* NumbersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DDD58802AA9A8BE00FAC961 /* NumbersViewController.swift */; };
21
22
  /* End PBXBuildFile section */
22
23
 
23
24
  /* Begin PBXFileReference section */
@@ -33,6 +34,7 @@
33
34
  5DCC50E92A95A19600B529A0 /* path-configuration.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "path-configuration.json"; sourceTree = "<group>"; };
34
35
  5DCC50ED2A95A27600B529A0 /* ErrorPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorPresenter.swift; sourceTree = "<group>"; };
35
36
  5DCC50F22A95A7E600B529A0 /* <%= name %>.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = <%= name %>.swift; sourceTree = "<group>"; };
37
+ 5DDD58802AA9A8BE00FAC961 /* NumbersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumbersViewController.swift; sourceTree = "<group>"; };
36
38
  /* End PBXFileReference section */
37
39
 
38
40
  /* Begin PBXFrameworksBuildPhase section */
@@ -90,6 +92,7 @@
90
92
  5DCC50ED2A95A27600B529A0 /* ErrorPresenter.swift */,
91
93
  5DCC50E72A95A0D900B529A0 /* TurboNavigationController.swift */,
92
94
  5DCC50D72A959DF900B529A0 /* ViewController.swift */,
95
+ 5DDD58802AA9A8BE00FAC961 /* NumbersViewController.swift */,
93
96
  );
94
97
  path = Controllers;
95
98
  sourceTree = "<group>";
@@ -192,6 +195,7 @@
192
195
  buildActionMask = 2147483647;
193
196
  files = (
194
197
  5DCC50D82A959DF900B529A0 /* ViewController.swift in Sources */,
198
+ 5DDD58812AA9A8BE00FAC961 /* NumbersViewController.swift in Sources */,
195
199
  5DCC50D42A959DF900B529A0 /* AppDelegate.swift in Sources */,
196
200
  5DCC50E82A95A0D900B529A0 /* TurboNavigationController.swift in Sources */,
197
201
  5DCC50D62A959DF900B529A0 /* SceneDelegate.swift in Sources */,
@@ -5,6 +5,7 @@
5
5
  { "patterns": ["/recede_historical_location"], "properties": { "presentation": "pop", "visitable": false } },
6
6
  { "patterns": ["/resume_historical_location"], "properties": { "presentation": "none", "visitable": false } },
7
7
  { "patterns": ["^/$"], "properties": { "presentation": "replace-all" } },
8
- { "patterns": ["/new$", "/edit$"], "properties": { "presentation": "modal" } }
8
+ { "patterns": ["/new$", "/edit$"], "properties": { "presentation": "modal" } },
9
+ { "patterns": ["/numbers$"], "properties": { "view-controller": "numbers" } }
9
10
  ]
10
11
  }
@@ -0,0 +1,31 @@
1
+ import SwiftUI
2
+
3
+ class NumbersViewController: UIHostingController<NumbersView> {
4
+ init() {
5
+ super.init(rootView: NumbersView())
6
+ }
7
+
8
+ required init(coder aDecoder: NSCoder) {
9
+ fatalError("init(coder:) has not been implemented")
10
+ }
11
+
12
+ override func viewDidLoad() {
13
+ super.viewDidLoad(); title = "Numbers"
14
+ }
15
+ }
16
+
17
+ struct NumbersView: View {
18
+ private let numbers = 1 ... 100
19
+
20
+ var body: some View {
21
+ List(numbers, id: \.self) { number in
22
+ Text("Row \(number)")
23
+ }
24
+ }
25
+ }
26
+
27
+ struct NumbersView_Preview: PreviewProvider {
28
+ static var previews: some View {
29
+ NumbersView()
30
+ }
31
+ }
@@ -26,9 +26,9 @@ class TurboNavigationController : UINavigationController {
26
26
  let viewController = makeViewController(for: url, properties: properties)
27
27
  navigate(to: viewController, action: options.action, properties: properties)
28
28
 
29
- // - Initiate the visit with Turbo
29
+ // Initiate the visit with Turbo
30
30
  if isVisitable(properties) {
31
- visit(viewController: viewController, with: options)
31
+ visit(viewController: viewController, with: options, modal: isModal(properties))
32
32
  }
33
33
  }
34
34
  }
@@ -75,35 +75,32 @@ extension TurboNavigationController {
75
75
  if let viewController = properties["view-controller"] as? String {
76
76
  switch viewController {
77
77
  case "numbers":
78
- assertionFailure("NumbersViewController is not implemented")
78
+ return NumbersViewController()
79
79
  default:
80
- assertionFailure("Invalid view controller, defaulting to WebView")
80
+ return ViewController(url: url)
81
81
  }
82
+ } else {
83
+ return ViewController(url: url)
82
84
  }
83
-
84
- return ViewController(url: url)
85
85
  }
86
86
 
87
- private func navigate(to viewController: UIViewController, action: VisitAction, properties: PathProperties = [:], animated: Bool = true) {
88
- let modalNavController = UINavigationController(rootViewController: viewController)
89
- modalNavController.modalPresentationStyle = .fullScreen
90
-
87
+ private func navigate(to viewController: UIViewController, action: VisitAction, properties: PathProperties = [:]) {
91
88
  if isModal(properties) {
92
- present(modalNavController, animated: animated)
93
- } else if isClearAll(properties) {
94
- popToRootViewController(animated: true)
89
+ present(UINavigationController(rootViewController: viewController), animated: true)
95
90
  } else if isPop(properties) {
96
91
  popViewController(animated: true)
97
92
  } else if isRefresh(properties) {
98
93
  session.reload()
99
94
  } else if isNone(properties) {
100
95
  // Will result in no navigation action being taken
96
+ } else if isClearAll(properties) {
97
+ popToRootViewController(animated: true)
101
98
  } else if isReplaceAll(properties) {
102
99
  setViewControllers([viewController], animated: false)
103
100
  } else if isReplace(properties) || action == .replace {
104
101
  setViewControllers(Array(viewControllers.dropLast()) + [viewController], animated: false)
105
102
  } else {
106
- pushViewController(viewController, animated: animated)
103
+ pushViewController(viewController, animated: true)
107
104
  }
108
105
  }
109
106
 
@@ -10,7 +10,7 @@ final class ViewController: VisitableViewController, ErrorPresenter {
10
10
  navigationItem.backButtonDisplayMode = .minimal
11
11
 
12
12
  if presentingViewController != nil {
13
- navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(dismissModal))
13
+ navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(dismissModal))
14
14
  }
15
15
  }
16
16
 
@@ -31,8 +31,6 @@ final class SceneDelegate: UIResponder {
31
31
  private func configureRootViewController() {
32
32
  guard let window = window else { fatalError() }
33
33
 
34
- window.tintColor = UIColor(named: "Tint")
35
-
36
34
  tabBarController = window.rootViewController as? UITabBarController
37
35
 
38
36
  navigationController1.session = session1
@@ -65,7 +63,7 @@ final class SceneDelegate: UIResponder {
65
63
 
66
64
  private func session() -> Session {
67
65
  navigationController().session
68
- }
66
+ }
69
67
 
70
68
  // MARK: - Path Configuration
71
69
 
@@ -1,6 +1,33 @@
1
1
  {
2
2
  "colors" : [
3
3
  {
4
+ "color" : {
5
+ "color-space" : "display-p3",
6
+ "components" : {
7
+ "alpha" : "1.000",
8
+ "blue" : "0.898",
9
+ "green" : "0.847",
10
+ "red" : "0.361"
11
+ }
12
+ },
13
+ "idiom" : "universal"
14
+ },
15
+ {
16
+ "appearances" : [
17
+ {
18
+ "appearance" : "luminosity",
19
+ "value" : "dark"
20
+ }
21
+ ],
22
+ "color" : {
23
+ "color-space" : "display-p3",
24
+ "components" : {
25
+ "alpha" : "1.000",
26
+ "blue" : "0.898",
27
+ "green" : "0.847",
28
+ "red" : "0.361"
29
+ }
30
+ },
4
31
  "idiom" : "universal"
5
32
  }
6
33
  ],
@@ -3,37 +3,23 @@
3
3
  <device id="retina6_12" orientation="portrait" appearance="light"/>
4
4
  <dependencies>
5
5
  <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
6
- <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7
- <capability name="System colors in document resources" minToolsVersion="11.0"/>
8
6
  <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9
7
  </dependencies>
10
8
  <scenes>
11
- <!--Item 2-->
9
+ <!--Turbo Navigation Controller-->
12
10
  <scene sceneID="GwE-Ch-DRP">
13
11
  <objects>
14
- <viewController id="cXb-wA-NUs" customClass="TurboNavigationController" customModule="ContactsIOS" customModuleProvider="target" sceneMemberID="viewController">
15
- <view key="view" contentMode="scaleToFill" id="WTF-II-zfk">
16
- <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
17
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18
- <viewLayoutGuide key="safeArea" id="CoL-dA-Hxa"/>
19
- <color key="backgroundColor" systemColor="systemBackgroundColor"/>
20
- </view>
12
+ <viewController id="cXb-wA-NUs" customClass="TurboNavigationController" customModule="TurboNativeProjectIos" customModuleProvider="target" sceneMemberID="viewController">
21
13
  <tabBarItem key="tabBarItem" title="" image="gear" catalog="system" id="rhZ-zi-yeq"/>
22
14
  </viewController>
23
15
  <placeholder placeholderIdentifier="IBFirstResponder" id="ife-PY-okT" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
24
16
  </objects>
25
17
  <point key="canvasLocation" x="1271" y="-647"/>
26
18
  </scene>
27
- <!--Item 1-->
19
+ <!--Turbo Navigation Controller-->
28
20
  <scene sceneID="pAD-IL-Hdw">
29
21
  <objects>
30
- <viewController id="0en-nE-vJA" customClass="TurboNavigationController" customModule="ContactsIOS" customModuleProvider="target" sceneMemberID="viewController">
31
- <view key="view" contentMode="scaleToFill" id="bFn-PZ-ClM">
32
- <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
33
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
34
- <viewLayoutGuide key="safeArea" id="K5f-nY-Cgh"/>
35
- <color key="backgroundColor" systemColor="systemBackgroundColor"/>
36
- </view>
22
+ <viewController id="0en-nE-vJA" customClass="TurboNavigationController" customModule="TurboNativeProjectIos" customModuleProvider="target" sceneMemberID="viewController">
37
23
  <tabBarItem key="tabBarItem" title="" image="house" catalog="system" id="ZWo-HO-m4a"/>
38
24
  </viewController>
39
25
  <placeholder placeholderIdentifier="IBFirstResponder" id="GRr-XE-fAM" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
@@ -61,9 +47,6 @@
61
47
  </scenes>
62
48
  <resources>
63
49
  <image name="gear" catalog="system" width="128" height="122"/>
64
- <image name="house" catalog="system" width="128" height="93"/>
65
- <systemColor name="systemBackgroundColor">
66
- <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
67
- </systemColor>
50
+ <image name="house" catalog="system" width="128" height="104"/>
68
51
  </resources>
69
52
  </document>
@@ -18,6 +18,7 @@
18
18
  5DCC50EE2A95A27600B529A0 /* ErrorPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC50ED2A95A27600B529A0 /* ErrorPresenter.swift */; };
19
19
  5DCC50F12A95A66700B529A0 /* Turbo in Frameworks */ = {isa = PBXBuildFile; productRef = 5DCC50F02A95A66700B529A0 /* Turbo */; };
20
20
  5DCC50F32A95A7E600B529A0 /* <%= name %>.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC50F22A95A7E600B529A0 /* <%= name %>.swift */; };
21
+ 5DDD58812AA9A8BE00FAC961 /* NumbersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DDD58802AA9A8BE00FAC961 /* NumbersViewController.swift */; };
21
22
  /* End PBXBuildFile section */
22
23
 
23
24
  /* Begin PBXFileReference section */
@@ -33,6 +34,7 @@
33
34
  5DCC50E92A95A19600B529A0 /* path-configuration.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "path-configuration.json"; sourceTree = "<group>"; };
34
35
  5DCC50ED2A95A27600B529A0 /* ErrorPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorPresenter.swift; sourceTree = "<group>"; };
35
36
  5DCC50F22A95A7E600B529A0 /* <%= name %>.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = <%= name %>.swift; sourceTree = "<group>"; };
37
+ 5DDD58802AA9A8BE00FAC961 /* NumbersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumbersViewController.swift; sourceTree = "<group>"; };
36
38
  /* End PBXFileReference section */
37
39
 
38
40
  /* Begin PBXFrameworksBuildPhase section */
@@ -90,6 +92,7 @@
90
92
  5DCC50ED2A95A27600B529A0 /* ErrorPresenter.swift */,
91
93
  5DCC50E72A95A0D900B529A0 /* TurboNavigationController.swift */,
92
94
  5DCC50D72A959DF900B529A0 /* ViewController.swift */,
95
+ 5DDD58802AA9A8BE00FAC961 /* NumbersViewController.swift */,
93
96
  );
94
97
  path = Controllers;
95
98
  sourceTree = "<group>";
@@ -192,6 +195,7 @@
192
195
  buildActionMask = 2147483647;
193
196
  files = (
194
197
  5DCC50D82A959DF900B529A0 /* ViewController.swift in Sources */,
198
+ 5DDD58812AA9A8BE00FAC961 /* NumbersViewController.swift in Sources */,
195
199
  5DCC50D42A959DF900B529A0 /* AppDelegate.swift in Sources */,
196
200
  5DCC50E82A95A0D900B529A0 /* TurboNavigationController.swift in Sources */,
197
201
  5DCC50D62A959DF900B529A0 /* SceneDelegate.swift in Sources */,
@@ -1,3 +1,3 @@
1
1
  module TurboNativeInitializer
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo-native-initializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-07 00:00:00.000000000 Z
11
+ date: 2023-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -42,6 +42,8 @@ files:
42
42
  - lib/turbo_native_initializer.rb
43
43
  - lib/turbo_native_initializer/generator.rb
44
44
  - lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/base/NavDestination.kt.tt
45
+ - lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NativeFragment.kt.tt
46
+ - lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
45
47
  - lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/web/WebFragment.kt.tt
46
48
  - lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/web/WebHomeFragment.kt.tt
47
49
  - lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/web/WebModalFragment.kt.tt
@@ -62,6 +64,7 @@ files:
62
64
  - lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/drawable/ic_close.xml
63
65
  - lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/drawable/ic_launcher_foreground.xml
64
66
  - lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/layout/activity_main.xml.tt
67
+ - lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/layout/fragment_native.xml
65
68
  - lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/layout/fragment_web_home.xml
66
69
  - lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
67
70
  - lib/turbo_native_initializer/templates/android_stack/base/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -82,6 +85,8 @@ files:
82
85
  - lib/turbo_native_initializer/templates/android_stack/base/local.properties
83
86
  - lib/turbo_native_initializer/templates/android_stack/base/settings.gradle.kts.tt
84
87
  - lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/base/NavDestination.kt.tt
88
+ - lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NativeFragment.kt.tt
89
+ - lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
85
90
  - lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/web/WebFragment.kt.tt
86
91
  - lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/web/WebHomeFragment.kt.tt
87
92
  - lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/web/WebModalFragment.kt.tt
@@ -106,6 +111,7 @@ files:
106
111
  - lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/drawable/ic_launcher_foreground.xml
107
112
  - lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/drawable/ic_settings.xml
108
113
  - lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/layout/activity_main.xml.tt
114
+ - lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/layout/fragment_native.xml
109
115
  - lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/layout/fragment_web_home.xml
110
116
  - lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/menu/bottom_navigation_menu.xml
111
117
  - lib/turbo_native_initializer/templates/android_tabs/base/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -133,6 +139,7 @@ files:
133
139
  - lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Configuration/Info.plist
134
140
  - lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Configuration/path-configuration.json
135
141
  - lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ErrorPresenter.swift
142
+ - lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/NumbersViewController.swift
136
143
  - lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/TurboNavigationController.swift
137
144
  - lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/ViewController.swift
138
145
  - lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Delegates/AppDelegate.swift
@@ -153,6 +160,7 @@ files:
153
160
  - lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Configuration/Info.plist
154
161
  - lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Configuration/path-configuration.json
155
162
  - lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ErrorPresenter.swift
163
+ - lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/NumbersViewController.swift
156
164
  - lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/TurboNavigationController.swift
157
165
  - lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/ViewController.swift
158
166
  - lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Delegates/AppDelegate.swift