@walkspan/chatbot 0.2.15 → 0.2.17
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 +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -103,20 +103,20 @@ var FloatingChatbot = ({
|
|
|
103
103
|
"button",
|
|
104
104
|
{
|
|
105
105
|
onClick: () => setOpen(true),
|
|
106
|
-
className: `fixed z-50
|
|
106
|
+
className: `fixed z-50 bottom-6 right-6 w-14 h-14 rounded-full bg-[#f1592a] text-white shadow-lg flex items-center justify-center p-3`
|
|
107
107
|
},
|
|
108
108
|
/* @__PURE__ */ import_react.default.createElement(import_fa.FaComments, { size: 22 })
|
|
109
109
|
), open && /* @__PURE__ */ import_react.default.createElement(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
|
-
className: `fixed z-50
|
|
112
|
+
className: `fixed z-50 bottom-6 right-6 w-96 max-w-[90vw] h-[500px] bg-white rounded-xl shadow-xl flex flex-col`
|
|
113
113
|
},
|
|
114
114
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "flex items-center justify-between p-4 border-b bg-[#f1592a] text-white rounded-t-xl" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "font-medium" }, title), /* @__PURE__ */ import_react.default.createElement("button", { onClick: () => setOpen(false) }, /* @__PURE__ */ import_react.default.createElement(import_fa.FaTimes, null))),
|
|
115
115
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "flex-1 p-4 overflow-y-auto space-y-2" }, messages.length === 0 && !isLoading && /* @__PURE__ */ import_react.default.createElement("div", { className: "flex flex-col items-center justify-center h-full text-center px-4" }, /* @__PURE__ */ import_react.default.createElement("h2", { className: "text-xl font-medium text-black mb-2" }, "Welcome to ", /* @__PURE__ */ import_react.default.createElement("span", { className: "text-[#f1592a]" }, "Walkspan"), " AI"), /* @__PURE__ */ import_react.default.createElement("p", { className: "text-sm text-[#71717a] leading-relaxed" }, "I'm your neighborhood intelligence assistant. I help you compare neighborhoods and find the right place for your lifestyle. How can I help?")), messages.map((m) => /* @__PURE__ */ import_react.default.createElement(
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
118
|
key: m.id,
|
|
119
|
-
className: `max-w-[80%] min-w-0 py-2 px-5 rounded-
|
|
119
|
+
className: `max-w-[80%] min-w-0 py-2 px-5 rounded-xl text-sm break-words whitespace-pre-wrap ${m.type === "user" ? "ml-auto bg-[#edf0f6] text-black border border-gray-200" : "bg-[#f1592a] text-white"}`
|
|
120
120
|
},
|
|
121
121
|
m == null ? void 0 : m.message,
|
|
122
122
|
m.type !== "user" && m.link && /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -125,7 +125,8 @@ var FloatingChatbot = ({
|
|
|
125
125
|
href: m.link,
|
|
126
126
|
target: "_blank",
|
|
127
127
|
rel: "noopener noreferrer",
|
|
128
|
-
className: "block mt-2 underline text-white
|
|
128
|
+
className: "block mt-2 underline text-white",
|
|
129
|
+
style: { wordBreak: "break-all", overflowWrap: "break-word" }
|
|
129
130
|
},
|
|
130
131
|
m.link
|
|
131
132
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -67,20 +67,20 @@ var FloatingChatbot = ({
|
|
|
67
67
|
"button",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => setOpen(true),
|
|
70
|
-
className: `fixed z-50
|
|
70
|
+
className: `fixed z-50 bottom-6 right-6 w-14 h-14 rounded-full bg-[#f1592a] text-white shadow-lg flex items-center justify-center p-3`
|
|
71
71
|
},
|
|
72
72
|
/* @__PURE__ */ React.createElement(FaComments, { size: 22 })
|
|
73
73
|
), open && /* @__PURE__ */ React.createElement(
|
|
74
74
|
"div",
|
|
75
75
|
{
|
|
76
|
-
className: `fixed z-50
|
|
76
|
+
className: `fixed z-50 bottom-6 right-6 w-96 max-w-[90vw] h-[500px] bg-white rounded-xl shadow-xl flex flex-col`
|
|
77
77
|
},
|
|
78
78
|
/* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between p-4 border-b bg-[#f1592a] text-white rounded-t-xl" }, /* @__PURE__ */ React.createElement("div", { className: "font-medium" }, title), /* @__PURE__ */ React.createElement("button", { onClick: () => setOpen(false) }, /* @__PURE__ */ React.createElement(FaTimes, null))),
|
|
79
79
|
/* @__PURE__ */ React.createElement("div", { className: "flex-1 p-4 overflow-y-auto space-y-2" }, messages.length === 0 && !isLoading && /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center h-full text-center px-4" }, /* @__PURE__ */ React.createElement("h2", { className: "text-xl font-medium text-black mb-2" }, "Welcome to ", /* @__PURE__ */ React.createElement("span", { className: "text-[#f1592a]" }, "Walkspan"), " AI"), /* @__PURE__ */ React.createElement("p", { className: "text-sm text-[#71717a] leading-relaxed" }, "I'm your neighborhood intelligence assistant. I help you compare neighborhoods and find the right place for your lifestyle. How can I help?")), messages.map((m) => /* @__PURE__ */ React.createElement(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
82
|
key: m.id,
|
|
83
|
-
className: `max-w-[80%] min-w-0 py-2 px-5 rounded-
|
|
83
|
+
className: `max-w-[80%] min-w-0 py-2 px-5 rounded-xl text-sm break-words whitespace-pre-wrap ${m.type === "user" ? "ml-auto bg-[#edf0f6] text-black border border-gray-200" : "bg-[#f1592a] text-white"}`
|
|
84
84
|
},
|
|
85
85
|
m == null ? void 0 : m.message,
|
|
86
86
|
m.type !== "user" && m.link && /* @__PURE__ */ React.createElement(
|
|
@@ -89,7 +89,8 @@ var FloatingChatbot = ({
|
|
|
89
89
|
href: m.link,
|
|
90
90
|
target: "_blank",
|
|
91
91
|
rel: "noopener noreferrer",
|
|
92
|
-
className: "block mt-2 underline text-white
|
|
92
|
+
className: "block mt-2 underline text-white",
|
|
93
|
+
style: { wordBreak: "break-all", overflowWrap: "break-word" }
|
|
93
94
|
},
|
|
94
95
|
m.link
|
|
95
96
|
)
|