vime_view_components 5.0.2 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +6 -8
  3. data/{lib → app/components}/vime/core/embed.rb +1 -1
  4. data/{lib → app/components}/vime/core/player.rb +14 -14
  5. data/{lib → app/components}/vime/providers/audio.rb +2 -2
  6. data/{lib → app/components}/vime/providers/dailymotion.rb +6 -6
  7. data/{lib → app/components}/vime/providers/dash.rb +3 -3
  8. data/{lib → app/components}/vime/providers/file.rb +1 -1
  9. data/{lib → app/components}/vime/providers/hls.rb +3 -3
  10. data/{lib → app/components}/vime/providers/video.rb +2 -2
  11. data/{lib → app/components}/vime/providers/vimeo.rb +4 -4
  12. data/{lib → app/components}/vime/providers/youtube.rb +3 -3
  13. data/{lib → app/components}/vime/ui/captions.rb +1 -3
  14. data/{lib → app/components}/vime/ui/click_to_play.rb +1 -1
  15. data/{lib → app/components}/vime/ui/controls/caption_control.rb +5 -5
  16. data/{lib → app/components}/vime/ui/controls/control.rb +1 -1
  17. data/{lib → app/components}/vime/ui/controls/control_group.rb +1 -1
  18. data/{lib → app/components}/vime/ui/controls/controls.rb +11 -11
  19. data/{lib → app/components}/vime/ui/controls/default_controls.rb +4 -4
  20. data/{lib → app/components}/vime/ui/controls/fullscreen_control.rb +5 -5
  21. data/{lib → app/components}/vime/ui/controls/mute_control.rb +6 -6
  22. data/{lib → app/components}/vime/ui/controls/pip_control.rb +5 -5
  23. data/{lib → app/components}/vime/ui/controls/playback_control.rb +5 -5
  24. data/{lib → app/components}/vime/ui/controls/scrubber_control.rb +3 -3
  25. data/{lib → app/components}/vime/ui/controls/settings_control.rb +3 -3
  26. data/{lib → app/components}/vime/ui/controls/volume_control.rb +7 -7
  27. data/{lib → app/components}/vime/ui/dbl_click_fullscreen.rb +1 -1
  28. data/{lib → app/components}/vime/ui/default_ui.rb +9 -9
  29. data/{lib → app/components}/vime/ui/poster.rb +1 -1
  30. data/{lib → app/components}/vime/ui/settings/default_settings.rb +1 -1
  31. data/{lib → app/components}/vime/ui/settings/menu.rb +1 -1
  32. data/{lib → app/components}/vime/ui/settings/menu_item.rb +2 -2
  33. data/{lib → app/components}/vime/ui/settings/menu_radio.rb +2 -2
  34. data/{lib → app/components}/vime/ui/settings/settings.rb +3 -3
  35. data/{lib → app/components}/vime/ui/settings/submenu.rb +2 -2
  36. data/{lib → app/components}/vime/ui/skeleton.rb +1 -1
  37. data/{lib → app/components}/vime/ui/slider.rb +4 -4
  38. data/{lib → app/components}/vime/ui/time/current_time.rb +1 -1
  39. data/{lib → app/components}/vime/ui/time/end_time.rb +1 -1
  40. data/{lib → app/components}/vime/ui/time/time.rb +2 -2
  41. data/{lib → app/components}/vime/ui/time/time_progress.rb +2 -2
  42. data/{lib → app/components}/vime/ui/tooltip.rb +3 -3
  43. data/lib/tasks/vime_view_components_tasks.rake +5 -0
  44. data/lib/vime_view_components/engine.rb +10 -0
  45. data/lib/vime_view_components/version.rb +1 -1
  46. data/lib/vime_view_components.rb +1 -6
  47. metadata +57 -55
  48. /data/{lib → app/components}/vime/component.rb +0 -0
  49. /data/{lib → app/components}/vime/core/playground.rb +0 -0
  50. /data/{lib → app/components}/vime/ui/controls/control_spacer.rb +0 -0
  51. /data/{lib → app/components}/vime/ui/icon.rb +0 -0
  52. /data/{lib → app/components}/vime/ui/icon_library.rb +0 -0
  53. /data/{lib → app/components}/vime/ui/live_indicator.rb +0 -0
  54. /data/{lib → app/components}/vime/ui/scrim.rb +0 -0
  55. /data/{lib → app/components}/vime/ui/settings/menu_radio_group.rb +0 -0
  56. /data/{lib → app/components}/vime/ui/spinner.rb +0 -0
  57. /data/{lib → app/components}/vime/ui/ui.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 514c7d62494f1cc0d3cb0a766f2582a15dd594b574eca7e754a1fa1cf541d26a
4
- data.tar.gz: 3e38bce81ae81e8deb913f50bda22ee6e567c54ef0f51531a36a838a07318713
3
+ metadata.gz: 6e131a0fe77a746b8e5004811267f3f782b6f6fd79a34eb924c253b8e925dcc5
4
+ data.tar.gz: 7625afa0363fca63a24f408d574ba4a54856c8f47f967bfa1d05542e2c2feb39
5
5
  SHA512:
