ultimate_turbo_modal 3.0.0.beta.1 → 3.0.0.beta.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40babead9098d7239d6674d6980d2f286c1a94e9fd30303e847415a70a6a0635
4
- data.tar.gz: 78953d086e90402da3d33b3e1fa808329168a627184653b8a8f6e34ae056264d
3
+ metadata.gz: 5e555f71c3c4e4ca7af4849d73ab342a1641da8cc3e102d5dafb1048d45b7462
4
+ data.tar.gz: 8783d6e1d459a6bd02443bb1ff4bbf6b4c1581efe31b9483e7feb9cbb842e99d
5
5
  SHA512:
6
- metadata.gz: bfa1217e40264cbac0f64fe4b33d70cc5cc9c7bb9c4dcab1f16d9dc005c9b3bef3845c5111494afbde2e5878f1a66dc2d3a7a566dca54bf94cdb3853c62b4f34
7
- data.tar.gz: ac70165dc454c67db585c9f814f4e95acf032ae15ce6f4b89b08f512a750f3e60e5f8ab73dc33fe8e8e4007923c8313a6294bb9988b263c876a0f5928fdcd1c4
6
+ metadata.gz: 650f91e9d8eaa38eb5b92bf8a2a090ae7f470ecdb7aca6ae0017adca6967bf973a36b50e4b6acec3aacac0b8fb46dd5022ac453deda60fccecfb868a57234bae
7
+ data.tar.gz: b93f9c24991c4b8940b4dd13e107de4b4839a5ba7c652d859824effaca64c1135eaab7f63d967eaff81b34fe8e115a61f2265acd59ca9c68e89c5c88935e21ac
data/CHANGELOG.md CHANGED
@@ -4,6 +4,7 @@
4
4
  - **BREAKING**: If you customized the look and feel of a flavor, you'll need to reapply your customizations since the underlying markup has changed.
5
5
  - **BREAKING**: Removed Tailwind v3 flavor. Use the `tailwind` flavor (Tailwind v4+) or `custom` to define your own classes.
6
6
  - **BREAKING**: Configuration options are now split between `config.modal` and `config.drawer` blocks instead of flat on the config object. See UPGRADING.md for migration details.
7
+ - **BREAKING**: Rails 8+ now required.
7
8
  - Added support for slide-out drawers with separate default configuration.
8
9
  - Smooth redirect behavior: same-page redirects morph content behind modal/drawer before closing; different-page redirects close modal/drawer with animation before navigating.
9
10
  - Removed `el-transition` and `focus-trap` npm dependencies.
data/Gemfile.lock CHANGED
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ultimate_turbo_modal (3.0.0.beta.1)
5
- actionpack
6
- activesupport
7
- phlex-rails
8
- railties
4
+ ultimate_turbo_modal (3.0.0.beta.2)
5
+ actionpack (>= 8.0)
6
+ activesupport (>= 8.0)
7
+ phlex-rails (>= 2.0)
8
+ railties (>= 8.0)
9
9
  stimulus-rails
10
10
  turbo-rails
11
11
 
@@ -67,8 +67,10 @@ GEM
67
67
  loofah (2.24.1)
68
68
  crass (~> 1.0.2)
69
69
  nokogiri (>= 1.12.0)
70
- minitest (5.25.5)
71
- nokogiri (1.18.9-arm64-darwin)
70
+ minitest (6.0.2)
71
+ drb (~> 2.0)
72
+ prism (~> 1.5)
73
+ nokogiri (1.19.2-arm64-darwin)
72
74
  racc (~> 1.4)
73
75
  parallel (1.27.0)
74
76
  parser (3.3.10.2)
@@ -3,7 +3,7 @@
3
3
  ## Minimum requirements
4
4
 
5
5
  - Ruby 3.2 and above.
6
- - Rails 7 and above.
6
+ - Rails 8 and above.
7
7
  - If the application uses Tailwind CSS, version 4 is now required. Tailwind 3 is deprecated. (breaking change)
8
8
  - `ultimate_turbo_modal` should be present in the host application's Gemfile. Otherwise, it hasn't been installed yet. User should follow installation steps instead.
9
9
 
@@ -22,9 +22,9 @@
22
22
  5. Run `yarn install` or `npm install` or `bun install` if using a Javascript package manager.
23
23
  6. Migrate the configuration block in `config/initializers/ultimate_turbo_modal.rb` (this is the file with the `UltimateTurboModal.configure` block, not the flavor file). If this file does not exist, skip this step — the user was using defaults and no migration is needed. The objective is to replicate the same behavior the user had in v2, using the new v3 syntax. To do this:
24
24
 
