@informedai/react 0.2.3 → 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,33 +746,43 @@ 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
- )) });
764
- }
765
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
766
- "div",
767
- {
768
- style: {
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: {
769
762
  display: "flex",
770
- flexDirection: "column",
771
- alignItems: isUser ? "flex-end" : "flex-start",
772
- gap: "10px"
773
- },
774
- children: [
775
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
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
+ ] });
776
+ }
777
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
778
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
779
+ "div",
780
+ {
781
+ style: {
782
+ display: "flex",
783
+ justifyContent: isUser ? "flex-end" : "flex-start"
784
+ },
785
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
776
786
  "div",
777
787
  {
778
788
  style: {
@@ -789,24 +799,37 @@ function MessageBubble({ message, theme, onQuickAction }) {
789
799
  },
790
800
  children: message.content
791
801
  }
792
- ),
793
- hasQuickActions && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: {
794
- display: "flex",
795
- flexWrap: "wrap",
796
- gap: "8px",
797
- maxWidth: "100%"
798
- }, children: message.quickActions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
799
- QuickActionButton,
800
- {
801
- action,
802
- theme,
803
- onClick: () => onQuickAction(action)
804
- },
805
- action.id || action.action || index
806
- )) })
807
- ]
808
- }
809
- );
802
+ )
803
+ }
804
+ ),
805
+ hasQuickActions && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: {
806
+ display: "flex",
807
+ flexDirection: "column",
808
+ alignItems: "center",
809
+ gap: "8px",
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
+ ] })
832
+ ] });
810
833
  }
811
834
  function SparklesIcon({ color = "currentColor" }) {
812
835
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", children: [
package/dist/index.mjs CHANGED
@@ -318,7 +318,7 @@ function InformedAIProvider({ config, children }) {
318
318
  }
319
319
 
320
320
  // src/components/InformedAssistant.tsx
321
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
321
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
322
322
  var defaultTheme = {
323
323
  primaryColor: "#f59e0b",
324
324
  // Amber
@@ -716,33 +716,43 @@ 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
- )) });
734
- }
735
- return /* @__PURE__ */ jsxs(
736
- "div",
737
- {
738
- style: {
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: {
739
732
  display: "flex",
740
- flexDirection: "column",
741
- alignItems: isUser ? "flex-end" : "flex-start",
742
- gap: "10px"
743
- },
744
- children: [
745
- /* @__PURE__ */ jsx2(
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
+ ] });
746
+ }
747
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
748
+ /* @__PURE__ */ jsx2(
749
+ "div",
750
+ {
751
+ style: {
752
+ display: "flex",
753
+ justifyContent: isUser ? "flex-end" : "flex-start"
754
+ },
755
+ children: /* @__PURE__ */ jsx2(
746
756
  "div",
747
757
  {
748
758
  style: {
@@ -759,24 +769,37 @@ function MessageBubble({ message, theme, onQuickAction }) {
759
769
  },
760
770
  children: message.content
761
771
  }
762
- ),
763
- hasQuickActions && /* @__PURE__ */ jsx2("div", { style: {
764
- display: "flex",
765
- flexWrap: "wrap",
766
- gap: "8px",
767
- maxWidth: "100%"
768
- }, children: message.quickActions.map((action, index) => /* @__PURE__ */ jsx2(
769
- QuickActionButton,
770
- {
771
- action,
772
- theme,
773
- onClick: () => onQuickAction(action)
774
- },
775
- action.id || action.action || index
776
- )) })
777
- ]
778
- }
779
- );
772
+ )
773
+ }
774
+ ),
775
+ hasQuickActions && /* @__PURE__ */ jsxs("div", { style: {
776
+ display: "flex",
777
+ flexDirection: "column",
778
+ alignItems: "center",
779
+ gap: "8px",
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
+ ] })
802
+ ] });
780
803
  }
781
804
  function SparklesIcon({ color = "currentColor" }) {
782
805
  return /* @__PURE__ */ jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@informedai/react",
3
- "version": "0.2.3",
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",