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 +4 -4
- data/app/assets/stylesheets/ruby_native.css +19 -5
- data/config/signals.yml +3 -0
- data/lib/ruby_native/helper.rb +4 -1
- data/lib/ruby_native/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e0a826512a814c411dd4edc4e8e6180d00c6b8f8d3c051520d613f5b089dfcf5
|
|
4
|
+
data.tar.gz: db4b8cae640abe1b6ac5413d46e7b491de7b944361b948875b1e59bca6ec7c46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
30
|
-
Pair with :active styles for pressed feedback;
|
|
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]
|
|
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
data/lib/ruby_native/helper.rb
CHANGED
|
@@ -90,13 +90,16 @@ module RubyNative
|
|
|
90
90
|
tag.button(label, **options)
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
-
|
|
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
|
data/lib/ruby_native/version.rb
CHANGED
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
|
+
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.
|
|
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: []
|