@flikk/ui 1.0.0-beta.26 → 1.0.0-beta.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) 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 -140
  25. package/dist/components/ai/PromptInput/VoiceRecorder.js +0 -85
  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 +3 -3
  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/CommandItem.js +4 -5
  112. package/dist/components/core/CommandPalette/CommandPalette.js +1 -1
  113. package/dist/components/core/CommandPalette/CommandPalette.theme.js +11 -13
  114. package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +0 -2
  115. package/dist/components/core/ContextMenu/ContextMenu.theme.js +14 -15
  116. package/dist/components/core/ContextMenu/ContextMenuItem.js +1 -1
  117. package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +1 -1
  118. package/dist/components/core/DotSeparator/DotSeparator.d.ts +3 -0
  119. package/dist/components/core/DotSeparator/DotSeparator.js +19 -0
  120. package/dist/components/core/DotSeparator/DotSeparator.theme.d.ts +2 -0
  121. package/dist/components/core/DotSeparator/DotSeparator.theme.js +10 -0
  122. package/dist/components/core/DotSeparator/DotSeparator.types.d.ts +25 -0
  123. package/dist/components/core/DotSeparator/index.d.ts +3 -0
  124. package/dist/components/core/Dropdown/Dropdown.theme.js +5 -6
  125. package/dist/components/core/Dropdown/DropdownItem.js +1 -1
  126. package/dist/components/core/Dropdown/DropdownMenu.js +58 -30
  127. package/dist/components/core/HeroCard/HeroCard.d.ts +5 -0
  128. package/dist/components/core/HeroCard/HeroCard.js +99 -0
  129. package/dist/components/core/HeroCard/HeroCard.theme.d.ts +3 -0
  130. package/dist/components/core/HeroCard/HeroCard.theme.js +8 -0
  131. package/dist/components/core/HeroCard/HeroCard.types.d.ts +70 -0
  132. package/dist/components/core/HeroCard/index.d.ts +4 -0
  133. package/dist/components/core/Kbd/Kbd.theme.js +1 -1
  134. package/dist/components/core/MenuItem/MenuItem.js +5 -2
  135. package/dist/components/core/MenuItem/MenuItem.theme.d.ts +6 -0
  136. package/dist/components/core/MenuItem/MenuItem.theme.js +19 -16
  137. package/dist/components/core/MenuItem/MenuItem.types.d.ts +2 -0
  138. package/dist/components/core/Modal/Modal.d.ts +1 -1
  139. package/dist/components/core/Modal/Modal.js +2 -7
  140. package/dist/components/core/Modal/Modal.theme.js +4 -8
  141. package/dist/components/core/Modal/Modal.types.d.ts +0 -10
  142. package/dist/components/core/Modal/index.d.ts +1 -1
  143. package/dist/components/core/ModalStack/ModalStack.d.ts +1 -1
  144. package/dist/components/core/ModalStack/ModalStack.types.d.ts +1 -2
  145. package/dist/components/core/ModalStack/ModalStackModal.d.ts +1 -1
  146. package/dist/components/core/ModalStack/ModalStackModal.js +2 -7
  147. package/dist/components/core/NavItem/NavItem.js +20 -4
  148. package/dist/components/core/NavItem/NavItem.theme.js +13 -2
  149. package/dist/components/core/PageHeading/PageHeading.theme.js +2 -2
  150. package/dist/components/core/Popover/Popover.theme.js +1 -1
  151. package/dist/components/core/Popover/Popover.types.d.ts +6 -2
  152. package/dist/components/core/Popover/PopoverBody.js +10 -3
  153. package/dist/components/core/ScrollArea/ScrollArea.js +242 -4
  154. package/dist/components/core/ScrollArea/ScrollArea.types.d.ts +12 -1
  155. package/dist/components/core/ScrollArea/smooth/SmoothScrollEngine.d.ts +4 -0
  156. package/dist/components/core/ScrollArea/smooth/SmoothScrollEngine.js +23 -0
  157. package/dist/components/core/ScrollArea/smooth/useSmoothScroll.js +4 -0
  158. package/dist/components/core/ScrollArea/smooth/useSmoothScroll.types.d.ts +5 -0
  159. package/dist/components/core/Segmented/Segmented.theme.js +2 -2
  160. package/dist/components/core/Sidebar/Sidebar.d.ts +2 -0
  161. package/dist/components/core/Sidebar/Sidebar.js +15 -7
  162. package/dist/components/core/Sidebar/Sidebar.types.d.ts +92 -4
  163. package/dist/components/core/Sidebar/SidebarCard.d.ts +25 -0
  164. package/dist/components/core/Sidebar/SidebarCard.js +68 -0
  165. package/dist/components/core/Sidebar/SidebarCard.theme.d.ts +8 -0
  166. package/dist/components/core/Sidebar/SidebarCard.theme.js +18 -0
  167. package/dist/components/core/Sidebar/SidebarContent.js +5 -1
  168. package/dist/components/core/Sidebar/SidebarContext.js +1 -1
  169. package/dist/components/core/Sidebar/SidebarHeader.js +10 -2
  170. package/dist/components/core/Sidebar/SidebarLogo.js +38 -3
  171. package/dist/components/core/Sidebar/SidebarSearch.d.ts +22 -0
  172. package/dist/components/core/Sidebar/SidebarSearch.js +135 -0
  173. package/dist/components/core/Sidebar/SidebarToggle.js +1 -1
  174. package/dist/components/core/Sidebar/SidebarUserProfile.js +2 -2
  175. package/dist/components/core/Sidebar/index.d.ts +3 -1
  176. package/dist/components/core/Tag/Tag.js +29 -5
  177. package/dist/components/core/Tag/Tag.theme.js +13 -8
  178. package/dist/components/core/Tag/Tag.types.d.ts +7 -0
  179. package/dist/components/core/Tooltip/Tooltip.js +1 -1
  180. package/dist/components/core/Tooltip/Tooltip.theme.js +1 -2
  181. package/dist/components/core/index.d.ts +2 -0
  182. package/dist/components/core/index.js +6 -0
  183. package/dist/components/data-display/DescriptionList/DescriptionList.js +23 -7
  184. package/dist/components/data-display/DescriptionList/DescriptionList.theme.js +10 -3
  185. package/dist/components/data-display/DescriptionList/DescriptionList.types.d.ts +49 -10
  186. package/dist/components/data-display/DescriptionList/index.d.ts +1 -1
  187. package/dist/components/data-display/Feed/Feed.js +28 -5
  188. package/dist/components/data-display/Feed/Feed.theme.js +1 -1
  189. package/dist/components/data-display/Feed/Feed.types.d.ts +32 -1
  190. package/dist/components/data-display/Feed/index.d.ts +1 -1
  191. package/dist/components/data-display/GanttChart/GanttChart.d.ts +1 -1
  192. package/dist/components/data-display/GanttChart/GanttChart.js +31 -4
  193. package/dist/components/data-display/GanttChart/GanttChart.theme.js +19 -17
  194. package/dist/components/data-display/GanttChart/GanttChart.types.d.ts +19 -0
  195. package/dist/components/data-display/GanttChart/GanttChart.utils.js +1 -1
  196. package/dist/components/data-display/GanttChart/GanttChartPanel.d.ts +1 -1
  197. package/dist/components/data-display/GanttChart/GanttChartPanel.js +3 -3
  198. package/dist/components/data-display/GanttChart/GanttDependencyArrows.js +7 -4
  199. package/dist/components/data-display/GanttChart/GanttMilestone.js +5 -5
  200. package/dist/components/data-display/GanttChart/GanttTablePanel.js +1 -1
  201. package/dist/components/data-display/GanttChart/GanttTableTaskRow.js +2 -2
  202. package/dist/components/data-display/GanttChart/GanttTaskBar.js +37 -16
  203. package/dist/components/data-display/GanttChart/GanttTimelineGrid.js +2 -1
  204. package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +35 -11
  205. package/dist/components/data-display/GanttChart/GanttToolbar.js +2 -2
  206. package/dist/components/data-display/GanttChart/hooks/useGanttDrag.js +3 -2
  207. package/dist/components/data-display/GanttChart/index.d.ts +1 -1
  208. package/dist/components/data-display/Metric/Metric.js +8 -8
  209. package/dist/components/data-display/Metric/Metric.theme.d.ts +3 -2
  210. package/dist/components/data-display/Metric/Metric.theme.js +50 -68
  211. package/dist/components/data-display/Metric/Metric.types.d.ts +19 -21
  212. package/dist/components/data-display/Table/Table.js +2 -2
  213. package/dist/components/data-display/Table/Table.theme.js +27 -9
  214. package/dist/components/data-display/Table/Table.types.d.ts +8 -0
  215. package/dist/components/data-display/Table/TableBody.js +2 -2
  216. package/dist/components/data-display/Table/TableCell.js +1 -1
  217. package/dist/components/data-display/Table/TableRow.d.ts +1 -1
  218. package/dist/components/data-display/Table/TableRow.js +9 -2
  219. package/dist/components/data-display/Timeline/Timeline.js +27 -5
  220. package/dist/components/data-display/Timeline/Timeline.theme.d.ts +10 -2
  221. package/dist/components/data-display/Timeline/Timeline.theme.js +14 -8
  222. package/dist/components/data-display/Timeline/Timeline.types.d.ts +48 -16
  223. package/dist/components/data-display/Timeline/Timeline.utils.d.ts +6 -0
  224. package/dist/components/data-display/Timeline/Timeline.utils.js +11 -0
  225. package/dist/components/data-display/Timeline/TimelineItem.js +13 -20
  226. package/dist/components/data-display/Timeline/TimelineMarker.js +10 -8
  227. package/dist/components/data-display/Timeline/index.d.ts +2 -2
  228. package/dist/components/effects/3d/index.d.ts +0 -2
  229. package/dist/components/effects/3d/index.js +0 -1
  230. package/dist/components/effects/Aurora/Aurora.d.ts +6 -17
  231. package/dist/components/effects/Aurora/Aurora.js +297 -131
  232. package/dist/components/effects/Aurora/Aurora.types.d.ts +6 -0
  233. package/dist/components/effects/DotPattern/DotPattern.js +1 -1
  234. package/dist/components/effects/Overlay/Overlay.theme.js +1 -2
  235. package/dist/components/effects/Preloader/Preloader.animations.d.ts +23 -0
  236. package/dist/components/effects/Preloader/Preloader.animations.js +150 -0
  237. package/dist/components/effects/Preloader/Preloader.d.ts +3 -0
  238. package/dist/components/effects/Preloader/Preloader.js +119 -0
  239. package/dist/components/effects/Preloader/Preloader.types.d.ts +63 -0
  240. package/dist/components/effects/Preloader/index.d.ts +2 -0
  241. package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.js +25 -14
  242. package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.types.d.ts +2 -0
  243. package/dist/components/effects/TiltCard/TiltCard.d.ts +12 -0
  244. package/dist/components/effects/TiltCard/TiltCard.glow.d.ts +28 -0
  245. package/dist/components/effects/TiltCard/TiltCard.glow.js +114 -0
  246. package/dist/components/effects/TiltCard/TiltCard.js +177 -0
  247. package/dist/components/effects/{SpotlightBorder/SpotlightBorder.shaders.d.ts → TiltCard/TiltCard.shaders.d.ts} +1 -1
  248. package/dist/components/effects/{SpotlightBorder/SpotlightBorder.shaders.js → TiltCard/TiltCard.shaders.js} +1 -1
  249. package/dist/components/effects/TiltCard/TiltCard.types.d.ts +88 -0
  250. package/dist/components/effects/TiltCard/index.d.ts +2 -0
  251. package/dist/components/effects/index.d.ts +4 -12
  252. package/dist/components/effects/index.js +2 -6
  253. package/dist/components/forms/Checkbox/Checkbox.js +7 -1
  254. package/dist/components/forms/Combobox/Combobox.js +1 -1
  255. package/dist/components/forms/Combobox/Combobox.theme.js +2 -4
  256. package/dist/components/forms/DatePicker/DatePicker.theme.js +11 -18
  257. package/dist/components/forms/DatePicker/DatePickerTrigger.js +1 -1
  258. package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +6 -13
  259. package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +1 -1
  260. package/dist/components/forms/FileUpload/FileUpload.animations.d.ts +29 -0
  261. package/dist/components/forms/FileUpload/FileUpload.animations.js +19 -0
  262. package/dist/components/forms/FileUpload/FileUpload.js +85 -134
  263. package/dist/components/forms/FileUpload/FileUpload.theme.d.ts +2 -10
  264. package/dist/components/forms/FileUpload/FileUpload.theme.js +16 -30
  265. package/dist/components/forms/FileUpload/FileUpload.types.d.ts +26 -10
  266. package/dist/components/forms/FormLabel/FormLabel.theme.js +1 -1
  267. package/dist/components/forms/Input/Input.theme.js +13 -10
  268. package/dist/components/forms/InputCounter/InputCounter.theme.js +1 -1
  269. package/dist/components/forms/Mention/Mention.js +152 -57
  270. package/dist/components/forms/Mention/Mention.theme.js +16 -23
  271. package/dist/components/forms/Mention/Mention.types.d.ts +12 -12
  272. package/dist/components/forms/Mention/Mention.utils.js +32 -4
  273. package/dist/components/forms/RichTextEditor/RichTextEditor.js +3 -3
  274. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +5 -5
  275. package/dist/components/forms/Select/Select.js +2 -2
  276. package/dist/components/forms/Select/Select.theme.js +3 -3
  277. package/dist/components/forms/Slider/Slider.theme.js +1 -1
  278. package/dist/components/forms/Switch/Switch.js +27 -15
  279. package/dist/components/forms/Switch/Switch.theme.d.ts +36 -6
  280. package/dist/components/forms/Switch/Switch.theme.js +33 -4
  281. package/dist/components/forms/Switch/Switch.types.d.ts +12 -2
  282. package/dist/components/forms/TimePicker/TimePicker.theme.js +1 -2
  283. package/dist/components/forms/TimePicker/TimePickerContent.js +1 -87
  284. package/dist/components/forms/TimePicker/TimePickerTrigger.js +1 -1
  285. package/dist/components/forms/forms.theme.js +21 -16
  286. package/dist/components/forms/index.d.ts +0 -4
  287. package/dist/components/forms/index.js +0 -89
  288. package/dist/components/generative/GenerativeView.d.ts +21 -0
  289. package/dist/components/generative/GenerativeView.js +116 -0
  290. package/dist/components/generative/actions.d.ts +26 -0
  291. package/dist/components/generative/actions.js +51 -0
  292. package/dist/components/generative/index.d.ts +11 -0
  293. package/dist/components/generative/index.js +9 -0
  294. package/dist/components/generative/registry.d.ts +43 -0
  295. package/dist/components/generative/registry.js +114 -0
  296. package/dist/components/generative/resolvers.d.ts +35 -0
  297. package/dist/components/generative/resolvers.js +93 -0
  298. package/dist/components/generative/schema.generated.d.ts +2 -0
  299. package/dist/components/generative/schema.generated.js +1639 -0
  300. package/dist/components/generative/schemaTypes.d.ts +30 -0
  301. package/dist/components/generative/streaming.d.ts +39 -0
  302. package/dist/components/generative/streaming.js +283 -0
  303. package/dist/components/generative/tools.d.ts +21 -0
  304. package/dist/components/generative/tools.js +54 -0
  305. package/dist/components/generative/types.d.ts +41 -0
  306. package/dist/components/generative/useGenerativeStream.d.ts +37 -0
  307. package/dist/components/generative/useGenerativeStream.js +36 -0
  308. package/dist/components/generative/validate.d.ts +24 -0
  309. package/dist/components/generative/validate.js +259 -0
  310. package/dist/components/layout/AppShell/AppShell.d.ts +10 -0
  311. package/dist/components/layout/AppShell/AppShell.js +84 -0
  312. package/dist/components/layout/AppShell/AppShell.theme.d.ts +3 -0
  313. package/dist/components/layout/AppShell/AppShell.theme.js +42 -0
  314. package/dist/components/layout/AppShell/AppShell.types.d.ts +127 -0
  315. package/dist/components/layout/AppShell/AppShellContext.d.ts +14 -0
  316. package/dist/components/layout/AppShell/AppShellContext.js +19 -0
  317. package/dist/components/layout/AppShell/AppShellFooter.d.ts +3 -0
  318. package/dist/components/layout/AppShell/AppShellFooter.js +12 -0
  319. package/dist/components/layout/AppShell/AppShellHeader.d.ts +3 -0
  320. package/dist/components/layout/AppShell/AppShellHeader.js +12 -0
  321. package/dist/components/layout/AppShell/AppShellMain.d.ts +3 -0
  322. package/dist/components/layout/AppShell/AppShellMain.js +19 -0
  323. package/dist/components/layout/AppShell/AppShellRightPanel.d.ts +3 -0
  324. package/dist/components/layout/AppShell/AppShellRightPanel.js +16 -0
  325. package/dist/components/layout/AppShell/AppShellSidebar.d.ts +3 -0
  326. package/dist/components/layout/AppShell/AppShellSidebar.js +16 -0
  327. package/dist/components/layout/AppShell/AppShellTopbar.d.ts +3 -0
  328. package/dist/components/layout/AppShell/AppShellTopbar.js +12 -0
  329. package/dist/components/layout/AppShell/index.d.ts +3 -0
  330. package/dist/components/layout/FormLayout/FormLayout.js +1 -87
  331. package/dist/components/layout/Grid/Grid.d.ts +3 -0
  332. package/dist/components/layout/Grid/Grid.js +50 -0
  333. package/dist/components/layout/Grid/Grid.theme.d.ts +2 -0
  334. package/dist/components/layout/Grid/Grid.theme.js +35 -0
  335. package/dist/components/layout/Grid/Grid.types.d.ts +57 -0
  336. package/dist/components/layout/Grid/index.d.ts +3 -0
  337. package/dist/components/layout/Section/Section.d.ts +3 -0
  338. package/dist/components/layout/Section/Section.js +18 -0
  339. package/dist/components/layout/Section/Section.theme.d.ts +2 -0
  340. package/dist/components/layout/Section/Section.theme.js +10 -0
  341. package/dist/components/layout/Section/Section.types.d.ts +34 -0
  342. package/dist/components/layout/Section/index.d.ts +3 -0
  343. package/dist/components/layout/Stack/Stack.d.ts +3 -0
  344. package/dist/components/layout/Stack/Stack.js +19 -0
  345. package/dist/components/layout/Stack/Stack.theme.d.ts +2 -0
  346. package/dist/components/layout/Stack/Stack.theme.js +10 -0
  347. package/dist/components/layout/Stack/Stack.types.d.ts +39 -0
  348. package/dist/components/layout/Stack/index.d.ts +3 -0
  349. package/dist/components/layout/index.d.ts +4 -0
  350. package/dist/components/layout/index.js +8 -0
  351. package/dist/generative.schema.json +1637 -0
  352. package/dist/hooks/useSelectPortal.d.ts +10 -2
  353. package/dist/hooks/useSelectPortal.js +45 -24
  354. package/dist/index.js +180 -174
  355. package/dist/registry.json +10205 -0
  356. package/dist/styles.css +1 -1
  357. package/dist/tools.json +1731 -0
  358. package/dist/utils/dateUtils.js +11 -1
  359. package/package.json +19 -4
  360. package/src/global.scss +82 -109
  361. package/src/styles/theme.css +707 -474
  362. package/dist/bg/1.jpg +0 -0
  363. package/dist/bg/10.jpg +0 -0
  364. package/dist/bg/11.jpg +0 -0
  365. package/dist/bg/14.jpg +0 -0
  366. package/dist/bg/15.jpg +0 -0
  367. package/dist/bg/16.jpg +0 -0
  368. package/dist/bg/17.jpg +0 -0
  369. package/dist/bg/18.jpg +0 -0
  370. package/dist/bg/19.jpg +0 -0
  371. package/dist/bg/2.jpg +0 -0
  372. package/dist/bg/20.jpg +0 -0
  373. package/dist/bg/21.jpg +0 -0
  374. package/dist/bg/22.jpg +0 -0
  375. package/dist/bg/23.jpg +0 -0
  376. package/dist/bg/24.jpg +0 -0
  377. package/dist/bg/3.jpg +0 -0
  378. package/dist/bg/4.jpg +0 -0
  379. package/dist/bg/5.jpg +0 -0
  380. package/dist/bg/6.jpg +0 -0
  381. package/dist/bg/7.jpg +0 -0
  382. package/dist/bg/8.jpg +0 -0
  383. package/dist/bg/9.jpg +0 -0
  384. package/dist/components/effects/MorphingText/MorphingText.d.ts +0 -17
  385. package/dist/components/effects/MorphingText/MorphingText.js +0 -125
  386. package/dist/components/effects/MorphingText/MorphingText.types.d.ts +0 -18
  387. package/dist/components/effects/MorphingText/index.d.ts +0 -2
  388. package/dist/components/effects/PageTransition/PageTransition.animations.d.ts +0 -8
  389. package/dist/components/effects/PageTransition/PageTransition.animations.js +0 -53
  390. package/dist/components/effects/PageTransition/PageTransition.d.ts +0 -3
  391. package/dist/components/effects/PageTransition/PageTransition.js +0 -82
  392. package/dist/components/effects/PageTransition/PageTransition.types.d.ts +0 -15
  393. package/dist/components/effects/PageTransition/index.d.ts +0 -2
  394. package/dist/components/effects/ParallaxSection/ParallaxSection.d.ts +0 -26
  395. package/dist/components/effects/ParallaxSection/ParallaxSection.js +0 -71
  396. package/dist/components/effects/ParallaxSection/ParallaxSection.types.d.ts +0 -11
  397. package/dist/components/effects/ParallaxSection/index.d.ts +0 -2
  398. package/dist/components/effects/Spotlight/Spotlight.d.ts +0 -36
  399. package/dist/components/effects/Spotlight/Spotlight.js +0 -112
  400. package/dist/components/effects/Spotlight/Spotlight.types.d.ts +0 -29
  401. package/dist/components/effects/Spotlight/index.d.ts +0 -2
  402. package/dist/components/effects/SpotlightBorder/SpotlightBorder.d.ts +0 -18
  403. package/dist/components/effects/SpotlightBorder/SpotlightBorder.js +0 -213
  404. package/dist/components/effects/SpotlightBorder/SpotlightBorder.types.d.ts +0 -61
  405. package/dist/components/effects/SpotlightBorder/index.d.ts +0 -2
  406. package/dist/components/effects/StickyScroll/StickyScroll.d.ts +0 -30
  407. package/dist/components/effects/StickyScroll/StickyScroll.js +0 -128
  408. package/dist/components/effects/StickyScroll/StickyScroll.types.d.ts +0 -19
  409. package/dist/components/effects/StickyScroll/index.d.ts +0 -2
  410. package/dist/components/forms/CronInput/CronInput.d.ts +0 -3
  411. package/dist/components/forms/CronInput/CronInput.js +0 -113
  412. package/dist/components/forms/CronInput/CronInput.theme.d.ts +0 -6
  413. package/dist/components/forms/CronInput/CronInput.theme.js +0 -84
  414. package/dist/components/forms/CronInput/CronInput.types.d.ts +0 -109
  415. package/dist/components/forms/CronInput/CronInput.utils.d.ts +0 -67
  416. package/dist/components/forms/CronInput/CronInput.utils.js +0 -505
  417. package/dist/components/forms/CronInput/index.d.ts +0 -4
  418. /package/dist/components/effects/{SpotlightBorder/SpotlightBorder.types.js → TiltCard/TiltCard.types.js} +0 -0
