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