ruflet_core 0.0.21 → 0.0.23

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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ruflet/version.rb +1 -1
  3. data/lib/ruflet_ui/ruflet/dsl.rb +76 -0
  4. data/lib/ruflet_ui/ruflet/event.rb +3 -2
  5. data/lib/ruflet_ui/ruflet/events/gesture_events.rb +2 -1
  6. data/lib/ruflet_ui/ruflet/icons/cupertino/cupertino_icons.rb +46 -26
  7. data/lib/ruflet_ui/ruflet/icons/material/material_icons.rb +61 -26
  8. data/lib/ruflet_ui/ruflet/page.rb +242 -4
  9. data/lib/ruflet_ui/ruflet/ui/control_factory.rb +2 -0
  10. data/lib/ruflet_ui/ruflet/ui/control_methods.rb +4 -0
  11. data/lib/ruflet_ui/ruflet/ui/control_registry.rb +20 -1
  12. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheet_control.rb +1 -1
  13. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheetaction_control.rb +1 -1
  14. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactivityindicator_control.rb +1 -1
  15. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoalertdialog_control.rb +1 -1
  16. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoappbar_control.rb +1 -1
  17. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobottomsheet_control.rb +1 -1
  18. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobutton_control.rb +1 -1
  19. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocheckbox_control.rb +1 -1
  20. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenu_control.rb +1 -1
  21. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenuaction_control.rb +1 -1
  22. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodatepicker_control.rb +1 -1
  23. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodialogaction_control.rb +1 -1
  24. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinofilledbutton_control.rb +1 -1
  25. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinolisttile_control.rb +1 -1
  26. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinonavigationbar_control.rb +1 -1
  27. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinopicker_control.rb +1 -1
  28. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoradio_control.rb +1 -1
  29. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinosegmentedbutton_control.rb +1 -1
  30. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslider_control.rb +1 -1
  31. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslidingsegmentedbutton_control.rb +1 -1
  32. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoswitch_control.rb +1 -1
  33. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotextfield_control.rb +1 -1
  34. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotimerpicker_control.rb +1 -1
  35. data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotintedbutton_control.rb +1 -1
  36. data/lib/ruflet_ui/ruflet/ui/controls/materials/ad_controls.rb +45 -0
  37. data/lib/ruflet_ui/ruflet/ui/controls/materials/animation_extension_controls.rb +29 -0
  38. data/lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb +56 -279
  39. data/lib/ruflet_ui/ruflet/ui/controls/materials/code_editor_control.rb +42 -0
  40. data/lib/ruflet_ui/ruflet/ui/controls/materials/color_picker_controls.rb +34 -0
  41. data/lib/ruflet_ui/ruflet/ui/controls/materials/datatable2_controls.rb +41 -0
  42. data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdownm2_control.rb +1 -1
  43. data/lib/ruflet_ui/ruflet/ui/controls/materials/map_control.rb +80 -0
  44. data/lib/ruflet_ui/ruflet/ui/controls/materials/ruflet_controls.rb +62 -0
  45. data/lib/ruflet_ui/ruflet/ui/controls/materials/video_control.rb +1 -2
  46. data/lib/ruflet_ui/ruflet/ui/controls/materials/webview_control.rb +5 -30
  47. data/lib/ruflet_ui/ruflet/ui/controls/ruflet_controls.rb +60 -0
  48. data/lib/ruflet_ui/ruflet/ui/controls/shared/browsercontextmenu_control.rb +17 -0
  49. data/lib/ruflet_ui/ruflet/ui/controls/shared/ruflet_app_control.rb +3 -3
  50. data/lib/ruflet_ui/ruflet/ui/controls/shared/serviceregistry_control.rb +5 -1
  51. data/lib/ruflet_ui/ruflet/ui/cupertino_control_methods.rb +2 -0
  52. data/lib/ruflet_ui/ruflet/ui/material_control_methods.rb +110 -6
  53. data/lib/ruflet_ui/ruflet/ui/material_control_registry.rb +23 -8
  54. data/lib/ruflet_ui/ruflet/ui/platform_control_contracts.rb +392 -0
  55. data/lib/ruflet_ui/ruflet/ui/platform_control_methods.rb +35 -0
  56. data/lib/ruflet_ui/ruflet/ui/services/current_service_methods.rb +220 -0
  57. data/lib/ruflet_ui/ruflet/ui/services/ruflet/camera_control.rb +88 -0
  58. data/lib/ruflet_ui/ruflet/ui/services/ruflet_services.rb +4 -0
  59. data/lib/ruflet_ui/ruflet/ui/shared_control_forwarders.rb +75 -0
  60. data/lib/ruflet_ui.rb +6 -9
  61. metadata +9 -1
@@ -178,6 +178,8 @@ module Ruflet
178
178
  @page_event_handlers = {}
179
179
  @view_props = {}
180
180
  @page_props = { "route" => (client_details["route"] || "/") }
181
+ @published_control_states = {}
182
+ @published_shell_state = nil
181
183
  @window = build_client_window(client_details["window"])