6
- metadata.gz: a40fecb2504f468c3fd62e8ff45c193ab4cf7b70a89ad86fa432c561d5ee58f89bf1e36e385a0b9582fafe8138e745c1cc34b7f552ce3d6ac24d0b741fa4b810
7
- data.tar.gz: 6c444acbaa954be63795aec981cb060b7f74de7ce00d3b78cef79e74f8c753aa824bb9549d4a06a11a775cf73603c9faa94ee575f78add9b838c6f6eb242e5f6
6
+ metadata.gz: f967264a294ab9ae485a836f6c8801f4353d35f083ef04f747e9efa715d8c1bb1c153ce5fbde53a9a211967286b6991a28ee19e39e93949582bfdb25fe315f13
7
+ data.tar.gz: 2c1b60d0d204b3cf790cc2c3eb08fc98e936b60c7f7cff79fb30ebdd32b829abd176094a62e0c228b8c9c5004e6799ac8c46f795ac9d00c363841cdbd3e7218c
data/Rakefile CHANGED
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "bundler/gem_tasks"
4
- require "rake/testtask"
3
+ require "bundler/setup"
4
+
5
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
6
+ load "rails/tasks/engine.rake"
5
7
 
6
- Rake::TestTask.new(:test) do |t|
7
- t.libs << "test"
8
- t.libs << "lib"
9
- t.test_files = FileList["test/**/*_test.rb"]
10
- end
8
+ load "rails/tasks/statistics.rake"
11
9
 
12
- task default: :test
10
+ require "bundler/gem_tasks"
@@ -5,7 +5,7 @@
5
5
  module Vime
6
6
  module Core
7
7
  class Embed < Component
8
- option :embed_src, type: Types::String
8
+ option :embed_src, type: Types::String, optional: true
9
9
  option :media_title, type: Types::String, optional: true
10
10
  option :origin, type: Types::String, optional: true
11
11
  option :params, type: Types::String, optional: true
@@ -5,23 +5,23 @@
5
5
  module Vime
6
6
  module Core
7
7
  class Player < Component
8
- option :aspect_ratio, type: Types::String, default: -> { "16:9" }
9
- option :autopause, type: Types::Bool, default: -> { true }
10
- option :autoplay, type: Types::Bool, default: -> { false }
11
- option :controls, type: Types::Bool, default: -> { false }
12
- option :current_time, type: Types::Integer, default: -> { 0 }
13
- option :debug, type: Types::Bool, default: -> { false }
14
- option :duration, type: Types::Integer, default: -> { -1 }
15
- option :language, type: Types::String, default: -> { "en" }
16
- option :loop, type: Types::Bool, default: -> { false }
8
+ option :aspect_ratio, type: Types::String, optional: true
9
+ option :autopause, type: Types::Bool, optional: true
10
+ option :autoplay, type: Types::Bool, optional: true
11
+ option :controls, type: Types::Bool, optional: true
12
+ option :current_time, type: Types::Integer, optional: true
13
+ option :debug, type: Types::Bool, optional: true
14
+ option :duration, type: Types::Integer, optional: true
15
+ option :language, type: Types::String, optional: true
16
+ option :loop, type: Types::Bool, optional: true
17
17
  option :media_title, type: Types::String, optional: true
18
- option :muted, type: Types::Bool, default: -> { false }
19
- option :paused, type: Types::Bool, default: -> { true }
18
+ option :muted, type: Types::Bool, optional: true
19
+ option :paused, type: Types::Bool, optional: true
20
20
  option :playback_quality, type: Types::String, optional: true
21
- option :playback_rate, type: Types::Integer, default: -> { 1 }
22
- option :playsinline, type: Types::Bool, default: -> { false }
21
+ option :playback_rate, type: Types::Integer, optional: true
22
+ option :playsinline, type: Types::Bool, optional: true
23
23
  option :theme, type: Types::String, optional: true
24
- option :volume, type: Types::Integer, default: -> { 50 }
24
+ option :volume, type: Types::Integer, optional: true
25
25
 
26
26
  def call
27
27
  content_tag "vm-player", content, process_attrs(dom_attrs)
@@ -4,10 +4,10 @@
4
4
 
5
5
  module Vime
6
6
  module Providers
7
- class Audio < Component
7
+ class Audio < File
8
8
  option :cross_origin, type: Types::CrossOrigin, optional: true
9
9
  option :media_title, type: Types::String, optional: true
10
- option :preload, type: Types::Preload, default: -> { "metadata" }
10
+ option :preload, type: Types::Preload, optional: true
11
11
 
12
12
  def call
13
13
  content_tag "vm-audio", content, process_attrs(dom_attrs)
@@ -4,14 +4,14 @@
4
4
 
5
5
  module Vime
6
6
  module Providers
7
- class Dailymotion < Component
7
+ class Dailymotion < Core::Embed
8
8
  option :color, type: Types::String, optional: true
9
9
  option :poster, type: Types::String, optional: true
10
- option :should_autoplay_queue, type: Types::Bool, default: -> { false }
11
- option :show_dailymotion_logo, type: Types::Bool, default: -> { false }
12
- option :show_share_buttons, type: Types::Bool, default: -> { false }
13
- option :show_up_next_queue, type: Types::Bool, default: -> { false }
14
- option :show_video_info, type: Types::Bool, default: -> { true }
10
+ option :should_autoplay_queue, type: Types::Bool, optional: true
11
+ option :show_dailymotion_logo, type: Types::Bool, optional: true
12
+ option :show_share_buttons, type: Types::Bool, optional: true
13
+ option :show_up_next_queue, type: Types::Bool, optional: true
14
+ option :show_video_info, type: Types::Bool, optional: true
15
15
  option :syndication, type: Types::String, optional: true
16
16
  option :video_id, type: Types::String
17
17
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  module Vime
6
6
  module Providers
7
- class Dash < Component
7
+ class Dash < Video
8
8
  option :auto_pip, type: Types::Bool, optional: true
9
9
  option :controls_list, type: Types::String, optional: true
10
10
  option :cross_origin, type: Types::CrossOrigin, optional: true
@@ -12,9 +12,9 @@ module Vime
12
12
  option :disable_remote_playback, type: Types::Bool, optional: true
