@flikk/ui 1.0.0-beta.30 → 1.0.0-beta.32
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/CHANGELOG.md +375 -5
- package/dist/components/ai/AgentRequest/AgentRequest.animations.d.ts +25 -0
- package/dist/components/ai/AgentRequest/AgentRequest.animations.js +81 -0
- package/dist/components/ai/AgentRequest/AgentRequest.d.ts +3 -0
- package/dist/components/ai/AgentRequest/AgentRequest.js +435 -0
- package/dist/components/ai/AgentRequest/AgentRequest.theme.d.ts +2 -0
- package/dist/components/ai/AgentRequest/AgentRequest.theme.js +106 -0
- package/dist/components/ai/AgentRequest/AgentRequest.types.d.ts +241 -0
- package/dist/components/ai/AgentRequest/index.d.ts +3 -0
- package/dist/components/ai/AgentStatus/AgentStatus.d.ts +3 -0
- package/dist/components/ai/AgentStatus/AgentStatus.js +144 -0
- package/dist/components/ai/AgentStatus/AgentStatus.theme.d.ts +2 -0
- package/dist/components/ai/AgentStatus/AgentStatus.theme.js +37 -0
- package/dist/components/ai/AgentStatus/AgentStatus.types.d.ts +116 -0
- package/dist/components/ai/AgentStatus/index.d.ts +3 -0
- package/dist/components/ai/CodeBlock/CodeBlock.js +3 -3
- package/dist/components/ai/CodeBlock/CodeBlock.theme.js +2 -2
- package/dist/components/ai/PromptInput/PromptInput.js +13 -14
- package/dist/components/ai/PromptInput/PromptInput.theme.js +3 -3
- package/dist/components/ai/PromptInput/VoiceRecorder.js +3 -3
- package/dist/components/ai/PromptSuggestion/PromptSuggestion.theme.js +2 -2
- package/dist/components/ai/Reasoning/Reasoning.d.ts +5 -0
- package/dist/components/ai/Reasoning/Reasoning.js +40 -0
- package/dist/components/ai/Reasoning/Reasoning.theme.d.ts +6 -0
- package/dist/components/ai/Reasoning/Reasoning.theme.js +36 -0
- package/dist/components/ai/Reasoning/Reasoning.types.d.ts +73 -0
- package/dist/components/ai/Reasoning/ReasoningTrace.d.ts +11 -0
- package/dist/components/ai/Reasoning/ReasoningTrace.js +84 -0
- package/dist/components/ai/Reasoning/index.d.ts +3 -0
- package/dist/components/ai/SourceCitation/SourceCitation.d.ts +4 -0
- package/dist/components/ai/SourceCitation/SourceCitation.js +29 -0
- package/dist/components/ai/SourceCitation/SourceCitation.theme.d.ts +2 -0
- package/dist/components/ai/SourceCitation/SourceCitation.theme.js +23 -0
- package/dist/components/ai/SourceCitation/SourceCitation.types.d.ts +55 -0
- package/dist/components/ai/SourceCitation/index.d.ts +3 -0
- package/dist/components/ai/StreamingResponse/AnimatedText.d.ts +7 -0
- package/dist/components/ai/StreamingResponse/AnimatedText.js +8 -7
- package/dist/components/ai/StreamingResponse/ErrorDisplay.js +2 -2
- package/dist/components/ai/StreamingResponse/MarkdownRenderer.d.ts +5 -0
- package/dist/components/ai/StreamingResponse/MarkdownRenderer.js +4 -4
- package/dist/components/ai/StreamingResponse/StreamingCursor.d.ts +2 -2
- package/dist/components/ai/StreamingResponse/StreamingCursor.js +10 -7
- package/dist/components/ai/StreamingResponse/StreamingResponse.animations.d.ts +10 -0
- package/dist/components/ai/StreamingResponse/StreamingResponse.animations.js +59 -33
- package/dist/components/ai/StreamingResponse/StreamingResponse.js +14 -10
- package/dist/components/ai/StreamingResponse/StreamingResponse.theme.js +3 -1
- package/dist/components/ai/StreamingResponse/StreamingResponse.types.d.ts +33 -2
- package/dist/components/ai/StreamingResponse/StreamingSurface.d.ts +13 -0
- package/dist/components/ai/StreamingResponse/StreamingSurface.js +38 -0
- package/dist/components/ai/StreamingResponse/WordAnimationContext.d.ts +5 -0
- package/dist/components/ai/StreamingResponse/WordAnimationContext.js +5 -4
- package/dist/components/ai/StreamingResponse/index.d.ts +4 -2
- package/dist/components/ai/TokenCounter/TokenCounter.js +2 -2
- package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
- package/dist/components/ai/index.d.ts +6 -2
- package/dist/components/ai/index.js +10 -3
- package/dist/components/ai/shared/StatusIndicator.d.ts +8 -0
- package/dist/components/ai/shared/StatusIndicator.js +34 -0
- package/dist/components/canvas/BaseNode.js +1 -1
- package/dist/components/canvas/CanvasToolbar.js +2 -3
- package/dist/components/canvas/Edge.js +2 -2
- package/dist/components/canvas/NodeControls.js +2 -3
- package/dist/components/canvas/NodeRenderer.js +4 -4
- package/dist/components/charts/ActivityRings/ActivityRings.js +4 -4
- package/dist/components/charts/ActivityRings/ActivityRings.theme.js +1 -1
- package/dist/components/charts/AreaChart/AreaChart.js +24 -35
- package/dist/components/charts/AreaChart/AreaChart.theme.d.ts +1 -6
- package/dist/components/charts/AreaChart/AreaChart.theme.js +10 -22
- package/dist/components/charts/AreaChart/AreaChart.types.d.ts +18 -11
- package/dist/components/charts/AreaChart/AreaChart.types.js +10 -3
- package/dist/components/charts/AreaChart/index.d.ts +1 -1
- package/dist/components/charts/BarChart/BarChart.js +13 -32
- package/dist/components/charts/BarChart/BarChart.types.d.ts +20 -16
- package/dist/components/charts/BarChart/BarChart.types.js +11 -4
- package/dist/components/charts/ComboChart/BarRenderer.js +10 -7
- package/dist/components/charts/ComboChart/BarRenderer.types.d.ts +1 -1
- package/dist/components/charts/ComboChart/ComboChart.js +11 -24
- package/dist/components/charts/ComboChart/ComboChart.types.d.ts +15 -13
- package/dist/components/charts/ComboChart/ComboChart.types.js +14 -2
- package/dist/components/charts/ComboChart/ComboChartCanvas.js +1 -1
- package/dist/components/charts/ComboChart/LineRenderer.js +16 -11
- package/dist/components/charts/ComboChart/LineRenderer.types.d.ts +1 -1
- package/dist/components/charts/DonutChart/DonutChart.theme.js +4 -4
- package/dist/components/charts/DonutChart/MultiSegmentDonutChart.theme.js +1 -1
- package/dist/components/charts/Heatmap/Heatmap.js +49 -42
- package/dist/components/charts/Heatmap/Heatmap.theme.d.ts +6 -2
- package/dist/components/charts/Heatmap/Heatmap.theme.js +20 -8
- package/dist/components/charts/Heatmap/Heatmap.types.d.ts +49 -82
- package/dist/components/charts/Heatmap/HeatmapCell.js +30 -81
- package/dist/components/charts/Heatmap/HeatmapLegend.d.ts +7 -6
- package/dist/components/charts/Heatmap/HeatmapLegend.js +6 -6
- package/dist/components/charts/Heatmap/index.d.ts +1 -1
- package/dist/components/charts/Heatmap/utils/heatmapUtils.d.ts +7 -12
- package/dist/components/charts/Heatmap/utils/heatmapUtils.js +16 -61
- package/dist/components/charts/Heatmap/utils/heatmapUtils.test.d.ts +1 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.d.ts +16 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.js +237 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.types.d.ts +62 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.types.js +21 -0
- package/dist/components/charts/HorizontalBarChart/index.d.ts +3 -0
- package/dist/components/charts/LineChart/LineChart.js +11 -28
- package/dist/components/charts/LineChart/LineChart.types.d.ts +11 -14
- package/dist/components/charts/LineChart/LineChart.types.js +11 -3
- package/dist/components/charts/LollipopChart/LollipopChart.d.ts +3 -0
- package/dist/components/charts/LollipopChart/LollipopChart.js +361 -0
- package/dist/components/charts/LollipopChart/LollipopChart.types.d.ts +42 -0
- package/dist/components/charts/LollipopChart/LollipopChart.types.js +12 -0
- package/dist/components/charts/LollipopChart/index.d.ts +3 -0
- package/dist/components/charts/RadarChart/RadarChart.js +1 -1
- package/dist/components/charts/StackedBarChart/StackedBarChart.js +151 -133
- package/dist/components/charts/StackedBarChart/StackedBarChart.types.d.ts +20 -18
- package/dist/components/charts/StackedBarChart/StackedBarChart.types.js +10 -4
- package/dist/components/charts/hooks/useChartAccessibility.d.ts +1 -1
- package/dist/components/charts/hooks/useChartAccessibility.js +12 -6
- package/dist/components/charts/hooks/useTooltipPosition.js +18 -6
- package/dist/components/charts/index.d.ts +10 -8
- package/dist/components/charts/index.js +8 -4
- package/dist/components/charts/shared/ChartAxis/CategoryYAxis.d.ts +14 -0
- package/dist/components/charts/shared/ChartAxis/CategoryYAxis.js +35 -0
- package/dist/components/charts/shared/ChartAxis/ChartAxis.types.d.ts +69 -8
- package/dist/components/charts/shared/ChartAxis/ValueXAxis.d.ts +14 -0
- package/dist/components/charts/shared/ChartAxis/ValueXAxis.js +64 -0
- package/dist/components/charts/shared/ChartAxis/XAxis.js +1 -1
- package/dist/components/charts/shared/ChartAxis/YAxis.js +2 -2
- package/dist/components/charts/shared/ChartAxis/index.d.ts +3 -1
- package/dist/components/charts/shared/ChartGrid/HorizontalGrid.d.ts +0 -2
- package/dist/components/charts/shared/ChartGrid/HorizontalGrid.js +1 -1
- package/dist/components/charts/shared/ChartGrid/VerticalGrid.d.ts +29 -0
- package/dist/components/charts/shared/ChartGrid/VerticalGrid.js +26 -0
- package/dist/components/charts/shared/ChartGrid/index.d.ts +2 -0
- package/dist/components/charts/shared/ChartMarker/ChartMarker.js +7 -1
- package/dist/components/charts/shared/ChartText/ChartText.theme.js +1 -1
- package/dist/components/charts/shared/index.d.ts +1 -1
- package/dist/components/charts/theme/chart.theme.js +21 -26
- package/dist/components/charts/types/chart.types.d.ts +9 -5
- package/dist/components/charts/types/chart.types.js +1 -7
- package/dist/components/charts/utils/animation-utils.d.ts +12 -7
- package/dist/components/charts/utils/animation-utils.js +19 -21
- package/dist/components/charts/utils/bar-emphasis.d.ts +32 -3
- package/dist/components/charts/utils/bar-emphasis.js +24 -8
- package/dist/components/charts/utils/index.d.ts +1 -0
- package/dist/components/charts/utils/series-color.d.ts +7 -0
- package/dist/components/charts/utils/series-color.js +20 -0
- package/dist/components/core/Accordion/Accordion.theme.js +3 -3
- package/dist/components/core/Accordion/AccordionTrigger.js +2 -2
- package/dist/components/core/Alert/Alert.animations.d.ts +11 -3
- package/dist/components/core/Alert/Alert.animations.js +30 -8
- package/dist/components/core/Alert/Alert.js +23 -9
- package/dist/components/core/Alert/Alert.theme.js +1 -1
- package/dist/components/core/Alert/Alert.types.d.ts +4 -2
- package/dist/components/core/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/core/Avatar/Avatar.js +50 -42
- package/dist/components/core/Avatar/Avatar.theme.d.ts +8 -4
- package/dist/components/core/Avatar/Avatar.theme.js +64 -8
- package/dist/components/core/Avatar/Avatar.types.d.ts +13 -2
- package/dist/components/core/Avatar/index.d.ts +1 -1
- package/dist/components/core/AvatarGroup/AvatarGroup.js +6 -8
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.d.ts +1 -2
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +2 -6
- package/dist/components/core/AvatarGroup/AvatarGroup.types.d.ts +0 -6
- package/dist/components/core/AvatarGroup/index.d.ts +1 -1
- package/dist/components/core/Badge/Badge.animations.d.ts +0 -5
- package/dist/components/core/Badge/Badge.animations.js +5 -82
- package/dist/components/core/Badge/Badge.d.ts +7 -4
- package/dist/components/core/Badge/Badge.js +33 -65
- package/dist/components/core/Badge/Badge.theme.js +26 -24
- package/dist/components/core/Badge/Badge.types.d.ts +18 -34
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.d.ts +1 -4
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +6 -6
- package/dist/components/core/Button/Button.js +14 -58
- package/dist/components/core/Button/Button.theme.d.ts +2 -0
- package/dist/components/core/Button/Button.theme.js +35 -22
- package/dist/components/core/Button/Button.types.d.ts +26 -13
- package/dist/components/core/Button/index.d.ts +0 -2
- package/dist/components/core/Calendar/Calendar.js +20 -5
- package/dist/components/core/Calendar/Calendar.theme.js +15 -23
- package/dist/components/core/Calendar/Calendar.types.d.ts +0 -1
- package/dist/components/core/Calendar/CalendarMini/CalendarMini.js +3 -3
- package/dist/components/core/Calendar/CalendarMini/CalendarMini.theme.js +2 -2
- package/dist/components/core/Card/Card.js +7 -2
- package/dist/components/core/Card/Card.theme.js +40 -4
- package/dist/components/core/Card/Card.types.d.ts +20 -0
- package/dist/components/core/Card/CardBody.js +9 -1
- package/dist/components/core/Card/CardContext.d.ts +13 -0
- package/dist/components/core/Card/CardContext.js +14 -0
- package/dist/components/core/Card/CardFooter.js +1 -1
- package/dist/components/core/Card/CardHeader.js +4 -1
- package/dist/components/core/CommandPalette/CommandPalette.js +5 -4
- package/dist/components/core/CommandPalette/CommandPalette.theme.js +3 -7
- package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +2 -0
- package/dist/components/core/ContextMenu/ContextMenu.theme.js +4 -3
- package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +8 -1
- package/dist/components/core/ContextMenu/ContextMenuItem.js +2 -2
- package/dist/components/core/ContextMenu/ContextMenuSub.d.ts +11 -1
- package/dist/components/core/ContextMenu/ContextMenuSub.js +35 -22
- package/dist/components/core/ContextMenu/ContextMenuSubBody.js +14 -3
- package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +22 -9
- package/dist/components/core/DragDrop/DragDrop.theme.js +2 -2
- package/dist/components/core/Drawer/Drawer.theme.js +7 -4
- package/dist/components/core/Drawer/DrawerHeader.js +2 -3
- package/dist/components/core/Dropdown/Dropdown.theme.js +3 -1
- package/dist/components/core/Dropdown/DropdownItem.js +2 -2
- package/dist/components/core/Dropdown/DropdownMenu.js +22 -7
- package/dist/components/core/Dropdown/DropdownTrigger.js +16 -5
- package/dist/components/core/HeroCard/HeroCard.theme.js +5 -2
- package/dist/components/core/Kbd/Kbd.theme.js +4 -2
- package/dist/components/core/Link/Link.js +7 -5
- package/dist/components/core/Masonry/Masonry.theme.js +1 -1
- package/dist/components/core/MenuItem/MenuItem.js +2 -1
- package/dist/components/core/MenuItem/MenuItem.theme.js +13 -1
- package/dist/components/core/Message/Message.js +4 -2
- package/dist/components/core/Message/Message.theme.js +8 -10
- package/dist/components/core/Message/MessageAudio.js +2 -2
- package/dist/components/core/Message/MessageFile.js +2 -2
- package/dist/components/core/Message/MessageLink.js +2 -2
- package/dist/components/core/Message/MessageStatusIndicator.js +5 -5
- package/dist/components/core/Modal/Modal.animations.d.ts +1 -1
- package/dist/components/core/Modal/Modal.animations.js +50 -11
- package/dist/components/core/Modal/Modal.d.ts +1 -1
- package/dist/components/core/Modal/Modal.js +6 -2
- package/dist/components/core/Modal/Modal.theme.js +9 -4
- package/dist/components/core/Modal/ModalHeader.js +2 -3
- package/dist/components/core/ModalStack/ModalStackModal.js +4 -2
- package/dist/components/core/NavItem/NavItem.js +8 -7
- package/dist/components/core/NavItem/NavItem.theme.js +1 -1
- package/dist/components/core/OfflineIndicator/OfflineIndicator.animations.d.ts +22 -0
- package/dist/components/core/OfflineIndicator/OfflineIndicator.animations.js +54 -0
- package/dist/components/core/OfflineIndicator/OfflineIndicator.js +23 -24
- package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +27 -6
- package/dist/components/core/OfflineIndicator/OfflineIndicator.types.d.ts +17 -0
- package/dist/components/core/PageHeading/PageHeading.theme.js +1 -1
- package/dist/components/core/PageHeading/PageHeadingBackButton.js +2 -2
- package/dist/components/core/Pagination/Pagination.js +3 -3
- package/dist/components/core/Pagination/Pagination.theme.js +5 -5
- package/dist/components/core/Pill/Pill.js +5 -2
- package/dist/components/core/Pill/Pill.theme.js +9 -5
- package/dist/components/core/Popover/PopoverBody.js +16 -5
- package/dist/components/core/Progress/Progress.d.ts +0 -25
- package/dist/components/core/Progress/Progress.js +79 -11
- package/dist/components/core/Progress/Progress.theme.js +17 -0
- package/dist/components/core/Progress/Progress.types.d.ts +47 -1
- package/dist/components/core/Rating/Rating.js +4 -5
- package/dist/components/core/Rating/Rating.theme.js +2 -2
- package/dist/components/core/Rating/Rating.types.d.ts +3 -2
- package/dist/components/core/ScrollArea/ScrollArea.js +1 -1
- package/dist/components/core/ScrollArea/ScrollArea.theme.js +1 -1
- package/dist/components/core/Segmented/Segmented.theme.js +10 -7
- package/dist/components/core/Segmented/SegmentedContext.js +1 -0
- package/dist/components/core/Sidebar/Sidebar.js +5 -2
- package/dist/components/core/Sidebar/Sidebar.theme.js +2 -2
- package/dist/components/core/Sidebar/Sidebar.types.d.ts +4 -2
- package/dist/components/core/Sidebar/SidebarContent.js +1 -1
- package/dist/components/core/Sidebar/SidebarHeader.js +3 -3
- package/dist/components/core/Sidebar/SidebarMobileTrigger.js +2 -2
- package/dist/components/core/Sidebar/SidebarSearch.js +4 -4
- package/dist/components/core/Sidebar/SidebarToggle.js +3 -3
- package/dist/components/core/Sidebar/SidebarUserProfile.js +3 -3
- package/dist/components/core/Sortable/Sortable.js +2 -2
- package/dist/components/core/Sortable/Sortable.theme.js +1 -1
- package/dist/components/core/Tabs/Tabs.theme.js +1 -1
- package/dist/components/core/Tag/Tag.js +2 -2
- package/dist/components/core/Tag/Tag.theme.js +5 -3
- package/dist/components/core/Toast/Toast.js +3 -3
- package/dist/components/core/Toast/Toast.types.d.ts +1 -1
- package/dist/components/core/Toast/ToastProvider.js +1 -1
- package/dist/components/core/Toast/useToast.js +5 -5
- package/dist/components/core/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.js +42 -10
- package/dist/components/core/Tooltip/Tooltip.types.d.ts +25 -0
- package/dist/components/core/Tree/Tree.js +2 -2
- package/dist/components/core/Tree/Tree.theme.js +1 -1
- package/dist/components/core/index.d.ts +0 -2
- package/dist/components/core/index.js +0 -4
- package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.d.ts +4 -0
- package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.js +20 -0
- package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.js +1 -1
- package/dist/components/core/shared/Ripple.d.ts +16 -0
- package/dist/components/core/shared/Ripple.js +141 -0
- package/dist/components/core/shared/interaction.animations.d.ts +51 -0
- package/dist/components/core/shared/interaction.animations.js +59 -0
- package/dist/components/data-display/Feed/Feed.js +2 -2
- package/dist/components/data-display/GanttChart/GanttChart.theme.js +7 -7
- package/dist/components/data-display/GanttChart/GanttChartPanel.js +2 -2
- package/dist/components/data-display/GanttChart/GanttTableGroupRow.js +3 -3
- package/dist/components/data-display/GanttChart/GanttTaskBar.js +1 -1
- package/dist/components/data-display/GanttChart/GanttTaskContextMenu.js +2 -2
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +1 -1
- package/dist/components/data-display/GanttChart/GanttToolbar.js +2 -3
- package/dist/components/data-display/KPI/KPI.js +12 -21
- package/dist/components/data-display/KPI/KPI.theme.js +8 -4
- package/dist/components/data-display/Metric/Metric.js +2 -2
- package/dist/components/data-display/Metric/Metric.theme.js +25 -8
- package/dist/components/data-display/Metric/Metric.types.d.ts +1 -1
- package/dist/components/data-display/Table/Table.theme.js +11 -11
- package/dist/components/data-display/Table/TableActions.js +2 -2
- package/dist/components/data-display/Table/TableActionsMenu.js +1 -1
- package/dist/components/data-display/Table/TableColumnManager.js +2 -3
- package/dist/components/data-display/Table/TableContext.js +1 -0
- package/dist/components/data-display/Table/TableDeclarative.js +3 -3
- package/dist/components/data-display/Table/TableFilter.js +13 -6
- package/dist/components/data-display/Table/TableHeader.js +3 -3
- package/dist/components/data-display/Table/TableRow.js +2 -2
- package/dist/components/data-display/Table/TableSelectionHeader.js +4 -4
- package/dist/components/data-display/Timeline/Timeline.theme.js +1 -1
- package/dist/components/data-display/Timeline/TimelineMarker.js +2 -2
- package/dist/components/effects/CustomCursor/CustomCursor.d.ts +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.js +3 -3
- package/dist/components/effects/CustomCursor/CustomCursor.theme.js +4 -4
- package/dist/components/effects/DotPattern/DotPattern.js +6 -0
- package/dist/components/effects/DotPattern/DotPattern.types.d.ts +4 -2
- package/dist/components/effects/MeshGradient/MeshGradient.utils.d.ts +1 -1
- package/dist/components/effects/MeshGradient/MeshGradient.utils.js +1 -1
- package/dist/components/effects/Neumorphic/InsetCircleButton.js +1 -1
- package/dist/components/effects/Overlay/Overlay.js +7 -3
- package/dist/components/effects/index.d.ts +0 -32
- package/dist/components/effects/index.js +0 -16
- package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.d.ts +0 -2
- package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.js +1 -93
- package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.types.d.ts +0 -10
- package/dist/components/effects/shared/ShaderCanvas/index.d.ts +1 -1
- package/dist/components/effects/shared/index.d.ts +1 -3
- package/dist/components/effects/shared/shaderNoise.glsl.d.ts +1 -1
- package/dist/components/effects/shared/shaderNoise.glsl.js +2 -11
- package/dist/components/forms/Checkbox/Checkbox.js +2 -1
- package/dist/components/forms/Checkbox/Checkbox.theme.js +3 -3
- package/dist/components/forms/ColorPicker/ColorPickerEyeDropper.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerGradient.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerHeader.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerImage.js +3 -3
- package/dist/components/forms/ColorPicker/ColorPickerInput.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerPresets.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerSavedColors.js +2 -2
- package/dist/components/forms/Combobox/Combobox.js +5 -3
- package/dist/components/forms/Combobox/Combobox.theme.js +2 -2
- package/dist/components/forms/DatePicker/DatePicker.animations.js +16 -25
- package/dist/components/forms/DatePicker/DatePicker.theme.js +2 -2
- package/dist/components/forms/DatePicker/DatePickerBody.js +1 -1
- package/dist/components/forms/DatePicker/DatePickerTrigger.js +2 -2
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +4 -4
- package/dist/components/forms/DateRangePicker/DateRangePickerBody.js +1 -1
- package/dist/components/forms/DateRangePicker/DateRangePickerContext.js +1 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerPresets.js +2 -2
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +2 -2
- package/dist/components/forms/FileUpload/FileUpload.js +4 -4
- package/dist/components/forms/FileUpload/FileUpload.theme.js +7 -3
- package/dist/components/forms/FileUpload/FileUploadProgress.js +7 -7
- package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +1 -1
- package/dist/components/forms/Input/Input.js +6 -7
- package/dist/components/forms/Input/Input.theme.js +19 -15
- package/dist/components/forms/InputAddress/InputAddress.js +10 -3
- package/dist/components/forms/InputAddress/InputAddress.types.d.ts +2 -2
- package/dist/components/forms/InputCounter/InputCounter.js +3 -3
- package/dist/components/forms/InputOTP/InputOTP.d.ts +3 -12
- package/dist/components/forms/InputOTP/InputOTP.js +140 -151
- package/dist/components/forms/InputOTP/InputOTP.theme.d.ts +5 -1
- package/dist/components/forms/InputOTP/InputOTP.theme.js +40 -5
- package/dist/components/forms/InputOTP/InputOTP.types.d.ts +45 -2
- package/dist/components/forms/InputOTP/index.d.ts +1 -1
- package/dist/components/forms/InputTag/InputTag.js +5 -5
- package/dist/components/forms/InputTag/InputTag.theme.js +1 -2
- package/dist/components/forms/Mention/Mention.theme.js +3 -5
- package/dist/components/forms/Radio/Radio.js +3 -2
- package/dist/components/forms/Radio/Radio.theme.js +3 -3
- package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +12 -16
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +165 -1681
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.d.ts +12 -56
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +60 -118
- package/dist/components/forms/RichTextEditor/RichTextEditor.types.d.ts +62 -126
- package/dist/components/forms/RichTextEditor/RichTextLinkField.d.ts +18 -0
- package/dist/components/forms/RichTextEditor/RichTextLinkField.js +46 -0
- package/dist/components/forms/RichTextEditor/RichTextToolbar.d.ts +15 -0
- package/dist/components/forms/RichTextEditor/RichTextToolbar.js +93 -0
- package/dist/components/forms/RichTextEditor/editorCommands.d.ts +50 -0
- package/dist/components/forms/RichTextEditor/editorCommands.js +58 -0
- package/dist/components/forms/RichTextEditor/editorState.d.ts +19 -0
- package/dist/components/forms/RichTextEditor/editorState.js +103 -0
- package/dist/components/forms/RichTextEditor/index.d.ts +5 -3
- package/dist/components/forms/RichTextEditor/sanitizeHtml.d.ts +38 -0
- package/dist/components/forms/RichTextEditor/sanitizeHtml.js +179 -0
- package/dist/components/forms/RichTextEditor/sanitizeHtml.test.d.ts +1 -0
- package/dist/components/forms/Select/Select.d.ts +5 -1
- package/dist/components/forms/Select/Select.js +14 -13
- package/dist/components/forms/Select/Select.theme.js +4 -4
- package/dist/components/forms/Select/Select.types.d.ts +74 -8
- package/dist/components/forms/Select/useSelectState.d.ts +9 -3
- package/dist/components/forms/Select/useSelectState.js +4 -1
- package/dist/components/forms/SelectableCard/SelectableCard.animations.d.ts +1 -2
- package/dist/components/forms/SelectableCard/SelectableCard.animations.js +6 -7
- package/dist/components/forms/SelectableCard/SelectableCard.js +3 -2
- package/dist/components/forms/SelectableCard/SelectableCard.theme.js +1 -1
- package/dist/components/forms/Signature/Signature.js +1 -1
- package/dist/components/forms/Slider/Slider.js +24 -11
- package/dist/components/forms/Slider/Slider.theme.js +9 -3
- package/dist/components/forms/Switch/Switch.theme.js +3 -3
- package/dist/components/forms/TimePicker/TimePicker.theme.js +7 -8
- package/dist/components/forms/TimePicker/TimePickerContent.js +1 -1
- package/dist/components/forms/TimePicker/TimePickerTrigger.js +3 -3
- package/dist/components/forms/forms.theme.js +38 -13
- package/dist/components/forms/index.js +2 -1
- package/dist/components/generative/FormShell.d.ts +22 -0
- package/dist/components/generative/FormShell.js +102 -0
- package/dist/components/generative/GenerativeView.d.ts +52 -1
- package/dist/components/generative/GenerativeView.js +203 -11
- package/dist/components/generative/actions.d.ts +5 -0
- package/dist/components/generative/ai-sdk/index.d.ts +1 -0
- package/dist/components/generative/ai-sdk/index.js +1 -0
- package/dist/components/generative/ai-sdk/useGenerativeChat.d.ts +52 -0
- package/dist/components/generative/ai-sdk/useGenerativeChat.js +73 -0
- package/dist/components/generative/ai-sdk/useGenerativeChat.test.d.ts +1 -0
- package/dist/components/generative/fieldBinding.d.ts +31 -0
- package/dist/components/generative/fieldBinding.js +33 -0
- package/dist/components/generative/fieldBinding.test.d.ts +1 -0
- package/dist/components/generative/formScope.d.ts +71 -0
- package/dist/components/generative/formScope.js +135 -0
- package/dist/components/generative/index.d.ts +4 -0
- package/dist/components/generative/index.js +4 -0
- package/dist/components/generative/registry.d.ts +2 -0
- package/dist/components/generative/registry.js +197 -4
- package/dist/components/generative/resolvers.js +16 -16
- package/dist/components/generative/schema.generated.js +2522 -328
- package/dist/components/generative/toToolResult.d.ts +21 -0
- package/dist/components/generative/toToolResult.js +15 -0
- package/dist/components/generative/toToolResult.test.d.ts +1 -0
- package/dist/components/generative/validate.d.ts +10 -1
- package/dist/components/generative/validate.js +126 -11
- package/dist/components/layout/Grid/Grid.js +1 -0
- package/dist/components/layout/Section/Section.theme.js +1 -1
- package/dist/components/layout/Stack/Stack.js +1 -0
- package/dist/generative.schema.json +2522 -328
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useElapsedTime.d.ts +28 -0
- package/dist/hooks/useElapsedTime.js +37 -0
- package/dist/hooks/useSelectPortal.d.ts +10 -2
- package/dist/hooks/useSelectPortal.js +6 -3
- package/dist/index.js +2 -5
- package/dist/registry.json +3262 -2464
- package/dist/shadcn-compat.css +6 -6
- package/dist/styles/theme.test.d.ts +1 -0
- package/dist/styles.css +1 -1
- package/dist/test/render.d.ts +17 -0
- package/dist/theme.css +5 -1
- package/dist/themes/ember.css +131 -0
- package/dist/themes/iris.css +94 -0
- package/dist/themes/jade.css +139 -0
- package/dist/themes/precision.css +232 -0
- package/dist/tools.json +2557 -328
- package/dist/utils/colorUtils.d.ts +6 -6
- package/dist/utils/colorUtils.js +8 -8
- package/dist/utils/index.d.ts +0 -1
- package/package.json +39 -6
- package/src/global.scss +32 -28
- package/src/styles/theme.css +547 -176
- package/src/styles/theme.test.ts +119 -0
- package/tailwind.preset.cjs +66 -38
- package/dist/components/charts/FunnelChart/FunnelChart.animations.d.ts +0 -35
- package/dist/components/charts/FunnelChart/FunnelChart.animations.js +0 -59
- package/dist/components/charts/FunnelChart/FunnelChart.d.ts +0 -8
- package/dist/components/charts/FunnelChart/FunnelChart.js +0 -410
- package/dist/components/charts/FunnelChart/FunnelChart.theme.d.ts +0 -2
- package/dist/components/charts/FunnelChart/FunnelChart.theme.js +0 -12
- package/dist/components/charts/FunnelChart/FunnelChart.types.d.ts +0 -105
- package/dist/components/charts/FunnelChart/index.d.ts +0 -4
- package/dist/components/charts/ScatterPlot/ScatterPlot.d.ts +0 -9
- package/dist/components/charts/ScatterPlot/ScatterPlot.js +0 -207
- package/dist/components/charts/ScatterPlot/ScatterPlot.theme.d.ts +0 -18
- package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +0 -42
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +0 -65
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.js +0 -12
- package/dist/components/charts/ScatterPlot/index.d.ts +0 -3
- package/dist/components/core/Button/Button.ripple.d.ts +0 -71
- package/dist/components/core/Button/Button.ripple.js +0 -236
- package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.d.ts +0 -4
- package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.theme.d.ts +0 -12
- package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.types.d.ts +0 -23
- package/dist/components/core/Calendar/CalendarEvent/index.d.ts +0 -2
- package/dist/components/core/CardStack/CardStack.animations.d.ts +0 -47
- package/dist/components/core/CardStack/CardStack.d.ts +0 -3
- package/dist/components/core/CardStack/CardStack.js +0 -187
- package/dist/components/core/CardStack/CardStack.theme.d.ts +0 -6
- package/dist/components/core/CardStack/CardStack.theme.js +0 -33
- package/dist/components/core/CardStack/CardStack.types.d.ts +0 -139
- package/dist/components/core/CardStack/index.d.ts +0 -7
- package/dist/components/core/Carousel/Carousel.d.ts +0 -3
- package/dist/components/core/Carousel/Carousel.js +0 -83
- package/dist/components/core/Carousel/Carousel.theme.d.ts +0 -10
- package/dist/components/core/Carousel/Carousel.theme.js +0 -20
- package/dist/components/core/Carousel/Carousel.types.d.ts +0 -113
- package/dist/components/core/Carousel/CarouselBody.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselBody.js +0 -59
- package/dist/components/core/Carousel/CarouselContext.d.ts +0 -3
- package/dist/components/core/Carousel/CarouselContext.js +0 -13
- package/dist/components/core/Carousel/CarouselItem.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselItem.js +0 -11
- package/dist/components/core/Carousel/CarouselNext.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselNext.js +0 -16
- package/dist/components/core/Carousel/CarouselPrevious.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselPrevious.js +0 -16
- package/dist/components/core/Carousel/index.d.ts +0 -3
- package/dist/components/core/Pill/Pill.animations.d.ts +0 -32
- package/dist/components/core/Pill/Pill.animations.js +0 -16
- package/dist/components/effects/ColorPanels/ColorPanels.d.ts +0 -8
- package/dist/components/effects/ColorPanels/ColorPanels.js +0 -66
- package/dist/components/effects/ColorPanels/ColorPanels.shaders.d.ts +0 -12
- package/dist/components/effects/ColorPanels/ColorPanels.shaders.js +0 -218
- package/dist/components/effects/ColorPanels/ColorPanels.types.d.ts +0 -29
- package/dist/components/effects/ColorPanels/ColorPanels.types.js +0 -3
- package/dist/components/effects/ColorPanels/index.d.ts +0 -2
- package/dist/components/effects/FlutedGlass/FlutedGlass.d.ts +0 -9
- package/dist/components/effects/FlutedGlass/FlutedGlass.js +0 -80
- package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.d.ts +0 -12
- package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.js +0 -335
- package/dist/components/effects/FlutedGlass/FlutedGlass.types.d.ts +0 -61
- package/dist/components/effects/FlutedGlass/FlutedGlass.types.js +0 -16
- package/dist/components/effects/FlutedGlass/index.d.ts +0 -3
- package/dist/components/effects/GlassEffect/GlassEffect.d.ts +0 -15
- package/dist/components/effects/GlassEffect/GlassEffect.js +0 -38
- package/dist/components/effects/GlassEffect/GlassEffect.types.d.ts +0 -19
- package/dist/components/effects/GlassEffect/index.d.ts +0 -2
- package/dist/components/effects/GlassSurface/GlassSurface.d.ts +0 -8
- package/dist/components/effects/GlassSurface/GlassSurface.js +0 -250
- package/dist/components/effects/GlassSurface/GlassSurface.types.d.ts +0 -66
- package/dist/components/effects/GlassSurface/index.d.ts +0 -2
- package/dist/components/effects/GodRays/GodRays.d.ts +0 -8
- package/dist/components/effects/GodRays/GodRays.js +0 -68
- package/dist/components/effects/GodRays/GodRays.shaders.d.ts +0 -10
- package/dist/components/effects/GodRays/GodRays.shaders.js +0 -128
- package/dist/components/effects/GodRays/GodRays.types.d.ts +0 -25
- package/dist/components/effects/GodRays/GodRays.types.js +0 -3
- package/dist/components/effects/GodRays/index.d.ts +0 -2
- package/dist/components/effects/GridPattern/GridPattern.d.ts +0 -18
- package/dist/components/effects/GridPattern/GridPattern.js +0 -65
- package/dist/components/effects/GridPattern/GridPattern.types.d.ts +0 -47
- package/dist/components/effects/GridPattern/index.d.ts +0 -2
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.d.ts +0 -10
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.js +0 -78
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.d.ts +0 -22
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.js +0 -239
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.types.d.ts +0 -52
- package/dist/components/effects/HalftoneCmyk/index.d.ts +0 -2
- package/dist/components/effects/HalftoneDots/HalftoneDots.d.ts +0 -9
- package/dist/components/effects/HalftoneDots/HalftoneDots.js +0 -68
- package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.d.ts +0 -13
- package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.js +0 -296
- package/dist/components/effects/HalftoneDots/HalftoneDots.types.d.ts +0 -43
- package/dist/components/effects/HalftoneDots/HalftoneDots.types.js +0 -12
- package/dist/components/effects/HalftoneDots/index.d.ts +0 -3
- package/dist/components/effects/ImageDithering/ImageDithering.d.ts +0 -9
- package/dist/components/effects/ImageDithering/ImageDithering.js +0 -68
- package/dist/components/effects/ImageDithering/ImageDithering.shaders.d.ts +0 -12
- package/dist/components/effects/ImageDithering/ImageDithering.shaders.js +0 -117
- package/dist/components/effects/ImageDithering/ImageDithering.types.d.ts +0 -30
- package/dist/components/effects/ImageDithering/ImageDithering.types.js +0 -8
- package/dist/components/effects/ImageDithering/index.d.ts +0 -3
- package/dist/components/effects/MagneticElement/MagneticElement.d.ts +0 -30
- package/dist/components/effects/MagneticElement/MagneticElement.js +0 -111
- package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +0 -44
- package/dist/components/effects/MagneticElement/index.d.ts +0 -2
- package/dist/components/effects/Metaballs/Metaballs.d.ts +0 -8
- package/dist/components/effects/Metaballs/Metaballs.js +0 -59
- package/dist/components/effects/Metaballs/Metaballs.shaders.d.ts +0 -10
- package/dist/components/effects/Metaballs/Metaballs.shaders.js +0 -102
- package/dist/components/effects/Metaballs/Metaballs.types.d.ts +0 -16
- package/dist/components/effects/Metaballs/Metaballs.types.js +0 -3
- package/dist/components/effects/Metaballs/index.d.ts +0 -2
- package/dist/components/effects/PaperTexture/PaperTexture.d.ts +0 -9
- package/dist/components/effects/PaperTexture/PaperTexture.js +0 -61
- package/dist/components/effects/PaperTexture/PaperTexture.shaders.d.ts +0 -22
- package/dist/components/effects/PaperTexture/PaperTexture.shaders.js +0 -145
- package/dist/components/effects/PaperTexture/PaperTexture.types.d.ts +0 -19
- package/dist/components/effects/PaperTexture/index.d.ts +0 -2
- package/dist/components/effects/PulsingBorder/PulsingBorder.d.ts +0 -27
- package/dist/components/effects/PulsingBorder/PulsingBorder.js +0 -174
- package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.d.ts +0 -14
- package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.js +0 -258
- package/dist/components/effects/PulsingBorder/PulsingBorder.types.d.ts +0 -75
- package/dist/components/effects/PulsingBorder/PulsingBorder.types.js +0 -3
- package/dist/components/effects/PulsingBorder/index.d.ts +0 -2
- package/dist/components/effects/SmokeRing/SmokeRing.d.ts +0 -8
- package/dist/components/effects/SmokeRing/SmokeRing.js +0 -62
- package/dist/components/effects/SmokeRing/SmokeRing.shaders.d.ts +0 -14
- package/dist/components/effects/SmokeRing/SmokeRing.shaders.js +0 -130
- package/dist/components/effects/SmokeRing/SmokeRing.types.d.ts +0 -22
- package/dist/components/effects/SmokeRing/SmokeRing.types.js +0 -3
- package/dist/components/effects/SmokeRing/index.d.ts +0 -2
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.d.ts +0 -9
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.js +0 -59
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.d.ts +0 -14
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.js +0 -129
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.d.ts +0 -23
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.js +0 -3
- package/dist/components/effects/StaticGradientMesh/index.d.ts +0 -2
- package/dist/components/effects/Water/Water.d.ts +0 -9
- package/dist/components/effects/Water/Water.js +0 -65
- package/dist/components/effects/Water/Water.shaders.d.ts +0 -11
- package/dist/components/effects/Water/Water.shaders.js +0 -123
- package/dist/components/effects/Water/Water.types.d.ts +0 -25
- package/dist/components/effects/Water/index.d.ts +0 -2
- package/dist/components/effects/shared/bayerMatrices.glsl.d.ts +0 -10
- package/dist/components/effects/shared/bayerMatrices.glsl.js +0 -44
- package/dist/components/effects/shared/imageUV.glsl.d.ts +0 -12
- package/dist/components/effects/shared/imageUV.glsl.js +0 -26
- package/dist/components/forms/RichTextEditor/RichTextEditor.animations.d.ts +0 -7
- package/dist/components/forms/RichTextEditor/RichTextEditor.animations.js +0 -32
- package/dist/utils/calendarUtils.d.ts +0 -60
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.js +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.types.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltipContent.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/index.d.ts +0 -0
|
@@ -11,7 +11,7 @@ import '../../forms/Select/Select.theme.js';
|
|
|
11
11
|
import { Popover } from '../../core/Popover/Popover.js';
|
|
12
12
|
import '../../core/Popover/PopoverContext.js';
|
|
13
13
|
import '../../core/Popover/PopoverBody.js';
|
|
14
|
-
import {
|
|
14
|
+
import { Funnel, X, Plus } from '@phosphor-icons/react';
|
|
15
15
|
import { cn } from '../../../utils/cn.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -35,7 +35,11 @@ function FilterValueInput({ filter, column, filterType, onValueChange, }) {
|
|
|
35
35
|
label: opt.label,
|
|
36
36
|
value: opt.value,
|
|
37
37
|
}));
|
|
38
|
-
return (jsx(Select, {
|
|
38
|
+
return (jsx(Select, {
|
|
39
|
+
// Options are SelectOption<string>, so only a string is selectable here;
|
|
40
|
+
// FilterValue is wider (number | boolean | string[]) and those states
|
|
41
|
+
// simply mean "nothing selected" for this control.
|
|
42
|
+
value: typeof filter.value === "string" ? filter.value : undefined, onChange: (value) => onValueChange(value), options: selectOptions, size: "sm", className: "flex-1 min-w-0", placeholder: "Select..." }));
|
|
39
43
|
}
|
|
40
44
|
// MultiSelect filter type
|
|
41
45
|
if (filterType === "multiSelect" && (column === null || column === void 0 ? void 0 : column.filterOptions)) {
|
|
@@ -44,7 +48,10 @@ function FilterValueInput({ filter, column, filterType, onValueChange, }) {
|
|
|
44
48
|
label: opt.label,
|
|
45
49
|
value: opt.value,
|
|
46
50
|
}));
|
|
47
|
-
return (jsx(Select, {
|
|
51
|
+
return (jsx(Select, {
|
|
52
|
+
// `multiple` makes the value an array; FilterValue is wider than that,
|
|
53
|
+
// so narrow rather than letting a scalar reach a multi-select.
|
|
54
|
+
value: Array.isArray(filter.value) ? filter.value : [], onChange: (value) => onValueChange(value), options: selectOptions, size: "sm", className: "flex-1 min-w-0", placeholder: "Select...", multiple: true }));
|
|
48
55
|
}
|
|
49
56
|
// Date filter type
|
|
50
57
|
if (filterType === "date") {
|
|
@@ -214,7 +221,7 @@ function TableFilter({ columns, filterConfig, onFilterChange, filterLogic: contr
|
|
|
214
221
|
return true;
|
|
215
222
|
return f.value != null && f.value !== "";
|
|
216
223
|
}).length;
|
|
217
|
-
return (jsxs(Popover, { placement: "bottom-end", offset: 8, closeOnClickOutside: false, children: [jsx(Popover.Trigger, { children: jsxs(Button, { color: "
|
|
224
|
+
return (jsxs(Popover, { placement: "bottom-end", offset: 8, closeOnClickOutside: false, children: [jsx(Popover.Trigger, { children: jsxs(Button, { color: "mono", variant: "outline", "aria-label": "Filter table data", size: "sm", children: [jsx(Funnel, { className: "size-4", "aria-hidden": "true" }), "Filters", appliedFilterCount > 0 && (jsx("span", { className: "ml-1 inline-flex items-center justify-center size-5 rounded-full bg-[var(--color-primary)] text-[var(--color-primary-contrast)] text-sm font-medium", children: appliedFilterCount }))] }) }), jsx(Popover.Body, { className: "p-0 max-w-none", children: jsxs("div", { className: cn("w-[500px] p-3", className), role: "dialog", "aria-labelledby": "table-filter-title", "aria-modal": "true", children: [jsxs("div", { className: "flex items-center justify-between mb-3", children: [jsx("div", { id: "table-filter-title", className: "text-sm uppercase font-bold text-[var(--color-text-placeholder)]", children: "Filters" }), activeFilters.length > 1 && (jsxs("div", { className: "flex items-center gap-0.5 rounded-md bg-[var(--color-surface-sunken)] p-0.5", children: [jsx("button", { type: "button", className: cn("px-2.5 py-0.5 text-sm font-medium rounded transition-colors", filterLogic === "and"
|
|
218
225
|
? "bg-[var(--color-background)] text-[var(--color-text-primary)] shadow-sm"
|
|
219
226
|
: "text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"), onClick: () => handleSetLogic("and"), children: "AND" }), jsx("button", { type: "button", className: cn("px-2.5 py-0.5 text-sm font-medium rounded transition-colors", filterLogic === "or"
|
|
220
227
|
? "bg-[var(--color-background)] text-[var(--color-text-primary)] shadow-sm"
|
|
@@ -222,8 +229,8 @@ function TableFilter({ columns, filterConfig, onFilterChange, filterLogic: contr
|
|
|
222
229
|
const selectedColumn = getSelectedColumn(filter.columnId);
|
|
223
230
|
const resolvedType = getResolvedFilterType(selectedColumn);
|
|
224
231
|
const operatorOptions = getOperatorsForFilterType(resolvedType);
|
|
225
|
-
return (jsxs("div", { className: "flex items-center gap-1.5", children: [jsx(Select, { value: filter.columnId, onChange: (value) => handleFilterColumnChange(filter.id, value), options: columnOptions, size: "sm", className: "flex-1 min-w-0" }), jsx(Select, { value: filter.operator, onChange: (value) => handleFilterOperatorChange(filter.id, value), options: operatorOptions, size: "sm", className: "flex-1 min-w-0" }), jsx(FilterValueInput, { filter: filter, column: selectedColumn, filterType: resolvedType, onValueChange: (value) => handleFilterValueChange(filter.id, value) }), jsx(Button, { color: "
|
|
226
|
-
}) }), jsxs("div", { className: "mt-3 flex items-center gap-4", children: [jsxs(Link, { color: "
|
|
232
|
+
return (jsxs("div", { className: "flex items-center gap-1.5", children: [jsx(Select, { value: filter.columnId, onChange: (value) => handleFilterColumnChange(filter.id, value), options: columnOptions, size: "sm", className: "flex-1 min-w-0" }), jsx(Select, { value: filter.operator, onChange: (value) => handleFilterOperatorChange(filter.id, value), options: operatorOptions, size: "sm", className: "flex-1 min-w-0" }), jsx(FilterValueInput, { filter: filter, column: selectedColumn, filterType: resolvedType, onValueChange: (value) => handleFilterValueChange(filter.id, value) }), jsx(Button, { color: "mono", variant: "ghost", size: "sm", iconOnly: true, onClick: () => handleRemoveFilter(filter.id), "aria-label": "Remove filter", className: "text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]", children: jsx(X, { className: "size-4", weight: "bold" }) })] }, filter.id));
|
|
233
|
+
}) }), jsxs("div", { className: "mt-3 flex items-center gap-4", children: [jsxs(Link, { color: "mono", size: "sm", onClick: handleAddFilter, children: [jsx(Plus, { className: "size-4" }), "Add Filter"] }), activeFilters.length > 0 && (jsx(Link, { color: "mono", size: "sm", onClick: handleClearAll, children: "Clear All" }))] })] }) })] }));
|
|
227
234
|
}
|
|
228
235
|
|
|
229
236
|
export { TableFilter };
|
|
@@ -4,7 +4,7 @@ import { useCallback } from 'react';
|
|
|
4
4
|
import { TableCell } from './TableCell.js';
|
|
5
5
|
import { Checkbox } from '../../forms/Checkbox/Checkbox.js';
|
|
6
6
|
import { getRowId, UTILITY_COLUMN_WIDTH, UTILITY_COLUMN_ID } from './Table.utils.js';
|
|
7
|
-
import {
|
|
7
|
+
import { CaretUp, CaretDown } from '@phosphor-icons/react';
|
|
8
8
|
|
|
9
9
|
function TableHeaderComponent({ columns, sortConfig = [], onSortChange, freezeHeader, freezeFirstColumn, freezeLastColumn, expandable, expandedRowRender, selectable, selectionType, selectedRows = [], onSelectionChange, theme, data = [], rowKey, }) {
|
|
10
10
|
const handleSort = useCallback((columnId) => {
|
|
@@ -51,8 +51,8 @@ function TableHeaderComponent({ columns, sortConfig = [], onSortChange, freezeHe
|
|
|
51
51
|
const currentSort = sortConfig.find(sort => sort.columnId === column.id);
|
|
52
52
|
const isSortable = column.sortable && onSortChange;
|
|
53
53
|
return (jsx(TableCell, { column: column, row: null, rowId: "header", isHeader: true, isFrozen: freezeFirstColumn && index === 0, isLastFrozen: freezeLastColumn && index === columns.length - 1, sortDirection: currentSort === null || currentSort === void 0 ? void 0 : currentSort.direction, theme: theme, children: isSortable ? (jsxs("button", { onClick: () => handleSort(column.id), className: "flex items-center gap-1 w-full text-left hover:text-[var(--color-primary)] transition-colors", "aria-label": `Sort by ${typeof column.header === 'string' ? column.header : column.id}`, children: [column.header, currentSort && (jsx("span", { className: "text-sm", children: currentSort.direction === 'asc'
|
|
54
|
-
? jsx(
|
|
55
|
-
: jsx(
|
|
54
|
+
? jsx(CaretUp, { className: "size-3.5" })
|
|
55
|
+
: jsx(CaretDown, { className: "size-3.5" }) }))] })) : (column.header) }, column.id));
|
|
56
56
|
})] }) }));
|
|
57
57
|
}
|
|
58
58
|
const TableHeader = TableHeaderComponent;
|
|
@@ -6,7 +6,7 @@ import { TableCell } from './TableCell.js';
|
|
|
6
6
|
import { Button } from '../../core/Button/Button.js';
|
|
7
7
|
import { Checkbox } from '../../forms/Checkbox/Checkbox.js';
|
|
8
8
|
import { Radio } from '../../forms/Radio/Radio.js';
|
|
9
|
-
import {
|
|
9
|
+
import { Minus, Plus } from '@phosphor-icons/react';
|
|
10
10
|
import { UTILITY_COLUMN_WIDTH, UTILITY_COLUMN_ID } from './Table.utils.js';
|
|
11
11
|
import { cn } from '../../../utils/cn.js';
|
|
12
12
|
import { tableExpandAnimations, tableExpandContentAnimations } from './Table.animations.js';
|
|
@@ -31,7 +31,7 @@ function TableRowComponent({ row, rowId, columns, onRowClick, expandedRowRender,
|
|
|
31
31
|
accessor: () => "",
|
|
32
32
|
width: UTILITY_COLUMN_WIDTH,
|
|
33
33
|
}, row: row, rowId: rowId, isSelected: isSelected, theme: theme, children: jsxs("div", { className: "flex items-center gap-2", children: [selectable &&
|
|
34
|
-
(selectionType === "checkbox" ? (jsx(Checkbox, { id: `table-checkbox-${rowId}`, name: `table-selection-${rowId}`, value: String(rowId), checked: isSelected, onChange: (checked) => onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(checked), onClick: (e) => e.stopPropagation(), "aria-label": "Select row" })) : (jsx("div", { onClick: (e) => e.stopPropagation(), children: jsx(Radio, { id: `table-radio-${rowId}`, name: "table-selection", value: String(rowId), checked: isSelected, onChange: (checked) => onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(checked), "aria-label": "Select row" }) }))), expandedRowRender && (jsx(Button, { color: "
|
|
34
|
+
(selectionType === "checkbox" ? (jsx(Checkbox, { id: `table-checkbox-${rowId}`, name: `table-selection-${rowId}`, value: String(rowId), checked: isSelected, onChange: (checked) => onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(checked), onClick: (e) => e.stopPropagation(), "aria-label": "Select row" })) : (jsx("div", { onClick: (e) => e.stopPropagation(), children: jsx(Radio, { id: `table-radio-${rowId}`, name: "table-selection", value: String(rowId), checked: isSelected, onChange: (checked) => onSelectionChange === null || onSelectionChange === void 0 ? void 0 : onSelectionChange(checked), "aria-label": "Select row" }) }))), expandedRowRender && (jsx(Button, { color: "mono", variant: "ghost", size: "sm", iconOnly: true, className: "size-6 min-h-0 p-1", onClick: handleExpandClick, "aria-label": isExpanded ? "Collapse row" : "Expand row", children: isExpanded ? (jsx(Minus, { className: "size-4", weight: "bold" })) : (jsx(Plus, { className: "size-4", weight: "bold" })) }))] }) })), columns.map((column, index) => (jsx(TableCell, { column: column, row: row, rowId: rowId, isFrozen: freezeFirstColumn && index === 0, isLastFrozen: freezeLastColumn && index === columns.length - 1, isSelected: isSelected, theme: theme }, column.id)))] }), jsx(AnimatePresence, { initial: false, children: isExpanded && expandedRowRender && (jsx(motion.tr, { initial: "collapsed", animate: "expanded", exit: "collapsed", children: jsx("td", { colSpan: colSpan, className: "!p-0 border-b border-[var(--color-border)] dark:border-[var(--color-mono-700)]", children: jsx(motion.div, { variants: tableExpandAnimations, style: { overflow: "hidden" }, children: jsx(motion.div, { variants: tableExpandContentAnimations, children: expandedRowRender(row) }) }) }) }, `${rowId}-expanded`)) })] }));
|
|
35
35
|
}
|
|
36
36
|
TableRowComponent.displayName = "TableRow";
|
|
37
37
|
const TableRow = React__default.memo(TableRowComponent);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { X } from '@phosphor-icons/react';
|
|
4
4
|
import { Button } from '../../core/Button/Button.js';
|
|
5
|
-
import 'react';
|
|
6
5
|
import { Link } from '../../core/Link/Link.js';
|
|
7
6
|
import { cn } from '../../../utils/cn.js';
|
|
7
|
+
import 'react';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Selection header that appears when rows are selected
|
|
@@ -16,8 +16,8 @@ const TableSelectionHeader = ({ selectedCount, totalCount, selectedRows, bulkAct
|
|
|
16
16
|
return (jsxs("div", { className: cn("flex items-center justify-between px-3 py-1 rounded-lg shadow-xl bg-[var(--color-surface-raised)] z-10", className), children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: "text-[var(--color-text-muted)] text-base border-r border-[var(--color-border)] pr-3", children: selectedCount === totalCount
|
|
17
17
|
? `All ${selectedCount} selected`
|
|
18
18
|
: `${selectedCount} selected` }), bulkActions.length > 0 && (jsx("div", { className: "flex items-center gap-2", children: bulkActions.map((action) => {
|
|
19
|
-
return (jsx(Button, { color: "
|
|
20
|
-
}) }))] }), jsxs(Link, { color: "primary", onClick: onClearSelection, "aria-label": "Clear selection", children: [jsx(
|
|
19
|
+
return (jsx(Button, { color: "mono", variant: "filled", onClick: () => action.onClick(selectedRows), className: "text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]", size: "sm", children: action.label }, action.id));
|
|
20
|
+
}) }))] }), jsxs(Link, { color: "primary", onClick: onClearSelection, "aria-label": "Clear selection", children: [jsx(X, { className: "size-4" }), "Clear"] })] }));
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export { TableSelectionHeader };
|
|
@@ -18,7 +18,7 @@ const timelineTheme = {
|
|
|
18
18
|
// Completed connector color (overrides the base connector background)
|
|
19
19
|
connectorCompletedStyle: "bg-[var(--color-success)]",
|
|
20
20
|
// Marker base styles (shared across statuses)
|
|
21
|
-
markerStyle: "relative z-10 flex items-center justify-center shrink-0 rounded-full border-2 transition-colors duration-
|
|
21
|
+
markerStyle: "relative z-10 flex items-center justify-center shrink-0 rounded-full border-2 transition-colors duration-[var(--motion-duration-base)] ring-4 ring-[var(--color-surface)] backdrop-blur-sm",
|
|
22
22
|
// Marker status-specific styles
|
|
23
23
|
markerStatuses: {
|
|
24
24
|
completed: "size-8 bg-[var(--color-success)] border-[var(--color-success)] text-[var(--color-success-contrast)]",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import { useReducedMotion, motion } from 'motion/react';
|
|
5
|
-
import {
|
|
5
|
+
import { Check } from '@phosphor-icons/react';
|
|
6
6
|
import { cn } from '../../../utils/cn.js';
|
|
7
7
|
import { useTimelineContext } from './TimelineContext.js';
|
|
8
8
|
import { useTimelineItemContext } from './TimelineItem.js';
|
|
@@ -24,7 +24,7 @@ const TimelineMarker = React__default.forwardRef(({ icon, className, ...props },
|
|
|
24
24
|
if (icon)
|
|
25
25
|
return icon;
|
|
26
26
|
if (status === "completed") {
|
|
27
|
-
return jsx(
|
|
27
|
+
return jsx(Check, { className: "w-4 h-4" });
|
|
28
28
|
}
|
|
29
29
|
if (status === "active") {
|
|
30
30
|
return (jsx("span", { className: "w-2 h-2 rounded-full bg-[var(--color-primary)]" }));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useMotionValue, AnimatePresence, motion, useReducedMotion, useSpring } from 'motion/react';
|
|
5
|
-
import {
|
|
5
|
+
import { PaperPlaneTilt } from '@phosphor-icons/react';
|
|
6
6
|
import { cn } from '../../../utils/cn.js';
|
|
7
7
|
import { Avatar } from '../../core/Avatar/Avatar.js';
|
|
8
8
|
import { customCursorVariants, reducedMotionSpringConfig, defaultSpringConfig } from './CustomCursor.animations.js';
|
|
@@ -122,7 +122,7 @@ CustomCursorProvider.displayName = "CustomCursorProvider";
|
|
|
122
122
|
* @example
|
|
123
123
|
* ```tsx
|
|
124
124
|
* <CustomCursor size="md" color="primary" variant="glass">
|
|
125
|
-
* <
|
|
125
|
+
* <PaperPlaneTilt />
|
|
126
126
|
* </CustomCursor>
|
|
127
127
|
* ```
|
|
128
128
|
*/
|
|
@@ -150,7 +150,7 @@ const CustomCursor = React.forwardRef(({ children, size = "md", color = "primary
|
|
|
150
150
|
y.set(cursorPos.y);
|
|
151
151
|
}, [cursorPos, x, y]);
|
|
152
152
|
// Default content based on shape
|
|
153
|
-
const defaultContent = shape === "arrow" ? (jsx(
|
|
153
|
+
const defaultContent = shape === "arrow" ? (jsx(PaperPlaneTilt, { className: "w-full h-full rotate-180" })) : (jsx("div", { className: "w-full h-full" }));
|
|
154
154
|
return (jsx(AnimatePresence, { children: isActive && (jsx(motion.div, { ref: cursorRef, "data-slot": "custom-cursor", className: cn(customCursorTheme.baseStyle, customCursorTheme.cursorStyle, customCursorTheme.sizes[size], customCursorTheme.colors[color], customCursorTheme.variants[variant], customCursorTheme.shapes[shape], className), style: { top: y, left: x, ...style }, variants: customCursorVariants, initial: "initial", animate: "animate", exit: "exit", role: "presentation", "aria-hidden": "true", ...props, children: children || defaultContent })) }));
|
|
155
155
|
});
|
|
156
156
|
CustomCursor.displayName = "CustomCursor";
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
const customCursorTheme = {
|
|
6
6
|
baseStyle: "pointer-events-none z-[9999] absolute transform-[translate(-50%,-50%)]",
|
|
7
|
-
cursorStyle: "transition-transform duration-
|
|
7
|
+
cursorStyle: "transition-transform duration-[var(--motion-duration-fast)]",
|
|
8
8
|
cursorFollowVariants: {
|
|
9
|
-
default: "rounded-[var(--radius-base)] bg-white dark:bg-[var(--color-
|
|
9
|
+
default: "rounded-[var(--radius-base)] bg-white dark:bg-[var(--color-surface)] shadow-lg border border-[var(--color-border)] px-3 py-2 text-sm text-[var(--color-text-primary)]",
|
|
10
10
|
user: "flex items-center gap-2 rounded-full pl-1 pr-3 py-1 shadow-xl",
|
|
11
11
|
},
|
|
12
12
|
cursorFollowColors: {
|
|
13
|
-
|
|
13
|
+
mono: "bg-[var(--color-surface)]",
|
|
14
14
|
dark: "bg-[var(--color-text-primary)]",
|
|
15
15
|
primary: "bg-[var(--color-primary)]",
|
|
16
16
|
success: "bg-[var(--color-success)]",
|
|
@@ -23,7 +23,7 @@ const customCursorTheme = {
|
|
|
23
23
|
lg: "w-10 h-10",
|
|
24
24
|
},
|
|
25
25
|
colors: {
|
|
26
|
-
|
|
26
|
+
mono: "text-[var(--color-surface)]",
|
|
27
27
|
dark: "text-[var(--color-text-primary)]",
|
|
28
28
|
primary: "text-[var(--color-primary)]",
|
|
29
29
|
success: "text-[var(--color-success)]",
|
|
@@ -12,6 +12,12 @@ function buildMaskImage(direction, fadeSize) {
|
|
|
12
12
|
if (direction === "radial") {
|
|
13
13
|
return `radial-gradient(ellipse at center, black ${100 - stop}%, transparent 100%)`;
|
|
14
14
|
}
|
|
15
|
+
if (direction === "center") {
|
|
16
|
+
// Inverse of "radial": dots fade OUT in the center and stay solid toward
|
|
17
|
+
// the edges (a vignette that keeps the content area behind it clear).
|
|
18
|
+
// Larger fadeSize = larger clear zone in the middle.
|
|
19
|
+
return `radial-gradient(ellipse at center, transparent ${stop}%, black 100%)`;
|
|
20
|
+
}
|
|
15
21
|
const directionMap = {
|
|
16
22
|
top: "to top",
|
|
17
23
|
bottom: "to bottom",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
/** Direction for the fade gradient mask */
|
|
3
|
-
export type DotPatternFadeDirection = "radial" | "top" | "bottom" | "left" | "right";
|
|
3
|
+
export type DotPatternFadeDirection = "radial" | "center" | "top" | "bottom" | "left" | "right";
|
|
4
4
|
export interface DotPatternProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Distance between dots in pixels (center to center).
|
|
@@ -25,7 +25,9 @@ export interface DotPatternProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
fade?: boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Direction of the fade gradient.
|
|
28
|
-
* - "radial" fades
|
|
28
|
+
* - "radial" fades the edges out (solid center, transparent edges)
|
|
29
|
+
* - "center" fades the center out (transparent center, solid edges — a
|
|
30
|
+
* vignette that keeps content-area behind it clear)
|
|
29
31
|
* - "top" | "bottom" | "left" | "right" fades toward that edge
|
|
30
32
|
* @default "radial"
|
|
31
33
|
*/
|
|
@@ -78,6 +78,6 @@ export declare const generateMarble: (seed: string, colors: string[], count: num
|
|
|
78
78
|
* mis-reads dark tiles like a teal base with a cream accent.) Pass `threshold`
|
|
79
79
|
* to bias toward light text on more mid-tones (see `contrastTone`). Map the
|
|
80
80
|
* result to the theme-stable neutral tokens at the call site, e.g.
|
|
81
|
-
* `tone === "dark" ? "var(--color-
|
|
81
|
+
* `tone === "dark" ? "var(--color-mono-950)" : "var(--color-mono-50)"`.
|
|
82
82
|
*/
|
|
83
83
|
export declare const getMeshTextTone: (seed: string, colors: string[], count: number, threshold?: number) => ContrastTone;
|
|
@@ -102,7 +102,7 @@ const generateMarble = (seed, colors, count) => {
|
|
|
102
102
|
* mis-reads dark tiles like a teal base with a cream accent.) Pass `threshold`
|
|
103
103
|
* to bias toward light text on more mid-tones (see `contrastTone`). Map the
|
|
104
104
|
* result to the theme-stable neutral tokens at the call site, e.g.
|
|
105
|
-
* `tone === "dark" ? "var(--color-
|
|
105
|
+
* `tone === "dark" ? "var(--color-mono-950)" : "var(--color-mono-50)"`.
|
|
106
106
|
*/
|
|
107
107
|
const getMeshTextTone = (seed, colors, count, threshold) => {
|
|
108
108
|
const { base } = generateMarble(seed, colors, count);
|
|
@@ -5,7 +5,7 @@ import { cn } from '../../../utils/cn.js';
|
|
|
5
5
|
import 'react';
|
|
6
6
|
|
|
7
7
|
function InsetCircleButton({ children, size = 44, className, classNameDisc, classNameHover, onClick, }) {
|
|
8
|
-
return (jsx("div", { className: cn("neu-circle-groove group shrink-0 cursor-pointer bg-neutral-200/80 dark:bg-neutral-900", className), style: { width: size, height: size }, onClick: onClick, children: jsxs(motion.div, { className: cn("neu-circle-disc bg-linear-to-br from-neutral-100 to-neutral-300 dark:from-neutral-700 dark:to-neutral-900", classNameDisc), whileHover: { scale: 1 }, whileTap: { scale: 0.975 }, transition: { type: "spring", stiffness: 200, damping: 20 }, children: [jsx("div", { className: cn("absolute inset-0 rounded-full bg-linear-to-br from-neutral-300 to-neutral-200 dark:from-neutral-900 dark:to-neutral-700 opacity-0 group-hover:opacity-100 transition-opacity duration-
|
|
8
|
+
return (jsx("div", { className: cn("neu-circle-groove group shrink-0 cursor-pointer bg-neutral-200/80 dark:bg-neutral-900", className), style: { width: size, height: size }, onClick: onClick, children: jsxs(motion.div, { className: cn("neu-circle-disc bg-linear-to-br from-neutral-100 to-neutral-300 dark:from-neutral-700 dark:to-neutral-900", classNameDisc), whileHover: { scale: 1 }, whileTap: { scale: 0.975 }, transition: { type: "spring", stiffness: 200, damping: 20 }, children: [jsx("div", { className: cn("absolute inset-0 rounded-full bg-linear-to-br from-neutral-300 to-neutral-200 dark:from-neutral-900 dark:to-neutral-700 opacity-0 group-hover:opacity-100 transition-opacity duration-[var(--motion-duration-slow)]", classNameHover) }), jsx("div", { className: "relative z-2", children: children })] }) }));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export { InsetCircleButton };
|
|
@@ -157,15 +157,19 @@ const Overlay = React__default.forwardRef(({ isOpen, onClose, closeOnOverlayClic
|
|
|
157
157
|
unlockScroll();
|
|
158
158
|
hasLockedScroll.current = false;
|
|
159
159
|
}
|
|
160
|
-
}, children: isOpen && (jsxs(motion.div, { className: cn(
|
|
160
|
+
}, children: isOpen && (jsxs(motion.div, { className: cn(overlayTheme.backdrop, overlayPositionVariants[position], overlayClassName), onClick: handleOverlayClick, variants: finalOverlayAnimations, initial: "initial", animate: "animate", exit: "exit", transition: instantTransition, children: [jsx("div", { className: overlayTheme.pattern, style: {
|
|
161
161
|
backgroundImage: "radial-gradient(circle, rgba(250,250,250,0.08) 1.5px, transparent 1.5px)",
|
|
162
162
|
backgroundSize: "30px 30px",
|
|
163
163
|
maskImage: "radial-gradient(ellipse at center, black 0%, transparent 70%)",
|
|
164
164
|
WebkitMaskImage: "radial-gradient(ellipse at center, black 0%, transparent 70%)",
|
|
165
|
-
} }), jsx(motion.div, { ref: mergedRef, className: cn(overlayTheme.content, contentClassName), style: contentStyle, variants: finalContentAnimations,
|
|
165
|
+
} }), jsx(motion.div, { ref: mergedRef, className: cn(overlayTheme.content, contentClassName), style: contentStyle, variants: finalContentAnimations,
|
|
166
|
+
// Inherit the parent's variant label so backdrop and panel form one
|
|
167
|
+
// coordinated animation tree. Explicit controls here would opt the
|
|
168
|
+
// panel out of the parent's enter/exit orchestration.
|
|
169
|
+
transition: instantTransition, onClick: (e) => e.stopPropagation(), ...(role ? { role } : {}), ...(ariaModal ? { "aria-modal": true } : {}), ...(ariaLabelledBy ? { "aria-labelledby": ariaLabelledBy } : {}), ...(ariaDescribedBy
|
|
166
170
|
? { "aria-describedby": ariaDescribedBy }
|
|
167
171
|
: {}), children: children })] })) }));
|
|
168
|
-
return createPortal(content, target);
|
|
172
|
+
return createPortal(jsx("div", { "data-flikkui-portal": "", className: isDarkMode ? "dark" : undefined, children: content }), target);
|
|
169
173
|
});
|
|
170
174
|
Overlay.displayName = "Overlay";
|
|
171
175
|
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
export { CustomCursorProvider, CustomCursor, CustomCursorFollow, useCustomCursor } from "./CustomCursor";
|
|
2
2
|
export type { CustomCursorProps, CustomCursorProviderProps, CustomCursorFollowProps, CustomCursorContextType, CustomCursorSize, CustomCursorColor, CustomCursorVariant, CustomCursorShape, CustomCursorTheme, CustomCursorThemeOverrides, } from "./CustomCursor";
|
|
3
|
-
export { GlassEffect } from "./GlassEffect";
|
|
4
|
-
export type { GlassEffectProps, BlendMode } from "./GlassEffect";
|
|
5
3
|
export { Overlay } from "./Overlay";
|
|
6
4
|
export type { OverlayProps, OverlayPosition, OverlayAnimations, } from "./Overlay";
|
|
7
|
-
export { GlassSurface } from "./GlassSurface";
|
|
8
|
-
export type { GlassSurfaceProps, GlassChannel, GlassMixBlendMode, } from "./GlassSurface";
|
|
9
5
|
export { Animated } from "./Animated";
|
|
10
6
|
export type { AnimatedGroupProps, AnimatedItemProps, AnimationPreset, AnimatedElement, } from "./Animated";
|
|
11
7
|
export { ProgressiveBlur } from "./ProgressiveBlur";
|
|
12
8
|
export type { ProgressiveBlurProps, ProgressiveBlurPosition, ProgressiveBlurThemeOverrides, } from "./ProgressiveBlur";
|
|
13
9
|
export { Aurora } from "./Aurora";
|
|
14
10
|
export type { AuroraProps } from "./Aurora";
|
|
15
|
-
export { MagneticElement } from "./MagneticElement";
|
|
16
|
-
export type { MagneticElementProps } from "./MagneticElement";
|
|
17
|
-
export { GridPattern } from "./GridPattern";
|
|
18
|
-
export type { GridPatternProps, GridPatternFadeDirection, } from "./GridPattern";
|
|
19
11
|
export { DotPattern } from "./DotPattern";
|
|
20
12
|
export type { DotPatternProps, DotPatternFadeDirection, } from "./DotPattern";
|
|
21
13
|
export { StripePattern } from "./StripePattern";
|
|
@@ -45,35 +37,11 @@ export { Dithering } from "./Dithering";
|
|
|
45
37
|
export type { DitheringProps, DitheringShape, DitheringType } from "./Dithering";
|
|
46
38
|
export { GradientMesh } from "./GradientMesh";
|
|
47
39
|
export type { GradientMeshProps } from "./GradientMesh";
|
|
48
|
-
export { StaticGradientMesh } from "./StaticGradientMesh";
|
|
49
|
-
export type { StaticGradientMeshProps } from "./StaticGradientMesh";
|
|
50
40
|
export { StaticRadialGradient } from "./StaticRadialGradient";
|
|
51
41
|
export type { StaticRadialGradientProps } from "./StaticRadialGradient";
|
|
52
|
-
export { Metaballs } from "./Metaballs";
|
|
53
|
-
export type { MetaballsProps } from "./Metaballs";
|
|
54
|
-
export { ColorPanels } from "./ColorPanels";
|
|
55
|
-
export type { ColorPanelsProps } from "./ColorPanels";
|
|
56
|
-
export { SmokeRing } from "./SmokeRing";
|
|
57
|
-
export type { SmokeRingProps } from "./SmokeRing";
|
|
58
|
-
export { GodRays } from "./GodRays";
|
|
59
|
-
export type { GodRaysProps } from "./GodRays";
|
|
60
42
|
export { GrainGradient } from "./GrainGradient";
|
|
61
43
|
export type { GrainGradientProps, GrainGradientShape } from "./GrainGradient";
|
|
62
|
-
export { PulsingBorder } from "./PulsingBorder";
|
|
63
|
-
export type { PulsingBorderProps } from "./PulsingBorder";
|
|
64
44
|
export { LiquidMetal } from "./LiquidMetal";
|
|
65
45
|
export type { LiquidMetalProps, LiquidMetalShape } from "./LiquidMetal";
|
|
66
46
|
export { GemSmoke } from "./GemSmoke";
|
|
67
47
|
export type { GemSmokeProps, GemSmokeShape } from "./GemSmoke";
|
|
68
|
-
export { Water } from "./Water";
|
|
69
|
-
export type { WaterProps } from "./Water";
|
|
70
|
-
export { ImageDithering } from "./ImageDithering";
|
|
71
|
-
export type { ImageDitheringProps, ImageDitheringType } from "./ImageDithering";
|
|
72
|
-
export { PaperTexture } from "./PaperTexture";
|
|
73
|
-
export type { PaperTextureProps } from "./PaperTexture";
|
|
74
|
-
export { FlutedGlass } from "./FlutedGlass";
|
|
75
|
-
export type { FlutedGlassProps, FlutedGlassShape, FlutedGlassDistortionShape, } from "./FlutedGlass";
|
|
76
|
-
export { HalftoneDots } from "./HalftoneDots";
|
|
77
|
-
export type { HalftoneDotsProps, HalftoneDotsType, HalftoneDotsGrid, } from "./HalftoneDots";
|
|
78
|
-
export { HalftoneCmyk } from "./HalftoneCmyk";
|
|
79
|
-
export type { HalftoneCmykProps } from "./HalftoneCmyk";
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
export { CustomCursor, CustomCursorFollow, CustomCursorProvider, useCustomCursor } from './CustomCursor/CustomCursor.js';
|
|
2
|
-
export { GlassEffect } from './GlassEffect/GlassEffect.js';
|
|
3
2
|
export { Overlay } from './Overlay/Overlay.js';
|
|
4
|
-
export { GlassSurface } from './GlassSurface/GlassSurface.js';
|
|
5
3
|
export { Animated } from './Animated/Animated.js';
|
|
6
4
|
export { ProgressiveBlur } from './ProgressiveBlur/ProgressiveBlur.js';
|
|
7
5
|
export { Aurora } from './Aurora/Aurora.js';
|
|
8
|
-
export { MagneticElement } from './MagneticElement/MagneticElement.js';
|
|
9
|
-
export { GridPattern } from './GridPattern/GridPattern.js';
|
|
10
6
|
export { DotPattern } from './DotPattern/DotPattern.js';
|
|
11
7
|
export { StripePattern } from './StripePattern/StripePattern.js';
|
|
12
8
|
export { NoiseOverlay } from './NoiseOverlay/NoiseOverlay.js';
|
|
@@ -23,19 +19,7 @@ export { DEFAULT_MESH_COLORS, MESH_PALETTES, getMeshTextTone, pickPalette } from
|
|
|
23
19
|
export { Shimmer } from './Shimmer/Shimmer.js';
|
|
24
20
|
export { Dithering } from './Dithering/Dithering.js';
|
|
25
21
|
export { GradientMesh } from './GradientMesh/GradientMesh.js';
|
|
26
|
-
export { StaticGradientMesh } from './StaticGradientMesh/StaticGradientMesh.js';
|
|
27
22
|
export { StaticRadialGradient } from './StaticRadialGradient/StaticRadialGradient.js';
|
|
28
|
-
export { Metaballs } from './Metaballs/Metaballs.js';
|
|
29
|
-
export { ColorPanels } from './ColorPanels/ColorPanels.js';
|
|
30
|
-
export { SmokeRing } from './SmokeRing/SmokeRing.js';
|
|
31
|
-
export { GodRays } from './GodRays/GodRays.js';
|
|
32
23
|
export { GrainGradient } from './GrainGradient/GrainGradient.js';
|
|
33
|
-
export { PulsingBorder } from './PulsingBorder/PulsingBorder.js';
|
|
34
24
|
export { LiquidMetal } from './LiquidMetal/LiquidMetal.js';
|
|
35
25
|
export { GemSmoke } from './GemSmoke/GemSmoke.js';
|
|
36
|
-
export { Water } from './Water/Water.js';
|
|
37
|
-
export { ImageDithering } from './ImageDithering/ImageDithering.js';
|
|
38
|
-
export { PaperTexture } from './PaperTexture/PaperTexture.js';
|
|
39
|
-
export { FlutedGlass } from './FlutedGlass/FlutedGlass.js';
|
|
40
|
-
export { HalftoneDots } from './HalftoneDots/HalftoneDots.js';
|
|
41
|
-
export { HalftoneCmyk } from './HalftoneCmyk/HalftoneCmyk.js';
|
|
@@ -4,8 +4,6 @@ import type { ShaderCanvasProps } from "./ShaderCanvas.types";
|
|
|
4
4
|
* Minimal raw WebGL2 canvas renderer for fullscreen fragment shaders.
|
|
5
5
|
* - Built-in uniforms: iTime (float), iResolution (vec2)
|
|
6
6
|
* - Custom uniforms read from `uniformsRef` each frame (no stale closures)
|
|
7
|
-
* - Optional sampler2D uniforms read from `texturesRef` (image loading,
|
|
8
|
-
* texture upload, mipmaps, transparent-pixel placeholder while unset/loading)
|
|
9
7
|
* - ResizeObserver for responsive canvas sizing
|
|
10
8
|
* - rAF animation loop, paused while the tab is hidden, with cleanup on unmount
|
|
11
9
|
* - Graceful degradation: renders nothing if WebGL2 unavailable
|
|
@@ -11,13 +11,11 @@ void main() {
|
|
|
11
11
|
* Minimal raw WebGL2 canvas renderer for fullscreen fragment shaders.
|
|
12
12
|
* - Built-in uniforms: iTime (float), iResolution (vec2)
|
|
13
13
|
* - Custom uniforms read from `uniformsRef` each frame (no stale closures)
|
|
14
|
-
* - Optional sampler2D uniforms read from `texturesRef` (image loading,
|
|
15
|
-
* texture upload, mipmaps, transparent-pixel placeholder while unset/loading)
|
|
16
14
|
* - ResizeObserver for responsive canvas sizing
|
|
17
15
|
* - rAF animation loop, paused while the tab is hidden, with cleanup on unmount
|
|
18
16
|
* - Graceful degradation: renders nothing if WebGL2 unavailable
|
|
19
17
|
*/
|
|
20
|
-
const ShaderCanvas = ({ fragmentShader, uniformsRef,
|
|
18
|
+
const ShaderCanvas = ({ fragmentShader, uniformsRef, maxDpr = 2, className, style, }) => {
|
|
21
19
|
const canvasRef = useRef(null);
|
|
22
20
|
useEffect(() => {
|
|
23
21
|
const canvas = canvasRef.current;
|
|
@@ -83,81 +81,6 @@ const ShaderCanvas = ({ fragmentShader, uniformsRef, texturesRef, onTextureLoad,
|
|
|
83
81
|
}
|
|
84
82
|
return (_a = customLocs.get(name)) !== null && _a !== void 0 ? _a : null;
|
|
85
83
|
};
|
|
86
|
-
// ── Texture uniforms ───────────────────────────────────────────────
|
|
87
|
-
const textureEntries = new Map();
|
|
88
|
-
let nextTextureUnit = 0;
|
|
89
|
-
// Operates on whatever texture is currently bound to TEXTURE_2D — every
|
|
90
|
-
// call site binds the target texture immediately before calling this.
|
|
91
|
-
const configureTexture = () => {
|
|
92
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
93
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
94
|
-
};
|
|
95
|
-
const createPlaceholderTexture = () => {
|
|
96
|
-
const texture = gl.createTexture();
|
|
97
|
-
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
98
|
-
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array([0, 0, 0, 0]));
|
|
99
|
-
configureTexture();
|
|
100
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
101
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
102
|
-
return texture;
|
|
103
|
-
};
|
|
104
|
-
const uploadImage = (entry, img, name) => {
|
|
105
|
-
if (hasBeenDisposed)
|
|
106
|
-
return;
|
|
107
|
-
gl.bindTexture(gl.TEXTURE_2D, entry.texture);
|
|
108
|
-
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
|
|
109
|
-
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img);
|
|
110
|
-
gl.generateMipmap(gl.TEXTURE_2D);
|
|
111
|
-
configureTexture();
|
|
112
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);
|
|
113
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
114
|
-
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
|
|
115
|
-
const naturalWidth = img.naturalWidth || img.width;
|
|
116
|
-
const naturalHeight = img.naturalHeight || img.height;
|
|
117
|
-
if (naturalWidth > 0 && naturalHeight > 0) {
|
|
118
|
-
onTextureLoad === null || onTextureLoad === void 0 ? void 0 : onTextureLoad(name, naturalWidth / naturalHeight);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
const loadTexture = (entry, source, name) => {
|
|
122
|
-
if (typeof source === "string") {
|
|
123
|
-
const img = new Image();
|
|
124
|
-
img.crossOrigin = "anonymous";
|
|
125
|
-
img.onload = () => uploadImage(entry, img, name);
|
|
126
|
-
img.src = source;
|
|
127
|
-
}
|
|
128
|
-
else if (source.complete && source.naturalWidth > 0) {
|
|
129
|
-
uploadImage(entry, source, name);
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
source.addEventListener("load", () => uploadImage(entry, source, name), {
|
|
133
|
-
once: true,
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
const syncTextures = () => {
|
|
138
|
-
const sources = texturesRef === null || texturesRef === void 0 ? void 0 : texturesRef.current;
|
|
139
|
-
if (!sources)
|
|
140
|
-
return;
|
|
141
|
-
for (const name in sources) {
|
|
142
|
-
let entry = textureEntries.get(name);
|
|
143
|
-
if (!entry) {
|
|
144
|
-
entry = {
|
|
145
|
-
texture: createPlaceholderTexture(),
|
|
146
|
-
sourceKey: undefined,
|
|
147
|
-
unit: nextTextureUnit++,
|
|
148
|
-
};
|
|
149
|
-
textureEntries.set(name, entry);
|
|
150
|
-
}
|
|
151
|
-
const source = sources[name];
|
|
152
|
-
if (source && source !== entry.sourceKey) {
|
|
153
|
-
entry.sourceKey = source;
|
|
154
|
-
loadTexture(entry, source, name);
|
|
155
|
-
}
|
|
156
|
-
else if (!source) {
|
|
157
|
-
entry.sourceKey = undefined;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
84
|
// ── Resize handling ────────────────────────────────────────────────
|
|
162
85
|
const dpr = Math.min(window.devicePixelRatio || 1, maxDpr);
|
|
163
86
|
let width = 0;
|
|
@@ -181,11 +104,9 @@ const ShaderCanvas = ({ fragmentShader, uniformsRef, texturesRef, onTextureLoad,
|
|
|
181
104
|
gl.enable(gl.BLEND);
|
|
182
105
|
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
|
|
183
106
|
let rafId = 0;
|
|
184
|
-
let hasBeenDisposed = false;
|
|
185
107
|
const startTime = performance.now();
|
|
186
108
|
const frame = () => {
|
|
187
109
|
rafId = requestAnimationFrame(frame);
|
|
188
|
-
syncTextures();
|
|
189
110
|
const t = (performance.now() - startTime) / 1000;
|
|
190
111
|
gl.uniform1f(uTime, t);
|
|
191
112
|
gl.uniform2f(uRes, width, height);
|
|
@@ -208,15 +129,6 @@ const ShaderCanvas = ({ fragmentShader, uniformsRef, texturesRef, onTextureLoad,
|
|
|
208
129
|
gl.uniform4f(loc, val[0], val[1], val[2], val[3]);
|
|
209
130
|
}
|
|
210
131
|
}
|
|
211
|
-
// Bind texture uniforms
|
|
212
|
-
for (const [name, entry] of textureEntries) {
|
|
213
|
-
const loc = getCustomLoc(name);
|
|
214
|
-
if (!loc)
|
|
215
|
-
continue;
|
|
216
|
-
gl.activeTexture(gl.TEXTURE0 + entry.unit);
|
|
217
|
-
gl.bindTexture(gl.TEXTURE_2D, entry.texture);
|
|
218
|
-
gl.uniform1i(loc, entry.unit);
|
|
219
|
-
}
|
|
220
132
|
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
|
|
221
133
|
};
|
|
222
134
|
const handleVisibilityChange = () => {
|
|
@@ -233,13 +145,9 @@ const ShaderCanvas = ({ fragmentShader, uniformsRef, texturesRef, onTextureLoad,
|
|
|
233
145
|
}
|
|
234
146
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
235
147
|
return () => {
|
|
236
|
-
hasBeenDisposed = true;
|
|
237
148
|
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
238
149
|
cancelAnimationFrame(rafId);
|
|
239
150
|
observer.disconnect();
|
|
240
|
-
for (const entry of textureEntries.values()) {
|
|
241
|
-
gl.deleteTexture(entry.texture);
|
|
242
|
-
}
|
|
243
151
|
gl.deleteProgram(program);
|
|
244
152
|
gl.deleteShader(vs);
|
|
245
153
|
gl.deleteShader(fs);
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
/** A texture source: a URL to fetch, or an already-available image element. */
|
|
3
|
-
export type ShaderTextureSource = string | HTMLImageElement;
|
|
4
2
|
export interface ShaderCanvasProps {
|
|
5
3
|
fragmentShader: string;
|
|
6
4
|
uniformsRef: React.MutableRefObject<Record<string, number | number[]>>;
|
|
7
|
-
/**
|
|
8
|
-
* Optional sampler2D uniforms, keyed by GLSL uniform name (e.g. "u_image").
|
|
9
|
-
* A key with an `undefined` value binds a 1x1 transparent placeholder so the
|
|
10
|
-
* shader never samples garbage while an image is loading or unset.
|
|
11
|
-
*/
|
|
12
|
-
texturesRef?: React.MutableRefObject<Record<string, ShaderTextureSource | undefined>>;
|
|
13
|
-
/** Fires once a texture finishes loading, with its natural aspect ratio (width / height). */
|
|
14
|
-
onTextureLoad?: (name: string, aspectRatio: number) => void;
|
|
15
5
|
maxDpr?: number;
|
|
16
6
|
className?: string;
|
|
17
7
|
style?: React.CSSProperties;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { ShaderCanvas } from "./ShaderCanvas";
|
|
2
|
-
export type { ShaderCanvasProps
|
|
2
|
+
export type { ShaderCanvasProps } from "./ShaderCanvas.types";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export { ShaderCanvas } from "./ShaderCanvas";
|
|
2
|
-
export type { ShaderCanvasProps
|
|
2
|
+
export type { ShaderCanvasProps } from "./ShaderCanvas";
|
|
3
3
|
export { resolveShaderColor, resolveShaderColors } from "./resolveShaderColor";
|
|
4
4
|
export type { RGBA } from "./resolveShaderColor";
|
|
5
5
|
export { glslHashFloat, glslHashVec2, glslValueNoise, glslSimplexNoise2D, glslSimplexFbm, glslDeclarePI, glslRotate2, } from "./shaderNoise.glsl";
|
|
6
|
-
export { glslBayerMatrices } from "./bayerMatrices.glsl";
|
|
7
|
-
export { glslImageCoverUV } from "./imageUV.glsl";
|
|
@@ -23,7 +23,7 @@ export declare const glslValueNoise = "\nfloat valueNoise(vec2 st) {\n vec2 i =
|
|
|
23
23
|
* ubiquitous prior art in the WebGL shader ecosystem, NOT paper-design's own
|
|
24
24
|
* IP. Used as the low-level noise primitive under some ported effects whose
|
|
25
25
|
* higher-level composition logic IS credited to paper-design in their own
|
|
26
|
-
* doc comments (e.g. GrainGradient, Dithering,
|
|
26
|
+
* doc comments (e.g. GrainGradient, Dithering, LiquidMetal). */
|
|
27
27
|
export declare const glslSimplexNoise2D = "\nvec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }\nvec2 mod289(vec2 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }\nvec3 permute(vec3 x) { return mod289(((x * 34.0) + 1.0) * x); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n\n i = mod289(i);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0)) + i.x + vec3(0.0, i1.x, 1.0));\n\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy), dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n";
|
|
28
28
|
/** Small fractional-Brownian-motion built on glslSimplexNoise2D. Requires
|
|
29
29
|
* glslSimplexNoise2D to be interpolated earlier in the same shader source. */
|