ruflet_core 0.0.12 → 0.0.13

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.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ruflet/version.rb +1 -1
  3. data/lib/ruflet_protocol/ruflet/protocol.rb +50 -4
  4. data/lib/ruflet_ui/ruflet/control.rb +11 -4
  5. data/lib/ruflet_ui/ruflet/dsl.rb +229 -37
  6. data/lib/ruflet_ui/ruflet/events/gesture_events.rb +113 -9
  7. data/lib/ruflet_ui/ruflet/page.rb +820 -145
  8. data/lib/ruflet_ui/ruflet/types/animation.rb +110 -0
  9. data/lib/ruflet_ui/ruflet/ui/control_registry.rb +1 -0
  10. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheet_control.rb +13 -0
  11. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheetaction_control.rb +4 -0
  12. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactivityindicator_control.rb +4 -0
  13. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoalertdialog_control.rb +17 -0
  14. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoappbar_control.rb +3 -0
  15. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobottomsheet_control.rb +4 -0
  16. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobutton_control.rb +9 -0
  17. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocheckbox_control.rb +6 -0
  18. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenu_control.rb +11 -0
  19. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenuaction_control.rb +4 -0
  20. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodatepicker_control.rb +14 -0
  21. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodialogaction_control.rb +4 -0
  22. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinofilledbutton_control.rb +9 -0
  23. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinolisttile_control.rb +12 -0
  24. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinonavigationbar_control.rb +11 -0
  25. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinopicker_control.rb +18 -0
  26. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoradio_control.rb +6 -0
  27. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinosegmentedbutton_control.rb +2 -0
  28. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslider_control.rb +7 -0
  29. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslidingsegmentedbutton_control.rb +3 -0
  30. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoswitch_control.rb +7 -1
  31. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotextfield_control.rb +7 -0
  32. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotimerpicker_control.rb +18 -0
  33. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotintedbutton_control.rb +9 -0
  34. data/lib/ruflet_ui/ruflet/ui/controls/materials/alertdialog_control.rb +4 -0
  35. data/lib/ruflet_ui/ruflet/ui/controls/materials/appbar_control.rb +4 -0
  36. data/lib/ruflet_ui/ruflet/ui/controls/materials/audio_control.rb +35 -1
  37. data/lib/ruflet_ui/ruflet/ui/controls/materials/autocomplete_control.rb +4 -0
  38. data/lib/ruflet_ui/ruflet/ui/controls/materials/autocompletesuggestion_control.rb +26 -0
  39. data/lib/ruflet_ui/ruflet/ui/controls/materials/badge_control.rb +7 -0
  40. data/lib/ruflet_ui/ruflet/ui/controls/materials/banner_control.rb +11 -1
  41. data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomappbar_control.rb +2 -0
  42. data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomsheet_control.rb +5 -0
  43. data/lib/ruflet_ui/ruflet/ui/controls/materials/button_control.rb +2 -0
  44. data/lib/ruflet_ui/ruflet/ui/controls/materials/card_control.rb +4 -0
  45. data/lib/ruflet_ui/ruflet/ui/controls/materials/chip_control.rb +11 -0
  46. data/lib/ruflet_ui/ruflet/ui/controls/materials/circleavatar_control.rb +12 -0
  47. data/lib/ruflet_ui/ruflet/ui/controls/materials/contextmenu_control.rb +19 -0
  48. data/lib/ruflet_ui/ruflet/ui/controls/materials/datacell_control.rb +4 -0
  49. data/lib/ruflet_ui/ruflet/ui/controls/materials/datacolumn_control.rb +4 -0
  50. data/lib/ruflet_ui/ruflet/ui/controls/materials/datatable_control.rb +34 -0
  51. data/lib/ruflet_ui/ruflet/ui/controls/materials/datepicker_control.rb +18 -0
  52. data/lib/ruflet_ui/ruflet/ui/controls/materials/daterangepicker_control.rb +20 -0
  53. data/lib/ruflet_ui/ruflet/ui/controls/materials/divider_control.rb +9 -0
  54. data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdown_control.rb +11 -0
  55. data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdownoption_control.rb +5 -0
  56. data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanel_control.rb +8 -0
  57. data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanellist_control.rb +6 -0
  58. data/lib/ruflet_ui/ruflet/ui/controls/materials/expansiontile_control.rb +6 -0
  59. data/lib/ruflet_ui/ruflet/ui/controls/materials/filledbutton_control.rb +5 -0
  60. data/lib/ruflet_ui/ruflet/ui/controls/materials/fillediconbutton_control.rb +8 -0
  61. data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonalbutton_control.rb +5 -0
  62. data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonaliconbutton_control.rb +8 -0
  63. data/lib/ruflet_ui/ruflet/ui/controls/materials/floatingactionbutton_control.rb +20 -0
  64. data/lib/ruflet_ui/ruflet/ui/controls/materials/iconbutton_control.rb +4 -0
  65. data/lib/ruflet_ui/ruflet/ui/controls/materials/listtile_control.rb +4 -0
  66. data/lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb +240 -0
  67. data/lib/ruflet_ui/ruflet/ui/controls/materials/menubar_control.rb +2 -0
  68. data/lib/ruflet_ui/ruflet/ui/controls/materials/menuitembutton_control.rb +6 -0
  69. data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationbar_control.rb +11 -1
  70. data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationbardestination_control.rb +2 -0
  71. data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationdrawer_control.rb +12 -1
  72. data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationdrawerdestination_control.rb +2 -0
  73. data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationrail_control.rb +21 -0
  74. data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationraildestination_control.rb +2 -0
  75. data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinedbutton_control.rb +5 -0
  76. data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinediconbutton_control.rb +8 -0
  77. data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenubutton_control.rb +4 -0
  78. data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenuitem_control.rb +6 -0
  79. data/lib/ruflet_ui/ruflet/ui/controls/materials/progressbar_control.rb +9 -0
  80. data/lib/ruflet_ui/ruflet/ui/controls/materials/progressring_control.rb +8 -0
  81. data/lib/ruflet_ui/ruflet/ui/controls/materials/rangeslider_control.rb +13 -0
  82. data/lib/ruflet_ui/ruflet/ui/controls/materials/ruflet_controls.rb +24 -0
  83. data/lib/ruflet_ui/ruflet/ui/controls/materials/searchbar_control.rb +28 -0
  84. data/lib/ruflet_ui/ruflet/ui/controls/materials/segment_control.rb +5 -0
  85. data/lib/ruflet_ui/ruflet/ui/controls/materials/segmentedbutton_control.rb +19 -0
  86. data/lib/ruflet_ui/ruflet/ui/controls/materials/selectionarea_control.rb +4 -0
  87. data/lib/ruflet_ui/ruflet/ui/controls/materials/snackbar_control.rb +5 -0
  88. data/lib/ruflet_ui/ruflet/ui/controls/materials/submenubutton_control.rb +8 -0
  89. data/lib/ruflet_ui/ruflet/ui/controls/materials/tab_control.rb +7 -0
  90. data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbar_control.rb +4 -0
  91. data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbarview_control.rb +7 -0
  92. data/lib/ruflet_ui/ruflet/ui/controls/materials/tabs_control.rb +6 -0
  93. data/lib/ruflet_ui/ruflet/ui/controls/materials/textbutton_control.rb +5 -0
  94. data/lib/ruflet_ui/ruflet/ui/controls/materials/verticaldivider_control.rb +9 -0
  95. data/lib/ruflet_ui/ruflet/ui/controls/materials/video_control.rb +86 -1
  96. data/lib/ruflet_ui/ruflet/ui/controls/ruflet_controls.rb +24 -0
  97. data/lib/ruflet_ui/ruflet/ui/controls/shared/animatedswitcher_control.rb +10 -0
  98. data/lib/ruflet_ui/ruflet/ui/controls/shared/browsercontextmenu_control.rb +12 -1
  99. data/lib/ruflet_ui/ruflet/ui/controls/shared/canvas_control.rb +14 -0
  100. data/lib/ruflet_ui/ruflet/ui/controls/shared/dismissible_control.rb +19 -0
  101. data/lib/ruflet_ui/ruflet/ui/controls/shared/draggable_control.rb +9 -0
  102. data/lib/ruflet_ui/ruflet/ui/controls/shared/dragtarget_control.rb +6 -0
  103. data/lib/ruflet_ui/ruflet/ui/controls/shared/gridview_control.rb +20 -0
  104. data/lib/ruflet_ui/ruflet/ui/controls/shared/image_control.rb +19 -1
  105. data/lib/ruflet_ui/ruflet/ui/controls/shared/interactiveviewer_control.rb +37 -0
  106. data/lib/ruflet_ui/ruflet/ui/controls/shared/listview_control.rb +17 -0
  107. data/lib/ruflet_ui/ruflet/ui/controls/shared/pageview_control.rb +13 -0
  108. data/lib/ruflet_ui/ruflet/ui/controls/shared/placeholder_control.rb +12 -0
  109. data/lib/ruflet_ui/ruflet/ui/controls/shared/reorderabledraghandle_control.rb +4 -0
  110. data/lib/ruflet_ui/ruflet/ui/controls/shared/responsiverow_control.rb +22 -0
  111. data/lib/ruflet_ui/ruflet/ui/controls/shared/safearea_control.rb +11 -0
  112. data/lib/ruflet_ui/ruflet/ui/controls/shared/semantics_control.rb +2 -0
  113. data/lib/ruflet_ui/ruflet/ui/controls/shared/stack_control.rb +3 -0
  114. data/lib/ruflet_ui/ruflet/ui/controls/shared/text_control.rb +20 -1
  115. data/lib/ruflet_ui/ruflet/ui/controls/shared/view_control.rb +8 -0
  116. data/lib/ruflet_ui/ruflet/ui/controls/shared/window_control.rb +16 -0
  117. data/lib/ruflet_ui/ruflet/ui/controls/shared/windowdragarea_control.rb +6 -0
  118. data/lib/ruflet_ui/ruflet/ui/cupertino_control_methods.rb +83 -6
  119. data/lib/ruflet_ui/ruflet/ui/material_control_methods.rb +513 -33
  120. data/lib/ruflet_ui/ruflet/ui/material_control_registry.rb +2 -0
  121. data/lib/ruflet_ui/ruflet/ui/services/ruflet/audio_recorder_control.rb +87 -0
  122. data/lib/ruflet_ui/ruflet/ui/services/ruflet/geolocator_control.rb +85 -0
  123. data/lib/ruflet_ui/ruflet/ui/services/ruflet/permissionhandler_control.rb +53 -0
  124. data/lib/ruflet_ui/ruflet/ui/services/ruflet/securestorage_control.rb +89 -0
  125. data/lib/ruflet_ui/ruflet/ui/services/ruflet/semanticsservice_control.rb +28 -0
  126. data/lib/ruflet_ui/ruflet/ui/services/ruflet/tester_control.rb +126 -0
  127. data/lib/ruflet_ui/ruflet/ui/services/ruflet_services.rb +16 -0
  128. data/lib/ruflet_ui/ruflet/ui/shared_control_forwarders.rb +230 -38
  129. data/lib/ruflet_ui.rb +4 -0
  130. metadata +9 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e49bd65682c6c2c9d4ecf2d6ceee66f4e8bb61f4517cd5a4f46506813fa38224