13
13
  option :media_title, type: Types::String, optional: true
14
14
  option :poster, type: Types::String, optional: true
15
- option :preload, type: Types::Preload, default: -> { "metadata" }
15
+ option :preload, type: Types::Preload, optional: true
16
16
  option :src, type: Types::String
17
- option :version, type: Types::String, default: -> { "latest" }
17
+ option :version, type: Types::String, optional: true
18
18
 
19
19
  def call
20
20
  content_tag "vm-dash", content, process_attrs(dom_attrs)
@@ -12,7 +12,7 @@ module Vime
12
12
  option :disable_remote_playback, type: Types::Bool, optional: true
13
13
  option :media_title, type: Types::String, optional: true
14
14
  option :poster, type: Types::String, optional: true
15
- option :preload, type: Types::Preload, default: -> { "metadata" }
15
+ option :preload, type: Types::Preload, optional: true
16
16
  option :view_type, type: Types::String, optional: true
17
17
 
18
18
  def call
@@ -4,14 +4,14 @@
4
4
 
5
5
  module Vime
6
6
  module Providers
7
- class Hls < Component
7
+ class Hls < Video
8
8
  option :config, type: Types::Any, optional: true
9
9
  option :controls_list, type: Types::String, optional: true
10
10
  option :cross_origin, type: Types::CrossOrigin, optional: true
11
11
  option :media_title, type: Types::String, optional: true
12
12
  option :poster, type: Types::String, optional: true
13
- option :preload, type: Types::Preload, default: -> { "metadata" }
14
- option :version, type: Types::String, default: -> { "latest" }
13
+ option :preload, type: Types::Preload, optional: true
14
+ option :version, type: Types::String, optional: true
15
15
 
16
16
  def call
17
17
  content_tag "vm-hls", content, process_attrs(dom_attrs)
@@ -4,12 +4,12 @@
4
4
 
5
5
  module Vime
6
6
  module Providers
7
- class Video < Component
7
+ class Video < File
8
8
  option :controls_list, type: Types::String, optional: true
9
9
  option :cross_origin, type: Types::CrossOrigin, optional: true
10
10
  option :media_title, type: Types::String, optional: true
11
11
  option :poster, type: Types::String, optional: true
12
- option :preload, type: Types::Preload, default: -> { "metadata" }
12
+ option :preload, type: Types::Preload, optional: true
13
13
 
14
14
  def call
15
15
  content_tag "vm-video", content, process_attrs(dom_attrs)
@@ -4,11 +4,11 @@
4
4
 
5
5
  module Vime
6
6
  module Providers
7
- class Vimeo < Component
8
- option :byline, type: Types::Bool, default: -> { true }
7
+ class Vimeo < Vime::Core::Embed
8
+ option :byline, type: Types::Bool, optional: true
9
9
  option :color, type: Types::String, optional: true
10
- option :no_auto_aspect_ratio, type: Types::Bool, default: -> { false }
11
- option :portrait, type: Types::Bool, default: -> { true }
10
+ option :no_auto_aspect_ratio, type: Types::Bool, optional: true
11
+ option :portrait, type: Types::Bool, optional: true
12
12
  option :poster, type: Types::String, optional: true
13
13
  option :video_id, type: Types::String
14
14
 
@@ -4,10 +4,10 @@
4
4
 
5
5
  module Vime
6
6
  module Providers
7
- class Youtube < Component
8
- option :cookies, type: Types::Bool, default: -> { false }
7
+ class Youtube < Core::Embed
8
+ option :cookies, type: Types::Bool, optional: true
9
9
  option :poster, type: Types::String, optional: true
10
- option :show_fullscreen_control, type: Types::Bool, default: -> { true }
10
+ option :show_fullscreen_control, type: Types::Bool, optional: true
11
11
  option :video_id, type: Types::String
12
12
 
13
13
  def call
@@ -5,8 +5,7 @@
5
5
  module Vime
6
6
  module Ui
7
7
  class Captions < Component
8
- option :controls_height, type: Types::Integer, default: -> { 0 }
9
- option :hidden, type: Types::Bool, default: -> { false }
8
+ option :hidden, type: Types::Bool, optional: true
10
9
 
11
10
  def call
12
11
  content_tag "vm-captions", nil, process_attrs(dom_attrs)
@@ -14,7 +13,6 @@ module Vime
14
13
 
15
14
  def dom_attrs
16
15
  super.merge({
17
- controls_height: controls_height,
18
16
  hidden: hidden,
19
17
  })
20
18
  end
@@ -5,7 +5,7 @@
5
5
  module Vime
6
6
  module Ui
7
7
  class ClickToPlay < Component
8
- option :use_on_mobile, type: Types::Bool, default: -> { false }
8
+ option :use_on_mobile, type: Types::Bool, optional: true
9
9
 
10
10
  def call
11
11
  content_tag "vm-click-to-play", nil, process_attrs(dom_attrs)
@@ -6,12 +6,12 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class CaptionControl < Component
9
- option :hide_icon, type: Types::String, default: -> { "captions-off" }
10
- option :hide_tooltip, type: Types::Bool, default: -> { false }
11
- option :keys, type: Types::String, default: -> { "c" }
12
- option :show_icon, type: Types::String, default: -> { "captions-on" }
9
+ option :hide_icon, type: Types::String, optional: true
10
+ option :hide_tooltip, type: Types::Bool, optional: true
11
+ option :keys, type: Types::String, optional: true
12
+ option :show_icon, type: Types::String, optional: true
13
13
  option :tooltip_direction, type: Types::TooltipDirection, optional: true
