@muibook/components 19.6.0 → 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 (46) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/agent/keywords/index.js +32 -1
  3. package/dist/esm/agent/prompts/index.js +10 -8
  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-button/index.js +187 -52
  8. package/dist/esm/components/mui-card/body/index.js +1 -1
  9. package/dist/esm/components/mui-chip/index.js +56 -26
  10. package/dist/esm/components/mui-chip-rail/index.js +239 -0
  11. package/dist/esm/components/mui-code/index.js +5 -5
  12. package/dist/esm/components/mui-dropdown/index.js +55 -46
  13. package/dist/esm/components/mui-file-upload/index.js +1 -0
  14. package/dist/esm/components/mui-heading/index.js +3 -2
  15. package/dist/esm/components/mui-input/index.js +21 -17
  16. package/dist/esm/components/mui-link/index.js +199 -55
  17. package/dist/esm/components/mui-message/index.js +7 -6
  18. package/dist/esm/components/mui-prompt/index.js +102 -102
  19. package/dist/esm/components/mui-select/index.js +4 -4
  20. package/dist/esm/components/mui-stack/hstack/index.js +10 -5
  21. package/dist/esm/components/mui-status/index.js +239 -0
  22. package/dist/esm/components/mui-stepper/step/index.js +46 -32
  23. package/dist/esm/components/mui-switch/index.js +21 -13
  24. package/dist/esm/components/mui-tabs/controller/index.js +17 -6
  25. package/dist/esm/components/mui-tabs/item/index.js +17 -5
  26. package/dist/esm/components/mui-tabs/tab-bar/index.js +93 -39
  27. package/dist/esm/components/mui-video-thumbnail/index.js +205 -0
  28. package/dist/esm/css/mui-brand.css +1 -1
  29. package/dist/esm/css/mui-tokens.css +267 -77
  30. package/dist/esm/custom-elements.json +2212 -1538
  31. package/dist/esm/dynamic-attrs.json +26 -6
  32. package/dist/esm/index.js +7 -4
  33. package/dist/types/components/mui-button/api.d.ts +4 -0
  34. package/dist/types/components/mui-chip/api.d.ts +4 -0
  35. package/dist/types/components/mui-chip-rail/api.d.ts +21 -0
  36. package/dist/types/components/mui-chip-rail/doc.d.ts +2 -0
  37. package/dist/types/components/mui-chip-rail/index.d.ts +3 -0
  38. package/dist/types/components/mui-link/api.d.ts +4 -0
  39. package/dist/types/components/mui-status/api.d.ts +24 -0
  40. package/dist/types/components/mui-status/doc.d.ts +2 -0
  41. package/dist/types/components/mui-status/index.d.ts +1 -0
  42. package/dist/types/components/mui-video-thumbnail/api.d.ts +28 -0
  43. package/dist/types/components/mui-video-thumbnail/doc.d.ts +2 -0
  44. package/dist/types/components/mui-video-thumbnail/index.d.ts +1 -0
  45. package/dist/types/index.d.ts +3 -0
  46. package/package.json +13 -1
