ultimate_turbo_modal 1.7.0 → 2.0.1
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/.tool-versions +2 -2
 - data/CHANGELOG.md +11 -0
 - data/Gemfile.lock +159 -156
 - data/LICENSE.txt +1 -1
 - data/README.md +24 -98
 - data/VERSION +1 -0
 - data/javascript/index.js +37 -0
 - data/javascript/modal_controller.js +108 -0
 - data/javascript/package-lock.json +1114 -0
 - data/javascript/package.json +47 -0
 - data/javascript/rollup.config.js +24 -0
 - data/javascript/scripts/release-npm.sh +35 -0
 - data/javascript/scripts/update-version.js +21 -0
 - data/javascript/styles/vanilla.css +179 -0
 - data/javascript/yarn.lock +611 -0
 - data/lib/generators/ultimate_turbo_modal/install_generator.rb +224 -0
 - data/lib/generators/ultimate_turbo_modal/templates/flavors/custom.rb +22 -0
 - data/lib/{ultimate_turbo_modal → generators/ultimate_turbo_modal/templates}/flavors/tailwind.rb +5 -4
 - data/lib/generators/ultimate_turbo_modal/templates/flavors/tailwind3.rb +21 -0
 - data/lib/{ultimate_turbo_modal → generators/ultimate_turbo_modal/templates}/flavors/vanilla.rb +2 -1
 - data/lib/generators/ultimate_turbo_modal/templates/ultimate_turbo_modal.rb +12 -0
 - data/lib/phlex/deferred_render_with_main_content.rb +1 -1
 - data/lib/ultimate_turbo_modal/base.rb +8 -0
 - data/lib/ultimate_turbo_modal/railtie.rb +1 -1
 - data/lib/ultimate_turbo_modal/version.rb +1 -1
 - data/lib/ultimate_turbo_modal.rb +3 -3
 - data/script/build_and_release.sh +39 -0
 - data/yarn.lock +4 -0
 - metadata +25 -18
 
| 
         @@ -0,0 +1,224 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require "rails/generators"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "pathname" # Needed for Pathname helper
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            module UltimateTurboModal
         
     | 
| 
      
 7 
     | 
    
         
            +
              module Generators
         
     | 
| 
      
 8 
     | 
    
         
            +
                class InstallGenerator < Rails::Generators::Base
         
     | 
| 
      
 9 
     | 
    
         
            +
                  source_root File.expand_path("templates", __dir__)
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                  desc "Installs UltimateTurboModal: copies initializer/flavor, sets up JS, registers Stimulus controller, adds Turbo Frame."
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  # Step 1: Determine CSS framework flavor
         
     | 
| 
      
 14 
     | 
    
         
            +
                  def determine_framework_flavor
         
     | 
| 
      
 15 
     | 
    
         
            +
                    @framework = prompt_for_flavor
         
     | 
| 
      
 16 
     | 
    
         
            +
                  end
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                  # Step 2: Setup Javascript Dependencies (Yarn/npm/Bun or Importmap)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  def setup_javascript_dependencies
         
     | 
| 
      
 20 
     | 
    
         
            +
                    package_name = "ultimate_turbo_modal" # Or the actual npm package name if different
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                    say "\nAttempting to set up JavaScript dependencies...", :yellow
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                    if uses_importmaps?
         
     | 
| 
      
 25 
     | 
    
         
            +
                      say "Detected Importmaps. Pinning #{package_name}...", :green
         
     | 
| 
      
 26 
     | 
    
         
            +
                      run "bin/importmap pin #{package_name}"
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                      say "\n✅ Pinned '#{package_name}' via importmap.", :green
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                    elsif uses_javascript_bundler?
         
     | 
| 
      
 31 
     | 
    
         
            +
                      say "Detected jsbundling-rails (Yarn/npm/Bun). Adding #{package_name} package...", :green
         
     | 
| 
      
 32 
     | 
    
         
            +
                      if uses_yarn?
         
     | 
| 
      
 33 
     | 
    
         
            +
                         run "yarn add #{package_name}"
         
     | 
| 
      
 34 
     | 
    
         
            +
                         say "\n✅ Added '#{package_name}' using Yarn.", :green
         
     | 
| 
      
 35 
     | 
    
         
            +
                      elsif uses_npm?
         
     | 
| 
      
 36 
     | 
    
         
            +
                         run "npm install --save #{package_name}"
         
     | 
| 
      
 37 
     | 
    
         
            +
                         say "\n✅ Added '#{package_name}' using npm.", :green
         
     | 
| 
      
 38 
     | 
    
         
            +
                      elsif uses_bun?
         
     | 
| 
      
 39 
     | 
    
         
            +
                         run "bun add #{package_name}"
         
     | 
| 
      
 40 
     | 
    
         
            +
                         say "\n✅ Added '#{package_name}' using Bun.", :green
         
     | 
| 
      
 41 
     | 
    
         
            +
                      else
         
     | 
| 
      
 42 
     | 
    
         
            +
                         # Default or fallback: Try yarn, but provide instructions for others
         
     | 
| 
      
 43 
     | 
    
         
            +
                         say "Attempting to add with Yarn. If you use npm or Bun, please add manually.", :yellow
         
     | 
| 
      
 44 
     | 
    
         
            +
                         run "yarn add #{package_name}"
         
     | 
| 
      
 45 
     | 
    
         
            +
                         say "\n✅ Attempted to add '#{package_name}' using Yarn.", :green
         
     | 
| 
      
 46 
     | 
    
         
            +
                         say "   If this failed or you use npm/bun, please run:", :yellow
         
     | 
| 
      
 47 
     | 
    
         
            +
                         say "   npm install --save #{package_name}", :cyan
         
     | 
| 
      
 48 
     | 
    
         
            +
                         say "   # or", :cyan
         
     | 
| 
      
 49 
     | 
    
         
            +
                         say "   bun add #{package_name}\n", :cyan
         
     | 
| 
      
 50 
     | 
    
         
            +
                      end
         
     | 
