@flikk/ui 1.0.0-beta.27 → 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.
Files changed (319) hide show
  1. package/dist/bg/1.webp +0 -0
  2. package/dist/bg/10.webp +0 -0
  3. package/dist/bg/11.webp +0 -0
  4. package/dist/bg/12.webp +0 -0
  5. package/dist/bg/13.webp +0 -0
  6. package/dist/bg/14.webp +0 -0
  7. package/dist/bg/15.webp +0 -0
  8. package/dist/bg/16.webp +0 -0
  9. package/dist/bg/17.webp +0 -0
  10. package/dist/bg/18.webp +0 -0
  11. package/dist/bg/19.webp +0 -0
  12. package/dist/bg/2.webp +0 -0
  13. package/dist/bg/20.webp +0 -0
  14. package/dist/bg/21.webp +0 -0
  15. package/dist/bg/22.webp +0 -0
  16. package/dist/bg/3.webp +0 -0
  17. package/dist/bg/4.webp +0 -0
  18. package/dist/bg/5.webp +0 -0
  19. package/dist/bg/6.webp +0 -0
  20. package/dist/bg/7.webp +0 -0
  21. package/dist/bg/8.webp +0 -0
  22. package/dist/bg/9.webp +0 -0
  23. package/dist/components/ai/CodeBlock/CodeBlock.theme.js +1 -1
  24. package/dist/components/ai/PromptInput/PromptInput.js +7 -143
  25. package/dist/components/ai/PromptInput/VoiceRecorder.js +0 -88
  26. package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
  27. package/dist/components/canvas/Background.d.ts +19 -0
  28. package/dist/components/canvas/Background.js +23 -0
  29. package/dist/components/canvas/BaseNode.d.ts +15 -0
  30. package/dist/components/canvas/BaseNode.js +20 -0
  31. package/dist/components/canvas/CanvasToolbar.d.ts +34 -0
  32. package/dist/components/canvas/CanvasToolbar.js +34 -0
  33. package/dist/components/canvas/Edge.d.ts +35 -0
  34. package/dist/components/canvas/Edge.js +97 -0
  35. package/dist/components/canvas/EdgeLayer.d.ts +18 -0
  36. package/dist/components/canvas/EdgeLayer.js +111 -0
  37. package/dist/components/canvas/Handle.d.ts +11 -0
  38. package/dist/components/canvas/Handle.js +63 -0
  39. package/dist/components/canvas/MiniMap.d.ts +22 -0
  40. package/dist/components/canvas/MiniMap.js +105 -0
  41. package/dist/components/canvas/NodeCanvas.d.ts +10 -0
  42. package/dist/components/canvas/NodeCanvas.js +477 -0
  43. package/dist/components/canvas/NodeCanvas.theme.d.ts +7 -0
  44. package/dist/components/canvas/NodeCanvas.theme.js +9 -0
  45. package/dist/components/canvas/NodeCanvas.types.d.ts +187 -0
  46. package/dist/components/canvas/NodeControls.d.ts +25 -0
  47. package/dist/components/canvas/NodeControls.js +40 -0
  48. package/dist/components/canvas/NodeRenderer.d.ts +19 -0
  49. package/dist/components/canvas/NodeRenderer.js +117 -0
  50. package/dist/components/canvas/changes.d.ts +11 -0
  51. package/dist/components/canvas/changes.js +76 -0
  52. package/dist/components/canvas/context/CanvasContext.d.ts +32 -0
  53. package/dist/components/canvas/context/CanvasContext.js +14 -0
  54. package/dist/components/canvas/context/ConnectionContext.d.ts +33 -0
  55. package/dist/components/canvas/context/ConnectionContext.js +13 -0
  56. package/dist/components/canvas/context/HandleRegistry.d.ts +24 -0
  57. package/dist/components/canvas/context/HandleRegistry.js +15 -0
  58. package/dist/components/canvas/context/InteractionContext.d.ts +18 -0
  59. package/dist/components/canvas/context/InteractionContext.js +14 -0
  60. package/dist/components/canvas/context/NodeIdContext.d.ts +3 -0
  61. package/dist/components/canvas/context/NodeIdContext.js +15 -0
  62. package/dist/components/canvas/hooks/useConnection.d.ts +17 -0
  63. package/dist/components/canvas/hooks/useConnection.js +29 -0
  64. package/dist/components/canvas/hooks/useMarquee.d.ts +25 -0
  65. package/dist/components/canvas/hooks/useMarquee.js +91 -0
  66. package/dist/components/canvas/hooks/useNodeDrag.d.ts +23 -0
  67. package/dist/components/canvas/hooks/useNodeDrag.js +110 -0
  68. package/dist/components/canvas/hooks/usePanZoom.d.ts +30 -0
  69. package/dist/components/canvas/hooks/usePanZoom.js +189 -0
  70. package/dist/components/canvas/hooks/useViewport.d.ts +21 -0
  71. package/dist/components/canvas/hooks/useViewport.js +35 -0
  72. package/dist/components/canvas/index.d.ts +14 -0
  73. package/dist/components/canvas/index.js +12 -0
  74. package/dist/components/canvas/layout.d.ts +22 -0
  75. package/dist/components/canvas/layout.js +67 -0
  76. package/dist/components/canvas/utils.d.ts +4 -0
  77. package/dist/components/canvas/utils.js +16 -0
  78. package/dist/components/charts/AreaChart/AreaChart.js +136 -101
  79. package/dist/components/charts/AreaChart/AreaChart.types.d.ts +5 -5
  80. package/dist/components/charts/AreaChart/AreaChart.types.js +1 -0
  81. package/dist/components/charts/BarChart/BarChart.js +207 -143
  82. package/dist/components/charts/BarChart/BarChart.types.d.ts +4 -4
  83. package/dist/components/charts/BarChart/BarChart.types.js +1 -0
  84. package/dist/components/charts/ComboChart/ComboChart.types.d.ts +2 -2
  85. package/dist/components/charts/LineChart/LineChart.js +88 -72
  86. package/dist/components/charts/LineChart/LineChart.types.d.ts +3 -3
  87. package/dist/components/charts/RadarChart/RadarChart.js +1 -1
  88. package/dist/components/charts/RadarChart/RadarChart.theme.js +5 -2
  89. package/dist/components/charts/ScatterPlot/ScatterPlot.js +62 -72
  90. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +10 -1
  91. package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +3 -9
  92. package/dist/components/charts/StackedBarChart/StackedBarChart.js +33 -33
  93. package/dist/components/charts/StackedBarChart/StackedBarChart.types.d.ts +2 -2
  94. package/dist/components/charts/hooks/index.d.ts +2 -0
  95. package/dist/components/charts/hooks/useChartDimensions.d.ts +29 -0
  96. package/dist/components/charts/hooks/useChartDimensions.js +42 -0
  97. package/dist/components/charts/shared/ChartTooltip/ChartTooltip.theme.js +1 -1
  98. package/dist/components/charts/types/chart.types.d.ts +11 -2
  99. package/dist/components/charts/types/chart.types.js +10 -3
  100. package/dist/components/core/Avatar/Avatar.js +5 -1
  101. package/dist/components/core/AvatarGroup/AvatarGroup.js +5 -1
  102. package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +4 -2
  103. package/dist/components/core/Badge/Badge.js +1 -1
  104. package/dist/components/core/Badge/Badge.theme.js +16 -15
  105. package/dist/components/core/Button/Button.js +1 -1
  106. package/dist/components/core/Button/Button.theme.js +2 -2
  107. package/dist/components/core/Calendar/Calendar.theme.js +1 -1
  108. package/dist/components/core/Card/Card.js +7 -3
  109. package/dist/components/core/Card/Card.theme.js +3 -3
  110. package/dist/components/core/Card/Card.types.d.ts +27 -2
  111. package/dist/components/core/CommandPalette/CommandPalette.theme.js +2 -2
  112. package/dist/components/core/ContextMenu/ContextMenu.theme.js +2 -2
  113. package/dist/components/core/ContextMenu/ContextMenuItem.js +1 -1
  114. package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +1 -1
  115. package/dist/components/core/Dropdown/Dropdown.theme.js +3 -3
  116. package/dist/components/core/Dropdown/DropdownMenu.js +57 -29
  117. package/dist/components/core/HeroCard/HeroCard.d.ts +5 -0
  118. package/dist/components/core/HeroCard/HeroCard.js +99 -0
  119. package/dist/components/core/HeroCard/HeroCard.theme.d.ts +3 -0
  120. package/dist/components/core/HeroCard/HeroCard.theme.js +8 -0
  121. package/dist/components/core/HeroCard/HeroCard.types.d.ts +70 -0
  122. package/dist/components/core/HeroCard/index.d.ts +4 -0
  123. package/dist/components/core/Kbd/Kbd.theme.js +1 -1
  124. package/dist/components/core/Modal/Modal.d.ts +1 -1
  125. package/dist/components/core/Modal/Modal.js +2 -7
  126. package/dist/components/core/Modal/Modal.theme.js +4 -8
  127. package/dist/components/core/Modal/Modal.types.d.ts +0 -10
  128. package/dist/components/core/Modal/index.d.ts +1 -1
  129. package/dist/components/core/ModalStack/ModalStack.d.ts +1 -1
  130. package/dist/components/core/ModalStack/ModalStack.types.d.ts +1 -2
  131. package/dist/components/core/ModalStack/ModalStackModal.d.ts +1 -1
  132. package/dist/components/core/ModalStack/ModalStackModal.js +2 -7
  133. package/dist/components/core/PageHeading/PageHeading.theme.js +2 -2
  134. package/dist/components/core/Popover/Popover.theme.js +1 -1
  135. package/dist/components/core/ScrollArea/ScrollArea.js +242 -4
  136. package/dist/components/core/ScrollArea/ScrollArea.types.d.ts +12 -1
  137. package/dist/components/core/ScrollArea/smooth/SmoothScrollEngine.d.ts +4 -0
  138. package/dist/components/core/ScrollArea/smooth/SmoothScrollEngine.js +23 -0
  139. package/dist/components/core/ScrollArea/smooth/useSmoothScroll.js +4 -0
  140. package/dist/components/core/ScrollArea/smooth/useSmoothScroll.types.d.ts +5 -0
  141. package/dist/components/core/Segmented/Segmented.theme.js +2 -2
  142. package/dist/components/core/Tooltip/Tooltip.theme.js +1 -1
  143. package/dist/components/core/index.d.ts +1 -0
  144. package/dist/components/core/index.js +2 -0
  145. package/dist/components/data-display/DescriptionList/DescriptionList.js +23 -7
  146. package/dist/components/data-display/DescriptionList/DescriptionList.theme.js +10 -3
  147. package/dist/components/data-display/DescriptionList/DescriptionList.types.d.ts +49 -10
  148. package/dist/components/data-display/DescriptionList/index.d.ts +1 -1
  149. package/dist/components/data-display/Feed/Feed.js +28 -5
  150. package/dist/components/data-display/Feed/Feed.theme.js +1 -1
  151. package/dist/components/data-display/Feed/Feed.types.d.ts +32 -1
  152. package/dist/components/data-display/Feed/index.d.ts +1 -1
  153. package/dist/components/data-display/Metric/Metric.js +8 -8
  154. package/dist/components/data-display/Metric/Metric.theme.d.ts +3 -2
  155. package/dist/components/data-display/Metric/Metric.theme.js +50 -68
  156. package/dist/components/data-display/Metric/Metric.types.d.ts +19 -21
  157. package/dist/components/data-display/Table/Table.js +2 -2
  158. package/dist/components/data-display/Table/Table.theme.js +24 -4
  159. package/dist/components/data-display/Table/Table.types.d.ts +8 -0
  160. package/dist/components/data-display/Table/TableBody.js +2 -2
  161. package/dist/components/data-display/Table/TableCell.js +1 -1
  162. package/dist/components/data-display/Table/TableRow.d.ts +1 -1
  163. package/dist/components/data-display/Table/TableRow.js +9 -2
  164. package/dist/components/data-display/Timeline/Timeline.js +27 -5
  165. package/dist/components/data-display/Timeline/Timeline.theme.d.ts +10 -2
  166. package/dist/components/data-display/Timeline/Timeline.theme.js +14 -8
  167. package/dist/components/data-display/Timeline/Timeline.types.d.ts +48 -16
  168. package/dist/components/data-display/Timeline/Timeline.utils.d.ts +6 -0
  169. package/dist/components/data-display/Timeline/Timeline.utils.js +11 -0
  170. package/dist/components/data-display/Timeline/TimelineItem.js +13 -20
  171. package/dist/components/data-display/Timeline/TimelineMarker.js +10 -8
  172. package/dist/components/data-display/Timeline/index.d.ts +2 -2
  173. package/dist/components/effects/3d/index.d.ts +0 -2
  174. package/dist/components/effects/3d/index.js +0 -1
  175. package/dist/components/effects/DotPattern/DotPattern.js +1 -1
  176. package/dist/components/effects/Overlay/Overlay.theme.js +1 -2
  177. package/dist/components/effects/Preloader/Preloader.animations.d.ts +23 -0
  178. package/dist/components/effects/Preloader/Preloader.animations.js +150 -0
  179. package/dist/components/effects/Preloader/Preloader.d.ts +3 -0
  180. package/dist/components/effects/Preloader/Preloader.js +119 -0
  181. package/dist/components/effects/Preloader/Preloader.types.d.ts +63 -0
  182. package/dist/components/effects/Preloader/index.d.ts +2 -0
  183. package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.js +25 -14
  184. package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.types.d.ts +2 -0
  185. package/dist/components/effects/TiltCard/TiltCard.d.ts +12 -0
  186. package/dist/components/effects/TiltCard/TiltCard.glow.d.ts +28 -0
  187. package/dist/components/effects/TiltCard/TiltCard.glow.js +114 -0
  188. package/dist/components/effects/TiltCard/TiltCard.js +177 -0
  189. package/dist/components/effects/{SpotlightBorder/SpotlightBorder.shaders.d.ts → TiltCard/TiltCard.shaders.d.ts} +1 -1
  190. package/dist/components/effects/{SpotlightBorder/SpotlightBorder.shaders.js → TiltCard/TiltCard.shaders.js} +1 -1
  191. package/dist/components/effects/TiltCard/TiltCard.types.d.ts +88 -0
  192. package/dist/components/effects/TiltCard/index.d.ts +2 -0
  193. package/dist/components/effects/index.d.ts +4 -12
  194. package/dist/components/effects/index.js +2 -6
  195. package/dist/components/forms/Checkbox/Checkbox.js +7 -1
  196. package/dist/components/forms/DatePicker/DatePicker.theme.js +2 -2
  197. package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +1 -1
  198. package/dist/components/forms/FileUpload/FileUpload.js +1 -89
  199. package/dist/components/forms/FormLabel/FormLabel.theme.js +1 -1
  200. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +2 -2
  201. package/dist/components/forms/Slider/Slider.theme.js +1 -1
  202. package/dist/components/forms/Switch/Switch.js +27 -15
  203. package/dist/components/forms/Switch/Switch.theme.d.ts +36 -6
  204. package/dist/components/forms/Switch/Switch.theme.js +33 -4
  205. package/dist/components/forms/Switch/Switch.types.d.ts +12 -2
  206. package/dist/components/forms/TimePicker/TimePicker.theme.js +1 -2
  207. package/dist/components/forms/TimePicker/TimePickerContent.js +1 -90
  208. package/dist/components/forms/forms.theme.js +1 -1
  209. package/dist/components/forms/index.d.ts +0 -4
  210. package/dist/components/forms/index.js +0 -92
  211. package/dist/components/generative/GenerativeView.d.ts +21 -0
  212. package/dist/components/generative/GenerativeView.js +116 -0
  213. package/dist/components/generative/actions.d.ts +26 -0
  214. package/dist/components/generative/actions.js +51 -0
  215. package/dist/components/generative/index.d.ts +11 -0
  216. package/dist/components/generative/index.js +9 -0
  217. package/dist/components/generative/registry.d.ts +43 -0
  218. package/dist/components/generative/registry.js +114 -0
  219. package/dist/components/generative/resolvers.d.ts +35 -0
  220. package/dist/components/generative/resolvers.js +93 -0
  221. package/dist/components/generative/schema.generated.d.ts +2 -0
  222. package/dist/components/generative/schema.generated.js +1639 -0
  223. package/dist/components/generative/schemaTypes.d.ts +30 -0
  224. package/dist/components/generative/streaming.d.ts +39 -0
  225. package/dist/components/generative/streaming.js +283 -0
  226. package/dist/components/generative/tools.d.ts +21 -0
  227. package/dist/components/generative/tools.js +54 -0
  228. package/dist/components/generative/types.d.ts +41 -0
  229. package/dist/components/generative/useGenerativeStream.d.ts +37 -0
  230. package/dist/components/generative/useGenerativeStream.js +36 -0
  231. package/dist/components/generative/validate.d.ts +24 -0
  232. package/dist/components/generative/validate.js +259 -0
  233. package/dist/components/layout/AppShell/AppShell.theme.js +2 -2
  234. package/dist/components/layout/FormLayout/FormLayout.js +1 -90
  235. package/dist/components/layout/Grid/Grid.d.ts +3 -0
  236. package/dist/components/layout/Grid/Grid.js +50 -0
  237. package/dist/components/layout/Grid/Grid.theme.d.ts +2 -0
  238. package/dist/components/layout/Grid/Grid.theme.js +35 -0
  239. package/dist/components/layout/Grid/Grid.types.d.ts +57 -0
  240. package/dist/components/layout/Grid/index.d.ts +3 -0
  241. package/dist/components/layout/Section/Section.d.ts +3 -0
  242. package/dist/components/layout/Section/Section.js +18 -0
  243. package/dist/components/layout/Section/Section.theme.d.ts +2 -0
  244. package/dist/components/layout/Section/Section.theme.js +10 -0
  245. package/dist/components/layout/Section/Section.types.d.ts +34 -0
  246. package/dist/components/layout/Section/index.d.ts +3 -0
  247. package/dist/components/layout/Stack/Stack.d.ts +3 -0
  248. package/dist/components/layout/Stack/Stack.js +19 -0
  249. package/dist/components/layout/Stack/Stack.theme.d.ts +2 -0
  250. package/dist/components/layout/Stack/Stack.theme.js +10 -0
  251. package/dist/components/layout/Stack/Stack.types.d.ts +39 -0
  252. package/dist/components/layout/Stack/index.d.ts +3 -0
  253. package/dist/components/layout/index.d.ts +3 -0
  254. package/dist/components/layout/index.js +6 -0
  255. package/dist/generative.schema.json +1637 -0
  256. package/dist/index.js +180 -180
  257. package/dist/registry.json +648 -464
  258. package/dist/styles.css +1 -1
  259. package/dist/tools.json +1731 -0
  260. package/package.json +17 -4
  261. package/src/global.scss +53 -101
  262. package/src/styles/theme.css +687 -493
  263. package/dist/bg/1.jpg +0 -0
  264. package/dist/bg/10.jpg +0 -0
  265. package/dist/bg/11.jpg +0 -0
  266. package/dist/bg/14.jpg +0 -0
  267. package/dist/bg/15.jpg +0 -0
  268. package/dist/bg/16.jpg +0 -0
  269. package/dist/bg/17.jpg +0 -0
  270. package/dist/bg/18.jpg +0 -0
  271. package/dist/bg/19.jpg +0 -0
  272. package/dist/bg/2.jpg +0 -0
  273. package/dist/bg/20.jpg +0 -0
  274. package/dist/bg/21.jpg +0 -0
  275. package/dist/bg/22.jpg +0 -0
  276. package/dist/bg/23.jpg +0 -0
  277. package/dist/bg/24.jpg +0 -0
  278. package/dist/bg/3.jpg +0 -0
  279. package/dist/bg/4.jpg +0 -0
  280. package/dist/bg/5.jpg +0 -0
  281. package/dist/bg/6.jpg +0 -0
  282. package/dist/bg/7.jpg +0 -0
  283. package/dist/bg/8.jpg +0 -0
  284. package/dist/bg/9.jpg +0 -0
  285. package/dist/components/effects/MorphingText/MorphingText.d.ts +0 -17
  286. package/dist/components/effects/MorphingText/MorphingText.js +0 -125
  287. package/dist/components/effects/MorphingText/MorphingText.types.d.ts +0 -18
  288. package/dist/components/effects/MorphingText/index.d.ts +0 -2
  289. package/dist/components/effects/PageTransition/PageTransition.animations.d.ts +0 -8
  290. package/dist/components/effects/PageTransition/PageTransition.animations.js +0 -53
  291. package/dist/components/effects/PageTransition/PageTransition.d.ts +0 -3
  292. package/dist/components/effects/PageTransition/PageTransition.js +0 -82
  293. package/dist/components/effects/PageTransition/PageTransition.types.d.ts +0 -15
  294. package/dist/components/effects/PageTransition/index.d.ts +0 -2
  295. package/dist/components/effects/ParallaxSection/ParallaxSection.d.ts +0 -26
  296. package/dist/components/effects/ParallaxSection/ParallaxSection.js +0 -71
  297. package/dist/components/effects/ParallaxSection/ParallaxSection.types.d.ts +0 -11
  298. package/dist/components/effects/ParallaxSection/index.d.ts +0 -2
  299. package/dist/components/effects/Spotlight/Spotlight.d.ts +0 -36
  300. package/dist/components/effects/Spotlight/Spotlight.js +0 -112
  301. package/dist/components/effects/Spotlight/Spotlight.types.d.ts +0 -29
  302. package/dist/components/effects/Spotlight/index.d.ts +0 -2
  303. package/dist/components/effects/SpotlightBorder/SpotlightBorder.d.ts +0 -18
  304. package/dist/components/effects/SpotlightBorder/SpotlightBorder.js +0 -213
  305. package/dist/components/effects/SpotlightBorder/SpotlightBorder.types.d.ts +0 -61
  306. package/dist/components/effects/SpotlightBorder/index.d.ts +0 -2
  307. package/dist/components/effects/StickyScroll/StickyScroll.d.ts +0 -30
  308. package/dist/components/effects/StickyScroll/StickyScroll.js +0 -128
  309. package/dist/components/effects/StickyScroll/StickyScroll.types.d.ts +0 -19
  310. package/dist/components/effects/StickyScroll/index.d.ts +0 -2
  311. package/dist/components/forms/CronInput/CronInput.d.ts +0 -3
  312. package/dist/components/forms/CronInput/CronInput.js +0 -113
  313. package/dist/components/forms/CronInput/CronInput.theme.d.ts +0 -6
  314. package/dist/components/forms/CronInput/CronInput.theme.js +0 -75
  315. package/dist/components/forms/CronInput/CronInput.types.d.ts +0 -109
  316. package/dist/components/forms/CronInput/CronInput.utils.d.ts +0 -67
  317. package/dist/components/forms/CronInput/CronInput.utils.js +0 -505
  318. package/dist/components/forms/CronInput/index.d.ts +0 -4
  319. /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,2 +0,0 @@
1
- export { Spotlight } from "./Spotlight";
2
- export type { SpotlightProps } from "./Spotlight.types";
@@ -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,2 +0,0 @@
1
- export { SpotlightBorder } from "./SpotlightBorder";
2
- export type { SpotlightBorderProps, SpotlightBorderVariation, } from "./SpotlightBorder.types";
@@ -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
- }
@@ -1,2 +0,0 @@
1
- export { StickyScroll } from './StickyScroll';
2
- export type { StickyScrollProps, StickyScrollSection, } from './StickyScroll.types';
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- import { CronInputProps } from "./CronInput.types";
3
- export declare const CronInput: React.ForwardRefExoticComponent<CronInputProps & React.RefAttributes<HTMLDivElement>>;