@flikk/ui 1.0.0-beta.31 → 1.0.0-beta.33
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 +497 -22
- 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/CodeBlock/CodeBlock.theme.js +1 -1
- package/dist/components/ai/PromptInput/PromptInput.js +2 -2
- package/dist/components/ai/PromptInput/PromptInput.theme.js +2 -2
- package/dist/components/ai/PromptSuggestion/PromptSuggestion.theme.js +2 -2
- package/dist/components/ai/Reasoning/Reasoning.js +27 -3
- 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 +58 -5
- 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 +2 -1
- package/dist/components/ai/StreamingResponse/AnimatedText.d.ts +7 -0
- package/dist/components/ai/StreamingResponse/AnimatedText.js +8 -7
- 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 +13 -7
- 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.theme.js +1 -1
- package/dist/components/ai/index.d.ts +3 -2
- package/dist/components/ai/index.js +4 -0
- package/dist/components/canvas/BaseNode.js +1 -1
- package/dist/components/canvas/CanvasToolbar.js +0 -1
- package/dist/components/canvas/Edge.js +2 -2
- package/dist/components/canvas/NodeControls.js +0 -1
- package/dist/components/canvas/NodeRenderer.js +2 -2
- package/dist/components/charts/ActivityRings/ActivityRings.js +2 -2
- package/dist/components/charts/ActivityRings/ActivityRings.theme.js +1 -1
- package/dist/components/charts/AreaChart/AreaChart.js +3 -3
- package/dist/components/charts/AreaChart/AreaChart.theme.js +3 -3
- package/dist/components/charts/BarChart/BarChart.js +4 -4
- package/dist/components/charts/ComboChart/BarRenderer.js +2 -2
- package/dist/components/charts/ComboChart/BarRenderer.types.d.ts +1 -1
- package/dist/components/charts/ComboChart/ComboChartCanvas.js +1 -1
- package/dist/components/charts/ComboChart/LineRenderer.js +1 -1
- 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.js +1 -1
- package/dist/components/charts/LineChart/LineChart.js +2 -2
- package/dist/components/charts/LollipopChart/LollipopChart.js +1 -1
- package/dist/components/charts/RadarChart/RadarChart.js +1 -1
- package/dist/components/charts/StackedBarChart/StackedBarChart.js +3 -3
- package/dist/components/charts/hooks/useChartAccessibility.js +9 -6
- package/dist/components/charts/index.d.ts +4 -8
- package/dist/components/charts/index.js +2 -4
- 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 +3 -3
- package/dist/components/charts/utils/animation-utils.d.ts +12 -7
- package/dist/components/charts/utils/animation-utils.js +19 -19
- package/dist/components/core/Accordion/Accordion.theme.js +1 -1
- package/dist/components/core/Alert/Alert.animations.d.ts +11 -4
- package/dist/components/core/Alert/Alert.animations.js +11 -4
- package/dist/components/core/Alert/Alert.js +16 -2
- 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.theme.js +1 -1
- package/dist/components/core/Badge/Badge.animations.d.ts +0 -5
- package/dist/components/core/Badge/Badge.animations.js +5 -84
- package/dist/components/core/Badge/Badge.d.ts +7 -4
- package/dist/components/core/Badge/Badge.js +27 -64
- package/dist/components/core/Badge/Badge.theme.js +8 -12
- package/dist/components/core/Badge/Badge.types.d.ts +18 -34
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +4 -4
- package/dist/components/core/Button/Button.js +7 -43
- package/dist/components/core/Button/Button.theme.js +5 -5
- package/dist/components/core/Button/Button.types.d.ts +8 -12
- package/dist/components/core/Button/index.d.ts +0 -2
- package/dist/components/core/Calendar/Calendar.theme.js +1 -1
- 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 +29 -1
- 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/CardHeader.js +4 -1
- 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/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 +21 -8
- package/dist/components/core/DragDrop/DragDrop.theme.js +2 -2
- package/dist/components/core/Drawer/Drawer.theme.js +1 -1
- package/dist/components/core/Drawer/DrawerHeader.js +0 -1
- package/dist/components/core/Dropdown/DropdownMenu.js +22 -7
- package/dist/components/core/Link/Link.js +1 -1
- 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 +2 -0
- package/dist/components/core/Message/Message.theme.js +3 -3
- 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.js +5 -1
- package/dist/components/core/Modal/Modal.theme.js +1 -1
- package/dist/components/core/Modal/ModalHeader.js +0 -1
- package/dist/components/core/ModalStack/ModalStackModal.js +3 -1
- package/dist/components/core/NavItem/NavItem.js +3 -2
- package/dist/components/core/NavItem/NavItem.theme.js +1 -1
- package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +4 -2
- package/dist/components/core/PageHeading/PageHeading.theme.js +1 -1
- package/dist/components/core/Pagination/Pagination.theme.js +2 -2
- package/dist/components/core/Pill/Pill.js +34 -18
- package/dist/components/core/Pill/Pill.theme.js +4 -2
- package/dist/components/core/Pill/Pill.types.d.ts +14 -1
- 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.theme.js +1 -1
- 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 +3 -3
- 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/SidebarContent.js +1 -1
- package/dist/components/core/Sidebar/SidebarHeader.js +1 -1
- package/dist/components/core/Sidebar/SidebarSearch.js +2 -2
- package/dist/components/core/Sidebar/SidebarToggle.js +1 -1
- package/dist/components/core/Sidebar/SidebarUserProfile.js +1 -1
- package/dist/components/core/SlidingNumber/SlidingNumber.d.ts +8 -0
- package/dist/components/core/SlidingNumber/SlidingNumber.js +12 -3
- 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.theme.js +1 -1
- package/dist/components/core/Toast/ToastProvider.js +1 -1
- 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/data-display/GanttChart/GanttChart.theme.js +6 -6
- package/dist/components/data-display/GanttChart/GanttTaskBar.js +1 -1
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +1 -1
- package/dist/components/data-display/GanttChart/GanttToolbar.js +0 -1
- package/dist/components/data-display/KPI/KPI.js +11 -20
- package/dist/components/data-display/KPI/KPI.theme.js +8 -4
- package/dist/components/data-display/Metric/Metric.theme.js +4 -4
- package/dist/components/data-display/Table/Table.theme.js +2 -2
- package/dist/components/data-display/Table/TableColumnManager.js +1 -2
- package/dist/components/data-display/Table/TableContext.js +1 -0
- package/dist/components/data-display/Table/TableFilter.js +9 -2
- package/dist/components/data-display/Table/TableSelectionHeader.js +1 -1
- package/dist/components/data-display/Timeline/Timeline.theme.js +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.d.ts +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.js +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.theme.js +4 -4
- 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.theme.js +1 -1
- package/dist/components/forms/ColorPicker/ColorPicker.js +45 -3
- package/dist/components/forms/ColorPicker/ColorPickerBody.js +8 -4
- package/dist/components/forms/ColorPicker/ColorPickerHeader.js +1 -1
- package/dist/components/forms/ColorPicker/ColorPickerImage.js +1 -1
- package/dist/components/forms/Combobox/Combobox.js +10 -4
- package/dist/components/forms/Combobox/Combobox.theme.js +9 -0
- package/dist/components/forms/Combobox/Combobox.types.d.ts +13 -0
- package/dist/components/forms/DatePicker/DatePicker.js +19 -12
- package/dist/components/forms/DatePicker/DatePicker.theme.js +5 -0
- package/dist/components/forms/DatePicker/DatePicker.types.d.ts +8 -0
- package/dist/components/forms/DatePicker/DatePickerContext.d.ts +0 -1
- package/dist/components/forms/DatePicker/DatePickerTrigger.js +5 -3
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +6 -1
- package/dist/components/forms/DateRangePicker/DateRangePicker.types.d.ts +8 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerContext.js +1 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +5 -3
- package/dist/components/forms/FileUpload/FileUpload.theme.js +2 -2
- package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +1 -1
- package/dist/components/forms/Input/Input.js +17 -12
- package/dist/components/forms/Input/Input.theme.js +10 -0
- package/dist/components/forms/Input/Input.types.d.ts +14 -0
- package/dist/components/forms/InputAddress/InputAddress.js +5 -5
- package/dist/components/forms/InputAddress/InputAddress.types.d.ts +9 -2
- package/dist/components/forms/InputCounter/InputCounter.js +194 -17
- package/dist/components/forms/InputCounter/InputCounter.theme.d.ts +12 -0
- package/dist/components/forms/InputCounter/InputCounter.theme.js +92 -2
- package/dist/components/forms/InputCounter/InputCounter.types.d.ts +47 -4
- package/dist/components/forms/InputCreditCard/InputCreditCard.js +4 -4
- package/dist/components/forms/InputCreditCard/InputCreditCard.types.d.ts +7 -0
- package/dist/components/forms/Mention/Mention.js +13 -11
- package/dist/components/forms/Radio/Radio.theme.js +1 -1
- package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +12 -16
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +174 -1680
- 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.js +19 -12
- package/dist/components/forms/Select/Select.theme.js +9 -1
- package/dist/components/forms/Select/Select.types.d.ts +86 -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.js +2 -1
- package/dist/components/forms/SelectableCard/SelectableCard.theme.js +1 -1
- package/dist/components/forms/Switch/Switch.theme.js +2 -2
- package/dist/components/forms/Textarea/Textarea.js +14 -25
- package/dist/components/forms/TimePicker/TimePicker.theme.js +10 -1
- package/dist/components/forms/TimePicker/TimePicker.types.d.ts +11 -0
- package/dist/components/forms/TimePicker/TimePickerTrigger.js +7 -5
- package/dist/components/forms/forms.theme.d.ts +57 -0
- package/dist/components/forms/forms.theme.js +102 -13
- package/dist/components/forms/index.js +1 -0
- 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 +11 -10
- package/dist/components/generative/schema.generated.js +199 -293
- 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 +199 -293
- package/dist/index.js +1 -4
- package/dist/registry.json +2765 -2450
- package/dist/shadcn-compat.css +5 -5
- 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/themes/precision.css +232 -0
- package/dist/tools.json +200 -295
- package/dist/utils/composeEventHandlers.d.ts +19 -0
- package/dist/utils/composeEventHandlers.js +26 -0
- package/dist/utils/composeEventHandlers.test.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/package.json +31 -1
- package/src/global.scss +21 -28
- package/src/styles/theme.css +157 -50
- package/src/styles/theme.test.ts +119 -0
- package/tailwind.preset.cjs +30 -20
- 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 -208
- 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 -60
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.js +0 -19
- 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/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
|
@@ -10,7 +10,7 @@ const metricTheme = {
|
|
|
10
10
|
// --card-radius with its own --metric-radius (same "rounded-[...]" utility
|
|
11
11
|
// group, so this wins via source order) rather than inheriting Card's
|
|
12
12
|
// radius verbatim.
|
|
13
|
-
baseStyle: "transition-colors duration-
|
|
13
|
+
baseStyle: "transition-colors duration-[var(--motion-duration-base)] rounded-[var(--metric-radius)]",
|
|
14
14
|
// Visual style variants — container surface + structure.
|
|
15
15
|
// `filled` adds nothing: it inherits the Card shell's --color-surface-raised.
|
|
16
16
|
// `ghost` clears that fill (`!` beats Card's bg utility regardless of
|
|
@@ -54,9 +54,9 @@ const metricTheme = {
|
|
|
54
54
|
// arbitrary text-[...] syntax is ambiguous between color/font-size and a
|
|
55
55
|
// bare var() resolves to color, silently no-oping the size change.
|
|
56
56
|
valueSizes: {
|
|
57
|
-
sm: "text-[length:var(--metric-value-size-sm)]
|
|
58
|
-
md: "text-[length:var(--metric-value-size-md)]
|
|
59
|
-
lg: "text-[length:var(--metric-value-size-lg)]
|
|
57
|
+
sm: "text-[length:var(--metric-value-size-sm)]/[var(--metric-value-line-height-sm)]",
|
|
58
|
+
md: "text-[length:var(--metric-value-size-md)]/[var(--metric-value-line-height-md)]",
|
|
59
|
+
lg: "text-[length:var(--metric-value-size-lg)]/[var(--metric-value-line-height-lg)]",
|
|
60
60
|
},
|
|
61
61
|
subtitleSizes: { sm: "text-xs mt-1", md: "text-xs mt-0.5", lg: "text-sm mt-1" },
|
|
62
62
|
// Common element styles
|
|
@@ -45,7 +45,7 @@ const tableTheme = {
|
|
|
45
45
|
// <tr> (inset shadow) so a shifted cell can't drag a notch into it.
|
|
46
46
|
"[&>tbody>tr>td]:border-b-0 " +
|
|
47
47
|
"[&>tbody>tr]:shadow-[inset_0_-1px_0_0_var(--color-border)] [&>tbody>tr:last-child]:shadow-none " +
|
|
48
|
-
"[&>tbody>tr>td]:transition-transform [&>tbody>tr>td]:duration-
|
|
48
|
+
"[&>tbody>tr>td]:transition-transform [&>tbody>tr>td]:duration-[var(--motion-duration-slow)] " +
|
|
49
49
|
// first cell eases right (its left padding); last cell eases left only when
|
|
50
50
|
// right-aligned (matches `pr-4` — invisible on left-aligned content).
|
|
51
51
|
"[&>tbody>tr:hover>td:first-child]:translate-x-2 " +
|
|
@@ -60,7 +60,7 @@ const tableTheme = {
|
|
|
60
60
|
"text-[var(--color-text-primary)] ",
|
|
61
61
|
// Row styles — hover and layout only (borders moved to cells)
|
|
62
62
|
// Light: neutral-50 hover | Dark: neutral-800 hover
|
|
63
|
-
rowStyle: "group transition-all duration-
|
|
63
|
+
rowStyle: "group transition-all duration-[var(--motion-duration-slow)] relative " +
|
|
64
64
|
"hover:bg-[var(--color-mono-50)] " +
|
|
65
65
|
"dark:hover:bg-[var(--color-surface-hover)]",
|
|
66
66
|
// Selected row styles — background is applied per-cell (in TableCell) so that
|
|
@@ -5,7 +5,6 @@ import '../../core/Popover/PopoverContext.js';
|
|
|
5
5
|
import '../../core/Popover/PopoverBody.js';
|
|
6
6
|
import { Gear } from '@phosphor-icons/react';
|
|
7
7
|
import { Button } from '../../core/Button/Button.js';
|
|
8
|
-
import 'react';
|
|
9
8
|
import { Checkbox } from '../../forms/Checkbox/Checkbox.js';
|
|
10
9
|
import { Sortable, SortableItem } from '../../core/Sortable/Sortable.js';
|
|
11
10
|
|
|
@@ -19,7 +18,7 @@ function TableColumnManagerComponent({ columns, visibleColumns, columnOrder, onT
|
|
|
19
18
|
const displayName = typeof column.header === 'string' ? column.header : column.id;
|
|
20
19
|
return (jsx(Checkbox, { id: `column-checkbox-${column.id}`, name: `column-${column.id}`, value: column.id, checked: isVisible, onChange: () => onToggleColumn(column.id), "aria-label": `Toggle visibility for ${displayName} column`, label: displayName, state: isLocked ? 'disabled' : 'default' }));
|
|
21
20
|
};
|
|
22
|
-
return (jsxs(Popover, { placement: "bottom-end", offset: 8, children: [jsx(Popover.Trigger, { children: jsxs(Button, { color: "mono", variant: "filled", "aria-label": "Manage column visibility", children: [jsx(Gear, { className: "size-5", "aria-hidden": "true" }), "Manage Columns"] }) }), jsx(Popover.Body, { className: "p-0", children: jsxs("div", { className: "w-64 p-3 overflow-hidden", role: "dialog", "aria-labelledby": "column-manager-title", "aria-describedby": "column-manager-description", "aria-modal": "true", children: [jsx("div", { id: "column-manager-title", className: "text-sm uppercase font-bold mb-3 text-[var(--color-text-placeholder)]", children: "Manage Columns" }), jsx("div", { id: "column-manager-description", className: "sr-only", children: "Use checkboxes to control which columns are visible in the table. Locked columns cannot be hidden." }), jsx("div", { className: "space-y-0.5", role: "group", "aria-label": "Column visibility options", children: onColumnReorder ? (jsx(Sortable, { onReorder: onColumnReorder, showDragHandle: true, className: "space-y-0.5", children: orderedColumns.map((column) => (jsx(SortableItem, { id: column.id, disabled: column.locked === true, className: `hover:bg-[var(--color-surface-hover)] rounded-lg p-1.5 transition-colors ${column.locked ? 'bg-[var(--color-
|
|
21
|
+
return (jsxs(Popover, { placement: "bottom-end", offset: 8, children: [jsx(Popover.Trigger, { children: jsxs(Button, { color: "mono", variant: "filled", "aria-label": "Manage column visibility", children: [jsx(Gear, { className: "size-5", "aria-hidden": "true" }), "Manage Columns"] }) }), jsx(Popover.Body, { className: "p-0", children: jsxs("div", { className: "w-64 p-3 overflow-hidden", role: "dialog", "aria-labelledby": "column-manager-title", "aria-describedby": "column-manager-description", "aria-modal": "true", children: [jsx("div", { id: "column-manager-title", className: "text-sm uppercase font-bold mb-3 text-[var(--color-text-placeholder)]", children: "Manage Columns" }), jsx("div", { id: "column-manager-description", className: "sr-only", children: "Use checkboxes to control which columns are visible in the table. Locked columns cannot be hidden." }), jsx("div", { className: "space-y-0.5", role: "group", "aria-label": "Column visibility options", children: onColumnReorder ? (jsx(Sortable, { onReorder: onColumnReorder, showDragHandle: true, className: "space-y-0.5", children: orderedColumns.map((column) => (jsx(SortableItem, { id: column.id, disabled: column.locked === true, className: `hover:bg-[var(--color-surface-hover)] rounded-lg p-1.5 transition-colors ${column.locked ? 'bg-[var(--color-surface)]' : ''}`, children: renderColumnItem(column) }, column.id))) })) : (orderedColumns.map((column) => (jsx("div", { className: `hover:bg-[var(--color-surface-hover)] rounded-lg p-1.5 transition-colors ${column.locked ? 'bg-[var(--color-surface)]' : ''}`, children: renderColumnItem(column) }, column.id)))) }), jsx("div", { className: "mt-3 flex justify-end", children: jsx(Button, { color: "mono", variant: "filled", className: "w-full", onClick: onResetToDefault, children: "Reset to Default" }) })] }) })] }));
|
|
23
22
|
}
|
|
24
23
|
const TableColumnManager = TableColumnManagerComponent;
|
|
25
24
|
|
|
@@ -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") {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
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
|
|
@@ -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)]",
|
|
@@ -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
|
-
mono: "bg-[var(--color-
|
|
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
|
-
mono: "text-[var(--color-
|
|
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)]",
|
|
@@ -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. */
|
|
@@ -18,20 +18,11 @@ float randomR(vec2 st) {
|
|
|
18
18
|
return fract(sin(dot(st, vec2(12.9898, 78.233))) * 43758.5453123);
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
21
|
-
/** Pure-hash pseudo-random vec2, no texture lookup. Same source as glslHashFloat. */
|
|
22
|
-
const glslHashVec2 = `
|
|
23
|
-
vec2 randomGB(vec2 st) {
|
|
24
|
-
return vec2(
|
|
25
|
-
fract(sin(dot(st, vec2(12.9898, 78.233))) * 43758.5453123),
|
|
26
|
-
fract(sin(dot(st, vec2(93.9898, 67.345))) * 24634.6345123)
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
`;
|
|
30
21
|
/** Ashima Arts / Stefan Gustavson 2D simplex noise (ISC license) — generic,
|
|
31
22
|
* ubiquitous prior art in the WebGL shader ecosystem, NOT paper-design's own
|
|
32
23
|
* IP. Used as the low-level noise primitive under some ported effects whose
|
|
33
24
|
* higher-level composition logic IS credited to paper-design in their own
|
|
34
|
-
* doc comments (e.g. GrainGradient, Dithering,
|
|
25
|
+
* doc comments (e.g. GrainGradient, Dithering, LiquidMetal). */
|
|
35
26
|
const glslSimplexNoise2D = `
|
|
36
27
|
vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
|
|
37
28
|
vec2 mod289(vec2 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
|
|
@@ -81,4 +72,4 @@ vec2 rotate(vec2 v, float angle) {
|
|
|
81
72
|
}
|
|
82
73
|
`;
|
|
83
74
|
|
|
84
|
-
export { glslDeclarePI, glslHashFloat,
|
|
75
|
+
export { glslDeclarePI, glslHashFloat, glslRotate2, glslSimplexNoise2D };
|
|
@@ -6,7 +6,7 @@ const checkboxTheme = {
|
|
|
6
6
|
baseStyle: "relative flex items-start gap-3",
|
|
7
7
|
inputContainerStyle: "relative flex-shrink-0 group grid grid-cols-1",
|
|
8
8
|
// Input styles with light and dark mode variants
|
|
9
|
-
inputStyle: "col-start-1 row-start-1 appearance-none rounded-[var(--checkbox-radius)] border-2 transition-all duration-
|
|
9
|
+
inputStyle: "col-start-1 row-start-1 appearance-none rounded-[var(--checkbox-radius)] border-2 transition-all duration-[var(--motion-duration-slower)] " +
|
|
10
10
|
// Default state - light
|
|
11
11
|
"border-[var(--color-border)] bg-[var(--color-surface)] " +
|
|
12
12
|
// Default state - dark
|
|
@@ -34,6 +34,24 @@ const DEFAULT_GRADIENT = {
|
|
|
34
34
|
* and return null). Skip parsing for gradient values.
|
|
35
35
|
*/
|
|
36
36
|
const isGradientString = (v) => /^(?:repeating-)?(?:linear|radial|conic)-gradient\(/.test(v.trim());
|
|
37
|
+
/**
|
|
38
|
+
* The solid-color output pipeline, as a pure function.
|
|
39
|
+
*
|
|
40
|
+
* Mirrors `getFormattedValue` below, but callable from an effect that needs to
|
|
41
|
+
* know what a color WILL serialize to before that color reaches state — used to
|
|
42
|
+
* mark a parent-supplied value as already in force so it is never echoed back
|
|
43
|
+
* through `onChange`.
|
|
44
|
+
*/
|
|
45
|
+
const formatColorAs = (c, fmt) => {
|
|
46
|
+
switch (fmt) {
|
|
47
|
+
case 'rgb':
|
|
48
|
+
return formatRgb(c.h, c.s, c.l, c.a);
|
|
49
|
+
case 'hsl':
|
|
50
|
+
return formatHsl(c.h, c.s, c.l, c.a);
|
|
51
|
+
default:
|
|
52
|
+
return formatHex(c.h, c.s, c.l);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
37
55
|
/**
|
|
38
56
|
* ColorPicker Root Component
|
|
39
57
|
* Follows Flikkui compound component pattern (similar to Accordion, Tabs, Popover)
|
|
@@ -55,6 +73,11 @@ const ColorPickerRoot = React__default.forwardRef(({ value, defaultValue = '#000
|
|
|
55
73
|
const [color, setColor] = useState(initialColor);
|
|
56
74
|
const [format, setFormat] = useState(initialFormat);
|
|
57
75
|
const [isOpen, setIsOpen] = useState(false);
|
|
76
|
+
// Last value handed to `onChange` (or accepted from the parent). Declared
|
|
77
|
+
// here because BOTH the controlled-value sync and the emit effect below
|
|
78
|
+
// write it — see the emit effect for the full rationale.
|
|
79
|
+
const prevOutputRef = useRef(undefined);
|
|
80
|
+
const hasSeededOutputRef = useRef(false);
|
|
58
81
|
// Mode state (controlled/uncontrolled)
|
|
59
82
|
const [internalMode, setInternalMode] = useState(defaultMode);
|
|
60
83
|
const mode = modeProp !== null && modeProp !== void 0 ? modeProp : internalMode;
|
|
@@ -130,9 +153,14 @@ const ColorPickerRoot = React__default.forwardRef(({ value, defaultValue = '#000
|
|
|
130
153
|
const parsed = parseColor(value);
|
|
131
154
|
if (parsed) {
|
|
132
155
|
setColor(parsed);
|
|
156
|
+
// 🔴 Record what this externally-supplied value normalizes to, so the
|
|
157
|
+
// emit effect below treats the resulting render as "already in force"
|
|
158
|
+
// and does not echo the parent's own value back as an onChange. Without
|
|
159
|
+
// this, a parent that writes what it receives ping-pongs forever.
|
|
160
|
+
prevOutputRef.current = formatColorAs(parsed, format);
|
|
133
161
|
}
|
|
134
162
|
}
|
|
135
|
-
}, [value]);
|
|
163
|
+
}, [value, format]);
|
|
136
164
|
// Individual channel setters
|
|
137
165
|
const setHue = useCallback((h) => {
|
|
138
166
|
setColor((prev) => ({ ...prev, h }));
|
|
@@ -147,6 +175,7 @@ const ColorPickerRoot = React__default.forwardRef(({ value, defaultValue = '#000
|
|
|
147
175
|
setColor((prev) => ({ ...prev, a }));
|
|
148
176
|
}, []);
|
|
149
177
|
// Utility functions to get color in different formats
|
|
178
|
+
// (module-level `formatColorAs` is the same pipeline, callable outside render)
|
|
150
179
|
const getHexValue = useCallback(() => {
|
|
151
180
|
return formatHex(color.h, color.s, color.l);
|
|
152
181
|
}, [color]);
|
|
@@ -180,10 +209,23 @@ const ColorPickerRoot = React__default.forwardRef(({ value, defaultValue = '#000
|
|
|
180
209
|
}
|
|
181
210
|
return getFormattedValue();
|
|
182
211
|
}, [mode, gradient, getFormattedValue]);
|
|
183
|
-
// Notify parent of color changes
|
|
184
|
-
|
|
212
|
+
// Notify parent of color changes.
|
|
213
|
+
//
|
|
214
|
+
// 🔴 A controlled component NEVER emits for a value it wasn't given by the
|
|
215
|
+
// user. This used to fire on mount — `prevOutputRef` started `undefined`, so
|
|
216
|
+
// the first pass always "differed" — handing the consumer a value nobody
|
|
217
|
+
// chose. Because the output is re-derived through hex -> HSL (integer
|
|
218
|
+
// rounding) -> hex, that value often wasn't even the one passed in, so a
|
|
219
|
+
// parent storing what it receives recorded a phantom user edit, and a parent
|
|
220
|
+
// that fed it back re-rendered into an infinite emit loop.
|
|
185
221
|
useEffect(() => {
|
|
186
222
|
const output = getOutputValue();
|
|
223
|
+
// First pass: seed the baseline, emit nothing. Mounting is not a user edit.
|
|
224
|
+
if (!hasSeededOutputRef.current) {
|
|
225
|
+
hasSeededOutputRef.current = true;
|
|
226
|
+
prevOutputRef.current = output;
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
187
229
|
if (onChange && !disabled && output !== prevOutputRef.current) {
|
|
188
230
|
prevOutputRef.current = output;
|
|
189
231
|
onChange(output);
|