@flamingo-stack/openframe-frontend-core 0.0.534 → 0.0.535-1762.4618.1

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 (95) hide show
  1. package/dist/{chunk-67MWXMNT.cjs → chunk-2AMYXNQ2.cjs} +26 -26
  2. package/dist/{chunk-67MWXMNT.cjs.map → chunk-2AMYXNQ2.cjs.map} +1 -1
  3. package/dist/{chunk-BUVD2OAI.js → chunk-5OPVJBHQ.js} +4 -4
  4. package/dist/{chunk-BSE2UT6L.js → chunk-6OZWDOP5.js} +2 -2
  5. package/dist/{chunk-KZ6PWFHK.js → chunk-7TQDW3PE.js} +2 -2
  6. package/dist/{chunk-H4W4LENJ.js → chunk-A5EA3YO7.js} +5 -5
  7. package/dist/{chunk-JELZAWSM.cjs → chunk-CMIHA6TT.cjs} +3 -3
  8. package/dist/{chunk-JELZAWSM.cjs.map → chunk-CMIHA6TT.cjs.map} +1 -1
  9. package/dist/{chunk-ZKQXE2P4.cjs → chunk-DK6IYFLD.cjs} +9 -9
  10. package/dist/{chunk-ZKQXE2P4.cjs.map → chunk-DK6IYFLD.cjs.map} +1 -1
  11. package/dist/{chunk-ONIYUMTO.js → chunk-DRJC7TTW.js} +2 -2
  12. package/dist/{chunk-MLILEBJU.cjs → chunk-ENOER2QA.cjs} +61 -61
  13. package/dist/{chunk-MLILEBJU.cjs.map → chunk-ENOER2QA.cjs.map} +1 -1
  14. package/dist/{chunk-O6VJZX2N.js → chunk-GBWS62LR.js} +51 -34
  15. package/dist/chunk-GBWS62LR.js.map +1 -0
  16. package/dist/{chunk-NCUKKJRG.cjs → chunk-GF5A23J3.cjs} +87 -87
  17. package/dist/{chunk-NCUKKJRG.cjs.map → chunk-GF5A23J3.cjs.map} +1 -1
  18. package/dist/{chunk-2YJ2CVRC.cjs → chunk-GRGFMXNO.cjs} +31 -31
  19. package/dist/{chunk-2YJ2CVRC.cjs.map → chunk-GRGFMXNO.cjs.map} +1 -1
  20. package/dist/{chunk-MTCU5MQN.js → chunk-GS4R5UQ7.js} +2 -2
  21. package/dist/{chunk-POFCTXNH.js → chunk-HNZDQ4SH.js} +2 -2
  22. package/dist/{chunk-YW2ZU7LC.cjs → chunk-HSRHPF32.cjs} +7 -7
  23. package/dist/{chunk-YW2ZU7LC.cjs.map → chunk-HSRHPF32.cjs.map} +1 -1
  24. package/dist/{chunk-UWB33C6R.cjs → chunk-JW4BTXVH.cjs} +14 -14
  25. package/dist/{chunk-UWB33C6R.cjs.map → chunk-JW4BTXVH.cjs.map} +1 -1
  26. package/dist/{chunk-VYOGAQLM.js → chunk-JWJQHURJ.js} +2 -2
  27. package/dist/{chunk-W4MXOBEW.js → chunk-JWWZFEFI.js} +2 -2
  28. package/dist/{chunk-LBZEPB4Y.cjs → chunk-JZMQQBUC.cjs} +11 -11
  29. package/dist/{chunk-LBZEPB4Y.cjs.map → chunk-JZMQQBUC.cjs.map} +1 -1
  30. package/dist/{chunk-2ALT6CTY.js → chunk-QHOVACZK.js} +2 -2
  31. package/dist/{chunk-LYRGM25P.cjs → chunk-T4GNFVT3.cjs} +51 -34
  32. package/dist/chunk-T4GNFVT3.cjs.map +1 -0
  33. package/dist/{chunk-M5ODB6RQ.cjs → chunk-T743Z3KN.cjs} +37 -37
  34. package/dist/{chunk-M5ODB6RQ.cjs.map → chunk-T743Z3KN.cjs.map} +1 -1
  35. package/dist/{chunk-EBSZWSC5.cjs → chunk-TOWXHZF5.cjs} +4 -4
  36. package/dist/{chunk-EBSZWSC5.cjs.map → chunk-TOWXHZF5.cjs.map} +1 -1
  37. package/dist/{chunk-ZLLXYE2G.js → chunk-URBYMQ4Z.js} +4 -4
  38. package/dist/{chunk-UMDGRL6A.cjs → chunk-WL3PP4D6.cjs} +26 -26
  39. package/dist/{chunk-UMDGRL6A.cjs.map → chunk-WL3PP4D6.cjs.map} +1 -1
  40. package/dist/{chunk-WBYRBTAS.js → chunk-WXRQYGE5.js} +2 -2
  41. package/dist/{chunk-D62VYSTL.js → chunk-XPKCOZQE.js} +6 -6
  42. package/dist/{chunk-RHKH4YUY.cjs → chunk-ZUVBTDLG.cjs} +5 -5
  43. package/dist/{chunk-RHKH4YUY.cjs.map → chunk-ZUVBTDLG.cjs.map} +1 -1
  44. package/dist/components/case-studies/index.cjs +8 -8
  45. package/dist/components/case-studies/index.js +2 -2
  46. package/dist/components/chat/chat-input.d.ts.map +1 -1
  47. package/dist/components/chat/index.cjs +2 -2
  48. package/dist/components/chat/index.js +1 -1
  49. package/dist/components/contact/index.cjs +3 -3
  50. package/dist/components/contact/index.js +2 -2
  51. package/dist/components/docs/index.cjs +5 -5
  52. package/dist/components/docs/index.js +4 -4
  53. package/dist/components/embeds/index.cjs +3 -3
  54. package/dist/components/embeds/index.js +2 -2
  55. package/dist/components/faq/index.cjs +3 -3
  56. package/dist/components/faq/index.js +2 -2
  57. package/dist/components/features/index.cjs +2 -2
  58. package/dist/components/features/index.js +1 -1
  59. package/dist/components/help-center-pages/index.cjs +22 -22
  60. package/dist/components/help-center-pages/index.js +13 -13
  61. package/dist/components/index.cjs +132 -132
  62. package/dist/components/index.js +11 -11
  63. package/dist/components/meeting-scheduler/index.cjs +34 -34
  64. package/dist/components/meeting-scheduler/index.js +3 -3
  65. package/dist/components/navigation/index.cjs +2 -2
  66. package/dist/components/navigation/index.js +1 -1
  67. package/dist/components/onboarding-guides/index.cjs +5 -5
  68. package/dist/components/onboarding-guides/index.js +4 -4
  69. package/dist/components/related-content/index.cjs +3 -3
  70. package/dist/components/related-content/index.js +2 -2
  71. package/dist/components/tickets/index.cjs +6 -6
  72. package/dist/components/tickets/index.js +5 -5
  73. package/dist/components/ui/file-upload.d.ts.map +1 -1
  74. package/dist/components/ui/index.cjs +2 -2
  75. package/dist/components/ui/index.js +1 -1
  76. package/dist/index.cjs +2 -2
  77. package/dist/index.js +1 -1
  78. package/package.json +1 -1
  79. package/src/components/chat/chat-input.tsx +84 -32
  80. package/src/components/ui/file-upload.tsx +5 -1
  81. package/dist/chunk-LYRGM25P.cjs.map +0 -1
  82. package/dist/chunk-O6VJZX2N.js.map +0 -1
  83. /package/dist/{chunk-BUVD2OAI.js.map → chunk-5OPVJBHQ.js.map} +0 -0
  84. /package/dist/{chunk-BSE2UT6L.js.map → chunk-6OZWDOP5.js.map} +0 -0
  85. /package/dist/{chunk-KZ6PWFHK.js.map → chunk-7TQDW3PE.js.map} +0 -0
  86. /package/dist/{chunk-H4W4LENJ.js.map → chunk-A5EA3YO7.js.map} +0 -0
  87. /package/dist/{chunk-ONIYUMTO.js.map → chunk-DRJC7TTW.js.map} +0 -0
  88. /package/dist/{chunk-MTCU5MQN.js.map → chunk-GS4R5UQ7.js.map} +0 -0
  89. /package/dist/{chunk-POFCTXNH.js.map → chunk-HNZDQ4SH.js.map} +0 -0
  90. /package/dist/{chunk-VYOGAQLM.js.map → chunk-JWJQHURJ.js.map} +0 -0
  91. /package/dist/{chunk-W4MXOBEW.js.map → chunk-JWWZFEFI.js.map} +0 -0
  92. /package/dist/{chunk-2ALT6CTY.js.map → chunk-QHOVACZK.js.map} +0 -0
  93. /package/dist/{chunk-ZLLXYE2G.js.map → chunk-URBYMQ4Z.js.map} +0 -0
  94. /package/dist/{chunk-WBYRBTAS.js.map → chunk-WXRQYGE5.js.map} +0 -0
  95. /package/dist/{chunk-D62VYSTL.js.map → chunk-XPKCOZQE.js.map} +0 -0
