ruby_native 0.4.2 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01f2c8c5e6340f0306c4e705dd894e43e2011ec92a0ebd2caaad64ea549d37eb
4
- data.tar.gz: 5ee367c90d6312ad073e12d33983b781a781afcf647e7742ffb89446b3d5896c
3
+ metadata.gz: 2a9874ed5b3d89d70bbfdc1823dc9fdb9f21d069d9d7c2929f2d8a03fa4c7054
4
+ data.tar.gz: ac20022d1ec9d8572303dc5e88797446363b7b7da0681aad49b5698ad49552b7
5
5
  SHA512:
6
- metadata.gz: 12e5915ede8d9ed831e01be7d921d88d6c0529851fc7340d79d55b5e93dfe4c9929b548a7f13b1ac81a92edcbc14b436d609d1fef1b99cea90c157ffc7ad86a7
7
- data.tar.gz: dd89d5b86d0107bed2f3e262be86b2c1ce7f6c4dcab657c4ed785a3b7b9b6d99ed73c90da3fda06c6ac2cbe3609b40e3eadf59a6ca8d9016f0364b413fb1c40e
6
+ metadata.gz: '00951e78cd2b45e19baae4563e1bdbed1b292ddc2996ad4e698482dd5ea5fa322d596a1679411c2dadb7ea26d0a1e12a84f6bddab8dfb819f721a00bc8b126fd'
7
+ data.tar.gz: 85f23e39ddfd0ebc4890d5a30ad02431855f4e8bf986e5fee7810ee362a357a0daec754e95bcbc926aef28f0e277dfb17c70729eb5b60da01beb167d9080b20a
data/README.md CHANGED
@@ -35,7 +35,6 @@ Edit `config/ruby_native.yml`:
35
35
  appearance:
36
36
  tint_color: "#4F46E5"
37
37
  background_color: "#FFFFFF"
38
- status_bar_color: "#FFFFFF"
39
38
  tabs: # optional
40
39
  - title: Home
41
40
  path: /
@@ -2,6 +2,20 @@
2
2
  display: none !important;
3
3
  }
4
4
 
5
+ .native-inset-top::before,
6
+ .native-inset::before {
7
+ content: "";
8
+ display: block;
9
+ height: env(safe-area-inset-top);
10
+ }
11
+
12
+ .native-inset-bottom::after,
13
+ .native-inset::after {
14
+ content: "";
15
+ display: block;
16
+ height: env(safe-area-inset-bottom);
17
+ }
18
+
5
19
  .native-back-button {
6
20
  display: none;
7
21
  }
@@ -41,6 +41,14 @@ export function NativeMenuItem({ title, href, click, icon, selected }) {
41
41
  return createElement("div", props)
42
42
  }
43
43
 
44
+ export function NativeOverscroll({ top, bottom }) {
45
+ return createElement("div", {
46
+ "data-native-overscroll-top": top,
47
+ "data-native-overscroll-bottom": bottom || top,
48
+ hidden: true
49
+ })
50
+ }
51
+
44
52
  export function NativeSubmitButton({ title = "Save", click = "[type='submit']" }) {
45
53
  return createElement("div", {
46
54
  "data-native-submit-button": true,
@@ -78,6 +78,21 @@ export const NativeMenuItem = defineComponent({
78
78
  }
79
79
  })
80
80
 
81
+ export const NativeOverscroll = defineComponent({
82
+ name: "NativeOverscroll",
83
+ props: {
84
+ top: { type: String, required: true },
85
+ bottom: String
86
+ },
87
+ render() {
88
+ return h("div", {
89
+ "data-native-overscroll-top": this.top,
90
+ "data-native-overscroll-bottom": this.bottom || this.top,
91
+ hidden: true
92
+ })
93
+ }
94
+ })
95
+
81
96
  export const NativeSubmitButton = defineComponent({
82
97
  name: "NativeSubmitButton",
83
98
  props: {
@@ -54,7 +54,6 @@ app:
54
54
  appearance:
55
55
  tint_color: "#007AFF"
56
56
  background_color: "#FFFFFF"
57
- status_bar_color: "#F8F9FA"
58
57
 
59
58
  tabs:
60
59
  - title: Home
@@ -75,12 +74,9 @@ Color fields accept a plain hex string or an object with `light` and `dark` keys
75
74
  background_color:
76
75
  light: "#FFFFFF"
77
76
  dark: "#212529"
78
- status_bar_color:
79
- light: "#F8F9FA"
80
- dark: "#2B3035"
81
77
  ```
82
78
 
83
- Match these to your CSS framework's dark mode colors. For Bootstrap, `#212529` is `--bs-body-bg` and `#2B3035` is `--bs-tertiary-bg` in dark mode.
79
+ Match these to your CSS framework's dark mode colors. For Bootstrap, `#212529` is `--bs-body-bg` in dark mode.
84
80
 
85
81
  ## View helpers
86
82
 
@@ -5,17 +5,12 @@ app:
5
5
  appearance:
6
6
  tint_color: "#007AFF"
7
7
  background_color: "#FFFFFF"
8
- status_bar_color: "#F8F9FA"
9
8
  # theme: auto # auto (default), light, or dark
10
- # edge_to_edge: true # Let the web view extend behind the status bar (Normal Mode only)
11
9
  # landscape: true # Allow landscape orientation on iPhone (defaults to portrait only)
12
- # Dark mode example (replace the plain strings above):
10
+ # Dark mode example (replace the plain string above):
13
11
  # background_color:
14
12
  # light: "#FFFFFF"
15
13
  # dark: "#1C1C1E"
16
- # status_bar_color:
17
- # light: "#F8F9FA"
18
- # dark: "#1C1C1E"
19
14
 
20
15
  tabs:
21
16
  - title: Home
@@ -410,8 +410,7 @@ module RubyNative
410
410
  {
411
411
  tabs: tabs,
412
412
  tint_color: resolve_color(appearance[:tint_color]),
413
- background_color: resolve_color(appearance[:background_color]),
414
- status_bar_color: resolve_color(appearance[:status_bar_color])
413
+ background_color: resolve_color(appearance[:background_color])
415
414
  }.compact
416
415
  end
417
416
 
@@ -84,6 +84,10 @@ module RubyNative
84
84
  tag.div(data: { native_navbar: title }, hidden: true) { builder.to_html }
85
85
  end
86
86
 
87
+ def native_overscroll_tag(top:, bottom: nil)
88
+ tag.div(data: { native_overscroll_top: top, native_overscroll_bottom: bottom || top }, hidden: true)
89
+ end
90
+
87
91
  def native_haptic_data(feedback = :success, **data)
88
92
  feedback = feedback.to_s
89
93
  feedback = "success" if feedback.empty?
@@ -1,3 +1,3 @@
1
1
  module RubyNative
2
- VERSION = "0.4.2"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_native
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Masilotti
@@ -87,7 +87,7 @@ files:
87
87
  - lib/ruby_native/oauth_middleware.rb
88
88
  - lib/ruby_native/tunnel_cookie_middleware.rb
89
89
  - lib/ruby_native/version.rb
90
- homepage: https://github.com/Ruby-Native/gem
90
+ homepage: https://github.com/ruby-native/gem
91
91
  licenses:
92
92
  - MIT
93
93
  metadata: {}