plutonium 0.53.1 → 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.
@@ -27613,6 +27613,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
27613
27613
  this.#animateClose();
27614
27614
  }
27615
27615
  #onCancel(event) {
27616
+ if (event.target !== this.element) return;
27616
27617
  if (event.defaultPrevented) return;
27617
27618
  event.preventDefault();
27618
27619
  this.#animateClose();
@@ -28066,7 +28067,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28066
28067
  const viewportH = window.innerHeight;
28067
28068
  if (panelRect.bottom > viewportH - 8) {
28068
28069
  const overflow = panelRect.bottom - (viewportH - 8);
28069
- panel.style.top = `${parseFloat(panel.style.top) - overflow}px`;
28070
+ const top2 = Math.max(8, parseFloat(panel.style.top) - overflow);
28071
+ panel.style.top = `${top2}px`;
28070
28072
  }
28071
28073
  });
28072
28074
  }
@@ -28125,9 +28127,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28125
28127
  // src/js/controllers/capture_url_controller.js
28126
28128
  var capture_url_controller_default = class extends Controller {
28127
28129
  connect() {
28128
- if ("value" in this.element) {
28129
- this.element.value = window.location.href;
28130
- }
28130
+ if (!("value" in this.element)) return;
28131
+ const base = this.element.value;
28132
+ if (!base) return;
28133
+ const { hash: hash3 } = window.location;
28134
+ if (!hash3) return;
28135
+ this.element.value = base.split("#")[0] + hash3;
28131
28136
  }
28132
28137
  };
28133
28138
 
@@ -28212,9 +28217,9 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28212
28217
  this.confirmDialogTarget.removeEventListener("cancel", this.onConfirmCancel);
28213
28218
  }
28214
28219
  }
28215
- async discard() {
28220
+ discard() {
28216
28221
  this.forceClose = true;
28217
- await this.#closeConfirm();
28222
+ this.#snapConfirmClosed();
28218
28223
  this.dialog.dispatchEvent(new CustomEvent("modal:request-close"));
28219
28224
  }
28220
28225
  keepEditing() {
@@ -28258,6 +28263,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28258
28263
  this.#promptDiscard();
28259
28264
  }
28260
28265
  #onCancel(event) {
28266
+ if (event.target !== this.dialog) return;
28261
28267
  if (this.forceClose || this.submitting) return;
28262
28268
  if (!this.#isDirty()) return;
28263
28269
  event.preventDefault();
@@ -28285,6 +28291,16 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
28285
28291
  this.dialog.dispatchEvent(new CustomEvent("modal:request-close"));
28286
28292
  }
28287
28293
  }
28294
+ // Close the confirm immediately, skipping its exit transition. Used by
28295
+ // discard(), where the parent modal is about to animate away and a
28296
+ // separate confirm fade would only stutter against the modal's live
28297
+ // backdrop blur.
28298
+ #snapConfirmClosed() {
28299
+ if (!this.hasConfirmDialogTarget) return;
28300
+ const d4 = this.confirmDialogTarget;
28301
+ d4.removeAttribute("data-open");
28302
+ if (d4.open) d4.close();
28303
+ }
28288
28304
  async #closeConfirm() {
28289
28305
  if (!this.hasConfirmDialogTarget) return;
28290
28306
  const d4 = this.confirmDialogTarget;