@informedai/react 0.2.3 → 0.2.4

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
@@ -762,17 +762,15 @@ function MessageBubble({ message, theme, onQuickAction }) {
762
762
  action.id || action.action || index
763
763
  )) });
764
764
  }
765
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
766
- "div",
767
- {
768
- style: {
769
- 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)(
765
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
766
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
767
+ "div",
768
+ {
769
+ style: {
770
+ display: "flex",
771
+ justifyContent: isUser ? "flex-end" : "flex-start"
772
+ },
773
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
776
774
  "div",
777
775
  {
778
776
  style: {
@@ -789,24 +787,25 @@ function MessageBubble({ message, theme, onQuickAction }) {
789
787
  },
790
788
  children: message.content
791
789
  }
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
- );
790
+ )
791
+ }
792
+ ),
793
+ hasQuickActions && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: {
794
+ display: "flex",
795
+ flexWrap: "wrap",
796
+ justifyContent: "center",
797
+ 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
+ )) })
808
+ ] });
810
809
  }
811
810
  function SparklesIcon({ color = "currentColor" }) {
812
811
  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
@@ -732,17 +732,15 @@ function MessageBubble({ message, theme, onQuickAction }) {
732
732
  action.id || action.action || index
733
733
  )) });
734
734
  }
735
- return /* @__PURE__ */ jsxs(
736
- "div",
737
- {
738
- style: {
739
- display: "flex",
740
- flexDirection: "column",
741
- alignItems: isUser ? "flex-end" : "flex-start",
742
- gap: "10px"
743
- },
744
- children: [
745
- /* @__PURE__ */ jsx2(
735
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
736
+ /* @__PURE__ */ jsx2(
737
+ "div",
738
+ {
739
+ style: {
740
+ display: "flex",
741
+ justifyContent: isUser ? "flex-end" : "flex-start"
742
+ },
743
+ children: /* @__PURE__ */ jsx2(
746
744
  "div",
747
745
  {
748
746
  style: {
@@ -759,24 +757,25 @@ function MessageBubble({ message, theme, onQuickAction }) {
759
757
  },
760
758
  children: message.content
761
759
  }
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
- );
760
+ )
761
+ }
762
+ ),
763
+ hasQuickActions && /* @__PURE__ */ jsx2("div", { style: {
764
+ display: "flex",
765
+ flexWrap: "wrap",
766
+ justifyContent: "center",
767
+ 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
+ )) })
778
+ ] });
780
779
  }
781
780
  function SparklesIcon({ color = "currentColor" }) {
782
781
  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.4",
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",