@moontra/moonui-pro 2.15.3 → 2.17.0

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.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { twMerge } from 'tailwind-merge';
3
3
  import * as t from 'react';
4
- import t__default, { useState, useRef, useCallback, forwardRef, createContext, useEffect, useMemo, useContext, useLayoutEffect, useDebugValue, Component } from 'react';
4
+ import t__default, { useState, useRef, useCallback, useMemo, forwardRef, createContext, useEffect, useContext, useLayoutEffect, useDebugValue, Component } from 'react';
5
5
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
6
- import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, Minus, Search, ChevronRight, Circle, ChevronUp, Lock, Sparkles, Plus, Upload, Play, Eye, CheckCircle2, Pause, RotateCcw, Download, Copy, Share, Trash2, CreditCard, Globe, XCircle, Clock, HelpCircle, ChevronLeft, Calendar as Calendar$1, Edit, MapPin, User, Filter, Move, Archive, EyeOff, Settings, Timer, Palette, ArrowUpDown, FileText, Star, Square, CheckSquare, Bold as Bold$1, Italic as Italic$1, Underline as Underline$1, Strikethrough, Code as Code$1, Type, Heading1, Heading2, Heading3, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Highlighter, Link2, Image as Image$1, Table as Table$1, Undo, Redo, RefreshCw, Wand2, Maximize, Briefcase, MessageSquare, Heart, GraduationCap, Zap, Languages, Lightbulb, Target, Repeat, GitBranch, ArrowRight, MoreVertical, Trash, ExternalLink, TrendingUp, MessageCircle, Paperclip, Printer, TrendingDown, ZoomOut, ZoomIn, FileSpreadsheet, FileJson, Maximize2, Menu, Bell, CheckCheck, CheckCircle, Settings2, LogOut, Edit3, LayoutGrid, Share2, Save, Video, Music, File, FileDown, ArrowUp, ArrowDown, ChevronsLeft, ChevronsRight, Pin, Sun, Moon, Monitor, Activity, Send, Tag, Flag, CalendarIcon, DollarSign, Users, Github, GitFork, Server, RotateCw, Cpu, MemoryStick, HardDrive, Network, BarChart3, Columns, Grip, Unlock, Minimize2, Map as Map$1, BellOff, ArrowDownRight, ArrowUpRight } from 'lucide-react';
6
+ import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, Minus, Search, ChevronRight, Circle, ChevronUp, Lock, Sparkles, Plus, PanelLeft, PanelRight, ChevronLeft, Download, FileText, FileSpreadsheet, FileCode, Printer, Share2, Settings, Upload, Play, Eye, CheckCircle2, Pause, RotateCcw, Copy, Share, Trash2, CreditCard, Globe, XCircle, Clock, HelpCircle, Calendar as Calendar$1, Repeat, Edit, MapPin, Users, User, Briefcase, ClipboardList, Bell, Cake, Tag, Filter, Move, Archive, EyeOff, Timer, Palette, ArrowUpDown, Star, Square, CheckSquare, Bold, Italic, Underline, Strikethrough, Code, Type, Heading1, Heading2, Heading3, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Highlighter, Link2, Image as Image$1, Table as Table$1, Undo, Redo, RefreshCw, Wand2, Maximize, MessageSquare, Heart, GraduationCap, Zap, Languages, Lightbulb, Target, GitBranch, ArrowRight, MoreVertical, Trash, ExternalLink, TrendingUp, MessageCircle, Paperclip, TrendingDown, ZoomOut, ZoomIn, FileJson, Maximize2, Menu, CheckCheck, CheckCircle, Settings2, LogOut, Edit3, LayoutGrid, Save, Video, Music, File, FileDown, ArrowUp, ArrowDown, ChevronsLeft, ChevronsRight, Pin, Sun, Moon, Monitor, Activity, Send, Flag, CalendarIcon, DollarSign, Github, GitFork, Server, RotateCw, Cpu, MemoryStick, HardDrive, Network, BarChart3, Columns, Grip, Unlock, Minimize2, Map as Map$1, BellOff, ArrowDownRight, ArrowUpRight } from 'lucide-react';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { cva } from 'class-variance-authority';
9
9
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
10
- import { format, addMonths, subMonths, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek, isSameMonth, isToday, isSameDay, startOfDay, endOfDay, subDays, formatDistanceToNow } from 'date-fns';
11
- import { motion, AnimatePresence, useMotionValue, useSpring, useTransform, animate, Reorder, useDragControls } from 'framer-motion';
10
+ import { startOfDay, endOfDay, addDays, startOfYear, endOfYear, startOfMonth, endOfMonth, startOfWeek, endOfWeek, isWithinInterval, isBefore, isAfter, subYears, addYears, subMonths, addMonths, subWeeks, addWeeks, subDays, addHours, differenceInMinutes, addMinutes, format, isSameDay, setHours, isToday, eachDayOfInterval, isSameMonth, eachMonthOfInterval, getDay, getDaysInMonth, formatDistanceToNow } from 'date-fns';
11
+ import { motion, AnimatePresence, useMotionValue, useSpring, useTransform, animate, LayoutGroup, Reorder, useDragControls } from 'framer-motion';
12
12
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
13
13
  import * as ReactDOM from 'react-dom';
14
14
  import ReactDOM__default from 'react-dom';