4
- data.tar.gz: 0ce49c90eacbaf4aa5c6e17b5a9cbb2a5cc8c5940f13fae91e23bd0288fa9870
3
+ metadata.gz: 9f384022aa476f52d7aa7e1315e1a5da2e71071cab839f04f7a0331cdb7da21f
4
+ data.tar.gz: f21fb7e4b2a9f401ef521d278128ac5b436d912182f2d1ddbcbb4b7597f4dfca
5
5
  SHA512:
6
- metadata.gz: 4067f222985f243e3f067db401241f9f7b20d8693753b9eeabcdbdd4545729094686720c5d37904349f3f9c3bb00cb7bb58dcea422dc11eb0403cd1e4352c37b
7
- data.tar.gz: 23bf2a1c2afbd14d9bca577ea5316be156878bbc8c3ad5c0ea42ad91dfed3e07a00f20111342e544fc838c00ae75aeebb6635e1bf0cf58b0b8217e8bf0e05afa
6
+ metadata.gz: f5ffaad8c7cee45c8b756d66d567e3a9e04c13dbb672dedb3c18545f7ecd6374af89b7267fc715711d73f8dc4b1fe3b9f597f5b62ca2fd9181f7dabb336178da
7
+ data.tar.gz: b52faf7ed1f6aa8980ba4c03e64c34c6b13760375261ef1e6121cf52eb774c035d8940d5d9cbb74f86de5174a768d758bba724fafa2f48a77aa1bc6a6d726524
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ruflet
4
- VERSION = "0.0.12" unless const_defined?(:VERSION)
4
+ VERSION = "0.0.13" unless const_defined?(:VERSION)
5
5
  end
@@ -9,6 +9,7 @@ module Ruflet
9
9
  update_control: 4,
10
10
  invoke_control_method: 5,
11
11
  session_crashed: 6,
12
+ python_output: 7,
12
13
 
13
14
  # Legacy JSON protocol aliases kept for compatibility.
14
15
  register_web_client: "registerWebClient",
@@ -19,7 +20,13 @@ module Ruflet
19
20
  module_function
20
21
 
21
22
  def pack_message(action:, payload:)
22
- [action, payload]
23
+ [action_code(action), payload]
24
+ end
25
+
26
+ def action_code(action)
27
+ return action if action.is_a?(Integer) || action.is_a?(String)
28
+
29
+ ACTIONS.fetch(action)
23
30
  end