25
- a. Read the user's existing `config/initializers/ultimate_turbo_modal.rb` and note any options that differ from the v3 defaults. The v3 modal defaults are: `advance: true`, `close_button: true`, `header: true`, `header_divider: true`, `footer_divider: true`, `padding: true`, `overlay: true`. If all the user's v2 options match these defaults, overwrite the file with just the template (step b) and skip to step d.
25
+ a. Retrieve the v3 configuration template by running: `cat $(bundle info ultimate_turbo_modal --path)/lib/generators/ultimate_turbo_modal/templates/ultimate_turbo_modal.rb`. This template contains the new v3 format with all options commented out at their defaults. Note: the template contains a `FLAVOR` placeholder on the `config.flavor` line that will need to be replaced with the flavor symbol from the user's v2 file (e.g. `:tailwind`).
26
26
 
27
- b. Retrieve the v3 configuration template by running: `cat $(bundle info ultimate_turbo_modal --path)/lib/generators/ultimate_turbo_modal/templates/ultimate_turbo_modal.rb`. This template contains the new v3 format with all options commented out at their defaults. Note: the template contains a `FLAVOR` placeholder on the `config.flavor` line replace it with the flavor symbol from the user's v2 file (e.g. `:tailwind`).
27
+ b. Read the user's existing `config/initializers/ultimate_turbo_modal.rb` and note any options that differ from the v3 defaults. If all the user's v2 options match these defaults, you will not need to change any of the configurations in the next step.
28
28
 
29
29
  c. Use the template as the base for the new file. Uncomment and set only the options that differ from the v3 defaults. The mapping is:
30
30
  - `config.flavor` and `config.allowed_click_outside_selector` remain top-level (unchanged).
@@ -33,6 +33,6 @@
33
33
  - Leave the `config.drawer` block commented out (use defaults) since drawers is a new feature and was never previously configured.
34
34
  - Setting old-style flat options directly on `config` (e.g. `config.close_button = false`) will raise a `NoMethodError` in v3.
35
35
 
36
- d. Overwrite `config/initializers/ultimate_turbo_modal.rb` with the result.
36
+ d. Overwrite `config/initializers/ultimate_turbo_modal.rb` with the result. In addition to the modified configuration options, the output should include all commented-out configuration options from the template file. This makes it easier for the user to modify options in the future.
37
37
 
38
38
  7. Instruct the user to restart their Rails application server for the changes to be picked up.
data/README.md CHANGED
@@ -90,7 +90,7 @@ UltimateTurboModal.configure do |config|
90
90
  config.allowed_click_outside_selector = []
91
91
 
92
92
  config.modal do |m|
93
- m.advance = true
93
+ m.advance = false
94
94
  m.close_button = true
95
95
  m.header = true
96
96
  m.header_divider = true
@@ -118,7 +118,7 @@ Per-instance options passed to `modal()` or `drawer()` override the defaults.
118
118
 
119
119
  | Name | Default | Description |
120
120
  |------|---------|-------------|
121
- | `advance` | `true` | When opening the modal, the URL in the URL bar will change to the URL of the view being shown in the modal. The Back button dismisses the modal and navigates back. If a URL is specified as a string (e.g. `advance: "/other-path"`), the browser history will advance, and the URL shown in the URL bar will be replaced with the value specified. |
121
+ | `advance` | `false` | When opening the modal, the URL in the URL bar will change to the URL of the view being shown in the modal. The Back button dismisses the modal and navigates back. If a URL is specified as a string (e.g. `advance: "/other-path"`), the browser history will advance, and the URL shown in the URL bar will be replaced with the value specified. |
122
122
  | `close_button` | `true` | Shows or hide a close button (X) at the top right of the modal. |
123
123
  | `header` | `true` | Whether to display a modal header. |
124
124
  | `header_divider` | `true` | Whether to display a divider below the header. |
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0.beta.1
1
+ 3.0.0.beta.2
@@ -103,7 +103,7 @@ module UltimateTurboModal
103
103
  end
104
104
 
105
105
  def uses_bun?
106
- File.exist?(rails_root_join("bun.lockb"))
106
+ File.exist?(rails_root_join("bun.lockb")) || File.exist?(rails_root_join("bun.lock"))
107
107
  end
108
108
 
109
109
  def rails_root_join(*args)
@@ -5,7 +5,7 @@ UltimateTurboModal.configure do |config|
5
5
  # config.allowed_click_outside_selector = []
6
6
 
7
7
  # config.modal do |m|
8
- # m.advance = true
8
+ # m.advance = false
9
9
  # m.close_button = true
10
10
  # m.header = true
11
11
  # m.header_divider = true
@@ -4,7 +4,7 @@ module Phlex
4
4
  module DeferredRenderWithMainContent
5
5
  def view_template(&block)
6
6
  output = capture(&block)
7
- super { raw_html(output) }
7
+ super { raw(safe(output)) }
8
8
  end
9
9
  end
10
10
  end
@@ -218,7 +218,7 @@ class UltimateTurboModal::Base < Phlex::HTML
218
218
  end
219
219
 
