@vadimcomanescu/nadicode-design-system 2.0.6 → 2.0.8

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 (339) hide show
  1. package/.agents/skills/seed/SKILL.md +17 -8
  2. package/.agents/skills/seed/contract.md +5 -4
  3. package/.agents/skills/seed/intent-map.md +3 -3
  4. package/.agents/skills/seed/recipes/agents-chat.md +44 -20
  5. package/.agents/skills/seed/recipes/marketing-shell.md +10 -19
  6. package/.agents/skills/seed/recipes/navigation-shell.md +5 -5
  7. package/.agents/skills/seed/recipes/service-detail.md +1 -1
  8. package/.agents/skills/seed/references/blocks.md +30 -26
  9. package/.agents/skills/seed/references/brand-override.md +3 -1
  10. package/.agents/skills/seed/references/components.md +22 -2
  11. package/.agents/skills/seed/references/dashboard-patterns.md +12 -12
  12. package/.agents/skills/seed/references/nextjs.md +20 -80
  13. package/.agents/skills/seed/references/tokens.md +57 -248
  14. package/README.md +43 -215
  15. package/contracts/block-props-schemas.json +2186 -0
  16. package/contracts/component-props-schemas.json +8322 -0
  17. package/contracts/consumer-contract.json +178 -0
  18. package/contracts/consumer-intent-map.json +707 -0
  19. package/contracts/message-catalog-contract.json +820 -0
  20. package/contracts/page-kit-props-schemas.json +1894 -0
  21. package/contracts/public-surface-registry.json +6162 -0
  22. package/contracts/public-surface-registry.schema.json +227 -0
  23. package/contracts/release-governance-baseline.json +850 -0
  24. package/contracts/spec-manifest.json +46 -0
  25. package/css/tokens.css +300 -122
  26. package/dist/catalog.json +2166 -162
  27. package/dist/chunk-2BADJLMV.js +117 -0
  28. package/dist/chunk-35EX5FP5.js +106 -0
  29. package/dist/chunk-4IGBBIYW.js +47 -0
  30. package/dist/chunk-4WPZ6T7V.js +186 -0
  31. package/dist/chunk-5PZ4VR2D.js +142 -0
  32. package/dist/chunk-5UESKK6S.js +76 -0
  33. package/dist/chunk-7A2RXKGH.js +205 -0
  34. package/dist/{chunk-DF47R6LN.js → chunk-AWIG4QN6.js} +9 -9
  35. package/dist/chunk-AYWL4IYM.js +67 -0
  36. package/dist/chunk-C7WHMSF3.js +114 -0
  37. package/dist/{chunk-SV3KZ6CB.js → chunk-DSMGCFMJ.js} +7 -2
  38. package/dist/{chunk-4K3PATUT.js → chunk-EEL4RAPC.js} +13 -1
  39. package/dist/{chunk-ILIHQ2KZ.js → chunk-EK43W2Y6.js} +16 -10
  40. package/dist/chunk-FV2G6SAF.js +134 -0
  41. package/dist/chunk-FX23F33E.js +57 -0
  42. package/dist/chunk-GJPTPLCQ.js +52 -0
  43. package/dist/chunk-HJ3A2YNO.js +163 -0
  44. package/dist/chunk-HJZRSPWB.js +38 -0
  45. package/dist/chunk-HWHJ6IRQ.js +78 -0
  46. package/dist/chunk-HZERHGBT.js +77 -0
  47. package/dist/{chunk-AUSYEAIJ.js → chunk-I66XWYSS.js} +32 -8
  48. package/dist/chunk-IXQGKJU4.js +183 -0
  49. package/dist/chunk-JDJY4ABS.js +60 -0
  50. package/dist/chunk-K7NQ6ZAW.js +84 -0
  51. package/dist/chunk-KWILREVQ.js +147 -0
  52. package/dist/chunk-LCKLZ4XK.js +60 -0
  53. package/dist/{chunk-WI37ZYIF.js → chunk-M4XKO45H.js} +13 -1
  54. package/dist/chunk-NEHCPO53.js +44 -0
  55. package/dist/chunk-OJ7OO3QB.js +269 -0
  56. package/dist/{chunk-ZHTQF2KI.js → chunk-OSNTB6RY.js} +29 -22
  57. package/dist/{chunk-GMMPLZLC.js → chunk-PDSQC6VE.js} +1 -1
  58. package/dist/chunk-QIHA7S3A.js +36 -0
  59. package/dist/chunk-QQOWC53X.js +98 -0
  60. package/dist/chunk-RKQPU75I.js +126 -0
  61. package/dist/chunk-U4GYSYGN.js +120 -0
  62. package/dist/chunk-UGV45DH3.js +18 -0
  63. package/dist/chunk-VBZQ4DBE.js +52 -0
  64. package/dist/{chunk-LQLFA2EL.js → chunk-VDONTZZX.js} +2 -2
  65. package/dist/chunk-VEO56RH4.js +105 -0
  66. package/dist/chunk-VJ5VD4UT.js +91 -0
  67. package/dist/{chunk-RWNJ54CI.js → chunk-VN475YZS.js} +1 -1
  68. package/dist/chunk-VNNAL4A6.js +110 -0
  69. package/dist/chunk-VZCB4APK.js +94 -0
  70. package/dist/chunk-W7FXDRQJ.js +94 -0
  71. package/dist/{chunk-5I3FWRC5.js → chunk-WOYBVPXK.js} +10 -10
  72. package/dist/chunk-WST5NLLC.js +73 -0
  73. package/dist/chunk-X6VXWEDO.js +125 -0
  74. package/dist/chunk-XTASI4IY.js +60 -0
  75. package/dist/chunk-Z233ZQZE.js +33 -0
  76. package/dist/chunk-ZKLB5N3Q.js +110 -0
  77. package/dist/chunk-ZM2NODUK.js +39 -0
  78. package/dist/components/blocks/AccountLockedBlock.js +7 -57
  79. package/dist/components/blocks/ActivityFeedBlock.js +6 -39
  80. package/dist/components/blocks/AgentConversationBlock.d.ts +6 -1
  81. package/dist/components/blocks/AgentConversationBlock.js +45 -71
  82. package/dist/components/blocks/AgentRunOverviewBlock.js +1 -1
  83. package/dist/components/blocks/AgentWorkbenchBlock.d.ts +5 -1
  84. package/dist/components/blocks/AgentWorkbenchBlock.js +47 -46
  85. package/dist/components/blocks/AudioVisualizerBlock.d.ts +1 -1
  86. package/dist/components/blocks/AudioVisualizerBlock.js +2 -2
  87. package/dist/components/blocks/AuthLayout.js +2 -2
  88. package/dist/components/blocks/AuthSuccessBlock.js +5 -60
  89. package/dist/components/blocks/BannerBlock.js +38 -38
  90. package/dist/components/blocks/BarChartBlock.d.ts +1 -1
  91. package/dist/components/blocks/BarChartBlock.js +2 -2
  92. package/dist/components/blocks/CallToActionBlock.d.ts +1 -1
  93. package/dist/components/blocks/CallToActionBlock.js +7 -53
  94. package/dist/components/blocks/ChangelogBlock.js +45 -142
  95. package/dist/components/blocks/ChartBlock.js +38 -38
  96. package/dist/components/blocks/ChartCollectionBlock.js +3 -3
  97. package/dist/components/blocks/ChatLayout.d.ts +4 -1
  98. package/dist/components/blocks/ChatLayout.js +39 -39
  99. package/dist/components/blocks/CodeBlock.js +7 -60
  100. package/dist/components/blocks/ComparisonBlock.js +9 -94
  101. package/dist/components/blocks/ContactBlock.js +11 -120
  102. package/dist/components/blocks/CreateBlock.js +39 -39
  103. package/dist/components/blocks/DataGridBlock.js +40 -40
  104. package/dist/components/blocks/DirectoryBlock.js +43 -43
  105. package/dist/components/blocks/FAQBlock.js +44 -82
  106. package/dist/components/blocks/FeatureBlock.d.ts +10 -14
  107. package/dist/components/blocks/FeatureBlock.js +54 -196
  108. package/dist/components/blocks/FeatureGridBlock.d.ts +1 -1
  109. package/dist/components/blocks/FeatureGridBlock.js +2 -2
  110. package/dist/components/blocks/FooterBlock.d.ts +2 -2
  111. package/dist/components/blocks/FooterBlock.js +11 -67
  112. package/dist/components/blocks/GalleryBlock.js +38 -38
  113. package/dist/components/blocks/HeaderBlock.d.ts +2 -2
  114. package/dist/components/blocks/HeaderBlock.js +39 -39
  115. package/dist/components/blocks/HeatmapChartBlock.d.ts +1 -1
  116. package/dist/components/blocks/HeatmapChartBlock.js +1 -1
  117. package/dist/components/blocks/HeroBlock.d.ts +6 -3
  118. package/dist/components/blocks/HeroBlock.js +53 -236
  119. package/dist/components/blocks/HeroSectionBlock.d.ts +1 -1
  120. package/dist/components/blocks/HeroSectionBlock.js +59 -63
  121. package/dist/components/blocks/IntegrationsBlock.d.ts +1 -1
  122. package/dist/components/blocks/IntegrationsBlock.js +42 -42
  123. package/dist/components/blocks/InteractiveAreaChartBlock.d.ts +1 -1
  124. package/dist/components/blocks/InteractiveAreaChartBlock.js +40 -40
  125. package/dist/components/blocks/KanbanDemoBlock.js +3 -3
  126. package/dist/components/blocks/LoginBlock.js +2 -2
  127. package/dist/components/blocks/LogoCloud.js +2 -13
  128. package/dist/components/blocks/NavUser.js +42 -42
  129. package/dist/components/blocks/NewsletterBlock.js +11 -84
  130. package/dist/components/blocks/NotFoundBlock.js +41 -41
  131. package/dist/components/blocks/OnboardingBlock.js +38 -38
  132. package/dist/components/blocks/PasswordRecoveryBlock.js +14 -142
  133. package/dist/components/blocks/PricingBlock.d.ts +1 -1
  134. package/dist/components/blocks/PricingBlock.js +13 -112
  135. package/dist/components/blocks/ProcessFlowBlock.js +10 -77
  136. package/dist/components/blocks/ResetPasswordBlock.js +11 -125
  137. package/dist/components/blocks/SettingsLayout.js +42 -42
  138. package/dist/components/blocks/SignUpBlock.d.ts +1 -1
  139. package/dist/components/blocks/SignUpBlock.js +3 -3
  140. package/dist/components/blocks/SocialProofBlock.d.ts +7 -11
  141. package/dist/components/blocks/SocialProofBlock.js +10 -108
  142. package/dist/components/blocks/StatsBlock.d.ts +1 -1
  143. package/dist/components/blocks/StatsBlock.js +40 -40
  144. package/dist/components/blocks/StatsMarketingBlock.d.ts +1 -1
  145. package/dist/components/blocks/StatsMarketingBlock.js +7 -38
  146. package/dist/components/blocks/TeamBlock.d.ts +1 -1
  147. package/dist/components/blocks/TeamBlock.js +4 -52
  148. package/dist/components/blocks/TestimonialsBlock.d.ts +1 -1
  149. package/dist/components/blocks/TestimonialsBlock.js +5 -133
  150. package/dist/components/blocks/TwoFactorChallengeBlock.js +46 -131
  151. package/dist/components/blocks/TwoFactorSetupBlock.js +53 -220
  152. package/dist/components/blocks/UsageDonutBlock.d.ts +1 -1
  153. package/dist/components/blocks/UsageDonutBlock.js +2 -2
  154. package/dist/components/blocks/VoiceAgentCard.d.ts +3 -1
  155. package/dist/components/blocks/VoiceAgentCard.js +7 -76
  156. package/dist/components/blocks/WizardBlock.js +39 -39
  157. package/dist/components/blocks/user/InviteUserModal.js +38 -38
  158. package/dist/components/logos/index.js +2 -2
  159. package/dist/components/page-kits/AccountLockedPageKit.d.ts +10 -0
  160. package/dist/components/page-kits/AccountLockedPageKit.js +48 -0
  161. package/dist/components/page-kits/AgentsChatPageKit.d.ts +46 -0
  162. package/dist/components/page-kits/AgentsChatPageKit.js +290 -0
  163. package/dist/components/page-kits/AnalyticsPageKit.d.ts +49 -0
  164. package/dist/components/page-kits/AnalyticsPageKit.js +277 -0
  165. package/dist/components/page-kits/BlogContentPageKit.d.ts +64 -0
  166. package/dist/components/page-kits/BlogContentPageKit.js +296 -0
  167. package/dist/components/page-kits/CheckoutPageKit.d.ts +36 -0
  168. package/dist/components/page-kits/CheckoutPageKit.js +209 -0
  169. package/dist/components/page-kits/CompanySuitePageKit.d.ts +25 -0
  170. package/dist/components/page-kits/CompanySuitePageKit.js +240 -0
  171. package/dist/components/page-kits/CrudFormPageKit.d.ts +54 -0
  172. package/dist/components/page-kits/CrudFormPageKit.js +138 -0
  173. package/dist/components/page-kits/CrudListDetailPageKit.d.ts +70 -0
  174. package/dist/components/page-kits/CrudListDetailPageKit.js +138 -0
  175. package/dist/components/page-kits/DashboardPageKit.d.ts +39 -0
  176. package/dist/components/page-kits/DashboardPageKit.js +284 -0
  177. package/dist/components/page-kits/ErrorPageKit.d.ts +22 -0
  178. package/dist/components/page-kits/ErrorPageKit.js +55 -0
  179. package/dist/components/page-kits/KanbanBoardPageKit.d.ts +31 -0
  180. package/dist/components/page-kits/KanbanBoardPageKit.js +305 -0
  181. package/dist/components/page-kits/LandingPageKit.d.ts +29 -0
  182. package/dist/components/page-kits/LandingPageKit.js +222 -0
  183. package/dist/components/page-kits/LoginPageKit.d.ts +16 -0
  184. package/dist/components/page-kits/LoginPageKit.js +43 -0
  185. package/dist/components/page-kits/MarketingShellPageKit.d.ts +21 -0
  186. package/dist/components/page-kits/MarketingShellPageKit.js +131 -0
  187. package/dist/components/page-kits/NavigationShellPageKit.d.ts +41 -0
  188. package/dist/components/page-kits/NavigationShellPageKit.js +132 -0
  189. package/dist/components/page-kits/OnboardingPageKit.d.ts +26 -0
  190. package/dist/components/page-kits/OnboardingPageKit.js +248 -0
  191. package/dist/components/page-kits/PricingPageKit.d.ts +41 -0
  192. package/dist/components/page-kits/PricingPageKit.js +279 -0
  193. package/dist/components/page-kits/ProfileSettingsPageKit.d.ts +50 -0
  194. package/dist/components/page-kits/ProfileSettingsPageKit.js +171 -0
  195. package/dist/components/page-kits/RecoveryPageKit.d.ts +17 -0
  196. package/dist/components/page-kits/RecoveryPageKit.js +58 -0
  197. package/dist/components/page-kits/ResetPageKit.d.ts +14 -0
  198. package/dist/components/page-kits/ResetPageKit.js +52 -0
  199. package/dist/components/page-kits/ServiceSuitePageKit.d.ts +25 -0
  200. package/dist/components/page-kits/ServiceSuitePageKit.js +321 -0
  201. package/dist/components/page-kits/SettingsPageKit.d.ts +27 -0
  202. package/dist/components/page-kits/SettingsPageKit.js +11 -0
  203. package/dist/components/page-kits/SignupPageKit.d.ts +15 -0
  204. package/dist/components/page-kits/SignupPageKit.js +41 -0
  205. package/dist/components/page-kits/SuccessPageKit.d.ts +15 -0
  206. package/dist/components/page-kits/SuccessPageKit.js +146 -0
  207. package/dist/components/page-kits/TeamSettingsPageKit.d.ts +50 -0
  208. package/dist/components/page-kits/TeamSettingsPageKit.js +297 -0
  209. package/dist/components/page-kits/TwoFactorPageKit.d.ts +16 -0
  210. package/dist/components/page-kits/TwoFactorPageKit.js +156 -0
  211. package/dist/components/page-kits/VerifyEmailPageKit.d.ts +15 -0
  212. package/dist/components/page-kits/VerifyEmailPageKit.js +146 -0
  213. package/dist/components/page-kits/VoiceAgentsPageKit.d.ts +35 -0
  214. package/dist/components/page-kits/VoiceAgentsPageKit.js +250 -0
  215. package/dist/components/ui/Accordion.js +38 -38
  216. package/dist/components/ui/AgentMessageBubble.d.ts +20 -4
  217. package/dist/components/ui/AgentMessageBubble.js +39 -39
  218. package/dist/components/ui/AgentStatus.d.ts +1 -1
  219. package/dist/components/ui/AgentStatus.js +5 -10
  220. package/dist/components/ui/AgentTerminal.d.ts +4 -1
  221. package/dist/components/ui/AgentTerminal.js +3 -1
  222. package/dist/components/ui/AgentTimeline.d.ts +2 -2
  223. package/dist/components/ui/AgentTimeline.js +15 -6
  224. package/dist/components/ui/AnimatedDialog.js +38 -38
  225. package/dist/components/ui/AnimatedSheet.js +38 -38
  226. package/dist/components/ui/ApprovalCard.js +1 -1
  227. package/dist/components/ui/AudioWaveform.js +2 -76
  228. package/dist/components/ui/AvatarUpload.js +1 -1
  229. package/dist/components/ui/Breadcrumb.js +41 -143
  230. package/dist/components/ui/Calendar.js +38 -38
  231. package/dist/components/ui/Carousel.js +38 -38
  232. package/dist/components/ui/ChartCard.js +5 -38
  233. package/dist/components/ui/ChatActions.d.ts +14 -0
  234. package/dist/components/ui/ChatActions.js +52 -0
  235. package/dist/components/ui/ChatBranch.d.ts +18 -0
  236. package/dist/components/ui/ChatBranch.js +84 -0
  237. package/dist/components/ui/ChatChainOfThought.d.ts +25 -0
  238. package/dist/components/ui/ChatChainOfThought.js +99 -0
  239. package/dist/components/ui/ChatConfirmation.d.ts +37 -0
  240. package/dist/components/ui/ChatConfirmation.js +115 -0
  241. package/dist/components/ui/ChatGreeting.d.ts +18 -0
  242. package/dist/components/ui/ChatGreeting.js +80 -0
  243. package/dist/components/ui/ChatMessage.d.ts +40 -0
  244. package/dist/components/ui/ChatMessage.js +96 -0
  245. package/dist/components/ui/ChatPlan.d.ts +29 -0
  246. package/dist/components/ui/ChatPlan.js +86 -0
  247. package/dist/components/ui/ChatPromptInput.d.ts +32 -0
  248. package/dist/components/ui/ChatPromptInput.js +193 -0
  249. package/dist/components/ui/ChatPromptInputAttachments.d.ts +9 -0
  250. package/dist/components/ui/ChatPromptInputAttachments.js +145 -0
  251. package/dist/components/ui/ChatQueue.d.ts +32 -0
  252. package/dist/components/ui/ChatQueue.js +93 -0
  253. package/dist/components/ui/ChatReasoning.d.ts +20 -0
  254. package/dist/components/ui/ChatReasoning.js +91 -0
  255. package/dist/components/ui/ChatResponse.d.ts +14 -0
  256. package/dist/components/ui/ChatResponse.js +25 -0
  257. package/dist/components/ui/ChatShimmer.d.ts +23 -0
  258. package/dist/components/ui/ChatShimmer.js +6 -0
  259. package/dist/components/ui/ChatSources.d.ts +30 -0
  260. package/dist/components/ui/ChatSources.js +113 -0
  261. package/dist/components/ui/ChatSuggestion.d.ts +13 -0
  262. package/dist/components/ui/ChatSuggestion.js +41 -0
  263. package/dist/components/ui/ChatThinkingMessage.d.ts +12 -0
  264. package/dist/components/ui/ChatThinkingMessage.js +55 -0
  265. package/dist/components/ui/ChatToolCall.d.ts +41 -0
  266. package/dist/components/ui/ChatToolCall.js +192 -0
  267. package/dist/components/ui/CheckStatus.d.ts +1 -1
  268. package/dist/components/ui/Checkbox.js +38 -38
  269. package/dist/components/ui/CheckoutForm.js +38 -38
  270. package/dist/components/ui/CheckoutFormDemo.js +43 -44
  271. package/dist/components/ui/Combobox.js +38 -38
  272. package/dist/components/ui/Command.js +38 -38
  273. package/dist/components/ui/ContextMenu.js +38 -38
  274. package/dist/components/ui/Conversation.d.ts +21 -0
  275. package/dist/components/ui/Conversation.js +196 -0
  276. package/dist/components/ui/ConversationThread.d.ts +8 -2
  277. package/dist/components/ui/ConversationThread.js +34 -16
  278. package/dist/components/ui/DataFreshness.js +2 -73
  279. package/dist/components/ui/DataTable.js +40 -40
  280. package/dist/components/ui/DatePicker.js +38 -38
  281. package/dist/components/ui/DateRangePicker.js +38 -38
  282. package/dist/components/ui/Dialog.js +38 -38
  283. package/dist/components/ui/DropdownMenu.js +39 -39
  284. package/dist/components/ui/FileUpload.js +38 -38
  285. package/dist/components/ui/InputOTP.js +38 -38
  286. package/dist/components/ui/KanbanBoard.js +2 -2
  287. package/dist/components/ui/LanguageSwitcher.js +38 -38
  288. package/dist/components/ui/Menubar.js +38 -38
  289. package/dist/components/ui/MouseEffect.js +1 -1
  290. package/dist/components/ui/NativeSelect.js +2 -18
  291. package/dist/components/ui/NavigationMenu.js +38 -38
  292. package/dist/components/ui/NotificationCenter.js +38 -38
  293. package/dist/components/ui/Pagination.js +42 -153
  294. package/dist/components/ui/RadioGroup.js +38 -38
  295. package/dist/components/ui/Resizable.js +38 -38
  296. package/dist/components/ui/SearchCommand.js +38 -38
  297. package/dist/components/ui/Select.js +38 -38
  298. package/dist/components/ui/SettingsModal.js +38 -38
  299. package/dist/components/ui/ShaderBackground.js +2 -2
  300. package/dist/components/ui/Sheet.js +38 -38
  301. package/dist/components/ui/Sidebar.js +41 -41
  302. package/dist/components/ui/StyleToggle.js +1 -1
  303. package/dist/components/ui/TagInput.js +38 -38
  304. package/dist/components/ui/ThemeToggle.js +39 -39
  305. package/dist/components/ui/ThinkingIndicator.d.ts +3 -1
  306. package/dist/components/ui/ThinkingIndicator.js +2 -1
  307. package/dist/components/ui/Toast.js +38 -38
  308. package/dist/components/ui/Toaster.js +38 -38
  309. package/dist/components/ui/ToolCallCard.d.ts +1 -1
  310. package/dist/components/ui/ToolCallCard.js +5 -1
  311. package/dist/components/ui/TreeView.js +38 -38
  312. package/dist/components/ui/charts/index.js +1 -1
  313. package/dist/components/ui/icons/index.js +38 -38
  314. package/dist/components/ui/text-effects/index.js +2 -2
  315. package/dist/hooks/use-scroll-to-bottom.d.ts +13 -0
  316. package/dist/hooks/use-scroll-to-bottom.js +2 -0
  317. package/dist/hooks/use-shader-preset.js +2 -2
  318. package/dist/index.js +43 -43
  319. package/dist/internal/local-image-assets.d.ts +12 -0
  320. package/dist/lib/shader-presets.js +1 -1
  321. package/dist/lib/tokens.config.d.ts +19 -0
  322. package/dist/messages/en.js +1 -1
  323. package/dist/messages/it.js +1 -1
  324. package/dist/test/PublicSeedTestProvider.js +2 -2
  325. package/dist/test/simulate-ime-composition.d.ts +54 -0
  326. package/dist/test/simulate-ime-composition.js +55 -0
  327. package/eslint-rules/nadicode/config.js +2 -0
  328. package/eslint-rules/nadicode/index.js +4 -0
  329. package/eslint-rules/nadicode/rules/no-deprecated-ds-import.js +77 -0
  330. package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +99 -0
  331. package/eslint-rules/nadicode/rules/no-unregistered-glass.js +2 -0
  332. package/package.json +895 -686
  333. package/scripts/ds-check.mjs +102 -73
  334. package/src/lib/tokens.config.js +63 -41
  335. package/dist/chunk-MLUSJTS2.js +0 -107
  336. package/dist/{chunk-5DKCZWC6.js → chunk-CQEUNASC.js} +1 -1
  337. package/dist/{chunk-4HRVRW2X.js → chunk-J2DCQDXO.js} +2 -2
  338. package/dist/{chunk-6MFAZU4B.js → chunk-RGE5OQMZ.js} +1 -1
  339. package/dist/{chunk-PJNHVPHF.js → chunk-TYP2MR3Q.js} +1 -1
