@underverse-ui/underverse 1.0.155 → 1.0.157

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
@@ -6,6 +6,7 @@ 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
+ import { Extension, Editor } from '@tiptap/core';
9
10
 
10
11
  declare const VARIANT_STYLES_BTN: {
11
12
  default: string;
@@ -3252,7 +3253,7 @@ type UEditorPrepareContentForSaveOptions = {
3252
3253
  throwOnError?: boolean;
3253
3254
  };
3254
3255
  interface UEditorRef {
3255
- editor?: any;
3256
+ editor?: Editor | null;
3256
3257
  prepareContentForSave: (options?: UEditorPrepareContentForSaveOptions) => Promise<UEditorPrepareContentForSaveResult>;
3257
3258
  }
3258
3259
  type UEditorFontFamilyOption = {
@@ -3273,13 +3274,21 @@ type UEditorLetterSpacingOption = {
3273
3274
  };
3274
3275
  /** Public props for the `UEditor` component. */
3275
3276
  interface UEditorProps {
3277
+ /** Initial or controlled HTML content for the editor. */
3276
3278
  content?: string;
3279
+ /** Called with the current HTML after editor updates. Kept for backward compatibility with `onHtmlChange`. */
3277
3280
  onChange?: (content: string) => void;
3281
+ /** Called with the current HTML after editor updates. Prefer this when the consumer stores HTML. */
3278
3282
  onHtmlChange?: (html: string) => void;
3283
+ /** Called with the current TipTap JSON document after editor updates. */
3279
3284
  onJsonChange?: (json: object) => void;
3285
+ /** Uploads images immediately when they are inserted in `imageInsertMode="upload"`. */
3280
3286
  uploadImage?: (file: File) => Promise<string> | string;
3287
+ /** Uploads embedded/base64 images during `prepareContentForSave`; use this for save-time normalization. */
3281
3288
  uploadImageForSave?: UEditorUploadImageForSave;
3289
+ /** Maximum number of concurrent save-time image/file uploads. */
3282
3290
  uploadImageConcurrency?: number;
3291
+ /** Whether inserted images are kept as base64 in editor state or uploaded immediately. */
3283
3292
  imageInsertMode?: "base64" | "upload";
3284
3293
  maxImageFileSize?: number;
3285
3294
  allowedImageMimeTypes?: string[];
@@ -3306,12 +3315,14 @@ interface UEditorProps {
3306
3315
  image?: string;
3307
3316
  publisher?: string;
3308
3317
  }>;
3318
+ /** Uploads file cards immediately after insertion when available. */
3309
3319
  uploadFile?: (file: File) => Promise<string> | string;
3320
+ /** Uploads embedded/base64 file cards during `prepareContentForSave`; falls back to `uploadImageForSave` if omitted. */
3310
3321
  uploadFileForSave?: (file: File) => Promise<string | ({
3311
3322
  url: string;
3312
3323
  } & Record<string, unknown>)>;
3313
- collaborationOptions?: any;
3314
- extraExtensions?: any[];
3324
+ /** Additional TipTap extensions appended after the built-in UEditor extensions. */
3325
+ extraExtensions?: Extension[];
3315
3326
  showMenuBar?: boolean;
3316
3327
  onSave?: () => void;
3317
3328
  onExport?: () => void;
@@ -3645,11 +3656,14 @@ declare const underverseMessages: {
3645
3656
  clickToOpenLink: string;
3646
3657
  noDescription: string;
3647
3658
  failedToLoad: string;
3659
+ previewFailed: string;
3660
+ retryPreview: string;
3648
3661
  };
3649
3662
  fileCard: {
3650
3663
  unnamed: string;
3651
3664
  uploading: string;
3652
3665
  uploadFailed: string;
3666
+ retryUpload: string;
3653
3667
  };
3654
3668
  menubar: {
3655
3669
  file: string;
@@ -4035,11 +4049,14 @@ declare const underverseMessages: {
4035
4049
  clickToOpenLink: string;
4036
4050
  noDescription: string;
4037
4051
  failedToLoad: string;
4052
+ previewFailed: string;
4053
+ retryPreview: string;
4038
4054
  };
4039
4055
  fileCard: {
4040
4056
  unnamed: string;
4041
4057
  uploading: string;
4042
4058
  uploadFailed: string;
4059
+ retryUpload: string;
4043
4060
  };
4044
4061
  menubar: {
4045
4062
  file: string;
@@ -4425,11 +4442,14 @@ declare const underverseMessages: {
4425
4442
  clickToOpenLink: string;
4426
4443
  noDescription: string;
4427
4444
  failedToLoad: string;
4445
+ previewFailed: string;
4446
+ retryPreview: string;
4428
4447
  };
4429
4448
  fileCard: {
4430
4449
  unnamed: string;
4431
4450
  uploading: string;
4432
4451
  uploadFailed: string;
4452
+ retryUpload: string;
4433
4453
  };
4434
4454
  menubar: {
4435
4455
  file: string;
@@ -4815,11 +4835,14 @@ declare const underverseMessages: {
4815
4835
  clickToOpenLink: string;
4816
4836
  noDescription: string;
4817
4837
  failedToLoad: string;
4838
+ previewFailed: string;
4839
+ retryPreview: string;
4818
4840
  };
4819
4841
  fileCard: {
4820
4842
  unnamed: string;
4821
4843
  uploading: string;
4822
4844
  uploadFailed: string;
4845
+ retryUpload: string;
4823
4846
  };
4824
4847
  menubar: {
4825
4848
  file: string;
@@ -5208,11 +5231,14 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5208
5231
  clickToOpenLink: string;
5209
5232
  noDescription: string;
5210
5233
  failedToLoad: string;
5234
+ previewFailed: string;
5235
+ retryPreview: string;
5211
5236
  };
5212
5237
  fileCard: {
5213
5238
  unnamed: string;
5214
5239
  uploading: string;
5215
5240
  uploadFailed: string;
5241
+ retryUpload: string;
5216
5242
  };
5217
5243
  menubar: {
5218
5244
  file: string;
@@ -5597,11 +5623,14 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5597
5623
  clickToOpenLink: string;
5598
5624
  noDescription: string;
5599
5625
  failedToLoad: string;
5626
+ previewFailed: string;
5627
+ retryPreview: string;
5600
5628
  };
5601
5629
  fileCard: {
5602
5630
  unnamed: string;
5603
5631
  uploading: string;
5604
5632
  uploadFailed: string;
5633
+ retryUpload: string;
5605
5634
  };
5606
5635
  menubar: {
5607
5636
  file: string;
@@ -5986,11 +6015,14 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5986
6015
  clickToOpenLink: string;
5987
6016
  noDescription: string;
5988
6017
  failedToLoad: string;
6018
+ previewFailed: string;
6019
+ retryPreview: string;
5989
6020
  };
5990
6021
  fileCard: {
5991
6022
  unnamed: string;
5992
6023
  uploading: string;
5993
6024
  uploadFailed: string;
6025
+ retryUpload: string;
5994
6026
  };
5995
6027
  menubar: {
5996
6028
  file: string;
@@ -6375,11 +6407,14 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6375
6407
  clickToOpenLink: string;
6376
6408
  noDescription: string;
6377
6409
  failedToLoad: string;
6410
+ previewFailed: string;
6411
+ retryPreview: string;
6378
6412
  };
6379
6413
  fileCard: {
6380
6414
  unnamed: string;
6381
6415
  uploading: string;
6382
6416
  uploadFailed: string;
6417
+ retryUpload: string;
6383
6418
  };
6384
6419
  menubar: {
6385
6420
  file: string;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ 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
+ import { Extension, Editor } from '@tiptap/core';
9
10
 
10
11
  declare const VARIANT_STYLES_BTN: {
11
12
  default: string;
@@ -3252,7 +3253,7 @@ type UEditorPrepareContentForSaveOptions = {
3252
3253
  throwOnError?: boolean;
3253
3254
  };
3254
3255
  interface UEditorRef {
3255
- editor?: any;
3256
+ editor?: Editor | null;
3256
3257
  prepareContentForSave: (options?: UEditorPrepareContentForSaveOptions) => Promise<UEditorPrepareContentForSaveResult>;
3257
3258
  }
3258
3259
  type UEditorFontFamilyOption = {
@@ -3273,13 +3274,21 @@ type UEditorLetterSpacingOption = {
3273
3274
  };
3274
3275
  /** Public props for the `UEditor` component. */
3275
3276
  interface UEditorProps {
3277
+ /** Initial or controlled HTML content for the editor. */
3276
3278
  content?: string;
3279
+ /** Called with the current HTML after editor updates. Kept for backward compatibility with `onHtmlChange`. */
3277
3280
  onChange?: (content: string) => void;
3281
+ /** Called with the current HTML after editor updates. Prefer this when the consumer stores HTML. */
3278
3282
  onHtmlChange?: (html: string) => void;
3283
+ /** Called with the current TipTap JSON document after editor updates. */
3279
3284
  onJsonChange?: (json: object) => void;
3285
+ /** Uploads images immediately when they are inserted in `imageInsertMode="upload"`. */
3280
3286
  uploadImage?: (file: File) => Promise<string> | string;
3287
+ /** Uploads embedded/base64 images during `prepareContentForSave`; use this for save-time normalization. */
3281
3288
  uploadImageForSave?: UEditorUploadImageForSave;
3289
+ /** Maximum number of concurrent save-time image/file uploads. */
3282
3290
  uploadImageConcurrency?: number;
3291
+ /** Whether inserted images are kept as base64 in editor state or uploaded immediately. */
3283
3292
  imageInsertMode?: "base64" | "upload";
3284
3293
  maxImageFileSize?: number;
3285
3294
  allowedImageMimeTypes?: string[];
@@ -3306,12 +3315,14 @@ interface UEditorProps {
3306
3315
  image?: string;
3307
3316
  publisher?: string;
3308
3317
  }>;
3318
+ /** Uploads file cards immediately after insertion when available. */
3309
3319
  uploadFile?: (file: File) => Promise<string> | string;
3320
+ /** Uploads embedded/base64 file cards during `prepareContentForSave`; falls back to `uploadImageForSave` if omitted. */
3310
3321
  uploadFileForSave?: (file: File) => Promise<string | ({
3311
3322
  url: string;
3312
3323
  } & Record<string, unknown>)>;
3313
- collaborationOptions?: any;
3314
- extraExtensions?: any[];
3324
+ /** Additional TipTap extensions appended after the built-in UEditor extensions. */
3325
+ extraExtensions?: Extension[];
3315
3326
  showMenuBar?: boolean;
3316
3327
  onSave?: () => void;
3317
3328
  onExport?: () => void;
@@ -3645,11 +3656,14 @@ declare const underverseMessages: {
3645
3656
  clickToOpenLink: string;
3646
3657
  noDescription: string;
3647
3658
  failedToLoad: string;
3659
+ previewFailed: string;
3660
+ retryPreview: string;
3648
3661
  };
3649
3662
  fileCard: {
3650
3663
  unnamed: string;
3651
3664
  uploading: string;
3652
3665
  uploadFailed: string;
3666
+ retryUpload: string;
3653
3667
  };
3654
3668
  menubar: {
3655
3669
  file: string;
@@ -4035,11 +4049,14 @@ declare const underverseMessages: {
4035
4049
  clickToOpenLink: string;
4036
4050
  noDescription: string;
4037
4051
  failedToLoad: string;
4052
+ previewFailed: string;
4053
+ retryPreview: string;
4038
4054
  };
4039
4055
  fileCard: {
4040
4056
  unnamed: string;
4041
4057
  uploading: string;
4042
4058
  uploadFailed: string;
4059
+ retryUpload: string;
4043
4060
  };
4044
4061
  menubar: {
4045
4062
  file: string;
@@ -4425,11 +4442,14 @@ declare const underverseMessages: {
4425
4442
  clickToOpenLink: string;
4426
4443
  noDescription: string;
4427
4444
  failedToLoad: string;
4445
+ previewFailed: string;
4446
+ retryPreview: string;
4428
4447
  };
4429
4448
  fileCard: {
4430
4449
  unnamed: string;
4431
4450
  uploading: string;
4432
4451
  uploadFailed: string;
4452
+ retryUpload: string;
4433
4453
  };
4434
4454
  menubar: {
4435
4455
  file: string;
@@ -4815,11 +4835,14 @@ declare const underverseMessages: {
4815
4835
  clickToOpenLink: string;
4816
4836
  noDescription: string;
4817
4837
  failedToLoad: string;
4838
+ previewFailed: string;
4839
+ retryPreview: string;
4818
4840
  };
4819
4841
  fileCard: {
4820
4842
  unnamed: string;
4821
4843
  uploading: string;
4822
4844
  uploadFailed: string;
4845
+ retryUpload: string;
4823
4846
  };
4824
4847
  menubar: {
4825
4848
  file: string;
@@ -5208,11 +5231,14 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5208
5231
  clickToOpenLink: string;
5209
5232
  noDescription: string;
5210
5233
  failedToLoad: string;
5234
+ previewFailed: string;
5235
+ retryPreview: string;
5211
5236
  };
5212
5237
  fileCard: {
5213
5238
  unnamed: string;
5214
5239
  uploading: string;
5215
5240
  uploadFailed: string;
5241
+ retryUpload: string;
5216
5242
  };
5217
5243
  menubar: {
5218
5244
  file: string;
@@ -5597,11 +5623,14 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5597
5623
  clickToOpenLink: string;
5598
5624
  noDescription: string;
5599
5625
  failedToLoad: string;
5626
+ previewFailed: string;
5627
+ retryPreview: string;
5600
5628
  };
5601
5629
  fileCard: {
5602
5630
  unnamed: string;
5603
5631
  uploading: string;
5604
5632
  uploadFailed: string;
5633
+ retryUpload: string;
5605
5634
  };
5606
5635
  menubar: {
5607
5636
  file: string;
@@ -5986,11 +6015,14 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
5986
6015
  clickToOpenLink: string;
5987
6016
  noDescription: string;
5988
6017
  failedToLoad: string;
6018
+ previewFailed: string;
6019
+ retryPreview: string;
5989
6020
  };
5990
6021
  fileCard: {
5991
6022
  unnamed: string;
5992
6023
  uploading: string;
5993
6024
  uploadFailed: string;
6025
+ retryUpload: string;
5994
6026
  };
5995
6027
  menubar: {
5996
6028
  file: string;
@@ -6375,11 +6407,14 @@ declare function getUnderverseMessages(locale?: UnderverseLocale): {
6375
6407
  clickToOpenLink: string;
6376
6408
  noDescription: string;
6377
6409
  failedToLoad: string;
6410
+ previewFailed: string;
6411
+ retryPreview: string;
6378
6412
  };
6379
6413
  fileCard: {
6380
6414
  unnamed: string;
6381
6415
  uploading: string;
6382
6416
  uploadFailed: string;
6417
+ retryUpload: string;
6383
6418
  };
6384
6419
  menubar: {
6385
6420
  file: string;