@underverse-ui/underverse 1.0.203 → 1.0.205
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/README.md +8 -2
- package/api-reference.json +1 -1
- package/dist/EmojiPicker-BAWP2RAS.js +14 -0
- package/dist/EmojiPicker-BAWP2RAS.js.map +1 -0
- package/dist/chunk-2V6A6PGI.js +14614 -0
- package/dist/chunk-2V6A6PGI.js.map +1 -0
- package/dist/chunk-4TYW5K4J.js +769 -0
- package/dist/chunk-4TYW5K4J.js.map +1 -0
- package/dist/chunk-7U3Y7R7U.js +199 -0
- package/dist/chunk-7U3Y7R7U.js.map +1 -0
- package/dist/chunk-IXEFOLUD.js +74 -0
- package/dist/chunk-IXEFOLUD.js.map +1 -0
- package/dist/chunk-MJV7ETJM.js +4501 -0
- package/dist/chunk-MJV7ETJM.js.map +1 -0
- package/dist/chunk-NSBPE2FW.js +17 -0
- package/dist/chunk-NSBPE2FW.js.map +1 -0
- package/dist/chunk-XJR7E6QB.js +2467 -0
- package/dist/chunk-XJR7E6QB.js.map +1 -0
- package/dist/chunk-Z63YNF3N.js +206 -0
- package/dist/chunk-Z63YNF3N.js.map +1 -0
- package/dist/emojis-I5AMZ3EE.js +8 -0
- package/dist/emojis-I5AMZ3EE.js.map +1 -0
- package/dist/index.cjs +36711 -35405
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -134
- package/dist/index.d.ts +3 -134
- package/dist/index.js +2801 -25581
- package/dist/index.js.map +1 -1
- package/dist/lowlight-runtime-Y43Y7YTW.js +11 -0
- package/dist/lowlight-runtime-Y43Y7YTW.js.map +1 -0
- package/dist/menu-bar-NDAP3SOR.js +947 -0
- package/dist/menu-bar-NDAP3SOR.js.map +1 -0
- package/dist/ueditor.cjs +23631 -0
- package/dist/ueditor.cjs.map +1 -0
- package/dist/ueditor.d.cts +142 -0
- package/dist/ueditor.d.ts +142 -0
- package/dist/ueditor.js +20 -0
- package/dist/ueditor.js.map +1 -0
- package/package.json +54 -46
package/dist/index.d.cts
CHANGED
|
@@ -6,7 +6,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
6
6
|
import * as react_hook_form from 'react-hook-form';
|
|
7
7
|
import { FieldValues, SubmitHandler, FieldPath, ControllerProps } from 'react-hook-form';
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
9
|
-
|
|
9
|
+
export { default as UEditor, UEditorFontFamilyOption, UEditorFontSizeOption, UEditorInlineUploadedItem, UEditorLetterSpacingOption, UEditorLineHeightOption, UEditorPrepareContentForSaveError, UEditorPrepareContentForSaveOptions, UEditorPrepareContentForSaveResult, UEditorProps, UEditorRef, UEditorUploadImageForSave, UEditorUploadImageForSaveResult, UEditorVariant, extractImageSrcsFromHtml, normalizeImageUrl, prepareUEditorContentForSave } from './ueditor.cjs';
|
|
10
|
+
import '@tiptap/core';
|
|
10
11
|
|
|
11
12
|
declare const VARIANT_STYLES_BTN: {
|
|
12
13
|
default: string;
|
|
@@ -3471,138 +3472,6 @@ declare function useSmartTranslations(namespace: string): (key: string) => strin
|
|
|
3471
3472
|
*/
|
|
3472
3473
|
declare function useSmartLocale(): Locale;
|
|
3473
3474
|
|
|
3474
|
-
type UEditorUploadImageForSaveResult = string | ({
|
|
3475
|
-
url: string;
|
|
3476
|
-
} & Record<string, unknown>);
|
|
3477
|
-
type UEditorUploadImageForSave = (file: File) => Promise<UEditorUploadImageForSaveResult>;
|
|
3478
|
-
type UEditorPrepareContentUploadMeta = Record<string, unknown>;
|
|
3479
|
-
type UEditorInlineUploadedItem = {
|
|
3480
|
-
index: number;
|
|
3481
|
-
url: string;
|
|
3482
|
-
file?: File;
|
|
3483
|
-
meta?: UEditorPrepareContentUploadMeta;
|
|
3484
|
-
};
|
|
3485
|
-
type UEditorPrepareContentForSaveResult = {
|
|
3486
|
-
html: string;
|
|
3487
|
-
uploaded: Array<{
|
|
3488
|
-
url: string;
|
|
3489
|
-
file?: File;
|
|
3490
|
-
meta?: UEditorPrepareContentUploadMeta;
|
|
3491
|
-
}>;
|
|
3492
|
-
inlineImageUrls: string[];
|
|
3493
|
-
inlineUploaded: UEditorInlineUploadedItem[];
|
|
3494
|
-
errors: Array<{
|
|
3495
|
-
index: number;
|
|
3496
|
-
reason: string;
|
|
3497
|
-
}>;
|
|
3498
|
-
};
|
|
3499
|
-
type UEditorPrepareContentForSaveOptions = {
|
|
3500
|
-
throwOnError?: boolean;
|
|
3501
|
-
};
|
|
3502
|
-
interface UEditorRef {
|
|
3503
|
-
editor?: Editor | null;
|
|
3504
|
-
prepareContentForSave: (options?: UEditorPrepareContentForSaveOptions) => Promise<UEditorPrepareContentForSaveResult>;
|
|
3505
|
-
}
|
|
3506
|
-
type UEditorFontFamilyOption = {
|
|
3507
|
-
label: string;
|
|
3508
|
-
value: string;
|
|
3509
|
-
};
|
|
3510
|
-
type UEditorFontSizeOption = {
|
|
3511
|
-
label: string;
|
|
3512
|
-
value: string;
|
|
3513
|
-
};
|
|
3514
|
-
type UEditorLineHeightOption = {
|
|
3515
|
-
label: string;
|
|
3516
|
-
value: string;
|
|
3517
|
-
};
|
|
3518
|
-
type UEditorLetterSpacingOption = {
|
|
3519
|
-
label: string;
|
|
3520
|
-
value: string;
|
|
3521
|
-
};
|
|
3522
|
-
/** Public props for the `UEditor` component. */
|
|
3523
|
-
interface UEditorProps {
|
|
3524
|
-
/** Initial or controlled HTML content for the editor. */
|
|
3525
|
-
content?: string;
|
|
3526
|
-
/** Called with the current HTML after editor updates. Kept for backward compatibility with `onHtmlChange`. */
|
|
3527
|
-
onChange?: (content: string) => void;
|
|
3528
|
-
/** Called with the current HTML after editor updates. Prefer this when the consumer stores HTML. */
|
|
3529
|
-
onHtmlChange?: (html: string) => void;
|
|
3530
|
-
/** Called with the current TipTap JSON document after editor updates. */
|
|
3531
|
-
onJsonChange?: (json: object) => void;
|
|
3532
|
-
/** Uploads images immediately when they are inserted in `imageInsertMode="upload"`. */
|
|
3533
|
-
uploadImage?: (file: File) => Promise<string> | string;
|
|
3534
|
-
/** Uploads embedded/base64 images during `prepareContentForSave`; use this for save-time normalization. */
|
|
3535
|
-
uploadImageForSave?: UEditorUploadImageForSave;
|
|
3536
|
-
/** Maximum number of concurrent save-time image/file uploads. */
|
|
3537
|
-
uploadImageConcurrency?: number;
|
|
3538
|
-
/** Whether inserted images are kept as base64 in editor state or uploaded immediately. */
|
|
3539
|
-
imageInsertMode?: "base64" | "upload";
|
|
3540
|
-
maxImageFileSize?: number;
|
|
3541
|
-
allowedImageMimeTypes?: string[];
|
|
3542
|
-
fallbackToDataUrl?: boolean;
|
|
3543
|
-
placeholder?: string;
|
|
3544
|
-
className?: string;
|
|
3545
|
-
editable?: boolean;
|
|
3546
|
-
autofocus?: boolean;
|
|
3547
|
-
showToolbar?: boolean;
|
|
3548
|
-
showBubbleMenu?: boolean;
|
|
3549
|
-
showFloatingMenu?: boolean;
|
|
3550
|
-
showCharacterCount?: boolean;
|
|
3551
|
-
/** Whether to show the editor footer. Defaults to `true`. */
|
|
3552
|
-
showFooter?: boolean;
|
|
3553
|
-
maxCharacters?: number;
|
|
3554
|
-
minHeight?: number | string;
|
|
3555
|
-
maxHeight?: number | string;
|
|
3556
|
-
variant?: "default" | "minimal" | "medium" | "medium-full" | "full" | "notion";
|
|
3557
|
-
/** Whether the editor has rounded corners. Defaults to `true`. */
|
|
3558
|
-
rounded?: boolean;
|
|
3559
|
-
fontFamilies?: UEditorFontFamilyOption[];
|
|
3560
|
-
fontSizes?: UEditorFontSizeOption[];
|
|
3561
|
-
lineHeights?: UEditorLineHeightOption[];
|
|
3562
|
-
letterSpacings?: UEditorLetterSpacingOption[];
|
|
3563
|
-
fetchMetadata?: (url: string) => Promise<{
|
|
3564
|
-
title?: string;
|
|
3565
|
-
description?: string;
|
|
3566
|
-
image?: string;
|
|
3567
|
-
publisher?: string;
|
|
3568
|
-
}>;
|
|
3569
|
-
/** Uploads file cards immediately after insertion when available. */
|
|
3570
|
-
uploadFile?: (file: File) => Promise<string> | string;
|
|
3571
|
-
/** Uploads embedded/base64 file cards during `prepareContentForSave`; falls back to `uploadImageForSave` if omitted. */
|
|
3572
|
-
uploadFileForSave?: (file: File) => Promise<string | ({
|
|
3573
|
-
url: string;
|
|
3574
|
-
} & Record<string, unknown>)>;
|
|
3575
|
-
/** Additional TipTap extensions appended after the built-in UEditor extensions. */
|
|
3576
|
-
extraExtensions?: Extension[];
|
|
3577
|
-
showMenuBar?: boolean;
|
|
3578
|
-
onSave?: () => void;
|
|
3579
|
-
onExport?: () => void;
|
|
3580
|
-
onSourceCode?: () => void;
|
|
3581
|
-
/**
|
|
3582
|
-
* Fires when View > Preview or the eye button is clicked.
|
|
3583
|
-
* Return false to prevent the built-in preview dialog.
|
|
3584
|
-
*/
|
|
3585
|
-
onPreview?: (html: string) => void | false;
|
|
3586
|
-
}
|
|
3587
|
-
type UEditorVariant = NonNullable<UEditorProps["variant"]>;
|
|
3588
|
-
|
|
3589
|
-
declare const UEditor: React__default.ForwardRefExoticComponent<UEditorProps & React__default.RefAttributes<UEditorRef>>;
|
|
3590
|
-
|
|
3591
|
-
declare function normalizeImageUrl(url: string): string;
|
|
3592
|
-
declare function extractImageSrcsFromHtml(html: string): string[];
|
|
3593
|
-
declare class UEditorPrepareContentForSaveError extends Error {
|
|
3594
|
-
readonly result: UEditorPrepareContentForSaveResult;
|
|
3595
|
-
constructor(result: UEditorPrepareContentForSaveResult);
|
|
3596
|
-
}
|
|
3597
|
-
declare function prepareUEditorContentForSave({ html, uploadImageForSave, uploadFileForSave, uploadConcurrency, }: {
|
|
3598
|
-
html: string;
|
|
3599
|
-
uploadImageForSave?: UEditorUploadImageForSave;
|
|
3600
|
-
uploadFileForSave?: (file: File) => Promise<string | ({
|
|
3601
|
-
url: string;
|
|
3602
|
-
} & Record<string, unknown>)>;
|
|
3603
|
-
uploadConcurrency?: number;
|
|
3604
|
-
}): Promise<UEditorPrepareContentForSaveResult>;
|
|
3605
|
-
|
|
3606
3475
|
/** Button component for actions, icon buttons, loading states, and submit flows. */
|
|
3607
3476
|
|
|
3608
3477
|
declare const underverseMessages: {
|
|
@@ -7199,4 +7068,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
7199
7068
|
};
|
|
7200
7069
|
};
|
|
7201
7070
|
|
|
7202
|
-
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, type BottomSheetProps, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarHoliday, 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, type CardProps, Carousel, type CarouselEffectOptions, type CarouselEffectPreset, type Category, CategoryTreeSelect, type CategoryTreeSelectBaseProps, type CategoryTreeSelectLabels, type CategoryTreeSelectMultiProps, type CategoryTreeSelectProps, type CategoryTreeSelectSingleProps, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, CompactDatePicker, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableLabels, type DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, EmojiPicker, type EmojiPickerProps, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, type GlobalI18nConfig, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, type ImageUploadProps, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type LoadingState, type Locale, LunarDatePicker, type LunarDatePickerProps, LunarDateRangePicker, type LunarDateRangePickerProps, type LunarDateValue, type LunarPickerValue, lunar as LunarUtils, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NextIntlAdapter, NotificationBadge, NotificationModal, NumberInput, type NumberInputProps, OverlayControls, type OverlayControlsProps, OverlayScrollArea, type OverlayScrollAreaProps, OverlayScrollbarProvider, type OverlayScrollbarProviderProps, PageLoading, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PillTabs, Popover, Progress, PulseBadge, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedProgress, SelectDropdown, Sheet, type SheetProps, SidebarSheet, type SidebarSheetProps, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, type SlideOverProps, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, type StickerAssetVariant, type StickerImageUrlOptions, StickerPicker, type StickerPickerProps, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type TextareaProps, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations,
|
|
7071
|
+
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, type BottomSheetProps, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarHoliday, 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, type CardProps, Carousel, type CarouselEffectOptions, type CarouselEffectPreset, type Category, CategoryTreeSelect, type CategoryTreeSelectBaseProps, type CategoryTreeSelectLabels, type CategoryTreeSelectMultiProps, type CategoryTreeSelectProps, type CategoryTreeSelectSingleProps, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, CompactDatePicker, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableLabels, type DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, EmojiPicker, type EmojiPickerProps, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, type GlobalI18nConfig, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, type ImageUploadProps, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type LoadingState, type Locale, LunarDatePicker, type LunarDatePickerProps, LunarDateRangePicker, type LunarDateRangePickerProps, type LunarDateValue, type LunarPickerValue, lunar as LunarUtils, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NextIntlAdapter, NotificationBadge, NotificationModal, NumberInput, type NumberInputProps, OverlayControls, type OverlayControlsProps, OverlayScrollArea, type OverlayScrollAreaProps, OverlayScrollbarProvider, type OverlayScrollbarProviderProps, PageLoading, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PillTabs, Popover, Progress, PulseBadge, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedProgress, SelectDropdown, Sheet, type SheetProps, SidebarSheet, type SidebarSheetProps, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, type SlideOverProps, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, type StickerAssetVariant, type StickerImageUrlOptions, StickerPicker, type StickerPickerProps, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type TextareaProps, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UnderverseConfigProvider, type UnderverseConfigProviderProps, type UnderverseLocale, UnderverseNextIntlProvider, UnderverseProvider, type UnderverseProviderProps, type UnderverseUIConfig, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn, cn as cnLocal, getAnimationStyles, getEmojiImageUrl, getEmojiUnifiedCode, getStickerImageUrl, getUnderverseMessages, injectAnimationStyles, loading, setEmojiBaseUrl, setStickerBaseUrl, shadcnAnimationStyles, underverseMessages, useFormField, useGlobalI18n, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations, useUnderverseUIConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
6
6
|
import * as react_hook_form from 'react-hook-form';
|
|
7
7
|
import { FieldValues, SubmitHandler, FieldPath, ControllerProps } from 'react-hook-form';
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
9
|
-
|
|
9
|
+
export { default as UEditor, UEditorFontFamilyOption, UEditorFontSizeOption, UEditorInlineUploadedItem, UEditorLetterSpacingOption, UEditorLineHeightOption, UEditorPrepareContentForSaveError, UEditorPrepareContentForSaveOptions, UEditorPrepareContentForSaveResult, UEditorProps, UEditorRef, UEditorUploadImageForSave, UEditorUploadImageForSaveResult, UEditorVariant, extractImageSrcsFromHtml, normalizeImageUrl, prepareUEditorContentForSave } from './ueditor.js';
|
|
10
|
+
import '@tiptap/core';
|
|
10
11
|
|
|
11
12
|
declare const VARIANT_STYLES_BTN: {
|
|
12
13
|
default: string;
|
|
@@ -3471,138 +3472,6 @@ declare function useSmartTranslations(namespace: string): (key: string) => strin
|
|
|
3471
3472
|
*/
|
|
3472
3473
|
declare function useSmartLocale(): Locale;
|
|
3473
3474
|
|
|
3474
|
-
type UEditorUploadImageForSaveResult = string | ({
|
|
3475
|
-
url: string;
|
|
3476
|
-
} & Record<string, unknown>);
|
|
3477
|
-
type UEditorUploadImageForSave = (file: File) => Promise<UEditorUploadImageForSaveResult>;
|
|
3478
|
-
type UEditorPrepareContentUploadMeta = Record<string, unknown>;
|
|
3479
|
-
type UEditorInlineUploadedItem = {
|
|
3480
|
-
index: number;
|
|
3481
|
-
url: string;
|
|
3482
|
-
file?: File;
|
|
3483
|
-
meta?: UEditorPrepareContentUploadMeta;
|
|
3484
|
-
};
|
|
3485
|
-
type UEditorPrepareContentForSaveResult = {
|
|
3486
|
-
html: string;
|
|
3487
|
-
uploaded: Array<{
|
|
3488
|
-
url: string;
|
|
3489
|
-
file?: File;
|
|
3490
|
-
meta?: UEditorPrepareContentUploadMeta;
|
|
3491
|
-
}>;
|
|
3492
|
-
inlineImageUrls: string[];
|
|
3493
|
-
inlineUploaded: UEditorInlineUploadedItem[];
|
|
3494
|
-
errors: Array<{
|
|
3495
|
-
index: number;
|
|
3496
|
-
reason: string;
|
|
3497
|
-
}>;
|
|
3498
|
-
};
|
|
3499
|
-
type UEditorPrepareContentForSaveOptions = {
|
|
3500
|
-
throwOnError?: boolean;
|
|
3501
|
-
};
|
|
3502
|
-
interface UEditorRef {
|
|
3503
|
-
editor?: Editor | null;
|
|
3504
|
-
prepareContentForSave: (options?: UEditorPrepareContentForSaveOptions) => Promise<UEditorPrepareContentForSaveResult>;
|
|
3505
|
-
}
|
|
3506
|
-
type UEditorFontFamilyOption = {
|
|
3507
|
-
label: string;
|
|
3508
|
-
value: string;
|
|
3509
|
-
};
|
|
3510
|
-
type UEditorFontSizeOption = {
|
|
3511
|
-
label: string;
|
|
3512
|
-
value: string;
|
|
3513
|
-
};
|
|
3514
|
-
type UEditorLineHeightOption = {
|
|
3515
|
-
label: string;
|
|
3516
|
-
value: string;
|
|
3517
|
-
};
|
|
3518
|
-
type UEditorLetterSpacingOption = {
|
|
3519
|
-
label: string;
|
|
3520
|
-
value: string;
|
|
3521
|
-
};
|
|
3522
|
-
/** Public props for the `UEditor` component. */
|
|
3523
|
-
interface UEditorProps {
|
|
3524
|
-
/** Initial or controlled HTML content for the editor. */
|
|
3525
|
-
content?: string;
|
|
3526
|
-
/** Called with the current HTML after editor updates. Kept for backward compatibility with `onHtmlChange`. */
|
|
3527
|
-
onChange?: (content: string) => void;
|
|
3528
|
-
/** Called with the current HTML after editor updates. Prefer this when the consumer stores HTML. */
|
|
3529
|
-
onHtmlChange?: (html: string) => void;
|
|
3530
|
-
/** Called with the current TipTap JSON document after editor updates. */
|
|
3531
|
-
onJsonChange?: (json: object) => void;
|
|
3532
|
-
/** Uploads images immediately when they are inserted in `imageInsertMode="upload"`. */
|
|
3533
|
-
uploadImage?: (file: File) => Promise<string> | string;
|
|
3534
|
-
/** Uploads embedded/base64 images during `prepareContentForSave`; use this for save-time normalization. */
|
|
3535
|
-
uploadImageForSave?: UEditorUploadImageForSave;
|
|
3536
|
-
/** Maximum number of concurrent save-time image/file uploads. */
|
|
3537
|
-
uploadImageConcurrency?: number;
|
|
3538
|
-
/** Whether inserted images are kept as base64 in editor state or uploaded immediately. */
|
|
3539
|
-
imageInsertMode?: "base64" | "upload";
|
|
3540
|
-
maxImageFileSize?: number;
|
|
3541
|
-
allowedImageMimeTypes?: string[];
|
|
3542
|
-
fallbackToDataUrl?: boolean;
|
|
3543
|
-
placeholder?: string;
|
|
3544
|
-
className?: string;
|
|
3545
|
-
editable?: boolean;
|
|
3546
|
-
autofocus?: boolean;
|
|
3547
|
-
showToolbar?: boolean;
|
|
3548
|
-
showBubbleMenu?: boolean;
|
|
3549
|
-
showFloatingMenu?: boolean;
|
|
3550
|
-
showCharacterCount?: boolean;
|
|
3551
|
-
/** Whether to show the editor footer. Defaults to `true`. */
|
|
3552
|
-
showFooter?: boolean;
|
|
3553
|
-
maxCharacters?: number;
|
|
3554
|
-
minHeight?: number | string;
|
|
3555
|
-
maxHeight?: number | string;
|
|
3556
|
-
variant?: "default" | "minimal" | "medium" | "medium-full" | "full" | "notion";
|
|
3557
|
-
/** Whether the editor has rounded corners. Defaults to `true`. */
|
|
3558
|
-
rounded?: boolean;
|
|
3559
|
-
fontFamilies?: UEditorFontFamilyOption[];
|
|
3560
|
-
fontSizes?: UEditorFontSizeOption[];
|
|
3561
|
-
lineHeights?: UEditorLineHeightOption[];
|
|
3562
|
-
letterSpacings?: UEditorLetterSpacingOption[];
|
|
3563
|
-
fetchMetadata?: (url: string) => Promise<{
|
|
3564
|
-
title?: string;
|
|
3565
|
-
description?: string;
|
|
3566
|
-
image?: string;
|
|
3567
|
-
publisher?: string;
|
|
3568
|
-
}>;
|
|
3569
|
-
/** Uploads file cards immediately after insertion when available. */
|
|
3570
|
-
uploadFile?: (file: File) => Promise<string> | string;
|
|
3571
|
-
/** Uploads embedded/base64 file cards during `prepareContentForSave`; falls back to `uploadImageForSave` if omitted. */
|
|
3572
|
-
uploadFileForSave?: (file: File) => Promise<string | ({
|
|
3573
|
-
url: string;
|
|
3574
|
-
} & Record<string, unknown>)>;
|
|
3575
|
-
/** Additional TipTap extensions appended after the built-in UEditor extensions. */
|
|
3576
|
-
extraExtensions?: Extension[];
|
|
3577
|
-
showMenuBar?: boolean;
|
|
3578
|
-
onSave?: () => void;
|
|
3579
|
-
onExport?: () => void;
|
|
3580
|
-
onSourceCode?: () => void;
|
|
3581
|
-
/**
|
|
3582
|
-
* Fires when View > Preview or the eye button is clicked.
|
|
3583
|
-
* Return false to prevent the built-in preview dialog.
|
|
3584
|
-
*/
|
|
3585
|
-
onPreview?: (html: string) => void | false;
|
|
3586
|
-
}
|
|
3587
|
-
type UEditorVariant = NonNullable<UEditorProps["variant"]>;
|
|
3588
|
-
|
|
3589
|
-
declare const UEditor: React__default.ForwardRefExoticComponent<UEditorProps & React__default.RefAttributes<UEditorRef>>;
|
|
3590
|
-
|
|
3591
|
-
declare function normalizeImageUrl(url: string): string;
|
|
3592
|
-
declare function extractImageSrcsFromHtml(html: string): string[];
|
|
3593
|
-
declare class UEditorPrepareContentForSaveError extends Error {
|
|
3594
|
-
readonly result: UEditorPrepareContentForSaveResult;
|
|
3595
|
-
constructor(result: UEditorPrepareContentForSaveResult);
|
|
3596
|
-
}
|
|
3597
|
-
declare function prepareUEditorContentForSave({ html, uploadImageForSave, uploadFileForSave, uploadConcurrency, }: {
|
|
3598
|
-
html: string;
|
|
3599
|
-
uploadImageForSave?: UEditorUploadImageForSave;
|
|
3600
|
-
uploadFileForSave?: (file: File) => Promise<string | ({
|
|
3601
|
-
url: string;
|
|
3602
|
-
} & Record<string, unknown>)>;
|
|
3603
|
-
uploadConcurrency?: number;
|
|
3604
|
-
}): Promise<UEditorPrepareContentForSaveResult>;
|
|
3605
|
-
|
|
3606
3475
|
/** Button component for actions, icon buttons, loading states, and submit flows. */
|
|
3607
3476
|
|
|
3608
3477
|
declare const underverseMessages: {
|
|
@@ -7199,4 +7068,4 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
|
|
|
7199
7068
|
};
|
|
7200
7069
|
};
|
|
7201
7070
|
|
|
7202
|
-
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, type BottomSheetProps, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarHoliday, 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, type CardProps, Carousel, type CarouselEffectOptions, type CarouselEffectPreset, type Category, CategoryTreeSelect, type CategoryTreeSelectBaseProps, type CategoryTreeSelectLabels, type CategoryTreeSelectMultiProps, type CategoryTreeSelectProps, type CategoryTreeSelectSingleProps, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, CompactDatePicker, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableLabels, type DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, EmojiPicker, type EmojiPickerProps, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, type GlobalI18nConfig, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, type ImageUploadProps, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type LoadingState, type Locale, LunarDatePicker, type LunarDatePickerProps, LunarDateRangePicker, type LunarDateRangePickerProps, type LunarDateValue, type LunarPickerValue, lunar as LunarUtils, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NextIntlAdapter, NotificationBadge, NotificationModal, NumberInput, type NumberInputProps, OverlayControls, type OverlayControlsProps, OverlayScrollArea, type OverlayScrollAreaProps, OverlayScrollbarProvider, type OverlayScrollbarProviderProps, PageLoading, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PillTabs, Popover, Progress, PulseBadge, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedProgress, SelectDropdown, Sheet, type SheetProps, SidebarSheet, type SidebarSheetProps, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, type SlideOverProps, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, type StickerAssetVariant, type StickerImageUrlOptions, StickerPicker, type StickerPickerProps, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type TextareaProps, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations,
|
|
7071
|
+
export { AccessDenied, type AccessDeniedProps, Alert, Avatar, Badge, Badge as BadgeBase, BatteryProgress, BottomSheet, type BottomSheetProps, Breadcrumb, Button, ButtonLoading, type ButtonProps, Calendar, type CalendarEvent, type CalendarHoliday, 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, type CardProps, Carousel, type CarouselEffectOptions, type CarouselEffectPreset, type Category, CategoryTreeSelect, type CategoryTreeSelectBaseProps, type CategoryTreeSelectLabels, type CategoryTreeSelectMultiProps, type CategoryTreeSelectProps, type CategoryTreeSelectSingleProps, Checkbox, type CheckboxProps, CircularProgress, ClientOnly, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, CompactDatePicker, CompactPagination, type CompactPaginationProps, DataTable, type DataTableColumn, type DataTableDensity, type DataTableLabels, type DataTableProps, type DataTableQuery, type DataTableSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, date as DateUtils, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, EmojiPicker, type EmojiPickerProps, FallingIcons, FileUpload, type FileUploadProps, type FilterType, ForceInternalTranslationsProvider, Form, FormActions, FormCheckbox, FormControl, FormDescription, FormField, FormInput, FormItem, FormLabel, FormMessage, FormSubmitButton, type GlobalI18nConfig, GlobalLoading, GradientBadge, Grid, GridItem, type GridItemProps, type GridProps, ImageUpload, type ImageUploadProps, InlineLoading, Input, type InputProps, InteractiveBadge, Label, type LanguageOption, LanguageSwitcherHeadless as LanguageSwitcher, LanguageSwitcherHeadless, type LanguageSwitcherHeadlessProps, type LanguageSwitcherHeadlessProps as LanguageSwitcherProps, List, ListItem, LoadingBar, LoadingDots, LoadingProgress, LoadingSpinner, type LoadingState, type Locale, LunarDatePicker, type LunarDatePickerProps, LunarDateRangePicker, type LunarDateRangePickerProps, type LunarDateValue, type LunarPickerValue, lunar as LunarUtils, MiniProgress, Modal, MonthYearPicker, MonthYearPicker as MonthYearPickerBase, type MonthYearPickerProps, MultiCombobox, type MultiComboboxOption, type MultiComboboxProps, MusicPlayer, MusicPlayer as MusicPlayerDefault, type MusicPlayerProps, NextIntlAdapter, NotificationBadge, NotificationModal, NumberInput, type NumberInputProps, OverlayControls, type OverlayControlsProps, OverlayScrollArea, type OverlayScrollAreaProps, OverlayScrollbarProvider, type OverlayScrollbarProviderProps, PageLoading, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PillTabs, Popover, Progress, PulseBadge, RadioGroup, RadioGroupItem, SIZE_STYLES_BTN, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, SegmentedProgress, SelectDropdown, Sheet, type SheetProps, SidebarSheet, type SidebarSheetProps, SimplePagination, type SimplePaginationProps, SimpleTabs, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonCard, SkeletonList, SkeletonMessage, SkeletonPost, SkeletonTable, SkeletonText, SlideOver, type SlideOverProps, Slider, type SliderProps, SmartImage, type Song, type Sorter, StatusBadge, StepProgress, type StickerAssetVariant, type StickerImageUrlOptions, StickerPicker, type StickerPickerProps, type SupportedLocale, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, Tabs, TagBadge, TagInput, TagInput as TagInputBase, type TagInputProps, Textarea, type TextareaProps, type ThemeMode, ThemeToggleHeadless as ThemeToggle, ThemeToggleHeadless, type ThemeToggleHeadlessProps, type ThemeToggleHeadlessProps as ThemeToggleProps, TimePicker, type TimePickerProps, Timeline, TimelineItem, ToastProvider, Tooltip, TranslationProvider, type TranslationProviderProps, type Translations, UnderverseConfigProvider, type UnderverseConfigProviderProps, type UnderverseLocale, UnderverseNextIntlProvider, UnderverseProvider, type UnderverseProviderProps, type UnderverseUIConfig, type UploadedFile, type UploadedImage, type UseOverlayScrollbarTargetOptions, VARIANT_STYLES_ALERT, VARIANT_STYLES_BTN, VIETNAM_HOLIDAYS, VerticalTabs, Watermark, type WatermarkProps, cn, cn as cnLocal, getAnimationStyles, getEmojiImageUrl, getEmojiUnifiedCode, getStickerImageUrl, getUnderverseMessages, injectAnimationStyles, loading, setEmojiBaseUrl, setStickerBaseUrl, shadcnAnimationStyles, underverseMessages, useFormField, useGlobalI18n, useOverlayScrollbarTarget, useShadCNAnimations, useSmartLocale, useSmartTranslations, useToast, useTranslations as useUnderverseI18n, useLocale as useUnderverseI18nLocale, useUnderverseLocale, useUnderverseTranslations, useUnderverseUIConfig };
|