Module: Zui

Defined in:
lib/zui.rb,
lib/zui/cli.rb,
lib/zui/host.rb,
lib/zui/node.rb,
lib/zui/value.rb,
lib/zui/client.rb,
lib/zui/runner.rb,
lib/zui/builder.rb,
lib/zui/command.rb,
lib/zui/runtime.rb,
lib/zui/platform.rb,
lib/zui/protocol.rb,
lib/zui/animation.rb,
lib/zui/generator.rb,
lib/zui/scheduler.rb,
lib/zui/components.rb,
lib/zui/lite_entry.rb,
lib/zui/application.rb,
lib/zui/dist_config.rb,
lib/zui/lite_source.rb,
lib/zui/state_store.rb,
lib/zui/tree_shaker.rb,
lib/zui/distribution.rb,
lib/zui/full_runtime.rb,
lib/zui/lite_runtime.rb,
lib/zui/dist_packager.rb,
lib/zui/source_bundle.rb,
lib/zui/component_registry.rb,
lib/zui/application_runtime.rb

Defined Under Namespace

Modules: Command, Dist, Runtime, Value Classes: Animation, Application, ApplicationRuntime, AsciiPattern, Binding, Builder, CLI, Client, CommandOutputLimit, CommandResult, CommandTimeout, Component, ComponentRegistry, DistPackager, Distribution, FullRuntime, Generator, Host, LiteRuntime, LiteSource, Node, Platform, ProtocolError, Runner, Scheduler, SourceBundle, StateStore, StructuralBinding, Task, TreeShaker

Constant Summary collapse

