@nicorp/nui 0.11.0 → 0.11.2

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.ts CHANGED
@@ -99,7 +99,7 @@ declare interface AppShellProps extends React_2.HTMLAttributes<HTMLDivElement> {
99
99
 
100
100
  export declare const AspectRatio: ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & RefAttributes<HTMLDivElement>>;
101
101
 
102
- export declare function AudioPlayer({ src, title, artist, albumArt, showWaveform, showVolume, defaultVolume, autoPlay, loop, preload, size, onPlay, onPause, onEnded, onTimeUpdate, className, }: AudioPlayerProps): JSX_2.Element;
102
+ export declare const AudioPlayer: React_2.ForwardRefExoticComponent<AudioPlayerProps & React_2.RefAttributes<HTMLDivElement>>;
103
103
 
104
104
  export declare interface AudioPlayerProps extends VariantProps<typeof audioPlayerVariants> {
105
105
  src: string;
@@ -120,12 +120,13 @@ export declare interface AudioPlayerProps extends VariantProps<typeof audioPlaye
120
120
  }
121
121
 
122
122
  export declare const audioPlayerVariants: (props?: ({
123
+ variant?: "default" | "ghost" | "minimal" | null | undefined;
123
124
  size?: "default" | "sm" | "lg" | null | undefined;
124
125
  } & ClassProp) | undefined) => string;
125
126
 
126
- export declare function AudioPlaylist({ tracks, showWaveform, defaultRepeatMode, defaultShuffle, autoPlay, onTrackChange, onPlayStateChange, className, }: AudioPlaylistProps): JSX_2.Element | null;
127
+ export declare const AudioPlaylist: React_2.ForwardRefExoticComponent<AudioPlaylistProps & React_2.RefAttributes<HTMLDivElement>>;
127
128
 
128
- export declare interface AudioPlaylistProps {
129
+ export declare interface AudioPlaylistProps extends VariantProps<typeof audioPlaylistVariants> {
129
130
  tracks: AudioTrack[];
130
131
  showWaveform?: boolean;
131
132
  defaultRepeatMode?: RepeatMode;
@@ -136,9 +137,13 @@ export declare interface AudioPlaylistProps {
136
137
  className?: string;
137
138
  }
138
139
 
139
- export declare function AudioRecorder({ mimeType, maxDuration, showWaveform, onRecordingComplete, onRecordingStart, onError, className, }: AudioRecorderProps): JSX_2.Element;
140
+ export declare const audioPlaylistVariants: (props?: ({
141
+ variant?: "default" | "compact" | null | undefined;
142
+ } & ClassProp) | undefined) => string;
143
+
144
+ export declare const AudioRecorder: React_2.ForwardRefExoticComponent<AudioRecorderProps & React_2.RefAttributes<HTMLDivElement>>;
140
145
 
141
- export declare interface AudioRecorderProps {
146
+ export declare interface AudioRecorderProps extends VariantProps<typeof audioRecorderVariants> {
142
147
  mimeType?: string;
143
148
  maxDuration?: number;
144
149
  showWaveform?: boolean;
@@ -148,6 +153,10 @@ export declare interface AudioRecorderProps {
148
153
  className?: string;
149
154
  }
150
155
 
156
+ export declare const audioRecorderVariants: (props?: ({
157
+ size?: "default" | "sm" | "lg" | null | undefined;
158
+ } & ClassProp) | undefined) => string;
159
+
151
160
  export declare interface AudioTrack {
152
161
  id: string;
153
162
  src: string;
@@ -1053,7 +1062,7 @@ export declare interface ImageCompareProps extends React_2.HTMLAttributes<HTMLDi
1053
1062
  onPositionChange?: (position: number) => void;
1054
1063
  }
1055
1064
 
1056
- export declare function ImageCropper({ src, aspectRatio, minSize, maxSize, initialCrop, outputFormat, outputQuality, onCropComplete, onCropChange, showGrid, circular, className, }: ImageCropperProps): JSX_2.Element;
1065
+ export declare const ImageCropper: React_2.ForwardRefExoticComponent<ImageCropperProps & React_2.RefAttributes<HTMLDivElement>>;
1057
1066
 
1058
1067
  export declare interface ImageCropperProps {
1059
1068
  src: string;
@@ -1065,6 +1074,7 @@ export declare interface ImageCropperProps {
1065
1074
  outputQuality?: number;
1066
1075
  onCropComplete?: (blob: Blob, dataUrl: string) => void;
1067
1076
  onCropChange?: (crop: CropArea) => void;
1077
+ onError?: (error: Error) => void;
1068
1078
  showGrid?: boolean;
1069
1079
  circular?: boolean;
1070
1080
  className?: string;
@@ -1108,7 +1118,11 @@ export declare function Lead({ className, ...props }: LeadProps): JSX_2.Element;
1108
1118
  export declare interface LeadProps extends React_2.HTMLAttributes<HTMLParagraphElement> {
1109
1119
  }
1110
1120
 
1111
- export declare function Lightbox({ images, open: controlledOpen, defaultIndex, onClose, onIndexChange, enableZoom, enableKeyboard, showCounter, showThumbnails, className, children, }: LightboxProps): JSX_2.Element | null;
1121
+ export declare function Lightbox({ images, open: controlledOpen, defaultIndex, onClose, onIndexChange, enableZoom, enableKeyboard, enableDownload, showCounter, showThumbnails, className, children, }: LightboxProps): JSX_2.Element | null;
1122
+
1123
+ export declare namespace Lightbox {
1124
+ var displayName: string;
1125
+ }
1112
1126
 
1113
1127
  export declare interface LightboxImage {
1114
1128
  src: string;
@@ -1125,9 +1139,9 @@ export declare interface LightboxProps {
1125
1139
  onIndexChange?: (index: number) => void;
1126
1140
  enableZoom?: boolean;
1127
1141
  enableKeyboard?: boolean;
1142
+ enableDownload?: boolean;
1128
1143
  showCounter?: boolean;
1129
1144
  showThumbnails?: boolean;
1130
- animationDuration?: number;
1131
1145
  className?: string;
1132
1146
  children?: React_2.ReactNode;
1133
1147
  }
@@ -1363,13 +1377,18 @@ export declare interface NUILocale {
1363
1377
  audioPlayer_unmute: string;
1364
1378
  audioPlayer_seek: string;
1365
1379
  audioPlayer_volume: string;
1380
+ audioPlayer_error: string;
1381
+ audioPlayer_loading: string;
1366
1382
  audioRecorder_startRecording: string;
1367
1383
  audioRecorder_stopRecording: string;
1368
1384
  audioRecorder_pauseRecording: string;
1369
1385
  audioRecorder_resumeRecording: string;
1370
1386
  audioRecorder_reRecord: string;
1371
1387
  audioRecorder_microphoneAccess: string;
1388
+ audioRecorder_error: string;
1389
+ audioRecorder_permissionDenied: string;
1372
1390
  audioWaveform_label: string;
1391
+ audioWaveform_error: string;
1373
1392
  audioPlaylist_shuffle: string;
1374
1393
  audioPlaylist_repeatOff: string;
1375
1394
  audioPlaylist_repeatAll: string;
@@ -1378,6 +1397,7 @@ export declare interface NUILocale {
1378
1397
  audioPlaylist_nextTrack: string;
1379
1398
  /** Use {current} and {total} placeholders */
1380
1399
  audioPlaylist_trackOf: string;
1400
+ audioPlaylist_empty: string;
1381
1401
  videoPlayer_play: string;
1382
1402
  videoPlayer_pause: string;
1383
1403
  videoPlayer_mute: string;
@@ -1389,7 +1409,10 @@ export declare interface NUILocale {
1389
1409
  videoPlayer_pictureInPicture: string;
1390
1410
  videoPlayer_playbackSpeed: string;
1391
1411
  videoPlayer_subtitles: string;
1412
+ videoPlayer_subtitlesOff: string;
1392
1413
  videoPlayer_label: string;
1414
+ videoPlayer_loading: string;
1415
+ videoPlayer_error: string;
1393
1416
  videoRecorder_startCamera: string;
1394
1417
  videoRecorder_shareScreen: string;
1395
1418
  videoRecorder_startRecording: string;
@@ -1399,6 +1422,8 @@ export declare interface NUILocale {
1399
1422
  videoRecorder_reRecord: string;
1400
1423
  videoRecorder_cameraPreview: string;
1401
1424
  videoRecorder_screenPreview: string;
1425
+ videoRecorder_error: string;
1426
+ videoRecorder_permissionDenied: string;
1402
1427
  /** Use {title} placeholder */
1403
1428
  videoThumbnail_play: string;
1404
1429
  videoGallery_label: string;
@@ -1410,9 +1435,11 @@ export declare interface NUILocale {
1410
1435
  lightbox_zoomOut: string;
1411
1436
  /** Use {current} and {total} placeholders */
1412
1437
  lightbox_imageOf: string;
1438
+ lightbox_download: string;
1413
1439
  imageCropper_label: string;
1414
1440
  imageCropper_crop: string;
1415
1441
  imageCropper_reset: string;
1442
+ imageCropper_cropFailed: string;
1416
1443
  imageCompare_slider: string;
1417
1444
  imageCompare_before: string;
1418
1445
  imageCompare_after: string;
@@ -1928,9 +1955,9 @@ export declare interface VideoGalleryProps extends React_2.HTMLAttributes<HTMLDi
1928
1955
  onVideoSelect?: (video: VideoGalleryItem, index: number) => void;
1929
1956
  }
1930
1957
 
1931
- export declare function VideoPlayer({ src, poster, showControls, controlsTimeout, enablePiP, enableFullscreen, enablePlaybackRate, playbackRates, tracks, aspectRatio, autoPlay, loop, muted: mutedProp, preload, onPlay, onPause, onEnded, onTimeUpdate, onFullscreenChange, className, }: VideoPlayerProps): JSX_2.Element;
1958
+ export declare const VideoPlayer: React_2.ForwardRefExoticComponent<VideoPlayerProps & React_2.RefAttributes<HTMLVideoElement>>;
1932
1959
 
1933
- export declare interface VideoPlayerProps {
1960
+ export declare interface VideoPlayerProps extends VariantProps<typeof videoPlayerVariants> {
1934
1961
  src: string;
1935
1962
  poster?: string;
1936
1963
  showControls?: boolean;
@@ -1953,7 +1980,11 @@ export declare interface VideoPlayerProps {
1953
1980
  className?: string;
1954
1981
  }
1955
1982
 
1956
- export declare function VideoRecorder({ source, videoConstraints, audioConstraints, mimeType, maxDuration, showTimer, mirrored, onRecordingComplete, onRecordingStart, onError, className, }: VideoRecorderProps): JSX_2.Element;
1983
+ export declare const videoPlayerVariants: (props?: ({
1984
+ size?: "default" | "sm" | "lg" | null | undefined;
1985
+ } & ClassProp) | undefined) => string;
1986
+
1987
+ export declare const VideoRecorder: React_2.ForwardRefExoticComponent<VideoRecorderProps & React_2.RefAttributes<HTMLDivElement>>;
1957
1988
 
1958
1989
  export declare interface VideoRecorderProps {
1959
1990
  source?: "camera" | "screen";