@vezham/react 26.0.0-alpha.5 → 26.0.0-alpha.6

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 (436) hide show
  1. package/README.md +2 -0
  2. package/dist/index.css +1 -0
  3. package/dist/index.d.ts +6 -1
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +5 -0
  6. package/dist/lib/components/actions-header/index.d.ts +26 -0
  7. package/dist/lib/components/actions-header/index.d.ts.map +1 -0
  8. package/dist/lib/components/actions-header/index.js +126 -0
  9. package/dist/lib/components/app-icon/index.d.ts +499 -0
  10. package/dist/lib/components/app-icon/index.d.ts.map +1 -0
  11. package/dist/lib/components/app-icon/index.js +513 -0
  12. package/dist/lib/components/app-menu/index.d.ts +22 -0
  13. package/dist/lib/components/app-menu/index.d.ts.map +1 -0
  14. package/dist/lib/components/app-menu/index.js +17 -0
  15. package/dist/lib/components/command/command-dialog.d.ts +10 -0
  16. package/dist/lib/components/command/command-dialog.d.ts.map +1 -0
  17. package/dist/lib/components/command/command-dialog.js +129 -0
  18. package/dist/lib/components/command/command-provider.d.ts +8 -0
  19. package/dist/lib/components/command/command-provider.d.ts.map +1 -0
  20. package/dist/lib/components/command/command-provider.js +44 -0
  21. package/dist/lib/components/command/index.d.ts +3 -0
  22. package/dist/lib/components/command/index.d.ts.map +1 -0
  23. package/dist/lib/components/command/index.js +3 -0
  24. package/dist/lib/components/menu/drawer.d.ts +4 -0
  25. package/dist/lib/components/menu/drawer.d.ts.map +1 -0
  26. package/dist/lib/components/menu/drawer.js +56 -0
  27. package/dist/lib/components/menu/index.d.ts +5 -0
  28. package/dist/lib/components/menu/index.d.ts.map +1 -0
  29. package/dist/lib/components/menu/index.js +138 -0
  30. package/dist/lib/components/menu/sheet.d.ts +15 -0
  31. package/dist/lib/components/menu/sheet.d.ts.map +1 -0
  32. package/dist/lib/components/menu/sheet.js +40 -0
  33. package/dist/lib/components/menu/types.d.ts +30 -0
  34. package/dist/lib/components/menu/types.d.ts.map +1 -0
  35. package/dist/lib/components/menu/types.js +7 -0
  36. package/dist/lib/components/menu/variant.d.ts +27 -0
  37. package/dist/lib/components/menu/variant.d.ts.map +1 -0
  38. package/dist/lib/components/menu/variant.js +28 -0
  39. package/dist/lib/components/mobile-controls/index.d.ts +11 -0
  40. package/dist/lib/components/mobile-controls/index.d.ts.map +1 -0
  41. package/dist/lib/components/mobile-controls/index.js +21 -0
  42. package/dist/lib/components/pagination/index.d.ts +10 -0
  43. package/dist/lib/components/pagination/index.d.ts.map +1 -0
  44. package/dist/lib/components/pagination/index.js +25 -0
  45. package/dist/lib/components/panel/footer/ai/chat-header.d.ts +9 -0
  46. package/dist/lib/components/panel/footer/ai/chat-header.d.ts.map +1 -0
  47. package/dist/lib/components/panel/footer/ai/chat-header.js +63 -0
  48. package/dist/lib/components/panel/footer/ai/composer.d.ts +7 -0
  49. package/dist/lib/components/panel/footer/ai/composer.d.ts.map +1 -0
  50. package/dist/lib/components/panel/footer/ai/composer.js +77 -0
  51. package/dist/lib/components/panel/footer/ai/content.d.ts +13 -0
  52. package/dist/lib/components/panel/footer/ai/content.d.ts.map +1 -0
  53. package/dist/lib/components/panel/footer/ai/content.js +148 -0
  54. package/dist/lib/components/panel/footer/ai/conversation.d.ts +47 -0
  55. package/dist/lib/components/panel/footer/ai/conversation.d.ts.map +1 -0
  56. package/dist/lib/components/panel/footer/ai/conversation.js +222 -0
  57. package/dist/lib/components/panel/footer/ai/index.d.ts +3 -0
  58. package/dist/lib/components/panel/footer/ai/index.d.ts.map +1 -0
  59. package/dist/lib/components/panel/footer/ai/index.js +41 -0
  60. package/dist/lib/components/panel/footer/ai/message-actions.d.ts +8 -0
  61. package/dist/lib/components/panel/footer/ai/message-actions.d.ts.map +1 -0
  62. package/dist/lib/components/panel/footer/ai/message-actions.js +63 -0
  63. package/dist/lib/components/panel/footer/ai/mock-result.d.ts +6 -0
  64. package/dist/lib/components/panel/footer/ai/mock-result.d.ts.map +1 -0
  65. package/dist/lib/components/panel/footer/ai/mock-result.js +121 -0
  66. package/dist/lib/components/panel/footer/ai/model-logo.d.ts +5 -0
  67. package/dist/lib/components/panel/footer/ai/model-logo.d.ts.map +1 -0
  68. package/dist/lib/components/panel/footer/ai/model-logo.js +13 -0
  69. package/dist/lib/components/panel/footer/ai/model-logos.d.ts +2 -0
  70. package/dist/lib/components/panel/footer/ai/model-logos.d.ts.map +1 -0
  71. package/dist/lib/components/panel/footer/ai/model-logos.js +10 -0
  72. package/dist/lib/components/panel/footer/ai/model-picker.d.ts +8 -0
  73. package/dist/lib/components/panel/footer/ai/model-picker.d.ts.map +1 -0
  74. package/dist/lib/components/panel/footer/ai/model-picker.js +166 -0
  75. package/dist/lib/components/panel/footer/ai/models.d.ts +9 -0
  76. package/dist/lib/components/panel/footer/ai/models.d.ts.map +1 -0
  77. package/dist/lib/components/panel/footer/ai/models.js +72 -0
  78. package/dist/lib/components/panel/footer/ai/permission-picker.d.ts +5 -0
  79. package/dist/lib/components/panel/footer/ai/permission-picker.d.ts.map +1 -0
  80. package/dist/lib/components/panel/footer/ai/permission-picker.js +63 -0
  81. package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts +9 -0
  82. package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts.map +1 -0
  83. package/dist/lib/components/panel/footer/ai/use-chat-scroll.js +57 -0
  84. package/dist/lib/components/panel/footer/control-center/appearance.d.ts +16 -0
  85. package/dist/lib/components/panel/footer/control-center/appearance.d.ts.map +1 -0
  86. package/dist/lib/components/panel/footer/control-center/appearance.js +100 -0
  87. package/dist/lib/components/panel/footer/control-center/configured.d.ts +13 -0
  88. package/dist/lib/components/panel/footer/control-center/configured.d.ts.map +1 -0
  89. package/dist/lib/components/panel/footer/control-center/configured.js +157 -0
  90. package/dist/lib/components/panel/footer/control-center/control-center.d.ts +8 -0
  91. package/dist/lib/components/panel/footer/control-center/control-center.d.ts.map +1 -0
  92. package/dist/lib/components/panel/footer/control-center/control-center.js +180 -0
  93. package/dist/lib/components/panel/footer/control-center/default.d.ts +3 -0
  94. package/dist/lib/components/panel/footer/control-center/default.d.ts.map +1 -0
  95. package/dist/lib/components/panel/footer/control-center/default.js +37 -0
  96. package/dist/lib/components/panel/footer/control-center/direction.d.ts +9 -0
  97. package/dist/lib/components/panel/footer/control-center/direction.d.ts.map +1 -0
  98. package/dist/lib/components/panel/footer/control-center/direction.js +40 -0
  99. package/dist/lib/components/panel/footer/control-center/document.d.ts +5 -0
  100. package/dist/lib/components/panel/footer/control-center/document.d.ts.map +1 -0
  101. package/dist/lib/components/panel/footer/control-center/document.js +19 -0
  102. package/dist/lib/components/panel/footer/control-center/editor.d.ts +25 -0
  103. package/dist/lib/components/panel/footer/control-center/editor.d.ts.map +1 -0
  104. package/dist/lib/components/panel/footer/control-center/editor.js +72 -0
  105. package/dist/lib/components/panel/footer/control-center/footer-context.d.ts +6 -0
  106. package/dist/lib/components/panel/footer/control-center/footer-context.d.ts.map +1 -0
  107. package/dist/lib/components/panel/footer/control-center/footer-context.js +5 -0
  108. package/dist/lib/components/panel/footer/control-center/index.d.ts +15 -0
  109. package/dist/lib/components/panel/footer/control-center/index.d.ts.map +1 -0
  110. package/dist/lib/components/panel/footer/control-center/index.js +11 -0
  111. package/dist/lib/components/panel/footer/control-center/language.d.ts +19 -0
  112. package/dist/lib/components/panel/footer/control-center/language.d.ts.map +1 -0
  113. package/dist/lib/components/panel/footer/control-center/language.js +44 -0
  114. package/dist/lib/components/panel/footer/control-center/options.d.ts +7 -0
  115. package/dist/lib/components/panel/footer/control-center/options.d.ts.map +1 -0
  116. package/dist/lib/components/panel/footer/control-center/options.js +27 -0
  117. package/dist/lib/components/panel/footer/control-center/preview.d.ts +34 -0
  118. package/dist/lib/components/panel/footer/control-center/preview.d.ts.map +1 -0
  119. package/dist/lib/components/panel/footer/control-center/preview.js +366 -0
  120. package/dist/lib/components/panel/footer/control-center/theme.d.ts +6 -0
  121. package/dist/lib/components/panel/footer/control-center/theme.d.ts.map +1 -0
  122. package/dist/lib/components/panel/footer/control-center/theme.js +150 -0
  123. package/dist/lib/components/panel/footer/control-center/tile.d.ts +10 -0
  124. package/dist/lib/components/panel/footer/control-center/tile.d.ts.map +1 -0
  125. package/dist/lib/components/panel/footer/control-center/tile.js +34 -0
  126. package/dist/lib/components/panel/footer/control-center/types.d.ts +94 -0
  127. package/dist/lib/components/panel/footer/control-center/types.d.ts.map +1 -0
  128. package/dist/lib/components/panel/footer/control-center/variant.d.ts +268 -0
  129. package/dist/lib/components/panel/footer/control-center/variant.d.ts.map +1 -0
  130. package/dist/lib/components/panel/footer/control-center/variant.js +89 -0
  131. package/dist/lib/components/panel/footer/data.d.ts +38 -0
  132. package/dist/lib/components/panel/footer/data.d.ts.map +1 -0
  133. package/dist/lib/components/panel/footer/data.js +90 -0
  134. package/dist/lib/components/panel/footer/drawer-accessors.d.ts +46 -0
  135. package/dist/lib/components/panel/footer/drawer-accessors.d.ts.map +1 -0
  136. package/dist/lib/components/panel/footer/drawer-accessors.js +21 -0
  137. package/dist/lib/components/panel/footer/drawer-frame.d.ts +12 -0
  138. package/dist/lib/components/panel/footer/drawer-frame.d.ts.map +1 -0
  139. package/dist/lib/components/panel/footer/drawer-frame.js +19 -0
  140. package/dist/lib/components/panel/footer/index.d.ts +4 -0
  141. package/dist/lib/components/panel/footer/index.d.ts.map +1 -0
  142. package/dist/lib/components/panel/footer/index.js +147 -0
  143. package/dist/lib/components/panel/footer/notification-center/index.d.ts +4 -0
  144. package/dist/lib/components/panel/footer/notification-center/index.d.ts.map +1 -0
  145. package/dist/lib/components/panel/footer/notification-center/index.js +98 -0
  146. package/dist/lib/components/panel/footer/notification-center/types.d.ts +525 -0
  147. package/dist/lib/components/panel/footer/notification-center/types.d.ts.map +1 -0
  148. package/dist/lib/components/panel/footer/notification-center/types.js +62 -0
  149. package/dist/lib/components/panel/footer/notification-center/variant.d.ts +322 -0
  150. package/dist/lib/components/panel/footer/notification-center/variant.d.ts.map +1 -0
  151. package/dist/lib/components/panel/footer/notification-center/variant.js +119 -0
  152. package/dist/lib/components/panel/footer/notification-center/widget-tiles.d.ts +49 -0
  153. package/dist/lib/components/panel/footer/notification-center/widget-tiles.d.ts.map +1 -0
  154. package/dist/lib/components/panel/footer/notification-center/widget-tiles.js +182 -0
  155. package/dist/lib/components/panel/footer/preferences/data.d.ts +14 -0
  156. package/dist/lib/components/panel/footer/preferences/data.d.ts.map +1 -0
  157. package/dist/lib/components/panel/footer/preferences/data.js +304 -0
  158. package/dist/lib/components/panel/footer/preferences/modal.d.ts +8 -0
  159. package/dist/lib/components/panel/footer/preferences/modal.d.ts.map +1 -0
  160. package/dist/lib/components/panel/footer/preferences/modal.js +75 -0
  161. package/dist/lib/components/panel/footer/preferences/sidebar.d.ts +9 -0
  162. package/dist/lib/components/panel/footer/preferences/sidebar.d.ts.map +1 -0
  163. package/dist/lib/components/panel/footer/preferences/sidebar.js +105 -0
  164. package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts +3 -0
  165. package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts.map +1 -0
  166. package/dist/lib/components/panel/footer/preferences/user-settings/account/index.js +16 -0
  167. package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts +3 -0
  168. package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts.map +1 -0
  169. package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.js +16 -0
  170. package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts +3 -0
  171. package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts.map +1 -0
  172. package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.js +101 -0
  173. package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts +3 -0
  174. package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts.map +1 -0
  175. package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.js +24 -0
  176. package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts +3 -0
  177. package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts.map +1 -0
  178. package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.js +103 -0
  179. package/dist/lib/components/panel/footer/tabs.d.ts +12 -0
  180. package/dist/lib/components/panel/footer/tabs.d.ts.map +1 -0
  181. package/dist/lib/components/panel/footer/tabs.js +23 -0
  182. package/dist/lib/components/panel/footer/types.d.ts +39 -0
  183. package/dist/lib/components/panel/footer/types.d.ts.map +1 -0
  184. package/dist/lib/components/panel/footer/user-menu.d.ts +10 -0
  185. package/dist/lib/components/panel/footer/user-menu.d.ts.map +1 -0
  186. package/dist/lib/components/panel/footer/user-menu.js +290 -0
  187. package/dist/lib/components/panel/header/application-menu-sheet.d.ts +21 -0
  188. package/dist/lib/components/panel/header/application-menu-sheet.d.ts.map +1 -0
  189. package/dist/lib/components/panel/header/application-menu-sheet.js +227 -0
  190. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/index.d.ts +5 -0
  191. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/index.d.ts.map +1 -0
  192. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/index.js +225 -0
  193. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/types.d.ts +13 -0
  194. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/types.d.ts.map +1 -0
  195. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/variants.d.ts +28 -0
  196. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/variants.d.ts.map +1 -0
  197. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/variants.js +249 -0
  198. package/dist/lib/components/panel/header/bookmarks/context-menu/index.d.ts +5 -0
  199. package/dist/lib/components/panel/header/bookmarks/context-menu/index.d.ts.map +1 -0
  200. package/dist/lib/components/panel/header/bookmarks/context-menu/index.js +147 -0
  201. package/dist/lib/components/panel/header/bookmarks/context-menu/types.d.ts +25 -0
  202. package/dist/lib/components/panel/header/bookmarks/context-menu/types.d.ts.map +1 -0
  203. package/dist/lib/components/panel/header/bookmarks/data.d.ts +2 -0
  204. package/dist/lib/components/panel/header/bookmarks/data.d.ts.map +1 -0
  205. package/dist/lib/components/panel/header/bookmarks/empty-state.d.ts +8 -0
  206. package/dist/lib/components/panel/header/bookmarks/empty-state.d.ts.map +1 -0
  207. package/dist/lib/components/panel/header/bookmarks/empty-state.js +15 -0
  208. package/dist/lib/components/panel/header/bookmarks/favorites/data.d.ts +2 -0
  209. package/dist/lib/components/panel/header/bookmarks/favorites/data.d.ts.map +1 -0
  210. package/dist/lib/components/panel/header/bookmarks/favorites/grid-list.d.ts +4 -0
  211. package/dist/lib/components/panel/header/bookmarks/favorites/grid-list.d.ts.map +1 -0
  212. package/dist/lib/components/panel/header/bookmarks/favorites/grid-list.js +65 -0
  213. package/dist/lib/components/panel/header/bookmarks/favorites/index.d.ts +5 -0
  214. package/dist/lib/components/panel/header/bookmarks/favorites/index.d.ts.map +1 -0
  215. package/dist/lib/components/panel/header/bookmarks/favorites/index.js +76 -0
  216. package/dist/lib/components/panel/header/bookmarks/favorites/types.d.ts +12 -0
  217. package/dist/lib/components/panel/header/bookmarks/favorites/types.d.ts.map +1 -0
  218. package/dist/lib/components/panel/header/bookmarks/favorites/variant.d.ts +211 -0
  219. package/dist/lib/components/panel/header/bookmarks/favorites/variant.d.ts.map +1 -0
  220. package/dist/lib/components/panel/header/bookmarks/favorites/variant.js +77 -0
  221. package/dist/lib/components/panel/header/bookmarks/folder-modal/index.d.ts +7 -0
  222. package/dist/lib/components/panel/header/bookmarks/folder-modal/index.d.ts.map +1 -0
  223. package/dist/lib/components/panel/header/bookmarks/folder-modal/index.js +221 -0
  224. package/dist/lib/components/panel/header/bookmarks/folder-modal/types.d.ts +25 -0
  225. package/dist/lib/components/panel/header/bookmarks/folder-modal/types.d.ts.map +1 -0
  226. package/dist/lib/components/panel/header/bookmarks/folder-modal/variants.d.ts +14 -0
  227. package/dist/lib/components/panel/header/bookmarks/folder-modal/variants.d.ts.map +1 -0
  228. package/dist/lib/components/panel/header/bookmarks/folder-modal/variants.js +95 -0
  229. package/dist/lib/components/panel/header/bookmarks/index.d.ts +5 -0
  230. package/dist/lib/components/panel/header/bookmarks/index.d.ts.map +1 -0
  231. package/dist/lib/components/panel/header/bookmarks/index.js +247 -0
  232. package/dist/lib/components/panel/header/bookmarks/membership.d.ts +14 -0
  233. package/dist/lib/components/panel/header/bookmarks/membership.d.ts.map +1 -0
  234. package/dist/lib/components/panel/header/bookmarks/membership.js +13 -0
  235. package/dist/lib/components/panel/header/bookmarks/quick-access/index.d.ts +4 -0
  236. package/dist/lib/components/panel/header/bookmarks/quick-access/index.d.ts.map +1 -0
  237. package/dist/lib/components/panel/header/bookmarks/quick-access/index.js +224 -0
  238. package/dist/lib/components/panel/header/bookmarks/quick-access/types.d.ts +38 -0
  239. package/dist/lib/components/panel/header/bookmarks/quick-access/types.d.ts.map +1 -0
  240. package/dist/lib/components/panel/header/bookmarks/shortcut-context-menu.d.ts +11 -0
  241. package/dist/lib/components/panel/header/bookmarks/shortcut-context-menu.d.ts.map +1 -0
  242. package/dist/lib/components/panel/header/bookmarks/shortcut-context-menu.js +39 -0
  243. package/dist/lib/components/panel/header/bookmarks/tree-data.d.ts +4 -0
  244. package/dist/lib/components/panel/header/bookmarks/tree-data.d.ts.map +1 -0
  245. package/dist/lib/components/panel/header/bookmarks/tree-data.js +97 -0
  246. package/dist/lib/components/panel/header/bookmarks/types.d.ts +648 -0
  247. package/dist/lib/components/panel/header/bookmarks/types.d.ts.map +1 -0
  248. package/dist/lib/components/panel/header/bookmarks/types.js +198 -0
  249. package/dist/lib/components/panel/header/bookmarks/variant.d.ts +334 -0
  250. package/dist/lib/components/panel/header/bookmarks/variant.d.ts.map +1 -0
  251. package/dist/lib/components/panel/header/bookmarks/variant.js +121 -0
  252. package/dist/lib/components/panel/header/index.d.ts +4 -0
  253. package/dist/lib/components/panel/header/index.d.ts.map +1 -0
  254. package/dist/lib/components/panel/header/index.js +366 -0
  255. package/dist/lib/components/panel/header/storage/archive/index.d.ts +4 -0
  256. package/dist/lib/components/panel/header/storage/archive/index.d.ts.map +1 -0
  257. package/dist/lib/components/panel/header/storage/archive/index.js +138 -0
  258. package/dist/lib/components/panel/header/storage/archive/types.d.ts +27 -0
  259. package/dist/lib/components/panel/header/storage/archive/types.d.ts.map +1 -0
  260. package/dist/lib/components/panel/header/storage/archive/variants.d.ts +6 -0
  261. package/dist/lib/components/panel/header/storage/archive/variants.d.ts.map +1 -0
  262. package/dist/lib/components/panel/header/storage/archive/variants.js +8 -0
  263. package/dist/lib/components/panel/header/storage/data.d.ts +2 -0
  264. package/dist/lib/components/panel/header/storage/data.d.ts.map +1 -0
  265. package/dist/lib/components/panel/header/storage/history-actions.d.ts +16 -0
  266. package/dist/lib/components/panel/header/storage/history-actions.d.ts.map +1 -0
  267. package/dist/lib/components/panel/header/storage/history-actions.js +18 -0
  268. package/dist/lib/components/panel/header/storage/history-date-group.d.ts +9 -0
  269. package/dist/lib/components/panel/header/storage/history-date-group.d.ts.map +1 -0
  270. package/dist/lib/components/panel/header/storage/history-date-group.js +19 -0
  271. package/dist/lib/components/panel/header/storage/history-item-content.d.ts +11 -0
  272. package/dist/lib/components/panel/header/storage/history-item-content.d.ts.map +1 -0
  273. package/dist/lib/components/panel/header/storage/history-item-content.js +17 -0
  274. package/dist/lib/components/panel/header/storage/history-shell.d.ts +8 -0
  275. package/dist/lib/components/panel/header/storage/history-shell.d.ts.map +1 -0
  276. package/dist/lib/components/panel/header/storage/history-shell.js +19 -0
  277. package/dist/lib/components/panel/header/storage/history-utils.d.ts +7 -0
  278. package/dist/lib/components/panel/header/storage/history-utils.d.ts.map +1 -0
  279. package/dist/lib/components/panel/header/storage/history-utils.js +25 -0
  280. package/dist/lib/components/panel/header/storage/index.d.ts +5 -0
  281. package/dist/lib/components/panel/header/storage/index.d.ts.map +1 -0
  282. package/dist/lib/components/panel/header/storage/index.js +120 -0
  283. package/dist/lib/components/panel/header/storage/trash/index.d.ts +4 -0
  284. package/dist/lib/components/panel/header/storage/trash/index.d.ts.map +1 -0
  285. package/dist/lib/components/panel/header/storage/trash/index.js +126 -0
  286. package/dist/lib/components/panel/header/storage/trash/types.d.ts +27 -0
  287. package/dist/lib/components/panel/header/storage/trash/types.d.ts.map +1 -0
  288. package/dist/lib/components/panel/header/storage/trash/variants.d.ts +6 -0
  289. package/dist/lib/components/panel/header/storage/trash/variants.d.ts.map +1 -0
  290. package/dist/lib/components/panel/header/storage/trash/variants.js +12 -0
  291. package/dist/lib/components/panel/header/storage/types.d.ts +482 -0
  292. package/dist/lib/components/panel/header/storage/types.d.ts.map +1 -0
  293. package/dist/lib/components/panel/header/storage/types.js +155 -0
  294. package/dist/lib/components/panel/header/storage/variant.d.ts +289 -0
  295. package/dist/lib/components/panel/header/storage/variant.d.ts.map +1 -0
  296. package/dist/lib/components/panel/header/storage/variant.js +106 -0
  297. package/dist/lib/components/panel/header/types.d.ts +26 -0
  298. package/dist/lib/components/panel/header/types.d.ts.map +1 -0
  299. package/dist/lib/components/panel/info-panel/container.d.ts +9 -0
  300. package/dist/lib/components/panel/info-panel/container.d.ts.map +1 -0
  301. package/dist/lib/components/panel/info-panel/container.js +90 -0
  302. package/dist/lib/components/panel/info-panel/container.module.css +48 -0
  303. package/dist/lib/components/panel/info-panel/container.module.js +8 -0
  304. package/dist/lib/components/panel/info-panel/index.d.ts +4 -0
  305. package/dist/lib/components/panel/info-panel/index.d.ts.map +1 -0
  306. package/dist/lib/components/panel/info-panel/provider.d.ts +7 -0
  307. package/dist/lib/components/panel/info-panel/provider.d.ts.map +1 -0
  308. package/dist/lib/components/panel/info-panel/provider.js +104 -0
  309. package/dist/lib/components/panel/info-panel/sheet.d.ts +9 -0
  310. package/dist/lib/components/panel/info-panel/sheet.d.ts.map +1 -0
  311. package/dist/lib/components/panel/info-panel/sheet.js +70 -0
  312. package/dist/lib/components/panel/info-panel/styles.d.ts +6 -0
  313. package/dist/lib/components/panel/info-panel/styles.d.ts.map +1 -0
  314. package/dist/lib/components/panel/info-panel/styles.js +8 -0
  315. package/dist/lib/components/panel/info-panel/types.d.ts +21 -0
  316. package/dist/lib/components/panel/info-panel/types.d.ts.map +1 -0
  317. package/dist/lib/components/panel/menu/index.d.ts +4 -0
  318. package/dist/lib/components/panel/menu/index.d.ts.map +1 -0
  319. package/dist/lib/components/panel/menu/index.js +156 -0
  320. package/dist/lib/components/panel/menu/types.d.ts +522 -0
  321. package/dist/lib/components/panel/menu/types.d.ts.map +1 -0
  322. package/dist/lib/components/panel/menu/types.js +71 -0
  323. package/dist/lib/components/panel/menu/variant.d.ts +259 -0
  324. package/dist/lib/components/panel/menu/variant.d.ts.map +1 -0
  325. package/dist/lib/components/panel/menu/variant.js +131 -0
  326. package/dist/lib/components/panel/responsive.d.ts +3 -0
  327. package/dist/lib/components/panel/responsive.d.ts.map +1 -0
  328. package/dist/lib/components/panel/responsive.js +5 -0
  329. package/dist/lib/components/responsive-toolbar-action/index.d.ts +11 -0
  330. package/dist/lib/components/responsive-toolbar-action/index.d.ts.map +1 -0
  331. package/dist/lib/components/responsive-toolbar-action/index.js +21 -0
  332. package/dist/lib/components/shortcut-key/index.d.ts +18 -0
  333. package/dist/lib/components/shortcut-key/index.d.ts.map +1 -0
  334. package/dist/lib/components/shortcut-key/index.js +44 -0
  335. package/dist/lib/components/toolbar-actions/index.d.ts +31 -0
  336. package/dist/lib/components/toolbar-actions/index.d.ts.map +1 -0
  337. package/dist/lib/components/toolbar-actions/index.js +75 -0
  338. package/dist/lib/components/workspace-navigation/index.d.ts +24 -0
  339. package/dist/lib/components/workspace-navigation/index.d.ts.map +1 -0
  340. package/dist/lib/components/workspace-navigation/index.js +74 -0
  341. package/dist/lib/layouts/app/frame.d.ts +8 -0
  342. package/dist/lib/layouts/app/frame.d.ts.map +1 -0
  343. package/dist/lib/layouts/app/frame.js +20 -0
  344. package/dist/lib/layouts/app/index.d.ts +27 -0
  345. package/dist/lib/layouts/app/index.d.ts.map +1 -0
  346. package/dist/lib/layouts/app/index.js +89 -0
  347. package/dist/lib/layouts/menu-layout/home-navigation-bubble.d.ts +7 -0
  348. package/dist/lib/layouts/menu-layout/home-navigation-bubble.d.ts.map +1 -0
  349. package/dist/lib/layouts/menu-layout/home-navigation-bubble.js +22 -0
  350. package/dist/lib/layouts/menu-layout/index-md.d.ts +4 -0
  351. package/dist/lib/layouts/menu-layout/index-md.d.ts.map +1 -0
  352. package/dist/lib/layouts/menu-layout/index-md.js +142 -0
  353. package/dist/lib/layouts/menu-layout/index-sm.d.ts +5 -0
  354. package/dist/lib/layouts/menu-layout/index-sm.d.ts.map +1 -0
  355. package/dist/lib/layouts/menu-layout/index-sm.js +124 -0
  356. package/dist/lib/layouts/menu-layout/index.d.ts +8 -0
  357. package/dist/lib/layouts/menu-layout/index.d.ts.map +1 -0
  358. package/dist/lib/layouts/menu-layout/index.js +17 -0
  359. package/dist/lib/layouts/section/index.d.ts +29 -0
  360. package/dist/lib/layouts/section/index.d.ts.map +1 -0
  361. package/dist/lib/layouts/section/index.js +285 -0
  362. package/dist/lib/layouts/section/preferences.d.ts +10 -0
  363. package/dist/lib/layouts/section/preferences.d.ts.map +1 -0
  364. package/dist/lib/layouts/section/preferences.js +41 -0
  365. package/dist/lib/layouts/section/sidebar-state.d.ts +7 -0
  366. package/dist/lib/layouts/section/sidebar-state.d.ts.map +1 -0
  367. package/dist/lib/layouts/section/sidebar-state.js +35 -0
  368. package/dist/lib/layouts/section/sidebar.d.ts +11 -0
  369. package/dist/lib/layouts/section/sidebar.d.ts.map +1 -0
  370. package/dist/lib/layouts/section/sidebar.js +84 -0
  371. package/dist/lib/layouts/section/sort-menu.d.ts +27 -0
  372. package/dist/lib/layouts/section/sort-menu.d.ts.map +1 -0
  373. package/dist/lib/layouts/section/sort-menu.js +72 -0
  374. package/dist/lib/layouts/section/toolbar-content.d.ts +11 -0
  375. package/dist/lib/layouts/section/toolbar-content.d.ts.map +1 -0
  376. package/dist/lib/layouts/section/toolbar-content.js +31 -0
  377. package/dist/lib/layouts/section/toolbar-more-sheet.d.ts +38 -0
  378. package/dist/lib/layouts/section/toolbar-more-sheet.d.ts.map +1 -0
  379. package/dist/lib/layouts/section/toolbar-more-sheet.js +288 -0
  380. package/dist/lib/layouts/section/toolbar.d.ts +60 -0
  381. package/dist/lib/layouts/section/toolbar.d.ts.map +1 -0
  382. package/dist/lib/layouts/section/toolbar.js +518 -0
  383. package/dist/lib/layouts/settings/index.d.ts +5 -0
  384. package/dist/lib/layouts/settings/index.d.ts.map +1 -0
  385. package/dist/lib/layouts/settings/index.js +9 -0
  386. package/dist/lib/navigation-toolbar.d.ts +32 -0
  387. package/dist/lib/navigation-toolbar.d.ts.map +1 -0
  388. package/dist/lib/navigation-toolbar.js +29 -0
  389. package/dist/lib/navigation.d.ts +21 -0
  390. package/dist/lib/navigation.d.ts.map +1 -0
  391. package/dist/lib/navigation.js +39 -0
  392. package/dist/lib/pages/settings/index.d.ts +17 -0
  393. package/dist/lib/pages/settings/index.d.ts.map +1 -0
  394. package/dist/lib/pages/settings/index.js +276 -0
  395. package/dist/lib/pages/settings/navigation.d.ts +4 -0
  396. package/dist/lib/pages/settings/navigation.d.ts.map +1 -0
  397. package/dist/lib/pages/settings/navigation.js +6 -0
  398. package/dist/lib/pages/settings/settings-content.d.ts +5 -0
  399. package/dist/lib/pages/settings/settings-content.d.ts.map +1 -0
  400. package/dist/lib/pages/settings/settings-content.js +213 -0
  401. package/dist/lib/pages/settings/tile-gallery.d.ts +19 -0
  402. package/dist/lib/pages/settings/tile-gallery.d.ts.map +1 -0
  403. package/dist/lib/pages/settings/tile-gallery.js +411 -0
  404. package/dist/lib/store/useBookmarks/action.d.ts +6 -0
  405. package/dist/lib/store/useBookmarks/action.d.ts.map +1 -0
  406. package/dist/lib/store/useBookmarks/action.js +7 -0
  407. package/dist/lib/store/useBookmarks/data.d.ts +4 -0
  408. package/dist/lib/store/useBookmarks/data.d.ts.map +1 -0
  409. package/dist/lib/store/useBookmarks/data.js +231 -0
  410. package/dist/lib/store/useBookmarks/index.d.ts +12 -0
  411. package/dist/lib/store/useBookmarks/index.d.ts.map +1 -0
  412. package/dist/lib/store/useBookmarks/index.js +29 -0
  413. package/dist/lib/store/useBookmarks/types.d.ts +30 -0
  414. package/dist/lib/store/useBookmarks/types.d.ts.map +1 -0
  415. package/dist/lib/store/useStorage/action.d.ts +6 -0
  416. package/dist/lib/store/useStorage/action.d.ts.map +1 -0
  417. package/dist/lib/store/useStorage/action.js +7 -0
  418. package/dist/lib/store/useStorage/data.d.ts +3 -0
  419. package/dist/lib/store/useStorage/data.d.ts.map +1 -0
  420. package/dist/lib/store/useStorage/data.js +219 -0
  421. package/dist/lib/store/useStorage/index.d.ts +7 -0
  422. package/dist/lib/store/useStorage/index.d.ts.map +1 -0
  423. package/dist/lib/store/useStorage/index.js +13 -0
  424. package/dist/lib/store/useStorage/types.d.ts +20 -0
  425. package/dist/lib/store/useStorage/types.d.ts.map +1 -0
  426. package/dist/lib/store/users/useUserStore.d.ts +22 -0
  427. package/dist/lib/store/users/useUserStore.d.ts.map +1 -0
  428. package/dist/lib/store/users/useUserStore.js +46 -0
  429. package/dist/lib/utils/date.d.ts +2 -0
  430. package/dist/lib/utils/date.d.ts.map +1 -0
  431. package/dist/lib/utils/date.js +8 -0
  432. package/dist/lib/utils/url.d.ts +4 -0
  433. package/dist/lib/utils/url.d.ts.map +1 -0
  434. package/dist/lib/utils/url.js +19 -0
  435. package/dist/react.css +49 -0
  436. package/package.json +90 -2