24
31
 
25
32
  def normalize_register_payload(payload)
@@ -51,11 +58,50 @@ module Ruflet
51
58
  }
52
59
  end
53
60
 
54
- def register_response(session_id:)
61
+ def normalize_patch_control_payload(payload)
62
+ {
63
+ "id" => payload["id"] || payload[:id],
64
+ "patch" => Array(payload["patch"] || payload[:patch])
65
+ }
66
+ end
67
+
68
+ def normalize_invoke_method_payload(payload)
69
+ {
70
+ "control_id" => payload["control_id"] || payload[:control_id],
71
+ "call_id" => payload["call_id"] || payload[:call_id],
72
+ "name" => payload["name"] || payload[:name],
73
+ "args" => payload.key?("args") ? payload["args"] : payload[:args],
74
+ "timeout" => payload.key?("timeout") || payload.key?(:timeout) ? (payload["timeout"] || payload[:timeout]) : 10
75
+ }
76
+ end
77
+
78
+ def normalize_invoke_method_result_payload(payload)
79
+ {
80
+ "control_id" => payload["control_id"] || payload[:control_id],
81
+ "call_id" => payload["call_id"] || payload[:call_id],
82
+ "result" => payload.key?("result") ? payload["result"] : payload[:result],
83
+ "error" => payload.key?("error") ? payload["error"] : payload[:error]
84
+ }
85
+ end
86
+
87
+ def normalize_session_crashed_payload(payload)
88
+ {
89
+ "message" => payload["message"] || payload[:message].to_s
90
+ }
91
+ end
92
+
93
+ def normalize_python_output_payload(payload)
94
+ {
95
+ "text" => payload["text"] || payload[:text].to_s,
96
+ "is_stderr" => payload.key?("is_stderr") || payload.key?(:is_stderr) ? !!(payload["is_stderr"] || payload[:is_stderr]) : false
97
+ }
98
+ end
99
+
100
+ def register_response(session_id:, page_patch: {}, error: nil)
55
101
  {
56
102
  "session_id" => session_id,
57
- "page_patch" => {},
58
- "error" => nil
103
+ "page_patch" => page_patch,
104
+ "error" => error
59
105
  }
60
106
  end
61
107
  end
@@ -93,7 +93,7 @@ module Ruflet
93
93
  when Array
94
94
  value.map { |v| serialize_value(v) }
95
95
  when Hash
96
- value.transform_values { |v| serialize_value(v) }
96
+ value.each_with_object({}) { |(k, v), result| result[k.to_s] = serialize_value(v) }
97
97
  else
98
98
  value.respond_to?(:to_h) ? serialize_value(value.to_h) : value
99
99
  end
@@ -107,6 +107,8 @@ module Ruflet
107
107
  output.keys.each do |key|
108
108
  key_string = key.to_s
109
109
  next unless key_string.start_with?("on_")
110
+ next if key_string.end_with?("_hint_text")
111
+ next if key_string == "on_label_color"
110
112
 
111
113
  event_name = normalized_event_name(key_string)
112
114
  if allowed_events.any? && !allowed_events_set.include?(event_name)
@@ -171,7 +173,7 @@ module Ruflet
171
173
  end
172
174
 
173
175
  def color_prop_key?(key)
174
- key == "color" || key == "bgcolor" || key.end_with?("_color")
176
+ key == "color" || key.end_with?("bgcolor") || key.end_with?("_color")
175
177
  end
176
178
 
177
179
  def normalize_icon_prop(key, value)
@@ -179,6 +181,8 @@ module Ruflet
179
181
  return value if value.nil?
180
182
  return value if value.is_a?(Ruflet::Control)
181
183
  return normalize_icon_name(value.value) if value.is_a?(Ruflet::IconData)
184
+ return value.map { |item| normalize_icon_prop(key, item) } if value.is_a?(Array)
185
+ return value.each_with_object({}) { |(k, v), out| out[k] = normalize_icon_prop(key, v) } if value.is_a?(Hash)
182
186
  return normalize_icon_name(value.to_s) if value.is_a?(String) || value.is_a?(Symbol)
183
187
 
184
188
  raise ArgumentError, "#{type} #{key} must use an icon name string, not #{value.inspect}"
@@ -193,7 +197,9 @@ module Ruflet
193
197
  end
194
198
 
195
199
  def icon_prop_key?(key)
196
- key == "icon" || key.end_with?("_icon")
200
+ return false if key.start_with?("show_")
201
+
202
+ key == "icon" || key.end_with?("_icon") || key == "leading" || key == "trailing"
197
203
  end
198
204
 
199
205
  def normalized_event_name(event_name)
@@ -213,13 +219,14 @@ module Ruflet
213
219
 
214
220
  def property_names
215
221
  constructor_keywords_for_schema_class
216
- .reject { |name| name.to_s.start_with?("on_") }
222
+ .reject { |name| name.to_s.start_with?("on_") && name != :on_label_color }
217
223
  .map(&:to_s)
218
224
  end
219
225
 
220
226
  def event_names
221
227
  constructor_keywords_for_schema_class
222
228
  .select { |name| name.to_s.start_with?("on_") }
229
+ .reject { |name| name == :on_label_color }
223
230
  .map { |name| name.to_s.sub(/\Aon_/, "") }
224
231
  end
225
232
 
@@ -49,57 +49,218 @@ module Ruflet
49
49
  def control(type, **props, &block) = _pending_app.control(type, **props, &block)
50
50
  def widget(type, **props, &block) = _pending_app.widget(type, **props, &block)
51
51
  def service(type, **props, &block) = _pending_app.service(type, **props, &block)
52
- def column(**props, &block) = _pending_app.column(**props, &block)
52
+ def column(children = nil, **props, &block) = _pending_app.column(children, **props, &block)
53
53
  def center(**props, &block) = _pending_app.center(**props, &block)
54
- def row(**props, &block) = _pending_app.row(**props, &block)
55
- def stack(**props, &block) = _pending_app.stack(**props, &block)
56
- def grid_view(**props, &block) = _pending_app.grid_view(**props, &block)
57
- def gridview(**props, &block) = _pending_app.gridview(**props, &block)
54
+ def row(children = nil, **props, &block) = _pending_app.row(children, **props, &block)
55
+ def stack(children = nil, **props, &block) = _pending_app.stack(children, **props, &block)
56
+ def grid_view(children = nil, **props, &block) = _pending_app.grid_view(children, **props, &block)
57
+ def gridview(children = nil, **props, &block) = _pending_app.gridview(children, **props, &block)
58
58
  def container(**props, &block) = _pending_app.container(**props, &block)
