@muibook/components 16.0.0 → 17.0.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.
@@ -1,13 +1,14 @@
1
1
  import "../mui-heading/index.js";
2
2
  import "../mui-body/index.js";
3
+ import "../mui-slide-section/index.js";
3
4
  import "../mui-stack/vstack/index.js";
4
5
  import "../mui-stack/hstack/index.js";
5
6
  import "../mui-button/index.js";
6
7
  import "../mui-icons/warning/index.js";
7
8
  import "../mui-select/index.js";
8
- class C extends HTMLElement {
9
+ class x extends HTMLElement {
9
10
  constructor() {
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.activeSectionEl = 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) => {
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.stageEl = null, this.activeSectionEl = null, this.nativeFullscreenActive = !1, this.onSlotChange = () => this.syncSections(), this.onChromeSlotChange = () => this.syncChromeState(), this.onKeyDown = (e) => this.handleArrowNavigation(e), this.onFullscreenChange = () => this.handleFullscreenChange(), this.onFullscreenError = () => this.handleFullscreenError(), this.onWindowResize = () => this.updateFullscreenSurfaceFit(), this.onDocumentKeyDown = (e) => {
11
12
  const t = document.fullscreenElement === this;
12
13
  if (e.key === "Escape" && this.hasAttribute("present") && !t) {
13
14
  e.preventDefault(), this.resetPresentationState();
@@ -39,8 +40,8 @@ class C extends HTMLElement {
39
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);
40
41
  }
41
42
  disconnectedCallback() {
42
- var e, t, i, s, n, o, l, d, f, c;
43
- (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), (n = this.footerSlot) == null || n.removeEventListener("slotchange", this.onChromeSlotChange), (o = this.footerAfterSlot) == null || o.removeEventListener("slotchange", this.onChromeSlotChange), (l = this.footerDescriptionSlot) == null || l.removeEventListener("slotchange", this.onChromeSlotChange), (d = this.notesSlot) == null || d.removeEventListener("slotchange", this.onChromeSlotChange), (f = this.surfaceEl) == null || f.removeEventListener("pointerdown", this.onPointerDown), (c = this.surfaceEl) == null || c.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, r, n, d, h;
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), (r = this.footerSlot) == null || r.removeEventListener("slotchange", this.onChromeSlotChange), (n = this.footerAfterSlot) == null || n.removeEventListener("slotchange", this.onChromeSlotChange), (d = this.footerDescriptionSlot) == null || d.removeEventListener("slotchange", this.onChromeSlotChange), (h = this.notesSlot) == null || h.removeEventListener("slotchange", this.onChromeSlotChange), 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);
44
45
  }
45
46
  attributeChangedCallback(e, t, i) {
46
47
  t !== i && (this.render(), this.syncSections(), this.syncChromeState());
@@ -71,8 +72,9 @@ class C extends HTMLElement {
71
72
  this.nativeFullscreenActive = !1, this.removeAttribute("present"), this.removeAttribute("fullscreen"), this.syncChromeState();
72
73
  }
73
74
  getSections() {
74
- var t;
75
- return (((t = this.defaultSlot) == null ? void 0 : t.assignedElements({ flatten: !0 })) || []).filter((i) => !["header", "footer"].includes(i.getAttribute("slot") || ""));
75
+ var s;
76
+ const t = (((s = this.defaultSlot) == null ? void 0 : s.assignedElements({ flatten: !0 })) || []).filter((r) => !["header", "footer"].includes(r.getAttribute("slot") || "")), i = t.filter((r) => r.tagName.toLowerCase() === "mui-slide-section");
77
+ return i.length > 0 ? i : t;
76
78
  }
77
79
  getActiveSectionIndex() {
78
80
  const e = this.getSections(), t = parseInt(this.getAttribute("active-section") || "0", 10);
@@ -105,22 +107,37 @@ class C extends HTMLElement {
105
107
  })
106
108
  );
107
109
  }
110
+ createDefaultSection(e) {
111
+ const t = document.createElement("mui-slide-section"), i = document.createElement("mui-v-stack");
112
+ i.setAttribute("space", "var(--space-400)"), i.setAttribute("alignx", "center"), i.setAttribute("aligny", "center");
113
+ const s = document.createElement("mui-body");
114
+ return s.setAttribute("size", "large"), s.textContent = e, i.appendChild(s), t.appendChild(i), t;
115
+ }
108
116
  addSection(e) {
109
- const t = document.createElement("mui-v-stack");
110
- if (t.setAttribute("space", "var(--space-400)"), t.setAttribute("alignx", "center"), t.setAttribute("aligny", "center"), t.setAttribute("data-slide-section", ""), typeof e == "string") {
111
- const n = document.createElement("mui-body");
112
- n.setAttribute("size", "large"), n.textContent = e, t.appendChild(n);
113
- } else e instanceof HTMLElement && t.appendChild(e);
114
- this.appendChild(t);
115
- const i = this.getSections(), s = Math.max(0, i.length - 1);
116
- this.setActiveSectionIndex(s), this.syncSections(), this.dispatchEvent(
117
+ const t = `Section ${(this.getSections().length + 1).toString()}`;
118
+ let i;
119
+ typeof e == "string" ? i = this.createDefaultSection(e) : e instanceof HTMLElement ? e.tagName.toLowerCase() === "mui-slide-section" ? i = e : (i = document.createElement("mui-slide-section"), i.appendChild(e)) : i = this.createDefaultSection(t), this.appendChild(i);
120
+ const s = this.getSections(), r = Math.max(0, s.length - 1);
121
+ this.setActiveSectionIndex(r), this.syncSections(), this.dispatchEvent(
117
122
  new CustomEvent("section-add", {
118
- detail: { index: s, total: i.length },
123
+ detail: { index: r, total: s.length },
119
124
  bubbles: !0,
120
125
  composed: !0
121
126
  })
122
127
  );
123
128
  }
129
+ requestAddSection() {
130
+ const e = this.getSections().length, t = new CustomEvent("section-add-request", {
131
+ detail: {
132
+ index: e,
133
+ total: e + 1
134
+ },
135
+ bubbles: !0,
136
+ composed: !0,
137
+ cancelable: !0
138
+ });
139
+ this.dispatchEvent(t) && this.addSection(`Section ${(e + 1).toString()}`);
140
+ }
124
141
  toggleNotes(e) {
125
142
  const t = typeof e == "boolean" ? e : !this.hasAttribute("notes-open");
126
143
  this.toggleAttribute("notes-open", t), this.dispatchEvent(
@@ -153,8 +170,8 @@ class C extends HTMLElement {
153
170
  let t = this.getActiveSectionIndex();
154
171
  this.activeSectionEl && e.includes(this.activeSectionEl) && (t = e.indexOf(this.activeSectionEl)), t = Math.max(0, Math.min(t, Math.max(0, e.length - 1))), (this.getAttribute("active-section") || "0") !== String(t) && this.setAttribute("active-section", String(t));
155
172
  const i = this.hasAttribute("present") || e.length > 1;
156
- e.forEach((s, n) => {
157
- s.setAttribute("data-slide-section", ""), n === t ? (s.removeAttribute("slide-hidden"), s.setAttribute("slide-active", "")) : (s.removeAttribute("slide-active"), i ? s.setAttribute("slide-hidden", "") : s.removeAttribute("slide-hidden"));
173
+ e.forEach((s, r) => {
174
+ 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"));
158
175
  }), this.activeSectionEl = e[t] ?? null, this.style.setProperty("--slide-frame-ratio", this.resolveRatio()), this.updateFullscreenSurfaceFit();
159
176
  }
160
177
  handleArrowNavigation(e) {
@@ -181,7 +198,7 @@ class C extends HTMLElement {
181
198
  return !!(i && this.contains(i));
182
199
  }
183
200
  render() {
184
- var n, o, l, d, f, c, b, v, h, S, y, w, u, a, p, m, r, E;
201
+ var r, n, d, h, w, p, v, f, c, b, S, y, u, l, g, m;
185
202
  if (!this.shadowRoot) return;
186
203
  const e = (this.getAttribute("title") || "").trim(), t = (this.getAttribute("footer-text") || "").trim(), i = this.escapeHtml(e), s = this.escapeHtml(t);
187
204
  this.shadowRoot.innerHTML = /*html*/
@@ -459,59 +476,51 @@ class C extends HTMLElement {
459
476
  </div>
460
477
  <div class="notes"><mui-body variant="optional" size="x-small">Notes...</mui-body><slot name="notes"></slot></div>
461
478
  </div>
462
- `, this.defaultSlot = this.shadowRoot.querySelector("slot:not([name])"), (n = this.defaultSlot) == null || n.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"), (o = this.headerSlot) == null || o.addEventListener("slotchange", this.onChromeSlotChange), (l = this.headerAfterSlot) == null || l.addEventListener("slotchange", this.onChromeSlotChange), (d = this.headerDescriptionSlot) == null || d.addEventListener("slotchange", this.onChromeSlotChange), (f = this.footerSlot) == null || f.addEventListener("slotchange", this.onChromeSlotChange), (c = this.footerAfterSlot) == null || c.addEventListener("slotchange", this.onChromeSlotChange), (b = this.footerDescriptionSlot) == null || b.addEventListener("slotchange", this.onChromeSlotChange), (v = this.notesSlot) == null || v.addEventListener("slotchange", this.onChromeSlotChange), (h = this.surfaceEl) == null || h.addEventListener("pointerdown", this.onPointerDown), (S = this.surfaceEl) == null || S.addEventListener("pointerup", this.onPointerUp), this.style.setProperty("--slide-frame-ratio", this.resolveRatio()), (y = this.shadowRoot.querySelector("#notesActionBtn")) == null || y.addEventListener("click", () => {
479
+ `, 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.stageEl = this.shadowRoot.querySelector(".stage"), (n = this.headerSlot) == null || n.addEventListener("slotchange", this.onChromeSlotChange), (d = this.headerAfterSlot) == null || d.addEventListener("slotchange", this.onChromeSlotChange), (h = this.headerDescriptionSlot) == null || h.addEventListener("slotchange", this.onChromeSlotChange), (w = this.footerSlot) == null || w.addEventListener("slotchange", this.onChromeSlotChange), (p = this.footerAfterSlot) == null || p.addEventListener("slotchange", this.onChromeSlotChange), (v = this.footerDescriptionSlot) == null || v.addEventListener("slotchange", this.onChromeSlotChange), (f = this.notesSlot) == null || f.addEventListener("slotchange", this.onChromeSlotChange), this.style.setProperty("--slide-frame-ratio", this.resolveRatio()), (c = this.shadowRoot.querySelector("#notesActionBtn")) == null || c.addEventListener("click", () => {
463
480
  this.toggleNotes();
464
- }), (w = this.shadowRoot.querySelector("#slideFrameAddSectionBtn")) == null || w.addEventListener("click", () => {
465
- this.addSection(`Section ${(this.getSections().length + 1).toString()}`);
466
- }), (u = this.shadowRoot.querySelector("#slideFramePrevSectionBtn")) == null || u.addEventListener("click", () => {
481
+ }), (b = this.shadowRoot.querySelector("#slideFrameAddSectionBtn")) == null || b.addEventListener("click", () => {
482
+ this.requestAddSection();
483
+ }), (S = this.shadowRoot.querySelector("#slideFramePrevSectionBtn")) == null || S.addEventListener("click", () => {
467
484
  this.prevSection();
468
- }), (a = this.shadowRoot.querySelector("#slideFrameNextSectionBtn")) == null || a.addEventListener("click", () => {
485
+ }), (y = this.shadowRoot.querySelector("#slideFrameNextSectionBtn")) == null || y.addEventListener("click", () => {
469
486
  this.nextSection();
470
- }), (p = this.shadowRoot.querySelector("#slideFrameToggleFullscreenBtn")) == null || p.addEventListener("click", () => {
487
+ }), (u = this.shadowRoot.querySelector("#slideFrameToggleFullscreenBtn")) == null || u.addEventListener("click", () => {
471
488
  if (this.hasAttribute("fullscreen") || document.fullscreenElement === this) {
472
489
  this.resetPresentationState(), this.exitFullscreen();
473
490
  return;
474
491
  }
475
- this.setAttribute("present", ""), this.setAttribute("fullscreen", ""), this.syncChromeState(), this.enterFullscreen().then((g) => {
476
- g && this.syncChromeState();
492
+ this.setAttribute("present", ""), this.setAttribute("fullscreen", ""), this.syncChromeState(), this.enterFullscreen().then((a) => {
493
+ a && this.syncChromeState();
477
494
  });
478
- }), (m = this.shadowRoot.querySelector("#slideFrameExitPresentBtn")) == null || m.addEventListener("click", () => {
495
+ }), (l = this.shadowRoot.querySelector("#slideFrameExitPresentBtn")) == null || l.addEventListener("click", () => {
479
496
  this.resetPresentationState(), this.exitFullscreen();
480
- }), (r = this.shadowRoot.querySelector("#slideFrameToggleNotesBtn")) == null || r.addEventListener("click", () => {
497
+ }), (g = this.shadowRoot.querySelector("#slideFrameToggleNotesBtn")) == null || g.addEventListener("click", () => {
481
498
  this.toggleNotes();
482
- }), (E = this.shadowRoot.querySelector("#slideFrameRatioSelect")) == null || E.addEventListener("change", (A) => {
483
- var x;
484
- const g = A.currentTarget, F = (g == null ? void 0 : g.value) || ((x = g == null ? void 0 : g.getAttribute) == null ? void 0 : x.call(g, "value")) || "16:9";
485
- this.setAttribute("ratio", F);
499
+ }), (m = this.shadowRoot.querySelector("#slideFrameRatioSelect")) == null || m.addEventListener("change", (o) => {
500
+ var A;
501
+ const a = o.currentTarget, E = (a == null ? void 0 : a.value) || ((A = a == null ? void 0 : a.getAttribute) == null ? void 0 : A.call(a, "value")) || "16:9";
502
+ this.setAttribute("ratio", E);
486
503
  }), requestAnimationFrame(() => this.updateFullscreenSurfaceFit());
487
504
  }
488
505
  syncChromeState() {
489
506
  if (!this.shadowRoot) return;
490
- const e = (r) => ((r == null ? void 0 : r.assignedNodes({ flatten: !0 })) || []).some(
491
- (E) => E.nodeType === Node.ELEMENT_NODE || (E.textContent || "").trim().length > 0
492
- ), t = !!(this.getAttribute("title") || "").trim(), i = !!(this.getAttribute("footer-text") || "").trim(), s = this.hasAttribute("hide-header"), n = this.hasAttribute("hide-footer"), o = !this.hasAttribute("hide-counter") && this.getSections().length > 0, l = !s && (t || e(this.headerSlot) || e(this.headerAfterSlot) || e(this.headerDescriptionSlot)), d = !n && (i || e(this.footerSlot) || e(this.footerAfterSlot) || e(this.footerDescriptionSlot) || o || this.hasAttribute("present") || this.hasAttribute("fullscreen")), f = e(this.notesSlot), c = this.hasAttribute("notes-open"), b = this.shadowRoot.querySelector("#headerRegion"), v = this.shadowRoot.querySelector("#footerRegion"), h = this.shadowRoot.querySelector("#footerCounter"), S = this.shadowRoot.querySelector("#slideFrameExitPresentBtn"), y = this.shadowRoot.querySelector("#slideFrameToggleFullscreenBtn"), w = this.shadowRoot.querySelector(".present-controls"), u = this.shadowRoot.querySelector("#slideFrameAddSectionBtn"), a = this.shadowRoot.querySelector("#slideFrameAddSectionRule"), p = Math.max(this.getSections().length, 1), m = this.getActiveSectionIndex() + 1;
493
- if (w) {
494
- const r = this.hasAttribute("fullscreen") || document.fullscreenElement === this;
495
- w.hidden = r;
507
+ const e = (o) => ((o == null ? void 0 : o.assignedNodes({ flatten: !0 })) || []).some(
508
+ (a) => a.nodeType === Node.ELEMENT_NODE || (a.textContent || "").trim().length > 0
509
+ ), t = !!(this.getAttribute("title") || "").trim(), i = !!(this.getAttribute("footer-text") || "").trim(), s = this.hasAttribute("hide-header"), r = this.hasAttribute("hide-footer"), n = !this.hasAttribute("hide-counter") && this.getSections().length > 0, d = !s && (t || e(this.headerSlot) || e(this.headerAfterSlot) || e(this.headerDescriptionSlot)), h = !r && (i || e(this.footerSlot) || e(this.footerAfterSlot) || e(this.footerDescriptionSlot) || n || this.hasAttribute("present") || this.hasAttribute("fullscreen")), w = e(this.notesSlot), p = this.hasAttribute("notes-open"), v = this.shadowRoot.querySelector("#headerRegion"), f = this.shadowRoot.querySelector("#footerRegion"), c = this.shadowRoot.querySelector("#footerCounter"), b = this.shadowRoot.querySelector("#slideFrameExitPresentBtn"), S = this.shadowRoot.querySelector("#slideFrameToggleFullscreenBtn"), y = this.shadowRoot.querySelector(".present-controls"), u = this.shadowRoot.querySelector("#slideFrameAddSectionBtn"), l = this.shadowRoot.querySelector("#slideFrameAddSectionRule"), g = Math.max(this.getSections().length, 1), m = this.getActiveSectionIndex() + 1;
510
+ if (y) {
511
+ const o = this.hasAttribute("fullscreen") || document.fullscreenElement === this;
512
+ y.hidden = o;
496
513
  }
497
514
  if (u) {
498
- const r = this.hasAttribute("allow-add-section");
499
- u.hidden = !r, u.style.display = r ? "" : "none", a && (a.hidden = !r), a && (a.style.display = r ? "" : "none");
515
+ const o = this.hasAttribute("allow-add-section");
516
+ u.hidden = !o, u.style.display = o ? "" : "none", l && (l.hidden = !o), l && (l.style.display = o ? "" : "none");
500
517
  }
501
- if (h) {
502
- h.hidden = !o;
503
- const r = Math.min(m, p), E = String(p).length;
504
- h.style.setProperty("--slide-frame-counter-digits", String(E)), h.setAttribute("aria-label", `Section ${r} of ${p}`), h.innerHTML = `Section <span class="counter-value">${r}</span>/<span class="counter-value">${p}</span>`;
518
+ if (c) {
519
+ c.hidden = !n;
520
+ const o = Math.min(m, g), a = String(g).length;
521
+ c.style.setProperty("--slide-frame-counter-digits", String(a)), c.setAttribute("aria-label", `Section ${o} of ${g}`), c.innerHTML = `Section <span class="counter-value">${o}</span>/<span class="counter-value">${g}</span>`;
505
522
  }
506
- S && (S.hidden = !this.hasAttribute("fullscreen")), y && (y.textContent = this.hasAttribute("fullscreen") ? "Exit Fullscreen" : "Full Screen"), b && (b.hidden = !l), v && (v.hidden = !d), this.toggleAttribute("has-header", l), this.toggleAttribute("has-footer", d), this.toggleAttribute("has-notes", f), this.toggleAttribute("notes-visible", c), this.toggleAttribute("has-chrome", l || d || c), this.updateFullscreenSurfaceFit();
507
- }
508
- handlePointerDown(e) {
509
- this.pointerStartX = e.clientX, this.pointerStartY = e.clientY;
510
- }
511
- handlePointerUp(e) {
512
- if (this.pointerStartX == null || this.pointerStartY == null || this.getSections().length < 2) return;
513
- const t = e.clientX - this.pointerStartX, i = e.clientY - this.pointerStartY;
514
- this.pointerStartX = null, this.pointerStartY = null, !(Math.abs(t) < 40 || Math.abs(t) <= Math.abs(i)) && (t < 0 ? this.nextSection() : this.prevSection());
523
+ b && (b.hidden = !this.hasAttribute("fullscreen")), S && (S.textContent = this.hasAttribute("fullscreen") ? "Exit Fullscreen" : "Full Screen"), v && (v.hidden = !d), f && (f.hidden = !h), this.toggleAttribute("has-header", d), this.toggleAttribute("has-footer", h), this.toggleAttribute("has-notes", w), this.toggleAttribute("notes-visible", p), this.toggleAttribute("has-chrome", d || h || p), this.updateFullscreenSurfaceFit();
515
524
  }
516
525
  handleFullscreenChange() {
517
526
  const e = document.fullscreenElement === this, t = this.hasAttribute("fullscreen");
@@ -544,12 +553,12 @@ class C extends HTMLElement {
544
553
  }
545
554
  const t = this.shadowRoot.querySelector(".frame"), i = this.shadowRoot.querySelector(".present-controls"), s = this.shadowRoot.querySelector(".notes");
546
555
  if (!t) return;
547
- const n = t.getBoundingClientRect(), o = getComputedStyle(t), l = parseFloat(o.paddingTop || "0") || 0, d = parseFloat(o.paddingBottom || "0") || 0, f = parseFloat(o.paddingLeft || "0") || 0, c = parseFloat(o.paddingRight || "0") || 0, b = parseFloat(o.rowGap || o.gap || "0") || 0, v = i && getComputedStyle(i).display !== "none" ? i.getBoundingClientRect().height : 0, h = s && getComputedStyle(s).display !== "none" ? s.getBoundingClientRect().height : 0, S = [v > 0, !0, h > 0].filter(Boolean).length, y = Math.max(0, S - 1), w = Math.max(0, n.width - f - c), u = Math.max(0, n.height - l - d - v - h - b * y), a = this.resolveRatioParts(), p = this.hasAttribute("fullscreen") || document.fullscreenElement === this;
548
- let m, r;
549
- p ? (r = u, m = r * (a.width / a.height)) : (m = w, r = m * (a.height / a.width), r > u && (r = u, m = r * (a.width / a.height))), this.stageEl.style.width = `${Math.max(0, Math.floor(m))}px`, this.stageEl.style.height = `${Math.max(0, Math.floor(r))}px`;
556
+ const r = t.getBoundingClientRect(), n = getComputedStyle(t), d = parseFloat(n.paddingTop || "0") || 0, h = parseFloat(n.paddingBottom || "0") || 0, w = parseFloat(n.paddingLeft || "0") || 0, p = parseFloat(n.paddingRight || "0") || 0, v = parseFloat(n.rowGap || n.gap || "0") || 0, f = i && getComputedStyle(i).display !== "none" ? i.getBoundingClientRect().height : 0, c = s && getComputedStyle(s).display !== "none" ? s.getBoundingClientRect().height : 0, b = [f > 0, !0, c > 0].filter(Boolean).length, S = Math.max(0, b - 1), y = Math.max(0, r.width - w - p), u = Math.max(0, r.height - d - h - f - c - v * S), l = this.resolveRatioParts(), g = this.hasAttribute("fullscreen") || document.fullscreenElement === this;
557
+ let m, o;
558
+ g ? (o = u, m = o * (l.width / l.height)) : (m = y, o = m * (l.height / l.width), o > u && (o = u, m = o * (l.width / l.height))), this.stageEl.style.width = `${Math.max(0, Math.floor(m))}px`, this.stageEl.style.height = `${Math.max(0, Math.floor(o))}px`;
550
559
  }
551
560
  escapeHtml(e) {
552
561
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
553
562
  }
554
563
  }
555
- customElements.get("mui-slide-frame") || customElements.define("mui-slide-frame", C);
564
+ customElements.get("mui-slide-frame") || customElements.define("mui-slide-frame", x);
@@ -0,0 +1,23 @@
1
+ class e extends HTMLElement {
2
+ constructor() {
3
+ super(), this.attachShadow({ mode: "open" });
4
+ }
5
+ connectedCallback() {
6
+ this.render();
7
+ }
8
+ render() {
9
+ this.shadowRoot && (this.shadowRoot.innerHTML = /*html*/
10
+ `
11
+ <style>
12
+ :host {
13
+ display: block;
14
+ width: 100%;
15
+ min-width: 0;
16
+ box-sizing: border-box;
17
+ }
18
+ </style>
19
+ <slot></slot>
20
+ `);
21
+ }
22
+ }
23
+ customElements.get("mui-slide-section") || customElements.define("mui-slide-section", e);
@@ -1,6 +1,6 @@
1
1
 
2
2
  /* ================================================================================================== */
3
- /* Don't edit directly • Generated on Sat, 28 Feb 2026 04:44:42 GMT • muibook.com */
3
+ /* Don't edit directly • Generated on Sat, 28 Feb 2026 05:07:44 GMT • muibook.com */
4
4
  /* ================================================================================================== */
5
5
 
6
6
  /* ================================================================================================== */