@@ -0,0 +1,126 @@
1
+ import { Typography } from './chunk-N53OMWW2.js';
2
+ import { Heading } from './chunk-WI547C47.js';
3
+ import { Empty, EmptyTitle, EmptyDescription } from './chunk-55HD4L6G.js';
4
+ import { Card, CardHeader, CardTitle, CardContent } from './chunk-AH6YSYYT.js';
5
+ import { Button } from './chunk-7KIDDF3I.js';
6
+ import { Badge } from './chunk-S4JAHKOP.js';
7
+ import { cn } from './chunk-QYZT24TS.js';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
+
10
+ function resolveActiveSection(sections, activeSectionId) {
11
+ const directMatch = sections.find((section) => section.id === activeSectionId && section.isAvailable !== false);
12
+ if (directMatch) {
13
+ return directMatch;
14
+ }
15
+ const firstAvailable = sections.find((section) => section.isAvailable !== false);
16
+ if (firstAvailable) {
17
+ return firstAvailable;
18
+ }
19
+ return sections[0] ?? null;
20
+ }
21
+ function SettingsPageKit({
22
+ title = "Settings",
23
+ description = "Manage account, workspace, and preference sections with explicit save-state contracts.",
24
+ sections,
25
+ activeSectionId,
26
+ onSectionChange,
27
+ renderSection,
28
+ saveState = "default",
29
+ validationMessage,
30
+ fatalErrorMessage,
31
+ savedMessage = "Changes saved successfully.",
32
+ onSave,
33
+ onDiscard,
34
+ saveLabel = "Save changes",
35
+ discardLabel = "Discard",
36
+ className
37
+ }) {
38
+ const activeSection = resolveActiveSection(sections, activeSectionId);
39
+ const showActions = Boolean(onSave || onDiscard);
40
+ return /* @__PURE__ */ jsxs("section", { className: cn("space-y-6", className), children: [
41
+ /* @__PURE__ */ jsxs("header", { className: "space-y-2", children: [
42
+ /* @__PURE__ */ jsx(Heading, { level: 3, children: title }),
43
+ /* @__PURE__ */ jsx(Typography, { variant: "muted", children: description })
44
+ ] }),
45
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-6 lg:grid-cols-[280px_1fr]", children: [
46
+ /* @__PURE__ */ jsx("aside", { "aria-label": "Settings sections", className: "space-y-3", children: /* @__PURE__ */ jsxs(Card, { children: [
47
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Sections" }) }),
48
+ /* @__PURE__ */ jsx(CardContent, { className: "space-y-2", children: sections.map((section) => {
49
+ const isUnavailable = section.isAvailable === false;
50
+ const isActive = activeSection?.id === section.id;
51
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
52
+ /* @__PURE__ */ jsx(
53
+ Button,
54
+ {
55
+ variant: isActive ? "secondary" : "ghost",
56
+ className: "w-full justify-start",
57
+ "aria-pressed": isActive,
58
+ disabled: isUnavailable,
59
+ onClick: () => {
60
+ if (!isUnavailable && section.id !== activeSection?.id) {
61
+ onSectionChange?.(section.id);
62
+ }
63
+ },
64
+ children: section.label
65
+ }
66
+ ),
67
+ isUnavailable && section.unavailableReason ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "px-2 text-text-tertiary", children: section.unavailableReason }) : null
68
+ ] }, section.id);
69
+ }) })
70
+ ] }) }),
71
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
72
+ saveState === "loading" ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Loading settings content" }) : null,
73
+ saveState === "dirty" ? /* @__PURE__ */ jsx(Badge, { variant: "outline", children: "Unsaved changes" }) : null,
74
+ saveState === "saving" ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: "Saving changes\u2026" }) : null,
75
+ saveState === "saved" ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-success", children: savedMessage }) : null,
76
+ saveState === "validation-error" ? /* @__PURE__ */ jsx(
77
+ "div",
78
+ {
79
+ role: "alert",
80
+ className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
81
+ children: validationMessage ?? "Please resolve validation errors before saving."
82
+ }
83
+ ) : null,
84
+ saveState === "fatal-error" ? /* @__PURE__ */ jsx(
85
+ "div",
86
+ {
87
+ role: "alert",
88
+ className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
89
+ children: fatalErrorMessage ?? "Settings failed to load. Retry or contact support."
90
+ }
91
+ ) : null,
92
+ /* @__PURE__ */ jsxs(Card, { children: [
93
+ /* @__PURE__ */ jsxs(CardHeader, { children: [
94
+ /* @__PURE__ */ jsx(CardTitle, { children: activeSection?.label ?? "Settings section" }),
95
+ activeSection?.description ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: activeSection.description }) : null
96
+ ] }),
97
+ /* @__PURE__ */ jsx(CardContent, { children: activeSection ? renderSection(activeSection) : /* @__PURE__ */ jsxs(Empty, { children: [
98
+ /* @__PURE__ */ jsx(EmptyTitle, { children: "No settings sections" }),
99
+ /* @__PURE__ */ jsx(EmptyDescription, { children: "Add at least one section to render settings content." })
100
+ ] }) })
101
+ ] }),
102
+ showActions ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap justify-end gap-2", children: [
103
+ onDiscard ? /* @__PURE__ */ jsx(
104
+ Button,
105
+ {
106
+ variant: "ghost",
107
+ onClick: onDiscard,
108
+ disabled: saveState === "saving" || saveState === "loading",
109
+ children: discardLabel
110
+ }
111
+ ) : null,
112
+ onSave ? /* @__PURE__ */ jsx(
113
+ Button,
114
+ {
115
+ onClick: onSave,
116
+ disabled: saveState === "saving" || saveState === "loading",
117
+ children: saveLabel
118
+ }
119
+ ) : null
120
+ ] }) : null
121
+ ] })
122
+ ] })
123
+ ] });
124
+ }
125
+
126
+ export { SettingsPageKit };
@@ -0,0 +1,120 @@
1
+ import { useSafeTimeout } from './chunk-MDAYDDTC.js';
2
+ import { Typography } from './chunk-N53OMWW2.js';
3
+ import { Textarea } from './chunk-4OBE2FS2.js';
4
+ import { Spinner } from './chunk-ZLSWCV55.js';
5
+ import { Heading } from './chunk-WI547C47.js';
6
+ import { Field, FieldLabel, FieldContent } from './chunk-RX5EUODB.js';
7
+ import { Input } from './chunk-AP3XXYAY.js';
8
+ import { Button } from './chunk-7KIDDF3I.js';
9
+ import { CheckIcon } from './chunk-CXACRCZ4.js';
10
+ import { cn } from './chunk-QYZT24TS.js';
11
+ import { useState } from 'react';
12
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
+
14
+ function ContactBlock({
15
+ onSubmit,
16
+ title = "Get in touch",
17
+ description = "Have a question or want to work together? Drop us a message.",
18
+ className,
19
+ namePlaceholder = "Your name",
20
+ emailPlaceholder = "you@example.com",
21
+ messagePlaceholder = "Tell us what you need...",
22
+ successTitle = "Message sent",
23
+ submitLabel = "Send message"
24
+ }) {
25
+ const [name, setName] = useState("");
26
+ const [email, setEmail] = useState("");
27
+ const [message, setMessage] = useState("");
28
+ const [status, setStatus] = useState("idle");
29
+ const setSafeTimeout = useSafeTimeout();
30
+ const handleSubmit = async (e) => {
31
+ e.preventDefault();
32
+ if (!name.trim() || !email.trim() || !message.trim()) return;
33
+ setStatus("loading");
34
+ try {
35
+ await onSubmit?.({ name, email, message });
36
+ } catch {
37
+ }
38
+ setSafeTimeout(() => {
39
+ setStatus("success");
40
+ setSafeTimeout(() => {
41
+ setStatus("idle");
42
+ setName("");
43
+ setEmail("");
44
+ setMessage("");
45
+ }, 2e3);
46
+ }, 800);
47
+ };
48
+ return /* @__PURE__ */ jsx("section", { className: cn("py-16 md:py-24", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-lg px-6", children: [
49
+ /* @__PURE__ */ jsxs("div", { className: "mb-8 text-center", children: [
50
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "text-text-primary", children: title }),
51
+ /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-text-secondary", children: description })
52
+ ] }),
53
+ /* @__PURE__ */ jsx("div", { className: "glass-panel rounded-xl border border-border/50 p-6 sm:p-8", children: status === "success" ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4 py-8 text-center", children: [
54
+ /* @__PURE__ */ jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-success/10 text-success", children: /* @__PURE__ */ jsx(CheckIcon, { size: 24 }) }),
55
+ /* @__PURE__ */ jsx(Heading, { level: 4, size: "title", className: "text-text-primary", children: successTitle }),
56
+ /* @__PURE__ */ jsxs(Typography, { variant: "body", className: "text-text-secondary", children: [
57
+ "We",
58
+ "'",
59
+ "ll get back to you soon."
60
+ ] })
61
+ ] }) : /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-6", children: [
62
+ /* @__PURE__ */ jsxs(Field, { children: [
63
+ /* @__PURE__ */ jsx(FieldLabel, { children: "Name" }),
64
+ /* @__PURE__ */ jsx(FieldContent, { children: /* @__PURE__ */ jsx(
65
+ Input,
66
+ {
67
+ name: "name",
68
+ placeholder: namePlaceholder,
69
+ value: name,
70
+ onChange: (e) => setName(e.target.value),
71
+ required: true
72
+ }
73
+ ) })
74
+ ] }),
75
+ /* @__PURE__ */ jsxs(Field, { children: [
76
+ /* @__PURE__ */ jsx(FieldLabel, { children: "Email" }),
77
+ /* @__PURE__ */ jsx(FieldContent, { children: /* @__PURE__ */ jsx(
78
+ Input,
79
+ {
80
+ name: "email",
81
+ type: "email",
82
+ placeholder: emailPlaceholder,
83
+ value: email,
84
+ onChange: (e) => setEmail(e.target.value),
85
+ required: true
86
+ }
87
+ ) })
88
+ ] }),
89
+ /* @__PURE__ */ jsxs(Field, { children: [
90
+ /* @__PURE__ */ jsx(FieldLabel, { children: "Message" }),
91
+ /* @__PURE__ */ jsx(FieldContent, { children: /* @__PURE__ */ jsx(
92
+ Textarea,
93
+ {
94
+ name: "message",
95
+ placeholder: messagePlaceholder,
96
+ rows: 4,
97
+ value: message,
98
+ onChange: (e) => setMessage(e.target.value),
99
+ required: true
100
+ }
101
+ ) })
102
+ ] }),
103
+ /* @__PURE__ */ jsx(
104
+ Button,
105
+ {
106
+ type: "submit",
107
+ className: "w-full",
108
+ variant: "accent",
109
+ disabled: status === "loading",
110
+ children: status === "loading" ? /* @__PURE__ */ jsxs(Fragment, { children: [
111
+ /* @__PURE__ */ jsx(Spinner, { className: "mr-2 h-4 w-4" }),
112
+ "Sending..."
113
+ ] }) : submitLabel
114
+ }
115
+ )
116
+ ] }) })
117
+ ] }) });
118
+ }
119
+
120
+ export { ContactBlock };
@@ -0,0 +1,18 @@
1
+ import { cn } from './chunk-QYZT24TS.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ function NativeSelect({ className, ref, ...props }) {
5
+ return /* @__PURE__ */ jsx(
6
+ "select",
7
+ {
8
+ ref,
9
+ className: cn(
10
+ "flex h-9 w-full rounded-md border border-border bg-surface px-4 py-1.5 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent disabled:cursor-not-allowed disabled:opacity-50 text-text-primary appearance-none",
11
+ className
12
+ ),
13
+ ...props
14
+ }
15
+ );
16
+ }
17
+
18
+ export { NativeSelect };
@@ -0,0 +1,52 @@
1
+ import { StaggerChildren } from './chunk-DQPK2XRL.js';
2
+ import { Heading } from './chunk-WI547C47.js';
3
+ import { ScrollFadeIn } from './chunk-I23DDSU7.js';
4
+ import Image from 'next/image';
5
+ import { jsx, jsxs } from 'react/jsx-runtime';
6
+
7
+ var defaultMembers = [
8
+ {
9
+ name: "M\xE9schac Irung",
10
+ role: "Creator",
11
+ avatar: "https://avatars.githubusercontent.com/u/47919550?v=4"
12
+ },
13
+ {
14
+ name: "Th\xE9o Balick",
15
+ role: "Frontend Dev",
16
+ avatar: "https://avatars.githubusercontent.com/u/68236786?v=4"
17
+ },
18
+ {
19
+ name: "Glodie Lukose",
20
+ role: "Frontend Dev",
21
+ avatar: "https://avatars.githubusercontent.com/u/99137927?v=4"
22
+ },
23
+ {
24
+ name: "Bernard Ngandu",
25
+ role: "Backend Dev",
26
+ avatar: "https://avatars.githubusercontent.com/u/31113941?v=4"
27
+ }
28
+ ];
29
+ var defaultSections = [
30
+ { heading: "Leadership", members: defaultMembers },
31
+ { heading: "Engineering", members: defaultMembers },
32
+ { heading: "Marketing", members: defaultMembers }
33
+ ];
34
+ function TeamBlock({
35
+ title = "Our team",
36
+ sections = defaultSections,
37
+ className
38
+ }) {
39
+ return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx("section", { className: className ?? "py-12 md:py-32", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-3xl px-8 lg:px-0", children: [
40
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: "display", className: "mb-8 md:mb-16", children: title }),
41
+ sections.map((section, sIdx) => /* @__PURE__ */ jsxs("div", { className: sIdx > 0 ? "mt-6" : void 0, children: [
42
+ /* @__PURE__ */ jsx(Heading, { level: 3, size: "eyebrow", className: "mb-6", children: section.heading }),
43
+ /* @__PURE__ */ jsx(StaggerChildren, { staggerMs: 80, className: "grid grid-cols-2 gap-4 border-t py-6 md:grid-cols-4", children: section.members.map((member, index) => /* @__PURE__ */ jsxs("div", { children: [
44
+ /* @__PURE__ */ jsx("div", { className: "bg-background size-20 rounded-full border p-0.5 shadow shadow-sm", children: /* @__PURE__ */ jsx(Image, { className: "aspect-square rounded-full object-cover", src: member.avatar, alt: member.name, height: 460, width: 460 }) }),
45
+ /* @__PURE__ */ jsx("span", { className: "mt-2 block text-sm truncate", children: member.name }),
46
+ /* @__PURE__ */ jsx("span", { className: "text-text-tertiary block text-xs truncate", children: member.role })
47
+ ] }, index)) })
48
+ ] }, section.heading))
49
+ ] }) }) });
50
+ }
51
+
52
+ export { TeamBlock };
@@ -39,7 +39,7 @@ var defaultConfig = {
39
39
  color: "rgb(var(--chart-1))"
40
40
  }