59
+ def animated_switcher(content = nil, **props) = _pending_app.animated_switcher(content, **props)
60
+ def animatedswitcher(content = nil, **props) = _pending_app.animatedswitcher(content, **props)
61
+ def animation(duration = nil, **props) = _pending_app.animation(duration, **props)
62
+ def animation_style(**props) = _pending_app.animation_style(**props)
63
+ def audio(**props) = _pending_app.audio(**props)
64
+ def auto_complete(suggestions = nil, **props) = _pending_app.auto_complete(suggestions, **props)
65
+ def autocomplete(suggestions = nil, **props) = _pending_app.autocomplete(suggestions, **props)
66
+ def auto_complete_suggestion(key = nil, **props) = _pending_app.auto_complete_suggestion(key, **props)
67
+ def autocomplete_suggestion(key = nil, **props) = _pending_app.autocomplete_suggestion(key, **props)
68
+ def autocompletesuggestion(key = nil, **props) = _pending_app.autocompletesuggestion(key, **props)
69
+ def context_menu(content = nil, **props) = _pending_app.context_menu(content, **props)
70
+ def contextmenu(content = nil, **props) = _pending_app.contextmenu(content, **props)
71
+ def keyboard_listener(content = nil, **props) = _pending_app.keyboard_listener(content, **props)
72
+ def keyboardlistener(content = nil, **props) = _pending_app.keyboardlistener(content, **props)
59
73
  def gesture_detector(**props, &block) = _pending_app.gesture_detector(**props, &block)
60
74
  def gesturedetector(**props, &block) = _pending_app.gesturedetector(**props, &block)