@@ -1,51 +1,51 @@
1
- class l extends HTMLElement {
1
+ class d extends HTMLElement {
2
2
  constructor() {
3
3
  super(), this._animationSpeed = 200, this.attachShadow({ mode: "open" }), this._handleResize = this._handleResize.bind(this), this._hasInitialized = !1, this._resizeTimeout = null, this._observedTab = null, this._activeTab = null, this._resizeObserver = new ResizeObserver(() => {
4
4
  this._activeTab && this._updateHighlight(this._activeTab);
5
5
  });
6
6
  }
7
7
  static get observedAttributes() {
8
- return ["size", "variant"];
8
+ return ["size", "variant", "stroke", "radius"];
9
9
  }
10
- attributeChangedCallback(e, s, a) {
11
- (e === "size" || e === "variant") && s !== a && (this._applySizeToChildren(), this._applyVariantToChildren(), this._activeTab && this._updateHighlight(this._activeTab));
10
+ attributeChangedCallback(e, i, s) {
11
+ (e === "size" || e === "variant" || e === "stroke") && i !== s && (this._applySizeToChildren(), this._applyVariantToChildren(), this._activeTab && this._updateHighlight(this._activeTab)), e === "radius" && i !== s && this._syncRadiusAttribute();
12
12
  }
13
13
  connectedCallback() {
14
- this.hasAttribute("size") || this.setAttribute("size", "medium");
14
+ this.hasAttribute("size") || this.setAttribute("size", "medium"), this._syncRadiusAttribute();
15
15
  const e = this.getAttribute("speed") || "200";
16
16
  this._animationSpeed = parseInt(e, 10);
17
- const s = Array.from(this.children);
18
- this._applySizeToChildren(s), this._applyVariantToChildren(s), this.setAttribute("role", "tablist");
19
- const a = this.getAttribute("orientation") || "horizontal";
20
- this.setAttribute("aria-orientation", a), this.addEventListener("keydown", (t) => {
21
- const i = Array.from(this.children), r = i.findIndex((d) => d.hasAttribute("active")), n = this.getAttribute("aria-orientation") || "horizontal";
17
+ const i = Array.from(this.children);
18
+ this._applySizeToChildren(i), this._applyVariantToChildren(i), this.setAttribute("role", "tablist");
19
+ const s = this.getAttribute("orientation") || "horizontal";
20
+ this.setAttribute("aria-orientation", s), this.addEventListener("keydown", (t) => {
21
+ const a = Array.from(this.children), r = a.findIndex((l) => l.hasAttribute("active")), n = this.getAttribute("aria-orientation") || "horizontal";
22
22
  let o = r;
23
23
  switch (t.key) {
24
24
  case "ArrowRight":
25
- n === "horizontal" && (o = (r + 1) % i.length, t.preventDefault());
25
+ n === "horizontal" && (o = (r + 1) % a.length, t.preventDefault());
26
26
  break;
27
27
  case "ArrowLeft":
28
- n === "horizontal" && (o = (r - 1 + i.length) % i.length, t.preventDefault());
28
+ n === "horizontal" && (o = (r - 1 + a.length) % a.length, t.preventDefault());
29
29
  break;
30
30
  case "ArrowDown":
31
- n === "vertical" && (o = (r + 1) % i.length, t.preventDefault());
31
+ n === "vertical" && (o = (r + 1) % a.length, t.preventDefault());
32
32
  break;
33
33
  case "ArrowUp":
34
- n === "vertical" && (o = (r - 1 + i.length) % i.length, t.preventDefault());
34
+ n === "vertical" && (o = (r - 1 + a.length) % a.length, t.preventDefault());
35
35
  break;
36
36
  case "Home":
37
37
  o = 0, t.preventDefault();
38
38
  break;
39
39
  case "End":
40
- o = i.length - 1, t.preventDefault();
40
+ o = a.length - 1, t.preventDefault();
41
41
  break;
42
42
  default:
43
43
  return;
44
44
  }
45
- const h = i[o];
45
+ const h = a[o];
46
46
  h && (this.setActiveTab(h), h.focus());
47
- }), s.forEach((t, i) => {
48
- t.classList.remove("first", "middle", "last", "only"), s.length === 1 ? t.classList.add("only") : i === 0 ? t.classList.add("first") : i === s.length - 1 ? t.classList.add("last") : t.classList.add("middle");
47
+ }), i.forEach((t, a) => {
48
+ t.classList.remove("first", "middle", "last", "only"), i.length === 1 ? t.classList.add("only") : a === 0 ? t.classList.add("first") : a === i.length - 1 ? t.classList.add("last") : t.classList.add("middle");
49
49
  }), this.addEventListener("click", (t) => {
50
50
  const r = (typeof t.composedPath == "function" ? t.composedPath() : []).find(
51
51
  (h) => h instanceof HTMLElement && h.tagName.toLowerCase() === "mui-tab-item"
@@ -56,24 +56,48 @@ class l extends HTMLElement {
56
56
  <style>
57
57
  :host {
58
58
  --tab-animation-speed: ${this._animationSpeed}ms;
59
+ --tab-stroke-size: var(--stroke-size-100);
60
+ --tab-item-size-x-small: calc(var(--action-size-x-small) - (var(--tab-stroke-size) * 2));
61
+ --tab-item-size-small: calc(var(--action-size-small) - (var(--tab-stroke-size) * 2));
62
+ --tab-item-size-medium: calc(var(--action-size-medium) - (var(--tab-stroke-size) * 2));
63
+ --tab-item-size-large: calc(var(--action-size-large) - (var(--tab-stroke-size) * 2));
64
+ --tab-active-shadow: var(--tab-shadow-active);
65
+ --tab-active-inset-width: var(--stroke-size-300);
59
66
  position: relative;
60
67
  display: inline-flex;
61
- border-width: var(--stroke-size-100);
68
+ border-width: var(--tab-stroke-size);
62
69
  border-style: var(--stroke-solid);
63
70
  border-color: var(--tab-border-color);
64
71
  border-radius: var(--tab-radius);
65
72
  background: var(--tab-background);
66
- will-change: transform;
67
73
  box-sizing: border-box;
68
74
  overflow: hidden;
69
75
  }
70
76
 
77
+ :host([active-inset]) {
78
+ --tab-active-shadow: none;
79
+ }
80
+
81
+ :host([stroke="none"]) {
82
+ --tab-stroke-size: 0px;
83
+ --tab-item-size-x-small: var(--action-size-x-small);
84
+ --tab-item-size-small: var(--action-size-small);
85
+ --tab-item-size-medium: var(--action-size-medium);
86
+ --tab-item-size-large: var(--action-size-large);
87
+ border: none;
88
+ }
89
+
71
90
  :host([full-width]) {
72
91
  display: flex;
73
92
  width: 100%;
74
93
  }
75
94
 
76
95
  :host([variant="dots"]) {
96
+ --tab-stroke-size: 0px;
97
+ --tab-item-size-x-small: var(--action-size-x-small);
98
+ --tab-item-size-small: var(--action-size-small);
99
+ --tab-item-size-medium: var(--action-size-medium);
100
+ --tab-item-size-large: var(--action-size-large);
77
101
  border: none;
78
102
  border-radius: var(--radius-000);
79
103
  background: transparent;
@@ -83,6 +107,11 @@ class l extends HTMLElement {
83
107
  }
84
108
 
85
109
  :host([variant="ghost"]) {
110
+ --tab-stroke-size: 0px;
111
+ --tab-item-size-x-small: var(--action-size-x-small);
112
+ --tab-item-size-small: var(--action-size-small);
113
+ --tab-item-size-medium: var(--action-size-medium);
114
+ --tab-item-size-large: var(--action-size-large);
86
115
  border: none;
87
116
  background: transparent;
88
117
  box-shadow: var(--tabs-ghost-box-shadow);
@@ -106,12 +135,29 @@ class l extends HTMLElement {
106
135
  z-index: 0;
107
136
  padding: var(--space-200) var(--space-400);
108
137
  box-sizing: border-box;
109
- box-shadow: var(--tab-shadow-active);
110
- will-change: transform, width;
111
- transform: translateX(0) translateZ(0);
138
+ box-shadow: var(--tab-active-shadow);
139
+ transform: translateX(0);
112
140
  width: 0;
113
141
  }
114
142
 
143
+ .highlight::after {
144
+ content: none;
145
+ }
146
+
147
+ :host([active-inset]) .highlight {
148
+ background: var(--tab-background);
149
+ box-shadow: none;
150
+ }
151
+
152
+ :host([active-inset]) .highlight::after {
153
+ content: "";
154
+ position: absolute;
155
+ inset: var(--tab-active-inset-width);
156
+ border-radius: calc(var(--tab-radius) - var(--tab-active-inset-width));
157
+ background: var(--tab-background-active);
158
+ box-shadow: var(--tab-active-shadow);
159
+ }
160
+
115
161
  :host([variant="dots"]) .highlight {
116
162
  display: none;
117
163
  }
@@ -120,8 +166,6 @@ class l extends HTMLElement {
120
166
  position: relative;
121
167
  z-index: 1;
122
168
  flex: 1;
123
- contain: content; /* Performance optimization */
124
- transform: translateZ(0);
125
169
  }
126
170
 
127
171
  :host([variant="dots"]) ::slotted(mui-tab-item) {
@@ -133,31 +177,41 @@ class l extends HTMLElement {
133
177
  `, window.addEventListener("resize", this._handleResize), this._resizeObserver.observe(this), requestAnimationFrame(() => {
134
178
  const t = this.shadowRoot.querySelector(".highlight");
135
179
  t.style.transition = "none";
136
- const i = s.find((r) => r.hasAttribute("active")) || s[0];
137
- i && (this._activeTab = i, i.setAttribute("active", ""), this._updateHighlight(i), this._observedTab = i, this._resizeObserver.observe(i)), t.offsetWidth, requestAnimationFrame(() => {
180
+ const a = i.find((r) => r.hasAttribute("active")) || i[0];
181
+ a && (this._activeTab = a, a.setAttribute("active", ""), this._updateHighlight(a), this._observedTab = a, this._resizeObserver.observe(a)), t.offsetWidth, requestAnimationFrame(() => {
138
182
  t.style.transition = "", this._hasInitialized = !0;
139
183
  });
140
184
  }));
141
185
  }
142
186
  _applySizeToChildren(e) {
143
- const s = this.getAttribute("size") || "medium";
187
+ const i = this.getAttribute("size") || "medium";
144
188
  (e || Array.from(this.children)).forEach((t) => {
145
- t.tagName.toLowerCase() === "mui-tab-item" && t.setAttribute("size", s);
189
+ t.tagName.toLowerCase() === "mui-tab-item" && t.setAttribute("size", i);
146
190
  });
147
191
  }
148
192
  _applyVariantToChildren(e) {
149
- const s = this.getAttribute("variant") || "default";
193
+ const i = this.getAttribute("variant") || "default";
150
194
  (e || Array.from(this.children)).forEach((t) => {
151
- t.tagName.toLowerCase() === "mui-tab-item" && t.setAttribute("variant", s);
195
+ t.tagName.toLowerCase() === "mui-tab-item" && t.setAttribute("variant", i);
152
196
  });
153
197
  }
198
+ _syncRadiusAttribute() {
199
+ var t;
200
+ const e = (t = this.getAttribute("radius")) == null ? void 0 : t.trim();
201
+ if (!e) {
202
+ this.style.removeProperty("--tab-radius");
203
+ return;
204
+ }
205
+ const i = e.startsWith("radius-") ? e.replace("radius-", "") : e, s = /^(000|100|150|200|300|400|500|600)$/.test(i);
206
+ this.style.setProperty("--tab-radius", s ? `var(--radius-${i})` : e);
207
+ }
154
208
  disconnectedCallback() {
155
209
  window.removeEventListener("resize", this._handleResize), this._observedTab && this._resizeObserver.unobserve(this._observedTab), this._resizeObserver.unobserve(this), this._resizeTimeout && clearTimeout(this._resizeTimeout), this._resizeObserver.disconnect();
156
210
  }
157
211
  _handleResize() {
158
212
  if (!this._activeTab) return;
159
- this._resizeTimeout && clearTimeout(this._resizeTimeout), this._activeTab && Array.from(this.children).forEach((s) => {
160
- s === this._activeTab ? s.setAttribute("active", "") : s.removeAttribute("active");
213
+ this._resizeTimeout && clearTimeout(this._resizeTimeout), this._activeTab && Array.from(this.children).forEach((i) => {
214
+ i === this._activeTab ? i.setAttribute("active", "") : i.removeAttribute("active");
161
215
  });
162
216
  const e = this.shadowRoot.querySelector(".highlight");
163
217
  e && (e.style.transition = "none", this._updateHighlight(this._activeTab), e.offsetWidth, this._resizeTimeout = window.setTimeout(() => {
@@ -166,15 +220,15 @@ class l extends HTMLElement {
166
220
  }
167
221
  _updateHighlight(e) {
168
222
  if (this.getAttribute("variant") === "dots") return;
169
- const s = this.shadowRoot.querySelector(".highlight"), a = e.getBoundingClientRect(), t = this.getBoundingClientRect(), i = parseFloat(getComputedStyle(this).borderWidth) || 0, r = a.left - t.left - i;
170
- s.style.transform = `translateX(${r}px) translateZ(0)`, s.style.width = `${a.width}px`;
223
+ const i = this.shadowRoot.querySelector(".highlight"), s = e.getBoundingClientRect(), t = this.getBoundingClientRect(), a = parseFloat(getComputedStyle(this).borderWidth) || 0, r = s.left - t.left - a;
224
+ i.style.transform = `translateX(${r}px)`, i.style.width = `${s.width}px`;
171
225
  }
172
226
  setActiveTab(e) {
173
- if (Array.from(this.children).forEach((a) => a.removeAttribute("active")), e.setAttribute("active", ""), this._activeTab = e, this._observedTab && this._observedTab !== e && this._resizeObserver.unobserve(this._observedTab), this._observedTab = e, this._resizeObserver.observe(e), this._hasInitialized)
227
+ if (Array.from(this.children).forEach((s) => s.removeAttribute("active")), e.setAttribute("active", ""), this._activeTab = e, this._observedTab && this._observedTab !== e && this._resizeObserver.unobserve(this._observedTab), this._observedTab = e, this._resizeObserver.observe(e), this._hasInitialized)
174
228
  this._updateHighlight(e);
175
229
  else {
176
- const a = this.shadowRoot.querySelector(".highlight");
177
- a.style.transition = "none", this._updateHighlight(e), a.offsetWidth, a.style.transition = "", this._hasInitialized = !0;
230
+ const s = this.shadowRoot.querySelector(".highlight");
231
+ s.style.transition = "none", this._updateHighlight(e), s.offsetWidth, s.style.transition = "", this._hasInitialized = !0;
178
232
  }
179
233
  this.dispatchEvent(
180
234
  new CustomEvent("tab-change", {
@@ -185,4 +239,4 @@ class l extends HTMLElement {
185
239
  );
186
240
  }
187
241
  }
188
- customElements.get("mui-tab-bar") || customElements.define("mui-tab-bar", l);
242
+ customElements.get("mui-tab-bar") || customElements.define("mui-tab-bar", d);
@@ -0,0 +1,205 @@
1
+ import "../mui-icons/play-rectangle/index.js";
2
+ class n extends HTMLElement {
3
+ constructor() {
4
+ super(), this.themeObserver = null, this.attachShadow({ mode: "open" });
5
+ }
6
+ static get observedAttributes() {
7
+ return [
8
+ "src",
9
+ "src-light",
10
+ "src-dark",
11
+ "src-mui",
12
+ "src-mui-light",
13
+ "src-mui-dark",
14
+ "src-jal",
15
+ "src-jal-light",
16
+ "src-jal-dark",
17
+ "src-ana",
18
+ "src-ana-light",
19
+ "src-ana-dark",
20
+ "src-sensei",
21
+ "src-sensei-light",
22
+ "src-sensei-dark",
23
+ "src-paperclip",
24
+ "src-paperclip-light",
25
+ "src-paperclip-dark",
26
+ "alt",
27
+ "aspect-ratio",
28
+ "loading",
29
+ "decoding",
30
+ "play",
31
+ "overlay",
32
+ "hide-play"
33
+ ];
34
+ }
35
+ connectedCallback() {
36
+ this.render(), this.bindThemeObserver();
37
+ }
38
+ disconnectedCallback() {
39
+ var e;
40
+ (e = this.themeObserver) == null || e.disconnect(), this.themeObserver = null;
41
+ }
42
+ attributeChangedCallback(e, t, a) {
43
+ t !== a && this.shadowRoot && this.render();
44
+ }
45
+ render() {
46
+ if (!this.shadowRoot) return;
47
+ const e = this.getThemedSrc(), t = this.getAttribute("alt") || "", a = this.getAttribute("aspect-ratio") || "var(--video-thumbnail-aspect-ratio, 16 / 9)", r = this.getAttribute("loading") || "lazy", i = this.getAttribute("decoding") || "async", o = this.hasAttribute("play") && !this.hasAttribute("hide-play"), s = this.hasAttribute("overlay");
48
+ this.shadowRoot.innerHTML = /*html*/
49
+ `
50
+ <style>
51
+ :host {
52
+ display: block;
53
+ width: 100%;
54
+ }
55
+
56
+ .media {
57
+ display: flex;
58
+ flex-direction: column;
59
+ width: 100%;
60
+ min-width: 0;
61
+ gap: var(--video-thumbnail-meta-gap, var(--space-300));
62
+ }
63
+
64
+ .frame {
65
+ position: relative;
66
+ display: block;
67
+ width: 100%;
68
+ aspect-ratio: var(--video-thumbnail-aspect-ratio-active, var(--video-thumbnail-aspect-ratio));
69
+ margin: 0;
70
+ overflow: hidden;
71
+ box-sizing: border-box;
72
+ border: var(--video-thumbnail-border, none);
73
+ border-radius: var(--video-thumbnail-radius, var(--radius-300));
74
+ background: var(--video-thumbnail-background, var(--surface-elevated-200));
75
+ box-shadow: var(--video-thumbnail-box-shadow, none);
76
+ transition:
77
+ border var(--speed-100),
78
+ box-shadow var(--speed-100);
79
+ isolation: isolate;
80
+ }
81
+
82
+ :host(:hover) .frame {
83
+ border: var(--video-thumbnail-border-hover, var(--video-thumbnail-border, none));
84
+ box-shadow: var(--video-thumbnail-box-shadow-hover, var(--video-thumbnail-box-shadow, none));
85
+ }
86
+
87
+ .frame:hover {
88
+ border: var(--video-thumbnail-border-hover, var(--video-thumbnail-border, none));
89
+ box-shadow: var(--video-thumbnail-box-shadow-hover, var(--video-thumbnail-box-shadow, none));
90
+ }
91
+
92
+ .image,
93
+ ::slotted([slot="image"]) {
94
+ display: block;
95
+ width: 100%;
96
+ height: 100%;
97
+ object-fit: cover;
98
+ object-position: center;
99
+ border: none;
100
+ filter: var(--video-thumbnail-image-filter, none);
101
+ transition: filter var(--speed-100), transform var(--speed-100);
102
+ }
103
+
104
+ :host(:hover) .image,
105
+ :host(:hover) ::slotted([slot="image"]),
106
+ .frame:hover .image,
107
+ .frame:hover ::slotted([slot="image"]) {
108
+ filter: var(--video-thumbnail-image-filter-hover, var(--video-thumbnail-image-filter, none));
109
+ }
110
+
111
+ .overlay {
112
+ position: absolute;
113
+ inset: 0;
114
+ z-index: 1;
115
+ pointer-events: none;
116
+ background: var(--video-thumbnail-overlay-background, transparent);
117
+ transition: background var(--speed-100);
118
+ }
119
+
120
+ :host(:hover) .overlay,
121
+ .frame:hover .overlay {
122
+ background: var(--video-thumbnail-overlay-background-hover, var(--black-opacity-20));
123
+ }
124
+
125
+ .play {
126
+ position: absolute;
127
+ left: 50%;
128
+ top: 50%;
129
+ z-index: 2;
130
+ display: inline-flex;
131
+ align-items: center;
132
+ justify-content: center;
133
+ width: var(--video-thumbnail-play-size, var(--action-icon-only-size-large));
134
+ height: var(--video-thumbnail-play-size, var(--action-icon-only-size-large));
135
+ border-radius: var(--video-thumbnail-play-size, var(--action-icon-only-size-large));
136
+ background: var(--video-thumbnail-play-background, var(--black-opacity-60));
137
+ color: var(--video-thumbnail-play-color, var(--white));
138
+ opacity: var(--video-thumbnail-play-opacity, 0);
139
+ transform: translate(-50%, -50%);
140
+ pointer-events: none;
141
+ transition:
142
+ background var(--speed-100),
143
+ opacity var(--speed-100);
144
+ }
145
+
146
+ :host(:hover) .play,
147
+ .frame:hover .play {
148
+ background: var(--video-thumbnail-play-background-hover, var(--black-opacity-70));
149
+ opacity: var(--video-thumbnail-play-opacity-hover, 1);
150
+ }
151
+
152
+ .play[hidden] {
153
+ display: none;
154
+ }
155
+
156
+ .play mui-icon-play-rectangle {
157
+ fill: currentColor;
158
+ }
159
+
160
+ @media (prefers-reduced-motion: reduce) {
161
+ .frame,
162
+ .image,
163
+ ::slotted([slot="image"]),
164
+ .overlay,
165
+ .play {
166
+ transition: none;
167
+ }
168
+ }
169
+ </style>
170
+
171
+ <div class="media">
172
+ <figure class="frame" style="--video-thumbnail-aspect-ratio-active: ${this.escapeAttribute(a)}">
173
+ ${e ? `<img class="image" src="${this.escapeAttribute(e)}" alt="${this.escapeAttribute(t)}" loading="${this.escapeAttribute(r)}" decoding="${this.escapeAttribute(i)}" />` : '<slot name="image"></slot>'}
174
+ ${s ? '<span class="overlay" aria-hidden="true"></span>' : ""}
175
+ <span class="play" aria-hidden="true" ${o ? "" : "hidden"}>
176
+ <mui-icon-play-rectangle size="large"></mui-icon-play-rectangle>
177
+ </span>
178
+ </figure>
179
+ <slot name="meta"></slot>
180
+ </div>
181
+ `;
182
+ }
183
+ bindThemeObserver() {
184
+ if (this.themeObserver) return;
185
+ const e = document.documentElement;
186
+ this.themeObserver = new MutationObserver((t) => {
187
+ t.some((a) => a.attributeName === "data-brand" || a.attributeName === "data-theme") && this.syncImageSrc();
188
+ }), this.themeObserver.observe(e, { attributes: !0, attributeFilter: ["data-brand", "data-theme"] });
189
+ }
190
+ syncImageSrc() {
191
+ var a;
192
+ const e = (a = this.shadowRoot) == null ? void 0 : a.querySelector(".image");
193
+ if (!e) return;
194
+ const t = this.getThemedSrc();
195
+ e.getAttribute("src") !== t && e.setAttribute("src", t);
196
+ }
197
+ getThemedSrc() {
198
+ const e = document.documentElement.getAttribute("data-brand") || "mui", t = document.documentElement.getAttribute("data-theme") || "light";
199
+ return this.getAttribute(`src-${e}-${t}`) || this.getAttribute(`src-${t}`) || this.getAttribute(`src-${e}`) || this.getAttribute("src") || "";
200
+ }
201
+ escapeAttribute(e) {
202
+ return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;");
203
+ }
204
+ }
205
+ customElements.get("mui-video-thumbnail") || customElements.define("mui-video-thumbnail", n);
@@ -1,6 +1,6 @@
1
1
 
2
2
  /* ================================================================================================== */
3
- /* Don't edit directly • Generated on Thu, 28 May 2026 12:53:59 GMT • muibook.com */
3
+ /* Don't edit directly • Generated on Sun, 31 May 2026 05:18:09 GMT • muibook.com */
4
4
  /* ================================================================================================== */
5
5
 
6
6
  /* ================================================================================================== */