@muibook/components 19.5.1 → 20.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.
Files changed (54) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/agent/keywords/index.js +41 -2
  3. package/dist/esm/agent/prompts/index.js +14 -11
  4. package/dist/esm/components/mui-addon/index.js +14 -14
  5. package/dist/esm/components/mui-avatar/index.js +4 -1
  6. package/dist/esm/components/mui-badge/index.js +35 -18
  7. package/dist/esm/components/mui-body/index.js +57 -14
  8. package/dist/esm/components/mui-button/index.js +187 -52
  9. package/dist/esm/components/mui-card/body/index.js +1 -1
  10. package/dist/esm/components/mui-chip/index.js +56 -26
  11. package/dist/esm/components/mui-chip-rail/index.js +239 -0
  12. package/dist/esm/components/mui-code/index.js +5 -5
  13. package/dist/esm/components/mui-dropdown/index.js +55 -46
  14. package/dist/esm/components/mui-file-upload/index.js +1 -0
  15. package/dist/esm/components/mui-form-message/index.js +21 -13
  16. package/dist/esm/components/mui-heading/index.js +47 -10
  17. package/dist/esm/components/mui-hint/index.js +2 -2
  18. package/dist/esm/components/mui-input/index.js +21 -17
  19. package/dist/esm/components/mui-link/index.js +199 -55
  20. package/dist/esm/components/mui-message/index.js +7 -6
  21. package/dist/esm/components/mui-prompt/index.js +102 -102
  22. package/dist/esm/components/mui-rule/index.js +8 -1
  23. package/dist/esm/components/mui-select/index.js +4 -4
  24. package/dist/esm/components/mui-slat/slat/index.js +9 -1
  25. package/dist/esm/components/mui-stack/hstack/index.js +10 -5
  26. package/dist/esm/components/mui-status/index.js +239 -0
  27. package/dist/esm/components/mui-stepper/step/index.js +46 -32
  28. package/dist/esm/components/mui-switch/index.js +21 -13
  29. package/dist/esm/components/mui-tabs/controller/index.js +17 -6
  30. package/dist/esm/components/mui-tabs/item/index.js +17 -5
  31. package/dist/esm/components/mui-tabs/tab-bar/index.js +93 -39
  32. package/dist/esm/components/mui-video-thumbnail/index.js +205 -0
  33. package/dist/esm/css/mui-brand.css +3 -1
  34. package/dist/esm/css/mui-tokens.css +270 -78
  35. package/dist/esm/custom-elements.json +2608 -1900
  36. package/dist/esm/dynamic-attrs.json +26 -6
  37. package/dist/esm/index.js +7 -4
  38. package/dist/esm/tokens/js/index.js +119 -118
  39. package/dist/types/components/mui-body/api.d.ts +9 -2
  40. package/dist/types/components/mui-button/api.d.ts +4 -0
  41. package/dist/types/components/mui-chip/api.d.ts +4 -0
  42. package/dist/types/components/mui-chip-rail/api.d.ts +21 -0
  43. package/dist/types/components/mui-chip-rail/doc.d.ts +2 -0
  44. package/dist/types/components/mui-chip-rail/index.d.ts +3 -0
  45. package/dist/types/components/mui-link/api.d.ts +4 -0
  46. package/dist/types/components/mui-status/api.d.ts +24 -0
  47. package/dist/types/components/mui-status/doc.d.ts +2 -0
  48. package/dist/types/components/mui-status/index.d.ts +1 -0
  49. package/dist/types/components/mui-video-thumbnail/api.d.ts +28 -0
  50. package/dist/types/components/mui-video-thumbnail/doc.d.ts +2 -0
  51. package/dist/types/components/mui-video-thumbnail/index.d.ts +1 -0
  52. package/dist/types/index.d.ts +3 -0
  53. package/dist/types/tokens/js/index.d.ts +1 -0
  54. package/package.json +13 -1
