@flamingo-stack/openframe-frontend-core 0.0.575-snapshot.20260827225211 → 0.0.575

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.575-snapshot.20260827225211",
3
+ "version": "0.0.575",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -39,7 +39,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
39
39
  import { useIsHydrated } from '../../hooks/ui/use-is-hydrated';
40
40
  import { useHumanitySignals } from '../../hooks/use-humanity-signals';
41
41
  import { useMeetingBooking } from '../../hooks/use-meeting-booking';
42
- import { useToast } from '../../hooks/use-toast';
43
42
  import {
44
43
  isSupportedFormField,
45
44
  type BookingConfirmation,
@@ -57,12 +56,12 @@ import { SlotPicker, SlotPickerSkeleton, dayKeyInZone } from './slot-picker';
57
56
 
58
57
  /**
59
58
  * Visitor-facing copy per booking-error code. Everything except SLOT_TAKEN
60
- * surfaces PRIMARILY as an error TOAST at submit time (every hub platform
61
- * mounts the lib Toaster globally), with a compact inline line above the form
62
- * as the fallback for embedders without a Toaster — that line also carries
63
- * the escape hatch. SLOT_TAKEN renders above the calendar instead: its
64
- * recovery flow returns the visitor there. An unrecognized code (newer host
65
- * than widget) falls back to the VALIDATION copy — fail-safe, never blank.
59
+ * renders in a prominent `<Alert>` ABOVE the form the visitor just submitted
60
+ * (an inline alert is deterministic in every embed context — a toast needs a
61
+ * host-mounted provider this widget cannot assume). SLOT_TAKEN renders above
62
+ * the calendar instead: its recovery flow returns the visitor there.
63
+ * An unrecognized code (newer host than widget) falls back to the VALIDATION
64
+ * copy — fail-safe, never blank.
66
65
  */
67
66
  const BOOKING_ERROR_COPY: Record<Exclude<MeetingBookingErrorCode, 'SLOT_TAKEN'>, string> = {
68
67
  INVALID_EMAIL:
@@ -305,7 +304,6 @@ export function HubSpotMeetingScheduler({
305
304
  const [bookingError, setBookingError] = useState<MeetingBookingErrorCode | null>(null);
306
305
 
307
306
  const { honeypotInputProps, getSignals, resetSignals } = useHumanitySignals();
308
- const { toast } = useToast();
309
307
 
310
308
  // Reset the machine when the host switches links. Adjusted while rendering —
311
309
  // React's documented pattern for a prop-driven reset — so the swapped-in link
@@ -415,19 +413,9 @@ export function HubSpotMeetingScheduler({
415
413
  setStep('slot');
416
414
  resetSignals();
417
415
  void refetchAvailability();
418
- } else {
419
- // Primary error surface is a TOAST (host-mounted Toaster — every hub
420
- // platform mounts it globally). The compact inline line below the
421
- // date heading stays as the fallback for embedders without a Toaster,
422
- // and carries the escape hatch.
423
- toast({
424
- variant: 'error',
425
- title: 'Booking failed',
426
- description: BOOKING_ERROR_COPY[code] ?? BOOKING_ERROR_COPY.VALIDATION,
427
- });
428
416
  }
429
417
  },
430
- [book, onBooked, refetchAvailability, resetSignals, toast],
418
+ [book, onBooked, refetchAvailability, resetSignals],
431
419
  );
432
420
 
433
421
  const escapeHatch = fallbackUrl ? (
@@ -538,12 +526,12 @@ export function HubSpotMeetingScheduler({
538
526
  · {formatDurationCompact(durationMs / 1000)}
539
527
  </p>
540
528
  {bookingError && bookingError !== 'SLOT_TAKEN' && (
541
- <div className="flex flex-col items-start gap-[var(--spacing-system-xs)]">
542
- <p className="text-ods-error text-h6" role="alert">
529
+ <Alert variant="error" className="flex flex-col items-start gap-[var(--spacing-system-xs)]">
530
+ <AlertDescription>
543
531
  {BOOKING_ERROR_COPY[bookingError] ?? BOOKING_ERROR_COPY.VALIDATION}
544
- </p>
532
+ </AlertDescription>
545
533
  {escapeHatch}
546
- </div>
534
+ </Alert>
547
535
  )}
548
536
  <BookingForm
549
537
  availability={availability}