@juspay/svelte-ui-components 4.42.0 → 4.43.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.
@@ -16,6 +16,7 @@
16
16
  scrollPolicy = 'near-bottom',
17
17
  pinHold = false,
18
18
  jump = true,
19
+ hideScrollbar = false,
19
20
  message,
20
21
  messageBody,
21
22
  messageAttachments,
@@ -296,6 +297,7 @@
296
297
  aria-live="polite"
297
298
  data-pw={typeof testId === 'string' ? testId : null}
298
299
  testID={typeof testId === 'string' ? testId : null}
300
+ class:hide-scrollbar={hideScrollbar}
299
301
  bind:this={listEl}
300
302
  onscroll={handleScroll}
301
303
  use:pinToBottom={scrollKey}
@@ -361,6 +363,33 @@
361
363
  scroll-behavior: var(--chat-message-list-scroll-behavior, smooth);
362
364
  }
363
365
 
366
+ /* Both properties sit inside :where() so they carry no specificity. A host that
367
+ already sets overflow-x or overscroll-behavior on the list wrote that rule
368
+ before these tokens existed, and Svelte's scope class would otherwise make
369
+ this tie it or beat it.
370
+ An unset token falls back to revert-layer, not to a value: this rule is
371
+ unlayered, and an unlayered declaration beats any rule inside a cascade
372
+ @layer whatever its specificity, so a fixed fallback would override a layered
373
+ rule of the host's that used to win. revert-layer hands the property back to
374
+ what the cascade held below this rule, which is that layered rule if there is
375
+ one and the property's initial value if not: overflow-x `visible` (computing
376
+ to `auto` beside overflow-y `auto`) and overscroll-behavior `auto`, the list
377
+ as it was before the tokens. An engine without revert-layer drops the
378
+ declaration to that same initial value. */
379
+ :where(.chat-message-list) {
380
+ overflow-x: var(--chat-message-list-overflow-x, revert-layer);
381
+ overscroll-behavior: var(--chat-message-list-overscroll-behavior, revert-layer);
382
+ }
383
+
384
+ .chat-message-list.hide-scrollbar {
385
+ -ms-overflow-style: none;
386
+ scrollbar-width: none;
387
+ }
388
+
389
+ .chat-message-list.hide-scrollbar::-webkit-scrollbar {
390
+ display: none;
391
+ }
392
+
364
393
  /* The inner wrapper is what the pin-sender-turn policy reserves height on; it
365
394
  carries the column layout so the reservation becomes scrollable headroom. */