61
- def draggable(**props, &block) = _pending_app.draggable(**props, &block)
62
- def drag_target(**props, &block) = _pending_app.drag_target(**props, &block)
63
- def dragtarget(**props, &block) = _pending_app.dragtarget(**props, &block)
75
+ def canvas(shapes = nil, **props) = _pending_app.canvas(shapes, **props)
76
+ def line(**props) = _pending_app.line(**props)
77
+ def circle(**props) = _pending_app.circle(**props)
78
+ def arc(**props) = _pending_app.arc(**props)
79
+ def color(**props) = _pending_app.color(**props)
80
+ def canvas_color(**props) = _pending_app.canvas_color(**props)
81
+ def fill(**props) = _pending_app.fill(**props)
82
+ def oval(**props) = _pending_app.oval(**props)
83
+ def points(**props) = _pending_app.points(**props)
84
+ def rect(**props) = _pending_app.rect(**props)
85
+ def path(**props) = _pending_app.path(**props)
86
+ def shadow(**props) = _pending_app.shadow(**props)
87
+ def paint(**props) = _pending_app.paint(**props)
88
+ def path_move_to(x = nil, y = nil, **props) = _pending_app.path_move_to(x, y, **props)
89
+ def path_line_to(x = nil, y = nil, **props) = _pending_app.path_line_to(x, y, **props)
90
+ def path_arc(**props) = _pending_app.path_arc(**props)
91
+ def path_arc_to(**props) = _pending_app.path_arc_to(**props)
92
+ def path_oval(**props) = _pending_app.path_oval(**props)
93
+ def path_rect(**props) = _pending_app.path_rect(**props)
94
+ def path_quadratic_to(**props) = _pending_app.path_quadratic_to(**props)
95
+ def path_cubic_to(**props) = _pending_app.path_cubic_to(**props)
96
+ def path_sub_path(**props) = _pending_app.path_sub_path(**props)
97
+ def path_close(**props) = _pending_app.path_close(**props)
98
+ def draggable(content = nil, **props, &block) = _pending_app.draggable(content, **props, &block)
99
+ def dismissible(content = nil, **props) = _pending_app.dismissible(content, **props)
100
+ def drag_target(content = nil, **props, &block) = _pending_app.drag_target(content, **props, &block)
101
+ def dragtarget(content = nil, **props, &block) = _pending_app.dragtarget(content, **props, &block)
102
+ def card(content = nil, **props) = _pending_app.card(content, **props)
103
+ def list_tile(**props) = _pending_app.list_tile(**props)
104
+ def listtile(**props) = _pending_app.listtile(**props)
105
+ def map(layers = nil, **props) = _pending_app.map(layers, **props)
106
+ def tile_layer(**props) = _pending_app.tile_layer(**props)
107
+ def tilelayer(**props) = _pending_app.tilelayer(**props)
108
+ def marker_layer(markers = nil, **props) = _pending_app.marker_layer(markers, **props)
109
+ def markerlayer(markers = nil, **props) = _pending_app.markerlayer(markers, **props)
110
+ def marker(content = nil, **props) = _pending_app.marker(content, **props)
111
+ def circle_layer(circles = nil, **props) = _pending_app.circle_layer(circles, **props)
112
+ def circlelayer(circles = nil, **props) = _pending_app.circlelayer(circles, **props)
113
+ def circle_marker(**props) = _pending_app.circle_marker(**props)
114
+ def circlemarker(**props) = _pending_app.circlemarker(**props)
115
+ def polyline_layer(polylines = nil, **props) = _pending_app.polyline_layer(polylines, **props)
116
+ def polylinelayer(polylines = nil, **props) = _pending_app.polylinelayer(polylines, **props)
117
+ def polyline_marker(**props) = _pending_app.polyline_marker(**props)
118
+ def polylinemarker(**props) = _pending_app.polylinemarker(**props)
119
+ def polygon_layer(polygons = nil, **props) = _pending_app.polygon_layer(polygons, **props)
120
+ def polygonlayer(polygons = nil, **props) = _pending_app.polygonlayer(polygons, **props)
121
+ def polygon_marker(**props) = _pending_app.polygon_marker(**props)
122
+ def polygonmarker(**props) = _pending_app.polygonmarker(**props)
123
+ def simple_attribution(**props) = _pending_app.simple_attribution(**props)
124
+ def simpleattribution(**props) = _pending_app.simpleattribution(**props)
125
+ def list_view(children = nil, **props) = _pending_app.list_view(children, **props)
126
+ def listview(children = nil, **props) = _pending_app.listview(children, **props)
127
+ def menu_bar(children = nil, **props) = _pending_app.menu_bar(children, **props)
128
+ def menubar(children = nil, **props) = _pending_app.menubar(children, **props)
129
+ def menu_item_button(content = nil, **props) = _pending_app.menu_item_button(content, **props)
130
+ def menuitembutton(content = nil, **props) = _pending_app.menuitembutton(content, **props)
131
+ def merge_semantics(content = nil, **props) = _pending_app.merge_semantics(content, **props)
132
+ def mergesemantics(content = nil, **props) = _pending_app.mergesemantics(content, **props)
133
+ def submenu_button(children = nil, **props) = _pending_app.submenu_button(children, **props)
134
+ def submenubutton(children = nil, **props) = _pending_app.submenubutton(children, **props)
135
+ def divider(**props) = _pending_app.divider(**props)
136
+ def vertical_divider(**props) = _pending_app.vertical_divider(**props)
137
+ def verticaldivider(**props) = _pending_app.verticaldivider(**props)
138
+ def window_drag_area(content = nil, **props) = _pending_app.window_drag_area(content, **props)
139
+ def windowdragarea(content = nil, **props) = _pending_app.windowdragarea(content, **props)
140
+ def date_picker(**props) = _pending_app.date_picker(**props)
141
+ def datepicker(**props) = _pending_app.datepicker(**props)
142
+ def date_range_picker(**props) = _pending_app.date_range_picker(**props)
143
+ def daterangepicker(**props) = _pending_app.daterangepicker(**props)
144
+ def data_table(columns = nil, **props) = _pending_app.data_table(columns, **props)
145
+ def datatable(columns = nil, **props) = _pending_app.datatable(columns, **props)
146
+ def data_column(label = nil, **props) = _pending_app.data_column(label, **props)
147
+ def datacolumn(label = nil, **props) = _pending_app.datacolumn(label, **props)
148
+ def data_row(cells = nil, **props) = _pending_app.data_row(cells, **props)
149
+ def datarow(cells = nil, **props) = _pending_app.datarow(cells, **props)
150
+ def data_cell(content = nil, **props) = _pending_app.data_cell(content, **props)
151
+ def datacell(content = nil, **props) = _pending_app.datacell(content, **props)
152
+ def expansion_tile(children = nil, **props) = _pending_app.expansion_tile(children, **props)
153
+ def expansiontile(children = nil, **props) = _pending_app.expansiontile(children, **props)
154
+ def expansion_panel(**props) = _pending_app.expansion_panel(**props)
155
+ def expansionpanel(**props) = _pending_app.expansionpanel(**props)
156
+ def expansion_panel_list(children = nil, **props) = _pending_app.expansion_panel_list(children, **props)
157
+ def expansionpanellist(children = nil, **props) = _pending_app.expansionpanellist(children, **props)
158
+ def dropdown(options = nil, **props) = _pending_app.dropdown(options, **props)
159
+ def dropdown_option(key = nil, **props) = _pending_app.dropdown_option(key, **props)
160
+ def dropdownoption(key = nil, **props) = _pending_app.dropdownoption(key, **props)
161
+ def dropdown_m2(options = nil, **props) = _pending_app.dropdown_m2(options, **props)
162
+ def dropdownm2(options = nil, **props) = _pending_app.dropdownm2(options, **props)
163
+ def progress_bar(**props) = _pending_app.progress_bar(**props)
164
+ def progressbar(**props) = _pending_app.progressbar(**props)
165
+ def placeholder(content = nil, **props) = _pending_app.placeholder(content, **props)
166
+ def page_view(children = nil, **props) = _pending_app.page_view(children, **props)
167
+ def pageview(children = nil, **props) = _pending_app.pageview(children, **props)
168
+ def progress_ring(**props) = _pending_app.progress_ring(**props)
169
+ def progressring(**props) = _pending_app.progressring(**props)
170
+ def range_slider(**props) = _pending_app.range_slider(**props)
171
+ def rangeslider(**props) = _pending_app.rangeslider(**props)
172
+ def responsive_row(children = nil, **props, &block) = _pending_app.responsive_row(children, **props, &block)
173
+ def responsiverow(children = nil, **props, &block) = _pending_app.responsiverow(children, **props, &block)
174
+ def reorderable_drag_handle(content = nil, **props) = _pending_app.reorderable_drag_handle(content, **props)
175
+ def reorderabledraghandle(content = nil, **props) = _pending_app.reorderabledraghandle(content, **props)
176
+ def reorderable_list_view(children = nil, **props) = _pending_app.reorderable_list_view(children, **props)
177
+ def reorderablelistview(children = nil, **props) = _pending_app.reorderablelistview(children, **props)
178
+ def safe_area(content = nil, **props) = _pending_app.safe_area(content, **props)
179
+ def safearea(content = nil, **props) = _pending_app.safearea(content, **props)
180
+ def segment(value = nil, **props) = _pending_app.segment(value, **props)
181
+ def segmented_button(segments = nil, **props) = _pending_app.segmented_button(segments, **props)
182
+ def segmentedbutton(segments = nil, **props) = _pending_app.segmentedbutton(segments, **props)
183
+ def selection_area(content = nil, **props) = _pending_app.selection_area(content, **props)
184
+ def selectionarea(content = nil, **props) = _pending_app.selectionarea(content, **props)
185
+ def search_bar(children = nil, **props) = _pending_app.search_bar(children, **props)
186
+ def searchbar(children = nil, **props) = _pending_app.searchbar(children, **props)
187
+ def semantics(content = nil, **props) = _pending_app.semantics(content, **props)
188
+ def time_picker(**props) = _pending_app.time_picker(**props)
189
+ def timepicker(**props) = _pending_app.timepicker(**props)
190
+ def badge(label = nil, **props) = _pending_app.badge(label, **props)
191
+ def chip(label = nil, **props) = _pending_app.chip(label, **props)
192
+ def circle_avatar(content = nil, **props) = _pending_app.circle_avatar(content, **props)
193
+ def circleavatar(content = nil, **props) = _pending_app.circleavatar(content, **props)
194
+ def banner(content = nil, **props) = _pending_app.banner(content, **props)
195
+ def bottom_app_bar(content = nil, **props) = _pending_app.bottom_app_bar(content, **props)
196
+ def bottomappbar(content = nil, **props) = _pending_app.bottomappbar(content, **props)
64
197
  def text(value = nil, **props) = _pending_app.text(value, **props)
65
- def button(**props) = _pending_app.button(**props)
66
- def elevated_button(**props) = _pending_app.elevated_button(**props)
67
- def text_field(**props) = _pending_app.text_field(**props)
68
- def textfield(**props) = _pending_app.textfield(**props)
69
- def icon(**props) = _pending_app.icon(**props)
198
+ def button(content = nil, **props) = _pending_app.button(content, **props)
199
+ def elevated_button(content = nil, **props) = _pending_app.elevated_button(content, **props)
200
+ def text_field(value = nil, **props) = _pending_app.text_field(value, **props)
201
+ def textfield(value = nil, **props) = _pending_app.textfield(value, **props)
202
+ def icon(icon = nil, **props) = _pending_app.icon(icon, **props)
70
203
  def image(src = nil, **props) = _pending_app.image(src, **props)
71
- def icon_button(**props) = _pending_app.icon_button(**props)
72
- def iconbutton(**props) = _pending_app.iconbutton(**props)
204
+ def icon_button(icon = nil, **props) = _pending_app.icon_button(icon, **props)
205
+ def iconbutton(icon = nil, **props) = _pending_app.iconbutton(icon, **props)
206
+ def interactive_viewer(content = nil, **props) = _pending_app.interactive_viewer(content, **props)
207
+ def interactiveviewer(content = nil, **props) = _pending_app.interactiveviewer(content, **props)
208
+ def popup_menu_button(items = nil, **props) = _pending_app.popup_menu_button(items, **props)
209
+ def popupmenubutton(items = nil, **props) = _pending_app.popupmenubutton(items, **props)
210
+ def popup_menu_item(content = nil, **props) = _pending_app.popup_menu_item(content, **props)
211
+ def popupmenuitem(content = nil, **props) = _pending_app.popupmenuitem(content, **props)
73
212
  def app_bar(**props) = _pending_app.app_bar(**props)