14
- option :tooltip_position, type: Types::TooltipPosition, default: -> { "top" }
14
+ option :tooltip_position, type: Types::TooltipPosition, optional: true
15
15
 
16
16
  def call
17
17
  content_tag "vm-caption-control", nil, process_attrs(dom_attrs)
@@ -7,7 +7,7 @@ module Vime
7
7
  module Controls
8
8
  class Control < Component
9
9
  option :expanded, type: Types::Bool, optional: true
10
- option :hidden, type: Types::Bool, default: -> { false }
10
+ option :hidden, type: Types::Bool, optional: true
11
11
  option :identifier, type: Types::String, optional: true
12
12
  option :keys, type: Types::String, optional: true
13
13
  option :label, type: Types::String
@@ -6,7 +6,7 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class ControlGroup < Component
9
- option :space, type: Types::String.enum("both", "bottom", "none", "top"), default: -> { "none" }
9
+ option :space, type: Types::String.enum("both", "bottom", "none", "top"), optional: true
10
10
 
11
11
  def call
12
12
  content_tag "vm-control-group", content, process_attrs(dom_attrs)
@@ -6,17 +6,17 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class Controls < Component
9
- option :active_duration, type: Types::Integer, default: -> { 2750 }
10
- option :align, type: Types::String.enum("center", "end", "start"), default: -> { "center" }
11
- option :direction, type: Types::String.enum("column", "row"), default: -> { "row" }
12
- option :full_height, type: Types::Bool, default: -> { false }
13
- option :full_width, type: Types::Bool, default: -> { false }
14
- option :hidden, type: Types::Bool, default: -> { false }
15
- option :hide_on_mouse_leave, type: Types::Bool, default: -> { false }
16
- option :hide_when_paused, type: Types::Bool, default: -> { false }
17
- option :justify, type: Types::String.enum("center", "end", "space-around", "space-between", "space-evenly", "start"), default: -> { "start" }
18
- option :pin, type: Types::String.enum("bottomLeft", "bottomRight", "center", "topLeft", "topRight"), default: -> { "bottomLeft" }
19
- option :wait_for_playback_start, type: Types::Bool, default: -> { false }
9
+ option :active_duration, type: Types::Integer, optional: true
10
+ option :align, type: Types::String.enum("center", "end", "start"), optional: true
11
+ option :direction, type: Types::String.enum("column", "row"), optional: true
12
+ option :full_height, type: Types::Bool, optional: true
13
+ option :full_width, type: Types::Bool, optional: true
14
+ option :hidden, type: Types::Bool, optional: true
15
+ option :hide_on_mouse_leave, type: Types::Bool, optional: true
16
+ option :hide_when_paused, type: Types::Bool, optional: true
17
+ option :justify, type: Types::String.enum("center", "end", "space-around", "space-between", "space-evenly", "start"), optional: true
18
+ option :pin, type: Types::String.enum("bottomLeft", "bottomRight", "center", "topLeft", "topRight"), optional: true
19
+ option :wait_for_playback_start, type: Types::Bool, optional: true
20
20
 
21
21
  def call
22
22
  content_tag "vm-controls", content, process_attrs(dom_attrs)
@@ -6,10 +6,10 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class DefaultControls < Component
9
- option :active_duration, type: Types::Integer, default: -> { 2750 }
10
- option :hide_on_mouse_leave, type: Types::Bool, default: -> { false }
11
- option :hide_when_paused, type: Types::Bool, default: -> { false }
12
- option :wait_for_playback_start, type: Types::Bool, default: -> { false }
9
+ option :active_duration, type: Types::Integer, optional: true
10
+ option :hide_on_mouse_leave, type: Types::Bool, optional: true
11
+ option :hide_when_paused, type: Types::Bool, optional: true
12
+ option :wait_for_playback_start, type: Types::Bool, optional: true
13
13
 
14
14
  def call
15
15
  content_tag "vm-default-controls", nil, process_attrs(dom_attrs)
@@ -6,12 +6,12 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class FullscreenControl < Component
9
- option :enter_icon, type: Types::String, default: -> { "enter-fullscreen" }
10
- option :exit_icon, type: Types::String, default: -> { "exit-fullscreen" }
11
- option :hide_tooltip, type: Types::Bool, default: -> { false }
12
- option :keys, type: Types::String, optional: true, default: -> { "f" }
9
+ option :enter_icon, type: Types::String, optional: true
10
+ option :exit_icon, type: Types::String, optional: true
11
+ option :hide_tooltip, type: Types::Bool, optional: true
12
+ option :keys, type: Types::String, optional: true
13
13
  option :tooltip_direction, type: Types::TooltipDirection, optional: true
14
- option :tooltip_position, type: Types::TooltipPosition, default: -> { "top" }
14
+ option :tooltip_position, type: Types::TooltipPosition, optional: true
15
15
 
16
16
  def call
17
17
  content_tag "vm-fullscreen-control", nil, process_attrs(dom_attrs)
@@ -6,13 +6,13 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class MuteControl < Component
9
- option :hide_tooltip, type: Types::Bool, default: -> { false }
10
- option :high_volume_icon, type: Types::String, default: -> { "volume-high" }
11
- option :keys, type: Types::String.optional, default: -> { "m" }
12
- option :low_volume_icon, type: Types::String, default: -> { "volume-low" }
13
- option :muted_icon, type: Types::String, default: -> { "volume-mute" }
9
+ option :hide_tooltip, type: Types::Bool, optional: true
10
+ option :high_volume_icon, type: Types::String, optional: true
11
+ option :keys, type: Types::String.optional, optional: true
12
+ option :low_volume_icon, type: Types::String, optional: true
13
+ option :muted_icon, type: Types::String, optional: true
14
14
  option :tooltip_direction, type: Types::TooltipDirection, optional: true