182
184
  @page_props["window"] = @window
183
185
  @overlay_container = Ruflet::Control.new(
@@ -229,6 +231,18 @@ module Ruflet
229
231
  @page_props["route"] = value
230
232
  end
231
233
 
234
+ # A resumed Page keeps its Ruby controls and event handlers, but a newly
235
+ # connected client has not mounted any of that state yet. Invalidate only
236
+ # the client-side publication snapshot so the next update sends the full
237
+ # page shell, including the internal overlay, dialog, and service roots.
238
+ def prepare_for_reconnect!
239
+ @overlay_container_mounted = false
240
+ @dialogs_container_mounted = false
241
+ @services_container_mounted = false
242
+ @published_shell_state = nil
243
+ self
244
+ end
245
+
232
246
  def vertical_alignment
233
247
  @page_props["vertical_alignment"] || @view_props["vertical_alignment"]
234
248
  end
@@ -313,6 +327,7 @@ module Ruflet
313
327
  @overlay_container_mounted = true if @overlay_container.wire_id
314
328
  @dialogs_container_mounted = true if @dialogs_container.wire_id
315
329
  @services_container_mounted = true if @services_container.wire_id
330
+ capture_published_wire_state!
316
331
  patch
317
332
  end
318
333
 
@@ -1281,7 +1296,7 @@ module Ruflet
1281
1296
 
1282
1297
  def update(control_or_id = nil, **props)
1283
1298
  if control_or_id.nil? && props.empty?
1284
- send_view_patch
1299
+ send_changed_control_patches
1285
1300
  return self
1286
1301
  end
1287
1302
 
@@ -1310,8 +1325,10 @@ module Ruflet
1310
1325
 
1311
1326
  # Keep runtime control tree aligned with incremental patches.
1312
1327
  if patch.key?("controls")
1328
+ replacement_controls = Array(patch["controls"]).dup
1313
1329
  control.children.clear
1314
- Array(patch["controls"]).each { |child| control.children << child if child.is_a?(Control) }
1330
+ replacement_controls.each { |child| control.children << child if child.is_a?(Control) }
1331
+ patch["controls"] = replacement_controls
1315
1332
  end
1316
1333
 
1317
1334
  visited = Set.new
@@ -1323,6 +1340,7 @@ module Ruflet
1323
1340
  "id" => wire_id,
1324
1341
  "patch" => [[0], *patch_ops]
1325
1342
  })
1343
+ capture_published_control_tree!(control)
1326
1344
 
1327
1345
  self
1328
1346
  end
@@ -1336,11 +1354,24 @@ module Ruflet
1336
1354
  end
1337
1355
 
1338
1356
  def apply_client_update(control_or_id, props)
1357
+ if page_control_target?(control_or_id)
1358
+ patch = normalize_props(props || {})
1359
+ @client_details.merge!(patch)
1360
+ # These are live client measurements. Keep the page getters current as
1361
+ # well, without consuming route changes before their event is dispatched.
1362
+ %w[width height platform_brightness media].each do |key|
1363
+ @page_props[key] = patch[key] if patch.key?(key)
1364
+ end
1365
+ capture_published_shell_state!
1366
+ return self
1367
+ end
1368
+
1339
1369
  control = resolve_control(control_or_id)
1340
1370
  return self unless control
1341
1371
 
1342
1372
  patch = normalize_props(props || {})
1343
1373
  patch.each { |k, v| control.props[k] = v }
1374
+ capture_published_control_tree!(control)
1344
1375
 
1345
1376
  remove_dialog_tracking(control) if patch.key?("open") && patch["open"] == false
1346
1377
 
@@ -1353,6 +1384,7 @@ module Ruflet
1353
1384
  route_from_event = extract_route(data)
1354
1385
  return if route_from_event && route_from_event == @page_props["route"]
1355
1386
  @page_props["route"] = route_from_event if route_from_event
1387
+ capture_published_shell_state!
1356
1388
  end
1357
1389
  dispatch_page_event(name: name, data: data)
1358
1390
  return
@@ -1362,7 +1394,13 @@ module Ruflet
1362
1394
  return unless control
1363
1395
 
1364
1396
  event = Event.new(name: name, target: target, raw_data: data, page: self, control: control)
1365
- apply_event_value_to_control(control, event) if %w[change select select_change].include?(name.to_s)
1397
+ if %w[change select select_change].include?(name.to_s)
1398
+ apply_event_value_to_control(control, event)
1399
+ # The client already owns this value. Treat it as published before the
1400
+ # handler runs so a later bare page.update only sends application-side
1401
+ # mutations, not the value that originated on the client.
1402
+ capture_published_control_tree!(control)
1403
+ end
1366
1404
  control.emit(name, event)
1367
1405
 
1368
1406
  if name.to_s == "dismiss" && remove_dialog_tracking(control)
@@ -1533,6 +1571,202 @@ module Ruflet
1533
1571
  @sender.call(action, payload)
1534
1572
  end
1535
1573
 