74
213
  def appbar(**props) = _pending_app.appbar(**props)
75
214
  def clipboard(**props) = _pending_app.clipboard(**props)
76
- def text_button(**props) = _pending_app.text_button(**props)
77
- def textbutton(**props) = _pending_app.textbutton(**props)
78
- def filled_button(**props) = _pending_app.filled_button(**props)
79
- def filledbutton(**props) = _pending_app.filledbutton(**props)
215
+ def text_button(content = nil, **props) = _pending_app.text_button(content, **props)
216
+ def textbutton(content = nil, **props) = _pending_app.textbutton(content, **props)
217
+ def filled_button(content = nil, **props) = _pending_app.filled_button(content, **props)
218
+ def filledbutton(content = nil, **props) = _pending_app.filledbutton(content, **props)
219
+ def filled_icon_button(icon = nil, **props) = _pending_app.filled_icon_button(icon, **props)
220
+ def fillediconbutton(icon = nil, **props) = _pending_app.fillediconbutton(icon, **props)
221
+ def filled_tonal_button(content = nil, **props) = _pending_app.filled_tonal_button(content, **props)
222
+ def filledtonalbutton(content = nil, **props) = _pending_app.filledtonalbutton(content, **props)
223
+ def filled_tonal_icon_button(icon = nil, **props) = _pending_app.filled_tonal_icon_button(icon, **props)
224
+ def filledtonaliconbutton(icon = nil, **props) = _pending_app.filledtonaliconbutton(icon, **props)
225
+ def outlined_button(content = nil, **props) = _pending_app.outlined_button(content, **props)
226
+ def outlinedbutton(content = nil, **props) = _pending_app.outlinedbutton(content, **props)
227
+ def outlined_icon_button(icon = nil, **props) = _pending_app.outlined_icon_button(icon, **props)
228
+ def outlinediconbutton(icon = nil, **props) = _pending_app.outlinediconbutton(icon, **props)
80
229
  def checkbox(**props) = _pending_app.checkbox(**props)
230
+ def switch(**props) = _pending_app.switch(**props)
231
+ def slider(**props) = _pending_app.slider(**props)
232
+ def transparent_pointer(content = nil, **props) = _pending_app.transparent_pointer(content, **props)
233
+ def transparentpointer(content = nil, **props) = _pending_app.transparentpointer(content, **props)
81
234
  def radio(**props) = _pending_app.radio(**props)
82
- def radio_group(**props) = _pending_app.radio_group(**props)
83
- def radiogroup(**props) = _pending_app.radiogroup(**props)
235
+ def radio_group(content = nil, **props) = _pending_app.radio_group(content, **props)
236
+ def radiogroup(content = nil, **props) = _pending_app.radiogroup(content, **props)
84
237
  def alert_dialog(**props) = _pending_app.alert_dialog(**props)
85
238
  def alertdialog(**props) = _pending_app.alertdialog(**props)
86
- def snack_bar(**props) = _pending_app.snack_bar(**props)
87
- def snackbar(**props) = _pending_app.snackbar(**props)
88
- def bottom_sheet(**props) = _pending_app.bottom_sheet(**props)
89
- def bottomsheet(**props) = _pending_app.bottomsheet(**props)
239
+ def snack_bar(content = nil, **props) = _pending_app.snack_bar(content, **props)
240
+ def snackbar(content = nil, **props) = _pending_app.snackbar(content, **props)
241
+ def bottom_sheet(content = nil, **props) = _pending_app.bottom_sheet(content, **props)
242
+ def bottomsheet(content = nil, **props) = _pending_app.bottomsheet(content, **props)
90
243
  def markdown(value = nil, **props) = _pending_app.markdown(value, **props)
91
244
  def floating_action_button(**props) = _pending_app.floating_action_button(**props)
92
245
  def floatingactionbutton(**props) = _pending_app.floatingactionbutton(**props)
93
- def tabs(**props, &block) = _pending_app.tabs(**props, &block)
94
- def tab(**props, &block) = _pending_app.tab(**props, &block)
95
- def tab_bar(**props, &block) = _pending_app.tab_bar(**props, &block)
96
- def tabbar(**props, &block) = _pending_app.tabbar(**props, &block)
97
- def tab_bar_view(**props, &block) = _pending_app.tab_bar_view(**props, &block)
98
- def tabbarview(**props, &block) = _pending_app.tabbarview(**props, &block)
246
+ def tabs(content = nil, **props, &block) = _pending_app.tabs(content, **props, &block)
247
+ def tab(label = nil, **props, &block) = _pending_app.tab(label, **props, &block)
248
+ def tab_bar(tabs = nil, **props, &block) = _pending_app.tab_bar(tabs, **props, &block)
249
+ def tabbar(tabs = nil, **props, &block) = _pending_app.tabbar(tabs, **props, &block)
250
+ def tab_bar_view(children = nil, **props, &block) = _pending_app.tab_bar_view(children, **props, &block)
251
+ def tabbarview(children = nil, **props, &block) = _pending_app.tabbarview(children, **props, &block)
99
252
  def navigation_bar(**props, &block) = _pending_app.navigation_bar(**props, &block)
100
253
  def navigationbar(**props, &block) = _pending_app.navigationbar(**props, &block)
101
254
  def navigation_bar_destination(**props, &block) = _pending_app.navigation_bar_destination(**props, &block)
102
255
  def navigationbardestination(**props, &block) = _pending_app.navigationbardestination(**props, &block)
256
+ def navigation_rail(**props, &block) = _pending_app.navigation_rail(**props, &block)
257
+ def navigationrail(**props, &block) = _pending_app.navigationrail(**props, &block)
258
+ def navigation_rail_destination(**props, &block) = _pending_app.navigation_rail_destination(**props, &block)
259
+ def navigationraildestination(**props, &block) = _pending_app.navigationraildestination(**props, &block)
260
+ def navigation_drawer(children = nil, **props) = _pending_app.navigation_drawer(children, **props)
261
+ def navigationdrawer(children = nil, **props) = _pending_app.navigationdrawer(children, **props)
262
+ def navigation_drawer_destination(**props) = _pending_app.navigation_drawer_destination(**props)
263
+ def navigationdrawerdestination(**props) = _pending_app.navigationdrawerdestination(**props)
103
264
  def bar_chart(**props) = _pending_app.bar_chart(**props)
104
265
  def barchart(**props) = _pending_app.barchart(**props)
