@conloca/cms-spa 0.1.14 → 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 +165 -48
  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 -4998
  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 +9 -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 +123 -0
  387. package/dist/site-styles.d.mts.map +1 -0
  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 +234 -0
  392. package/dist/site-styles.mjs.map +1 -0
  393. package/dist/spa/main.css +5497 -4371
  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 +153 -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-CvjeYQRH.mjs +0 -1533
  438. package/dist/puck-CvjeYQRH.mjs.map +0 -1
package/dist/ui.d.mts ADDED
@@ -0,0 +1,290 @@
1
+ import "@conloca/content-api-client";
2
+ import { ButtonHTMLAttributes, ComponentProps, InputHTMLAttributes, ReactNode, Ref, SelectHTMLAttributes, TextareaHTMLAttributes } from "react";
3
+ import { LucideIcon } from "lucide-react";
4
+ //#region src/components/ConlocaLogo.d.ts
5
+ declare function ConlocaLogo(): import("react/jsx-runtime").JSX.Element;
6
+ //#endregion
7
+ //#region src/components/ui/Banner.d.ts
8
+ /**
9
+ * Visual palette. The names are semantic ("what is the user being
10
+ * told?") rather than chromatic ("what color is it?"). Two semantic
11
+ * variants can share a palette — e.g. a support-session banner and
12
+ * a success banner are both `success` (green) because the visual
13
+ * weight is the same; the copy carries the meaning.
14
+ *
15
+ * - `info` — azure. Neutral announcements, transient progress,
16
+ * read-only context the user should be aware of.
17
+ * - `warning` — yellow. User-actionable but not catastrophic.
18
+ * Offline state, upstream divergence, provisioning in flight.
19
+ * - `error` — red. Something failed or is blocking. The default
20
+ * ARIA role flips to `alert` for this variant.
21
+ * - `success` — green. Operation succeeded, or persistent context
22
+ * the user can lean on (support session, deploy live).
23
+ *
24
+ * Colors are sourced from the cms-spa Tailwind theme tokens
25
+ * (`{color}-{02..11}`) so dark mode is automatic. Matches the
26
+ * inline-alert palette already used by `BlockWrappers`,
27
+ * `MDXEditField`, `DataEditor`, and `MDXContent` so any host that
28
+ * mixes inline alerts and strip banners reads as one design system.
29
+ */
30
+ type BannerVariant = 'info' | 'warning' | 'error' | 'success';
31
+ interface BannerProps extends Omit<ComponentProps<'div'>, 'title'> {
32
+ /** Visual palette. Required — there's no neutral default that
33
+ * would make sense across the four uses. */
34
+ variant: BannerVariant;
35
+ /** Leading icon. Conventionally a lucide icon at `h-4 w-4`;
36
+ * Banner wraps it in a `flex-shrink-0` so a long description
37
+ * doesn't squeeze it. Pass `<Loader2 className="animate-spin" />`
38
+ * for the loading-state idiom — there is no separate `loading`
39
+ * prop because that would just be a one-import shortcut. */
40
+ icon?: ReactNode;
41
+ /** Bold lead text. Rendered as `<strong>` with right margin so
42
+ * the description flows inline on the same row. */
43
+ title?: ReactNode;
44
+ /** Trailing actions cluster (typically `<Button>`s). Banner wraps
45
+ * them in a `flex items-center gap-2 flex-shrink-0` cluster so
46
+ * they always sit on the right edge. */
47
+ actions?: ReactNode;
48
+ }
49
+ /**
50
+ * Banner primitive.
51
+ *
52
+ * Replaces the per-component restating of the
53
+ * `flex items-start gap-3 px-6 py-3 text-sm border-b bg-{color}-11
54
+ * ... border-{color}-08 ... text-{color}-02 ...` pattern that hosts
55
+ * had been hand-rolling at every banner / alert site. Centralising
56
+ * the surface:
57
+ *
58
+ * - locks the variant palette (one place to change yellow / green /
59
+ * red treatments across every host)
60
+ * - aligns with the inline-alert vocabulary already used inside
61
+ * cms-spa (`BlockWrappers`, `MDXEditField`, etc.) so a "strip"
62
+ * banner at the top of the shell and an "inline" alert inside an
63
+ * editor block read as one design system
64
+ * - dodges the CSS cascade-layer fight on raw atomic classes (see
65
+ * the `Card` primitive's JSDoc for context)
66
+ *
67
+ * Layout is deliberately one-row: icon + title + description +
68
+ * actions, vertically centered (`items-center`). Multi-row or
69
+ * footer content (a `<details>` disclosure, a secondary description
70
+ * block, etc.) is the caller's job — render Banner with the row
71
+ * content, then put the footer below via the parent's layout. If
72
+ * a future banner has genuinely multi-line description that needs
73
+ * top-aligned chrome, add an `align` prop then; do not flip the
74
+ * default — every existing banner reads better centered.
75
+ *
76
+ * ARIA role defaults: `alert` for `error`, `status` for everything
77
+ * else. Override via the standard `role` prop when the default is
78
+ * wrong (e.g. a non-error loading variant that should still be
79
+ * announced assertively).
80
+ */
81
+ declare function Banner({ variant, icon, title, actions, className, role, children, ...rest }: BannerProps): import("react/jsx-runtime").JSX.Element;
82
+ //#endregion
83
+ //#region src/components/ui/Button.d.ts
84
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
85
+ variant?: 'primary' | 'outline' | 'ghost' | 'destructive' | 'tonal';
86
+ size?: 'default' | 'sm';
87
+ ref?: Ref<HTMLButtonElement>;
88
+ }
89
+ /**
90
+ * Variants:
91
+ *
92
+ * - `primary` — solid azure fill, white text. Default action.
93
+ * - `outline` — bordered, panel-background, grey text. Secondary on
94
+ * panel surfaces.
95
+ * - `ghost` — no resting fill, grey text. Tertiary on panel surfaces.
96
+ * - `tonal` — soft grey fill (grey-11 / dark:grey-03), grey text. The
97
+ * "soft secondary" used on chrome surfaces (host shells, toolbars)
98
+ * where `outline` would compete with the surface border and `ghost`
99
+ * would visually disappear against the chrome's own grey wash.
100
+ * Sized for compact toolbar usage; pairs naturally with
101
+ * `size="sm"`.
102
+ * - `destructive` — solid red fill, white text. Confirms a destructive
103
+ * action.
104
+ */
105
+ declare function Button({ variant, size, type, className, ref, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
106
+ //#endregion
107
+ //#region src/components/ui/Card.d.ts
108
+ /**
109
+ * Surface vocabulary shared with `Dialog.Content` so any host
110
+ * shell that mixes plain cards and dialog panels reads as one
111
+ * design system rather than two.
112
+ *
113
+ * - `panel` — opaque-white-on-light, opaque-grey-on-dark, with a
114
+ * border. The default for pre-auth screens, account menus, and
115
+ * any anchored popover. Matches `Dialog.Content surface="panel"`
116
+ * verbatim so a panel that turns into a dialog (or vice versa)
117
+ * doesn't visually jump.
118
+ * - `elevated` — borderless white-on-light, near-black-on-dark.
119
+ * For floating surfaces that read as "lifted off the page"
120
+ * (think menu portals); kept as a separate variant rather than
121
+ * folding into `panel` so the absence of a border is explicit.
122
+ */
123
+ type CardSurface = 'panel' | 'elevated';
124
+ /**
125
+ * Inner padding scale. The pre-auth `LoginScreen` card uses `xl`;
126
+ * tight popovers (account menu) use `sm`; the default `md` covers
127
+ * most cases. `none` exists for callers that want to manage
128
+ * padding internally (e.g. a header row + body split where the
129
+ * dividing line should extend to the card edge).
130
+ */
131
+ type CardPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
132
+ /**
133
+ * Border radius. `md` is the conventional Conloca card radius and
134
+ * matches `Dialog.Content surface="panel"`. `lg` is reserved for
135
+ * overlay-style surfaces; `sm` for tight chips that have card
136
+ * affordances (rare).
137
+ */
138
+ type CardRadius = 'sm' | 'md' | 'lg';
139
+ /**
140
+ * Drop-shadow scale. `sm` is the default for resting cards; `lg`
141
+ * matches the dialog overlay treatment. `none` exists so callers
142
+ * can stack cards inside larger surfaces without a double shadow.
143
+ */
144
+ type CardShadow = 'none' | 'sm' | 'md' | 'lg';
145
+ interface CardProps extends ComponentProps<'div'> {
146
+ /** Visual surface treatment. Default `panel`. */
147
+ surface?: CardSurface;
148
+ /** Inner padding scale. Default `md`. */
149
+ padding?: CardPadding;
150
+ /** Corner radius. Default `md`. */
151
+ radius?: CardRadius;
152
+ /** Drop shadow scale. Default `sm`. */
153
+ shadow?: CardShadow;
154
+ }
155
+ /**
156
+ * Generic card surface primitive.
157
+ *
158
+ * Hosted shells (pre-auth screens, account menus, banner panels,
159
+ * etc.) compose this rather than restating
160
+ * `bg-white dark:bg-grey-02 border border-grey-09 ... rounded-md
161
+ * shadow-sm` at every call site. Centralising the surface here:
162
+ *
163
+ * - keeps the visual vocabulary aligned with `Dialog.Content`
164
+ * (same `panel` classes — see `SURFACE_CLASS`)
165
+ * - prevents drift (no more "this screen has px-8 py-10, that one
166
+ * has px-6 py-8 and nobody noticed")
167
+ * - dodges the CSS cascade-layer fight that bites raw Tailwind
168
+ * `px-*` / `py-*` classes on consumers outside cms-spa. Card's
169
+ * classes are compiled into cms-spa's bundle alongside the
170
+ * Tailwind preflight reset, so they resolve in the same layer
171
+ * and the reset's `* { padding: 0 }` doesn't win.
172
+ *
173
+ * Layout (`flex`, `gap-*`, `max-w-*`, alignment) stays on the
174
+ * caller via `className` — Card owns the surface; the caller owns
175
+ * what's inside and how the card sits on the page.
176
+ */
177
+ declare function Card({ surface, padding, radius, shadow, className, ...rest }: CardProps): import("react/jsx-runtime").JSX.Element;
178
+ //#endregion
179
+ //#region src/components/ui/FieldError.d.ts
180
+ interface FieldErrorProps {
181
+ /**
182
+ * Optional id so the form field can wire `aria-describedby` to the
183
+ * error message for assistive tech.
184
+ */
185
+ id?: string;
186
+ className?: string;
187
+ children: ReactNode;
188
+ }
189
+ /**
190
+ * Inline form-error message: small alert-circle icon + red text-xs body.
191
+ *
192
+ * Renders with `role="alert"` so the browser surfaces the message to
193
+ * assistive tech the moment it appears. Pair with `aria-invalid` on
194
+ * the field and `aria-describedby` pointing at this element's id.
195
+ *
196
+ * Layout: `inline-flex items-center gap-2`. Drop-in replacement for the
197
+ * `<AlertCircle h-3 w-3 /> + text-xs text-red-04` pattern that was
198
+ * being hand-rolled across hosted-shell form fields.
199
+ */
200
+ declare function FieldError({ id, className, children }: FieldErrorProps): import("react/jsx-runtime").JSX.Element;
201
+ //#endregion
202
+ //#region src/components/ui/IconButton.d.ts
203
+ interface IconButtonProps {
204
+ icon: LucideIcon;
205
+ onClick?: () => void;
206
+ ariaLabel: string;
207
+ title?: string;
208
+ className?: string;
209
+ iconSize?: string;
210
+ variant?: 'default' | 'ghost';
211
+ }
212
+ declare function IconButton({ icon: Icon, onClick, ariaLabel, title, className, iconSize, variant }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
213
+ //#endregion
214
+ //#region src/components/ui/Input.d.ts
215
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
216
+ /**
217
+ * Visual size:
218
+ * - `default` — comfortable padding, body type.
219
+ * - `sm` — same padding, smaller (text-sm) type. Width-flexible.
220
+ * - `xs` — height-locked at `h-8` with `text-sm`. The chrome-strip
221
+ * size; pairs with `Button size="sm"` so toolbars and inline form
222
+ * rows align cleanly.
223
+ */
224
+ size?: 'default' | 'sm' | 'xs';
225
+ /**
226
+ * Surface the input sits on:
227
+ * - `panel` (default) — `bg-panel` / `border-line`. Use inside
228
+ * panel-tone surfaces (cms-spa dialogs and side panels) where
229
+ * the input should read recessed against the panel.
230
+ * - `elevated` — `bg-white dark:bg-grey-01`, explicit grey border.
231
+ * Use inside chrome surfaces (host strips, panel-toned dialogs)
232
+ * where `bg-panel` (which collapses to `grey-02` in dark mode)
233
+ * would blend with the surface itself. The elevated bg is
234
+ * blacker than the strip's grey-02 in dark mode, restoring the
235
+ * contrast that the panel surface erases.
236
+ */
237
+ surface?: 'panel' | 'elevated';
238
+ /**
239
+ * When true, drops the default `w-full` so the input is laid out at
240
+ * its native intrinsic width (driven by the HTML `size` attribute
241
+ * or any `min-w-*` className). Use inside inline-flex form rows or
242
+ * flex columns where the input shouldn't dominate the row width.
243
+ */
244
+ intrinsic?: boolean;
245
+ error?: boolean;
246
+ ref?: Ref<HTMLInputElement>;
247
+ }
248
+ declare function Input({ size, surface, intrinsic, error, className, ref, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
249
+ //#endregion
250
+ //#region src/types.d.ts
251
+ type SaveState = 'idle' | 'saving' | 'saved' | 'error' | 'conflict';
252
+ //#endregion
253
+ //#region src/components/ui/SaveIndicator.d.ts
254
+ interface SaveIndicatorProps {
255
+ state: SaveState;
256
+ className?: string;
257
+ }
258
+ declare function SaveIndicator({ state, className }: SaveIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
259
+ //#endregion
260
+ //#region src/components/ui/Select.d.ts
261
+ interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
262
+ size?: 'default' | 'sm';
263
+ ref?: Ref<HTMLSelectElement>;
264
+ }
265
+ declare function Select({ size, className, children, ref, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
266
+ //#endregion
267
+ //#region src/components/ui/Separator.d.ts
268
+ interface SeparatorProps {
269
+ className?: string;
270
+ orientation?: 'vertical' | 'horizontal';
271
+ }
272
+ declare function Separator({ className, orientation }: SeparatorProps): import("react/jsx-runtime").JSX.Element;
273
+ //#endregion
274
+ //#region src/components/ui/Textarea.d.ts
275
+ interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
276
+ error?: boolean;
277
+ ref?: Ref<HTMLTextAreaElement>;
278
+ }
279
+ declare function Textarea({ error, className, ref, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
280
+ //#endregion
281
+ //#region src/components/ui/Tooltip.d.ts
282
+ interface TooltipProps {
283
+ content: string;
284
+ children: ReactNode;
285
+ className?: string;
286
+ }
287
+ declare function Tooltip({ content, children, className }: TooltipProps): import("react/jsx-runtime").JSX.Element;
288
+ //#endregion
289
+ export { Banner, type BannerProps, type BannerVariant, Button, Card, ConlocaLogo, FieldError, IconButton, Input, SaveIndicator, Select, Separator, Textarea, Tooltip };
290
+ //# sourceMappingURL=ui.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.d.mts","names":[],"sources":["../src/components/ConlocaLogo.tsx","../src/components/ui/Banner.tsx","../src/components/ui/Button.tsx","../src/components/ui/Card.tsx","../src/components/ui/FieldError.tsx","../src/components/ui/IconButton.tsx","../src/components/ui/Input.tsx","../src/types.ts","../src/components/ui/SaveIndicator.tsx","../src/components/ui/Select.tsx","../src/components/ui/Separator.tsx","../src/components/ui/Textarea.tsx","../src/components/ui/Tooltip.tsx"],"mappings":";;;;iBAAgB,2CAAW,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;KCyBf;UAgBK,oBAAoB,KAAK;;;EAGxC,SAAS;;;;;;EAMT,OAAO;;;EAGP,QAAQ;;;;EAIR,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmCI,SAAS,SAAS,MAAM,OAAO,SAAS,WAAW,MAAM,aAAa,QAAQ,0CAAW,IAAA;;;UCzF/F,oBAAoB,qBAAqB;EACjD;EACA;EACA,MAAM,IAAI;;;;;;;;;;;;;;;;;;iBAmBI,SACd,SACA,MACA,MACA,WACA,QACG,SACF,0CAAW,IAAA;;;;;;;;;;;;;;;;;;KCdF;;;;;;;;KASA;;;;;;;KAQA;;;;;;KAOA;UA4BK,kBAAkB;;EAEjC,UAAU;;EAEV,UAAU;;EAEV,SAAS;;EAET,SAAS;;;;;;;;;;;;;;;;;;;;;;;;iBAyBK,OACd,SACA,SACA,QACA,QACA,cACG,QACF,wCAAS,IAAA;;;UC1GF;;;;;EAKR;EACA;EACA,UAAU;;;;;;;;;;;;;iBAcI,aAAa,IAAI,WAAW,YAAY,8CAAe,IAAA;;;UCtB7D;EACR,MAAM;EACN;EACA;EACA;EACA;EACA;EACA;;iBAGc,aACd,MAAM,MACN,SACA,WACA,OACA,WACA,UACA,WACC,8CAAe,IAAA;;;UClBR,mBAAmB,KAAK,oBAAoB;;;;;;;;;EASpD;;;;;;;;;;;;;EAaA;;;;;;;EAOA;EACA;EACA,MAAM,IAAI;;iBAGI,QACd,MACA,SACA,WACA,OACA,WACA,QACG,SACF,yCAAU,IAAA;;;KCKD;;;UC9CF;EACR,OAAO;EACP;;iBAGc,gBAAgB,OAAO,aAAa,iDAAkB,IAAA;;;UCN5D,oBAAoB,KAAK,qBAAqB;EACtD;EACA,MAAM,IAAI;;iBAGI,SAAS,MAAkB,WAAW,UAAU,QAAQ,SAAS,0CAAW,IAAA;;;UCNlF;EACR;EACA;;iBAGc,YAAY,WAAW,eAA4B,6CAAc,IAAA;;;UCJvE,sBAAsB,uBAAuB;EACrD;EACA,MAAM,IAAI;;iBAGI,WAAW,OAAO,WAAW,QAAQ,SAAS,4CAAa,IAAA;;;UCNjE;EACR;EACA,UAAU;EACV;;iBAGc,UAAU,SAAS,UAAU,aAAkB,2CAAY,IAAA"}
package/dist/ui.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { a as SaveIndicator, c as FieldError, d as Banner, f as ConlocaLogo, i as Select, l as Card, n as Textarea, o as Input, r as Separator, s as IconButton, t as Tooltip, u as Button } from "./ui-CIacC6Mv.mjs";
2
+ export { Banner, Button, Card, ConlocaLogo, FieldError, IconButton, Input, SaveIndicator, Select, Separator, Textarea, Tooltip };
@@ -0,0 +1,3 @@
1
+ /** Build a full asset serve URL, correctly handling subfolder paths. */
2
+ export declare function buildAssetServeUrl(basePath: string, folder: string | undefined, filename: string): string;
3
+ //# sourceMappingURL=asset-url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-url.d.ts","sourceRoot":"","sources":["../../src/utils/asset-url.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKzG"}
@@ -0,0 +1,7 @@
1
+ /** Build a full asset serve URL, correctly handling subfolder paths. */
2
+ export function buildAssetServeUrl(basePath, folder, filename) {
3
+ if (folder && folder !== '/') {
4
+ return `${basePath}/${folder.replace(/^\//, '')}/${filename}`;
5
+ }
6
+ return `${basePath}/${filename}`;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -0,0 +1,5 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Date display helpers shared by content lists and activity feeds.
3
+ *
4
+ * Content entries can carry a missing or unparseable `modified` value
5
+ * (e.g. a manifest whose meta envelope was lost upstream). `new Date`
6
+ * on such input yields an Invalid Date whose `toLocaleDateString()`
7
+ * renders the literal string "Invalid Date" — never show that to users;
8
+ * render an em dash instead.
9
+ */
10
+ /** Locale date string, or an em dash for invalid dates. */
11
+ export declare function formatDate(date: Date): string;
12
+ /** Compact "5m ago" / "3h ago" / "2d ago" relative label; locale date
13
+ * beyond a week, em dash for invalid dates. */
14
+ export declare function relativeTime(date: Date): string;
15
+ //# sourceMappingURL=format-date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-date.d.ts","sourceRoot":"","sources":["../../src/utils/format-date.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAG7C;AAED;gDACgD;AAChD,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAW/C"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Date display helpers shared by content lists and activity feeds.
3
+ *
4
+ * Content entries can carry a missing or unparseable `modified` value
5
+ * (e.g. a manifest whose meta envelope was lost upstream). `new Date`
6
+ * on such input yields an Invalid Date whose `toLocaleDateString()`
7
+ * renders the literal string "Invalid Date" — never show that to users;
8
+ * render an em dash instead.
9
+ */
10
+ function isInvalid(date) {
11
+ return Number.isNaN(date.getTime());
12
+ }
13
+ /** Locale date string, or an em dash for invalid dates. */
14
+ export function formatDate(date) {
15
+ if (isInvalid(date))
16
+ return '—';
17
+ return date.toLocaleDateString();
18
+ }
19
+ /** Compact "5m ago" / "3h ago" / "2d ago" relative label; locale date
20
+ * beyond a week, em dash for invalid dates. */
21
+ export function relativeTime(date) {
22
+ if (isInvalid(date))
23
+ return '—';
24
+ const diff = Date.now() - date.getTime();
25
+ const minutes = Math.floor(diff / 60000);
26
+ if (minutes < 1)
27
+ return 'just now';
28
+ if (minutes < 60)
29
+ return `${minutes}m ago`;
30
+ const hours = Math.floor(minutes / 60);
31
+ if (hours < 24)
32
+ return `${hours}h ago`;
33
+ const days = Math.floor(hours / 24);
34
+ if (days < 7)
35
+ return `${days}d ago`;
36
+ return date.toLocaleDateString();
37
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Convert (small) mdast subtrees to HTML strings.
3
+ *
4
+ * Two motivating cases for these helpers:
5
+ *
6
+ * 1. Components like Starlight's `<Steps>`/`<FileTree>` whose Astro
7
+ * implementation validates the slot tag name and rejects
8
+ * `<conloca-slot>` — the GenericBlock editor renders the list body
9
+ * as raw HTML and passes that as the slot content instead.
10
+ *
11
+ * 2. Raw HTML the author writes directly in MDX (`<div class="x">`,
12
+ * `<details><summary>`, etc.) lands in the mdast as
13
+ * `mdxJsxFlowElement`/`mdxJsxTextElement` with a lowercase tag
14
+ * name. The editor renders those in place rather than routing
15
+ * through the Container API (which expects a component import).
16
+ *
17
+ * Anything unrecognized collapses to its concatenated children
18
+ * (transparent wrapper). Safer than dropping content — text still
19
+ * shows even if formatting doesn't.
20
+ *
21
+ * These functions live outside `GenericBlock.tsx` because they're pure
22
+ * — no React, no DOM, no editor state. Importing from a single place
23
+ * also keeps the call sites honest about what's serialization vs
24
+ * editor wiring.
25
+ */
26
+ export declare function escapeHtml(s: string): string;
27
+ /** True when a JSX tag name is a standard HTML element (lowercase-
28
+ * first per the React/Astro convention). Used to render raw HTML
29
+ * inline rather than routing it through the Astro Container API. */
30
+ export declare function isHtmlTag(name: string): boolean;
31
+ export declare function attrsToHtml(attrs: unknown): string;
32
+ export declare function mdastToHtml(node: unknown): string;
33
+ /**
34
+ * True when the mdast subtree's body contains any block-level non-JSX
35
+ * mdast node that we'd want to render as HTML rather than route
36
+ * through the editor's slot+portal flow. Two reasons we go this route:
37
+ *
38
+ * 1. Some Astro components validate the slot element type and
39
+ * reject `<conloca-slot>` (Starlight's `<Steps>` wants `<ol>`,
40
+ * `<FileTree>` wants `<ul>`, hypothetical Carousels/Tables/etc
41
+ * could want their own tag). Rendering the body as HTML and
42
+ * emitting it raw makes the validator see the real element.
43
+ *
44
+ * 2. The portal-based editor surface is built for prose text (with
45
+ * inline marks) plus block JSX. Heading/blockquote/table/code
46
+ * blocks as a component's direct body are less common and not
47
+ * cleanly editable inline anyway — rendering them statically
48
+ * until we add per-position slot markers (Phase 3) keeps the
49
+ * visual right.
50
+ *
51
+ * Plain text + inline JSX bodies stay on the slot+portal path so
52
+ * Cards, Asides, etc. remain inline-editable.
53
+ */
54
+ export declare function bodyNeedsStaticHtml(kids: unknown[]): boolean;
55
+ //# sourceMappingURL=mdast-to-html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdast-to-html.d.ts","sourceRoot":"","sources":["../../src/utils/mdast-to-html.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;oEAEoE;AACpE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAoBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CA8BlD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CA4FjD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAa5D"}
@@ -0,0 +1,206 @@
1
+ /**
2
+ * Convert (small) mdast subtrees to HTML strings.
3
+ *
4
+ * Two motivating cases for these helpers:
5
+ *
6
+ * 1. Components like Starlight's `<Steps>`/`<FileTree>` whose Astro
7
+ * implementation validates the slot tag name and rejects
8
+ * `<conloca-slot>` — the GenericBlock editor renders the list body
9
+ * as raw HTML and passes that as the slot content instead.
10
+ *
11
+ * 2. Raw HTML the author writes directly in MDX (`<div class="x">`,
12
+ * `<details><summary>`, etc.) lands in the mdast as
13
+ * `mdxJsxFlowElement`/`mdxJsxTextElement` with a lowercase tag
14
+ * name. The editor renders those in place rather than routing
15
+ * through the Container API (which expects a component import).
16
+ *
17
+ * Anything unrecognized collapses to its concatenated children
18
+ * (transparent wrapper). Safer than dropping content — text still
19
+ * shows even if formatting doesn't.
20
+ *
21
+ * These functions live outside `GenericBlock.tsx` because they're pure
22
+ * — no React, no DOM, no editor state. Importing from a single place
23
+ * also keeps the call sites honest about what's serialization vs
24
+ * editor wiring.
25
+ */
26
+ export function escapeHtml(s) {
27
+ return s.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
28
+ }
29
+ /** True when a JSX tag name is a standard HTML element (lowercase-
30
+ * first per the React/Astro convention). Used to render raw HTML
31
+ * inline rather than routing it through the Astro Container API. */
32
+ export function isHtmlTag(name) {
33
+ return /^[a-z][a-z0-9-]*$/.test(name);
34
+ }
35
+ /** Self-closing HTML elements that must NOT have a closing tag. */
36
+ const VOID_HTML_TAGS = new Set([
37
+ 'area',
38
+ 'base',
39
+ 'br',
40
+ 'col',
41
+ 'embed',
42
+ 'hr',
43
+ 'img',
44
+ 'input',
45
+ 'link',
46
+ 'meta',
47
+ 'param',
48
+ 'source',
49
+ 'track',
50
+ 'wbr',
51
+ ]);
52
+ export function attrsToHtml(attrs) {
53
+ if (!Array.isArray(attrs))
54
+ return '';
55
+ const parts = [];
56
+ for (const a of attrs) {
57
+ if (a?.type !== 'mdxJsxAttribute' || typeof a.name !== 'string')
58
+ continue;
59
+ const v = a.value;
60
+ if (v == null) {
61
+ parts.push(a.name); // shorthand boolean
62
+ }
63
+ else if (typeof v === 'string') {
64
+ parts.push(`${a.name}="${escapeHtml(v)}"`);
65
+ }
66
+ else if (typeof v === 'object' && v && 'value' in v && typeof v.value === 'string') {
67
+ // Expression — serialize the source. JSON-literal expressions
68
+ // (`{42}`, `{true}`) round-trip; non-literal ones fall through
69
+ // as-is, which mirrors what attrsToProps does for the SSR
70
+ // payload.
71
+ const src = (v.value || '').trim();
72
+ let parsed;
73
+ try {
74
+ parsed = JSON.parse(src);
75
+ }
76
+ catch {
77
+ parsed = src;
78
+ }
79
+ if (typeof parsed === 'boolean') {
80
+ if (parsed)
81
+ parts.push(a.name);
82
+ }
83
+ else if (parsed != null) {
84
+ parts.push(`${a.name}="${escapeHtml(String(parsed))}"`);
85
+ }
86
+ }
87
+ }
88
+ return parts.length ? ` ${parts.join(' ')}` : '';
89
+ }
90
+ export function mdastToHtml(node) {
91
+ if (!node || typeof node !== 'object')
92
+ return '';
93
+ const n = node;
94
+ switch (n.type) {
95
+ case 'text':
96
+ return typeof n.value === 'string' ? escapeHtml(n.value) : '';
97
+ case 'inlineCode':
98
+ return `<code>${typeof n.value === 'string' ? escapeHtml(n.value) : ''}</code>`;
99
+ case 'emphasis':
100
+ return `<em>${(n.children ?? []).map(mdastToHtml).join('')}</em>`;
101
+ case 'strong':
102
+ return `<strong>${(n.children ?? []).map(mdastToHtml).join('')}</strong>`;
103
+ case 'delete':
104
+ return `<del>${(n.children ?? []).map(mdastToHtml).join('')}</del>`;
105
+ case 'link':
106
+ return `<a href="${escapeHtml(typeof n.url === 'string' ? n.url : '')}">${(n.children ?? []).map(mdastToHtml).join('')}</a>`;
107
+ case 'image':
108
+ return `<img src="${escapeHtml(typeof n.url === 'string' ? n.url : '')}" alt="${escapeHtml(typeof n.alt === 'string' ? n.alt : '')}" />`;
109
+ case 'paragraph':
110
+ return `<p>${(n.children ?? []).map(mdastToHtml).join('')}</p>`;
111
+ case 'heading': {
112
+ const lvl = Math.max(1, Math.min(6, Number(n.depth) || 1));
113
+ return `<h${lvl}>${(n.children ?? []).map(mdastToHtml).join('')}</h${lvl}>`;
114
+ }
115
+ case 'blockquote':
116
+ return `<blockquote>${(n.children ?? []).map(mdastToHtml).join('')}</blockquote>`;
117
+ case 'list': {
118
+ const tag = n.ordered ? 'ol' : 'ul';
119
+ return `<${tag}>${(n.children ?? []).map(mdastToHtml).join('')}</${tag}>`;
120
+ }
121
+ case 'listItem': {
122
+ // Unwrap `paragraph` children of list items so their contents
123
+ // render inline-of-the-`<li>` rather than wrapped in a block
124
+ // `<p>`. Matches Astro's MDX pipeline for both tight lists (a
125
+ // single-paragraph listItem) AND loose lists like `<FileTree>`'s
126
+ // directory items (`paragraph` for the name + nested `list` for
127
+ // children).
128
+ //
129
+ // Without this, Starlight's <FileTree> renders directory names
130
+ // in a block <p>, which inside .tree-entry (inline-flex) wraps
131
+ // onto its own line — folder icons end up stacked above their
132
+ // names instead of inline with them, the way the live page
133
+ // renders. Same fix protects any list-bearing strict-slot
134
+ // component shipped via bodyHtml.
135
+ const kids = n.children ?? [];
136
+ const inner = kids
137
+ .map((c) => c?.type === 'paragraph'
138
+ ? (c.children ?? []).map(mdastToHtml).join('')
139
+ : mdastToHtml(c))
140
+ .join('');
141
+ return `<li>${inner}</li>`;
142
+ }
143
+ case 'thematicBreak':
144
+ return '<hr />';
145
+ case 'code': {
146
+ const lang = typeof n.lang === 'string' && n.lang ? ` class="language-${escapeHtml(n.lang)}"` : '';
147
+ return `<pre><code${lang}>${typeof n.value === 'string' ? escapeHtml(n.value) : ''}</code></pre>`;
148
+ }
149
+ case 'html':
150
+ // Raw HTML mdast — pass through unescaped.
151
+ return typeof n.value === 'string' ? n.value : '';
152
+ case 'break':
153
+ return '<br />';
154
+ case 'mdxJsxFlowElement':
155
+ case 'mdxJsxTextElement': {
156
+ const tag = typeof n.name === 'string' ? n.name : '';
157
+ if (!tag)
158
+ return Array.isArray(n.children) ? n.children.map(mdastToHtml).join('') : '';
159
+ if (!isHtmlTag(tag)) {
160
+ // Capital-cased JSX — a component we don't know how to render
161
+ // statically here. Fall back to children (their text/HTML).
162
+ return Array.isArray(n.children) ? n.children.map(mdastToHtml).join('') : '';
163
+ }
164
+ const attrs = attrsToHtml(n.attributes);
165
+ if (VOID_HTML_TAGS.has(tag))
166
+ return `<${tag}${attrs} />`;
167
+ const inner = Array.isArray(n.children) ? n.children.map(mdastToHtml).join('') : '';
168
+ return `<${tag}${attrs}>${inner}</${tag}>`;
169
+ }
170
+ default:
171
+ return Array.isArray(n.children) ? n.children.map(mdastToHtml).join('') : '';
172
+ }
173
+ }
174
+ /**
175
+ * True when the mdast subtree's body contains any block-level non-JSX
176
+ * mdast node that we'd want to render as HTML rather than route
177
+ * through the editor's slot+portal flow. Two reasons we go this route:
178
+ *
179
+ * 1. Some Astro components validate the slot element type and
180
+ * reject `<conloca-slot>` (Starlight's `<Steps>` wants `<ol>`,
181
+ * `<FileTree>` wants `<ul>`, hypothetical Carousels/Tables/etc
182
+ * could want their own tag). Rendering the body as HTML and
183
+ * emitting it raw makes the validator see the real element.
184
+ *
185
+ * 2. The portal-based editor surface is built for prose text (with
186
+ * inline marks) plus block JSX. Heading/blockquote/table/code
187
+ * blocks as a component's direct body are less common and not
188
+ * cleanly editable inline anyway — rendering them statically
189
+ * until we add per-position slot markers (Phase 3) keeps the
190
+ * visual right.
191
+ *
192
+ * Plain text + inline JSX bodies stay on the slot+portal path so
193
+ * Cards, Asides, etc. remain inline-editable.
194
+ */
195
+ export function bodyNeedsStaticHtml(kids) {
196
+ return kids.some((c) => {
197
+ const t = c?.type;
198
+ return (t === 'list' ||
199
+ t === 'heading' ||
200
+ t === 'blockquote' ||
201
+ t === 'table' ||
202
+ t === 'code' ||
203
+ t === 'thematicBreak' ||
204
+ t === 'html');
205
+ });
206
+ }