@flikk/ui 1.0.0-beta.26 → 1.0.0-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bg/1.webp +0 -0
- package/dist/bg/10.webp +0 -0
- package/dist/bg/11.webp +0 -0
- package/dist/bg/12.webp +0 -0
- package/dist/bg/13.webp +0 -0
- package/dist/bg/14.webp +0 -0
- package/dist/bg/15.webp +0 -0
- package/dist/bg/16.webp +0 -0
- package/dist/bg/17.webp +0 -0
- package/dist/bg/18.webp +0 -0
- package/dist/bg/19.webp +0 -0
- package/dist/bg/2.webp +0 -0
- package/dist/bg/20.webp +0 -0
- package/dist/bg/21.webp +0 -0
- package/dist/bg/22.webp +0 -0
- package/dist/bg/3.webp +0 -0
- package/dist/bg/4.webp +0 -0
- package/dist/bg/5.webp +0 -0
- package/dist/bg/6.webp +0 -0
- package/dist/bg/7.webp +0 -0
- package/dist/bg/8.webp +0 -0
- package/dist/bg/9.webp +0 -0
- package/dist/components/ai/CodeBlock/CodeBlock.theme.js +1 -1
- package/dist/components/ai/PromptInput/PromptInput.js +7 -140
- package/dist/components/ai/PromptInput/VoiceRecorder.js +0 -85
- package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
- package/dist/components/canvas/Background.d.ts +19 -0
- package/dist/components/canvas/Background.js +23 -0
- package/dist/components/canvas/BaseNode.d.ts +15 -0
- package/dist/components/canvas/BaseNode.js +20 -0
- package/dist/components/canvas/CanvasToolbar.d.ts +34 -0
- package/dist/components/canvas/CanvasToolbar.js +34 -0
- package/dist/components/canvas/Edge.d.ts +35 -0
- package/dist/components/canvas/Edge.js +97 -0
- package/dist/components/canvas/EdgeLayer.d.ts +18 -0
- package/dist/components/canvas/EdgeLayer.js +111 -0
- package/dist/components/canvas/Handle.d.ts +11 -0
- package/dist/components/canvas/Handle.js +63 -0
- package/dist/components/canvas/MiniMap.d.ts +22 -0
- package/dist/components/canvas/MiniMap.js +105 -0
- package/dist/components/canvas/NodeCanvas.d.ts +10 -0
- package/dist/components/canvas/NodeCanvas.js +477 -0
- package/dist/components/canvas/NodeCanvas.theme.d.ts +7 -0
- package/dist/components/canvas/NodeCanvas.theme.js +9 -0
- package/dist/components/canvas/NodeCanvas.types.d.ts +187 -0
- package/dist/components/canvas/NodeControls.d.ts +25 -0
- package/dist/components/canvas/NodeControls.js +40 -0
- package/dist/components/canvas/NodeRenderer.d.ts +19 -0
- package/dist/components/canvas/NodeRenderer.js +117 -0
- package/dist/components/canvas/changes.d.ts +11 -0
- package/dist/components/canvas/changes.js +76 -0
- package/dist/components/canvas/context/CanvasContext.d.ts +32 -0
- package/dist/components/canvas/context/CanvasContext.js +14 -0
- package/dist/components/canvas/context/ConnectionContext.d.ts +33 -0
- package/dist/components/canvas/context/ConnectionContext.js +13 -0
- package/dist/components/canvas/context/HandleRegistry.d.ts +24 -0
- package/dist/components/canvas/context/HandleRegistry.js +15 -0
- package/dist/components/canvas/context/InteractionContext.d.ts +18 -0
- package/dist/components/canvas/context/InteractionContext.js +14 -0
- package/dist/components/canvas/context/NodeIdContext.d.ts +3 -0
- package/dist/components/canvas/context/NodeIdContext.js +15 -0
- package/dist/components/canvas/hooks/useConnection.d.ts +17 -0
- package/dist/components/canvas/hooks/useConnection.js +29 -0
- package/dist/components/canvas/hooks/useMarquee.d.ts +25 -0
- package/dist/components/canvas/hooks/useMarquee.js +91 -0
- package/dist/components/canvas/hooks/useNodeDrag.d.ts +23 -0
- package/dist/components/canvas/hooks/useNodeDrag.js +110 -0
- package/dist/components/canvas/hooks/usePanZoom.d.ts +30 -0
- package/dist/components/canvas/hooks/usePanZoom.js +189 -0
- package/dist/components/canvas/hooks/useViewport.d.ts +21 -0
- package/dist/components/canvas/hooks/useViewport.js +35 -0
- package/dist/components/canvas/index.d.ts +14 -0
- package/dist/components/canvas/index.js +12 -0
- package/dist/components/canvas/layout.d.ts +22 -0
- package/dist/components/canvas/layout.js +67 -0
- package/dist/components/canvas/utils.d.ts +4 -0
- package/dist/components/canvas/utils.js +16 -0
- package/dist/components/charts/AreaChart/AreaChart.js +136 -101
- package/dist/components/charts/AreaChart/AreaChart.types.d.ts +5 -5
- package/dist/components/charts/AreaChart/AreaChart.types.js +1 -0
- package/dist/components/charts/BarChart/BarChart.js +207 -143
- package/dist/components/charts/BarChart/BarChart.types.d.ts +4 -4
- package/dist/components/charts/BarChart/BarChart.types.js +1 -0
- package/dist/components/charts/ComboChart/ComboChart.types.d.ts +2 -2
- package/dist/components/charts/LineChart/LineChart.js +88 -72
- package/dist/components/charts/LineChart/LineChart.types.d.ts +3 -3
- package/dist/components/charts/RadarChart/RadarChart.js +1 -1
- package/dist/components/charts/RadarChart/RadarChart.theme.js +5 -2
- package/dist/components/charts/ScatterPlot/ScatterPlot.js +62 -72
- package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +10 -1
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +3 -9
- package/dist/components/charts/StackedBarChart/StackedBarChart.js +33 -33
- package/dist/components/charts/StackedBarChart/StackedBarChart.types.d.ts +2 -2
- package/dist/components/charts/hooks/index.d.ts +2 -0
- package/dist/components/charts/hooks/useChartDimensions.d.ts +29 -0
- package/dist/components/charts/hooks/useChartDimensions.js +42 -0
- package/dist/components/charts/shared/ChartTooltip/ChartTooltip.theme.js +1 -1
- package/dist/components/charts/types/chart.types.d.ts +11 -2
- package/dist/components/charts/types/chart.types.js +10 -3
- package/dist/components/core/Avatar/Avatar.js +5 -1
- package/dist/components/core/AvatarGroup/AvatarGroup.js +5 -1
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +4 -2
- package/dist/components/core/Badge/Badge.js +1 -1
- package/dist/components/core/Badge/Badge.theme.js +16 -15
- package/dist/components/core/Button/Button.js +1 -1
- package/dist/components/core/Button/Button.theme.js +3 -3
- package/dist/components/core/Calendar/Calendar.theme.js +1 -1
- package/dist/components/core/Card/Card.js +7 -3
- package/dist/components/core/Card/Card.theme.js +3 -3
- package/dist/components/core/Card/Card.types.d.ts +27 -2
- package/dist/components/core/CommandPalette/CommandItem.js +4 -5
- package/dist/components/core/CommandPalette/CommandPalette.js +1 -1
- package/dist/components/core/CommandPalette/CommandPalette.theme.js +11 -13
- package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +0 -2
- package/dist/components/core/ContextMenu/ContextMenu.theme.js +14 -15
- package/dist/components/core/ContextMenu/ContextMenuItem.js +1 -1
- package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +1 -1
- package/dist/components/core/DotSeparator/DotSeparator.d.ts +3 -0
- package/dist/components/core/DotSeparator/DotSeparator.js +19 -0
- package/dist/components/core/DotSeparator/DotSeparator.theme.d.ts +2 -0
- package/dist/components/core/DotSeparator/DotSeparator.theme.js +10 -0
- package/dist/components/core/DotSeparator/DotSeparator.types.d.ts +25 -0
- package/dist/components/core/DotSeparator/index.d.ts +3 -0
- package/dist/components/core/Dropdown/Dropdown.theme.js +5 -6
- package/dist/components/core/Dropdown/DropdownItem.js +1 -1
- package/dist/components/core/Dropdown/DropdownMenu.js +58 -30
- package/dist/components/core/HeroCard/HeroCard.d.ts +5 -0
- package/dist/components/core/HeroCard/HeroCard.js +99 -0
- package/dist/components/core/HeroCard/HeroCard.theme.d.ts +3 -0
- package/dist/components/core/HeroCard/HeroCard.theme.js +8 -0
- package/dist/components/core/HeroCard/HeroCard.types.d.ts +70 -0
- package/dist/components/core/HeroCard/index.d.ts +4 -0
- package/dist/components/core/Kbd/Kbd.theme.js +1 -1
- package/dist/components/core/MenuItem/MenuItem.js +5 -2
- package/dist/components/core/MenuItem/MenuItem.theme.d.ts +6 -0
- package/dist/components/core/MenuItem/MenuItem.theme.js +19 -16
- package/dist/components/core/MenuItem/MenuItem.types.d.ts +2 -0
- package/dist/components/core/Modal/Modal.d.ts +1 -1
- package/dist/components/core/Modal/Modal.js +2 -7
- package/dist/components/core/Modal/Modal.theme.js +4 -8
- package/dist/components/core/Modal/Modal.types.d.ts +0 -10
- package/dist/components/core/Modal/index.d.ts +1 -1
- package/dist/components/core/ModalStack/ModalStack.d.ts +1 -1
- package/dist/components/core/ModalStack/ModalStack.types.d.ts +1 -2
- package/dist/components/core/ModalStack/ModalStackModal.d.ts +1 -1
- package/dist/components/core/ModalStack/ModalStackModal.js +2 -7
- package/dist/components/core/NavItem/NavItem.js +20 -4
- package/dist/components/core/NavItem/NavItem.theme.js +13 -2
- package/dist/components/core/PageHeading/PageHeading.theme.js +2 -2
- package/dist/components/core/Popover/Popover.theme.js +1 -1
- package/dist/components/core/Popover/Popover.types.d.ts +6 -2
- package/dist/components/core/Popover/PopoverBody.js +10 -3
- package/dist/components/core/ScrollArea/ScrollArea.js +242 -4
- package/dist/components/core/ScrollArea/ScrollArea.types.d.ts +12 -1
- package/dist/components/core/ScrollArea/smooth/SmoothScrollEngine.d.ts +4 -0
- package/dist/components/core/ScrollArea/smooth/SmoothScrollEngine.js +23 -0
- package/dist/components/core/ScrollArea/smooth/useSmoothScroll.js +4 -0
- package/dist/components/core/ScrollArea/smooth/useSmoothScroll.types.d.ts +5 -0
- package/dist/components/core/Segmented/Segmented.theme.js +2 -2
- package/dist/components/core/Sidebar/Sidebar.d.ts +2 -0
- package/dist/components/core/Sidebar/Sidebar.js +15 -7
- package/dist/components/core/Sidebar/Sidebar.types.d.ts +92 -4
- package/dist/components/core/Sidebar/SidebarCard.d.ts +25 -0
- package/dist/components/core/Sidebar/SidebarCard.js +68 -0
- package/dist/components/core/Sidebar/SidebarCard.theme.d.ts +8 -0
- package/dist/components/core/Sidebar/SidebarCard.theme.js +18 -0
- package/dist/components/core/Sidebar/SidebarContent.js +5 -1
- package/dist/components/core/Sidebar/SidebarContext.js +1 -1
- package/dist/components/core/Sidebar/SidebarHeader.js +10 -2
- package/dist/components/core/Sidebar/SidebarLogo.js +38 -3
- package/dist/components/core/Sidebar/SidebarSearch.d.ts +22 -0
- package/dist/components/core/Sidebar/SidebarSearch.js +135 -0
- package/dist/components/core/Sidebar/SidebarToggle.js +1 -1
- package/dist/components/core/Sidebar/SidebarUserProfile.js +2 -2
- package/dist/components/core/Sidebar/index.d.ts +3 -1
- package/dist/components/core/Tag/Tag.js +29 -5
- package/dist/components/core/Tag/Tag.theme.js +13 -8
- package/dist/components/core/Tag/Tag.types.d.ts +7 -0
- package/dist/components/core/Tooltip/Tooltip.js +1 -1
- package/dist/components/core/Tooltip/Tooltip.theme.js +1 -2
- package/dist/components/core/index.d.ts +2 -0
- package/dist/components/core/index.js +6 -0
- package/dist/components/data-display/DescriptionList/DescriptionList.js +23 -7
- package/dist/components/data-display/DescriptionList/DescriptionList.theme.js +10 -3
- package/dist/components/data-display/DescriptionList/DescriptionList.types.d.ts +49 -10
- package/dist/components/data-display/DescriptionList/index.d.ts +1 -1
- package/dist/components/data-display/Feed/Feed.js +28 -5
- package/dist/components/data-display/Feed/Feed.theme.js +1 -1
- package/dist/components/data-display/Feed/Feed.types.d.ts +32 -1
- package/dist/components/data-display/Feed/index.d.ts +1 -1
- package/dist/components/data-display/GanttChart/GanttChart.d.ts +1 -1
- package/dist/components/data-display/GanttChart/GanttChart.js +31 -4
- package/dist/components/data-display/GanttChart/GanttChart.theme.js +19 -17
- package/dist/components/data-display/GanttChart/GanttChart.types.d.ts +19 -0
- package/dist/components/data-display/GanttChart/GanttChart.utils.js +1 -1
- package/dist/components/data-display/GanttChart/GanttChartPanel.d.ts +1 -1
- package/dist/components/data-display/GanttChart/GanttChartPanel.js +3 -3
- package/dist/components/data-display/GanttChart/GanttDependencyArrows.js +7 -4
- package/dist/components/data-display/GanttChart/GanttMilestone.js +5 -5
- package/dist/components/data-display/GanttChart/GanttTablePanel.js +1 -1
- package/dist/components/data-display/GanttChart/GanttTableTaskRow.js +2 -2
- package/dist/components/data-display/GanttChart/GanttTaskBar.js +37 -16
- package/dist/components/data-display/GanttChart/GanttTimelineGrid.js +2 -1
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +35 -11
- package/dist/components/data-display/GanttChart/GanttToolbar.js +2 -2
- package/dist/components/data-display/GanttChart/hooks/useGanttDrag.js +3 -2
- package/dist/components/data-display/GanttChart/index.d.ts +1 -1
- package/dist/components/data-display/Metric/Metric.js +8 -8
- package/dist/components/data-display/Metric/Metric.theme.d.ts +3 -2
- package/dist/components/data-display/Metric/Metric.theme.js +50 -68
- package/dist/components/data-display/Metric/Metric.types.d.ts +19 -21
- package/dist/components/data-display/Table/Table.js +2 -2
- package/dist/components/data-display/Table/Table.theme.js +27 -9
- package/dist/components/data-display/Table/Table.types.d.ts +8 -0
- package/dist/components/data-display/Table/TableBody.js +2 -2
- package/dist/components/data-display/Table/TableCell.js +1 -1
- package/dist/components/data-display/Table/TableRow.d.ts +1 -1
- package/dist/components/data-display/Table/TableRow.js +9 -2
- package/dist/components/data-display/Timeline/Timeline.js +27 -5
- package/dist/components/data-display/Timeline/Timeline.theme.d.ts +10 -2
- package/dist/components/data-display/Timeline/Timeline.theme.js +14 -8
- package/dist/components/data-display/Timeline/Timeline.types.d.ts +48 -16
- package/dist/components/data-display/Timeline/Timeline.utils.d.ts +6 -0
- package/dist/components/data-display/Timeline/Timeline.utils.js +11 -0
- package/dist/components/data-display/Timeline/TimelineItem.js +13 -20
- package/dist/components/data-display/Timeline/TimelineMarker.js +10 -8
- package/dist/components/data-display/Timeline/index.d.ts +2 -2
- package/dist/components/effects/3d/index.d.ts +0 -2
- package/dist/components/effects/3d/index.js +0 -1
- package/dist/components/effects/Aurora/Aurora.d.ts +6 -17
- package/dist/components/effects/Aurora/Aurora.js +297 -131
- package/dist/components/effects/Aurora/Aurora.types.d.ts +6 -0
- package/dist/components/effects/DotPattern/DotPattern.js +1 -1
- package/dist/components/effects/Overlay/Overlay.theme.js +1 -2
- package/dist/components/effects/Preloader/Preloader.animations.d.ts +23 -0
- package/dist/components/effects/Preloader/Preloader.animations.js +150 -0
- package/dist/components/effects/Preloader/Preloader.d.ts +3 -0
- package/dist/components/effects/Preloader/Preloader.js +119 -0
- package/dist/components/effects/Preloader/Preloader.types.d.ts +63 -0
- package/dist/components/effects/Preloader/index.d.ts +2 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.js +25 -14
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.types.d.ts +2 -0
- package/dist/components/effects/TiltCard/TiltCard.d.ts +12 -0
- package/dist/components/effects/TiltCard/TiltCard.glow.d.ts +28 -0
- package/dist/components/effects/TiltCard/TiltCard.glow.js +114 -0
- package/dist/components/effects/TiltCard/TiltCard.js +177 -0
- package/dist/components/effects/{SpotlightBorder/SpotlightBorder.shaders.d.ts → TiltCard/TiltCard.shaders.d.ts} +1 -1
- package/dist/components/effects/{SpotlightBorder/SpotlightBorder.shaders.js → TiltCard/TiltCard.shaders.js} +1 -1
- package/dist/components/effects/TiltCard/TiltCard.types.d.ts +88 -0
- package/dist/components/effects/TiltCard/index.d.ts +2 -0
- package/dist/components/effects/index.d.ts +4 -12
- package/dist/components/effects/index.js +2 -6
- package/dist/components/forms/Checkbox/Checkbox.js +7 -1
- package/dist/components/forms/Combobox/Combobox.js +1 -1
- package/dist/components/forms/Combobox/Combobox.theme.js +2 -4
- package/dist/components/forms/DatePicker/DatePicker.theme.js +11 -18
- package/dist/components/forms/DatePicker/DatePickerTrigger.js +1 -1
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +6 -13
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +1 -1
- package/dist/components/forms/FileUpload/FileUpload.animations.d.ts +29 -0
- package/dist/components/forms/FileUpload/FileUpload.animations.js +19 -0
- package/dist/components/forms/FileUpload/FileUpload.js +85 -134
- package/dist/components/forms/FileUpload/FileUpload.theme.d.ts +2 -10
- package/dist/components/forms/FileUpload/FileUpload.theme.js +16 -30
- package/dist/components/forms/FileUpload/FileUpload.types.d.ts +26 -10
- package/dist/components/forms/FormLabel/FormLabel.theme.js +1 -1
- package/dist/components/forms/Input/Input.theme.js +13 -10
- package/dist/components/forms/InputCounter/InputCounter.theme.js +1 -1
- package/dist/components/forms/Mention/Mention.js +152 -57
- package/dist/components/forms/Mention/Mention.theme.js +16 -23
- package/dist/components/forms/Mention/Mention.types.d.ts +12 -12
- package/dist/components/forms/Mention/Mention.utils.js +32 -4
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +3 -3
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +5 -5
- package/dist/components/forms/Select/Select.js +2 -2
- package/dist/components/forms/Select/Select.theme.js +3 -3
- package/dist/components/forms/Slider/Slider.theme.js +1 -1
- package/dist/components/forms/Switch/Switch.js +27 -15
- package/dist/components/forms/Switch/Switch.theme.d.ts +36 -6
- package/dist/components/forms/Switch/Switch.theme.js +33 -4
- package/dist/components/forms/Switch/Switch.types.d.ts +12 -2
- package/dist/components/forms/TimePicker/TimePicker.theme.js +1 -2
- package/dist/components/forms/TimePicker/TimePickerContent.js +1 -87
- package/dist/components/forms/TimePicker/TimePickerTrigger.js +1 -1
- package/dist/components/forms/forms.theme.js +21 -16
- package/dist/components/forms/index.d.ts +0 -4
- package/dist/components/forms/index.js +0 -89
- package/dist/components/generative/GenerativeView.d.ts +21 -0
- package/dist/components/generative/GenerativeView.js +116 -0
- package/dist/components/generative/actions.d.ts +26 -0
- package/dist/components/generative/actions.js +51 -0
- package/dist/components/generative/index.d.ts +11 -0
- package/dist/components/generative/index.js +9 -0
- package/dist/components/generative/registry.d.ts +43 -0
- package/dist/components/generative/registry.js +114 -0
- package/dist/components/generative/resolvers.d.ts +35 -0
- package/dist/components/generative/resolvers.js +93 -0
- package/dist/components/generative/schema.generated.d.ts +2 -0
- package/dist/components/generative/schema.generated.js +1639 -0
- package/dist/components/generative/schemaTypes.d.ts +30 -0
- package/dist/components/generative/streaming.d.ts +39 -0
- package/dist/components/generative/streaming.js +283 -0
- package/dist/components/generative/tools.d.ts +21 -0
- package/dist/components/generative/tools.js +54 -0
- package/dist/components/generative/types.d.ts +41 -0
- package/dist/components/generative/useGenerativeStream.d.ts +37 -0
- package/dist/components/generative/useGenerativeStream.js +36 -0
- package/dist/components/generative/validate.d.ts +24 -0
- package/dist/components/generative/validate.js +259 -0
- package/dist/components/layout/AppShell/AppShell.d.ts +10 -0
- package/dist/components/layout/AppShell/AppShell.js +84 -0
- package/dist/components/layout/AppShell/AppShell.theme.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShell.theme.js +42 -0
- package/dist/components/layout/AppShell/AppShell.types.d.ts +127 -0
- package/dist/components/layout/AppShell/AppShellContext.d.ts +14 -0
- package/dist/components/layout/AppShell/AppShellContext.js +19 -0
- package/dist/components/layout/AppShell/AppShellFooter.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellFooter.js +12 -0
- package/dist/components/layout/AppShell/AppShellHeader.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellHeader.js +12 -0
- package/dist/components/layout/AppShell/AppShellMain.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellMain.js +19 -0
- package/dist/components/layout/AppShell/AppShellRightPanel.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellRightPanel.js +16 -0
- package/dist/components/layout/AppShell/AppShellSidebar.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellSidebar.js +16 -0
- package/dist/components/layout/AppShell/AppShellTopbar.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellTopbar.js +12 -0
- package/dist/components/layout/AppShell/index.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayout.js +1 -87
- package/dist/components/layout/Grid/Grid.d.ts +3 -0
- package/dist/components/layout/Grid/Grid.js +50 -0
- package/dist/components/layout/Grid/Grid.theme.d.ts +2 -0
- package/dist/components/layout/Grid/Grid.theme.js +35 -0
- package/dist/components/layout/Grid/Grid.types.d.ts +57 -0
- package/dist/components/layout/Grid/index.d.ts +3 -0
- package/dist/components/layout/Section/Section.d.ts +3 -0
- package/dist/components/layout/Section/Section.js +18 -0
- package/dist/components/layout/Section/Section.theme.d.ts +2 -0
- package/dist/components/layout/Section/Section.theme.js +10 -0
- package/dist/components/layout/Section/Section.types.d.ts +34 -0
- package/dist/components/layout/Section/index.d.ts +3 -0
- package/dist/components/layout/Stack/Stack.d.ts +3 -0
- package/dist/components/layout/Stack/Stack.js +19 -0
- package/dist/components/layout/Stack/Stack.theme.d.ts +2 -0
- package/dist/components/layout/Stack/Stack.theme.js +10 -0
- package/dist/components/layout/Stack/Stack.types.d.ts +39 -0
- package/dist/components/layout/Stack/index.d.ts +3 -0
- package/dist/components/layout/index.d.ts +4 -0
- package/dist/components/layout/index.js +8 -0
- package/dist/generative.schema.json +1637 -0
- package/dist/hooks/useSelectPortal.d.ts +10 -2
- package/dist/hooks/useSelectPortal.js +45 -24
- package/dist/index.js +180 -174
- package/dist/registry.json +10205 -0
- package/dist/styles.css +1 -1
- package/dist/tools.json +1731 -0
- package/dist/utils/dateUtils.js +11 -1
- package/package.json +19 -4
- package/src/global.scss +82 -109
- package/src/styles/theme.css +707 -474
- package/dist/bg/1.jpg +0 -0
- package/dist/bg/10.jpg +0 -0
- package/dist/bg/11.jpg +0 -0
- package/dist/bg/14.jpg +0 -0
- package/dist/bg/15.jpg +0 -0
- package/dist/bg/16.jpg +0 -0
- package/dist/bg/17.jpg +0 -0
- package/dist/bg/18.jpg +0 -0
- package/dist/bg/19.jpg +0 -0
- package/dist/bg/2.jpg +0 -0
- package/dist/bg/20.jpg +0 -0
- package/dist/bg/21.jpg +0 -0
- package/dist/bg/22.jpg +0 -0
- package/dist/bg/23.jpg +0 -0
- package/dist/bg/24.jpg +0 -0
- package/dist/bg/3.jpg +0 -0
- package/dist/bg/4.jpg +0 -0
- package/dist/bg/5.jpg +0 -0
- package/dist/bg/6.jpg +0 -0
- package/dist/bg/7.jpg +0 -0
- package/dist/bg/8.jpg +0 -0
- package/dist/bg/9.jpg +0 -0
- package/dist/components/effects/MorphingText/MorphingText.d.ts +0 -17
- package/dist/components/effects/MorphingText/MorphingText.js +0 -125
- package/dist/components/effects/MorphingText/MorphingText.types.d.ts +0 -18
- package/dist/components/effects/MorphingText/index.d.ts +0 -2
- package/dist/components/effects/PageTransition/PageTransition.animations.d.ts +0 -8
- package/dist/components/effects/PageTransition/PageTransition.animations.js +0 -53
- package/dist/components/effects/PageTransition/PageTransition.d.ts +0 -3
- package/dist/components/effects/PageTransition/PageTransition.js +0 -82
- package/dist/components/effects/PageTransition/PageTransition.types.d.ts +0 -15
- package/dist/components/effects/PageTransition/index.d.ts +0 -2
- package/dist/components/effects/ParallaxSection/ParallaxSection.d.ts +0 -26
- package/dist/components/effects/ParallaxSection/ParallaxSection.js +0 -71
- package/dist/components/effects/ParallaxSection/ParallaxSection.types.d.ts +0 -11
- package/dist/components/effects/ParallaxSection/index.d.ts +0 -2
- package/dist/components/effects/Spotlight/Spotlight.d.ts +0 -36
- package/dist/components/effects/Spotlight/Spotlight.js +0 -112
- package/dist/components/effects/Spotlight/Spotlight.types.d.ts +0 -29
- package/dist/components/effects/Spotlight/index.d.ts +0 -2
- package/dist/components/effects/SpotlightBorder/SpotlightBorder.d.ts +0 -18
- package/dist/components/effects/SpotlightBorder/SpotlightBorder.js +0 -213
- package/dist/components/effects/SpotlightBorder/SpotlightBorder.types.d.ts +0 -61
- package/dist/components/effects/SpotlightBorder/index.d.ts +0 -2
- package/dist/components/effects/StickyScroll/StickyScroll.d.ts +0 -30
- package/dist/components/effects/StickyScroll/StickyScroll.js +0 -128
- package/dist/components/effects/StickyScroll/StickyScroll.types.d.ts +0 -19
- package/dist/components/effects/StickyScroll/index.d.ts +0 -2
- package/dist/components/forms/CronInput/CronInput.d.ts +0 -3
- package/dist/components/forms/CronInput/CronInput.js +0 -113
- package/dist/components/forms/CronInput/CronInput.theme.d.ts +0 -6
- package/dist/components/forms/CronInput/CronInput.theme.js +0 -84
- package/dist/components/forms/CronInput/CronInput.types.d.ts +0 -109
- package/dist/components/forms/CronInput/CronInput.utils.d.ts +0 -67
- package/dist/components/forms/CronInput/CronInput.utils.js +0 -505
- package/dist/components/forms/CronInput/index.d.ts +0 -4
- /package/dist/components/effects/{SpotlightBorder/SpotlightBorder.types.js → TiltCard/TiltCard.types.js} +0 -0
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useRef, useState, useCallback } from 'react';
|
|
3
|
-
import { useReducedMotion, useMotionValue, useSpring, motion } from 'motion/react';
|
|
4
|
-
import { cn } from '../../../utils/cn.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Spotlight Component
|
|
8
|
-
*
|
|
9
|
-
* A mouse-following radial gradient that creates a subtle surface illumination
|
|
10
|
-
* effect. Tracks the mouse position within the parent element and renders a
|
|
11
|
-
* smooth, animated glow that follows the cursor.
|
|
12
|
-
*
|
|
13
|
-
* The parent container should have `position: relative` and `overflow: hidden`.
|
|
14
|
-
*
|
|
15
|
-
* Unlike SpotlightBorder (which highlights borders), this component illuminates
|
|
16
|
-
* the surface area itself with a soft radial gradient.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```tsx
|
|
20
|
-
* <div className="relative overflow-hidden bg-gray-900 rounded-lg p-8">
|
|
21
|
-
* <Spotlight color="var(--color-primary)" intensity={0.2} />
|
|
22
|
-
* <span className="relative z-10">Hover over me</span>
|
|
23
|
-
* </div>
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @example Custom spring and size
|
|
27
|
-
* ```tsx
|
|
28
|
-
* <div className="relative overflow-hidden bg-slate-800 rounded-xl p-12">
|
|
29
|
-
* <Spotlight
|
|
30
|
-
* size={500}
|
|
31
|
-
* color="#8b5cf6"
|
|
32
|
-
* intensity={0.25}
|
|
33
|
-
* springConfig={{ damping: 20, stiffness: 150 }}
|
|
34
|
-
* />
|
|
35
|
-
* <h2 className="relative z-10 text-white">Interactive card</h2>
|
|
36
|
-
* </div>
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
const Spotlight = ({ size = 300, color = "var(--color-primary)", intensity = 0.15, springConfig = { damping: 30, stiffness: 200 }, className, style, ...props }) => {
|
|
40
|
-
var _a, _b, _c, _d;
|
|
41
|
-
const shouldReduceMotion = useReducedMotion();
|
|
42
|
-
const containerRef = useRef(null);
|
|
43
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
44
|
-
// Raw mouse position motion values
|
|
45
|
-
const mouseX = useMotionValue(0);
|
|
46
|
-
const mouseY = useMotionValue(0);
|
|
47
|
-
// Spring-animated values for smooth following
|
|
48
|
-
const springX = useSpring(mouseX, {
|
|
49
|
-
damping: (_a = springConfig.damping) !== null && _a !== void 0 ? _a : 30,
|
|
50
|
-
stiffness: (_b = springConfig.stiffness) !== null && _b !== void 0 ? _b : 200,
|
|
51
|
-
});
|
|
52
|
-
const springY = useSpring(mouseY, {
|
|
53
|
-
damping: (_c = springConfig.damping) !== null && _c !== void 0 ? _c : 30,
|
|
54
|
-
stiffness: (_d = springConfig.stiffness) !== null && _d !== void 0 ? _d : 200,
|
|
55
|
-
});
|
|
56
|
-
// Use raw values when reduced motion is preferred
|
|
57
|
-
const x = shouldReduceMotion ? mouseX : springX;
|
|
58
|
-
const y = shouldReduceMotion ? mouseY : springY;
|
|
59
|
-
const handleMouseMove = useCallback((event) => {
|
|
60
|
-
var _a;
|
|
61
|
-
const parent = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
62
|
-
if (!parent)
|
|
63
|
-
return;
|
|
64
|
-
const rect = parent.getBoundingClientRect();
|
|
65
|
-
mouseX.set(event.clientX - rect.left);
|
|
66
|
-
mouseY.set(event.clientY - rect.top);
|
|
67
|
-
}, [mouseX, mouseY]);
|
|
68
|
-
const handleMouseEnter = useCallback((event) => {
|
|
69
|
-
var _a;
|
|
70
|
-
// Set position immediately on enter to avoid animating from origin
|
|
71
|
-
const parent = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
72
|
-
if (parent) {
|
|
73
|
-
const rect = parent.getBoundingClientRect();
|
|
74
|
-
const posX = event.clientX - rect.left;
|
|
75
|
-
const posY = event.clientY - rect.top;
|
|
76
|
-
mouseX.set(posX);
|
|
77
|
-
mouseY.set(posY);
|
|
78
|
-
// Jump springs to current position to avoid initial slide-in
|
|
79
|
-
if (!shouldReduceMotion) {
|
|
80
|
-
springX.jump(posX);
|
|
81
|
-
springY.jump(posY);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
setIsHovered(true);
|
|
85
|
-
}, [mouseX, mouseY, springX, springY, shouldReduceMotion]);
|
|
86
|
-
const handleMouseLeave = useCallback(() => {
|
|
87
|
-
setIsHovered(false);
|
|
88
|
-
}, []);
|
|
89
|
-
const halfSize = size / 2;
|
|
90
|
-
return (jsx("div", { ref: containerRef, className: cn("absolute inset-0 pointer-events-none", className), style: {
|
|
91
|
-
// Re-enable pointer events so we can track mouse within this layer.
|
|
92
|
-
// The layer itself is visually transparent to interaction.
|
|
93
|
-
pointerEvents: "auto",
|
|
94
|
-
...style,
|
|
95
|
-
}, onMouseMove: handleMouseMove, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, "aria-hidden": "true", ...props, children: jsx(motion.div, { className: "absolute pointer-events-none", style: {
|
|
96
|
-
width: size,
|
|
97
|
-
height: size,
|
|
98
|
-
borderRadius: "50%",
|
|
99
|
-
x,
|
|
100
|
-
y,
|
|
101
|
-
marginLeft: -halfSize,
|
|
102
|
-
marginTop: -halfSize,
|
|
103
|
-
background: `radial-gradient(circle at center, ${color}, transparent 70%)`,
|
|
104
|
-
opacity: isHovered ? intensity : 0,
|
|
105
|
-
transition: shouldReduceMotion
|
|
106
|
-
? "opacity 0s"
|
|
107
|
-
: "opacity 0.3s ease-in-out",
|
|
108
|
-
} }) }));
|
|
109
|
-
};
|
|
110
|
-
Spotlight.displayName = "Spotlight";
|
|
111
|
-
|
|
112
|
-
export { Spotlight };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface SpotlightProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* Diameter of the spotlight glow in pixels.
|
|
5
|
-
* @default 300
|
|
6
|
-
*/
|
|
7
|
-
size?: number;
|
|
8
|
-
/**
|
|
9
|
-
* Color of the spotlight glow.
|
|
10
|
-
* Accepts any valid CSS color value or CSS variable reference.
|
|
11
|
-
* @default "var(--color-primary)"
|
|
12
|
-
*/
|
|
13
|
-
color?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Peak opacity of the spotlight glow (0-1).
|
|
16
|
-
* @default 0.15
|
|
17
|
-
*/
|
|
18
|
-
intensity?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Spring animation configuration for the mouse-following behavior.
|
|
21
|
-
* @default { damping: 30, stiffness: 200 }
|
|
22
|
-
*/
|
|
23
|
-
springConfig?: {
|
|
24
|
-
damping?: number;
|
|
25
|
-
stiffness?: number;
|
|
26
|
-
};
|
|
27
|
-
/** Additional className for style overrides (shadcn pattern). */
|
|
28
|
-
className?: string;
|
|
29
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { SpotlightBorderProps } from "./SpotlightBorder.types";
|
|
3
|
-
/**
|
|
4
|
-
* SpotlightBorder Component
|
|
5
|
-
* Adds an interactive WebGL border effect around its children.
|
|
6
|
-
* The border illuminates near the mouse cursor and supports a soft outer glow.
|
|
7
|
-
* Refactored to handle larger canvas for external glow and prevent clipping of child shadows.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <SpotlightBorder color="#3b82f6" borderWidth={2} className="rounded-xl">
|
|
12
|
-
* <div className="p-6 bg-gray-900">
|
|
13
|
-
* <h3>Premium Card</h3>
|
|
14
|
-
* </div>
|
|
15
|
-
* </SpotlightBorder>
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare const SpotlightBorder: React.FC<SpotlightBorderProps>;
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useRef, useEffect } from 'react';
|
|
3
|
-
import { useReducedMotion } from 'motion/react';
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { cn } from '../../../utils/cn.js';
|
|
6
|
-
import { variationMap } from './SpotlightBorder.types.js';
|
|
7
|
-
import { fragmentShader, vertexShader } from './SpotlightBorder.shaders.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* SpotlightBorder Component
|
|
11
|
-
* Adds an interactive WebGL border effect around its children.
|
|
12
|
-
* The border illuminates near the mouse cursor and supports a soft outer glow.
|
|
13
|
-
* Refactored to handle larger canvas for external glow and prevent clipping of child shadows.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```tsx
|
|
17
|
-
* <SpotlightBorder color="#3b82f6" borderWidth={2} className="rounded-xl">
|
|
18
|
-
* <div className="p-6 bg-gray-900">
|
|
19
|
-
* <h3>Premium Card</h3>
|
|
20
|
-
* </div>
|
|
21
|
-
* </SpotlightBorder>
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
const SpotlightBorder = ({ children, variation = "rounded-rect", rounded, borderWidth = 2, color = "#ffffff", spotlightSize = 0.4, spotlightEdge = 0.5, glowExtent = 20, glowIntensity = 0.6, tiltIntensity = 5, shouldAnimate = true, className, style, ...props }) => {
|
|
25
|
-
const outerRef = useRef(null);
|
|
26
|
-
const containerRef = useRef(null);
|
|
27
|
-
// useReducedMotion is SSR-safe (returns null on server, actual value after hydration)
|
|
28
|
-
const prefersReducedMotion = useReducedMotion();
|
|
29
|
-
const isAnimating = shouldAnimate && !prefersReducedMotion;
|
|
30
|
-
// Refs to store THREE.js objects across effects
|
|
31
|
-
const rendererRef = useRef(null);
|
|
32
|
-
const sceneRef = useRef(null);
|
|
33
|
-
const cameraRef = useRef(null);
|
|
34
|
-
const materialRef = useRef(null);
|
|
35
|
-
const quadRef = useRef(null);
|
|
36
|
-
const geoRef = useRef(null);
|
|
37
|
-
const canvasRef = useRef(null);
|
|
38
|
-
// Refs for animation state
|
|
39
|
-
const vMouseRef = useRef(new THREE.Vector2(-1e4, -1e4));
|
|
40
|
-
const vMouseDampRef = useRef(new THREE.Vector2(-1e4, -1e4));
|
|
41
|
-
const vResolutionRef = useRef(new THREE.Vector2());
|
|
42
|
-
const vContentResolutionRef = useRef(new THREE.Vector2());
|
|
43
|
-
const vOffsetRef = useRef(new THREE.Vector2());
|
|
44
|
-
const rotateXDampRef = useRef(0);
|
|
45
|
-
const rotateYDampRef = useRef(0);
|
|
46
|
-
const wRef = useRef(1);
|
|
47
|
-
const hRef = useRef(1);
|
|
48
|
-
// One-time setup effect: creates renderer, scene, camera, geometry, material, mesh
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
var _a;
|
|
51
|
-
const outer = outerRef.current;
|
|
52
|
-
const container = containerRef.current;
|
|
53
|
-
if (!outer || !container || !isAnimating)
|
|
54
|
-
return;
|
|
55
|
-
const scene = new THREE.Scene();
|
|
56
|
-
const camera = new THREE.OrthographicCamera();
|
|
57
|
-
camera.position.z = 1;
|
|
58
|
-
const renderer = new THREE.WebGLRenderer({ alpha: true });
|
|
59
|
-
renderer.setClearColor(0x000000, 0);
|
|
60
|
-
const canvas = renderer.domElement;
|
|
61
|
-
canvas.style.position = "absolute";
|
|
62
|
-
canvas.style.pointerEvents = "none";
|
|
63
|
-
canvas.style.zIndex = "10";
|
|
64
|
-
outer.appendChild(canvas);
|
|
65
|
-
const geo = new THREE.PlaneGeometry(1, 1);
|
|
66
|
-
const material = new THREE.ShaderMaterial({
|
|
67
|
-
vertexShader,
|
|
68
|
-
fragmentShader,
|
|
69
|
-
uniforms: {
|
|
70
|
-
u_mouse: { value: vMouseDampRef.current },
|
|
71
|
-
u_resolution: { value: vResolutionRef.current },
|
|
72
|
-
u_contentResolution: { value: vContentResolutionRef.current },
|
|
73
|
-
u_offset: { value: vOffsetRef.current },
|
|
74
|
-
u_pixelRatio: { value: Math.min(window.devicePixelRatio || 1, 2) },
|
|
75
|
-
u_color: { value: new THREE.Color(color) },
|
|
76
|
-
u_shapeSize: { value: 1.0 },
|
|
77
|
-
u_roundness: { value: 0.0 },
|
|
78
|
-
u_borderSize: { value: 0.0 },
|
|
79
|
-
u_spotlightSize: { value: spotlightSize },
|
|
80
|
-
u_spotlightEdge: { value: spotlightEdge },
|
|
81
|
-
u_glowIntensity: { value: glowIntensity },
|
|
82
|
-
},
|
|
83
|
-
defines: { VAR: (_a = variationMap[variation]) !== null && _a !== void 0 ? _a : 0 },
|
|
84
|
-
transparent: true,
|
|
85
|
-
});
|
|
86
|
-
const quad = new THREE.Mesh(geo, material);
|
|
87
|
-
scene.add(quad);
|
|
88
|
-
// Store refs
|
|
89
|
-
rendererRef.current = renderer;
|
|
90
|
-
sceneRef.current = scene;
|
|
91
|
-
cameraRef.current = camera;
|
|
92
|
-
materialRef.current = material;
|
|
93
|
-
quadRef.current = quad;
|
|
94
|
-
geoRef.current = geo;
|
|
95
|
-
canvasRef.current = canvas;
|
|
96
|
-
let animationFrameId;
|
|
97
|
-
const onPointerMove = (e) => {
|
|
98
|
-
if (!container)
|
|
99
|
-
return;
|
|
100
|
-
const rect = container.getBoundingClientRect();
|
|
101
|
-
vMouseRef.current.set(e.clientX - rect.left, e.clientY - rect.top);
|
|
102
|
-
};
|
|
103
|
-
document.addEventListener("mousemove", onPointerMove);
|
|
104
|
-
document.addEventListener("pointermove", onPointerMove);
|
|
105
|
-
const borderRadiusPx = parseFloat(getComputedStyle(outer).borderRadius) || 0;
|
|
106
|
-
const resize = () => {
|
|
107
|
-
if (!container || !outer)
|
|
108
|
-
return;
|
|
109
|
-
const w = container.clientWidth;
|
|
110
|
-
const h = container.clientHeight;
|
|
111
|
-
wRef.current = w;
|
|
112
|
-
hRef.current = h;
|
|
113
|
-
const dpr = Math.min(window.devicePixelRatio || 1, 2);
|
|
114
|
-
const canvasW = w + glowExtent * 2;
|
|
115
|
-
const canvasH = h + glowExtent * 2;
|
|
116
|
-
renderer.setSize(canvasW, canvasH);
|
|
117
|
-
renderer.setPixelRatio(dpr);
|
|
118
|
-
canvas.style.top = `-${glowExtent}px`;
|
|
119
|
-
canvas.style.left = `-${glowExtent}px`;
|
|
120
|
-
canvas.style.width = `${canvasW}px`;
|
|
121
|
-
canvas.style.height = `${canvasH}px`;
|
|
122
|
-
camera.left = -canvasW / 2;
|
|
123
|
-
camera.right = canvasW / 2;
|
|
124
|
-
camera.top = canvasH / 2;
|
|
125
|
-
camera.bottom = -canvasH / 2;
|
|
126
|
-
camera.updateProjectionMatrix();
|
|
127
|
-
quad.scale.set(canvasW, canvasH, 1);
|
|
128
|
-
vResolutionRef.current.set(canvasW, canvasH).multiplyScalar(dpr);
|
|
129
|
-
vContentResolutionRef.current.set(w, h).multiplyScalar(dpr);
|
|
130
|
-
vOffsetRef.current.set(glowExtent, glowExtent).multiplyScalar(dpr);
|
|
131
|
-
material.uniforms.u_pixelRatio.value = dpr;
|
|
132
|
-
const shortestDim = Math.min(w, h);
|
|
133
|
-
const childEl = rounded ? null : container.firstElementChild;
|
|
134
|
-
const currentRadius = childEl
|
|
135
|
-
? parseFloat(getComputedStyle(childEl).borderRadius) || borderRadiusPx
|
|
136
|
-
: parseFloat(getComputedStyle(outer).borderRadius) || borderRadiusPx;
|
|
137
|
-
const normalizedRoundness = Math.min((currentRadius / shortestDim) * 2, 1);
|
|
138
|
-
material.uniforms.u_roundness.value = normalizedRoundness;
|
|
139
|
-
const normalizedBorderWidth = borderWidth / shortestDim;
|
|
140
|
-
material.uniforms.u_borderSize.value = normalizedBorderWidth;
|
|
141
|
-
};
|
|
142
|
-
resize();
|
|
143
|
-
window.addEventListener("resize", resize);
|
|
144
|
-
const ro = new ResizeObserver(() => resize());
|
|
145
|
-
ro.observe(container);
|
|
146
|
-
const animate = (now) => {
|
|
147
|
-
const vMouse = vMouseRef.current;
|
|
148
|
-
const vMouseDamp = vMouseDampRef.current;
|
|
149
|
-
const w = wRef.current;
|
|
150
|
-
const h = hRef.current;
|
|
151
|
-
vMouseDamp.x += (vMouse.x - vMouseDamp.x) * 0.1;
|
|
152
|
-
vMouseDamp.y += (vMouse.y - vMouseDamp.y) * 0.1;
|
|
153
|
-
if (tiltIntensity > 0 && outer && w > 0 && h > 0) {
|
|
154
|
-
const isInside = vMouseDamp.x >= 0 &&
|
|
155
|
-
vMouseDamp.x <= w &&
|
|
156
|
-
vMouseDamp.y >= 0 &&
|
|
157
|
-
vMouseDamp.y <= h;
|
|
158
|
-
let targetRotateX = 0;
|
|
159
|
-
let targetRotateY = 0;
|
|
160
|
-
if (isInside) {
|
|
161
|
-
const offsetX = vMouseDamp.x / w - 0.5;
|
|
162
|
-
const offsetY = vMouseDamp.y / h - 0.5;
|
|
163
|
-
targetRotateY = offsetX * tiltIntensity;
|
|
164
|
-
targetRotateX = -offsetY * tiltIntensity;
|
|
165
|
-
}
|
|
166
|
-
rotateXDampRef.current += (targetRotateX - rotateXDampRef.current) * 0.08;
|
|
167
|
-
rotateYDampRef.current += (targetRotateY - rotateYDampRef.current) * 0.08;
|
|
168
|
-
outer.style.transform = `perspective(1000px) rotateX(${rotateXDampRef.current}deg) rotateY(${rotateYDampRef.current}deg)`;
|
|
169
|
-
}
|
|
170
|
-
renderer.render(scene, camera);
|
|
171
|
-
animationFrameId = requestAnimationFrame(animate);
|
|
172
|
-
};
|
|
173
|
-
animationFrameId = requestAnimationFrame(animate);
|
|
174
|
-
return () => {
|
|
175
|
-
document.removeEventListener("mousemove", onPointerMove);
|
|
176
|
-
document.removeEventListener("pointermove", onPointerMove);
|
|
177
|
-
window.removeEventListener("resize", resize);
|
|
178
|
-
ro.disconnect();
|
|
179
|
-
cancelAnimationFrame(animationFrameId);
|
|
180
|
-
if (outer.contains(canvas)) {
|
|
181
|
-
outer.removeChild(canvas);
|
|
182
|
-
}
|
|
183
|
-
renderer.dispose();
|
|
184
|
-
geo.dispose();
|
|
185
|
-
material.dispose();
|
|
186
|
-
rendererRef.current = null;
|
|
187
|
-
sceneRef.current = null;
|
|
188
|
-
cameraRef.current = null;
|
|
189
|
-
materialRef.current = null;
|
|
190
|
-
quadRef.current = null;
|
|
191
|
-
geoRef.current = null;
|
|
192
|
-
canvasRef.current = null;
|
|
193
|
-
};
|
|
194
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
195
|
-
}, [isAnimating, variation]);
|
|
196
|
-
// Update shader uniforms when props change (without tearing down WebGL)
|
|
197
|
-
useEffect(() => {
|
|
198
|
-
const material = materialRef.current;
|
|
199
|
-
if (!material)
|
|
200
|
-
return;
|
|
201
|
-
material.uniforms.u_color.value.set(color);
|
|
202
|
-
material.uniforms.u_spotlightSize.value = spotlightSize;
|
|
203
|
-
material.uniforms.u_spotlightEdge.value = spotlightEdge;
|
|
204
|
-
material.uniforms.u_glowIntensity.value = glowIntensity;
|
|
205
|
-
}, [color, spotlightSize, spotlightEdge, glowIntensity]);
|
|
206
|
-
const containerStyle = {
|
|
207
|
-
...style,
|
|
208
|
-
...(rounded ? { borderRadius: rounded } : {}),
|
|
209
|
-
};
|
|
210
|
-
return (jsx("div", { ref: outerRef, className: cn("relative overflow-visible", className), style: containerStyle, ...props, children: jsx("div", { ref: containerRef, className: "relative w-full h-full", style: { borderRadius: "inherit", zIndex: 20 }, children: children }) }));
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
export { SpotlightBorder };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export type SpotlightBorderVariation = "rounded-rect" | "circle" | "circle-ring" | "triangle";
|
|
3
|
-
export declare const variationMap: Record<SpotlightBorderVariation, number>;
|
|
4
|
-
export interface SpotlightBorderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
/** Content to wrap with the effect */
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Shape variation for the border
|
|
9
|
-
* @default 'rounded-rect'
|
|
10
|
-
*/
|
|
11
|
-
variation?: SpotlightBorderVariation;
|
|
12
|
-
/**
|
|
13
|
-
* Border radius for the container (e.g., "1rem", "var(--button-radius)", "9999px")
|
|
14
|
-
* This controls both the container clip and the shader's corner roundness.
|
|
15
|
-
* @default undefined (inherits from className like rounded-lg)
|
|
16
|
-
*/
|
|
17
|
-
rounded?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Border/stroke width in pixels
|
|
20
|
-
* @default 2
|
|
21
|
-
*/
|
|
22
|
-
borderWidth?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Color of the border effect (hex color)
|
|
25
|
-
* @default '#ffffff'
|
|
26
|
-
*/
|
|
27
|
-
color?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Size of the mouse-following spotlight (0-1)
|
|
30
|
-
* @default 0.4
|
|
31
|
-
*/
|
|
32
|
-
spotlightSize?: number;
|
|
33
|
-
/**
|
|
34
|
-
* Edge softness of the spotlight (higher = softer falloff)
|
|
35
|
-
* @default 0.5
|
|
36
|
-
*/
|
|
37
|
-
spotlightEdge?: number;
|
|
38
|
-
/**
|
|
39
|
-
* Whether to animate the effect (respects prefers-reduced-motion)
|
|
40
|
-
* @default true
|
|
41
|
-
*/
|
|
42
|
-
shouldAnimate?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* How far the glow can spread outside the container in pixels.
|
|
45
|
-
* This also solves clipping issues with child shadows.
|
|
46
|
-
* @default 20
|
|
47
|
-
*/
|
|
48
|
-
glowExtent?: number;
|
|
49
|
-
/**
|
|
50
|
-
* Overall intensity of the glow halo (0-1)
|
|
51
|
-
* @default 0.6
|
|
52
|
-
*/
|
|
53
|
-
glowIntensity?: number;
|
|
54
|
-
/**
|
|
55
|
-
* Intensity of the 3D tilt effect based on mouse position (0 = disabled)
|
|
56
|
-
* @default 10
|
|
57
|
-
*/
|
|
58
|
-
tiltIntensity?: number;
|
|
59
|
-
/** Additional className for the container */
|
|
60
|
-
className?: string;
|
|
61
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StickyScrollProps } from './StickyScroll.types';
|
|
3
|
-
/**
|
|
4
|
-
* StickyScroll
|
|
5
|
-
*
|
|
6
|
-
* Creates an Apple-style sticky scroll experience where one column stays
|
|
7
|
-
* pinned while the other scrolls. As each scrolling section enters the
|
|
8
|
-
* viewport, the sticky content transitions to match.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <StickyScroll
|
|
13
|
-
* sections={[
|
|
14
|
-
* {
|
|
15
|
-
* id: 'design',
|
|
16
|
-
* title: 'Design System',
|
|
17
|
-
* description: 'Build consistent interfaces with a shared design language.',
|
|
18
|
-
* content: <img src="/design.png" alt="Design system" />,
|
|
19
|
-
* },
|
|
20
|
-
* {
|
|
21
|
-
* id: 'develop',
|
|
22
|
-
* title: 'Developer Experience',
|
|
23
|
-
* description: 'TypeScript-first components with full IntelliSense.',
|
|
24
|
-
* content: <img src="/develop.png" alt="Developer experience" />,
|
|
25
|
-
* },
|
|
26
|
-
* ]}
|
|
27
|
-
* />
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare const StickyScroll: React.ForwardRefExoticComponent<StickyScrollProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import React__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
3
|
-
import { useReducedMotion, AnimatePresence, motion } from 'motion/react';
|
|
4
|
-
import { cn } from '../../../utils/cn.js';
|
|
5
|
-
|
|
6
|
-
/* ------------------------------------------------------------------ */
|
|
7
|
-
/* Content transition variants */
|
|
8
|
-
/* ------------------------------------------------------------------ */
|
|
9
|
-
const contentVariants = {
|
|
10
|
-
enter: { opacity: 0, y: 12 },
|
|
11
|
-
center: {
|
|
12
|
-
opacity: 1,
|
|
13
|
-
y: 0,
|
|
14
|
-
transition: { duration: 0.35, ease: [0.25, 0.1, 0.25, 1] },
|
|
15
|
-
},
|
|
16
|
-
exit: {
|
|
17
|
-
opacity: 0,
|
|
18
|
-
y: -12,
|
|
19
|
-
transition: { duration: 0.25, ease: [0.25, 0.1, 0.25, 1] },
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
const reducedMotionVariants = {
|
|
23
|
-
enter: { opacity: 1, y: 0 },
|
|
24
|
-
center: { opacity: 1, y: 0 },
|
|
25
|
-
exit: { opacity: 1, y: 0 },
|
|
26
|
-
};
|
|
27
|
-
/* ------------------------------------------------------------------ */
|
|
28
|
-
/* Component */
|
|
29
|
-
/* ------------------------------------------------------------------ */
|
|
30
|
-
/**
|
|
31
|
-
* StickyScroll
|
|
32
|
-
*
|
|
33
|
-
* Creates an Apple-style sticky scroll experience where one column stays
|
|
34
|
-
* pinned while the other scrolls. As each scrolling section enters the
|
|
35
|
-
* viewport, the sticky content transitions to match.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```tsx
|
|
39
|
-
* <StickyScroll
|
|
40
|
-
* sections={[
|
|
41
|
-
* {
|
|
42
|
-
* id: 'design',
|
|
43
|
-
* title: 'Design System',
|
|
44
|
-
* description: 'Build consistent interfaces with a shared design language.',
|
|
45
|
-
* content: <img src="/design.png" alt="Design system" />,
|
|
46
|
-
* },
|
|
47
|
-
* {
|
|
48
|
-
* id: 'develop',
|
|
49
|
-
* title: 'Developer Experience',
|
|
50
|
-
* description: 'TypeScript-first components with full IntelliSense.',
|
|
51
|
-
* content: <img src="/develop.png" alt="Developer experience" />,
|
|
52
|
-
* },
|
|
53
|
-
* ]}
|
|
54
|
-
* />
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
const StickyScroll = React__default.forwardRef(({ sections, contentPosition = 'left', showProgress = true, className, ...props }, ref) => {
|
|
58
|
-
const shouldReduceMotion = useReducedMotion();
|
|
59
|
-
const [activeIndex, setActiveIndex] = useState(0);
|
|
60
|
-
const sectionRefs = useRef([]);
|
|
61
|
-
const containerRef = useRef(null);
|
|
62
|
-
// Set up Intersection Observer to track which section is in view.
|
|
63
|
-
const observerCallback = useCallback((entries) => {
|
|
64
|
-
for (const entry of entries) {
|
|
65
|
-
if (entry.isIntersecting) {
|
|
66
|
-
const index = sectionRefs.current.indexOf(entry.target);
|
|
67
|
-
if (index !== -1) {
|
|
68
|
-
setActiveIndex(index);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}, []);
|
|
73
|
-
useEffect(() => {
|
|
74
|
-
const observer = new IntersectionObserver(observerCallback, {
|
|
75
|
-
// Trigger when a section crosses the vertical center of the viewport.
|
|
76
|
-
rootMargin: '-35% 0px -35% 0px',
|
|
77
|
-
threshold: 0,
|
|
78
|
-
});
|
|
79
|
-
const currentRefs = sectionRefs.current;
|
|
80
|
-
for (const sectionRef of currentRefs) {
|
|
81
|
-
if (sectionRef)
|
|
82
|
-
observer.observe(sectionRef);
|
|
83
|
-
}
|
|
84
|
-
return () => {
|
|
85
|
-
for (const sectionRef of currentRefs) {
|
|
86
|
-
if (sectionRef)
|
|
87
|
-
observer.unobserve(sectionRef);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
}, [observerCallback, sections.length]);
|
|
91
|
-
const activeSection = sections[activeIndex];
|
|
92
|
-
const variants = shouldReduceMotion
|
|
93
|
-
? reducedMotionVariants
|
|
94
|
-
: contentVariants;
|
|
95
|
-
/* -------------------------------------------------------------- */
|
|
96
|
-
/* Sub-renders */
|
|
97
|
-
/* -------------------------------------------------------------- */
|
|
98
|
-
const stickyContent = (jsxs("div", { className: "sticky top-[20vh] flex h-[60vh] items-center justify-center", children: [showProgress && (jsx("div", { className: cn('absolute top-1/2 -translate-y-1/2 flex flex-col gap-2', contentPosition === 'left' ? 'right-0 mr-4' : 'left-0 ml-4'), children: sections.map((section, index) => (jsx("button", { type: "button", "aria-label": `Go to ${section.title}`, onClick: () => {
|
|
99
|
-
var _a;
|
|
100
|
-
(_a = sectionRefs.current[index]) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
101
|
-
behavior: shouldReduceMotion ? 'auto' : 'smooth',
|
|
102
|
-
block: 'center',
|
|
103
|
-
});
|
|
104
|
-
}, className: cn('h-2 w-2 rounded-full transition-all duration-300', index === activeIndex
|
|
105
|
-
? 'scale-125 bg-[var(--color-primary)]'
|
|
106
|
-
: 'bg-[var(--color-border)] hover:bg-[var(--color-text-muted)]') }, section.id))) })), jsx(AnimatePresence, { mode: "wait", children: jsx(motion.div, { variants: variants, initial: "enter", animate: "center", exit: "exit", className: "flex h-full w-full items-center justify-center", children: activeSection.content }, activeSection.id) })] }));
|
|
107
|
-
const scrollingSections = (jsx("div", { className: "flex flex-col", children: sections.map((section, index) => (jsxs("div", { ref: (el) => {
|
|
108
|
-
sectionRefs.current[index] = el;
|
|
109
|
-
}, className: "flex min-h-[60vh] flex-col justify-center py-16 lg:py-24", children: [jsx("h3", { className: cn('text-2xl font-semibold transition-colors duration-300 lg:text-3xl', index === activeIndex
|
|
110
|
-
? 'text-[var(--color-text-primary)]'
|
|
111
|
-
: 'text-[var(--color-text-muted)]'), children: section.title }), jsx("p", { className: cn('mt-4 max-w-lg text-lg leading-relaxed transition-colors duration-300 lg:text-xl', index === activeIndex
|
|
112
|
-
? 'text-[var(--color-text-secondary)]'
|
|
113
|
-
: 'text-[var(--color-text-placeholder)]'), children: section.description })] }, section.id))) }));
|
|
114
|
-
/* -------------------------------------------------------------- */
|
|
115
|
-
/* Layout */
|
|
116
|
-
/* -------------------------------------------------------------- */
|
|
117
|
-
const isContentLeft = contentPosition === 'left';
|
|
118
|
-
return (jsx("div", { ref: (node) => {
|
|
119
|
-
containerRef.current = node;
|
|
120
|
-
if (typeof ref === 'function')
|
|
121
|
-
ref(node);
|
|
122
|
-
else if (ref)
|
|
123
|
-
ref.current = node;
|
|
124
|
-
}, className: cn('relative grid grid-cols-1 gap-8 lg:grid-cols-2 lg:gap-16', className), ...props, children: isContentLeft ? (jsxs(Fragment, { children: [jsx("div", { className: "hidden lg:block", children: stickyContent }), scrollingSections] })) : (jsxs(Fragment, { children: [scrollingSections, jsx("div", { className: "hidden lg:block", children: stickyContent })] })) }));
|
|
125
|
-
});
|
|
126
|
-
StickyScroll.displayName = 'StickyScroll';
|
|
127
|
-
|
|
128
|
-
export { StickyScroll };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface StickyScrollSection {
|
|
2
|
-
/** Unique identifier for this section */
|
|
3
|
-
id: string;
|
|
4
|
-
/** Section title displayed in the scrolling column */
|
|
5
|
-
title: string;
|
|
6
|
-
/** Section description displayed in the scrolling column */
|
|
7
|
-
description: string;
|
|
8
|
-
/** The sticky content to show when this section is active */
|
|
9
|
-
content: React.ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export interface StickyScrollProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
-
/** Array of sections defining the scroll experience */
|
|
13
|
-
sections: StickyScrollSection[];
|
|
14
|
-
/** Which side the sticky content appears (default 'left') */
|
|
15
|
-
contentPosition?: 'left' | 'right';
|
|
16
|
-
/** Show progress dots (default true) */
|
|
17
|
-
showProgress?: boolean;
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|