105
266
  def bar_chart_group(**props) = _pending_app.bar_chart_group(**props)
@@ -140,25 +301,56 @@ module Ruflet
140
301
  def chartaxislabel(**props) = _pending_app.chartaxislabel(**props)
141
302
  def web_view(**props) = _pending_app.web_view(**props)
142
303
  def webview(**props) = _pending_app.webview(**props)
304
+ def video(**props) = _pending_app.video(**props)
143
305
  def fab(content = nil, **props) = _pending_app.fab(content, **props)
144
- def cupertino_button(**props) = _pending_app.cupertino_button(**props)
145
- def cupertinobutton(**props) = _pending_app.cupertinobutton(**props)
146
- def cupertino_filled_button(**props) = _pending_app.cupertino_filled_button(**props)
147
- def cupertinofilledbutton(**props) = _pending_app.cupertinofilledbutton(**props)
148
- def cupertino_text_field(**props) = _pending_app.cupertino_text_field(**props)
149
- def cupertinotextfield(**props) = _pending_app.cupertinotextfield(**props)
306
+ def cupertino_button(content = nil, **props) = _pending_app.cupertino_button(content, **props)
307
+ def cupertinobutton(content = nil, **props) = _pending_app.cupertinobutton(content, **props)
308
+ def cupertino_filled_button(content = nil, **props) = _pending_app.cupertino_filled_button(content, **props)
309
+ def cupertinofilledbutton(content = nil, **props) = _pending_app.cupertinofilledbutton(content, **props)
310
+ def cupertino_tinted_button(content = nil, **props) = _pending_app.cupertino_tinted_button(content, **props)
311
+ def cupertinotintedbutton(content = nil, **props) = _pending_app.cupertinotintedbutton(content, **props)
312
+ def cupertino_checkbox(**props) = _pending_app.cupertino_checkbox(**props)
313
+ def cupertinocheckbox(**props) = _pending_app.cupertinocheckbox(**props)
314
+ def cupertino_text_field(value = nil, **props) = _pending_app.cupertino_text_field(value, **props)
315
+ def cupertinotextfield(value = nil, **props) = _pending_app.cupertinotextfield(value, **props)
316
+ def cupertino_timer_picker(**props) = _pending_app.cupertino_timer_picker(**props)
317
+ def cupertinotimerpicker(**props) = _pending_app.cupertinotimerpicker(**props)
150
318
  def cupertino_switch(**props) = _pending_app.cupertino_switch(**props)
151
319
  def cupertinoswitch(**props) = _pending_app.cupertinoswitch(**props)
152
320
  def cupertino_slider(**props) = _pending_app.cupertino_slider(**props)
153
321
  def cupertinoslider(**props) = _pending_app.cupertinoslider(**props)
322
+ def cupertino_radio(**props) = _pending_app.cupertino_radio(**props)
323
+ def cupertinoradio(**props) = _pending_app.cupertinoradio(**props)
154
324
  def cupertino_alert_dialog(**props) = _pending_app.cupertino_alert_dialog(**props)
155
325
  def cupertinoalertdialog(**props) = _pending_app.cupertinoalertdialog(**props)
156
326
  def cupertino_action_sheet(**props) = _pending_app.cupertino_action_sheet(**props)
157
327
  def cupertinoactionsheet(**props) = _pending_app.cupertinoactionsheet(**props)
328
+ def cupertino_action_sheet_action(**props) = _pending_app.cupertino_action_sheet_action(**props)
329
+ def cupertinoactionsheetaction(**props) = _pending_app.cupertinoactionsheetaction(**props)
330
+ def cupertino_activity_indicator(**props) = _pending_app.cupertino_activity_indicator(**props)
331
+ def cupertinoactivityindicator(**props) = _pending_app.cupertinoactivityindicator(**props)
332
+ def cupertino_app_bar(**props) = _pending_app.cupertino_app_bar(**props)
333
+ def cupertinoappbar(**props) = _pending_app.cupertinoappbar(**props)
334
+ def cupertino_bottom_sheet(content = nil, **props) = _pending_app.cupertino_bottom_sheet(content, **props)
335
+ def cupertinobottomsheet(content = nil, **props) = _pending_app.cupertinobottomsheet(content, **props)
336
+ def cupertino_date_picker(**props) = _pending_app.cupertino_date_picker(**props)
337
+ def cupertinodatepicker(**props) = _pending_app.cupertinodatepicker(**props)
158
338
  def cupertino_dialog_action(**props) = _pending_app.cupertino_dialog_action(**props)
159
339
  def cupertinodialogaction(**props) = _pending_app.cupertinodialogaction(**props)
340
+ def cupertino_context_menu(**props) = _pending_app.cupertino_context_menu(**props)
341
+ def cupertinocontextmenu(**props) = _pending_app.cupertinocontextmenu(**props)
342
+ def cupertino_context_menu_action(**props) = _pending_app.cupertino_context_menu_action(**props)
343
+ def cupertinocontextmenuaction(**props) = _pending_app.cupertinocontextmenuaction(**props)
344
+ def cupertino_list_tile(**props) = _pending_app.cupertino_list_tile(**props)
345
+ def cupertinolisttile(**props) = _pending_app.cupertinolisttile(**props)
160
346
  def cupertino_navigation_bar(**props) = _pending_app.cupertino_navigation_bar(**props)
161
347
  def cupertinonavigationbar(**props) = _pending_app.cupertinonavigationbar(**props)
348
+ def cupertino_picker(children = nil, **props) = _pending_app.cupertino_picker(children, **props)
349
+ def cupertinopicker(children = nil, **props) = _pending_app.cupertinopicker(children, **props)
350
+ def cupertino_segmented_button(children = nil, **props) = _pending_app.cupertino_segmented_button(children, **props)
351
+ def cupertinosegmentedbutton(children = nil, **props) = _pending_app.cupertinosegmentedbutton(children, **props)
352
+ def cupertino_sliding_segmented_button(children = nil, **props) = _pending_app.cupertino_sliding_segmented_button(children, **props)
353
+ def cupertinoslidingsegmentedbutton(children = nil, **props) = _pending_app.cupertinoslidingsegmentedbutton(children, **props)
162
354
  def duration(**parts) = duration_in_milliseconds(parts)
163
355
 
164
356
  class App
@@ -15,6 +15,16 @@ module Ruflet
15
15
  UI::Types::Offset.from_wire(pick(data, short, long))
16
16
  end
17
17
 
18
+ def self.offset_pair(data, x_key, y_key)
19
+ return nil unless data.is_a?(Hash)
20
+
21
+ x = data[x_key] || data[x_key.to_sym]
22
+ y = data[y_key] || data[y_key.to_sym]
23
+ return nil if x.nil? || y.nil?
24
+
25
+ UI::Types::Offset.new(x: x, y: y)
26
+ end
27
+
18
28
  def self.duration(data, short, long)