| 
      
 51 
     | 
    
         
            +
                    else
         
     | 
| 
      
 52 
     | 
    
         
            +
                      # Fallback instructions if neither is clearly detected
         
     | 
| 
      
 53 
     | 
    
         
            +
                      say "\nCould not automatically detect Importmaps or jsbundling-rails.", :yellow
         
     | 
| 
      
 54 
     | 
    
         
            +
                      say "Please manually add the '#{package_name}' JavaScript package.", :yellow
         
     | 
| 
      
 55 
     | 
    
         
            +
                      say "If using Importmaps: bin/importmap pin #{package_name}", :cyan
         
     | 
| 
      
 56 
     | 
    
         
            +
                      say "If using Yarn: yarn add #{package_name}", :cyan
         
     | 
| 
      
 57 
     | 
    
         
            +
                      say "If using npm: npm install --save #{package_name}", :cyan
         
     | 
| 
      
 58 
     | 
    
         
            +
                      say "If using Bun: bun add #{package_name}", :cyan
         
     | 
| 
      
 59 
     | 
    
         
            +
                      say "Then, import it in your app/javascript/application.js:", :yellow
         
     | 
| 
      
 60 
     | 
    
         
            +
                      say "import '#{package_name}'\n", :cyan
         
     | 
| 
      
 61 
     | 
    
         
            +
                    end
         
     | 
| 
      
 62 
     | 
    
         
            +
                  end
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                  # Step 3: Register Stimulus Controller
         
     | 
| 
      
 65 
     | 
    
         
            +
                  def setup_stimulus_controller
         
     | 
| 
      
 66 
     | 
    
         
            +
                    stimulus_controller_path = rails_root_join("app", "javascript", "controllers", "index.js")
         
     | 
| 
      
 67 
     | 
    
         
            +
                    controller_package = "ultimate_turbo_modal" # Package name where the controller is defined
         
     | 
| 
      
 68 
     | 
    
         
            +
                    controller_name = "UltimateTurboModalController" # The exported controller class name
         
     | 
| 
      
 69 
     | 
    
         
            +
                    stimulus_identifier = "modal" # The identifier for application.register
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
                    import_line = "import { #{controller_name} } from \"#{controller_package}\"\n"
         
     | 
| 
      
 72 
     | 
    
         
            +
                    register_line = "application.register(\"#{stimulus_identifier}\", #{controller_name})\n"
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
                    say "\nAttempting to register Stimulus controller in #{stimulus_controller_path}...", :yellow
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                    unless File.exist?(stimulus_controller_path)
         
     | 
| 
      
 77 
     | 
    
         
            +
                      say "❌ Stimulus controllers index file not found at #{stimulus_controller_path}.", :red
         
     | 
| 
      
 78 
     | 
    
         
            +
                      say "   Please manually add the following lines to your Stimulus setup:", :yellow
         
     | 
| 
      
 79 
     | 
    
         
            +
                      say "   #{import_line.strip}", :cyan
         
     | 
| 
      
 80 
     | 
    
         
            +
                      say "   #{register_line.strip}\n", :cyan
         
     | 
| 
      
 81 
     | 
    
         
            +
                      return # Exit this method if the file doesn't exist
         
     | 
| 
      
 82 
     | 
    
         
            +
                    end
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                    # Read the file content to check if lines already exist
         
     | 
| 
      
 85 
     | 
    
         
            +
                    file_content = File.read(stimulus_controller_path)
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
                    # Insert the import statement after the last existing import or a common marker
         
     | 
| 
      
 88 
     | 
    
         
            +
                    # Using a regex to find the Stimulus import is often reliable
         
     | 
| 
      
 89 
     | 
    
         
            +
                    import_anchor = /import .* from "@hotwired\/stimulus"\n/
         
     | 
| 
      
 90 
     | 
    
         
            +
                    if file_content.match?(import_anchor) && !file_content.include?(import_line)
         
     | 
| 
      
 91 
     | 
    
         
            +
                      insert_into_file stimulus_controller_path, import_line, after: import_anchor
         
     | 
| 
      
 92 
     | 
    
         
            +
                      say "✅ Added import statement.", :green
         
     | 
| 
      
 93 
     | 
    
         
            +
                    elsif !file_content.include?(import_line)
         
     | 
| 
      
 94 
     | 
    
         
            +
                      # Fallback: insert at the beginning if Stimulus import wasn't found (less ideal)
         
     | 
| 
      
 95 
     | 
    
         
            +
                      insert_into_file stimulus_controller_path, import_line, before: /import/
         
     | 
| 
      
 96 
     | 
    
         
            +
                      say "✅ Added import statement (fallback position).", :green
         
     | 
| 
      
 97 
     | 
    
         
            +
                    else
         
     | 
| 
      
 98 
     | 
    
         
            +
                       say "⏩ Import statement already exists.", :blue
         
     | 
| 
      
 99 
     | 
    
         
            +
                    end
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
                    # Insert the register statement after Application.start()
         
     | 
| 
      
 103 
     | 
    
         
            +
                    register_anchor = /Application\.start$$$$\n/
         
     | 
| 
      
 104 
     | 
    
         
            +
                    if file_content.match?(register_anchor) && !file_content.include?(register_line)
         
     | 
| 
      
 105 
     | 
    
         
            +
                       insert_into_file stimulus_controller_path, register_line, after: register_anchor
         
     | 
| 
      
 106 
     | 
    
         
            +
                       say "✅ Added controller registration.", :green
         
     | 
| 
      
 107 
     | 
    
         
            +
                    elsif !file_content.include?(register_line)
         
     | 
| 
      
 108 
     | 
    
         
            +
                      say "❌ Could not find `Application.start()` line to insert registration after.", :red
         
     | 
| 
      
 109 
     | 
    
         
            +
                      say "   Please manually add this line after your Stimulus application starts:", :yellow
         
     | 
| 
      
 110 
     | 
    
         
            +
                      say "   #{register_line.strip}\n", :cyan
         
     | 
