ultimate_turbo_modal 2.1.1 → 2.2.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 +1 -1
- data/CHANGELOG.md +15 -0
- data/CLAUDE.md +190 -4
- data/Gemfile.lock +1 -1
- data/README.md +55 -2
- data/VERSION +1 -1
- data/javascript/index.js +12 -3
- data/javascript/modal_controller.js +52 -3
- data/javascript/package.json +2 -1
- data/javascript/styles/vanilla.css +86 -0
- data/lib/generators/ultimate_turbo_modal/templates/flavors/custom.rb +29 -2
- data/lib/generators/ultimate_turbo_modal/templates/flavors/tailwind.rb +30 -3
- data/lib/generators/ultimate_turbo_modal/templates/flavors/tailwind3.rb +29 -2
- data/lib/generators/ultimate_turbo_modal/templates/flavors/vanilla.rb +31 -3
- data/lib/generators/ultimate_turbo_modal/update_generator.rb +97 -0
- data/lib/ultimate_turbo_modal/base.rb +35 -14
- data/lib/ultimate_turbo_modal.rb +1 -0
- data/script/build_and_release.sh +20 -7
- metadata +7 -99
- data/demo-app/.gitattributes +0 -7
- data/demo-app/.gitignore +0 -34
- data/demo-app/.ruby-version +0 -1
- data/demo-app/.tool-versions +0 -2
- data/demo-app/Gemfile +0 -41
- data/demo-app/Gemfile.lock +0 -248
- data/demo-app/Procfile.dev +0 -3
- data/demo-app/README.md +0 -15
- data/demo-app/Rakefile +0 -6
- data/demo-app/app/assets/builds/.keep +0 -0
- data/demo-app/app/assets/images/.keep +0 -0
- data/demo-app/app/assets/stylesheets/application.css +0 -42
- data/demo-app/app/controllers/application_controller.rb +0 -10
- data/demo-app/app/controllers/concerns/.keep +0 -0
- data/demo-app/app/controllers/concerns/set_flavor.rb +0 -10
- data/demo-app/app/controllers/hide_from_backends_controller.rb +0 -34
- data/demo-app/app/controllers/modal_controller.rb +0 -11
- data/demo-app/app/controllers/posts_controller.rb +0 -69
- data/demo-app/app/controllers/welcome_controller.rb +0 -2
- data/demo-app/app/helpers/application_helper.rb +0 -9
- data/demo-app/app/javascript/application.js +0 -4
- data/demo-app/app/javascript/controllers/application.js +0 -13
- data/demo-app/app/javascript/controllers/dark_mode_controller.js +0 -28
- data/demo-app/app/javascript/controllers/flash_controller.js +0 -9
- data/demo-app/app/javascript/controllers/hello_controller.js +0 -7
- data/demo-app/app/javascript/controllers/index.js +0 -15
- data/demo-app/app/models/application_record.rb +0 -3
- data/demo-app/app/models/concerns/.keep +0 -0
- data/demo-app/app/models/post.rb +0 -4
- data/demo-app/app/views/hide_from_backends/_notice.html.erb +0 -10
- data/demo-app/app/views/hide_from_backends/create.turbo_stream.erb +0 -2
- data/demo-app/app/views/hide_from_backends/new.html.erb +0 -30
- data/demo-app/app/views/layouts/application.html.erb +0 -40
- data/demo-app/app/views/modal/index.html.erb +0 -45
- data/demo-app/app/views/modal/show.html.erb +0 -39
- data/demo-app/app/views/posts/_form.html.erb +0 -36
- data/demo-app/app/views/posts/_post.html.erb +0 -9
- data/demo-app/app/views/posts/edit.html.erb +0 -9
- data/demo-app/app/views/posts/index.html.erb +0 -14
- data/demo-app/app/views/posts/new.html.erb +0 -3
- data/demo-app/app/views/posts/show.html.erb +0 -21
- data/demo-app/app/views/shared/_flash.html.erb +0 -13
- data/demo-app/app/views/welcome/index.html.erb +0 -19
- data/demo-app/bin/bundle +0 -109
- data/demo-app/bin/dev +0 -7
- data/demo-app/bin/rails +0 -4
- data/demo-app/bin/rake +0 -4
- data/demo-app/bin/setup +0 -34
- data/demo-app/config/application.rb +0 -43
- data/demo-app/config/boot.rb +0 -3
- data/demo-app/config/credentials.yml.enc +0 -1
- data/demo-app/config/database.yml +0 -25
- data/demo-app/config/environment.rb +0 -14
- data/demo-app/config/environments/development.rb +0 -51
- data/demo-app/config/environments/production.rb +0 -67
- data/demo-app/config/environments/test.rb +0 -42
- data/demo-app/config/initializers/assets.rb +0 -7
- data/demo-app/config/initializers/content_security_policy.rb +0 -25
- data/demo-app/config/initializers/filter_parameter_logging.rb +0 -8
- data/demo-app/config/initializers/inflections.rb +0 -14
- data/demo-app/config/initializers/new_framework_defaults_8_0.rb +0 -30
- data/demo-app/config/initializers/permissions_policy.rb +0 -11
- data/demo-app/config/initializers/ultimate_turbo_modal.rb +0 -12
- data/demo-app/config/initializers/ultimate_turbo_modal_tailwind.rb +0 -21
- data/demo-app/config/initializers/ultimate_turbo_modal_vanilla.rb +0 -21
- data/demo-app/config/locales/en.yml +0 -33
- data/demo-app/config/puma.rb +0 -41
- data/demo-app/config/routes.rb +0 -9
- data/demo-app/config.ru +0 -6
- data/demo-app/db/migrate/20230331002502_create_posts.rb +0 -10
- data/demo-app/db/migrate/20231031012703_add_post.rb +0 -9
- data/demo-app/db/migrate/20231128141054_add_publish_on_to_posts.rb +0 -5
- data/demo-app/db/schema.rb +0 -22
- data/demo-app/lib/assets/.keep +0 -0
- data/demo-app/lib/tasks/.keep +0 -0
- data/demo-app/log/.keep +0 -0
- data/demo-app/package.json +0 -28
- data/demo-app/postcss.config.js +0 -7
- data/demo-app/public/400.html +0 -114
- data/demo-app/public/404.html +0 -114
- data/demo-app/public/406-unsupported-browser.html +0 -114
- data/demo-app/public/422.html +0 -114
- data/demo-app/public/500.html +0 -114
- data/demo-app/public/apple-touch-icon-precomposed.png +0 -0
- data/demo-app/public/apple-touch-icon.png +0 -0
- data/demo-app/public/favicon.ico +0 -0
- data/demo-app/public/icon.png +0 -0
- data/demo-app/public/icon.svg +0 -3
- data/demo-app/public/img/bootstrap-logo-shadow.png +0 -0
- data/demo-app/public/img/unicat.jpg +0 -0
- data/demo-app/public/img/vanilla.png +0 -0
- data/demo-app/public/robots.txt +0 -1
- data/demo-app/tmp/.keep +0 -0
- data/demo-app/tmp/pids/.keep +0 -0
- data/demo-app/vendor/.keep +0 -0
- data/demo-app/yarn.lock +0 -1022
@@ -3,9 +3,9 @@
|
|
3
3
|
# Tailwind CSS v3
|
4
4
|
module UltimateTurboModal::Flavors
|
5
5
|
class Tailwind3 < UltimateTurboModal::Base
|
6
|
-
|
6
|
+
DIV_MODAL_CONTAINER_CLASSES = "relative z-50"
|
7
7
|
DIV_OVERLAY_CLASSES = "fixed inset-0 bg-gray-900 bg-opacity-70 transition-opacity dark:bg-gray-900 dark:bg-opacity-80"
|
8
|
-
|
8
|
+
DIV_DIALOG_CLASSES = "fixed inset-0 overflow-y-auto sm:max-w-[80%] md:max-w-3xl sm:mx-auto m-4"
|
9
9
|
DIV_INNER_CLASSES = "flex min-h-full items-start justify-center pt-[10vh] sm:p-4"
|
10
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
11
|
DIV_MAIN_CLASSES = "p-4 pt-2 overflow-y-auto max-h-[75vh]"
|
@@ -17,5 +17,32 @@ module UltimateTurboModal::Flavors
|
|
17
17
|
BUTTON_CLOSE_SR_ONLY_CLASSES = "sr-only"
|
18
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
19
|
ICON_CLOSE_CLASSES = "w-5 h-5"
|
20
|
+
|
21
|
+
TRANSITIONS = {
|
22
|
+
overlay: {
|
23
|
+
enter: {
|
24
|
+
animation: "ease-out duration-300",
|
25
|
+
start: "opacity-0",
|
26
|
+
end: "opacity-100"
|
27
|
+
},
|
28
|
+
leave: {
|
29
|
+
animation: "ease-in duration-200",
|
30
|
+
start: "opacity-100",
|
31
|
+
end: "opacity-0"
|
32
|
+
}
|
33
|
+
},
|
34
|
+
dialog: {
|
35
|
+
enter: {
|
36
|
+
animation: "ease-out duration-300",
|
37
|
+
start: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
38
|
+
end: "opacity-100 translate-y-0 sm:scale-100"
|
39
|
+
},
|
40
|
+
leave: {
|
41
|
+
animation: "ease-in duration-200",
|
42
|
+
start: "opacity-100 translate-y-0 sm:scale-100",
|
43
|
+
end: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
20
47
|
end
|
21
48
|
end
|
@@ -3,9 +3,10 @@
|
|
3
3
|
# Vanilla CSS
|
4
4
|
module UltimateTurboModal::Flavors
|
5
5
|
class Vanilla < UltimateTurboModal::Base
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
DIV_MODAL_CONTAINER_CLASSES = "modal-container"
|
7
|
+
# Include enter-start classes so initial paint is hidden and transitions can animate smoothly
|
8
|
+
DIV_OVERLAY_CLASSES = "modal-overlay modal-transition-overlay-enter-start"
|
9
|
+
DIV_DIALOG_CLASSES = "modal-outer modal-transition-dialog-enter-start"
|
9
10
|
DIV_INNER_CLASSES = "modal-inner"
|
10
11
|
DIV_CONTENT_CLASSES = "modal-content"
|
11
12
|
DIV_MAIN_CLASSES = "modal-main"
|
@@ -17,5 +18,32 @@ module UltimateTurboModal::Flavors
|
|
17
18
|
BUTTON_CLOSE_SR_ONLY_CLASSES = "sr-only"
|
18
19
|
CLOSE_BUTTON_TAG_CLASSES = "modal-close-button"
|
19
20
|
ICON_CLOSE_CLASSES = "modal-close-icon"
|
21
|
+
|
22
|
+
TRANSITIONS = {
|
23
|
+
overlay: {
|
24
|
+
enter: {
|
25
|
+
animation: "modal-transition-overlay-enter-animation",
|
26
|
+
start: "modal-transition-overlay-enter-start",
|
27
|
+
end: "modal-transition-overlay-enter-end"
|
28
|
+
},
|
29
|
+
leave: {
|
30
|
+
animation: "modal-transition-overlay-leave-animation",
|
31
|
+
start: "modal-transition-overlay-leave-start",
|
32
|
+
end: "modal-transition-overlay-leave-end"
|
33
|
+
}
|
34
|
+
},
|
35
|
+
dialog: {
|
36
|
+
enter: {
|
37
|
+
animation: "modal-transition-dialog-enter-animation",
|
38
|
+
start: "modal-transition-dialog-enter-start",
|
39
|
+
end: "modal-transition-dialog-enter-end"
|
40
|
+
},
|
41
|
+
leave: {
|
42
|
+
animation: "modal-transition-dialog-leave-animation",
|
43
|
+
start: "modal-transition-dialog-leave-start",
|
44
|
+
end: "modal-transition-dialog-leave-end"
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
20
48
|
end
|
21
49
|
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/generators"
|
4
|
+
require "json"
|
5
|
+
require "pathname"
|
6
|
+
|
7
|
+
module UltimateTurboModal
|
8
|
+
module Generators
|
9
|
+
class UpdateGenerator < Rails::Generators::Base
|
10
|
+
source_root File.expand_path("templates", __dir__)
|
11
|
+
|
12
|
+
desc "Updates UltimateTurboModal: aligns npm package version to gem version and refreshes the configured flavor initializer."
|
13
|
+
|
14
|
+
def update_npm_package_version
|
15
|
+
package_json_path = rails_root_join("package.json")
|
16
|
+
|
17
|
+
unless File.exist?(package_json_path)
|
18
|
+
say "No package.json found. Skipping npm package version update.", :yellow
|
19
|
+
return
|
20
|
+
end
|
21
|
+
|
22
|
+
begin
|
23
|
+
json = JSON.parse(File.read(package_json_path))
|
24
|
+
rescue JSON::ParserError => e
|
25
|
+
say "Unable to parse package.json: #{e.message}", :red
|
26
|
+
return
|
27
|
+
end
|
28
|
+
|
29
|
+
package_name = "ultimate_turbo_modal"
|
30
|
+
new_version = UltimateTurboModal::VERSION.to_s
|
31
|
+
|
32
|
+
updated = false
|
33
|
+
|
34
|
+
%w[dependencies devDependencies].each do |section|
|
35
|
+
next unless json.key?(section) && json[section].is_a?(Hash)
|
36
|
+
|
37
|
+
if json[section].key?(package_name)
|
38
|
+
old = json[section][package_name]
|
39
|
+
json[section][package_name] = new_version
|
40
|
+
updated = true if old != new_version
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
if updated
|
45
|
+
File.write(package_json_path, JSON.pretty_generate(json) + "\n")
|
46
|
+
say "Updated #{package_name} version in package.json to #{new_version}.", :green
|
47
|
+
else
|
48
|
+
say "Did not find #{package_name} in package.json dependencies. Nothing to update.", :blue
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def copy_flavor_file
|
53
|
+
flavor = detect_flavor
|
54
|
+
unless flavor
|
55
|
+
say "Could not determine UTMR flavor. Skipping flavor file copy.", :yellow
|
56
|
+
return
|
57
|
+
end
|
58
|
+
|
59
|
+
template_rel = "flavors/#{flavor}.rb"
|
60
|
+
template_abs = File.join(self.class.source_root, template_rel)
|
61
|
+
|
62
|
+
unless File.exist?(template_abs)
|
63
|
+
say "Flavor template not found for '#{flavor}' at #{template_abs}.", :red
|
64
|
+
return
|
65
|
+
end
|
66
|
+
|
67
|
+
target_path = "config/initializers/ultimate_turbo_modal_#{flavor}.rb"
|
68
|
+
copy_file template_rel, target_path, force: true
|
69
|
+
say "Copied flavor initializer to #{target_path}.", :green
|
70
|
+
end
|
71
|
+
|
72
|
+
private
|
73
|
+
|
74
|
+
def detect_flavor
|
75
|
+
command = nil
|
76
|
+
if File.exist?(rails_root_join("bin", "rails"))
|
77
|
+
command = "#{rails_root_join("bin", "rails")} runner \"puts UltimateTurboModal.configuration.flavor\""
|
78
|
+
else
|
79
|
+
command = "bundle exec rails runner \"puts UltimateTurboModal.configuration.flavor\""
|
80
|
+
end
|
81
|
+
|
82
|
+
output = `#{command}`
|
83
|
+
flavor = output.to_s.strip
|
84
|
+
flavor.empty? ? nil : flavor
|
85
|
+
rescue StandardError => e
|
86
|
+
say "Error determining flavor via rails runner: #{e.message}", :red
|
87
|
+
nil
|
88
|
+
end
|
89
|
+
|
90
|
+
def rails_root_join(*args)
|
91
|
+
Pathname.new(destination_root).join(*args)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
|
@@ -104,6 +104,15 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
104
104
|
@advance_url || request&.original_url
|
105
105
|
end
|
106
106
|
|
107
|
+
# Wraps yielded content in a Turbo Frame if the current request originated from a Turbo Frame
|
108
|
+
def maybe_turbo_frame(frame_id, &block)
|
109
|
+
if turbo_frame?
|
110
|
+
turbo_frame_tag(frame_id, &block)
|
111
|
+
else
|
112
|
+
yield
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
107
116
|
def respond_to_missing?(method, include_private = false)
|
108
117
|
self.class.included_modules.any? { |mod| mod.instance_methods.include?(method) } || super
|
109
118
|
end
|
@@ -123,7 +132,7 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
123
132
|
|
124
133
|
def styles
|
125
134
|
style do
|
126
|
-
str = "html:has(dialog[open]) {overflow: hidden;} html {scrollbar-gutter: stable;}".html_safe
|
135
|
+
str = "html:has(dialog[open]),html:has(#modal-container) {overflow: hidden;} html {scrollbar-gutter: stable;}".html_safe
|
127
136
|
respond_to?(:unsafe_raw) ? unsafe_raw(str) : raw(str)
|
128
137
|
end
|
129
138
|
end
|
@@ -131,7 +140,7 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
131
140
|
def outer_divs(&block)
|
132
141
|
div_dialog do
|
133
142
|
div_overlay
|
134
|
-
|
143
|
+
div_outer_dialog do
|
135
144
|
div_inner(&block)
|
136
145
|
end
|
137
146
|
end
|
@@ -144,12 +153,6 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
144
153
|
modal_advance_url_value: advance_url,
|
145
154
|
modal_allowed_click_outside_selector_value: allowed_click_outside_selector,
|
146
155
|
action: "turbo:submit-end->modal#submitEnd keyup@window->modal#closeWithKeyboard click@window->modal#outsideModalClicked click->modal#outsideModalClicked",
|
147
|
-
transition_enter: "ease-out duration-100",
|
148
|
-
transition_enter_start: "opacity-0",
|
149
|
-
transition_enter_end: "opacity-100",
|
150
|
-
transition_leave: "ease-in duration-50",
|
151
|
-
transition_leave_start: "opacity-100",
|
152
|
-
transition_leave_end: "opacity-0",
|
153
156
|
padding: padding?.to_s,
|
154
157
|
title: title?.to_s,
|
155
158
|
header: header?.to_s,
|
@@ -163,7 +166,7 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
163
166
|
end
|
164
167
|
|
165
168
|
div(id: "modal-container",
|
166
|
-
class: self.class::
|
169
|
+
class: self.class::DIV_MODAL_CONTAINER_CLASSES,
|
167
170
|
role: "dialog",
|
168
171
|
aria: {
|
169
172
|
modal: true,
|
@@ -173,20 +176,38 @@ class UltimateTurboModal::Base < Phlex::HTML
|
|
173
176
|
end
|
174
177
|
|
175
178
|
def div_overlay
|
176
|
-
div(id: "modal-overlay", class: self.class::DIV_OVERLAY_CLASSES
|
179
|
+
div(id: "modal-overlay", class: self.class::DIV_OVERLAY_CLASSES, data: {
|
180
|
+
modal_target: "overlay",
|
181
|
+
transition_enter: self.class::TRANSITIONS[:overlay][:enter][:animation],
|
182
|
+
transition_enter_start: self.class::TRANSITIONS[:overlay][:enter][:start],
|
183
|
+
transition_enter_end: self.class::TRANSITIONS[:overlay][:enter][:end],
|
184
|
+
transition_leave: self.class::TRANSITIONS[:overlay][:leave][:animation],
|
185
|
+
transition_leave_start: self.class::TRANSITIONS[:overlay][:leave][:start],
|
186
|
+
transition_leave_end: self.class::TRANSITIONS[:overlay][:leave][:end]
|
187
|
+
})
|
177
188
|
end
|
178
189
|
|
179
|
-
def
|
180
|
-
div(id: "modal-outer", class: self.class::
|
190
|
+
def div_outer_dialog(&block)
|
191
|
+
div(id: "modal-outer", class: self.class::DIV_DIALOG_CLASSES, data: {
|
192
|
+
modal_target: "outer",
|
193
|
+
transition_enter: self.class::TRANSITIONS[:dialog][:enter][:animation],
|
194
|
+
transition_enter_start: self.class::TRANSITIONS[:dialog][:enter][:start],
|
195
|
+
transition_enter_end: self.class::TRANSITIONS[:dialog][:enter][:end],
|
196
|
+
transition_leave: self.class::TRANSITIONS[:dialog][:leave][:animation],
|
197
|
+
transition_leave_start: self.class::TRANSITIONS[:dialog][:leave][:start],
|
198
|
+
transition_leave_end: self.class::TRANSITIONS[:dialog][:leave][:end]
|
199
|
+
}, &block)
|
181
200
|
end
|
182
201
|
|
183
202
|
def div_inner(&block)
|
184
|
-
|
203
|
+
maybe_turbo_frame("modal-inner") do
|
204
|
+
div(id: "modal-inner", class: self.class::DIV_INNER_CLASSES, data: content_div_data, &block)
|
205
|
+
end
|
185
206
|
end
|
186
207
|
|
187
208
|
def div_content(&block)
|
188
209
|
data = (content_div_data || {}).merge({modal_target: "content"})
|
189
|
-
div(id: "modal-content", class: self.class::DIV_CONTENT_CLASSES, data
|
210
|
+
div(id: "modal-content", class: self.class::DIV_CONTENT_CLASSES, data: data, &block)
|
190
211
|
end
|
191
212
|
|
192
213
|
def div_main(&block)
|
data/lib/ultimate_turbo_modal.rb
CHANGED
@@ -6,6 +6,7 @@ require "ultimate_turbo_modal/configuration"
|
|
6
6
|
require "ultimate_turbo_modal/railtie"
|
7
7
|
require "ultimate_turbo_modal/base"
|
8
8
|
require "generators/ultimate_turbo_modal/install_generator"
|
9
|
+
require "generators/ultimate_turbo_modal/update_generator"
|
9
10
|
|
10
11
|
module UltimateTurboModal
|
11
12
|
extend self
|
data/script/build_and_release.sh
CHANGED
@@ -23,14 +23,28 @@ if [ "$1" != "--skip-gem" ]; then
|
|
23
23
|
echo "Building and releasing gem..."
|
24
24
|
bundle exec rake build
|
25
25
|
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
# Update demo app with latest gem and JavaScript
|
27
|
+
echo "Updating demo app with latest code..."
|
28
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
29
|
+
DEMO_APP_DIR="$SCRIPT_DIR/../demo-app"
|
30
|
+
|
31
|
+
# Build JavaScript package first
|
32
|
+
echo "Building ultimate_turbo_modal JavaScript package..."
|
33
|
+
(cd "$SCRIPT_DIR/../javascript" && yarn build)
|
34
|
+
|
35
|
+
# Update demo app dependencies
|
36
|
+
echo "Installing latest ultimate_turbo_modal in demo app..."
|
37
|
+
(cd "$DEMO_APP_DIR" && bundle install)
|
38
|
+
(cd "$DEMO_APP_DIR" && yarn install --force)
|
39
|
+
|
40
|
+
# Check if Gemfile.lock or demo-app files are git dirty
|
41
|
+
if ! git diff --quiet Gemfile.lock demo-app/Gemfile.lock demo-app/yarn.lock; then
|
42
|
+
echo "Lock files are dirty. Adding, committing, and pushing."
|
43
|
+
git add Gemfile.lock demo-app/Gemfile.lock demo-app/yarn.lock
|
44
|
+
git commit -m "Update lock files for demo app"
|
32
45
|
fi
|
33
46
|
|
47
|
+
bundle exec rake build
|
34
48
|
bundle exec rake release
|
35
49
|
else
|
36
50
|
echo "Skipping gem build and release..."
|
@@ -45,4 +59,3 @@ else
|
|
45
59
|
fi
|
46
60
|
|
47
61
|
echo "Done!"
|
48
|
-
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultimate_turbo_modal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carl Mercier
|
8
|
+
autorequire:
|
8
9
|
bindir: bin
|
9
10
|
cert_chain: []
|
10
|
-
date:
|
11
|
+
date: 2025-08-08 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: phlex-rails
|
@@ -168,102 +169,6 @@ files:
|
|
168
169
|
- Rakefile
|
169
170
|
- UPGRADING.md
|
170
171
|
- VERSION
|
171
|
-
- demo-app/.gitattributes
|
172
|
-
- demo-app/.gitignore
|
173
|
-
- demo-app/.ruby-version
|
174
|
-
- demo-app/.tool-versions
|
175
|
-
- demo-app/Gemfile
|
176
|
-
- demo-app/Gemfile.lock
|
177
|
-
- demo-app/Procfile.dev
|
178
|
-
- demo-app/README.md
|
179
|
-
- demo-app/Rakefile
|
180
|
-
- demo-app/app/assets/builds/.keep
|
181
|
-
- demo-app/app/assets/images/.keep
|
182
|
-
- demo-app/app/assets/stylesheets/application.css
|
183
|
-
- demo-app/app/controllers/application_controller.rb
|
184
|
-
- demo-app/app/controllers/concerns/.keep
|
185
|
-
- demo-app/app/controllers/concerns/set_flavor.rb
|
186
|
-
- demo-app/app/controllers/hide_from_backends_controller.rb
|
187
|
-
- demo-app/app/controllers/modal_controller.rb
|
188
|
-
- demo-app/app/controllers/posts_controller.rb
|
189
|
-
- demo-app/app/controllers/welcome_controller.rb
|
190
|
-
- demo-app/app/helpers/application_helper.rb
|
191
|
-
- demo-app/app/javascript/application.js
|
192
|
-
- demo-app/app/javascript/controllers/application.js
|
193
|
-
- demo-app/app/javascript/controllers/dark_mode_controller.js
|
194
|
-
- demo-app/app/javascript/controllers/flash_controller.js
|
195
|
-
- demo-app/app/javascript/controllers/hello_controller.js
|
196
|
-
- demo-app/app/javascript/controllers/index.js
|
197
|
-
- demo-app/app/models/application_record.rb
|
198
|
-
- demo-app/app/models/concerns/.keep
|
199
|
-
- demo-app/app/models/post.rb
|
200
|
-
- demo-app/app/views/hide_from_backends/_notice.html.erb
|
201
|
-
- demo-app/app/views/hide_from_backends/create.turbo_stream.erb
|
202
|
-
- demo-app/app/views/hide_from_backends/new.html.erb
|
203
|
-
- demo-app/app/views/layouts/application.html.erb
|
204
|
-
- demo-app/app/views/modal/index.html.erb
|
205
|
-
- demo-app/app/views/modal/show.html.erb
|
206
|
-
- demo-app/app/views/posts/_form.html.erb
|
207
|
-
- demo-app/app/views/posts/_post.html.erb
|
208
|
-
- demo-app/app/views/posts/edit.html.erb
|
209
|
-
- demo-app/app/views/posts/index.html.erb
|
210
|
-
- demo-app/app/views/posts/new.html.erb
|
211
|
-
- demo-app/app/views/posts/show.html.erb
|
212
|
-
- demo-app/app/views/shared/_flash.html.erb
|
213
|
-
- demo-app/app/views/welcome/index.html.erb
|
214
|
-
- demo-app/bin/bundle
|
215
|
-
- demo-app/bin/dev
|
216
|
-
- demo-app/bin/rails
|
217
|
-
- demo-app/bin/rake
|
218
|
-
- demo-app/bin/setup
|
219
|
-
- demo-app/config.ru
|
220
|
-
- demo-app/config/application.rb
|
221
|
-
- demo-app/config/boot.rb
|
222
|
-
- demo-app/config/credentials.yml.enc
|
223
|
-
- demo-app/config/database.yml
|
224
|
-
- demo-app/config/environment.rb
|
225
|
-
- demo-app/config/environments/development.rb
|
226
|
-
- demo-app/config/environments/production.rb
|
227
|
-
- demo-app/config/environments/test.rb
|
228
|
-
- demo-app/config/initializers/assets.rb
|
229
|
-
- demo-app/config/initializers/content_security_policy.rb
|
230
|
-
- demo-app/config/initializers/filter_parameter_logging.rb
|
231
|
-
- demo-app/config/initializers/inflections.rb
|
232
|
-
- demo-app/config/initializers/new_framework_defaults_8_0.rb
|
233
|
-
- demo-app/config/initializers/permissions_policy.rb
|
234
|
-
- demo-app/config/initializers/ultimate_turbo_modal.rb
|
235
|
-
- demo-app/config/initializers/ultimate_turbo_modal_tailwind.rb
|
236
|
-
- demo-app/config/initializers/ultimate_turbo_modal_vanilla.rb
|
237
|
-
- demo-app/config/locales/en.yml
|
238
|
-
- demo-app/config/puma.rb
|
239
|
-
- demo-app/config/routes.rb
|
240
|
-
- demo-app/db/migrate/20230331002502_create_posts.rb
|
241
|
-
- demo-app/db/migrate/20231031012703_add_post.rb
|
242
|
-
- demo-app/db/migrate/20231128141054_add_publish_on_to_posts.rb
|
243
|
-
- demo-app/db/schema.rb
|
244
|
-
- demo-app/lib/assets/.keep
|
245
|
-
- demo-app/lib/tasks/.keep
|
246
|
-
- demo-app/log/.keep
|
247
|
-
- demo-app/package.json
|
248
|
-
- demo-app/postcss.config.js
|
249
|
-
- demo-app/public/400.html
|
250
|
-
- demo-app/public/404.html
|
251
|
-
- demo-app/public/406-unsupported-browser.html
|
252
|
-
- demo-app/public/422.html
|
253
|
-
- demo-app/public/500.html
|
254
|
-
- demo-app/public/apple-touch-icon-precomposed.png
|
255
|
-
- demo-app/public/apple-touch-icon.png
|
256
|
-
- demo-app/public/favicon.ico
|
257
|
-
- demo-app/public/icon.png
|
258
|
-
- demo-app/public/icon.svg
|
259
|
-
- demo-app/public/img/bootstrap-logo-shadow.png
|
260
|
-
- demo-app/public/img/unicat.jpg
|
261
|
-
- demo-app/public/img/vanilla.png
|
262
|
-
- demo-app/public/robots.txt
|
263
|
-
- demo-app/tmp/.keep
|
264
|
-
- demo-app/tmp/pids/.keep
|
265
|
-
- demo-app/vendor/.keep
|
266
|
-
- demo-app/yarn.lock
|
267
172
|
- javascript/index.js
|
268
173
|
- javascript/modal_controller.js
|
269
174
|
- javascript/package.json
|
@@ -278,6 +183,7 @@ files:
|
|
278
183
|
- lib/generators/ultimate_turbo_modal/templates/flavors/tailwind3.rb
|
279
184
|
- lib/generators/ultimate_turbo_modal/templates/flavors/vanilla.rb
|
280
185
|
- lib/generators/ultimate_turbo_modal/templates/ultimate_turbo_modal.rb
|
186
|
+
- lib/generators/ultimate_turbo_modal/update_generator.rb
|
281
187
|
- lib/phlex/deferred_render_with_main_content.rb
|
282
188
|
- lib/ultimate_turbo_modal.rb
|
283
189
|
- lib/ultimate_turbo_modal/base.rb
|
@@ -297,6 +203,7 @@ metadata:
|
|
297
203
|
homepage_uri: https://github.com/cmer/ultimate_turbo_modal
|
298
204
|
source_code_uri: https://github.com/cmer/ultimate_turbo_modal
|
299
205
|
changelog_uri: https://github.com/cmer/ultimate_turbo_modal/CHANGELOG.md
|
206
|
+
post_install_message:
|
300
207
|
rdoc_options: []
|
301
208
|
require_paths:
|
302
209
|
- lib
|
@@ -311,7 +218,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
218
|
- !ruby/object:Gem::Version
|
312
219
|
version: '0'
|
313
220
|
requirements: []
|
314
|
-
rubygems_version: 3.
|
221
|
+
rubygems_version: 3.5.22
|
222
|
+
signing_key:
|
315
223
|
specification_version: 4
|
316
224
|
summary: UTMR aims to be the be-all and end-all of Turbo Modals.
|
317
225
|
test_files: []
|
data/demo-app/.gitattributes
DELETED
data/demo-app/.gitignore
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
-
#
|
3
|
-
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
-
# or operating system, you probably want to add a global ignore instead:
|
5
|
-
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
-
|
7
|
-
# Ignore bundler config.
|
8
|
-
/.bundle
|
9
|
-
|
10
|
-
# Ignore the default SQLite database.
|
11
|
-
/db/*.sqlite3
|
12
|
-
/db/*.sqlite3-*
|
13
|
-
|
14
|
-
# Ignore all logfiles and tempfiles.
|
15
|
-
/log/*
|
16
|
-
/tmp/*
|
17
|
-
!/log/.keep
|
18
|
-
!/tmp/.keep
|
19
|
-
|
20
|
-
# Ignore pidfiles, but keep the directory.
|
21
|
-
/tmp/pids/*
|
22
|
-
!/tmp/pids/
|
23
|
-
!/tmp/pids/.keep
|
24
|
-
|
25
|
-
|
26
|
-
/public/assets
|
27
|
-
|
28
|
-
# Ignore master key for decrypting credentials and more.
|
29
|
-
/config/master.key
|
30
|
-
|
31
|
-
/app/assets/builds/*
|
32
|
-
!/app/assets/builds/.keep
|
33
|
-
|
34
|
-
/node_modules
|
data/demo-app/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-3.3.9
|
data/demo-app/.tool-versions
DELETED
data/demo-app/Gemfile
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
|
-
|
4
|
-
ruby file: ".tool-versions"
|
5
|
-
|
6
|
-
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
7
|
-
gem "rails", "~> 8.0.2"
|
8
|
-
|
9
|
-
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
|
10
|
-
gem "propshaft"
|
11
|
-
|
12
|
-
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
|
13
|
-
gem "turbo-rails"
|
14
|
-
|
15
|
-
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
|
16
|
-
gem "stimulus-rails"
|
17
|
-
|
18
|
-
# Use sqlite3 as the database for Active Record
|
19
|
-
gem "sqlite3"
|
20
|
-
|
21
|
-
# Use the Puma web server [https://github.com/puma/puma]
|
22
|
-
gem "puma", "~> 6.6"
|
23
|
-
|
24
|
-
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
25
|
-
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
26
|
-
|
27
|
-
group :development, :test do
|
28
|
-
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
29
|
-
gem "debug", platforms: %i[ mri mingw x64_mingw ]
|
30
|
-
gem "web-console"
|
31
|
-
end
|
32
|
-
|
33
|
-
group :development do
|
34
|
-
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
35
|
-
# gem "spring"
|
36
|
-
end
|
37
|
-
|
38
|
-
gem "cssbundling-rails"
|
39
|
-
gem "jsbundling-rails"
|
40
|
-
gem "faker"
|
41
|
-
gem "ultimate_turbo_modal", path: "../"
|