1574
+ # Bare page.update is the public commit point for direct mutations such as
1575
+ # `list.children.replace(...)`. Keep a shallow, immutable wire snapshot of
1576
+ # every mounted control so the commit can target only controls whose own
1577
+ # properties or child references changed. Descendant contents are tracked
1578
+ # independently: changing a Text value patches the Text, while replacing a
1579
+ # Column's children patches the Column.
1580
+ def send_changed_control_patches
1581
+ refresh_control_indexes!
1582
+ current = build_wire_state_snapshot
1583
+
1584
+ # Navigation, root controls, and page/view chrome are page-owned rather
1585
+ # than regular mounted controls. Retain the complete view patch as the
1586
+ # safe fallback whenever that shell changes.
1587
+ if @published_shell_state.nil? || current[:shell] != @published_shell_state
1588
+ send_view_patch
1589
+ return
1590
+ end
1591
+
1592
+ dirty_ids = current[:controls].each_with_object(Set.new) do |(wire_id, entry), dirty|
1593
+ prior = @published_control_states[wire_id]
1594
+ dirty << wire_id if prior && prior != entry[:state]
1595
+ end
1596
+
1597
+ # A changed parent patch serializes its newly referenced children, so a
1598
+ # second patch for a dirty descendant would be redundant and can race the
1599
+ # parent's replacement on the client.
1600
+ targets = dirty_ids.reject do |wire_id|
1601
+ ancestor = current[:parents][wire_id]
1602
+ found = false
1603
+ while ancestor
1604
+ if dirty_ids.include?(ancestor)
1605
+ found = true
1606
+ break
1607
+ end
1608
+ ancestor = current[:parents][ancestor]
1609
+ end
1610
+ found
1611
+ end
1612
+
1613
+ targets.each do |wire_id|
1614
+ entry = current[:controls][wire_id]
1615
+ patch_ops = changed_control_patch_ops(
1616
+ entry[:control],
1617
+ @published_control_states.fetch(wire_id),
1618
+ entry[:state]
1619
+ )
1620
+ next if patch_ops.empty?
1621
+
1622
+ send_message(Protocol::ACTIONS[:patch_control], {
1623
+ "id" => wire_id,
1624
+ "patch" => [[0], *patch_ops]
1625
+ })
1626
+ end
1627
+
1628
+ publish_wire_state_snapshot!(current)
1629
+ end
1630
+
1631
+ def changed_control_patch_ops(control, prior, current)
1632
+ operations = []
1633
+ prior_props = prior.fetch("props")
1634
+ current_props = current.fetch("props")
1635
+
1636
+ (prior_props.keys | current_props.keys).each do |key|
1637
+ next if prior_props[key] == current_props[key]
1638
+
1639
+ value = control.props.key?(key) ? control.props[key] : nil
1640
+ operations << [0, 0, key, serialize_patch_value(value)]
1641
+ end
1642
+
1643
+ if prior.fetch("children") != current.fetch("children")
1644
+ operations << [0, 0, "controls", serialize_patch_value(control.children)]
1645
+ end
1646
+ operations
1647
+ end
1648
+
1649
+ def build_wire_state_snapshot
1650
+ controls = {}
1651
+ parents = {}
1652
+ visited = Set.new
1653
+
1654
+ roots = @views.any? ? @views : @root_controls
1655
+ roots.each { |control| collect_control_wire_state(control, nil, controls, parents, visited) }
1656
+ unless @views.any?
1657
+ @view_props.each_value do |value|
1658
+ collect_embedded_wire_state(value, nil, controls, parents, visited)
1659
+ end
1660
+ end
1661
+ @page_props.each_value do |value|
1662
+ collect_embedded_wire_state(value, nil, controls, parents, visited)
1663
+ end
1664
+
1665
+ {
1666
+ controls: controls,
1667
+ parents: parents,
1668
+ shell: current_shell_wire_state
1669
+ }
1670
+ end
1671
+
1672
+ def collect_control_wire_state(control, parent_id, controls, parents, visited)
1673
+ return unless control
1674
+ return if visited.include?(control.object_id)
1675
+
1676
+ visited << control.object_id
1677
+ wire_id = control.wire_id
1678
+ return unless wire_id
1679
+
1680
+ parents[wire_id] = parent_id if parent_id
1681
+ controls[wire_id] = {
1682
+ control: control,
1683
+ state: control_local_wire_state(control)
1684
+ }
1685
+ control.children.each do |child|
1686
+ collect_control_wire_state(child, wire_id, controls, parents, visited)
1687
+ end
1688
+ control.props.each_value do |value|
1689
+ collect_embedded_wire_state(value, wire_id, controls, parents, visited)
1690
+ end
1691
+ end
1692
+
1693
+ def collect_embedded_wire_state(value, parent_id, controls, parents, visited)
1694
+ case value
1695
+ when Control
1696
+ collect_control_wire_state(value, parent_id, controls, parents, visited)
1697
+ when Array
1698
+ value.each do |entry|
1699
+ collect_embedded_wire_state(entry, parent_id, controls, parents, visited)
1700
+ end
1701
+ when Hash
1702
+ value.each_value do |entry|
1703
+ collect_embedded_wire_state(entry, parent_id, controls, parents, visited)
1704
+ end
1705
+ end
1706
+ end
1707
+
1708
+ def control_local_wire_state(control)
1709
+ {
1710
+ "type" => control.type,
1711
+ "props" => comparison_wire_value(control.props),
1712
+ "children" => control.children.map(&:wire_id)
1713
+ }
1714
+ end
1715
+
1716
+ def current_shell_wire_state
1717
+ {
1718
+ "mode" => (@views.any? ? "views" : "implicit_view"),
1719
+ "roots" => (@views.any? ? @views : @root_controls).map(&:wire_id),
1720
+ "view_props" => comparison_wire_value(@view_props),
1721
+ "page_props" => comparison_wire_value(@page_props)
1722
+ }
1723
+ end
1724
+
1725
+ # Controls are references in their parent's local state. Their contents
1726
+ # are deliberately excluded and tracked under their own wire IDs.
1727
+ def comparison_wire_value(value)
1728
+ case value
1729
+ when Control
1730
+ [Control, value.wire_id]
1731
+ when Array
1732
+ value.map { |entry| comparison_wire_value(entry) }
1733
+ when Hash
1734
+ value.each_with_object({}) do |(key, entry), result|
1735
+ result[key] = comparison_wire_value(entry)
1736
+ end
1737
+ when String
1738
+ value.dup
1739
+ else
1740
+ begin
1741
+ value.dup
1742
+ rescue TypeError
1743
+ value
1744
+ end
1745
+ end
1746
+ end
1747
+
1748
+ def capture_published_wire_state!
1749
+ publish_wire_state_snapshot!(build_wire_state_snapshot)
1750
+ end
1751
+
1752
+ def publish_wire_state_snapshot!(snapshot)
1753
+ @published_control_states = snapshot[:controls].transform_values { |entry| entry[:state] }
1754
+ @published_shell_state = snapshot[:shell]
1755
+ end
1756
+
1757
+ def capture_published_control_tree!(control)
1758
+ controls = {}
1759
+ parents = {}
1760
+ collect_control_wire_state(control, nil, controls, parents, Set.new)
1761
+ controls.each do |wire_id, entry|
1762
+ @published_control_states[wire_id] = entry[:state]
1763
+ end
1764
+ end
1765
+
1766
+ def capture_published_shell_state!
1767
+ @published_shell_state = current_shell_wire_state if @published_shell_state
1768
+ end
1769
+
1536
1770
  def replace_root_controls(controls)