@@ -4054,7 +4054,7 @@ var me = t.forwardRef((r2, o) => {
4054
4054
  var e;
4055
4055
  return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
4056
4056
  }
4057
- function X22(e) {
4057
+ function X23(e) {
4058
4058
  let s = V()[e];
4059
4059
  s && E.setState("value", s.getAttribute(T));
4060
4060
  }
@@ -4069,10 +4069,10 @@ var me = t.forwardRef((r2, o) => {
4069
4069
  s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
4070
4070
  i ? E.setState("value", i.getAttribute(T)) : Q(e);
4071
4071
  }
4072
- let oe = () => X22(V().length - 1), ie3 = (e) => {
4072
+ let oe = () => X23(V().length - 1), ie3 = (e) => {
4073
4073
  e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
4074
4074
  }, se = (e) => {
4075
- e.preventDefault(), e.metaKey ? X22(0) : e.altKey ? re(-1) : Q(-1);
4075
+ e.preventDefault(), e.metaKey ? X23(0) : e.altKey ? re(-1) : Q(-1);
4076
4076
  };
4077
4077
  return t.createElement(Primitive2.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
4078
4078
  var s;
@@ -4099,7 +4099,7 @@ var me = t.forwardRef((r2, o) => {
4099
4099
  break;
4100
4100
  }
4101
4101
  case "Home": {
4102
- e.preventDefault(), X22(0);
4102
+ e.preventDefault(), X23(0);
4103
4103
  break;
4104
4104
  }
4105
4105
  case "End": {
@@ -10726,7 +10726,20 @@ var EVENT_COLORS = {
10726
10726
  meeting: "bg-blue-500",
10727
10727
  task: "bg-green-500",
10728
10728
  reminder: "bg-yellow-500",
10729
- event: "bg-purple-500"
10729
+ event: "bg-purple-500",
10730
+ birthday: "bg-pink-500",
10731
+ holiday: "bg-orange-500",
10732
+ conference: "bg-indigo-500"
10733
+ };
10734
+ var PRIORITY_COLORS = {
10735
+ low: "border-l-4 border-l-gray-400",
10736
+ medium: "border-l-4 border-l-yellow-500",
10737
+ high: "border-l-4 border-l-red-500"
10738
+ };
10739
+ var STATUS_STYLES = {
10740
+ confirmed: "",
10741
+ tentative: "opacity-70 border-dashed",
10742
+ cancelled: "opacity-50 line-through"
10730
10743
  };
10731
10744
  function Calendar3({
10732
10745
  events = [],
@@ -10734,6 +10747,9 @@ function Calendar3({
10734
10747
  onEventAdd,
10735
10748
  onEventEdit,
10736
10749
  onEventDelete,
10750
+ onDateChange,
10751
+ onViewChange,
10752
+ onEventDrop,
10737
10753
  className,
10738
10754
  showWeekends = true,
10739
10755
  showEventDetails = true,
@@ -10742,6 +10758,23 @@ function Calendar3({
10742
10758
  maxDate,
10743
10759
  highlightToday = true,
10744
10760
  height,
10761
+ defaultView = "month",
10762
+ enableDragDrop = true,
10763
+ enableSearch = true,
10764
+ enableFilters = true,
10765
+ enableExport = true,
10766
+ enableImport = false,
10767
+ enableRecurringEvents = true,
10768
+ enableReminders = true,
10769
+ eventCategories,
10770
+ workingHours = { start: "09:00", end: "18:00" },
10771
+ holidays = [],
10772
+ locale = "en-US",
10773
+ timeFormat = "12h",
10774
+ firstDayOfWeek = 0,
10775
+ theme = "auto",
10776
+ customTheme,
10777
+ compactMode = false,
10745
10778
  showProUpgrade = false
10746
10779
  }) {
10747
10780
  if (showProUpgrade) {
@@ -10759,34 +10792,105 @@ function Calendar3({
10759
10792
  }
10760
10793
  const [currentDate, setCurrentDate] = t__default.useState(/* @__PURE__ */ new Date());
10761
10794
  const [selectedDate, setSelectedDate] = t__default.useState(null);
10762
- t__default.useState("month");
10795
+ const [view, setView] = t__default.useState(defaultView);
10763
10796
  const [eventDialogOpen, setEventDialogOpen] = t__default.useState(false);
10764
10797
  const [eventDialogMode, setEventDialogMode] = t__default.useState("create");
10765
10798
  const [selectedEvent, setSelectedEvent] = t__default.useState(null);
10766
10799
  const [draggedEvent, setDraggedEvent] = t__default.useState(null);
10767
10800
  const [dragTargetDate, setDragTargetDate] = t__default.useState(null);
10801
+ const [searchQuery, setSearchQuery] = t__default.useState("");
10802
+ const [filterType, setFilterType] = t__default.useState("all");
10803
+ const [filterPriority, setFilterPriority] = t__default.useState("all");
10804
+ t__default.useState(false);
10805
+ const [selectedTags, setSelectedTags] = t__default.useState([]);
10806
+ t__default.useState(/* @__PURE__ */ new Date());
10768
10807
  const today = /* @__PURE__ */ new Date();
10769
10808
  const currentMonth = currentDate.getMonth();
10770
10809
  const currentYear = currentDate.getFullYear();
10771
10810
  const firstDayOfMonth = new Date(currentYear, currentMonth, 1);
10772
10811
  const lastDayOfMonth = new Date(currentYear, currentMonth + 1, 0);
10773
10812
  const startDate = new Date(firstDayOfMonth);
10774
- startDate.setDate(startDate.getDate() - startDate.getDay());
10813
+ const daysToSubtract = (startDate.getDay() - firstDayOfWeek + 7) % 7;
10814
+ startDate.setDate(startDate.getDate() - daysToSubtract);
10775
10815
  const endDate = new Date(lastDayOfMonth);
10776
- endDate.setDate(endDate.getDate() + (6 - endDate.getDay()));
10816
+ const daysToAdd = (6 - endDate.getDay() + firstDayOfWeek) % 7;
10817
+ endDate.setDate(endDate.getDate() + daysToAdd);
10777
10818
  const calendarDays = [];
10778
10819
  const currentDateIterator = new Date(startDate);
10779
10820
  while (currentDateIterator <= endDate) {
10780
10821
  calendarDays.push(new Date(currentDateIterator));
10781
10822
  currentDateIterator.setDate(currentDateIterator.getDate() + 1);
10782
10823
  }
10783
- const getEventsForDate = (date) => {
10824
+ t__default.useMemo(() => {
10825
+ const tags = /* @__PURE__ */ new Set();
10826
+ events.forEach((event) => {
10827
+ event.tags?.forEach((tag) => tags.add(tag));
10828
+ });
10829
+ return Array.from(tags);
10830
+ }, [events]);
10831
+ const filteredEvents = t__default.useMemo(() => {
10784
10832
  return events.filter((event) => {
10833
+ if (searchQuery && !event.title.toLowerCase().includes(searchQuery.toLowerCase()) && !event.description?.toLowerCase().includes(searchQuery.toLowerCase())) {
10834
+ return false;
10835
+ }
10836
+ if (filterType !== "all" && event.type !== filterType) {
10837
+ return false;
10838
+ }
10839
+ if (filterPriority !== "all" && event.priority !== filterPriority) {
10840
+ return false;
10841
+ }
10842
+ if (selectedTags.length > 0 && (!event.tags || !event.tags.some((tag) => selectedTags.includes(tag)))) {
10843
+ return false;
10844
+ }
10845
+ return true;
10846
+ });
10847
+ }, [events, searchQuery, filterType, filterPriority, selectedTags]);
10848
+ const getEventsForDate = (date) => {
10849
+ return filteredEvents.filter((event) => {
10785
10850
  const eventDate = new Date(event.date);
10851
+ if (event.recurring) {
10852
+ return isDateInRecurringPattern(date, event);
10853
+ }
10786
10854
  return eventDate.toDateString() === date.toDateString();
10787
10855
  });
10788
10856
  };
10789
- const isToday2 = (date) => {
10857
+ const isDateInRecurringPattern = (date, event) => {
10858
+ if (!event.recurring)
10859
+ return false;
10860
+ const eventDate = new Date(event.date);
10861
+ const daysDiff = Math.floor((date.getTime() - eventDate.getTime()) / (1e3 * 60 * 60 * 24));
10862
+ if (daysDiff < 0)
10863
+ return false;
10864
+ if (event.recurring.endDate && date > event.recurring.endDate)
10865
+ return false;
10866
+ switch (event.recurring.pattern) {
10867
+ case "daily":
10868
+ return daysDiff % event.recurring.interval === 0;
10869
+ case "weekly":
10870
+ if (daysDiff % (event.recurring.interval * 7) !== 0)
10871
+ return false;
10872
+ if (event.recurring.daysOfWeek) {
10873
+ return event.recurring.daysOfWeek.includes(date.getDay());
10874
+ }
10875
+ return date.getDay() === eventDate.getDay();
10876
+ case "monthly":
10877
+ const monthsDiff = (date.getFullYear() - eventDate.getFullYear()) * 12 + (date.getMonth() - eventDate.getMonth());
10878
+ if (monthsDiff % event.recurring.interval !== 0)
10879
+ return false;
10880
+ if (event.recurring.dayOfMonth) {
10881
+ return date.getDate() === event.recurring.dayOfMonth;
10882
+ }
10883
+ return date.getDate() === eventDate.getDate();
10884
+ case "yearly":
10885
+ const yearsDiff = date.getFullYear() - eventDate.getFullYear();
10886
+ if (yearsDiff % event.recurring.interval !== 0)
10887
+ return false;
10888
+ return date.getMonth() === eventDate.getMonth() && date.getDate() === eventDate.getDate();
10889
+ default:
10890
+ return false;
10891
+ }
10892
+ };
10893
+ const isToday3 = (date) => {
10790
10894
  return date.toDateString() === today.toDateString();
10791
10895
  };
10792
10896
  const isCurrentMonth = (date) => {
@@ -10812,6 +10916,7 @@ function Calendar3({
10812
10916
  newDate.setMonth(currentMonth + 1);
10813
10917
  }
10814
10918
  setCurrentDate(newDate);
10919
+ onDateChange?.(newDate);
10815
10920
  };
10816
10921
  const handleDateClick = (date) => {
10817
10922
  if (isDisabled(date))
@@ -10885,14 +10990,44 @@ function Calendar3({
10885
10990
  onEventDelete?.(eventId);
10886
10991
  };
10887
10992
  const goToToday = () => {
10888
- setCurrentDate(/* @__PURE__ */ new Date());
10889
- setSelectedDate(/* @__PURE__ */ new Date());
10993
+ const today2 = /* @__PURE__ */ new Date();
10994
+ setCurrentDate(today2);
10995
+ setSelectedDate(today2);
10996
+ onDateChange?.(today2);
10997
+ };
10998
+ const isHoliday = (date) => {
10999
+ return holidays.some((holiday) => {
11000
+ const holidayDate = new Date(holiday.date);
11001
+ return holidayDate.toDateString() === date.toDateString();
11002
+ });
11003
+ };
11004
+ const getHolidayName = (date) => {
11005
+ const holiday = holidays.find((h2) => {
11006
+ const holidayDate = new Date(h2.date);
11007
+ return holidayDate.toDateString() === date.toDateString();
11008
+ });
11009
+ return holiday?.name;
11010
+ };
11011
+ const formatTime2 = (time) => {
11012
+ if (!time)
11013
+ return "";
11014
+ if (timeFormat === "24h")
11015
+ return time;
11016
+ const [hours, minutes] = time.split(":");
11017
+ const h2 = parseInt(hours);
11018
+ const period = h2 >= 12 ? "PM" : "AM";
11019
+ const displayHours = h2 === 0 ? 12 : h2 > 12 ? h2 - 12 : h2;
11020
+ return `${displayHours}:${minutes} ${period}`;
10890
11021
  };
10891
11022
  const filteredDays = showWeekends ? calendarDays : calendarDays.filter((day) => {
10892
11023
  const dayOfWeek = day.getDay();
10893
11024
  return dayOfWeek !== 0 && dayOfWeek !== 6;
10894
11025
  });
10895
- const visibleDaysOfWeek = showWeekends ? DAYS_OF_WEEK : DAYS_OF_WEEK.slice(1, 6);
11026
+ const orderedDaysOfWeek = [...DAYS_OF_WEEK.slice(firstDayOfWeek), ...DAYS_OF_WEEK.slice(0, firstDayOfWeek)];
11027
+ const visibleDaysOfWeek = showWeekends ? orderedDaysOfWeek : orderedDaysOfWeek.filter((_, index2) => {
11028
+ const actualDay = (index2 + firstDayOfWeek) % 7;
11029
+ return actualDay !== 0 && actualDay !== 6;
11030
+ });
10896
11031
  return /* @__PURE__ */ jsxs(Fragment, { children: [
10897
11032
  /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn("w-full max-w-full overflow-hidden", className), style: { height: height ? `${height}px` : void 0 }, children: [
10898
11033
  /* @__PURE__ */ jsx(MoonUICardHeaderPro, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
@@ -10932,12 +11067,12 @@ function Calendar3({
10932
11067
  ] })
10933
11068
  ] }) }),
10934
11069
  /* @__PURE__ */ jsx(MoonUICardContentPro, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
10935
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-1 w-full", children: [
11070
+ view === "month" && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-1 w-full", children: [
10936
11071
  visibleDaysOfWeek.map((day) => /* @__PURE__ */ jsx("div", { className: "p-1 text-center text-xs font-medium text-muted-foreground", children: day }, day)),
10937
11072
  filteredDays.map((date, index2) => {
10938
11073
  const dayEvents = getEventsForDate(date);
10939
11074
  const isCurrentMonthDate = isCurrentMonth(date);
10940
- const isTodayDate = isToday2(date);
11075
+ const isTodayDate = isToday3(date);
10941
11076
  const isSelectedDate = isSelected(date);
10942
11077
  const isDisabledDate = isDisabled(date);
10943
11078
  return /* @__PURE__ */ jsxs(
@@ -10956,10 +11091,14 @@ function Calendar3({
10956
11091
  onDrop: (e) => handleDateDrop(date, e),
10957
11092
  children: [
10958
11093
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-1", children: [
10959
- /* @__PURE__ */ jsx("span", { className: cn(
10960
- "text-sm font-medium",
10961
- isTodayDate && "text-primary font-bold"
10962
- ), children: date.getDate() }),
11094
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
11095
+ /* @__PURE__ */ jsx("span", { className: cn(
11096
+ "text-sm font-medium",
11097
+ isTodayDate && "text-primary font-bold",
11098
+ isHoliday(date) && "text-orange-600 dark:text-orange-400"
11099
+ ), children: date.getDate() }),
11100
+ isHoliday(date) && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-orange-600 dark:text-orange-400 truncate", children: getHolidayName(date) })
11101
+ ] }),
10963
11102
  dayEvents.length > 0 && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "secondary", className: "text-xs px-1", children: dayEvents.length })
10964
11103
  ] }),
10965
11104
  /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1 overflow-hidden", children: [
@@ -10968,9 +11107,11 @@ function Calendar3({
10968
11107
  {
10969
11108
  className: cn(
10970
11109
  "text-xs p-1 mb-1 rounded text-white cursor-move group relative select-none block w-full truncate",
10971
- event.color || EVENT_COLORS[event.type || "event"]
11110
+ event.color || EVENT_COLORS[event.type || "event"],
11111
+ event.priority && PRIORITY_COLORS[event.priority],
11112
+ event.status && STATUS_STYLES[event.status]
10972
11113
  ),
10973
- draggable: !disabled,
11114
+ draggable: !disabled && enableDragDrop,
10974
11115
  onClick: (e) => handleEventClick(event, e),
10975
11116
  onDragStart: (e) => handleEventDragStart(event, e),
10976
11117
  onDragEnd: handleEventDragEnd,
@@ -10979,7 +11120,11 @@ function Calendar3({
10979
11120
  },
10980
11121
  children: [
10981
11122
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
10982
- /* @__PURE__ */ jsx("span", { className: "truncate flex-1", children: event.title }),
11123
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 flex-1 min-w-0", children: [
11124
+ event.isPrivate && /* @__PURE__ */ jsx(Lock, { className: "h-3 w-3 flex-shrink-0" }),
11125
+ event.recurring && /* @__PURE__ */ jsx(Repeat, { className: "h-3 w-3 flex-shrink-0" }),
11126
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: event.title })
11127
+ ] }),
10983
11128
  showEventDetails && /* @__PURE__ */ jsxs("div", { className: "hidden group-hover:flex items-center gap-1 ml-1", children: [
10984
11129
  /* @__PURE__ */ jsx(
10985
11130
  MoonUIButtonPro,
@@ -11003,9 +11148,9 @@ function Calendar3({
11003
11148
  )
11004
11149
  ] })
11005
11150
  ] }),
11006
- event.startTime && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mt-1", children: [
11151
+ event.startTime && !compactMode && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mt-1", children: [
11007
11152
  /* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
11008
- /* @__PURE__ */ jsx("span", { children: event.startTime })
11153
+ /* @__PURE__ */ jsx("span", { className: "text-[10px]", children: formatTime2(event.startTime) })
11009
11154
  ] })
11010
11155
  ]
11011
11156
  },
@@ -11023,7 +11168,206 @@ function Calendar3({
11023
11168
  );
11024
11169
  })
11025
11170
  ] }),
11026
- selectedDate && /* @__PURE__ */ jsxs("div", { className: "border rounded-lg p-4 bg-muted/50", children: [
11171
+ view === "week" && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
11172
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8 gap-2", children: [
11173
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: "Time" }),
11174
+ Array.from({ length: 7 }, (_, i) => {
11175
+ const date = new Date(currentDate);
11176
+ date.setDate(date.getDate() - date.getDay() + i);
11177
+ return /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
11178
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: DAYS_OF_WEEK[i] }),
11179
+ /* @__PURE__ */ jsx("div", { className: cn(
11180
+ "text-sm font-medium",
11181
+ isToday3(date) && "text-primary"
11182
+ ), children: date.getDate() })
11183
+ ] }, i);
11184
+ })
11185
+ ] }),
11186
+ /* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "max-h-[500px] overflow-y-auto", children: Array.from({ length: 24 }, (_, hour) => /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8 border-b last:border-b-0", children: [
11187
+ /* @__PURE__ */ jsx("div", { className: "p-2 text-xs text-muted-foreground border-r", children: formatTime2(`${hour.toString().padStart(2, "0")}:00`) }),
11188
+ Array.from({ length: 7 }, (_2, dayIndex) => {
11189
+ const date = new Date(currentDate);
11190
+ date.setDate(date.getDate() - date.getDay() + dayIndex);
11191
+ const hourEvents = getEventsForDate(date).filter((event) => {
11192
+ if (!event.startTime)
11193
+ return false;
11194
+ const eventHour = parseInt(event.startTime.split(":")[0]);
11195
+ return eventHour === hour;
11196
+ });
11197
+ return /* @__PURE__ */ jsx(
11198
+ "div",
11199
+ {
11200
+ className: cn(
11201
+ "p-1 min-h-[60px] border-r last:border-r-0 hover:bg-muted/50 transition-colors",
11202
+ isToday3(date) && "bg-primary/5"
11203
+ ),
11204
+ onClick: () => handleDateClick(date),
11205
+ children: hourEvents.map((event) => /* @__PURE__ */ jsxs(
11206
+ "div",
11207
+ {
11208
+ className: cn(
11209
+ "text-xs p-1 rounded text-white mb-1 cursor-pointer",
11210
+ event.color || EVENT_COLORS[event.type || "event"]
11211
+ ),
11212
+ onClick: (e) => handleEventClick(event, e),
11213
+ children: [
11214
+ /* @__PURE__ */ jsx("div", { className: "font-medium truncate", children: event.title }),
11215
+ event.location && /* @__PURE__ */ jsx("div", { className: "text-[10px] opacity-80 truncate", children: event.location })
11216
+ ]
11217
+ },
11218
+ event.id
11219
+ ))
11220
+ },
11221
+ dayIndex
11222
+ );
11223
+ })
11224
+ ] }, hour)) }) })
11225
+ ] }),
11226
+ view === "day" && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
11227
+ /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: currentDate.toLocaleDateString(locale, {
11228
+ weekday: "long",
11229
+ year: "numeric",
11230
+ month: "long",
11231
+ day: "numeric"
11232
+ }) }) }),
11233
+ /* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "max-h-[500px] overflow-y-auto", children: Array.from({ length: 24 }, (_, hour) => {
11234
+ const hourEvents = getEventsForDate(currentDate).filter((event) => {
11235
+ if (!event.startTime)
11236
+ return false;
11237
+ const eventHour = parseInt(event.startTime.split(":")[0]);
11238
+ return eventHour === hour;
11239
+ });
11240
+ return /* @__PURE__ */ jsxs("div", { className: "flex border-b last:border-b-0", children: [
11241
+ /* @__PURE__ */ jsx("div", { className: "w-20 p-3 text-sm text-muted-foreground border-r", children: formatTime2(`${hour.toString().padStart(2, "0")}:00`) }),
11242
+ /* @__PURE__ */ jsx("div", { className: "flex-1 p-2 min-h-[80px]", children: hourEvents.map((event) => /* @__PURE__ */ jsx(
11243
+ "div",
11244
+ {
11245
+ className: cn(
11246
+ "p-2 rounded text-white mb-2 cursor-pointer",
11247
+ event.color || EVENT_COLORS[event.type || "event"]
11248
+ ),
11249
+ onClick: (e) => handleEventClick(event, e),
11250
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
11251
+ /* @__PURE__ */ jsxs("div", { children: [
11252
+ /* @__PURE__ */ jsx("div", { className: "font-medium", children: event.title }),
11253
+ event.description && /* @__PURE__ */ jsx("div", { className: "text-sm opacity-80", children: event.description }),
11254
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-xs mt-1", children: [
11255
+ event.startTime && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
11256
+ /* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
11257
+ formatTime2(event.startTime),
11258
+ " - ",
11259
+ formatTime2(event.endTime || event.startTime)
11260
+ ] }),
11261
+ event.location && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
11262
+ /* @__PURE__ */ jsx(MapPin, { className: "h-3 w-3" }),
11263
+ event.location
11264
+ ] })
11265
+ ] })
11266
+ ] }),
11267
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
11268
+ /* @__PURE__ */ jsx(
11269
+ MoonUIButtonPro,
11270
+ {
11271
+ variant: "ghost",
11272
+ size: "sm",
11273
+ className: "h-6 w-6 p-0 text-white/80 hover:text-white",
11274
+ onClick: (e) => handleEventEdit(event, e),
11275
+ children: /* @__PURE__ */ jsx(Edit, { className: "h-3 w-3" })
11276
+ }
11277
+ ),
11278
+ /* @__PURE__ */ jsx(
11279
+ MoonUIButtonPro,
11280
+ {
11281
+ variant: "ghost",
11282
+ size: "sm",
11283
+ className: "h-6 w-6 p-0 text-white/80 hover:text-white",
11284
+ onClick: (e) => handleEventDelete(event, e),
11285
+ children: /* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3" })
11286
+ }
11287
+ )
11288
+ ] })
11289
+ ] })
11290
+ },
11291
+ event.id
11292
+ )) })
11293
+ ] }, hour);
11294
+ }) }) })
11295
+ ] }),
11296
+ view === "agenda" && /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsx("div", { className: "max-h-[500px] overflow-y-auto space-y-4", children: Array.from({ length: 30 }, (_, i) => {
11297
+ const date = new Date(currentDate);
11298
+ date.setDate(date.getDate() + i);
11299
+ const dayEvents = getEventsForDate(date);
11300
+ if (dayEvents.length === 0)
11301
+ return null;
11302
+ return /* @__PURE__ */ jsxs("div", { className: "border rounded-lg p-4", children: [
11303
+ /* @__PURE__ */ jsx("h4", { className: "font-medium mb-3", children: date.toLocaleDateString(locale, {
11304
+ weekday: "long",
11305
+ year: "numeric",
11306
+ month: "long",
11307
+ day: "numeric"
11308
+ }) }),
11309
+ /* @__PURE__ */ jsx("div", { className: "space-y-2", children: dayEvents.map((event) => /* @__PURE__ */ jsxs(
11310
+ "div",
11311
+ {
11312
+ className: "flex items-start gap-3 p-3 rounded-lg border hover:bg-muted/50 transition-colors cursor-pointer",
11313
+ onClick: () => onEventClick?.(event),
11314
+ children: [
11315
+ /* @__PURE__ */ jsx("div", { className: cn(
11316
+ "w-3 h-3 rounded-full mt-1 flex-shrink-0",
11317
+ event.color || EVENT_COLORS[event.type || "event"]
11318
+ ) }),
11319
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
11320
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
11321
+ /* @__PURE__ */ jsx("h5", { className: "font-medium", children: event.title }),
11322
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
11323
+ /* @__PURE__ */ jsx(
11324
+ MoonUIButtonPro,
11325
+ {
11326
+ variant: "ghost",
11327
+ size: "sm",
11328
+ className: "h-7 w-7 p-0",
11329
+ onClick: (e) => handleEventEdit(event, e),
11330
+ children: /* @__PURE__ */ jsx(Edit, { className: "h-3 w-3" })
11331
+ }
11332
+ ),
11333
+ /* @__PURE__ */ jsx(
11334
+ MoonUIButtonPro,
11335
+ {
11336
+ variant: "ghost",
11337
+ size: "sm",
11338
+ className: "h-7 w-7 p-0",
11339
+ onClick: (e) => handleEventDelete(event, e),
11340
+ children: /* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3" })
11341
+ }
11342
+ )
11343
+ ] })
11344
+ ] }),
11345
+ event.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: event.description }),
11346
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 text-xs text-muted-foreground mt-2", children: [
11347
+ event.startTime && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
11348
+ /* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
11349
+ formatTime2(event.startTime),
11350
+ " - ",
11351
+ formatTime2(event.endTime || event.startTime)
11352
+ ] }),
11353
+ event.location && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
11354
+ /* @__PURE__ */ jsx(MapPin, { className: "h-3 w-3" }),
11355
+ event.location
11356
+ ] }),
11357
+ event.attendees && event.attendees.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
11358
+ /* @__PURE__ */ jsx(Users, { className: "h-3 w-3" }),
11359
+ event.attendees.length,
11360
+ " attendees"
11361
+ ] })
11362
+ ] })
11363
+ ] })
11364
+ ]
11365
+ },
11366
+ event.id
11367
+ )) })
11368
+ ] }, i);
11369
+ }).filter(Boolean) }) }),
11370
+ selectedDate && view === "month" && /* @__PURE__ */ jsxs("div", { className: "border rounded-lg p-4 bg-muted/50", children: [
11027
11371
  /* @__PURE__ */ jsx("h4", { className: "font-medium mb-2", children: selectedDate.toLocaleDateString("en-US", {
11028
11372
  weekday: "long",
11029
11373
  year: "numeric",
@@ -11121,6 +11465,979 @@ function Calendar3({
11121
11465
  )
11122
11466
  ] });
11123
11467
  }
11468
+ var defaultCategories = [
11469
+ { id: "personal", name: "Personal", color: "#3b82f6", icon: /* @__PURE__ */ jsx(User, { className: "h-4 w-4" }) },
11470
+ { id: "work", name: "Work", color: "#10b981", icon: /* @__PURE__ */ jsx(Briefcase, { className: "h-4 w-4" }) },
11471
+ { id: "meeting", name: "Meeting", color: "#f59e0b", icon: /* @__PURE__ */ jsx(Users, { className: "h-4 w-4" }) },
11472
+ { id: "task", name: "Task", color: "#8b5cf6", icon: /* @__PURE__ */ jsx(ClipboardList, { className: "h-4 w-4" }) },
11473
+ { id: "reminder", name: "Reminder", color: "#ef4444", icon: /* @__PURE__ */ jsx(Bell, { className: "h-4 w-4" }) },
11474
+ { id: "holiday", name: "Holiday", color: "#ec4899", icon: /* @__PURE__ */ jsx(Calendar$1, { className: "h-4 w-4" }) },
11475
+ { id: "birthday", name: "Birthday", color: "#f472b6", icon: /* @__PURE__ */ jsx(Cake, { className: "h-4 w-4" }) },
11476
+ { id: "other", name: "Other", color: "#6b7280", icon: /* @__PURE__ */ jsx(Tag, { className: "h-4 w-4" }) }
11477
+ ];
11478
+ var defaultViews = [
11479
+ { id: "day", name: "Day", type: "day" },
11480
+ { id: "week", name: "Week", type: "week", default: true },
11481
+ { id: "month", name: "Month", type: "month" },
11482
+ { id: "year", name: "Year", type: "year" },
11483
+ { id: "agenda", name: "Agenda", type: "agenda" }
11484
+ ];
11485
+ var CalendarPro = t.forwardRef(({
11486
+ events = [],
11487
+ categories = defaultCategories,
11488
+ views = defaultViews,
11489
+ defaultView,
11490
+ height = "100%",
11491
+ className,
11492
+ sidebarCollapsed: controlledSidebarCollapsed,
11493
+ onSidebarToggle,
11494
+ onEventClick,
11495
+ onEventCreate,
11496
+ onEventUpdate,
11497
+ onEventDelete,
11498
+ onEventDrop,
11499
+ onDateSelect,
11500
+ onViewChange,
11501
+ allowEventCreation = true,
11502
+ allowEventDeletion = true,
11503
+ allowEventDragging = true,
11504
+ showWeekNumbers = true,
11505
+ firstDayOfWeek = 1,
11506
+ timeFormat = "24h",
11507
+ locale = "en-US",
11508
+ workingHours = { start: 9, end: 17 },
11509
+ nonWorkingDays = [0, 6],
11510
+ holidays = [],
11511
+ customEventRenderer,
11512
+ customHeaderRenderer,
11513
+ customCellRenderer,
11514
+ eventColors = {},
11515
+ onExport,
11516
+ onImport,
11517
+ integrations = {},
11518
+ theme = "system",
11519
+ ...props
11520
+ }, ref) => {
11521
+ const [internalSidebarCollapsed, setInternalSidebarCollapsed] = useState(false);
11522
+ const sidebarCollapsed = controlledSidebarCollapsed ?? internalSidebarCollapsed;
11523
+ const setSidebarCollapsed = useCallback((collapsed) => {
11524
+ setInternalSidebarCollapsed(collapsed);
11525
+ onSidebarToggle?.(collapsed);
11526
+ }, [onSidebarToggle]);
11527
+ const [currentDate, setCurrentDate] = useState(/* @__PURE__ */ new Date());
11528
+ const [currentView, setCurrentView] = useState(() => {
11529
+ if (defaultView) {
11530
+ return defaultView;
11531
+ }
11532
+ const defaultViewObj = views.find((v) => v.default);
11533
+ return defaultViewObj ? defaultViewObj.id : views[0].id;
11534
+ });
11535
+ const [selectedDate, setSelectedDate] = useState(null);
11536
+ const [selectedEvent, setSelectedEvent] = useState(null);
11537
+ const [isEventDialogOpen, setIsEventDialogOpen] = useState(false);
11538
+ const [isCreating, setIsCreating] = useState(false);
11539
+ const [newEventStart, setNewEventStart] = useState(null);
11540
+ const [newEventEnd, setNewEventEnd] = useState(null);
11541
+ const [searchQuery, setSearchQuery] = useState("");
11542
+ const [selectedCategories, setSelectedCategories] = useState([]);
11543
+ const [editingEvent, setEditingEvent] = useState({});
11544
+ const [isDragging, setIsDragging] = useState(false);
11545
+ const [draggedEvent, setDraggedEvent] = useState(null);
11546
+ const [dropTarget, setDropTarget] = useState(null);
11547
+ useRef(null);
11548
+ const currentViewConfig = useMemo(() => {
11549
+ return views.find((v) => v.id === currentView) || views[0];
11550
+ }, [currentView, views]);
11551
+ const filteredEvents = useMemo(() => {
11552
+ return events.filter((event) => {
11553
+ const matchesSearch = !searchQuery || event.title.toLowerCase().includes(searchQuery.toLowerCase()) || event.description?.toLowerCase().includes(searchQuery.toLowerCase()) || event.location?.toLowerCase().includes(searchQuery.toLowerCase()) || event.tags?.some((tag) => tag.toLowerCase().includes(searchQuery.toLowerCase()));
11554
+ const matchesCategory = selectedCategories.length === 0 || event.category && selectedCategories.includes(event.category);
11555
+ return matchesSearch && matchesCategory;
11556
+ });
11557
+ }, [events, searchQuery, selectedCategories]);
11558
+ const eventsInView = useMemo(() => {
11559
+ const viewType = currentViewConfig.type;
11560
+ let start;
11561
+ let end;
11562
+ switch (viewType) {
11563
+ case "day":
11564
+ start = startOfDay(currentDate);
11565
+ end = endOfDay(currentDate);
11566
+ break;
11567
+ case "week":
11568
+ start = startOfWeek(currentDate, { weekStartsOn: firstDayOfWeek });
11569
+ end = endOfWeek(currentDate, { weekStartsOn: firstDayOfWeek });
11570
+ break;
11571
+ case "month":
11572
+ start = startOfMonth(currentDate);
11573
+ end = endOfMonth(currentDate);
11574
+ break;
11575
+ case "year":
11576
+ start = startOfYear(currentDate);
11577
+ end = endOfYear(currentDate);
11578
+ break;
11579
+ case "agenda":
11580
+ start = startOfDay(currentDate);
11581
+ end = addDays(currentDate, 30);
11582
+ break;
11583
+ default:
11584
+ start = startOfDay(currentDate);
11585
+ end = endOfDay(currentDate);
11586
+ }
11587
+ return filteredEvents.filter((event) => {
11588
+ const eventStart = new Date(event.start);
11589
+ const eventEnd = new Date(event.end);
11590
+ return isWithinInterval(eventStart, { start, end }) || isWithinInterval(eventEnd, { start, end }) || isBefore(eventStart, start) && isAfter(eventEnd, end);
11591
+ });
11592
+ }, [filteredEvents, currentDate, currentViewConfig, firstDayOfWeek]);
11593
+ const handleViewChange = useCallback((viewId) => {
11594
+ setCurrentView(viewId);
11595
+ onViewChange?.(viewId);
11596
+ }, [onViewChange]);
11597
+ const navigateDate = useCallback((direction) => {
11598
+ const viewType = currentViewConfig.type;
11599
+ let newDate;
11600
+ switch (viewType) {
11601
+ case "day":
11602
+ newDate = direction === "prev" ? subDays(currentDate, 1) : addDays(currentDate, 1);
11603
+ break;
11604
+ case "week":
11605
+ newDate = direction === "prev" ? subWeeks(currentDate, 1) : addWeeks(currentDate, 1);
11606
+ break;
11607
+ case "month":
11608
+ newDate = direction === "prev" ? subMonths(currentDate, 1) : addMonths(currentDate, 1);
11609
+ break;
11610
+ case "year":
11611
+ newDate = direction === "prev" ? subYears(currentDate, 1) : addYears(currentDate, 1);
11612
+ break;
11613
+ default:
11614
+ newDate = currentDate;
11615
+ }
11616
+ setCurrentDate(newDate);
11617
+ }, [currentDate, currentViewConfig]);
11618
+ const handleDateSelect = useCallback((date) => {
11619
+ setSelectedDate(date);
11620
+ setCurrentDate(date);
11621
+ onDateSelect?.(date);
11622
+ if (allowEventCreation && currentViewConfig.type !== "year") {
11623
+ setNewEventStart(date);
11624
+ setNewEventEnd(addHours(date, 1));
11625
+ setIsCreating(true);
11626
+ setIsEventDialogOpen(true);
11627
+ }
11628
+ }, [allowEventCreation, currentViewConfig, onDateSelect]);
11629
+ const handleEventClick = useCallback((event, e) => {
11630
+ e.stopPropagation();
11631
+ setSelectedEvent(event);
11632
+ setEditingEvent(event);
11633
+ setIsEventDialogOpen(true);
11634
+ setIsCreating(false);
11635
+ onEventClick?.(event, e);
11636
+ }, [onEventClick]);
11637
+ const handleEventSave = useCallback(() => {
11638
+ if (isCreating && onEventCreate) {
11639
+ onEventCreate(editingEvent);
11640
+ } else if (selectedEvent && onEventUpdate) {
11641
+ onEventUpdate({ ...selectedEvent, ...editingEvent });
11642
+ }
11643
+ setIsEventDialogOpen(false);
11644
+ setSelectedEvent(null);
11645
+ setEditingEvent({});
11646
+ setIsCreating(false);
11647
+ setNewEventStart(null);
11648
+ setNewEventEnd(null);
11649
+ }, [isCreating, selectedEvent, editingEvent, onEventCreate, onEventUpdate]);
11650
+ const handleEventDelete = useCallback(() => {
11651
+ if (selectedEvent && onEventDelete) {
11652
+ onEventDelete(selectedEvent.id);
11653
+ setIsEventDialogOpen(false);
11654
+ setSelectedEvent(null);
11655
+ setEditingEvent({});
11656
+ }
11657
+ }, [selectedEvent, onEventDelete]);
11658
+ useCallback((event) => {
11659
+ if (!allowEventDragging)
11660
+ return;
11661
+ setIsDragging(true);
11662
+ setDraggedEvent(event);
11663
+ }, [allowEventDragging]);
11664
+ useCallback((result) => {
11665
+ setIsDragging(false);
11666
+ setDraggedEvent(null);
11667
+ setDropTarget(null);
11668
+ if (!result.destination || !draggedEvent || !onEventDrop)
11669
+ return;
11670
+ const newStart = new Date(result.destination.droppableId);
11671
+ const duration = differenceInMinutes(draggedEvent.end, draggedEvent.start);
11672
+ const newEnd = addMinutes(newStart, duration);
11673
+ onEventDrop(draggedEvent.id, newStart, newEnd);
11674
+ }, [draggedEvent, onEventDrop]);
11675
+ const exportCalendar = useCallback((format7) => {
11676
+ if (onExport) {
11677
+ onExport(format7, eventsInView);
11678
+ } else {
11679
+ const data = eventsInView;
11680
+ let content;
11681
+ let mimeType;
11682
+ let filename;
11683
+ switch (format7) {
11684
+ case "json":
11685
+ content = JSON.stringify(data, null, 2);
11686
+ mimeType = "application/json";
11687
+ filename = "calendar.json";
11688
+ break;
11689
+ case "csv":
11690
+ const headers = ["Title", "Start", "End", "Location", "Description"];
11691
+ const rows = data.map((event) => [
11692
+ event.title,
11693
+ event.start.toISOString(),
11694
+ event.end.toISOString(),
11695
+ event.location || "",
11696
+ event.description || ""
11697
+ ]);
11698
+ content = [headers, ...rows].map((row) => row.map((cell) => `"${cell}"`).join(",")).join("\n");
11699
+ mimeType = "text/csv";
11700
+ filename = "calendar.csv";
11701
+ break;
11702
+ case "ics":
11703
+ const icsEvents = data.map((event) => {
11704
+ const start = event.start.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, "");
11705
+ const end = event.end.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, "");
11706
+ return `BEGIN:VEVENT
11707
+ UID:${event.id}@calendar.app
11708
+ DTSTART:${start}Z
11709
+ DTEND:${end}Z
11710
+ SUMMARY:${event.title}
11711
+ ${event.description ? `DESCRIPTION:${event.description}` : ""}
11712
+ ${event.location ? `LOCATION:${event.location}` : ""}
11713
+ END:VEVENT`;
11714
+ }).join("\n");
11715
+ content = `BEGIN:VCALENDAR
11716
+ VERSION:2.0
11717
+ PRODID:-//Calendar App//EN
11718
+ ${icsEvents}
11719
+ END:VCALENDAR`;
11720
+ mimeType = "text/calendar";
11721
+ filename = "calendar.ics";
11722
+ break;
11723
+ default:
11724
+ return;
11725
+ }
11726
+ const blob = new Blob([content], { type: mimeType });
11727
+ const url = URL.createObjectURL(blob);
11728
+ const link = document.createElement("a");
11729
+ link.href = url;
11730
+ link.download = filename;
11731
+ link.click();
11732
+ URL.revokeObjectURL(url);
11733
+ }
11734
+ }, [eventsInView, onExport]);
11735
+ const renderDayView = () => {
11736
+ const hours = Array.from({ length: 24 }, (_, i) => i);
11737
+ const dayEvents = eventsInView.filter(
11738
+ (event) => isSameDay(new Date(event.start), currentDate)
11739
+ );
11740
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "min-h-full", children: [
11741
+ /* @__PURE__ */ jsxs("div", { className: "border-b p-2", children: [
11742
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-1", children: "All Day" }),
11743
+ /* @__PURE__ */ jsx("div", { className: "space-y-1", children: dayEvents.filter((event) => event.allDay).map((event) => /* @__PURE__ */ jsx(
11744
+ "div",
11745
+ {
11746
+ className: "p-2 rounded text-xs cursor-pointer hover:opacity-80",
11747
+ style: {
11748
+ backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6",
11749
+ color: "#ffffff"
11750
+ },
11751
+ onClick: (e) => handleEventClick(event, e),
11752
+ children: event.title
11753
+ },
11754
+ event.id
11755
+ )) })
11756
+ ] }),
11757
+ /* @__PURE__ */ jsx("div", { className: "relative", children: hours.map((hour) => /* @__PURE__ */ jsxs("div", { className: "flex border-b", style: { height: "60px" }, children: [
11758
+ /* @__PURE__ */ jsx("div", { className: "w-16 p-2 text-xs text-muted-foreground text-right", children: format(setHours(/* @__PURE__ */ new Date(), hour), timeFormat === "12h" ? "h a" : "HH:00") }),
11759
+ /* @__PURE__ */ jsx("div", { className: "flex-1 relative border-l", children: dayEvents.filter((event) => {
11760
+ if (event.allDay)
11761
+ return false;
11762
+ const eventHour = new Date(event.start).getHours();
11763
+ return eventHour === hour;
11764
+ }).map((event) => {
11765
+ const startMinutes = new Date(event.start).getMinutes();
11766
+ const duration = differenceInMinutes(new Date(event.end), new Date(event.start));
11767
+ const height2 = duration / 60 * 60;
11768
+ const top = startMinutes / 60 * 60;
11769
+ return /* @__PURE__ */ jsxs(
11770
+ "div",
11771
+ {
11772
+ className: "absolute left-0 right-0 mx-1 p-1 rounded text-xs cursor-pointer hover:opacity-80 overflow-hidden",
11773
+ style: {
11774
+ top: `${top}px`,
11775
+ height: `${height2}px`,
11776
+ backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6",
11777
+ color: "#ffffff",
11778
+ zIndex: 10
11779
+ },
11780
+ onClick: (e) => handleEventClick(event, e),
11781
+ children: [
11782
+ /* @__PURE__ */ jsx("div", { className: "font-medium", children: event.title }),
11783
+ /* @__PURE__ */ jsxs("div", { className: "text-xs opacity-80", children: [
11784
+ format(new Date(event.start), "HH:mm"),
11785
+ " - ",
11786
+ format(new Date(event.end), "HH:mm")
11787
+ ] })
11788
+ ]
11789
+ },
11790
+ event.id
11791
+ );
11792
+ }) })
11793
+ ] }, hour)) })
11794
+ ] }) }) });
11795
+ };
11796
+ const renderWeekView = () => {
11797
+ const weekStart = startOfWeek(currentDate, { weekStartsOn: firstDayOfWeek });
11798
+ const weekDays = Array.from({ length: 7 }, (_, i) => addDays(weekStart, i));
11799
+ const hours = Array.from({ length: 24 }, (_, i) => i);
11800
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "min-h-full", children: [
11801
+ /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-20 bg-background border-b", children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
11802
+ /* @__PURE__ */ jsx("div", { className: "w-16" }),
11803
+ weekDays.map((day) => /* @__PURE__ */ jsxs(
11804
+ "div",
11805
+ {
11806
+ className: cn(
11807
+ "flex-1 p-2 text-center border-l",
11808
+ isToday(day) && "bg-primary/10"
11809
+ ),
11810
+ children: [
11811
+ /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: format(day, "EEE") }),
11812
+ /* @__PURE__ */ jsx("div", { className: cn(
11813
+ "text-lg font-medium",
11814
+ isToday(day) && "text-primary"
11815
+ ), children: format(day, "d") })
11816
+ ]
11817
+ },
11818
+ day.toISOString()
11819
+ ))
11820
+ ] }) }),
11821
+ /* @__PURE__ */ jsx("div", { className: "relative", children: hours.map((hour) => /* @__PURE__ */ jsxs("div", { className: "flex", style: { height: "60px" }, children: [
11822
+ /* @__PURE__ */ jsx("div", { className: "w-16 p-2 text-xs text-muted-foreground text-right border-b", children: format(setHours(/* @__PURE__ */ new Date(), hour), timeFormat === "12h" ? "h a" : "HH:00") }),
11823
+ weekDays.map((day) => {
11824
+ const dayEvents = eventsInView.filter(
11825
+ (event) => isSameDay(new Date(event.start), day) && !event.allDay
11826
+ );
11827
+ return /* @__PURE__ */ jsx(
11828
+ "div",
11829
+ {
11830
+ className: cn(
11831
+ "flex-1 relative border-l border-b",
11832
+ isToday(day) && "bg-primary/5"
11833
+ ),
11834
+ children: dayEvents.filter((event) => {
11835
+ const eventHour = new Date(event.start).getHours();
11836
+ return eventHour === hour;
11837
+ }).map((event) => {
11838
+ const startMinutes = new Date(event.start).getMinutes();
11839
+ const duration = differenceInMinutes(new Date(event.end), new Date(event.start));
11840
+ const height2 = duration / 60 * 60;
11841
+ const top = startMinutes / 60 * 60;
11842
+ return /* @__PURE__ */ jsx(
11843
+ "div",
11844
+ {
11845
+ className: "absolute left-0 right-0 mx-1 p-1 rounded text-xs cursor-pointer hover:opacity-80 overflow-hidden",
11846
+ style: {
11847
+ top: `${top}px`,
11848
+ height: `${height2}px`,
11849
+ backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6",
11850
+ color: "#ffffff",
11851
+ zIndex: 10
11852
+ },
11853
+ onClick: (e) => handleEventClick(event, e),
11854
+ children: event.title
11855
+ },
11856
+ event.id
11857
+ );
11858
+ })
11859
+ },
11860
+ day.toISOString()
11861
+ );
11862
+ })
11863
+ ] }, hour)) })
11864
+ ] }) }) });
11865
+ };
11866
+ const renderMonthView = () => {
11867
+ const monthStart = startOfMonth(currentDate);
11868
+ const monthEnd = endOfMonth(currentDate);
11869
+ const startDate = startOfWeek(monthStart, { weekStartsOn: firstDayOfWeek });
11870
+ const endDate = endOfWeek(monthEnd, { weekStartsOn: firstDayOfWeek });
11871
+ const days = eachDayOfInterval({ start: startDate, end: endDate });
11872
+ const weeks = [];
11873
+ for (let i = 0; i < days.length; i += 7) {
11874
+ weeks.push(days.slice(i, i + 7));
11875
+ }
11876
+ return /* @__PURE__ */ jsx("div", { className: "flex-1 p-4 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "min-h-full", children: [
11877
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-px mb-2", children: weeks[0].map((day) => /* @__PURE__ */ jsx(
11878
+ "div",
11879
+ {
11880
+ className: "p-2 text-center text-sm font-medium text-muted-foreground",
11881
+ children: format(day, "EEE")
11882
+ },
11883
+ day.toISOString()
11884
+ )) }),
11885
+ weeks.map((week, weekIndex) => /* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-px", children: week.map((day) => {
11886
+ const dayEvents = eventsInView.filter(
11887
+ (event) => isSameDay(new Date(event.start), day)
11888
+ );
11889
+ const isCurrentMonth = isSameMonth(day, currentDate);
11890
+ return /* @__PURE__ */ jsxs(
11891
+ "div",
11892
+ {
11893
+ className: cn(
11894
+ "min-h-[100px] p-2 border rounded-lg cursor-pointer transition-colors",
11895
+ !isCurrentMonth && "opacity-50",
11896
+ isToday(day) && "bg-primary/10 border-primary",
11897
+ "hover:bg-muted/50"
11898
+ ),
11899
+ onClick: () => handleDateSelect(day),
11900
+ children: [
11901
+ /* @__PURE__ */ jsx("div", { className: cn(
11902
+ "text-sm font-medium mb-1",
11903
+ isToday(day) && "text-primary"
11904
+ ), children: format(day, "d") }),
11905
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
11906
+ dayEvents.slice(0, 3).map((event) => {
11907
+ return /* @__PURE__ */ jsx(
11908
+ motion.div,
11909
+ {
11910
+ className: "text-xs p-1 rounded cursor-pointer truncate",
11911
+ style: {
11912
+ backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6",
11913
+ color: "#ffffff"
11914
+ },
11915
+ whileHover: { scale: 1.02 },
11916
+ whileTap: { scale: 0.98 },
11917
+ onClick: (e) => {
11918
+ e.stopPropagation();
11919
+ handleEventClick(event, e);
11920
+ },
11921
+ children: event.allDay ? event.title : /* @__PURE__ */ jsxs(Fragment, { children: [
11922
+ format(new Date(event.start), "HH:mm"),
11923
+ " ",
11924
+ event.title
11925
+ ] })
11926
+ },
11927
+ event.id
11928
+ );
11929
+ }),
11930
+ dayEvents.length > 3 && /* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground text-center", children: [
11931
+ "+",
11932
+ dayEvents.length - 3,
11933
+ " more"
11934
+ ] })
11935
+ ] })
11936
+ ]
11937
+ },
11938
+ day.toISOString()
11939
+ );
11940
+ }) }, weekIndex))
11941
+ ] }) });
11942
+ };
11943
+ const renderYearView = () => {
11944
+ const yearStart = startOfYear(currentDate);
11945
+ const yearEnd = endOfYear(currentDate);
11946
+ const months = eachMonthOfInterval({ start: yearStart, end: yearEnd });
11947
+ return /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-4", children: months.map((month) => {
11948
+ const monthEvents = eventsInView.filter((event) => {
11949
+ const eventStart = new Date(event.start);
11950
+ return isSameMonth(eventStart, month);
11951
+ });
11952
+ return /* @__PURE__ */ jsxs(
11953
+ MoonUICardPro,
11954
+ {
11955
+ className: "cursor-pointer hover:shadow-lg transition-shadow",
11956
+ onClick: () => {
11957
+ setCurrentDate(month);
11958
+ handleViewChange("month");
11959
+ },
11960
+ children: [
11961
+ /* @__PURE__ */ jsxs(MoonUICardHeaderPro, { className: "pb-2", children: [
11962
+ /* @__PURE__ */ jsx(MoonUICardTitlePro, { className: "text-lg", children: format(month, "MMMM") }),
11963
+ /* @__PURE__ */ jsxs(MoonUICardDescriptionPro, { children: [
11964
+ monthEvents.length,
11965
+ " events"
11966
+ ] })
11967
+ ] }),
11968
+ /* @__PURE__ */ jsx(MoonUICardContentPro, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-1 text-xs", children: [
11969
+ ["S", "M", "T", "W", "T", "F", "S"].map((day) => /* @__PURE__ */ jsx("div", { className: "text-center text-muted-foreground p-1", children: day }, day)),
11970
+ Array.from({ length: getDay(startOfMonth(month)) }, (_, i) => /* @__PURE__ */ jsx("div", {}, `empty-${i}`)),
11971
+ Array.from({ length: getDaysInMonth(month) }, (_, i) => {
11972
+ const day = new Date(month.getFullYear(), month.getMonth(), i + 1);
11973
+ const hasEvents = monthEvents.some(
11974
+ (event) => isSameDay(new Date(event.start), day)
11975
+ );
11976
+ return /* @__PURE__ */ jsx(
11977
+ "div",
11978
+ {
11979
+ className: cn(
11980
+ "text-center p-1 rounded",
11981
+ isToday(day) && "bg-primary text-primary-foreground",
11982
+ hasEvents && !isToday(day) && "bg-primary/20 font-medium"
11983
+ ),
11984
+ children: i + 1
11985
+ },
11986
+ i
11987
+ );
11988
+ })
11989
+ ] }) })
11990
+ ]
11991
+ },
11992
+ month.toISOString()
11993
+ );
11994
+ }) }) });
11995
+ };
11996
+ const renderAgendaView = () => {
11997
+ const agendaDays = Array.from({ length: 30 }, (_, i) => addDays(currentDate, i));
11998
+ return /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ jsx("div", { className: "space-y-4", children: agendaDays.map((day) => {
11999
+ const dayEvents = eventsInView.filter(
12000
+ (event) => isSameDay(new Date(event.start), day)
12001
+ ).sort((a, b) => new Date(a.start).getTime() - new Date(b.start).getTime());
12002
+ if (dayEvents.length === 0)
12003
+ return null;
12004
+ return /* @__PURE__ */ jsxs(MoonUICardPro, { children: [
12005
+ /* @__PURE__ */ jsxs(MoonUICardHeaderPro, { className: "pb-2", children: [
12006
+ /* @__PURE__ */ jsx(MoonUICardTitlePro, { className: "text-lg", children: format(day, "EEEE, MMMM d, yyyy") }),
12007
+ /* @__PURE__ */ jsxs(MoonUICardDescriptionPro, { children: [
12008
+ dayEvents.length,
12009
+ " events"
12010
+ ] })
12011
+ ] }),
12012
+ /* @__PURE__ */ jsx(MoonUICardContentPro, { children: /* @__PURE__ */ jsx("div", { className: "space-y-2", children: dayEvents.map((event) => /* @__PURE__ */ jsxs(
12013
+ "div",
12014
+ {
12015
+ className: "flex items-start gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer",
12016
+ onClick: (e) => handleEventClick(event, e),
12017
+ children: [
12018
+ /* @__PURE__ */ jsx(
12019
+ "div",
12020
+ {
12021
+ className: "w-1 h-full rounded",
12022
+ style: {
12023
+ backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6"
12024
+ }
12025
+ }
12026
+ ),
12027
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
12028
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-1", children: [
12029
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: event.title }),
12030
+ event.priority && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: event.priority === "high" ? "destructive" : event.priority === "medium" ? "secondary" : "secondary", children: event.priority })
12031
+ ] }),
12032
+ /* @__PURE__ */ jsxs("div", { className: "text-sm text-muted-foreground", children: [
12033
+ event.allDay ? "All day" : /* @__PURE__ */ jsxs(Fragment, { children: [
12034
+ format(new Date(event.start), "HH:mm"),
12035
+ " - ",
12036
+ format(new Date(event.end), "HH:mm")
12037
+ ] }),
12038
+ event.location && /* @__PURE__ */ jsxs("span", { className: "ml-2", children: [
12039
+ /* @__PURE__ */ jsx(MapPin, { className: "inline h-3 w-3 mr-1" }),
12040
+ event.location
12041
+ ] })
12042
+ ] }),
12043
+ event.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: event.description })
12044
+ ] })
12045
+ ]
12046
+ },
12047
+ event.id
12048
+ )) }) })
12049
+ ] }, day.toISOString());
12050
+ }) }) });
12051
+ };
12052
+ return /* @__PURE__ */ jsx(MoonUITooltipProviderPro, { children: /* @__PURE__ */ jsxs("div", { className: cn("flex h-full bg-background", className), style: { height }, children: [
12053
+ /* @__PURE__ */ jsxs(
12054
+ motion.div,
12055
+ {
12056
+ className: cn(
12057
+ "border-r bg-muted/30 flex flex-col",
12058
+ sidebarCollapsed ? "w-16" : "w-80"
12059
+ ),
12060
+ animate: { width: sidebarCollapsed ? 64 : 320 },
12061
+ transition: { type: "spring", stiffness: 300, damping: 30 },
12062
+ children: [
12063
+ !sidebarCollapsed && /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx(
12064
+ Calendar,
12065
+ {
12066
+ mode: "single",
12067
+ selected: currentDate,
12068
+ onSelect: (date) => {
12069
+ if (date instanceof Date) {
12070
+ handleDateSelect(date);
12071
+ }
12072
+ },
12073
+ className: "rounded-md border"
12074
+ }
12075
+ ) }),
12076
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto p-4", children: sidebarCollapsed ? /* @__PURE__ */ jsx("div", { className: "space-y-2", children: categories.map((category) => /* @__PURE__ */ jsxs(MoonUITooltipPro, { children: [
12077
+ /* @__PURE__ */ jsx(MoonUITooltipTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(
12078
+ MoonUIButtonPro,
12079
+ {
12080
+ variant: "ghost",
12081
+ size: "icon",
12082
+ className: "w-full",
12083
+ onClick: () => {
12084
+ setSelectedCategories(
12085
+ (prev) => prev.includes(category.id) ? prev.filter((c2) => c2 !== category.id) : [...prev, category.id]
12086
+ );
12087
+ },
12088
+ children: /* @__PURE__ */ jsx(
12089
+ "div",
12090
+ {
12091
+ className: "w-4 h-4 rounded",
12092
+ style: { backgroundColor: category.color }
12093
+ }
12094
+ )
12095
+ }
12096
+ ) }),
12097
+ /* @__PURE__ */ jsx(MoonUITooltipContentPro, { side: "right", children: category.name })
12098
+ ] }, category.id)) }) : /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
12099
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
12100
+ /* @__PURE__ */ jsx("h3", { className: "font-medium", children: "Categories" }),
12101
+ /* @__PURE__ */ jsx(
12102
+ MoonUIButtonPro,
12103
+ {
12104
+ variant: "ghost",
12105
+ size: "sm",
12106
+ onClick: () => setSelectedCategories([]),
12107
+ children: "Clear"
12108
+ }
12109
+ )
12110
+ ] }),
12111
+ categories.map((category) => /* @__PURE__ */ jsxs(
12112
+ "div",
12113
+ {
12114
+ className: cn(
12115
+ "flex items-center gap-2 p-2 rounded-lg cursor-pointer hover:bg-muted",
12116
+ selectedCategories.includes(category.id) && "bg-muted"
12117
+ ),
12118
+ onClick: () => {
12119
+ setSelectedCategories(
12120
+ (prev) => prev.includes(category.id) ? prev.filter((c2) => c2 !== category.id) : [...prev, category.id]
12121
+ );
12122
+ },
12123
+ children: [
12124
+ /* @__PURE__ */ jsx(
12125
+ MoonUICheckboxPro,
12126
+ {
12127
+ checked: selectedCategories.includes(category.id),
12128
+ onCheckedChange: () => {
12129
+ }
12130
+ }
12131
+ ),
12132
+ /* @__PURE__ */ jsx(
12133
+ "div",
12134
+ {
12135
+ className: "w-4 h-4 rounded",
12136
+ style: { backgroundColor: category.color }
12137
+ }
12138
+ ),
12139
+ category.icon,
12140
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: category.name })
12141
+ ]
12142
+ },
12143
+ category.id
12144
+ ))
12145
+ ] }) }),
12146
+ /* @__PURE__ */ jsx("div", { className: "p-2 border-t", children: /* @__PURE__ */ jsx(
12147
+ MoonUIButtonPro,
12148
+ {
12149
+ variant: "ghost",
12150
+ size: "icon",
12151
+ className: "w-full",
12152
+ onClick: () => setSidebarCollapsed(!sidebarCollapsed),
12153
+ children: sidebarCollapsed ? /* @__PURE__ */ jsx(PanelLeft, {}) : /* @__PURE__ */ jsx(PanelRight, {})
12154
+ }
12155
+ ) })
12156
+ ]
12157
+ }
12158
+ ),
12159
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
12160
+ /* @__PURE__ */ jsxs("div", { className: "border-b p-4 flex items-center justify-between", children: [
12161
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
12162
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
12163
+ /* @__PURE__ */ jsx(
12164
+ MoonUIButtonPro,
12165
+ {
12166
+ variant: "outline",
12167
+ size: "icon",
12168
+ onClick: () => navigateDate("prev"),
12169
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
12170
+ }
12171
+ ),
12172
+ /* @__PURE__ */ jsx(
12173
+ MoonUIButtonPro,
12174
+ {
12175
+ variant: "outline",
12176
+ size: "icon",
12177
+ onClick: () => navigateDate("next"),
12178
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
12179
+ }
12180
+ ),
12181
+ /* @__PURE__ */ jsx(
12182
+ MoonUIButtonPro,
12183
+ {
12184
+ variant: "outline",
12185
+ onClick: () => setCurrentDate(/* @__PURE__ */ new Date()),
12186
+ children: "Today"
12187
+ }
12188
+ )
12189
+ ] }),
12190
+ /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold", children: format(
12191
+ currentDate,
12192
+ currentViewConfig.type === "day" ? "EEEE, MMMM d, yyyy" : currentViewConfig.type === "week" ? "'Week of' MMMM d, yyyy" : currentViewConfig.type === "month" ? "MMMM yyyy" : currentViewConfig.type === "year" ? "yyyy" : "MMMM yyyy"
12193
+ ) })
12194
+ ] }),
12195
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
12196
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
12197
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4" }),
12198
+ /* @__PURE__ */ jsx(
12199
+ MoonUIInputPro,
12200
+ {
12201
+ placeholder: "Search events...",
12202
+ value: searchQuery,
12203
+ onChange: (e) => setSearchQuery(e.target.value),
12204
+ className: "pl-9 w-64"
12205
+ }
12206
+ )
12207
+ ] }),
12208
+ /* @__PURE__ */ jsx(MoonUITabsPro, { value: currentView, onValueChange: handleViewChange, children: /* @__PURE__ */ jsx(MoonUITabsListPro, { children: views.map((view) => /* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: view.id, children: view.name }, view.id)) }) }),
12209
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
12210
+ /* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "outline", size: "icon", children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }) }) }),
12211
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", className: "w-48", children: [
12212
+ /* @__PURE__ */ jsx(MoonUIDropdownMenuLabelPro, { children: "Actions" }),
12213
+ /* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
12214
+ allowEventCreation && /* @__PURE__ */ jsxs(
12215
+ MoonUIDropdownMenuItemPro,
12216
+ {
12217
+ onClick: () => {
12218
+ setNewEventStart(/* @__PURE__ */ new Date());
12219
+ setNewEventEnd(addHours(/* @__PURE__ */ new Date(), 1));
12220
+ setIsCreating(true);
12221
+ setIsEventDialogOpen(true);
12222
+ },
12223
+ children: [
12224
+ /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-2" }),
12225
+ "Create Event"
12226
+ ]
12227
+ }
12228
+ ),
12229
+ /* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
12230
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuSubPro, { children: [
12231
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuSubTriggerPro, { children: [
12232
+ /* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
12233
+ "Export"
12234
+ ] }),
12235
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuSubContentPro, { children: [
12236
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => exportCalendar("ics"), children: [
12237
+ /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 mr-2" }),
12238
+ "Export as ICS"
12239
+ ] }),
12240
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => exportCalendar("csv"), children: [
12241
+ /* @__PURE__ */ jsx(FileSpreadsheet, { className: "h-4 w-4 mr-2" }),
12242
+ "Export as CSV"
12243
+ ] }),
12244
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => exportCalendar("json"), children: [
12245
+ /* @__PURE__ */ jsx(FileCode, { className: "h-4 w-4 mr-2" }),
12246
+ "Export as JSON"
12247
+ ] })
12248
+ ] })
12249
+ ] }),
12250
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { children: [
12251
+ /* @__PURE__ */ jsx(Printer, { className: "h-4 w-4 mr-2" }),
12252
+ "Print"
12253
+ ] }),
12254
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { children: [
12255
+ /* @__PURE__ */ jsx(Share2, { className: "h-4 w-4 mr-2" }),
12256
+ "Share"
12257
+ ] }),
12258
+ /* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
12259
+ /* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { children: [
12260
+ /* @__PURE__ */ jsx(Settings, { className: "h-4 w-4 mr-2" }),
12261
+ "Settings"
12262
+ ] })
12263
+ ] })
12264
+ ] })
12265
+ ] })
12266
+ ] }),
12267
+ /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxs(
12268
+ motion.div,
12269
+ {
12270
+ className: "flex-1 overflow-hidden",
12271
+ initial: { opacity: 0, y: 20 },
12272
+ animate: { opacity: 1, y: 0 },
12273
+ exit: { opacity: 0, y: -20 },
12274
+ transition: { duration: 0.2 },
12275
+ children: [
12276
+ currentViewConfig.type === "day" && renderDayView(),
12277
+ currentViewConfig.type === "week" && renderWeekView(),
12278
+ currentViewConfig.type === "month" && renderMonthView(),
12279
+ currentViewConfig.type === "year" && renderYearView(),
12280
+ currentViewConfig.type === "agenda" && renderAgendaView()
12281
+ ]
12282
+ },
12283
+ currentView
12284
+ ) }) })
12285
+ ] }),
12286
+ /* @__PURE__ */ jsx(MoonUIDialogPro, { open: isEventDialogOpen, onOpenChange: setIsEventDialogOpen, children: /* @__PURE__ */ jsxs(MoonUIDialogContentPro, { className: "sm:max-w-[600px]", children: [
12287
+ /* @__PURE__ */ jsxs(MoonUIDialogHeaderPro, { children: [
12288
+ /* @__PURE__ */ jsx(MoonUIDialogTitlePro, { children: isCreating ? "Create Event" : "Edit Event" }),
12289
+ /* @__PURE__ */ jsx(MoonUIDialogDescriptionPro, { children: isCreating ? "Add a new event to your calendar" : "Update event details" })
12290
+ ] }),
12291
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
12292
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
12293
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "title", children: "Title" }),
12294
+ /* @__PURE__ */ jsx(
12295
+ MoonUIInputPro,
12296
+ {
12297
+ id: "title",
12298
+ value: editingEvent.title || "",
12299
+ onChange: (e) => setEditingEvent({ ...editingEvent, title: e.target.value }),
12300
+ placeholder: "Event title"
12301
+ }
12302
+ )
12303
+ ] }),
12304
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12305
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
12306
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "start", children: "Start" }),
12307
+ /* @__PURE__ */ jsx(
12308
+ MoonUIInputPro,
12309
+ {
12310
+ id: "start",
12311
+ type: "datetime-local",
12312
+ value: editingEvent.start ? format(editingEvent.start, "yyyy-MM-dd'T'HH:mm") : "",
12313
+ onChange: (e) => setEditingEvent({ ...editingEvent, start: new Date(e.target.value) })
12314
+ }
12315
+ )
12316
+ ] }),
12317
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
12318
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "end", children: "End" }),
12319
+ /* @__PURE__ */ jsx(
12320
+ MoonUIInputPro,
12321
+ {
12322
+ id: "end",
12323
+ type: "datetime-local",
12324
+ value: editingEvent.end ? format(editingEvent.end, "yyyy-MM-dd'T'HH:mm") : "",
12325
+ onChange: (e) => setEditingEvent({ ...editingEvent, end: new Date(e.target.value) })
12326
+ }
12327
+ )
12328
+ ] })
12329
+ ] }),
12330
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
12331
+ /* @__PURE__ */ jsx(
12332
+ MoonUISwitchPro,
12333
+ {
12334
+ id: "allDay",
12335
+ checked: editingEvent.allDay || false,
12336
+ onCheckedChange: (checked) => setEditingEvent({ ...editingEvent, allDay: checked })
12337
+ }
12338
+ ),
12339
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "allDay", children: "All day" })
12340
+ ] }),
12341
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
12342
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "category", children: "Category" }),
12343
+ /* @__PURE__ */ jsxs(
12344
+ MoonUISelectPro,
12345
+ {
12346
+ value: editingEvent.category || "",
12347
+ onValueChange: (value) => setEditingEvent({ ...editingEvent, category: value }),
12348
+ children: [
12349
+ /* @__PURE__ */ jsx(MoonUISelectTriggerPro, { id: "category", children: /* @__PURE__ */ jsx(MoonUISelectValuePro, { placeholder: "Select a category" }) }),
12350
+ /* @__PURE__ */ jsx(MoonUISelectContentPro, { children: categories.map((category) => /* @__PURE__ */ jsx(MoonUISelectItemPro, { value: category.id, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
12351
+ /* @__PURE__ */ jsx(
12352
+ "div",
12353
+ {
12354
+ className: "w-3 h-3 rounded",
12355
+ style: { backgroundColor: category.color }
12356
+ }
12357
+ ),
12358
+ category.name
12359
+ ] }) }, category.id)) })
12360
+ ]
12361
+ }
12362
+ )
12363
+ ] }),
12364
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
12365
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "location", children: "Location" }),
12366
+ /* @__PURE__ */ jsx(
12367
+ MoonUIInputPro,
12368
+ {
12369
+ id: "location",
12370
+ value: editingEvent.location || "",
12371
+ onChange: (e) => setEditingEvent({ ...editingEvent, location: e.target.value }),
12372
+ placeholder: "Event location"
12373
+ }
12374
+ )
12375
+ ] }),
12376
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
12377
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "description", children: "Description" }),
12378
+ /* @__PURE__ */ jsx(
12379
+ MoonUITextareaPro,
12380
+ {
12381
+ id: "description",
12382
+ value: editingEvent.description || "",
12383
+ onChange: (e) => setEditingEvent({ ...editingEvent, description: e.target.value }),
12384
+ placeholder: "Event description"
12385
+ }
12386
+ )
12387
+ ] }),
12388
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
12389
+ /* @__PURE__ */ jsx(MoonUILabelPro, { children: "Priority" }),
12390
+ /* @__PURE__ */ jsxs(
12391
+ MoonUIRadioGroupPro,
12392
+ {
12393
+ value: editingEvent.priority || "medium",
12394
+ onValueChange: (value) => setEditingEvent({ ...editingEvent, priority: value }),
12395
+ children: [
12396
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
12397
+ /* @__PURE__ */ jsx(MoonUIRadioGroupItemPro, { value: "low", id: "low" }),
12398
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "low", children: "Low" })
12399
+ ] }),
12400
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
12401
+ /* @__PURE__ */ jsx(MoonUIRadioGroupItemPro, { value: "medium", id: "medium" }),
12402
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "medium", children: "Medium" })
12403
+ ] }),
12404
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
12405
+ /* @__PURE__ */ jsx(MoonUIRadioGroupItemPro, { value: "high", id: "high" }),
12406
+ /* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "high", children: "High" })
12407
+ ] })
12408
+ ]
12409
+ }
12410
+ )
12411
+ ] })
12412
+ ] }),
12413
+ /* @__PURE__ */ jsxs(MoonUIDialogFooterPro, { children: [
12414
+ !isCreating && allowEventDeletion && /* @__PURE__ */ jsx(
12415
+ MoonUIButtonPro,
12416
+ {
12417
+ variant: "destructive",
12418
+ onClick: handleEventDelete,
12419
+ children: "Delete"
12420
+ }
12421
+ ),
12422
+ /* @__PURE__ */ jsx(
12423
+ MoonUIButtonPro,
12424
+ {
12425
+ variant: "outline",
12426
+ onClick: () => {
12427
+ setIsEventDialogOpen(false);
12428
+ setEditingEvent({});
12429
+ setSelectedEvent(null);
12430
+ setIsCreating(false);
12431
+ },
12432
+ children: "Cancel"
12433
+ }
12434
+ ),
12435
+ /* @__PURE__ */ jsx(MoonUIButtonPro, { onClick: handleEventSave, children: isCreating ? "Create" : "Save" })
12436
+ ] })
12437
+ ] }) })
12438
+ ] }) });
12439
+ });
12440
+ CalendarPro.displayName = "CalendarPro";
11124
12441
  var PRIORITY_OPTIONS = [
11125
12442
  { value: "low", label: "Low", icon: Flag, color: "text-green-600" },
11126
12443
  { value: "medium", label: "Medium", icon: Flag, color: "text-yellow-600" },
@@ -12797,11 +14114,11 @@ function Kanban({
12797
14114
  description: "Column color has been changed"
12798
14115
  });
12799
14116
  };