@@ -20,8 +20,8 @@ class S extends HTMLElement {
20
20
  constructor() {
21
21
  super(), this.triggerEl = null, this.previewShellEl = null, this.previewRowEl = null, this.previewSlotEl = null, this.previewResizeObserver = null, this.fanAnimations = /* @__PURE__ */ new Map(), this.pendingColorFade = !1, this.lastDebugPayload = '{"event":"idle"}', this.lightDomObserver = null, this.onActionsSlotChange = () => this.updateActionsLayout(), this.enforceActionVariants = () => {
22
22
  if (!this.shadowRoot) return;
23
- const e = Array.from(this.shadowRoot.querySelectorAll('slot[name="actions"], slot[name="actions-right"]')), o = (r, n) => {
24
- if (!n || r.tagName.toLowerCase() !== "mui-button") return;
23
+ const e = Array.from(this.shadowRoot.querySelectorAll('slot[name="actions"], slot[name="actions-right"]')), o = (r, s) => {
24
+ if (!s || r.tagName.toLowerCase() !== "mui-button") return;
25
25
  if (r.hasAttribute("icon-only")) {
26
26
  r.style.marginRight = "var(--space-025)";
27
27
  return;
@@ -29,16 +29,16 @@ class S extends HTMLElement {
29
29
  r.style.marginRight === "var(--space-025)" && (r.style.marginRight = "");
30
30
  };
31
31
  e.forEach((r) => {
32
- const n = r.name === "actions";
32
+ const s = r.name === "actions";
33
33
  r.assignedElements({ flatten: !0 }).forEach((a) => {
34
34
  [a, ...Array.from(a.querySelectorAll("*"))].forEach((m) => {
35
35
  const p = m.tagName.toLowerCase();
36
36
  if (p === "mui-button") {
37
- m.setAttribute("variant", "tertiary"), o(m, n);
37
+ m.setAttribute("variant", "tertiary"), o(m, s);
38
38
  return;
39
39
  }
40
40
  p === "mui-dropdown" && m.querySelectorAll('[slot="action"]').forEach((d) => {
41
- d instanceof HTMLElement && d.tagName.toLowerCase() === "mui-button" && (d.setAttribute("variant", "tertiary"), o(d, n));
41
+ d instanceof HTMLElement && d.tagName.toLowerCase() === "mui-button" && (d.setAttribute("variant", "tertiary"), o(d, s));
42
42
  });
43
43
  });
44
44
  });
@@ -48,35 +48,35 @@ class S extends HTMLElement {
48
48
  }, this.onPaste = (t) => {
49
49
  const e = t, o = e.clipboardData;
50
50
  if (!o) return;
51
- const r = Array.from(o.files || []), n = o.getData("text/plain") || "", i = n.trim(), a = i.length > 0, l = a ? this.detectMediaUrl(i) : null, m = this.getAttribute("preview-overflow-to-preview") !== "false", p = this.getAttribute("preview-threshold-chars"), c = Number.isFinite(Number.parseInt(p || "", 10)) ? Math.max(1, Number.parseInt(p || "", 10)) : 220, d = a ? this.detectBadge(i) : "", u = d !== "" && d !== "Insightful", b = m && a && (!!(l != null && l.url) || i.length >= c || u), h = r.length > 0;
52
- if (!h && !a) return;
53
- (h || b) && e.preventDefault();
54
- const v = r.map((s) => ({
55
- kind: s.type.startsWith("image/") ? "image" : s.type.startsWith("video/") ? "video" : s.type.startsWith("audio/") ? "audio" : "file",
56
- mimeType: s.type || "",
57
- file: s,
58
- fileName: s.name || "",
59
- size: s.size || 0,
60
- badge: s.type.startsWith("image/") ? "IMG" : s.type.startsWith("video/") ? "VIDEO" : s.type.startsWith("audio/") ? "MUSIC" : "FILE",
61
- preview: s.name || "Pasted file",
62
- value: s.name || ""
51
+ const r = Array.from(o.files || []), s = o.getData("text/plain") || "", i = s.trim(), a = i.length > 0, l = a ? this.detectMediaUrl(i) : null, m = this.getAttribute("preview-overflow-to-preview") !== "false", p = this.getAttribute("preview-threshold-chars"), c = Number.isFinite(Number.parseInt(p || "", 10)) ? Math.max(1, Number.parseInt(p || "", 10)) : 220, d = a ? this.detectBadge(i) : "", h = d !== "" && d !== "Insightful", b = m && a && (!!(l != null && l.url) || i.length >= c || h), v = r.length > 0;
52
+ if (!v && !a) return;
53
+ (v || b) && e.preventDefault();
54
+ const n = r.map((u) => ({
55
+ kind: u.type.startsWith("image/") ? "image" : u.type.startsWith("video/") ? "video" : u.type.startsWith("audio/") ? "audio" : "file",
56
+ mimeType: u.type || "",
57
+ file: u,
58
+ fileName: u.name || "",
59
+ size: u.size || 0,
60
+ badge: u.type.startsWith("image/") ? "IMG" : u.type.startsWith("video/") ? "VIDEO" : u.type.startsWith("audio/") ? "MUSIC" : "FILE",
61
+ preview: u.name || "Pasted file",
62
+ value: u.name || ""
63
63
  }));
64
- b && i && (l != null && l.url ? v.unshift({
64
+ b && i && (l != null && l.url ? n.unshift({
65
65
  kind: l.kind === "image" ? "image" : "text",
66
66
  mimeType: l.mimeType,
67
67
  badge: l.badge,
68
68
  preview: l.url,
69
69
  value: l.url
70
- }) : v.unshift({
70
+ }) : n.unshift({
71
71
  kind: "text",
72
72
  mimeType: "text/plain",
73
73
  badge: this.detectBadge(i),
74
74
  preview: i.slice(0, 260),
75
- value: n
75
+ value: s
76
76
  })), this.emitPromptItems({
77
77
  source: "paste",
78
- items: v,
79
- text: n || "",
78
+ items: n,
79
+ text: s || "",
80
80
  textBadge: (l == null ? void 0 : l.badge) || d,
81
81
  overflowed: b,
82
82
  thresholdChars: c
@@ -135,8 +135,8 @@ class S extends HTMLElement {
135
135
  }, this.onContextChipDismiss = (t) => {
136
136
  t.composedPath().find(
137
137
  (r) => {
138
- var n, i, a;
139
- return r instanceof HTMLElement && (((n = r.hasAttribute) == null ? void 0 : n.call(r, "context-active")) || ((i = r.hasAttribute) == null ? void 0 : i.call(r, "context-chip")) || ((a = r.hasAttribute) == null ? void 0 : a.call(r, "context-spinner")));
138
+ var s, i, a;
139
+ return r instanceof HTMLElement && (((s = r.hasAttribute) == null ? void 0 : s.call(r, "context-active")) || ((i = r.hasAttribute) == null ? void 0 : i.call(r, "context-chip")) || ((a = r.hasAttribute) == null ? void 0 : a.call(r, "context-spinner")));
140
140
  }
141
141
  ) && (this.setContextMode("icon", "dismiss"), this.updateActionsLayout());
142
142
  }, this.toggleFanOpen = () => {
@@ -183,17 +183,17 @@ class S extends HTMLElement {
183
183
  }
184
184
  setDebugState(t, e) {
185
185
  if (!this.shadowRoot) return;
186
- const o = this.shadowRoot.querySelector(".debug-region"), r = this.shadowRoot.querySelector("#promptDebugStatus"), n = this.shadowRoot.querySelector("#promptDebugPayload");
187
- if (!o || !r || !n) return;
186
+ const o = this.shadowRoot.querySelector(".debug-region"), r = this.shadowRoot.querySelector("#promptDebugStatus"), s = this.shadowRoot.querySelector("#promptDebugPayload");
187
+ if (!o || !r || !s) return;
188
188
  const i = this.hasAttribute("debug");
189
- o.toggleAttribute("hidden", !i), i && (r.textContent = t, e && (this.lastDebugPayload = JSON.stringify(e)), n.textContent = this.lastDebugPayload);
189
+ o.toggleAttribute("hidden", !i), i && (r.textContent = t, e && (this.lastDebugPayload = JSON.stringify(e)), s.textContent = this.lastDebugPayload);
190
190
  }
191
191
  emitPromptItems({
192
192
  items: t,
193
193
  text: e,
194
194
  textBadge: o,
195
195
  overflowed: r,
196
- thresholdChars: n,
196
+ thresholdChars: s,
197
197
  source: i
198
198
  }) {
199
199
  this.dispatchEvent(
@@ -204,7 +204,7 @@ class S extends HTMLElement {
204
204
  text: e,
205
205
  textBadge: o,
206
206
  overflowed: r,
207
- thresholdChars: n,
207
+ thresholdChars: s,
208
208
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
209
209
  },
210
210
  bubbles: !0,
@@ -286,9 +286,9 @@ class S extends HTMLElement {
286
286
  return;
287
287
  }
288
288
  if (t === "context-mode") {
289
- const n = this.normalizeContextMode(o);
290
- if (o !== n) {
291
- this.setAttribute("context-mode", n);
289
+ const s = this.normalizeContextMode(o);
290
+ if (o !== s) {
291
+ this.setAttribute("context-mode", s);
292
292
  return;
293
293
  }
294
294
  this.syncContextModeUI(), this.updateActionsLayout();
@@ -434,10 +434,10 @@ class S extends HTMLElement {
434
434
  t == null || t.focus();
435
435
  }
436
436
  syncTextareaHeight(t) {
437
- const o = Number.parseInt(this.getAttribute("rows") || String(3), 10) || 3, r = Math.max(o + 6, 10), n = getComputedStyle(t), a = (Number.parseFloat(n.fontSize) || 16) * 1.55, l = Number.parseFloat(n.paddingTop) || 0, m = Number.parseFloat(n.paddingBottom) || 0, p = Number.parseFloat(n.borderTopWidth) || 0, c = Number.parseFloat(n.borderBottomWidth) || 0, d = l + m + p + c, u = 3 * a + d, b = r * a + d;
437
+ const o = Number.parseInt(this.getAttribute("rows") || String(3), 10) || 3, r = Math.max(o + 6, 10), s = getComputedStyle(t), a = (Number.parseFloat(s.fontSize) || 16) * 1.55, l = Number.parseFloat(s.paddingTop) || 0, m = Number.parseFloat(s.paddingBottom) || 0, p = Number.parseFloat(s.borderTopWidth) || 0, c = Number.parseFloat(s.borderBottomWidth) || 0, d = l + m + p + c, h = 3 * a + d, b = r * a + d;
438
438
  t.style.height = "auto";
439
- const h = t.scrollHeight, v = Math.max(u, Math.min(h, b));
440
- t.style.height = `${Math.ceil(v)}px`, t.style.overflowY = h > b ? "auto" : "hidden";
439
+ const v = t.scrollHeight, n = Math.max(h, Math.min(v, b));
440
+ t.style.height = `${Math.ceil(n)}px`, t.style.overflowY = v > b ? "auto" : "hidden";
441
441
  }
442
442
  detectBadge(t) {
443
443
  const e = t.trim();
@@ -476,7 +476,7 @@ class S extends HTMLElement {
476
476
  const o = e.match(/https?:\/\/[^\s]+/i), r = ((o == null ? void 0 : o[0]) || e).trim();
477
477
  if (!/^https?:\/\//i.test(r)) return null;
478
478
  try {
479
- const n = new URL(r), i = n.pathname.toLowerCase(), a = n.hostname.toLowerCase();
479
+ const s = new URL(r), i = s.pathname.toLowerCase(), a = s.hostname.toLowerCase();
480
480
  if (/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/.test(i))
481
481
  return { url: r, kind: "image", badge: "IMG", mimeType: "image/*" };
482
482
  if (a === "youtu.be" || a.endsWith("youtube.com") || a.endsWith("youtube-nocookie.com"))
@@ -495,13 +495,13 @@ class S extends HTMLElement {
495
495
  return null;
496
496
  }
497
497
  bindEvents() {
498
- var n;
498
+ var s;
499
499
  if (!this.shadowRoot) return;
500
500
  this.unbindEvents();
501
501
  const t = this.shadowRoot.querySelector("textarea");
502
502
  t == null || t.addEventListener("input", this.onInput), t == null || t.addEventListener("keydown", this.onKeyDown), t == null || t.addEventListener("paste", this.onPaste), t == null || t.addEventListener("focus", this.onTextareaFocus);
503
503
  const e = this.shadowRoot.querySelector('slot[name="actions"]'), o = this.shadowRoot.querySelector('slot[name="actions-right"]'), r = this.shadowRoot.querySelector("#promptDefaultSubmitAction");
504
- e == null || e.addEventListener("slotchange", this.onActionsSlotChange), o == null || o.addEventListener("slotchange", this.onActionsSlotChange), typeof MutationObserver < "u" && ((n = this.lightDomObserver) == null || n.disconnect(), this.lightDomObserver = new MutationObserver(() => this.updateActionsLayout()), this.lightDomObserver.observe(this, {
504
+ e == null || e.addEventListener("slotchange", this.onActionsSlotChange), o == null || o.addEventListener("slotchange", this.onActionsSlotChange), typeof MutationObserver < "u" && ((s = this.lightDomObserver) == null || s.disconnect(), this.lightDomObserver = new MutationObserver(() => this.updateActionsLayout()), this.lightDomObserver.observe(this, {
505
505
  childList: !0,
506
506
  subtree: !0,
507
507
  attributes: !0,
@@ -509,10 +509,10 @@ class S extends HTMLElement {
509
509
  })), r == null || r.addEventListener("click", this.onDefaultSubmitClick), this.addEventListener("prompt-preview-open", this.onPreviewOpen), this.addEventListener("click", this.onContextToggleClick), this.addEventListener("dismiss", this.onContextChipDismiss), this.syncErrorVisibility(), this.bindPreviewOverflow(), this.bindActionTrigger(), this.syncLoadingState();
510
510
  }
511
511
  unbindEvents() {
512
- var n, i, a, l;
512
+ var s, i, a, l;
513
513
  if (!this.shadowRoot) return;
514
514
  const t = this.shadowRoot.querySelector("textarea"), e = this.shadowRoot.querySelector('slot[name="actions"]'), o = this.shadowRoot.querySelector('slot[name="actions-right"]'), r = this.shadowRoot.querySelector("#promptDefaultSubmitAction");
515
- t == null || t.removeEventListener("input", this.onInput), t == null || t.removeEventListener("keydown", this.onKeyDown), t == null || t.removeEventListener("paste", this.onPaste), t == null || t.removeEventListener("focus", this.onTextareaFocus), r == null || r.removeEventListener("click", this.onDefaultSubmitClick), e == null || e.removeEventListener("slotchange", this.onActionsSlotChange), o == null || o.removeEventListener("slotchange", this.onActionsSlotChange), this.removeEventListener("prompt-preview-open", this.onPreviewOpen), this.removeEventListener("click", this.onContextToggleClick), this.removeEventListener("dismiss", this.onContextChipDismiss), this.triggerEl && (this.triggerEl.removeEventListener("click", this.toggleFanOpen), this.triggerEl = null), (n = this.previewRowEl) == null || n.removeEventListener("scroll", this.onPreviewScroll), (i = this.previewSlotEl) == null || i.removeEventListener("slotchange", this.onPreviewSlotChange), (a = this.previewResizeObserver) == null || a.disconnect(), this.previewResizeObserver = null, (l = this.lightDomObserver) == null || l.disconnect(), this.lightDomObserver = null, this.previewShellEl = null, this.previewRowEl = null, this.previewSlotEl = null;
515
+ t == null || t.removeEventListener("input", this.onInput), t == null || t.removeEventListener("keydown", this.onKeyDown), t == null || t.removeEventListener("paste", this.onPaste), t == null || t.removeEventListener("focus", this.onTextareaFocus), r == null || r.removeEventListener("click", this.onDefaultSubmitClick), e == null || e.removeEventListener("slotchange", this.onActionsSlotChange), o == null || o.removeEventListener("slotchange", this.onActionsSlotChange), this.removeEventListener("prompt-preview-open", this.onPreviewOpen), this.removeEventListener("click", this.onContextToggleClick), this.removeEventListener("dismiss", this.onContextChipDismiss), this.triggerEl && (this.triggerEl.removeEventListener("click", this.toggleFanOpen), this.triggerEl = null), (s = this.previewRowEl) == null || s.removeEventListener("scroll", this.onPreviewScroll), (i = this.previewSlotEl) == null || i.removeEventListener("slotchange", this.onPreviewSlotChange), (a = this.previewResizeObserver) == null || a.disconnect(), this.previewResizeObserver = null, (l = this.lightDomObserver) == null || l.disconnect(), this.lightDomObserver = null, this.previewShellEl = null, this.previewRowEl = null, this.previewSlotEl = null;
516
516
  }
517
517
  bindPreviewOverflow() {
518
518
  var t, e;
@@ -539,54 +539,54 @@ class S extends HTMLElement {
539
539
  });
540
540
  return;
541
541
  }
542
- const n = e === "auto" ? this.hasAttribute("loading") : !0;
542
+ const s = e === "auto" ? this.hasAttribute("loading") : !0;
543
543
  r.forEach((a) => {
544
- a.tagName.toLowerCase() === "mui-prompt-preview" && (n ? a.setAttribute("loading", "") : a.removeAttribute("loading"), o && a.setAttribute("loading-label", o));
544
+ a.tagName.toLowerCase() === "mui-prompt-preview" && (s ? a.setAttribute("loading", "") : a.removeAttribute("loading"), o && a.setAttribute("loading-label", o));
545
545
  });
546
546
  }
547
547
  normalizePreviewDetail(t) {
548
- const e = String(t.value || "").trim(), o = String(t.bgImage || "").trim(), r = String(t.badge || "").trim(), n = String(t.label || "Pasted Content"), i = String(t.imageTint || "").trim(), a = o ? "image" : e ? "code" : "text";
548
+ const e = String(t.value || "").trim(), o = String(t.bgImage || "").trim(), r = String(t.badge || "").trim(), s = String(t.label || "Pasted Content"), i = String(t.imageTint || "").trim(), a = o ? "image" : e ? "code" : "text";
549
549
  return {
550
550
  id: String(t.id || ""),
551
551
  value: e,
552
552
  badge: r || (o ? "IMG" : this.detectBadge(e)),
553
- label: n,
553
+ label: s,
554
554
  bgImage: o,
555
555
  imageTint: i,
556
556
  type: a
557
557
  };
558
558
  }
559
559
  openInternalPreviewDialog(t) {
560
- var f;
560
+ var w;
561
561
  if (!this.shadowRoot) return;
562
- const e = this.shadowRoot.querySelector("#promptAutoPreviewDialog"), o = this.shadowRoot.querySelector("#promptAutoPreviewTitle"), r = this.shadowRoot.querySelector("#promptAutoPreviewCode"), n = this.shadowRoot.querySelector("#promptAutoPreviewImage"), i = this.shadowRoot.querySelector("#promptAutoPreviewMedia"), a = this.shadowRoot.querySelector("#promptAutoPreviewMediaUrl"), l = this.normalizePreviewDetail(t), m = this.getAttribute("preview-dialog-title") || l.label, p = l.value, c = l.bgImage, d = l.badge, u = p ? this.detectMediaUrl(p) : null, b = !c && p.length > 0 && (d === "VIDEO" || d === "MUSIC"), h = !c && (!!(u && (u.kind === "video" || u.kind === "audio")) || b), v = c.length > 0, s = p.length > 0, y = (() => {
563
- if (!u || u.kind !== "audio") return !1;
562
+ const e = this.shadowRoot.querySelector("#promptAutoPreviewDialog"), o = this.shadowRoot.querySelector("#promptAutoPreviewTitle"), r = this.shadowRoot.querySelector("#promptAutoPreviewCode"), s = this.shadowRoot.querySelector("#promptAutoPreviewImage"), i = this.shadowRoot.querySelector("#promptAutoPreviewMedia"), a = this.shadowRoot.querySelector("#promptAutoPreviewMediaUrl"), l = this.normalizePreviewDetail(t), m = this.getAttribute("preview-dialog-title") || l.label, p = l.value, c = l.bgImage, d = l.badge, h = p ? this.detectMediaUrl(p) : null, b = !c && p.length > 0 && (d === "VIDEO" || d === "MUSIC"), v = !c && (!!(h && (h.kind === "video" || h.kind === "audio")) || b), n = c.length > 0, u = p.length > 0, y = (() => {
563
+ if (!h || h.kind !== "audio") return !1;
564
564
  try {
565
- const g = new URL(u.url);
566
- return /\.(mp3|wav|m4a|aac|flac|ogg|oga)$/.test(g.pathname.toLowerCase());
565
+ const f = new URL(h.url);
566
+ return /\.(mp3|wav|m4a|aac|flac|ogg|oga)$/.test(f.pathname.toLowerCase());
567
567
  } catch {
568
568
  return !1;
569
569
  }
570
- })(), w = (() => {
571
- if (!u || !y) return "";
570
+ })(), g = (() => {
571
+ if (!h || !y) return "";
572
572
  try {
573
- const x = new URL(u.url).pathname.split("/").filter(Boolean).pop() || "", A = decodeURIComponent(x), E = A.replace(/\.(mp3|wav|m4a|aac|flac|ogg|oga)$/i, "") || A || "Audio";
573
+ const A = new URL(h.url).pathname.split("/").filter(Boolean).pop() || "", x = decodeURIComponent(A), E = x.replace(/\.(mp3|wav|m4a|aac|flac|ogg|oga)$/i, "") || x || "Audio";
574
574
  return E.charAt(0).toUpperCase() + E.slice(1);
575
575
  } catch {
576
576
  return "Audio";
577
577
  }
578
578
  })();
579
- if (!(!v && !s && !h)) {
580
- if (this.setAttribute("preview-dialog-value", p), this.setAttribute("preview-dialog-image", c), this.setAttribute("preview-dialog-type", d || (v ? "IMG" : "CODE")), o && (o.textContent = m), h ? e == null || e.setAttribute("content-max-height", "none") : e == null || e.removeAttribute("content-max-height"), v)
581
- a && a.setAttribute("hidden", ""), n && (n.setAttribute("src", c), n.removeAttribute("hidden")), i && i.setAttribute("hidden", ""), r && r.setAttribute("hidden", "");
582
- else if (h && u) {
579
+ if (!(!n && !u && !v)) {
580
+ if (this.setAttribute("preview-dialog-value", p), this.setAttribute("preview-dialog-image", c), this.setAttribute("preview-dialog-type", d || (n ? "IMG" : "CODE")), o && (o.textContent = m), v ? e == null || e.setAttribute("content-max-height", "none") : e == null || e.removeAttribute("content-max-height"), n)
581
+ a && a.setAttribute("hidden", ""), s && (s.setAttribute("src", c), s.removeAttribute("hidden")), i && i.setAttribute("hidden", ""), r && r.setAttribute("hidden", "");
582
+ else if (v && h) {
583
583
  if (a) {
584
- const g = y;
585
- a.textContent = g ? w : u.url, g ? (a.setAttribute("href", u.url), a.setAttribute("target", "_blank"), a.setAttribute("rel", "noopener noreferrer")) : (a.removeAttribute("href"), a.removeAttribute("target"), a.removeAttribute("rel")), a.toggleAttribute("hidden", !g);
584
+ const f = y;
585
+ a.textContent = f ? g : h.url, f ? (a.setAttribute("href", h.url), a.setAttribute("target", "_blank"), a.setAttribute("rel", "noopener noreferrer")) : (a.removeAttribute("href"), a.removeAttribute("target"), a.removeAttribute("rel")), a.toggleAttribute("hidden", !f);
586
586
  }
587
- i && (i.setAttribute("src", u.url), i.removeAttribute("type"), i.removeAttribute("prefer-native-controls"), i.removeAttribute("hidden")), r && r.setAttribute("hidden", ""), n && (n.removeAttribute("src"), n.setAttribute("hidden", ""));
588
- } else b ? (a && (a.textContent = p, a.toggleAttribute("hidden", !0)), i && (i.setAttribute("src", p), i.setAttribute("type", d === "VIDEO" ? "video" : "audio"), i.removeAttribute("prefer-native-controls"), i.removeAttribute("hidden")), r && r.setAttribute("hidden", ""), n && (n.removeAttribute("src"), n.setAttribute("hidden", ""))) : (a && a.setAttribute("hidden", ""), r && (r.textContent = this.formatPreviewCode(p, d), r.removeAttribute("hidden")), i && (i.removeAttribute("src"), i.removeAttribute("prefer-native-controls"), i.setAttribute("hidden", "")), n && (n.removeAttribute("src"), n.setAttribute("hidden", "")));
589
- (f = e == null ? void 0 : e.open) == null || f.call(e);
587
+ i && (i.setAttribute("src", h.url), i.removeAttribute("type"), i.removeAttribute("prefer-native-controls"), i.removeAttribute("hidden")), r && r.setAttribute("hidden", ""), s && (s.removeAttribute("src"), s.setAttribute("hidden", ""));
588
+ } else b ? (a && (a.textContent = p, a.toggleAttribute("hidden", !0)), i && (i.setAttribute("src", p), i.setAttribute("type", d === "VIDEO" ? "video" : "audio"), i.removeAttribute("prefer-native-controls"), i.removeAttribute("hidden")), r && r.setAttribute("hidden", ""), s && (s.removeAttribute("src"), s.setAttribute("hidden", ""))) : (a && a.setAttribute("hidden", ""), r && (r.textContent = this.formatPreviewCode(p, d), r.removeAttribute("hidden")), i && (i.removeAttribute("src"), i.removeAttribute("prefer-native-controls"), i.setAttribute("hidden", "")), s && (s.removeAttribute("src"), s.setAttribute("hidden", "")));
589
+ (w = e == null ? void 0 : e.open) == null || w.call(e);
590
590
  }
591
591
  }
592
592
  syncPreviewEdgeShadows() {
@@ -609,9 +609,9 @@ class S extends HTMLElement {
609
609
  e && (e.setAttribute("hidden", ""), e.style.display = "none");
610
610
  return;
611
611
  }
612
- const n = o.length === 1 && this.isContextOnlyAction(o[0]);
613
- e && (e.toggleAttribute("hidden", n), e.style.display = n ? "none" : "inline-flex");
614
- const i = n || !r ? null : e;
612
+ const s = o.length === 1 && this.isContextOnlyAction(o[0]);
613
+ e && (e.toggleAttribute("hidden", s), e.style.display = s ? "none" : "inline-flex");
614
+ const i = s || !r ? null : e;
615
615
  i && (this.triggerEl = i, this.triggerEl.addEventListener("click", this.toggleFanOpen), this.syncTriggerIconState());
616
616
  }
617
617
  syncTriggerIconState() {
@@ -636,64 +636,64 @@ class S extends HTMLElement {
636
636
  const t = this.shadowRoot.querySelector('slot[name="actions"]'), e = this.shadowRoot.querySelector("#promptDefaultActionsTrigger");
637
637
  if (!t) return;
638
638
  const o = t.assignedElements({ flatten: !0 }).filter(
639
- (s) => !s.hasAttribute("hidden")
640
- ), r = o.length > 0, n = this.shadowRoot.querySelector(".actions-slot-left");
641
- n && (n.style.display = r ? "inline-flex" : "none");
639
+ (n) => !n.hasAttribute("hidden")
640
+ ), r = o.length > 0, s = this.shadowRoot.querySelector(".actions-slot-left");
641
+ s && (s.style.display = r ? "inline-flex" : "none");
642
642
  const i = o.length === 1 && this.isContextOnlyAction(o[0]);
643
643
  if (e) {
644
- const s = !r || i;
645
- e.toggleAttribute("hidden", s), e.style.display = s ? "none" : "inline-flex";
644
+ const n = !r || i;
645
+ e.toggleAttribute("hidden", n), e.style.display = n ? "none" : "inline-flex";
646
646
  }
647
- const a = i || !r ? null : e, l = o.filter((s) => s !== a), m = a ? [a, ...l] : o, p = this.shadowRoot.querySelector('slot[name="actions-right"]'), c = (p == null ? void 0 : p.assignedElements({ flatten: !0 })) || [], d = l.length > 0;
647
+ const a = i || !r ? null : e, l = o.filter((n) => n !== a), m = a ? [a, ...l] : o, p = this.shadowRoot.querySelector('slot[name="actions-right"]'), c = (p == null ? void 0 : p.assignedElements({ flatten: !0 })) || [], d = l.length > 0;
648
648
  this.toggleAttribute("has-actions", r), this.toggleAttribute("has-extra-actions", d);
649
- const u = r || this.hasTruthyFlagAttribute("actions-fan"), b = this.hasAttribute("fan-open"), h = 100, v = "calc(var(--action-icon-only-size-medium) + var(--space-100))";
650
- this.enforceActionVariants(), m.forEach((s, y) => {
651
- s.style.transition = `transform ${h}ms ease, opacity ${h}ms ease`, s.style.zIndex = "";
652
- const w = this.fanAnimations.get(s);
653
- if (w && (w.cancel(), this.fanAnimations.delete(s)), !u) {
654
- this.setFanItemInert(s, !1), s.style.transitionDelay = "", s.style.transform = "", s.style.opacity = "", s.style.pointerEvents = "", s.style.filter = "";
649
+ const h = r || this.hasTruthyFlagAttribute("actions-fan"), b = this.hasAttribute("fan-open"), v = 100;
650
+ this.enforceActionVariants(), m.forEach((n, u) => {
651
+ n.style.transition = `transform ${v}ms ease, opacity ${v}ms ease`, n.style.zIndex = "";
652
+ const y = this.fanAnimations.get(n);
653
+ if (y && (y.cancel(), this.fanAnimations.delete(n)), !h) {
654
+ this.setFanItemInert(n, !1), n.style.transitionDelay = "", n.style.transform = "", n.style.opacity = "", n.style.pointerEvents = "", n.style.filter = "";
655
655
  return;
656
656
  }
657
- if (y === 0) {
658
- this.setFanItemInert(s, !1), s.style.transitionDelay = "", s.style.transform = "translateX(0)", s.style.opacity = "1", s.style.pointerEvents = "", s.style.filter = "";
657
+ if (u === 0) {
658
+ this.setFanItemInert(n, !1), n.style.transitionDelay = "", n.style.transform = "translateX(0)", n.style.opacity = "1", n.style.pointerEvents = "", n.style.filter = "";
659
659
  return;
660
660
  }
661
661
  if (!b) {
662
- this.setFanItemInert(s, !0), s.style.transitionDelay = "", s.style.transform = "translateX(0) scale(0.8)", s.style.opacity = "0", s.style.pointerEvents = "none", s.style.filter = "";
662
+ this.setFanItemInert(n, !0), n.style.transitionDelay = "", n.style.transform = "translateX(0) scale(0.8)", n.style.opacity = "0", n.style.pointerEvents = "none", n.style.filter = "";
663
663
  return;
664
664
  }
665
- const f = `calc(${v} * -${y})`, g = y * 50;
666
- s.style.transition = `opacity ${Math.max(120, h - 40)}ms ease, transform ${h}ms cubic-bezier(0.22, 1, 0.36, 1)`, s.style.transitionDelay = `${g}ms`, s.style.transform = "translateX(0) scale(0.92)", s.style.opacity = "0", s.style.pointerEvents = "none", s.style.filter = "", this.setFanItemInert(s, !0), requestAnimationFrame(() => {
667
- if (s.style.transform = `translateX(${f})`, s.style.opacity = "1", window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
668
- s.style.pointerEvents = "", this.setFanItemInert(s, !1);
665
+ const g = "0px", w = u * 50;
666
+ n.style.transition = `opacity ${Math.max(120, v - 40)}ms ease, transform ${v}ms cubic-bezier(0.22, 1, 0.36, 1)`, n.style.transitionDelay = `${w}ms`, n.style.transform = "translateX(0) scale(0.92)", n.style.opacity = "0", n.style.pointerEvents = "none", n.style.filter = "", this.setFanItemInert(n, !0), requestAnimationFrame(() => {
667
+ if (n.style.transform = `translateX(${g})`, n.style.opacity = "1", window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
668
+ n.style.pointerEvents = "", this.setFanItemInert(n, !1);
669
669
  return;
670
670
  }
671
- const A = s.animate(
671
+ const A = n.animate(
672
672
  [
673
673
  { transform: "translateX(0) scale(0.92)" },
674
- { transform: `translateX(${f}) scale(1.03)`, offset: 0.68 },
675
- { transform: `translateX(calc(${f} - var(--space-050))) scale(0.99)`, offset: 0.86 },
676
- { transform: `translateX(${f}) scale(1)` }
674
+ { transform: `translateX(${g}) scale(1.03)`, offset: 0.68 },
675
+ { transform: `translateX(calc(${g} - var(--space-050))) scale(0.99)`, offset: 0.86 },
676
+ { transform: `translateX(${g}) scale(1)` }
677
677
  ],
678
678
  {
679
- duration: h + 180,
680
- delay: g,
679
+ duration: v + 180,
680
+ delay: w,
681
681
  easing: "cubic-bezier(0.22, 1, 0.36, 1)",
682
682
  fill: "forwards"
683
683
  }
684
684
  );
685
- this.fanAnimations.set(s, A), A.finished.catch(() => {
685
+ this.fanAnimations.set(n, A), A.finished.catch(() => {
686
686
  }).finally(() => {
687
- s.style.pointerEvents = "", this.setFanItemInert(s, !1);
687
+ n.style.pointerEvents = "", this.setFanItemInert(n, !1);
688
688
  });
689
689
  });
690
- }), c.forEach((s) => {
691
- s.style.transition = "", s.style.zIndex = "";
690
+ }), c.forEach((n) => {
691
+ n.style.transition = "", n.style.zIndex = "";
692
692
  }), this.bindActionTrigger(), this.syncTriggerIconState();
693
693
  }
694
694
  render() {
695
695
  if (!this.shadowRoot) return;
696
- const t = this.getAttribute("placeholder") || "Reply to Mui...", e = this.getAttribute("value") || "", o = this.getAttribute("rows") || "3", r = this.hasAttribute("disabled"), n = this.getAttribute("preview-dialog-width") || "560px", i = this.getAttribute("color-top-start") || "", a = this.getAttribute("color-top-mid") || "", l = this.getAttribute("color-top-end") || "", m = this.getAttribute("color-top-accent") || "", c = (this.getAttribute("color-layout") || "default").toLowerCase() === "swap", d = c ? l || "var(--prompt-color-top-end, var(--green-500))" : i || "var(--prompt-color-top-start, var(--blue-500))", u = c ? m || "var(--prompt-color-top-accent, var(--orange-500))" : a || "var(--prompt-color-top-mid, var(--blue-500))", b = c ? i || "var(--prompt-color-top-start, var(--blue-500))" : l || "var(--prompt-color-top-end, var(--green-500))", h = c ? a || "var(--prompt-color-top-mid, var(--blue-500))" : m || "var(--prompt-color-top-accent, var(--orange-500))", v = this.getAttribute("aria-label"), s = this.getAttribute("aria-labelledby"), y = this.getAttribute("aria-describedby"), w = !v && !s ? "Prompt input" : "", f = (this.getAttribute("error-message") || "").trim(), g = f;
696
+ const t = this.getAttribute("placeholder") || "Reply to Mui...", e = this.getAttribute("value") || "", o = this.getAttribute("rows") || "3", r = this.hasAttribute("disabled"), s = this.getAttribute("preview-dialog-width") || "560px", i = this.getAttribute("color-top-start") || "", a = this.getAttribute("color-top-mid") || "", l = this.getAttribute("color-top-end") || "", m = this.getAttribute("color-top-accent") || "", c = (this.getAttribute("color-layout") || "default").toLowerCase() === "swap", d = c ? l || "var(--prompt-color-top-end, var(--green-500))" : i || "var(--prompt-color-top-start, var(--blue-500))", h = c ? m || "var(--prompt-color-top-accent, var(--orange-500))" : a || "var(--prompt-color-top-mid, var(--blue-500))", b = c ? i || "var(--prompt-color-top-start, var(--blue-500))" : l || "var(--prompt-color-top-end, var(--green-500))", v = c ? a || "var(--prompt-color-top-mid, var(--blue-500))" : m || "var(--prompt-color-top-accent, var(--orange-500))", n = this.getAttribute("aria-label"), u = this.getAttribute("aria-labelledby"), y = this.getAttribute("aria-describedby"), g = !n && !u ? "Prompt input" : "", w = (this.getAttribute("error-message") || "").trim(), f = w;
697
697
  this.shadowRoot.innerHTML = /*html*/
698
698
  `
699
699
  <style>
@@ -701,9 +701,9 @@ class S extends HTMLElement {
701
701
  display: block;
702
702
  --prompt-action-radius: var(--chip-radius-small, var(--radius-400));
703
703
  --prompt-color-top-start-source: ${d};
704
- --prompt-color-top-mid-source: ${u};
704
+ --prompt-color-top-mid-source: ${h};
705
705
  --prompt-color-top-end-source: ${b};
706
- --prompt-color-top-accent-source: ${h};
706
+ --prompt-color-top-accent-source: ${v};
707
707
  --prompt-accent-primary-derived: var(--prompt-accent-primary, var(--prompt-spectrum-start, var(--blue-500)));
708
708
  --prompt-accent-secondary-derived: var(--prompt-accent-secondary, var(--blue-500));
709
709
  --prompt-accent-mid: color-mix(
@@ -1421,10 +1421,10 @@ class S extends HTMLElement {
1421
1421
  <textarea
1422
1422
  rows="${o}"
1423
1423
  placeholder="${t}"
1424
- ${v ? `aria-label="${v.replace(/"/g, "&quot;")}"` : ""}
1425
- ${s ? `aria-labelledby="${s.replace(/"/g, "&quot;")}"` : ""}
1424
+ ${n ? `aria-label="${n.replace(/"/g, "&quot;")}"` : ""}
1425
+ ${u ? `aria-labelledby="${u.replace(/"/g, "&quot;")}"` : ""}
1426
1426
  ${y ? `aria-describedby="${y.replace(/"/g, "&quot;")}"` : ""}
1427
- ${w ? `aria-label="${w}"` : ""}
1427
+ ${g ? `aria-label="${g}"` : ""}
1428
1428
  ${r ? "disabled" : ""}
1429
1429
  >${e}</textarea>
1430
1430
  </slot>
@@ -1456,9 +1456,9 @@ class S extends HTMLElement {
1456
1456
  </div>
1457
1457
  <div class="error-region" hidden>
1458
1458
 
1459
- <mui-body size="x-small" variant="error" class="error-default" ${f ? "" : "hidden"}>
1459
+ <mui-body size="x-small" variant="error" class="error-default" ${w ? "" : "hidden"}>
1460
1460
  <mui-icon-attention slot="before"></mui-icon-attention>
1461
- <span class="error-text">${g}</span>
1461
+ <span class="error-text">${f}</span>
1462
1462
  </mui-body>
1463
1463
 
1464
1464
  </div>
@@ -1470,7 +1470,7 @@ class S extends HTMLElement {
1470
1470
 
1471
1471
  <mui-dialog
1472
1472
  id="promptAutoPreviewDialog"
1473
- width="${n}"
1473
+ width="${s}"
1474
1474
  content-padding="none"
1475
1475
  >
1476
1476
  <mui-heading id="promptAutoPreviewTitle" slot="title" size="5">Pasted Content</mui-heading>
@@ -15,8 +15,15 @@ class s extends HTMLElement {
15
15
  const t = !!this.closest("mui-card"), e = !!this.closest("mui-form-section"), i = !!this.closest("mui-dialog"), o = !!this.closest("mui-drawer");
16
16
  this.toggleAttribute("in-card", t), this.toggleAttribute("in-form-section", e), this.toggleAttribute("in-dialog", i), this.toggleAttribute("in-drawer", o);
17
17
  }
18
+ getRuleWeight() {
19
+ const t = this.getAttribute("weight") || "var(--stroke-size-100)";
20
+ return {
21
+ thin: "var(--stroke-size-100)",
22
+ thick: "var(--stroke-size-200)"
23
+ }[t] || t;
24
+ }
18
25
  updateStyles() {
19
- const t = this.getAttribute("length") || "100%", e = this.getAttribute("weight") || "1px", i = (
26
+ const t = this.getAttribute("length") || "100%", e = this.getRuleWeight(), i = (
20
27
  /*css*/
21
28
  `
22
29
  :host {
@@ -108,25 +108,25 @@ class x extends HTMLElement {
108
108
  appearance: none;
109
109
  }
110
110
  select.size-x-small {
111
- min-height: var(--action-icon-only-size-x-small);
111
+ min-height: var(--action-size-x-small);
112
112
  padding: var(--action-padding-x-small);
113
113
  font-size: var(--text-font-size-xs);
114
114
  line-height: var(--text-line-height-xs);
115
115
  }
116
116
  select.size-small {
117
- min-height: var(--action-icon-only-size-small);
117
+ min-height: var(--action-size-small);
118
118
  padding: var(--action-padding-small);
119
119
  font-size: var(--text-font-size-s);
120
120
  line-height: var(--text-line-height-s);
121
121
  }
122
122
  select.size-medium {
123
- min-height: 4.4rem;
123
+ min-height: var(--action-size-medium);
124
124
  padding: var(--space-200) var(--space-300);
125
125
  font-size: var(--text-font-size);
126
126
  line-height: var(--text-line-height);
127
127
  }
128
128
  select.size-large {
129
- min-height: var(--action-icon-only-size-large);
129
+ min-height: var(--action-size-large);
130
130
  padding: var(--space-300) var(--space-400);
131
131
  font-size: var(--text-font-size-l);
132
132
  line-height: var(--text-line-height-l);
@@ -39,7 +39,7 @@ class i extends HTMLElement {
39
39
  return this.querySelector('[slot="accessory"]') !== null;
40
40
  }
41
41
  render() {
42
- const a = this.variant === "action", t = this.getAttribute("col") || "1fr 1fr", r = this.getAttribute("space") || "var(--space-500)", e = this.hasAccessorySlot(), s = (
42
+ const a = this.variant === "action", t = this.getAttribute("col") || (a ? "minmax(0, 1fr) auto" : "1fr 1fr"), r = this.getAttribute("space") || "var(--space-500)", e = this.hasAccessorySlot(), s = (
43
43
  /*css*/
44
44
  `
45
45
  :host {
@@ -72,6 +72,14 @@ class i extends HTMLElement {
72
72
  text-align: left;
73
73
  }
74
74
 
75
+ .action::part(grid-template-columns) {
76
+ grid-template-columns: ${t};
77
+ }
78
+
79
+ .action::part(gap) {
80
+ gap: ${r};
81
+ }
82
+
75
83
  .action:focus {
76
84
  z-index: 1;
77
85
  }
@@ -1,10 +1,10 @@
1
1
  import { getPartMap as a } from "../../../utils/part-map/index.js";
2
- class h extends HTMLElement {
2
+ class r extends HTMLElement {
3
3
  static get observedAttributes() {
4
- return ["space", "aligny", "alignx", "padding", "height", "width", "viewport", "fill"];
4
+ return ["space", "aligny", "alignx", "padding", "height", "width", "viewport", "fill", "wrap"];
5
5
  }
6
6
  constructor() {
7
- super(), this.attachShadow({ mode: "open" }), this.space = "var(--space-500)", this.alignY = "flex-start", this.alignX = "flex-start", this.styles = /*css*/
7
+ super(), this.attachShadow({ mode: "open" }), this.space = "var(--space-500)", this.alignY = "flex-start", this.alignX = "flex-start", this.wrap = "nowrap", this.styles = /*css*/
8
8
  `
9
9
  :host {
10
10
  display: block;
@@ -20,6 +20,7 @@ class h extends HTMLElement {
20
20
  padding: var(--padding);
21
21
  align-items: var(--alignY);
22
22
  justify-content: var(--alignX);
23
+ flex-wrap: var(--wrap);
23
24
  }
24
25
  :host([height]) slot,
25
26
  :host([viewport]) slot,
@@ -46,6 +47,7 @@ class h extends HTMLElement {
46
47
  --padding: ${this.getAttribute("padding") || "var(--space-000)"};
47
48
  --alignY: ${this.getAttribute("aligny") || this.alignY};
48
49
  --alignX: ${this.getAttribute("alignx") || this.alignX};
50
+ --wrap: ${this.resolveWrap(this.getAttribute("wrap"))};
49
51
  ">
50
52
  </slot>
51
53
  `;
@@ -53,12 +55,15 @@ class h extends HTMLElement {
53
55
  attributeChangedCallback(t, i, s) {
54
56
  if (i === s || ((t === "height" || t === "width" || t === "viewport" || t === "fill") && this.syncDimensions(), !this.shadowRoot)) return;
55
57
  const e = this.shadowRoot.querySelector("slot");
56
- e && (t === "space" && e.style.setProperty("--space", s || this.space), t === "padding" && e.style.setProperty("--padding", s || "var(--space-000)"), t === "aligny" && e.style.setProperty("--alignY", s || this.alignY), t === "alignx" && e.style.setProperty("--alignX", s || this.alignX));
58
+ e && (t === "space" && e.style.setProperty("--space", s || this.space), t === "padding" && e.style.setProperty("--padding", s || "var(--space-000)"), t === "aligny" && e.style.setProperty("--alignY", s || this.alignY), t === "alignx" && e.style.setProperty("--alignX", s || this.alignX), t === "wrap" && e.style.setProperty("--wrap", this.resolveWrap(s)));
57
59
  }
58
60
  syncDimensions() {
59
61
  const t = this.getAttribute("height") || (this.hasAttribute("viewport") ? "100dvh" : this.hasAttribute("fill") ? "100%" : "auto"), i = this.getAttribute("width") || (this.hasAttribute("fill") ? "100%" : "auto");
60
62
  this.style.setProperty("--stack-height", t), this.style.setProperty("--stack-width", i);
61
63
  }
64
+ resolveWrap(t) {
65
+ return t === null || t === "" ? this.hasAttribute("wrap") ? "wrap" : this.wrap : t;
66
+ }
62
67
  waitForPartMap() {
63
68
  return new Promise((t) => {
64
69
  if (typeof a == "function") return t();
@@ -69,4 +74,4 @@ class h extends HTMLElement {
69
74
  });
70
75
  }
71
76
  }
72
- customElements.get("mui-h-stack") || customElements.define("mui-h-stack", h);
77
+ customElements.get("mui-h-stack") || customElements.define("mui-h-stack", r);