@ai-matrx/messaging 0.15.20 → 0.15.22
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 +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +9 -4
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -0
- package/dist/react.d.ts +2 -0
- package/dist/react.js +9 -4
- package/dist/react.js.map +1 -1
- package/dist/styles.css +30 -6
- package/package.json +4 -4
package/dist/react.d.cts
CHANGED
|
@@ -271,6 +271,8 @@ interface ActionContext {
|
|
|
271
271
|
readonly choice: string;
|
|
272
272
|
}
|
|
273
273
|
interface ActionChoice {
|
|
274
|
+
/** Semantic glyph supplied by the action owner, never inferred from its label. */
|
|
275
|
+
readonly icon?: "video" | "phone";
|
|
274
276
|
readonly id: string;
|
|
275
277
|
readonly label: string;
|
|
276
278
|
readonly tone: "primary" | "neutral" | "danger";
|
package/dist/react.d.ts
CHANGED
|
@@ -271,6 +271,8 @@ interface ActionContext {
|
|
|
271
271
|
readonly choice: string;
|
|
272
272
|
}
|
|
273
273
|
interface ActionChoice {
|
|
274
|
+
/** Semantic glyph supplied by the action owner, never inferred from its label. */
|
|
275
|
+
readonly icon?: "video" | "phone";
|
|
274
276
|
readonly id: string;
|
|
275
277
|
readonly label: string;
|
|
276
278
|
readonly tone: "primary" | "neutral" | "danger";
|
package/dist/react.js
CHANGED
|
@@ -3441,6 +3441,8 @@ var UsersIcon = (props) => /* @__PURE__ */ jsx2(
|
|
|
3441
3441
|
]
|
|
3442
3442
|
}
|
|
3443
3443
|
);
|
|
3444
|
+
var VideoIcon = (props) => /* @__PURE__ */ jsx2(Icon, { ...props, paths: ["M16 8l6-4v16l-6-4", "M4 6h10a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z"] });
|
|
3445
|
+
var PhoneIcon = (props) => /* @__PURE__ */ jsx2(Icon, { ...props, paths: "M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .7 2.9a2 2 0 0 1-.5 2.1L8 10a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.5c.9.3 1.9.6 2.9.7a2 2 0 0 1 1.7 2z" });
|
|
3444
3446
|
|
|
3445
3447
|
// src/react/parts.tsx
|
|
3446
3448
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
@@ -4124,14 +4126,14 @@ function MessageActionChips(props) {
|
|
|
4124
4126
|
if (declared !== null && renderer !== void 0) {
|
|
4125
4127
|
if (!renderer.versions.includes(declared.version)) return null;
|
|
4126
4128
|
const Render = renderer.render;
|
|
4127
|
-
return /* @__PURE__ */ jsx4(
|
|
4129
|
+
return /* @__PURE__ */ jsx4("div", { className: "mx-msg__chips", children: /* @__PURE__ */ jsx4(
|
|
4128
4130
|
Render,
|
|
4129
4131
|
{
|
|
4130
4132
|
message: props.message,
|
|
4131
4133
|
payload: declared.payload,
|
|
4132
4134
|
isOwn: props.message.senderId === host.identity.userId
|
|
4133
4135
|
}
|
|
4134
|
-
);
|
|
4136
|
+
) });
|
|
4135
4137
|
}
|
|
4136
4138
|
if (action.receipt !== null) {
|
|
4137
4139
|
return /* @__PURE__ */ jsxs2("span", { className: "mx-msg__receipt", children: [
|
|
@@ -4140,14 +4142,17 @@ function MessageActionChips(props) {
|
|
|
4140
4142
|
] });
|
|
4141
4143
|
}
|
|
4142
4144
|
if (action.choices.length === 0) return null;
|
|
4143
|
-
return /* @__PURE__ */ jsx4("div", { className: "mx-msg__chips", children: action.choices.map((choice) => /* @__PURE__ */
|
|
4145
|
+
return /* @__PURE__ */ jsx4("div", { className: "mx-msg__chips", children: action.choices.map((choice) => /* @__PURE__ */ jsxs2(
|
|
4144
4146
|
"button",
|
|
4145
4147
|
{
|
|
4146
4148
|
type: "button",
|
|
4147
4149
|
className: `mx-msg__chip${choice.tone === "primary" ? " mx-msg__chip--primary" : choice.tone === "danger" ? " mx-msg__chip--danger" : ""}`,
|
|
4148
4150
|
disabled: action.isRunning,
|
|
4149
4151
|
onClick: () => action.execute(choice.id),
|
|
4150
|
-
children:
|
|
4152
|
+
children: [
|
|
4153
|
+
choice.icon === "video" ? /* @__PURE__ */ jsx4(VideoIcon, {}) : choice.icon === "phone" ? /* @__PURE__ */ jsx4(PhoneIcon, {}) : null,
|
|
4154
|
+
choice.label
|
|
4155
|
+
]
|
|
4151
4156
|
},
|
|
4152
4157
|
choice.id
|
|
4153
4158
|
)) });
|