41
41
  };
42
- function HeatmapBlock({
42
+ function HeatmapChartBlock({
43
43
  data = defaultData,
44
44
  config = defaultConfig,
45
45
  title = "User Activity Heatmap",
@@ -62,4 +62,4 @@ function HeatmapBlock({
62
62
  ] });
63
63
  }
64
64
 
65
- export { HeatmapBlock };
65
+ export { HeatmapChartBlock };
@@ -0,0 +1,105 @@
1
+ import { Heading } from './chunk-WI547C47.js';
2
+ import { ScrollFadeIn } from './chunk-I23DDSU7.js';
3
+ import { PlusIcon } from './chunk-E7RBK6ML.js';
4
+ import { WrenchIcon } from './chunk-AWIJHDNK.js';
5
+ import { RefreshCWIcon } from './chunk-Q7LVUGFL.js';
6
+ import { Badge } from './chunk-S4JAHKOP.js';
7
+ import { cn } from './chunk-QYZT24TS.js';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+
10
+ var typeConfig = {
11
+ added: {
12
+ icon: /* @__PURE__ */ jsx(PlusIcon, { size: 12 }),
13
+ label: "Added",
14
+ color: "text-success bg-success/10"
15
+ },
16
+ fixed: {
17
+ icon: /* @__PURE__ */ jsx(WrenchIcon, { size: 12 }),
18
+ label: "Fixed",
19
+ color: "text-info bg-info/10"
20
+ },
21
+ changed: {
22
+ icon: /* @__PURE__ */ jsx(RefreshCWIcon, { size: 12 }),
23
+ label: "Changed",
24
+ color: "text-warning bg-warning/10"
25
+ }
26
+ };
27
+ var defaultEntries = [
28
+ {
29
+ version: "2.1.0",
30
+ date: "Feb 9, 2026",
31
+ changes: [
32
+ { type: "added", text: "ScrollFadeIn, MeteorShower, and AuroraEffect animation components" },
33
+ { type: "added", text: "FAQ, Comparison, Contact, and Newsletter blocks" },
34
+ { type: "changed", text: "Upgraded motion library to v12 with new easing tokens" }
35
+ ]
36
+ },
37
+ {
38
+ version: "2.0.0",
39
+ date: "Feb 1, 2026",
40
+ changes: [
41
+ { type: "added", text: "Arctic Glow palette replacing Synthetic Coral" },
42
+ { type: "added", text: "Light and dark theme support via CSS custom properties" },
43
+ { type: "fixed", text: "WCAG contrast ratios for all semantic colors" },
44
+ { type: "changed", text: "Migrated from Tailwind CSS 3 to 4" }
45
+ ]
46
+ },
47
+ {
48
+ version: "1.5.0",
49
+ date: "Jan 15, 2026",
50
+ changes: [
51
+ { type: "added", text: "Dashboard page with chart collection" },
52
+ { type: "fixed", text: "Dialog focus trap on mobile Safari" }
53
+ ]
54
+ }
55
+ ];
56
+ function ChangelogBlock({
57
+ entries = defaultEntries,
58
+ title = "Changelog",
59
+ className
60
+ }) {
61
+ return /* @__PURE__ */ jsx("section", { className: cn("py-16 md:py-24", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-3xl px-6", children: [
62
+ !!title && /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "mb-12 text-text-primary", children: title }) }),
63
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
64
+ /* @__PURE__ */ jsx("div", { className: "absolute left-4 top-2 bottom-0 w-px bg-border" }),
65
+ /* @__PURE__ */ jsx("div", { className: "space-y-12", children: entries.map((entry, entryIndex) => /* @__PURE__ */ jsx(ScrollFadeIn, { delay: entryIndex * 0.08, children: /* @__PURE__ */ jsxs("div", { className: "relative flex gap-6", children: [
66
+ /* @__PURE__ */ jsx("div", { className: "relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full glass-panel", children: /* @__PURE__ */ jsx("div", { className: "h-2.5 w-2.5 rounded-full bg-primary" }) }),
67
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 pt-0.5", children: [
68
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-4 mb-4", children: [
69
+ /* @__PURE__ */ jsxs(Badge, { variant: "primary", className: "font-mono text-xs", children: [
70
+ "v",
71
+ entry.version
72
+ ] }),
73
+ entryIndex === 0 && /* @__PURE__ */ jsx(Badge, { variant: "accent", className: "text-[10px]", children: "Latest" }),
74
+ /* @__PURE__ */ jsx("time", { className: "text-xs text-text-tertiary", children: entry.date })
75
+ ] }),
76
+ /* @__PURE__ */ jsx("ul", { className: "space-y-2", children: entry.changes.map((change, changeIndex) => {
77
+ const config = typeConfig[change.type];
78
+ return /* @__PURE__ */ jsxs(
79
+ "li",
80
+ {
81
+ className: "flex items-start gap-2 text-sm text-text-secondary",
82
+ children: [
83
+ /* @__PURE__ */ jsx(
84
+ "span",
85
+ {
86
+ className: cn(
87
+ "mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded",
88
+ config.color
89
+ ),
90
+ children: config.icon
91
+ }
92
+ ),
93
+ /* @__PURE__ */ jsx("span", { children: change.text })
94
+ ]
95
+ },
96
+ changeIndex
97
+ );
98
+ }) })
99
+ ] })
100
+ ] }) }, entry.version)) })
101
+ ] })
102
+ ] }) });
103
+ }
104
+
105
+ export { ChangelogBlock };
@@ -0,0 +1,91 @@
1
+ import { useRef, useCallback, useSyncExternalStore, useEffect } from 'react';
2
+ import { useStickToBottom } from 'use-stick-to-bottom';
3
+
4
+ // src/hooks/use-scroll-to-bottom.ts
5
+ var AT_BOTTOM_THRESHOLD_PX = 100;
6
+ var USER_SCROLL_DEBOUNCE_MS = 150;
7
+ var SERVER_SNAPSHOT = true;
8
+ function useScrollToBottom() {
9
+ const {
10
+ scrollRef,
11
+ contentRef,
12
+ scrollToBottom: stbScrollToBottom
13
+ } = useStickToBottom({
14
+ resize: "smooth",
15
+ initial: "smooth"
16
+ });
17
+ const endRef = useRef(null);
18
+ const isAtBottomRef = useRef(true);
19
+ const isUserScrollingRef = useRef(false);
20
+ const checkIfAtBottom = useCallback(() => {
21
+ const container = scrollRef.current;
22
+ if (!container) return true;
23
+ const { scrollTop, scrollHeight, clientHeight } = container;
24
+ return scrollTop + clientHeight >= scrollHeight - AT_BOTTOM_THRESHOLD_PX;
25
+ }, [scrollRef]);
26
+ const subscribe = useCallback((onStoreChange) => {
27
+ const container = scrollRef.current;
28
+ if (!container) return () => {
29
+ };
30
+ isAtBottomRef.current = checkIfAtBottom();
31
+ let scrollTimeout;
32
+ function handleScroll() {
33
+ isUserScrollingRef.current = true;
34
+ clearTimeout(scrollTimeout);
35
+ isAtBottomRef.current = checkIfAtBottom();
36
+ scrollTimeout = setTimeout(() => {
37
+ isUserScrollingRef.current = false;
38
+ }, USER_SCROLL_DEBOUNCE_MS);
39
+ onStoreChange();
40
+ }
41
+ container.addEventListener("scroll", handleScroll, { passive: true });
42
+ return () => {
43
+ container.removeEventListener("scroll", handleScroll);
44
+ clearTimeout(scrollTimeout);
45
+ };
46
+ }, [checkIfAtBottom, scrollRef]);
47
+ const getServerSnapshot = useCallback(() => SERVER_SNAPSHOT, []);
48
+ const isAtBottom = useSyncExternalStore(subscribe, checkIfAtBottom, getServerSnapshot);
49
+ const scrollToBottom = useCallback(
50
+ (behavior = "smooth") => {
51
+ stbScrollToBottom(behavior);
52
+ },
53
+ [stbScrollToBottom]
54
+ );
55
+ useEffect(() => {
56
+ const container = scrollRef.current;
57
+ if (!container) return;
58
+ function scrollIfNeeded() {
59
+ if (isAtBottomRef.current && !isUserScrollingRef.current) {
60
+ requestAnimationFrame(() => {
61
+ stbScrollToBottom("instant");
62
+ isAtBottomRef.current = true;
63
+ });
64
+ }
65
+ }
66
+ const mutationObserver = new MutationObserver(scrollIfNeeded);
67
+ mutationObserver.observe(container, {
68
+ childList: true,
69
+ subtree: true,
70
+ characterData: true
71
+ });
72
+ const resizeObserver = new ResizeObserver(scrollIfNeeded);
73
+ resizeObserver.observe(container);
74
+ for (const child of container.children) {
75
+ resizeObserver.observe(child);
76
+ }
77
+ return () => {
78
+ mutationObserver.disconnect();
79
+ resizeObserver.disconnect();
80
+ };
81
+ }, [scrollRef, stbScrollToBottom]);
82
+ return {
83
+ containerRef: scrollRef,
84
+ contentRef,
85
+ endRef,
86
+ isAtBottom,
87
+ scrollToBottom
88
+ };
89
+ }
90
+
91
+ export { useScrollToBottom };
@@ -1,4 +1,4 @@
1
- import { getShaderPreset } from './chunk-DF47R6LN.js';
1
+ import { getShaderPreset } from './chunk-AWIG4QN6.js';
2
2
  import { useTheme } from './chunk-HJC6U46F.js';
