@krizaka/ui 3.28.0 → 3.29.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 +2 -0
- package/dist/blocks.css +2 -0
- package/dist/docs-hub-page.d.ts +7 -1
- package/dist/docs-hub-page.js +2 -2
- package/dist/docs-hub-page.js.map +1 -1
- package/dist/engine-flow.d.ts +97 -0
- package/dist/engine-flow.js +214 -0
- package/dist/engine-flow.js.map +1 -0
- package/dist/motion.css +121 -1
- package/dist/native.d.ts +21 -5
- package/dist/native.js +65 -32
- package/dist/native.js.map +1 -1
- package/package.json +20 -6
- package/registry/account-menu.json +1 -1
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +1 -1
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chat.json +55 -8
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cover-hero.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +16 -2
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +280 -0
- package/registry/error-page.json +1 -1
- package/registry/examples/chat/native/assistant.d.ts +4 -0
- package/registry/examples/chat/native/assistant.dark.png +0 -0
- package/registry/examples/chat/native/assistant.js +32 -0
- package/registry/examples/chat/native/assistant.light.png +0 -0
- package/registry/examples/chat/native/assistant.tsx +28 -0
- package/registry/examples/engine-flow/compact.d.ts +4 -0
- package/registry/examples/engine-flow/compact.js +33 -0
- package/registry/examples/engine-flow/compact.tsx +30 -0
- package/registry/examples/engine-flow/radial.d.ts +4 -0
- package/registry/examples/engine-flow/radial.js +37 -0
- package/registry/examples/engine-flow/radial.tsx +32 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +37 -6
- package/registry/iso.json +3 -3
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +1 -1
- package/registry/media-grid.json +1 -1
- package/registry/meta-row.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +2 -2
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +2 -2
- package/registry/recipes.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/showcase.json +1 -1
- package/registry/site-footer.json +2 -2
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/waveform.json +1 -1
package/dist/native.d.ts
CHANGED
|
@@ -385,8 +385,10 @@ type MessageBubbleLabels = {
|
|
|
385
385
|
retry?: string;
|
|
386
386
|
};
|
|
387
387
|
type MessageBubbleProps = {
|
|
388
|
-
/** The text. */
|
|
389
|
-
text
|
|
388
|
+
/** The text. Optional when `children` is given (then it is only the bubble's spoken name). */
|
|
389
|
+
text?: string;
|
|
390
|
+
/** Rich content in the bubble's shape instead of `text` — a model's answer in `Markdown`. */
|
|
391
|
+
children?: React$1.ReactNode;
|
|
390
392
|
/** Yours (right, in the accent) or theirs (left). */
|
|
391
393
|
mine?: boolean;
|
|
392
394
|
/** The time, written by the app (“14:02”). */
|
|
@@ -407,7 +409,7 @@ type MessageBubbleProps = {
|
|
|
407
409
|
style?: StyleProp<ViewStyle>;
|
|
408
410
|
};
|
|
409
411
|
/** A message: yours in the accent on the right, theirs on the left, the time inside, the receipt under the last of yours. */
|
|
410
|
-
declare function MessageBubble({ text, mine, time, status, showStatus, context, onRetry, grouped, labels, style }: MessageBubbleProps): React$1.JSX.Element;
|
|
412
|
+
declare function MessageBubble({ text, children, mine, time, status, showStatus, context, onRetry, grouped, labels, style }: MessageBubbleProps): React$1.JSX.Element;
|
|
411
413
|
type TypingIndicatorProps = {
|
|
412
414
|
/** What is said to screen readers and shown beside the dots (“Elena is typing”) — passed translated. */
|
|
413
415
|
label: string;
|
|
@@ -433,13 +435,27 @@ type MessageComposerProps = {
|
|
|
433
435
|
leading?: React$1.ReactNode;
|
|
434
436
|
/** Cannot write (blocked, read-only): the reason in its place. */
|
|
435
437
|
disabledReason?: string;
|
|
438
|
+
/** A line above the input: a `ComposerMeta` (the model chip, a status), shown only when the app computes it true. */
|
|
439
|
+
meta?: React$1.ReactNode;
|
|
436
440
|
/** The longest message. Default 4000. */
|
|
437
441
|
maxLength?: number;
|
|
438
442
|
/** Styles merged last. */
|
|
439
443
|
style?: StyleProp<ViewStyle>;
|
|
440
444
|
};
|
|
441
445
|
/** Where a message is written: a growing input, an attach slot, a send button that wakes when there is something to send. */
|
|
442
|
-
declare function MessageComposer({ value, onValueChange, onSend, placeholder, sendLabel, leading, disabledReason, maxLength, style }: MessageComposerProps): React$1.JSX.Element;
|
|
446
|
+
declare function MessageComposer({ value, onValueChange, onSend, placeholder, sendLabel, leading, disabledReason, meta, maxLength, style }: MessageComposerProps): React$1.JSX.Element;
|
|
447
|
+
type ComposerMetaProps = {
|
|
448
|
+
/** The model in use: a chip that opens a choice. */
|
|
449
|
+
model?: {
|
|
450
|
+
label: string;
|
|
451
|
+
onPress: () => void;
|
|
452
|
+
accessibilityLabel?: string;
|
|
453
|
+
};
|
|
454
|
+
/** A status line with a shield ("0 bytes left your network"): pass it only when the app computes it true. */
|
|
455
|
+
status?: string;
|
|
456
|
+
};
|
|
457
|
+
/** The line above a `MessageComposer`: the model chip and, only when true, a status line with a shield. */
|
|
458
|
+
declare function ComposerMeta({ model, status }: ComposerMetaProps): React$1.JSX.Element | null;
|
|
443
459
|
type ConversationItemProps = {
|
|
444
460
|
/** The other person's name. */
|
|
445
461
|
name: string;
|
|
@@ -2529,4 +2545,4 @@ declare function YomizakaMark({ size, animated, title, neutral }: NativeMarkProp
|
|
|
2529
2545
|
*/
|
|
2530
2546
|
declare function YororisMark({ size, animated, title, neutral }: NativeMarkProps): React__default.JSX.Element;
|
|
2531
2547
|
|
|
2532
|
-
export { ActionSheet, type ActionSheetAction, type ActionSheetProps, type ActivityEvent, ActivityFeed, type ActivityFeedLabels, type ActivityFeedProps, type ActivityTone, AkinazaMark, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, AvatarRoot, type AvatarSize, Badge, type BadgeProps, type BadgeTone, type BrandId, BrandedRefresh, type BrandedRefreshProps, type BrandedRefreshScrollProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarLabels, type CalendarProps, Card, CardBody, type CardBodyProps, CardDescription, CardFooter, CardImage, type CardImageProps, CardMedia, type CardMediaProps, CardOverlay, type CardOverlayProps, CardRoot, type CardRootProps, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipGroupProps, type ChipProps, type ChipSize, Combobox, type ComboboxLabels, type ComboboxProps, ConversationItem, type ConversationItemProps, Countdown, type CountdownProps, type CountdownUnits, DateField, type DateFieldLabels, type DateFieldProps, type DatePart, DateWheel, type DateWheelProps, DayStrip, type DayStripProps, type DefaultAvatar, type DefaultAvatarBrand, type DescriptionItem, DescriptionList, type DescriptionListProps, EmptyState, type EmptyStateProps, ErrorState, Fab, type FabProps, ForceUpdateScreen, type ForceUpdateScreenProps, GoalGauge, type GoalGaugeProps, type GridPhoto, type HapticKind, Header, type HeaderProps, IconButton, type IconButtonProps, ImageViewer, type ImageViewerProps, type Insets, KachizakaMark, KrizakaMark, Loader, LoaderGlyph, type LoaderGlyphProps, type LoaderProps, LoadingState, MaintenanceScreen, type MaintenanceScreenProps, Mascot, type MascotProps, MascotState, type MascotStateProps, MatchDialog, type MatchDialogProps, MessageBubble, type MessageBubbleLabels, type MessageBubbleProps, MessageComposer, type MessageComposerProps, type MessageStatus, MetaRow, type MetaRowProps, Meter, type MeterPart, type MeterProps, type Mode, MonthPicker, type MonthPickerProps, type Motion, type NativeMarkProps, NumberTicker, type NumberTickerProps, Onboarding, type OnboardingProps, type OnboardingSlide, OrazakaMark, OrochiaMark, OtpInput, type OtpInputProps, Pagination, type PaginationLabels, type PaginationProps, PermissionPrompt, type PermissionPromptProps, type PermissionStatus, PersonCard, type PersonCardProps, Phoenix, type PhoenixProps, PhotoGrid, type PhotoGridLabels, type PhotoGridProps, ProductMark, ProfileCard, type ProfileCardProps, type ProfileStat, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, Screen, type ScreenProps, SearchField, type SearchFieldProps, Segmented, type SegmentedOption, type SegmentedProps, Select, type SelectOption, type SelectProps, SettingsGroup, type SettingsGroupProps, SettingsRow, type SettingsRowProps, Sheet, type SheetProps, Showcase, type ShowcaseLabels, type ShowcaseProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, SplashHandoff, type SplashHandoffProps, type Step, StepProgress, type StepProgressProps, type StepStatus, Stepper, type StepperProps, SuccessState, type SwipeAction, SwipeDeck, type SwipeDeckLabels, type SwipeDeckProps, type SwipeDirection, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TabBar, type TabBarItem, type TabBarProps, type TabItem, Tabs, type TabsProps, type TagOption, TagSelector, type TagSelectorProps, TextField, type TextFieldProps, type Theme, type ThemeContextValue, type ThemeFonts, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerLabels, type TimePickerProps, type TimeValue, type ToastItem, type ToastOptions, type ToastTone, Toaster, type ToasterProps, Txt, type TxtProps, type TxtTone, type TxtVariant, TypingIndicator, type TypingIndicatorProps, UpdatePrompt, type UpdatePromptProps, VerifiedBadge, type VerifiedBadgeProps, type ViewerImage, Waveform, type WaveformProps, WelcomeState, Wheel, WheelDivider, type WheelOption, WheelPicker, type WheelPickerProps, type WheelProps, YasakiaMark, YazakiaMark, YomizakaMark, YororisMark, addDays, addMonths, ageOn, alpha, calendarLabels, comboboxLabels, composeDate, dateFieldLabels, datePartsOrder, daysInMonth, defaultAvatarUrl, formatTime, isRealDate, latestBirthDate, monthNames, prefetchNeighbours, showcaseLabels, splitDuration, textStyles, timeSlots, timeToMinutes, toast, todayIso, useCollapsingHeader, useCountdown, useDelayedWait, useReducedMotion, useTheme, uses12Hours };
|
|
2548
|
+
export { ActionSheet, type ActionSheetAction, type ActionSheetProps, type ActivityEvent, ActivityFeed, type ActivityFeedLabels, type ActivityFeedProps, type ActivityTone, AkinazaMark, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, AvatarRoot, type AvatarSize, Badge, type BadgeProps, type BadgeTone, type BrandId, BrandedRefresh, type BrandedRefreshProps, type BrandedRefreshScrollProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarLabels, type CalendarProps, Card, CardBody, type CardBodyProps, CardDescription, CardFooter, CardImage, type CardImageProps, CardMedia, type CardMediaProps, CardOverlay, type CardOverlayProps, CardRoot, type CardRootProps, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipGroupProps, type ChipProps, type ChipSize, Combobox, type ComboboxLabels, type ComboboxProps, ComposerMeta, type ComposerMetaProps, ConversationItem, type ConversationItemProps, Countdown, type CountdownProps, type CountdownUnits, DateField, type DateFieldLabels, type DateFieldProps, type DatePart, DateWheel, type DateWheelProps, DayStrip, type DayStripProps, type DefaultAvatar, type DefaultAvatarBrand, type DescriptionItem, DescriptionList, type DescriptionListProps, EmptyState, type EmptyStateProps, ErrorState, Fab, type FabProps, ForceUpdateScreen, type ForceUpdateScreenProps, GoalGauge, type GoalGaugeProps, type GridPhoto, type HapticKind, Header, type HeaderProps, IconButton, type IconButtonProps, ImageViewer, type ImageViewerProps, type Insets, KachizakaMark, KrizakaMark, Loader, LoaderGlyph, type LoaderGlyphProps, type LoaderProps, LoadingState, MaintenanceScreen, type MaintenanceScreenProps, Mascot, type MascotProps, MascotState, type MascotStateProps, MatchDialog, type MatchDialogProps, MessageBubble, type MessageBubbleLabels, type MessageBubbleProps, MessageComposer, type MessageComposerProps, type MessageStatus, MetaRow, type MetaRowProps, Meter, type MeterPart, type MeterProps, type Mode, MonthPicker, type MonthPickerProps, type Motion, type NativeMarkProps, NumberTicker, type NumberTickerProps, Onboarding, type OnboardingProps, type OnboardingSlide, OrazakaMark, OrochiaMark, OtpInput, type OtpInputProps, Pagination, type PaginationLabels, type PaginationProps, PermissionPrompt, type PermissionPromptProps, type PermissionStatus, PersonCard, type PersonCardProps, Phoenix, type PhoenixProps, PhotoGrid, type PhotoGridLabels, type PhotoGridProps, ProductMark, ProfileCard, type ProfileCardProps, type ProfileStat, Progress, type ProgressProps, PullToRefresh, type PullToRefreshProps, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, Screen, type ScreenProps, SearchField, type SearchFieldProps, Segmented, type SegmentedOption, type SegmentedProps, Select, type SelectOption, type SelectProps, SettingsGroup, type SettingsGroupProps, SettingsRow, type SettingsRowProps, Sheet, type SheetProps, Showcase, type ShowcaseLabels, type ShowcaseProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, SplashHandoff, type SplashHandoffProps, type Step, StepProgress, type StepProgressProps, type StepStatus, Stepper, type StepperProps, SuccessState, type SwipeAction, SwipeDeck, type SwipeDeckLabels, type SwipeDeckProps, type SwipeDirection, SwipeableRow, type SwipeableRowProps, Switch, type SwitchProps, TabBar, type TabBarItem, type TabBarProps, type TabItem, Tabs, type TabsProps, type TagOption, TagSelector, type TagSelectorProps, TextField, type TextFieldProps, type Theme, type ThemeContextValue, type ThemeFonts, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerLabels, type TimePickerProps, type TimeValue, type ToastItem, type ToastOptions, type ToastTone, Toaster, type ToasterProps, Txt, type TxtProps, type TxtTone, type TxtVariant, TypingIndicator, type TypingIndicatorProps, UpdatePrompt, type UpdatePromptProps, VerifiedBadge, type VerifiedBadgeProps, type ViewerImage, Waveform, type WaveformProps, WelcomeState, Wheel, WheelDivider, type WheelOption, WheelPicker, type WheelPickerProps, type WheelProps, YasakiaMark, YazakiaMark, YomizakaMark, YororisMark, addDays, addMonths, ageOn, alpha, calendarLabels, comboboxLabels, composeDate, dateFieldLabels, datePartsOrder, daysInMonth, defaultAvatarUrl, formatTime, isRealDate, latestBirthDate, monthNames, prefetchNeighbours, showcaseLabels, splitDuration, textStyles, timeSlots, timeToMinutes, toast, todayIso, useCollapsingHeader, useCountdown, useDelayedWait, useReducedMotion, useTheme, uses12Hours };
|
package/dist/native.js
CHANGED
|
@@ -1304,7 +1304,7 @@ import { Animated as Animated3, Easing as Easing2, Pressable as Pressable4, Styl
|
|
|
1304
1304
|
import Svg4, { Path as Path2 } from "react-native-svg";
|
|
1305
1305
|
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1306
1306
|
var STATUS = { sending: "Sending", sent: "Sent", delivered: "Delivered", read: "Read", failed: "Not sent" };
|
|
1307
|
-
function MessageBubble({ text, mine, time, status, showStatus, context, onRetry, grouped = "single", labels, style }) {
|
|
1307
|
+
function MessageBubble({ text, children, mine, time, status, showStatus, context, onRetry, grouped = "single", labels, style }) {
|
|
1308
1308
|
const { theme, radius: radius3 } = useTheme();
|
|
1309
1309
|
const words2 = { ...STATUS, ...labels?.status };
|
|
1310
1310
|
const failed = status === "failed";
|
|
@@ -1323,12 +1323,13 @@ function MessageBubble({ text, mine, time, status, showStatus, context, onRetry,
|
|
|
1323
1323
|
],
|
|
1324
1324
|
children: [
|
|
1325
1325
|
context ? /* @__PURE__ */ jsx10(Txt, { variant: "caption", tone: mine ? "onAccent" : "secondary", style: styles8.context, children: context }) : null,
|
|
1326
|
-
/* @__PURE__ */ jsx10(Txt, { tone: tone3, children: text }),
|
|
1326
|
+
children ?? /* @__PURE__ */ jsx10(Txt, { tone: tone3, children: text }),
|
|
1327
1327
|
time ? /* @__PURE__ */ jsx10(Txt, { variant: "caption", tone: tone3, style: styles8.time, children: time }) : null
|
|
1328
1328
|
]
|
|
1329
1329
|
}
|
|
1330
1330
|
);
|
|
1331
|
-
const
|
|
1331
|
+
const rich = children !== void 0 && !text;
|
|
1332
|
+
const name = rich && !failed ? void 0 : [text, time, failed ? `${words2.failed}. ${labels?.retry ?? ""}` : null].filter(Boolean).join(", ");
|
|
1332
1333
|
return /* @__PURE__ */ jsxs7(View7, { style: [styles8.row, mine ? styles8.mine : styles8.theirs, style], children: [
|
|
1333
1334
|
failed && onRetry ? /* @__PURE__ */ jsx10(Pressable4, { role: "button", "aria-label": name, onPress: onRetry, style: styles8.max, children: bubble }) : /* @__PURE__ */ jsx10(View7, { accessible: true, "aria-label": name, style: styles8.max, children: bubble }),
|
|
1334
1335
|
showStatus && status ? /* @__PURE__ */ jsxs7(View7, { style: styles8.status, children: [
|
|
@@ -1362,40 +1363,66 @@ function TypingIndicator({ label, showLabel, style }) {
|
|
|
1362
1363
|
showLabel ? /* @__PURE__ */ jsx10(Txt, { variant: "caption", tone: "secondary", children: label }) : null
|
|
1363
1364
|
] });
|
|
1364
1365
|
}
|
|
1365
|
-
function MessageComposer({ value, onValueChange, onSend, placeholder, sendLabel, leading, disabledReason, maxLength = 4e3, style }) {
|
|
1366
|
+
function MessageComposer({ value, onValueChange, onSend, placeholder, sendLabel, leading, disabledReason, meta, maxLength = 4e3, style }) {
|
|
1366
1367
|
const { theme, radius: radius3, insets, haptic } = useTheme();
|
|
1367
1368
|
const ready = value.trim().length > 0;
|
|
1368
|
-
return /* @__PURE__ */
|
|
1369
|
-
|
|
1370
|
-
/* @__PURE__ */ jsx10(
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1369
|
+
return /* @__PURE__ */ jsxs7(View7, { style: [styles8.composerBox, { borderTopColor: theme.borderSubtle, backgroundColor: theme.surface0, paddingBottom: 8 + insets.bottom }, style], children: [
|
|
1370
|
+
meta && !disabledReason ? /* @__PURE__ */ jsx10(View7, { style: styles8.meta, children: meta }) : null,
|
|
1371
|
+
/* @__PURE__ */ jsx10(View7, { style: styles8.composer, children: disabledReason ? /* @__PURE__ */ jsx10(Txt, { tone: "secondary", style: styles8.flex, children: disabledReason }) : /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
1372
|
+
leading,
|
|
1373
|
+
/* @__PURE__ */ jsx10(
|
|
1374
|
+
TextInput,
|
|
1375
|
+
{
|
|
1376
|
+
"aria-label": placeholder,
|
|
1377
|
+
value,
|
|
1378
|
+
onChangeText: onValueChange,
|
|
1379
|
+
placeholder,
|
|
1380
|
+
placeholderTextColor: theme.textMuted,
|
|
1381
|
+
multiline: true,
|
|
1382
|
+
maxLength,
|
|
1383
|
+
style: [styles8.input, { borderRadius: radius3.xl, borderColor: theme.borderDefault, backgroundColor: theme.surface1, color: theme.textPrimary }]
|
|
1384
|
+
}
|
|
1385
|
+
),
|
|
1386
|
+
/* @__PURE__ */ jsx10(
|
|
1387
|
+
Pressable4,
|
|
1388
|
+
{
|
|
1389
|
+
role: "button",
|
|
1390
|
+
"aria-label": sendLabel,
|
|
1391
|
+
"aria-disabled": !ready,
|
|
1392
|
+
disabled: !ready,
|
|
1393
|
+
onPress: () => {
|
|
1394
|
+
haptic("impact");
|
|
1395
|
+
onSend();
|
|
1396
|
+
},
|
|
1397
|
+
style: ({ pressed }) => [styles8.send, { backgroundColor: ready ? pressed ? theme.accentHover : theme.accent : theme.surface3 }],
|
|
1398
|
+
children: /* @__PURE__ */ jsx10(Svg4, { width: 18, height: 18, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx10(Path2, { d: "M4 12l16-8-6 16-2.5-6.5L4 12z", fill: ready ? theme.onAccent : theme.textMuted }) })
|
|
1399
|
+
}
|
|
1400
|
+
)
|
|
1401
|
+
] }) })
|
|
1402
|
+
] });
|
|
1403
|
+
}
|
|
1404
|
+
function ComposerMeta({ model, status }) {
|
|
1405
|
+
const { theme } = useTheme();
|
|
1406
|
+
if (!model && !status) return null;
|
|
1407
|
+
return /* @__PURE__ */ jsxs7(View7, { style: styles8.metaRow, children: [
|
|
1408
|
+
model ? /* @__PURE__ */ jsxs7(
|
|
1384
1409
|
Pressable4,
|
|
1385
1410
|
{
|
|
1386
1411
|
role: "button",
|
|
1387
|
-
"aria-label":
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
style: ({ pressed }) => [styles8.send, { backgroundColor: ready ? pressed ? theme.accentHover : theme.accent : theme.surface3 }],
|
|
1395
|
-
children: /* @__PURE__ */ jsx10(Svg4, { width: 18, height: 18, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx10(Path2, { d: "M4 12l16-8-6 16-2.5-6.5L4 12z", fill: ready ? theme.onAccent : theme.textMuted }) })
|
|
1412
|
+
"aria-label": model.accessibilityLabel ?? model.label,
|
|
1413
|
+
onPress: model.onPress,
|
|
1414
|
+
style: ({ pressed }) => [styles8.modelChip, { borderColor: theme.borderDefault, backgroundColor: pressed ? theme.surface3 : theme.surface1 }],
|
|
1415
|
+
children: [
|
|
1416
|
+
/* @__PURE__ */ jsx10(Txt, { variant: "caption", tone: "secondary", style: styles8.bold, children: model.label }),
|
|
1417
|
+
/* @__PURE__ */ jsx10(Svg4, { width: 12, height: 12, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx10(Path2, { d: "m6 9 6 6 6-6", fill: "none", stroke: theme.textMuted, strokeWidth: 2.4, strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1418
|
+
]
|
|
1396
1419
|
}
|
|
1397
|
-
)
|
|
1398
|
-
|
|
1420
|
+
) : null,
|
|
1421
|
+
status ? /* @__PURE__ */ jsxs7(View7, { style: styles8.statusLine, children: [
|
|
1422
|
+
/* @__PURE__ */ jsx10(Svg4, { width: 14, height: 14, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx10(Path2, { d: "M12 3l7 3v5c0 4.5-3 8-7 10-4-2-7-5.5-7-10V6l7-3z", fill: "none", stroke: theme.successText, strokeWidth: 2, strokeLinejoin: "round" }) }),
|
|
1423
|
+
/* @__PURE__ */ jsx10(Txt, { variant: "caption", tone: "success", children: status })
|
|
1424
|
+
] }) : null
|
|
1425
|
+
] });
|
|
1399
1426
|
}
|
|
1400
1427
|
function ConversationItem({ name, avatar, presence, presenceLabel, preview, typing, time, unread = 0, unreadLabel, onPress, style }) {
|
|
1401
1428
|
const { theme, radius: radius3 } = useTheme();
|
|
@@ -1436,7 +1463,12 @@ var styles8 = StyleSheet8.create({
|
|
|
1436
1463
|
typingRow: { flexDirection: "row", alignItems: "center", gap: 8, alignSelf: "flex-start" },
|
|
1437
1464
|
typing: { flexDirection: "row", gap: 4, paddingHorizontal: 14, paddingVertical: 12 },
|
|
1438
1465
|
dot: { width: 7, height: 7, borderRadius: 4 },
|
|
1439
|
-
|
|
1466
|
+
composerBox: { paddingTop: 8, borderTopWidth: StyleSheet8.hairlineWidth },
|
|
1467
|
+
composer: { flexDirection: "row", alignItems: "flex-end", gap: 8, paddingHorizontal: 12 },
|
|
1468
|
+
meta: { paddingHorizontal: 12, paddingBottom: 6 },
|
|
1469
|
+
metaRow: { flexDirection: "row", alignItems: "center", flexWrap: "wrap", gap: 8 },
|
|
1470
|
+
modelChip: { flexDirection: "row", alignItems: "center", gap: 4, minHeight: 32, paddingHorizontal: 10, borderRadius: 16, borderWidth: StyleSheet8.hairlineWidth },
|
|
1471
|
+
statusLine: { flexDirection: "row", alignItems: "center", gap: 4 },
|
|
1440
1472
|
input: { flex: 1, maxHeight: 120, minHeight: 40, borderWidth: 1, paddingHorizontal: 14, paddingTop: 10, paddingBottom: 10, fontSize: 16 },
|
|
1441
1473
|
send: { width: 40, height: 40, borderRadius: 20, alignItems: "center", justifyContent: "center" },
|
|
1442
1474
|
flex: { flex: 1 },
|
|
@@ -6133,6 +6165,7 @@ export {
|
|
|
6133
6165
|
Checkbox,
|
|
6134
6166
|
Chip,
|
|
6135
6167
|
Combobox,
|
|
6168
|
+
ComposerMeta,
|
|
6136
6169
|
ConversationItem,
|
|
6137
6170
|
Countdown,
|
|
6138
6171
|
DateField,
|