@eshal-bot/chat-widget 0.1.102 → 0.1.103
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/{chat-widget-MarkdownRenderer-DkfSQ430.esm.js → chat-widget-MarkdownRenderer-DNvWzRHr.esm.js} +1 -1
- package/dist/chat-widget-index-2LNAzlMS.esm.js +20 -0
- package/dist/chat-widget.esm.js +1 -1
- package/dist/chat-widget.js +30 -17
- package/dist/chat-widget.min.js +4 -4
- package/dist/chat-widget.umd.js +8 -8
- package/package.json +1 -1
- package/dist/chat-widget-index-BcPgyNKZ.esm.js +0 -20
package/dist/chat-widget.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{S as default}from"./chat-widget-index-
|
|
1
|
+
export{S as default}from"./chat-widget-index-2LNAzlMS.esm.js";import"react";import"react-dom/client";import"react-dom";import"react/jsx-runtime";
|
package/dist/chat-widget.js
CHANGED
|
@@ -17256,23 +17256,36 @@
|
|
|
17256
17256
|
scrollbarWidth: "none",
|
|
17257
17257
|
msOverflowStyle: "none"
|
|
17258
17258
|
},
|
|
17259
|
-
children: suggestions.map((p, index) =>
|
|
17260
|
-
|
|
17261
|
-
|
|
17262
|
-
//
|
|
17263
|
-
//
|
|
17264
|
-
//
|
|
17265
|
-
|
|
17266
|
-
|
|
17267
|
-
|
|
17268
|
-
|
|
17269
|
-
|
|
17270
|
-
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17275
|
-
|
|
17259
|
+
children: suggestions.map((p, index) => {
|
|
17260
|
+
// EV-2993: the chip follows the direction of the string it
|
|
17261
|
+
// actually DISPLAYS - which under EV-2977 is the natural
|
|
17262
|
+
// question (submitText), not the title-case label - falling
|
|
17263
|
+
// back to the configured widget direction only when the text
|
|
17264
|
+
// itself is direction-neutral ("123", a lone "?"). `dir="auto"`
|
|
17265
|
+
// alone was not enough: it hard-defaults neutral text to LTR
|
|
17266
|
+
// and it leaves `text-align` on the container's direction.
|
|
17267
|
+
const displayText = getPromptDisplayText(p, questionDisplay);
|
|
17268
|
+
const chipIsRtl = detectTextDirection(displayText, isRtl);
|
|
17269
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx("button", {
|
|
17270
|
+
type: "button",
|
|
17271
|
+
onClick: () =>
|
|
17272
|
+
// EV-2842: pass the prompt object + position so the click
|
|
17273
|
+
// handler can record telemetry; extra args are ignored by
|
|
17274
|
+
// handlers that only read the submit value.
|
|
17275
|
+
onSuggestionClick(p.submitText || p.text || p, p, index),
|
|
17276
|
+
dir: chipIsRtl ? "rtl" : "ltr",
|
|
17277
|
+
className: "inline-flex items-center rounded-full px-4 py-1.5 whitespace-nowrap flex-shrink-0 border-0 transition-transform duration-150 active:scale-95 ".concat(chipIsRtl ? "text-right" : "text-left"),
|
|
17278
|
+
style: {
|
|
17279
|
+
direction: chipIsRtl ? "rtl" : "ltr",
|
|
17280
|
+
textAlign: chipIsRtl ? "right" : "left",
|
|
17281
|
+
background: "linear-gradient(135deg, ".concat(promptPrimary, " 0%, ").concat(promptPrimary, "dd 100%)"),
|
|
17282
|
+
color: promptTextColor,
|
|
17283
|
+
fontFamily: promptFontFamily,
|
|
17284
|
+
fontSize: promptFontSize
|
|
17285
|
+
},
|
|
17286
|
+
children: displayText
|
|
17287
|
+
}, "".concat(p.text || p, "-").concat(index));
|
|
17288
|
+
})
|
|
17276
17289
|
}), /*#__PURE__*/jsxRuntimeExports.jsx("button", {
|
|
17277
17290
|
type: "button",
|
|
17278
17291
|
onClick: () => scroll("right"),
|