@muibook/components 15.0.0 → 15.0.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.
@@ -4,11 +4,10 @@ import "../mui-stack/vstack/index.js";
4
4
  import "../mui-stack/hstack/index.js";
5
5
  import "../mui-button/index.js";
6
6
  import "../mui-icons/warning/index.js";
7
- import "../mui-dialog/index.js";
8
7
  import "../mui-select/index.js";
9
- class R extends HTMLElement {
8
+ class C extends HTMLElement {
10
9
  constructor() {
11
- super(), this.defaultSlot = null, this.headerSlot = null, this.headerAfterSlot = null, this.headerDescriptionSlot = null, this.footerSlot = null, this.footerAfterSlot = null, this.footerDescriptionSlot = null, this.notesSlot = null, this.imageSlot = null, this.stageEl = null, this.surfaceEl = null, this.nativeFullscreenActive = !1, this.pointerStartX = null, this.pointerStartY = null, this.onSlotChange = () => this.syncSections(), this.onChromeSlotChange = () => this.syncChromeState(), this.onSurfaceClick = (e) => this.handleSurfaceClick(e), this.onPointerDown = (e) => this.handlePointerDown(e), this.onPointerUp = (e) => this.handlePointerUp(e), this.onKeyDown = (e) => this.handleArrowNavigation(e), this.onFullscreenChange = () => this.handleFullscreenChange(), this.onFullscreenError = () => this.handleFullscreenError(), this.onWindowResize = () => this.updateFullscreenSurfaceFit(), this.onDocumentKeyDown = (e) => {
10
+ super(), this.defaultSlot = null, this.headerSlot = null, this.headerAfterSlot = null, this.headerDescriptionSlot = null, this.footerSlot = null, this.footerAfterSlot = null, this.footerDescriptionSlot = null, this.notesSlot = null, this.stageEl = null, this.surfaceEl = null, this.nativeFullscreenActive = !1, this.pointerStartX = null, this.pointerStartY = null, this.onSlotChange = () => this.syncSections(), this.onChromeSlotChange = () => this.syncChromeState(), this.onPointerDown = (e) => this.handlePointerDown(e), this.onPointerUp = (e) => this.handlePointerUp(e), this.onKeyDown = (e) => this.handleArrowNavigation(e), this.onFullscreenChange = () => this.handleFullscreenChange(), this.onFullscreenError = () => this.handleFullscreenError(), this.onWindowResize = () => this.updateFullscreenSurfaceFit(), this.onDocumentKeyDown = (e) => {
12
11
  const t = document.fullscreenElement === this;
13
12
  if (e.key === "Escape" && this.hasAttribute("present") && !t) {
14
13
  e.preventDefault(), this.resetPresentationState();
@@ -33,8 +32,6 @@ class R extends HTMLElement {
33
32
  "hide-header",
34
33
  "hide-footer",
35
34
  "hide-counter",
36
- "preview",
37
- "lightbox",
38
35
  "scroll",
39
36
  "fullscreen"
40
37
  ];
@@ -43,8 +40,8 @@ class R extends HTMLElement {
43
40
  this.hasAttribute("ratio") || this.setAttribute("ratio", "16:9"), this.hasAttribute("padding") || this.setAttribute("padding", "medium"), this.hasAttribute("active-section") || this.setAttribute("active-section", "0"), this.hasAttribute("variant") || this.setAttribute("variant", "default"), this.hasAttribute("radius") || this.setAttribute("radius", "default"), this.render(), this.syncSections(), this.syncChromeState(), this.addEventListener("keydown", this.onKeyDown), document.addEventListener("keydown", this.onDocumentKeyDown), document.addEventListener("fullscreenchange", this.onFullscreenChange), document.addEventListener("fullscreenerror", this.onFullscreenError), window.addEventListener("resize", this.onWindowResize);
44
41
  }
45
42
  disconnectedCallback() {
46
- var e, t, i, s, r, o, n, h, b, m, f, d;
47
- (e = this.defaultSlot) == null || e.removeEventListener("slotchange", this.onSlotChange), (t = this.headerSlot) == null || t.removeEventListener("slotchange", this.onChromeSlotChange), (i = this.headerAfterSlot) == null || i.removeEventListener("slotchange", this.onChromeSlotChange), (s = this.headerDescriptionSlot) == null || s.removeEventListener("slotchange", this.onChromeSlotChange), (r = this.footerSlot) == null || r.removeEventListener("slotchange", this.onChromeSlotChange), (o = this.footerAfterSlot) == null || o.removeEventListener("slotchange", this.onChromeSlotChange), (n = this.footerDescriptionSlot) == null || n.removeEventListener("slotchange", this.onChromeSlotChange), (h = this.notesSlot) == null || h.removeEventListener("slotchange", this.onChromeSlotChange), (b = this.imageSlot) == null || b.removeEventListener("slotchange", this.onChromeSlotChange), (m = this.surfaceEl) == null || m.removeEventListener("click", this.onSurfaceClick), (f = this.surfaceEl) == null || f.removeEventListener("pointerdown", this.onPointerDown), (d = this.surfaceEl) == null || d.removeEventListener("pointerup", this.onPointerUp), this.removeEventListener("keydown", this.onKeyDown), document.removeEventListener("keydown", this.onDocumentKeyDown), document.removeEventListener("fullscreenchange", this.onFullscreenChange), document.removeEventListener("fullscreenerror", this.onFullscreenError), window.removeEventListener("resize", this.onWindowResize);
43
+ var e, t, i, s, a, r, l, h, p, m;
44
+ (e = this.defaultSlot) == null || e.removeEventListener("slotchange", this.onSlotChange), (t = this.headerSlot) == null || t.removeEventListener("slotchange", this.onChromeSlotChange), (i = this.headerAfterSlot) == null || i.removeEventListener("slotchange", this.onChromeSlotChange), (s = this.headerDescriptionSlot) == null || s.removeEventListener("slotchange", this.onChromeSlotChange), (a = this.footerSlot) == null || a.removeEventListener("slotchange", this.onChromeSlotChange), (r = this.footerAfterSlot) == null || r.removeEventListener("slotchange", this.onChromeSlotChange), (l = this.footerDescriptionSlot) == null || l.removeEventListener("slotchange", this.onChromeSlotChange), (h = this.notesSlot) == null || h.removeEventListener("slotchange", this.onChromeSlotChange), (p = this.surfaceEl) == null || p.removeEventListener("pointerdown", this.onPointerDown), (m = this.surfaceEl) == null || m.removeEventListener("pointerup", this.onPointerUp), this.removeEventListener("keydown", this.onKeyDown), document.removeEventListener("keydown", this.onDocumentKeyDown), document.removeEventListener("fullscreenchange", this.onFullscreenChange), document.removeEventListener("fullscreenerror", this.onFullscreenError), window.removeEventListener("resize", this.onWindowResize);
48
45
  }
49
46
  attributeChangedCallback(e, t, i) {
50
47
  t !== i && (this.render(), this.syncSections(), this.syncChromeState());
@@ -160,8 +157,8 @@ class R extends HTMLElement {
160
157
  syncSections() {
161
158
  if (!this.shadowRoot) return;
162
159
  const e = this.getSections(), t = this.getActiveSectionIndex(), i = this.hasAttribute("present") || e.length > 1;
163
- e.forEach((s, r) => {
164
- s.setAttribute("data-slide-section", ""), r === t ? (s.removeAttribute("slide-hidden"), s.setAttribute("slide-active", "")) : (s.removeAttribute("slide-active"), i ? s.setAttribute("slide-hidden", "") : s.removeAttribute("slide-hidden"));
160
+ e.forEach((s, a) => {
161
+ s.setAttribute("data-slide-section", ""), a === t ? (s.removeAttribute("slide-hidden"), s.setAttribute("slide-active", "")) : (s.removeAttribute("slide-active"), i ? s.setAttribute("slide-hidden", "") : s.removeAttribute("slide-hidden"));
165
162
  }), this.style.setProperty("--slide-frame-ratio", this.resolveRatio()), this.updateFullscreenSurfaceFit();
166
163
  }
167
164
  handleArrowNavigation(e) {
@@ -188,7 +185,7 @@ class R extends HTMLElement {
188
185
  return !!(i && this.contains(i));
189
186
  }
190
187
  render() {
191
- var r, o, n, h, b, m, f, d, c, S, w, y, u, g, a, l, p, x, E, A;
188
+ var a, r, l, h, p, m, b, v, d, S, w, y, c, u, o, n, g, E;
192
189
  if (!this.shadowRoot) return;
193
190
  const e = (this.getAttribute("title") || "").trim(), t = (this.getAttribute("footer-text") || "").trim(), i = this.escapeHtml(e), s = this.escapeHtml(t);
194
191
  this.shadowRoot.innerHTML = /*html*/
@@ -313,21 +310,11 @@ class R extends HTMLElement {
313
310
  :host([present]) .surface {
314
311
  overflow: auto !important;
315
312
  }
316
- :host([preview]) .stage {
317
- border-color: var(--slide-frame-preview-border-color, var(--text-color-warning));
318
- }
319
- :host([preview]:not([variant="plain"]):not([variant="ghost"])) .stage {
320
- box-shadow:
321
- var(--slide-frame-shadow),
322
- 0 0 0 var(--stroke-size-100) color-mix(in srgb, var(--slide-frame-preview-border-color, var(--text-color-warning)) 45%, transparent);
323
- }
324
- :host([preview][variant="plain"]) .stage,
325
- :host([preview][variant="ghost"]) .stage {
326
- box-shadow: 0 0 0 var(--stroke-size-100) color-mix(in srgb, var(--slide-frame-preview-border-color, var(--text-color-warning)) 45%, transparent);
327
- }
328
313
  .header,
329
314
  .footer {
330
315
  display: block;
316
+ width: 100%;
317
+ box-sizing: border-box;
331
318
  }
332
319
  .header {
333
320
  padding:
@@ -402,14 +389,6 @@ class R extends HTMLElement {
402
389
  :host([present]) .stage {
403
390
  background: var(--slide-frame-background-present, var(--slide-frame-background));
404
391
  }
405
- .lightbox-image {
406
- display: block;
407
- width: 100%;
408
- max-height: 75vh;
409
- height: auto;
410
- object-fit: contain;
411
- }
412
-
413
392
  .present-controls {
414
393
  display: grid;
415
394
  }
@@ -488,62 +467,47 @@ class R extends HTMLElement {
488
467
  </div>
489
468
  <div class="notes"><mui-body variant="optional" size="x-small">Notes...</mui-body><slot name="notes"></slot></div>
490
469
  </div>
491
- <mui-dialog id="lightboxDialog" width="min(94vw, 1200px)" content-padding="none">
492
- <mui-heading slot="title" size="5" level="3">Image Preview</mui-heading>
493
- <img id="lightboxImage" class="lightbox-image" alt="Slide image preview" />
494
- </mui-dialog>
495
- `, this.defaultSlot = this.shadowRoot.querySelector("slot:not([name])"), (r = this.defaultSlot) == null || r.addEventListener("slotchange", this.onSlotChange), this.headerSlot = this.shadowRoot.querySelector('slot[name="header"]'), this.headerAfterSlot = this.shadowRoot.querySelector('slot[name="header-after"]'), this.headerDescriptionSlot = this.shadowRoot.querySelector('slot[name="header-description"]'), this.footerSlot = this.shadowRoot.querySelector('slot[name="footer"]'), this.footerAfterSlot = this.shadowRoot.querySelector('slot[name="footer-after"]'), this.notesSlot = this.shadowRoot.querySelector('slot[name="notes"]'), this.imageSlot = this.shadowRoot.querySelector('slot[name="image"]'), this.stageEl = this.shadowRoot.querySelector(".stage"), this.surfaceEl = this.shadowRoot.querySelector(".surface"), (o = this.headerSlot) == null || o.addEventListener("slotchange", this.onChromeSlotChange), (n = this.headerAfterSlot) == null || n.addEventListener("slotchange", this.onChromeSlotChange), (h = this.headerDescriptionSlot) == null || h.addEventListener("slotchange", this.onChromeSlotChange), (b = this.footerSlot) == null || b.addEventListener("slotchange", this.onChromeSlotChange), (m = this.footerAfterSlot) == null || m.addEventListener("slotchange", this.onChromeSlotChange), (f = this.footerDescriptionSlot) == null || f.addEventListener("slotchange", this.onChromeSlotChange), (d = this.notesSlot) == null || d.addEventListener("slotchange", this.onChromeSlotChange), (c = this.surfaceEl) == null || c.addEventListener("click", this.onSurfaceClick), (S = this.surfaceEl) == null || S.addEventListener("pointerdown", this.onPointerDown), (w = this.surfaceEl) == null || w.addEventListener("pointerup", this.onPointerUp), this.style.setProperty("--slide-frame-ratio", this.resolveRatio()), (y = this.shadowRoot.querySelector("#lightboxDialog")) == null || y.addEventListener("mui-dialog-close", () => {
496
- this.dispatchEvent(new CustomEvent("lightbox-close", { bubbles: !0, composed: !0 }));
497
- }), (u = this.shadowRoot.querySelector("#notesActionBtn")) == null || u.addEventListener("click", () => {
470
+ `, this.defaultSlot = this.shadowRoot.querySelector("slot:not([name])"), (a = this.defaultSlot) == null || a.addEventListener("slotchange", this.onSlotChange), this.headerSlot = this.shadowRoot.querySelector('slot[name="header"]'), this.headerAfterSlot = this.shadowRoot.querySelector('slot[name="header-after"]'), this.headerDescriptionSlot = this.shadowRoot.querySelector('slot[name="header-description"]'), this.footerSlot = this.shadowRoot.querySelector('slot[name="footer"]'), this.footerAfterSlot = this.shadowRoot.querySelector('slot[name="footer-after"]'), this.notesSlot = this.shadowRoot.querySelector('slot[name="notes"]'), this.stageEl = this.shadowRoot.querySelector(".stage"), this.surfaceEl = this.shadowRoot.querySelector(".surface"), (r = this.headerSlot) == null || r.addEventListener("slotchange", this.onChromeSlotChange), (l = this.headerAfterSlot) == null || l.addEventListener("slotchange", this.onChromeSlotChange), (h = this.headerDescriptionSlot) == null || h.addEventListener("slotchange", this.onChromeSlotChange), (p = this.footerSlot) == null || p.addEventListener("slotchange", this.onChromeSlotChange), (m = this.footerAfterSlot) == null || m.addEventListener("slotchange", this.onChromeSlotChange), (b = this.footerDescriptionSlot) == null || b.addEventListener("slotchange", this.onChromeSlotChange), (v = this.notesSlot) == null || v.addEventListener("slotchange", this.onChromeSlotChange), (d = this.surfaceEl) == null || d.addEventListener("pointerdown", this.onPointerDown), (S = this.surfaceEl) == null || S.addEventListener("pointerup", this.onPointerUp), this.style.setProperty("--slide-frame-ratio", this.resolveRatio()), (w = this.shadowRoot.querySelector("#notesActionBtn")) == null || w.addEventListener("click", () => {
498
471
  this.toggleNotes();
499
- }), (g = this.shadowRoot.querySelector("#slideFrameAddSectionBtn")) == null || g.addEventListener("click", () => {
472
+ }), (y = this.shadowRoot.querySelector("#slideFrameAddSectionBtn")) == null || y.addEventListener("click", () => {
500
473
  this.addSection(`Section ${(this.getSections().length + 1).toString()}: New`);
501
- }), (a = this.shadowRoot.querySelector("#slideFramePrevSectionBtn")) == null || a.addEventListener("click", () => {
474
+ }), (c = this.shadowRoot.querySelector("#slideFramePrevSectionBtn")) == null || c.addEventListener("click", () => {
502
475
  this.prevSection();
503
- }), (l = this.shadowRoot.querySelector("#slideFrameNextSectionBtn")) == null || l.addEventListener("click", () => {
476
+ }), (u = this.shadowRoot.querySelector("#slideFrameNextSectionBtn")) == null || u.addEventListener("click", () => {
504
477
  this.nextSection();
505
- }), (p = this.shadowRoot.querySelector("#slideFrameToggleFullscreenBtn")) == null || p.addEventListener("click", () => {
478
+ }), (o = this.shadowRoot.querySelector("#slideFrameToggleFullscreenBtn")) == null || o.addEventListener("click", () => {
506
479
  if (this.hasAttribute("fullscreen") || document.fullscreenElement === this) {
507
480
  this.resetPresentationState(), this.exitFullscreen();
508
481
  return;
509
482
  }
510
- this.setAttribute("present", ""), this.setAttribute("fullscreen", ""), this.syncChromeState(), this.enterFullscreen().then((v) => {
511
- v && this.syncChromeState();
483
+ this.setAttribute("present", ""), this.setAttribute("fullscreen", ""), this.syncChromeState(), this.enterFullscreen().then((f) => {
484
+ f && this.syncChromeState();
512
485
  });
513
- }), (x = this.shadowRoot.querySelector("#slideFrameExitPresentBtn")) == null || x.addEventListener("click", () => {
486
+ }), (n = this.shadowRoot.querySelector("#slideFrameExitPresentBtn")) == null || n.addEventListener("click", () => {
514
487
  this.resetPresentationState(), this.exitFullscreen();
515
- }), (E = this.shadowRoot.querySelector("#slideFrameToggleNotesBtn")) == null || E.addEventListener("click", () => {
488
+ }), (g = this.shadowRoot.querySelector("#slideFrameToggleNotesBtn")) == null || g.addEventListener("click", () => {
516
489
  this.toggleNotes();
517
- }), (A = this.shadowRoot.querySelector("#slideFrameRatioSelect")) == null || A.addEventListener("change", (F) => {
518
- var C;
519
- const v = F.currentTarget, k = (v == null ? void 0 : v.value) || ((C = v == null ? void 0 : v.getAttribute) == null ? void 0 : C.call(v, "value")) || "16:9";
520
- this.setAttribute("ratio", k);
490
+ }), (E = this.shadowRoot.querySelector("#slideFrameRatioSelect")) == null || E.addEventListener("change", (A) => {
491
+ var x;
492
+ const f = A.currentTarget, F = (f == null ? void 0 : f.value) || ((x = f == null ? void 0 : f.getAttribute) == null ? void 0 : x.call(f, "value")) || "16:9";
493
+ this.setAttribute("ratio", F);
521
494
  }), requestAnimationFrame(() => this.updateFullscreenSurfaceFit());
522
495
  }
523
496
  syncChromeState() {
524
497
  if (!this.shadowRoot) return;
525
- const e = (a) => ((a == null ? void 0 : a.assignedNodes({ flatten: !0 })) || []).some(
526
- (l) => l.nodeType === Node.ELEMENT_NODE || (l.textContent || "").trim().length > 0
527
- ), t = !!(this.getAttribute("title") || "").trim(), i = !!(this.getAttribute("footer-text") || "").trim(), s = this.hasAttribute("hide-header"), r = this.hasAttribute("hide-footer"), o = !this.hasAttribute("hide-counter") && this.getSections().length > 0, n = !s && (t || e(this.headerSlot) || e(this.headerAfterSlot) || e(this.headerDescriptionSlot)), h = !r && (i || e(this.footerSlot) || e(this.footerAfterSlot) || e(this.footerDescriptionSlot) || o || this.hasAttribute("present") || this.hasAttribute("fullscreen")), b = e(this.notesSlot), m = this.hasAttribute("notes-open"), f = this.shadowRoot.querySelector("#headerRegion"), d = this.shadowRoot.querySelector("#footerRegion"), c = this.shadowRoot.querySelector("#footerCounter"), S = this.shadowRoot.querySelector("#slideFrameExitPresentBtn"), w = this.shadowRoot.querySelector("#slideFrameToggleFullscreenBtn"), y = this.shadowRoot.querySelector(".present-controls"), u = Math.max(this.getSections().length, 1), g = this.getActiveSectionIndex() + 1;
498
+ const e = (o) => ((o == null ? void 0 : o.assignedNodes({ flatten: !0 })) || []).some(
499
+ (n) => n.nodeType === Node.ELEMENT_NODE || (n.textContent || "").trim().length > 0
500
+ ), t = !!(this.getAttribute("title") || "").trim(), i = !!(this.getAttribute("footer-text") || "").trim(), s = this.hasAttribute("hide-header"), a = this.hasAttribute("hide-footer"), r = !this.hasAttribute("hide-counter") && this.getSections().length > 0, l = !s && (t || e(this.headerSlot) || e(this.headerAfterSlot) || e(this.headerDescriptionSlot)), h = !a && (i || e(this.footerSlot) || e(this.footerAfterSlot) || e(this.footerDescriptionSlot) || r || this.hasAttribute("present") || this.hasAttribute("fullscreen")), p = e(this.notesSlot), m = this.hasAttribute("notes-open"), b = this.shadowRoot.querySelector("#headerRegion"), v = this.shadowRoot.querySelector("#footerRegion"), d = this.shadowRoot.querySelector("#footerCounter"), S = this.shadowRoot.querySelector("#slideFrameExitPresentBtn"), w = this.shadowRoot.querySelector("#slideFrameToggleFullscreenBtn"), y = this.shadowRoot.querySelector(".present-controls"), c = Math.max(this.getSections().length, 1), u = this.getActiveSectionIndex() + 1;
528
501
  if (y) {
529
- const a = this.hasAttribute("fullscreen") || document.fullscreenElement === this;
530
- y.hidden = a;
502
+ const o = this.hasAttribute("fullscreen") || document.fullscreenElement === this;
503
+ y.hidden = o;
531
504
  }
532
- if (c) {
533
- c.hidden = !o;
534
- const a = Math.min(g, u), l = String(u).length;
535
- c.style.setProperty("--slide-frame-counter-digits", String(l)), c.setAttribute("aria-label", `Section ${a} of ${u}`), c.innerHTML = `Section <span class="counter-value">${a}</span>/<span class="counter-value">${u}</span>`;
505
+ if (d) {
506
+ d.hidden = !r;
507
+ const o = Math.min(u, c), n = String(c).length;
508
+ d.style.setProperty("--slide-frame-counter-digits", String(n)), d.setAttribute("aria-label", `Section ${o} of ${c}`), d.innerHTML = `Section <span class="counter-value">${o}</span>/<span class="counter-value">${c}</span>`;
536
509
  }
537
- S && (S.hidden = !this.hasAttribute("fullscreen")), w && (w.textContent = this.hasAttribute("fullscreen") ? "Exit Fullscreen" : "Full Screen"), f && (f.hidden = !n), d && (d.hidden = !h), this.toggleAttribute("has-header", n), this.toggleAttribute("has-footer", h), this.toggleAttribute("has-notes", b), this.toggleAttribute("notes-visible", m), this.toggleAttribute("has-chrome", n || h || m), this.updateFullscreenSurfaceFit();
538
- }
539
- handleSurfaceClick(e) {
540
- if (!this.hasAttribute("lightbox") || !this.imageSlot) return;
541
- const t = this.imageSlot.assignedElements({ flatten: !0 });
542
- if (t.length === 0) return;
543
- const i = e.composedPath();
544
- if (!t.some((o) => i.includes(o))) return;
545
- const r = this.resolveLightboxImage(i, t);
546
- !r || !r.src || this.openLightbox(r.src, r.alt || "Slide image preview");
510
+ S && (S.hidden = !this.hasAttribute("fullscreen")), w && (w.textContent = this.hasAttribute("fullscreen") ? "Exit Fullscreen" : "Full Screen"), b && (b.hidden = !l), v && (v.hidden = !h), this.toggleAttribute("has-header", l), this.toggleAttribute("has-footer", h), this.toggleAttribute("has-notes", p), this.toggleAttribute("notes-visible", m), this.toggleAttribute("has-chrome", l || h || m), this.updateFullscreenSurfaceFit();
547
511
  }
548
512
  handlePointerDown(e) {
549
513
  this.pointerStartX = e.clientX, this.pointerStartY = e.clientY;
@@ -584,34 +548,12 @@ class R extends HTMLElement {
584
548
  }
585
549
  const t = this.shadowRoot.querySelector(".frame"), i = this.shadowRoot.querySelector(".present-controls"), s = this.shadowRoot.querySelector(".notes");
586
550
  if (!t) return;
587
- const r = t.getBoundingClientRect(), o = getComputedStyle(t), n = parseFloat(o.paddingTop || "0") || 0, h = parseFloat(o.paddingBottom || "0") || 0, b = parseFloat(o.paddingLeft || "0") || 0, m = parseFloat(o.paddingRight || "0") || 0, f = parseFloat(o.rowGap || o.gap || "0") || 0, d = i && getComputedStyle(i).display !== "none" ? i.getBoundingClientRect().height : 0, c = s && getComputedStyle(s).display !== "none" ? s.getBoundingClientRect().height : 0, S = [d > 0, !0, c > 0].filter(Boolean).length, w = Math.max(0, S - 1), y = Math.max(0, r.width - b - m), u = Math.max(0, r.height - n - h - d - c - f * w), g = this.resolveRatioParts(), a = this.hasAttribute("fullscreen") || document.fullscreenElement === this;
588
- let l, p;
589
- a ? (p = u, l = p * (g.width / g.height)) : (l = y, p = l * (g.height / g.width), p > u && (p = u, l = p * (g.width / g.height))), this.stageEl.style.width = `${Math.max(0, Math.floor(l))}px`, this.stageEl.style.height = `${Math.max(0, Math.floor(p))}px`;
590
- }
591
- resolveLightboxImage(e, t) {
592
- var s;
593
- const i = e.find((r) => r instanceof HTMLImageElement);
594
- if (i instanceof HTMLImageElement) return i;
595
- for (const r of t) {
596
- if (r instanceof HTMLImageElement) return r;
597
- const o = (s = r.querySelector) == null ? void 0 : s.call(r, "img");
598
- if (o instanceof HTMLImageElement) return o;
599
- }
600
- return null;
601
- }
602
- openLightbox(e, t) {
603
- var r, o, n;
604
- const i = (r = this.shadowRoot) == null ? void 0 : r.querySelector("#lightboxDialog"), s = (o = this.shadowRoot) == null ? void 0 : o.querySelector("#lightboxImage");
605
- !i || !s || (s.src = e, s.alt = t, (n = i.open) == null || n.call(i), this.dispatchEvent(
606
- new CustomEvent("lightbox-open", {
607
- detail: { src: e, alt: t },
608
- bubbles: !0,
609
- composed: !0
610
- })
611
- ));
551
+ const a = t.getBoundingClientRect(), r = getComputedStyle(t), l = parseFloat(r.paddingTop || "0") || 0, h = parseFloat(r.paddingBottom || "0") || 0, p = parseFloat(r.paddingLeft || "0") || 0, m = parseFloat(r.paddingRight || "0") || 0, b = parseFloat(r.rowGap || r.gap || "0") || 0, v = i && getComputedStyle(i).display !== "none" ? i.getBoundingClientRect().height : 0, d = s && getComputedStyle(s).display !== "none" ? s.getBoundingClientRect().height : 0, S = [v > 0, !0, d > 0].filter(Boolean).length, w = Math.max(0, S - 1), y = Math.max(0, a.width - p - m), c = Math.max(0, a.height - l - h - v - d - b * w), u = this.resolveRatioParts(), o = this.hasAttribute("fullscreen") || document.fullscreenElement === this;
552
+ let n, g;
553
+ o ? (g = c, n = g * (u.width / u.height)) : (n = y, g = n * (u.height / u.width), g > c && (g = c, n = g * (u.width / u.height))), this.stageEl.style.width = `${Math.max(0, Math.floor(n))}px`, this.stageEl.style.height = `${Math.max(0, Math.floor(g))}px`;
612
554
  }
613
555
  escapeHtml(e) {
614
556
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
615
557
  }
616
558
  }
617
- customElements.get("mui-slide-frame") || customElements.define("mui-slide-frame", R);
559
+ customElements.get("mui-slide-frame") || customElements.define("mui-slide-frame", C);
@@ -1,6 +1,6 @@
1
1
 
2
2
  /* ================================================================================================== */
3
- /* Don't edit directly • Generated on Fri, 27 Feb 2026 13:01:27 GMT • muibook.com */
3
+ /* Don't edit directly • Generated on Fri, 27 Feb 2026 13:59:34 GMT • muibook.com */
4
4
  /* ================================================================================================== */
5
5
 
6
6
  /* ================================================================================================== */