@sesionario/blocks 1.3.1 → 1.4.0
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.cjs +314 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -4
- package/dist/index.d.ts +34 -4
- package/dist/index.js +263 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -334,6 +334,8 @@ interface EmojiPickerPopoverProps extends EmojiPickerProps {
|
|
|
334
334
|
triggerLabel?: string;
|
|
335
335
|
/** Extra classes for the trigger button. */
|
|
336
336
|
triggerClassName?: string;
|
|
337
|
+
/** Disable the trigger (e.g. when the host field is disabled). */
|
|
338
|
+
disabled?: boolean;
|
|
337
339
|
/** Popover side. Default `"top"`. */
|
|
338
340
|
side?: React.ComponentProps<typeof PopoverContent>["side"];
|
|
339
341
|
/** Popover alignment. Default `"end"`. */
|
|
@@ -347,10 +349,38 @@ interface EmojiPickerPopoverProps extends EmojiPickerProps {
|
|
|
347
349
|
}
|
|
348
350
|
/**
|
|
349
351
|
* Convenience wrapper: a `Smile` icon button that opens {@link EmojiPicker} in
|
|
350
|
-
* a popover.
|
|
351
|
-
*
|
|
352
|
+
* a popover. Prefer {@link EmojiTextarea} / {@link EmojiInput} for in-field
|
|
353
|
+
* adornment; use this when you need a standalone trigger. Uncontrolled by
|
|
354
|
+
* default; pass `open`/`onOpenChange` to control it.
|
|
355
|
+
*/
|
|
356
|
+
declare function EmojiPickerPopover({ onSelect, triggerLabel, triggerClassName, disabled, side, align, open, onOpenChange, keepOpenOnSelect, locale, ...pickerProps }: EmojiPickerPopoverProps): React.JSX.Element;
|
|
357
|
+
|
|
358
|
+
type PickerPassthrough = Pick<EmojiPickerPopoverProps, "triggerLabel" | "keepOpenOnSelect" | "open" | "onOpenChange" | "side" | "align" | "labels" | "recentLimit" | "storageKey">;
|
|
359
|
+
type EmojiFieldSharedProps = PickerPassthrough & {
|
|
360
|
+
/** Locale for the emoji picker labels. Default `"en"`. */
|
|
361
|
+
locale?: EmojiPickerLocale;
|
|
362
|
+
/** Extra classes for the emoji trigger button. */
|
|
363
|
+
emojiTriggerClassName?: string;
|
|
364
|
+
};
|
|
365
|
+
type EmojiTextareaProps = Omit<React.ComponentProps<"textarea">, "children"> & EmojiFieldSharedProps;
|
|
366
|
+
declare const EmojiTextarea: React.ForwardRefExoticComponent<Omit<EmojiTextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
367
|
+
type EmojiInputProps = Omit<React.ComponentProps<"input">, "children"> & EmojiFieldSharedProps;
|
|
368
|
+
declare const EmojiInput: React.ForwardRefExoticComponent<Omit<EmojiInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Splices `text` into `value` at the current caret (falling back to the end
|
|
372
|
+
* when the element is unfocused/unavailable), returning the new value and the
|
|
373
|
+
* caret position right after the inserted text. Used to insert an emoji into
|
|
374
|
+
* a controlled textarea/input without clobbering whatever the user was
|
|
375
|
+
* typing.
|
|
352
376
|
*/
|
|
353
|
-
declare function
|
|
377
|
+
declare function insertAtCaret(element: {
|
|
378
|
+
selectionStart: number | null;
|
|
379
|
+
selectionEnd: number | null;
|
|
380
|
+
} | null, value: string, text: string): {
|
|
381
|
+
value: string;
|
|
382
|
+
caret: number;
|
|
383
|
+
};
|
|
354
384
|
|
|
355
385
|
/**
|
|
356
386
|
* Playback error description, ported from the app's HLS player but stripped of
|
|
@@ -795,4 +825,4 @@ declare function getAvatarColors(name: string): AvatarColors;
|
|
|
795
825
|
/** CSS style object for `AvatarFallback` (or any letter-avatar container). */
|
|
796
826
|
declare function avatarFallbackStyle(name: string): Pick<AvatarColors, "backgroundColor" | "color">;
|
|
797
827
|
|
|
798
|
-
export { type AutoplayState, type AvatarColors, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type DescribedPlaybackError, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getAvatarColors, getInitials, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
|
|
828
|
+
export { type AutoplayState, type AvatarColors, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type DescribedPlaybackError, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
|
package/dist/index.d.ts
CHANGED
|
@@ -334,6 +334,8 @@ interface EmojiPickerPopoverProps extends EmojiPickerProps {
|
|
|
334
334
|
triggerLabel?: string;
|
|
335
335
|
/** Extra classes for the trigger button. */
|
|
336
336
|
triggerClassName?: string;
|
|
337
|
+
/** Disable the trigger (e.g. when the host field is disabled). */
|
|
338
|
+
disabled?: boolean;
|
|
337
339
|
/** Popover side. Default `"top"`. */
|
|
338
340
|
side?: React.ComponentProps<typeof PopoverContent>["side"];
|
|
339
341
|
/** Popover alignment. Default `"end"`. */
|
|
@@ -347,10 +349,38 @@ interface EmojiPickerPopoverProps extends EmojiPickerProps {
|
|
|
347
349
|
}
|
|
348
350
|
/**
|
|
349
351
|
* Convenience wrapper: a `Smile` icon button that opens {@link EmojiPicker} in
|
|
350
|
-
* a popover.
|
|
351
|
-
*
|
|
352
|
+
* a popover. Prefer {@link EmojiTextarea} / {@link EmojiInput} for in-field
|
|
353
|
+
* adornment; use this when you need a standalone trigger. Uncontrolled by
|
|
354
|
+
* default; pass `open`/`onOpenChange` to control it.
|
|
355
|
+
*/
|
|
356
|
+
declare function EmojiPickerPopover({ onSelect, triggerLabel, triggerClassName, disabled, side, align, open, onOpenChange, keepOpenOnSelect, locale, ...pickerProps }: EmojiPickerPopoverProps): React.JSX.Element;
|
|
357
|
+
|
|
358
|
+
type PickerPassthrough = Pick<EmojiPickerPopoverProps, "triggerLabel" | "keepOpenOnSelect" | "open" | "onOpenChange" | "side" | "align" | "labels" | "recentLimit" | "storageKey">;
|
|
359
|
+
type EmojiFieldSharedProps = PickerPassthrough & {
|
|
360
|
+
/** Locale for the emoji picker labels. Default `"en"`. */
|
|
361
|
+
locale?: EmojiPickerLocale;
|
|
362
|
+
/** Extra classes for the emoji trigger button. */
|
|
363
|
+
emojiTriggerClassName?: string;
|
|
364
|
+
};
|
|
365
|
+
type EmojiTextareaProps = Omit<React.ComponentProps<"textarea">, "children"> & EmojiFieldSharedProps;
|
|
366
|
+
declare const EmojiTextarea: React.ForwardRefExoticComponent<Omit<EmojiTextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
367
|
+
type EmojiInputProps = Omit<React.ComponentProps<"input">, "children"> & EmojiFieldSharedProps;
|
|
368
|
+
declare const EmojiInput: React.ForwardRefExoticComponent<Omit<EmojiInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Splices `text` into `value` at the current caret (falling back to the end
|
|
372
|
+
* when the element is unfocused/unavailable), returning the new value and the
|
|
373
|
+
* caret position right after the inserted text. Used to insert an emoji into
|
|
374
|
+
* a controlled textarea/input without clobbering whatever the user was
|
|
375
|
+
* typing.
|
|
352
376
|
*/
|
|
353
|
-
declare function
|
|
377
|
+
declare function insertAtCaret(element: {
|
|
378
|
+
selectionStart: number | null;
|
|
379
|
+
selectionEnd: number | null;
|
|
380
|
+
} | null, value: string, text: string): {
|
|
381
|
+
value: string;
|
|
382
|
+
caret: number;
|
|
383
|
+
};
|
|
354
384
|
|
|
355
385
|
/**
|
|
356
386
|
* Playback error description, ported from the app's HLS player but stripped of
|
|
@@ -795,4 +825,4 @@ declare function getAvatarColors(name: string): AvatarColors;
|
|
|
795
825
|
/** CSS style object for `AvatarFallback` (or any letter-avatar container). */
|
|
796
826
|
declare function avatarFallbackStyle(name: string): Pick<AvatarColors, "backgroundColor" | "color">;
|
|
797
827
|
|
|
798
|
-
export { type AutoplayState, type AvatarColors, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type DescribedPlaybackError, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getAvatarColors, getInitials, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
|
|
828
|
+
export { type AutoplayState, type AvatarColors, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type DescribedPlaybackError, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, type FeatureEntry, type HlsPlayerMode, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
|