| 
      
 111 
     | 
    
         
            +
                    else
         
     | 
| 
      
 112 
     | 
    
         
            +
                       say "⏩ Controller registration already exists.", :blue
         
     | 
| 
      
 113 
     | 
    
         
            +
                    end
         
     | 
| 
      
 114 
     | 
    
         
            +
                  end
         
     | 
| 
      
 115 
     | 
    
         
            +
             
     | 
| 
      
 116 
     | 
    
         
            +
                  # Step 4: Add Turbo Frame to Layout
         
     | 
| 
      
 117 
     | 
    
         
            +
                  def add_modal_turbo_frame
         
     | 
| 
      
 118 
     | 
    
         
            +
                    layout_path = rails_root_join("app", "views", "layouts", "application.html.erb")
         
     | 
| 
      
 119 
     | 
    
         
            +
                    frame_tag = "<%= turbo_frame_tag \"modal\" %>\n"
         
     | 
| 
      
 120 
     | 
    
         
            +
                    body_tag_regex = /<body.*>\s*\n?/
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
      
 122 
     | 
    
         
            +
                    say "\nAttempting to add modal Turbo Frame to #{layout_path}...", :yellow
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
      
 124 
     | 
    
         
            +
                    unless File.exist?(layout_path)
         
     | 
| 
      
 125 
     | 
    
         
            +
                      say "❌ Layout file not found at #{layout_path}.", :red
         
     | 
| 
      
 126 
     | 
    
         
            +
                      say "   Please manually add the following line inside the <body> tag of your main layout:", :yellow
         
     | 
| 
      
 127 
     | 
    
         
            +
                      say "   #{frame_tag.strip}\n", :cyan
         
     | 
| 
      
 128 
     | 
    
         
            +
                      return
         
     | 
| 
      
 129 
     | 
    
         
            +
                    end
         
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
      
 131 
     | 
    
         
            +
                    file_content = File.read(layout_path)
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
                    if file_content.include?(frame_tag.strip)
         
     | 
| 
      
 134 
     | 
    
         
            +
                      say "⏩ Turbo Frame tag already exists.", :blue
         
     | 
| 
      
 135 
     | 
    
         
            +
                    elsif file_content.match?(body_tag_regex)
         
     | 
| 
      
 136 
     | 
    
         
            +
                      # Insert after the opening body tag
         
     | 
| 
      
 137 
     | 
    
         
            +
                      insert_into_file layout_path, "  #{frame_tag}", after: body_tag_regex # Add indentation
         
     | 
| 
      
 138 
     | 
    
         
            +
                      say "✅ Added Turbo Frame tag inside the <body>.", :green
         
     | 
| 
      
 139 
     | 
    
         
            +
                    else
         
     | 
| 
      
 140 
     | 
    
         
            +
                      say "❌ Could not find the opening <body> tag in #{layout_path}.", :red
         
     | 
| 
      
 141 
     | 
    
         
            +
                      say "   Please manually add the following line inside the <body> tag:", :yellow
         
     | 
| 
      
 142 
     | 
    
         
            +
                      say "   #{frame_tag.strip}\n", :cyan
         
     | 
| 
      
 143 
     | 
    
         
            +
                    end
         
     | 
| 
      
 144 
     | 
    
         
            +
                  end
         
     | 
| 
      
 145 
     | 
    
         
            +
             
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
                  def copy_initializer_and_flavor
         
     | 
| 
      
 148 
     | 
    
         
            +
                    say "\nCreating initializer for `#{@framework}` flavor...", :green
         
     | 
| 
      
 149 
     | 
    
         
            +
                    copy_file "ultimate_turbo_modal.rb", "config/initializers/ultimate_turbo_modal.rb"
         
     | 
| 
      
 150 
     | 
    
         
            +
                    gsub_file "config/initializers/ultimate_turbo_modal.rb", "FLAVOR", ":#{@framework}"
         
     | 
| 
      
 151 
     | 
    
         
            +
                    say "✅ Initializer created at config/initializers/ultimate_turbo_modal.rb"
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
                    say "Copying flavor file...", :green
         
     | 
| 
      
 154 
     | 
    
         
            +
                    copy_file "flavors/#{@framework}.rb", "config/initializers/ultimate_turbo_modal_#{@framework}.rb"
         
     | 
| 
      
 155 
     | 
    
         
            +
                    say "✅ Flavor file copied to config/initializers/ultimate_turbo_modal_#{@framework}.rb\n"
         
     | 
| 
      
 156 
     | 
    
         
            +
                  end
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
                  def show_readme
         
     | 
| 
      
 159 
     | 
    
         
            +
                    say "\nUltimateTurboModal installation complete!\n", :magenta
         
     | 
| 
      
 160 
     | 
    
         
            +
                    say "Please review the initializer files, ensure JS is set up, and check your layout file.", :magenta
         
     | 
| 
      
 161 
     | 
    
         
            +
                    say "Don't forget to restart your Rails server!", :yellow
         
     | 
| 
      
 162 
     | 
    
         
            +
                  end
         
     | 
| 
      
 163 
     | 
    
         
            +
             
     | 
| 
      
 164 
     | 
    
         
            +
                  private
         
     | 
| 
      
 165 
     | 
    
         
            +
             
     | 
| 
      
 166 
     | 
    
         
            +
                  def prompt_for_flavor
         
     | 
| 
      
 167 
     | 
    
         
            +
                    say "Which CSS framework does your project use?\n", :blue
         
     | 
| 
      
 168 
     | 
    
         
            +
                    options = []
         
     | 
| 
      
 169 
     | 
    
         
            +
                    flavors_dir = File.expand_path("templates/flavors", __dir__)
         
     | 
| 
      
 170 
     | 
    
         
            +
             
     | 
| 
      
 171 
     | 
    
         
            +
                    options = Dir.glob(File.join(flavors_dir, "*.rb")).map { |file| File.basename(file, ".rb") }.sort
         
     | 