VERSION =
"0.0.9"
FRAMEWORK_ROOT =
File.expand_path("..", __dir__)
PROTOCOL_VERSION =
1
MAX_MESSAGE_BYTES =
1_048_576
LOWER =
("a".."z").to_a.join.freeze
UPPER =
("A".."Z").to_a.join.freeze
DIGITS =
("0".."9").to_a.join.freeze
VALID_ID =
AsciiPattern.new(min: 1, max: 128, rest: LOWER + UPPER + DIGITS + "_.:-")
VALID_EVENT =
AsciiPattern.new(min: 1, max: 64, first: LOWER, rest: LOWER + DIGITS + "_")
ICON_NAMES =
%i[
  ruby phone plus minus reset refresh house gear search xmark check menu user bell wifi bluetooth
  volume_high volume_low volume_off play pause stop trash edit folder file download upload link lock
  unlock eye eye_slash star heart info warning circle_info circle_check circle_xmark arrow_left
  arrow_right arrow_up arrow_down chevron_left chevron_right chevron_up chevron_down calendar clock
  camera image music terminal code copy save power globe location pin android apple
].freeze
COMPONENTS =
{
  container: [%i[spacing padding bordered visible], %i[click], true],
  row: [%i[spacing alignment visible], %i[click], true],
  column: [%i[spacing alignment visible], %i[click], true],
  grid: [%i[columns rows spacing row_spacing column_spacing visible], %i[click], true],
  row_layout: [%i[spacing alignment visible], %i[click], true],
  column_layout: [%i[spacing alignment visible], %i[click], true],
  grid_layout: [%i[columns rows spacing row_spacing column_spacing alignment visible], %i[click], true],
  flow: [%i[spacing orientation width height visible], %i[click], true],
  center: [%i[padding spacing visible], %i[click], true],
  card: [%i[padding spacing color radius border_color accent visible], %i[click], true],
  stack: [%i[visible], %i[click], true],
  scroll: [%i[width height clip visible], %i[click], true],
  rectangle: [%i[width height color radius border_color border_width padding visible], %i[click], true],
  border_overlay: [%i[color width_spec gradient_colors gradient_angle radius visible], [], false],
  aspect_ratio: [%i[ratio width height clip visible], %i[click], true],
  constrained_box: [%i[width height min_width min_height max_width max_height clip visible], %i[click], true],
  fitted_box: [%i[width height fit alignment clip visible], %i[click], true],
  wrap: [%i[width height spacing orientation layout_direction visible], %i[click], true],
  split_view: [%i[width height orientation visible], %i[click resize], true],
  stack_layout: [%i[current_index width height visible], %i[click change], true],
  layout_item_proxy: [%i[target width height fill_width fill_height preferred_width preferred_height minimum_width minimum_height maximum_width maximum_height alignment margins left_margin top_margin right_margin bottom_margin visible], %i[target_change], false],
  loader: [%i[active asynchronous width height visible], %i[click loaded status error], true],
  flickable: [%i[width height content_width content_height direction bounds_behavior interactive clip visible], %i[click scroll flick_start flick_end], true],
  focus_scope: [%i[focus active_focus width height visible], %i[click focus blur], true],
  flipable: [%i[flipped axis duration easing interactive width height visible], %i[click change], true],
  border_image: [%i[source width height border_left border_top border_right border_bottom horizontal_tile vertical_tile asynchronous cache mirror smooth visible], %i[click loaded error status], true],
  window: [%i[title x y width height minimum_width minimum_height maximum_width maximum_height color visible visibility modality flags opacity content_orientation], %i[close visible_change active_change visibility_change move resize], true],
  application_window: [%i[title x y width height minimum_width minimum_height maximum_width maximum_height color background visible visibility modality flags opacity content_orientation layout_direction font_family font_size], %i[close visible_change active_change visibility_change move resize focus_change], true],
  text: [%i[text style size bold color wrap width visible], [], false],
  label: [%i[text color size bold width wrap elide horizontal_alignment vertical_alignment maximum_lines format visible], %i[link], false],
  rich_text: [%i[text color link_color size bold width wrap maximum_lines visible], %i[link], false],
  markdown: [%i[text color link_color size width wrap maximum_lines base_url visible], %i[link], false],
  selectable_text: [%i[text color selection_color selected_text_color size bold width wrap format visible], %i[selection link], false],
  icon: [%i[name text size color visible], [], false],
  tooltip: [%i[text delay timeout foreground background border font_family font_size visible], [], false],
  image: [%i[source width height source_width source_height fill_mode horizontal_alignment vertical_alignment asynchronous cache smooth mipmap mirror auto_transform retain_while_loading visible], %i[progress status loaded error], false],
  vector_image: [%i[source width height fill_mode renderer trusted asynchronous_shapes animation_loops animation_paused visible], %i[source_change], false],
  model_view_3d: [%i[source width height background rotation_x rotation_y rotation_z zoom minimum_zoom maximum_zoom interactive auto_rotate auto_rotate_speed reset_revision field_of_view camera_distance fit_size model_scale center_x center_y center_z key_light_color fill_light_color light_brightness antialiasing visible], %i[click double_click rotation_change zoom_change loaded error status], false],
  font_loader: [%i[source visible], %i[loaded error status], false],
  text_metrics: [%i[text font_family font_size bold italic letter_spacing word_spacing elide elide_width visible], %i[metrics], false],
  animated_image: [%i[source width height fill_mode playing paused speed asynchronous cache mirror smooth visible], %i[frame loaded error status], false],
  video: [%i[source width height auto_play loops volume muted playback_rate fill_mode orientation mirrored visible], %i[play pause stop error position duration], false],
  audio: [%i[source auto_play playback position seek_revision loops volume muted playback_rate visible], %i[play pause stop end loaded status error position duration], false],
  avatar: [%i[source name size radius background foreground font_size asynchronous cache visible], %i[click loaded error], false],
  badge: [%i[value maximum dot size minimum_width padding background foreground font_size visible], %i[click], false],
  chip: [%i[text icon selected deletable enabled background selected_background foreground selected_foreground accent height radius horizontal_padding spacing font_size icon_size visible], %i[click change delete], false],
  spacer: [%i[width height visible], [], false],
  button: [%i[text url icon tooltip selected active cursor focusable bordered foreground background accent font_family font_size icon_size icon_rotation icon_spinning horizontal_padding vertical_padding left_align tooltip_background tooltip_foreground tooltip_border], %i[click open error right_click hover], false],
  round_button: [%i[text icon checked checkable enabled diameter foreground background checked_background accent font_family font_size icon_size visible], %i[click change press release hover], false],
  tool_button: [%i[text icon checked checkable enabled width height foreground background checked_background accent font_family font_size icon_size visible], %i[click change press release hover], false],
  delay_button: [%i[text delay enabled width height foreground background progress_background accent font_family font_size visible], %i[activate progress press release cancel], false],
  action_button: [%i[icon tooltip foreground hover_color font_family font_size size focusable cursor bordered], %i[click hover], false],
  bar_icon_button: [%i[icon tooltip active foreground active_color slot_size optical_size font_family font_size text_rotation keep_space dimmed concealed interactive], %i[click right_click middle_click wheel], false],
  bar_indicator: [%i[active active_icon inactive_icon active_tooltip inactive_tooltip indicator_block foreground active_color font_family font_size], %i[click right_click middle_click wheel], false],
  toggle: [%i[label description checked cursor rounded foreground accent font_family title_size description_size], %i[change hover], false],
  checkbox: [%i[label checked foreground accent background font_family font_size indicator_size spacing cursor], %i[change hover], false],
  radio_button: [%i[label value checked enabled foreground accent background font_family font_size indicator_size spacing visible], %i[click change hover], false],
  radio_group: [%i[value options orientation spacing enabled foreground accent background font_family font_size indicator_size item_spacing visible], %i[change hover], false],
  toggle_switch: [%i[checked busy interactive cursor cursor_ring cursor_pad rounded foreground accent track_height track_width knob_size knob_inset], %i[change hover], false],
  text_field: [%i[text placeholder password foreground accent selection_tint horizontal_padding vertical_padding cursor], %i[change submit focus blur input], false],
  text_area: [%i[text placeholder width height wrap read_only maximum_length foreground background accent selection_tint font_family font_size padding visible], %i[input change focus blur selection], false],
  search_field: [%i[text suggestions text_role live current_index width enabled foreground background accent font_family font_size visible], %i[input change search submit activate highlight clear focus blur], false],
  password_field: [%i[text placeholder revealable revealed width foreground accent selection_tint horizontal_padding vertical_padding visible], %i[input change submit focus blur reveal], false],
  number_field: [%i[label value from to step foreground accent font_family font_size field_width cursor], %i[change hover], false],
  slider: [%i[value minimum maximum step integer track_color fill_color knob_color track_height knob_size ticks tick_color], %i[input change right_click], false],
  range_slider: [%i[lower upper minimum maximum step orientation snap live width height foreground background accent visible], %i[input change], false],
  dial: [%i[value minimum maximum step start_angle end_angle snap wrap live input_mode size foreground background accent visible], %i[input change press release], false],
  spin_box: [%i[value minimum maximum step editable wrap prefix suffix width enabled foreground background accent font_family font_size visible], %i[change increase decrease], false],
  double_spin_box: [%i[value minimum maximum step decimals editable wrap prefix suffix width enabled foreground background accent font_family font_size visible], %i[change increase decrease], false],
  color_picker: [%i[color label title opened show_alpha no_buttons native_dialog width height enabled foreground background border_color radius font_family font_size visible], %i[input change accept reject open close], false],
  date_picker: [%i[date label placeholder format minimum maximum opened close_on_select width height popup_width enabled foreground muted background popup_background border_color accent radius font_family font_size visible], %i[input change open close navigate], false],
  time_picker: [%i[time label placeholder use_24_hour show_seconds minute_step second_step opened accept_text cancel_text width height popup_width enabled foreground muted background popup_background border_color accent radius font_family font_size visible], %i[input change accept reject open close], false],
  file_picker: [%i[path paths label placeholder title mode multiple filters current_folder default_suffix opened native_dialog accept_text cancel_text width height enabled foreground muted background border_color accent radius font_family font_size visible], %i[input change accept reject open close folder_change], false],
  folder_picker: [%i[path label placeholder title current_folder opened native_dialog accept_text cancel_text width height enabled foreground muted background border_color accent radius font_family font_size visible], %i[input change accept reject open close folder_change], false],
  font_picker: [%i[family label placeholder title point_size pixel_size weight italic underline strikeout opened native_dialog width height enabled foreground muted background border_color accent radius font_family font_size visible], %i[input change accept reject open close], false],
  dialog_button_box: [%i[buttons custom_buttons orientation alignment position centered spacing width height enabled foreground background accent font_family font_size visible], %i[click accept reject help], false],
  action: [%i[text icon icon_source icon_color icon_width icon_height enabled checkable checked shortcut visible], %i[trigger toggle change], false],
  action_group: [%i[action_ids exclusive enabled checked_action visible], %i[trigger change actions_change], false],
  page: [%i[title header_text footer_text show_header show_footer header_height footer_height layout spacing padding width height enabled background header_background footer_background foreground muted border_color radius font_family font_size title_size footer_size layout_direction visible], %i[click show hide focus blur title_change], true],
  pane: [%i[layout spacing padding left_padding right_padding top_padding bottom_padding width height enabled background foreground border_color border_width radius layout_direction clip visible], %i[click show hide focus blur], true],
  frame: [%i[layout spacing padding left_padding right_padding top_padding bottom_padding width height enabled background foreground border_color border_width radius layout_direction clip visible], %i[click show hide focus blur], true],
  group_box: [%i[title layout spacing padding left_padding right_padding top_padding bottom_padding width height enabled background foreground muted border_color border_width radius font_family font_size title_size title_alignment layout_direction clip visible], %i[click show hide focus blur title_change], true],
  tabs: [%i[labels current_index position tab_width tab_height width height enabled background content_background foreground muted accent border_color radius font_family font_size layout_direction visible], %i[input change tab_click show hide focus blur], true],
  tab_bar: [%i[items current_index position spacing tab_width width height enabled background foreground muted accent border_color radius font_family font_size layout_direction visible], %i[input change tab_click show hide focus blur], false],
  tab_button: [%i[text checked enabled icon icon_source icon_color icon_width icon_height shortcut auto_exclusive width height background checked_background foreground checked_foreground muted accent border_color border_width radius font_family font_size visible], %i[click change toggle press release hover focus blur error], false],
  page_indicator: [%i[count current_index interactive spacing dot_size width height enabled background foreground accent radius visible], %i[input change show hide focus blur], false],
  stack_view: [%i[current_index animated width height enabled background border_color radius clip visible], %i[change push pop depth_change busy_change show hide focus blur], true],
  swipe_view: [%i[current_index orientation interactive width height enabled background border_color radius clip layout_direction visible], %i[input change count_change show hide focus blur], true],
  drawer: [%i[opened edge modal dim interactive drag_margin close_policy layout spacing padding width height enabled background foreground border_color radius visible], %i[open close about_to_show about_to_hide position_change show hide focus blur], true],
  navigation_rail: [%i[items current_index extended alignment spacing padding item_height width height enabled background foreground muted accent selected_background border_color radius font_family font_size icon_size visible], %i[input change select show hide focus blur error], false],
  breadcrumb: [%i[items current_index separator spacing padding item_height width height enabled background foreground muted accent border_color radius font_family font_size icon_size visible], %i[input change select show hide focus blur error], false],
  pagination: [%i[count page sibling_count show_first_last show_previous_next previous_text next_text first_text last_text spacing padding item_size width height enabled background foreground muted accent selected_background border_color radius font_family font_size visible], %i[input change select previous next first last show hide focus blur], false],
  expansion_panel: [%i[title subtitle expanded animated duration easing spacing padding header_height width height enabled background header_background expanded_background foreground muted accent border_color radius font_family font_size title_size subtitle_size indicator_size visible], %i[toggle change expand collapse show hide focus blur], true],
  accordion: [%i[titles subtitles expanded_indices multiple animated duration easing spacing padding header_height width height enabled background header_background expanded_background foreground muted accent border_color radius font_family font_size title_size subtitle_size indicator_size visible], %i[toggle change expand collapse show hide focus blur], true],
  tool_bar: [%i[position layout spacing padding width height enabled background foreground border_color radius layout_direction visible], %i[click position_change show hide focus blur], true],
  tool_separator: [%i[orientation thickness length padding color opacity enabled visible], %i[show hide], false],
  menu: [%i[items title opened x y width modal close_policy enabled background foreground muted accent border_color radius font_family font_size visible], %i[trigger toggle open close about_to_show about_to_hide highlight], false],
  menu_item: [%i[text value icon icon_source icon_color shortcut enabled checkable checked highlighted width height background highlighted_background foreground highlighted_foreground muted accent border_color radius font_family font_size visible], %i[trigger toggle change press release hover highlight focus blur], false],
  menu_separator: [%i[thickness width height padding color opacity enabled visible], %i[show hide], false],
  menu_bar: [%i[menus width height spacing padding enabled background foreground muted accent border_color radius font_family font_size visible], %i[trigger toggle highlight menu_open menu_close show hide focus blur], false],
  context_menu: [%i[items target opened x y activation_width activation_height width modal close_policy enabled background foreground muted accent border_color radius font_family font_size visible], %i[request trigger toggle highlight open close about_to_show about_to_hide], false],
  popup: [%i[opened x y width height modal dim focus close_policy layout spacing padding animated duration easing enabled background foreground border_color radius visible], %i[open close about_to_show about_to_hide show hide focus blur position_change], true],
  dialog: [%i[title opened centered x y width height modal dim focus close_policy standard_buttons layout spacing padding enabled background foreground border_color radius font_family font_size visible], %i[accept reject apply reset discard help open close about_to_show about_to_hide show hide focus blur], true],
  alert_dialog: [%i[title message informative_text detailed_text severity icon icon_size icon_foreground show_icon image image_source image_width image_height image_fill_mode image_radius image_asynchronous image_cache opened centered x y width height header_height footer_height details_height modal dim focus close_policy standard_buttons button_labels button_alignment button_spacing button_background button_foreground button_accent button_horizontal_padding button_vertical_padding spacing padding enabled background header_background footer_background foreground muted accent warning_color error_color success_color border_color radius font_family font_size title_size message_size details_size visible], %i[accept reject apply reset discard help open close about_to_show about_to_hide show hide focus blur error], false],
  message_dialog: [%i[title message informative_text detailed_text opened buttons modality visible], %i[button accept reject open close], false],
  bottom_sheet: [%i[opened modal dim dismissible draggable close_policy layout spacing padding width height max_width margin handle_visible handle_width handle_height dismiss_threshold animated duration easing enabled background foreground muted accent border_color radius visible], %i[open close about_to_show about_to_hide show hide focus blur drag drag_end dismiss], true],
  modal_sheet: [%i[title opened edge modal dim dismissible close_policy show_header show_close width height max_width max_height margin header_height layout spacing padding animated duration easing enabled background header_background foreground muted accent border_color radius font_family font_size title_size visible], %i[open close dismiss about_to_show about_to_hide show hide focus blur], true],
  snackbar: [%i[message action_text opened duration persistent pause_on_hover close_on_action position width max_width margin spacing padding animated animation_duration easing enabled background foreground action_color border_color radius font_family font_size visible], %i[action timeout dismiss open close show hide hover], false],
  banner: [%i[title message severity icon action_text dismissible width height spacing padding enabled background foreground muted accent warning_color error_color success_color action_color border_color radius font_family font_size title_size icon_size visible], %i[action dismiss click show hide hover focus blur], false],
  toast: [%i[title message severity icon opened duration persistent pause_on_hover dismiss_on_click position width max_width margin spacing padding animated animation_duration easing enabled background foreground muted accent warning_color error_color success_color border_color radius font_family font_size title_size icon_size visible], %i[timeout dismiss click open close show hide hover], false],
  busy_indicator: [%i[running width height color opacity enabled accessible_name visible], %i[running_change show hide], false],
  progress_ring: [%i[value minimum maximum indeterminate size width height thickness track_color color foreground start_angle clockwise show_label label label_format animated duration easing enabled opacity font_family font_size accessible_name visible], %i[value_change show hide], false],
  skeleton: [%i[variant width height lines line_height spacing last_line_width radius base_color highlight_color animated duration direction enabled opacity accessible_name visible], %i[animation_change show hide], false],
  item_delegate: [%i[text description value icon icon_source icon_color icon_size trailing_text show_indicator checkable checked auto_exclusive selected highlighted enabled width height padding spacing background selected_background highlighted_background foreground selected_foreground muted accent border_color border_width radius font_family font_size description_size accessible_name visible], %i[activate click change toggle press release hover focus blur show hide error], false],
  check_delegate: [%i[text description value checked tristate check_state selected highlighted enabled width height padding spacing indicator_size background selected_background highlighted_background foreground selected_foreground muted accent indicator_background indicator_border check_color border_color border_width radius font_family font_size description_size accessible_name visible], %i[activate click change toggle press release hover focus blur show hide], false],
  radio_delegate: [%i[text description value checked auto_exclusive selected highlighted enabled width height padding spacing indicator_size dot_size background selected_background highlighted_background foreground selected_foreground muted accent indicator_background indicator_border dot_color border_color border_width radius font_family font_size description_size accessible_name visible], %i[activate click select change toggle press release hover focus blur show hide], false],
  switch_delegate: [%i[text description value checked selected highlighted enabled width height padding spacing indicator_width indicator_height thumb_size animated duration background selected_background highlighted_background foreground selected_foreground muted accent track_color checked_track_color thumb_color checked_thumb_color border_color border_width radius font_family font_size description_size accessible_name visible], %i[activate click change toggle press release hover focus blur show hide], false],
  swipe_delegate: [%i[text description value icon icon_source icon_color icon_size selected highlighted swipe_enabled opened_side left_action left_value left_icon left_color right_action right_value right_icon right_color action_width close_on_action animated duration enabled width height padding spacing background selected_background highlighted_background foreground selected_foreground muted accent border_color border_width radius font_family font_size description_size accessible_name visible], %i[activate click left_action right_action swipe_position swipe_complete swipe_open swipe_close press release hover focus blur show hide error], false],
  grid_view: [%i[items key_field label_field description_field icon_field selected current_index flow layout_direction cell_width cell_height spacing padding width height highlight_move_duration snap_mode bounds_behavior key_navigation_wraps interactive clip empty_text enabled background cell_background selected_background foreground selected_foreground muted accent border_color radius font_family font_size description_size icon_size accessible_name visible], %i[activate change current_change count_change highlight scroll movement_start movement_end show hide focus blur], false],
  table_view: [%i[rows columns selected_row selected_column show_header header_height row_height column_width row_spacing column_spacing selection_behavior selection_mode editable edit_triggers alternating_rows animate reuse_items key_navigation_enabled pointer_navigation_enabled interactive clip padding width height empty_text enabled background header_background cell_background alternate_background selected_background foreground header_foreground selected_foreground muted accent grid_color border_color radius font_family font_size header_size accessible_name visible], %i[cell_click cell_double_click activate selection_change current_change edit row_count_change column_count_change scroll movement_start movement_end show hide focus blur], false],
  tree_view: [%i[rows columns children_field selected_path selected_column expanded_paths expand_depth show_header header_height row_height column_width row_spacing column_spacing indentation left_margin right_margin selection_behavior selection_mode editable edit_triggers alternating_rows animate reuse_items key_navigation_enabled pointer_navigation_enabled interactive clip padding width height empty_text enabled background header_background cell_background alternate_background selected_background foreground header_foreground selected_foreground muted accent grid_color border_color radius font_family font_size header_size accessible_name visible], %i[cell_click cell_double_click activate selection_change current_change edit expand collapse expanded_change row_count_change column_count_change scroll movement_start movement_end show hide focus blur], false],
  data_table: [%i[rows columns selected_row selected_column show_header header_height row_height column_width row_spacing column_spacing selection_behavior selection_mode editable edit_triggers alternating_rows animate reuse_items key_navigation_enabled pointer_navigation_enabled interactive clip padding width height empty_text enabled background header_background cell_background alternate_background selected_background foreground header_foreground selected_foreground muted accent grid_color border_color radius font_family font_size header_size accessible_name sort_column sort_order filter page page_size visible], %i[cell_click cell_double_click activate selection_change current_change edit sort filter_change page_change row_count_change column_count_change scroll movement_start movement_end show hide focus blur], false],
  horizontal_header: [%i[sections current_index section_width height spacing movable clickable sort_index sort_order background selected_background foreground selected_foreground border_color font_family font_size visible], %i[click move sort], false],
  vertical_header: [%i[sections current_index width section_height spacing clickable background selected_background foreground selected_foreground border_color font_family font_size visible], %i[click], false],
  table_view_delegate: [%i[text value row column current selected editing enabled width height background selected_background foreground selected_foreground border_color font_family font_size visible], %i[click double_click activate edit], false],
  tree_view_delegate: [%i[text value row column depth expanded has_children current selected enabled width height indentation background selected_background foreground selected_foreground border_color font_family font_size visible], %i[click double_click activate expand collapse], false],
  horizontal_header_delegate: [%i[text value index selected sort_order enabled width height background selected_background foreground selected_foreground border_color font_family font_size visible], %i[click sort], false],
  vertical_header_delegate: [%i[text value index selected enabled width height background selected_background foreground selected_foreground border_color font_family font_size visible], %i[click], false],
  reorderable_list: [%i[items key_field label_field description_field selected orientation spacing padding item_padding item_height width height handle_position drag_enabled drag_scale drag_opacity drag_transition_duration empty_text background item_background selected_background foreground selected_foreground muted border_color radius font_family font_size visible], %i[reorder activate change drag_start drag_move drag_end], false],
  carousel: [%i[items key_field label_field description_field image_field current_index path_radius item_width item_height width height interactive highlight_range snap_mode background foreground muted accent font_family font_size visible], %i[input change activate movement_start movement_end error], false],
  calendar: [%i[date minimum maximum month year locale show_week_numbers show_navigation width height background header_background selected_background today_background foreground muted accent border_color radius font_family font_size visible], %i[input change navigate], false],
  month_grid: [%i[month year locale selected_date minimum maximum width height background selected_background today_background foreground muted accent font_family font_size visible], %i[click press release change], false],
  week_number_column: [%i[month year locale width height background foreground muted font_family font_size visible], %i[week_click], false],
  day_of_week_row: [%i[locale width height background foreground muted font_family font_size visible], %i[day_click], false],
  tumbler: [%i[items current_index visible_item_count wrap interactive width height background foreground muted accent font_family font_size visible], %i[input change activate], false],
  canvas: [%i[commands width height canvas_width canvas_height tile_width tile_height render_target render_strategy antialiasing smooth background continuous fps visible], %i[paint error click double_click press release hover], false],
  shape: [%i[path width height stroke fill stroke_width cap join fill_rule dash_pattern dash_offset scale preferred_renderer asynchronous contains_mode antialiasing visible], %i[status click hover], false],
  line: [%i[x1 y1 x2 y2 width height stroke stroke_width cap dash_pattern dash_offset antialiasing visible], %i[click hover], false],
  path: [%i[data width height stroke fill stroke_width cap join fill_rule dash_pattern dash_offset scale preferred_renderer asynchronous contains_mode antialiasing visible], %i[status click hover], false],
  circle: [%i[center_x center_y radius start_angle sweep_angle width height stroke fill stroke_width cap dash_pattern dash_offset antialiasing visible], %i[click hover], false],
  gradient: [%i[colors stops type width height start_x start_y end_x end_y center_x center_y focal_x focal_y center_radius focal_radius angle radius stroke stroke_width antialiasing visible], %i[click hover], false],
  shader_effect: [%i[shader fragment_shader vertex_shader width height blending cull_mode mesh_width mesh_height supports_atlas source_rect texture_width texture_height texture_format texture_samples texture_wrap texture_mirroring mipmap live recursive time mouse_x mouse_y intensity amount radius progress frequency amplitude color color2 parameters running fps visible], %i[status frame click hover error], true],
  shader_effect_source: [%i[width height source_rect texture_width texture_height format samples wrap_mode texture_mirroring mipmap live recursive hide_source smooth visible], %i[update], true],
  multi_effect: [%i[width height brightness contrast saturation colorization colorization_color blur_enabled blur blur_max blur_multiplier shadow_enabled shadow_opacity shadow_blur shadow_horizontal_offset shadow_vertical_offset shadow_color shadow_scale mask_enabled mask_source mask_threshold_min mask_spread_at_min mask_threshold_max mask_spread_at_max mask_inverted auto_padding padding_left padding_top padding_right padding_bottom visible], %i[shader_change], true],
  rectangular_shadow: [%i[width height blur spread radius offset_x offset_y color cached antialiasing visible], [], true],
  opacity_mask: [%i[width height mask_source threshold_min spread_min threshold_max spread_max inverted visible], [], true],
  blur: [%i[width height amount maximum multiplier auto_padding visible], [], true],
  drop_shadow: [%i[width height blur maximum multiplier horizontal_offset vertical_offset color opacity scale auto_padding visible], [], true],
  colorize: [%i[width height amount color brightness contrast saturation visible], [], true],
  glow: [%i[width height blur maximum multiplier color opacity scale auto_padding visible], [], true],
  particle_system: [%i[width height running paused emit_rate life_span life_span_variation maximum_emitted size end_size size_variation source color color_variation alpha alpha_variation rotation rotation_variation rotation_velocity rotation_velocity_variation auto_rotation emitter_x emitter_y emitter_width emitter_height velocity_angle velocity velocity_angle_variation velocity_variation acceleration_angle acceleration acceleration_angle_variation acceleration_variation gravity gravity_angle turbulence turbulence_x turbulence_y turbulence_width turbulence_height particle_shape burst_count burst_x burst_y burst_revision visible], %i[start stop pause resume empty burst], false],
  drag_area: [%i[enabled target axis minimum_x maximum_x minimum_y maximum_y snap_x snap_y threshold cursor reset_revision width height visible], %i[click double_click drag_start drag drag_end cancel], true],
  drop_area: [%i[keys enabled width height visible], %i[enter move exit drop], true],
  pinch_area: [%i[enabled target minimum_scale maximum_scale minimum_rotation maximum_rotation minimum_x maximum_x minimum_y maximum_y width height visible], %i[pinch_start pinch pinch_end cancel], true],
  hover_area: [%i[enabled cursor blocking margin width height visible], %i[enter move exit hover], true],
  selection_rectangle: [%i[target mode enabled visible], %i[active_change selection_change], false],
  scroll_bar: [%i[target orientation policy position size active interactive step_size minimum_size width height visible], %i[input change active_change], false],
  scroll_indicator: [%i[target orientation position size active minimum_size width height visible], %i[active_change], false],
  animation: [%i[target property from to duration delay easing loops running paused always_run visible], %i[start stop finish running_change], false],
  number_animation: [%i[target property from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  color_animation: [%i[target property from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  rotation_animation: [%i[target property from to duration delay easing direction loops running paused visible], %i[start stop finish running_change], false],
  vector_animation: [%i[target property from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  path_animation: [%i[target path orientation anchor_x anchor_y duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  property_animation: [%i[target property from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  pause_animation: [%i[duration running paused visible], %i[start stop finish running_change], false],
  script_action: [%i[action trigger revision visible], %i[trigger finish], false],
  property_action: [%i[target property value revision visible], %i[apply finish], false],
  parallel_animation: [%i[animations loops running paused visible], %i[start stop finish running_change], false],
  sequential_animation: [%i[animations loops running paused visible], %i[start stop finish step running_change], false],
  spring_animation: [%i[target property from to spring damping epsilon mass modulus velocity running paused visible], %i[start stop finish running_change], false],
  smoothed_animation: [%i[target property from to velocity duration reversing_mode running paused visible], %i[start stop finish running_change], false],
  anchor_animation: [%i[target duration easing running paused visible], %i[start stop finish running_change], false],
  parent_animation: [%i[target new_parent via duration easing running paused visible], %i[start stop finish running_change], false],
  opacity_animator: [%i[target from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  rotation_animator: [%i[target from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  scale_animator: [%i[target from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  x_animator: [%i[target from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  y_animator: [%i[target from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  uniform_animator: [%i[target uniform from to duration delay easing loops running paused visible], %i[start stop finish running_change], false],
  frame_animation: [%i[running paused visible], %i[frame start stop], false],
  animation_controller: [%i[animation target property from to duration progress reload revision visible], %i[progress_change finish], false],
  behavior: [%i[target property value animation duration easing enabled visible], %i[change finish], false],
  transition: [%i[target from_state to_state animations loops running paused enabled revision visible], %i[start stop finish running_change], false],
  state: [%i[target name when properties restore_entry_values extend revision visible], %i[enter exit change], false],
  state_group: [%i[target current states revision visible], %i[change], false],
  property_changes: [%i[target properties revision visible], %i[apply], false],
  anchor_changes: [%i[target anchors margins revision visible], %i[apply], false],
  parent_change: [%i[target parent x y width height scale rotation revision visible], %i[apply], false],
  timer: [%i[interval repeat running triggered_on_start restart revision visible], %i[trigger start stop], false],
  media_player: [%i[source auto_play playback loops playback_rate position volume muted audio_device command command_revision visible], %i[play pause stop status error position duration media_status buffer progress tracks], false],
  video_output: [%i[source fill_mode orientation mirrored end_of_stream_policy width height visible], %i[source_change frame], false],
  sound_effect: [%i[source loops volume muted playback command command_revision visible], %i[play stop status error loops_remaining], false],
  camera: [%i[active camera_device focus_mode flash_mode torch_mode exposure_mode exposure_compensation iso shutter_speed white_balance_mode color_temperature zoom_factor command command_revision visible], %i[start stop active_change error focus exposure], false],
  capture_session: [%i[camera_active audio_input_device audio_output_device video_output_enabled width height visible], %i[ready error], true],
  image_capture: [%i[session quality format command path command_revision visible], %i[captured saved error ready_change], false],
  media_recorder: [%i[session output_location quality resolution frame_rate video_codec audio_codec media_format audio_bit_rate video_bit_rate command command_revision visible], %i[record pause stop status duration error location], false],
  audio_input: [%i[device muted volume visible], %i[device_change muted_change volume_change error], false],
  audio_output: [%i[device muted volume visible], %i[device_change muted_change volume_change error], false],
  media_devices: [%i[kind refresh_revision visible], %i[video_inputs audio_inputs audio_outputs change], false],
  screen_capture: [%i[active screen command command_revision visible], %i[start stop error], false],
  window_capture: [%i[active window command command_revision visible], %i[start stop error], false],
  list_model: [%i[items revision visible], %i[count_change change], false],
  delegate_model: [%i[items filter_group revision visible], %i[count_change group_change change], false],
  delegate_model_group: [%i[items name include_by_default revision visible], %i[count_change change], false],
  sort_filter_proxy_model: [%i[items filter filter_field filter_case_sensitive sort_field sort_order sort_case_sensitive dynamic recursive auto_accept_children revision visible], %i[count_change change], false],
  folder_list_model: [%i[folder root_folder name_filters show_files show_dirs show_dirs_first show_dot_and_dot_dot show_hidden show_only_readable sort_field sort_reversed case_sensitive revision visible], %i[count_change folder_change status error change], false],
  settings: [%i[category file_name values sync_revision visible], %i[loaded change synced error], false],
  standard_paths: [%i[location locate_file executable refresh_revision visible], %i[resolved error], false],
  clipboard: [%i[text watch revision visible], %i[change copied], false],
  dropdown: [%i[label value options foreground background popup_border accent font_family row_height popup_row_height show_label cursor], %i[change hover], false],
  searchable_dropdown: [%i[label value options placeholder empty_text trigger_label foreground background popup_border accent font_family row_height popup_row_height popup_min_height show_label cursor], %i[change hover], false],
  multi_select: [%i[label values options options_command options_command_cwd placeholder empty_text no_selection_text trigger_label show_label foreground background popup_border accent font_family row_height popup_row_height popup_min_height cursor], %i[change hover], false],
  button_group: [%i[value options foreground background accent font_family font_size focusable cursor_index], %i[change hover], false],
  progress: [%i[value minimum maximum width height color visible], [], false],
  line_chart: [%i[values labels width height color fill_color grid_color line_width minimum maximum show_grid show_points point_size visible], %i[select hover], false],
  area_chart: [%i[values labels width height color fill_color grid_color line_width minimum maximum show_grid visible], %i[select hover], false],
  bar_chart: [%i[values labels width height colors grid_color minimum maximum show_grid bar_spacing visible], %i[select hover], false],
  stacked_bar_chart: [%i[values series labels colors width height grid_color minimum maximum show_grid bar_spacing stack_spacing orientation legend visible], %i[select hover], false],
  pie_chart: [%i[values labels colors width height inner_radius start_angle clockwise pad_angle show_labels label_color font_family font_size visible], %i[select hover], false],
  donut_chart: [%i[values labels colors width height inner_radius start_angle clockwise pad_angle show_labels center_text label_color font_family font_size visible], %i[select hover], false],
  scatter_chart: [%i[values series labels colors width height grid_color minimum_x maximum_x minimum_y maximum_y point_size show_grid connect_lines visible], %i[select hover], false],
  bubble_chart: [%i[values series labels colors width height grid_color minimum_x maximum_x minimum_y maximum_y minimum_size maximum_size show_grid visible], %i[select hover], false],
  radar_chart: [%i[values series labels colors width height grid_color levels fill_opacity line_width point_size visible], %i[select hover], false],
  heatmap: [%i[values x_labels y_labels colors width height minimum maximum cell_spacing show_values value_color font_family font_size visible], %i[select hover], false],
  sparkline: [%i[values width height color fill_color line_width minimum maximum show_points point_size visible], %i[select hover], false],
  gauge: [%i[value values minimum maximum width height color track_color thickness label label_format show_label font_family font_size visible], %i[select hover], false],
  radial_gauge: [%i[value values minimum maximum width height color track_color thickness start_angle end_angle label label_format show_label font_family font_size visible], %i[select hover], false],
  histogram: [%i[values bins labels width height color colors grid_color minimum maximum show_grid bar_spacing normalize cumulative visible], %i[select hover], false],
  candlestick_chart: [%i[values labels width height up_color down_color wick_color grid_color minimum maximum show_grid candle_spacing visible], %i[select hover], false],
  legend: [%i[items orientation spacing marker_size width height background foreground muted font_family font_size interactive selected visible], %i[select hover], false],
  separator: [%i[strength visible], [], false],
  divider: [%i[orientation length thickness indent end_indent color opacity visible], [], false],
  section_header: [%i[text visible], [], false],
  confirm_dialog: [%i[opened message cancel_text confirm_text selected_index background foreground scrim selected_background selected_text font_family corner_radius], %i[cancel confirm], false],
  panel_hero: [%i[title meta detail foreground font_family icon_size icon_opacity meta_opacity], [], false],
  optical_glyph: [%i[text size color debug_bounds visible], [], false],
  cursor_surface: [%i[cursor current outline bordered foreground accent fill current_fill], %i[click], true],
  widget_button: [%i[text font_family font_size foreground active_color active horizontal_margin vertical_padding fixed_width fixed_height text_rotation keep_space dimmed concealed interactive pressable use_active_color maintain_indicator_reveal label_visible has_visual_content tooltip], %i[click right_click middle_click wheel], false],
  list_view: [%i[items key_field label_field description_field icon_field selected orientation spacing width height empty_text visible], %i[activate change scroll], false],
  key_catcher: [%i[blocked visible], %i[move activate return close delete tab text], true]
}.freeze
DEFAULT_COMPONENTS =
ComponentRegistry.new

Class Method Summary collapse

Class Method Details

.app(&definition) ⇒ Object Also known as: application



34
35
36
# File 'lib/zui.rb', line 34

def self.app(&definition)
  Application.new(&definition).run
end