@spacesync/client 0.1.11 → 0.1.12

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 (37) hide show
  1. package/README.md +105 -13
  2. package/dist/analog-clock-picker.js +1 -1
  3. package/dist/booking-schedule-calendars.js +78 -9
  4. package/dist/booking-schedule-calendars.js.map +1 -1
  5. package/dist/booking-schedule.js +1 -1
  6. package/dist/booking-space-layout-picker.d.ts +1 -1
  7. package/dist/booking-space-layout-picker.js +2 -2
  8. package/dist/{chunk-OTSA5ROL.js → chunk-5CUJZNUC.js} +16 -5
  9. package/dist/chunk-5CUJZNUC.js.map +1 -0
  10. package/dist/{chunk-5NOKULX2.js → chunk-AHFRK6KP.js} +22 -5
  11. package/dist/chunk-AHFRK6KP.js.map +1 -0
  12. package/dist/{chunk-OV5ODANJ.js → chunk-EQLKSX4E.js} +22 -5
  13. package/dist/chunk-EQLKSX4E.js.map +1 -0
  14. package/dist/{chunk-RC5SWZPB.js → chunk-KXTYPZDK.js} +89 -18
  15. package/dist/chunk-KXTYPZDK.js.map +1 -0
  16. package/dist/chunk-ZVWUPYSV.js +170 -0
  17. package/dist/chunk-ZVWUPYSV.js.map +1 -0
  18. package/dist/{layout-canvas-view-DOjyUNJH.d.ts → layout-canvas-view-C3u96xu4.d.ts} +5 -1
  19. package/dist/layout-canvas-view.d.ts +1 -1
  20. package/dist/layout-canvas-view.js +2 -2
  21. package/dist/lib/dateDisplay.d.ts +16 -1
  22. package/dist/lib/dateDisplay.js +1 -1
  23. package/dist/notification-sidebar-preview.js +1 -1
  24. package/dist/page-list-chrome.d.ts +3 -1
  25. package/dist/page-list-chrome.js +1 -1
  26. package/dist/page-list-loading.js +1 -1
  27. package/dist/support-presence-status.js +1 -1
  28. package/dist/ui.d.ts +11 -1
  29. package/dist/ui.js +59 -15
  30. package/dist/ui.js.map +1 -1
  31. package/package.json +11 -5
  32. package/dist/chunk-5NOKULX2.js.map +0 -1
  33. package/dist/chunk-OTSA5ROL.js.map +0 -1
  34. package/dist/chunk-OV5ODANJ.js.map +0 -1
  35. package/dist/chunk-PBNBLCC2.js +0 -84
  36. package/dist/chunk-PBNBLCC2.js.map +0 -1
  37. package/dist/chunk-RC5SWZPB.js.map +0 -1
package/dist/ui.js CHANGED
@@ -3,9 +3,9 @@ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMe
3
3
  export { ResponsiveDialog, ResponsiveDialogClose, ResponsiveDialogContent, ResponsiveDialogDescription, ResponsiveDialogTitle, ResponsiveDialogTrigger, useResponsiveDialogDrawer } from './chunk-SHMKDGFF.js';
4
4
  export { Textarea } from './chunk-VQ63T7CJ.js';
5
5
  export { Checkbox, CheckboxField } from './chunk-2IZODKTR.js';
6
- export { TimeField, addMinutesToHm, formatTimeForDisplay, hmToMinutes, hourlyEndTimes, minutesToHm, parseHm, snapScheduleEndTime, toTimeStr } from './chunk-OV5ODANJ.js';
6
+ export { TimeField, addMinutesToHm, currentTimeHm, formatTimeForDisplay, hmToMinutes, hourlyEndTimes, minutesToHm, parseHm, snapScheduleEndTime, toTimeStr } from './chunk-EQLKSX4E.js';
7
7
  export { HoverCard, HoverCardContent, HoverCardTrigger } from './chunk-L65F4EMK.js';
8
- import { formatDate, toDateStr } from './chunk-PBNBLCC2.js';
8
+ import { formatDate, toDateStr, formatRelativeWhen, relativeWhenTone } from './chunk-ZVWUPYSV.js';
9
9
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-CXXOKCLJ.js';
10
10
  export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './chunk-CXXOKCLJ.js';
11
11
  import { Drawer, DrawerContent, DrawerTitle, DrawerDescription } from './chunk-VVXGQKN7.js';
@@ -1537,6 +1537,40 @@ function ReceiptSummaryRow({
1537
1537
  }
1538
1538
  );
1539
1539
  }