1537
1771
  visited = Set.new
1538
1772
  controls.each { |control| register_control_tree(control, visited) }
@@ -1559,6 +1793,7 @@ module Ruflet
1559
1793
  @overlay_container_mounted = true if @overlay_container.wire_id
1560
1794
  @dialogs_container_mounted = true if @dialogs_container.wire_id
1561
1795
  @services_container_mounted = true if @services_container.wire_id
1796
+ capture_published_wire_state!
1562
1797
  end
1563
1798
 
1564
1799
  def register_control_tree(control, visited = Set.new)
@@ -1778,6 +2013,7 @@ module Ruflet
1778
2013
  "id" => @overlay_container.wire_id,
1779
2014
  "patch" => [[0], [0, 0, "controls", serialize_patch_value(@overlay_container.children)]]
1780
2015
  })
2016
+ capture_published_control_tree!(@overlay_container)
1781
2017
  else
1782
2018
  send_view_patch
1783
2019
  end
@@ -1795,6 +2031,7 @@ module Ruflet
1795
2031
  "id" => @services_container.wire_id,
1796
2032
  "patch" => [[0], [0, 0, "_services", serialize_patch_value(@services_container.props["_services"])]]
1797
2033
  })
2034
+ capture_published_control_tree!(@services_container)
1798
2035
  else
1799
2036
  send_view_patch
1800
2037
  end
@@ -1808,6 +2045,7 @@ module Ruflet
1808
2045
  "id" => @dialogs_container.wire_id,
1809
2046
  "patch" => [[0], [0, 0, "controls", serialize_patch_value(@dialogs_container.props["controls"])]]
1810
2047
  })
2048
+ capture_published_control_tree!(@dialogs_container)
1811
2049
  else
1812
2050
  send_view_patch
1813
2051
  end
@@ -1841,7 +2079,7 @@ module Ruflet
1841
2079
  end
1842
2080
 
1843
2081
  def assign_split_prop(key, value)
1844
- if key == "vertical_alignment" || key == "horizontal_alignment"
2082
+ if key == "vertical_alignment" || key == "horizontal_alignment" || key == "scroll"
1845
2083
  @page_props[key] = value
1846
2084
  @view_props[key] = value
1847
2085
  elsif DIALOG_PROP_KEYS.include?(key)
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "controls/ruflet_controls"
4
4
  require_relative "services/ruflet_services"
