@studiolxd/brand 48.1.0 → 49.0.1

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 (33) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/dist/_shared/untrustedtext.js +27 -26
  3. package/dist/_types/atoms/TypingIndicator/TypingIndicator.d.ts +29 -2
  4. package/dist/_types/messages/BrandMessages.d.ts +25 -1
  5. package/dist/_types/messages/index.d.ts +1 -1
  6. package/dist/_types/molecules/AssistantMessage/AssistantMessage.d.ts +15 -1
  7. package/dist/_types/molecules/ConversationList/ConversationList.d.ts +42 -8
  8. package/dist/_types/molecules/MessageComposer/MessageComposer.d.ts +24 -1
  9. package/dist/_types/organisms/AnnotationThread/AnnotationThread.d.ts +52 -7
  10. package/dist/_types/organisms/ConversationThread/ConversationThread.d.ts +26 -3
  11. package/dist/_types/templates/ChatShell/ChatShell.d.ts +22 -4
  12. package/dist/_types/templates/ConnectorAuth/ConnectorAuthShell.d.ts +6 -1
  13. package/dist/_types/templates/ConnectorAuth/ConnectorConsentPage.d.ts +52 -18
  14. package/dist/_types/templates/ConnectorAuth/ConnectorExternalSignInPage.d.ts +57 -17
  15. package/dist/_types/templates/ConnectorAuth/ConnectorRejectionPage.d.ts +59 -15
  16. package/dist/_types/templates/ConnectorAuth/ConnectorRequestSummary.d.ts +43 -12
  17. package/dist/_types/templates/ConnectorAuth/ConnectorSignInPage.d.ts +46 -12
  18. package/dist/_types/templates/ConnectorAuth/UntrustedText.d.ts +31 -4
  19. package/dist/annotation-thread.js +49 -46
  20. package/dist/assistant-message.js +12 -9
  21. package/dist/brand.css +21 -10
  22. package/dist/chat-shell.js +50 -49
  23. package/dist/connector-consent-page.js +58 -68
  24. package/dist/connector-external-sign-in-page.js +22 -28
  25. package/dist/connector-rejection-page.js +31 -62
  26. package/dist/connector-request-summary.js +22 -20
  27. package/dist/connector-sign-in-page.js +21 -25
  28. package/dist/conversation-list.js +56 -55
  29. package/dist/conversation-thread.js +33 -31
  30. package/dist/link.css +1 -1
  31. package/dist/message-composer.js +38 -37
  32. package/dist/typing-indicator.js +12 -9
  33. package/package.json +1 -1
@@ -1,109 +1,112 @@
1
+ 'use client';
1
2
  import './annotation-thread.css';
2
- import { Tag as e } from "./tag.js";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Tag as t } from "./tag.js";
3
5
  import "react";
4
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
6
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
7
  //#region src/stories/organisms/AnnotationThread/AnnotationThread.tsx