1540
+ var TONE_CLASS = {
1541
+ muted: "text-muted-foreground",
1542
+ current: "text-foreground",
1543
+ danger: "text-red-600 dark:text-red-400",
1544
+ warning: "text-amber-700 dark:text-amber-400",
1545
+ success: "text-green-700 dark:text-green-400"
1546
+ };
1547
+ function RelativeWhen({
1548
+ value,
1549
+ kind,
1550
+ now,
1551
+ empty = "\u2014",
1552
+ className
1553
+ }) {
1554
+ const result = value ? formatRelativeWhen(value, now) : null;
1555
+ if (!result) {
1556
+ return /* @__PURE__ */ jsx("span", { className: cn("text-xs text-muted-foreground", className), children: empty });
1557
+ }
1558
+ const tone = relativeWhenTone(kind, result.diffDays);
1559
+ return /* @__PURE__ */ jsxs("span", { className: cn("flex flex-col gap-0.5 whitespace-nowrap", className), children: [
1560
+ /* @__PURE__ */ jsx(
1561
+ "span",
1562
+ {
1563
+ className: cn(
1564
+ "text-xs",
1565
+ TONE_CLASS[tone],
1566
+ result.isCurrent ? "font-bold" : "font-medium"
1567
+ ),
1568
+ children: result.label
1569
+ }
1570
+ ),
1571
+ /* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground", children: result.absolute })
1572
+ ] });
1573
+ }
1540
1574
  var ResponsiveAlertCtx = React7.createContext({
1541
1575
  drawer: false,
1542
1576
  requestClose: () => {
@@ -1954,12 +1988,16 @@ function TableCaption({ className, ...props }) {
1954
1988
  }
1955
1989
  );
1956
1990
  }
1991
+ function sameRect(a, b) {
1992
+ return a.left === b.left && a.top === b.top && a.width === b.width && a.height === b.height && a.radius === b.radius && a.visible === b.visible;
1993
+ }
1957
1994
  function useSegmentedPillPosition(containerRef) {
1958
1995
  const [rect, setRect] = React7.useState({
1959
1996
  left: 0,
1960
1997
  top: 0,
1961
1998
  width: 0,
1962
1999
  height: 0,
2000
+ radius: "",
1963
2001
  visible: false
1964
2002
  });
1965
2003
  const measure = React7.useCallback(() => {
@@ -1969,16 +2007,18 @@ function useSegmentedPillPosition(containerRef) {
1969
2007
  ':scope > [data-state="active"], :scope > [role="tab"][aria-selected="true"]'
1970
2008
  );
1971
2009
  if (!active) {
1972
- setRect((s) => ({ ...s, visible: false }));
2010
+ setRect((s) => s.visible ? { ...s, visible: false } : s);
1973
2011
  return;
1974
2012
  }
1975
- setRect({
2013
+ const next = {
1976
2014
  left: active.offsetLeft,
1977
2015
  top: active.offsetTop,
1978
2016
  width: active.offsetWidth,
1979
2017
  height: active.offsetHeight,
2018
+ radius: window.getComputedStyle(active).borderRadius,
1980
2019
  visible: true
1981
- });
2020
+ };
2021
+ setRect((s) => sameRect(s, next) ? s : next);
1982
2022
  }, [containerRef]);
1983
2023
  React7.useLayoutEffect(() => {
1984
2024
  measure();
@@ -2011,17 +2051,18 @@ function useSegmentedPillPosition(containerRef) {
2011
2051
  return rect;
2012
2052
  }
2013
2053
  function SegmentedSlidingPill({ containerRef }) {
2014
- const { left, top, width, height, visible } = useSegmentedPillPosition(containerRef);
2054
+ const { left, top, width, height, radius, visible } = useSegmentedPillPosition(containerRef);
2015
2055
  return /* @__PURE__ */ jsx(
2016
2056
  "div",
2017
2057
  {
2018
2058
  "aria-hidden": true,
2019
- className: "pointer-events-none absolute z-0 rounded-md bg-card shadow-sm ring-1 ring-black/[0.06] transition-[left,top,width,height,opacity] duration-200 ease-out motion-reduce:transition-none",
2059
+ className: "pointer-events-none absolute z-0 bg-card shadow-[0_1px_2px_0_rgb(16_24_40/0.06),0_1px_3px_0_rgb(16_24_40/0.06)] transition-[left,top,width,height,opacity] duration-200 ease-out motion-reduce:transition-none",
2020
2060
  style: {
2021
2061
  left,
2022
2062
  top,
2023
2063
  width,
2024
2064
  height,
2065
+ borderRadius: radius || void 0,
2025
2066
  opacity: visible ? 1 : 0
2026
2067
  }
2027
2068
  }
@@ -2032,7 +2073,8 @@ var tabsListVariants = cva("inline-flex items-center justify-center", {
2032
2073
  variants: {
2033
2074
  variant: {
2034
2075
  default: "bg-muted text-muted-foreground h-9 w-fit rounded-xl p-[3px] [flex-flow:row] [flex-wrap:nowrap] gap-0",
2035
- segmented: "h-auto w-full min-w-0 max-w-full rounded-lg bg-muted p-1 text-muted-foreground ring-1 ring-inset ring-gray-200/80 sm:w-auto",
2076
+ // rounded-xl track + p-1 keeps the inner corners concentric with rounded-lg triggers.
2077
+ segmented: "h-auto w-full min-w-0 max-w-full rounded-xl bg-muted p-1 text-muted-foreground ring-1 ring-inset ring-border sm:w-auto",
2036
2078
  secondary: "h-auto w-fit [flex-wrap:wrap] gap-1.5 bg-transparent p-0 text-slate-500"
2037
2079
  }
2038
2080
  },
@@ -2047,16 +2089,18 @@ var tabsTriggerVariants = cva(
2047
2089
  "data-[state=active]:bg-card focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring",
2048
2090
  "dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30",
2049
2091
  "text-foreground dark:text-muted-foreground",
2050
- "inline-flex h-[calc(100%-1px)] min-h-0 flex-1 min-w-0 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm",
2092
+ "inline-flex h-[calc(100%-1px)] min-h-0 flex-1 min-w-0 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm",
2051
2093
  "focus-visible:ring-[3px] focus-visible:outline-1",
2052
2094
  "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
2053
2095
  ],
2096
+ // The sliding pill is the only active surface here, so triggers stay
2097
+ // transparent and only shift text colour.
2054
2098
  segmented: [
2055
- "relative z-[1] inline-flex shrink-0 min-h-0 items-center justify-center gap-1.5 rounded-md border border-transparent bg-transparent px-4 py-2 text-xs sm:text-sm",
2056
- "text-muted-foreground hover:bg-accent hover:text-foreground",
2057
- "focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
2058
- "data-[state=active]:bg-card data-[state=active]:text-foreground data-[state=active]:hover:bg-card",
2059
- "aria-selected:bg-card aria-selected:text-foreground aria-selected:hover:bg-card"
2099
+ "relative z-[1] inline-flex shrink-0 min-h-0 items-center justify-center gap-1.5 rounded-lg border border-transparent bg-transparent px-4 py-2 text-xs sm:text-sm",
2100
+ "text-muted-foreground hover:bg-foreground/[0.04] hover:text-foreground",
2101
+ "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500/70",
2102
+ "data-[state=active]:text-foreground data-[state=active]:hover:bg-transparent",
2103
+ "aria-selected:text-foreground aria-selected:hover:bg-transparent"
2060
2104
  ],
2061
2105
  secondary: [
2062
2106
  "inline-flex shrink-0 min-h-0 items-center justify-center rounded-md border border-transparent px-3 py-1.5 text-xs",
@@ -2430,6 +2474,6 @@ function ToggleGroupItem({
2430
2474
  );
2431
2475
  }
2432
2476
 
2433
- export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, ContentFade, DashFade, DateField, FeedSkeleton, FieldLabel, FilterPopover, IconInput, InputGroup, InputGroupInput, NumberInput, PasswordInput, PhoneInput, Progress, ReceiptCard, ReceiptSummaryRow, ResponsiveAlertDialog, ResponsiveAlertDialogAction, ResponsiveAlertDialogCancel, ResponsiveAlertDialogContent, ResponsiveAlertDialogDescription, AlertDialogFooter as ResponsiveAlertDialogFooter, AlertDialogHeader as ResponsiveAlertDialogHeader, ResponsiveAlertDialogTitle, ScrollArea, ScrollBar, SegmentedTabList, SegmentedTabTrigger, SelectableCard, SelectableListRow, ShellTopBarViewToggle, ShellTopBarViewToggleItem, Slider, SmoothSize, Switch, TabCountBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Toaster, Toggle, ToggleGroup, ToggleGroupItem, badgeVariants, fieldLabelClass, tabsListVariants, tabsTriggerVariants, textVariants, toggleVariants };
2477
+ export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, ContentFade, DashFade, DateField, FeedSkeleton, FieldLabel, FilterPopover, IconInput, InputGroup, InputGroupInput, NumberInput, PasswordInput, PhoneInput, Progress, ReceiptCard, ReceiptSummaryRow, RelativeWhen, ResponsiveAlertDialog, ResponsiveAlertDialogAction, ResponsiveAlertDialogCancel, ResponsiveAlertDialogContent, ResponsiveAlertDialogDescription, AlertDialogFooter as ResponsiveAlertDialogFooter, AlertDialogHeader as ResponsiveAlertDialogHeader, ResponsiveAlertDialogTitle, ScrollArea, ScrollBar, SegmentedTabList, SegmentedTabTrigger, SelectableCard, SelectableListRow, ShellTopBarViewToggle, ShellTopBarViewToggleItem, Slider, SmoothSize, Switch, TabCountBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Toaster, Toggle, ToggleGroup, ToggleGroupItem, badgeVariants, fieldLabelClass, tabsListVariants, tabsTriggerVariants, textVariants, toggleVariants };
2434
2478
  //# sourceMappingURL=ui.js.map
2435
2479
  //# sourceMappingURL=ui.js.map