@@ -6530,6 +6530,7 @@ var ChatInput = forwardRef13((allProps, ref) => {
6530
6530
  // contenteditable div, not a <textarea>, so spreading them would warn.
6531
6531
  } = rest;
6532
6532
  const [value, setValue] = useState10("");
6533
+ const [hasChips, setHasChips] = useState10(false);
6533
6534
  const [focused, setFocused] = useState10(false);
6534
6535
  const [isStopping, setIsStopping] = useState10(false);
6535
6536
  const [previewDismissed, setPreviewDismissed] = useState10(false);
@@ -6565,26 +6566,32 @@ var ChatInput = forwardRef13((allProps, ref) => {
6565
6566
  if (typeof caret === "number") placeCaretAtOffset(el, caret);
6566
6567
  else placeCaretAtEnd(el);
6567
6568
  }
6569
+ setHasChips(el.querySelector("[data-token]") !== null);
6568
6570
  }
6571
+ valueRef.current = next;
6569
6572
  setValue(next);
6570
6573
  }, []);
6571
6574
  const fire = useCallback3(
6572
6575
  (message2) => {
6573
6576
  const can = (message2.length > 0 || allowEmptySend) && !sending && !disabled;
6574
6577
  if (!can || !onSend) return;
6575
- const result = onSend(message2);
6576
- const done = () => {
6577
- metaRef.current = /* @__PURE__ */ new Map();
6578
- applyValue("");
6579
- shouldRefocusRef.current = true;
6580
- focusEditor();
6578
+ const sentMeta = metaRef.current;
6579
+ metaRef.current = /* @__PURE__ */ new Map();
6580
+ applyValue("");
6581
+ shouldRefocusRef.current = true;
6582
+ focusEditor();
6583
+ const restore = () => {
6584
+ if (valueRef.current.length > 0) return;
6585
+ metaRef.current = sentMeta;
6586
+ applyValue(message2);
6581
6587
  };
6588
+ const result = onSend(message2);
6582
6589
  if (result instanceof Promise) {
6583
6590
  void result.then((ok) => {
6584
- if (ok !== false) done();
6591
+ if (ok === false) restore();
6585
6592
  });
6586
- } else if (result !== false) {
6587
- done();
6593
+ } else if (result === false) {
6594
+ restore();
6588
6595
  }
6589
6596
  },
6590
6597
  [allowEmptySend, sending, disabled, onSend, focusEditor, applyValue]
@@ -6673,6 +6680,7 @@ var ChatInput = forwardRef13((allProps, ref) => {
6673
6680
  const syncFromDom = useCallback3(() => {
6674
6681
  const el = editorRef.current;
6675
6682
  if (!el) return;
6683
+ setHasChips(el.querySelector("[data-token]") !== null);
6676
6684
  setValue(serialize(el));
6677
6685
  }, []);
6678
6686
  const handleInput = useCallback3(() => {
@@ -6778,8 +6786,7 @@ var ChatInput = forwardRef13((allProps, ref) => {
6778
6786
  const hasContent2 = value.trim().length > 0 || allowEmptySend;
6779
6787
  const sendDisabled = sending || disabled || !hasContent2;
6780
6788
  const isEmpty = value.length === 0;
6781
- const isDisabled = sending || disabled;
6782
- const showPreview = !isDisabled && !!previewText && !previewDismissed;
6789
+ const showPreview = !sending && !disabled && !!previewText && !previewDismissed;
6783
6790
  return /* @__PURE__ */ jsx30(
6784
6791
  "div",
6785
6792
  {
@@ -6813,23 +6820,24 @@ var ChatInput = forwardRef13((allProps, ref) => {
6813
6820
  },
6814
6821
  className: cn(
6815
6822
  // `items-center` keeps the empty single-line text AND a mention chip
6816
- // vertically centered the same way. `py-1.5` (6px) pairs with the
6817
- // editor's `leading-9` (36px) → a single line is exactly 48px
6818
- // (36 + 2*6). The 36px line box is just barely above the 32px chip
6819
- // (incl. its ~3.5px vertical-align overhead), so there's almost no
6820
- // slack for the chip to drift in → it reads as centered, and the row
6821
- // never overflows past 48px.
6823
+ // vertically centered the same way. With a chip in the box, `py-1.5`
6824
+ // (6px) pairs with the editor's `leading-9` (36px) → that row is
6825
+ // 36 + 2*6 = 48px. The 36px line box is just barely above the 32px
6826
+ // chip (incl. its ~3.5px vertical-align overhead), so there's almost
6827
+ // no slack for the chip to drift in → it reads as centered.
6828
+ // A chipless row is shorter than its content box and the `min-h-*`
6829
+ // here is what sets its height: 48px from `md` up, 44px below.
6822
6830
  "flex w-full items-center gap-2 px-3 py-1.5 min-h-11 md:min-h-12 cursor-text group transition-colors duration-200",
6823
6831
  !hideBorder && "rounded-[6px] border bg-ods-card border-ods-border",
6824
- !hideBorder && (focused ? "border-ods-accent" : !isDisabled && "hover:bg-ods-bg-hover hover:border-ods-border-hover"),
6825
- !hideBorder && isDisabled && "!cursor-not-allowed bg-ods-bg",
6832
+ !hideBorder && (focused ? "border-ods-accent" : !disabled && "hover:bg-ods-bg-hover hover:border-ods-border-hover"),
6833
+ !hideBorder && disabled && "!cursor-not-allowed bg-ods-bg",
6826
6834
  hideBorder && "bg-transparent"
6827
6835
  ),
6828
6836
  children: [
6829
6837
  startIcon && /* @__PURE__ */ jsx30("span", { className: "flex h-6 shrink-0 items-center", children: startIcon }),
6830
6838
  /* @__PURE__ */ jsxs23("div", { className: "relative flex-1 min-w-0", children: [
6831
- isEmpty && !showPreview && /* @__PURE__ */ jsx30("span", { className: "pointer-events-none absolute left-0 top-0 select-none text-h4 !leading-9 text-ods-text-secondary", children: disabled ? "Connection lost. Waiting to reconnect..." : placeholder }),
6832
- showPreview && /* @__PURE__ */ jsx30("p", { className: "pointer-events-none absolute inset-x-0 top-0 m-0 select-none truncate text-h4 !leading-9 text-ods-text-secondary", children: previewText }),
6839
+ isEmpty && !showPreview && /* @__PURE__ */ jsx30("span", { className: "pointer-events-none absolute left-0 top-0 select-none text-h4 text-ods-text-secondary", children: disabled ? "Connection lost. Waiting to reconnect..." : placeholder }),
6840
+ showPreview && /* @__PURE__ */ jsx30("p", { className: cn("pointer-events-none absolute inset-x-0 top-0 m-0 select-none truncate text-h4 text-ods-text-secondary", hasChips && "!leading-9"), children: previewText }),
6833
6841
  /* @__PURE__ */ jsx30(
6834
6842
  "div",
6835
6843
  {
@@ -6838,7 +6846,7 @@ var ChatInput = forwardRef13((allProps, ref) => {
6838
6846
  role: "textbox",
6839
6847
  "aria-multiline": "true",
6840
6848
  "aria-label": typeof placeholder === "string" ? placeholder : "Message",
6841
- contentEditable: !isDisabled,
6849
+ contentEditable: !disabled,
6842
6850
  suppressContentEditableWarning: true,
6843
6851
  spellCheck: true,
6844
6852
  onInput: handleInput,
@@ -6861,17 +6869,25 @@ var ChatInput = forwardRef13((allProps, ref) => {
6861
6869
  // see the preview comment above) and is only made transparent;
6862
6870
  // the absolutely-positioned single-line preview paints over it.
6863
6871
  showPreview && "opacity-0",
6864
- // `leading-9` (36px) sits just above the 32px chip's line-box need
6865
- // (~35.5px incl. vertical-align overhead): the LINE drives row
6866
- // height (deterministic 48px, no overflow) AND the near-zero slack
6867
- // keeps the chip centered. ~4px gap between wrapped chip rows.
6868
- // `min-h-9` pins that single-line box even when EMPTY: a non-editable
6869
- // (`contentEditable=false`, i.e. disabled/sending) empty div would
6870
- // otherwise collapse to 0px, and `items-center` would re-center the
6871
- // shorter wrapper in the row — dropping the `top-0` placeholder down.
6872
- "min-h-9 text-h4 text-ods-text-primary !leading-9",
6872
+ // WITH chips, `leading-9` (36px) sits just above the 32px chip's
6873
+ // line-box need (~35.5px incl. vertical-align overhead): the LINE
6874
+ // drives row height (deterministic 48px, no overflow) AND the
6875
+ // near-zero slack keeps the chip centered against the `align-top`
6876
+ // `h-9` wrapper `buildChipEl` gives it. ~4px gap between wrapped
6877
+ // chip rows.
6878
+ // WITHOUT chips there is nothing tall to center, and forcing the
6879
+ // same 36px box on 14px phone text (`text-h4`) put a blank line's
6880
+ // worth of air between every wrapped row — so plain drafts keep
6881
+ // `text-h4`'s own responsive line-height (20px / 24px at md).
6882
+ // `min-h-*` pins the single-line box even when EMPTY: a
6883
+ // non-editable (`contentEditable=false`, i.e. `disabled`) empty div
6884
+ // would otherwise collapse to 0px, and `items-center` would
6885
+ // re-center the shorter wrapper in the row — dropping the `top-0`
6886
+ // placeholder down.
6887
+ "text-h4 text-ods-text-primary",
6888
+ hasChips ? "min-h-9 !leading-9" : "min-h-[var(--font-line-space-h4-body)]",
6873
6889
  "scrollbar-thin scrollbar-track-transparent scrollbar-thumb-ods-border/30 hover:scrollbar-thumb-ods-text-secondary/30",
6874
- isDisabled && "cursor-not-allowed"
6890
+ disabled && "cursor-not-allowed"
6875
6891
  )
6876
6892
  }
6877
6893
  )
@@ -47107,7 +47123,8 @@ function FileUpload({
47107
47123
  return;
47108
47124
  }
47109
47125
  try {
47110
- handleFiles(await pickFiles());
47126
+ const picked = await pickFiles();
47127
+ if (picked.length > 0) handleFiles(picked);
47111
47128
  } catch (err) {
47112
47129
  setValidationError(err instanceof Error ? err.message : "Could not open the file picker");
47113
47130
  }
@@ -62071,4 +62088,4 @@ export {
62071
62088
  LogsList,
62072
62089
  assets
62073
62090
  };
62074
- //# sourceMappingURL=chunk-O6VJZX2N.js.map
62091
+ //# sourceMappingURL=chunk-GBWS62LR.js.map