@streamoid/chat-components 0.2.9 → 0.2.11

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -27
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -722,31 +722,7 @@ function DynamicForm(props) {
722
722
  form_title: title,
723
723
  values
724
724
  };
725
- const valueSummaryParts = [];
726
- for (const [fieldId, val] of Object.entries(values)) {
727
- const field = fields.find((f) => f.id === fieldId);
728
- const fieldLabel = field?.label || fieldId;
729
- let displayVal;
730
- if (field?.type === "media_approval" && val && typeof val === "object") {
731
- const mediaVal = val;
732
- const decisionText = mediaVal.decision ?? "pending";
733
- const feedbackText = mediaVal.feedback?.trim() || "none";
734
- const mediaCount = Array.isArray(mediaVal.media_urls) ? mediaVal.media_urls.length : 0;
735
- displayVal = `decision=${decisionText}, feedback=${feedbackText}, media_count=${mediaCount}`;
736
- } else if (field?.options && typeof val === "string") {
737
- const opt = field.options.find((o) => o.id === val);
738
- displayVal = opt?.label || val;
739
- } else if (field?.options && Array.isArray(val)) {
740
- displayVal = val.map((v) => field.options.find((o) => o.id === v)?.label || v).join(", ");
741
- } else {
742
- displayVal = String(val ?? "");
743
- }
744
- valueSummaryParts.push(`${fieldLabel}: ${displayVal}`);
745
- }
746
- const valueSummary = valueSummaryParts.length > 0 ? `
747
- Submitted values:
748
- ${valueSummaryParts.join("\n")}` : "";
749
- const messageText = `User clicked "${userAction}" on form "${title}"${valueSummary}`;
725
+ const messageText = `User clicked "${userAction}" on form "${title}"`;
750
726
  try {
751
727
  await onSubmit(resumePayload, messageText);
752
728
  setSubmittedData({ user_action: userAction, values });
@@ -922,14 +898,14 @@ ${valueSummaryParts.join("\n")}` : "";
922
898
  {
923
899
  src: url,
924
900
  controls: true,
925
- className: "w-full h-44 object-cover bg-black"
901
+ className: "w-full h-44 object-contain bg-black"
926
902
  }
927
903
  ) : /* @__PURE__ */ jsx10(
928
904
  "img",
929
905
  {
930
906
  src: url,
931
907
  alt: `Generated media ${idx + 1}`,
932
- className: "w-full h-44 object-cover",
908
+ className: "w-full h-44 object-contain bg-black",
933
909
  loading: "lazy"
934
910
  }
935
911
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoid/chat-components",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "Shared chat UI components for the Streamoid chat host — DynamicForm and other cross-service components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",