@informedai/react 0.2.4 → 0.2.5
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/index.js +50 -26
- package/dist/index.mjs +50 -26
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -746,21 +746,33 @@ function MessageBubble({ message, theme, onQuickAction }) {
|
|
|
746
746
|
const isUser = message.role === "user";
|
|
747
747
|
const hasQuickActions = message.quickActions && message.quickActions.length > 0;
|
|
748
748
|
if ((message.type === "quick_actions" || !message.content) && hasQuickActions) {
|
|
749
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.
|
|
749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: {
|
|
750
750
|
display: "flex",
|
|
751
|
-
|
|
752
|
-
|
|
751
|
+
flexDirection: "column",
|
|
752
|
+
alignItems: "center",
|
|
753
753
|
gap: "8px",
|
|
754
|
-
padding: "
|
|
755
|
-
}, children:
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
754
|
+
padding: "12px 0"
|
|
755
|
+
}, children: [
|
|
756
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: {
|
|
757
|
+
fontSize: "11px",
|
|
758
|
+
color: "#a3a3a3",
|
|
759
|
+
fontWeight: 500
|
|
760
|
+
}, children: "Quick actions:" }),
|
|
761
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: {
|
|
762
|
+
display: "flex",
|
|
763
|
+
flexWrap: "wrap",
|
|
764
|
+
justifyContent: "center",
|
|
765
|
+
gap: "8px"
|
|
766
|
+
}, children: message.quickActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
767
|
+
QuickActionButton,
|
|
768
|
+
{
|
|
769
|
+
action,
|
|
770
|
+
theme,
|
|
771
|
+
onClick: () => onQuickAction(action)
|
|
772
|
+
},
|
|
773
|
+
action.id || action.action || index
|
|
774
|
+
)) })
|
|
775
|
+
] });
|
|
764
776
|
}
|
|
765
777
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
766
778
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -790,21 +802,33 @@ function MessageBubble({ message, theme, onQuickAction }) {
|
|
|
790
802
|
)
|
|
791
803
|
}
|
|
792
804
|
),
|
|
793
|
-
hasQuickActions && /* @__PURE__ */ (0, import_jsx_runtime2.
|
|
805
|
+
hasQuickActions && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: {
|
|
794
806
|
display: "flex",
|
|
795
|
-
|
|
796
|
-
|
|
807
|
+
flexDirection: "column",
|
|
808
|
+
alignItems: "center",
|
|
797
809
|
gap: "8px",
|
|
798
|
-
padding: "
|
|
799
|
-
}, children:
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
810
|
+
padding: "12px 0"
|
|
811
|
+
}, children: [
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: {
|
|
813
|
+
fontSize: "11px",
|
|
814
|
+
color: "#a3a3a3",
|
|
815
|
+
fontWeight: 500
|
|
816
|
+
}, children: "Quick actions:" }),
|
|
817
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: {
|
|
818
|
+
display: "flex",
|
|
819
|
+
flexWrap: "wrap",
|
|
820
|
+
justifyContent: "center",
|
|
821
|
+
gap: "8px"
|
|
822
|
+
}, children: message.quickActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
823
|
+
QuickActionButton,
|
|
824
|
+
{
|
|
825
|
+
action,
|
|
826
|
+
theme,
|
|
827
|
+
onClick: () => onQuickAction(action)
|
|
828
|
+
},
|
|
829
|
+
action.id || action.action || index
|
|
830
|
+
)) })
|
|
831
|
+
] })
|
|
808
832
|
] });
|
|
809
833
|
}
|
|
810
834
|
function SparklesIcon({ color = "currentColor" }) {
|
package/dist/index.mjs
CHANGED
|
@@ -716,21 +716,33 @@ function MessageBubble({ message, theme, onQuickAction }) {
|
|
|
716
716
|
const isUser = message.role === "user";
|
|
717
717
|
const hasQuickActions = message.quickActions && message.quickActions.length > 0;
|
|
718
718
|
if ((message.type === "quick_actions" || !message.content) && hasQuickActions) {
|
|
719
|
-
return /* @__PURE__ */
|
|
719
|
+
return /* @__PURE__ */ jsxs("div", { style: {
|
|
720
720
|
display: "flex",
|
|
721
|
-
|
|
722
|
-
|
|
721
|
+
flexDirection: "column",
|
|
722
|
+
alignItems: "center",
|
|
723
723
|
gap: "8px",
|
|
724
|
-
padding: "
|
|
725
|
-
}, children:
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
724
|
+
padding: "12px 0"
|
|
725
|
+
}, children: [
|
|
726
|
+
/* @__PURE__ */ jsx2("span", { style: {
|
|
727
|
+
fontSize: "11px",
|
|
728
|
+
color: "#a3a3a3",
|
|
729
|
+
fontWeight: 500
|
|
730
|
+
}, children: "Quick actions:" }),
|
|
731
|
+
/* @__PURE__ */ jsx2("div", { style: {
|
|
732
|
+
display: "flex",
|
|
733
|
+
flexWrap: "wrap",
|
|
734
|
+
justifyContent: "center",
|
|
735
|
+
gap: "8px"
|
|
736
|
+
}, children: message.quickActions.map((action, index) => /* @__PURE__ */ jsx2(
|
|
737
|
+
QuickActionButton,
|
|
738
|
+
{
|
|
739
|
+
action,
|
|
740
|
+
theme,
|
|
741
|
+
onClick: () => onQuickAction(action)
|
|
742
|
+
},
|
|
743
|
+
action.id || action.action || index
|
|
744
|
+
)) })
|
|
745
|
+
] });
|
|
734
746
|
}
|
|
735
747
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
736
748
|
/* @__PURE__ */ jsx2(
|
|
@@ -760,21 +772,33 @@ function MessageBubble({ message, theme, onQuickAction }) {
|
|
|
760
772
|
)
|
|
761
773
|
}
|
|
762
774
|
),
|
|
763
|
-
hasQuickActions && /* @__PURE__ */
|
|
775
|
+
hasQuickActions && /* @__PURE__ */ jsxs("div", { style: {
|
|
764
776
|
display: "flex",
|
|
765
|
-
|
|
766
|
-
|
|
777
|
+
flexDirection: "column",
|
|
778
|
+
alignItems: "center",
|
|
767
779
|
gap: "8px",
|
|
768
|
-
padding: "
|
|
769
|
-
}, children:
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
780
|
+
padding: "12px 0"
|
|
781
|
+
}, children: [
|
|
782
|
+
/* @__PURE__ */ jsx2("span", { style: {
|
|
783
|
+
fontSize: "11px",
|
|
784
|
+
color: "#a3a3a3",
|
|
785
|
+
fontWeight: 500
|
|
786
|
+
}, children: "Quick actions:" }),
|
|
787
|
+
/* @__PURE__ */ jsx2("div", { style: {
|
|
788
|
+
display: "flex",
|
|
789
|
+
flexWrap: "wrap",
|
|
790
|
+
justifyContent: "center",
|
|
791
|
+
gap: "8px"
|
|
792
|
+
}, children: message.quickActions.map((action, index) => /* @__PURE__ */ jsx2(
|
|
793
|
+
QuickActionButton,
|
|
794
|
+
{
|
|
795
|
+
action,
|
|
796
|
+
theme,
|
|
797
|
+
onClick: () => onQuickAction(action)
|
|
798
|
+
},
|
|
799
|
+
action.id || action.action || index
|
|
800
|
+
)) })
|
|
801
|
+
] })
|
|
778
802
|
] });
|
|
779
803
|
}
|
|
780
804
|
function SparklesIcon({ color = "currentColor" }) {
|