| 
      
 172 
     | 
    
         
            +
                    if options.include?("custom")
         
     | 
| 
      
 173 
     | 
    
         
            +
                      options.delete("custom")
         
     | 
| 
      
 174 
     | 
    
         
            +
                      options << "custom"
         
     | 
| 
      
 175 
     | 
    
         
            +
                    end
         
     | 
| 
      
 176 
     | 
    
         
            +
             
     | 
| 
      
 177 
     | 
    
         
            +
                    if options.empty?
         
     | 
| 
      
 178 
     | 
    
         
            +
                       raise Thor::Error, "No flavor templates found in #{flavors_dir}!"
         
     | 
| 
      
 179 
     | 
    
         
            +
                    end
         
     | 
| 
      
 180 
     | 
    
         
            +
             
     | 
| 
      
 181 
     | 
    
         
            +
                    say "Options:"
         
     | 
| 
      
 182 
     | 
    
         
            +
                    options.each_with_index do |option, index|
         
     | 
| 
      
 183 
     | 
    
         
            +
                      say "#{index + 1}. #{option}"
         
     | 
| 
      
 184 
     | 
    
         
            +
                    end
         
     | 
| 
      
 185 
     | 
    
         
            +
             
     | 
| 
      
 186 
     | 
    
         
            +
                    loop do
         
     | 
| 
      
 187 
     | 
    
         
            +
                      print "\nEnter the number: "
         
     | 
| 
      
 188 
     | 
    
         
            +
                      framework_choice = ask("").chomp.strip
         
     | 
| 
      
 189 
     | 
    
         
            +
                      framework_id = framework_choice.to_i - 1
         
     | 
| 
      
 190 
     | 
    
         
            +
             
     | 
| 
      
 191 
     | 
    
         
            +
                      if framework_id >= 0 && framework_id < options.size
         
     | 
| 
      
 192 
     | 
    
         
            +
                        return options[framework_id]
         
     | 
| 
      
 193 
     | 
    
         
            +
                      else
         
     | 
| 
      
 194 
     | 
    
         
            +
                        say "\nInvalid option '#{framework_choice}'. Please enter a number between 1 and #{options.size}.", :red
         
     | 
| 
      
 195 
     | 
    
         
            +
                      end
         
     | 
| 
      
 196 
     | 
    
         
            +
                    end
         
     | 
| 
      
 197 
     | 
    
         
            +
                  end
         
     | 
| 
      
 198 
     | 
    
         
            +
             
     | 
| 
      
 199 
     | 
    
         
            +
                  def uses_importmaps?
         
     | 
| 
      
 200 
     | 
    
         
            +
                    File.exist?(rails_root_join("config", "importmap.rb"))
         
     | 
| 
      
 201 
     | 
    
         
            +
                  end
         
     | 
| 
      
 202 
     | 
    
         
            +
             
     | 
| 
      
 203 
     | 
    
         
            +
                  def uses_javascript_bundler?
         
     | 
| 
      
 204 
     | 
    
         
            +
                    File.exist?(rails_root_join("package.json"))
         
     | 
| 
      
 205 
     | 
    
         
            +
                  end
         
     | 
| 
      
 206 
     | 
    
         
            +
             
     | 
| 
      
 207 
     | 
    
         
            +
                  def uses_yarn?
         
     | 
| 
      
 208 
     | 
    
         
            +
                    File.exist?(rails_root_join("yarn.lock"))
         
     | 
| 
      
 209 
     | 
    
         
            +
                  end
         
     | 
| 
      
 210 
     | 
    
         
            +
             
     | 
| 
      
 211 
     | 
    
         
            +
                  def uses_npm?
         
     | 
| 
      
 212 
     | 
    
         
            +
                    File.exist?(rails_root_join("package-lock.json")) && !uses_yarn? && !uses_bun?
         
     | 
| 
      
 213 
     | 
    
         
            +
                  end
         
     | 
| 
      
 214 
     | 
    
         
            +
             
     | 
| 
      
 215 
     | 
    
         
            +
                   def uses_bun?
         
     | 
| 
      
 216 
     | 
    
         
            +
                    File.exist?(rails_root_join("bun.lockb"))
         
     | 
| 
      
 217 
     | 
    
         
            +
                  end
         
     | 
| 
      
 218 
     | 
    
         
            +
             
     | 
| 
      
 219 
     | 
    
         
            +
                  def rails_root_join(*args)
         
     | 
| 
      
 220 
     | 
    
         
            +
                     Pathname.new(destination_root).join(*args)
         
     | 
| 
      
 221 
     | 
    
         
            +
                  end
         
     | 
| 
      
 222 
     | 
    
         
            +
                end
         
     | 
| 
      
 223 
     | 
    
         
            +
              end
         
     | 
| 
      
 224 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,22 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            # Custom
         
     | 
| 
      
 4 
     | 
    
         
            +
            # TODO: define the classes for each HTML element.
         
     | 
| 
      
 5 
     | 
    
         
            +
            module UltimateTurboModal::Flavors
         
     | 
| 
      
 6 
     | 
    
         
            +
              class Custom < UltimateTurboModal::Base
         
     | 
| 
      
 7 
     | 
    
         
            +
                DIV_DIALOG_CLASSES = ""
         
     | 
| 
      
 8 
     | 
    
         
            +
                DIV_OVERLAY_CLASSES = ""
         
     | 
| 
      
 9 
     | 
    
         
            +
                DIV_OUTER_CLASSES = ""
         
     | 
| 
      
 10 
     | 
    
         
            +
                DIV_INNER_CLASSES = ""
         
     | 
| 
      
 11 
     | 
    
         
            +
                DIV_CONTENT_CLASSES = ""
         
     | 
| 
      
 12 
     | 
    
         
            +
                DIV_MAIN_CLASSES = ""
         
     | 
| 
      
 13 
     | 
    
         
            +
                DIV_HEADER_CLASSES = ""
         
     | 
| 
      
 14 
     | 
    
         
            +
                DIV_TITLE_CLASSES = ""
         
     | 
