ruby_native 0.19.1 → 0.20.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: 781df25f5a04d4f1d797f8004248c71e5e9f6b73d18965b4036e51bd8990f021
4
- data.tar.gz: b232c5cdfd1f2cda62214936b27ae08e840f1666c0feecdd4e92bd7fd7b70c1c
3
+ metadata.gz: e0a826512a814c411dd4edc4e8e6180d00c6b8f8d3c051520d613f5b089dfcf5
4
+ data.tar.gz: db4b8cae640abe1b6ac5413d46e7b491de7b944361b948875b1e59bca6ec7c46
5
5
  SHA512:
6
- metadata.gz: 5afe36bca245ee30724d854b2d11b8684090ae7fd4d441f1d5d8f6267113c3abbc18533fedfe0654ee3800d8e78509b0322b41675d282483ae3dc4a6de247695
7
- data.tar.gz: d2334ac64c9a9283ddacbd4230fb6e965ddf9fec9f909bb91b6c0675e73c0e15ebcb064d77e93c8aa15c31733cec9ae47adc7531cefdeb8d9386880cfe4d1715
6
+ metadata.gz: b6ce0830c95718f3a084fd90e7948c22fe18953d2e3364983ffec6bc6c079309d4e4ca8d03bb58827c9568d70dd44194a99881f66391fae3c8c0765eefc78bc6
7
+ data.tar.gz: bd5f6dc74e6709ad7736a4602430647d91648ed694f49e75e7612d5cc2cab372677d7214cdb9e5161cd78ab53bf4de453101a4685810aceddb2e0c98980acecd
@@ -26,20 +26,34 @@
26
26
  }
27
27
 
28
28
  /* In-app defaults so pages feel native without any setup: no gray tap flash,
29
- no selecting button labels on long-press, no double-tap zoom on controls.
30
- Pair with :active styles for pressed feedback; the bridge makes them apply
31
- instantly on touch. */
29
+ no selecting text or popping link and image previews on long-press, no
30
+ double-tap zoom on controls. Pair with :active styles for pressed feedback;
31
+ the bridge makes them apply instantly on touch. */
32
32
  [data-native-app] * {
33
33
  -webkit-tap-highlight-color: transparent;
34
34
  }
35
35
 
36
- [data-native-app] button,
37
- [data-native-app] [role="button"] {
36
+ [data-native-app] body {
38
37
  -webkit-user-select: none;
39
38
  user-select: none;
39
+ }
40
+
41
+ [data-native-app] a,
42
+ [data-native-app] img,
43
+ [data-native-app] button,
44
+ [data-native-app] [role="button"] {
40
45
  -webkit-touch-callout: none;
41
46
  }
42
47
 
48
+ /* Fields stay editable, and .native-selectable opts copyable text back in. */
49
+ [data-native-app] input,
50
+ [data-native-app] textarea,
51
+ [data-native-app] [contenteditable],
52
+ [data-native-app] .native-selectable {
53
+ -webkit-user-select: text;
54
+ user-select: text;
55
+ }
56
+
43
57
  [data-native-app] a,
44
58
  [data-native-app] button,
45
59
  [data-native-app] input,
data/config/signals.yml CHANGED
@@ -36,6 +36,9 @@ signals:
36
36
  data-native-badge-tab:
37
37
  since: "0.3.2"
38
38
  helper: native_badge_tag
39
+ data-native-badge-tabs:
40
+ since: "0.19.2"
41
+ helper: native_badge_tag
39
42
  data-native-button:
40
43
  since: "0.4.0"
41
44
  data-native-click:
@@ -90,13 +90,16 @@ module RubyNative
90
90
  tag.button(label, **options)
91
91
  end
92
92
 
93
- def native_badge_tag(count = nil, home: nil, tab: nil)
93
+ # A tab value is a count, `true` for a dot, or a short string. `tabs:` badges
94
+ # tabs by their config `key`, while `tab:` targets the tab with `badge: true`.
95
+ def native_badge_tag(count = nil, home: nil, tab: nil, tabs: nil)
94
96
  home = count if count && home.nil?
95
97
  tab = count if count && tab.nil?
96
98
 
97
99
  data = { native_badge: "" }
98
100
  data[:native_badge_home] = home unless home.nil?
99
101
  data[:native_badge_tab] = tab unless tab.nil?
102
+ data[:native_badge_tabs] = tabs.to_h.transform_keys(&:to_s).to_json unless tabs.nil?
100
103
 
101
104
  tag.div(data: data, hidden: true)
102
105
  end
@@ -1,3 +1,3 @@
1
1
  module RubyNative
2
- VERSION = "0.19.1"
2
+ VERSION = "0.20.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.19.1
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Masilotti
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  requirements: []
160
- rubygems_version: 4.0.3
160
+ rubygems_version: 4.0.20
161
161
  specification_version: 4
162
162
  summary: Turn your existing Rails app into a native iOS and Android app.
163
163
  test_files: []