@@ -0,0 +1,285 @@
1
+ import { AppIcon } from "../../components/app-icon/index.js";
2
+ import { useMobileControls } from "../../components/mobile-controls/index.js";
3
+ import { useSidebarShortcut, useWorkspaceNavigation } from "../../components/workspace-navigation/index.js";
4
+ import { getSelectedMenuKey } from "../../navigation.js";
5
+ import { ShortcutButton } from "../../components/shortcut-key/index.js";
6
+ import { useSectionPreferences } from "./preferences.js";
7
+ import { useSectionSidebarState } from "./sidebar-state.js";
8
+ import { SectionSidebar } from "./sidebar.js";
9
+ import { useMobileToolbarNavigation } from "./toolbar-more-sheet.js";
10
+ import { SectionActiveFilters, SectionToolbar } from "./toolbar.js";
11
+ import { SectionToolbarContentProvider, useRegisteredSectionToolbarContent, useSectionToolbarContent } from "./toolbar-content.js";
12
+ import { useLocation, useNavigate, useRouter } from "@tanstack/react-router";
13
+ import { useCallback, useEffect, useId, useRef, useState } from "react";
14
+ import { Drawer, Surface, Tabs, useMediaQuery } from "@vezham/react-v3";
15
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
16
+ import { useHotkey } from "@tanstack/react-hotkeys";
17
+ //#region src/lib/layouts/section/index.tsx
18
+ var EMPTY_SIDEBAR_ITEMS = [];
19
+ var EMPTY_MENU_ACTIONS = [];
20
+ var EMPTY_VIEW_ACTIONS = [];
21
+ var matchesPath = (pathname, href) => Boolean(href && (pathname === href || pathname.startsWith(`${href}/`)));
22
+ var CompactTabs = ({ title, displayTabs, search, primaryAction }) => /* @__PURE__ */ jsx(Fragment, { children: displayTabs.length > 0 && /* @__PURE__ */ jsx(Tabs.ListContainer, {
23
+ className: `scrollbar-hide order-2 mb-3 w-fit min-w-0 self-center overflow-x-auto rounded-full ${search && primaryAction ? "max-w-[calc(100%-9rem)]" : "max-w-[calc(100%-1.5rem)]"}`,
24
+ children: /* @__PURE__ */ jsx(Tabs.List, {
25
+ "aria-label": `${title} tabs`,
26
+ className: "flex min-w-max flex-nowrap *:whitespace-nowrap",
27
+ children: displayTabs.map((tab) => /* @__PURE__ */ jsxs(Tabs.Tab, {
28
+ id: tab.key,
29
+ className: "whitespace-nowrap",
30
+ children: [tab.title, /* @__PURE__ */ jsx(Tabs.Indicator, {})]
31
+ }, tab.key))
32
+ })
33
+ }, JSON.stringify(displayTabs.map((tab) => tab.key))) });
34
+ var SectionPanels = ({ displayTabs, selectedTab, children }) => /* @__PURE__ */ jsxs(Fragment, { children: [displayTabs.length === 0 && children, displayTabs.map((tab) => /* @__PURE__ */ jsx(Tabs.Panel, {
35
+ id: tab.key,
36
+ className: "m-0 flex min-h-0 flex-1 flex-col p-0",
37
+ children: tab.key === selectedTab?.key && children
38
+ }, tab.key))] });
39
+ var SectionBody = ({ hasSidebar, isNavigationCollapsed, sidebarId, sidebar, filter, selectedFilters, setSelectedFilters, displayTabs, selectedTab, children }) => /* @__PURE__ */ jsxs("div", {
40
+ className: "order-1 flex min-h-0 min-w-0 flex-1",
41
+ children: [hasSidebar && !isNavigationCollapsed && /* @__PURE__ */ jsx("aside", {
42
+ id: sidebarId,
43
+ className: "hidden w-56 shrink-0 overflow-y-auto md:block",
44
+ children: sidebar
45
+ }), /* @__PURE__ */ jsxs("main", {
46
+ className: `flex min-w-0 flex-1 flex-col gap-2 overflow-auto p-4 ${filter && selectedFilters.length > 0 ? "pt-2" : ""}`,
47
+ children: [filter && /* @__PURE__ */ jsx(SectionActiveFilters, {
48
+ selectedFilters,
49
+ onSelectedFiltersChange: setSelectedFilters
50
+ }), /* @__PURE__ */ jsx(Surface, {
51
+ className: "relative flex min-h-0 flex-1 flex-col rounded-lg p-4 sm:p-5",
52
+ children: /* @__PURE__ */ jsx(SectionPanels, {
53
+ displayTabs,
54
+ selectedTab,
55
+ children
56
+ })
57
+ })]
58
+ })]
59
+ });
60
+ var SectionNavigationControls = ({ isNavigationCollapsed, sidebarId, toggleNavigation }) => {
61
+ const router = useRouter();
62
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
63
+ !isNavigationCollapsed && /* @__PURE__ */ jsx(ShortcutButton, {
64
+ className: "h-9 w-9 min-w-9 p-0",
65
+ label: "Hide Sidebar",
66
+ shortcut: "⌘ S",
67
+ "aria-keyshortcuts": "Meta+S",
68
+ "aria-controls": sidebarId,
69
+ "aria-expanded": true,
70
+ onPress: toggleNavigation,
71
+ children: /* @__PURE__ */ jsx(AppIcon, {
72
+ icon: "vx:sidebar",
73
+ size: 18,
74
+ "aria-hidden": "true"
75
+ })
76
+ }),
77
+ /* @__PURE__ */ jsx(ShortcutButton, {
78
+ className: "hidden h-9 w-9 min-w-9 p-0 lg:inline-flex",
79
+ label: "Back",
80
+ shortcut: "⌘ ←",
81
+ "aria-keyshortcuts": "Meta+ArrowLeft",
82
+ onPress: () => router.history.back(),
83
+ children: /* @__PURE__ */ jsx(AppIcon, {
84
+ icon: "vx:arrow-left",
85
+ size: 18,
86
+ "aria-hidden": "true"
87
+ })
88
+ }),
89
+ /* @__PURE__ */ jsx(ShortcutButton, {
90
+ className: "hidden h-9 w-9 min-w-9 p-0 lg:inline-flex",
91
+ label: "Forward",
92
+ shortcut: "⌘ →",
93
+ "aria-keyshortcuts": "Meta+ArrowRight",
94
+ onPress: () => router.history.forward(),
95
+ children: /* @__PURE__ */ jsx(AppIcon, {
96
+ icon: "vx:arrow-right",
97
+ size: 18,
98
+ "aria-hidden": "true"
99
+ })
100
+ })
101
+ ] });
102
+ };
103
+ var getSectionTabs = (pathname, sidebarItems, tabs) => {
104
+ const displayTabs = sidebarItems.some((item) => item.childrenDisplay === "sidebar" && getSelectedMenuKey(pathname, [item])) ? [] : tabs;
105
+ return {
106
+ displayTabs,
107
+ selectedTab: displayTabs.find((tab) => matchesPath(pathname, tab.href)) ?? displayTabs[0]
108
+ };
109
+ };
110
+ var useSectionNavigation = (sidebarItems, sync, onSync) => {
111
+ const { pathname } = useLocation();
112
+ const navigate = useNavigate();
113
+ const router = useRouter();
114
+ const { isNavigationCollapsed, toggleNavigation, registerMobileSidebar } = useWorkspaceNavigation();
115
+ const { expandedKeys: expandedSidebarKeys, setExpandedKeys: setExpandedSidebarKeys } = useSectionSidebarState(sidebarItems, pathname);
116
+ const [isDrawerOpen, setIsDrawerOpen] = useState(false);
117
+ const hasSidebar = sidebarItems.length > 0;
118
+ const toggleMobileSidebar = useCallback(() => setIsDrawerOpen((open) => !open), []);
119
+ useEffect(() => {
120
+ if (hasSidebar) return registerMobileSidebar({
121
+ isOpen: isDrawerOpen,
122
+ onToggle: toggleMobileSidebar
123
+ });
124
+ }, [
125
+ hasSidebar,
126
+ isDrawerOpen,
127
+ registerMobileSidebar,
128
+ toggleMobileSidebar
129
+ ]);
130
+ const sidebarId = useId();
131
+ const toggleSidebar = () => {
132
+ if (hasSidebar && !window.matchMedia("(min-width: 768px)").matches) toggleMobileSidebar();
133
+ else toggleNavigation();
134
+ };
135
+ useSidebarShortcut(toggleSidebar);
136
+ useHotkey("Meta+ArrowLeft", () => router.history.back());
137
+ useHotkey("Meta+ArrowRight", () => router.history.forward());
138
+ useHotkey("Meta+R", () => {
139
+ onSync?.();
140
+ }, { enabled: sync && Boolean(onSync) });
141
+ return {
142
+ pathname,
143
+ navigate,
144
+ isNavigationCollapsed,
145
+ toggleNavigation,
146
+ expandedSidebarKeys,
147
+ setExpandedSidebarKeys,
148
+ isDrawerOpen,
149
+ setIsDrawerOpen,
150
+ hasSidebar,
151
+ sidebarId
152
+ };
153
+ };
154
+ var getStateScope = (sectionKey, pathname, sidebarItems, tabs, title) => sectionKey ?? getSelectedMenuKey(pathname, sidebarItems) ?? (tabs.length > 0 ? JSON.stringify(tabs.map((tab) => tab.key)) : title);
155
+ var SectionDrawer = ({ title, navigation, children }) => {
156
+ if (!navigation.hasSidebar) return null;
157
+ return /* @__PURE__ */ jsx(Drawer.Backdrop, {
158
+ isOpen: navigation.isDrawerOpen,
159
+ onOpenChange: navigation.setIsDrawerOpen,
160
+ children: /* @__PURE__ */ jsx(Drawer.Content, {
161
+ placement: "left",
162
+ children: /* @__PURE__ */ jsxs(Drawer.Dialog, {
163
+ className: "bg-background w-[min(20rem,calc(100vw-2rem))]",
164
+ children: [/* @__PURE__ */ jsxs(Drawer.Header, { children: [/* @__PURE__ */ jsx(Drawer.Heading, { children: title }), /* @__PURE__ */ jsx(Drawer.CloseTrigger, { "aria-label": "Hide Sidebar" })] }), /* @__PURE__ */ jsx(Drawer.Body, { children })]
165
+ })
166
+ })
167
+ });
168
+ };
169
+ var SectionTabs = ({ displayTabs, selectedTab, navigate, children }) => /* @__PURE__ */ jsx(Tabs, {
170
+ selectedKey: selectedTab?.key ?? "",
171
+ onSelectionChange: (key) => {
172
+ const tab = displayTabs.find((item) => item.key === key);
173
+ if (tab?.href) navigate({ to: tab.href });
174
+ },
175
+ className: "flex min-h-0 min-w-0 flex-1 flex-col gap-0",
176
+ children
177
+ });
178
+ var useSectionSearch = (search) => {
179
+ const inputRef = useRef(null);
180
+ const [isOpen, onOpenChange] = useState(false);
181
+ return search ? {
182
+ ...search,
183
+ inputRef,
184
+ isOpen,
185
+ onOpenChange
186
+ } : void 0;
187
+ };
188
+ var SectionLayoutToolbar = ({ options, navigation, preferences, displayTabs, isCompactToolbar, hideCompactControls }) => {
189
+ const { title, toolbar, search, sync = true, filter = false, sort = false, view = EMPTY_VIEW_ACTIONS, onSync, menuActions = EMPTY_MENU_ACTIONS, primaryAction } = options;
190
+ const { selectedFilters, setSelectedFilters, sortValue, handleSortChange } = preferences;
191
+ const registeredToolbarContent = useRegisteredSectionToolbarContent();
192
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
193
+ const [viewMode, setViewMode] = useState("grid");
194
+ const toolbarSearch = useSectionSearch(search);
195
+ const handleSync = useCallback(() => onSync?.(), [onSync]);
196
+ return /* @__PURE__ */ jsx(SectionToolbar, {
197
+ title,
198
+ isNavigationCollapsed: navigation.isNavigationCollapsed,
199
+ sync,
200
+ filter,
201
+ sort,
202
+ sortValue,
203
+ onSortChange: handleSortChange,
204
+ view,
205
+ selectedFilters,
206
+ onSelectedFiltersChange: setSelectedFilters,
207
+ viewMode,
208
+ onViewModeChange: setViewMode,
209
+ tabs: isCompactToolbar ? [] : displayTabs,
210
+ isMenuOpen,
211
+ onMenuOpenChange: setIsMenuOpen,
212
+ search: toolbarSearch,
213
+ menuActions,
214
+ primaryAction: hideCompactControls ? void 0 : primaryAction,
215
+ toolbar: /* @__PURE__ */ jsxs(Fragment, { children: [toolbar, registeredToolbarContent.desktop] }),
216
+ mobileToolbar: registeredToolbarContent.mobile,
217
+ onSync: handleSync,
218
+ navigationControls: /* @__PURE__ */ jsx(SectionNavigationControls, {
219
+ isNavigationCollapsed: navigation.isNavigationCollapsed,
220
+ sidebarId: navigation.sidebarId,
221
+ toggleNavigation: navigation.toggleNavigation
222
+ })
223
+ });
224
+ };
225
+ var SectionLayoutContent = (props) => {
226
+ const { title, sectionKey, navigationLabel = `${title} sections`, sidebarItems = EMPTY_SIDEBAR_ITEMS, tabs, search, filter = false, onSortChange, primaryAction, children } = props;
227
+ const navigation = useSectionNavigation(sidebarItems, props.sync ?? true, props.onSync);
228
+ const { isFooterHidden } = useMobileControls();
229
+ const isCompactToolbar = useMediaQuery("(max-width: 767px)");
230
+ const shouldHideCompactControls = isCompactToolbar && isFooterHidden;
231
+ const preferences = useSectionPreferences(getStateScope(sectionKey, navigation.pathname, sidebarItems, tabs, title), onSortChange);
232
+ const { displayTabs, selectedTab } = getSectionTabs(navigation.pathname, sidebarItems, tabs);
233
+ const sidebar = /* @__PURE__ */ jsx(SectionSidebar, {
234
+ items: sidebarItems,
235
+ pathname: navigation.pathname,
236
+ label: navigationLabel,
237
+ expandedKeys: navigation.expandedSidebarKeys,
238
+ onExpandedChange: navigation.setExpandedSidebarKeys,
239
+ onNavigate: () => navigation.setIsDrawerOpen(false)
240
+ });
241
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
242
+ /* @__PURE__ */ jsx(SectionLayoutToolbar, {
243
+ options: props,
244
+ navigation,
245
+ preferences,
246
+ displayTabs,
247
+ isCompactToolbar,
248
+ hideCompactControls: shouldHideCompactControls
249
+ }),
250
+ isCompactToolbar && !shouldHideCompactControls && /* @__PURE__ */ jsx(CompactTabs, {
251
+ title,
252
+ displayTabs,
253
+ search,
254
+ primaryAction
255
+ }),
256
+ /* @__PURE__ */ jsx(SectionBody, {
257
+ hasSidebar: navigation.hasSidebar,
258
+ isNavigationCollapsed: navigation.isNavigationCollapsed,
259
+ sidebarId: navigation.sidebarId,
260
+ sidebar,
261
+ filter,
262
+ selectedFilters: preferences.selectedFilters,
263
+ setSelectedFilters: preferences.setSelectedFilters,
264
+ displayTabs,
265
+ selectedTab,
266
+ children
267
+ })
268
+ ] });
269
+ return /* @__PURE__ */ jsxs("div", {
270
+ className: "bg-background flex h-full min-h-0 min-w-0 flex-1 flex-col",
271
+ children: [/* @__PURE__ */ jsx(SectionTabs, {
272
+ displayTabs,
273
+ selectedTab,
274
+ navigate: navigation.navigate,
275
+ children: content
276
+ }), /* @__PURE__ */ jsx(SectionDrawer, {
277
+ title,
278
+ navigation,
279
+ children: sidebar
280
+ })]
281
+ });
282
+ };
283
+ var SectionLayout = (props) => /* @__PURE__ */ jsx(SectionToolbarContentProvider, { children: /* @__PURE__ */ jsx(SectionLayoutContent, { ...props }) });
284
+ //#endregion
285
+ export { SectionLayout, useMobileToolbarNavigation, useSectionToolbarContent };
@@ -0,0 +1,10 @@
1
+ import { type SectionSort } from './sort-menu';
2
+ import type { SectionFilterKey } from './toolbar';
3
+ export declare const useSectionPreferences: (scope: string, onSortChange?: (value: SectionSort) => void) => {
4
+ setSelectedFilters: (selectedFilters: SectionFilterKey[]) => void;
5
+ handleSortChange: (sortValue: SectionSort) => void;
6
+ scope: string;
7
+ selectedFilters: SectionFilterKey[];
8
+ sortValue: SectionSort;
9
+ };
10
+ //# sourceMappingURL=preferences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/section/preferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAEjD,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,EACb,eAAe,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI;0CAoBvB,gBAAgB,EAAE;kCAOxB,WAAW;;qBAvBA,gBAAgB,EAAE;;CA+B5C,CAAA"}
@@ -0,0 +1,41 @@
1
+ import { DEFAULT_SORT } from "./sort-menu.js";
2
+ import { useCallback, useEffect, useRef, useState } from "react";
3
+ //#region src/lib/layouts/section/preferences.ts
4
+ var useSectionPreferences = (scope, onSortChange) => {
5
+ const [state, setState] = useState({
6
+ scope,
7
+ selectedFilters: [],
8
+ sortValue: DEFAULT_SORT
9
+ });
10
+ if (state.scope !== scope) setState({
11
+ scope,
12
+ selectedFilters: [],
13
+ sortValue: DEFAULT_SORT
14
+ });
15
+ const previousScope = useRef(scope);
16
+ useEffect(() => {
17
+ if (previousScope.current === scope) return;
18
+ previousScope.current = scope;
19
+ onSortChange?.(DEFAULT_SORT);
20
+ }, [scope, onSortChange]);
21
+ const setSelectedFilters = useCallback((selectedFilters) => {
22
+ setState((current) => ({
23
+ ...current,
24
+ selectedFilters
25
+ }));
26
+ }, []);
27
+ const handleSortChange = useCallback((sortValue) => {
28
+ setState((current) => ({
29
+ ...current,
30
+ sortValue
31
+ }));
32
+ onSortChange?.(sortValue);
33
+ }, [onSortChange]);
34
+ return {
35
+ ...state,
36
+ setSelectedFilters,
37
+ handleSortChange
38
+ };
39
+ };
40
+ //#endregion
41
+ export { useSectionPreferences };
@@ -0,0 +1,7 @@
1
+ import { type SetStateAction } from 'react';
2
+ import { type AppNavigationItem } from '../../navigation';
3
+ export declare const useSectionSidebarState: (items: AppNavigationItem[], pathname: string) => {
4
+ expandedKeys: Set<string>;
5
+ setExpandedKeys: (update: SetStateAction<Set<string>>) => void;
6
+ };
7
+ //# sourceMappingURL=sidebar-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-state.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/section/sidebar-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,OAAO,CAAA;AAElE,OAAO,EAAE,KAAK,iBAAiB,EAAsB,MAAM,kBAAkB,CAAA;AAmB7E,eAAO,MAAM,sBAAsB,GACjC,OAAO,iBAAiB,EAAE,EAC1B,UAAU,MAAM;;8BAc6B,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;CASzE,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { getSelectedMenuKey } from "../../navigation.js";
2
+ import { useCallback, useState } from "react";
3
+ //#region src/lib/layouts/section/sidebar-state.ts
4
+ var expandActiveGroups = (items, pathname, expandedKeys) => {
5
+ const next = new Set(expandedKeys);
6
+ for (const item of items) {
7
+ if (item.childrenDisplay !== "sidebar" || !item.children?.length) continue;
8
+ if (!getSelectedMenuKey(pathname, [item])) continue;
9
+ next.add(item.key);
10
+ for (const key of expandActiveGroups(item.children, pathname, next)) next.add(key);
11
+ }
12
+ return next;
13
+ };
14
+ var useSectionSidebarState = (items, pathname) => {
15
+ const [state, setState] = useState(() => ({
16
+ pathname,
17
+ expandedKeys: expandActiveGroups(items, pathname, /* @__PURE__ */ new Set())
18
+ }));
19
+ if (state.pathname !== pathname) setState({
20
+ pathname,
21
+ expandedKeys: expandActiveGroups(items, pathname, state.expandedKeys)
22
+ });
23
+ const setExpandedKeys = useCallback((update) => {
24
+ setState((current) => ({
25
+ ...current,
26
+ expandedKeys: typeof update === "function" ? update(current.expandedKeys) : update
27
+ }));
28
+ }, []);
29
+ return {
30
+ expandedKeys: state.expandedKeys,
31
+ setExpandedKeys
32
+ };
33
+ };
34
+ //#endregion
35
+ export { useSectionSidebarState };
@@ -0,0 +1,11 @@
1
+ import { type Dispatch, type SetStateAction } from 'react';
2
+ import { type AppNavigationItem } from '../../navigation';
3
+ export declare const SectionSidebar: ({ items, pathname, label, onNavigate, expandedKeys: controlledExpandedKeys, onExpandedChange }: {
4
+ items: AppNavigationItem[];
5
+ pathname: string;
6
+ label: string;
7
+ onNavigate: () => void;
8
+ expandedKeys?: Set<string>;
9
+ onExpandedChange?: Dispatch<SetStateAction<Set<string>>>;
10
+ }) => import("react").JSX.Element;
11
+ //# sourceMappingURL=sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/section/sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAS,MAAM,OAAO,CAAA;AAKjE,OAAO,EAAE,KAAK,iBAAiB,EAAsB,MAAM,kBAAkB,CAAA;AAsG7E,eAAO,MAAM,cAAc,GAAI,gGAO5B;IACD,KAAK,EAAE,iBAAiB,EAAE,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,gBAAgB,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;CACzD,gCAqBA,CAAA"}
@@ -0,0 +1,84 @@
1
+ import { AppIcon } from "../../components/app-icon/index.js";
2
+ import { getSelectedMenuKey } from "../../navigation.js";
3
+ import { useSectionSidebarState } from "./sidebar-state.js";
4
+ import { Link } from "@tanstack/react-router";
5
+ import { useId } from "react";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { AltArrowDown } from "@vezham/icons-react";
8
+ //#region src/lib/layouts/section/sidebar.tsx
9
+ var getEntryAppearance = (pathname, item) => {
10
+ const active = Boolean(getSelectedMenuKey(pathname, [item]));
11
+ const hasActiveChild = Boolean(item.children?.length && getSelectedMenuKey(pathname, item.children));
12
+ return {
13
+ active,
14
+ parentClass: active ? `text-foreground ${hasActiveChild ? "font-medium" : "font-bold"}` : "text-muted",
15
+ href: item.href ?? item.children?.[0]?.href ?? "/"
16
+ };
17
+ };
18
+ var SidebarEntryLabel = ({ item }) => /* @__PURE__ */ jsxs(Fragment, { children: [item.icon && /* @__PURE__ */ jsx(AppIcon, {
19
+ icon: item.icon,
20
+ size: 18,
21
+ className: "shrink-0",
22
+ "aria-hidden": "true"
23
+ }), /* @__PURE__ */ jsx("span", {
24
+ className: "min-w-0 flex-1 truncate",
25
+ children: item.title
26
+ })] });
27
+ var SidebarEntry = ({ item, pathname, onNavigate, expandedKeys, setExpandedKeys }) => {
28
+ const { active, parentClass, href } = getEntryAppearance(pathname, item);
29
+ const expandable = item.childrenDisplay === "sidebar" && Boolean(item.children?.length);
30
+ const expanded = expandedKeys.has(item.key);
31
+ const childrenId = useId();
32
+ return /* @__PURE__ */ jsxs("div", { children: [expandable ? /* @__PURE__ */ jsxs("button", {
33
+ type: "button",
34
+ "aria-label": item.title,
35
+ "aria-expanded": expanded,
36
+ "aria-controls": childrenId,
37
+ className: `hover:bg-surface-secondary flex w-full cursor-pointer items-center gap-3 rounded-full px-3 py-2 text-start text-sm ${parentClass}`,
38
+ onClick: () => setExpandedKeys((current) => {
39
+ const next = new Set(current);
40
+ if (next.has(item.key)) next.delete(item.key);
41
+ else next.add(item.key);
42
+ return next;
43
+ }),
44
+ children: [/* @__PURE__ */ jsx(SidebarEntryLabel, { item }), /* @__PURE__ */ jsx(AltArrowDown, {
45
+ size: 16,
46
+ className: `shrink-0 ${expanded ? "" : "-rotate-90"}`,
47
+ "aria-hidden": "true"
48
+ })]
49
+ }) : /* @__PURE__ */ jsx(Link, {
50
+ to: href,
51
+ "aria-current": active ? "page" : void 0,
52
+ onClick: onNavigate,
53
+ className: `flex items-center gap-3 rounded-full px-3 py-2 text-sm ${active ? "bg-surface-secondary text-foreground font-bold" : "text-muted hover:bg-surface-secondary"}`,
54
+ children: /* @__PURE__ */ jsx(SidebarEntryLabel, { item })
55
+ }), expandable && expanded && /* @__PURE__ */ jsx("div", {
56
+ id: childrenId,
57
+ className: "border-separator mt-1 ml-5 space-y-1 border-l pl-2",
58
+ children: item.children?.map((child) => /* @__PURE__ */ jsx(SidebarEntry, {
59
+ item: child,
60
+ pathname,
61
+ onNavigate,
62
+ expandedKeys,
63
+ setExpandedKeys
64
+ }, child.key))
65
+ })] });
66
+ };
67
+ var SectionSidebar = ({ items, pathname, label, onNavigate, expandedKeys: controlledExpandedKeys, onExpandedChange }) => {
68
+ const { expandedKeys: localExpandedKeys, setExpandedKeys: setLocalExpandedKeys } = useSectionSidebarState(items, pathname);
69
+ const expandedKeys = controlledExpandedKeys ?? localExpandedKeys;
70
+ const setExpandedKeys = onExpandedChange ?? setLocalExpandedKeys;
71
+ return /* @__PURE__ */ jsx("nav", {
72
+ "aria-label": label,
73
+ className: "space-y-1 p-2",
74
+ children: items.map((item) => /* @__PURE__ */ jsx(SidebarEntry, {
75
+ item,
76
+ pathname,
77
+ onNavigate,
78
+ expandedKeys,
79
+ setExpandedKeys
80
+ }, item.key))
81
+ });
82
+ };
83
+ //#endregion
84
+ export { SectionSidebar };
@@ -0,0 +1,27 @@
1
+ export type SectionSort = {
2
+ by: 'name' | 'created' | 'updated';
3
+ direction: 'ascending' | 'descending';
4
+ };
5
+ export declare const DEFAULT_SORT: SectionSort;
6
+ export declare const sortFields: readonly [{
7
+ readonly key: "name";
8
+ readonly label: "Name";
9
+ }, {
10
+ readonly key: "created";
11
+ readonly label: "Created date";
12
+ }, {
13
+ readonly key: "updated";
14
+ readonly label: "Updated date";
15
+ }];
16
+ export declare const sortDirections: readonly [{
17
+ readonly key: "ascending";
18
+ readonly label: "Ascending";
19
+ }, {
20
+ readonly key: "descending";
21
+ readonly label: "Descending";
22
+ }];
23
+ export declare const SortMenu: ({ value, onChange }: {
24
+ value: SectionSort;
25
+ onChange?: (value: SectionSort) => void;
26
+ }) => import("react").JSX.Element;
27
+ //# sourceMappingURL=sort-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-menu.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/section/sort-menu.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;IAClC,SAAS,EAAE,WAAW,GAAG,YAAY,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,WAG1B,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;EAIb,CAAA;AAEV,eAAO,MAAM,cAAc;;;;;;EAGjB,CAAA;AAEV,eAAO,MAAM,QAAQ,GAAI,qBAGtB;IACD,KAAK,EAAE,WAAW,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;CACxC,gCAmCA,CAAA"}
@@ -0,0 +1,72 @@
1
+ import { Dropdown, Label, Separator } from "@vezham/react-v3";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/lib/layouts/section/sort-menu.tsx
4
+ var DEFAULT_SORT = {
5
+ by: "name",
6
+ direction: "ascending"
7
+ };
8
+ var sortFields = [
9
+ {
10
+ key: "name",
11
+ label: "Name"
12
+ },
13
+ {
14
+ key: "created",
15
+ label: "Created date"
16
+ },
17
+ {
18
+ key: "updated",
19
+ label: "Updated date"
20
+ }
21
+ ];
22
+ var sortDirections = [{
23
+ key: "ascending",
24
+ label: "Ascending"
25
+ }, {
26
+ key: "descending",
27
+ label: "Descending"
28
+ }];
29
+ var SortMenu = ({ value, onChange }) => /* @__PURE__ */ jsxs(Dropdown.Menu, {
30
+ "aria-label": "Sort options",
31
+ selectionMode: "multiple",
32
+ selectedKeys: [value.by, value.direction],
33
+ children: [
34
+ /* @__PURE__ */ jsx(Label, {
35
+ className: "text-muted px-3 pt-2",
36
+ children: "Sort by"
37
+ }),
38
+ /* @__PURE__ */ jsx(Dropdown.Section, {
39
+ "aria-label": "Sort by",
40
+ children: sortFields.map((option) => /* @__PURE__ */ jsxs(Dropdown.Item, {
41
+ id: option.key,
42
+ textValue: option.label,
43
+ shouldCloseOnSelect: false,
44
+ onPress: () => onChange?.({
45
+ ...value,
46
+ by: option.key
47
+ }),
48
+ children: [option.label, /* @__PURE__ */ jsx(Dropdown.ItemIndicator, {})]
49
+ }, option.key))
50
+ }),
51
+ /* @__PURE__ */ jsx(Separator, {}),
52
+ /* @__PURE__ */ jsx(Label, {
53
+ className: "text-muted px-3 pt-2",
54
+ children: "Direction"
55
+ }),
56
+ /* @__PURE__ */ jsx(Dropdown.Section, {
57
+ "aria-label": "Direction",
58
+ children: sortDirections.map((option) => /* @__PURE__ */ jsxs(Dropdown.Item, {
59
+ id: option.key,
60
+ textValue: option.label,
61
+ shouldCloseOnSelect: false,
62
+ onPress: () => onChange?.({
63
+ ...value,
64
+ direction: option.key
65
+ }),
66
+ children: [option.label, /* @__PURE__ */ jsx(Dropdown.ItemIndicator, {})]
67
+ }, option.key))
68
+ })
69
+ ]
70
+ });
71
+ //#endregion
72
+ export { DEFAULT_SORT, SortMenu, sortDirections, sortFields };
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from 'react';
2
+ export type SectionToolbarContent = {
3
+ desktop: ReactNode;
4
+ mobile?: ReactNode;
5
+ };
6
+ export declare const SectionToolbarContentProvider: ({ children }: {
7
+ children: ReactNode;
8
+ }) => import("react").JSX.Element;
9
+ export declare const useSectionToolbarContent: (content: SectionToolbarContent) => void;
10
+ export declare const useRegisteredSectionToolbarContent: () => SectionToolbarContent;
11
+ //# sourceMappingURL=toolbar-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolbar-content.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/section/toolbar-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,SAAS,CAAA;IAClB,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB,CAAA;AAcD,eAAO,MAAM,6BAA6B,GAAI,cAE3C;IACD,QAAQ,EAAE,SAAS,CAAA;CACpB,gCAWA,CAAA;AAaD,eAAO,MAAM,wBAAwB,GAAI,SAAS,qBAAqB,SAOtE,CAAA;AAED,eAAO,MAAM,kCAAkC,6BACJ,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { createContext, useContext, useLayoutEffect, useMemo, useState } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/lib/layouts/section/toolbar-content.tsx
4
+ var EMPTY_SECTION_TOOLBAR_CONTENT = { desktop: null };
5
+ var SectionToolbarContentContext = createContext(null);
6
+ var SectionToolbarContentProvider = ({ children }) => {
7
+ const [content, setContent] = useState(EMPTY_SECTION_TOOLBAR_CONTENT);
8
+ const value = useMemo(() => ({
9
+ content,
10
+ setContent
11
+ }), [content]);
12
+ return /* @__PURE__ */ jsx(SectionToolbarContentContext.Provider, {
13
+ value,
14
+ children
15
+ });
16
+ };
17
+ var useSectionToolbarContentContext = () => {
18
+ const context = useContext(SectionToolbarContentContext);
19
+ if (!context) throw new Error("Section toolbar content requires SectionToolbarContentProvider");
20
+ return context;
21
+ };
22
+ var useSectionToolbarContent = (content) => {
23
+ const { setContent } = useSectionToolbarContentContext();
24
+ useLayoutEffect(() => {
25
+ setContent(content);
26
+ return () => setContent(EMPTY_SECTION_TOOLBAR_CONTENT);
27
+ }, [content, setContent]);
28
+ };
29
+ var useRegisteredSectionToolbarContent = () => useSectionToolbarContentContext().content;
30
+ //#endregion
31
+ export { SectionToolbarContentProvider, useRegisteredSectionToolbarContent, useSectionToolbarContent };