| 
      
 15 
     | 
    
         
            +
                DIV_TITLE_H_CLASSES = ""
         
     | 
| 
      
 16 
     | 
    
         
            +
                DIV_FOOTER_CLASSES = ""
         
     | 
| 
      
 17 
     | 
    
         
            +
                BUTTON_CLOSE_CLASSES = ""
         
     | 
| 
      
 18 
     | 
    
         
            +
                BUTTON_CLOSE_SR_ONLY_CLASSES = ""
         
     | 
| 
      
 19 
     | 
    
         
            +
                CLOSE_BUTTON_TAG_CLASSES = ""
         
     | 
| 
      
 20 
     | 
    
         
            +
                ICON_CLOSE_CLASSES = ""
         
     | 
| 
      
 21 
     | 
    
         
            +
              end
         
     | 
| 
      
 22 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/{ultimate_turbo_modal → generators/ultimate_turbo_modal/templates}/flavors/tailwind.rb
    RENAMED
    
    | 
         @@ -1,13 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            # Tailwind CSS v4
         
     | 
| 
       3 
4 
     | 
    
         
             
            module UltimateTurboModal::Flavors
         
     | 
| 
       4 
5 
     | 
    
         
             
              class Tailwind < UltimateTurboModal::Base
         
     | 
| 
       5 
6 
     | 
    
         
             
                DIV_DIALOG_CLASSES = "relative group z-50"
         
     | 
| 
       6 
     | 
    
         
            -
                DIV_OVERLAY_CLASSES = "fixed inset-0 bg-gray-900  
     | 
| 
      
 7 
     | 
    
         
            +
                DIV_OVERLAY_CLASSES = "fixed inset-0 bg-gray-900/70 transition-opacity dark:bg-gray-900/80"
         
     | 
| 
       7 
8 
     | 
    
         
             
                DIV_OUTER_CLASSES = "fixed inset-0 overflow-y-auto sm:max-w-[80%] md:max-w-3xl sm:mx-auto m-4"
         
     | 
| 
       8 
     | 
    
         
            -
                DIV_INNER_CLASSES = "flex min-h-full items- 
     | 
| 
       9 
     | 
    
         
            -
                DIV_CONTENT_CLASSES = "relative transform overflow-hidden rounded-lg bg-white text-left shadow transition-all sm:my-8 sm:max-w-3xl dark:bg-gray-800 dark:text-white"
         
     | 
| 
       10 
     | 
    
         
            -
                DIV_MAIN_CLASSES = "group-data-[padding=true]:p-4 group-data-[padding=true]:pt-2"
         
     | 
| 
      
 9 
     | 
    
         
            +
                DIV_INNER_CLASSES = "flex min-h-full items-start justify-center pt-[10vh] sm:p-4"
         
     | 
| 
      
 10 
     | 
    
         
            +
                DIV_CONTENT_CLASSES = "relative transform max-h-screen overflow-hidden rounded-lg bg-white text-left shadow-lg transition-all sm:my-8 sm:max-w-3xl dark:bg-gray-800 dark:text-white"
         
     | 
| 
      
 11 
     | 
    
         
            +
                DIV_MAIN_CLASSES = "group-data-[padding=true]:p-4 group-data-[padding=true]:pt-2 overflow-y-auto max-h-[75vh]"
         
     | 
| 
       11 
12 
     | 
    
         
             
                DIV_HEADER_CLASSES = "flex justify-between items-center w-full py-4 rounded-t dark:border-gray-600 group-data-[header-divider=true]:border-b group-data-[header=false]:absolute"
         
     | 
| 
       12 
13 
     | 
    
         
             
                DIV_TITLE_CLASSES = "pl-4"
         
     | 
| 
       13 
14 
     | 
    
         
             
                DIV_TITLE_H_CLASSES = "group-data-[title=false]:hidden text-lg font-semibold text-gray-900 dark:text-white"
         
     | 
| 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            # Tailwind CSS v3
         
     | 
| 
      
 4 
     | 
    
         
            +
            module UltimateTurboModal::Flavors
         
     | 
| 
      
 5 
     | 
    
         
            +
              class Tailwind3 < UltimateTurboModal::Base
         
     | 
| 
      
 6 
     | 
    
         
            +
                DIV_DIALOG_CLASSES = "relative z-50"
         
     | 
| 
      
 7 
     | 
    
         
            +
                DIV_OVERLAY_CLASSES = "fixed inset-0 bg-gray-900 bg-opacity-70 transition-opacity dark:bg-gray-900 dark:bg-opacity-80"
         
     | 
| 
      
 8 
     | 
    
         
            +
                DIV_OUTER_CLASSES = "fixed inset-0 overflow-y-auto sm:max-w-[80%] md:max-w-3xl sm:mx-auto m-4"
         
     | 
| 
      
 9 
     | 
    
         
            +
                DIV_INNER_CLASSES = "flex min-h-full items-start justify-center pt-[10vh] sm:p-4"
         
     | 
| 
      
 10 
     | 
    
         
            +
                DIV_CONTENT_CLASSES = "relative transform max-h-screen overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:max-w-3xl dark:bg-gray-800 dark:text-white"
         
     | 
| 
      
 11 
     | 
    
         
            +
                DIV_MAIN_CLASSES = "p-4 pt-2 overflow-y-auto max-h-[75vh]"
         
     | 
| 
      
 12 
     | 
    
         
            +
                DIV_HEADER_CLASSES = "flex justify-between items-center w-full py-4 rounded-t dark:border-gray-600 border-b absolute"
         
     | 
| 
      
 13 
     | 
    
         
            +
                DIV_TITLE_CLASSES = "pl-4"
         
     | 
| 
      
 14 
     | 
    
         
            +
                DIV_TITLE_H_CLASSES = "text-lg font-semibold text-gray-900 dark:text-white"
         
     | 
| 
      
 15 
     | 
    
         
            +
                DIV_FOOTER_CLASSES = "flex p-4 rounded-b dark:border-gray-600 border-t"
         
     | 