6
- var r = {
8
+ var i = {
7
9
  open: "warning",
8
10
  acknowledged: "info",
9
11
  resolved: "success"
10
- }, i = {
12
+ }, a = {
11
13
  day: "numeric",
12
14
  month: "short",
13
15
  hour: "2-digit",
14
16
  minute: "2-digit"
15
17
  };
16
- function a({ entry: e, locale: r, dateFormat: i, editedLabel: a }) {
17
- let o = e.date instanceof Date ? e.date : new Date(e.date), s = new Intl.DateTimeFormat(r, i).format(o);
18
- return /* @__PURE__ */ n("article", {
18
+ function o({ entry: e, locale: t, dateFormat: i, editedLabel: a }) {
19
+ let o = e.date instanceof Date ? e.date : new Date(e.date), s = new Intl.DateTimeFormat(t, i).format(o);
20
+ return /* @__PURE__ */ r("article", {
19
21
  className: "annotation-thread__item",
20
22
  children: [
21
- /* @__PURE__ */ n("header", {
23
+ /* @__PURE__ */ r("header", {
22
24
  className: "annotation-thread__header",
23
25
  children: [
24
- e.avatar && /* @__PURE__ */ t("span", {
26
+ e.avatar && /* @__PURE__ */ n("span", {
25
27
  className: "annotation-thread__avatar",
26
28
  children: e.avatar
27
29
  }),
28
- /* @__PURE__ */ t("span", {
30
+ /* @__PURE__ */ n("span", {
29
31
  className: "annotation-thread__author",
30
32
  children: e.author
31
33
  }),
32
- /* @__PURE__ */ t("time", {
34
+ /* @__PURE__ */ n("time", {
33
35
  className: "annotation-thread__date",
34
36
  dateTime: o.toISOString(),
35
37
  children: s
36
38
  }),
37
- e.edited && /* @__PURE__ */ t("span", {
39
+ e.edited && /* @__PURE__ */ n("span", {
38
40
  className: "annotation-thread__edited",
39
- children: a
41
+ children: a()
40
42
  }),
41
- e.meta && /* @__PURE__ */ t("span", {
43
+ e.meta && /* @__PURE__ */ n("span", {
42
44
  className: "annotation-thread__meta",
43
45
  children: e.meta
44
46
  })
45
47
  ]
46
48
  }),
47
- /* @__PURE__ */ t("div", {
49
+ /* @__PURE__ */ n("div", {
48
50
  className: "annotation-thread__body",
49
51
  children: e.body
50
52
  }),
51
- e.actions && /* @__PURE__ */ t("div", {
53
+ e.actions && /* @__PURE__ */ n("div", {
52
54
  className: "annotation-thread__item-actions",
53
55
  children: e.actions
54
56
  })
55
57
  ]
56
58
  });
57
59
  }
58
- function o({ annotation: o, replies: s = [], status: c = "open", actions: l, reply: u, locale: d = "es-ES", dateFormat: f = i, openLabel: p = "Abierta", acknowledgedLabel: m = "Atendida", resolvedLabel: h = "Resuelta", editedLabel: g = "editada", repliesLabel: _ = (e) => e === 1 ? "1 respuesta" : `${e} respuestas`, label: v = "Hilo de anotaciones", className: y, ...b }) {
59
- return /* @__PURE__ */ n("article", {
60
+ function s({ annotation: s, replies: c = [], status: l = "open", actions: u, reply: d, locale: f = "es-ES", dateFormat: p = a, openLabel: m, acknowledgedLabel: h, resolvedLabel: g, editedLabel: _, repliesLabel: v, label: y, className: b, ...x }) {
61
+ let S = e("annotationThread");
62
+ return /* @__PURE__ */ r("article", {
60
63
  className: [
61
64
  "annotation-thread",
62
- c === "open" ? "" : `annotation-thread--${c}`,
63
- y ?? ""
65
+ l === "open" ? "" : `annotation-thread--${l}`,
66
+ b ?? ""
64
67
  ].filter(Boolean).join(" "),
65
- "aria-label": v,
66
- ...b,
68
+ "aria-label": S("label", y),
69
+ ...x,
67
70
  children: [
68
- /* @__PURE__ */ t("div", {
71
+ /* @__PURE__ */ n("div", {
69
72
  className: "annotation-thread__status",
70
- children: /* @__PURE__ */ t(e, {
71
- variant: r[c],
73
+ children: /* @__PURE__ */ n(t, {
74
+ variant: i[l],
72
75
  children: {
73
- open: p,
74
- acknowledged: m,
75
- resolved: h
76
- }[c]
76
+ open: () => S("open", m),
77
+ acknowledged: () => S("acknowledged", h),
78
+ resolved: () => S("resolved", g)
79
+ }[l]()
77
80
  })
78
81
  }),
79
- /* @__PURE__ */ t(a, {
80
- entry: o,
81
- locale: d,
82
- dateFormat: f,
83
- editedLabel: g
82
+ /* @__PURE__ */ n(o, {
83
+ entry: s,
84
+ locale: f,
85
+ dateFormat: p,
86
+ editedLabel: () => S("edited", _)
84
87
  }),
85
- s.length > 0 && /* @__PURE__ */ n("div", {
88
+ c.length > 0 && /* @__PURE__ */ r("div", {
86
89
  className: "annotation-thread__replies",
87
- children: [/* @__PURE__ */ t("p", {
90
+ children: [/* @__PURE__ */ n("p", {
88
91
  className: "annotation-thread__replies-label",
89
- children: _(s.length)
90
- }), s.map((e) => /* @__PURE__ */ t(a, {
92
+ children: S("replies", v)(c.length)
93
+ }), c.map((e) => /* @__PURE__ */ n(o, {
91
94
  entry: e,
92
- locale: d,
93
- dateFormat: f,
94
- editedLabel: g
95
+ locale: f,
96
+ dateFormat: p,
97
+ editedLabel: () => S("edited", _)
95
98
  }, e.id))]
96
99
  }),
97
- u && /* @__PURE__ */ t("div", {
100
+ d && /* @__PURE__ */ n("div", {
98
101
  className: "annotation-thread__reply",
99
- children: u
102
+ children: d
100
103
  }),
101
- l && /* @__PURE__ */ t("footer", {
104
+ u && /* @__PURE__ */ n("footer", {
102
105
  className: "annotation-thread__actions",
103
- children: l
106
+ children: u
104
107
  })
105
108
  ]
106
109
  });
107
110
  }
108
111
  //#endregion
109
- export { o as AnnotationThread };
112
+ export { s as AnnotationThread };
@@ -5,12 +5,12 @@ import { t as n } from "./_shared/messagetimestamp.js";
5
5
  import { forwardRef as r } from "react";
6
6
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
7
  //#region src/stories/molecules/AssistantMessage/AssistantMessage.tsx
8
- var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFormat: l, isStreaming: u = !1, streamingLabel: d, className: f, ...p }, m) {
9
- let h = n(s, c, l);
8
+ var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFormat: l, isStreaming: u = !1, streamingName: d, streamingLabel: f, className: p, ...m }, h) {
9
+ let g = n(s, c, l);
10
10
  return /* @__PURE__ */ a("div", {
11
- ref: m,
12
- className: `assistant-message${f ? ` ${f}` : ""}`,
13
- ...p,
11
+ ref: h,
12
+ className: `assistant-message${p ? ` ${p}` : ""}`,
13
+ ...m,
14
14
  children: [
15
15
  o && /* @__PURE__ */ i("span", {
16
16
  className: "assistant-message__model",
@@ -18,12 +18,15 @@ var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFo
18
18
  }),
19
19
  /* @__PURE__ */ i(e, {
20
20
  role: "assistant",
21
- children: u ? /* @__PURE__ */ i(t, { label: d }) : r
21
+ children: u ? /* @__PURE__ */ i(t, {
22
+ name: d,
23
+ label: f
24
+ }) : r
22
25
  }),
23
- h && !u && /* @__PURE__ */ i("time", {
26
+ g && !u && /* @__PURE__ */ i("time", {
24
27
  className: "assistant-message__timestamp",
25
- dateTime: h.dateTime,
26
- children: h.label
28
+ dateTime: g.dateTime,
29
+ children: g.label
27
30
  })
28
31
  ]
29
32
  });