366
395
  .inner {
@@ -24,6 +24,12 @@ export type OptionalChatMessageListProperties = {
24
24
  pinHold?: boolean;
25
25
  /** Render the built-in jump-to-latest button (default true). Hosts with their own affordance pass false. */
26
26
  jump?: boolean;
27
+ /**
28
+ * Hide the list's own scrollbar while it stays scrollable (default false). Mirrors
29
+ * Scroller's `hideScrollbar`, which defaults to true; here the default keeps the
30
+ * scrollbar the list has always shown.
31
+ */
32
+ hideScrollbar?: boolean;
27
33
  message?: Snippet<[ChatMessageData]>;
28
34
  /**
29
35
  * Renders inside each message's bubble in place of its text/html, keeping the
package/dist-wc/index.js CHANGED
@@ -52105,123 +52105,123 @@ create_custom_element(ChatMessage, {
52105
52105
  //#region src/lib/ChatMessageList/ChatMessageList.svelte
52106
52106
  var root$14 = /* @__PURE__ */ from_html("<div class=\"jump svelte-qpm4dm\"><!></div>"), root_1$13 = /* @__PURE__ */ from_html("<div role=\"log\" aria-live=\"polite\"><div class=\"inner svelte-qpm4dm\"><!> <!> <!></div></div>"), $$css$34 = {
52107
52107
  hash: "svelte-qpm4dm",
52108
- code: ".chat-message-list.svelte-qpm4dm {box-sizing:border-box;display:flex;flex-direction:column;flex:1;width:100%;overflow-y:auto;padding:var(--chat-message-list-padding, 0.75rem 1.5rem);scroll-behavior:var(--chat-message-list-scroll-behavior, smooth);}\n\n /* The inner wrapper is what the pin-sender-turn policy reserves height on; it\n carries the column layout so the reservation becomes scrollable headroom. */.inner.svelte-qpm4dm {display:flex;flex-direction:column;gap:var(--chat-message-list-gap, 1rem);flex:1 0 auto;}.jump.svelte-qpm4dm {position:sticky;bottom:var(--chat-message-list-jump-bottom, 8px);align-self:center;margin-top:var(--chat-message-list-jump-margin-top, 4px);--button-width: var(--chat-message-list-jump-size, 36px);--button-height: var(--chat-message-list-jump-size, 36px);--button-padding: var(--chat-message-list-jump-padding, 8px);--button-border-radius: var(--chat-message-list-jump-border-radius, 50%);--button-color: var(--chat-message-list-jump-background-color, #ffffff);--button-text-color: var(--chat-message-list-jump-color, #52525b);--button-border: var(--chat-message-list-jump-border, 1px solid #e4e4e7);--button-box-shadow: var(--chat-message-list-jump-box-shadow, 0 4px 12px rgba(0, 0, 0, 0.12));--button-content-gap: 0px;--button-hover-color: var(--chat-message-list-jump-hover-background-color, #f4f4f5);}.jump.svelte-qpm4dm svg {height:100%;width:100%;}\n\n @media (prefers-reduced-motion: reduce) {.chat-message-list.svelte-qpm4dm {scroll-behavior:auto;}\n }"
52108
+ code: ".chat-message-list.svelte-qpm4dm {box-sizing:border-box;display:flex;flex-direction:column;flex:1;width:100%;overflow-y:auto;padding:var(--chat-message-list-padding, 0.75rem 1.5rem);scroll-behavior:var(--chat-message-list-scroll-behavior, smooth);}\n\n /* Both properties sit inside :where() so they carry no specificity. A host that\n already sets overflow-x or overscroll-behavior on the list wrote that rule\n before these tokens existed, and Svelte's scope class would otherwise make\n this tie it or beat it.\n An unset token falls back to revert-layer, not to a value: this rule is\n unlayered, and an unlayered declaration beats any rule inside a cascade\n @layer whatever its specificity, so a fixed fallback would override a layered\n rule of the host's that used to win. revert-layer hands the property back to\n what the cascade held below this rule, which is that layered rule if there is\n one and the property's initial value if not: overflow-x `visible` (computing\n to `auto` beside overflow-y `auto`) and overscroll-behavior `auto`, the list\n as it was before the tokens. An engine without revert-layer drops the\n declaration to that same initial value. */:where(.chat-message-list.svelte-qpm4dm) {overflow-x:var(--chat-message-list-overflow-x, revert-layer);overscroll-behavior:var(--chat-message-list-overscroll-behavior, revert-layer);}.chat-message-list.hide-scrollbar.svelte-qpm4dm {-ms-overflow-style:none;scrollbar-width:none;}.chat-message-list.hide-scrollbar.svelte-qpm4dm::-webkit-scrollbar {display:none;}\n\n /* The inner wrapper is what the pin-sender-turn policy reserves height on; it\n carries the column layout so the reservation becomes scrollable headroom. */.inner.svelte-qpm4dm {display:flex;flex-direction:column;gap:var(--chat-message-list-gap, 1rem);flex:1 0 auto;}.jump.svelte-qpm4dm {position:sticky;bottom:var(--chat-message-list-jump-bottom, 8px);align-self:center;margin-top:var(--chat-message-list-jump-margin-top, 4px);--button-width: var(--chat-message-list-jump-size, 36px);--button-height: var(--chat-message-list-jump-size, 36px);--button-padding: var(--chat-message-list-jump-padding, 8px);--button-border-radius: var(--chat-message-list-jump-border-radius, 50%);--button-color: var(--chat-message-list-jump-background-color, #ffffff);--button-text-color: var(--chat-message-list-jump-color, #52525b);--button-border: var(--chat-message-list-jump-border, 1px solid #e4e4e7);--button-box-shadow: var(--chat-message-list-jump-box-shadow, 0 4px 12px rgba(0, 0, 0, 0.12));--button-content-gap: 0px;--button-hover-color: var(--chat-message-list-jump-hover-background-color, #f4f4f5);}.jump.svelte-qpm4dm svg {height:100%;width:100%;}\n\n @media (prefers-reduced-motion: reduce) {.chat-message-list.svelte-qpm4dm {scroll-behavior:auto;}\n }"
52109
52109
  };
52110
52110
  function ChatMessageList(e, t) {
52111
52111
  push(t, !0), append_styles$1(e, $$css$34);
52112
- let n = 80, i = prop(t, "messages", 7), a = prop(t, "autoscroll", 7, !0), o = prop(t, "scrollPolicy", 7, "near-bottom"), s = prop(t, "pinHold", 7, !1), c = prop(t, "jump", 7, !0), l = prop(t, "message", 7), u = prop(t, "messageBody", 7), f = prop(t, "messageAttachments", 7), p = prop(t, "empty", 7), h = prop(t, "jumpLabel", 7, "Jump to latest"), S = prop(t, "jumpIcon", 7), C = prop(t, "allowCopy", 7, !1), k = prop(t, "onscrollstate", 7), R = prop(t, "onretry", 7), te = prop(t, "onfeedback", 7), ne = prop(t, "testId", 7), G = prop(t, "classes", 7), re = /* @__PURE__ */ state(null), be = /* @__PURE__ */ state(null), Me = /* @__PURE__ */ state(!0), Re = /* @__PURE__ */ state(!1), Ue = !1, it = !1, at = 0, ot = /* @__PURE__ */ user_derived(() => `${i().length}:${i().at(-1)?.content.length ?? 0}`), ct = /* @__PURE__ */ user_derived(() => !get(Me) && i().length > 0), lt = /* @__PURE__ */ user_derived(() => {
52112
+ let n = 80, i = prop(t, "messages", 7), a = prop(t, "autoscroll", 7, !0), o = prop(t, "scrollPolicy", 7, "near-bottom"), s = prop(t, "pinHold", 7, !1), c = prop(t, "jump", 7, !0), l = prop(t, "hideScrollbar", 7, !1), u = prop(t, "message", 7), f = prop(t, "messageBody", 7), p = prop(t, "messageAttachments", 7), h = prop(t, "empty", 7), S = prop(t, "jumpLabel", 7, "Jump to latest"), C = prop(t, "jumpIcon", 7), k = prop(t, "allowCopy", 7, !1), R = prop(t, "onscrollstate", 7), te = prop(t, "onretry", 7), ne = prop(t, "onfeedback", 7), G = prop(t, "testId", 7), re = prop(t, "classes", 7), be = /* @__PURE__ */ state(null), Me = /* @__PURE__ */ state(null), Re = /* @__PURE__ */ state(!0), Ue = /* @__PURE__ */ state(!1), it = !1, at = !1, ot = 0, ct = /* @__PURE__ */ user_derived(() => `${i().length}:${i().at(-1)?.content.length ?? 0}`), lt = /* @__PURE__ */ user_derived(() => !get(Re) && i().length > 0), ut = /* @__PURE__ */ user_derived(() => {
52113
52113
  for (let e = i().length - 1; e >= 0; --e) {
52114
52114
  let t = i().at(e);
52115
52115
  if (t && partyOf(t.role) === "responder") return t.id;
52116
52116
  }
52117
52117
  return null;
52118
52118
  });
52119
- function ut(e) {
52120
- return typeof R() == "function" && partyOf(e.role) === "responder" && e.id === get(lt) ? R() : null;
52121
- }
52122
52119
  function dt(e) {
52123
- return typeof te() == "function" && partyOf(e.role) === "responder" ? (t) => te()?.(t, e) : null;
52120
+ return typeof te() == "function" && partyOf(e.role) === "responder" && e.id === get(ut) ? te() : null;
52124
52121
  }
52125
52122
  function ft(e) {
52126
- return e.scrollHeight - e.scrollTop - e.clientHeight < 80;
52123
+ return typeof ne() == "function" && partyOf(e.role) === "responder" ? (t) => ne()?.(t, e) : null;
52127
52124
  }
52128
52125
  function pt(e) {
52129
- set(Me, ft(e), !0), set(Re, e.scrollHeight - e.clientHeight > 80), k()?.({
52130
- atBottom: get(Me),
52131
- scrollable: get(Re)
52132
- });
52126
+ return e.scrollHeight - e.scrollTop - e.clientHeight < 80;
52133
52127
  }
52134
52128
  function mt(e) {
52135
- pt(e.currentTarget);
52129
+ set(Re, pt(e), !0), set(Ue, e.scrollHeight - e.clientHeight > 80), R()?.({
52130
+ atBottom: get(Re),
52131
+ scrollable: get(Ue)
52132
+ });
52136
52133
  }
52137
52134
  function ht(e) {
52138
- if (get(re) !== null) {
52135
+ mt(e.currentTarget);
52136
+ }
52137
+ function gt(e) {
52138
+ if (get(be) !== null) {
52139
52139
  let t = typeof e == "string";
52140
52140
  if (t) {
52141
52141
  let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
52142
- get(re).style.scrollBehavior = e === "smooth" && !t ? "smooth" : "auto";
52142
+ get(be).style.scrollBehavior = e === "smooth" && !t ? "smooth" : "auto";
52143
52143
  }
52144
- if (get(re).scrollTop = get(re).scrollHeight, pt(get(re)), t) {
52145
- let e = get(re);
52144
+ if (get(be).scrollTop = get(be).scrollHeight, mt(get(be)), t) {
52145
+ let e = get(be);
52146
52146
  requestAnimationFrame(() => {
52147
52147
  e.style.scrollBehavior = "";
52148
52148
  });
52149
52149
  }
52150
52150
  }
52151
52151
  }
52152
- function gt() {
52152
+ function _t() {
52153
52153
  for (let e = i().length - 1; e >= 0; --e) if (partyOf(i()[e].role) === "sender") return i()[e].id;
52154
52154
  return null;
52155
52155
  }
52156
- function _t() {
52157
- if (get(re) === null || get(be) === null) return;
52156
+ function vt() {
52157
+ if (get(be) === null || get(Me) === null) return;
52158
52158
  let e = -1;
52159
52159
  for (let t = i().length - 1; t >= 0; --t) if (partyOf(i()[t].role) === "sender") {
52160
52160
  e = t;
52161
52161
  break;
52162
52162
  }
52163
52163
  if (e === -1) return;
52164
- let t = Array.from(get(be).children).filter((e) => !e.classList.contains("jump")), n = t.length === i().length ? t[e] : t[t.length - 1];
52164
+ let t = Array.from(get(Me).children).filter((e) => !e.classList.contains("jump")), n = t.length === i().length ? t[e] : t[t.length - 1];
52165
52165
  if (!(n instanceof HTMLElement)) return;
52166
- let a = get(be).getBoundingClientRect(), o = n.getBoundingClientRect(), s = o.top - a.top;
52167
- get(be).style.minHeight = `${Math.ceil(s + get(re).clientHeight)}px`, Ue = !0;
52168
- let c = get(re).getBoundingClientRect(), l = Number.parseFloat(getComputedStyle(get(re)).paddingTop) || 0;
52169
- at = get(re).scrollTop + (o.top - c.top - l), get(re).scrollTo({
52170
- top: at,
52166
+ let a = get(Me).getBoundingClientRect(), o = n.getBoundingClientRect(), s = o.top - a.top;
52167
+ get(Me).style.minHeight = `${Math.ceil(s + get(be).clientHeight)}px`, it = !0;
52168
+ let c = get(be).getBoundingClientRect(), l = Number.parseFloat(getComputedStyle(get(be)).paddingTop) || 0;
52169
+ ot = get(be).scrollTop + (o.top - c.top - l), get(be).scrollTo({
52170
+ top: ot,
52171
52171
  behavior: "instant"
52172
- }), pt(get(re));
52173
- }
52174
- function vt() {
52175
- get(be) !== null && (get(be).style.minHeight = ""), Ue = !1, it = !1, get(re) !== null && pt(get(re));
52172
+ }), mt(get(be));
52176
52173
  }
52177
52174
  function yt() {
52178
- if (!it || get(re) === null || get(be) === null) return;
52179
- let e = get(be).style.minHeight;
52180
- if (get(be).style.minHeight = "", get(re).scrollHeight - get(re).clientHeight >= at) {
52181
- get(re).scrollTo({
52182
- top: at,
52175
+ get(Me) !== null && (get(Me).style.minHeight = ""), it = !1, at = !1, get(be) !== null && mt(get(be));
52176
+ }
52177
+ function bt() {
52178
+ if (!at || get(be) === null || get(Me) === null) return;
52179
+ let e = get(Me).style.minHeight;
52180
+ if (get(Me).style.minHeight = "", get(be).scrollHeight - get(be).clientHeight >= ot) {
52181
+ get(be).scrollTo({
52182
+ top: ot,
52183
52183
  behavior: "instant"
52184
- }), Ue = !1, it = !1, pt(get(re));
52184
+ }), it = !1, at = !1, mt(get(be));
52185
52185
  return;
52186
52186
  }
52187
- get(be).style.minHeight = e, get(re).scrollTo({
52188
- top: at,
52187
+ get(Me).style.minHeight = e, get(be).scrollTo({
52188
+ top: ot,
52189
52189
  behavior: "instant"
52190
52190
  });
52191
52191
  }
52192
- let bt = (e) => {
52193
- let t = i().length, n = gt();
52192
+ let xt = (e) => {
52193
+ let t = i().length, n = _t();
52194
52194
  function c() {
52195
52195
  let c = i().length > t;
52196
52196
  if (t = i().length, o() === "pin-sender-turn") {
52197
- let e = gt();
52197
+ let e = _t();
52198
52198
  c && e !== null && e !== n && queueMicrotask(() => {
52199
- _t(), s() || (it = !0, yt());
52199
+ vt(), s() || (at = !0, bt());
52200
52200
  }), n = e;
52201
52201
  return;
52202
52202
  }
52203
- a() && (get(Me) || c) && queueMicrotask(() => {
52203
+ a() && (get(Re) || c) && queueMicrotask(() => {
52204
52204
  e.scrollTop = e.scrollHeight;
52205
52205
  });
52206
52206
  }
52207
52207
  return c(), { update: c };
52208
- }, xt = (e) => {
52208
+ }, St = (e) => {
52209
52209
  if (typeof ResizeObserver > "u") return;
52210
52210
  let t = new ResizeObserver(() => {
52211
- get(re) !== null && (o() === "near-bottom" && a() && get(Me) && (get(re).scrollTop = get(re).scrollHeight), yt(), pt(get(re)));
52211
+ get(be) !== null && (o() === "near-bottom" && a() && get(Re) && (get(be).scrollTop = get(be).scrollHeight), bt(), mt(get(be)));
52212
52212
  });
52213
52213
  return t.observe(e), { destroy() {
52214
52214
  t.disconnect();
52215
52215
  } };
52216
- }, St = () => {
52216
+ }, Ct = () => {
52217
52217
  let e = s();
52218
52218
  function t() {
52219
- e && !s() && Ue && vt(), e = s();
52219
+ e && !s() && it && yt(), e = s();
52220
52220
  }
52221
52221
  return t(), { update: t };
52222
52222
  };
52223
- var Ct = {
52224
- scrollToBottom: ht,
52223
+ var wt = {
52224
+ scrollToBottom: gt,
52225
52225
  get messages() {
52226
52226
  return i();
52227
52227
  },
@@ -52252,100 +52252,108 @@ function ChatMessageList(e, t) {
52252
52252
  set jump(e = !0) {
52253
52253
  c(e), flushSync();
52254
52254
  },
52255
- get message() {
52255
+ get hideScrollbar() {
52256
52256
  return l();
52257
52257
  },
52258
- set message(e) {
52258
+ set hideScrollbar(e = !1) {
52259
52259
  l(e), flushSync();
52260
52260
  },
52261
- get messageBody() {
52261
+ get message() {
52262
52262
  return u();
52263
52263
  },
52264
- set messageBody(e) {
52264
+ set message(e) {
52265
52265
  u(e), flushSync();
52266
52266
  },
52267
- get messageAttachments() {
52267
+ get messageBody() {
52268
52268
  return f();
52269
52269
  },
52270
- set messageAttachments(e) {
52270
+ set messageBody(e) {
52271
52271
  f(e), flushSync();
52272
52272
  },
52273
- get empty() {
52273
+ get messageAttachments() {
52274
52274
  return p();
52275
52275
  },
52276
- set empty(e) {
52276
+ set messageAttachments(e) {
52277
52277
  p(e), flushSync();
52278
52278
  },
52279
- get jumpLabel() {
52279
+ get empty() {
52280
52280
  return h();
52281
52281
  },
52282
- set jumpLabel(e = "Jump to latest") {
52282
+ set empty(e) {
52283
52283
  h(e), flushSync();
52284
52284
  },
52285
- get jumpIcon() {
52285
+ get jumpLabel() {
52286
52286
  return S();
52287
52287
  },
52288
- set jumpIcon(e) {
52288
+ set jumpLabel(e = "Jump to latest") {
52289
52289
  S(e), flushSync();
52290
52290
  },
52291
- get allowCopy() {
52291
+ get jumpIcon() {
52292
52292
  return C();
52293
52293
  },
52294
- set allowCopy(e = !1) {
52294
+ set jumpIcon(e) {
52295
52295
  C(e), flushSync();
52296
52296
  },
52297
- get onscrollstate() {
52297
+ get allowCopy() {
52298
52298
  return k();
52299
52299
  },
52300
- set onscrollstate(e) {
52300
+ set allowCopy(e = !1) {
52301
52301
  k(e), flushSync();
52302
52302
  },
52303
- get onretry() {
52303
+ get onscrollstate() {
52304
52304
  return R();
52305
52305
  },
52306
- set onretry(e) {
52306
+ set onscrollstate(e) {
52307
52307
  R(e), flushSync();
52308
52308
  },
52309
- get onfeedback() {
52309
+ get onretry() {
52310
52310
  return te();
52311
52311
  },
52312
- set onfeedback(e) {
52312
+ set onretry(e) {
52313
52313
  te(e), flushSync();
52314
52314
  },
52315
- get testId() {
52315
+ get onfeedback() {
52316
52316
  return ne();
52317
52317
  },
52318
- set testId(e) {
52318
+ set onfeedback(e) {
52319
52319
  ne(e), flushSync();
52320
52320
  },
52321
- get classes() {
52321
+ get testId() {
52322
52322
  return G();
52323
52323
  },
52324
- set classes(e) {
52324
+ set testId(e) {
52325
52325
  G(e), flushSync();
52326
+ },
52327
+ get classes() {
52328
+ return re();
52329
+ },
52330
+ set classes(e) {
52331
+ re(e), flushSync();
52326
52332
  }
52327
- }, wt = root_1$13(), Tt = child(wt), Et = child(Tt), Dt = (e) => {
52333
+ }, Tt = root_1$13();
52334
+ let Et;
52335
+ var Dt = child(Tt), Ot = child(Dt), kt = (e) => {
52328
52336
  var t = comment();
52329
- snippet(first_child(t), p), append(e, t);
52337
+ snippet(first_child(t), h), append(e, t);
52330
52338
  };
52331
- if_block(Et, (e) => {
52332
- i().length === 0 && typeof p() == "function" && e(Dt);
52339
+ if_block(Ot, (e) => {
52340
+ i().length === 0 && typeof h() == "function" && e(kt);
52333
52341
  });
52334
- var Ot = sibling(Et, 2);
52335
- each(Ot, 17, i, (e) => e.id, (e, t) => {
52342
+ var At = sibling(Ot, 2);
52343
+ each(At, 17, i, (e) => e.id, (e, t) => {
52336
52344
  var n = comment(), i = first_child(n), a = (e) => {
52337
52345
  var n = comment();
52338
- snippet(first_child(n), l, () => get(t)), append(e, n);
52346
+ snippet(first_child(n), u, () => get(t)), append(e, n);
52339
52347
  }, o = (e) => {
52340
52348
  let n = (e) => {
52341
52349
  var n = comment();
52342
- snippet(first_child(n), () => f() ?? noop, () => get(t)), append(e, n);
52350
+ snippet(first_child(n), () => p() ?? noop, () => get(t)), append(e, n);
52343
52351
  }, i = (e) => {
52344
52352
  var n = comment();
52345
- snippet(first_child(n), () => u() ?? noop, () => get(t)), append(e, n);
52353
+ snippet(first_child(n), () => f() ?? noop, () => get(t)), append(e, n);
52346
52354
  };
52347
52355
  {
52348
- let a = /* @__PURE__ */ user_derived(() => typeof u() == "function" ? i : null), o = /* @__PURE__ */ user_derived(() => C() && partyOf(get(t).role) === "responder"), s = /* @__PURE__ */ user_derived(() => typeof f() == "function" ? n : null), c = /* @__PURE__ */ user_derived(() => ut(get(t))), l = /* @__PURE__ */ user_derived(() => dt(get(t)));
52356
+ let a = /* @__PURE__ */ user_derived(() => typeof f() == "function" ? i : null), o = /* @__PURE__ */ user_derived(() => k() && partyOf(get(t).role) === "responder"), s = /* @__PURE__ */ user_derived(() => typeof p() == "function" ? n : null), c = /* @__PURE__ */ user_derived(() => dt(get(t))), l = /* @__PURE__ */ user_derived(() => ft(get(t)));
52349
52357
  ChatMessage(e, {
52350
52358
  get role() {
52351
52359
  return get(t).role;
@@ -52390,36 +52398,36 @@ function ChatMessageList(e, t) {
52390
52398
  }
52391
52399
  };
52392
52400
  if_block(i, (e) => {
52393
- typeof l() == "function" ? e(a) : e(o, -1);
52401
+ typeof u() == "function" ? e(a) : e(o, -1);
52394
52402
  }), append(e, n);
52395
52403
  });
52396
- var kt = sibling(Ot, 2), At = (e) => {
52404
+ var jt = sibling(At, 2), Mt = (e) => {
52397
52405
  var t = root$14();
52398
52406
  Button(child(t), {
52399
- onclick: () => ht(),
52407
+ onclick: () => gt(),
52400
52408
  get ariaLabel() {
52401
- return h();
52409
+ return S();
52402
52410
  },
52403
52411
  children: (e, t) => {
52404
52412
  var n = comment(), i = first_child(n), a = (e) => {
52405
52413
  var t = comment();
52406
- snippet(first_child(t), S), append(e, t);
52414
+ snippet(first_child(t), C), append(e, t);
52407
52415
  }, o = (e) => {
52408
52416
  var t = comment();
52409
52417
  html(first_child(t), () => chevron_down_default), append(e, t);
52410
52418
  };
52411
52419
  if_block(i, (e) => {
52412
- typeof S() == "function" ? e(a) : e(o, -1);
52420
+ typeof C() == "function" ? e(a) : e(o, -1);
52413
52421
  }), append(e, n);
52414
52422
  },
52415
52423
  $$slots: { default: !0 }
52416
52424
  }), reset(t), append(e, t);
52417
52425
  };
52418
- return if_block(kt, (e) => {
52419
- get(ct) && c() && e(At);
52420
- }), reset(Tt), bind_this(Tt, (e) => set(be, e), () => get(be)), action(Tt, (e) => xt?.(e)), reset(wt), bind_this(wt, (e) => set(re, e), () => get(re)), action(wt, (e, t) => bt?.(e, t), () => get(ot)), action(wt, (e, t) => St?.(e, t), s), template_effect(() => {
52421
- set_class(wt, 1, `chat-message-list ${G() ?? "" ?? ""}`, "svelte-qpm4dm"), set_attribute(wt, "data-pw", typeof ne() == "string" ? ne() : null), set_attribute(wt, "testid", typeof ne() == "string" ? ne() : null);
52422
- }), event("scroll", wt, mt), append(e, wt), pop(Ct);
52426
+ return if_block(jt, (e) => {
52427
+ get(lt) && c() && e(Mt);
52428
+ }), reset(Dt), bind_this(Dt, (e) => set(Me, e), () => get(Me)), action(Dt, (e) => St?.(e)), reset(Tt), bind_this(Tt, (e) => set(be, e), () => get(be)), action(Tt, (e, t) => xt?.(e, t), () => get(ct)), action(Tt, (e, t) => Ct?.(e, t), s), template_effect(() => {
52429
+ Et = set_class(Tt, 1, `chat-message-list ${re() ?? "" ?? ""}`, "svelte-qpm4dm", Et, { "hide-scrollbar": l() }), set_attribute(Tt, "data-pw", typeof G() == "string" ? G() : null), set_attribute(Tt, "testid", typeof G() == "string" ? G() : null);
52430
+ }), event("scroll", Tt, ht), append(e, Tt), pop(wt);
52423
52431
  }
52424
52432
  create_custom_element(ChatMessageList, {
52425
52433
  messages: {},
@@ -52427,6 +52435,7 @@ create_custom_element(ChatMessageList, {
52427
52435
  scrollPolicy: {},
52428
52436
  pinHold: {},
52429
52437
  jump: {},
52438
+ hideScrollbar: {},
52430
52439
  message: {},
52431
52440
  messageBody: {},
52432
52441
  messageAttachments: {},
@@ -55704,6 +55713,10 @@ customElements.define("sui-chat-message-list", create_custom_element(ChatMessage
55704
55713
  type: "Boolean"
55705
55714
  },
55706
55715
  jump: { type: "Boolean" },
55716
+ hideScrollbar: {
55717
+ attribute: "hide-scrollbar",
55718
+ type: "Boolean"
55719
+ },
55707
55720
  onscrollstate: { type: "Object" },
55708
55721
  messageAttachments: { type: "Object" },
55709
55722
  empty: { type: "Object" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "4.42.0",
3
+ "version": "4.43.0",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",