5
+ require_relative "platform_control_contracts"
5
6
  require_relative "../control"
6
7
 
7
8
  module Ruflet
@@ -12,6 +13,7 @@ module Ruflet
12
13
  CLASS_MAP =
13
14
  Services::RufletServices::CLASS_MAP
14
15
  .merge(Controls::RufletControls::CLASS_MAP)
16
+ .merge(PlatformControlContracts::CLASS_MAP)
15
17
  .freeze
16
18
  EXTENSION_CLASS_MAP = {}
17
19
  CONSTRUCTOR_KEYWORDS_CACHE = {}
@@ -1,12 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "material_control_methods"
4
+ require_relative "platform_control_methods"
4
5
  require_relative "cupertino_control_methods"
5
6
 
6
7
  module Ruflet
7
8
  module UI
8
9
  module ControlMethods
9
10
  include MaterialControlMethods
11
+ include PlatformControlMethods
12
+ # Compatibility aliases only. They emit the same canonical wire types as
13
+ # the methods above and never select the visual renderer.
10
14
  include CupertinoControlMethods
11
15
 
12
16
  def control(type, **props, &block) = build_widget(type, **props, &block)
@@ -7,7 +7,26 @@ module Ruflet
7
7
  require_relative "cupertino_control_registry"
8
8
  require_relative "controls/ruflet_controls"
9
9
  require_relative "services/ruflet_services"
10
- TYPE_MAP = MaterialControlRegistry::TYPE_MAP.merge(CupertinoControlRegistry::TYPE_MAP).freeze
10
+ require_relative "platform_control_contracts"
11
+ # Controls whose Ruby name and wire name differ on purpose. The client
12
+ # Native Ruflet clients use RufletApp as the canonical wire type while
13
+ # the Ruby API remains ruflet_app.
14
+ #
15
+ # RufletAppControl::WIRE already says this, but that is only read when the
16
+ # control resolves to its own class. Serialization otherwise derives the
17
+ # wire name from the type and must still send the canonical RufletApp.
18
+ # Map it here so both paths agree. to_patch also looks the type up with
19
+ # underscores removed, so register that spelling too.
20
+ SHARED_TYPE_MAP = {
21
+ "ruflet_app" => "RufletApp",
22
+ "rufletapp" => "RufletApp"
23
+ }.freeze
24
+
25
+ TYPE_MAP = MaterialControlRegistry::TYPE_MAP
26
+ .merge(CupertinoControlRegistry::TYPE_MAP)
27
+ .merge(SHARED_TYPE_MAP)
28
+ .merge(PlatformControlContracts::TYPE_MAP)
29
+ .freeze
11
30
  SCHEMA_EVENT_PROPS =
12
31
  Controls::RufletControls::CLASS_MAP
13
32
  .merge(Services::RufletServices::CLASS_MAP)
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoActionSheetControl < Ruflet::Control
8
8
  TYPE = "cupertinoactionsheet".freeze
9
- WIRE = "CupertinoActionSheet".freeze
9
+ WIRE = "ActionSheet".freeze
10
10
 