15
- option :tooltip_position, type: Types::TooltipPosition, default: -> { "top" }
15
+ option :tooltip_position, type: Types::TooltipPosition, optional: true
16
16
 
17
17
  def call
18
18
  content_tag "vm-mute-control", nil, process_attrs(dom_attrs)
@@ -6,12 +6,12 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class PipControl < Component
9
- option :enter_icon, type: Types::String, default: -> { "enter-pip" }
10
- option :exit_icon, type: Types::String, default: -> { "exit-pip" }
11
- option :hide_tooltip, type: Types::Bool, default: -> { false }
12
- option :keys, type: Types::String, default: -> { "p" }
9
+ option :enter_icon, type: Types::String, optional: true
10
+ option :exit_icon, type: Types::String, optional: true
11
+ option :hide_tooltip, type: Types::Bool, optional: true
12
+ option :keys, type: Types::String, optional: true
13
13
  option :tooltip_direction, type: Types::TooltipDirection, optional: true
14
- option :tooltip_position, type: Types::TooltipPosition, default: -> { "top" }
14
+ option :tooltip_position, type: Types::TooltipPosition, optional: true
15
15
 
16
16
  def call
17
17
  content_tag "vm-pip-control", nil, process_attrs(dom_attrs)
@@ -6,12 +6,12 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class PlaybackControl < Component
9
- option :hide_tooltip, type: Types::Bool, default: -> { false }
10
- option :keys, type: Types::String.optional, default: -> { "k" }
11
- option :play_icon, type: Types::String, default: -> { "play" }
12
- option :pause_icon, type: Types::String, default: -> { "pause" }
9
+ option :hide_tooltip, type: Types::Bool, optional: true
10
+ option :keys, type: Types::String.optional, optional: true
11
+ option :play_icon, type: Types::String, optional: true
12
+ option :pause_icon, type: Types::String, optional: true
13
13
  option :tooltip_direction, type: Types::TooltipDirection, optional: true
14
- option :tooltip_position, type: Types::TooltipPosition, default: -> { "top" }
14
+ option :tooltip_position, type: Types::TooltipPosition, optional: true
15
15
 
16
16
  def call
17
17
  content_tag "vm-playback-control", nil, process_attrs(dom_attrs)
@@ -6,9 +6,9 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class ScrubberControl < Component
9
- option :always_show_hours, type: Types::Bool, default: -> { false }
10
- option :hide_tooltip, type: Types::Bool, default: -> { false }
11
- option :no_keyboard, type: Types::Bool, default: -> { false }
9
+ option :always_show_hours, type: Types::Bool, optional: true
10
+ option :hide_tooltip, type: Types::Bool, optional: true
11
+ option :no_keyboard, type: Types::Bool, optional: true
12
12
 
13
13
  def call
14
14
  content_tag "vm-scrubber-control", nil, process_attrs(dom_attrs)
@@ -6,11 +6,11 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class SettingsControl < Component
9
- option :expanded, type: Types::Bool, default: -> { false }
10
- option :icon, type: Types::String, default: -> { "#vime-settings" }
9
+ option :expanded, type: Types::Bool, optional: true
10
+ option :icon, type: Types::String, optional: true
11
11
  option :menu, type: Types::String, optional: true
12
12
  option :tooltip_direction, type: Types::TooltipDirection, optional: true
13
- option :tooltip_position, type: Types::TooltipPosition, default: -> { "top" }
13
+ option :tooltip_position, type: Types::TooltipPosition, optional: true
14
14
 
15
15
  def call
16
16
  content_tag "vm-settings-control", nil, process_attrs(dom_attrs)
@@ -6,14 +6,14 @@ module Vime
6
6
  module Ui
7
7
  module Controls
8
8
  class VolumeControl < Component
9
- option :hide_tooltip, type: Types::Bool, default: -> { false }
10
- option :high_volume_icon, type: Types::String, default: -> { "volume-high" }
11
- option :low_volume_icon, type: Types::String, default: -> { "volume-low" }
12
- option :mute_keys, type: Types::String, default: -> { "m" }
13
- option :muted_icon, type: Types::String, default: -> { "volume-mute" }
14
- option :no_keyboard, type: Types::Bool, default: -> { false }
9
+ option :hide_tooltip, type: Types::Bool, optional: true
10
+ option :high_volume_icon, type: Types::String, optional: true
11
+ option :low_volume_icon, type: Types::String, optional: true
12
+ option :mute_keys, type: Types::String, optional: true
13
+ option :muted_icon, type: Types::String, optional: true
14
+ option :no_keyboard, type: Types::Bool, optional: true
15
15
  option :tooltip_direction, type: Types::TooltipDirection, optional: true
16
- option :tooltip_position, type: Types::TooltipPosition, default: -> { "top" }
16
+ option :tooltip_position, type: Types::TooltipPosition, optional: true
17
17
 
18
18
  def call
19
19
  content_tag "vm-volume-control", nil, process_attrs(dom_attrs)
@@ -5,7 +5,7 @@
5
5
  module Vime
6
6
  module Ui
7
7
  class DblClickFullscreen < Component
8
- option :use_on_mobile, type: Types::Bool, default: -> { false }
8
+ option :use_on_mobile, type: Types::Bool, optional: true
9
9
 
10
10
  def call
11
11
  content_tag "vm-dbl-click-fullscreen", nil, process_attrs(dom_attrs)
@@ -5,15 +5,15 @@
5
5
  module Vime
6
6
  module Ui
7
7
  class DefaultUi < Component
