@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 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.jsx)("div", { style: {
749
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: {
750
750
  display: "flex",
751
- flexWrap: "wrap",
752
- justifyContent: "center",
751
+ flexDirection: "column",
752
+ alignItems: "center",
753
753
  gap: "8px",
754
- padding: "8px 0"
755
- }, children: message.quickActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
756
- QuickActionButton,
757
- {
758
- action,
759
- theme,
760
- onClick: () => onQuickAction(action)
761
- },
762
- action.id || action.action || index
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.jsx)("div", { style: {
805
+ hasQuickActions && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: {
794
806
  display: "flex",
795
- flexWrap: "wrap",
796
- justifyContent: "center",
807
+ flexDirection: "column",
808
+ alignItems: "center",
797
809
  gap: "8px",
798
- padding: "8px 0"
799
- }, children: message.quickActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
800
- QuickActionButton,
801
- {
802
- action,
803
- theme,
804
- onClick: () => onQuickAction(action)
805
- },
806
- action.id || action.action || index
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__ */ jsx2("div", { style: {
719
+ return /* @__PURE__ */ jsxs("div", { style: {
720
720
  display: "flex",
721
- flexWrap: "wrap",
722
- justifyContent: "center",
721
+ flexDirection: "column",
722
+ alignItems: "center",
723
723
  gap: "8px",
724
- padding: "8px 0"
725
- }, children: message.quickActions.map((action, index) => /* @__PURE__ */ jsx2(
726
- QuickActionButton,
727
- {
728
- action,
729
- theme,
730
- onClick: () => onQuickAction(action)
731
- },
732
- action.id || action.action || index
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__ */ jsx2("div", { style: {
775
+ hasQuickActions && /* @__PURE__ */ jsxs("div", { style: {
764
776
  display: "flex",
765
- flexWrap: "wrap",
766
- justifyContent: "center",
777
+ flexDirection: "column",
778
+ alignItems: "center",
767
779
  gap: "8px",
768
- padding: "8px 0"
769
- }, children: message.quickActions.map((action, index) => /* @__PURE__ */ jsx2(
770
- QuickActionButton,
771
- {
772
- action,
773
- theme,
774
- onClick: () => onQuickAction(action)
775
- },
776
- action.id || action.action || index
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" }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@informedai/react",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "React SDK for InformedAI Assistant - AI-powered content creation widget",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",