| 
      
 16 
     | 
    
         
            +
                BUTTON_CLOSE_CLASSES = "mr-4 hidden"
         
     | 
| 
      
 17 
     | 
    
         
            +
                BUTTON_CLOSE_SR_ONLY_CLASSES = "sr-only"
         
     | 
| 
      
 18 
     | 
    
         
            +
                CLOSE_BUTTON_TAG_CLASSES = "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"
         
     | 
| 
      
 19 
     | 
    
         
            +
                ICON_CLOSE_CLASSES = "w-5 h-5"
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/{ultimate_turbo_modal → generators/ultimate_turbo_modal/templates}/flavors/vanilla.rb
    RENAMED
    
    | 
         @@ -1,5 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            # Vanilla CSS
         
     | 
| 
       3 
4 
     | 
    
         
             
            module UltimateTurboModal::Flavors
         
     | 
| 
       4 
5 
     | 
    
         
             
              class Vanilla < UltimateTurboModal::Base
         
     | 
| 
       5 
6 
     | 
    
         
             
                DIV_DIALOG_CLASSES = "modal-container"
         
     | 
| 
         @@ -7,7 +8,7 @@ module UltimateTurboModal::Flavors 
     | 
|
| 
       7 
8 
     | 
    
         
             
                DIV_OUTER_CLASSES = "modal-outer"
         
     | 
| 
       8 
9 
     | 
    
         
             
                DIV_INNER_CLASSES = "modal-inner"
         
     | 
| 
       9 
10 
     | 
    
         
             
                DIV_CONTENT_CLASSES = "modal-content"
         
     | 
| 
       10 
     | 
    
         
            -
                DIV_MAIN_CLASSES = 
     | 
| 
      
 11 
     | 
    
         
            +
                DIV_MAIN_CLASSES = "modal-main"
         
     | 
| 
       11 
12 
     | 
    
         
             
                DIV_HEADER_CLASSES = "modal-header"
         
     | 
| 
       12 
13 
     | 
    
         
             
                DIV_TITLE_CLASSES = "modal-title"
         
     | 
| 
       13 
14 
     | 
    
         
             
                DIV_TITLE_H_CLASSES = "modal-title-h"
         
     | 
| 
         @@ -0,0 +1,12 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            UltimateTurboModal.configure do |config|
         
     | 
| 
      
 4 
     | 
    
         
            +
              config.flavor = FLAVOR
         
     | 
| 
      
 5 
     | 
    
         
            +
              # config.close_button = true
         
     | 
| 
      
 6 
     | 
    
         
            +
              # config.advance = true
         
     | 
| 
      
 7 
     | 
    
         
            +
              # config.padding = true
         
     | 
| 
      
 8 
     | 
    
         
            +
              # config.header = true
         
     | 
| 
      
 9 
     | 
    
         
            +
              # config.header_divider = true
         
     | 
| 
      
 10 
     | 
    
         
            +
              # config.footer_divider = true
         
     | 
| 
      
 11 
     | 
    
         
            +
              # config.allowed_click_outside_selector = []
         
     | 
| 
      
 12 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -111,6 +111,7 @@ class UltimateTurboModal::Base < Phlex::HTML 
     | 
|
| 
       111 
111 
     | 
    
         
             
              ## HTML components
         
     | 
| 
       112 
112 
     | 
    
         | 
| 
       113 
113 
     | 
    
         
             
              def modal(&block)
         
     | 
| 
      
 114 
     | 
    
         
            +
                styles
         
     | 
| 
       114 
115 
     | 
    
         
             
                outer_divs do
         
     | 
| 
       115 
116 
     | 
    
         
             
                  div_content do
         
     | 
| 
       116 
117 
     | 
    
         
             
                    div_header
         
     | 
| 
         @@ -120,6 +121,13 @@ class UltimateTurboModal::Base < Phlex::HTML 
     | 
|
| 
       120 
121 
     | 
    
         
             
                end
         
     | 
| 
       121 
122 
     | 
    
         
             
              end
         
     | 
| 
       122 
123 
     | 
    
         | 
| 
      
 124 
     | 
    
         
            +
              def styles
         
     | 
| 
      
 125 
     | 
    
         
            +
                style do
         
     | 
| 
      
 126 
     | 
    
         
            +
                  str = "html:has(dialog[open]) {overflow: hidden;} html {scrollbar-gutter: stable;}".html_safe
         
     | 
| 
      
 127 
     | 
    
         
            +
                  respond_to?(:unsafe_raw) ? unsafe_raw(str) : raw(str)
         
     | 
| 
      
 128 
     | 
    
         
            +
                end
         
     | 
| 
      
 129 
     | 
    
         
            +
              end
         
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
       123 
131 
     | 
    
         
             
              def outer_divs(&block)
         
     | 
| 
       124 
132 
     | 
    
         
             
                div_dialog do
         
     | 
| 
       125 
133 
     | 
    
         
             
                  div_overlay
         
     | 
| 
         @@ -9,7 +9,7 @@ require "ultimate_turbo_modal/helpers/stream_helper" 
     | 
|
| 
       9 
9 
     | 
    
         
             
            module UltimateTurboModal
         
     | 
| 
       10 
10 
     | 
    
         
             
              class Railtie < Rails::Railtie
         
     | 
| 
       11 
11 
     | 
    
         
             
                initializer "ultimate_turbo_modal.action_controller" do
         
     | 
