ruflet 0.0.8 → 0.0.9
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/bin/ruflet +6 -0
- data/lib/ruflet/cli/build_command.rb +372 -0
- data/lib/ruflet/cli/extra_command.rb +146 -0
- data/lib/ruflet/cli/flutter_sdk.rb +359 -0
- data/lib/ruflet/cli/new_command.rb +221 -0
- data/lib/ruflet/cli/run_command.rb +699 -0
- data/lib/ruflet/cli/templates.rb +68 -0
- data/lib/ruflet/cli/update_command.rb +111 -0
- data/lib/ruflet/cli.rb +85 -0
- data/lib/ruflet/version.rb +1 -1
- data/lib/ruflet_cli.rb +3 -0
- metadata +59 -209
- data/lib/ruflet.rb +0 -40
- data/lib/ruflet_protocol/ruflet/protocol.rb +0 -62
- data/lib/ruflet_protocol.rb +0 -4
- data/lib/ruflet_ui/ruflet/app.rb +0 -27
- data/lib/ruflet_ui/ruflet/colors.rb +0 -234
- data/lib/ruflet_ui/ruflet/control.rb +0 -281
- data/lib/ruflet_ui/ruflet/dsl.rb +0 -291
- data/lib/ruflet_ui/ruflet/event.rb +0 -42
- data/lib/ruflet_ui/ruflet/events/gesture_events.rb +0 -552
- data/lib/ruflet_ui/ruflet/icon_data.rb +0 -62
- data/lib/ruflet_ui/ruflet/icons/cupertino/cupertino_icons.rb +0 -54
- data/lib/ruflet_ui/ruflet/icons/cupertino_icon_lookup.rb +0 -112
- data/lib/ruflet_ui/ruflet/icons/material_icon_lookup.rb +0 -112
- data/lib/ruflet_ui/ruflet/icons/material_icons.rb +0 -55
- data/lib/ruflet_ui/ruflet/page.rb +0 -1222
- data/lib/ruflet_ui/ruflet/types/geometry.rb +0 -65
- data/lib/ruflet_ui/ruflet/types/text_style.rb +0 -191
- data/lib/ruflet_ui/ruflet/ui/control_factory.rb +0 -53
- data/lib/ruflet_ui/ruflet/ui/control_methods.rb +0 -17
- data/lib/ruflet_ui/ruflet/ui/control_registry.rb +0 -33
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheet_control.rb +0 -57
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheetaction_control.rb +0 -58
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactivityindicator_control.rb +0 -57
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoalertdialog_control.rb +0 -39
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoappbar_control.rb +0 -44
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobottomsheet_control.rb +0 -38
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobutton_control.rb +0 -73
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocheckbox_control.rb +0 -70
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenu_control.rb +0 -34
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenuaction_control.rb +0 -36
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodatepicker_control.rb +0 -67
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodialogaction_control.rb +0 -35
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinofilledbutton_control.rb +0 -73
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinolisttile_control.rb +0 -67
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinonavigationbar_control.rb +0 -61
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinopicker_control.rb +0 -66
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoradio_control.rb +0 -66
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinosegmentedbutton_control.rb +0 -63
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslider_control.rb +0 -64
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslidingsegmentedbutton_control.rb +0 -60
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoswitch_control.rb +0 -73
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotextfield_control.rb +0 -159
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotimerpicker_control.rb +0 -61
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotintedbutton_control.rb +0 -73
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/ruflet_controls.rb +0 -89
- data/lib/ruflet_ui/ruflet/ui/controls/materials/alertdialog_control.rb +0 -58
- data/lib/ruflet_ui/ruflet/ui/controls/materials/appbar_control.rb +0 -53
- data/lib/ruflet_ui/ruflet/ui/controls/materials/audio_control.rb +0 -36
- data/lib/ruflet_ui/ruflet/ui/controls/materials/autocomplete_control.rb +0 -58
- data/lib/ruflet_ui/ruflet/ui/controls/materials/badge_control.rb +0 -31
- data/lib/ruflet_ui/ruflet/ui/controls/materials/banner_control.rb +0 -47
- data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomappbar_control.rb +0 -62
- data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomsheet_control.rb +0 -48
- data/lib/ruflet_ui/ruflet/ui/controls/materials/button_control.rb +0 -69
- data/lib/ruflet_ui/ruflet/ui/controls/materials/card_control.rb +0 -63
- data/lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb +0 -321
- data/lib/ruflet_ui/ruflet/ui/controls/materials/checkbox_control.rb +0 -76
- data/lib/ruflet_ui/ruflet/ui/controls/materials/chip_control.rb +0 -88
- data/lib/ruflet_ui/ruflet/ui/controls/materials/circleavatar_control.rb +0 -62
- data/lib/ruflet_ui/ruflet/ui/controls/materials/container_control.rb +0 -81
- data/lib/ruflet_ui/ruflet/ui/controls/materials/contextmenu_control.rb +0 -63
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datacell_control.rb +0 -38
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datacolumn_control.rb +0 -34
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datarow_control.rb +0 -35
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datatable_control.rb +0 -78
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datepicker_control.rb +0 -55
- data/lib/ruflet_ui/ruflet/ui/controls/materials/daterangepicker_control.rb +0 -57
- data/lib/ruflet_ui/ruflet/ui/controls/materials/divider_control.rb +0 -36
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdown_control.rb +0 -99
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdownm2_control.rb +0 -119
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdownoption_control.rb +0 -35
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanel_control.rb +0 -61
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanellist_control.rb +0 -60
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansiontile_control.rb +0 -82
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledbutton_control.rb +0 -69
- data/lib/ruflet_ui/ruflet/ui/controls/materials/fillediconbutton_control.rb +0 -81
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonalbutton_control.rb +0 -69
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonaliconbutton_control.rb +0 -81
- data/lib/ruflet_ui/ruflet/ui/controls/materials/floatingactionbutton_control.rb +0 -73
- data/lib/ruflet_ui/ruflet/ui/controls/materials/iconbutton_control.rb +0 -81
- data/lib/ruflet_ui/ruflet/ui/controls/materials/listtile_control.rb +0 -87
- data/lib/ruflet_ui/ruflet/ui/controls/materials/menubar_control.rb +0 -33
- data/lib/ruflet_ui/ruflet/ui/controls/materials/menuitembutton_control.rb +0 -67
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationbar_control.rb +0 -67
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationbardestination_control.rb +0 -35
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationdrawer_control.rb +0 -41
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationdrawerdestination_control.rb +0 -34
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationrail_control.rb +0 -70
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationraildestination_control.rb +0 -36
- data/lib/ruflet_ui/ruflet/ui/controls/materials/option_control.rb +0 -35
- data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinedbutton_control.rb +0 -66
- data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinediconbutton_control.rb +0 -81
- data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenubutton_control.rb +0 -74
- data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenuitem_control.rb +0 -38
- data/lib/ruflet_ui/ruflet/ui/controls/materials/progressbar_control.rb +0 -64
- data/lib/ruflet_ui/ruflet/ui/controls/materials/progressring_control.rb +0 -65
- data/lib/ruflet_ui/ruflet/ui/controls/materials/radio_control.rb +0 -70
- data/lib/ruflet_ui/ruflet/ui/controls/materials/radiogroup_control.rb +0 -33
- data/lib/ruflet_ui/ruflet/ui/controls/materials/rangeslider_control.rb +0 -67
- data/lib/ruflet_ui/ruflet/ui/controls/materials/reorderablelistview_control.rb +0 -80
- data/lib/ruflet_ui/ruflet/ui/controls/materials/ruflet_controls.rb +0 -252
- data/lib/ruflet_ui/ruflet/ui/controls/materials/searchbar_control.rb +0 -94
- data/lib/ruflet_ui/ruflet/ui/controls/materials/segment_control.rb +0 -33
- data/lib/ruflet_ui/ruflet/ui/controls/materials/segmentedbutton_control.rb +0 -63
- data/lib/ruflet_ui/ruflet/ui/controls/materials/selectionarea_control.rb +0 -32
- data/lib/ruflet_ui/ruflet/ui/controls/materials/slider_control.rb +0 -76
- data/lib/ruflet_ui/ruflet/ui/controls/materials/snackbar_control.rb +0 -51
- data/lib/ruflet_ui/ruflet/ui/controls/materials/submenubutton_control.rb +0 -66
- data/lib/ruflet_ui/ruflet/ui/controls/materials/switch_control.rb +0 -77
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tab_control.rb +0 -35
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbar_control.rb +0 -77
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbarview_control.rb +0 -57
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabs_control.rb +0 -59
- data/lib/ruflet_ui/ruflet/ui/controls/materials/textbutton_control.rb +0 -66
- data/lib/ruflet_ui/ruflet/ui/controls/materials/textfield_control.rb +0 -148
- data/lib/ruflet_ui/ruflet/ui/controls/materials/timepicker_control.rb +0 -50
- data/lib/ruflet_ui/ruflet/ui/controls/materials/verticaldivider_control.rb +0 -36
- data/lib/ruflet_ui/ruflet/ui/controls/materials/video_control.rb +0 -39
- data/lib/ruflet_ui/ruflet/ui/controls/materials/webview_control.rb +0 -35
- data/lib/ruflet_ui/ruflet/ui/controls/ruflet_controls.rb +0 -447
- data/lib/ruflet_ui/ruflet/ui/controls/shared/animatedswitcher_control.rb +0 -59
- data/lib/ruflet_ui/ruflet/ui/controls/shared/arc_control.rb +0 -29
- data/lib/ruflet_ui/ruflet/ui/controls/shared/autofillgroup_control.rb +0 -32
- data/lib/ruflet_ui/ruflet/ui/controls/shared/basepage_control.rb +0 -44
- data/lib/ruflet_ui/ruflet/ui/controls/shared/browsercontextmenu_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/controls/shared/canvas_control.rb +0 -57
- data/lib/ruflet_ui/ruflet/ui/controls/shared/circle_control.rb +0 -25
- data/lib/ruflet_ui/ruflet/ui/controls/shared/color_control.rb +0 -23
- data/lib/ruflet_ui/ruflet/ui/controls/shared/column_control.rb +0 -67
- data/lib/ruflet_ui/ruflet/ui/controls/shared/dialogs_control.rb +0 -22
- data/lib/ruflet_ui/ruflet/ui/controls/shared/dismissible_control.rb +0 -66
- data/lib/ruflet_ui/ruflet/ui/controls/shared/draggable_control.rb +0 -39
- data/lib/ruflet_ui/ruflet/ui/controls/shared/dragtarget_control.rb +0 -36
- data/lib/ruflet_ui/ruflet/ui/controls/shared/fill_control.rb +0 -22
- data/lib/ruflet_ui/ruflet/ui/controls/shared/fletapp_control.rb +0 -62
- data/lib/ruflet_ui/ruflet/ui/controls/shared/gesturedetector_control.rb +0 -129
- data/lib/ruflet_ui/ruflet/ui/controls/shared/gridview_control.rb +0 -71
- data/lib/ruflet_ui/ruflet/ui/controls/shared/hero_control.rb +0 -56
- data/lib/ruflet_ui/ruflet/ui/controls/shared/icon_control.rb +0 -64
- data/lib/ruflet_ui/ruflet/ui/controls/shared/image_control.rb +0 -27
- data/lib/ruflet_ui/ruflet/ui/controls/shared/interactiveviewer_control.rb +0 -69
- data/lib/ruflet_ui/ruflet/ui/controls/shared/keyboardlistener_control.rb +0 -36
- data/lib/ruflet_ui/ruflet/ui/controls/shared/line_control.rb +0 -26
- data/lib/ruflet_ui/ruflet/ui/controls/shared/listview_control.rb +0 -71
- data/lib/ruflet_ui/ruflet/ui/controls/shared/markdown_control.rb +0 -70
- data/lib/ruflet_ui/ruflet/ui/controls/shared/mergesemantics_control.rb +0 -31
- data/lib/ruflet_ui/ruflet/ui/controls/shared/oval_control.rb +0 -26
- data/lib/ruflet_ui/ruflet/ui/controls/shared/overlay_control.rb +0 -22
- data/lib/ruflet_ui/ruflet/ui/controls/shared/page_control.rb +0 -74
- data/lib/ruflet_ui/ruflet/ui/controls/shared/pagelet_control.rb +0 -64
- data/lib/ruflet_ui/ruflet/ui/controls/shared/pageview_control.rb +0 -64
- data/lib/ruflet_ui/ruflet/ui/controls/shared/path_control.rb +0 -23
- data/lib/ruflet_ui/ruflet/ui/controls/shared/placeholder_control.rb +0 -58
- data/lib/ruflet_ui/ruflet/ui/controls/shared/points_control.rb +0 -24
- data/lib/ruflet_ui/ruflet/ui/controls/shared/rect_control.rb +0 -27
- data/lib/ruflet_ui/ruflet/ui/controls/shared/reorderabledraghandle_control.rb +0 -56
- data/lib/ruflet_ui/ruflet/ui/controls/shared/responsiverow_control.rb +0 -61
- data/lib/ruflet_ui/ruflet/ui/controls/shared/row_control.rb +0 -67
- data/lib/ruflet_ui/ruflet/ui/controls/shared/ruflet_controls.rb +0 -140
- data/lib/ruflet_ui/ruflet/ui/controls/shared/safearea_control.rb +0 -61
- data/lib/ruflet_ui/ruflet/ui/controls/shared/semantics_control.rb +0 -79
- data/lib/ruflet_ui/ruflet/ui/controls/shared/serviceregistry_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/controls/shared/shadermask_control.rb +0 -57
- data/lib/ruflet_ui/ruflet/ui/controls/shared/shadow_control.rb +0 -25
- data/lib/ruflet_ui/ruflet/ui/controls/shared/shimmer_control.rb +0 -60
- data/lib/ruflet_ui/ruflet/ui/controls/shared/stack_control.rb +0 -58
- data/lib/ruflet_ui/ruflet/ui/controls/shared/text_control.rb +0 -32
- data/lib/ruflet_ui/ruflet/ui/controls/shared/textspan_control.rb +0 -39
- data/lib/ruflet_ui/ruflet/ui/controls/shared/transparentpointer_control.rb +0 -54
- data/lib/ruflet_ui/ruflet/ui/controls/shared/view_control.rb +0 -77
- data/lib/ruflet_ui/ruflet/ui/controls/shared/window_control.rb +0 -56
- data/lib/ruflet_ui/ruflet/ui/controls/shared/windowdragarea_control.rb +0 -58
- data/lib/ruflet_ui/ruflet/ui/cupertino_control_factory.rb +0 -13
- data/lib/ruflet_ui/ruflet/ui/cupertino_control_methods.rb +0 -26
- data/lib/ruflet_ui/ruflet/ui/cupertino_control_registry.rb +0 -49
- data/lib/ruflet_ui/ruflet/ui/material_control_factory.rb +0 -13
- data/lib/ruflet_ui/ruflet/ui/material_control_methods.rb +0 -170
- data/lib/ruflet_ui/ruflet/ui/material_control_registry.rb +0 -168
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/accelerometer_control.rb +0 -26
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/barometer_control.rb +0 -26
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/battery_control.rb +0 -22
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/camera_control.rb +0 -58
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/clipboard_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/connectivity_control.rb +0 -22
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/filepicker_control.rb +0 -23
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/flashlight_control.rb +0 -22
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/gyroscope_control.rb +0 -26
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/hapticfeedback_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/magnetometer_control.rb +0 -26
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/screenbrightness_control.rb +0 -23
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/screenshot_control.rb +0 -31
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/semanticsservice_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/shakedetector_control.rb +0 -26
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/share_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/sharedpreferences_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/storagepaths_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/urllauncher_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/useraccelerometer_control.rb +0 -26
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/wakelock_control.rb +0 -21
- data/lib/ruflet_ui/ruflet/ui/services/ruflet_services.rb +0 -66
- data/lib/ruflet_ui/ruflet/ui/shared_control_forwarders.rb +0 -129
- data/lib/ruflet_ui/ruflet/ui/widget_builder.rb +0 -64
- data/lib/ruflet_ui.rb +0 -124
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Ruflet
|
|
4
|
-
module UI
|
|
5
|
-
module SharedControlForwarders
|
|
6
|
-
def control(type, **props, &block) = control_delegate.control(type, **props, &block)
|
|
7
|
-
def widget(type, **props, &block) = control_delegate.widget(type, **props, &block)
|
|
8
|
-
def service(type, **props, &block) = control_delegate.service(type, **props, &block)
|
|
9
|
-
def view(**props, &block) = control_delegate.view(**props, &block)
|
|
10
|
-
def column(**props, &block) = control_delegate.column(**props, &block)
|
|
11
|
-
def center(**props, &block) = control_delegate.center(**props, &block)
|
|
12
|
-
def row(**props, &block) = control_delegate.row(**props, &block)
|
|
13
|
-
def stack(**props, &block) = control_delegate.stack(**props, &block)
|
|
14
|
-
def grid_view(**props, &block) = control_delegate.grid_view(**props, &block)
|
|
15
|
-
def gridview(**props, &block) = control_delegate.gridview(**props, &block)
|
|
16
|
-
def container(**props, &block) = control_delegate.container(**props, &block)
|
|
17
|
-
def gesture_detector(**props, &block) = control_delegate.gesture_detector(**props, &block)
|
|
18
|
-
def gesturedetector(**props, &block) = control_delegate.gesturedetector(**props, &block)
|
|
19
|
-
def draggable(**props, &block) = control_delegate.draggable(**props, &block)
|
|
20
|
-
def drag_target(**props, &block) = control_delegate.drag_target(**props, &block)
|
|
21
|
-
def dragtarget(**props, &block) = control_delegate.dragtarget(**props, &block)
|
|
22
|
-
def text(value = nil, **props) = control_delegate.text(value, **props)
|
|
23
|
-
def button(**props) = control_delegate.button(**props)
|
|
24
|
-
def elevated_button(**props) = control_delegate.elevated_button(**props)
|
|
25
|
-
def text_button(**props) = control_delegate.text_button(**props)
|
|
26
|
-
def textbutton(**props) = control_delegate.textbutton(**props)
|
|
27
|
-
def filled_button(**props) = control_delegate.filled_button(**props)
|
|
28
|
-
def filledbutton(**props) = control_delegate.filledbutton(**props)
|
|
29
|
-
def icon_button(**props) = control_delegate.icon_button(**props)
|
|
30
|
-
def iconbutton(**props) = control_delegate.iconbutton(**props)
|
|
31
|
-
def text_field(**props) = control_delegate.text_field(**props)
|
|
32
|
-
def textfield(**props) = control_delegate.textfield(**props)
|
|
33
|
-
def checkbox(**props) = control_delegate.checkbox(**props)
|
|
34
|
-
def radio(**props) = control_delegate.radio(**props)
|
|
35
|
-
def radio_group(**props) = control_delegate.radio_group(**props)
|
|
36
|
-
def radiogroup(**props) = control_delegate.radiogroup(**props)
|
|
37
|
-
def alert_dialog(**props) = control_delegate.alert_dialog(**props)
|
|
38
|
-
def alertdialog(**props) = control_delegate.alertdialog(**props)
|
|
39
|
-
def snack_bar(**props) = control_delegate.snack_bar(**props)
|
|
40
|
-
def snackbar(**props) = control_delegate.snackbar(**props)
|
|
41
|
-
def bottom_sheet(**props) = control_delegate.bottom_sheet(**props)
|
|
42
|
-
def bottomsheet(**props) = control_delegate.bottomsheet(**props)
|
|
43
|
-
def markdown(value = nil, **props) = control_delegate.markdown(value, **props)
|
|
44
|
-
def icon(**props) = control_delegate.icon(**props)
|
|
45
|
-
def image(src = nil, **props) = control_delegate.image(src, **props)
|
|
46
|
-
def fab(content = nil, **props) = control_delegate.fab(content, **props)
|
|
47
|
-
def app_bar(**props) = control_delegate.app_bar(**props)
|
|
48
|
-
def appbar(**props) = control_delegate.appbar(**props)
|
|
49
|
-
def clipboard(**props) = control_delegate.clipboard(**props)
|
|
50
|
-
def floating_action_button(**props) = control_delegate.floating_action_button(**props)
|
|
51
|
-
def floatingactionbutton(**props) = control_delegate.floatingactionbutton(**props)
|
|
52
|
-
def tabs(**props, &block) = control_delegate.tabs(**props, &block)
|
|
53
|
-
def tab(**props, &block) = control_delegate.tab(**props, &block)
|
|
54
|
-
def tab_bar(**props, &block) = control_delegate.tab_bar(**props, &block)
|
|
55
|
-
def tabbar(**props, &block) = control_delegate.tabbar(**props, &block)
|
|
56
|
-
def tab_bar_view(**props, &block) = control_delegate.tab_bar_view(**props, &block)
|
|
57
|
-
def tabbarview(**props, &block) = control_delegate.tabbarview(**props, &block)
|
|
58
|
-
def navigation_bar(**props, &block) = control_delegate.navigation_bar(**props, &block)
|
|
59
|
-
def navigationbar(**props, &block) = control_delegate.navigationbar(**props, &block)
|
|
60
|
-
def navigation_bar_destination(**props, &block) = control_delegate.navigation_bar_destination(**props, &block)
|
|
61
|
-
def navigationbardestination(**props, &block) = control_delegate.navigationbardestination(**props, &block)
|
|
62
|
-
def bar_chart(**props) = control_delegate.bar_chart(**props)
|
|
63
|
-
def barchart(**props) = control_delegate.barchart(**props)
|
|
64
|
-
def bar_chart_group(**props) = control_delegate.bar_chart_group(**props)
|
|
65
|
-
def barchartgroup(**props) = control_delegate.barchartgroup(**props)
|
|
66
|
-
def bar_chart_rod(**props) = control_delegate.bar_chart_rod(**props)
|
|
67
|
-
def barchartrod(**props) = control_delegate.barchartrod(**props)
|
|
68
|
-
def bar_chart_rod_stack_item(**props) = control_delegate.bar_chart_rod_stack_item(**props)
|
|
69
|
-
def barchartrodstackitem(**props) = control_delegate.barchartrodstackitem(**props)
|
|
70
|
-
def line_chart(**props) = control_delegate.line_chart(**props)
|
|
71
|
-
def linechart(**props) = control_delegate.linechart(**props)
|
|
72
|
-
def line_chart_data(**props) = control_delegate.line_chart_data(**props)
|
|
73
|
-
def linechartdata(**props) = control_delegate.linechartdata(**props)
|
|
74
|
-
def line_chart_data_point(**props) = control_delegate.line_chart_data_point(**props)
|
|
75
|
-
def linechartdatapoint(**props) = control_delegate.linechartdatapoint(**props)
|
|
76
|
-
def pie_chart(**props) = control_delegate.pie_chart(**props)
|
|
77
|
-
def piechart(**props) = control_delegate.piechart(**props)
|
|
78
|
-
def pie_chart_section(**props) = control_delegate.pie_chart_section(**props)
|
|
79
|
-
def piechartsection(**props) = control_delegate.piechartsection(**props)
|
|
80
|
-
def candlestick_chart(**props) = control_delegate.candlestick_chart(**props)
|
|
81
|
-
def candlestickchart(**props) = control_delegate.candlestickchart(**props)
|
|
82
|
-
def candlestick_chart_spot(**props) = control_delegate.candlestick_chart_spot(**props)
|
|
83
|
-
def candlestickchartspot(**props) = control_delegate.candlestickchartspot(**props)
|
|
84
|
-
def radar_chart(**props) = control_delegate.radar_chart(**props)
|
|
85
|
-
def radarchart(**props) = control_delegate.radarchart(**props)
|
|
86
|
-
def radar_chart_title(**props) = control_delegate.radar_chart_title(**props)
|
|
87
|
-
def radarcharttitle(**props) = control_delegate.radarcharttitle(**props)
|
|
88
|
-
def radar_data_set(**props) = control_delegate.radar_data_set(**props)
|
|
89
|
-
def radardataset(**props) = control_delegate.radardataset(**props)
|
|
90
|
-
def radar_data_set_entry(**props) = control_delegate.radar_data_set_entry(**props)
|
|
91
|
-
def radardatasetentry(**props) = control_delegate.radardatasetentry(**props)
|
|
92
|
-
def scatter_chart(**props) = control_delegate.scatter_chart(**props)
|
|
93
|
-
def scatterchart(**props) = control_delegate.scatterchart(**props)
|
|
94
|
-
def scatter_chart_spot(**props) = control_delegate.scatter_chart_spot(**props)
|
|
95
|
-
def scatterchartspot(**props) = control_delegate.scatterchartspot(**props)
|
|
96
|
-
def chart_axis(**props) = control_delegate.chart_axis(**props)
|
|
97
|
-
def chartaxis(**props) = control_delegate.chartaxis(**props)
|
|
98
|
-
def chart_axis_label(**props) = control_delegate.chart_axis_label(**props)
|
|
99
|
-
def chartaxislabel(**props) = control_delegate.chartaxislabel(**props)
|
|
100
|
-
def web_view(**props) = control_delegate.web_view(**props)
|
|
101
|
-
def webview(**props) = control_delegate.webview(**props)
|
|
102
|
-
def cupertino_button(**props) = control_delegate.cupertino_button(**props)
|
|
103
|
-
def cupertinobutton(**props) = control_delegate.cupertinobutton(**props)
|
|
104
|
-
def cupertino_filled_button(**props) = control_delegate.cupertino_filled_button(**props)
|
|
105
|
-
def cupertinofilledbutton(**props) = control_delegate.cupertinofilledbutton(**props)
|
|
106
|
-
def cupertino_text_field(**props) = control_delegate.cupertino_text_field(**props)
|
|
107
|
-
def cupertinotextfield(**props) = control_delegate.cupertinotextfield(**props)
|
|
108
|
-
def cupertino_switch(**props) = control_delegate.cupertino_switch(**props)
|
|
109
|
-
def cupertinoswitch(**props) = control_delegate.cupertinoswitch(**props)
|
|
110
|
-
def cupertino_slider(**props) = control_delegate.cupertino_slider(**props)
|
|
111
|
-
def cupertinoslider(**props) = control_delegate.cupertinoslider(**props)
|
|
112
|
-
def cupertino_alert_dialog(**props) = control_delegate.cupertino_alert_dialog(**props)
|
|
113
|
-
def cupertinoalertdialog(**props) = control_delegate.cupertinoalertdialog(**props)
|
|
114
|
-
def cupertino_action_sheet(**props) = control_delegate.cupertino_action_sheet(**props)
|
|
115
|
-
def cupertinoactionsheet(**props) = control_delegate.cupertinoactionsheet(**props)
|
|
116
|
-
def cupertino_dialog_action(**props) = control_delegate.cupertino_dialog_action(**props)
|
|
117
|
-
def cupertinodialogaction(**props) = control_delegate.cupertinodialogaction(**props)
|
|
118
|
-
def cupertino_navigation_bar(**props) = control_delegate.cupertino_navigation_bar(**props)
|
|
119
|
-
def cupertinonavigationbar(**props) = control_delegate.cupertinonavigationbar(**props)
|
|
120
|
-
def duration(**parts) = control_delegate.duration(**parts)
|
|
121
|
-
|
|
122
|
-
private
|
|
123
|
-
|
|
124
|
-
def control_delegate
|
|
125
|
-
raise NotImplementedError, "control_delegate must be implemented by the including/extended context"
|
|
126
|
-
end
|
|
127
|
-
end
|
|
128
|
-
end
|
|
129
|
-
end
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "control_methods"
|
|
4
|
-
require_relative "control_factory"
|
|
5
|
-
|
|
6
|
-
module Ruflet
|
|
7
|
-
class WidgetBuilder
|
|
8
|
-
include UI::ControlMethods
|
|
9
|
-
|
|
10
|
-
attr_reader :children
|
|
11
|
-
|
|
12
|
-
def initialize
|
|
13
|
-
@children = []
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def widget(type, **props, &block)
|
|
17
|
-
control(type, **props, &block)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def service(type, **props, &block)
|
|
21
|
-
build_service(type, **props, &block)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def control(type, **props, &block)
|
|
25
|
-
mapped_props = props.dup
|
|
26
|
-
prop_children = extract_children_prop(mapped_props)
|
|
27
|
-
|
|
28
|
-
node = UI::ControlFactory.build(type, **mapped_props)
|
|
29
|
-
if block
|
|
30
|
-
nested = WidgetBuilder.new
|
|
31
|
-
block_result = nested.instance_eval(&block)
|
|
32
|
-
if block_result.is_a?(Control) && !nested.children.any? { |c| c.object_id == block_result.object_id }
|
|
33
|
-
nested.children << block_result
|
|
34
|
-
end
|
|
35
|
-
node.children.concat(nested.children)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
if prop_children
|
|
39
|
-
Array(prop_children).each do |child|
|
|
40
|
-
node.children << child if child.is_a?(Control)
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
@children << node
|
|
45
|
-
node
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def build_widget(type, **props, &block) = control(type, **props, &block)
|
|
49
|
-
def build_service(type, **props, &block)
|
|
50
|
-
mapped_props = props.dup
|
|
51
|
-
node = UI::ControlFactory.build(type, **mapped_props)
|
|
52
|
-
node
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
private
|
|
56
|
-
|
|
57
|
-
def extract_children_prop(props)
|
|
58
|
-
props.delete(:children) ||
|
|
59
|
-
props.delete("children") ||
|
|
60
|
-
props.delete(:controls) ||
|
|
61
|
-
props.delete("controls")
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|
data/lib/ruflet_ui.rb
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "ruflet_protocol"
|
|
4
|
-
require_relative "ruflet_ui/ruflet/colors"
|
|
5
|
-
require_relative "ruflet_ui/ruflet/icon_data"
|
|
6
|
-
require_relative "ruflet_ui/ruflet/icons/material_icons"
|
|
7
|
-
require_relative "ruflet_ui/ruflet/icons/cupertino/cupertino_icons"
|
|
8
|
-
require_relative "ruflet_ui/ruflet/types/text_style"
|
|
9
|
-
require_relative "ruflet_ui/ruflet/types/geometry"
|
|
10
|
-
require_relative "ruflet_ui/ruflet/control"
|
|
11
|
-
require_relative "ruflet_ui/ruflet/ui/control_registry"
|
|
12
|
-
require_relative "ruflet_ui/ruflet/ui/widget_builder"
|
|
13
|
-
require_relative "ruflet_ui/ruflet/ui/shared_control_forwarders"
|
|
14
|
-
require_relative "ruflet_ui/ruflet/event"
|
|
15
|
-
require_relative "ruflet_ui/ruflet/page"
|
|
16
|
-
require_relative "ruflet_ui/ruflet/app"
|
|
17
|
-
require_relative "ruflet_ui/ruflet/dsl"
|
|
18
|
-
|
|
19
|
-
module Ruflet
|
|
20
|
-
TextStyle = UI::Types::TextStyle
|
|
21
|
-
StrutStyle = UI::Types::StrutStyle
|
|
22
|
-
TextOverflow = UI::Types::TextOverflow
|
|
23
|
-
TextBaseline = UI::Types::TextBaseline
|
|
24
|
-
TextThemeStyle = UI::Types::TextThemeStyle
|
|
25
|
-
TextDecoration = UI::Types::TextDecoration
|
|
26
|
-
TextDecorationStyle = UI::Types::TextDecorationStyle
|
|
27
|
-
Offset = UI::Types::Offset
|
|
28
|
-
Duration = UI::Types::Duration
|
|
29
|
-
|
|
30
|
-
module MainAxisAlignment
|
|
31
|
-
CENTER = "center"
|
|
32
|
-
START = "start"
|
|
33
|
-
FINISH = "end"
|
|
34
|
-
SPACE_BETWEEN = "spaceBetween"
|
|
35
|
-
SPACE_AROUND = "spaceAround"
|
|
36
|
-
SPACE_EVENLY = "spaceEvenly"
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
module CrossAxisAlignment
|
|
40
|
-
CENTER = "center"
|
|
41
|
-
START = "start"
|
|
42
|
-
FINISH = "end"
|
|
43
|
-
STRETCH = "stretch"
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
module TextAlign
|
|
47
|
-
LEFT = "left"
|
|
48
|
-
RIGHT = "right"
|
|
49
|
-
CENTER = "center"
|
|
50
|
-
JUSTIFY = "justify"
|
|
51
|
-
START = "start"
|
|
52
|
-
FINISH = "end"
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
module Icons
|
|
56
|
-
class << self
|
|
57
|
-
def const_missing(name)
|
|
58
|
-
if Ruflet::MaterialIcons.const_defined?(name, false)
|
|
59
|
-
return Ruflet::MaterialIcons.const_get(name)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
if Ruflet::CupertinoIcons.const_defined?(name, false)
|
|
63
|
-
return Ruflet::CupertinoIcons.const_get(name)
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
super
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def [](name)
|
|
70
|
-
key = name.to_s.upcase.to_sym
|
|
71
|
-
return Ruflet::MaterialIcons.const_get(key) if Ruflet::MaterialIcons.const_defined?(key, false)
|
|
72
|
-
return Ruflet::CupertinoIcons.const_get(key) if Ruflet::CupertinoIcons.const_defined?(key, false)
|
|
73
|
-
|
|
74
|
-
Ruflet::IconData.new(name.to_s)
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
class << self
|
|
80
|
-
include UI::SharedControlForwarders
|
|
81
|
-
|
|
82
|
-
def app(host: nil, port: nil, &block)
|
|
83
|
-
DSL.app(host: host, port: port, &block)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
private
|
|
87
|
-
|
|
88
|
-
def control_delegate
|
|
89
|
-
WidgetBuilder.new
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
module UI
|
|
94
|
-
class << self
|
|
95
|
-
include SharedControlForwarders
|
|
96
|
-
|
|
97
|
-
def app(**opts, &block) = Ruflet.app(**opts, &block)
|
|
98
|
-
def page(**props, &block) = Ruflet::DSL.page(**props, &block)
|
|
99
|
-
|
|
100
|
-
private
|
|
101
|
-
|
|
102
|
-
def control_delegate
|
|
103
|
-
Ruflet::DSL
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
module Kernel
|
|
110
|
-
include Ruflet::UI::SharedControlForwarders
|
|
111
|
-
|
|
112
|
-
private
|
|
113
|
-
|
|
114
|
-
def app(**opts, &block) = Ruflet::DSL.app(**opts, &block)
|
|
115
|
-
def page(**props, &block) = Ruflet::DSL.page(**props, &block)
|
|
116
|
-
|
|
117
|
-
def control_delegate
|
|
118
|
-
Ruflet::DSL
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
if Ruflet::UI::SharedControlForwarders.respond_to?(:instance_methods)
|
|
122
|
-
private(*Ruflet::UI::SharedControlForwarders.instance_methods(false))
|
|
123
|
-
end
|
|
124
|
-
end
|