@conloca/cms-spa 0.1.15 → 0.1.16

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 (438) hide show
  1. package/dist/App-Bk1LNxbS.mjs +10851 -0
  2. package/dist/App-Bk1LNxbS.mjs.map +1 -0
  3. package/dist/App.d.ts +35 -0
  4. package/dist/App.d.ts.map +1 -0
  5. package/dist/App.js +52 -0
  6. package/dist/CmsSpaApp.d.ts +13 -0
  7. package/dist/CmsSpaApp.d.ts.map +1 -0
  8. package/dist/CmsSpaApp.js +33 -0
  9. package/dist/cn-dlASUkDY.mjs +10 -0
  10. package/dist/cn-dlASUkDY.mjs.map +1 -0
  11. package/dist/components/CMSDashboard.d.ts +2 -0
  12. package/dist/components/CMSDashboard.d.ts.map +1 -0
  13. package/dist/components/CMSDashboard.js +20 -0
  14. package/dist/components/CMSLayout.d.ts +2 -0
  15. package/dist/components/CMSLayout.d.ts.map +1 -0
  16. package/dist/components/CMSLayout.js +15 -0
  17. package/dist/components/ConlocaLogo.d.ts +2 -0
  18. package/dist/components/ConlocaLogo.d.ts.map +1 -0
  19. package/dist/components/ConlocaLogo.js +4 -0
  20. package/dist/components/GitStatusPanel.d.ts +25 -0
  21. package/dist/components/GitStatusPanel.d.ts.map +1 -0
  22. package/dist/components/GitStatusPanel.js +77 -0
  23. package/dist/components/MobileTopBar.d.ts +6 -0
  24. package/dist/components/MobileTopBar.d.ts.map +1 -0
  25. package/dist/components/MobileTopBar.js +6 -0
  26. package/dist/components/Sidebar.d.ts +8 -0
  27. package/dist/components/Sidebar.d.ts.map +1 -0
  28. package/dist/components/Sidebar.js +40 -0
  29. package/dist/components/UserAvatar.d.ts +2 -0
  30. package/dist/components/UserAvatar.d.ts.map +1 -0
  31. package/dist/components/UserAvatar.js +14 -0
  32. package/dist/components/cards/DataEntryCard.d.ts +14 -0
  33. package/dist/components/cards/DataEntryCard.d.ts.map +1 -0
  34. package/dist/components/cards/DataEntryCard.js +32 -0
  35. package/dist/components/cards/SectionCard.d.ts +15 -0
  36. package/dist/components/cards/SectionCard.d.ts.map +1 -0
  37. package/dist/components/cards/SectionCard.js +10 -0
  38. package/dist/components/cards/index.d.ts +2 -0
  39. package/dist/components/cards/index.d.ts.map +1 -0
  40. package/dist/components/cards/index.js +1 -0
  41. package/dist/components/dashboard/RecentActivity.d.ts +2 -0
  42. package/dist/components/dashboard/RecentActivity.d.ts.map +1 -0
  43. package/dist/components/dashboard/RecentActivity.js +58 -0
  44. package/dist/components/dialog.d.ts +53 -0
  45. package/dist/components/dialog.d.ts.map +1 -0
  46. package/dist/components/dialog.js +56 -0
  47. package/dist/components/dialogs/BlockPropertiesDialog.d.ts +12 -0
  48. package/dist/components/dialogs/BlockPropertiesDialog.d.ts.map +1 -0
  49. package/dist/components/dialogs/BlockPropertiesDialog.js +42 -0
  50. package/dist/components/dialogs/ConflictDialog.d.ts +10 -0
  51. package/dist/components/dialogs/ConflictDialog.d.ts.map +1 -0
  52. package/dist/components/dialogs/ConflictDialog.js +29 -0
  53. package/dist/components/dialogs/CreateDataDialog.d.ts +9 -0
  54. package/dist/components/dialogs/CreateDataDialog.d.ts.map +1 -0
  55. package/dist/components/dialogs/CreateDataDialog.js +20 -0
  56. package/dist/components/dialogs/CreateFolderDialog.d.ts +9 -0
  57. package/dist/components/dialogs/CreateFolderDialog.d.ts.map +1 -0
  58. package/dist/components/dialogs/CreateFolderDialog.js +33 -0
  59. package/dist/components/dialogs/CreatePageDialog.d.ts +10 -0
  60. package/dist/components/dialogs/CreatePageDialog.d.ts.map +1 -0
  61. package/dist/components/dialogs/CreatePageDialog.js +155 -0
  62. package/dist/components/dialogs/DataPropertiesDialog.d.ts +10 -0
  63. package/dist/components/dialogs/DataPropertiesDialog.d.ts.map +1 -0
  64. package/dist/components/dialogs/DataPropertiesDialog.js +38 -0
  65. package/dist/components/dialogs/DeleteConfirmDialog.d.ts +12 -0
  66. package/dist/components/dialogs/DeleteConfirmDialog.d.ts.map +1 -0
  67. package/dist/components/dialogs/DeleteConfirmDialog.js +7 -0
  68. package/dist/components/dialogs/ErrorModal.d.ts +14 -0
  69. package/dist/components/dialogs/ErrorModal.d.ts.map +1 -0
  70. package/dist/components/dialogs/ErrorModal.js +38 -0
  71. package/dist/components/dialogs/MoveFolderDialog.d.ts +11 -0
  72. package/dist/components/dialogs/MoveFolderDialog.d.ts.map +1 -0
  73. package/dist/components/dialogs/MoveFolderDialog.js +45 -0
  74. package/dist/components/dialogs/PageMetadataDialog.d.ts +10 -0
  75. package/dist/components/dialogs/PageMetadataDialog.d.ts.map +1 -0
  76. package/dist/components/dialogs/PageMetadataDialog.js +85 -0
  77. package/dist/components/dialogs/UnsavedChangesDialog.d.ts +8 -0
  78. package/dist/components/dialogs/UnsavedChangesDialog.d.ts.map +1 -0
  79. package/dist/components/dialogs/UnsavedChangesDialog.js +6 -0
  80. package/dist/components/dialogs/index.d.ts +9 -0
  81. package/dist/components/dialogs/index.d.ts.map +1 -0
  82. package/dist/components/dialogs/index.js +8 -0
  83. package/dist/components/editor/BlockEditor.d.ts +8 -0
  84. package/dist/components/editor/BlockEditor.d.ts.map +1 -0
  85. package/dist/components/editor/BlockEditor.js +262 -0
  86. package/dist/components/editor/BlockWrappers.d.ts +15 -0
  87. package/dist/components/editor/BlockWrappers.d.ts.map +1 -0
  88. package/dist/components/editor/BlockWrappers.js +29 -0
  89. package/dist/components/editor/CMSMDXEditor.d.ts +13 -0
  90. package/dist/components/editor/CMSMDXEditor.d.ts.map +1 -0
  91. package/dist/components/editor/CMSMDXEditor.js +123 -0
  92. package/dist/components/editor/ContentDiff.d.ts +10 -0
  93. package/dist/components/editor/ContentDiff.d.ts.map +1 -0
  94. package/dist/components/editor/ContentDiff.js +51 -0
  95. package/dist/components/editor/CreateBlockDialog.d.ts +26 -0
  96. package/dist/components/editor/CreateBlockDialog.d.ts.map +1 -0
  97. package/dist/components/editor/CreateBlockDialog.js +131 -0
  98. package/dist/components/editor/DrawerItemOverride.d.ts +8 -0
  99. package/dist/components/editor/DrawerItemOverride.d.ts.map +1 -0
  100. package/dist/components/editor/DrawerItemOverride.js +41 -0
  101. package/dist/components/editor/EditorChromeToggles.d.ts +16 -0
  102. package/dist/components/editor/EditorChromeToggles.d.ts.map +1 -0
  103. package/dist/components/editor/EditorChromeToggles.js +16 -0
  104. package/dist/components/editor/GenericBlock.d.ts +3 -0
  105. package/dist/components/editor/GenericBlock.d.ts.map +1 -0
  106. package/dist/components/editor/GenericBlock.js +1067 -0
  107. package/dist/components/editor/ImagePickerDialog.d.ts +6 -0
  108. package/dist/components/editor/ImagePickerDialog.d.ts.map +1 -0
  109. package/dist/components/editor/ImagePickerDialog.js +24 -0
  110. package/dist/components/editor/JsxPropsPanel.d.ts +16 -0
  111. package/dist/components/editor/JsxPropsPanel.d.ts.map +1 -0
  112. package/dist/components/editor/JsxPropsPanel.js +145 -0
  113. package/dist/components/editor/LocaleSelector.d.ts +9 -0
  114. package/dist/components/editor/LocaleSelector.d.ts.map +1 -0
  115. package/dist/components/editor/LocaleSelector.js +13 -0
  116. package/dist/components/editor/MDXLivePreview.d.ts +14 -0
  117. package/dist/components/editor/MDXLivePreview.d.ts.map +1 -0
  118. package/dist/components/editor/MDXLivePreview.js +103 -0
  119. package/dist/components/editor/MdxPageEditor.d.ts +10 -0
  120. package/dist/components/editor/MdxPageEditor.d.ts.map +1 -0
  121. package/dist/components/editor/MdxPageEditor.js +297 -0
  122. package/dist/components/editor/PageEditor.d.ts +18 -0
  123. package/dist/components/editor/PageEditor.d.ts.map +1 -0
  124. package/dist/components/editor/PageEditor.js +288 -0
  125. package/dist/components/editor/PageEditorHeaderActions.d.ts +16 -0
  126. package/dist/components/editor/PageEditorHeaderActions.d.ts.map +1 -0
  127. package/dist/components/editor/PageEditorHeaderActions.js +19 -0
  128. package/dist/components/editor/PageEditorWrapper.d.ts +7 -0
  129. package/dist/components/editor/PageEditorWrapper.d.ts.map +1 -0
  130. package/dist/components/editor/PageEditorWrapper.js +319 -0
  131. package/dist/components/editor/SearchableSelect.d.ts +34 -0
  132. package/dist/components/editor/SearchableSelect.d.ts.map +1 -0
  133. package/dist/components/editor/SearchableSelect.js +116 -0
  134. package/dist/components/editor/host-wrapper-plugin.d.ts +51 -0
  135. package/dist/components/editor/host-wrapper-plugin.d.ts.map +1 -0
  136. package/dist/components/editor/host-wrapper-plugin.js +37 -0
  137. package/dist/components/editor/index.d.ts +9 -0
  138. package/dist/components/editor/index.d.ts.map +1 -0
  139. package/dist/components/editor/index.js +7 -0
  140. package/dist/components/editor/insert-menu/InsertMdxComponentButton.d.ts +15 -0
  141. package/dist/components/editor/insert-menu/InsertMdxComponentButton.d.ts.map +1 -0
  142. package/dist/components/editor/insert-menu/InsertMdxComponentButton.js +90 -0
  143. package/dist/components/editor/insert-menu/SlashMenuPlugin.d.ts +12 -0
  144. package/dist/components/editor/insert-menu/SlashMenuPlugin.d.ts.map +1 -0
  145. package/dist/components/editor/insert-menu/SlashMenuPlugin.js +106 -0
  146. package/dist/components/editor/insert-menu/insert-payload.d.ts +76 -0
  147. package/dist/components/editor/insert-menu/insert-payload.d.ts.map +1 -0
  148. package/dist/components/editor/insert-menu/insert-payload.js +94 -0
  149. package/dist/components/editor/insert-menu/mdx-components-plugin.d.ts +8 -0
  150. package/dist/components/editor/insert-menu/mdx-components-plugin.d.ts.map +1 -0
  151. package/dist/components/editor/insert-menu/mdx-components-plugin.js +13 -0
  152. package/dist/components/editors/DataEditor.d.ts +19 -0
  153. package/dist/components/editors/DataEditor.d.ts.map +1 -0
  154. package/dist/components/editors/DataEditor.js +139 -0
  155. package/dist/components/fields/ContentBlockSelectorField.d.ts +14 -0
  156. package/dist/components/fields/ContentBlockSelectorField.d.ts.map +1 -0
  157. package/dist/components/fields/ContentBlockSelectorField.js +105 -0
  158. package/dist/components/fields/ImageField.d.ts +16 -0
  159. package/dist/components/fields/ImageField.d.ts.map +1 -0
  160. package/dist/components/fields/ImageField.js +39 -0
  161. package/dist/components/fields/MDXEditField.d.ts +17 -0
  162. package/dist/components/fields/MDXEditField.d.ts.map +1 -0
  163. package/dist/components/fields/MDXEditField.js +28 -0
  164. package/dist/components/forms/ChipArrayField.d.ts +12 -0
  165. package/dist/components/forms/ChipArrayField.d.ts.map +1 -0
  166. package/dist/components/forms/ChipArrayField.js +40 -0
  167. package/dist/components/forms/HintForm.d.ts +22 -0
  168. package/dist/components/forms/HintForm.d.ts.map +1 -0
  169. package/dist/components/forms/HintForm.js +162 -0
  170. package/dist/components/forms/SchemaForm.d.ts +15 -0
  171. package/dist/components/forms/SchemaForm.d.ts.map +1 -0
  172. package/dist/components/forms/SchemaForm.js +106 -0
  173. package/dist/components/index.d.ts +8 -0
  174. package/dist/components/index.d.ts.map +1 -0
  175. package/dist/components/index.js +13 -0
  176. package/dist/components/media/AssetCard.d.ts +14 -0
  177. package/dist/components/media/AssetCard.d.ts.map +1 -0
  178. package/dist/components/media/AssetCard.js +31 -0
  179. package/dist/components/media/AssetDetailSidebar.d.ts +11 -0
  180. package/dist/components/media/AssetDetailSidebar.d.ts.map +1 -0
  181. package/dist/components/media/AssetDetailSidebar.js +101 -0
  182. package/dist/components/media/BulkActionBar.d.ts +9 -0
  183. package/dist/components/media/BulkActionBar.d.ts.map +1 -0
  184. package/dist/components/media/BulkActionBar.js +8 -0
  185. package/dist/components/media/FolderNav.d.ts +7 -0
  186. package/dist/components/media/FolderNav.d.ts.map +1 -0
  187. package/dist/components/media/FolderNav.js +12 -0
  188. package/dist/components/media/FolderTreeSidebar.d.ts +9 -0
  189. package/dist/components/media/FolderTreeSidebar.d.ts.map +1 -0
  190. package/dist/components/media/FolderTreeSidebar.js +41 -0
  191. package/dist/components/media/ImagePicker.d.ts +14 -0
  192. package/dist/components/media/ImagePicker.d.ts.map +1 -0
  193. package/dist/components/media/ImagePicker.js +45 -0
  194. package/dist/components/media/MediaLibrary.d.ts +35 -0
  195. package/dist/components/media/MediaLibrary.d.ts.map +1 -0
  196. package/dist/components/media/MediaLibrary.js +100 -0
  197. package/dist/components/media/MediaToolbar.d.ts +21 -0
  198. package/dist/components/media/MediaToolbar.d.ts.map +1 -0
  199. package/dist/components/media/MediaToolbar.js +6 -0
  200. package/dist/components/media/UploadModal.d.ts +9 -0
  201. package/dist/components/media/UploadModal.d.ts.map +1 -0
  202. package/dist/components/media/UploadModal.js +42 -0
  203. package/dist/components/media/UploadZone.d.ts +8 -0
  204. package/dist/components/media/UploadZone.d.ts.map +1 -0
  205. package/dist/components/media/UploadZone.js +22 -0
  206. package/dist/components/media/index.d.ts +11 -0
  207. package/dist/components/media/index.d.ts.map +1 -0
  208. package/dist/components/media/index.js +10 -0
  209. package/dist/components/pages/BlockList.d.ts +2 -0
  210. package/dist/components/pages/BlockList.d.ts.map +1 -0
  211. package/dist/components/pages/BlockList.js +280 -0
  212. package/dist/components/pages/DataList.d.ts +7 -0
  213. package/dist/components/pages/DataList.d.ts.map +1 -0
  214. package/dist/components/pages/DataList.js +244 -0
  215. package/dist/components/pages/MediaPage.d.ts +8 -0
  216. package/dist/components/pages/MediaPage.d.ts.map +1 -0
  217. package/dist/components/pages/MediaPage.js +107 -0
  218. package/dist/components/pages/PageList.d.ts +7 -0
  219. package/dist/components/pages/PageList.d.ts.map +1 -0
  220. package/dist/components/pages/PageList.js +308 -0
  221. package/dist/components/pages/index.d.ts +3 -0
  222. package/dist/components/pages/index.d.ts.map +1 -0
  223. package/dist/components/pages/index.js +2 -0
  224. package/dist/components/puck/MDXContent.d.ts +10 -0
  225. package/dist/components/puck/MDXContent.d.ts.map +1 -0
  226. package/dist/components/puck/MDXContent.js +80 -0
  227. package/dist/components/puck/index.d.ts +2 -0
  228. package/dist/components/puck/index.d.ts.map +1 -0
  229. package/dist/components/puck/index.js +1 -0
  230. package/dist/components/toast.d.ts +44 -0
  231. package/dist/components/toast.d.ts.map +1 -0
  232. package/dist/components/toast.js +7 -0
  233. package/dist/components/ui/Banner.d.ts +76 -0
  234. package/dist/components/ui/Banner.d.ts.map +1 -0
  235. package/dist/components/ui/Banner.js +49 -0
  236. package/dist/components/ui/Button.d.ts +25 -0
  237. package/dist/components/ui/Button.d.ts.map +1 -0
  238. package/dist/components/ui/Button.js +33 -0
  239. package/dist/components/ui/Card.d.ts +72 -0
  240. package/dist/components/ui/Card.d.ts.map +1 -0
  241. package/dist/components/ui/Card.js +49 -0
  242. package/dist/components/ui/FieldError.d.ts +24 -0
  243. package/dist/components/ui/FieldError.d.ts.map +1 -0
  244. package/dist/components/ui/FieldError.js +17 -0
  245. package/dist/components/ui/IconButton.d.ts +13 -0
  246. package/dist/components/ui/IconButton.d.ts.map +1 -0
  247. package/dist/components/ui/IconButton.js +10 -0
  248. package/dist/components/ui/Input.d.ts +37 -0
  249. package/dist/components/ui/Input.d.ts.map +1 -0
  250. package/dist/components/ui/Input.js +9 -0
  251. package/dist/components/ui/SaveIndicator.d.ts +8 -0
  252. package/dist/components/ui/SaveIndicator.d.ts.map +1 -0
  253. package/dist/components/ui/SaveIndicator.js +32 -0
  254. package/dist/components/ui/Select.d.ts +8 -0
  255. package/dist/components/ui/Select.d.ts.map +1 -0
  256. package/dist/components/ui/Select.js +9 -0
  257. package/dist/components/ui/Separator.d.ts +7 -0
  258. package/dist/components/ui/Separator.d.ts.map +1 -0
  259. package/dist/components/ui/Separator.js +8 -0
  260. package/dist/components/ui/Textarea.d.ts +8 -0
  261. package/dist/components/ui/Textarea.d.ts.map +1 -0
  262. package/dist/components/ui/Textarea.js +5 -0
  263. package/dist/components/ui/Tooltip.d.ts +9 -0
  264. package/dist/components/ui/Tooltip.d.ts.map +1 -0
  265. package/dist/components/ui/Tooltip.js +7 -0
  266. package/dist/components/ui/index.d.ts +14 -0
  267. package/dist/components/ui/index.d.ts.map +1 -0
  268. package/dist/components/ui/index.js +17 -0
  269. package/dist/data-schemas.d.mts +0 -1
  270. package/dist/data-schemas.d.mts.map +1 -1
  271. package/dist/data-schemas.d.ts +22 -0
  272. package/dist/data-schemas.d.ts.map +1 -0
  273. package/dist/data-schemas.js +51 -0
  274. package/dist/data-schemas.mjs +3 -4
  275. package/dist/data-schemas.mjs.map +1 -1
  276. package/dist/dev-entry.d.ts +2 -0
  277. package/dist/dev-entry.d.ts.map +1 -0
  278. package/dist/dev-entry.js +19 -0
  279. package/dist/dialog.d.mts +56 -0
  280. package/dist/dialog.d.mts.map +1 -0
  281. package/dist/dialog.mjs +67 -0
  282. package/dist/dialog.mjs.map +1 -0
  283. package/dist/hooks/index.d.ts +10 -0
  284. package/dist/hooks/index.d.ts.map +1 -0
  285. package/dist/hooks/index.js +7 -0
  286. package/dist/hooks/useCanvasTheme.d.ts +12 -0
  287. package/dist/hooks/useCanvasTheme.d.ts.map +1 -0
  288. package/dist/hooks/useCanvasTheme.js +33 -0
  289. package/dist/hooks/useClickOutside.d.ts +7 -0
  290. package/dist/hooks/useClickOutside.d.ts.map +1 -0
  291. package/dist/hooks/useClickOutside.js +18 -0
  292. package/dist/hooks/useDialogState.d.ts +23 -0
  293. package/dist/hooks/useDialogState.d.ts.map +1 -0
  294. package/dist/hooks/useDialogState.js +31 -0
  295. package/dist/hooks/useEditorPref.d.ts +2 -0
  296. package/dist/hooks/useEditorPref.d.ts.map +1 -0
  297. package/dist/hooks/useEditorPref.js +49 -0
  298. package/dist/hooks/useErrorModal.d.ts +15 -0
  299. package/dist/hooks/useErrorModal.d.ts.map +1 -0
  300. package/dist/hooks/useErrorModal.js +35 -0
  301. package/dist/hooks/useSiteBaseUrl.d.ts +10 -0
  302. package/dist/hooks/useSiteBaseUrl.d.ts.map +1 -0
  303. package/dist/hooks/useSiteBaseUrl.js +14 -0
  304. package/dist/hooks/useTheme.d.ts +13 -0
  305. package/dist/hooks/useTheme.d.ts.map +1 -0
  306. package/dist/hooks/useTheme.js +69 -0
  307. package/dist/hooks/useUnsavedChangesGuard.d.ts +16 -0
  308. package/dist/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
  309. package/dist/hooks/useUnsavedChangesGuard.js +29 -0
  310. package/dist/hooks/useUpload.d.ts +10 -0
  311. package/dist/hooks/useUpload.d.ts.map +1 -0
  312. package/dist/hooks/useUpload.js +42 -0
  313. package/dist/hooks/useUploadFlow.d.ts +42 -0
  314. package/dist/hooks/useUploadFlow.d.ts.map +1 -0
  315. package/dist/hooks/useUploadFlow.js +148 -0
  316. package/dist/host-style-probe.d.ts +22 -0
  317. package/dist/host-style-probe.d.ts.map +1 -0
  318. package/dist/host-style-probe.js +508 -0
  319. package/dist/index.d.mts +167 -39
  320. package/dist/index.d.mts.map +1 -1
  321. package/dist/index.d.ts +10 -0
  322. package/dist/index.d.ts.map +1 -0
  323. package/dist/index.js +12 -0
  324. package/dist/index.mjs +36 -2
  325. package/dist/index.mjs.map +1 -0
  326. package/dist/lib/utils.d.ts +13 -0
  327. package/dist/lib/utils.d.ts.map +1 -0
  328. package/dist/lib/utils.js +47 -0
  329. package/dist/main-spa-781YUplS.mjs +46 -0
  330. package/dist/main-spa-781YUplS.mjs.map +1 -0
  331. package/dist/main-spa.d.ts +8 -0
  332. package/dist/main-spa.d.ts.map +1 -0
  333. package/dist/main-spa.js +61 -0
  334. package/dist/main.d.mts +1 -1
  335. package/dist/main.d.ts +2 -0
  336. package/dist/main.d.ts.map +1 -0
  337. package/dist/main.js +13 -0
  338. package/dist/main.mjs +11 -5681
  339. package/dist/main.mjs.map +1 -1
  340. package/dist/mdx-components.d.mts +207 -0
  341. package/dist/mdx-components.d.mts.map +1 -0
  342. package/dist/mdx-components.d.ts +204 -0
  343. package/dist/mdx-components.d.ts.map +1 -0
  344. package/dist/mdx-components.js +217 -0
  345. package/dist/mdx-components.mjs +208 -0
  346. package/dist/mdx-components.mjs.map +1 -0
  347. package/dist/media/AssetScopePill.d.ts +30 -0
  348. package/dist/media/AssetScopePill.d.ts.map +1 -0
  349. package/dist/media/AssetScopePill.js +30 -0
  350. package/dist/media/MediaIssueBadge.d.ts +33 -0
  351. package/dist/media/MediaIssueBadge.d.ts.map +1 -0
  352. package/dist/media/MediaIssueBadge.js +54 -0
  353. package/dist/media/types.d.ts +101 -0
  354. package/dist/media/types.d.ts.map +1 -0
  355. package/dist/media/types.js +1 -0
  356. package/dist/media/use-asset-scope.d.ts +25 -0
  357. package/dist/media/use-asset-scope.d.ts.map +1 -0
  358. package/dist/media/use-asset-scope.js +54 -0
  359. package/dist/media/use-media-issue.d.ts +24 -0
  360. package/dist/media/use-media-issue.d.ts.map +1 -0
  361. package/dist/media/use-media-issue.js +49 -0
  362. package/dist/mock-puck-config.d.mts +23 -0
  363. package/dist/mock-puck-config.d.mts.map +1 -0
  364. package/dist/mock-puck-config.d.ts +21 -0
  365. package/dist/mock-puck-config.d.ts.map +1 -0
  366. package/dist/mock-puck-config.js +73 -0
  367. package/dist/mock-puck-config.mjs +125 -0
  368. package/dist/mock-puck-config.mjs.map +1 -0
  369. package/dist/page-schemas.d.mts +139 -6
  370. package/dist/page-schemas.d.mts.map +1 -1
  371. package/dist/page-schemas.d.ts +156 -0
  372. package/dist/page-schemas.d.ts.map +1 -0
  373. package/dist/page-schemas.js +118 -0
  374. package/dist/page-schemas.mjs +74 -6
  375. package/dist/page-schemas.mjs.map +1 -1
  376. package/dist/puck-config.d.mts +0 -1
  377. package/dist/puck-config.d.mts.map +1 -1
  378. package/dist/puck-config.d.ts +31 -0
  379. package/dist/puck-config.d.ts.map +1 -0
  380. package/dist/puck-config.js +50 -0
  381. package/dist/puck-config.mjs +3 -4
  382. package/dist/puck-config.mjs.map +1 -1
  383. package/dist/selected-block.d.ts +61 -0
  384. package/dist/selected-block.d.ts.map +1 -0
  385. package/dist/selected-block.js +64 -0
  386. package/dist/site-styles.d.mts +90 -8
  387. package/dist/site-styles.d.mts.map +1 -1
  388. package/dist/site-styles.d.ts +121 -0
  389. package/dist/site-styles.d.ts.map +1 -0
  390. package/dist/site-styles.js +253 -0
  391. package/dist/site-styles.mjs +187 -5
  392. package/dist/site-styles.mjs.map +1 -1
  393. package/dist/spa/main.css +690 -127
  394. package/dist/toast.d.mts +7 -0
  395. package/dist/toast.d.mts.map +1 -0
  396. package/dist/toast.mjs +16 -0
  397. package/dist/toast.mjs.map +1 -0
  398. package/dist/types.d.ts +57 -0
  399. package/dist/types.d.ts.map +1 -0
  400. package/dist/types.js +1 -0
  401. package/dist/ui-CIacC6Mv.mjs +318 -0
  402. package/dist/ui-CIacC6Mv.mjs.map +1 -0
  403. package/dist/ui-config.d.ts +70 -0
  404. package/dist/ui-config.d.ts.map +1 -0
  405. package/dist/ui-config.js +44 -0
  406. package/dist/ui.d.mts +290 -0
  407. package/dist/ui.d.mts.map +1 -0
  408. package/dist/ui.mjs +2 -0
  409. package/dist/utils/asset-url.d.ts +3 -0
  410. package/dist/utils/asset-url.d.ts.map +1 -0
  411. package/dist/utils/asset-url.js +7 -0
  412. package/dist/utils/cn.d.ts +3 -0
  413. package/dist/utils/cn.d.ts.map +1 -0
  414. package/dist/utils/cn.js +5 -0
  415. package/dist/utils/format-date.d.ts +15 -0
  416. package/dist/utils/format-date.d.ts.map +1 -0
  417. package/dist/utils/format-date.js +37 -0
  418. package/dist/utils/mdast-to-html.d.ts +55 -0
  419. package/dist/utils/mdast-to-html.d.ts.map +1 -0
  420. package/dist/utils/mdast-to-html.js +206 -0
  421. package/dist/utils/mdast-tree.d.ts +104 -0
  422. package/dist/utils/mdast-tree.d.ts.map +1 -0
  423. package/dist/utils/mdast-tree.js +285 -0
  424. package/dist/utils/pageMetadata.d.ts +67 -0
  425. package/dist/utils/pageMetadata.d.ts.map +1 -0
  426. package/dist/utils/pageMetadata.js +161 -0
  427. package/dist/utils/slugify.d.ts +12 -0
  428. package/dist/utils/slugify.d.ts.map +1 -0
  429. package/dist/utils/slugify.js +17 -0
  430. package/dist/utils/zodIntrospect.d.ts +24 -0
  431. package/dist/utils/zodIntrospect.d.ts.map +1 -0
  432. package/dist/utils/zodIntrospect.js +88 -0
  433. package/package.json +148 -35
  434. package/styles/styles.css.d.ts +2 -0
  435. package/styles/tailwind-theme.css +126 -0
  436. package/styles/tailwind-theme.css.d.ts +2 -0
  437. package/dist/puck-C9_F3_cJ.mjs +0 -1589
  438. package/dist/puck-C9_F3_cJ.mjs.map +0 -1