3
3
  import { useMemo } from 'react';
4
4
 
@@ -0,0 +1,110 @@
1
+ import { Shine } from './chunk-DARC2ACH.js';
2
+ import { CountingNumber } from './chunk-F3T2U7YL.js';
3
+ import { StaggerChildren } from './chunk-DQPK2XRL.js';
4
+ import { Switch } from './chunk-R7N7YLFT.js';
5
+ import { Heading } from './chunk-WI547C47.js';
6
+ import { Card, CardHeader, CardTitle, CardContent, CardFooter } from './chunk-AH6YSYYT.js';
7
+ import { Button } from './chunk-7KIDDF3I.js';
8
+ import { CheckIcon } from './chunk-CXACRCZ4.js';
9
+ import { Badge } from './chunk-S4JAHKOP.js';
10
+ import { cn } from './chunk-QYZT24TS.js';
11
+ import { useTranslations } from 'next-intl';
12
+ import { useState } from 'react';
13
+ import { jsx, jsxs } from 'react/jsx-runtime';
14
+
15
+ var defaultPlans = [
16
+ {
17
+ name: "Starter",
18
+ description: "Perfect for hobbyists and side projects.",
19
+ price: "$0",
20
+ period: "/forever",
21
+ features: ["1,000 requests/mo", "Community support", "1 project", "Basic analytics"],
22
+ action: "Get Started",
23
+ variant: "outline"
24
+ },
25
+ {
26
+ name: "Pro",
27
+ description: "For professional developers and small teams.",
28
+ price: (isYearly) => isYearly ? "$29" : "$39",
29
+ period: "/month",
30
+ features: ["100,000 requests/mo", "Priority support", "Unlimited projects", "Advanced analytics", "Custom domains"],
31
+ action: "Upgrade to Pro",
32
+ variant: "accent",
33
+ popular: true
34
+ },
35
+ {
36
+ name: "Enterprise",
37
+ description: "Custom solutions for large organizations.",
38
+ price: "Custom",
39
+ period: "",
40
+ features: ["Unlimited requests", "24/7 Dedicated support", "SSO & Audit logs", "SLA guarantees", "On-premise deployment"],
41
+ action: "Contact Sales",
42
+ variant: "outline"
43
+ }
44
+ ];
45
+ function resolvePrice(price, isYearly) {
46
+ return typeof price === "function" ? price(isYearly) : price;
47
+ }
48
+ function PricingBlock({
49
+ title = "Simple, transparent pricing",
50
+ description = "Choose the plan that's right for you. Change or cancel anytime.",
51
+ plans = defaultPlans,
52
+ showBillingToggle = true,
53
+ className
54
+ }) {
55
+ const t = useTranslations("blocks.pricingBlock");
56
+ const [isYearly, setIsYearly] = useState(false);
57
+ return /* @__PURE__ */ jsx("section", { className: className ?? "py-16 md:py-24", children: /* @__PURE__ */ jsxs("div", { className: "container mx-auto px-6 lg:px-8", children: [
58
+ /* @__PURE__ */ jsxs("div", { className: "mb-12 text-center", children: [
59
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: "section", className: "mb-4 sm:text-4xl", children: title }),
60
+ /* @__PURE__ */ jsx("p", { className: "mb-8 text-lg text-text-secondary", children: description }),
61
+ !!showBillingToggle && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-4", children: [
62
+ /* @__PURE__ */ jsx("span", { className: cn("text-sm font-medium", !isYearly ? "text-text-primary" : "text-text-tertiary"), children: t("monthly") }),
63
+ /* @__PURE__ */ jsx(Switch, { checked: isYearly, onCheckedChange: setIsYearly, "aria-label": t("toggleYearlyBilling") }),
64
+ /* @__PURE__ */ jsxs("span", { className: cn("text-sm font-medium", isYearly ? "text-text-primary" : "text-text-tertiary"), children: [
65
+ t("yearly"),
66
+ " ",
67
+ /* @__PURE__ */ jsx("span", { className: "ml-1.5 text-accent", children: t("savePercent") })
68
+ ] })
69
+ ] })
70
+ ] }),
71
+ /* @__PURE__ */ jsx(StaggerChildren, { staggerMs: 120, className: "grid gap-8 md:grid-cols-3", children: plans.map((plan) => {
72
+ const priceStr = resolvePrice(plan.price, isYearly);
73
+ const card = /* @__PURE__ */ jsxs(
74
+ Card,
75
+ {
76
+ interactive: true,
77
+ className: cn(
78
+ "flex flex-col relative overflow-hidden transition-all duration-300",
79
+ plan.popular ? "border-accent shadow-lg shadow-accent/5 z-10" : "border-border/50 hover:border-border"
80
+ ),
81
+ children: [
82
+ plan.popular && /* @__PURE__ */ jsx("div", { className: "absolute -top-4 left-0 ring-0 w-full flex justify-center", children: /* @__PURE__ */ jsx(Badge, { variant: "accent", className: "shadow-lg", children: t("mostPopular") }) }),
83
+ /* @__PURE__ */ jsxs(CardHeader, { className: "pb-8 pt-8", children: [
84
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-xl font-semibold text-text-primary", children: plan.name }),
85
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-text-secondary", children: plan.description })
86
+ ] }),
87
+ /* @__PURE__ */ jsxs(CardContent, { className: "flex-1", children: [
88
+ /* @__PURE__ */ jsxs("div", { className: "mb-8 flex items-baseline", children: [
89
+ priceStr === "Custom" ? /* @__PURE__ */ jsx("span", { className: "text-4xl font-extrabold text-text-primary", children: priceStr }) : /* @__PURE__ */ jsxs("span", { className: "text-4xl font-extrabold text-text-primary tabular-nums", children: [
90
+ "$",
91
+ /* @__PURE__ */ jsx(CountingNumber, { number: parseInt(priceStr.slice(1), 10), inViewOnce: true })
92
+ ] }),
93
+ /* @__PURE__ */ jsx("span", { className: "ml-1.5 text-text-tertiary", children: plan.period })
94
+ ] }),
95
+ /* @__PURE__ */ jsx("ul", { className: "space-y-4", children: plan.features.map((feature) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-4 text-sm text-text-secondary", children: [
96
+ /* @__PURE__ */ jsx("div", { className: cn("flex h-5 w-5 items-center justify-center rounded-full bg-primary/10 text-primary"), children: /* @__PURE__ */ jsx(CheckIcon, { size: 12 }) }),
97
+ feature
98
+ ] }, feature)) })
99
+ ] }),
100
+ /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(Button, { className: "w-full", variant: plan.variant, children: plan.action }) })
101
+ ]
102
+ },
103
+ plan.name
104
+ );
105
+ return plan.popular ? /* @__PURE__ */ jsx(Shine, { enable: true, loop: true, loopDelay: 3e3, color: "var(--color-accent)", opacity: 0.12, duration: 1500, children: card }, plan.name) : /* @__PURE__ */ jsx("div", { children: card }, plan.name);
106
+ }) })
107
+ ] }) });
108
+ }
109
+
110
+ export { PricingBlock };