12800
- const handleExport = (format6) => {
14117
+ const handleExport = (format7) => {
12801
14118
  if (onExport) {
12802
- onExport(format6);
14119
+ onExport(format7);
12803
14120
  } else {
12804
- if (format6 === "json") {
14121
+ if (format7 === "json") {
12805
14122
  const data = JSON.stringify(columns, null, 2);
12806
14123
  const blob = new Blob([data], { type: "application/json" });
12807
14124
  const url = URL.createObjectURL(blob);
@@ -12816,7 +14133,7 @@ function Kanban({
12816
14133
  title: "Board exported",
12817
14134
  description: "Board exported as JSON file"
12818
14135
  });
12819
- } else if (format6 === "csv") {
14136
+ } else if (format7 === "csv") {
12820
14137
  let csv = "Column,Card Title,Description,Priority,Assignees,Due Date,Tags\n";
12821
14138
  columns.forEach((column) => {
12822
14139
  column.cards.forEach((card) => {
@@ -13582,7 +14899,7 @@ function findDiffEnd(a, b, posA, posB) {
13582
14899
  posB -= size4;
13583
14900
  }
13584
14901
  }
13585
- var Fragment7 = class {
14902
+ var Fragment8 = class {
13586
14903
  /**
13587
14904
  @internal
13588
14905
  */
@@ -13650,7 +14967,7 @@ var Fragment7 = class {
13650
14967
  }
13651
14968
  for (; i < other.content.length; i++)
13652
14969
  content.push(other.content[i]);
13653
- return new Fragment7(content, this.size + other.size);
14970
+ return new Fragment8(content, this.size + other.size);
13654
14971
  }
13655
14972
  /**
13656
14973
  Cut out the sub-fragment between the two given positions.
@@ -13674,17 +14991,17 @@ var Fragment7 = class {
13674
14991
  }
13675
14992
  pos = end;
13676
14993
  }
13677
- return new Fragment7(result, size4);
14994
+ return new Fragment8(result, size4);
13678
14995
  }
13679
14996
  /**
13680
14997
  @internal
13681
14998
  */
13682
14999
  cutByIndex(from2, to) {
13683
15000
  if (from2 == to)
13684
- return Fragment7.empty;
15001
+ return Fragment8.empty;
13685
15002
  if (from2 == 0 && to == this.content.length)
13686
15003
  return this;
13687
- return new Fragment7(this.content.slice(from2, to));
15004
+ return new Fragment8(this.content.slice(from2, to));
13688
15005
  }
13689
15006
  /**
13690
15007
  Create a new fragment in which the node at the given index is
@@ -13697,21 +15014,21 @@ var Fragment7 = class {
13697
15014
  let copy2 = this.content.slice();
13698
15015
  let size4 = this.size + node.nodeSize - current.nodeSize;
13699
15016
  copy2[index2] = node;
13700
- return new Fragment7(copy2, size4);
15017
+ return new Fragment8(copy2, size4);
13701
15018
  }
13702
15019
  /**
13703
15020
  Create a new fragment by prepending the given node to this
13704
15021
  fragment.
13705
15022
  */
13706
15023
  addToStart(node) {
13707
- return new Fragment7([node].concat(this.content), this.size + node.nodeSize);
15024
+ return new Fragment8([node].concat(this.content), this.size + node.nodeSize);
13708
15025
  }
13709
15026
  /**
13710
15027
  Create a new fragment by appending the given node to this
13711
15028
  fragment.
13712
15029
  */
13713
15030
  addToEnd(node) {
13714
- return new Fragment7(this.content.concat(node), this.size + node.nodeSize);
15031
+ return new Fragment8(this.content.concat(node), this.size + node.nodeSize);
13715
15032
  }
13716
15033
  /**
13717
15034
  Compare this fragment to another one.
@@ -13830,10 +15147,10 @@ var Fragment7 = class {
13830
15147
  */
13831
15148
  static fromJSON(schema, value) {
13832
15149
  if (!value)
13833
- return Fragment7.empty;
15150
+ return Fragment8.empty;
13834
15151
  if (!Array.isArray(value))
13835
15152
  throw new RangeError("Invalid input for Fragment.fromJSON");
13836
- return new Fragment7(value.map(schema.nodeFromJSON));
15153
+ return new Fragment8(value.map(schema.nodeFromJSON));
13837
15154
  }
13838
15155
  /**
13839
15156
  Build a fragment from an array of nodes. Ensures that adjacent
@@ -13841,7 +15158,7 @@ var Fragment7 = class {
13841
15158
  */
13842
15159
  static fromArray(array) {
13843
15160
  if (!array.length)
13844
- return Fragment7.empty;
15161
+ return Fragment8.empty;
13845
15162
  let joined, size4 = 0;
13846
15163
  for (let i = 0; i < array.length; i++) {
13847
15164
  let node = array[i];
@@ -13854,7 +15171,7 @@ var Fragment7 = class {
13854
15171
  joined.push(node);
13855
15172
  }
13856
15173
  }
13857
- return new Fragment7(joined || array, size4);
15174
+ return new Fragment8(joined || array, size4);
13858
15175
  }
13859
15176
  /**
13860
15177
  Create a fragment from something that can be interpreted as a
@@ -13864,17 +15181,17 @@ var Fragment7 = class {
13864
15181
  */
13865
15182
  static from(nodes) {
13866
15183
  if (!nodes)
13867
- return Fragment7.empty;
13868
- if (nodes instanceof Fragment7)
15184
+ return Fragment8.empty;
15185
+ if (nodes instanceof Fragment8)
13869
15186
  return nodes;
13870
15187
  if (Array.isArray(nodes))
13871
15188
  return this.fromArray(nodes);
13872
15189
  if (nodes.attrs)
13873
- return new Fragment7([nodes], nodes.nodeSize);
15190
+ return new Fragment8([nodes], nodes.nodeSize);
13874
15191
  throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
13875
15192
  }
13876
15193
  };
13877
- Fragment7.empty = new Fragment7([], 0);
15194
+ Fragment8.empty = new Fragment8([], 0);
13878
15195
  var found = { index: 0, offset: 0 };
13879
15196
  function retIndex(index2, offset4) {
13880
15197
  found.index = index2;
@@ -14099,7 +15416,7 @@ var Slice = class {
14099
15416
  let openStart = json2.openStart || 0, openEnd = json2.openEnd || 0;
14100
15417
  if (typeof openStart != "number" || typeof openEnd != "number")
14101
15418
  throw new RangeError("Invalid input for Slice.fromJSON");
14102
- return new Slice(Fragment7.fromJSON(schema, json2.content), openStart, openEnd);
15419
+ return new Slice(Fragment8.fromJSON(schema, json2.content), openStart, openEnd);
14103
15420
  }
14104
15421
  /**
14105
15422
  Create a slice from a fragment by taking the maximum possible
@@ -14114,7 +15431,7 @@ var Slice = class {
14114
15431
  return new Slice(fragment, openStart, openEnd);
14115
15432
  }
14116
15433
  };
14117
- Slice.empty = new Slice(Fragment7.empty, 0, 0);
15434
+ Slice.empty = new Slice(Fragment8.empty, 0, 0);
14118
15435
  function removeRange(content, from2, to) {
14119
15436
  let { index: index2, offset: offset4 } = content.findIndex(from2), child = content.maybeChild(index2);
14120
15437
  let { index: indexTo, offset: offsetTo } = content.findIndex(to);
@@ -14212,7 +15529,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
14212
15529
  addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
14213
15530
  }
14214
15531
  addRange($to, null, depth, content);
14215
- return new Fragment7(content);
15532
+ return new Fragment8(content);
14216
15533
  }
14217
15534
  function replaceTwoWay($from, $to, depth) {
14218
15535
  let content = [];
@@ -14222,13 +15539,13 @@ function replaceTwoWay($from, $to, depth) {
14222
15539
  addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
14223
15540
  }
14224
15541
  addRange($to, null, depth, content);
14225
- return new Fragment7(content);
15542
+ return new Fragment8(content);
14226
15543
  }
14227
15544
  function prepareSliceForReplace(slice2, $along) {
14228
15545
  let extra = $along.depth - slice2.openStart, parent = $along.node(extra);
14229
15546
  let node = parent.copy(slice2.content);
14230
15547
  for (let i = extra - 1; i >= 0; i--)
14231
- node = $along.node(i).copy(Fragment7.from(node));
15548
+ node = $along.node(i).copy(Fragment8.from(node));
14232
15549
  return {
14233
15550
  start: node.resolveNoCache(slice2.openStart + extra),
14234
15551
  end: node.resolveNoCache(node.content.size - slice2.openEnd - extra)
@@ -14567,7 +15884,7 @@ var Node2 = class {
14567
15884
  this.type = type;
14568
15885
  this.attrs = attrs;
14569
15886
  this.marks = marks;
14570
- this.content = content || Fragment7.empty;
15887
+ this.content = content || Fragment8.empty;
14571
15888
  }
14572
15889
  /**
14573
15890
  The array of this node's child nodes.
@@ -14872,7 +16189,7 @@ var Node2 = class {
14872
16189
  can optionally pass `start` and `end` indices into the
14873
16190
  replacement fragment.
14874
16191
  */
14875
- canReplace(from2, to, replacement = Fragment7.empty, start = 0, end = replacement.childCount) {
16192
+ canReplace(from2, to, replacement = Fragment8.empty, start = 0, end = replacement.childCount) {
14876
16193
  let one = this.contentMatchAt(from2).matchFragment(replacement, start, end);
14877
16194
  let two = one && one.matchFragment(this.content, to);
14878
16195
  if (!two || !two.validEnd)
@@ -14954,7 +16271,7 @@ var Node2 = class {
14954
16271
  throw new RangeError("Invalid text node in JSON");
14955
16272
  return schema.text(json2.text, marks);
14956
16273
  }
14957
- let content = Fragment7.fromJSON(schema, json2.content);
16274
+ let content = Fragment8.fromJSON(schema, json2.content);
14958
16275
  let node = schema.nodeType(json2.type).create(json2.attrs, content, marks);
14959
16276
  node.type.checkAttrs(node.attrs);
14960
16277
  return node;
@@ -15096,7 +16413,7 @@ var ContentMatch = class {
15096
16413
  function search(match, types) {
15097
16414
  let finished = match.matchFragment(after, startIndex);
15098
16415
  if (finished && (!toEnd || finished.validEnd))
15099
- return Fragment7.from(types.map((tp) => tp.createAndFill()));
16416
+ return Fragment8.from(types.map((tp) => tp.createAndFill()));
15100
16417
  for (let i = 0; i < match.next.length; i++) {
15101
16418
  let { type, next } = match.next[i];
15102
16419
  if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
@@ -15548,7 +16865,7 @@ var NodeType = class {
15548
16865
  create(attrs = null, content, marks) {
15549
16866
  if (this.isText)
15550
16867
  throw new Error("NodeType.create can't construct text nodes");
15551
- return new Node2(this, this.computeAttrs(attrs), Fragment7.from(content), Mark.setFrom(marks));
16868
+ return new Node2(this, this.computeAttrs(attrs), Fragment8.from(content), Mark.setFrom(marks));
15552
16869
  }
15553
16870
  /**
15554
16871
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
@@ -15556,7 +16873,7 @@ var NodeType = class {
15556
16873
  if it doesn't match.
15557
16874
  */
15558
16875
  createChecked(attrs = null, content, marks) {
15559
- content = Fragment7.from(content);
16876
+ content = Fragment8.from(content);
15560
16877
  this.checkContent(content);
15561
16878
  return new Node2(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));
15562
16879
  }
@@ -15570,7 +16887,7 @@ var NodeType = class {
15570
16887
  */
15571
16888
  createAndFill(attrs = null, content, marks) {
15572
16889
  attrs = this.computeAttrs(attrs);
15573
- content = Fragment7.from(content);
16890
+ content = Fragment8.from(content);
15574
16891
  if (content.size) {
15575
16892
  let before = this.contentMatch.fillBefore(content);
15576
16893
  if (!before)
@@ -15578,7 +16895,7 @@ var NodeType = class {
15578
16895
  content = before.append(content);
15579
16896
  }
15580
16897
  let matched = this.contentMatch.matchFragment(content);
15581
- let after = matched && matched.fillBefore(Fragment7.empty, true);
16898
+ let after = matched && matched.fillBefore(Fragment8.empty, true);
15582
16899
  if (!after)
15583
16900
  return null;
15584
16901
  return new Node2(this, attrs, content.append(after), Mark.setFrom(marks));
@@ -16042,7 +17359,7 @@ var NodeContext = class {
16042
17359
  if (!this.match) {
16043
17360
  if (!this.type)
16044
17361
  return [];
16045
- let fill = this.type.contentMatch.fillBefore(Fragment7.from(node));
17362
+ let fill = this.type.contentMatch.fillBefore(Fragment8.from(node));
16046
17363
  if (fill) {
16047
17364
  this.match = this.type.contentMatch.matchFragment(fill);
16048
17365
  } else {
@@ -16068,9 +17385,9 @@ var NodeContext = class {
16068
17385
  this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m2[0].length));
16069
17386
  }
16070
17387
  }
16071
- let content = Fragment7.from(this.content);
17388
+ let content = Fragment8.from(this.content);
16072
17389
  if (!openEnd && this.match)
16073
- content = content.append(this.match.fillBefore(Fragment7.empty, true));
17390
+ content = content.append(this.match.fillBefore(Fragment8.empty, true));
16074
17391
  return this.type ? this.type.create(this.attrs, content, this.marks) : content;
16075
17392
  }
16076
17393
  inlineContext(node) {
@@ -17087,7 +18404,7 @@ function mapFragment(fragment, f, parent) {
17087
18404
  child = f(child, parent, i);
17088
18405
  mapped.push(child);
17089
18406
  }
17090
- return Fragment7.fromArray(mapped);
18407
+ return Fragment8.fromArray(mapped);
17091
18408
  }
17092
18409
  var AddMarkStep = class extends Step {
17093
18410
  /**
@@ -17204,7 +18521,7 @@ var AddNodeMarkStep = class extends Step {
17204
18521
  if (!node)
17205
18522
  return StepResult.fail("No node at mark step's position");
17206
18523
  let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
17207
- return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment7.from(updated), 0, node.isLeaf ? 0 : 1));
18524
+ return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment8.from(updated), 0, node.isLeaf ? 0 : 1));
17208
18525
  }
17209
18526
  invert(doc3) {
17210
18527
  let node = doc3.nodeAt(this.pos);
@@ -17250,7 +18567,7 @@ var RemoveNodeMarkStep = class extends Step {
17250
18567
  if (!node)
17251
18568
  return StepResult.fail("No node at mark step's position");
17252
18569
  let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
17253
- return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment7.from(updated), 0, node.isLeaf ? 0 : 1));
18570
+ return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment8.from(updated), 0, node.isLeaf ? 0 : 1));
17254
18571
  }
17255
18572
  invert(doc3) {
17256
18573
  let node = doc3.nodeAt(this.pos);
@@ -17515,7 +18832,7 @@ function clearIncompatible(tr2, pos, parentType, match = parentType.contentMatch
17515
18832
  let m2, newline = /\r?\n|\r/g, slice2;
17516
18833
  while (m2 = newline.exec(child.text)) {
17517
18834
  if (!slice2)
17518
- slice2 = new Slice(Fragment7.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
18835
+ slice2 = new Slice(Fragment8.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
17519
18836
  replSteps.push(new ReplaceStep(cur + m2.index, cur + m2.index + m2[0].length, slice2));
17520
18837
  }
17521
18838
  }
@@ -17523,7 +18840,7 @@ function clearIncompatible(tr2, pos, parentType, match = parentType.contentMatch
17523
18840
  cur = end;
17524
18841
  }
17525
18842
  if (!match.validEnd) {
17526
- let fill = match.fillBefore(Fragment7.empty, true);
18843
+ let fill = match.fillBefore(Fragment8.empty, true);
17527
18844
  tr2.replace(cur, cur, new Slice(fill, 0, 0));
17528
18845
  }
17529
18846
  for (let i = replSteps.length - 1; i >= 0; i--)
@@ -17549,20 +18866,20 @@ function lift(tr2, range, target) {
17549
18866
  let { $from, $to, depth } = range;
17550
18867
  let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
17551
18868
  let start = gapStart, end = gapEnd;
17552
- let before = Fragment7.empty, openStart = 0;
18869
+ let before = Fragment8.empty, openStart = 0;
17553
18870
  for (let d = depth, splitting = false; d > target; d--)
17554
18871
  if (splitting || $from.index(d) > 0) {
17555
18872
  splitting = true;
17556
- before = Fragment7.from($from.node(d).copy(before));
18873
+ before = Fragment8.from($from.node(d).copy(before));
17557
18874
  openStart++;
17558
18875
  } else {
17559
18876
  start--;
17560
18877
  }
17561
- let after = Fragment7.empty, openEnd = 0;
18878
+ let after = Fragment8.empty, openEnd = 0;
17562
18879
  for (let d = depth, splitting = false; d > target; d--)
17563
18880
  if (splitting || $to.after(d + 1) < $to.end(d)) {
17564
18881
  splitting = true;
17565
- after = Fragment7.from($to.node(d).copy(after));
18882
+ after = Fragment8.from($to.node(d).copy(after));
17566
18883
  openEnd++;
17567
18884
  } else {
17568
18885
  end++;
@@ -17602,14 +18919,14 @@ function findWrappingInside(range, type) {
17602
18919
  return inside;
17603
18920
  }
17604
18921
  function wrap(tr2, range, wrappers) {
17605
- let content = Fragment7.empty;
18922
+ let content = Fragment8.empty;
17606
18923
  for (let i = wrappers.length - 1; i >= 0; i--) {
17607
18924
  if (content.size) {
17608
18925
  let match = wrappers[i].type.contentMatch.matchFragment(content);
17609
18926
  if (!match || !match.validEnd)
17610
18927
  throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
17611
18928
  }
17612
- content = Fragment7.from(wrappers[i].type.create(wrappers[i].attrs, content));
18929
+ content = Fragment8.from(wrappers[i].type.create(wrappers[i].attrs, content));
17613
18930
  }
17614
18931
  let start = range.start, end = range.end;
17615
18932
  tr2.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true));
@@ -17634,7 +18951,7 @@ function setBlockType(tr2, from2, to, type, attrs) {
17634
18951
  clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos, 1), type, void 0, convertNewlines === null);
17635
18952
  let mapping = tr2.mapping.slice(mapFrom);
17636
18953
  let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);
17637
- tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment7.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
18954
+ tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment8.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
17638
18955
  if (convertNewlines === true)
17639
18956
  replaceNewlines(tr2, node, pos, mapFrom);
17640
18957
  return false;
@@ -17675,7 +18992,7 @@ function setNodeMarkup(tr2, pos, type, attrs, marks) {
17675
18992
  return tr2.replaceWith(pos, pos + node.nodeSize, newNode);
17676
18993
  if (!type.validContent(node.content))
17677
18994
  throw new RangeError("Invalid content for node type " + type.name);
17678
- tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment7.from(newNode), 0, 0), 1, true));
18995
+ tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment8.from(newNode), 0, 0), 1, true));
17679
18996
  }
17680
18997
  function canSplit(doc3, pos, depth = 1, typesAfter) {
17681
18998
  let $pos = doc3.resolve(pos), base2 = $pos.depth - depth;
@@ -17699,11 +19016,11 @@ function canSplit(doc3, pos, depth = 1, typesAfter) {
17699
19016
  return $pos.node(base2).canReplaceWith(index2, index2, baseType ? baseType.type : $pos.node(base2 + 1).type);
17700
19017
  }
17701
19018
  function split(tr2, pos, depth = 1, typesAfter) {
17702
- let $pos = tr2.doc.resolve(pos), before = Fragment7.empty, after = Fragment7.empty;
19019
+ let $pos = tr2.doc.resolve(pos), before = Fragment8.empty, after = Fragment8.empty;
17703
19020
  for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {
17704
- before = Fragment7.from($pos.node(d).copy(before));
19021
+ before = Fragment8.from($pos.node(d).copy(before));
17705
19022
  let typeAfter = typesAfter && typesAfter[i];
17706
- after = Fragment7.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));
19023
+ after = Fragment8.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));
17707
19024
  }
17708
19025
  tr2.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));
17709
19026
  }
@@ -17842,7 +19159,7 @@ var Fitter = class {
17842
19159
  this.$to = $to;
17843
19160
  this.unplaced = unplaced;
17844
19161
  this.frontier = [];
17845
- this.placed = Fragment7.empty;
19162
+ this.placed = Fragment8.empty;
17846
19163
  for (let i = 0; i <= $from.depth; i++) {
17847
19164
  let node = $from.node(i);
17848
19165
  this.frontier.push({
@@ -17851,7 +19168,7 @@ var Fitter = class {
17851
19168
  });
17852
19169
  }
17853
19170
  for (let i = $from.depth; i > 0; i--)
17854
- this.placed = Fragment7.from($from.node(i).copy(this.placed));
19171
+ this.placed = Fragment8.from($from.node(i).copy(this.placed));
17855
19172
  }
17856
19173
  get depth() {
17857
19174
  return this.frontier.length - 1;
@@ -17908,7 +19225,7 @@ var Fitter = class {
17908
19225
  let first2 = fragment.firstChild;
17909
19226
  for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {
17910
19227
  let { type, match } = this.frontier[frontierDepth], wrap2, inject = null;
17911
- if (pass == 1 && (first2 ? match.matchType(first2.type) || (inject = match.fillBefore(Fragment7.from(first2), false)) : parent && type.compatibleContent(parent.type)))
19228
+ if (pass == 1 && (first2 ? match.matchType(first2.type) || (inject = match.fillBefore(Fragment8.from(first2), false)) : parent && type.compatibleContent(parent.type)))
17912
19229
  return { sliceDepth, frontierDepth, parent, inject };
17913
19230
  else if (pass == 2 && first2 && (wrap2 = match.findWrapping(first2.type)))
17914
19231
  return { sliceDepth, frontierDepth, parent, wrap: wrap2 };
@@ -17968,7 +19285,7 @@ var Fitter = class {
17968
19285
  let toEnd = taken == fragment.childCount;
17969
19286
  if (!toEnd)
17970
19287
  openEndCount = -1;
17971
- this.placed = addToFragment(this.placed, frontierDepth, Fragment7.from(add));
19288
+ this.placed = addToFragment(this.placed, frontierDepth, Fragment8.from(add));
17972
19289
  this.frontier[frontierDepth].match = match;
17973
19290
  if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)
17974
19291
  this.closeFrontierNode();
@@ -18025,12 +19342,12 @@ var Fitter = class {
18025
19342
  openFrontierNode(type, attrs = null, content) {
18026
19343
  let top = this.frontier[this.depth];
18027
19344
  top.match = top.match.matchType(type);
18028
- this.placed = addToFragment(this.placed, this.depth, Fragment7.from(type.create(attrs, content)));
19345
+ this.placed = addToFragment(this.placed, this.depth, Fragment8.from(type.create(attrs, content)));
18029
19346
  this.frontier.push({ type, match: type.contentMatch });
18030
19347
  }
18031
19348
  closeFrontierNode() {
18032
19349
  let open = this.frontier.pop();
18033
- let add = open.match.fillBefore(Fragment7.empty, true);
19350
+ let add = open.match.fillBefore(Fragment8.empty, true);
18034
19351
  if (add.childCount)
18035
19352
  this.placed = addToFragment(this.placed, this.frontier.length, add);
18036
19353
  }
@@ -18059,7 +19376,7 @@ function closeNodeStart(node, openStart, openEnd) {
18059
19376
  if (openStart > 0) {
18060
19377
  frag = node.type.contentMatch.fillBefore(frag).append(frag);
18061
19378
  if (openEnd <= 0)
18062
- frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment7.empty, true));
19379
+ frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment8.empty, true));
18063
19380
  }
18064
19381
  return node.copy(frag);
18065
19382
  }
@@ -18151,7 +19468,7 @@ function closeFragment(fragment, depth, oldOpen, newOpen, parent) {
18151
19468
  if (depth > newOpen) {
18152
19469
  let match = parent.contentMatchAt(0);
18153
19470
  let start = match.fillBefore(fragment).append(fragment);
18154
- fragment = start.append(match.matchFragment(start).fillBefore(Fragment7.empty, true));
19471
+ fragment = start.append(match.matchFragment(start).fillBefore(Fragment8.empty, true));
18155
19472
  }
18156
19473
  return fragment;
18157
19474
  }
@@ -18161,7 +19478,7 @@ function replaceRangeWith(tr2, from2, to, node) {
18161
19478
  if (point != null)
18162
19479
  from2 = to = point;
18163
19480
  }
18164
- tr2.replaceRange(from2, to, new Slice(Fragment7.from(node), 0, 0));
19481
+ tr2.replaceRange(from2, to, new Slice(Fragment8.from(node), 0, 0));
18165
19482
  }
18166
19483
  function deleteRange(tr2, from2, to) {
18167
19484
  let $from = tr2.doc.resolve(from2), $to = tr2.doc.resolve(to);
@@ -18209,7 +19526,7 @@ var AttrStep = class extends Step {
18209
19526
  attrs[name] = node.attrs[name];
18210
19527
  attrs[this.attr] = this.value;
18211
19528
  let updated = node.type.create(attrs, null, node.marks);
18212
- return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment7.from(updated), 0, node.isLeaf ? 0 : 1));
19529
+ return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment8.from(updated), 0, node.isLeaf ? 0 : 1));
18213
19530
  }
18214
19531
  getMap() {
18215
19532
  return StepMap.empty;
@@ -18344,7 +19661,7 @@ var Transform = class {
18344
19661
  fragment, node, or array of nodes.
18345
19662
  */
18346
19663
  replaceWith(from2, to, content) {
18347
- return this.replace(from2, to, new Slice(Fragment7.from(content), 0, 0));
19664
+ return this.replace(from2, to, new Slice(Fragment8.from(content), 0, 0));
18348
19665
  }
18349
19666
  /**
18350
19667
  Delete the content between the given positions.
@@ -18846,7 +20163,7 @@ var NodeSelection = class extends Selection {
18846
20163
  return new NodeSelection($pos);
18847
20164
  }
18848
20165
  content() {
18849
- return new Slice(Fragment7.from(this.node), 0, 0);
20166
+ return new Slice(Fragment8.from(this.node), 0, 0);
18850
20167
  }
18851
20168
  eq(other) {
18852
20169
  return other instanceof NodeSelection && other.anchor == this.anchor;
@@ -20668,7 +21985,7 @@ var NodeViewDesc = class extends ViewDesc {
20668
21985
  }
20669
21986
  }
20670
21987
  if (!rule.contentElement)
20671
- rule.getContent = () => Fragment7.empty;
21988
+ rule.getContent = () => Fragment8.empty;
20672
21989
  }
20673
21990
  return rule;
20674
21991
  }
@@ -21987,7 +23304,7 @@ function parseFromClipboard(view, text, html, plainText, $context) {
21987
23304
  text = f(text, inCode || plainText, view);
21988
23305
  });
21989
23306
  if (inCode)
21990
- return text ? new Slice(Fragment7.from(view.state.schema.text(text.replace(/\r\n?/g, "\n"))), 0, 0) : Slice.empty;
23307
+ return text ? new Slice(Fragment8.from(view.state.schema.text(text.replace(/\r\n?/g, "\n"))), 0, 0) : Slice.empty;
21991
23308
  let parsed = view.someProp("clipboardTextParser", (f) => f(text, $context, plainText, view));
21992
23309
  if (parsed) {
21993
23310
  slice2 = parsed;
@@ -22076,13 +23393,13 @@ function normalizeSiblings(fragment, $context) {
22076
23393
  }
22077
23394
  });
22078
23395
  if (result)
22079
- return Fragment7.from(result);
23396
+ return Fragment8.from(result);
22080
23397
  }
22081
23398
  return fragment;
22082
23399
  }
22083
23400
  function withWrappers(node, wrap2, from2 = 0) {
22084
23401
  for (let i = wrap2.length - 1; i >= from2; i--)
22085
- node = wrap2[i].create(null, Fragment7.from(node));
23402
+ node = wrap2[i].create(null, Fragment8.from(node));
22086
23403
  return node;
22087
23404
  }
22088
23405
  function addToSibling(wrap2, lastWrap, node, sibling, depth) {
@@ -22092,14 +23409,14 @@ function addToSibling(wrap2, lastWrap, node, sibling, depth) {
22092
23409
  return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));
22093
23410
  let match = sibling.contentMatchAt(sibling.childCount);
22094
23411
  if (match.matchType(depth == wrap2.length - 1 ? node.type : wrap2[depth + 1]))
22095
- return sibling.copy(sibling.content.append(Fragment7.from(withWrappers(node, wrap2, depth + 1))));
23412
+ return sibling.copy(sibling.content.append(Fragment8.from(withWrappers(node, wrap2, depth + 1))));
22096
23413
  }
22097
23414
  }
22098
23415
  function closeRight(node, depth) {
22099
23416
  if (depth == 0)
22100
23417
  return node;
22101
23418
  let fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));
22102
- let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment7.empty, true);
23419
+ let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment8.empty, true);
22103
23420
  return node.copy(fragment.append(fill));
22104
23421
  }
22105
23422
  function closeRange(fragment, side, from2, to, depth, openEnd) {
@@ -22109,7 +23426,7 @@ function closeRange(fragment, side, from2, to, depth, openEnd) {
22109
23426
  if (depth < to - 1)
22110
23427
  inner = closeRange(inner, side, from2, to, depth + 1, openEnd);
22111
23428
  if (depth >= from2)
22112
- inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment7.empty, true));
23429
+ inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment8.empty, true));
22113
23430
  return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));
22114
23431
  }
22115
23432
  function closeSlice(slice2, openStart, openEnd) {
@@ -22179,7 +23496,7 @@ function addContext(slice2, context) {
22179
23496
  let type = schema.nodes[array[i]];
22180
23497
  if (!type || type.hasRequiredAttrs())
22181
23498
  break;
22182
- content = Fragment7.from(type.create(array[i + 1], content));
23499
+ content = Fragment8.from(type.create(array[i + 1], content));
22183
23500
  openStart++;
22184
23501
  openEnd++;
22185
23502
  }
@@ -24040,7 +25357,7 @@ function isMarkChange(cur, prev) {
24040
25357
  let updated = [];
24041
25358
  for (let i = 0; i < prev.childCount; i++)
24042
25359
  updated.push(update(prev.child(i)));
24043
- if (Fragment7.from(updated).eq(cur))
25360
+ if (Fragment8.from(updated).eq(cur))
24044
25361
  return { mark, type };
24045
25362
  }
24046
25363
  function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
@@ -25150,10 +26467,10 @@ function deleteBarrier(state, $cut, dispatch2, dir) {
25150
26467
  let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1);
25151
26468
  if (canDelAfter && (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match.matchType(conn[0] || after.type).validEnd) {
25152
26469
  if (dispatch2) {
25153
- let end = $cut.pos + after.nodeSize, wrap2 = Fragment7.empty;
26470
+ let end = $cut.pos + after.nodeSize, wrap2 = Fragment8.empty;
25154
26471
  for (let i = conn.length - 1; i >= 0; i--)
25155
- wrap2 = Fragment7.from(conn[i].create(null, wrap2));
25156
- wrap2 = Fragment7.from(before.copy(wrap2));
26472
+ wrap2 = Fragment8.from(conn[i].create(null, wrap2));
26473
+ wrap2 = Fragment8.from(before.copy(wrap2));
25157
26474
  let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap2, 1, 0), conn.length, true));
25158
26475
  let $joinAt = tr2.doc.resolve(end + 2 * conn.length);
25159
26476
  if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && canJoin(tr2.doc, $joinAt.pos))
@@ -25182,9 +26499,9 @@ function deleteBarrier(state, $cut, dispatch2, dir) {
25182
26499
  afterDepth++;
25183
26500
  if (at.canReplace(at.childCount, at.childCount, afterText.content)) {
25184
26501
  if (dispatch2) {
25185
- let end = Fragment7.empty;
26502
+ let end = Fragment8.empty;
25186
26503
  for (let i = wrap2.length - 1; i >= 0; i--)
25187
- end = Fragment7.from(wrap2[i].copy(end));
26504
+ end = Fragment8.from(wrap2[i].copy(end));
25188
26505
  let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap2.length, 0), 0, true));
25189
26506
  dispatch2(tr2.scrollIntoView());
25190
26507
  }
@@ -25289,9 +26606,9 @@ function wrapRangeInList(tr2, range, listType, attrs = null) {
25289
26606
  return true;
25290
26607
  }
25291
26608
  function doWrapInList(tr2, range, wrappers, joinBefore, listType) {
25292
- let content = Fragment7.empty;
26609
+ let content = Fragment8.empty;
25293
26610
  for (let i = wrappers.length - 1; i >= 0; i--)
25294
- content = Fragment7.from(wrappers[i].type.create(wrappers[i].attrs, content));
26611
+ content = Fragment8.from(wrappers[i].type.create(wrappers[i].attrs, content));
25295
26612
  tr2.step(new ReplaceAroundStep(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new Slice(content, 0, 0), wrappers.length, true));
25296
26613
  let found2 = 0;
25297
26614
  for (let i = 0; i < wrappers.length; i++)
@@ -25325,7 +26642,7 @@ function liftListItem(itemType) {
25325
26642
  function liftToOuterList(state, dispatch2, itemType, range) {
25326
26643
  let tr2 = state.tr, end = range.end, endOfList = range.$to.end(range.depth);
25327
26644
  if (end < endOfList) {
25328
- tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice(Fragment7.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
26645
+ tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice(Fragment8.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
25329
26646
  range = new NodeRange(tr2.doc.resolve(range.$from.pos), tr2.doc.resolve(endOfList), range.depth);
25330
26647
  }
25331
26648
  const target = liftTarget(range);
@@ -25349,10 +26666,10 @@ function liftOutOfList(state, dispatch2, range) {
25349
26666
  return false;
25350
26667
  let atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;
25351
26668
  let parent = $start.node(-1), indexBefore = $start.index(-1);
25352
- if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment7.empty : Fragment7.from(list))))
26669
+ if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment8.empty : Fragment8.from(list))))
25353
26670
  return false;
25354
26671
  let start = $start.pos, end = start + item.nodeSize;
25355
- tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice((atStart ? Fragment7.empty : Fragment7.from(list.copy(Fragment7.empty))).append(atEnd ? Fragment7.empty : Fragment7.from(list.copy(Fragment7.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
26672
+ tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice((atStart ? Fragment8.empty : Fragment8.from(list.copy(Fragment8.empty))).append(atEnd ? Fragment8.empty : Fragment8.from(list.copy(Fragment8.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
25356
26673
  dispatch2(tr2.scrollIntoView());
25357
26674
  return true;
25358
26675
  }
@@ -25370,8 +26687,8 @@ function sinkListItem(itemType) {
25370
26687
  return false;
25371
26688
  if (dispatch2) {
25372
26689
  let nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;
25373
- let inner = Fragment7.from(nestedBefore ? itemType.create() : null);
25374
- let slice2 = new Slice(Fragment7.from(itemType.create(null, Fragment7.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
26690
+ let inner = Fragment8.from(nestedBefore ? itemType.create() : null);
26691
+ let slice2 = new Slice(Fragment8.from(itemType.create(null, Fragment8.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
25375
26692
  let before = range.start, after = range.end;
25376
26693
  dispatch2(state.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice2, 1, true)).scrollIntoView());
25377
26694
  }
@@ -25589,7 +26906,7 @@ function elementFromString(value) {
25589
26906
  return removeWhitespaces(html);
25590
26907
  }
25591
26908
  function createNodeFromContent(content, schema, options) {
25592
- if (content instanceof Node2 || content instanceof Fragment7) {
26909
+ if (content instanceof Node2 || content instanceof Fragment8) {
25593
26910
  return content;
25594
26911
  }
25595
26912
  options = {
@@ -25603,7 +26920,7 @@ function createNodeFromContent(content, schema, options) {
25603
26920
  try {
25604
26921
  const isArrayContent = Array.isArray(content) && content.length > 0;
25605
26922
  if (isArrayContent) {
25606
- return Fragment7.fromArray(content.map((item) => schema.nodeFromJSON(item)));
26923
+ return Fragment8.fromArray(content.map((item) => schema.nodeFromJSON(item)));
25607
26924
  }
25608
26925
  const node = schema.nodeFromJSON(content);
25609
26926
  if (options.errorOnInvalidContent) {
@@ -26737,7 +28054,7 @@ function inputRulesPlugin(props) {
26737
28054
  if (typeof text === "string") {
26738
28055
  text = text;
26739
28056
  } else {
26740
- text = getHTMLFromFragment(Fragment7.from(text), state.schema);
28057
+ text = getHTMLFromFragment(Fragment8.from(text), state.schema);
26741
28058
  }
26742
28059
  const { from: from2 } = simulatedInputMeta;
26743
28060
  const to = from2 + text.length;
@@ -27115,7 +28432,7 @@ function pasteRulesPlugin(props) {
27115
28432
  if (typeof text === "string") {
27116
28433
  text = text;
27117
28434
  } else {
27118
- text = getHTMLFromFragment(Fragment7.from(text), state.schema);
28435
+ text = getHTMLFromFragment(Fragment8.from(text), state.schema);
27119
28436
  }
27120
28437
  const { from: from22 } = simulatedPasteMeta;
27121
28438
  const to2 = from22 + text.length;
@@ -27773,7 +29090,7 @@ var insertContentAt = (position, value, options) => ({ tr: tr2, dispatch: dispat
27773
29090
  if (isOnlyTextContent) {
27774
29091
  if (Array.isArray(value)) {
27775
29092
  newContent = value.map((v) => v.text || "").join("");
27776
- } else if (value instanceof Fragment7) {
29093
+ } else if (value instanceof Fragment8) {
27777
29094
  let text = "";
27778
29095
  value.forEach((node) => {
27779
29096
  if (node.text) {
@@ -28240,10 +29557,10 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
28240
29557
  return false;
28241
29558
  }
28242
29559
  if (dispatch2) {
28243
- let wrap2 = Fragment7.empty;
29560
+ let wrap2 = Fragment8.empty;
28244
29561
  const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;
28245
29562
  for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) {
28246
- wrap2 = Fragment7.from($from.node(d).copy(wrap2));
29563
+ wrap2 = Fragment8.from($from.node(d).copy(wrap2));
28247
29564
  }
28248
29565
  const depthAfter = (
28249
29566
  // eslint-disable-next-line no-nested-ternary
@@ -28254,7 +29571,7 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
28254
29571
  ...overrideAttrs
28255
29572
  };
28256
29573
  const nextType2 = ((_a = type.contentMatch.defaultType) == null ? void 0 : _a.createAndFill(newNextTypeAttributes2)) || void 0;
28257
- wrap2 = wrap2.append(Fragment7.from(type.createAndFill(null, nextType2) || void 0));
29574
+ wrap2 = wrap2.append(Fragment8.from(type.createAndFill(null, nextType2) || void 0));
28258
29575
  const start = $from.before($from.depth - (depthBefore - 1));
28259
29576
  tr2.replace(start, $from.after(-depthAfter), new Slice(wrap2, 4 - depthBefore, 0));
28260
29577
  let sel = -1;
@@ -29885,7 +31202,7 @@ function markPasteRule(config) {
29885
31202
  }
29886
31203
 
29887
31204
  // ../../node_modules/@tiptap/react/dist/index.js
29888
- var import_react19 = __toESM(require_react(), 1);
31205
+ var import_react20 = __toESM(require_react(), 1);
29889
31206
  var mergeRefs = (...refs) => {
29890
31207
  return (node) => {
29891
31208
  refs.forEach((ref) => {
@@ -30104,7 +31421,7 @@ function useEditorState(options) {
30104
31421
  editorStateManager.getSnapshot,
30105
31422
  editorStateManager.getServerSnapshot,
30106
31423
  options.selector,
30107
- (_a = options.equalityFn) != null ? _a : import_react19.default
31424
+ (_a = options.equalityFn) != null ? _a : import_react20.default
30108
31425
  );
30109
31426
  useIsomorphicLayoutEffect(() => {
30110
31427
  return editorStateManager.watch(options.editor);
@@ -30383,11 +31700,11 @@ var ReactNodeViewContext = createContext({
30383
31700
  var useReactNodeView = () => useContext(ReactNodeViewContext);
30384
31701
  t__default.forwardRef((props, ref) => {
30385
31702
  const { onDragStart } = useReactNodeView();
30386
- const Tag4 = props.as || "div";
31703
+ const Tag6 = props.as || "div";
30387
31704
  return (
30388
31705
  // @ts-ignore
30389
31706
  /* @__PURE__ */ jsx(
30390
- Tag4,
31707
+ Tag6,
30391
31708
  {
30392
31709
  ...props,
30393
31710
  ref,
@@ -30472,7 +31789,7 @@ var starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;
30472
31789
  var starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;
30473
31790
  var underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;
30474
31791
  var underscorePasteRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g;
30475
- var Bold = Mark2.create({
31792
+ var Bold2 = Mark2.create({
30476
31793
  name: "bold",
30477
31794
  addOptions() {
30478
31795
  return {
@@ -30549,7 +31866,7 @@ var Bold = Mark2.create({
30549
31866
  // ../../node_modules/@tiptap/extension-code/dist/index.js
30550
31867
  var inputRegex2 = /(^|[^`])`([^`]+)`(?!`)/;
30551
31868
  var pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;
30552
- var Code = Mark2.create({
31869
+ var Code2 = Mark2.create({
30553
31870
  name: "code",
30554
31871
  addOptions() {
30555
31872
  return {
@@ -30998,7 +32315,7 @@ var starInputRegex2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;
30998
32315
  var starPasteRegex2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;
30999
32316
  var underscoreInputRegex2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;
31000
32317
  var underscorePasteRegex2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g;
31001
- var Italic = Mark2.create({
32318
+ var Italic2 = Mark2.create({
31002
32319
  name: "italic",
31003
32320
  addOptions() {
31004
32321
  return {
@@ -32404,7 +33721,7 @@ function isAllowedUri(uri, protocols) {
32404
33721
  )
32405
33722
  );
32406
33723
  }
32407
- var Link = Mark2.create({
33724
+ var Link3 = Mark2.create({
32408
33725
  name: "link",
32409
33726
  priority: 1e3,
32410
33727
  keepOnSplit: false,
@@ -32598,7 +33915,7 @@ var Link = Mark2.create({
32598
33915
  return plugins;
32599
33916
  }
32600
33917
  });
32601
- var index_default2 = Link;
33918
+ var index_default2 = Link3;
32602
33919
 
32603
33920
  // ../../node_modules/@tiptap/extension-list/dist/index.js
32604
33921
  var __defProp3 = Object.defineProperty;
@@ -33327,7 +34644,7 @@ var Text2 = Node3.create({
33327
34644
  });
33328
34645
 
33329
34646
  // ../../node_modules/@tiptap/extension-underline/dist/index.js
33330
- var Underline = Mark2.create({
34647
+ var Underline2 = Mark2.create({
33331
34648
  name: "underline",
33332
34649
  addOptions() {
33333
34650
  return {
@@ -33369,7 +34686,7 @@ var Underline = Mark2.create({
33369
34686
  };
33370
34687
  }
33371
34688
  });
33372
- var index_default3 = Underline;
34689
+ var index_default3 = Underline2;
33373
34690
 
33374
34691
  // ../../node_modules/prosemirror-dropcursor/dist/index.js
33375
34692
  function dropCursor(options = {}) {
@@ -33700,9 +35017,9 @@ function beforeinput(view, event) {
33700
35017
  let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);
33701
35018
  if (!insert)
33702
35019
  return false;
33703
- let frag = Fragment7.empty;
35020
+ let frag = Fragment8.empty;
33704
35021
  for (let i = insert.length - 1; i >= 0; i--)
33705
- frag = Fragment7.from(insert[i].createAndFill(null, frag));
35022
+ frag = Fragment8.from(insert[i].createAndFill(null, frag));
33706
35023
  let tr2 = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0));
33707
35024
  tr2.setSelection(TextSelection.near(tr2.doc.resolve($from.pos + 1)));
33708
35025
  view.dispatch(tr2);
@@ -34609,7 +35926,7 @@ var StarterKit = Extension.create({
34609
35926
  var _a, _b, _c, _d;
34610
35927
  const extensions = [];
34611
35928
  if (this.options.bold !== false) {
34612
- extensions.push(Bold.configure(this.options.bold));
35929
+ extensions.push(Bold2.configure(this.options.bold));
34613
35930
  }
34614
35931
  if (this.options.blockquote !== false) {
34615
35932
  extensions.push(Blockquote.configure(this.options.blockquote));
@@ -34618,7 +35935,7 @@ var StarterKit = Extension.create({
34618
35935
  extensions.push(BulletList.configure(this.options.bulletList));
34619
35936
  }
34620
35937
  if (this.options.code !== false) {
34621
- extensions.push(Code.configure(this.options.code));
35938
+ extensions.push(Code2.configure(this.options.code));
34622
35939
  }
34623
35940
  if (this.options.codeBlock !== false) {
34624
35941
  extensions.push(CodeBlock.configure(this.options.codeBlock));
@@ -34645,7 +35962,7 @@ var StarterKit = Extension.create({
34645
35962
  extensions.push(HorizontalRule.configure(this.options.horizontalRule));
34646
35963
  }
34647
35964
  if (this.options.italic !== false) {
34648
- extensions.push(Italic.configure(this.options.italic));
35965
+ extensions.push(Italic2.configure(this.options.italic));
34649
35966
  }
34650
35967
  if (this.options.listItem !== false) {
34651
35968
  extensions.push(ListItem.configure(this.options.listItem));
@@ -34654,7 +35971,7 @@ var StarterKit = Extension.create({
34654
35971
  extensions.push(ListKeymap.configure((_a = this.options) == null ? void 0 : _a.listKeymap));
34655
35972
  }
34656
35973
  if (this.options.link !== false) {
34657
- extensions.push(Link.configure((_b = this.options) == null ? void 0 : _b.link));
35974
+ extensions.push(Link3.configure((_b = this.options) == null ? void 0 : _b.link));
34658
35975
  }
34659
35976
  if (this.options.orderedList !== false) {
34660
35977
  extensions.push(OrderedList.configure(this.options.orderedList));
@@ -34669,7 +35986,7 @@ var StarterKit = Extension.create({
34669
35986
  extensions.push(Text2.configure(this.options.text));
34670
35987
  }
34671
35988
  if (this.options.underline !== false) {
34672
- extensions.push(Underline.configure((_c = this.options) == null ? void 0 : _c.underline));
35989
+ extensions.push(Underline2.configure((_c = this.options) == null ? void 0 : _c.underline));
34673
35990
  }
34674
35991
  if (this.options.trailingNode !== false) {
34675
35992
  extensions.push(TrailingNode.configure((_d = this.options) == null ? void 0 : _d.trailingNode));
@@ -35382,10 +36699,10 @@ var CellSelection = class _CellSelection extends Selection {
35382
36699
  }
35383
36700
  rowContent.push(cell);
35384
36701
  }
35385
- rows.push(table.child(row).copy(Fragment7.from(rowContent)));
36702
+ rows.push(table.child(row).copy(Fragment8.from(rowContent)));
35386
36703
  }
35387
36704
  const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
35388
- return new Slice(Fragment7.from(fragment), 1, 1);
36705
+ return new Slice(Fragment8.from(fragment), 1, 1);
35389
36706
  }
35390
36707
  replace(tr2, content = Slice.empty) {
35391
36708
  const mapFrom = tr2.steps.length, ranges = this.ranges;
@@ -35405,7 +36722,7 @@ var CellSelection = class _CellSelection extends Selection {
35405
36722
  tr2.setSelection(sel);
35406
36723
  }
35407
36724
  replaceWith(tr2, node) {
35408
- this.replace(tr2, new Slice(Fragment7.from(node), 0, 0));
36725
+ this.replace(tr2, new Slice(Fragment8.from(node), 0, 0));
35409
36726
  }
35410
36727
  forEachCell(f) {
35411
36728
  const table = this.$anchorCell.node(-1);
@@ -35953,7 +37270,7 @@ function mergeCells(state, dispatch2) {
35953
37270
  if (dispatch2) {
35954
37271
  const tr2 = state.tr;
35955
37272
  const seen = {};
35956
- let content = Fragment7.empty;
37273
+ let content = Fragment8.empty;
35957
37274
  let mergedPos;
35958
37275
  let mergedCell;
35959
37276
  for (let row = rect.top; row < rect.bottom; row++) {
@@ -36334,14 +37651,14 @@ function ensureRectangular(schema, rows) {
36334
37651
  width = Math.max(width, widths[r2]);
36335
37652
  for (let r2 = 0; r2 < widths.length; r2++) {
36336
37653
  if (r2 >= rows.length)
36337
- rows.push(Fragment7.empty);
37654
+ rows.push(Fragment8.empty);
36338
37655
  if (widths[r2] < width) {
36339
37656
  const empty2 = tableNodeTypes(schema).cell.createAndFill();
36340
37657
  const cells = [];
36341
37658
  for (let i = widths[r2]; i < width; i++) {
36342
37659
  cells.push(empty2);
36343
37660
  }
36344
- rows[r2] = rows[r2].append(Fragment7.from(cells));
37661
+ rows[r2] = rows[r2].append(Fragment8.from(cells));
36345
37662
  }
36346
37663
  }
36347
37664
  return { height: rows.length, width, rows };
@@ -36373,7 +37690,7 @@ function clipCells({ width, height, rows }, newWidth, newHeight) {
36373
37690
  for (let j = 1; j < cell.attrs.rowspan; j++)
36374
37691
  added[row + j] = (added[row + j] || 0) + cell.attrs.colspan;
36375
37692
  }
36376
- newRows.push(Fragment7.from(cells));
37693
+ newRows.push(Fragment8.from(cells));
36377
37694
  }
36378
37695
  rows = newRows;
36379
37696
  width = newWidth;
@@ -36394,7 +37711,7 @@ function clipCells({ width, height, rows }, newWidth, newHeight) {
36394
37711
  );
36395
37712
  cells.push(cell);
36396
37713
  }
36397
- newRows.push(Fragment7.from(cells));
37714
+ newRows.push(Fragment8.from(cells));
36398
37715
  }
36399
37716
  rows = newRows;
36400
37717
  height = newHeight;
@@ -36429,7 +37746,7 @@ function growTable(tr2, map2, table, start, width, height, mapFrom) {
36429
37746
  header ? emptyHead || (emptyHead = types.header_cell.createAndFill()) : empty2 || (empty2 = types.cell.createAndFill())
36430
37747
  );
36431
37748
  }
36432
- const emptyRow = types.row.create(null, Fragment7.from(cells)), rows = [];
37749
+ const emptyRow = types.row.create(null, Fragment8.from(cells)), rows = [];
36433
37750
  for (let i = map2.height; i < height; i++)
36434
37751
  rows.push(emptyRow);
36435
37752
  tr2.insert(tr2.mapping.slice(mapFrom).map(start + table.nodeSize - 2), rows);
@@ -36638,7 +37955,7 @@ function handlePaste(view, _, slice2) {
36638
37955
  width: 1,
36639
37956
  height: 1,
36640
37957
  rows: [
36641
- Fragment7.from(
37958
+ Fragment8.from(
36642
37959
  fitSlice(tableNodeTypes(view.state.schema).cell, slice2)
36643
37960
  )
36644
37961
  ]
@@ -53011,7 +54328,7 @@ function RichTextEditor({
53011
54328
  onClick: () => editor.chain().focus().toggleBold().run(),
53012
54329
  tooltip: "Bold (Cmd+B)",
53013
54330
  disabled: isSourceView,
53014
- children: /* @__PURE__ */ jsx(Bold$1, { className: "w-4 h-4" })
54331
+ children: /* @__PURE__ */ jsx(Bold, { className: "w-4 h-4" })
53015
54332
  }
53016
54333
  ),
53017
54334
  features.italic && /* @__PURE__ */ jsx(
@@ -53021,7 +54338,7 @@ function RichTextEditor({
53021
54338
  onClick: () => editor.chain().focus().toggleItalic().run(),
53022
54339
  tooltip: "Italic (Cmd+I)",
53023
54340
  disabled: isSourceView,
53024
- children: /* @__PURE__ */ jsx(Italic$1, { className: "w-4 h-4" })
54341
+ children: /* @__PURE__ */ jsx(Italic, { className: "w-4 h-4" })
53025
54342
  }
53026
54343
  ),
53027
54344
  features.underline && /* @__PURE__ */ jsx(
@@ -53031,7 +54348,7 @@ function RichTextEditor({
53031
54348
  onClick: () => editor.chain().focus().toggleUnderline().run(),
53032
54349
  tooltip: "Underline (Cmd+U)",
53033
54350
  disabled: isSourceView,
53034
- children: /* @__PURE__ */ jsx(Underline$1, { className: "w-4 h-4" })
54351
+ children: /* @__PURE__ */ jsx(Underline, { className: "w-4 h-4" })
53035
54352
  }
53036
54353
  ),
53037
54354
  features.strike && /* @__PURE__ */ jsx(
@@ -53051,7 +54368,7 @@ function RichTextEditor({
53051
54368
  onClick: () => editor.chain().focus().toggleCode().run(),
53052
54369
  tooltip: "Inline code",
53053
54370
  disabled: isSourceView,
53054
- children: /* @__PURE__ */ jsx(Code$1, { className: "w-4 h-4" })
54371
+ children: /* @__PURE__ */ jsx(Code, { className: "w-4 h-4" })
53055
54372
  }
53056
54373
  )
53057
54374
  ] }),
@@ -55775,9 +57092,9 @@ function AdvancedChart({
55775
57092
  toggleSeriesVisibility(entry.dataKey);
55776
57093
  }
55777
57094
  };
55778
- const handleExport = (format6) => {
57095
+ const handleExport = (format7) => {
55779
57096
  if (onExport) {
55780
- onExport(format6);
57097
+ onExport(format7);
55781
57098
  }
55782
57099
  };
55783
57100
  const handleZoom = (direction) => {
@@ -59973,7 +61290,7 @@ var OptimizedImageInternal = ({
59973
61290
  width,
59974
61291
  height,
59975
61292
  quality = 75,
59976
- format: format6 = "auto",
61293
+ format: format7 = "auto",
59977
61294
  lazy = true,
59978
61295
  blur: blur2 = true,
59979
61296
  priority = false,
@@ -60012,7 +61329,7 @@ var OptimizedImageInternal = ({
60012
61329
  params.set("f", options.format);
60013
61330
  return optimizedUrl;
60014
61331
  };
60015
- const optimizedSrc = getOptimizedSrc(src, { width, height, quality, format: format6 });
61332
+ const optimizedSrc = getOptimizedSrc(src, { width, height, quality, format: format7 });
60016
61333
  const handleImageLoad = () => {
60017
61334
  setIsLoaded(true);
60018
61335
  setIsLoading(false);
@@ -60176,7 +61493,7 @@ var OptimizedImageInternal = ({
60176
61493
  ] }),
60177
61494
  /* @__PURE__ */ jsxs("div", { children: [
60178
61495
  "Format: ",
60179
- format6
61496
+ format7
60180
61497
  ] })
60181
61498
  ]
60182
61499
  }
@@ -63056,11 +64373,11 @@ function downloadFile(content, filename, mimeType) {
63056
64373
  URL.revokeObjectURL(url);
63057
64374
  }
63058
64375
  async function exportData(data, options) {
63059
- const { format: format6, filename = "data-export", columns, includeHeaders = true } = options;
64376
+ const { format: format7, filename = "data-export", columns, includeHeaders = true } = options;
63060
64377
  let content;
63061
64378
  let mimeType;
63062
64379
  let extension;
63063
- switch (format6) {
64380
+ switch (format7) {
63064
64381
  case "csv":
63065
64382
  content = dataToCSV(data, columns, includeHeaders);
63066
64383
  mimeType = "text/csv;charset=utf-8;";
@@ -63074,7 +64391,7 @@ async function exportData(data, options) {
63074
64391
  case "xlsx":
63075
64392
  throw new Error("XLSX export requires additional dependencies. Use CSV format instead.");
63076
64393
  default:
63077
- throw new Error(`Unsupported export format: ${format6}`);
64394
+ throw new Error(`Unsupported export format: ${format7}`);
63078
64395
  }
63079
64396
  const finalFilename = `${filename}-${( new Date()).toISOString().split("T")[0]}.${extension}`;
63080
64397
  downloadFile(content, finalFilename, mimeType);
@@ -63557,11 +64874,11 @@ function DataTable({
63557
64874
  rowSelection: features.rowSelection !== false || selectable,
63558
64875
  export: features.export !== false || exportable
63559
64876
  });
63560
- const handleExport = async (format6) => {
64877
+ const handleExport = async (format7) => {
63561
64878
  const selectedRows = table.getFilteredSelectedRowModel().rows;
63562
64879
  const dataToExport = selectedRows.length > 0 ? selectedRows.map((row) => row.original) : table.getFilteredRowModel().rows.map((row) => row.original);
63563
64880
  if (typeof exportable === "object" && exportable.onExport) {
63564
- exportable.onExport(dataToExport, format6);
64881
+ exportable.onExport(dataToExport, format7);
63565
64882
  return;
63566
64883
  }
63567
64884
  if (onExport) {
@@ -63571,7 +64888,7 @@ function DataTable({
63571
64888
  const filename = typeof exportable === "object" && exportable.filename ? exportable.filename : "data-export";
63572
64889
  const visibleColumns = getVisibleColumns(columns, columnVisibility);
63573
64890
  await exportData(dataToExport, {
63574
- format: format6,
64891
+ format: format7,
63575
64892
  filename,
63576
64893
  columns: visibleColumns,
63577
64894
  includeHeaders: true
@@ -63982,7 +65299,7 @@ var SearchInput = t__default.memo(({
63982
65299
  ] })
63983
65300
  ] }) });
63984
65301
  });
63985
- function Sidebar({
65302
+ function Sidebar2({
63986
65303
  sections,
63987
65304
  footer,
63988
65305
  showSearch = true,
@@ -65503,18 +66820,18 @@ var countries = [
65503
66820
  { code: "NO", name: "Norway", dialCode: "+47", flag: "\u{1F1F3}\u{1F1F4}", format: "xxx xx xxx" },
65504
66821
  { code: "FI", name: "Finland", dialCode: "+358", flag: "\u{1F1EB}\u{1F1EE}", format: "xx xxxxxxx" }
65505
66822
  ];
65506
- function formatPhoneNumber(number, format6) {
65507
- if (!number || !format6)
66823
+ function formatPhoneNumber(number, format7) {
66824
+ if (!number || !format7)
65508
66825
  return "";
65509
66826
  const cleaned = number.replace(/\D/g, "");
65510
66827
  let formatted = "";
65511
66828
  let digitIndex = 0;
65512
- for (let i = 0; i < format6.length && digitIndex < cleaned.length; i++) {
65513
- if (format6[i] === "x") {
66829
+ for (let i = 0; i < format7.length && digitIndex < cleaned.length; i++) {
66830
+ if (format7[i] === "x") {
65514
66831
  formatted += cleaned[digitIndex];
65515
66832
  digitIndex++;
65516
66833
  } else {
65517
- formatted += format6[i];
66834
+ formatted += format7[i];
65518
66835
  }
65519
66836
  }
65520
66837
  return formatted;
@@ -67233,4 +68550,4 @@ var BadgePro = t__default.forwardRef(({
67233
68550
  });
67234
68551
  BadgePro.displayName = "BadgePro";
67235
68552
 
67236
- export { MoonUIAccordionPro as Accordion, MoonUIAccordionContentPro as AccordionContent, MoonUIAccordionItemPro as AccordionItem, MoonUIAccordionTriggerPro as AccordionTrigger, Calendar3 as AdvancedCalendar, AdvancedChart, AdvancedForms, MoonUIAlertPro as Alert, MoonUIAlertDescriptionPro as AlertDescription, MoonUIAlertTitlePro as AlertTitle, AnimatedButton, MoonUIAspectRatioPro as AspectRatio, MoonUIAvatarPro as Avatar, MoonUIAvatarFallbackPro as AvatarFallback, MoonUIAvatarImagePro as AvatarImage, MoonUIBadgePro as Badge, MoonUIBreadcrumbPro as Breadcrumb, MoonUIBreadcrumbEllipsisPro as BreadcrumbEllipsis, MoonUIBreadcrumbItemPro as BreadcrumbItem, MoonUIBreadcrumbLinkPro as BreadcrumbLink, MoonUIBreadcrumbListPro as BreadcrumbList, MoonUIBreadcrumbPagePro as BreadcrumbPage, MoonUIBreadcrumbSeparatorPro as BreadcrumbSeparator, MoonUIButtonPro as Button, Calendar, MoonUICardPro as Card, MoonUICardContentPro as CardContent, MoonUICardDescriptionPro as CardDescription, MoonUICardFooterPro as CardFooter, MoonUICardHeaderPro as CardHeader, MoonUICardTitlePro as CardTitle, MoonUICheckboxPro as Checkbox, MoonUICollapsiblePro as Collapsible, MoonUICollapsibleContentPro as CollapsibleContent, MoonUICollapsibleTriggerPro as CollapsibleTrigger, MoonUIColorPickerPro as ColorPicker, MoonUICommandPro as Command, MoonUICommandDialogPro as CommandDialog, MoonUICommandEmptyPro as CommandEmpty, MoonUICommandGroupPro as CommandGroup, MoonUICommandInputPro as CommandInput, MoonUICommandItemPro as CommandItem, MoonUICommandListPro as CommandList, MoonUICommandSeparatorPro as CommandSeparator, MoonUICommandShortcutPro as CommandShortcut, Dashboard, DataTable, MoonUIDialogPro as Dialog, MoonUIDialogClosePro as DialogClose, MoonUIDialogContentPro as DialogContent, MoonUIDialogDescriptionPro as DialogDescription, MoonUIDialogFooterPro as DialogFooter, MoonUIDialogHeaderPro as DialogHeader, MoonUIDialogTitlePro as DialogTitle, MoonUIDialogTriggerPro as DialogTrigger, DraggableList, MoonUIDropdownMenuPro as DropdownMenu, MoonUIDropdownMenuCheckboxItemPro as DropdownMenuCheckboxItem, MoonUIDropdownMenuContentPro as DropdownMenuContent, MoonUIDropdownMenuGroupPro as DropdownMenuGroup, MoonUIDropdownMenuItemPro as DropdownMenuItem, MoonUIDropdownMenuLabelPro as DropdownMenuLabel, MoonUIDropdownMenuPortalPro as DropdownMenuPortal, MoonUIDropdownMenuRadioGroupPro as DropdownMenuRadioGroup, MoonUIDropdownMenuRadioItemPro as DropdownMenuRadioItem, MoonUIDropdownMenuSeparatorPro as DropdownMenuSeparator, MoonUIDropdownMenuShortcutPro as DropdownMenuShortcut, MoonUIDropdownMenuSubPro as DropdownMenuSub, MoonUIDropdownMenuSubContentPro as DropdownMenuSubContent, MoonUIDropdownMenuSubTriggerPro as DropdownMenuSubTrigger, MoonUIDropdownMenuTriggerPro as DropdownMenuTrigger, enhanced_exports as Enhanced, ErrorBoundary, FloatingActionButton, FormWizardNavigation, FormWizardProgress, FormWizardStep, GitHubStars, HealthCheck, HoverCard2 as HoverCard, HoverCard3D, HoverCardContent2 as HoverCardContent, HoverCardTrigger2 as HoverCardTrigger, MoonUIInputPro as Input, Kanban, MoonUILabelPro as Label, LazyComponent, LazyImage, LazyList, MagneticButton, MemoryAnalytics, MemoryEfficientData, MoonUIAccordionContentPro, MoonUIAccordionItemPro, MoonUIAccordionPro, MoonUIAccordionTriggerPro, MoonUIAlertDescriptionPro, MoonUIAlertPro, MoonUIAlertTitlePro, MoonUIAspectRatioPro, MoonUIAvatarFallbackPro, MoonUIAvatarImagePro, MoonUIAvatarPro, MoonUIBadgePro, MoonUIBreadcrumbEllipsisPro, MoonUIBreadcrumbItemPro, MoonUIBreadcrumbLinkPro, MoonUIBreadcrumbListPro, MoonUIBreadcrumbPagePro, MoonUIBreadcrumbPro, MoonUIBreadcrumbSeparatorPro, MoonUIButtonPro, MoonUICardContentPro, MoonUICardDescriptionPro, MoonUICardFooterPro, MoonUICardHeaderPro, MoonUICardPro, MoonUICardTitlePro, MoonUICheckboxPro, MoonUICollapsibleContentPro, MoonUICollapsiblePro, MoonUICollapsibleTriggerPro, MoonUIColorPickerPro, MoonUICommandDialogPro, MoonUICommandEmptyPro, MoonUICommandGroupPro, MoonUICommandInputPro, MoonUICommandItemPro, MoonUICommandListPro, MoonUICommandPro, MoonUICommandSeparatorPro, MoonUICommandShortcutPro, MoonUICreditCardInputPro, MoonUIDialogClosePro, MoonUIDialogContentPro, MoonUIDialogDescriptionPro, MoonUIDialogFooterPro, MoonUIDialogHeaderPro, MoonUIDialogPro, MoonUIDialogTitlePro, MoonUIDialogTriggerPro, MoonUIDropdownMenuCheckboxItemPro, MoonUIDropdownMenuContentPro, MoonUIDropdownMenuGroupPro, MoonUIDropdownMenuItemPro, MoonUIDropdownMenuLabelPro, MoonUIDropdownMenuPortalPro, MoonUIDropdownMenuPro, MoonUIDropdownMenuRadioGroupPro, MoonUIDropdownMenuRadioItemPro, MoonUIDropdownMenuSeparatorPro, MoonUIDropdownMenuShortcutPro, MoonUIDropdownMenuSubContentPro, MoonUIDropdownMenuSubPro, MoonUIDropdownMenuSubTriggerPro, MoonUIDropdownMenuTriggerPro, MoonUIFileUploadPro, MoonUIFormWizardPro, MoonUIInputPro, MoonUILabelPro, MoonUIPaginationContentPro, MoonUIPaginationEllipsisPro, MoonUIPaginationItemPro, MoonUIPaginationLinkPro, MoonUIPaginationNextPro, MoonUIPaginationPreviousPro, MoonUIPaginationPro, MoonUIPhoneNumberInputPro, MoonUIPopoverContentPro, MoonUIPopoverPro, MoonUIPopoverTriggerPro, MoonUIProgressPro, MoonUIQuizFormPro, MoonUIRadioGroupContextPro, MoonUIRadioGroupItemPro, MoonUIRadioGroupPro, MoonUIRadioItemWithLabelPro, MoonUIRadioLabelPro, MoonUISelectContentPro, MoonUISelectGroupPro, MoonUISelectItemPro, MoonUISelectLabelPro, MoonUISelectPro, MoonUISelectSeparatorPro, MoonUISelectTriggerPro, MoonUISelectValuePro, MoonUISeparatorPro, MoonUISkeletonPro, MoonUISliderPro, MoonUISwitchPro, MoonUITableBodyPro, MoonUITableCaptionPro, MoonUITableCellPro, MoonUITableFooterPro, MoonUITableHeadPro, MoonUITableHeaderPro, MoonUITablePro, MoonUITableRowPro, MoonUITabsContentPro, MoonUITabsListPro, MoonUITabsPro, MoonUITabsTriggerPro, MoonUITextareaPro, MoonUIToastPro, MoonUITogglePro, MoonUITooltipContentPro, MoonUITooltipPro, MoonUITooltipProviderPro, MoonUITooltipTriggerPro, MoonUIalertVariantsPro, MoonUIaspectRatioVariantsPro, MoonUIbreadcrumbVariantsPro, MoonUIcollapsibleContentVariantsPro, MoonUIcollapsibleTriggerVariantsPro, MoonUIcommandVariantsPro, MoonUIradioGroupItemVariantsPro, MoonUItableVariantsPro, MoonUItoggleVariantsPro, OptimizedImage, MoonUIPaginationPro as Pagination, MoonUIPaginationContentPro as PaginationContent, MoonUIPaginationEllipsisPro as PaginationEllipsis, MoonUIPaginationItemPro as PaginationItem, MoonUIPaginationLinkPro as PaginationLink, MoonUIPaginationNextPro as PaginationNext, MoonUIPaginationPreviousPro as PaginationPrevious, PerformanceDebugger, PerformanceMonitor, PinchZoom, MoonUIPopoverPro as Popover, MoonUIPopoverContentPro as PopoverContent, MoonUIPopoverTriggerPro as PopoverTrigger, MoonUIProgressPro as Progress, MoonUIRadioGroupPro as RadioGroup, MoonUIRadioGroupContextPro as RadioGroupContext, MoonUIRadioGroupItemPro as RadioGroupItem, MoonUIRadioItemWithLabelPro as RadioItemWithLabel, MoonUIRadioLabelPro as RadioLabel, RichTextEditor, ScrollArea, ScrollBar, MoonUISelectPro as Select, MoonUISelectContentPro as SelectContent, MoonUISelectGroupPro as SelectGroup, MoonUISelectItemPro as SelectItem, MoonUISelectLabelPro as SelectLabel, MoonUISelectSeparatorPro as SelectSeparator, MoonUISelectTriggerPro as SelectTrigger, MoonUISelectValuePro as SelectValue, SelectableVirtualList, MoonUISeparatorPro as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, MoonUISkeletonPro as Skeleton, MoonUISliderPro as Slider, SpotlightCard, SwipeableCard, MoonUISwitchPro as Switch, MoonUITablePro as Table, MoonUITableBodyPro as TableBody, MoonUITableCaptionPro as TableCaption, MoonUITableCellPro as TableCell, MoonUITableFooterPro as TableFooter, MoonUITableHeadPro as TableHead, MoonUITableHeaderPro as TableHeader, MoonUITableRowPro as TableRow, MoonUITabsPro as Tabs, MoonUITabsContentPro as TabsContent, MoonUITabsListPro as TabsList, MoonUITabsTriggerPro as TabsTrigger, MoonUITextareaPro as Textarea, Timeline, MoonUIToastPro as Toast, MoonUITogglePro as Toggle, MoonUITooltipPro as Tooltip, MoonUITooltipContentPro as TooltipContent, MoonUITooltipProviderPro as TooltipProvider, MoonUITooltipTriggerPro as TooltipTrigger, VirtualList, MoonUIalertVariantsPro as alertVariants, animatedButtonVariants, MoonUIaspectRatioVariantsPro as aspectRatioVariants, moonUIBadgeVariantsPro as badgeVariants, MoonUIbreadcrumbVariantsPro as breadcrumbVariants, moonUIButtonProVariants as buttonVariants, cn, MoonUIcollapsibleContentVariantsPro as collapsibleContentVariants, MoonUIcollapsibleTriggerVariantsPro as collapsibleTriggerVariants, MoonUIcommandVariantsPro as commandVariants, getExpandableColumn, moonUIBadgeVariantsPro, moonUIButtonProVariants, moonUISeparatorVariantsPro, countries as phoneCountries, MoonUIradioGroupItemVariantsPro as radioGroupItemVariants, moonUISeparatorVariantsPro as separatorVariants, MoonUItableVariantsPro as tableVariants, MoonUItoggleVariantsPro as toggleVariants, useExpandableRows, useFormWizard, useStreamingData, useVirtualList };
68553
+ export { MoonUIAccordionPro as Accordion, MoonUIAccordionContentPro as AccordionContent, MoonUIAccordionItemPro as AccordionItem, MoonUIAccordionTriggerPro as AccordionTrigger, Calendar3 as AdvancedCalendar, AdvancedChart, AdvancedForms, MoonUIAlertPro as Alert, MoonUIAlertDescriptionPro as AlertDescription, MoonUIAlertTitlePro as AlertTitle, AnimatedButton, MoonUIAspectRatioPro as AspectRatio, MoonUIAvatarPro as Avatar, MoonUIAvatarFallbackPro as AvatarFallback, MoonUIAvatarImagePro as AvatarImage, MoonUIBadgePro as Badge, MoonUIBreadcrumbPro as Breadcrumb, MoonUIBreadcrumbEllipsisPro as BreadcrumbEllipsis, MoonUIBreadcrumbItemPro as BreadcrumbItem, MoonUIBreadcrumbLinkPro as BreadcrumbLink, MoonUIBreadcrumbListPro as BreadcrumbList, MoonUIBreadcrumbPagePro as BreadcrumbPage, MoonUIBreadcrumbSeparatorPro as BreadcrumbSeparator, MoonUIButtonPro as Button, Calendar, CalendarPro, MoonUICardPro as Card, MoonUICardContentPro as CardContent, MoonUICardDescriptionPro as CardDescription, MoonUICardFooterPro as CardFooter, MoonUICardHeaderPro as CardHeader, MoonUICardTitlePro as CardTitle, MoonUICheckboxPro as Checkbox, MoonUICollapsiblePro as Collapsible, MoonUICollapsibleContentPro as CollapsibleContent, MoonUICollapsibleTriggerPro as CollapsibleTrigger, MoonUIColorPickerPro as ColorPicker, MoonUICommandPro as Command, MoonUICommandDialogPro as CommandDialog, MoonUICommandEmptyPro as CommandEmpty, MoonUICommandGroupPro as CommandGroup, MoonUICommandInputPro as CommandInput, MoonUICommandItemPro as CommandItem, MoonUICommandListPro as CommandList, MoonUICommandSeparatorPro as CommandSeparator, MoonUICommandShortcutPro as CommandShortcut, Dashboard, DataTable, MoonUIDialogPro as Dialog, MoonUIDialogClosePro as DialogClose, MoonUIDialogContentPro as DialogContent, MoonUIDialogDescriptionPro as DialogDescription, MoonUIDialogFooterPro as DialogFooter, MoonUIDialogHeaderPro as DialogHeader, MoonUIDialogTitlePro as DialogTitle, MoonUIDialogTriggerPro as DialogTrigger, DraggableList, MoonUIDropdownMenuPro as DropdownMenu, MoonUIDropdownMenuCheckboxItemPro as DropdownMenuCheckboxItem, MoonUIDropdownMenuContentPro as DropdownMenuContent, MoonUIDropdownMenuGroupPro as DropdownMenuGroup, MoonUIDropdownMenuItemPro as DropdownMenuItem, MoonUIDropdownMenuLabelPro as DropdownMenuLabel, MoonUIDropdownMenuPortalPro as DropdownMenuPortal, MoonUIDropdownMenuRadioGroupPro as DropdownMenuRadioGroup, MoonUIDropdownMenuRadioItemPro as DropdownMenuRadioItem, MoonUIDropdownMenuSeparatorPro as DropdownMenuSeparator, MoonUIDropdownMenuShortcutPro as DropdownMenuShortcut, MoonUIDropdownMenuSubPro as DropdownMenuSub, MoonUIDropdownMenuSubContentPro as DropdownMenuSubContent, MoonUIDropdownMenuSubTriggerPro as DropdownMenuSubTrigger, MoonUIDropdownMenuTriggerPro as DropdownMenuTrigger, enhanced_exports as Enhanced, ErrorBoundary, FloatingActionButton, FormWizardNavigation, FormWizardProgress, FormWizardStep, GitHubStars, HealthCheck, HoverCard2 as HoverCard, HoverCard3D, HoverCardContent2 as HoverCardContent, HoverCardTrigger2 as HoverCardTrigger, MoonUIInputPro as Input, Kanban, MoonUILabelPro as Label, LazyComponent, LazyImage, LazyList, MagneticButton, MemoryAnalytics, MemoryEfficientData, MoonUIAccordionContentPro, MoonUIAccordionItemPro, MoonUIAccordionPro, MoonUIAccordionTriggerPro, MoonUIAlertDescriptionPro, MoonUIAlertPro, MoonUIAlertTitlePro, MoonUIAspectRatioPro, MoonUIAvatarFallbackPro, MoonUIAvatarImagePro, MoonUIAvatarPro, MoonUIBadgePro, MoonUIBreadcrumbEllipsisPro, MoonUIBreadcrumbItemPro, MoonUIBreadcrumbLinkPro, MoonUIBreadcrumbListPro, MoonUIBreadcrumbPagePro, MoonUIBreadcrumbPro, MoonUIBreadcrumbSeparatorPro, MoonUIButtonPro, MoonUICardContentPro, MoonUICardDescriptionPro, MoonUICardFooterPro, MoonUICardHeaderPro, MoonUICardPro, MoonUICardTitlePro, MoonUICheckboxPro, MoonUICollapsibleContentPro, MoonUICollapsiblePro, MoonUICollapsibleTriggerPro, MoonUIColorPickerPro, MoonUICommandDialogPro, MoonUICommandEmptyPro, MoonUICommandGroupPro, MoonUICommandInputPro, MoonUICommandItemPro, MoonUICommandListPro, MoonUICommandPro, MoonUICommandSeparatorPro, MoonUICommandShortcutPro, MoonUICreditCardInputPro, MoonUIDialogClosePro, MoonUIDialogContentPro, MoonUIDialogDescriptionPro, MoonUIDialogFooterPro, MoonUIDialogHeaderPro, MoonUIDialogPro, MoonUIDialogTitlePro, MoonUIDialogTriggerPro, MoonUIDropdownMenuCheckboxItemPro, MoonUIDropdownMenuContentPro, MoonUIDropdownMenuGroupPro, MoonUIDropdownMenuItemPro, MoonUIDropdownMenuLabelPro, MoonUIDropdownMenuPortalPro, MoonUIDropdownMenuPro, MoonUIDropdownMenuRadioGroupPro, MoonUIDropdownMenuRadioItemPro, MoonUIDropdownMenuSeparatorPro, MoonUIDropdownMenuShortcutPro, MoonUIDropdownMenuSubContentPro, MoonUIDropdownMenuSubPro, MoonUIDropdownMenuSubTriggerPro, MoonUIDropdownMenuTriggerPro, MoonUIFileUploadPro, MoonUIFormWizardPro, MoonUIInputPro, MoonUILabelPro, MoonUIPaginationContentPro, MoonUIPaginationEllipsisPro, MoonUIPaginationItemPro, MoonUIPaginationLinkPro, MoonUIPaginationNextPro, MoonUIPaginationPreviousPro, MoonUIPaginationPro, MoonUIPhoneNumberInputPro, MoonUIPopoverContentPro, MoonUIPopoverPro, MoonUIPopoverTriggerPro, MoonUIProgressPro, MoonUIQuizFormPro, MoonUIRadioGroupContextPro, MoonUIRadioGroupItemPro, MoonUIRadioGroupPro, MoonUIRadioItemWithLabelPro, MoonUIRadioLabelPro, MoonUISelectContentPro, MoonUISelectGroupPro, MoonUISelectItemPro, MoonUISelectLabelPro, MoonUISelectPro, MoonUISelectSeparatorPro, MoonUISelectTriggerPro, MoonUISelectValuePro, MoonUISeparatorPro, MoonUISkeletonPro, MoonUISliderPro, MoonUISwitchPro, MoonUITableBodyPro, MoonUITableCaptionPro, MoonUITableCellPro, MoonUITableFooterPro, MoonUITableHeadPro, MoonUITableHeaderPro, MoonUITablePro, MoonUITableRowPro, MoonUITabsContentPro, MoonUITabsListPro, MoonUITabsPro, MoonUITabsTriggerPro, MoonUITextareaPro, MoonUIToastPro, MoonUITogglePro, MoonUITooltipContentPro, MoonUITooltipPro, MoonUITooltipProviderPro, MoonUITooltipTriggerPro, MoonUIalertVariantsPro, MoonUIaspectRatioVariantsPro, MoonUIbreadcrumbVariantsPro, MoonUIcollapsibleContentVariantsPro, MoonUIcollapsibleTriggerVariantsPro, MoonUIcommandVariantsPro, MoonUIradioGroupItemVariantsPro, MoonUItableVariantsPro, MoonUItoggleVariantsPro, OptimizedImage, MoonUIPaginationPro as Pagination, MoonUIPaginationContentPro as PaginationContent, MoonUIPaginationEllipsisPro as PaginationEllipsis, MoonUIPaginationItemPro as PaginationItem, MoonUIPaginationLinkPro as PaginationLink, MoonUIPaginationNextPro as PaginationNext, MoonUIPaginationPreviousPro as PaginationPrevious, PerformanceDebugger, PerformanceMonitor, PinchZoom, MoonUIPopoverPro as Popover, MoonUIPopoverContentPro as PopoverContent, MoonUIPopoverTriggerPro as PopoverTrigger, MoonUIProgressPro as Progress, MoonUIRadioGroupPro as RadioGroup, MoonUIRadioGroupContextPro as RadioGroupContext, MoonUIRadioGroupItemPro as RadioGroupItem, MoonUIRadioItemWithLabelPro as RadioItemWithLabel, MoonUIRadioLabelPro as RadioLabel, RichTextEditor, ScrollArea, ScrollBar, MoonUISelectPro as Select, MoonUISelectContentPro as SelectContent, MoonUISelectGroupPro as SelectGroup, MoonUISelectItemPro as SelectItem, MoonUISelectLabelPro as SelectLabel, MoonUISelectSeparatorPro as SelectSeparator, MoonUISelectTriggerPro as SelectTrigger, MoonUISelectValuePro as SelectValue, SelectableVirtualList, MoonUISeparatorPro as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar2 as Sidebar, MoonUISkeletonPro as Skeleton, MoonUISliderPro as Slider, SpotlightCard, SwipeableCard, MoonUISwitchPro as Switch, MoonUITablePro as Table, MoonUITableBodyPro as TableBody, MoonUITableCaptionPro as TableCaption, MoonUITableCellPro as TableCell, MoonUITableFooterPro as TableFooter, MoonUITableHeadPro as TableHead, MoonUITableHeaderPro as TableHeader, MoonUITableRowPro as TableRow, MoonUITabsPro as Tabs, MoonUITabsContentPro as TabsContent, MoonUITabsListPro as TabsList, MoonUITabsTriggerPro as TabsTrigger, MoonUITextareaPro as Textarea, Timeline, MoonUIToastPro as Toast, MoonUITogglePro as Toggle, MoonUITooltipPro as Tooltip, MoonUITooltipContentPro as TooltipContent, MoonUITooltipProviderPro as TooltipProvider, MoonUITooltipTriggerPro as TooltipTrigger, VirtualList, MoonUIalertVariantsPro as alertVariants, animatedButtonVariants, MoonUIaspectRatioVariantsPro as aspectRatioVariants, moonUIBadgeVariantsPro as badgeVariants, MoonUIbreadcrumbVariantsPro as breadcrumbVariants, moonUIButtonProVariants as buttonVariants, cn, MoonUIcollapsibleContentVariantsPro as collapsibleContentVariants, MoonUIcollapsibleTriggerVariantsPro as collapsibleTriggerVariants, MoonUIcommandVariantsPro as commandVariants, getExpandableColumn, moonUIBadgeVariantsPro, moonUIButtonProVariants, moonUISeparatorVariantsPro, countries as phoneCountries, MoonUIradioGroupItemVariantsPro as radioGroupItemVariants, moonUISeparatorVariantsPro as separatorVariants, MoonUItableVariantsPro as tableVariants, MoonUItoggleVariantsPro as toggleVariants, useExpandableRows, useFormWizard, useStreamingData, useVirtualList };