8
- option :no_captions, type: Types::Bool, default: -> { false }
9
- option :no_click_to_play, type: Types::Bool, default: -> { false }
10
- option :no_controls, type: Types::Bool, default: -> { false }
11
- option :no_dbl_click_fullscreen, type: Types::Bool, default: -> { false }
12
- option :no_icons, type: Types::Bool, default: -> { false }
13
- option :no_poster, type: Types::Bool, default: -> { false }
14
- option :no_settings, type: Types::Bool, default: -> { false }
15
- option :no_skeleton, type: Types::Bool, default: -> { false }
16
- option :no_spinner, type: Types::Bool, default: -> { false }
8
+ option :no_captions, type: Types::Bool, optional: true
9
+ option :no_click_to_play, type: Types::Bool, optional: true
10
+ option :no_controls, type: Types::Bool, optional: true
11
+ option :no_dbl_click_fullscreen, type: Types::Bool, optional: true
12
+ option :no_icons, type: Types::Bool, optional: true
13
+ option :no_poster, type: Types::Bool, optional: true
14
+ option :no_settings, type: Types::Bool, optional: true
15
+ option :no_skeleton, type: Types::Bool, optional: true
16
+ option :no_spinner, type: Types::Bool, optional: true
17
17
 
18
18
  def call
19
19
  content_tag "vm-default-ui", content, process_attrs(dom_attrs)
@@ -5,7 +5,7 @@
5
5
  module Vime
6
6
  module Ui
7
7
  class Poster < Component
8
- option :fit, type: Types::String.enum("contain", "cover", "fill", "none", "scale-down"), default: -> { "cover" }
8
+ option :fit, type: Types::String.enum("contain", "cover", "fill", "none", "scale-down"), optional: true
9
9
 
10
10
  def call
11
11
  content_tag "vm-poster", nil, process_attrs(dom_attrs)
@@ -6,7 +6,7 @@ module Vime
6
6
  module Ui
7
7
  module Settings
8
8
  class DefaultSettings < Component
9
- option :pin, type: Types::String.enum("bottomLeft", "bottomRight", "topLeft", "topRight"), default: -> { "bottomRight" }
9
+ option :pin, type: Types::String.enum("bottomLeft", "bottomRight", "topLeft", "topRight"), optional: true
10
10
 
11
11
  def call
12
12
  content_tag "vm-default-settings", nil, process_attrs(dom_attrs)
@@ -6,7 +6,7 @@ module Vime
6
6
  module Ui
7
7
  module Settings
8
8
  class Menu < Component
9
- option :active, type: Types::Bool, default: -> { false }
9
+ option :active, type: Types::Bool, optional: true
10
10
  option :controller, type: Types::String
11
11
  option :identifier, type: Types::String
12
12
 
@@ -8,9 +8,9 @@ module Vime
8
8
  class MenuItem < Component
9
9
  option :badge, type: Types::String, optional: true
10
10
  option :checked, type: Types::Bool, optional: true
11
- option :checked_icon, type: Types::String, default: -> { "checkmark" }
11
+ option :checked_icon, type: Types::String, optional: true
12
12
  option :expanded, type: Types::Bool, optional: true
13
- option :hidden, type: Types::Bool, default: -> { false }
13
+ option :hidden, type: Types::Bool, optional: true
14
14
  option :hint, type: Types::String, optional: true
15
15
  option :identifier, type: Types::String, optional: true
16
16
  option :label, type: Types::String
@@ -7,8 +7,8 @@ module Vime
7
7
  module Settings
8
8
  class MenuRadio < Component
9
9
  option :badge, type: Types::String, optional: true
10
- option :checked, type: Types::Bool, default: -> { false }
11
- option :checked_icon, type: Types::String, default: -> { "checkmark" }
10
+ option :checked, type: Types::Bool, optional: true
11
+ option :checked_icon, type: Types::String, optional: true
12
12
  option :label, type: Types::String
13
13
  option :value, type: Types::String
14
14
 
@@ -6,9 +6,9 @@ module Vime
6
6
  module Ui
7
7
  module Settings
8
8
  class Settings < Component
9
- option :active, type: Types::Bool, default: -> { false }
10
- option :controls_height, type: Types::Integer, default: -> { 0 }
11
- option :pin, type: Types::String.enum("bottomLeft", "bottomRight", "topLeft", "topRight"), default: -> { "bottomRight" }
9
+ option :active, type: Types::Bool, optional: true
10
+ option :controls_height, type: Types::Integer, optional: true
11
+ option :pin, type: Types::String.enum("bottomLeft", "bottomRight", "topLeft", "topRight"), optional: true
12
12
 
13
13
  def call
14
14
  content_tag "vm-settings", content, process_attrs(dom_attrs)
@@ -6,8 +6,8 @@ module Vime
6
6
  module Ui
7
7
  module Settings
8
8
  class Submenu < Component
9
- option :active, type: Types::Bool, default: -> { false }
10
- option :hidden, type: Types::Bool, default: -> { false }
9
+ option :active, type: Types::Bool, optional: true
10
+ option :hidden, type: Types::Bool, optional: true
11
11
  option :hint, type: Types::String, optional: true
12
12
  option :label, type: Types::String
13
13
 
@@ -5,7 +5,7 @@
5
5
  module Vime
6
6
  module Ui
7
7
  class Skeleton < Component
8
- option :effect, type: Types::String.enum("none", "sheen"), default: -> { "sheen" }
8
+ option :effect, type: Types::String.enum("none", "sheen"), optional: true
9
9
 
10
10
  def call
11
11
  content_tag "vm-skeleton", nil, process_attrs(dom_attrs)
