@forgedevstack/bear 1.3.2 → 1.3.4
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 +145 -288
- package/dist/components/AlertDialog/AlertDialog.cjs +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +67 -84
- package/dist/components/ApprovalCard/ApprovalCard.cjs +1 -0
- package/dist/components/ApprovalCard/ApprovalCard.const.cjs +1 -0
- package/dist/components/ApprovalCard/ApprovalCard.const.d.ts +2 -0
- package/dist/components/ApprovalCard/ApprovalCard.const.js +8 -0
- package/dist/components/ApprovalCard/ApprovalCard.d.ts +2 -0
- package/dist/components/ApprovalCard/ApprovalCard.js +25 -0
- package/dist/components/ApprovalCard/ApprovalCard.types.d.ts +15 -0
- package/dist/components/ApprovalCard/index.d.ts +2 -0
- package/dist/components/ArtifactCard/ArtifactCard.cjs +1 -0
- package/dist/components/ArtifactCard/ArtifactCard.const.cjs +1 -0
- package/dist/components/ArtifactCard/ArtifactCard.const.d.ts +3 -0
- package/dist/components/ArtifactCard/ArtifactCard.const.js +8 -0
- package/dist/components/ArtifactCard/ArtifactCard.d.ts +2 -0
- package/dist/components/ArtifactCard/ArtifactCard.js +43 -0
- package/dist/components/ArtifactCard/ArtifactCard.types.d.ts +15 -0
- package/dist/components/ArtifactCard/index.d.ts +2 -0
- package/dist/components/Banner/Banner.const.cjs +1 -1
- package/dist/components/Banner/Banner.const.js +9 -8
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +72 -64
- package/dist/components/Chart/BarChart.cjs +1 -1
- package/dist/components/Chart/BarChart.js +65 -72
- package/dist/components/Chart/Chart.cjs +1 -1
- package/dist/components/Chart/Chart.js +21 -18
- package/dist/components/Chart/Chart.types.d.ts +1 -1
- package/dist/components/Chart/FunnelChart.cjs +1 -1
- package/dist/components/Chart/FunnelChart.js +38 -36
- package/dist/components/Chart/LineChart.cjs +1 -1
- package/dist/components/Chart/LineChart.js +74 -60
- package/dist/components/Chart/PieChart.cjs +1 -1
- package/dist/components/Chart/PieChart.js +102 -82
- package/dist/components/Chart/RadarChart.cjs +1 -1
- package/dist/components/Chart/RadarChart.d.ts +1 -1
- package/dist/components/Chart/RadarChart.js +116 -93
- package/dist/components/Chat/Chat.cjs +1 -1
- package/dist/components/Chat/Chat.const.cjs +1 -1
- package/dist/components/Chat/Chat.const.d.ts +9 -22
- package/dist/components/Chat/Chat.const.js +18 -26
- package/dist/components/Chat/Chat.d.ts +1 -20
- package/dist/components/Chat/Chat.js +107 -162
- package/dist/components/Chat/Chat.types.d.ts +20 -27
- package/dist/components/Chat/Chat.utils.cjs +1 -0
- package/dist/components/Chat/Chat.utils.d.ts +2 -0
- package/dist/components/Chat/Chat.utils.js +10 -0
- package/dist/components/Chat/helpers/ChatTypingIndicator.cjs +1 -0
- package/dist/components/Chat/helpers/ChatTypingIndicator.d.ts +3 -0
- package/dist/components/Chat/helpers/ChatTypingIndicator.js +14 -0
- package/dist/components/Chat/index.d.ts +2 -1
- package/dist/components/ChatBubble/ChatBubble.cjs +1 -0
- package/dist/components/ChatBubble/ChatBubble.const.cjs +1 -0
- package/dist/components/ChatBubble/ChatBubble.const.d.ts +13 -0
- package/dist/components/ChatBubble/ChatBubble.const.js +17 -0
- package/dist/components/ChatBubble/ChatBubble.d.ts +2 -0
- package/dist/components/ChatBubble/ChatBubble.js +32 -0
- package/dist/components/ChatBubble/ChatBubble.types.d.ts +12 -0
- package/dist/components/ChatBubble/ChatBubble.utils.cjs +1 -0
- package/dist/components/ChatBubble/ChatBubble.utils.d.ts +6 -0
- package/dist/components/ChatBubble/ChatBubble.utils.js +15 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleSystem.cjs +1 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleSystem.d.ts +2 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleSystem.js +21 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleThread.cjs +1 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleThread.d.ts +4 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleThread.js +63 -0
- package/dist/components/ChatBubble/index.d.ts +2 -0
- package/dist/components/ChatError/ChatError.cjs +1 -0
- package/dist/components/ChatError/ChatError.const.cjs +1 -0
- package/dist/components/ChatError/ChatError.const.d.ts +2 -0
- package/dist/components/ChatError/ChatError.const.js +8 -0
- package/dist/components/ChatError/ChatError.d.ts +2 -0
- package/dist/components/ChatError/ChatError.js +32 -0
- package/dist/components/ChatError/ChatError.types.d.ts +14 -0
- package/dist/components/ChatError/index.d.ts +2 -0
- package/dist/components/ChipGroup/ChipGroup.cjs +1 -1
- package/dist/components/ChipGroup/ChipGroup.const.cjs +1 -1
- package/dist/components/ChipGroup/ChipGroup.const.d.ts +2 -0
- package/dist/components/ChipGroup/ChipGroup.const.js +6 -4
- package/dist/components/ChipGroup/ChipGroup.js +52 -48
- package/dist/components/CitationList/CitationList.cjs +1 -0
- package/dist/components/CitationList/CitationList.d.ts +2 -0
- package/dist/components/CitationList/CitationList.js +30 -0
- package/dist/components/CitationList/CitationList.types.d.ts +15 -0
- package/dist/components/CitationList/helpers/CitationListTitle.cjs +1 -0
- package/dist/components/CitationList/helpers/CitationListTitle.d.ts +2 -0
- package/dist/components/CitationList/helpers/CitationListTitle.js +10 -0
- package/dist/components/CitationList/helpers/index.d.ts +1 -0
- package/dist/components/CitationList/index.d.ts +2 -0
- package/dist/components/CommandPalette/CommandItem.cjs +1 -0
- package/dist/components/CommandPalette/CommandItem.d.ts +6 -0
- package/dist/components/CommandPalette/CommandItem.js +39 -0
- package/dist/components/CommandPalette/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette/CommandPalette.js +129 -144
- package/dist/components/ContextMeter/ContextMeter.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.const.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.const.d.ts +6 -0
- package/dist/components/ContextMeter/ContextMeter.const.js +11 -0
- package/dist/components/ContextMeter/ContextMeter.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.js +49 -0
- package/dist/components/ContextMeter/ContextMeter.types.d.ts +11 -0
- package/dist/components/ContextMeter/ContextMeter.utils.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.utils.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.utils.js +12 -0
- package/dist/components/ContextMeter/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.d.ts +2 -1
- package/dist/components/Drawer/Drawer.const.js +7 -6
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +101 -85
- package/dist/components/Drawer/Drawer.types.d.ts +4 -1
- package/dist/components/Drawer/hooks/useDrawer.cjs +1 -1
- package/dist/components/Drawer/hooks/useDrawer.js +33 -34
- package/dist/components/Drawer/index.d.ts +1 -1
- package/dist/components/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/EmptyState/EmptyState.const.cjs +1 -1
- package/dist/components/EmptyState/EmptyState.const.d.ts +13 -6
- package/dist/components/EmptyState/EmptyState.const.js +30 -8
- package/dist/components/EmptyState/EmptyState.d.ts +1 -2
- package/dist/components/EmptyState/EmptyState.js +37 -41
- package/dist/components/EmptyState/EmptyState.types.d.ts +3 -1
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.js +8 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.js +8 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.js +8 -0
- package/dist/components/EmptyState/helpers/index.d.ts +3 -0
- package/dist/components/EmptyState/index.d.ts +1 -1
- package/dist/components/FloatingChat/FloatingChat.cjs +1 -1
- package/dist/components/FloatingChat/FloatingChat.const.cjs +1 -1
- package/dist/components/FloatingChat/FloatingChat.const.d.ts +12 -1
- package/dist/components/FloatingChat/FloatingChat.const.js +25 -7
- package/dist/components/FloatingChat/FloatingChat.d.ts +1 -18
- package/dist/components/FloatingChat/FloatingChat.js +93 -124
- package/dist/components/FloatingChat/FloatingChat.types.d.ts +11 -22
- package/dist/components/FloatingChat/FloatingChat.utils.cjs +1 -0
- package/dist/components/FloatingChat/FloatingChat.utils.d.ts +2 -0
- package/dist/components/FloatingChat/FloatingChat.utils.js +12 -0
- package/dist/components/FloatingChat/helpers/FloatingChatHeader.cjs +1 -0
- package/dist/components/FloatingChat/helpers/FloatingChatHeader.d.ts +9 -0
- package/dist/components/FloatingChat/helpers/FloatingChatHeader.js +21 -0
- package/dist/components/FloatingChat/helpers/FloatingChatTrigger.cjs +1 -0
- package/dist/components/FloatingChat/helpers/FloatingChatTrigger.d.ts +9 -0
- package/dist/components/FloatingChat/helpers/FloatingChatTrigger.js +17 -0
- package/dist/components/FloatingChat/index.d.ts +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.cjs +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.d.ts +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.js +35 -24
- package/dist/components/HoverCard/HoverCard.cjs +4 -3
- package/dist/components/HoverCard/HoverCard.const.cjs +1 -0
- package/dist/components/HoverCard/HoverCard.const.d.ts +1 -0
- package/dist/components/HoverCard/HoverCard.const.js +10 -0
- package/dist/components/HoverCard/HoverCard.js +62 -56
- package/dist/components/HoverCard/HoverCard.types.d.ts +7 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/productIcons.cjs +1 -0
- package/dist/components/Icon/productIcons.d.ts +7 -0
- package/dist/components/Icon/productIcons.js +25 -0
- package/dist/components/Menu/Menu.cjs +1 -1
- package/dist/components/Menu/Menu.const.cjs +1 -0
- package/dist/components/Menu/Menu.const.d.ts +2 -0
- package/dist/components/Menu/Menu.const.js +12 -0
- package/dist/components/Menu/Menu.d.ts +3 -9
- package/dist/components/Menu/Menu.js +57 -89
- package/dist/components/Menu/Menu.types.d.ts +8 -1
- package/dist/components/Menu/MenuDivider.cjs +1 -0
- package/dist/components/Menu/MenuDivider.d.ts +6 -0
- package/dist/components/Menu/MenuDivider.js +7 -0
- package/dist/components/Menu/MenuItem.cjs +1 -0
- package/dist/components/Menu/MenuItem.d.ts +6 -0
- package/dist/components/Menu/MenuItem.js +46 -0
- package/dist/components/MessageActions/MessageActions.cjs +1 -0
- package/dist/components/MessageActions/MessageActions.const.cjs +1 -0
- package/dist/components/MessageActions/MessageActions.const.d.ts +2 -0
- package/dist/components/MessageActions/MessageActions.const.js +10 -0
- package/dist/components/MessageActions/MessageActions.d.ts +2 -0
- package/dist/components/MessageActions/MessageActions.js +31 -0
- package/dist/components/MessageActions/MessageActions.types.d.ts +16 -0
- package/dist/components/MessageActions/index.d.ts +2 -0
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.const.cjs +1 -1
- package/dist/components/Modal/Modal.const.d.ts +1 -0
- package/dist/components/Modal/Modal.const.js +20 -12
- package/dist/components/Modal/Modal.js +62 -59
- package/dist/components/Modal/Modal.types.d.ts +7 -0
- package/dist/components/ModelSelect/ModelSelect.cjs +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.cjs +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.d.ts +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.js +4 -0
- package/dist/components/ModelSelect/ModelSelect.d.ts +2 -0
- package/dist/components/ModelSelect/ModelSelect.js +41 -0
- package/dist/components/ModelSelect/ModelSelect.types.d.ts +16 -0
- package/dist/components/ModelSelect/index.d.ts +2 -0
- package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -1
- package/dist/components/OverlayPortal/OverlayPortal.const.js +6 -5
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +5 -5
- package/dist/components/Popover/Popover.cjs +1 -1
- package/dist/components/Popover/Popover.const.cjs +1 -0
- package/dist/components/Popover/Popover.const.d.ts +15 -1
- package/dist/components/Popover/Popover.const.js +29 -0
- package/dist/components/Popover/Popover.js +77 -73
- package/dist/components/Popover/Popover.types.d.ts +7 -0
- package/dist/components/PromptComposer/PromptComposer.cjs +1 -0
- package/dist/components/PromptComposer/PromptComposer.const.cjs +1 -0
- package/dist/components/PromptComposer/PromptComposer.const.d.ts +6 -0
- package/dist/components/PromptComposer/PromptComposer.const.js +14 -0
- package/dist/components/PromptComposer/PromptComposer.d.ts +2 -0
- package/dist/components/PromptComposer/PromptComposer.js +132 -0
- package/dist/components/PromptComposer/PromptComposer.types.d.ts +45 -0
- package/dist/components/PromptComposer/PromptComposer.utils.cjs +1 -0
- package/dist/components/PromptComposer/PromptComposer.utils.d.ts +5 -0
- package/dist/components/PromptComposer/PromptComposer.utils.js +16 -0
- package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.d.ts +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.js +6 -0
- package/dist/components/PromptComposer/helpers/PromptComposerFileChip.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerFileChip.d.ts +2 -0
- package/dist/components/PromptComposer/helpers/PromptComposerFileChip.js +18 -0
- package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.d.ts +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.js +9 -0
- package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.d.ts +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.js +6 -0
- package/dist/components/PromptComposer/helpers/index.d.ts +4 -0
- package/dist/components/PromptComposer/index.d.ts +2 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.cjs +1 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.d.ts +2 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.js +39 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.types.d.ts +13 -0
- package/dist/components/PromptSuggestions/index.d.ts +2 -0
- package/dist/components/RichEditor/helpers/IconRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/IconRender.js +16 -16
- package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/toolbarItemRender.js +23 -23
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.const.cjs +1 -1
- package/dist/components/Select/Select.const.d.ts +1 -0
- package/dist/components/Select/Select.const.js +7 -6
- package/dist/components/Select/Select.js +110 -105
- package/dist/components/Select/helpers/SelectCheckSvg.cjs +1 -0
- package/dist/components/Select/helpers/SelectCheckSvg.d.ts +3 -0
- package/dist/components/Select/helpers/SelectCheckSvg.js +8 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.cjs +1 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.d.ts +3 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.js +8 -0
- package/dist/components/Select/helpers/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.const.cjs +2 -2
- package/dist/components/Skeleton/Skeleton.const.js +5 -6
- package/dist/components/Skeleton/Skeleton.js +59 -59
- package/dist/components/StatCard/StatCard.cjs +1 -1
- package/dist/components/StatCard/StatCard.const.cjs +1 -1
- package/dist/components/StatCard/StatCard.const.d.ts +0 -7
- package/dist/components/StatCard/StatCard.const.js +5 -12
- package/dist/components/StatCard/StatCard.d.ts +1 -2
- package/dist/components/StatCard/StatCard.js +48 -37
- package/dist/components/StatCard/StatCard.utils.cjs +1 -0
- package/dist/components/StatCard/StatCard.utils.d.ts +2 -0
- package/dist/components/StatCard/StatCard.utils.js +7 -0
- package/dist/components/StreamingMessage/StreamingMessage.cjs +1 -0
- package/dist/components/StreamingMessage/StreamingMessage.const.cjs +1 -0
- package/dist/components/StreamingMessage/StreamingMessage.const.d.ts +5 -0
- package/dist/components/StreamingMessage/StreamingMessage.const.js +10 -0
- package/dist/components/StreamingMessage/StreamingMessage.d.ts +2 -0
- package/dist/components/StreamingMessage/StreamingMessage.js +48 -0
- package/dist/components/StreamingMessage/StreamingMessage.types.d.ts +15 -0
- package/dist/components/StreamingMessage/index.d.ts +2 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.cjs +1 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.const.cjs +1 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.const.d.ts +7 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.const.js +14 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +2 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.js +39 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.types.d.ts +14 -0
- package/dist/components/ThemeSwitcher/index.d.ts +2 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.cjs +1 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.const.cjs +1 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.const.d.ts +4 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.const.js +9 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.d.ts +2 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.js +45 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.types.d.ts +16 -0
- package/dist/components/ThinkingBlock/index.d.ts +2 -0
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.const.cjs +1 -1
- package/dist/components/Toast/Toast.const.d.ts +2 -0
- package/dist/components/Toast/Toast.const.js +11 -8
- package/dist/components/Toast/Toast.context.cjs +1 -0
- package/dist/components/Toast/Toast.context.d.ts +3 -0
- package/dist/components/Toast/Toast.context.js +11 -0
- package/dist/components/Toast/Toast.d.ts +4 -3
- package/dist/components/Toast/Toast.icons.cjs +1 -0
- package/dist/components/Toast/Toast.icons.d.ts +4 -0
- package/dist/components/Toast/Toast.icons.js +29 -0
- package/dist/components/Toast/Toast.js +32 -160
- package/dist/components/Toast/ToastContainer.cjs +1 -0
- package/dist/components/Toast/ToastContainer.d.ts +3 -0
- package/dist/components/Toast/ToastContainer.js +39 -0
- package/dist/components/Toast/ToastItem.cjs +1 -0
- package/dist/components/Toast/ToastItem.d.ts +5 -0
- package/dist/components/Toast/ToastItem.js +86 -0
- package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.const.cjs +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.const.d.ts +15 -0
- package/dist/components/ToggleGroup/ToggleGroup.const.js +33 -0
- package/dist/components/ToggleGroup/ToggleGroup.context.cjs +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.context.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.context.js +5 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +86 -0
- package/dist/components/ToggleGroup/ToggleGroup.types.d.ts +48 -0
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -0
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroupItem.js +50 -0
- package/dist/components/ToggleGroup/hooks/useToggleGroupContext.cjs +1 -0
- package/dist/components/ToggleGroup/hooks/useToggleGroupContext.d.ts +1 -0
- package/dist/components/ToggleGroup/hooks/useToggleGroupContext.js +6 -0
- package/dist/components/ToggleGroup/index.d.ts +4 -0
- package/dist/components/ToolCall/ToolCall.cjs +1 -0
- package/dist/components/ToolCall/ToolCall.const.cjs +1 -0
- package/dist/components/ToolCall/ToolCall.const.d.ts +5 -0
- package/dist/components/ToolCall/ToolCall.const.js +17 -0
- package/dist/components/ToolCall/ToolCall.d.ts +2 -0
- package/dist/components/ToolCall/ToolCall.js +43 -0
- package/dist/components/ToolCall/ToolCall.types.d.ts +20 -0
- package/dist/components/ToolCall/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.const.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.const.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.const.js +18 -0
- package/dist/components/Tooltip/Tooltip.js +59 -61
- package/dist/components/Tooltip/Tooltip.types.d.ts +7 -0
- package/dist/components/Transition/Transition.const.cjs +1 -1
- package/dist/components/Transition/Transition.const.js +12 -6
- package/dist/components/Transition/Transition.types.d.ts +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +39 -9
- package/dist/components/index.js +335 -293
- package/dist/constants/generals.const.cjs +1 -1
- package/dist/constants/generals.const.d.ts +46 -0
- package/dist/constants/generals.const.js +158 -115
- package/dist/constants/keys.const.cjs +1 -1
- package/dist/constants/keys.const.js +2 -1
- package/dist/constants/numbers.const.cjs +1 -1
- package/dist/constants/numbers.const.d.ts +10 -0
- package/dist/constants/numbers.const.js +64 -53
- package/dist/context/BearProvider.cjs +1 -1
- package/dist/context/BearProvider.d.ts +19 -44
- package/dist/context/BearProvider.js +223 -208
- package/dist/context/bearProvider.types.d.ts +4 -0
- package/dist/context/index.d.ts +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +6 -4
- package/dist/hooks/useFixedAnchorPosition/index.d.ts +1 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +2 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +12 -11
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +1 -1
- package/dist/hooks/useFocusTrap/index.d.ts +2 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.cjs +1 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.d.ts +3 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.js +41 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.types.d.ts +8 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.utils.cjs +1 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.utils.d.ts +1 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.utils.js +23 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +483 -439
- package/dist/styles/_ai-chat.css +487 -0
- package/dist/styles/_base.css +2 -0
- package/dist/styles/_chart.css +144 -0
- package/dist/styles/_effects.css +8 -4
- package/dist/styles/_skeleton.css +90 -0
- package/dist/styles/main.css +3 -0
- package/dist/styles.css +953 -199
- package/package.json +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.const.cjs +0 -1
- package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +0 -5
- package/dist/components/FormSkeleton/FormSkeleton.const.js +0 -8
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.js +0 -14
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.js +0 -35
- package/dist/node_modules/@forgedevstack/bear-icons/dist/action.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/action.js +0 -26
- package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.js +0 -4
- package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.js +0 -130
- package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.js +0 -12
- package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.js +0 -18
- package/dist/node_modules/@forgedevstack/bear-icons/dist/status.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/status.js +0 -6
|
@@ -1,118 +1,138 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ZERO as
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
import { jsx as l, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as J } from "react";
|
|
3
|
+
import { ZERO as p, ONE as Q } from "../../constants/numbers.const.js";
|
|
4
|
+
import { cn as f } from "../../utils/cn.js";
|
|
5
|
+
import { resolveBearId as ee } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as ae } from "../../utils/useBearId.js";
|
|
7
|
+
import { Portal as te } from "../Portal/Portal.js";
|
|
8
|
+
import { Card as re, CardHeader as ne, CardBody as oe } from "../Card/Card.js";
|
|
9
|
+
import { Flex as g } from "../Flex/Flex.js";
|
|
10
|
+
import { Box as P } from "../Box/Box.js";
|
|
11
|
+
import { Typography as M } from "../Typography/Typography.js";
|
|
12
|
+
import { CHART as t, PIE_VIEW_FULL as le, PIE_VIEW_ROSE as se, CHART_LEGEND_NONE as ce, CHART_LEGEND_BOTTOM as ie, PIE_VIEW_HALF as de } from "./Chart.const.js";
|
|
13
|
+
import { getChartColor as S, createArcPath as pe, polarOffset as me } from "./Chart.utils.js";
|
|
14
|
+
const Le = (F) => {
|
|
13
15
|
const {
|
|
14
|
-
data:
|
|
15
|
-
height:
|
|
16
|
-
showLabels:
|
|
17
|
-
innerRadius:
|
|
18
|
-
startAngle:
|
|
19
|
-
padAngle:
|
|
20
|
-
animated:
|
|
21
|
-
pieView:
|
|
22
|
-
explodeIndex:
|
|
23
|
-
legendPosition:
|
|
24
|
-
onSliceClick:
|
|
25
|
-
onSliceHover:
|
|
26
|
-
showSliceTooltip:
|
|
27
|
-
sliceTooltipTitle:
|
|
28
|
-
sliceTooltipDescription:
|
|
29
|
-
sliceTooltipContent:
|
|
30
|
-
className:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
data: r,
|
|
17
|
+
height: y = t.DEFAULT_HEIGHT,
|
|
18
|
+
showLabels: U = !0,
|
|
19
|
+
innerRadius: V = p,
|
|
20
|
+
startAngle: W,
|
|
21
|
+
padAngle: _ = t.DEFAULT_PAD_ANGLE,
|
|
22
|
+
animated: $ = !0,
|
|
23
|
+
pieView: B = le,
|
|
24
|
+
explodeIndex: X,
|
|
25
|
+
legendPosition: b = "right",
|
|
26
|
+
onSliceClick: i,
|
|
27
|
+
onSliceHover: d,
|
|
28
|
+
showSliceTooltip: v = !0,
|
|
29
|
+
sliceTooltipTitle: u,
|
|
30
|
+
sliceTooltipDescription: E,
|
|
31
|
+
sliceTooltipContent: A,
|
|
32
|
+
className: x,
|
|
33
|
+
id: H,
|
|
34
|
+
testId: L,
|
|
35
|
+
...C
|
|
36
|
+
} = F, G = ae("PieChart"), R = ee(H, G), m = r.reduce((e, a) => e + a.value, p), [o, N] = J(null), O = B === de, T = B === se, w = O ? t.HALF_SWEEP : t.FULL_SWEEP, j = W ?? (O ? t.HALF_PIE_START : t.DEFAULT_START_ANGLE), Y = Math.max(...r.map((e) => e.value), Q), k = b === ce || !U, z = b === ie, D = (e, a, c) => {
|
|
37
|
+
const s = r[c];
|
|
38
|
+
if (d == null || d(s, c), !v)
|
|
35
39
|
return;
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
+
const n = Math.round(s.value / m * t.VIEWBOX);
|
|
41
|
+
N({ x: e, y: a, index: c, label: s.label, value: s.value, pct: n });
|
|
42
|
+
}, K = () => {
|
|
43
|
+
N(null), d == null || d(null, null);
|
|
40
44
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
if (r.length === p || m === p)
|
|
46
|
+
return /* @__PURE__ */ l(
|
|
47
|
+
g,
|
|
48
|
+
{
|
|
49
|
+
id: R,
|
|
50
|
+
"data-testid": L,
|
|
51
|
+
align: "center",
|
|
52
|
+
justify: "center",
|
|
53
|
+
className: f("Bear-Chart Bear-Chart--pie Bear-Chart--empty", x),
|
|
54
|
+
style: { "--Bear-Chart-height": `${y}px` },
|
|
55
|
+
...C
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
let I = j;
|
|
59
|
+
const Z = r.map((e, a) => {
|
|
60
|
+
const c = T ? w / r.length - _ : e.value / m * w - _, s = I, n = I + c;
|
|
61
|
+
I += c + _;
|
|
62
|
+
const q = T ? t.ROSE_MIN_RADIUS + e.value / Y * (t.OUTER_RADIUS - t.ROSE_MIN_RADIUS) : t.OUTER_RADIUS;
|
|
46
63
|
return {
|
|
47
64
|
startAngle: s,
|
|
48
|
-
endAngle:
|
|
49
|
-
color:
|
|
50
|
-
outerRadius:
|
|
65
|
+
endAngle: n,
|
|
66
|
+
color: S(a, e.color),
|
|
67
|
+
outerRadius: q,
|
|
51
68
|
...e
|
|
52
69
|
};
|
|
53
70
|
});
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
-
|
|
71
|
+
return /* @__PURE__ */ h(
|
|
72
|
+
g,
|
|
56
73
|
{
|
|
57
|
-
|
|
74
|
+
id: R,
|
|
75
|
+
"data-testid": L,
|
|
76
|
+
direction: z ? "column" : "row",
|
|
58
77
|
align: "center",
|
|
59
78
|
gap: 4,
|
|
60
79
|
wrap: "wrap",
|
|
61
|
-
className:
|
|
62
|
-
|
|
80
|
+
className: f("Bear-Chart Bear-Chart--pie", x),
|
|
81
|
+
style: { "--Bear-Chart-height": `${y}px` },
|
|
82
|
+
...C,
|
|
63
83
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
const c = (e.startAngle + e.endAngle) / 2, s =
|
|
66
|
-
return /* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ l(P, { className: "Bear-Chart__pie-canvas", children: /* @__PURE__ */ l("svg", { viewBox: `0 0 ${t.VIEWBOX} ${t.VIEWBOX}`, className: "Bear-Chart__svg", children: Z.map((e, a) => {
|
|
85
|
+
const c = (e.startAngle + e.endAngle) / 2, s = X === a ? me(c, t.EXPLODE_OFFSET) : { x: p, y: p };
|
|
86
|
+
return /* @__PURE__ */ l("g", { transform: `translate(${s.x} ${s.y})`, children: /* @__PURE__ */ l(
|
|
67
87
|
"path",
|
|
68
88
|
{
|
|
69
|
-
d:
|
|
89
|
+
d: pe(e.startAngle, e.endAngle, V, e.outerRadius),
|
|
70
90
|
fill: e.color,
|
|
71
|
-
className:
|
|
72
|
-
|
|
91
|
+
className: f(
|
|
92
|
+
i && "bear-cursor-pointer",
|
|
73
93
|
"bear-transition-opacity hover:bear-opacity-80",
|
|
74
|
-
|
|
94
|
+
$ && "animate-scale-in"
|
|
75
95
|
),
|
|
76
|
-
style: { animationDelay: `${a *
|
|
77
|
-
onClick: () =>
|
|
96
|
+
style: { animationDelay: `${a * t.SLICE_DELAY_MS}ms` },
|
|
97
|
+
onClick: () => i == null ? void 0 : i(r[a], a),
|
|
78
98
|
tabIndex: 0,
|
|
79
99
|
role: "button",
|
|
80
|
-
"aria-label": `${
|
|
81
|
-
onKeyDown: (
|
|
82
|
-
(
|
|
100
|
+
"aria-label": `${r[a].label} ${Math.round(r[a].value / m * t.VIEWBOX)}%`,
|
|
101
|
+
onKeyDown: (n) => {
|
|
102
|
+
(n.key === "Enter" || n.key === " ") && (n.preventDefault(), i == null || i(r[a], a));
|
|
83
103
|
},
|
|
84
|
-
onMouseEnter: (
|
|
85
|
-
onMouseMove: (
|
|
86
|
-
onMouseLeave:
|
|
104
|
+
onMouseEnter: (n) => D(n.clientX, n.clientY, a),
|
|
105
|
+
onMouseMove: (n) => D(n.clientX, n.clientY, a),
|
|
106
|
+
onMouseLeave: K
|
|
87
107
|
}
|
|
88
108
|
) }, e.label);
|
|
89
109
|
}) }) }),
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
110
|
+
!k && /* @__PURE__ */ l(g, { direction: "column", gap: 2, children: r.map((e, a) => /* @__PURE__ */ h(g, { align: "center", gap: 2, children: [
|
|
111
|
+
/* @__PURE__ */ l(
|
|
112
|
+
P,
|
|
93
113
|
{
|
|
94
|
-
className: "
|
|
95
|
-
style: {
|
|
114
|
+
className: "Bear-Chart__swatch",
|
|
115
|
+
style: { "--Bear-Chart-color": S(a, e.color) }
|
|
96
116
|
}
|
|
97
117
|
),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
Math.round(e.value /
|
|
118
|
+
/* @__PURE__ */ l(M, { variant: "body2", color: "muted", children: e.label }),
|
|
119
|
+
/* @__PURE__ */ h(M, { variant: "body2", color: "muted", children: [
|
|
120
|
+
Math.round(e.value / m * t.VIEWBOX),
|
|
101
121
|
"%"
|
|
102
122
|
] })
|
|
103
123
|
] }, e.label)) }),
|
|
104
|
-
|
|
105
|
-
(
|
|
106
|
-
|
|
124
|
+
o && v && /* @__PURE__ */ l(te, { children: /* @__PURE__ */ l("div", { className: "pointer-events-none fixed z-[11500] w-56 max-w-[calc(100vw-24px)]", style: { left: o.x + 12, top: o.y + 12 }, children: /* @__PURE__ */ h(re, { variant: "elevated", padding: "none", children: [
|
|
125
|
+
(u || E) && /* @__PURE__ */ l(
|
|
126
|
+
ne,
|
|
107
127
|
{
|
|
108
|
-
title: (
|
|
109
|
-
subtitle:
|
|
128
|
+
title: (u == null ? void 0 : u(r[o.index], o.index)) ?? o.label,
|
|
129
|
+
subtitle: E == null ? void 0 : E(r[o.index], o.index)
|
|
110
130
|
}
|
|
111
131
|
),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
132
|
+
/* @__PURE__ */ l(oe, { className: "bear-text-xs bear-text-gray-500 dark:bear-text-slate-400", children: (A == null ? void 0 : A(r[o.index], o.index)) ?? /* @__PURE__ */ h("span", { children: [
|
|
133
|
+
o.value,
|
|
114
134
|
" (",
|
|
115
|
-
|
|
135
|
+
o.pct,
|
|
116
136
|
"%)"
|
|
117
137
|
] }) })
|
|
118
138
|
] }) }) })
|
|
@@ -121,5 +141,5 @@ const ge = (M) => {
|
|
|
121
141
|
);
|
|
122
142
|
};
|
|
123
143
|
export {
|
|
124
|
-
|
|
144
|
+
Le as PieChart
|
|
125
145
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("../../constants/numbers.const.cjs"),T=require("../../utils/cn.cjs");require("react");const U=require("../../utils/generateBearId.utils.cjs"),D=require("../../utils/useBearId.cjs"),a=require("./Chart.const.cjs"),l=require("./Chart.utils.cjs"),L=m=>{const{data:n,height:g=a.CHART.DEFAULT_HEIGHT,showLabels:x=!0,showValues:y=!1,animated:p=!0,color:R,className:d,id:H,testId:C,...u}=m,S=D.useBearId("RadarChart"),h=U.resolveBearId(H,S),A=n.length,E={"--Bear-Chart-height":`${g}px`};if(A===c.ZERO)return o.jsx("div",{id:h,"data-testid":C,className:T.cn("Bear-Chart Bear-Chart--radar Bear-Chart--empty",d),style:E,...u});const I=Math.max(...n.map(e=>e.value),c.ONE),i=a.CHART.FULL_SWEEP/A,_=n.map((e,r)=>{const t=a.CHART.DEFAULT_START_ANGLE+r*i,s=e.value/I*a.CHART.OUTER_RADIUS;return l.polarToCartesian(t,s)}),b=_.map(e=>`${e.x},${e.y}`).join(" "),B=Array.from({length:a.CHART.RADAR_RINGS},(e,r)=>{const t=(r+c.ONE)/a.CHART.RADAR_RINGS*a.CHART.OUTER_RADIUS;return Array.from({length:A},(s,N)=>{const O=a.CHART.DEFAULT_START_ANGLE+N*i;return l.polarToCartesian(O,t)})});return o.jsx("div",{id:h,"data-testid":C,className:T.cn("Bear-Chart Bear-Chart--radar",d),style:E,...u,children:o.jsxs("svg",{viewBox:`0 0 ${a.CHART.VIEWBOX} ${a.CHART.VIEWBOX}`,className:"Bear-Chart__svg",children:[B.map((e,r)=>o.jsx("polygon",{points:e.map(t=>`${t.x},${t.y}`).join(" "),fill:"none",stroke:"var(--bear-border-default, #e5e5e5)",strokeWidth:.4},r)),n.map((e,r)=>{const t=a.CHART.DEFAULT_START_ANGLE+r*i,s=l.polarToCartesian(t,a.CHART.OUTER_RADIUS);return o.jsx("line",{x1:a.CHART.CENTER,y1:a.CHART.CENTER,x2:s.x,y2:s.y,stroke:"var(--bear-border-default, #e5e5e5)",strokeWidth:.4},e.label)}),o.jsx("polygon",{points:b,fill:l.getChartColor(c.ZERO,R),fillOpacity:.25,stroke:l.getChartColor(c.ZERO,R),strokeWidth:.8,className:T.cn(p&&"animate-scale-in")}),_.map((e,r)=>o.jsx("circle",{cx:e.x,cy:e.y,r:a.CHART.DOT_RADIUS,fill:l.getChartColor(r,n[r].color||R)},n[r].label)),x&&n.map((e,r)=>{const t=a.CHART.DEFAULT_START_ANGLE+r*i,s=l.polarToCartesian(t,a.CHART.OUTER_RADIUS+a.CHART.RADAR_LABEL_OFFSET);return o.jsxs("text",{x:s.x,y:s.y,textAnchor:"middle",dominantBaseline:"middle",className:"bear-fill-[var(--bear-text-secondary)]",fontSize:4,children:[e.label,y?` ${e.value}`:""]},`${e.label}-label`)})]})})};exports.RadarChart=L;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RadarChartProps } from './Chart.types';
|
|
2
|
-
export declare const RadarChart: (props: RadarChartProps) => import("react/jsx-runtime").JSX.Element
|
|
2
|
+
export declare const RadarChart: (props: RadarChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,100 +1,123 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ZERO as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsx as s, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { ZERO as m, ONE as f } from "../../constants/numbers.const.js";
|
|
3
|
+
import { cn as A } from "../../utils/cn.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { resolveBearId as O } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as $ } from "../../utils/useBearId.js";
|
|
7
|
+
import { CHART as a } from "./Chart.const.js";
|
|
8
|
+
import { polarToCartesian as i, getChartColor as R } from "./Chart.utils.js";
|
|
9
|
+
const P = (g) => {
|
|
8
10
|
const {
|
|
9
|
-
data:
|
|
10
|
-
height:
|
|
11
|
-
showLabels:
|
|
12
|
-
showValues:
|
|
13
|
-
animated:
|
|
14
|
-
color:
|
|
15
|
-
className:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}), S = E.map((e) => `${e.x},${e.y}`).join(" "), U = Array.from({ length: r.RADAR_RINGS }, (e, a) => {
|
|
24
|
-
const t = (a + d) / r.RADAR_RINGS * r.OUTER_RADIUS;
|
|
25
|
-
return Array.from({ length: m }, (l, D) => {
|
|
26
|
-
const L = r.DEFAULT_START_ANGLE + D * s;
|
|
27
|
-
return c(L, t);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
return /* @__PURE__ */ n("div", { className: u("Bear-Chart Bear-Chart--radar bear-flex bear-flex-col bear-items-center", x), style: { height: f }, ...y, children: /* @__PURE__ */ T("svg", { viewBox: `0 0 ${r.VIEWBOX} ${r.VIEWBOX}`, className: "bear-h-full bear-w-full", children: [
|
|
31
|
-
U.map((e, a) => /* @__PURE__ */ n(
|
|
32
|
-
"polygon",
|
|
33
|
-
{
|
|
34
|
-
points: e.map((t) => `${t.x},${t.y}`).join(" "),
|
|
35
|
-
fill: "none",
|
|
36
|
-
stroke: "var(--bear-border-default, #e5e5e5)",
|
|
37
|
-
strokeWidth: 0.4
|
|
38
|
-
},
|
|
39
|
-
a
|
|
40
|
-
)),
|
|
41
|
-
o.map((e, a) => {
|
|
42
|
-
const t = r.DEFAULT_START_ANGLE + a * s, l = c(t, r.OUTER_RADIUS);
|
|
43
|
-
return /* @__PURE__ */ n(
|
|
44
|
-
"line",
|
|
45
|
-
{
|
|
46
|
-
x1: r.CENTER,
|
|
47
|
-
y1: r.CENTER,
|
|
48
|
-
x2: l.x,
|
|
49
|
-
y2: l.y,
|
|
50
|
-
stroke: "var(--bear-border-default, #e5e5e5)",
|
|
51
|
-
strokeWidth: 0.4
|
|
52
|
-
},
|
|
53
|
-
e.label
|
|
54
|
-
);
|
|
55
|
-
}),
|
|
56
|
-
/* @__PURE__ */ n(
|
|
57
|
-
"polygon",
|
|
11
|
+
data: l,
|
|
12
|
+
height: x = a.DEFAULT_HEIGHT,
|
|
13
|
+
showLabels: S = !0,
|
|
14
|
+
showValues: C = !1,
|
|
15
|
+
animated: I = !0,
|
|
16
|
+
color: c,
|
|
17
|
+
className: h,
|
|
18
|
+
id: N,
|
|
19
|
+
testId: E,
|
|
20
|
+
...p
|
|
21
|
+
} = g, U = $("RadarChart"), T = O(N, U), d = l.length, _ = { "--Bear-Chart-height": `${x}px` };
|
|
22
|
+
if (d === m)
|
|
23
|
+
return /* @__PURE__ */ s(
|
|
24
|
+
"div",
|
|
58
25
|
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
className: u(b && "animate-scale-in")
|
|
26
|
+
id: T,
|
|
27
|
+
"data-testid": E,
|
|
28
|
+
className: A("Bear-Chart Bear-Chart--radar Bear-Chart--empty", h),
|
|
29
|
+
style: _,
|
|
30
|
+
...p
|
|
65
31
|
}
|
|
66
|
-
)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
e.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
32
|
+
);
|
|
33
|
+
const B = Math.max(...l.map((e) => e.value), f), n = a.FULL_SWEEP / d, u = l.map((e, r) => {
|
|
34
|
+
const t = a.DEFAULT_START_ANGLE + r * n, o = e.value / B * a.OUTER_RADIUS;
|
|
35
|
+
return i(t, o);
|
|
36
|
+
}), D = u.map((e) => `${e.x},${e.y}`).join(" "), L = Array.from({ length: a.RADAR_RINGS }, (e, r) => {
|
|
37
|
+
const t = (r + f) / a.RADAR_RINGS * a.OUTER_RADIUS;
|
|
38
|
+
return Array.from({ length: d }, (o, b) => {
|
|
39
|
+
const v = a.DEFAULT_START_ANGLE + b * n;
|
|
40
|
+
return i(v, t);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
return /* @__PURE__ */ s(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
id: T,
|
|
47
|
+
"data-testid": E,
|
|
48
|
+
className: A("Bear-Chart Bear-Chart--radar", h),
|
|
49
|
+
style: _,
|
|
50
|
+
...p,
|
|
51
|
+
children: /* @__PURE__ */ y("svg", { viewBox: `0 0 ${a.VIEWBOX} ${a.VIEWBOX}`, className: "Bear-Chart__svg", children: [
|
|
52
|
+
L.map((e, r) => /* @__PURE__ */ s(
|
|
53
|
+
"polygon",
|
|
54
|
+
{
|
|
55
|
+
points: e.map((t) => `${t.x},${t.y}`).join(" "),
|
|
56
|
+
fill: "none",
|
|
57
|
+
stroke: "var(--bear-border-default, #e5e5e5)",
|
|
58
|
+
strokeWidth: 0.4
|
|
59
|
+
},
|
|
60
|
+
r
|
|
61
|
+
)),
|
|
62
|
+
l.map((e, r) => {
|
|
63
|
+
const t = a.DEFAULT_START_ANGLE + r * n, o = i(t, a.OUTER_RADIUS);
|
|
64
|
+
return /* @__PURE__ */ s(
|
|
65
|
+
"line",
|
|
66
|
+
{
|
|
67
|
+
x1: a.CENTER,
|
|
68
|
+
y1: a.CENTER,
|
|
69
|
+
x2: o.x,
|
|
70
|
+
y2: o.y,
|
|
71
|
+
stroke: "var(--bear-border-default, #e5e5e5)",
|
|
72
|
+
strokeWidth: 0.4
|
|
73
|
+
},
|
|
74
|
+
e.label
|
|
75
|
+
);
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ s(
|
|
78
|
+
"polygon",
|
|
79
|
+
{
|
|
80
|
+
points: D,
|
|
81
|
+
fill: R(m, c),
|
|
82
|
+
fillOpacity: 0.25,
|
|
83
|
+
stroke: R(m, c),
|
|
84
|
+
strokeWidth: 0.8,
|
|
85
|
+
className: A(I && "animate-scale-in")
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
u.map((e, r) => /* @__PURE__ */ s(
|
|
89
|
+
"circle",
|
|
90
|
+
{
|
|
91
|
+
cx: e.x,
|
|
92
|
+
cy: e.y,
|
|
93
|
+
r: a.DOT_RADIUS,
|
|
94
|
+
fill: R(r, l[r].color || c)
|
|
95
|
+
},
|
|
96
|
+
l[r].label
|
|
97
|
+
)),
|
|
98
|
+
S && l.map((e, r) => {
|
|
99
|
+
const t = a.DEFAULT_START_ANGLE + r * n, o = i(t, a.OUTER_RADIUS + a.RADAR_LABEL_OFFSET);
|
|
100
|
+
return /* @__PURE__ */ y(
|
|
101
|
+
"text",
|
|
102
|
+
{
|
|
103
|
+
x: o.x,
|
|
104
|
+
y: o.y,
|
|
105
|
+
textAnchor: "middle",
|
|
106
|
+
dominantBaseline: "middle",
|
|
107
|
+
className: "bear-fill-[var(--bear-text-secondary)]",
|
|
108
|
+
fontSize: 4,
|
|
109
|
+
children: [
|
|
110
|
+
e.label,
|
|
111
|
+
C ? ` ${e.value}` : ""
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
`${e.label}-label`
|
|
115
|
+
);
|
|
116
|
+
})
|
|
117
|
+
] })
|
|
118
|
+
}
|
|
119
|
+
);
|
|
97
120
|
};
|
|
98
121
|
export {
|
|
99
|
-
|
|
122
|
+
P as RadarChart
|
|
100
123
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),r=require("../../constants/generals.const.cjs"),Z=require("../../utils/cn.cjs"),$=require("../../utils/generateBearId.utils.cjs"),ee=require("../../utils/useBearId.cjs"),te=require("../../utils/liveRegion.utils.cjs"),o=require("../Box/Box.cjs"),se=require("../Button/Button.cjs"),re=require("../ChatBubble/ChatBubble.cjs"),oe=require("../ChatError/ChatError.cjs"),ne=require("../PromptComposer/PromptComposer.cjs"),ae=require("../PromptSuggestions/PromptSuggestions.cjs"),n=require("./Chat.const.cjs"),S=require("./Chat.utils.cjs"),ce=require("./helpers/ChatTypingIndicator.cjs"),ie=E=>{const{id:C,testId:p,messages:c,onSend:L,onStop:O,onAttach:x,isLoading:N=r.BOOLEAN_FALSE,isStreaming:f=r.BOOLEAN_FALSE,isTyping:R=r.BOOLEAN_FALSE,placeholder:q,header:T,footer:H,showTimestamps:I=n.CHAT_DEFAULT_SHOW_TIMESTAMPS,showStatus:j=n.CHAT_DEFAULT_SHOW_STATUS,showAvatars:v=n.CHAT_DEFAULT_SHOW_AVATARS,userAvatar:F,botAvatar:b,typingText:y,className:w,height:U=n.CHAT_DEFAULTS.HEIGHT,disabled:P=n.CHAT_DEFAULT_DISABLED,allowAttach:D,suggestions:l,onSuggestionSelect:M,errorTitle:W,errorMessage:g,onRetry:V,translations:k}=E,z=ee.useBearId(r.COMPONENT_NAME_CHAT),G=$.resolveBearId(C,z),u=a.useRef(null),h=a.useRef(r.BOOLEAN_TRUE),A=a.useRef(null),[J,d]=a.useState(r.BOOLEAN_FALSE),_={...n.CHAT_DEFAULT_TRANSLATIONS,...k},B=f||N,s=c[c.length-1],K=B&&typeof(s==null?void 0:s.content)=="string"?s.content:void 0,Q=te.getBearLiveRegionProps("info"),m=()=>{const e=u.current;e&&(e.scrollTop=e.scrollHeight,h.current=r.BOOLEAN_TRUE,d(r.BOOLEAN_FALSE))},X=()=>{const e=u.current;if(!e)return;const i=S.isChatScrollerAtBottom(e);h.current=i,i&&d(r.BOOLEAN_FALSE)};return a.useEffect(()=>{const e=(s==null?void 0:s.id)??null,i=A.current===null,Y=e!==null&&e!==A.current;if(A.current=e,!!Y){if(i||h.current){m();return}d(r.BOOLEAN_TRUE)}},[c,s==null?void 0:s.id]),t.jsxs(o.Box,{id:G,"data-testid":p,className:Z.cn("Bear-Chat",w),style:S.resolveChatHeightVar(U),children:[T&&t.jsx(o.Box,{className:"Bear-Chat__header",children:T}),t.jsxs(o.Box,{ref:u,className:"Bear-Chat__messages",onScroll:X,children:[t.jsx(o.Box,{className:"Bear-Chat__live",...Q,children:K}),c.map(e=>t.jsx(re.ChatBubble,{message:e,showTimestamp:I,showStatus:j,showAvatar:v,userAvatar:F,botAvatar:b},e.id)),R&&!B&&t.jsx(ce.ChatTypingIndicator,{text:y??_.typingText}),g&&t.jsx(oe.ChatError,{title:W,onRetry:V,children:g}),J&&t.jsx(se.Button,{type:"button",variant:"primary",size:"sm",className:"Bear-Chat__new-messages",onClick:m,children:_.newMessagesLabel})]}),l&&l.length>0&&t.jsx(o.Box,{className:"Bear-Chat__suggestions",children:t.jsx(ae.PromptSuggestions,{suggestions:l,onSelect:M})}),t.jsxs(o.Box,{className:"Bear-Chat__composer",children:[t.jsx(ne.PromptComposer,{onSubmit:L,onStop:O,onAttach:x,isStreaming:B,disabled:P,allowAttach:D,placeholder:q??_.placeholder}),H]})]})};exports.Chat=ie;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../constants/numbers.const.cjs"),T=require("../../constants/generals.const.cjs"),A={PLACEHOLDER:T.PLACEHOLDER_START_TYPING,HEIGHT:_.FOUR_HUNDRED,TYPING_TEXT:"is typing..."},E={placeholder:A.PLACEHOLDER,typingText:A.TYPING_TEXT,newMessagesLabel:T.LABEL_NEW_MESSAGES},H=_.CHAT_STICK_THRESHOLD_PX,S=T.BOOLEAN_TRUE,L=T.BOOLEAN_TRUE,C=T.BOOLEAN_TRUE,D=T.BOOLEAN_FALSE,O="--Bear-Chat-height";exports.CHAT_DEFAULTS=A;exports.CHAT_DEFAULT_DISABLED=D;exports.CHAT_DEFAULT_SHOW_AVATARS=C;exports.CHAT_DEFAULT_SHOW_STATUS=L;exports.CHAT_DEFAULT_SHOW_TIMESTAMPS=S;exports.CHAT_DEFAULT_TRANSLATIONS=E;exports.CHAT_HEIGHT_VAR=O;exports.CHAT_STICK_THRESHOLD=H;
|
|
@@ -1,26 +1,13 @@
|
|
|
1
|
+
import { ChatTranslations } from './Chat.types';
|
|
1
2
|
export declare const CHAT_DEFAULTS: {
|
|
2
|
-
readonly PLACEHOLDER: "
|
|
3
|
+
readonly PLACEHOLDER: "Start typing...";
|
|
3
4
|
readonly HEIGHT: 400;
|
|
4
5
|
readonly TYPING_TEXT: "is typing...";
|
|
5
6
|
};
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const SENDER_COLORS: {
|
|
14
|
-
readonly user: {
|
|
15
|
-
readonly bg: "var(--bear-primary-500)";
|
|
16
|
-
readonly text: "white";
|
|
17
|
-
};
|
|
18
|
-
readonly bot: {
|
|
19
|
-
readonly bg: "var(--bear-bg-secondary)";
|
|
20
|
-
readonly text: "var(--bear-text-primary)";
|
|
21
|
-
};
|
|
22
|
-
readonly system: {
|
|
23
|
-
readonly bg: "transparent";
|
|
24
|
-
readonly text: "var(--bear-text-tertiary, var(--bear-text-muted))";
|
|
25
|
-
};
|
|
26
|
-
};
|
|
7
|
+
export declare const CHAT_DEFAULT_TRANSLATIONS: ChatTranslations;
|
|
8
|
+
export declare const CHAT_STICK_THRESHOLD = 16;
|
|
9
|
+
export declare const CHAT_DEFAULT_SHOW_TIMESTAMPS = true;
|
|
10
|
+
export declare const CHAT_DEFAULT_SHOW_STATUS = true;
|
|
11
|
+
export declare const CHAT_DEFAULT_SHOW_AVATARS = true;
|
|
12
|
+
export declare const CHAT_DEFAULT_DISABLED = false;
|
|
13
|
+
export declare const CHAT_HEIGHT_VAR = "--Bear-Chat-height";
|
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FOUR_HUNDRED as _, CHAT_STICK_THRESHOLD_PX as E } from "../../constants/numbers.const.js";
|
|
2
|
+
import { BOOLEAN_TRUE as T, BOOLEAN_FALSE as H, LABEL_NEW_MESSAGES as L, PLACEHOLDER_START_TYPING as S } from "../../constants/generals.const.js";
|
|
3
|
+
const A = {
|
|
4
|
+
PLACEHOLDER: S,
|
|
5
|
+
HEIGHT: _,
|
|
4
6
|
TYPING_TEXT: "is typing..."
|
|
5
|
-
},
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
error: "!"
|
|
11
|
-
}, t = {
|
|
12
|
-
user: {
|
|
13
|
-
bg: "var(--bear-primary-500)",
|
|
14
|
-
text: "white"
|
|
15
|
-
},
|
|
16
|
-
bot: {
|
|
17
|
-
bg: "var(--bear-bg-secondary)",
|
|
18
|
-
text: "var(--bear-text-primary)"
|
|
19
|
-
},
|
|
20
|
-
system: {
|
|
21
|
-
bg: "transparent",
|
|
22
|
-
text: "var(--bear-text-tertiary, var(--bear-text-muted))"
|
|
23
|
-
}
|
|
24
|
-
};
|
|
7
|
+
}, D = {
|
|
8
|
+
placeholder: A.PLACEHOLDER,
|
|
9
|
+
typingText: A.TYPING_TEXT,
|
|
10
|
+
newMessagesLabel: L
|
|
11
|
+
}, o = E, O = T, s = T, R = T, n = H, e = "--Bear-Chat-height";
|
|
25
12
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
A as CHAT_DEFAULTS,
|
|
14
|
+
n as CHAT_DEFAULT_DISABLED,
|
|
15
|
+
R as CHAT_DEFAULT_SHOW_AVATARS,
|
|
16
|
+
s as CHAT_DEFAULT_SHOW_STATUS,
|
|
17
|
+
O as CHAT_DEFAULT_SHOW_TIMESTAMPS,
|
|
18
|
+
D as CHAT_DEFAULT_TRANSLATIONS,
|
|
19
|
+
e as CHAT_HEIGHT_VAR,
|
|
20
|
+
o as CHAT_STICK_THRESHOLD
|
|
29
21
|
};
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { ChatProps } from './Chat.types';
|
|
3
|
-
|
|
4
|
-
* Chat - Chat interface component
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* const [messages, setMessages] = useState<ChatMessage[]>([
|
|
9
|
-
* { id: '1', content: 'Hello!', sender: 'bot', timestamp: new Date() },
|
|
10
|
-
* ]);
|
|
11
|
-
*
|
|
12
|
-
* <Chat
|
|
13
|
-
* messages={messages}
|
|
14
|
-
* onSend={(msg) => setMessages([...messages, { id: Date.now().toString(), content: msg, sender: 'user' }])}
|
|
15
|
-
* isTyping={false}
|
|
16
|
-
* showAvatars
|
|
17
|
-
* />
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare const Chat: FC<ChatProps>;
|
|
21
|
-
export default Chat;
|
|
2
|
+
export declare const Chat: (props: ChatProps) => import("react/jsx-runtime").JSX.Element;
|