@@ -0,0 +1,259 @@
1
+ import { GENERATIVE_SCHEMA } from './schema.generated.js';
2
+
3
+ /** Props that are NEVER accepted from a spec, regardless of schema. */
4
+ const BLOCKED_PROPS = new Set(["className", "style", "ref", "key", "theme", "dangerouslySetInnerHTML"]);
5
+ const isHandler = (key) => /^on[A-Z]/.test(key);
6
+ /**
7
+ * Validate + repair a model-emitted spec against the generated schema.
8
+ * Never throws; never mutates the input. Every repair is recorded in `issues`.
9
+ * Unknown components are kept (GenerativeView renders its safe placeholder)
10
+ * but their props/children are stripped.
11
+ */
12
+ function validate(spec, options = {}) {
13
+ var _a;
14
+ const schema = (_a = options.schema) !== null && _a !== void 0 ? _a : GENERATIVE_SCHEMA;
15
+ const issues = [];
16
+ if (Array.isArray(spec)) {
17
+ return { spec: spec.map((n, i) => validateNode(n, schema, `$[${i}]`, issues)), issues };
18
+ }
19
+ return { spec: validateNode(spec, schema, "$", issues), issues };
20
+ }
21
+ function validateNode(node, schema, path, issues) {
22
+ if (!node || typeof node !== "object" || typeof node.component !== "string") {
23
+ issues.push({ path, code: "invalid-node", severity: "error", message: "Node is not an object with a string `component`" });
24
+ return { component: "__invalid__" };
25
+ }
26
+ const raw = node;
27
+ const comp = schema.components[raw.component];
28
+ if (!comp) {
29
+ issues.push({
30
+ path,
31
+ code: "unknown-component",
32
+ severity: "error",
33
+ message: `Unknown component "${raw.component}" — props/children stripped; renders as placeholder`,
34
+ });
35
+ return { component: raw.component, ...(raw.id ? { id: raw.id } : {}) };
36
+ }
37
+ const props = sanitizeProps(raw.props, comp, schema, path, issues);
38
+ // Fill required props that have a schema default; flag the rest.
39
+ for (const [name, ps] of Object.entries(comp.props)) {
40
+ if (!ps.required || props[name] !== undefined)
41
+ continue;
42
+ if (ps.default !== undefined) {
43
+ props[name] = ps.default;
44
+ issues.push({
45
+ path: `${path}.props.${name}`,
46
+ code: "applied-default",
47
+ severity: "warning",
48
+ message: `Required prop "${name}" missing — applied default ${JSON.stringify(ps.default)}`,
49
+ });
50
+ }
51
+ else {
52
+ issues.push({
53
+ path: `${path}.props.${name}`,
54
+ code: "missing-required",
55
+ severity: "error",
56
+ message: `Required prop "${name}" is missing`,
57
+ });
58
+ }
59
+ }
60
+ let children;
61
+ if (Array.isArray(raw.children) && raw.children.length) {
62
+ if (comp.role !== "container") {
63
+ issues.push({
64
+ path: `${path}.children`,
65
+ code: "children-ignored",
66
+ severity: "warning",
67
+ message: `"${raw.component}" is not a container — children removed`,
68
+ });
69
+ }
70
+ else {
71
+ children = raw.children.map((c, i) => validateNode(c, schema, `${path}.children[${i}]`, issues));
72
+ }
73
+ }
74
+ let actions;
75
+ if (raw.actions && typeof raw.actions === "object") {
76
+ for (const [key, descriptor] of Object.entries(raw.actions)) {
77
+ if (descriptor && typeof descriptor === "object" && typeof descriptor.type === "string") {
78
+ (actions !== null && actions !== void 0 ? actions : (actions = {}))[key] = {
79
+ type: descriptor.type,
80
+ ...(descriptor.payload !== undefined ? { payload: descriptor.payload } : {}),
81
+ };
82
+ }
83
+ else {
84
+ issues.push({
85
+ path: `${path}.actions.${key}`,
86
+ code: "invalid-action",
87
+ severity: "warning",
88
+ message: `Action "${key}" must be { type: string, payload? } — removed`,
89
+ });
90
+ }
91
+ }
92
+ }
93
+ return {
94
+ component: raw.component,
95
+ ...(raw.id ? { id: raw.id } : {}),
96
+ ...(raw.sizeHint ? { sizeHint: raw.sizeHint } : {}),
97
+ ...(Object.keys(props).length ? { props } : {}),
98
+ ...(children ? { children } : {}),
99
+ ...(actions ? { actions } : {}),
100
+ };
101
+ }
102
+ function sanitizeProps(rawProps, comp, schema, path, issues) {
103
+ const out = {};
104
+ for (const [key, value] of Object.entries(rawProps !== null && rawProps !== void 0 ? rawProps : {})) {
105
+ const propPath = `${path}.props.${key}`;
106
+ if (BLOCKED_PROPS.has(key) || isHandler(key)) {
107
+ issues.push({
108
+ path: propPath,
109
+ code: "blocked-prop",
110
+ severity: "warning",
111
+ message: `"${key}" is not accepted from a spec (injection guard) — removed`,
112
+ });
113
+ continue;
114
+ }
115
+ const ps = comp.props[key];
116
+ if (!ps) {
117
+ issues.push({
118
+ path: propPath,
119
+ code: "unknown-prop",
120
+ severity: "warning",
121
+ message: `"${key}" is not in the contract — removed (allow-list)`,
122
+ });
123
+ continue;
124
+ }
125
+ const checked = checkValue(key, value, ps, schema, propPath, issues);
126
+ if (checked !== undefined)
127
+ out[key] = checked;
128
+ }
129
+ return out;
130
+ }
131
+ function checkValue(key, value, ps, schema, path, issues) {
132
+ var _a, _b;
133
+ const drop = (message, code = "invalid-value") => {
134
+ if (ps.default !== undefined) {
135
+ issues.push({ path, code, severity: "warning", message: `${message} — replaced with default ${JSON.stringify(ps.default)}` });
136
+ return ps.default;
137
+ }
138
+ issues.push({ path, code, severity: "warning", message: `${message} — removed` });
139
+ return undefined;
140
+ };
141
+ switch (ps.kind) {
142
+ case "enum": {
143
+ const options = (_a = ps.options) !== null && _a !== void 0 ? _a : [];
144
+ if (options.includes(value))
145
+ return value;
146
+ if (typeof value === "string") {
147
+ const ci = options.find((o) => typeof o === "string" && o.toLowerCase() === value.toLowerCase());
148
+ if (ci !== undefined) {
149
+ issues.push({ path, code: "coerced-value", severity: "warning", message: `"${value}" coerced to "${ci}"` });
150
+ return ci;
151
+ }
152
+ const num = Number(value);
153
+ if (!Number.isNaN(num) && options.includes(num)) {
154
+ issues.push({ path, code: "coerced-value", severity: "warning", message: `"${value}" coerced to ${num}` });
155
+ return num;
156
+ }
157
+ }
158
+ return drop(`${JSON.stringify(value)} is not one of ${JSON.stringify(options)}`, "invalid-enum");
159
+ }
160
+ case "boolean": {
161
+ if (typeof value === "boolean")
162
+ return value;
163
+ if (value === "true" || value === "false") {
164
+ issues.push({ path, code: "coerced-value", severity: "warning", message: `"${value}" coerced to boolean` });
165
+ return value === "true";
166
+ }
167
+ return drop(`Expected boolean, got ${JSON.stringify(value)}`);
168
+ }
169
+ case "number": {
170
+ if (typeof value === "number")
171
+ return value;
172
+ if (typeof value === "string" && value.trim() !== "" && !Number.isNaN(Number(value))) {
173
+ issues.push({ path, code: "coerced-value", severity: "warning", message: `"${value}" coerced to number` });
174
+ return Number(value);
175
+ }
176
+ return drop(`Expected number, got ${JSON.stringify(value)}`);
177
+ }
178
+ case "string":
179
+ case "text": {
180
+ if (typeof value === "string")
181
+ return value;
182
+ if (typeof value === "number" || typeof value === "boolean") {
183
+ issues.push({ path, code: "coerced-value", severity: "warning", message: `${JSON.stringify(value)} coerced to string` });
184
+ return String(value);
185
+ }
186
+ return drop(`Expected string, got ${JSON.stringify(value)}`);
187
+ }
188
+ case "union": {
189
+ const types = (_b = ps.types) !== null && _b !== void 0 ? _b : [];
190
+ if (types.includes(typeof value))
191
+ return value;
192
+ if (types.includes("number") && typeof value === "string" && value.trim() !== "" && !Number.isNaN(Number(value))) {
193
+ issues.push({ path, code: "coerced-value", severity: "warning", message: `"${value}" coerced to number` });
194
+ return Number(value);
195
+ }
196
+ if (types.includes("string") && (typeof value === "number" || typeof value === "boolean")) {
197
+ issues.push({ path, code: "coerced-value", severity: "warning", message: `${JSON.stringify(value)} coerced to string` });
198
+ return String(value);
199
+ }
200
+ return drop(`Expected ${types.join(" | ")}, got ${JSON.stringify(value)}`);
201
+ }
202
+ case "icon": {
203
+ if (typeof value !== "string")
204
+ return drop(`Icon must be a NAME string, got ${JSON.stringify(value)}`);
205
+ if (schema.icons.includes(value))
206
+ return value;
207
+ const ci = schema.icons.find((n) => n.toLowerCase() === value.toLowerCase());
208
+ if (ci) {
209
+ issues.push({ path, code: "coerced-value", severity: "warning", message: `Icon "${value}" coerced to "${ci}"` });
210
+ return ci;
211
+ }
212
+ return drop(`Unknown icon "${value}" (closed set of ${schema.icons.length})`, "invalid-enum");
213
+ }
214
+ case "shape": {
215
+ if (ps.shape === "gridCols") {
216
+ if (typeof value === "number" || (value !== null && typeof value === "object" && !Array.isArray(value)))
217
+ return value;
218
+ return drop(`Expected a number or breakpoint map, got ${JSON.stringify(value)}`, "invalid-shape");
219
+ }
220
+ if (ps.shape === "chartConfig" || ps.shape === "donutColors") {
221
+ if (value !== null && typeof value === "object" && !Array.isArray(value))
222
+ return value;
223
+ return drop(`Expected an object, got ${JSON.stringify(value)}`, "invalid-shape");
224
+ }
225
+ // every other shape is an array of objects
226
+ if (!Array.isArray(value))
227
+ return drop(`Expected an array, got ${JSON.stringify(value)}`, "invalid-shape");
228
+ const cleaned = value.filter((item) => item !== null && typeof item === "object" && !Array.isArray(item));
229
+ if (cleaned.length !== value.length) {
230
+ issues.push({
231
+ path,
232
+ code: "invalid-shape",
233
+ severity: "warning",
234
+ message: `${value.length - cleaned.length} non-object item(s) removed from "${key}"`,
235
+ });
236
+ }
237
+ // strip blocked/handler keys inside structured items (injection guard at depth)
238
+ return cleaned.map((item) => {
239
+ const obj = item;
240
+ const next = {};
241
+ for (const [k, v] of Object.entries(obj)) {
242
+ if (BLOCKED_PROPS.has(k) || isHandler(k)) {
243
+ issues.push({
244
+ path: `${path}.${k}`,
245
+ code: "blocked-prop",
246
+ severity: "warning",
247
+ message: `"${k}" inside "${key}" removed (injection guard)`,
248
+ });
249
+ continue;
250
+ }
251
+ next[k] = v;
252
+ }
253
+ return next;
254
+ });
255
+ }
256
+ }
257
+ }
258
+
259
+ export { validate };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { AppShellProps } from "./AppShell.types";
3
+ export declare const AppShell: React.ForwardRefExoticComponent<AppShellProps & React.RefAttributes<HTMLDivElement>> & {
4
+ Topbar: React.ForwardRefExoticComponent<import("./AppShell.types").AppShellTopbarProps & React.RefAttributes<HTMLElement>>;
5
+ Sidebar: React.ForwardRefExoticComponent<import("./AppShell.types").AppShellSidebarProps & React.RefAttributes<HTMLElement>>;
6
+ Header: React.ForwardRefExoticComponent<import("./AppShell.types").AppShellHeaderProps & React.RefAttributes<HTMLElement>>;
7
+ Main: React.ForwardRefExoticComponent<import("./AppShell.types").AppShellMainProps & React.RefAttributes<HTMLElement>>;
8
+ RightPanel: React.ForwardRefExoticComponent<import("./AppShell.types").AppShellRightPanelProps & React.RefAttributes<HTMLElement>>;
9
+ Footer: React.ForwardRefExoticComponent<import("./AppShell.types").AppShellFooterProps & React.RefAttributes<HTMLElement>>;
10
+ };
@@ -0,0 +1,84 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+ import { cn } from '../../../utils/cn.js';
4
+ import { getAppShellTheme } from './AppShell.theme.js';
5
+ import { AppShellProvider } from './AppShellContext.js';
6
+ import { AppShellTopbar } from './AppShellTopbar.js';
7
+ import { AppShellSidebar } from './AppShellSidebar.js';
8
+ import { AppShellHeader } from './AppShellHeader.js';
9
+ import { AppShellMain } from './AppShellMain.js';
10
+ import { AppShellRightPanel } from './AppShellRightPanel.js';
11
+ import { AppShellFooter } from './AppShellFooter.js';
12
+
13
+ const AppShellRoot = React__default.forwardRef(({ className, theme: customTheme, scroll = "viewport", topbarSpan = "full", footerSpan = "full", contentWidth = "full", contentPadding = "md", children, ...props }, ref) => {
14
+ const theme = getAppShellTheme(customTheme);
15
+ const contextValue = React__default.useMemo(() => ({ scroll, contentWidth, contentPadding }), [scroll, contentWidth, contentPadding]);
16
+ // Bucket children by slot type. Header is intentionally NOT bucketed —
17
+ // it is user-composed inside AppShell.Main.
18
+ let topbar = null;
19
+ let sidebar = null;
20
+ let main = null;
21
+ let rightPanel = null;
22
+ let footer = null;
23
+ React__default.Children.forEach(children, (child) => {
24
+ if (!React__default.isValidElement(child))
25
+ return;
26
+ const type = child.type;
27
+ if (type === AppShellTopbar) {
28
+ if (topbar === null)
29
+ topbar = child;
30
+ else if (process.env.NODE_ENV !== "production") {
31
+ console.warn("[AppShell]: multiple AppShell.Topbar children; keeping the first.");
32
+ }
33
+ }
34
+ else if (type === AppShellSidebar) {
35
+ if (sidebar === null)
36
+ sidebar = child;
37
+ else if (process.env.NODE_ENV !== "production") {
38
+ console.warn("[AppShell]: multiple AppShell.Sidebar children; keeping the first.");
39
+ }
40
+ }
41
+ else if (type === AppShellMain) {
42
+ if (main === null)
43
+ main = child;
44
+ else if (process.env.NODE_ENV !== "production") {
45
+ console.warn("[AppShell]: multiple AppShell.Main children; keeping the first.");
46
+ }
47
+ }
48
+ else if (type === AppShellRightPanel) {
49
+ if (rightPanel === null)
50
+ rightPanel = child;
51
+ else if (process.env.NODE_ENV !== "production") {
52
+ console.warn("[AppShell]: multiple AppShell.RightPanel children; keeping the first.");
53
+ }
54
+ }
55
+ else if (type === AppShellFooter) {
56
+ if (footer === null)
57
+ footer = child;
58
+ else if (process.env.NODE_ENV !== "production") {
59
+ console.warn("[AppShell]: multiple AppShell.Footer children; keeping the first.");
60
+ }
61
+ }
62
+ else if (process.env.NODE_ENV !== "production") {
63
+ console.warn("[AppShell]: unknown child rendered; expected one of " +
64
+ "AppShell.Topbar / Sidebar / Main / RightPanel / Footer. " +
65
+ "AppShell.Header is composed inside AppShell.Main.");
66
+ }
67
+ });
68
+ const topbarInChrome = topbar !== null && topbarSpan === "full";
69
+ const topbarInMain = topbar !== null && topbarSpan === "main";
70
+ const footerInChrome = footer !== null && footerSpan === "full";
71
+ const footerInMain = footer !== null && footerSpan === "main";
72
+ return (jsx(AppShellProvider, { value: contextValue, children: jsxs("div", { ref: ref, className: cn(theme.root, scroll === "viewport" && theme.rootViewport, className), ...props, children: [topbarInChrome && topbar, jsxs("div", { className: theme.shell, children: [sidebar, jsxs("div", { className: theme.mainColumn, children: [topbarInMain && topbar, main, footerInMain && footer] }), rightPanel] }), footerInChrome && footer] }) }));
73
+ });
74
+ AppShellRoot.displayName = "AppShell";
75
+ const AppShell = Object.assign(AppShellRoot, {
76
+ Topbar: AppShellTopbar,
77
+ Sidebar: AppShellSidebar,
78
+ Header: AppShellHeader,
79
+ Main: AppShellMain,
80
+ RightPanel: AppShellRightPanel,
81
+ Footer: AppShellFooter,
82
+ });
83
+
84
+ export { AppShell };
@@ -0,0 +1,3 @@
1
+ import type { AppShellTheme, AppShellThemeOverrides } from "./AppShell.types";
2
+ export declare const appShellTheme: AppShellTheme;
3
+ export declare const getAppShellTheme: (customTheme?: AppShellThemeOverrides) => AppShellTheme;
@@ -0,0 +1,42 @@
1
+ const appShellTheme = {
2
+ root: "flex flex-col bg-[var(--color-background)] text-[var(--color-text-primary)]",
3
+ rootViewport: "h-screen overflow-hidden",
4
+ shell: "flex flex-1 min-h-0 min-w-0",
5
+ mainColumn: "flex flex-col flex-1 min-h-0 min-w-0",
6
+ topbar: "shrink-0 border-b border-[var(--color-border)] bg-[var(--color-background)]/90 backdrop-blur supports-[backdrop-filter]:bg-[var(--color-background)]/75",
7
+ sidebar: "flex flex-col shrink-0 overflow-hidden",
8
+ sidebarScroll: "min-h-0 flex-1",
9
+ sidebarCollapsed: "hidden lg:flex",
10
+ header: "shrink-0 border-b border-[var(--color-border)] bg-[var(--color-background)]/90 backdrop-blur supports-[backdrop-filter]:bg-[var(--color-background)]/75",
11
+ main: "flex flex-col flex-1 min-h-0 min-w-0",
12
+ mainScroll: "min-h-0 flex-1",
13
+ mainInner: "mx-auto w-full",
14
+ rightPanel: "flex flex-col shrink-0 overflow-hidden border-l border-[var(--color-border)]",
15
+ rightPanelScroll: "min-h-0 flex-1",
16
+ footer: "shrink-0 border-t border-[var(--color-border)] bg-[var(--color-background)]/90 backdrop-blur supports-[backdrop-filter]:bg-[var(--color-background)]/75",
17
+ contentPadding: {
18
+ none: "p-0",
19
+ sm: "p-3 sm:p-4",
20
+ md: "p-4 sm:p-6 lg:p-8",
21
+ lg: "p-5 sm:p-8 lg:p-10",
22
+ },
23
+ contentWidth: {
24
+ full: "max-w-none",
25
+ wide: "max-w-7xl",
26
+ contained: "max-w-5xl",
27
+ },
28
+ };
29
+ const getAppShellTheme = (customTheme) => ({
30
+ ...appShellTheme,
31
+ ...customTheme,
32
+ contentPadding: {
33
+ ...appShellTheme.contentPadding,
34
+ ...customTheme === null || customTheme === void 0 ? void 0 : customTheme.contentPadding,
35
+ },
36
+ contentWidth: {
37
+ ...appShellTheme.contentWidth,
38
+ ...customTheme === null || customTheme === void 0 ? void 0 : customTheme.contentWidth,
39
+ },
40
+ });
41
+
42
+ export { appShellTheme, getAppShellTheme };
@@ -0,0 +1,127 @@
1
+ import React from "react";
2
+ export type AppShellScroll = "viewport" | "page";
3
+ export type AppShellSpan = "full" | "main";
4
+ export type AppShellContentWidth = "full" | "wide" | "contained";
5
+ export type AppShellContentPadding = "none" | "sm" | "md" | "lg";
6
+ export interface AppShellTheme {
7
+ /** Outer root container (column layout). */
8
+ root: string;
9
+ /** Extra classes applied when `scroll="viewport"`. */
10
+ rootViewport: string;
11
+ /** Row container holding sidebar / main column / right panel. */
12
+ shell: string;
13
+ /** The middle column (Topbar-in-main? Main, Footer-in-main?). */
14
+ mainColumn: string;
15
+ topbar: string;
16
+ sidebar: string;
17
+ sidebarScroll: string;
18
+ sidebarCollapsed: string;
19
+ header: string;
20
+ main: string;
21
+ mainScroll: string;
22
+ mainInner: string;
23
+ rightPanel: string;
24
+ rightPanelScroll: string;
25
+ footer: string;
26
+ contentPadding: Record<AppShellContentPadding, string>;
27
+ contentWidth: Record<AppShellContentWidth, string>;
28
+ }
29
+ export interface AppShellThemeOverrides {
30
+ root?: string;
31
+ rootViewport?: string;
32
+ shell?: string;
33
+ mainColumn?: string;
34
+ topbar?: string;
35
+ sidebar?: string;
36
+ sidebarScroll?: string;
37
+ sidebarCollapsed?: string;
38
+ header?: string;
39
+ main?: string;
40
+ mainScroll?: string;
41
+ mainInner?: string;
42
+ rightPanel?: string;
43
+ rightPanelScroll?: string;
44
+ footer?: string;
45
+ contentPadding?: Partial<Record<AppShellContentPadding, string>>;
46
+ contentWidth?: Partial<Record<AppShellContentWidth, string>>;
47
+ }
48
+ export interface AppShellProps extends React.HTMLAttributes<HTMLDivElement> {
49
+ /**
50
+ * Scroll model. `"viewport"` makes the root `h-screen overflow-hidden`
51
+ * and only `Main` scrolls. `"page"` lets the whole document scroll.
52
+ * @default "viewport"
53
+ */
54
+ scroll?: AppShellScroll;
55
+ /**
56
+ * Whether the Topbar spans the full viewport width (over the Sidebar)
57
+ * or only sits above Main + RightPanel.
58
+ * @default "full"
59
+ */
60
+ topbarSpan?: AppShellSpan;
61
+ /**
62
+ * Whether the Footer spans the full viewport width (under the Sidebar)
63
+ * or only sits below Main + RightPanel.
64
+ * @default "full"
65
+ */
66
+ footerSpan?: AppShellSpan;
67
+ /**
68
+ * Max content width applied to AppShell.Main when not overridden.
69
+ * @default "full"
70
+ */
71
+ contentWidth?: AppShellContentWidth;
72
+ /**
73
+ * Responsive content padding applied to AppShell.Main when not overridden.
74
+ * @default "md"
75
+ */
76
+ contentPadding?: AppShellContentPadding;
77
+ /**
78
+ * Theme overrides for the AppShell root wrapper (root, shell, mainColumn).
79
+ * Style individual slots via their own `theme` props on each sub-component.
80
+ */
81
+ theme?: AppShellThemeOverrides;
82
+ }
83
+ export interface AppShellTopbarProps extends React.HTMLAttributes<HTMLElement> {
84
+ /** Stick to top of chrome. Only meaningful when `scroll="page"`. @default true */
85
+ sticky?: boolean;
86
+ /** Theme overrides. */
87
+ theme?: AppShellThemeOverrides;
88
+ }
89
+ export interface AppShellSidebarProps extends React.HTMLAttributes<HTMLElement> {
90
+ /** CSS width value. @default "16rem" */
91
+ width?: string;
92
+ /** Hide on mobile (below `lg`). @default true */
93
+ collapsedOnMobile?: boolean;
94
+ /** Theme overrides. */
95
+ theme?: AppShellThemeOverrides;
96
+ }
97
+ export interface AppShellHeaderProps extends React.HTMLAttributes<HTMLElement> {
98
+ /**
99
+ * Stick to top of the scrolling Main region. Header sticks at its position
100
+ * inside Main's content padding; for a flush edge-to-edge sticky bar, use
101
+ * AppShell.Topbar instead.
102
+ * @default true
103
+ */
104
+ sticky?: boolean;
105
+ /** Theme overrides. */
106
+ theme?: AppShellThemeOverrides;
107
+ }
108
+ export interface AppShellMainProps extends React.HTMLAttributes<HTMLElement> {
109
+ /** Max content width. Inherits from AppShell when omitted. */
110
+ contentWidth?: AppShellContentWidth;
111
+ /** Responsive padding. Inherits from AppShell when omitted. */
112
+ contentPadding?: AppShellContentPadding;
113
+ /** Theme overrides. */
114
+ theme?: AppShellThemeOverrides;
115
+ }
116
+ export interface AppShellRightPanelProps extends React.HTMLAttributes<HTMLElement> {
117
+ /** CSS width value. @default "20rem" */
118
+ width?: string;
119
+ /** Theme overrides. */
120
+ theme?: AppShellThemeOverrides;
121
+ }
122
+ export interface AppShellFooterProps extends React.HTMLAttributes<HTMLElement> {
123
+ /** Stick to bottom of chrome. Only meaningful when `scroll="page"`. @default true */
124
+ sticky?: boolean;
125
+ /** Theme overrides. */
126
+ theme?: AppShellThemeOverrides;
127
+ }
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import type { AppShellContentPadding, AppShellContentWidth, AppShellScroll } from "./AppShell.types";
3
+ export interface AppShellContextValue {
4
+ scroll: AppShellScroll;
5
+ contentWidth: AppShellContentWidth;
6
+ contentPadding: AppShellContentPadding;
7
+ }
8
+ export declare const AppShellProvider: React.Provider<AppShellContextValue | undefined>;
9
+ /**
10
+ * Reads AppShell root context. Returns sensible defaults when used outside
11
+ * an `<AppShell>` (so individual slot components remain usable standalone
12
+ * for testing or partial composition).
13
+ */
14
+ export declare const useAppShellContext: () => AppShellContextValue;
@@ -0,0 +1,19 @@
1
+ import React__default from 'react';
2
+
3
+ const AppShellContext = React__default.createContext(undefined);
4
+ const AppShellProvider = AppShellContext.Provider;
5
+ /**
6
+ * Reads AppShell root context. Returns sensible defaults when used outside
7
+ * an `<AppShell>` (so individual slot components remain usable standalone
8
+ * for testing or partial composition).
9
+ */
10
+ const useAppShellContext = () => {
11
+ const ctx = React__default.useContext(AppShellContext);
12
+ return (ctx !== null && ctx !== void 0 ? ctx : {
13
+ scroll: "viewport",
14
+ contentWidth: "full",
15
+ contentPadding: "md",
16
+ });
17
+ };
18
+
19
+ export { AppShellProvider, useAppShellContext };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { AppShellFooterProps } from "./AppShell.types";
3
+ export declare const AppShellFooter: React.ForwardRefExoticComponent<AppShellFooterProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,12 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+ import { cn } from '../../../utils/cn.js';
4
+ import { getAppShellTheme } from './AppShell.theme.js';
5
+
6
+ const AppShellFooter = React__default.forwardRef(({ sticky = true, className, theme: customTheme, children, ...props }, ref) => {
7
+ const theme = getAppShellTheme(customTheme);
8
+ return (jsx("footer", { ref: ref, className: cn(theme.footer, sticky && "sticky bottom-0 z-20", className), ...props, children: children }));
9
+ });
10
+ AppShellFooter.displayName = "AppShell.Footer";
11
+
12
+ export { AppShellFooter };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { AppShellHeaderProps } from "./AppShell.types";
3
+ export declare const AppShellHeader: React.ForwardRefExoticComponent<AppShellHeaderProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,12 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+ import { cn } from '../../../utils/cn.js';
4
+ import { getAppShellTheme } from './AppShell.theme.js';
5
+
6
+ const AppShellHeader = React__default.forwardRef(({ sticky = true, className, theme: customTheme, children, ...props }, ref) => {
7
+ const theme = getAppShellTheme(customTheme);
8
+ return (jsx("header", { ref: ref, className: cn(theme.header, sticky && "sticky top-0 z-10", className), ...props, children: children }));
9
+ });
10
+ AppShellHeader.displayName = "AppShell.Header";
11
+
12
+ export { AppShellHeader };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { AppShellMainProps } from "./AppShell.types";
3
+ export declare const AppShellMain: React.ForwardRefExoticComponent<AppShellMainProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,19 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+ import { cn } from '../../../utils/cn.js';
4
+ import { ScrollArea } from '../../core/ScrollArea/ScrollArea.js';
5
+ import '../../core/ScrollArea/smooth/SmoothScrollEngine.js';
6
+ import { getAppShellTheme } from './AppShell.theme.js';
7
+ import { useAppShellContext } from './AppShellContext.js';
8
+
9
+ const AppShellMain = React__default.forwardRef(({ className, theme: customTheme, contentWidth, contentPadding, children, ...props }, ref) => {
10
+ const theme = getAppShellTheme(customTheme);
11
+ const ctx = useAppShellContext();
12
+ const resolvedWidth = contentWidth !== null && contentWidth !== void 0 ? contentWidth : ctx.contentWidth;
13
+ const resolvedPadding = contentPadding !== null && contentPadding !== void 0 ? contentPadding : ctx.contentPadding;
14
+ const inner = (jsx("div", { className: cn(theme.mainInner, theme.contentWidth[resolvedWidth], theme.contentPadding[resolvedPadding]), children: children }));
15
+ return (jsx("main", { ref: ref, className: cn(theme.main, className), ...props, children: ctx.scroll === "viewport" ? (jsx(ScrollArea, { type: "hover", size: "thin", className: theme.mainScroll, children: inner })) : (inner) }));
16
+ });
17
+ AppShellMain.displayName = "AppShell.Main";
18
+
19
+ export { AppShellMain };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { AppShellRightPanelProps } from "./AppShell.types";
3
+ export declare const AppShellRightPanel: React.ForwardRefExoticComponent<AppShellRightPanelProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,16 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+ import { cn } from '../../../utils/cn.js';
4
+ import { ScrollArea } from '../../core/ScrollArea/ScrollArea.js';
5
+ import '../../core/ScrollArea/smooth/SmoothScrollEngine.js';
6
+ import { getAppShellTheme } from './AppShell.theme.js';
7
+ import { useAppShellContext } from './AppShellContext.js';
8
+
9
+ const AppShellRightPanel = React__default.forwardRef(({ width = "20rem", className, theme: customTheme, style, children, "aria-label": ariaLabel = "Secondary", ...props }, ref) => {
10
+ const theme = getAppShellTheme(customTheme);
11
+ const ctx = useAppShellContext();
12
+ return (jsx("aside", { ref: ref, "aria-label": ariaLabel, className: cn(theme.rightPanel, className), style: { width, ...style }, ...props, children: ctx.scroll === "viewport" ? (jsx(ScrollArea, { type: "hover", size: "thin", className: theme.rightPanelScroll, children: children })) : (children) }));
13
+ });
14
+ AppShellRightPanel.displayName = "AppShell.RightPanel";
15
+
16
+ export { AppShellRightPanel };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { AppShellSidebarProps } from "./AppShell.types";
3
+ export declare const AppShellSidebar: React.ForwardRefExoticComponent<AppShellSidebarProps & React.RefAttributes<HTMLElement>>;