@@ -6,10 +6,10 @@ module Vime
6
6
  module Ui
7
7
  class Slider < Component
8
8
  option :label, type: Types::String, optional: true
9
- option :max, type: Types::Integer, default: -> { 10 }
10
- option :min, type: Types::Integer, default: -> { 0 }
11
- option :step, type: Types::Integer, default: -> { 1 }
12
- option :value, type: Types::Integer, default: -> { 5 }
9
+ option :max, type: Types::Integer, optional: true
10
+ option :min, type: Types::Integer, optional: true
11
+ option :step, type: Types::Integer, optional: true
12
+ option :value, type: Types::Integer, optional: true
13
13
  option :value_text, type: Types::String, optional: true
14
14
 
15
15
  def call
@@ -6,7 +6,7 @@ module Vime
6
6
  module Ui
7
7
  module Time
8
8
  class CurrentTime < Component
9
- option :always_show_hours, type: Types::Bool, default: -> { false }
9
+ option :always_show_hours, type: Types::Bool, optional: true
10
10
 
11
11
  def call
12
12
  content_tag "vm-current-time", nil, process_attrs(dom_attrs)
@@ -6,7 +6,7 @@ module Vime
6
6
  module Ui
7
7
  module Time
8
8
  class EndTime < Component
9
- option :always_show_hours, type: Types::Bool, default: -> { false }
9
+ option :always_show_hours, type: Types::Bool, optional: true
10
10
 
11
11
  def call
12
12
  content_tag "vm-end-time", nil, process_attrs(dom_attrs)
@@ -6,9 +6,9 @@ module Vime
6
6
  module Ui
7
7
  module Time
8
8
  class Time < Component
9
- option :always_show_hours, type: Types::Bool, default: -> { false }
9
+ option :always_show_hours, type: Types::Bool, optional: true
10
10
  option :label, type: Types::String
11
- option :seconds, type: Types::Integer, default: -> { 0 }
11
+ option :seconds, type: Types::Integer, optional: true
12
12
 
13
13
  def call
14
14
  content_tag "vm-time", nil, process_attrs(dom_attrs)
@@ -6,8 +6,8 @@ module Vime
6
6
  module Ui
7
7
  module Time
8
8
  class TimeProgress < Component
9
- option :always_show_hours, type: Types::Bool, default: -> { false }
10
- option :separator, type: Types::String, default: -> { "/" }
9
+ option :always_show_hours, type: Types::Bool, optional: true
10
+ option :separator, type: Types::String, optional: true
11
11
 
12
12
  def call
13
13
  content_tag "vm-time-progress", nil, process_attrs(dom_attrs)
@@ -5,10 +5,10 @@
5
5
  module Vime
6
6
  module Ui
7
7
  class Tooltip < Component
8
- option :active, type: Types::Bool, default: -> { false }
8
+ option :active, type: Types::Bool, optional: true
9
9
  option :direction, type: Types::String.enum("left", "right"), optional: true
10
- option :hidden, type: Types::Bool, default: -> { false }
11
- option :position, type: Types::String.enum("top", "bottom"), default: -> { "top" }
10
+ option :hidden, type: Types::Bool, optional: true
11
+ option :position, type: Types::String.enum("top", "bottom"), optional: true
12
12
 
13
13
  def call