| 
       12 
     | 
    
         
            -
                  ActiveSupport.on_load(: 
     | 
| 
      
 12 
     | 
    
         
            +
                  ActiveSupport.on_load(:action_controller_base) do
         
     | 
| 
       13 
13 
     | 
    
         
             
                    include UltimateTurboModal::Helpers::ControllerHelper
         
     | 
| 
       14 
14 
     | 
    
         
             
                  end
         
     | 
| 
       15 
15 
     | 
    
         
             
                end
         
     | 
    
        data/lib/ultimate_turbo_modal.rb
    CHANGED
    
    | 
         @@ -5,9 +5,7 @@ require "phlex/deferred_render_with_main_content" 
     | 
|
| 
       5 
5 
     | 
    
         
             
            require "ultimate_turbo_modal/configuration"
         
     | 
| 
       6 
6 
     | 
    
         
             
            require "ultimate_turbo_modal/railtie"
         
     | 
| 
       7 
7 
     | 
    
         
             
            require "ultimate_turbo_modal/base"
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
              require file
         
     | 
| 
       10 
     | 
    
         
            -
            end
         
     | 
| 
      
 8 
     | 
    
         
            +
            require "generators/ultimate_turbo_modal/install_generator"
         
     | 
| 
       11 
9 
     | 
    
         | 
| 
       12 
10 
     | 
    
         
             
            module UltimateTurboModal
         
     | 
| 
       13 
11 
     | 
    
         
             
              extend self
         
     | 
| 
         @@ -18,6 +16,8 @@ module UltimateTurboModal 
     | 
|
| 
       18 
16 
     | 
    
         | 
| 
       19 
17 
     | 
    
         
             
              def modal_class
         
     | 
| 
       20 
18 
     | 
    
         
             
                "UltimateTurboModal::Flavors::#{flavor.to_s.classify}".constantize
         
     | 
| 
      
 19 
     | 
    
         
            +
              rescue NameError
         
     | 
| 
      
 20 
     | 
    
         
            +
                raise Error, "Flavor `#{flavor.downcase}` not found. Please check your initializer file at `config/initializers/ultimate_turbo_modal.rb` and make sure to run `rails generate ultimate_turbo_modal:install`."
         
     | 
| 
       21 
21 
     | 
    
         
             
              end
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
              class Error < StandardError; end
         
     | 
| 
         @@ -0,0 +1,39 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            #!/bin/bash
         
     | 
| 
      
 2 
     | 
    
         
            +
            set -e
         
     | 
| 
      
 3 
     | 
    
         
            +
            cd $(dirname $0)/..
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            if [ "$1" == "--help" ]; then
         
     | 
| 
      
 6 
     | 
    
         
            +
              echo "Usage: $0 [--skip-gem] [--skip-js]"
         
     | 
| 
      
 7 
     | 
    
         
            +
              echo ""
         
     | 
| 
      
 8 
     | 
    
         
            +
              echo "Options:"
         
     | 
| 
      
 9 
     | 
    
         
            +
              echo "  --skip-gem   Skip building and releasing the gem."
         
     | 
| 
      
 10 
     | 
    
         
            +
              echo "  --skip-js    Skip building and releasing the JavaScript."
         
     | 
| 
      
 11 
     | 
    
         
            +
              echo "  --help       Show this help message."
         
     | 
| 
      
 12 
     | 
    
         
            +
              exit 0
         
     | 
| 
      
 13 
     | 
    
         
            +
            fi
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            # Check for uncommitted changes
         
     | 
| 
      
 16 
     | 
    
         
            +
            if ! git diff --quiet; then
         
     | 
| 
      
 17 
     | 
    
         
            +
              echo "There are uncommitted changes. Aborting."
         
     | 
| 
      
 18 
     | 
    
         
            +
              exit 1
         
     | 
| 
      
 19 
     | 
    
         
            +
            fi
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            if [ "$1" != "--skip-gem" ]; then
         
     | 
| 
      
 23 
     | 
    
         
            +
              echo "Building and releasing gem..."
         
     | 
| 
      
 24 
     | 
    
         
            +
              bundle exec rake build
         
     | 
| 
      
 25 
     | 
    
         
            +
              bundle exec rake release
         
     | 
| 
      
 26 
     | 
    
         
            +
            else
         
     | 
| 
      
 27 
     | 
    
         
            +
              echo "Skipping gem build and release..."
         
     | 
| 
      
 28 
     | 
    
         
            +
            fi
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            if [ "$1" != "--skip-js" ]; then
         
     | 
| 
      
 31 
     | 
    
         
            +
              echo "Building JavaScript..."
         
     | 
| 
      
 32 
     | 
    
         
            +
              cd javascript
         
     | 
| 
      
 33 
     | 
    
         
            +
              ./scripts/release-npm.sh
         
     | 
| 
      
 34 
     | 
    
         
            +
            else
         
     | 
| 
      
 35 
     | 
    
         
            +
              echo "Skipping JavaScript build..."
         
     | 
| 
      
 36 
     | 
    
         
            +
            fi
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            echo "Done!"
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
    
        data/yarn.lock
    ADDED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ultimate_turbo_modal
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.0.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Carl Mercier
         
     | 
| 
       8 
     | 
    
         
            -
            autorequire:
         
     | 
| 
       9 
8 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
9 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 10 
     | 
    
         
            +
            date: 2025-04-12 00:00:00.000000000 Z
         
     | 
| 
       12 
11 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
12 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
13 
     | 
    
         
             
              name: phlex-rails
         
     | 
| 
         @@ -16,34 +15,28 @@ dependencies: 
     | 
|
| 
       16 
15 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
16 
     | 
    
         
             
                - - ">="
         
     | 
| 
       18 
17 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: ' 
     | 
| 
       20 
     | 
    
         
            -
                - - "<"
         
     | 
| 
       21 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       22 
     | 
    
         
            -
                    version: '2.0'
         
     | 
| 
      
 18 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       23 
19 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       24 
20 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       25 
21 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       26 
22 
     | 
    
         
             
                requirements:
         
     | 
| 
       27 
23 
     | 
    
         
             
                - - ">="
         
     | 
| 
       28 
24 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       29 
     | 
    
         
            -
                    version: ' 
     | 
| 
       30 
     | 
    
         
            -
                - - "<"
         
     | 
| 
       31 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       32 
     | 
    
         
            -
                    version: '2.0'
         
     | 
| 
      
 25 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       33 
26 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       34 
27 
     | 
    
         
             
              name: rails
         
     | 
| 
       35 
28 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       36 
29 
     | 
    
         
             
                requirements:
         
     | 
| 
       37 
30 
     | 
    
         
             
                - - ">="
         
     | 
| 
       38 
31 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       39 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 32 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       40 
33 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       41 
34 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       42 
35 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       43 
36 
     | 
    
         
             
                requirements:
         
     | 
| 
       44 
37 
     | 
    
         
             
                - - ">="
         
     | 
| 
       45 
38 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       46 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 39 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       47 
40 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       48 
41 
     | 
    
         
             
              name: stimulus-rails
         
     | 
| 
       49 
42 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -90,18 +83,34 @@ files: 
     | 
|
| 
       90 
83 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       91 
84 
     | 
    
         
             
            - README.md
         
     | 
| 
       92 
85 
     | 
    
         
             
            - Rakefile
         
     | 
| 
      
 86 
     | 
    
         
            +
            - VERSION
         
     | 
| 
      
 87 
     | 
    
         
            +
            - javascript/index.js
         
     | 
| 
      
 88 
     | 
    
         
            +
            - javascript/modal_controller.js
         
     | 
| 
      
 89 
     | 
    
         
            +
            - javascript/package-lock.json
         
     | 
| 
      
 90 
     | 
    
         
            +
            - javascript/package.json
         
     | 
| 
      
 91 
     | 
    
         
            +
            - javascript/rollup.config.js
         
     | 
| 
      
 92 
     | 
    
         
            +
            - javascript/scripts/release-npm.sh
         
     | 
| 
      
 93 
     | 
    
         
            +
            - javascript/scripts/update-version.js
         
     | 
| 
      
 94 
     | 
    
         
            +
            - javascript/styles/vanilla.css
         
     | 
| 
      
 95 
     | 
    
         
            +
            - javascript/yarn.lock
         
     | 
| 
      
 96 
     | 
    
         
            +
            - lib/generators/ultimate_turbo_modal/install_generator.rb
         
     | 
| 
      
 97 
     | 
    
         
            +
            - lib/generators/ultimate_turbo_modal/templates/flavors/custom.rb
         
     | 
| 
      
 98 
     | 
    
         
            +
            - lib/generators/ultimate_turbo_modal/templates/flavors/tailwind.rb
         
     | 
| 
      
 99 
     | 
    
         
            +
            - lib/generators/ultimate_turbo_modal/templates/flavors/tailwind3.rb
         
     | 
| 
      
 100 
     | 
    
         
            +
            - lib/generators/ultimate_turbo_modal/templates/flavors/vanilla.rb
         
     | 
| 
      
 101 
     | 
    
         
            +
            - lib/generators/ultimate_turbo_modal/templates/ultimate_turbo_modal.rb
         
     | 
| 
       93 
102 
     | 
    
         
             
            - lib/phlex/deferred_render_with_main_content.rb
         
     | 
| 
       94 
103 
     | 
    
         
             
            - lib/ultimate_turbo_modal.rb
         
     | 
| 
       95 
104 
     | 
    
         
             
            - lib/ultimate_turbo_modal/base.rb
         
     | 
| 
       96 
105 
     | 
    
         
             
            - lib/ultimate_turbo_modal/configuration.rb
         
     | 
| 
       97 
     | 
    
         
            -
            - lib/ultimate_turbo_modal/flavors/tailwind.rb
         
     | 
| 
       98 
     | 
    
         
            -
            - lib/ultimate_turbo_modal/flavors/vanilla.rb
         
     | 
| 
       99 
106 
     | 
    
         
             
            - lib/ultimate_turbo_modal/helpers/controller_helper.rb
         
     | 
| 
       100 
107 
     | 
    
         
             
            - lib/ultimate_turbo_modal/helpers/stream_helper.rb
         
     | 
| 
       101 
108 
     | 
    
         
             
            - lib/ultimate_turbo_modal/helpers/view_helper.rb
         
     | 
| 
       102 
109 
     | 
    
         
             
            - lib/ultimate_turbo_modal/railtie.rb
         
     | 
| 
       103 
110 
     | 
    
         
             
            - lib/ultimate_turbo_modal/version.rb
         
     | 
| 
      
 111 
     | 
    
         
            +
            - script/build_and_release.sh
         
     | 
| 
       104 
112 
     | 
    
         
             
            - sig/ultimate_turbo_modal.rbs
         
     | 
| 
      
 113 
     | 
    
         
            +
            - yarn.lock
         
     | 
| 
       105 
114 
     | 
    
         
             
            homepage: https://github.com/cmer/ultimate_turbo_modal
         
     | 
| 
       106 
115 
     | 
    
         
             
            licenses:
         
     | 
| 
       107 
116 
     | 
    
         
             
            - MIT
         
     | 
| 
         @@ -109,7 +118,6 @@ metadata: 
     | 
|
| 
       109 
118 
     | 
    
         
             
              homepage_uri: https://github.com/cmer/ultimate_turbo_modal
         
     | 
| 
       110 
119 
     | 
    
         
             
              source_code_uri: https://github.com/cmer/ultimate_turbo_modal
         
     | 
| 
       111 
120 
     | 
    
         
             
              changelog_uri: https://github.com/cmer/ultimate_turbo_modal/CHANGELOG.md
         
     | 
| 
       112 
     | 
    
         
            -
            post_install_message:
         
     | 
| 
       113 
121 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       114 
122 
     | 
    
         
             
            require_paths:
         
     | 
| 
       115 
123 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -124,8 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       124 
132 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       125 
133 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       126 
134 
     | 
    
         
             
            requirements: []
         
     | 
| 
       127 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
       128 
     | 
    
         
            -
            signing_key:
         
     | 
| 
      
 135 
     | 
    
         
            +
            rubygems_version: 3.6.2
         
     | 
| 
       129 
136 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       130 
137 
     | 
    
         
             
            summary: UTMR aims to be the be-all and end-all of Turbo Modals.
         
     | 
| 
       131 
138 
     | 
    
         
             
            test_files: []
         
     |