@everchron/ec-shards 14.22.3 → 14.23.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.
package/dist/ec-shards.js CHANGED
@@ -5321,6 +5321,12 @@ const V_ = /* @__PURE__ */ _(gr, [["render", hr], ["__scopeId", "data-v-3181dbaf
5321
5321
  name: "ecs-chat-message",
5322
5322
  components: { EcsAvatar: nt, EcsIcon: O },
5323
5323
  props: {
5324
+ /** Determines the visual variant of the message. */
5325
+ variant: {
5326
+ type: String,
5327
+ default: "bubble",
5328
+ validator: (e) => ["default", "bubble"].includes(e)
5329
+ },
5324
5330
  /** Determines the direction of the message. */
5325
5331
  direction: {
5326
5332
  type: String,
@@ -5348,17 +5354,23 @@ const V_ = /* @__PURE__ */ _(gr, [["render", hr], ["__scopeId", "data-v-3181dbaf
5348
5354
  busyText: {
5349
5355
  type: String,
5350
5356
  default: "Thinking..."
5357
+ },
5358
+ /** Determines if the message should have a hover effect to indicate interactivity. */
5359
+ hover: {
5360
+ type: Boolean,
5361
+ default: !1
5351
5362
  }
5352
5363
  },
5353
5364
  computed: {
5354
5365
  bubbleColor() {
5355
- return this.type === "assistant" ? "var(--color-blue-2)" : this.type === "bookmarked" ? "var(--color-yellow-3)" : (this.type === "default", "var(--color-gray-2)");
5366
+ return this.variant !== "bubble" ? null : this.type === "assistant" ? "var(--color-blue-2)" : this.type === "bookmarked" ? "var(--color-yellow-3)" : (this.type === "default", "var(--color-gray-2)");
5356
5367
  }
5357
5368
  }
5358
5369
  }, vr = ["aria-busy"], yr = { class: "ecs-chat-message-content" }, br = {
5359
5370
  key: 1,
5360
5371
  class: "ecai-avatar"
5361
5372
  }, _r = {
5373
+ key: 0,
5362
5374
  xmlns: "http://www.w3.org/2000/svg",
5363
5375
  width: "8",
5364
5376
  height: "8",
@@ -5366,7 +5378,7 @@ const V_ = /* @__PURE__ */ _(gr, [["render", hr], ["__scopeId", "data-v-3181dbaf
5366
5378
  fill: "none",
5367
5379
  class: "ecs-chat-message-bubble-arrow"
5368
5380
  }, kr = ["fill"], wr = {
5369
- key: 0,
5381
+ key: 1,
5370
5382
  class: "ecs-chat-message-busy-text"
5371
5383
  }, xr = {
5372
5384
  key: 0,
@@ -5375,28 +5387,30 @@ const V_ = /* @__PURE__ */ _(gr, [["render", hr], ["__scopeId", "data-v-3181dbaf
5375
5387
  function Sr(e, s, t, a, n, i) {
5376
5388
  const l = g("ecs-avatar"), c = g("ecs-icon");
5377
5389
  return o(), r("div", {
5378
- class: y(["ecs-chat-message", { sent: t.direction === "sent", received: t.direction === "received" }]),
5390
+ class: y(["ecs-chat-message", { sent: t.direction === "sent", received: t.direction === "received", [t.variant]: t.variant, hover: t.hover }]),
5379
5391
  "aria-busy": t.busy
5380
5392
  }, [
5381
5393
  f("div", yr, [
5382
- t.type !== "assistant" ? (o(), h(l, Re({ key: 0 }, t.avatar, { size: 24 }), null, 16)) : (o(), r("div", br, [
5383
- b(c, {
5384
- type: "ecai-icon",
5385
- size: "20",
5386
- color: "var(--color-white)"
5387
- })
5388
- ])),
5394
+ t.variant === "bubble" ? (o(), r(N, { key: 0 }, [
5395
+ t.type !== "assistant" ? (o(), h(l, Re({ key: 0 }, t.avatar, { size: 24 }), null, 16)) : (o(), r("div", br, [
5396
+ b(c, {
5397
+ type: "ecai-icon",
5398
+ size: "20",
5399
+ color: "var(--color-white)"
5400
+ })
5401
+ ]))
5402
+ ], 64)) : u("", !0),
5389
5403
  f("div", {
5390
5404
  class: "ecs-chat-message-bubble",
5391
- style: S({ backgroundColor: i.bubbleColor })
5405
+ style: S(t.variant === "bubble" ? { backgroundColor: i.bubbleColor } : {})
5392
5406
  }, [
5393
- (o(), r("svg", _r, [
5407
+ t.variant === "bubble" ? (o(), r("svg", _r, [
5394
5408
  f("path", {
5395
5409
  d: "M6.2929 6.2929L0 0V8H5.58579C6.47669 8 6.92286 6.92286 6.2929 6.2929Z",
5396
5410
  fill: i.bubbleColor
5397
5411
  }, null, 8, kr)
5398
- ])),
5399
- t.busy ? (o(), r("span", wr, x(t.busyText), 1)) : p(e.$slots, "default", { key: 1 }, void 0, !0)
5412
+ ])) : u("", !0),
5413
+ t.busy ? (o(), r("span", wr, x(t.busyText), 1)) : p(e.$slots, "default", { key: 2 }, void 0, !0)
5400
5414
  ], 4)
5401
5415
  ]),
5402
5416
  e.$slots.actions ? (o(), r("div", xr, [
@@ -5404,7 +5418,7 @@ function Sr(e, s, t, a, n, i) {
5404
5418
  ])) : u("", !0)
5405
5419
  ], 10, vr);
5406
5420
  }
5407
- const F_ = /* @__PURE__ */ _(pr, [["render", Sr], ["__scopeId", "data-v-81361268"]]);
5421
+ const F_ = /* @__PURE__ */ _(pr, [["render", Sr], ["__scopeId", "data-v-1d38d2c4"]]);
5408
5422
  var Ze = {}, Ns;
5409
5423
  function Cr() {
5410
5424
  if (Ns) return Ze;