19
29
  UI::Types::Duration.from_wire(pick(data, short, long))
20
30
  end
@@ -38,7 +48,7 @@ module Ruflet
38
48
  raw = data.is_a?(Hash) ? stringify_keys(data) : data
39
49
  value =
40
50
  if raw.is_a?(Hash)
41
- raw["value"] || raw["v"] || raw["data"] || raw["state"]
51
+ raw["value"] || raw["v"] || raw["data"] || raw["state"] || raw["route"]
42
52
  else
43
53
  raw
44
54
  end
@@ -53,12 +63,101 @@ module Ruflet
53
63
  class ClickEvent < GenericEvent; end
54
64
  class SubmitEvent < GenericEvent; end
55
65
  class SelectEvent < GenericEvent; end
56
- class DismissEvent < GenericEvent; end
66
+ class DismissEvent < GenericEvent
67
+ attr_reader :direction
68
+
69
+ def initialize(raw:, value: nil, direction: nil)
70
+ super(raw: raw, value: value)
71
+ @direction = direction
72
+ end
73
+
74
+ def self.from_data(data)
75
+ raw = data.is_a?(Hash) ? stringify_keys(data) : {}
76
+ direction = raw["direction"] || raw["d"]
77
+ new(raw: raw, value: direction || raw["value"] || raw["v"], direction: direction)
78
+ end
79
+ end
57
80
  class VisibleEvent < GenericEvent; end
58
81
  class ResultEvent < GenericEvent; end
59
82
  class UploadEvent < GenericEvent; end
60
83
  class ErrorEvent < GenericEvent; end
61
84
  class ActionEvent < GenericEvent; end
85
+ class AutoCompleteSelectEvent < GenericEvent
86
+ attr_reader :selection
87
+
88
+ def initialize(raw:, value: nil, selection: nil)
89
+ super(raw: raw, value: value)
90
+ @selection = selection
91
+ end
92
+
93
+ def self.from_data(data)
94
+ raw = data.is_a?(Hash) ? stringify_keys(data) : {}
95
+ selection = raw["selection"]
96
+ selection = stringify_keys(selection) if selection.is_a?(Hash)
97
+ value = raw["value"] || raw["v"] || (selection.is_a?(Hash) ? selection["value"] : nil)
98
+ new(raw: raw, value: value, selection: selection)
99
+ end
100
+ end
101
+ class ReorderEvent < GenericEvent
102
+ attr_reader :old_index, :new_index
103
+
104
+ def initialize(raw:, old_index:, new_index:)
105
+ super(raw: raw, value: [old_index, new_index])
106
+ @old_index = old_index
107
+ @new_index = new_index
108
+ end
109
+
110
+ def self.from_data(data)
111
+ raw = data.is_a?(Hash) ? stringify_keys(data) : {}
112
+ new(
113
+ raw: raw,
114
+ old_index: raw["old_index"] || raw["old"],
115
+ new_index: raw["new_index"] || raw["new"]
116
+ )
117
+ end
118
+ end
119
+ class DismissibleUpdateEvent < GenericEvent
120
+ attr_reader :direction, :progress, :reached
121
+
122
+ def initialize(raw:, direction:, progress:, reached:)
123
+ super(raw: raw, value: progress)
124
+ @direction = direction
125
+ @progress = progress
126
+ @reached = reached
127
+ end
128
+
129
+ def self.from_data(data)
130
+ raw = data.is_a?(Hash) ? stringify_keys(data) : {}
131
+ new(
132
+ raw: raw,
133
+ direction: raw["direction"] || raw["d"],
134
+ progress: raw["progress"] || raw["p"] || raw["value"] || raw["v"],
135
+ reached: raw["reached"] || raw["r"]
136
+ )
137
+ end
138
+ end
139
+ class DragTargetEvent < GenericEvent
140
+ attr_reader :src_id, :accept, :x, :y
141
+
142
+ def initialize(raw:, src_id:, accept: nil, x: nil, y: nil)
143
+ super(raw: raw, value: src_id)
144
+ @src_id = src_id
145
+ @accept = accept
146
+ @x = x
147
+ @y = y
148
+ end
149
+
150
+ def self.from_data(data)
151
+ raw = data.is_a?(Hash) ? stringify_keys(data) : {}
152
+ new(
153
+ raw: raw,
154
+ src_id: raw["src_id"] || raw["src"] || raw["value"] || raw["v"],
155
+ accept: raw["accept"] || raw["a"],
156
+ x: raw["x"],
157
+ y: raw["y"]
158
+ )
159
+ end
160
+ end
62
161
  class StateChangeEvent < GenericEvent
63
162
  attr_reader :state
64
163
 
@@ -86,8 +185,8 @@ module Ruflet
86
185
  def self.from_data(data)
87
186
  new(
88
187
  kind: pick(data, "k", "kind"),
89
- local_position: offset(data, "l", "local_position"),
90
- global_position: offset(data, "g", "global_position")
188
+ local_position: offset(data, "l", "local_position") || offset_pair(data, "lx", "ly"),
189
+ global_position: offset(data, "g", "global_position") || offset_pair(data, "gx", "gy")
91
190
  )
92
191
  end
93
192
  end
@@ -445,13 +544,17 @@ module Ruflet
445
544
  "blur" => BlurEvent,
446
545
  "click" => ClickEvent,
447
546
  "submit" => SubmitEvent,
448
- "select" => SelectEvent,
547
+ "select" => AutoCompleteSelectEvent,
548
+ "select_change" => GenericEvent,
449
549
  "dismiss" => DismissEvent,
450
550
  "visible" => VisibleEvent,
451
551
  "result" => ResultEvent,
452
552
  "upload" => UploadEvent,
453
553
  "error" => ErrorEvent,
454
554
  "action" => ActionEvent,
555
+ "reorder" => ReorderEvent,
556
+ "reorder_start" => ReorderEvent,
557
+ "reorder_end" => ReorderEvent,
455
558
  "state_change" => StateChangeEvent,
456
559
  "confirm_pop" => GenericEvent,
457
560
  "route_change" => GenericEvent,
@@ -464,11 +567,12 @@ module Ruflet
464
567
  "resize" => GenericEvent,
465
568
  "load" => GenericEvent,
466
569
  "loaded" => GenericEvent,
467
- "accept" => GenericEvent,
468
- "will_accept" => GenericEvent,
570
+ "update" => DismissibleUpdateEvent,
571
+ "accept" => DragTargetEvent,
572
+ "will_accept" => DragTargetEvent,
469
573
  "accept_with_details" => GenericEvent,
470
- "move" => GenericEvent,
471
- "leave" => GenericEvent,
574
+ "move" => DragTargetEvent,
575
+ "leave" => DragTargetEvent,
472
576
  "open" => GenericEvent,
473
577
  "close" => GenericEvent,
474
578
  "double_tap" => GenericEvent,