@pollinations/ui 0.1.0-alpha.26 → 0.1.0-alpha.28
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/{chunk-2IIX44MN.js → chunk-5D7HRDJS.js} +22 -10
- package/dist/chunk-5D7HRDJS.js.map +1 -0
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/markdown.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2IIX44MN.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -588,6 +588,9 @@ declare function ToolCallDetails({ name, input, output, error, status, defaultOp
|
|
|
588
588
|
/** Class merge for apps consuming the unprefixed Tailwind bridge in app.css. */
|
|
589
589
|
declare function cn(...inputs: (string | undefined | null | false)[]): string;
|
|
590
590
|
|
|
591
|
+
/** A count short enough for a label: 999, 1.2K, 12K, 123K, 1.5M. */
|
|
592
|
+
declare function formatCount(value: number): string;
|
|
593
|
+
|
|
591
594
|
/**
|
|
592
595
|
* Locks page scroll while enabled and restores the original overflow values on
|
|
593
596
|
* cleanup.
|
|
@@ -1006,4 +1009,4 @@ type TextOwnProps<T extends ElementType> = PropsWithChildren<{
|
|
|
1006
1009
|
type TextProps<T extends ElementType = "p"> = TextOwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof TextOwnProps<T>>;
|
|
1007
1010
|
declare function Text<T extends ElementType = "p">({ as, size, tone, weight, className, children, ...rest }: TextProps<T>): react_jsx_runtime.JSX.Element;
|
|
1008
1011
|
|
|
1009
|
-
export { AccountIdentity, AccountIdentityLink, type AccountIdentityLinkProps, type AccountIdentityProps, AccountMenu, type AccountMenuProps, Alert, type AlertProps, AppBrand, type AppBrandProps, AppHeader, type AppHeaderProps, BrandMark, type BrandMarkProps, ButtonAppearance, ButtonGroup, type ButtonGroupProps, ButtonProps, Callout, type CalloutProps, ChatConversation, ChatConversationContent, type ChatConversationContentProps, type ChatConversationProps, ChatMessage, ChatMessageActions, type ChatMessageActionsProps, ChatMessageContent, type ChatMessageContentProps, ChatMessageHeader, type ChatMessageHeaderProps, type ChatMessageProps, type ChatMessageRole, ChatPromptInput, ChatPromptInputFooter, type ChatPromptInputFooterProps, type ChatPromptInputProps, ChatPromptTextarea, ChevronIcon, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, ColorModeToggle, ConfirmationDialog, type ConfirmationDialogProps, ContentHeader, type ContentHeaderProps, CopyButton, type CopyButtonProps, CopyField, type CopyFieldProps, DialogProps, DiscordIcon, Drawer, type DrawerProps, Dropdown, DropdownItem, type DropdownItemProps, type DropdownProps, EditableCombobox, type EditableComboboxProps, EditableComboboxToken, type EditableComboboxTokenProps, EmptyState, type EmptyStateProps, ExternalLinkButton, type ExternalLinkButtonProps, Eyebrow, type EyebrowProps, FieldStack, type FieldStackProps, FileUpload, type FileUploadProps, GitHubIcon, Heading, type HeadingProps, IconButton, type IconButtonIntent, type IconButtonProps, type IconButtonVariant, IconProps, IconTile, type IconTileProps, InfoTip, InlineLink, type InlineLinkProps, Input, type InputProps, KeyChip, type KeyChipProps, LinkCard, type LinkCardProps, LiveDot, LoadingStatus, MediaPlaceholder, type MediaPlaceholderProps, MultiSelect, type MultiSelectProps, NavItem, type NavItemProps, OUTAGE_MESSAGE, OutageNotice, type OutageNoticeProps, type PeriodGranularity, PeriodPicker, type PeriodPickerProps, type PeriodSelection, ScrollAreaProps, Section, type SectionProps, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Skeleton, type SkeletonProps, Slider, type SliderProps, SocialCount, type SocialCountProps, StableLabel, type StableLabelProps, StatCard, type StatCardProps, Surface, type SurfaceProps, Switch, type SwitchProps, type SwitchSize, type SwitchStatus, TabButton, type TabButtonProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableDisclosureButton, type TableDisclosureButtonProps, TableHead, type TableHeadProps, TableHeaderCell, type TableHeaderCellProps, type TableProps, TableRow, type TableRowProps, Text, type TextProps, Textarea, type TextareaProps, ToolCallDetails, type ToolCallDetailsProps, type ToolCallStatus, Tooltip, cn, currentPeriod, getPeriodBucketKeys, isPeriodSelectable, periodBucketKeyToDate, periodFromDate, periodToWindow, setColorMode, useColorMode, useOnline, useScrollLock };
|
|
1012
|
+
export { AccountIdentity, AccountIdentityLink, type AccountIdentityLinkProps, type AccountIdentityProps, AccountMenu, type AccountMenuProps, Alert, type AlertProps, AppBrand, type AppBrandProps, AppHeader, type AppHeaderProps, BrandMark, type BrandMarkProps, ButtonAppearance, ButtonGroup, type ButtonGroupProps, ButtonProps, Callout, type CalloutProps, ChatConversation, ChatConversationContent, type ChatConversationContentProps, type ChatConversationProps, ChatMessage, ChatMessageActions, type ChatMessageActionsProps, ChatMessageContent, type ChatMessageContentProps, ChatMessageHeader, type ChatMessageHeaderProps, type ChatMessageProps, type ChatMessageRole, ChatPromptInput, ChatPromptInputFooter, type ChatPromptInputFooterProps, type ChatPromptInputProps, ChatPromptTextarea, ChevronIcon, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, ColorModeToggle, ConfirmationDialog, type ConfirmationDialogProps, ContentHeader, type ContentHeaderProps, CopyButton, type CopyButtonProps, CopyField, type CopyFieldProps, DialogProps, DiscordIcon, Drawer, type DrawerProps, Dropdown, DropdownItem, type DropdownItemProps, type DropdownProps, EditableCombobox, type EditableComboboxProps, EditableComboboxToken, type EditableComboboxTokenProps, EmptyState, type EmptyStateProps, ExternalLinkButton, type ExternalLinkButtonProps, Eyebrow, type EyebrowProps, FieldStack, type FieldStackProps, FileUpload, type FileUploadProps, GitHubIcon, Heading, type HeadingProps, IconButton, type IconButtonIntent, type IconButtonProps, type IconButtonVariant, IconProps, IconTile, type IconTileProps, InfoTip, InlineLink, type InlineLinkProps, Input, type InputProps, KeyChip, type KeyChipProps, LinkCard, type LinkCardProps, LiveDot, LoadingStatus, MediaPlaceholder, type MediaPlaceholderProps, MultiSelect, type MultiSelectProps, NavItem, type NavItemProps, OUTAGE_MESSAGE, OutageNotice, type OutageNoticeProps, type PeriodGranularity, PeriodPicker, type PeriodPickerProps, type PeriodSelection, ScrollAreaProps, Section, type SectionProps, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Skeleton, type SkeletonProps, Slider, type SliderProps, SocialCount, type SocialCountProps, StableLabel, type StableLabelProps, StatCard, type StatCardProps, Surface, type SurfaceProps, Switch, type SwitchProps, type SwitchSize, type SwitchStatus, TabButton, type TabButtonProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableDisclosureButton, type TableDisclosureButtonProps, TableHead, type TableHeadProps, TableHeaderCell, type TableHeaderCellProps, type TableProps, TableRow, type TableRowProps, Text, type TextProps, Textarea, type TextareaProps, ToolCallDetails, type ToolCallDetailsProps, type ToolCallStatus, Tooltip, cn, currentPeriod, formatCount, getPeriodBucketKeys, isPeriodSelectable, periodBucketKeyToDate, periodFromDate, periodToWindow, setColorMode, useColorMode, useOnline, useScrollLock };
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
CodeBlock,
|
|
38
38
|
CopyButton,
|
|
39
39
|
Tooltip
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-5D7HRDJS.js";
|
|
41
41
|
import {
|
|
42
42
|
Heading,
|
|
43
43
|
Text
|
|
@@ -2651,6 +2651,16 @@ function cn2(...inputs) {
|
|
|
2651
2651
|
return twMerge(clsx(...inputs));
|
|
2652
2652
|
}
|
|
2653
2653
|
|
|
2654
|
+
// src/lib/format-count.ts
|
|
2655
|
+
var compactCount = new Intl.NumberFormat("en", { notation: "compact" });
|
|
2656
|
+
function formatCount(value) {
|
|
2657
|
+
const abs = Math.abs(value);
|
|
2658
|
+
if (abs < 1e3) return compactCount.format(Math.trunc(value));
|
|
2659
|
+
const unit = 10 ** (3 * Math.floor(Math.log10(abs) / 3));
|
|
2660
|
+
const step = abs / unit < 10 ? unit / 10 : unit;
|
|
2661
|
+
return compactCount.format(Math.trunc(value / step) * step);
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2654
2664
|
// src/lib/use-scroll-lock.ts
|
|
2655
2665
|
import { useEffect as useEffect6 } from "react";
|
|
2656
2666
|
function useScrollLock(enabled = true) {
|
|
@@ -3256,6 +3266,7 @@ export {
|
|
|
3256
3266
|
XSocialIcon,
|
|
3257
3267
|
cn2 as cn,
|
|
3258
3268
|
currentPeriod,
|
|
3269
|
+
formatCount,
|
|
3259
3270
|
getPeriodBucketKeys,
|
|
3260
3271
|
isPeriodSelectable,
|
|
3261
3272
|
periodBucketKeyToDate,
|