@underverse-ui/underverse 1.0.24 → 1.0.26

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.d.cts CHANGED
@@ -2834,6 +2834,12 @@ type UEditorUploadImageForSaveResult = string | ({
2834
2834
  } & Record<string, unknown>);
2835
2835
  type UEditorUploadImageForSave = (file: File) => Promise<UEditorUploadImageForSaveResult>;
2836
2836
  type UEditorPrepareContentUploadMeta = Record<string, unknown>;
2837
+ type UEditorInlineUploadedItem = {
2838
+ index: number;
2839
+ url: string;
2840
+ file?: File;
2841
+ meta?: UEditorPrepareContentUploadMeta;
2842
+ };
2837
2843
  type UEditorPrepareContentForSaveResult = {
2838
2844
  html: string;
2839
2845
  uploaded: Array<{
@@ -2841,6 +2847,8 @@ type UEditorPrepareContentForSaveResult = {
2841
2847
  file?: File;
2842
2848
  meta?: UEditorPrepareContentUploadMeta;
2843
2849
  }>;
2850
+ inlineImageUrls: string[];
2851
+ inlineUploaded: UEditorInlineUploadedItem[];
2844
2852
  errors: Array<{
2845
2853
  index: number;
2846
2854
  reason: string;
@@ -2877,6 +2885,8 @@ type UEditorVariant = NonNullable<UEditorProps["variant"]>;
2877
2885
 
2878
2886
  declare const UEditor: React__default.ForwardRefExoticComponent<UEditorProps & React__default.RefAttributes<UEditorRef>>;
2879
2887
 
2888
+ declare function normalizeImageUrl(url: string): string;
2889
+ declare function extractImageSrcsFromHtml(html: string): string[];
2880
2890
  declare class UEditorPrepareContentForSaveError extends Error {
2881
2891
  readonly result: UEditorPrepareContentForSaveResult;
2882
2892
  constructor(result: UEditorPrepareContentForSaveResult);
@@ -3663,4 +3673,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
3663
3673
  };
3664
3674
  };
3665
3675
 
3666
- 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, 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, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
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 };
package/dist/index.d.ts CHANGED
@@ -2834,6 +2834,12 @@ type UEditorUploadImageForSaveResult = string | ({
2834
2834
  } & Record<string, unknown>);
2835
2835
  type UEditorUploadImageForSave = (file: File) => Promise<UEditorUploadImageForSaveResult>;
2836
2836
  type UEditorPrepareContentUploadMeta = Record<string, unknown>;
2837
+ type UEditorInlineUploadedItem = {
2838
+ index: number;
2839
+ url: string;
2840
+ file?: File;
2841
+ meta?: UEditorPrepareContentUploadMeta;
2842
+ };
2837
2843
  type UEditorPrepareContentForSaveResult = {
2838
2844
  html: string;
2839
2845
  uploaded: Array<{
@@ -2841,6 +2847,8 @@ type UEditorPrepareContentForSaveResult = {
2841
2847
  file?: File;
2842
2848
  meta?: UEditorPrepareContentUploadMeta;
2843
2849
  }>;
2850
+ inlineImageUrls: string[];
2851
+ inlineUploaded: UEditorInlineUploadedItem[];
2844
2852
  errors: Array<{
2845
2853
  index: number;
2846
2854
  reason: string;
@@ -2877,6 +2885,8 @@ type UEditorVariant = NonNullable<UEditorProps["variant"]>;
2877
2885
 
2878
2886
  declare const UEditor: React__default.ForwardRefExoticComponent<UEditorProps & React__default.RefAttributes<UEditorRef>>;
2879
2887
 
2888
+ declare function normalizeImageUrl(url: string): string;
2889
+ declare function extractImageSrcsFromHtml(html: string): string[];
2880
2890
  declare class UEditorPrepareContentForSaveError extends Error {
2881
2891
  readonly result: UEditorPrepareContentForSaveResult;
2882
2892
  constructor(result: UEditorPrepareContentForSaveResult);
@@ -3663,4 +3673,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
3663
3673
  };
3664
3674
  };
3665
3675
 
3666
- 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, 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, getAnimationStyles, getUnderverseMessages, injectAnimationStyles, prepareUEditorContentForSave, shadcnAnimationStyles, underverseMessages, useFormField, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations };
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 };
package/dist/index.js CHANGED
@@ -164,25 +164,39 @@ var Button_default = Button;
164
164
  // ../../components/ui/Badge.tsx
165
165
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
166
166
  var variantStyles = {
167
- default: "bg-muted text-muted-foreground border-border/50 hover:bg-muted/80",
168
- primary: "bg-primary text-primary-foreground border-primary/20 hover:bg-primary/90",
169
- secondary: "bg-secondary text-secondary-foreground border-secondary/20 hover:bg-secondary/90",
170
- success: "bg-success text-success-foreground border-success/20 hover:bg-success/90",
171
- warning: "bg-warning text-warning-foreground border-warning/20 hover:bg-warning/90",
172
- danger: "bg-destructive text-destructive-foreground border-destructive/20 hover:bg-destructive/90",
173
- destructive: "bg-destructive text-destructive-foreground border-destructive/20 hover:bg-destructive/90",
174
- info: "bg-info text-info-foreground border-info/20 hover:bg-info/90",
175
- outline: "bg-transparent text-foreground border-border hover:bg-accent/50",
176
- ghost: "bg-transparent hover:bg-accent/20 hover:text-accent-foreground border-transparent transition-colors",
177
- transparent: "bg-transparent text-foreground border-transparent hover:bg-accent/30",
178
- gradient: "bg-linear-to-r from-primary to-secondary text-primary-foreground border-transparent hover:from-primary/90 hover:to-secondary/90"
167
+ default: "bg-muted text-muted-foreground border-border/50",
168
+ primary: "bg-primary text-primary-foreground border-primary/20",
169
+ secondary: "bg-secondary text-secondary-foreground border-secondary/20",
170
+ success: "bg-success text-success-foreground border-success/20",
171
+ warning: "bg-warning text-warning-foreground border-warning/20",
172
+ danger: "bg-destructive text-destructive-foreground border-destructive/20",
173
+ destructive: "bg-destructive text-destructive-foreground border-destructive/20",
174
+ info: "bg-info text-info-foreground border-info/20",
175
+ outline: "bg-transparent text-foreground border-border",
176
+ ghost: "bg-transparent text-foreground border-transparent",
177
+ transparent: "bg-transparent text-foreground border-transparent",
178
+ gradient: "bg-linear-to-r from-primary to-secondary text-primary-foreground border-transparent"
179
+ };
180
+ var clickableVariantStyles = {
181
+ default: "hover:bg-muted/80",
182
+ primary: "hover:bg-primary/90",
183
+ secondary: "hover:bg-secondary/90",
184
+ success: "hover:bg-success/90",
185
+ warning: "hover:bg-warning/90",
186
+ danger: "hover:bg-destructive/90",
187
+ destructive: "hover:bg-destructive/90",
188
+ info: "hover:bg-info/90",
189
+ outline: "hover:bg-accent/50",
190
+ ghost: "hover:bg-accent/20 hover:text-accent-foreground",
191
+ transparent: "hover:bg-accent/30",
192
+ gradient: "hover:from-primary/90 hover:to-secondary/90"
179
193
  };
180
194
  var sizeStyles = {
181
195
  xs: "px-1.5 py-0.5 text-xs font-medium min-h-4.5",
182
196
  sm: "px-2 py-0.5 text-xs font-medium min-h-5",
183
197
  md: "px-2.5 py-1 text-xs font-medium min-h-6",
184
- lg: "px-3 py-1.5 text-sm font-medium min-h-7",
185
- xl: "px-4 py-2 text-sm font-semibold min-h-8"
198
+ lg: "px-3 py-1 text-xs font-medium min-h-6.5",
199
+ xl: "px-3.5 py-1.5 text-sm font-medium min-h-7"
186
200
  };
187
201
  var dotSizeStyles = {
188
202
  xs: "w-1.5 h-1.5",
@@ -225,11 +239,12 @@ var Badge = ({
225
239
  const baseClasses = cn(
226
240
  "inline-flex items-center border transition-all duration-200",
227
241
  "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1",
242
+ variantStyles[variant],
243
+ clickable && clickableVariantStyles[variant],
228
244
  clickable && "cursor-pointer hover:shadow-sm active:scale-95",
229
245
  pulse && "animate-pulse",
230
- "relative z-0",
246
+ "relative z-0"
231
247
  // Ensure badges stay below sticky headers (z-20, z-50)
232
- variantStyles[variant]
233
248
  );
234
249
  if (dot) {
235
250
  return /* @__PURE__ */ jsx2(
@@ -24327,6 +24342,34 @@ function getErrorReason(error) {
24327
24342
  if (typeof error === "string" && error.trim()) return error;
24328
24343
  return "Unknown upload error.";
24329
24344
  }
24345
+ function decodeHtmlEntities(value) {
24346
+ return value.replace(/&quot;/gi, '"').replace(/&#39;/gi, "'").replace(/&amp;/gi, "&").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&nbsp;/gi, " ");
24347
+ }
24348
+ function normalizeImageUrl(url) {
24349
+ const input = decodeHtmlEntities(url.trim());
24350
+ if (!input) return "";
24351
+ if (isDataImageUrl(input)) return input;
24352
+ const isAbsolute = /^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(input);
24353
+ if (!isAbsolute) {
24354
+ return input.split("#")[0] ?? input;
24355
+ }
24356
+ try {
24357
+ const parsed = new URL(input);
24358
+ parsed.hash = "";
24359
+ if (parsed.protocol === "http:" || parsed.protocol === "https:") {
24360
+ parsed.hostname = parsed.hostname.toLowerCase();
24361
+ if (parsed.protocol === "http:" && parsed.port === "80" || parsed.protocol === "https:" && parsed.port === "443") {
24362
+ parsed.port = "";
24363
+ }
24364
+ if (parsed.pathname.length > 1 && parsed.pathname.endsWith("/")) {
24365
+ parsed.pathname = parsed.pathname.slice(0, -1);
24366
+ }
24367
+ }
24368
+ return parsed.toString();
24369
+ } catch {
24370
+ return input.split("#")[0] ?? input;
24371
+ }
24372
+ }
24330
24373
  function replaceSrcInTag(match, nextSrc) {
24331
24374
  if (!match.srcAttr) return match.tag;
24332
24375
  const { start, end, quote } = match.srcAttr;
@@ -24360,6 +24403,24 @@ function collectImgTagMatches(html) {
24360
24403
  }
24361
24404
  return matches;
24362
24405
  }
24406
+ function extractImageSrcsFromHtml(html) {
24407
+ if (!html || !html.includes("<img")) return [];
24408
+ return collectImgTagMatches(html).map((match) => decodeHtmlEntities(match.srcAttr?.value.trim() ?? "")).filter(Boolean);
24409
+ }
24410
+ function createResult({
24411
+ html,
24412
+ uploaded,
24413
+ inlineUploaded,
24414
+ errors
24415
+ }) {
24416
+ return {
24417
+ html,
24418
+ uploaded,
24419
+ inlineImageUrls: extractImageSrcsFromHtml(html),
24420
+ inlineUploaded,
24421
+ errors
24422
+ };
24423
+ }
24363
24424
  var UEditorPrepareContentForSaveError = class extends Error {
24364
24425
  constructor(result) {
24365
24426
  super(
@@ -24374,11 +24435,11 @@ async function prepareUEditorContentForSave({
24374
24435
  uploadImageForSave
24375
24436
  }) {
24376
24437
  if (!html || !html.includes("<img")) {
24377
- return { html, uploaded: [], errors: [] };
24438
+ return createResult({ html, uploaded: [], inlineUploaded: [], errors: [] });
24378
24439
  }
24379
24440
  const imgMatches = collectImgTagMatches(html);
24380
24441
  if (imgMatches.length === 0) {
24381
- return { html, uploaded: [], errors: [] };
24442
+ return createResult({ html, uploaded: [], inlineUploaded: [], errors: [] });
24382
24443
  }
24383
24444
  const base64Candidates = [];
24384
24445
  for (const match of imgMatches) {
@@ -24393,19 +24454,21 @@ async function prepareUEditorContentForSave({
24393
24454
  });
24394
24455
  }
24395
24456
  if (base64Candidates.length === 0) {
24396
- return { html, uploaded: [], errors: [] };
24457
+ return createResult({ html, uploaded: [], inlineUploaded: [], errors: [] });
24397
24458
  }
24398
24459
  if (!uploadImageForSave) {
24399
- return {
24460
+ return createResult({
24400
24461
  html,
24401
24462
  uploaded: [],
24463
+ inlineUploaded: [],
24402
24464
  errors: base64Candidates.map((item) => ({
24403
24465
  index: item.index,
24404
24466
  reason: "`uploadImageForSave` is required to transform base64 images before save."
24405
24467
  }))
24406
- };
24468
+ });
24407
24469
  }
24408
24470
  const uploaded = [];
24471
+ const inlineUploaded = [];
24409
24472
  const errors = [];
24410
24473
  const replacements = /* @__PURE__ */ new Map();
24411
24474
  const uploadResults = await Promise.all(
@@ -24434,9 +24497,15 @@ async function prepareUEditorContentForSave({
24434
24497
  file: item.file,
24435
24498
  meta: item.meta
24436
24499
  });
24500
+ inlineUploaded.push({
24501
+ index: item.candidate.index,
24502
+ url: item.url,
24503
+ file: item.file,
24504
+ meta: item.meta
24505
+ });
24437
24506
  }
24438
24507
  if (replacements.size === 0) {
24439
- return { html, uploaded, errors };
24508
+ return createResult({ html, uploaded, inlineUploaded, errors });
24440
24509
  }
24441
24510
  let transformed = "";
24442
24511
  let cursor = 0;
@@ -24448,7 +24517,7 @@ async function prepareUEditorContentForSave({
24448
24517
  cursor = match.end;
24449
24518
  }
24450
24519
  transformed += html.slice(cursor);
24451
- return { html: transformed, uploaded, errors };
24520
+ return createResult({ html: transformed, uploaded, inlineUploaded, errors });
24452
24521
  }
24453
24522
 
24454
24523
  // ../../components/ui/UEditor/UEditor.tsx
@@ -24809,9 +24878,11 @@ export {
24809
24878
  Watermark_default as Watermark,
24810
24879
  cn,
24811
24880
  cn2 as cnLocal,
24881
+ extractImageSrcsFromHtml,
24812
24882
  getAnimationStyles,
24813
24883
  getUnderverseMessages,
24814
24884
  injectAnimationStyles,
24885
+ normalizeImageUrl,
24815
24886
  prepareUEditorContentForSave,
24816
24887
  shadcnAnimationStyles2 as shadcnAnimationStyles,
24817
24888
  underverseMessages,