ruflet_core 0.0.16 → 0.0.18
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/README.md +2 -18
- data/lib/ruflet/version.rb +1 -1
- data/lib/ruflet_core.rb +9 -7
- data/lib/ruflet_protocol/ruflet/protocol.rb +28 -54
- data/lib/ruflet_ui/ruflet/app.rb +1 -1
- data/lib/ruflet_ui/ruflet/colors.rb +4 -18
- data/lib/ruflet_ui/ruflet/control.rb +65 -63
- data/lib/ruflet_ui/ruflet/dsl.rb +10 -3
- data/lib/ruflet_ui/ruflet/icons/cupertino/cupertino_icons.rb +2 -2
- data/lib/ruflet_ui/ruflet/icons/cupertino_icon_lookup.rb +1 -0
- data/lib/ruflet_ui/ruflet/icons/icon_constant_names.rb +29 -0
- data/lib/ruflet_ui/ruflet/icons/material/material_icons.rb +2 -2
- data/lib/ruflet_ui/ruflet/icons/material_icon_lookup.rb +1 -0
- data/lib/ruflet_ui/ruflet/page.rb +303 -460
- data/lib/ruflet_ui/ruflet/ui/control_factory.rb +68 -12
- data/lib/ruflet_ui/ruflet/ui/control_registry.rb +13 -6
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheet_control.rb +8 -45
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheetaction_control.rb +45 -2
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactivityindicator_control.rb +43 -2
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoalertdialog_control.rb +0 -5
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobutton_control.rb +59 -4
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocheckbox_control.rb +56 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenu_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenuaction_control.rb +1 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodatepicker_control.rb +53 -8
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodialogaction_control.rb +1 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinofilledbutton_control.rb +59 -4
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinolisttile_control.rb +54 -9
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinonavigationbar_control.rb +47 -9
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinopicker_control.rb +52 -10
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoradio_control.rb +52 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinosegmentedbutton_control.rb +49 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslider_control.rb +50 -5
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslidingsegmentedbutton_control.rb +46 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoswitch_control.rb +61 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotextfield_control.rb +145 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotimerpicker_control.rb +47 -12
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotintedbutton_control.rb +59 -4
- data/lib/ruflet_ui/ruflet/ui/controls/materials/alertdialog_control.rb +8 -45
- data/lib/ruflet_ui/ruflet/ui/controls/materials/appbar_control.rb +8 -40
- data/lib/ruflet_ui/ruflet/ui/controls/materials/audio_control.rb +16 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/autocomplete_control.rb +44 -1
- data/lib/ruflet_ui/ruflet/ui/controls/materials/badge_control.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/banner_control.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomappbar_control.rb +8 -47
- data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomsheet_control.rb +0 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/button_control.rb +8 -54
- data/lib/ruflet_ui/ruflet/ui/controls/materials/card_control.rb +8 -50
- data/lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb +19 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/checkbox_control.rb +9 -60
- data/lib/ruflet_ui/ruflet/ui/controls/materials/chip_control.rb +7 -81
- data/lib/ruflet_ui/ruflet/ui/controls/materials/circleavatar_control.rb +7 -56
- data/lib/ruflet_ui/ruflet/ui/controls/materials/container_control.rb +9 -65
- data/lib/ruflet_ui/ruflet/ui/controls/materials/contextmenu_control.rb +50 -4
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datacell_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datacolumn_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datatable_control.rb +7 -88
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datepicker_control.rb +9 -55
- data/lib/ruflet_ui/ruflet/ui/controls/materials/daterangepicker_control.rb +8 -58
- data/lib/ruflet_ui/ruflet/ui/controls/materials/divider_control.rb +0 -9
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdown_control.rb +8 -93
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdownm2_control.rb +9 -103
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdownoption_control.rb +0 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanel_control.rb +7 -51
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanellist_control.rb +46 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansiontile_control.rb +69 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledbutton_control.rb +54 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/fillediconbutton_control.rb +67 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonalbutton_control.rb +54 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonaliconbutton_control.rb +67 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/floatingactionbutton_control.rb +7 -69
- data/lib/ruflet_ui/ruflet/ui/controls/materials/iconbutton_control.rb +8 -68
- data/lib/ruflet_ui/ruflet/ui/controls/materials/listtile_control.rb +8 -74
- data/lib/ruflet_ui/ruflet/ui/controls/materials/map_control.rb +99 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/menuitembutton_control.rb +8 -56
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationbar_control.rb +7 -59
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationdrawer_control.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationrail_control.rb +7 -73
- data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinedbutton_control.rb +51 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinediconbutton_control.rb +67 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenubutton_control.rb +8 -61
- data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenuitem_control.rb +0 -6
- data/lib/ruflet_ui/ruflet/ui/controls/materials/progressbar_control.rb +8 -56
- data/lib/ruflet_ui/ruflet/ui/controls/materials/progressring_control.rb +8 -56
- data/lib/ruflet_ui/ruflet/ui/controls/materials/radio_control.rb +9 -54
- data/lib/ruflet_ui/ruflet/ui/controls/materials/rangeslider_control.rb +7 -62
- data/lib/ruflet_ui/ruflet/ui/controls/materials/reorderablelistview_control.rb +9 -64
- data/lib/ruflet_ui/ruflet/ui/controls/materials/ruflet_controls.rb +5 -26
- data/lib/ruflet_ui/ruflet/ui/controls/materials/searchbar_control.rb +80 -11
- data/lib/ruflet_ui/ruflet/ui/controls/materials/segment_control.rb +0 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/segmentedbutton_control.rb +7 -64
- data/lib/ruflet_ui/ruflet/ui/controls/materials/selectionarea_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/slider_control.rb +9 -60
- data/lib/ruflet_ui/ruflet/ui/controls/materials/snackbar_control.rb +37 -4
- data/lib/ruflet_ui/ruflet/ui/controls/materials/snackbaraction_control.rb +38 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/spinkit_control.rb +25 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/submenubutton_control.rb +52 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/switch_control.rb +9 -61
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tab_control.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbar_control.rb +8 -64
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbarview_control.rb +43 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabs_control.rb +7 -47
- data/lib/ruflet_ui/ruflet/ui/controls/materials/textbutton_control.rb +51 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/textfield_control.rb +9 -132
- data/lib/ruflet_ui/ruflet/ui/controls/materials/timepicker_control.rb +10 -34
- data/lib/ruflet_ui/ruflet/ui/controls/materials/verticaldivider_control.rb +0 -9
- data/lib/ruflet_ui/ruflet/ui/controls/materials/video_control.rb +9 -42
- data/lib/ruflet_ui/ruflet/ui/controls/materials/webview_control.rb +1 -114
- data/lib/ruflet_ui/ruflet/ui/controls/ruflet_controls.rb +13 -28
- data/lib/ruflet_ui/ruflet/ui/controls/shared/animatedswitcher_control.rb +46 -4
- data/lib/ruflet_ui/ruflet/ui/controls/shared/arc_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/browsercontextmenu_control.rb +1 -12
- data/lib/ruflet_ui/ruflet/ui/controls/shared/canvas_control.rb +8 -54
- data/lib/ruflet_ui/ruflet/ui/controls/shared/circle_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/column_control.rb +9 -51
- data/lib/ruflet_ui/ruflet/ui/controls/shared/dismissible_control.rb +52 -12
- data/lib/ruflet_ui/ruflet/ui/controls/shared/draggable_control.rb +1 -7
- data/lib/ruflet_ui/ruflet/ui/controls/shared/dragtarget_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/shared/fletapp_control.rb +9 -46
- data/lib/ruflet_ui/ruflet/ui/controls/shared/gesturedetector_control.rb +9 -113
- data/lib/ruflet_ui/ruflet/ui/controls/shared/gridview_control.rb +57 -13
- data/lib/ruflet_ui/ruflet/ui/controls/shared/hero_control.rb +9 -40
- data/lib/ruflet_ui/ruflet/ui/controls/shared/icon_control.rb +9 -48
- data/lib/ruflet_ui/ruflet/ui/controls/shared/interactiveviewer_control.rb +9 -53
- data/lib/ruflet_ui/ruflet/ui/controls/shared/line_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/listview_control.rb +57 -11
- data/lib/ruflet_ui/ruflet/ui/controls/shared/markdown_control.rb +9 -54
- data/lib/ruflet_ui/ruflet/ui/controls/shared/oval_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/page_control.rb +9 -58
- data/lib/ruflet_ui/ruflet/ui/controls/shared/pagelet_control.rb +9 -48
- data/lib/ruflet_ui/ruflet/ui/controls/shared/pageview_control.rb +50 -4
- data/lib/ruflet_ui/ruflet/ui/controls/shared/path_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/placeholder_control.rb +44 -9
- data/lib/ruflet_ui/ruflet/ui/controls/shared/points_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/rect_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/reorderabledraghandle_control.rb +43 -4
- data/lib/ruflet_ui/ruflet/ui/controls/shared/responsiverow_control.rb +47 -15
- data/lib/ruflet_ui/ruflet/ui/controls/shared/rotatedbox_control.rb +97 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/row_control.rb +9 -51
- data/lib/ruflet_ui/ruflet/ui/controls/shared/ruflet_controls.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/safearea_control.rb +48 -4
- data/lib/ruflet_ui/ruflet/ui/{services/ruflet → controls/shared}/screenshot_control.rb +18 -2
- data/lib/ruflet_ui/ruflet/ui/controls/shared/semantics_control.rb +65 -1
- data/lib/ruflet_ui/ruflet/ui/controls/shared/shadermask_control.rb +9 -41
- data/lib/ruflet_ui/ruflet/ui/controls/shared/shimmer_control.rb +9 -44
- data/lib/ruflet_ui/ruflet/ui/controls/shared/stack_control.rb +44 -1
- data/lib/ruflet_ui/ruflet/ui/controls/shared/text_control.rb +9 -35
- data/lib/ruflet_ui/ruflet/ui/controls/shared/transparentpointer_control.rb +9 -38
- data/lib/ruflet_ui/ruflet/ui/controls/shared/view_control.rb +63 -1
- data/lib/ruflet_ui/ruflet/ui/controls/shared/window_control.rb +40 -66
- data/lib/ruflet_ui/ruflet/ui/controls/shared/windowdragarea_control.rb +45 -4
- data/lib/ruflet_ui/ruflet/ui/material_control_methods.rb +61 -17
- data/lib/ruflet_ui/ruflet/ui/material_control_registry.rb +22 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/accelerometer_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/audio_recorder_control.rb +14 -36
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/barometer_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/battery_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/camera_control.rb +9 -42
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/clipboard_control.rb +31 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/connectivity_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/filepicker_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/flashlight_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/geolocator_control.rb +14 -30
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/gyroscope_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/hapticfeedback_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/magnetometer_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/permissionhandler_control.rb +5 -20
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/screenbrightness_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/securestorage_control.rb +22 -49
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/semanticsservice_control.rb +20 -15
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/shakedetector_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/share_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/sharedpreferences_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/storagepaths_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/urllauncher_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/useraccelerometer_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/wakelock_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet_services.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/shared_control_forwarders.rb +20 -1
- data/lib/ruflet_ui.rb +12 -10
- metadata +8 -9
- data/lib/ruflet_ui/ruflet/types/animation.rb +0 -110
- data/lib/ruflet_ui/ruflet/ui/controls/materials/codeeditor_control.rb +0 -93
- data/lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb +0 -311
- data/lib/ruflet_ui/ruflet/ui/controls/materials/rive_control.rb +0 -87
- data/lib/ruflet_ui/ruflet/ui/controls/materials/spinkit_controls.rb +0 -109
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/tester_control.rb +0 -126
|
@@ -8,46 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "hero".freeze
|
|
9
9
|
WIRE = "Hero".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
props
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
21
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
22
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
23
|
-
props[:badge] = badge unless badge.nil?
|
|
24
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
25
|
-
props[:col] = col unless col.nil?
|
|
26
|
-
props[:content] = content unless content.nil?
|
|
27
|
-
props[:data] = data unless data.nil?
|
|
28
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
29
|
-
props[:expand] = expand unless expand.nil?
|
|
30
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
31
|
-
props[:height] = height unless height.nil?
|
|
32
|
-
props[:key] = key unless key.nil?
|
|
33
|
-
props[:left] = left unless left.nil?
|
|
34
|
-
props[:margin] = margin unless margin.nil?
|
|
35
|
-
props[:offset] = offset unless offset.nil?
|
|
36
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
37
|
-
props[:right] = right unless right.nil?
|
|
38
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
39
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
40
|
-
props[:scale] = scale unless scale.nil?
|
|
41
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
42
|
-
props[:tag] = tag unless tag.nil?
|
|
43
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
44
|
-
props[:top] = top unless top.nil?
|
|
45
|
-
props[:transition_on_user_gestures] = transition_on_user_gestures unless transition_on_user_gestures.nil?
|
|
46
|
-
props[:visible] = visible unless visible.nil?
|
|
47
|
-
props[:width] = width unless width.nil?
|
|
48
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
49
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
50
|
-
super(type: TYPE, id: id, **props)
|
|
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, :disabled, :expand, :expand_loose, :height, :key, :left, :margin, :offset, :opacity, :right, :rotate, :rtl, :scale, :size_change_interval, :tag, :tooltip, :top, :transition_on_user_gestures, :visible, :width, :on_animation_end, :on_size_change].freeze
|
|
12
|
+
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
51
20
|
end
|
|
52
21
|
end
|
|
53
22
|
end
|
|
@@ -8,54 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "icon".freeze
|
|
9
9
|
WIRE = "Icon".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
props
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
21
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
22
|
-
props[:apply_text_scaling] = apply_text_scaling unless apply_text_scaling.nil?
|
|
23
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
24
|
-
props[:badge] = badge unless badge.nil?
|
|
25
|
-
props[:blend_mode] = blend_mode unless blend_mode.nil?
|
|
26
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
27
|
-
props[:col] = col unless col.nil?
|
|
28
|
-
props[:color] = color unless color.nil?
|
|
29
|
-
props[:data] = data unless data.nil?
|
|
30
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
31
|
-
props[:expand] = expand unless expand.nil?
|
|
32
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
33
|
-
props[:fill] = fill unless fill.nil?
|
|
34
|
-
props[:grade] = grade unless grade.nil?
|
|
35
|
-
props[:height] = height unless height.nil?
|
|
36
|
-
props[:icon] = icon unless icon.nil?
|
|
37
|
-
props[:key] = key unless key.nil?
|
|
38
|
-
props[:left] = left unless left.nil?
|
|
39
|
-
props[:margin] = margin unless margin.nil?
|
|
40
|
-
props[:offset] = offset unless offset.nil?
|
|
41
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
42
|
-
props[:optical_size] = optical_size unless optical_size.nil?
|
|
43
|
-
props[:right] = right unless right.nil?
|
|
44
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
45
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
46
|
-
props[:scale] = scale unless scale.nil?
|
|
47
|
-
props[:semantics_label] = semantics_label unless semantics_label.nil?
|
|
48
|
-
props[:shadows] = shadows unless shadows.nil?
|
|
49
|
-
props[:size] = size unless size.nil?
|
|
50
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
51
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
52
|
-
props[:top] = top unless top.nil?
|
|
53
|
-
props[:visible] = visible unless visible.nil?
|
|
54
|
-
props[:weight] = weight unless weight.nil?
|
|
55
|
-
props[:width] = width unless width.nil?
|
|
56
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
57
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
58
|
-
super(type: TYPE, id: id, **props)
|
|
11
|
+
KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :apply_text_scaling, :aspect_ratio, :badge, :blend_mode, :bottom, :col, :color, :data, :disabled, :expand, :expand_loose, :fill, :grade, :height, :icon, :key, :left, :margin, :offset, :opacity, :optical_size, :right, :rotate, :rtl, :scale, :semantics_label, :shadows, :size, :size_change_interval, :tooltip, :top, :visible, :weight, :width, :on_animation_end, :on_size_change].freeze
|
|
12
|
+
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
59
20
|
end
|
|
60
21
|
end
|
|
61
22
|
end
|
|
@@ -8,59 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "interactiveviewer".freeze
|
|
9
9
|
WIRE = "InteractiveViewer".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
props
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
props[:animate_rotation] = animate_rotation unless animate_rotation.nil?
|
|
21
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
22
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
23
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
24
|
-
props[:badge] = badge unless badge.nil?
|
|
25
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
26
|
-
props[:boundary_margin] = boundary_margin unless boundary_margin.nil?
|
|
27
|
-
props[:clip_behavior] = clip_behavior unless clip_behavior.nil?
|
|
28
|
-
props[:col] = col unless col.nil?
|
|
29
|
-
props[:constrained] = constrained unless constrained.nil?
|
|
30
|
-
props[:content] = content unless content.nil?
|
|
31
|
-
props[:data] = data unless data.nil?
|
|
32
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
33
|
-
props[:expand] = expand unless expand.nil?
|
|
34
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
35
|
-
props[:height] = height unless height.nil?
|
|
36
|
-
props[:interaction_end_friction_coefficient] = interaction_end_friction_coefficient unless interaction_end_friction_coefficient.nil?
|
|
37
|
-
props[:interaction_update_interval] = interaction_update_interval unless interaction_update_interval.nil?
|
|
38
|
-
props[:key] = key unless key.nil?
|
|
39
|
-
props[:left] = left unless left.nil?
|
|
40
|
-
props[:margin] = margin unless margin.nil?
|
|
41
|
-
props[:max_scale] = max_scale unless max_scale.nil?
|
|
42
|
-
props[:min_scale] = min_scale unless min_scale.nil?
|
|
43
|
-
props[:offset] = offset unless offset.nil?
|
|
44
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
45
|
-
props[:pan_enabled] = pan_enabled unless pan_enabled.nil?
|
|
46
|
-
props[:right] = right unless right.nil?
|
|
47
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
48
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
49
|
-
props[:scale] = scale unless scale.nil?
|
|
50
|
-
props[:scale_enabled] = scale_enabled unless scale_enabled.nil?
|
|
51
|
-
props[:scale_factor] = scale_factor unless scale_factor.nil?
|
|
52
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
53
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
54
|
-
props[:top] = top unless top.nil?
|
|
55
|
-
props[:trackpad_scroll_causes_scale] = trackpad_scroll_causes_scale unless trackpad_scroll_causes_scale.nil?
|
|
56
|
-
props[:visible] = visible unless visible.nil?
|
|
57
|
-
props[:width] = width unless width.nil?
|
|
58
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
59
|
-
props[:on_interaction_end] = on_interaction_end unless on_interaction_end.nil?
|
|
60
|
-
props[:on_interaction_start] = on_interaction_start unless on_interaction_start.nil?
|
|
61
|
-
props[:on_interaction_update] = on_interaction_update unless on_interaction_update.nil?
|
|
62
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
63
|
-
super(type: TYPE, id: id, **props)
|
|
11
|
+
KEYWORDS = [:align, :alignment, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bottom, :boundary_margin, :clip_behavior, :col, :constrained, :content, :data, :disabled, :expand, :expand_loose, :height, :interaction_end_friction_coefficient, :interaction_update_interval, :key, :left, :margin, :max_scale, :min_scale, :offset, :opacity, :pan_enabled, :right, :rotate, :rtl, :scale, :scale_enabled, :scale_factor, :size_change_interval, :tooltip, :top, :trackpad_scroll_causes_scale, :visible, :width, :on_animation_end, :on_interaction_end, :on_interaction_start, :on_interaction_update, :on_size_change].freeze
|
|
12
|
+
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
64
20
|
end
|
|
65
21
|
|
|
66
22
|
def pan(dx, dy: 0, dz: 0, timeout: 10, on_result: nil)
|
|
@@ -7,6 +7,7 @@ module Ruflet
|
|
|
7
7
|
class LineControl < Ruflet::Control
|
|
8
8
|
TYPE = "line".freeze
|
|
9
9
|
WIRE = "Line".freeze
|
|
10
|
+
KEYWORDS = [:data, :key, :paint, :x1, :x2, :y1, :y2].freeze
|
|
10
11
|
|
|
11
12
|
def initialize(id: nil, data: nil, key: nil, paint: nil, x1: nil, x2: nil, y1: nil, y2: nil)
|
|
12
13
|
props = {}
|
|
@@ -8,7 +8,63 @@ module Ruflet
|
|
|
8
8
|
TYPE = "listview".freeze
|
|
9
9
|
WIRE = "ListView".freeze
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
KEYWORDS = [:adaptive, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :auto_scroll, :badge, :bottom, :build_controls_on_demand, :cache_extent, :clip_behavior, :col, :controls, :data, :disabled, :divider_thickness, :expand, :expand_loose, :first_item_prototype, :height, :horizontal, :item_extent, :key, :left, :margin, :offset, :opacity, :padding, :prototype_item, :reverse, :right, :rotate, :rtl, :scale, :scroll, :scroll_interval, :semantic_child_count, :size_change_interval, :spacing, :tooltip, :top, :visible, :width, :on_animation_end, :on_scroll, :on_size_change].freeze
|
|
12
|
+
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
unknown = props.keys.reject { |key| KEYWORDS.include?(key) }
|
|
15
|
+
raise ArgumentError, "unknown keywords: #{unknown.join(', ')}" unless unknown.empty?
|
|
16
|
+
adaptive = props[:adaptive]
|
|
17
|
+
align = props[:align]
|
|
18
|
+
animate_align = props[:animate_align]
|
|
19
|
+
animate_margin = props[:animate_margin]
|
|
20
|
+
animate_offset = props[:animate_offset]
|
|
21
|
+
animate_opacity = props[:animate_opacity]
|
|
22
|
+
animate_position = props[:animate_position]
|
|
23
|
+
animate_rotation = props[:animate_rotation]
|
|
24
|
+
animate_scale = props[:animate_scale]
|
|
25
|
+
animate_size = props[:animate_size]
|
|
26
|
+
aspect_ratio = props[:aspect_ratio]
|
|
27
|
+
auto_scroll = props[:auto_scroll]
|
|
28
|
+
badge = props[:badge]
|
|
29
|
+
bottom = props[:bottom]
|
|
30
|
+
build_controls_on_demand = props[:build_controls_on_demand]
|
|
31
|
+
cache_extent = props[:cache_extent]
|
|
32
|
+
clip_behavior = props[:clip_behavior]
|
|
33
|
+
col = props[:col]
|
|
34
|
+
controls = props[:controls]
|
|
35
|
+
data = props[:data]
|
|
36
|
+
disabled = props[:disabled]
|
|
37
|
+
divider_thickness = props[:divider_thickness]
|
|
38
|
+
expand = props[:expand]
|
|
39
|
+
expand_loose = props[:expand_loose]
|
|
40
|
+
first_item_prototype = props[:first_item_prototype]
|
|
41
|
+
height = props[:height]
|
|
42
|
+
horizontal = props[:horizontal]
|
|
43
|
+
item_extent = props[:item_extent]
|
|
44
|
+
key = props[:key]
|
|
45
|
+
left = props[:left]
|
|
46
|
+
margin = props[:margin]
|
|
47
|
+
offset = props[:offset]
|
|
48
|
+
opacity = props[:opacity]
|
|
49
|
+
padding = props[:padding]
|
|
50
|
+
prototype_item = props[:prototype_item]
|
|
51
|
+
reverse = props[:reverse]
|
|
52
|
+
right = props[:right]
|
|
53
|
+
rotate = props[:rotate]
|
|
54
|
+
rtl = props[:rtl]
|
|
55
|
+
scale = props[:scale]
|
|
56
|
+
scroll = props[:scroll]
|
|
57
|
+
scroll_interval = props[:scroll_interval]
|
|
58
|
+
semantic_child_count = props[:semantic_child_count]
|
|
59
|
+
size_change_interval = props[:size_change_interval]
|
|
60
|
+
spacing = props[:spacing]
|
|
61
|
+
tooltip = props[:tooltip]
|
|
62
|
+
top = props[:top]
|
|
63
|
+
visible = props[:visible]
|
|
64
|
+
width = props[:width]
|
|
65
|
+
on_animation_end = props[:on_animation_end]
|
|
66
|
+
on_scroll = props[:on_scroll]
|
|
67
|
+
on_size_change = props[:on_size_change]
|
|
12
68
|
build_controls_on_demand = true if build_controls_on_demand.nil?
|
|
13
69
|
divider_thickness = 0 if divider_thickness.nil?
|
|
14
70
|
first_item_prototype = false if first_item_prototype.nil?
|
|
@@ -16,16 +72,6 @@ module Ruflet
|
|
|
16
72
|
reverse = false if reverse.nil?
|
|
17
73
|
spacing = 0 if spacing.nil?
|
|
18
74
|
|
|
19
|
-
{
|
|
20
|
-
divider_thickness: divider_thickness,
|
|
21
|
-
item_extent: item_extent,
|
|
22
|
-
semantic_child_count: semantic_child_count,
|
|
23
|
-
spacing: spacing
|
|
24
|
-
}.each do |name, value|
|
|
25
|
-
next if value.nil?
|
|
26
|
-
raise ArgumentError, "list_view #{name} must be greater than or equal to 0" if value.negative?
|
|
27
|
-
end
|
|
28
|
-
|
|
29
75
|
props = {}
|
|
30
76
|
props[:adaptive] = adaptive unless adaptive.nil?
|
|
31
77
|
props[:align] = align unless align.nil?
|
|
@@ -8,60 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "markdown".freeze
|
|
9
9
|
WIRE = "Markdown".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
props
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
21
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
22
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
23
|
-
props[:auto_follow_links] = auto_follow_links unless auto_follow_links.nil?
|
|
24
|
-
props[:auto_follow_links_target] = auto_follow_links_target unless auto_follow_links_target.nil?
|
|
25
|
-
props[:badge] = badge unless badge.nil?
|
|
26
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
27
|
-
props[:code_style_sheet] = code_style_sheet unless code_style_sheet.nil?
|
|
28
|
-
props[:code_theme] = code_theme unless code_theme.nil?
|
|
29
|
-
props[:col] = col unless col.nil?
|
|
30
|
-
props[:data] = data unless data.nil?
|
|
31
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
32
|
-
props[:expand] = expand unless expand.nil?
|
|
33
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
34
|
-
props[:extension_set] = extension_set unless extension_set.nil?
|
|
35
|
-
props[:fit_content] = fit_content unless fit_content.nil?
|
|
36
|
-
props[:height] = height unless height.nil?
|
|
37
|
-
props[:image_error_content] = image_error_content unless image_error_content.nil?
|
|
38
|
-
props[:key] = key unless key.nil?
|
|
39
|
-
props[:latex_scale_factor] = latex_scale_factor unless latex_scale_factor.nil?
|
|
40
|
-
props[:latex_style] = latex_style unless latex_style.nil?
|
|
41
|
-
props[:left] = left unless left.nil?
|
|
42
|
-
props[:margin] = margin unless margin.nil?
|
|
43
|
-
props[:md_style_sheet] = md_style_sheet unless md_style_sheet.nil?
|
|
44
|
-
props[:offset] = offset unless offset.nil?
|
|
45
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
46
|
-
props[:right] = right unless right.nil?
|
|
47
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
48
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
49
|
-
props[:scale] = scale unless scale.nil?
|
|
50
|
-
props[:selectable] = selectable unless selectable.nil?
|
|
51
|
-
props[:shrink_wrap] = shrink_wrap unless shrink_wrap.nil?
|
|
52
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
53
|
-
props[:soft_line_break] = soft_line_break unless soft_line_break.nil?
|
|
54
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
55
|
-
props[:top] = top unless top.nil?
|
|
56
|
-
props[:value] = value unless value.nil?
|
|
57
|
-
props[:visible] = visible unless visible.nil?
|
|
58
|
-
props[:width] = width unless width.nil?
|
|
59
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
60
|
-
props[:on_selection_change] = on_selection_change unless on_selection_change.nil?
|
|
61
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
62
|
-
props[:on_tap_link] = on_tap_link unless on_tap_link.nil?
|
|
63
|
-
props[:on_tap_text] = on_tap_text unless on_tap_text.nil?
|
|
64
|
-
super(type: TYPE, id: id, **props)
|
|
11
|
+
KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :auto_follow_links, :auto_follow_links_target, :badge, :bottom, :code_style_sheet, :code_theme, :col, :data, :disabled, :expand, :expand_loose, :extension_set, :fit_content, :height, :image_error_content, :key, :latex_scale_factor, :latex_style, :left, :margin, :md_style_sheet, :offset, :opacity, :right, :rotate, :rtl, :scale, :selectable, :shrink_wrap, :size_change_interval, :soft_line_break, :tooltip, :top, :value, :visible, :width, :on_animation_end, :on_selection_change, :on_size_change, :on_tap_link, :on_tap_text].freeze
|
|
12
|
+
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
65
20
|
end
|
|
66
21
|
end
|
|
67
22
|
end
|
|
@@ -7,6 +7,7 @@ module Ruflet
|
|
|
7
7
|
class OvalControl < Ruflet::Control
|
|
8
8
|
TYPE = "oval".freeze
|
|
9
9
|
WIRE = "Oval".freeze
|
|
10
|
+
KEYWORDS = [:data, :height, :key, :paint, :width, :x, :y].freeze
|
|
10
11
|
|
|
11
12
|
def initialize(id: nil, data: nil, height: nil, key: nil, paint: nil, width: nil, x: nil, y: nil)
|
|
12
13
|
props = {}
|
|
@@ -8,64 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "page".freeze
|
|
9
9
|
WIRE = "Page".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
props
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
props[:debug] = debug unless debug.nil?
|
|
21
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
22
|
-
props[:enable_screenshots] = enable_screenshots unless enable_screenshots.nil?
|
|
23
|
-
props[:expand] = expand unless expand.nil?
|
|
24
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
25
|
-
props[:fonts] = fonts unless fonts.nil?
|
|
26
|
-
props[:height] = height unless height.nil?
|
|
27
|
-
props[:key] = key unless key.nil?
|
|
28
|
-
props[:locale_configuration] = locale_configuration unless locale_configuration.nil?
|
|
29
|
-
props[:media] = media unless media.nil?
|
|
30
|
-
props[:multi_view] = multi_view unless multi_view.nil?
|
|
31
|
-
props[:multi_views] = multi_views unless multi_views.nil?
|
|
32
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
33
|
-
props[:platform] = platform unless platform.nil?
|
|
34
|
-
props[:platform_brightness] = platform_brightness unless platform_brightness.nil?
|
|
35
|
-
props[:pwa] = pwa unless pwa.nil?
|
|
36
|
-
props[:pyodide] = pyodide unless pyodide.nil?
|
|
37
|
-
props[:route] = route unless route.nil?
|
|
38
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
39
|
-
props[:sess] = sess unless sess.nil?
|
|
40
|
-
props[:show_semantics_debugger] = show_semantics_debugger unless show_semantics_debugger.nil?
|
|
41
|
-
props[:test] = test unless test.nil?
|
|
42
|
-
props[:theme] = theme unless theme.nil?
|
|
43
|
-
props[:theme_mode] = theme_mode unless theme_mode.nil?
|
|
44
|
-
props[:title] = title unless title.nil?
|
|
45
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
46
|
-
props[:views] = views unless views.nil?
|
|
47
|
-
props[:visible] = visible unless visible.nil?
|
|
48
|
-
props[:wasm] = wasm unless wasm.nil?
|
|
49
|
-
props[:web] = web unless web.nil?
|
|
50
|
-
props[:width] = width unless width.nil?
|
|
51
|
-
props[:window] = window unless window.nil?
|
|
52
|
-
props[:on_app_lifecycle_state_change] = on_app_lifecycle_state_change unless on_app_lifecycle_state_change.nil?
|
|
53
|
-
props[:on_close] = on_close unless on_close.nil?
|
|
54
|
-
props[:on_connect] = on_connect unless on_connect.nil?
|
|
55
|
-
props[:on_disconnect] = on_disconnect unless on_disconnect.nil?
|
|
56
|
-
props[:on_error] = on_error unless on_error.nil?
|
|
57
|
-
props[:on_keyboard_event] = on_keyboard_event unless on_keyboard_event.nil?
|
|
58
|
-
props[:on_locale_change] = on_locale_change unless on_locale_change.nil?
|
|
59
|
-
props[:on_login] = on_login unless on_login.nil?
|
|
60
|
-
props[:on_logout] = on_logout unless on_logout.nil?
|
|
61
|
-
props[:on_media_change] = on_media_change unless on_media_change.nil?
|
|
62
|
-
props[:on_multi_view_add] = on_multi_view_add unless on_multi_view_add.nil?
|
|
63
|
-
props[:on_multi_view_remove] = on_multi_view_remove unless on_multi_view_remove.nil?
|
|
64
|
-
props[:on_platform_brightness_change] = on_platform_brightness_change unless on_platform_brightness_change.nil?
|
|
65
|
-
props[:on_resize] = on_resize unless on_resize.nil?
|
|
66
|
-
props[:on_route_change] = on_route_change unless on_route_change.nil?
|
|
67
|
-
props[:on_view_pop] = on_view_pop unless on_view_pop.nil?
|
|
68
|
-
super(type: TYPE, id: id, **props)
|
|
11
|
+
KEYWORDS = [:adaptive, :badge, :client_ip, :client_user_agent, :col, :dark_theme, :data, :debug, :disabled, :enable_screenshots, :expand, :expand_loose, :fonts, :height, :key, :locale_configuration, :media, :multi_view, :multi_views, :opacity, :platform, :platform_brightness, :pwa, :pyodide, :route, :rtl, :sess, :show_semantics_debugger, :test, :theme, :theme_mode, :title, :tooltip, :views, :visible, :wasm, :web, :width, :window, :on_app_lifecycle_state_change, :on_close, :on_connect, :on_disconnect, :on_error, :on_keyboard_event, :on_locale_change, :on_login, :on_logout, :on_media_change, :on_multi_view_add, :on_multi_view_remove, :on_platform_brightness_change, :on_resize, :on_route_change, :on_view_pop].freeze
|
|
12
|
+
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
69
20
|
end
|
|
70
21
|
end
|
|
71
22
|
end
|
|
@@ -8,54 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "pagelet".freeze
|
|
9
9
|
WIRE = "Pagelet".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
props
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
props[:animate_rotation] = animate_rotation unless animate_rotation.nil?
|
|
21
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
22
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
23
|
-
props[:appbar] = appbar unless appbar.nil?
|
|
24
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
25
|
-
props[:badge] = badge unless badge.nil?
|
|
26
|
-
props[:bgcolor] = bgcolor unless bgcolor.nil?
|
|
27
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
28
|
-
props[:bottom_appbar] = bottom_appbar unless bottom_appbar.nil?
|
|
29
|
-
props[:bottom_sheet] = bottom_sheet unless bottom_sheet.nil?
|
|
30
|
-
props[:col] = col unless col.nil?
|
|
31
|
-
props[:content] = content unless content.nil?
|
|
32
|
-
props[:data] = data unless data.nil?
|
|
33
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
34
|
-
props[:drawer] = drawer unless drawer.nil?
|
|
35
|
-
props[:end_drawer] = end_drawer unless end_drawer.nil?
|
|
36
|
-
props[:expand] = expand unless expand.nil?
|
|
37
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
38
|
-
props[:floating_action_button] = floating_action_button unless floating_action_button.nil?
|
|
39
|
-
props[:floating_action_button_location] = floating_action_button_location unless floating_action_button_location.nil?
|
|
40
|
-
props[:height] = height unless height.nil?
|
|
41
|
-
props[:key] = key unless key.nil?
|
|
42
|
-
props[:left] = left unless left.nil?
|
|
43
|
-
props[:margin] = margin unless margin.nil?
|
|
44
|
-
props[:navigation_bar] = navigation_bar unless navigation_bar.nil?
|
|
45
|
-
props[:offset] = offset unless offset.nil?
|
|
46
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
47
|
-
props[:right] = right unless right.nil?
|
|
48
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
49
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
50
|
-
props[:scale] = scale unless scale.nil?
|
|
51
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
52
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
53
|
-
props[:top] = top unless top.nil?
|
|
54
|
-
props[:visible] = visible unless visible.nil?
|
|
55
|
-
props[:width] = width unless width.nil?
|
|
56
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
57
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
58
|
-
super(type: TYPE, id: id, **props)
|
|
11
|
+
KEYWORDS = [:adaptive, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :appbar, :aspect_ratio, :badge, :bgcolor, :bottom, :bottom_appbar, :bottom_sheet, :col, :content, :data, :disabled, :drawer, :end_drawer, :expand, :expand_loose, :floating_action_button, :floating_action_button_location, :height, :key, :left, :margin, :navigation_bar, :offset, :opacity, :right, :rotate, :rtl, :scale, :size_change_interval, :tooltip, :top, :visible, :width, :on_animation_end, :on_size_change].freeze
|
|
12
|
+
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
59
20
|
end
|
|
60
21
|
end
|
|
61
22
|
end
|
|
@@ -8,7 +8,56 @@ module Ruflet
|
|
|
8
8
|
TYPE = "pageview".freeze
|
|
9
9
|
WIRE = "PageView".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, :clip_behavior, :col, :controls, :data, :disabled, :expand, :expand_loose, :height, :horizontal, :implicit_scrolling, :keep_page, :key, :left, :margin, :offset, :opacity, :pad_ends, :reverse, :right, :rotate, :rtl, :scale, :selected_index, :size_change_interval, :snap, :tooltip, :top, :viewport_fraction, :visible, :width, :on_animation_end, :on_change, :on_size_change].freeze
|
|
12
|
+
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
unknown = props.keys.reject { |key| KEYWORDS.include?(key) }
|
|
15
|
+
raise ArgumentError, "unknown keywords: #{unknown.join(', ')}" unless unknown.empty?
|
|
16
|
+
align = props[:align]
|
|
17
|
+
animate_align = props[:animate_align]
|
|
18
|
+
animate_margin = props[:animate_margin]
|
|
19
|
+
animate_offset = props[:animate_offset]
|
|
20
|
+
animate_opacity = props[:animate_opacity]
|
|
21
|
+
animate_position = props[:animate_position]
|
|
22
|
+
animate_rotation = props[:animate_rotation]
|
|
23
|
+
animate_scale = props[:animate_scale]
|
|
24
|
+
animate_size = props[:animate_size]
|
|
25
|
+
aspect_ratio = props[:aspect_ratio]
|
|
26
|
+
badge = props[:badge]
|
|
27
|
+
bottom = props[:bottom]
|
|
28
|
+
clip_behavior = props[:clip_behavior]
|
|
29
|
+
col = props[:col]
|
|
30
|
+
controls = props[:controls]
|
|
31
|
+
data = props[:data]
|
|
32
|
+
disabled = props[:disabled]
|
|
33
|
+
expand = props[:expand]
|
|
34
|
+
expand_loose = props[:expand_loose]
|
|
35
|
+
height = props[:height]
|
|
36
|
+
horizontal = props[:horizontal]
|
|
37
|
+
implicit_scrolling = props[:implicit_scrolling]
|
|
38
|
+
keep_page = props[:keep_page]
|
|
39
|
+
key = props[:key]
|
|
40
|
+
left = props[:left]
|
|
41
|
+
margin = props[:margin]
|
|
42
|
+
offset = props[:offset]
|
|
43
|
+
opacity = props[:opacity]
|
|
44
|
+
pad_ends = props[:pad_ends]
|
|
45
|
+
reverse = props[:reverse]
|
|
46
|
+
right = props[:right]
|
|
47
|
+
rotate = props[:rotate]
|
|
48
|
+
rtl = props[:rtl]
|
|
49
|
+
scale = props[:scale]
|
|
50
|
+
selected_index = props[:selected_index]
|
|
51
|
+
size_change_interval = props[:size_change_interval]
|
|
52
|
+
snap = props[:snap]
|
|
53
|
+
tooltip = props[:tooltip]
|
|
54
|
+
top = props[:top]
|
|
55
|
+
viewport_fraction = props[:viewport_fraction]
|
|
56
|
+
visible = props[:visible]
|
|
57
|
+
width = props[:width]
|
|
58
|
+
on_animation_end = props[:on_animation_end]
|
|
59
|
+
on_change = props[:on_change]
|
|
60
|
+
on_size_change = props[:on_size_change]
|
|
12
61
|
clip_behavior = "hardEdge" if clip_behavior.nil?
|
|
13
62
|
horizontal = true if horizontal.nil?
|
|
14
63
|
implicit_scrolling = false if implicit_scrolling.nil?
|
|
@@ -19,9 +68,6 @@ module Ruflet
|
|
|
19
68
|
snap = true if snap.nil?
|
|
20
69
|
viewport_fraction = 1.0 if viewport_fraction.nil?
|
|
21
70
|
|
|
22
|
-
raise ArgumentError, "page_view selected_index must be greater than or equal to 0" if selected_index.negative?
|
|
23
|
-
raise ArgumentError, "page_view viewport_fraction must be greater than 0" unless viewport_fraction.positive?
|
|
24
|
-
|
|
25
71
|
props = {}
|
|
26
72
|
props[:align] = align unless align.nil?
|
|
27
73
|
props[:animate_align] = animate_align unless animate_align.nil?
|