220
220
  def raw_html(str)
221
- respond_to?(:unsafe_raw) ? unsafe_raw(str) : raw(str)
221
+ raw(safe(str))
222
222
  end
223
223
 
224
224
  def classes_for(suffix)
@@ -251,8 +251,7 @@ class UltimateTurboModal::Base < Phlex::HTML
251
251
  end
252
252
  data_attributes[:overlay] = overlay?.to_s
253
253
 
254
- # Rails.env.local? requires Rails 7.1+; use explicit check for Rails 7.0 compatibility
255
- if defined?(Rails) && (Rails.env.development? || Rails.env.test?) # standard:disable Rails/EnvLocal
254
+ if defined?(Rails) && Rails.env.local?
256
255
  data_attributes[:utmr_version] = UltimateTurboModal::VERSION
257
256
  end
258
257
 
@@ -69,7 +69,7 @@ module UltimateTurboModal
69
69
  attr_reader :advance
70
70
 
71
71
  def initialize
72
- @advance = true
72
+ @advance = false
73
73
  @close_button = true
74
74
  @header = true
75
75
  @header_divider = true
data/mise.toml ADDED
@@ -0,0 +1,3 @@
1
+ [tools]
2
+ ruby = "4.0.1"
3
+ nodejs = "22.14.0"
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: 3.0.0.beta.1
4
+ version: 3.0.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Mercier
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-03-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: phlex-rails
@@ -16,56 +15,56 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '0'
18
+ version: '2.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '0'
25
+ version: '2.0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: actionpack
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '0'
32
+ version: '8.0'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
- version: '0'
39
+ version: '8.0'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: activesupport
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - ">="
46
45
  - !ruby/object:Gem::Version
47
- version: '0'
46
+ version: '8.0'
48
47
  type: :runtime
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - ">="
53
52
  - !ruby/object:Gem::Version
54
- version: '0'
53
+ version: '8.0'
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: railties
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ">="
60
59
  - !ruby/object:Gem::Version
61
- version: '0'
60
+ version: '8.0'
62
61
  type: :runtime
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
65
  - - ">="
67
66
  - !ruby/object:Gem::Version
68
- version: '0'
67
+ version: '8.0'
69
68
  - !ruby/object:Gem::Dependency
70
69
  name: stimulus-rails
71
70
  requirement: !ruby/object:Gem::Requirement
@@ -95,7 +94,7 @@ dependencies:
95
94
  - !ruby/object:Gem::Version
96
95
  version: '0'
97
96
  description: An easy-to-use, flexible, and powerful Turbo Modal solution for Rails
98
- 7+ built with Stimulus.js, Tailwind CSS (or vanilla CSS) and Hotwire.
97
+ 8+ built with Stimulus.js, Tailwind CSS (or vanilla CSS) and Hotwire.
99
98
  email:
100
99
  - foss@carlmercier.com
101
100
  executables: []
@@ -108,7 +107,6 @@ files:
108
107
  - ".rubocop.yml"
109
108
  - ".ruby-version"
110
109
  - ".standard.yml"
111
- - ".tool-versions"
112
110
  - CHANGELOG.md
113
111
  - Gemfile
114
112
  - Gemfile.lock
@@ -136,6 +134,7 @@ files:
136
134
  - lib/ultimate_turbo_modal/helpers/view_helper.rb
137
135
  - lib/ultimate_turbo_modal/railtie.rb
138
136
  - lib/ultimate_turbo_modal/version.rb
137
+ - mise.toml
139
138
  - script/build_and_release.sh
140
139
  - sig/ultimate_turbo_modal.rbs
141
140
  - yarn.lock
@@ -146,7 +145,6 @@ metadata:
146
145
  homepage_uri: https://github.com/cmer/ultimate_turbo_modal
147
146
  source_code_uri: https://github.com/cmer/ultimate_turbo_modal
148
147
  changelog_uri: https://github.com/cmer/ultimate_turbo_modal/CHANGELOG.md
149
- post_install_message:
150
148
  rdoc_options: []
151
149
  require_paths:
152
150
  - lib
@@ -154,15 +152,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
152
  requirements:
155
153
  - - ">="
156
154
  - !ruby/object:Gem::Version
157
- version: '3.0'
155
+ version: '3.2'
158
156
  required_rubygems_version: !ruby/object:Gem::Requirement
159
157
  requirements:
160
158
  - - ">="
161
159
  - !ruby/object:Gem::Version
162
160
  version: '0'
163
161
  requirements: []
164
- rubygems_version: 3.5.22
165
- signing_key:
162
+ rubygems_version: 4.0.3
166
163
  specification_version: 4
167
164
  summary: UTMR aims to be the be-all and end-all of Turbo Modals.
168
165
  test_files: []
data/.tool-versions DELETED
@@ -1,2 +0,0 @@
1
- ruby 3.3.9
2
- nodejs 22.14.0