14
14
  content_tag "vm-tooltip", content, process_attrs(dom_attrs)
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+ # desc "Explaining what the task does"
3
+ # task :vime_view_components do
4
+ # # Task goes here
5
+ # end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module VimeViewComponents
4
+ class Engine < ::Rails::Engine
5
+ config.autoload_once_paths = %W( #{root}/app/components )
6
+
7
+ initializer "vime_view_components" do |app|
8
+ end
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VimeViewComponents
4
- VERSION = "5.0.2"
4
+ VERSION = "5.1.0"
5
5
  end
@@ -7,15 +7,10 @@ require "view_component"
7
7
  require "zeitwerk"
8
8
 
9
9
  require "vime_view_components/version"
10
+ require "vime_view_components/engine"
10
11
 
11
12
  module VimeViewComponents
12
13
  end
13
14
 
14
15
  module Vime
15
16
  end
16
-
17
- Zeitwerk::Loader.new.tap do |loader|
18
- loader.push_dir("#{__dir__}/vime", namespace: Vime)
19
- loader.setup
20
- loader.eager_load
21
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vime_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Asger Behncke Jacobsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-06-17 00:00:00.000000000 Z
12
+ date: 2023-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-initializer
@@ -48,7 +48,7 @@ dependencies:
48
48
  version: 2.0.0
49
49
  - - "<"
50
50
  - !ruby/object:Gem::Version
51
- version: '3.0'
51
+ version: '4.0'
52
52
  type: :runtime
53
53
  prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  version: 2.0.0
59
59
  - - "<"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.0'
61
+ version: '4.0'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: zeitwerk
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -140,57 +140,59 @@ files:
140
140
  - MIT-LICENSE
141
141
  - README.md
142
142
  - Rakefile
143
- - lib/vime/component.rb
144
- - lib/vime/core/embed.rb
145
- - lib/vime/core/player.rb
146
- - lib/vime/core/playground.rb
147
- - lib/vime/providers/audio.rb
148
- - lib/vime/providers/dailymotion.rb
149
- - lib/vime/providers/dash.rb
150
- - lib/vime/providers/file.rb
151
- - lib/vime/providers/hls.rb
152
- - lib/vime/providers/video.rb
153
- - lib/vime/providers/vimeo.rb
154
- - lib/vime/providers/youtube.rb
155
- - lib/vime/ui/captions.rb
156
- - lib/vime/ui/click_to_play.rb
157
- - lib/vime/ui/controls/caption_control.rb
158
- - lib/vime/ui/controls/control.rb
159
- - lib/vime/ui/controls/control_group.rb
160
- - lib/vime/ui/controls/control_spacer.rb
161
- - lib/vime/ui/controls/controls.rb
162
- - lib/vime/ui/controls/default_controls.rb
163
- - lib/vime/ui/controls/fullscreen_control.rb
164
- - lib/vime/ui/controls/mute_control.rb
165
- - lib/vime/ui/controls/pip_control.rb
166
- - lib/vime/ui/controls/playback_control.rb
167
- - lib/vime/ui/controls/scrubber_control.rb
168
- - lib/vime/ui/controls/settings_control.rb
169
- - lib/vime/ui/controls/volume_control.rb
170
- - lib/vime/ui/dbl_click_fullscreen.rb
171
- - lib/vime/ui/default_ui.rb
172
- - lib/vime/ui/icon.rb
173
- - lib/vime/ui/icon_library.rb
174
- - lib/vime/ui/live_indicator.rb
175
- - lib/vime/ui/poster.rb
176
- - lib/vime/ui/scrim.rb
177
- - lib/vime/ui/settings/default_settings.rb
178
- - lib/vime/ui/settings/menu.rb
179
- - lib/vime/ui/settings/menu_item.rb
180
- - lib/vime/ui/settings/menu_radio.rb
181
- - lib/vime/ui/settings/menu_radio_group.rb
182
- - lib/vime/ui/settings/settings.rb
183
- - lib/vime/ui/settings/submenu.rb
184
- - lib/vime/ui/skeleton.rb
185
- - lib/vime/ui/slider.rb
186
- - lib/vime/ui/spinner.rb
187
- - lib/vime/ui/time/current_time.rb
188
- - lib/vime/ui/time/end_time.rb
189
- - lib/vime/ui/time/time.rb
190
- - lib/vime/ui/time/time_progress.rb
191
- - lib/vime/ui/tooltip.rb
192
- - lib/vime/ui/ui.rb
143
+ - app/components/vime/component.rb
144
+ - app/components/vime/core/embed.rb
145
+ - app/components/vime/core/player.rb
146
+ - app/components/vime/core/playground.rb
147
+ - app/components/vime/providers/audio.rb
148
+ - app/components/vime/providers/dailymotion.rb
149
+ - app/components/vime/providers/dash.rb
150
+ - app/components/vime/providers/file.rb
151
+ - app/components/vime/providers/hls.rb
152
+ - app/components/vime/providers/video.rb
153
+ - app/components/vime/providers/vimeo.rb
154
+ - app/components/vime/providers/youtube.rb
155
+ - app/components/vime/ui/captions.rb
156
+ - app/components/vime/ui/click_to_play.rb
157
+ - app/components/vime/ui/controls/caption_control.rb
158
+ - app/components/vime/ui/controls/control.rb
159
+ - app/components/vime/ui/controls/control_group.rb
160
+ - app/components/vime/ui/controls/control_spacer.rb
161
+ - app/components/vime/ui/controls/controls.rb
162
+ - app/components/vime/ui/controls/default_controls.rb
163
+ - app/components/vime/ui/controls/fullscreen_control.rb
164
+ - app/components/vime/ui/controls/mute_control.rb
165
+ - app/components/vime/ui/controls/pip_control.rb
166
+ - app/components/vime/ui/controls/playback_control.rb
167
+ - app/components/vime/ui/controls/scrubber_control.rb
168
+ - app/components/vime/ui/controls/settings_control.rb
169
+ - app/components/vime/ui/controls/volume_control.rb
170
+ - app/components/vime/ui/dbl_click_fullscreen.rb
171
+ - app/components/vime/ui/default_ui.rb
172
+ - app/components/vime/ui/icon.rb
173
+ - app/components/vime/ui/icon_library.rb
174
+ - app/components/vime/ui/live_indicator.rb
175
+ - app/components/vime/ui/poster.rb
176
+ - app/components/vime/ui/scrim.rb
177
+ - app/components/vime/ui/settings/default_settings.rb
178
+ - app/components/vime/ui/settings/menu.rb
179
+ - app/components/vime/ui/settings/menu_item.rb
180
+ - app/components/vime/ui/settings/menu_radio.rb
181
+ - app/components/vime/ui/settings/menu_radio_group.rb
182
+ - app/components/vime/ui/settings/settings.rb
183
+ - app/components/vime/ui/settings/submenu.rb
184
+ - app/components/vime/ui/skeleton.rb
185
+ - app/components/vime/ui/slider.rb
186
+ - app/components/vime/ui/spinner.rb
187
+ - app/components/vime/ui/time/current_time.rb
188
+ - app/components/vime/ui/time/end_time.rb
189
+ - app/components/vime/ui/time/time.rb
190
+ - app/components/vime/ui/time/time_progress.rb
191
+ - app/components/vime/ui/tooltip.rb
192
+ - app/components/vime/ui/ui.rb
193
+ - lib/tasks/vime_view_components_tasks.rake
193
194
  - lib/vime_view_components.rb
195
+ - lib/vime_view_components/engine.rb
194
196
  - lib/vime_view_components/version.rb
195
197
  homepage: https://github.com/asgerb/vime_view_components
196
198
  licenses:
@@ -211,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
213
  - !ruby/object:Gem::Version
212
214
  version: '0'
213
215
  requirements: []
214
- rubygems_version: 3.1.2
216
+ rubygems_version: 3.4.10
215
217
  signing_key:
216
218
  specification_version: 4
217
219
  summary: ViewComponents for vime.js
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes