@swift-food-services/catering-widget 0.2.0-beta.1 → 0.2.0-beta.2
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.cjs +22 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +22 -8
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3557,12 +3557,12 @@ styleInject(`/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
|
|
|
3557
3557
|
.swift-catering-widget .right-8 {
|
|
3558
3558
|
right: calc(var(--spacing) * 8);
|
|
3559
3559
|
}
|
|
3560
|
+
.swift-catering-widget .right-96 {
|
|
3561
|
+
right: calc(var(--spacing) * 96);
|
|
3562
|
+
}
|
|
3560
3563
|
.swift-catering-widget .right-\\[-45px\\] {
|
|
3561
3564
|
right: -45px;
|
|
3562
3565
|
}
|
|
3563
|
-
.swift-catering-widget .right-\\[calc\\(24rem\\+0\\.5rem\\)\\] {
|
|
3564
|
-
right: 24.5rem;
|
|
3565
|
-
}
|
|
3566
3566
|
.swift-catering-widget .bottom-0 {
|
|
3567
3567
|
bottom: calc(var(--spacing) * 0);
|
|
3568
3568
|
}
|
|
@@ -19866,7 +19866,7 @@ function SuggestionsOverlay({ onClose }) {
|
|
|
19866
19866
|
const overlay = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19867
19867
|
react$1.motion.div,
|
|
19868
19868
|
{
|
|
19869
|
-
className: "fixed bottom-0 left-2 right-
|
|
19869
|
+
className: "fixed bottom-0 left-2 right-96 z-50 hidden md:block",
|
|
19870
19870
|
style: { top: stickyTopOffset },
|
|
19871
19871
|
initial: { opacity: 0 },
|
|
19872
19872
|
animate: { opacity: 1 },
|
|
@@ -26720,6 +26720,7 @@ function CateringOrderBuilder() {
|
|
|
26720
26720
|
};
|
|
26721
26721
|
const { stickyTopOffset = 0, publishableKey, aiEnabled = false } = useCateringConfig();
|
|
26722
26722
|
const effectiveRightPanelTab = aiEnabled ? rightPanelTab : "cart";
|
|
26723
|
+
const [overlayVisible, setOverlayVisible] = react.useState(false);
|
|
26723
26724
|
const basketColumnRef = react.useRef(null);
|
|
26724
26725
|
const [basketHeight, setBasketHeight] = react.useState("100vh");
|
|
26725
26726
|
react.useEffect(() => {
|
|
@@ -27542,17 +27543,24 @@ function CateringOrderBuilder() {
|
|
|
27542
27543
|
onRegisterMobileSearchSetter: handleRegisterMobileSearchSetter
|
|
27543
27544
|
}
|
|
27544
27545
|
),
|
|
27545
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27546
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27547
|
+
SuggestionsOverlayBridge,
|
|
27548
|
+
{
|
|
27549
|
+
active: effectiveRightPanelTab === "ai",
|
|
27550
|
+
onVisibleChange: setOverlayVisible
|
|
27551
|
+
}
|
|
27552
|
+
)
|
|
27546
27553
|
] })
|
|
27547
27554
|
] }),
|
|
27548
27555
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27549
27556
|
"div",
|
|
27550
27557
|
{
|
|
27551
27558
|
ref: basketColumnRef,
|
|
27552
|
-
className:
|
|
27559
|
+
className: `hidden md:flex md:w-96 flex-shrink-0 flex-col overflow-hidden py-2 px-1 ${overlayVisible ? "fixed z-50 bg-base-100" : "sticky"}`,
|
|
27553
27560
|
style: {
|
|
27554
27561
|
top: stickyTopOffset,
|
|
27555
|
-
|
|
27562
|
+
right: overlayVisible ? 0 : void 0,
|
|
27563
|
+
height: overlayVisible ? `calc(100dvh - ${stickyTopOffset}px)` : basketHeight,
|
|
27556
27564
|
alignSelf: "flex-start"
|
|
27557
27565
|
},
|
|
27558
27566
|
children: mealSessions[activeSessionIndex] && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col gap-2 overflow-hidden", children: [
|
|
@@ -28365,7 +28373,10 @@ function MobileAIInput({
|
|
|
28365
28373
|
)
|
|
28366
28374
|
] });
|
|
28367
28375
|
}
|
|
28368
|
-
function SuggestionsOverlayBridge({
|
|
28376
|
+
function SuggestionsOverlayBridge({
|
|
28377
|
+
active,
|
|
28378
|
+
onVisibleChange
|
|
28379
|
+
}) {
|
|
28369
28380
|
const {
|
|
28370
28381
|
hasResults,
|
|
28371
28382
|
suggestionsOverlayDismissed,
|
|
@@ -28374,6 +28385,9 @@ function SuggestionsOverlayBridge({ active }) {
|
|
|
28374
28385
|
} = useChatSessionContext();
|
|
28375
28386
|
const hasContent = hasResults || activeViewedPreview !== null;
|
|
28376
28387
|
const visible = active && hasContent && !suggestionsOverlayDismissed;
|
|
28388
|
+
react.useEffect(() => {
|
|
28389
|
+
onVisibleChange?.(visible);
|
|
28390
|
+
}, [visible, onVisibleChange]);
|
|
28377
28391
|
return /* @__PURE__ */ jsxRuntime.jsx(react$1.AnimatePresence, { children: visible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
28378
28392
|
SuggestionsOverlay,
|
|
28379
28393
|
{
|