@sesionario/blocks 1.4.0 → 1.5.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/README.md +8 -0
- package/dist/avatar.cjs +89 -0
- package/dist/avatar.cjs.map +1 -0
- package/dist/avatar.d.cts +18 -0
- package/dist/avatar.d.ts +18 -0
- package/dist/avatar.js +85 -0
- package/dist/avatar.js.map +1 -0
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -19
- package/dist/index.d.ts +7 -19
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -1
package/dist/index.d.cts
CHANGED
|
@@ -9,6 +9,7 @@ import * as RPNInput from 'react-phone-number-input';
|
|
|
9
9
|
import { MessageScroller as MessageScroller$1 } from '@shadcn/react/message-scroller';
|
|
10
10
|
export { useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from '@shadcn/react/message-scroller';
|
|
11
11
|
import { ClassValue } from 'clsx';
|
|
12
|
+
export { AvatarColors, avatarFallbackStyle, getAvatarColors, getInitials } from './avatar.cjs';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Blocks Context Interfaces
|
|
@@ -259,6 +260,10 @@ interface AvatarEditorDialogProps {
|
|
|
259
260
|
acceptText?: string;
|
|
260
261
|
/** Cancel button text */
|
|
261
262
|
cancelText?: string;
|
|
263
|
+
/** Saving button text while upload is in progress */
|
|
264
|
+
savingText?: string;
|
|
265
|
+
/** Saved button text after a successful save */
|
|
266
|
+
savedText?: string;
|
|
262
267
|
/** Success message */
|
|
263
268
|
successMessage?: string;
|
|
264
269
|
/** Error message */
|
|
@@ -266,7 +271,7 @@ interface AvatarEditorDialogProps {
|
|
|
266
271
|
/** Additional class names */
|
|
267
272
|
className?: string;
|
|
268
273
|
}
|
|
269
|
-
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, successMessage, errorMessage, className, }: AvatarEditorDialogProps): React.JSX.Element;
|
|
274
|
+
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, savingText, savedText, successMessage, errorMessage, className, }: AvatarEditorDialogProps): React.JSX.Element;
|
|
270
275
|
|
|
271
276
|
/** Category keys, in display order. */
|
|
272
277
|
type EmojiCategoryKey = "smileys" | "people" | "nature" | "food" | "travel" | "activities" | "objects" | "symbols" | "flags";
|
|
@@ -808,21 +813,4 @@ declare function ChatMessageList({ messages, currentUserId, emptyTitle, emptyDes
|
|
|
808
813
|
|
|
809
814
|
declare function cn(...inputs: ClassValue[]): string;
|
|
810
815
|
|
|
811
|
-
type
|
|
812
|
-
backgroundColor: string;
|
|
813
|
-
color: string;
|
|
814
|
-
};
|
|
815
|
-
/**
|
|
816
|
-
* Word-based initials from a display name (max letters, default 2).
|
|
817
|
-
* Empty / whitespace-only names yield `"?"`.
|
|
818
|
-
*/
|
|
819
|
-
declare function getInitials(name: string, max?: number): string;
|
|
820
|
-
/**
|
|
821
|
-
* Deterministic background + contrasting foreground from a full name.
|
|
822
|
-
* Same name (case-insensitive) always maps to the same colors.
|
|
823
|
-
*/
|
|
824
|
-
declare function getAvatarColors(name: string): AvatarColors;
|
|
825
|
-
/** CSS style object for `AvatarFallback` (or any letter-avatar container). */
|
|
826
|
-
declare function avatarFallbackStyle(name: string): Pick<AvatarColors, "backgroundColor" | "color">;
|
|
827
|
-
|
|
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 };
|
|
816
|
+
export { type AutoplayState, 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, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, insertAtCaret, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import * as RPNInput from 'react-phone-number-input';
|
|
|
9
9
|
import { MessageScroller as MessageScroller$1 } from '@shadcn/react/message-scroller';
|
|
10
10
|
export { useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from '@shadcn/react/message-scroller';
|
|
11
11
|
import { ClassValue } from 'clsx';
|
|
12
|
+
export { AvatarColors, avatarFallbackStyle, getAvatarColors, getInitials } from './avatar.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Blocks Context Interfaces
|
|
@@ -259,6 +260,10 @@ interface AvatarEditorDialogProps {
|
|
|
259
260
|
acceptText?: string;
|
|
260
261
|
/** Cancel button text */
|
|
261
262
|
cancelText?: string;
|
|
263
|
+
/** Saving button text while upload is in progress */
|
|
264
|
+
savingText?: string;
|
|
265
|
+
/** Saved button text after a successful save */
|
|
266
|
+
savedText?: string;
|
|
262
267
|
/** Success message */
|
|
263
268
|
successMessage?: string;
|
|
264
269
|
/** Error message */
|
|
@@ -266,7 +271,7 @@ interface AvatarEditorDialogProps {
|
|
|
266
271
|
/** Additional class names */
|
|
267
272
|
className?: string;
|
|
268
273
|
}
|
|
269
|
-
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, successMessage, errorMessage, className, }: AvatarEditorDialogProps): React.JSX.Element;
|
|
274
|
+
declare function AvatarEditorDialog({ value, onChange, onSave, displaySize, editorSize, outputSize, placeholder, editLabel, dialogTitle, acceptText, cancelText, savingText, savedText, successMessage, errorMessage, className, }: AvatarEditorDialogProps): React.JSX.Element;
|
|
270
275
|
|
|
271
276
|
/** Category keys, in display order. */
|
|
272
277
|
type EmojiCategoryKey = "smileys" | "people" | "nature" | "food" | "travel" | "activities" | "objects" | "symbols" | "flags";
|
|
@@ -808,21 +813,4 @@ declare function ChatMessageList({ messages, currentUserId, emptyTitle, emptyDes
|
|
|
808
813
|
|
|
809
814
|
declare function cn(...inputs: ClassValue[]): string;
|
|
810
815
|
|
|
811
|
-
type
|
|
812
|
-
backgroundColor: string;
|
|
813
|
-
color: string;
|
|
814
|
-
};
|
|
815
|
-
/**
|
|
816
|
-
* Word-based initials from a display name (max letters, default 2).
|
|
817
|
-
* Empty / whitespace-only names yield `"?"`.
|
|
818
|
-
*/
|
|
819
|
-
declare function getInitials(name: string, max?: number): string;
|
|
820
|
-
/**
|
|
821
|
-
* Deterministic background + contrasting foreground from a full name.
|
|
822
|
-
* Same name (case-insensitive) always maps to the same colors.
|
|
823
|
-
*/
|
|
824
|
-
declare function getAvatarColors(name: string): AvatarColors;
|
|
825
|
-
/** CSS style object for `AvatarFallback` (or any letter-avatar container). */
|
|
826
|
-
declare function avatarFallbackStyle(name: string): Pick<AvatarColors, "backgroundColor" | "color">;
|
|
827
|
-
|
|
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 };
|
|
816
|
+
export { type AutoplayState, 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, bubbleVariants, cn, createLiveHlsConfig, createVodHlsConfig, defaultLanguages, describePlaybackError, fuzzyMatch, insertAtCaret, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, usePlaybackStats, useSearchHotkey };
|
package/dist/index.js
CHANGED
|
@@ -1956,6 +1956,8 @@ function AvatarEditorDialog({
|
|
|
1956
1956
|
dialogTitle = "Edit Avatar",
|
|
1957
1957
|
acceptText = "Accept",
|
|
1958
1958
|
cancelText = "Cancel",
|
|
1959
|
+
savingText = "Saving...",
|
|
1960
|
+
savedText = "Saved!",
|
|
1959
1961
|
successMessage = "Avatar saved successfully!",
|
|
1960
1962
|
errorMessage = "Failed to save avatar. Please try again.",
|
|
1961
1963
|
className
|
|
@@ -2117,10 +2119,10 @@ function AvatarEditorDialog({
|
|
|
2117
2119
|
)
|
|
2118
2120
|
}
|
|
2119
2121
|
),
|
|
2120
|
-
|
|
2122
|
+
savingText
|
|
2121
2123
|
] }) : feedback?.type === "success" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2122
2124
|
/* @__PURE__ */ jsx(Check, { className: cn("mr-2", isMobile ? "w-5 h-5" : "w-4 h-4") }),
|
|
2123
|
-
|
|
2125
|
+
savedText
|
|
2124
2126
|
] }) : acceptText
|
|
2125
2127
|
}
|
|
2126
2128
|
)
|