modal_stack 0.1.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.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +37 -0
  3. data/CODE_OF_CONDUCT.md +10 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +748 -0
  6. data/Rakefile +12 -0
  7. data/app/assets/javascripts/modal_stack.js +756 -0
  8. data/app/assets/stylesheets/modal_stack/bootstrap.css +232 -0
  9. data/app/assets/stylesheets/modal_stack/tailwind.css +303 -0
  10. data/app/assets/stylesheets/modal_stack/vanilla.css +219 -0
  11. data/app/javascript/modal_stack/controllers/modal_stack_controller.js +149 -0
  12. data/app/javascript/modal_stack/controllers/modal_stack_link_controller.js +34 -0
  13. data/app/javascript/modal_stack/index.js +15 -0
  14. data/app/javascript/modal_stack/install.js +15 -0
  15. data/app/javascript/modal_stack/orchestrator.js +98 -0
  16. data/app/javascript/modal_stack/orchestrator.test.js +260 -0
  17. data/app/javascript/modal_stack/runtime.js +217 -0
  18. data/app/javascript/modal_stack/runtime.test.js +134 -0
  19. data/app/javascript/modal_stack/state.js +315 -0
  20. data/app/javascript/modal_stack/state.test.js +508 -0
  21. data/app/views/layouts/modal.html.erb +6 -0
  22. data/lib/generators/modal_stack/install/install_generator.rb +224 -0
  23. data/lib/generators/modal_stack/install/templates/initializer.rb +57 -0
  24. data/lib/modal_stack/capybara/minitest.rb +9 -0
  25. data/lib/modal_stack/capybara/rspec.rb +9 -0
  26. data/lib/modal_stack/capybara.rb +85 -0
  27. data/lib/modal_stack/configuration.rb +90 -0
  28. data/lib/modal_stack/controller_extensions.rb +73 -0
  29. data/lib/modal_stack/engine.rb +44 -0
  30. data/lib/modal_stack/helpers/modal_link_helper.rb +65 -0
  31. data/lib/modal_stack/helpers/modal_stack_assets_helper.rb +45 -0
  32. data/lib/modal_stack/helpers/modal_stack_container_helper.rb +36 -0
  33. data/lib/modal_stack/initializer_version_check.rb +33 -0
  34. data/lib/modal_stack/turbo_streams_extension.rb +73 -0
  35. data/lib/modal_stack/version.rb +5 -0
  36. data/lib/modal_stack.rb +36 -0
  37. metadata +130 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 44bb2750129e5c72cb364e6fd217603b35e838cd2b42d8f7d55b93902cb1409c
4
+ data.tar.gz: 76aa67df55336d851d2c11ce06d00ab99fd1959bb4542331dba3b129ad3cacad
5
+ SHA512:
6
+ metadata.gz: 64e9cb4d64f3cabb2d78b3b7f37aa608300008cbab3195fb1cc3f0c57f9b7492907577d0fe4db4415aaebc75a54226ab9114a632ce905864d8de96d8b078766e
7
+ data.tar.gz: 2f525716be7b232ada7ce0a3499c859707e6e61e5e4990ae6097b416e876e05f62e56d5d945ac5819aeb355a464811213fb6b9f1bd149ab4b849ff87d75c42ad
data/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ### Added
10
+
11
+ ### Changed
12
+
13
+ ### Fixed
14
+
15
+ ## [0.1.1] - 2026-05-02
16
+
17
+ ### Added
18
+ - Multi-Rails CI matrix (Ruby 3.2-4.0 × Rails 7.2/8.0/8.1/8.1+sprockets) via Appraisal.
19
+ - Automated release pipeline (`release.yml`) — push to `main` creates the tag, GitHub release, and publishes to RubyGems via OIDC trusted publishing.
20
+ - `bun test`, `bun run build:check`, and bundle-freshness CI jobs.
21
+ - Full Capybara + Cuprite system spec suite (boot, push, pop, replace, history-back, drawer sides, dismissible).
22
+ - Cuprite `rails_helper.rb` with the gem's Capybara matchers auto-loaded.
23
+ - Dependabot config for bundler + GitHub Actions (weekly).
24
+ - Comprehensive README with reference tables and theming guide.
25
+
26
+ ### Changed
27
+ - RuboCop config rebuilt on a swal_rails-style baseline (Metrics tuned for DSL helpers, `Naming/PredicatePrefix` exempt for Capybara matchers, `ParameterLists` ignores keyword args). `.rubocop_todo.yml` deleted.
28
+ - `modal_link_to` refactored into smaller helpers to satisfy the new Metrics limits.
29
+ - Gemspec exclusions extended (`Appraisals`, `gemfiles/`, `examples/`, `CLAUDE.md`, `bunfig.toml`) so the published gem stays minimal.
30
+
31
+ ### Fixed
32
+ - `capybara_spec` now restores `Capybara.app` / `current_driver` in an `around` block so the unit specs no longer pollute global state and break system specs that run after them.
33
+ - `modal_replace_spec` no longer caches a `within_modal` reference across the morph — avoids a Cuprite `NodeNotFoundError` race on slow CI runners.
34
+
35
+ ## [0.1.0] - 2026-04-26
36
+
37
+ - Initial release.
@@ -0,0 +1,10 @@
1
+ # Code of Conduct
2
+
3
+ "modal_stack" follows [The Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct) in all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.):
4
+
5
+ * Participants will be tolerant of opposing views.
6
+ * Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
7
+ * When interpreting the words and actions of others, participants should always assume good intentions.
8
+ * Behaviour which can be reasonably considered harassment will not be tolerated.
9
+
10
+ If you have any concerns about behaviour within this project, please contact us at ["gagnaire.flo@gmail.com"](mailto:"gagnaire.flo@gmail.com").
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Florian Gagnaire
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.