@apteva/apteva-kit 0.1.122 → 0.1.124

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
@@ -1450,6 +1450,16 @@ function PortalDropdown({
1450
1450
  }) {
1451
1451
  const dropdownRef = _react.useRef.call(void 0, null);
1452
1452
  const [pos, setPos] = _react.useState.call(void 0, null);
1453
+ const [themeClass, setThemeClass] = _react.useState.call(void 0, "");
1454
+ _react.useEffect.call(void 0, () => {
1455
+ if (!open || !anchorRef.current) return;
1456
+ const chat = anchorRef.current.closest(".apteva-chat");
1457
+ if (chat) {
1458
+ if (chat.classList.contains("apteva-force-light")) setThemeClass("apteva-force-light");
1459
+ else if (chat.classList.contains("apteva-force-dark")) setThemeClass("apteva-force-dark");
1460
+ else setThemeClass("");
1461
+ }
1462
+ }, [open, anchorRef]);
1453
1463
  _react.useEffect.call(void 0, () => {
1454
1464
  if (!open || !anchorRef.current) {
1455
1465
  setPos(null);
@@ -1496,7 +1506,7 @@ function PortalDropdown({
1496
1506
  "div",
1497
1507
  {
1498
1508
  ref: dropdownRef,
1499
- className: "apteva-widget",
1509
+ className: `apteva-widget ${themeClass}`,
1500
1510
  style: {
1501
1511
  position: "absolute",
1502
1512
  top: pos.top,
@@ -3676,7 +3686,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
3676
3686
  {
3677
3687
  ref: menuButtonRef,
3678
3688
  onClick: () => setShowMenu(!showMenu),
3679
- className: "apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800",
3689
+ className: "apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all",
3680
3690
  title: "More options",
3681
3691
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10 5v10M5 10h10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
3682
3692
  }
@@ -3686,7 +3696,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
3686
3696
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3687
3697
  "div",
3688
3698
  {
3689
- className: "apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",
3699
+ className: "apteva-composer-menu fixed rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",
3690
3700
  style: {
3691
3701
  left: _nullishCoalesce(_optionalChain([menuButtonRef, 'access', _59 => _59.current, 'optionalAccess', _60 => _60.getBoundingClientRect, 'call', _61 => _61(), 'access', _62 => _62.left]), () => ( 0)),
3692
3702
  bottom: window.innerHeight - (_nullishCoalesce(_optionalChain([menuButtonRef, 'access', _63 => _63.current, 'optionalAccess', _64 => _64.getBoundingClientRect, 'call', _65 => _65(), 'access', _66 => _66.top]), () => ( 0))) + 8
@@ -3699,7 +3709,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
3699
3709
  _optionalChain([fileInputRef, 'access', _67 => _67.current, 'optionalAccess', _68 => _68.click, 'call', _69 => _69()]);
3700
3710
  setShowMenu(false);
3701
3711
  },
3702
- className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",
3712
+ className: "apteva-composer-menu-item w-full flex items-center gap-3 px-4 py-3 transition-colors text-left",
3703
3713
  children: [
3704
3714
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", transform: "translate(2, 3)" }) }),
3705
3715
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Add photos & files" })
@@ -3713,7 +3723,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
3713
3723
  onSwitchMode();
3714
3724
  setShowMenu(false);
3715
3725
  },
3716
- className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",
3726
+ className: "apteva-composer-menu-item w-full flex items-center gap-3 px-4 py-3 transition-colors text-left apteva-composer-menu-item-border",
3717
3727
  children: [
3718
3728
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4.5 h-4.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }),
3719
3729
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Switch to command mode" })