@underverse-ui/underverse 1.0.27 → 1.0.29
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/AGENTS.md +87 -0
- package/README.md +33 -0
- package/agent-recipes.json +42 -0
- package/api-reference.json +1499 -0
- package/dist/index.cjs +241 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +124 -27
- package/dist/index.js.map +1 -1
- package/llms.txt +49 -0
- package/package.json +10 -3
package/dist/index.d.cts
CHANGED
|
@@ -2306,6 +2306,8 @@ interface LoadingBarProps {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
declare const LoadingBar: React__default.FC<LoadingBarProps>;
|
|
2308
2308
|
|
|
2309
|
+
declare function OverlayScrollbarProvider(): null;
|
|
2310
|
+
|
|
2309
2311
|
type FilterType = "text" | "select" | "date";
|
|
2310
2312
|
type DataTableSize = "sm" | "md" | "lg";
|
|
2311
2313
|
type DataTableDensity = "compact" | "normal" | "comfortable";
|
|
@@ -3673,4 +3675,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
3673
3675
|
};
|
|
3674
3676
|
};
|
|
3675
3677
|
|
|
3676
|
-
export { AccessDenied, Alert, AreaChart, type AreaChartDataPoint, type AreaChartProps, type AreaChartSeries, Avatar, Badge, Badge as BadgeBase, BarChart, type BarChartDataPoint, type BarChartProps, type BarChartSeries, BatteryProgress, BottomSheet, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarProps, CalendarTimeline, type CalendarTimelineDateInput, type CalendarTimelineDayRangeMode, type CalendarTimelineEvent, type CalendarTimelineFormatters, type CalendarTimelineGroup, type CalendarTimelineInteractions, type CalendarTimelineLabels, type CalendarTimelineProps, type CalendarTimelineResource, type CalendarTimelineSize, type CalendarTimelineView, type CalendarTimelineVirtualization, Card, Carousel, CategoryTreeSelect, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxProps, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, FallingIcons, FileUpload, type FileUploadProps, FloatingContacts, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, GaugeChart, type GaugeChartProps, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, LineChart, type LineChartDataPoint, type LineChartProps, type LineChartSeries, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type Locale$1 as Locale, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NotificationBadge, NotificationModal, NumberInput, OverlayControls, PageLoading, Pagination, type PaginationProps, PasswordInput, PieChart, type PieChartDataPoint, type PieChartProps, PillTabs, Popover, Progress, PulseBadge, RadarChart, type RadarChartDataPoint, type RadarChartProps, type RadarChartSeries, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, SearchInput, Section, SegmentedProgress, SelectDropdown, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, Slider, SmartImage, type Song, type Sorter, Sparkline, type SparklineDataPoint, type SparklineProps, StatusBadge, StepProgress, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UEditor, type UEditorInlineUploadedItem, UEditorPrepareContentForSaveError, type UEditorPrepareContentForSaveOptions, type UEditorPrepareContentForSaveResult, type UEditorProps, type UEditorRef, type UEditorUploadImageForSave, type UEditorUploadImageForSaveResult, type UEditorVariant, type UnderverseLocale, UnderverseProvider, type UnderverseProviderProps, type UploadedFile, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VerticalTabs, Watermark, type WatermarkProps, cn$1 as cn, cn as cnLocal, extractImageSrcsFromHtml, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, normalizeImageUrl, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
|
|
3678
|
+
export { AccessDenied, Alert, AreaChart, type AreaChartDataPoint, type AreaChartProps, type AreaChartSeries, Avatar, Badge, Badge as BadgeBase, BarChart, type BarChartDataPoint, type BarChartProps, type BarChartSeries, BatteryProgress, BottomSheet, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarProps, CalendarTimeline, type CalendarTimelineDateInput, type CalendarTimelineDayRangeMode, type CalendarTimelineEvent, type CalendarTimelineFormatters, type CalendarTimelineGroup, type CalendarTimelineInteractions, type CalendarTimelineLabels, type CalendarTimelineProps, type CalendarTimelineResource, type CalendarTimelineSize, type CalendarTimelineView, type CalendarTimelineVirtualization, Card, Carousel, CategoryTreeSelect, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxProps, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, FallingIcons, FileUpload, type FileUploadProps, FloatingContacts, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, GaugeChart, type GaugeChartProps, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, LineChart, type LineChartDataPoint, type LineChartProps, type LineChartSeries, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type Locale$1 as Locale, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NotificationBadge, NotificationModal, NumberInput, OverlayControls, OverlayScrollbarProvider, PageLoading, Pagination, type PaginationProps, PasswordInput, PieChart, type PieChartDataPoint, type PieChartProps, PillTabs, Popover, Progress, PulseBadge, RadarChart, type RadarChartDataPoint, type RadarChartProps, type RadarChartSeries, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, SearchInput, Section, SegmentedProgress, SelectDropdown, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, Slider, SmartImage, type Song, type Sorter, Sparkline, type SparklineDataPoint, type SparklineProps, StatusBadge, StepProgress, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UEditor, type UEditorInlineUploadedItem, UEditorPrepareContentForSaveError, type UEditorPrepareContentForSaveOptions, type UEditorPrepareContentForSaveResult, type UEditorProps, type UEditorRef, type UEditorUploadImageForSave, type UEditorUploadImageForSaveResult, type UEditorVariant, type UnderverseLocale, UnderverseProvider, type UnderverseProviderProps, type UploadedFile, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VerticalTabs, Watermark, type WatermarkProps, cn$1 as cn, cn as cnLocal, extractImageSrcsFromHtml, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, normalizeImageUrl, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
|
package/dist/index.d.ts
CHANGED
|
@@ -2306,6 +2306,8 @@ interface LoadingBarProps {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
declare const LoadingBar: React__default.FC<LoadingBarProps>;
|
|
2308
2308
|
|
|
2309
|
+
declare function OverlayScrollbarProvider(): null;
|
|
2310
|
+
|
|
2309
2311
|
type FilterType = "text" | "select" | "date";
|
|
2310
2312
|
type DataTableSize = "sm" | "md" | "lg";
|
|
2311
2313
|
type DataTableDensity = "compact" | "normal" | "comfortable";
|
|
@@ -3673,4 +3675,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
3673
3675
|
};
|
|
3674
3676
|
};
|
|
3675
3677
|
|
|
3676
|
-
export { AccessDenied, Alert, AreaChart, type AreaChartDataPoint, type AreaChartProps, type AreaChartSeries, Avatar, Badge, Badge as BadgeBase, BarChart, type BarChartDataPoint, type BarChartProps, type BarChartSeries, BatteryProgress, BottomSheet, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarProps, CalendarTimeline, type CalendarTimelineDateInput, type CalendarTimelineDayRangeMode, type CalendarTimelineEvent, type CalendarTimelineFormatters, type CalendarTimelineGroup, type CalendarTimelineInteractions, type CalendarTimelineLabels, type CalendarTimelineProps, type CalendarTimelineResource, type CalendarTimelineSize, type CalendarTimelineView, type CalendarTimelineVirtualization, Card, Carousel, CategoryTreeSelect, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxProps, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, FallingIcons, FileUpload, type FileUploadProps, FloatingContacts, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, GaugeChart, type GaugeChartProps, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, LineChart, type LineChartDataPoint, type LineChartProps, type LineChartSeries, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type Locale$1 as Locale, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NotificationBadge, NotificationModal, NumberInput, OverlayControls, PageLoading, Pagination, type PaginationProps, PasswordInput, PieChart, type PieChartDataPoint, type PieChartProps, PillTabs, Popover, Progress, PulseBadge, RadarChart, type RadarChartDataPoint, type RadarChartProps, type RadarChartSeries, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, SearchInput, Section, SegmentedProgress, SelectDropdown, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, Slider, SmartImage, type Song, type Sorter, Sparkline, type SparklineDataPoint, type SparklineProps, StatusBadge, StepProgress, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UEditor, type UEditorInlineUploadedItem, UEditorPrepareContentForSaveError, type UEditorPrepareContentForSaveOptions, type UEditorPrepareContentForSaveResult, type UEditorProps, type UEditorRef, type UEditorUploadImageForSave, type UEditorUploadImageForSaveResult, type UEditorVariant, type UnderverseLocale, UnderverseProvider, type UnderverseProviderProps, type UploadedFile, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VerticalTabs, Watermark, type WatermarkProps, cn$1 as cn, cn as cnLocal, extractImageSrcsFromHtml, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, normalizeImageUrl, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
|
|
3678
|
+
export { AccessDenied, Alert, AreaChart, type AreaChartDataPoint, type AreaChartProps, type AreaChartSeries, Avatar, Badge, Badge as BadgeBase, BarChart, type BarChartDataPoint, type BarChartProps, type BarChartSeries, BatteryProgress, BottomSheet, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarProps, CalendarTimeline, type CalendarTimelineDateInput, type CalendarTimelineDayRangeMode, type CalendarTimelineEvent, type CalendarTimelineFormatters, type CalendarTimelineGroup, type CalendarTimelineInteractions, type CalendarTimelineLabels, type CalendarTimelineProps, type CalendarTimelineResource, type CalendarTimelineSize, type CalendarTimelineView, type CalendarTimelineVirtualization, Card, Carousel, CategoryTreeSelect, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxProps, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, FallingIcons, FileUpload, type FileUploadProps, FloatingContacts, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, GaugeChart, type GaugeChartProps, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, LineChart, type LineChartDataPoint, type LineChartProps, type LineChartSeries, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type Locale$1 as Locale, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NotificationBadge, NotificationModal, NumberInput, OverlayControls, OverlayScrollbarProvider, PageLoading, Pagination, type PaginationProps, PasswordInput, PieChart, type PieChartDataPoint, type PieChartProps, PillTabs, Popover, Progress, PulseBadge, RadarChart, type RadarChartDataPoint, type RadarChartProps, type RadarChartSeries, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, SearchInput, Section, SegmentedProgress, SelectDropdown, Sheet, SidebarSheet, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, Slider, SmartImage, type Song, type Sorter, Sparkline, type SparklineDataPoint, type SparklineProps, StatusBadge, StepProgress, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UEditor, type UEditorInlineUploadedItem, UEditorPrepareContentForSaveError, type UEditorPrepareContentForSaveOptions, type UEditorPrepareContentForSaveResult, type UEditorProps, type UEditorRef, type UEditorUploadImageForSave, type UEditorUploadImageForSaveResult, type UEditorVariant, type UnderverseLocale, UnderverseProvider, type UnderverseProviderProps, type UploadedFile, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VerticalTabs, Watermark, type WatermarkProps, cn$1 as cn, cn as cnLocal, extractImageSrcsFromHtml, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, normalizeImageUrl, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
|
package/dist/index.js
CHANGED
|
@@ -18846,6 +18846,102 @@ var LoadingBar = ({
|
|
|
18846
18846
|
);
|
|
18847
18847
|
};
|
|
18848
18848
|
|
|
18849
|
+
// ../../components/ui/OverlayScrollbarProvider.tsx
|
|
18850
|
+
import { useEffect as useEffect28 } from "react";
|
|
18851
|
+
import { OverlayScrollbars } from "overlayscrollbars";
|
|
18852
|
+
var SCROLLABLE_SELECTOR = [
|
|
18853
|
+
".overflow-auto",
|
|
18854
|
+
".overflow-x-auto",
|
|
18855
|
+
".overflow-y-auto",
|
|
18856
|
+
".overflow-scroll",
|
|
18857
|
+
".overflow-x-scroll",
|
|
18858
|
+
".overflow-y-scroll",
|
|
18859
|
+
".thin-scrollbar",
|
|
18860
|
+
".scrollbar-thin",
|
|
18861
|
+
".custom-scrollbar"
|
|
18862
|
+
].join(", ");
|
|
18863
|
+
var SCROLLBAR_OPTIONS = {
|
|
18864
|
+
scrollbars: {
|
|
18865
|
+
theme: "os-theme-underverse",
|
|
18866
|
+
visibility: "auto",
|
|
18867
|
+
autoHide: "leave",
|
|
18868
|
+
autoHideDelay: 600,
|
|
18869
|
+
dragScroll: true,
|
|
18870
|
+
clickScroll: false
|
|
18871
|
+
}
|
|
18872
|
+
};
|
|
18873
|
+
function OverlayScrollbarProvider() {
|
|
18874
|
+
useEffect28(() => {
|
|
18875
|
+
const bodyInstance = OverlayScrollbars(document.body, SCROLLBAR_OPTIONS);
|
|
18876
|
+
const instances = /* @__PURE__ */ new Map();
|
|
18877
|
+
const shouldSkip = (element) => {
|
|
18878
|
+
if (element === document.body) return true;
|
|
18879
|
+
if (element.classList.contains("scrollbar-none")) return true;
|
|
18880
|
+
if (element.hasAttribute("data-overlayscrollbars")) return true;
|
|
18881
|
+
return false;
|
|
18882
|
+
};
|
|
18883
|
+
const initElement = (element) => {
|
|
18884
|
+
if (shouldSkip(element)) return;
|
|
18885
|
+
if (instances.has(element)) return;
|
|
18886
|
+
instances.set(element, OverlayScrollbars(element, SCROLLBAR_OPTIONS));
|
|
18887
|
+
};
|
|
18888
|
+
const collectCandidates = (root) => {
|
|
18889
|
+
const candidates = [];
|
|
18890
|
+
if (root instanceof HTMLElement && root.matches(SCROLLABLE_SELECTOR)) {
|
|
18891
|
+
candidates.push(root);
|
|
18892
|
+
}
|
|
18893
|
+
if ("querySelectorAll" in root) {
|
|
18894
|
+
root.querySelectorAll(SCROLLABLE_SELECTOR).forEach((element) => {
|
|
18895
|
+
candidates.push(element);
|
|
18896
|
+
});
|
|
18897
|
+
}
|
|
18898
|
+
return candidates.filter((element, index) => candidates.indexOf(element) === index);
|
|
18899
|
+
};
|
|
18900
|
+
const scan = (root) => {
|
|
18901
|
+
const candidates = collectCandidates(root).filter((element) => !shouldSkip(element));
|
|
18902
|
+
const leafCandidates = candidates.filter((element) => !candidates.some((other) => other !== element && element.contains(other)));
|
|
18903
|
+
leafCandidates.forEach(initElement);
|
|
18904
|
+
};
|
|
18905
|
+
const cleanup = () => {
|
|
18906
|
+
instances.forEach((instance, element) => {
|
|
18907
|
+
if (!element.isConnected) {
|
|
18908
|
+
instance.destroy();
|
|
18909
|
+
instances.delete(element);
|
|
18910
|
+
}
|
|
18911
|
+
});
|
|
18912
|
+
};
|
|
18913
|
+
scan(document.body);
|
|
18914
|
+
let rafId = 0;
|
|
18915
|
+
const observer = new MutationObserver((mutations) => {
|
|
18916
|
+
if (rafId) return;
|
|
18917
|
+
rafId = window.requestAnimationFrame(() => {
|
|
18918
|
+
rafId = 0;
|
|
18919
|
+
const scanRoots = /* @__PURE__ */ new Set();
|
|
18920
|
+
mutations.forEach((mutation) => {
|
|
18921
|
+
if (mutation.target instanceof Element || mutation.target instanceof Document || mutation.target instanceof DocumentFragment) {
|
|
18922
|
+
scanRoots.add(mutation.target);
|
|
18923
|
+
}
|
|
18924
|
+
mutation.addedNodes.forEach((node) => {
|
|
18925
|
+
if (node instanceof HTMLElement) {
|
|
18926
|
+
scanRoots.add(node);
|
|
18927
|
+
}
|
|
18928
|
+
});
|
|
18929
|
+
});
|
|
18930
|
+
scanRoots.forEach(scan);
|
|
18931
|
+
cleanup();
|
|
18932
|
+
});
|
|
18933
|
+
});
|
|
18934
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
18935
|
+
return () => {
|
|
18936
|
+
if (rafId) window.cancelAnimationFrame(rafId);
|
|
18937
|
+
observer.disconnect();
|
|
18938
|
+
instances.forEach((instance) => instance.destroy());
|
|
18939
|
+
bodyInstance.destroy();
|
|
18940
|
+
};
|
|
18941
|
+
}, []);
|
|
18942
|
+
return null;
|
|
18943
|
+
}
|
|
18944
|
+
|
|
18849
18945
|
// ../../components/ui/Table.tsx
|
|
18850
18946
|
import React55 from "react";
|
|
18851
18947
|
import { jsx as jsx65, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
@@ -20198,7 +20294,7 @@ function AccessDenied({
|
|
|
20198
20294
|
|
|
20199
20295
|
// ../../components/ui/ThemeToggleHeadless.tsx
|
|
20200
20296
|
import { Moon as Moon2, Sun as Sun2, Monitor } from "lucide-react";
|
|
20201
|
-
import { useEffect as
|
|
20297
|
+
import { useEffect as useEffect30, useRef as useRef26, useState as useState47 } from "react";
|
|
20202
20298
|
import { createPortal as createPortal7 } from "react-dom";
|
|
20203
20299
|
import { Fragment as Fragment27, jsx as jsx73, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
20204
20300
|
function ThemeToggleHeadless({
|
|
@@ -20211,7 +20307,7 @@ function ThemeToggleHeadless({
|
|
|
20211
20307
|
const [mounted, setMounted] = useState47(false);
|
|
20212
20308
|
const triggerRef = useRef26(null);
|
|
20213
20309
|
const [dropdownPosition, setDropdownPosition] = useState47(null);
|
|
20214
|
-
|
|
20310
|
+
useEffect30(() => setMounted(true), []);
|
|
20215
20311
|
const themes = [
|
|
20216
20312
|
{ value: "light", label: labels?.light ?? "Light", icon: Sun2 },
|
|
20217
20313
|
{ value: "dark", label: labels?.dark ?? "Dark", icon: Moon2 },
|
|
@@ -21312,12 +21408,12 @@ function useSmartLocale() {
|
|
|
21312
21408
|
}
|
|
21313
21409
|
|
|
21314
21410
|
// ../../components/ui/UEditor/UEditor.tsx
|
|
21315
|
-
import React72, { useEffect as
|
|
21411
|
+
import React72, { useEffect as useEffect37, useImperativeHandle as useImperativeHandle3, useMemo as useMemo28, useRef as useRef34 } from "react";
|
|
21316
21412
|
import { useTranslations as useTranslations7 } from "next-intl";
|
|
21317
21413
|
import { useEditor, EditorContent } from "@tiptap/react";
|
|
21318
21414
|
|
|
21319
21415
|
// ../../components/ui/UEditor/extensions.ts
|
|
21320
|
-
import
|
|
21416
|
+
import Document2 from "@tiptap/extension-document";
|
|
21321
21417
|
import Paragraph from "@tiptap/extension-paragraph";
|
|
21322
21418
|
import Text from "@tiptap/extension-text";
|
|
21323
21419
|
import Bold from "@tiptap/extension-bold";
|
|
@@ -21355,7 +21451,7 @@ import { common, createLowlight } from "lowlight";
|
|
|
21355
21451
|
import { Extension } from "@tiptap/core";
|
|
21356
21452
|
import Suggestion from "@tiptap/suggestion";
|
|
21357
21453
|
import { ReactRenderer } from "@tiptap/react";
|
|
21358
|
-
import { forwardRef as forwardRef13, useEffect as
|
|
21454
|
+
import { forwardRef as forwardRef13, useEffect as useEffect31, useImperativeHandle, useRef as useRef28, useState as useState49 } from "react";
|
|
21359
21455
|
import {
|
|
21360
21456
|
FileCode as FileCode2,
|
|
21361
21457
|
Heading1,
|
|
@@ -21374,10 +21470,10 @@ import { jsx as jsx77, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
|
21374
21470
|
var CommandList = forwardRef13((props, ref) => {
|
|
21375
21471
|
const [selectedIndex, setSelectedIndex] = useState49(0);
|
|
21376
21472
|
const listRef = useRef28(null);
|
|
21377
|
-
|
|
21473
|
+
useEffect31(() => {
|
|
21378
21474
|
setSelectedIndex(0);
|
|
21379
21475
|
}, [props.items]);
|
|
21380
|
-
|
|
21476
|
+
useEffect31(() => {
|
|
21381
21477
|
const selectedElement = listRef.current?.querySelector(`[data-index="${selectedIndex}"]`);
|
|
21382
21478
|
selectedElement?.scrollIntoView({ block: "nearest" });
|
|
21383
21479
|
}, [selectedIndex, props.items]);
|
|
@@ -21690,7 +21786,7 @@ import { Extension as Extension3 } from "@tiptap/core";
|
|
|
21690
21786
|
import Suggestion2 from "@tiptap/suggestion";
|
|
21691
21787
|
import { ReactRenderer as ReactRenderer2 } from "@tiptap/react";
|
|
21692
21788
|
import { PluginKey } from "@tiptap/pm/state";
|
|
21693
|
-
import { forwardRef as forwardRef14, useEffect as
|
|
21789
|
+
import { forwardRef as forwardRef14, useEffect as useEffect32, useImperativeHandle as useImperativeHandle2, useState as useState50 } from "react";
|
|
21694
21790
|
import { Smile } from "lucide-react";
|
|
21695
21791
|
import tippy2 from "tippy.js";
|
|
21696
21792
|
|
|
@@ -22463,7 +22559,7 @@ var EMOJI_LIST = [
|
|
|
22463
22559
|
import { jsx as jsx78, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
22464
22560
|
var EmojiList = forwardRef14((props, ref) => {
|
|
22465
22561
|
const [selectedIndex, setSelectedIndex] = useState50(0);
|
|
22466
|
-
|
|
22562
|
+
useEffect32(() => {
|
|
22467
22563
|
setSelectedIndex(0);
|
|
22468
22564
|
}, [props.items]);
|
|
22469
22565
|
useImperativeHandle2(ref, () => ({
|
|
@@ -22598,7 +22694,7 @@ var EmojiSuggestion = Extension3.create({
|
|
|
22598
22694
|
});
|
|
22599
22695
|
|
|
22600
22696
|
// ../../components/ui/UEditor/resizable-image.tsx
|
|
22601
|
-
import { useEffect as
|
|
22697
|
+
import { useEffect as useEffect33, useRef as useRef29, useState as useState51 } from "react";
|
|
22602
22698
|
import Image3 from "@tiptap/extension-image";
|
|
22603
22699
|
import { mergeAttributes } from "@tiptap/core";
|
|
22604
22700
|
import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
|
|
@@ -22626,7 +22722,7 @@ function ResizableImageNodeView(props) {
|
|
|
22626
22722
|
const heightAttr = toNullableNumber(node.attrs["height"]);
|
|
22627
22723
|
const textAlign = String(node.attrs["textAlign"] ?? "");
|
|
22628
22724
|
const dragStateRef = useRef29(null);
|
|
22629
|
-
|
|
22725
|
+
useEffect33(() => {
|
|
22630
22726
|
const img = imgRef.current;
|
|
22631
22727
|
if (!img) return;
|
|
22632
22728
|
img.style.width = widthAttr ? `${widthAttr}px` : "";
|
|
@@ -22822,7 +22918,7 @@ function buildUEditorExtensions({
|
|
|
22822
22918
|
editable = true
|
|
22823
22919
|
}) {
|
|
22824
22920
|
return [
|
|
22825
|
-
|
|
22921
|
+
Document2,
|
|
22826
22922
|
Paragraph,
|
|
22827
22923
|
Text,
|
|
22828
22924
|
Bold,
|
|
@@ -23022,7 +23118,7 @@ var EditorColorPalette = ({
|
|
|
23022
23118
|
] });
|
|
23023
23119
|
|
|
23024
23120
|
// ../../components/ui/UEditor/inputs.tsx
|
|
23025
|
-
import { useEffect as
|
|
23121
|
+
import { useEffect as useEffect34, useRef as useRef30, useState as useState52 } from "react";
|
|
23026
23122
|
import { useTranslations as useTranslations3 } from "next-intl";
|
|
23027
23123
|
import { Check as Check10, X as X19 } from "lucide-react";
|
|
23028
23124
|
import { jsx as jsx81, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
@@ -23041,7 +23137,7 @@ var LinkInput = ({
|
|
|
23041
23137
|
const t = useTranslations3("UEditor");
|
|
23042
23138
|
const [url, setUrl] = useState52(initialUrl);
|
|
23043
23139
|
const inputRef = useRef30(null);
|
|
23044
|
-
|
|
23140
|
+
useEffect34(() => {
|
|
23045
23141
|
inputRef.current?.focus();
|
|
23046
23142
|
inputRef.current?.select();
|
|
23047
23143
|
}, []);
|
|
@@ -23071,7 +23167,7 @@ var ImageInput = ({ onSubmit, onCancel }) => {
|
|
|
23071
23167
|
const [url, setUrl] = useState52("");
|
|
23072
23168
|
const [alt, setAlt] = useState52("");
|
|
23073
23169
|
const inputRef = useRef30(null);
|
|
23074
|
-
|
|
23170
|
+
useEffect34(() => {
|
|
23075
23171
|
inputRef.current?.focus();
|
|
23076
23172
|
}, []);
|
|
23077
23173
|
const handleSubmit = (e) => {
|
|
@@ -23124,7 +23220,7 @@ var ImageInput = ({ onSubmit, onCancel }) => {
|
|
|
23124
23220
|
};
|
|
23125
23221
|
|
|
23126
23222
|
// ../../components/ui/UEditor/emoji-picker.tsx
|
|
23127
|
-
import { useState as useState53, useMemo as useMemo26, useRef as useRef31, useEffect as
|
|
23223
|
+
import { useState as useState53, useMemo as useMemo26, useRef as useRef31, useEffect as useEffect35 } from "react";
|
|
23128
23224
|
import { Search as Search6, X as X20, Smile as Smile2, Leaf, Utensils, Dumbbell, Lightbulb, Hash, Flag } from "lucide-react";
|
|
23129
23225
|
import { jsx as jsx82, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
23130
23226
|
var CATEGORY_ICONS = {
|
|
@@ -23156,7 +23252,7 @@ var EmojiPicker = ({ onSelect, onClose }) => {
|
|
|
23156
23252
|
onSelect(emoji);
|
|
23157
23253
|
setSearch("");
|
|
23158
23254
|
};
|
|
23159
|
-
|
|
23255
|
+
useEffect35(() => {
|
|
23160
23256
|
if (search) return;
|
|
23161
23257
|
const container = scrollContainerRef.current;
|
|
23162
23258
|
if (!container) return;
|
|
@@ -23196,7 +23292,7 @@ var EmojiPicker = ({ onSelect, onClose }) => {
|
|
|
23196
23292
|
isUserScrolling.current = true;
|
|
23197
23293
|
}, 500);
|
|
23198
23294
|
};
|
|
23199
|
-
|
|
23295
|
+
useEffect35(() => {
|
|
23200
23296
|
isUserScrolling.current = true;
|
|
23201
23297
|
}, []);
|
|
23202
23298
|
return /* @__PURE__ */ jsxs74("div", { className: "w-96 bg-card border border-border rounded-2xl shadow-xl overflow-hidden flex flex-col max-h-128", children: [
|
|
@@ -23804,7 +23900,7 @@ var EditorToolbar = ({
|
|
|
23804
23900
|
};
|
|
23805
23901
|
|
|
23806
23902
|
// ../../components/ui/UEditor/menus.tsx
|
|
23807
|
-
import { useCallback as useCallback21, useEffect as
|
|
23903
|
+
import { useCallback as useCallback21, useEffect as useEffect36, useMemo as useMemo27, useRef as useRef33, useState as useState55 } from "react";
|
|
23808
23904
|
import { createPortal as createPortal9 } from "react-dom";
|
|
23809
23905
|
import { useTranslations as useTranslations5 } from "next-intl";
|
|
23810
23906
|
import {
|
|
@@ -23911,10 +24007,10 @@ var SlashCommandMenu = ({ editor, onClose, filterText = "" }) => {
|
|
|
23911
24007
|
const lowerFilter = filterText.toLowerCase();
|
|
23912
24008
|
return allCommands.filter((cmd) => cmd.label.toLowerCase().includes(lowerFilter) || cmd.description.toLowerCase().includes(lowerFilter));
|
|
23913
24009
|
}, [allCommands, filterText]);
|
|
23914
|
-
|
|
24010
|
+
useEffect36(() => {
|
|
23915
24011
|
setSelectedIndex(0);
|
|
23916
24012
|
}, [filterText]);
|
|
23917
|
-
|
|
24013
|
+
useEffect36(() => {
|
|
23918
24014
|
const selectedElement = menuRef.current?.querySelector(`[data-index="${selectedIndex}"]`);
|
|
23919
24015
|
selectedElement?.scrollIntoView({ block: "nearest" });
|
|
23920
24016
|
}, [selectedIndex]);
|
|
@@ -23928,7 +24024,7 @@ var SlashCommandMenu = ({ editor, onClose, filterText = "" }) => {
|
|
|
23928
24024
|
},
|
|
23929
24025
|
[commands, onClose]
|
|
23930
24026
|
);
|
|
23931
|
-
|
|
24027
|
+
useEffect36(() => {
|
|
23932
24028
|
const handleKeyDown = (e) => {
|
|
23933
24029
|
if (commands.length === 0) return;
|
|
23934
24030
|
if (e.key === "ArrowDown") {
|
|
@@ -24013,10 +24109,10 @@ var BubbleMenuContent = ({
|
|
|
24013
24109
|
const { textColors, highlightColors } = useEditorColors();
|
|
24014
24110
|
const [showLinkInput, setShowLinkInput] = useState55(false);
|
|
24015
24111
|
const [showEditorColorPalette, setShowEditorColorPalette] = useState55(false);
|
|
24016
|
-
|
|
24112
|
+
useEffect36(() => {
|
|
24017
24113
|
onKeepOpenChange?.(showLinkInput);
|
|
24018
24114
|
}, [onKeepOpenChange, showLinkInput]);
|
|
24019
|
-
|
|
24115
|
+
useEffect36(() => {
|
|
24020
24116
|
if (!showLinkInput) return;
|
|
24021
24117
|
const close = () => setShowLinkInput(false);
|
|
24022
24118
|
editor.on("selectionUpdate", close);
|
|
@@ -24147,7 +24243,7 @@ var CustomBubbleMenu = ({ editor }) => {
|
|
|
24147
24243
|
keepOpenRef.current = next;
|
|
24148
24244
|
if (next) setIsVisible(true);
|
|
24149
24245
|
}, []);
|
|
24150
|
-
|
|
24246
|
+
useEffect36(() => {
|
|
24151
24247
|
const updatePosition = () => {
|
|
24152
24248
|
const { state, view } = editor;
|
|
24153
24249
|
const { from, to, empty } = state.selection;
|
|
@@ -24202,7 +24298,7 @@ var CustomBubbleMenu = ({ editor }) => {
|
|
|
24202
24298
|
var CustomFloatingMenu = ({ editor }) => {
|
|
24203
24299
|
const [isVisible, setIsVisible] = useState55(false);
|
|
24204
24300
|
const [position, setPosition] = useState55({ top: 0, left: 0 });
|
|
24205
|
-
|
|
24301
|
+
useEffect36(() => {
|
|
24206
24302
|
const updatePosition = () => {
|
|
24207
24303
|
const { state, view } = editor;
|
|
24208
24304
|
const { $from, empty } = state.selection;
|
|
@@ -24677,7 +24773,7 @@ var UEditor = React72.forwardRef(({
|
|
|
24677
24773
|
}),
|
|
24678
24774
|
[content, editor, uploadImageForSave]
|
|
24679
24775
|
);
|
|
24680
|
-
|
|
24776
|
+
useEffect37(() => {
|
|
24681
24777
|
if (editor && content !== editor.getHTML()) {
|
|
24682
24778
|
if (editor.isEmpty && content) {
|
|
24683
24779
|
editor.commands.setContent(content);
|
|
@@ -24811,6 +24907,7 @@ export {
|
|
|
24811
24907
|
NotificationModal_default as NotificationModal,
|
|
24812
24908
|
NumberInput,
|
|
24813
24909
|
OverlayControls,
|
|
24910
|
+
OverlayScrollbarProvider,
|
|
24814
24911
|
PageLoading,
|
|
24815
24912
|
Pagination,
|
|
24816
24913
|
PasswordInput,
|