package/dist/App.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ import type { Config } from '@puckeditor/core';
2
+ import { type DataSchemas } from './data-schemas';
3
+ export interface RouteDeps {
4
+ puckConfig: Config;
5
+ dataSchemas: DataSchemas;
6
+ }
7
+ /**
8
+ * Single source of truth for the SPA's route shape. Used by both the
9
+ * production Data Router (default export) and tests rendering through
10
+ * `<AppRoutes>` inside a legacy `<MemoryRouter>`.
11
+ *
12
+ * `/pages/:id` and `/blocks/:id` sit OUTSIDE the CMSLayout shell so the
13
+ * editors occupy the full viewport — the page-route equivalent of "modal
14
+ * takes over the screen".
15
+ *
16
+ * Exported so tests that need `useBlocker` (the unsaved-changes guard hooks
17
+ * inside the page/block editors) can plug the same routes into
18
+ * `createMemoryRouter` + `<RouterProvider>` instead of the legacy
19
+ * `<MemoryRouter>` element.
20
+ */
21
+ export declare function routeElements({ puckConfig, dataSchemas }: RouteDeps): import("react/jsx-runtime").JSX.Element;
22
+ /**
23
+ * Element-form router tree. Compatible with the legacy `<MemoryRouter>` test
24
+ * harness. Hooks like `useBlocker` won't work under this; tests that need
25
+ * `useBlocker` must build their own `createMemoryRouter` + `<RouterProvider>`.
26
+ */
27
+ export declare function AppRoutes(): import("react/jsx-runtime").JSX.Element;
28
+ /**
29
+ * Production app entry. Uses the Data Router API so v7's `useBlocker` works
30
+ * for the unsaved-changes navigation guard in MdxPageEditor / BlockEditor.
31
+ */
32
+ export default function App({ basename }?: {
33
+ basename?: string;
34
+ }): import("react/jsx-runtime").JSX.Element;
35
+ //# sourceMappingURL=App.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAW/C,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,gBAAgB,CAAC;AAGlE,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,SAAS,2CAcnE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,4CAIxB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,2CAanE"}
package/dist/App.js ADDED
@@ -0,0 +1,52 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { createBrowserRouter, createRoutesFromElements, Route, RouterProvider, Routes } from 'react-router-dom';
4
+ import { CMSDashboard } from './components/CMSDashboard';
5
+ import { CMSLayout } from './components/CMSLayout';
6
+ import { BlockEditor } from './components/editor/BlockEditor';
7
+ import { PageEditorWrapper } from './components/editor/PageEditorWrapper';
8
+ import { BlockList } from './components/pages/BlockList';
9
+ import { DataList } from './components/pages/DataList';
10
+ import { MediaPage } from './components/pages/MediaPage';
11
+ import { PageList } from './components/pages/PageList';
12
+ import { useDataSchemas } from './data-schemas';
13
+ import { usePuckConfig } from './puck-config';
14
+ /**
15
+ * Single source of truth for the SPA's route shape. Used by both the
16
+ * production Data Router (default export) and tests rendering through
17
+ * `<AppRoutes>` inside a legacy `<MemoryRouter>`.
18
+ *
19
+ * `/pages/:id` and `/blocks/:id` sit OUTSIDE the CMSLayout shell so the
20
+ * editors occupy the full viewport — the page-route equivalent of "modal
21
+ * takes over the screen".
22
+ *
23
+ * Exported so tests that need `useBlocker` (the unsaved-changes guard hooks
24
+ * inside the page/block editors) can plug the same routes into
25
+ * `createMemoryRouter` + `<RouterProvider>` instead of the legacy
26
+ * `<MemoryRouter>` element.
27
+ */
28
+ export function routeElements({ puckConfig, dataSchemas }) {
29
+ return (_jsxs(_Fragment, { children: [_jsxs(Route, { path: "/", element: _jsx(CMSLayout, {}), children: [_jsx(Route, { index: true, element: _jsx(CMSDashboard, {}) }), _jsx(Route, { path: "pages", element: _jsx(PageList, {}) }), _jsx(Route, { path: "blocks", element: _jsx(BlockList, {}) }), _jsx(Route, { path: "data", element: _jsx(DataList, { dataSchemas: dataSchemas }) }), _jsx(Route, { path: "media", element: _jsx(MediaPage, {}) })] }), _jsx(Route, { path: "/pages/:id", element: _jsx(PageEditorWrapper, { puckConfig: puckConfig }) }), _jsx(Route, { path: "/blocks/:id", element: _jsx(BlockEditor, {}) })] }));
30
+ }
31
+ /**
32
+ * Element-form router tree. Compatible with the legacy `<MemoryRouter>` test
33
+ * harness. Hooks like `useBlocker` won't work under this; tests that need
34
+ * `useBlocker` must build their own `createMemoryRouter` + `<RouterProvider>`.
35
+ */
36
+ export function AppRoutes() {
37
+ const puckConfig = usePuckConfig();
38
+ const dataSchemas = useDataSchemas();
39
+ return _jsx(Routes, { children: routeElements({ puckConfig, dataSchemas }) });
40
+ }
41
+ /**
42
+ * Production app entry. Uses the Data Router API so v7's `useBlocker` works
43
+ * for the unsaved-changes navigation guard in MdxPageEditor / BlockEditor.
44
+ */
45
+ export default function App({ basename } = {}) {
46
+ const puckConfig = usePuckConfig();
47
+ const dataSchemas = useDataSchemas();
48
+ const router = useMemo(() => createBrowserRouter(createRoutesFromElements(routeElements({ puckConfig, dataSchemas })), {
49
+ basename,
50
+ }), [puckConfig, dataSchemas, basename]);
51
+ return _jsx(RouterProvider, { router: router });
52
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The full cms-spa editor as a React component.
3
+ *
4
+ * Reads the current `UIConfig` via `getUIConfig` — callers MUST call
5
+ * `configureUI` before rendering this component. The `QueryClient`
6
+ * and `ContentAPIClient` singletons are built via `useMemo`, so
7
+ * consumers that force a fresh mount via React `key` (e.g. on
8
+ * workspace switch) get clean cache state for the new workspace,
9
+ * while single-mount consumers (e.g. astro-cms's `/__cms` route)
10
+ * keep the same instances for the lifetime of the page.
11
+ */
12
+ export declare function CmsSpaApp(): import("react/jsx-runtime").JSX.Element;
13
+ //# sourceMappingURL=CmsSpaApp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CmsSpaApp.d.ts","sourceRoot":"","sources":["../src/CmsSpaApp.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,4CAwBxB"}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ContentAPIClient, setContentAPIClient } from '@conloca/content-api-client';
3
+ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
4
+ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
5
+ import { useMemo } from 'react';
6
+ import App from './App';
7
+ import { CanvasThemeProvider } from './hooks/useCanvasTheme';
8
+ import { ThemeProvider } from './hooks/useTheme';
9
+ import { getUIConfig } from './ui-config';
10
+ /**
11
+ * The full cms-spa editor as a React component.
12
+ *
13
+ * Reads the current `UIConfig` via `getUIConfig` — callers MUST call
14
+ * `configureUI` before rendering this component. The `QueryClient`
15
+ * and `ContentAPIClient` singletons are built via `useMemo`, so
16
+ * consumers that force a fresh mount via React `key` (e.g. on
17
+ * workspace switch) get clean cache state for the new workspace,
18
+ * while single-mount consumers (e.g. astro-cms's `/__cms` route)
19
+ * keep the same instances for the lifetime of the page.
20
+ */
21
+ export function CmsSpaApp() {
22
+ const config = getUIConfig();
23
+ const queryClient = useMemo(() => {
24
+ const client = new QueryClient(config.queryClientOptions);
25
+ // Exposed globally for the content change listener (see astro-cms).
26
+ window.__QUERY_CLIENT__ = client;
27
+ return client;
28
+ }, [config.queryClientOptions]);
29
+ useMemo(() => {
30
+ setContentAPIClient(config.contentClient ?? new ContentAPIClient({ baseUrl: config.apiBaseUrl }));
31
+ }, [config.apiBaseUrl, config.contentClient]);
32
+ return (_jsxs(QueryClientProvider, { client: queryClient, children: [_jsx(ThemeProvider, { children: _jsx(CanvasThemeProvider, { children: _jsx(App, { basename: config.basename }) }) }), config.enableDevtools && _jsx(ReactQueryDevtools, { initialIsOpen: false })] }));
33
+ }
@@ -0,0 +1,10 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ //#region src/utils/cn.ts
4
+ function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
7
+ //#endregion
8
+ export { cn as t };
9
+
10
+ //# sourceMappingURL=cn-dlASUkDY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn-dlASUkDY.mjs","names":[],"sources":["../src/utils/cn.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAGA,SAAgB,GAAG,GAAG,QAAsB;CAC1C,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B"}
@@ -0,0 +1,2 @@
1
+ export declare function CMSDashboard(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=CMSDashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CMSDashboard.d.ts","sourceRoot":"","sources":["../../src/components/CMSDashboard.tsx"],"names":[],"mappings":"AAWA,wBAAgB,YAAY,4CA0G3B"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useBlocks, useData, useFolderTree, useSitePages } from '@conloca/content-api-client';
3
+ import { Database, FileText, Image, Package, Plus, Upload } from 'lucide-react';
4
+ import { Link } from 'react-router-dom';
5
+ import { SectionCard } from './cards/SectionCard';
6
+ import { RecentActivity } from './dashboard/RecentActivity';
7
+ function countAllAssets(nodes) {
8
+ return nodes.reduce((sum, node) => sum + node.assetCount + countAllAssets(node.children), 0);
9
+ }
10
+ export function CMSDashboard() {
11
+ const { data: sitePages, isLoading: pagesLoading } = useSitePages('default');
12
+ const { data: blocks, isLoading: blocksLoading } = useBlocks();
13
+ const { data: dataEntries, isLoading: dataLoading } = useData();
14
+ const { data: folderTree, isLoading: mediaLoading } = useFolderTree();
15
+ const pagesCount = sitePages?.items?.length ?? 0;
16
+ const blocksCount = blocks?.items?.length ?? 0;
17
+ const dataCount = dataEntries?.items?.length ?? 0;
18
+ const mediaCount = countAllAssets(folderTree?.tree ?? []);
19
+ return (_jsxs("div", { className: "p-6", children: [_jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-6", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-semibold text-grey-01 dark:text-grey-12", "data-testid": "dashboard-title", children: "Dashboard" }), _jsx("p", { className: "text-grey-05 dark:text-grey-06 mt-1", children: "Overview of your content and recent activity." })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs(Link, { to: "/pages", className: "flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium whitespace-nowrap bg-grey-01 text-grey-12 hover:bg-azure-04 hover:text-white dark:bg-grey-12 dark:text-grey-01 dark:hover:bg-azure-06 dark:hover:text-white transition-colors", children: [_jsx(Plus, { className: "h-4 w-4" }), "New Page"] }), _jsxs(Link, { to: "/media", className: "flex items-center gap-2 px-3 py-2 border border-grey-09 dark:border-grey-03 rounded-md text-sm font-medium whitespace-nowrap text-grey-01 dark:text-grey-12 hover:bg-grey-11 dark:hover:bg-grey-03 transition-colors", children: [_jsx(Upload, { className: "h-4 w-4" }), "Upload"] })] })] }), _jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3 mb-8", children: [_jsx(SectionCard, { to: "/pages", icon: _jsx(FileText, { className: "h-5 w-5 text-grey-04 dark:text-grey-07 group-hover:text-azure-04 transition-colors" }), title: "Pages", description: "", count: pagesCount, countLabel: pagesCount === 1 ? 'page' : 'pages', isLoading: pagesLoading, testId: "section-card-pages", variant: "compact" }), _jsx(SectionCard, { to: "/media", icon: _jsx(Image, { className: "h-5 w-5 text-grey-04 dark:text-grey-07 group-hover:text-azure-04 transition-colors" }), title: "Media", description: "", count: mediaCount, countLabel: mediaCount === 1 ? 'asset' : 'assets', isLoading: mediaLoading, testId: "section-card-media", variant: "compact" }), _jsx(SectionCard, { to: "/blocks", icon: _jsx(Package, { className: "h-5 w-5 text-grey-04 dark:text-grey-07 group-hover:text-azure-04 transition-colors" }), title: "Blocks", description: "", count: blocksCount, countLabel: blocksCount === 1 ? 'block' : 'blocks', isLoading: blocksLoading, testId: "section-card-blocks", variant: "compact" }), _jsx(SectionCard, { to: "/data", icon: _jsx(Database, { className: "h-5 w-5 text-grey-04 dark:text-grey-07 group-hover:text-azure-04 transition-colors" }), title: "Data", description: "", count: dataCount, countLabel: dataCount === 1 ? 'entry' : 'entries', isLoading: dataLoading, testId: "section-card-data", variant: "compact" })] }), _jsxs("div", { className: "bg-white dark:bg-grey-02 border border-grey-09 dark:border-grey-03 rounded-lg", children: [_jsx("div", { className: "px-4 py-3 border-b border-grey-09 dark:border-grey-03", children: _jsx("h2", { className: "text-xs font-medium uppercase tracking-wider text-grey-05 dark:text-grey-06", children: "Recent Activity" }) }), _jsx(RecentActivity, {})] })] }));
20
+ }
@@ -0,0 +1,2 @@
1
+ export declare function CMSLayout(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=CMSLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CMSLayout.d.ts","sourceRoot":"","sources":["../../src/components/CMSLayout.tsx"],"names":[],"mappings":"AAKA,wBAAgB,SAAS,4CAoBxB"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { Outlet, useLocation } from 'react-router-dom';
4
+ import { MobileTopBar } from './MobileTopBar';
5
+ import { Sidebar, SidebarDrawer } from './Sidebar';
6
+ export function CMSLayout() {
7
+ const [drawerOpen, setDrawerOpen] = useState(false);
8
+ const location = useLocation();
9
+ // Close the mobile drawer on route changes.
10
+ // biome-ignore lint/correctness/useExhaustiveDependencies: pathname is the navigation signal
11
+ useEffect(() => {
12
+ setDrawerOpen(false);
13
+ }, [location.pathname]);
14
+ return (_jsxs("div", { className: "flex max-md:flex-col h-screen bg-grey-12 dark:bg-grey-01", children: [_jsx(MobileTopBar, { onMenuClick: () => setDrawerOpen(true) }), _jsx(SidebarDrawer, { open: drawerOpen, onOpenChange: setDrawerOpen }), _jsx(Sidebar, {}), _jsx("main", { className: "flex-1 overflow-auto", children: _jsx(Outlet, {}) })] }));
15
+ }
@@ -0,0 +1,2 @@
1
+ export declare function ConlocaLogo(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=ConlocaLogo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConlocaLogo.d.ts","sourceRoot":"","sources":["../../src/components/ConlocaLogo.tsx"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,4CAS1B"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function ConlocaLogo() {
3
+ return (_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "h-7 w-7 rounded-md bg-azure-04 flex items-center justify-center", children: _jsx("span", { className: "text-white font-bold text-sm", children: "C" }) }), _jsx("span", { className: "text-base font-semibold text-grey-01 dark:text-grey-12", children: "Conloca" })] }));
4
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * VPS-ONLY git status surface.
3
+ *
4
+ * This panel surfaces filesystem-backed git operations (pull /
5
+ * commit / push) against a single-tenant content-api endpoint
6
+ * (`/__conloca/api/git/*`). It is rendered ONLY when
7
+ * `configureUI({ hosted: false })` — see `Sidebar.tsx`, which
8
+ * gates the mount on `getUIConfig.hosted !== true`.
9
+ *
10
+ * In hosted mode, the host shell owns the equivalent surface — a
11
+ * four-layer status pill plus popover for editor save / commit /
12
+ * push / deploy. The hosted impl lives in the host shell package
13
+ * and is driven by its own status subscription, not by the
14
+ * content-api git endpoints. The two flows are NOT
15
+ * interchangeable: hosted goes through the backend, which mediates
16
+ * commits and pushes server-side; VPS assumes the caller IS the
17
+ * git user with direct filesystem access.
18
+ *
19
+ * Do not refactor this component to "support hosted mode" — the
20
+ * deployment-mode seam at `Sidebar.tsx` is intentional. If
21
+ * cms-spa ever needs to surface hosted status, add a new
22
+ * component; don't extend this one.
23
+ */
24
+ export declare function GitStatusPanel(): import("react/jsx-runtime").JSX.Element;
25
+ //# sourceMappingURL=GitStatusPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitStatusPanel.d.ts","sourceRoot":"","sources":["../../src/components/GitStatusPanel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,wBAAgB,cAAc,4CAiK7B"}
@@ -0,0 +1,77 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCommitChanges, useGitStatus, usePullChanges, usePushChanges } from '@conloca/content-api-client';
3
+ import { AlertCircle, ArrowDownToLine, Check, GitBranch, Loader2, Upload } from 'lucide-react';
4
+ import { cn } from '../utils/cn';
5
+ /**
6
+ * VPS-ONLY git status surface.
7
+ *
8
+ * This panel surfaces filesystem-backed git operations (pull /
9
+ * commit / push) against a single-tenant content-api endpoint
10
+ * (`/__conloca/api/git/*`). It is rendered ONLY when
11
+ * `configureUI({ hosted: false })` — see `Sidebar.tsx`, which
12
+ * gates the mount on `getUIConfig.hosted !== true`.
13
+ *
14
+ * In hosted mode, the host shell owns the equivalent surface — a
15
+ * four-layer status pill plus popover for editor save / commit /
16
+ * push / deploy. The hosted impl lives in the host shell package
17
+ * and is driven by its own status subscription, not by the
18
+ * content-api git endpoints. The two flows are NOT
19
+ * interchangeable: hosted goes through the backend, which mediates
20
+ * commits and pushes server-side; VPS assumes the caller IS the
21
+ * git user with direct filesystem access.
22
+ *
23
+ * Do not refactor this component to "support hosted mode" — the
24
+ * deployment-mode seam at `Sidebar.tsx` is intentional. If
25
+ * cms-spa ever needs to surface hosted status, add a new
26
+ * component; don't extend this one.
27
+ */
28
+ export function GitStatusPanel() {
29
+ const { data: status, isLoading, error } = useGitStatus();
30
+ const commitMutation = useCommitChanges();
31
+ const pullMutation = usePullChanges();
32
+ const pushMutation = usePushChanges();
33
+ // Handle commit click
34
+ const handleCommit = () => {
35
+ if (status?.hasChanges) {
36
+ commitMutation.mutate(undefined);
37
+ }
38
+ };
39
+ // Handle push click
40
+ const handlePush = () => {
41
+ if (status && status.ahead > 0) {
42
+ pushMutation.mutate();
43
+ }
44
+ };
45
+ // Handle pull click
46
+ const handlePull = () => {
47
+ if (status?.isRepo) {
48
+ pullMutation.mutate();
49
+ }
50
+ };
51
+ // Not a repo state
52
+ if (status && !status.isRepo) {
53
+ return (_jsxs("div", { className: "flex items-center gap-2 text-grey-06 dark:text-grey-05 text-sm", children: [_jsx(GitBranch, { className: "h-4 w-4" }), _jsx("span", { children: "Not a git repo" })] }));
54
+ }
55
+ // Loading state
56
+ if (isLoading) {
57
+ return (_jsx("div", { className: "flex items-center gap-2 text-grey-06 dark:text-grey-05", children: _jsx(Loader2, { className: "h-4 w-4 animate-spin" }) }));
58
+ }
59
+ // Error state
60
+ if (error) {
61
+ return (_jsxs("div", { className: "flex items-center gap-2 text-red-04 text-sm", children: [_jsx(AlertCircle, { className: "h-4 w-4" }), _jsx("span", { children: "Git error" })] }));
62
+ }
63
+ const btnBase = 'flex items-center justify-center gap-1.5 rounded-md text-xs font-medium transition-colors';
64
+ const btnSize = 'flex-1 px-2 py-1.5';
65
+ // Subtle (ghost) styling for non-actionable states — keeps the toolbar from
66
+ // looking like 3 chunky colored bars. Color only when the action is meaningful.
67
+ const ghostClasses = 'bg-grey-11 dark:bg-grey-03 text-grey-05 dark:text-grey-06 hover:bg-grey-10 dark:hover:bg-grey-02';
68
+ return (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-grey-05 dark:text-grey-06 text-xs min-w-0", children: [_jsx(GitBranch, { className: "h-3.5 w-3.5 flex-shrink-0" }), _jsx("span", { className: "truncate font-mono flex-1 min-w-0", title: status?.branch || 'unknown', children: status?.branch || 'unknown' }), status && status.behind > 0 ? _jsxs("span", { className: "text-yellow-05 flex-shrink-0", children: ["\u2193 ", status.behind] }) : null] }), _jsxs("div", { className: "grid grid-cols-2 gap-1", children: [_jsxs("button", { type: "button", onClick: handlePull, disabled: !status?.isRepo || pullMutation.isPending, title: "Pull from remote", className: cn(btnBase, btnSize, status?.isRepo && status.behind > 0
69
+ ? 'bg-yellow-05 text-white hover:bg-yellow-04'
70
+ : status?.isRepo
71
+ ? ghostClasses
72
+ : 'bg-grey-11 dark:bg-grey-03 text-grey-06 dark:text-grey-05 cursor-not-allowed'), children: [pullMutation.isPending ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(ArrowDownToLine, { className: "h-3.5 w-3.5" })), _jsx("span", { children: "Pull" })] }), _jsxs("button", { type: "button", onClick: handleCommit, disabled: !status?.hasChanges || commitMutation.isPending, title: "Commit local changes", className: cn(btnBase, btnSize, status?.hasChanges
73
+ ? 'bg-azure-04 text-white hover:bg-azure-03'
74
+ : 'bg-grey-11 dark:bg-grey-03 text-grey-06 dark:text-grey-05 cursor-not-allowed'), children: [commitMutation.isPending ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(Check, { className: "h-3.5 w-3.5" })), _jsx("span", { children: "Commit" }), status?.changedFiles ? (_jsx("span", { className: "px-1 bg-black/10 dark:bg-white/20 rounded-md text-xs tabular-nums", children: status.changedFiles })) : null] }), _jsxs("button", { type: "button", onClick: handlePush, disabled: !status || status.ahead === 0 || pushMutation.isPending, title: "Push to remote", className: cn(btnBase, btnSize, 'col-span-2', status && status.ahead > 0
75
+ ? 'bg-green-05 text-white hover:bg-green-04'
76
+ : 'bg-grey-11 dark:bg-grey-03 text-grey-06 dark:text-grey-05 cursor-not-allowed'), children: [pushMutation.isPending ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(Upload, { className: "h-3.5 w-3.5" })), _jsx("span", { children: "Push" }), status && status.ahead > 0 ? (_jsx("span", { className: "px-1 bg-black/10 dark:bg-white/20 rounded-md text-xs tabular-nums", children: status.ahead })) : null] })] }), commitMutation.isError ? _jsx("span", { className: "text-red-04 text-xs", children: "Commit failed" }) : null, pushMutation.isError ? _jsx("span", { className: "text-red-04 text-xs", children: "Push failed" }) : null, pullMutation.isError ? _jsx("span", { className: "text-red-04 text-xs", children: "Pull failed" }) : null] }));
77
+ }
@@ -0,0 +1,6 @@
1
+ interface MobileTopBarProps {
2
+ onMenuClick: () => void;
3
+ }
4
+ export declare function MobileTopBar({ onMenuClick }: MobileTopBarProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=MobileTopBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileTopBar.d.ts","sourceRoot":"","sources":["../../src/components/MobileTopBar.tsx"],"names":[],"mappings":"AAGA,UAAU,iBAAiB;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CAc9D"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Menu } from 'lucide-react';
3
+ import { ConlocaLogo } from './ConlocaLogo';
4
+ export function MobileTopBar({ onMenuClick }) {
5
+ return (_jsxs("header", { className: "md:hidden flex items-center gap-3 px-3 py-2 border-b border-grey-09 dark:border-grey-03 bg-white dark:bg-grey-02", children: [_jsx("button", { type: "button", onClick: onMenuClick, className: "p-2 rounded-md text-grey-04 hover:bg-grey-11 hover:text-grey-01 dark:text-grey-07 dark:hover:bg-grey-03 dark:hover:text-grey-12 transition-colors", "aria-label": "Open navigation", children: _jsx(Menu, { className: "h-5 w-5" }) }), _jsx(ConlocaLogo, {})] }));
6
+ }
@@ -0,0 +1,8 @@
1
+ export declare function Sidebar(): import("react/jsx-runtime").JSX.Element;
2
+ interface SidebarDrawerProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ }
6
+ export declare function SidebarDrawer({ open, onOpenChange }: SidebarDrawerProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../src/components/Sidebar.tsx"],"names":[],"mappings":"AAiHA,wBAAgB,OAAO,4CAMtB;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,kBAAkB,2CAqBvE"}
@@ -0,0 +1,40 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as Dialog from '@radix-ui/react-dialog';
3
+ import { Database, FileText, ImageIcon, LayoutDashboard, Monitor, Moon, Package, Sun, X } from 'lucide-react';
4
+ import { NavLink } from 'react-router-dom';
5
+ import { useTheme } from '../hooks/useTheme';
6
+ import { getUIConfig } from '../ui-config';
7
+ import { cn } from '../utils/cn';
8
+ import { ConlocaLogo } from './ConlocaLogo';
9
+ import { GitStatusPanel } from './GitStatusPanel';
10
+ import { UserAvatar } from './UserAvatar';
11
+ function NavItem({ to, icon: Icon, label, end, badge }) {
12
+ return (_jsxs(NavLink, { to: to, end: end, className: ({ isActive }) => cn('relative flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors', isActive
13
+ ? 'text-grey-01 dark:text-grey-12 font-medium bg-grey-11 dark:bg-grey-03 before:absolute before:left-0 before:top-2 before:bottom-2 before:w-[3px] before:bg-azure-04 before:dark:bg-azure-06 before:rounded-r-full'
14
+ : 'font-medium text-grey-04 hover:bg-grey-11 hover:text-grey-01 dark:text-grey-07 dark:hover:bg-grey-03 dark:hover:text-grey-12'), children: [_jsx(Icon, { className: "h-4 w-4 flex-shrink-0" }), _jsx("span", { className: "flex-1", children: label }), badge !== undefined && badge > 0 ? (_jsx("span", { "aria-label": `${badge} pages need review`, className: "ml-auto inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 rounded-full text-xs font-semibold bg-red-04 text-white", children: badge })) : null] }));
15
+ }
16
+ const themeOrder = ['system', 'light', 'dark'];
17
+ const themeIcons = { system: Monitor, light: Sun, dark: Moon };
18
+ const themeLabels = { system: 'System', light: 'Light', dark: 'Dark' };
19
+ function ThemeToggle() {
20
+ const { theme, setTheme } = useTheme();
21
+ const Icon = themeIcons[theme];
22
+ const cycleTheme = () => {
23
+ const idx = themeOrder.indexOf(theme);
24
+ setTheme(themeOrder[(idx + 1) % themeOrder.length]);
25
+ };
26
+ return (_jsx("button", { type: "button", onClick: cycleTheme, className: "flex items-center justify-center p-2 rounded-md text-grey-04 hover:bg-grey-11 hover:text-grey-01 dark:text-grey-07 dark:hover:bg-grey-03 dark:hover:text-grey-12 transition-colors", title: `Theme: ${themeLabels[theme]} (click to cycle)`, "aria-label": `Theme: ${themeLabels[theme]}`, children: _jsx(Icon, { className: "h-4 w-4" }) }));
27
+ }
28
+ function SidebarContent() {
29
+ // In hosted mode the host shell owns workspace identity/account/state UI,
30
+ // so cms-spa hides its standalone widgets to avoid duplication. Branding
31
+ // and theme remain because cms-spa is the only chrome in hosted mode too.
32
+ const hosted = getUIConfig().hosted === true;
33
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "px-4 py-5 border-b border-grey-09 dark:border-grey-03", children: _jsx(ConlocaLogo, {}) }), _jsxs("nav", { className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto", children: [_jsx(NavItem, { to: "/", icon: LayoutDashboard, label: "Dashboard", end: true }), _jsx(NavItem, { to: "/pages", icon: FileText, label: "Pages" }), _jsx(NavItem, { to: "/media", icon: ImageIcon, label: "Media" }), _jsx(NavItem, { to: "/blocks", icon: Package, label: "Blocks" }), _jsx(NavItem, { to: "/data", icon: Database, label: "Data" })] }), !hosted && (_jsx("div", { className: "px-3 py-3 border-t border-grey-09 dark:border-grey-03", children: _jsx(GitStatusPanel, {}) })), _jsxs("div", { className: "px-3 py-3 border-t border-grey-09 dark:border-grey-03 flex items-center justify-between", children: [hosted ? _jsx("span", {}) : _jsx(UserAvatar, {}), _jsx(ThemeToggle, {})] })] }));
34
+ }
35
+ export function Sidebar() {
36
+ return (_jsx("aside", { className: "hidden md:flex w-60 flex-shrink-0 h-screen flex-col border-r border-grey-09 bg-white dark:border-grey-03 dark:bg-grey-02", children: _jsx(SidebarContent, {}) }));
37
+ }
38
+ export function SidebarDrawer({ open, onOpenChange }) {
39
+ return (_jsx(Dialog.Root, { open: open, onOpenChange: onOpenChange, children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "md:hidden fixed inset-0 z-40 bg-black/50 backdrop-blur-sm data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out" }), _jsxs(Dialog.Content, { "aria-describedby": undefined, className: "md:hidden fixed inset-y-0 left-0 z-50 w-72 max-w-[80vw] flex flex-col border-r border-grey-09 dark:border-grey-03 bg-white dark:bg-grey-02 shadow-2xl data-[state=open]:animate-slide-in-left data-[state=closed]:animate-slide-out-left", children: [_jsx(Dialog.Title, { className: "sr-only", children: "Navigation" }), _jsx(Dialog.Close, { className: "absolute top-3 right-3 z-10 p-1 rounded-md text-grey-04 hover:bg-grey-11 hover:text-grey-01 dark:text-grey-07 dark:hover:bg-grey-03 dark:hover:text-grey-12 transition-colors", "aria-label": "Close navigation", children: _jsx(X, { className: "h-5 w-5" }) }), _jsx(SidebarContent, {})] })] }) }));
40
+ }
@@ -0,0 +1,2 @@
1
+ export declare function UserAvatar(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=UserAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserAvatar.d.ts","sourceRoot":"","sources":["../../src/components/UserAvatar.tsx"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,4CAwBzB"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCurrentUser } from '@conloca/content-api-client';
3
+ import { User } from 'lucide-react';
4
+ export function UserAvatar() {
5
+ const { data, isLoading } = useCurrentUser();
6
+ if (isLoading) {
7
+ return _jsx("div", { className: "h-8 w-8 rounded-full bg-grey-11 dark:bg-grey-03 animate-pulse" });
8
+ }
9
+ if (!data?.authenticated || !data.user) {
10
+ return (_jsx("div", { className: "flex items-center gap-2 text-grey-06 dark:text-grey-05", title: "Not authenticated", children: _jsx(User, { className: "h-5 w-5" }) }));
11
+ }
12
+ const initial = data.user.email.charAt(0).toUpperCase();
13
+ return (_jsx("div", { className: "flex items-center gap-2", title: data.user.email, children: _jsx("div", { className: "h-8 w-8 rounded-full bg-azure-04 text-white flex items-center justify-center text-sm font-medium", children: initial }) }));
14
+ }
@@ -0,0 +1,14 @@
1
+ interface DataEntryCardProps {
2
+ id: string;
3
+ title: string;
4
+ description?: string;
5
+ collection: string;
6
+ name?: string;
7
+ locales: string[];
8
+ onEditData: () => void;
9
+ onEditProperties: () => void;
10
+ onDelete: () => void;
11
+ }
12
+ export declare function DataEntryCard({ id, title, description, collection, name, locales, onEditData, onEditProperties, onDelete, }: DataEntryCardProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=DataEntryCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataEntryCard.d.ts","sourceRoot":"","sources":["../../../src/components/cards/DataEntryCard.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAWD,wBAAgB,aAAa,CAAC,EAC5B,EAAE,EACF,KAAK,EACL,WAAW,EACX,UAAU,EACV,IAAI,EACJ,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,QAAQ,GACT,EAAE,kBAAkB,2CAqHpB"}
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Database, Edit2, ExternalLink, FileJson, MoreVertical, Settings, Trash2 } from 'lucide-react';
3
+ import { useCallback, useRef, useState } from 'react';
4
+ import { useClickOutside } from '../../hooks';
5
+ import { getUIConfig } from '../../ui-config';
6
+ /**
7
+ * Generates a VSCode URI to open a data file.
8
+ * Uses vscode:// protocol which works when VSCode is installed.
9
+ */
10
+ function getEditorLink(projectRoot, collection, name, locale) {
11
+ const filePath = `${projectRoot}/content/data/${collection}/${name}.${locale}.json`;
12
+ return `vscode://file${filePath}`;
13
+ }
14
+ export function DataEntryCard({ id, title, description, collection, name, locales, onEditData, onEditProperties, onDelete, }) {
15
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
16
+ const menuRef = useRef(null);
17
+ const closeMenu = useCallback(() => setIsMenuOpen(false), []);
18
+ useClickOutside(menuRef, closeMenu, isMenuOpen);
19
+ const config = getUIConfig();
20
+ const firstLocale = locales[0] || 'en';
21
+ const editorLink = config.projectRoot && name ? getEditorLink(config.projectRoot, collection, name, firstLocale) : null;
22
+ return (_jsxs("div", { className: "bg-white dark:bg-grey-02 border border-grey-09 dark:border-grey-03 rounded-md p-4 hover:border-azure-04 transition-colors", children: [_jsxs("div", { className: "flex items-start justify-between mb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Database, { className: "h-4 w-4 text-grey-04 dark:text-grey-07" }), _jsx("h3", { className: "font-medium text-grey-01 dark:text-grey-12", "data-testid": `data-title-${id}`, children: title })] }), _jsx("span", { className: "px-2 py-1 text-xs bg-grey-11 dark:bg-grey-03 rounded-md", children: collection })] }), description && (_jsx("p", { className: "text-sm text-grey-04 dark:text-grey-07 mb-3 line-clamp-2", "data-testid": `data-description-${id}`, children: description })), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "flex gap-1", children: locales.map((locale) => (_jsx("span", { "data-testid": "locale-indicator", className: "px-2 py-1 text-xs bg-grey-11 dark:bg-grey-03 rounded-md", children: locale }, locale))) }), _jsxs("div", { className: "flex gap-2 relative", children: [_jsx("button", { type: "button", onClick: onEditData, className: "p-1 hover:bg-grey-11 dark:hover:bg-grey-03 rounded-md transition-colors", title: "Edit data", children: _jsx(Edit2, { className: "h-4 w-4 text-azure-04" }) }), _jsx("button", { type: "button", onClick: () => setIsMenuOpen(!isMenuOpen), className: "p-1 hover:bg-grey-11 dark:hover:bg-grey-03 rounded-md transition-colors", title: "More actions", "aria-label": "More actions", children: _jsx(MoreVertical, { className: "h-4 w-4 text-grey-04 dark:text-grey-07" }) }), isMenuOpen && (_jsxs("div", { ref: menuRef, className: "absolute right-0 top-8 w-48 bg-white dark:bg-grey-03 border border-grey-09 dark:border-grey-03 rounded-md shadow-lg z-10", children: [_jsxs("button", { type: "button", onClick: () => {
23
+ onEditData();
24
+ setIsMenuOpen(false);
25
+ }, className: "w-full px-4 py-2 text-left flex items-center gap-2 hover:bg-grey-11 dark:hover:bg-grey-03 transition-colors", children: [_jsx(FileJson, { className: "h-4 w-4 text-grey-04 dark:text-grey-07" }), _jsx("span", { children: "Edit Data" })] }), _jsxs("button", { type: "button", onClick: () => {
26
+ onEditProperties();
27
+ setIsMenuOpen(false);
28
+ }, className: "w-full px-4 py-2 text-left flex items-center gap-2 hover:bg-grey-11 dark:hover:bg-grey-03 transition-colors", children: [_jsx(Settings, { className: "h-4 w-4 text-grey-04 dark:text-grey-07" }), _jsx("span", { children: "Properties" })] }), editorLink && (_jsxs("a", { href: editorLink, onClick: () => setIsMenuOpen(false), className: "w-full px-4 py-2 text-left flex items-center gap-2 hover:bg-grey-11 dark:hover:bg-grey-03 transition-colors", children: [_jsx(ExternalLink, { className: "h-4 w-4 text-grey-04 dark:text-grey-07" }), _jsx("span", { children: "Open in Editor" })] })), _jsx("div", { className: "border-t border-grey-09 dark:border-grey-03 my-1" }), _jsxs("button", { type: "button", onClick: () => {
29
+ onDelete();
30
+ setIsMenuOpen(false);
31
+ }, className: "w-full px-4 py-2 text-left flex items-center gap-2 hover:bg-red-11 dark:hover:bg-red-02 transition-colors text-red-04", children: [_jsx(Trash2, { className: "h-4 w-4" }), _jsx("span", { children: "Delete" })] })] }))] })] })] }));
32
+ }
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from 'react';
2
+ interface SectionCardProps {
3
+ to: string;
4
+ icon: ReactNode;
5
+ title: string;
6
+ description: string;
7
+ count: number | undefined;
8
+ countLabel: string;
9
+ isLoading: boolean;
10
+ testId?: string;
11
+ variant?: 'full' | 'compact';
12
+ }
13
+ export declare function SectionCard({ to, icon, title, description, count, countLabel, isLoading, testId, variant, }: SectionCardProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=SectionCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionCard.d.ts","sourceRoot":"","sources":["../../../src/components/cards/SectionCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,IAAI,EACJ,KAAK,EACL,WAAW,EACX,KAAK,EACL,UAAU,EACV,SAAS,EACT,MAAM,EACN,OAAgB,GACjB,EAAE,gBAAgB,2CA2ElB"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowRight, Loader2 } from 'lucide-react';
3
+ import { Link } from 'react-router-dom';
4
+ import { cn } from '../../utils/cn';
5
+ export function SectionCard({ to, icon, title, description, count, countLabel, isLoading, testId, variant = 'full', }) {
6
+ if (variant === 'compact') {
7
+ return (_jsxs(Link, { to: to, "data-testid": testId, className: cn('group flex items-center gap-4 bg-white dark:bg-grey-02 border border-grey-09 dark:border-grey-03 rounded-lg px-4 py-3', 'hover:border-azure-05 hover:shadow-sm transition-all'), children: [_jsx("div", { className: "p-2 bg-grey-12 dark:bg-grey-03 rounded-lg group-hover:bg-azure-11 dark:group-hover:bg-azure-02 transition-colors", children: icon }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: "text-sm font-medium text-grey-04 dark:text-grey-07", children: title }), isLoading ? (_jsx(Loader2, { className: "h-4 w-4 animate-spin text-grey-06 dark:text-grey-05 mt-0.5", "data-testid": testId ? `${testId}-loading` : undefined })) : (_jsxs("p", { className: "text-3xl font-semibold tabular-nums text-grey-01 dark:text-grey-12 leading-tight", "data-testid": testId ? `${testId}-count` : undefined, children: [count ?? 0, " ", _jsx("span", { className: "text-sm font-normal text-grey-05 dark:text-grey-06", children: countLabel })] }))] }), _jsx(ArrowRight, { className: "h-4 w-4 text-grey-08 dark:text-grey-05 group-hover:text-azure-05 transition-colors flex-shrink-0" })] }));
8
+ }
9
+ return (_jsxs(Link, { to: to, "data-testid": testId, className: cn('group flex flex-col bg-white dark:bg-grey-02 border border-grey-09 dark:border-grey-03 rounded-lg p-6', 'hover:border-azure-05 hover:shadow-sm transition-all'), children: [_jsxs("div", { className: "flex items-start justify-between mb-4", children: [_jsx("div", { className: "p-2 bg-grey-12 dark:bg-grey-03 rounded-lg group-hover:bg-azure-11 dark:group-hover:bg-azure-02 transition-colors", children: icon }), _jsx(ArrowRight, { className: "h-5 w-5 text-grey-08 dark:text-grey-05 group-hover:text-azure-05 transition-colors" })] }), _jsx("h3", { className: "text-lg font-medium text-grey-01 dark:text-grey-12 mb-1", children: title }), _jsx("p", { className: "text-sm text-grey-05 dark:text-grey-06 mb-4", children: description }), _jsx("div", { className: "mt-auto pt-4 border-t border-grey-11 dark:border-grey-03", children: isLoading ? (_jsxs("div", { className: "flex items-center gap-2 text-grey-06 dark:text-grey-05", "data-testid": testId ? `${testId}-loading` : undefined, children: [_jsx(Loader2, { className: "h-4 w-4 animate-spin" }), _jsx("span", { className: "text-sm", children: "Loading..." })] })) : (_jsxs("p", { className: "text-sm", children: [_jsx("span", { className: "text-2xl font-semibold text-grey-01 dark:text-grey-12", "data-testid": testId ? `${testId}-count` : undefined, children: count ?? 0 }), _jsx("span", { className: "text-grey-05 dark:text-grey-06 ml-2", children: countLabel })] })) })] }));
10
+ }
@@ -0,0 +1,2 @@
1
+ export { DataEntryCard } from './DataEntryCard';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ export { DataEntryCard } from './DataEntryCard';
@@ -0,0 +1,2 @@
1
+ export declare function RecentActivity(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=RecentActivity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentActivity.d.ts","sourceRoot":"","sources":["../../../src/components/dashboard/RecentActivity.tsx"],"names":[],"mappings":"AAeA,wBAAgB,cAAc,4CAkG7B"}