plutonium 0.53.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115,13 +115,16 @@ export default class extends Controller {
115
115
  panel.style.left = `${triggerRect.right + 4}px`
116
116
  panel.style.top = `${triggerRect.top}px`
117
117
 
118
- // Shift up if the panel would overflow the viewport bottom.
118
+ // Shift up if the panel would overflow the viewport bottom, but never
119
+ // past the top edge — the inner panel scrolls (max-height) when the
120
+ // menu is taller than the viewport.
119
121
  requestAnimationFrame(() => {
120
122
  const panelRect = panel.getBoundingClientRect()
121
123
  const viewportH = window.innerHeight
122
124
  if (panelRect.bottom > viewportH - 8) {
123
125
  const overflow = panelRect.bottom - (viewportH - 8)
124
- panel.style.top = `${parseFloat(panel.style.top) - overflow}px`
126
+ const top = Math.max(8, parseFloat(panel.style.top) - overflow)
127
+ panel.style.top = `${top}px`
125
128
  }
126
129
  })
127
130
  }
@@ -47,6 +47,11 @@ export default class extends Controller {
47
47
  }
48
48
 
49
49
  #onCancel(event) {
50
+ // `cancel` bubbles, so a descendant firing it — most notably an
51
+ // <input type="file"> whose picker was dismissed — reaches this
52
+ // listener. That is not a request to close the modal; only the
53
+ // dialog's own cancel (Escape) targets the dialog element itself.
54
+ if (event.target !== this.element) return;
50
55
  // Another listener (typically dirty-form-guard) already handled
51
56
  // this — don't double-process.
52
57
  if (event.defaultPrevented) return;
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.53.0
4
+ version: 0.54.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-05-31 00:00:00.000000000 Z
10
+ date: 2026-06-01 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: zeitwerk
@@ -671,6 +671,7 @@ files:
671
671
  - docs/superpowers/specs/2026-05-13-docs-restructure-design.md
672
672
  - docs/superpowers/specs/2026-05-15-public-pages-overhaul-design.md
673
673
  - docs/superpowers/specs/2026-05-29-avatar-component-design.md
674
+ - docs/superpowers/specs/2026-06-01-interaction-repeater-inputs-design.md
674
675
  - esbuild.config.js
675
676
  - exe/pug
676
677
  - gemfiles/rails_7.gemfile
@@ -1229,7 +1230,7 @@ metadata:
1229
1230
  homepage_uri: https://radioactive-labs.github.io/plutonium-core/
1230
1231
  source_code_uri: https://github.com/radioactive-labs/plutonium-core
1231
1232
  post_install_message: |
1232
- ⚠️ Plutonium 0.53.0 — breaking change
1233
+ ⚠️ Plutonium 0.54.0 — breaking change
1233
1234
 
1234
1235
  Entity-scoped URL helpers and path params have been renamed from
1235
1236
  `<entity>_scope_*` to `<entity>_scoped_*`.