11
11
  KEYWORDS = [:actions, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bottom, :cancel, :col, :data, :disabled, :expand, :expand_loose, :height, :key, :left, :margin, :message, :offset, :opacity, :right, :rotate, :rtl, :scale, :size_change_interval, :title, :tooltip, :top, :visible, :width, :on_animation_end, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoActionSheetActionControl < Ruflet::Control
8
8
  TYPE = "cupertinoactionsheetaction".freeze
9
- WIRE = "CupertinoActionSheetAction".freeze
9
+ WIRE = "ActionSheetAction".freeze
10
10
 
11
11
  KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bottom, :col, :content, :data, :default, :destructive, :disabled, :expand, :expand_loose, :height, :key, :left, :margin, :mouse_cursor, :offset, :opacity, :right, :rotate, :rtl, :scale, :size_change_interval, :tooltip, :top, :visible, :width, :on_animation_end, :on_click, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoActivityIndicatorControl < Ruflet::Control
8
8
  TYPE = "cupertinoactivityindicator".freeze
9
- WIRE = "CupertinoActivityIndicator".freeze
9
+ WIRE = "ProgressRing".freeze
10
10
 
11
11
  KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :animating, :aspect_ratio, :badge, :bottom, :col, :color, :data, :disabled, :expand, :expand_loose, :height, :key, :left, :margin, :offset, :opacity, :progress, :radius, :right, :rotate, :rtl, :scale, :size_change_interval, :tooltip, :top, :visible, :width, :on_animation_end, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoAlertDialogControl < Ruflet::Control
8
8
  TYPE = "cupertinoalertdialog".freeze
9
- WIRE = "CupertinoAlertDialog".freeze
9
+ WIRE = "AlertDialog".freeze
10
10
 
11
11
  def initialize(id: nil, actions: nil, adaptive: nil, badge: nil, barrier_color: nil, col: nil, content: nil, data: nil, disabled: nil, expand: nil, expand_loose: nil, inset_animation: nil, key: nil, modal: nil, opacity: nil, open: nil, rtl: nil, title: nil, tooltip: nil, visible: nil, on_dismiss: nil)
12
12
  actions = [] if actions.nil?
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoAppBarControl < Ruflet::Control
8
8
  TYPE = "cupertinoappbar".freeze
9
- WIRE = "CupertinoAppBar".freeze
9
+ WIRE = "AppBar".freeze
10
10
 
11
11
  def initialize(id: nil, automatic_background_visibility: nil, automatically_imply_leading: nil, automatically_imply_title: nil, badge: nil, bgcolor: nil, border: nil, brightness: nil, col: nil, data: nil, disabled: nil, enable_background_filter_blur: nil, expand: nil, expand_loose: nil, key: nil, large: nil, leading: nil, opacity: nil, padding: nil, previous_page_title: nil, rtl: nil, title: nil, tooltip: nil, trailing: nil, transition_between_routes: nil, visible: nil)
12
12
  large = false if large.nil?
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoBottomSheetControl < Ruflet::Control
8
8
  TYPE = "cupertinobottomsheet".freeze
9
- WIRE = "CupertinoBottomSheet".freeze
9
+ WIRE = "BottomSheet".freeze
10
10
 
11
11
  def initialize(id: nil, adaptive: nil, badge: nil, bgcolor: nil, col: nil, content: nil, data: nil, disabled: nil, expand: nil, expand_loose: nil, height: nil, key: nil, modal: nil, opacity: nil, open: nil, padding: nil, rtl: nil, tooltip: nil, visible: nil, on_dismiss: nil)
12
12
  raise ArgumentError, "cupertino_bottom_sheet content is required" if content.nil?
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoButtonControl < Ruflet::Control
8
8
  TYPE = "cupertinobutton".freeze
9
- WIRE = "CupertinoButton".freeze
9
+ WIRE = "Button".freeze
10
10
 
11
11
  KEYWORDS = [:align, :alignment, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :autofocus, :badge, :bgcolor, :border_radius, :bottom, :col, :color, :content, :data, :disabled, :disabled_bgcolor, :expand, :expand_loose, :focus_color, :height, :icon, :icon_color, :key, :left, :margin, :min_size, :mouse_cursor, :offset, :opacity, :opacity_on_click, :padding, :right, :rotate, :rtl, :scale, :size, :size_change_interval, :tooltip, :top, :url, :visible, :width, :on_animation_end, :on_blur, :on_click, :on_focus, :on_long_press, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoCheckboxControl < Ruflet::Control
8
8
  TYPE = "cupertinocheckbox".freeze
9
- WIRE = "CupertinoCheckbox".freeze
9
+ WIRE = "Checkbox".freeze
10
10
 
11
11
  KEYWORDS = [:active_color, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :autofocus, :badge, :border_side, :bottom, :check_color, :col, :data, :disabled, :expand, :expand_loose, :fill_color, :focus_color, :height, :key, :label, :label_position, :left, :margin, :mouse_cursor, :offset, :opacity, :right, :rotate, :rtl, :scale, :semantics_label, :shape, :size_change_interval, :spacing, :tooltip, :top, :tristate, :value, :visible, :width, :on_animation_end, :on_blur, :on_change, :on_focus, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoContextMenuControl < Ruflet::Control
8
8
  TYPE = "cupertinocontextmenu".freeze
9
- WIRE = "CupertinoContextMenu".freeze
9
+ WIRE = "ContextMenu".freeze
10
10
 
11
11
  def initialize(id: nil, actions: nil, adaptive: nil, badge: nil, col: nil, content: nil, data: nil, disabled: nil, enable_haptic_feedback: nil, expand: nil, expand_loose: nil, key: nil, opacity: nil, rtl: nil, tooltip: nil, visible: nil)
12
12
  enable_haptic_feedback = true if enable_haptic_feedback.nil?
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoContextMenuActionControl < Ruflet::Control
8
8
  TYPE = "cupertinocontextmenuaction".freeze
9
- WIRE = "CupertinoContextMenuAction".freeze
9
+ WIRE = "ContextMenuAction".freeze
10
10
 
11
11
  def initialize(id: nil, adaptive: nil, badge: nil, col: nil, content: nil, data: nil, default: nil, destructive: nil, disabled: nil, expand: nil, expand_loose: nil, key: nil, opacity: nil, rtl: nil, tooltip: nil, trailing_icon: nil, visible: nil, on_click: nil)
12
12
  raise ArgumentError, "cupertino_context_menu_action requires content" if content.nil?
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoDatePickerControl < Ruflet::Control
8
8
  TYPE = "cupertinodatepicker".freeze
9
- WIRE = "CupertinoDatePicker".freeze
9
+ WIRE = "DatePicker".freeze
10
10
 
11
11
  KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bgcolor, :bottom, :col, :data, :date_order, :date_picker_mode, :disabled, :expand, :expand_loose, :first_date, :height, :item_extent, :key, :last_date, :left, :locale, :margin, :maximum_year, :minimum_year, :minute_interval, :offset, :opacity, :right, :rotate, :rtl, :scale, :show_day_of_week, :size_change_interval, :tooltip, :top, :use_24h_format, :value, :visible, :width, :on_animation_end, :on_change, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoDialogActionControl < Ruflet::Control
8
8
  TYPE = "cupertinodialogaction".freeze
9
- WIRE = "CupertinoDialogAction".freeze
9
+ WIRE = "Button".freeze
10
10
 
11
11
  def initialize(id: nil, badge: nil, col: nil, content: nil, data: nil, default: nil, destructive: nil, disabled: nil, expand: nil, expand_loose: nil, key: nil, opacity: nil, rtl: nil, text_style: nil, tooltip: nil, visible: nil, on_click: nil)
12
12
  raise ArgumentError, "cupertino_dialog_action requires content" if content.nil?
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoFilledButtonControl < Ruflet::Control
8
8
  TYPE = "cupertinofilledbutton".freeze
9
- WIRE = "CupertinoFilledButton".freeze
9
+ WIRE = "FilledButton".freeze
10
10
 
11
11
  KEYWORDS = [:align, :alignment, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :autofocus, :badge, :bgcolor, :border_radius, :bottom, :col, :color, :content, :data, :disabled, :disabled_bgcolor, :expand, :expand_loose, :focus_color, :height, :icon, :icon_color, :key, :left, :margin, :min_size, :mouse_cursor, :offset, :opacity, :opacity_on_click, :padding, :right, :rotate, :rtl, :scale, :size, :size_change_interval, :tooltip, :top, :url, :visible, :width, :on_animation_end, :on_blur, :on_click, :on_focus, :on_long_press, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoListTileControl < Ruflet::Control
8
8
  TYPE = "cupertinolisttile".freeze
9
- WIRE = "CupertinoListTile".freeze
9
+ WIRE = "ListTile".freeze
10
10
 
11
11
  KEYWORDS = [:additional_info, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bgcolor, :bgcolor_activated, :bottom, :col, :data, :disabled, :expand, :expand_loose, :height, :key, :leading, :leading_size, :leading_to_title, :left, :margin, :notched, :offset, :opacity, :padding, :right, :rotate, :rtl, :scale, :size_change_interval, :subtitle, :title, :toggle_inputs, :tooltip, :top, :trailing, :url, :visible, :width, :on_animation_end, :on_click, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoNavigationBarControl < Ruflet::Control
8
8
  TYPE = "cupertinonavigationbar".freeze
9
- WIRE = "CupertinoNavigationBar".freeze
9
+ WIRE = "NavigationBar".freeze
10
10
 
11
11
  KEYWORDS = [:active_color, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bgcolor, :border, :bottom, :col, :data, :destinations, :disabled, :expand, :expand_loose, :height, :icon_size, :inactive_color, :key, :left, :margin, :offset, :opacity, :right, :rotate, :rtl, :scale, :selected_index, :size_change_interval, :tooltip, :top, :visible, :width, :on_animation_end, :on_change, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoPickerControl < Ruflet::Control
8
8
  TYPE = "cupertinopicker".freeze
9
- WIRE = "CupertinoPicker".freeze
9
+ WIRE = "Picker".freeze
10
10
 
11
11
  KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bgcolor, :bottom, :col, :controls, :data, :default_selection_overlay_bgcolor, :diameter_ratio, :disabled, :expand, :expand_loose, :height, :item_extent, :key, :left, :looping, :magnification, :margin, :off_axis_fraction, :offset, :opacity, :right, :rotate, :rtl, :scale, :selected_index, :selection_overlay, :size_change_interval, :squeeze, :tooltip, :top, :use_magnifier, :visible, :width, :on_animation_end, :on_change, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoRadioControl < Ruflet::Control
8
8
  TYPE = "cupertinoradio".freeze
9
- WIRE = "CupertinoRadio".freeze
9
+ WIRE = "Radio".freeze
10
10
 
11
11
  KEYWORDS = [:active_color, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :autofocus, :badge, :bottom, :col, :data, :disabled, :expand, :expand_loose, :fill_color, :focus_color, :height, :inactive_color, :key, :label, :label_position, :left, :margin, :mouse_cursor, :offset, :opacity, :right, :rotate, :rtl, :scale, :size_change_interval, :toggleable, :tooltip, :top, :use_checkmark_style, :value, :visible, :width, :on_animation_end, :on_blur, :on_focus, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoSegmentedButtonControl < Ruflet::Control
8
8
  TYPE = "cupertinosegmentedbutton".freeze
9
- WIRE = "CupertinoSegmentedButton".freeze
9
+ WIRE = "SegmentedButton".freeze
10
10
 
11
11
  KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :border_color, :bottom, :click_color, :col, :controls, :data, :disabled, :disabled_color, :disabled_text_color, :expand, :expand_loose, :height, :key, :left, :margin, :offset, :opacity, :padding, :right, :rotate, :rtl, :scale, :selected_color, :selected_index, :size_change_interval, :tooltip, :top, :unselected_color, :visible, :width, :on_animation_end, :on_change, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoSliderControl < Ruflet::Control
8
8
  TYPE = "cupertinoslider".freeze
9
- WIRE = "CupertinoSlider".freeze
9
+ WIRE = "Slider".freeze
10
10
 
11
11
  KEYWORDS = [:active_color, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bottom, :col, :data, :disabled, :divisions, :expand, :expand_loose, :height, :key, :left, :margin, :max, :min, :offset, :opacity, :right, :rotate, :rtl, :scale, :size_change_interval, :thumb_color, :tooltip, :top, :value, :visible, :width, :on_animation_end, :on_blur, :on_change, :on_change_end, :on_change_start, :on_focus, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoSlidingSegmentedButtonControl < Ruflet::Control
8
8
  TYPE = "cupertinoslidingsegmentedbutton".freeze
9
- WIRE = "CupertinoSlidingSegmentedButton".freeze
9
+ WIRE = "SegmentedButton".freeze
10
10
 
11
11
  KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bgcolor, :bottom, :col, :controls, :data, :disabled, :expand, :expand_loose, :height, :key, :left, :margin, :offset, :opacity, :padding, :proportional_width, :right, :rotate, :rtl, :scale, :selected_index, :size_change_interval, :thumb_color, :tooltip, :top, :visible, :width, :on_animation_end, :on_change, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoSwitchControl < Ruflet::Control
8
8
  TYPE = "cupertinoswitch".freeze
9
- WIRE = "CupertinoSwitch".freeze
9
+ WIRE = "Switch".freeze
10
10
 
11
11
  KEYWORDS = [:active_thumb_image, :active_thumb_image_src, :active_track_color, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :autofocus, :badge, :bottom, :col, :data, :disabled, :expand, :expand_loose, :focus_color, :height, :inactive_thumb_color, :inactive_thumb_image, :inactive_thumb_image_src, :inactive_track_color, :key, :label, :label_position, :left, :margin, :off_label_color, :offset, :opacity, :right, :rotate, :rtl, :scale, :size_change_interval, :thumb_color, :thumb_icon, :tooltip, :top, :track_outline_color, :track_outline_width, :value, :visible, :width, :on_animation_end, :on_blur, :on_change, :on_focus, :on_image_error, :on_label_color, :on_size_change].freeze
12
12
 
@@ -6,7 +6,7 @@ module Ruflet
6
6
  module RufletComponents
7
7
  class CupertinoTextFieldControl < Ruflet::Control
8
8
  TYPE = "cupertinotextfield".freeze
9
- WIRE = "CupertinoTextField".freeze
9
+ WIRE = "TextField".freeze
10
10
 
11
11
  KEYWORDS = [:adaptive, :align, :align_label_with_hint, :always_call_on_tap, :animate_align, :animate_cursor_opacity, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :autocorrect, :autofill_hints, :autofocus, :badge, :bgcolor, :blend_mode, :border, :border_color, :border_radius, :border_width, :bottom, :can_request_focus, :can_reveal_password, :capitalization, :clear_button_semantics_label, :clear_button_visibility_mode, :clip_behavior, :col, :collapsed, :color, :content_padding, :counter, :counter_style, :cursor_color, :cursor_error_color, :cursor_height, :cursor_radius, :cursor_width, :data, :dense, :disabled, :enable_ime_personalized_learning, :enable_interactive_selection, :enable_stylus_handwriting, :enable_suggestions, :error, :error_max_lines, :error_style, :expand, :expand_loose, :fill_color, :filled, :fit_parent_size, :focus_color, :focused_bgcolor, :focused_border_color, :focused_border_width, :focused_color, :gradient, :height, :helper, :helper_max_lines, :helper_style, :hint_fade_duration, :hint_max_lines, :hint_style, :hint_text, :hover_color, :icon, :ignore_pointers, :ignore_up_down_keys, :image, :input_filter, :key, :keyboard_brightness, :keyboard_type, :label, :label_style, :left, :margin, :max_length, :max_lines, :min_lines, :mouse_cursor, :multiline, :obscuring_character, :offset, :opacity, :padding, :password, :placeholder_style, :placeholder_text, :prefix, :prefix_icon, :prefix_icon_size_constraints, :prefix_style, :prefix_visibility_mode, :read_only, :right, :rotate, :rtl, :scale, :scroll_padding, :selection, :selection_color, :shadows, :shift_enter, :show_cursor, :size_change_interval, :size_constraints, :smart_dashes_type, :smart_quotes_type, :strut_style, :suffix, :suffix_icon, :suffix_icon_size_constraints, :suffix_style, :suffix_visibility_mode, :text_align, :text_size, :text_style, :text_vertical_align, :tooltip, :top, :value, :visible, :width, :on_animation_end, :on_blur, :on_change, :on_click, :on_focus, :on_selection_change, :on_size_change, :on_submit, :on_tap_outside].freeze
12
12