@conloca/cms-spa 0.1.16 → 0.2.0

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 (1162) hide show
  1. package/README.md +1 -1
  2. package/dist/spa/main.css +3725 -3781
  3. package/dist/ts/App.d.ts +35 -0
  4. package/dist/ts/App.d.ts.map +1 -0
  5. package/dist/ts/App.js +53 -0
  6. package/dist/ts/App.js.map +1 -0
  7. package/dist/ts/CmsSpaApp.d.ts +13 -0
  8. package/dist/ts/CmsSpaApp.d.ts.map +1 -0
  9. package/dist/ts/CmsSpaApp.js +50 -0
  10. package/dist/ts/CmsSpaApp.js.map +1 -0
  11. package/dist/ts/components/CMSDashboard.d.ts +2 -0
  12. package/dist/ts/components/CMSDashboard.d.ts.map +1 -0
  13. package/dist/ts/components/CMSDashboard.js +21 -0
  14. package/dist/ts/components/CMSDashboard.js.map +1 -0
  15. package/dist/ts/components/CMSLayout.d.ts +2 -0
  16. package/dist/ts/components/CMSLayout.d.ts.map +1 -0
  17. package/dist/ts/components/CMSLayout.js +15 -0
  18. package/dist/ts/components/CMSLayout.js.map +1 -0
  19. package/dist/ts/components/ConlocaLogo.d.ts +2 -0
  20. package/dist/ts/components/ConlocaLogo.d.ts.map +1 -0
  21. package/dist/ts/components/ConlocaLogo.js +5 -0
  22. package/dist/ts/components/ConlocaLogo.js.map +1 -0
  23. package/dist/ts/components/GitStatusPanel.d.ts +21 -0
  24. package/dist/ts/components/GitStatusPanel.d.ts.map +1 -0
  25. package/dist/ts/components/GitStatusPanel.js +74 -0
  26. package/dist/ts/components/GitStatusPanel.js.map +1 -0
  27. package/dist/ts/components/MobileTopBar.d.ts +6 -0
  28. package/dist/ts/components/MobileTopBar.d.ts.map +1 -0
  29. package/dist/ts/components/MobileTopBar.js +7 -0
  30. package/dist/ts/components/MobileTopBar.js.map +1 -0
  31. package/dist/ts/components/Sidebar.d.ts +8 -0
  32. package/dist/ts/components/Sidebar.d.ts.map +1 -0
  33. package/dist/ts/components/Sidebar.js +41 -0
  34. package/dist/ts/components/Sidebar.js.map +1 -0
  35. package/dist/ts/components/UserAvatar.d.ts +2 -0
  36. package/dist/ts/components/UserAvatar.d.ts.map +1 -0
  37. package/dist/ts/components/UserAvatar.js +15 -0
  38. package/dist/ts/components/UserAvatar.js.map +1 -0
  39. package/dist/ts/components/cards/DataEntryCard.d.ts +14 -0
  40. package/dist/ts/components/cards/DataEntryCard.d.ts.map +1 -0
  41. package/dist/ts/components/cards/DataEntryCard.js +39 -0
  42. package/dist/ts/components/cards/DataEntryCard.js.map +1 -0
  43. package/dist/ts/components/cards/SectionCard.d.ts +15 -0
  44. package/dist/ts/components/cards/SectionCard.d.ts.map +1 -0
  45. package/dist/ts/components/cards/SectionCard.js +11 -0
  46. package/dist/ts/components/cards/SectionCard.js.map +1 -0
  47. package/dist/ts/components/cards/index.d.ts +2 -0
  48. package/dist/ts/components/cards/index.d.ts.map +1 -0
  49. package/dist/ts/components/cards/index.js +2 -0
  50. package/dist/ts/components/cards/index.js.map +1 -0
  51. package/dist/ts/components/dashboard/RecentActivity.d.ts +2 -0
  52. package/dist/ts/components/dashboard/RecentActivity.d.ts.map +1 -0
  53. package/dist/ts/components/dashboard/RecentActivity.js +58 -0
  54. package/dist/ts/components/dashboard/RecentActivity.js.map +1 -0
  55. package/dist/ts/components/dialog.d.ts +53 -0
  56. package/dist/ts/components/dialog.d.ts.map +1 -0
  57. package/dist/ts/components/dialog.js +57 -0
  58. package/dist/ts/components/dialog.js.map +1 -0
  59. package/dist/ts/components/dialogs/ConflictDialog.d.ts +10 -0
  60. package/dist/ts/components/dialogs/ConflictDialog.d.ts.map +1 -0
  61. package/dist/ts/components/dialogs/ConflictDialog.js +28 -0
  62. package/dist/ts/components/dialogs/ConflictDialog.js.map +1 -0
  63. package/dist/ts/components/dialogs/CreateDataDialog.d.ts +9 -0
  64. package/dist/ts/components/dialogs/CreateDataDialog.d.ts.map +1 -0
  65. package/dist/ts/components/dialogs/CreateDataDialog.js +21 -0
  66. package/dist/ts/components/dialogs/CreateDataDialog.js.map +1 -0
  67. package/dist/ts/components/dialogs/CreateFolderDialog.d.ts +11 -0
  68. package/dist/ts/components/dialogs/CreateFolderDialog.d.ts.map +1 -0
  69. package/dist/ts/components/dialogs/CreateFolderDialog.js +39 -0
  70. package/dist/ts/components/dialogs/CreateFolderDialog.js.map +1 -0
  71. package/dist/ts/components/dialogs/CreatePageDialog.d.ts +11 -0
  72. package/dist/ts/components/dialogs/CreatePageDialog.d.ts.map +1 -0
  73. package/dist/ts/components/dialogs/CreatePageDialog.js +237 -0
  74. package/dist/ts/components/dialogs/CreatePageDialog.js.map +1 -0
  75. package/dist/ts/components/dialogs/DataPropertiesDialog.d.ts +10 -0
  76. package/dist/ts/components/dialogs/DataPropertiesDialog.d.ts.map +1 -0
  77. package/dist/ts/components/dialogs/DataPropertiesDialog.js +39 -0
  78. package/dist/ts/components/dialogs/DataPropertiesDialog.js.map +1 -0
  79. package/dist/ts/components/dialogs/DeleteConfirmDialog.d.ts +12 -0
  80. package/dist/ts/components/dialogs/DeleteConfirmDialog.d.ts.map +1 -0
  81. package/dist/ts/components/dialogs/DeleteConfirmDialog.js +8 -0
  82. package/dist/ts/components/dialogs/DeleteConfirmDialog.js.map +1 -0
  83. package/dist/ts/components/dialogs/ErrorModal.d.ts +14 -0
  84. package/dist/ts/components/dialogs/ErrorModal.d.ts.map +1 -0
  85. package/dist/ts/components/dialogs/ErrorModal.js +43 -0
  86. package/dist/ts/components/dialogs/ErrorModal.js.map +1 -0
  87. package/dist/ts/components/dialogs/FragmentPropertiesDialog.d.ts +12 -0
  88. package/dist/ts/components/dialogs/FragmentPropertiesDialog.d.ts.map +1 -0
  89. package/dist/ts/components/dialogs/FragmentPropertiesDialog.js +43 -0
  90. package/dist/ts/components/dialogs/FragmentPropertiesDialog.js.map +1 -0
  91. package/dist/ts/components/dialogs/MoveFolderDialog.d.ts +12 -0
  92. package/dist/ts/components/dialogs/MoveFolderDialog.d.ts.map +1 -0
  93. package/dist/ts/components/dialogs/MoveFolderDialog.js +69 -0
  94. package/dist/ts/components/dialogs/MoveFolderDialog.js.map +1 -0
  95. package/dist/ts/components/dialogs/PageMetadataDialog.d.ts +31 -0
  96. package/dist/ts/components/dialogs/PageMetadataDialog.d.ts.map +1 -0
  97. package/dist/ts/components/dialogs/PageMetadataDialog.js +154 -0
  98. package/dist/ts/components/dialogs/PageMetadataDialog.js.map +1 -0
  99. package/dist/ts/components/dialogs/UnsavedChangesDialog.d.ts +8 -0
  100. package/dist/ts/components/dialogs/UnsavedChangesDialog.d.ts.map +1 -0
  101. package/dist/ts/components/dialogs/UnsavedChangesDialog.js +7 -0
  102. package/dist/ts/components/dialogs/UnsavedChangesDialog.js.map +1 -0
  103. package/dist/ts/components/dialogs/index.d.ts +9 -0
  104. package/dist/ts/components/dialogs/index.d.ts.map +1 -0
  105. package/dist/ts/components/dialogs/index.js +9 -0
  106. package/dist/ts/components/dialogs/index.js.map +1 -0
  107. package/dist/ts/components/editor/CMSMDXEditor.d.ts +14 -0
  108. package/dist/ts/components/editor/CMSMDXEditor.d.ts.map +1 -0
  109. package/dist/ts/components/editor/CMSMDXEditor.js +209 -0
  110. package/dist/ts/components/editor/CMSMDXEditor.js.map +1 -0
  111. package/dist/ts/components/editor/ContentDiff.d.ts +10 -0
  112. package/dist/ts/components/editor/ContentDiff.d.ts.map +1 -0
  113. package/dist/ts/components/editor/ContentDiff.js +52 -0
  114. package/dist/ts/components/editor/ContentDiff.js.map +1 -0
  115. package/dist/ts/components/editor/CreateFragmentDialog.d.ts +26 -0
  116. package/dist/ts/components/editor/CreateFragmentDialog.d.ts.map +1 -0
  117. package/dist/ts/components/editor/CreateFragmentDialog.js +159 -0
  118. package/dist/ts/components/editor/CreateFragmentDialog.js.map +1 -0
  119. package/dist/ts/components/editor/DrawerItemOverride.d.ts +8 -0
  120. package/dist/ts/components/editor/DrawerItemOverride.d.ts.map +1 -0
  121. package/dist/ts/components/editor/DrawerItemOverride.js +37 -0
  122. package/dist/ts/components/editor/DrawerItemOverride.js.map +1 -0
  123. package/dist/ts/components/editor/EditorChromeToggles.d.ts +16 -0
  124. package/dist/ts/components/editor/EditorChromeToggles.d.ts.map +1 -0
  125. package/dist/ts/components/editor/EditorChromeToggles.js +17 -0
  126. package/dist/ts/components/editor/EditorChromeToggles.js.map +1 -0
  127. package/dist/ts/components/editor/FragmentEditor.d.ts +15 -0
  128. package/dist/ts/components/editor/FragmentEditor.d.ts.map +1 -0
  129. package/dist/ts/components/editor/FragmentEditor.js +322 -0
  130. package/dist/ts/components/editor/FragmentEditor.js.map +1 -0
  131. package/dist/ts/components/editor/FragmentWrappers.d.ts +20 -0
  132. package/dist/ts/components/editor/FragmentWrappers.d.ts.map +1 -0
  133. package/dist/ts/components/editor/FragmentWrappers.js +44 -0
  134. package/dist/ts/components/editor/FragmentWrappers.js.map +1 -0
  135. package/dist/ts/components/editor/GenericBlock.d.ts +3 -0
  136. package/dist/ts/components/editor/GenericBlock.d.ts.map +1 -0
  137. package/dist/ts/components/editor/GenericBlock.js +1124 -0
  138. package/dist/ts/components/editor/GenericBlock.js.map +1 -0
  139. package/dist/ts/components/editor/ImagePickerDialog.d.ts +6 -0
  140. package/dist/ts/components/editor/ImagePickerDialog.d.ts.map +1 -0
  141. package/dist/ts/components/editor/ImagePickerDialog.js +23 -0
  142. package/dist/ts/components/editor/ImagePickerDialog.js.map +1 -0
  143. package/dist/ts/components/editor/JsxPropsPanel.d.ts +16 -0
  144. package/dist/ts/components/editor/JsxPropsPanel.d.ts.map +1 -0
  145. package/dist/ts/components/editor/JsxPropsPanel.js +146 -0
  146. package/dist/ts/components/editor/JsxPropsPanel.js.map +1 -0
  147. package/dist/ts/components/editor/LocaleSelector.d.ts +9 -0
  148. package/dist/ts/components/editor/LocaleSelector.d.ts.map +1 -0
  149. package/dist/ts/components/editor/LocaleSelector.js +14 -0
  150. package/dist/ts/components/editor/LocaleSelector.js.map +1 -0
  151. package/dist/ts/components/editor/MDXLivePreview.d.ts +15 -0
  152. package/dist/ts/components/editor/MDXLivePreview.d.ts.map +1 -0
  153. package/dist/ts/components/editor/MDXLivePreview.js +111 -0
  154. package/dist/ts/components/editor/MDXLivePreview.js.map +1 -0
  155. package/dist/ts/components/editor/MdxPageEditor.d.ts +10 -0
  156. package/dist/ts/components/editor/MdxPageEditor.d.ts.map +1 -0
  157. package/dist/ts/components/editor/MdxPageEditor.js +353 -0
  158. package/dist/ts/components/editor/MdxPageEditor.js.map +1 -0
  159. package/dist/ts/components/editor/PageEditor.d.ts +54 -0
  160. package/dist/ts/components/editor/PageEditor.d.ts.map +1 -0
  161. package/dist/ts/components/editor/PageEditor.js +399 -0
  162. package/dist/ts/components/editor/PageEditor.js.map +1 -0
  163. package/dist/ts/components/editor/PageEditorHeaderActions.d.ts +22 -0
  164. package/dist/ts/components/editor/PageEditorHeaderActions.d.ts.map +1 -0
  165. package/dist/ts/components/editor/PageEditorHeaderActions.js +24 -0
  166. package/dist/ts/components/editor/PageEditorHeaderActions.js.map +1 -0
  167. package/dist/ts/components/editor/PageEditorWrapper.d.ts +38 -0
  168. package/dist/ts/components/editor/PageEditorWrapper.d.ts.map +1 -0
  169. package/dist/ts/components/editor/PageEditorWrapper.js +360 -0
  170. package/dist/ts/components/editor/PageEditorWrapper.js.map +1 -0
  171. package/dist/ts/components/editor/PuckWithUntouchedMetadata.d.ts +5 -0
  172. package/dist/ts/components/editor/PuckWithUntouchedMetadata.d.ts.map +1 -0
  173. package/dist/ts/components/editor/PuckWithUntouchedMetadata.js +53 -0
  174. package/dist/ts/components/editor/PuckWithUntouchedMetadata.js.map +1 -0
  175. package/dist/ts/components/editor/SearchableSelect.d.ts +34 -0
  176. package/dist/ts/components/editor/SearchableSelect.d.ts.map +1 -0
  177. package/dist/ts/components/editor/SearchableSelect.js +116 -0
  178. package/dist/ts/components/editor/SearchableSelect.js.map +1 -0
  179. package/dist/ts/components/editor/host-wrapper-plugin.d.ts.map +1 -0
  180. package/dist/ts/components/editor/host-wrapper-plugin.js +38 -0
  181. package/dist/ts/components/editor/host-wrapper-plugin.js.map +1 -0
  182. package/dist/ts/components/editor/index.d.ts +9 -0
  183. package/dist/ts/components/editor/index.d.ts.map +1 -0
  184. package/dist/ts/components/editor/index.js +8 -0
  185. package/dist/ts/components/editor/index.js.map +1 -0
  186. package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.d.ts +15 -0
  187. package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.d.ts.map +1 -0
  188. package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.js +91 -0
  189. package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.js.map +1 -0
  190. package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.d.ts +12 -0
  191. package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.d.ts.map +1 -0
  192. package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.js +107 -0
  193. package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.js.map +1 -0
  194. package/dist/ts/components/editor/insert-menu/insert-payload.d.ts +76 -0
  195. package/dist/ts/components/editor/insert-menu/insert-payload.d.ts.map +1 -0
  196. package/dist/ts/components/editor/insert-menu/insert-payload.js +95 -0
  197. package/dist/ts/components/editor/insert-menu/insert-payload.js.map +1 -0
  198. package/dist/ts/components/editor/insert-menu/mdx-components-plugin.d.ts.map +1 -0
  199. package/dist/ts/components/editor/insert-menu/mdx-components-plugin.js +14 -0
  200. package/dist/ts/components/editor/insert-menu/mdx-components-plugin.js.map +1 -0
  201. package/dist/ts/components/editor/page-setting-targets.d.ts +24 -0
  202. package/dist/ts/components/editor/page-setting-targets.d.ts.map +1 -0
  203. package/dist/ts/components/editor/page-setting-targets.js +124 -0
  204. package/dist/ts/components/editor/page-setting-targets.js.map +1 -0
  205. package/dist/ts/components/editor/preview-availability.d.ts +18 -0
  206. package/dist/ts/components/editor/preview-availability.d.ts.map +1 -0
  207. package/dist/ts/components/editor/preview-availability.js +18 -0
  208. package/dist/ts/components/editor/preview-availability.js.map +1 -0
  209. package/dist/ts/components/editors/DataEditor.d.ts +18 -0
  210. package/dist/ts/components/editors/DataEditor.d.ts.map +1 -0
  211. package/dist/ts/components/editors/DataEditor.js +140 -0
  212. package/dist/ts/components/editors/DataEditor.js.map +1 -0
  213. package/dist/ts/components/fields/ContentFragmentSelectorField.d.ts +14 -0
  214. package/dist/ts/components/fields/ContentFragmentSelectorField.d.ts.map +1 -0
  215. package/dist/ts/components/fields/ContentFragmentSelectorField.js +108 -0
  216. package/dist/ts/components/fields/ContentFragmentSelectorField.js.map +1 -0
  217. package/dist/ts/components/fields/ImageField.d.ts +17 -0
  218. package/dist/ts/components/fields/ImageField.d.ts.map +1 -0
  219. package/dist/ts/components/fields/ImageField.js +39 -0
  220. package/dist/ts/components/fields/ImageField.js.map +1 -0
  221. package/dist/ts/components/fields/MDXEditField.d.ts +17 -0
  222. package/dist/ts/components/fields/MDXEditField.d.ts.map +1 -0
  223. package/dist/ts/components/fields/MDXEditField.js +29 -0
  224. package/dist/ts/components/fields/MDXEditField.js.map +1 -0
  225. package/dist/ts/components/forms/ChipArrayField.d.ts +12 -0
  226. package/dist/ts/components/forms/ChipArrayField.d.ts.map +1 -0
  227. package/dist/ts/components/forms/ChipArrayField.js +39 -0
  228. package/dist/ts/components/forms/ChipArrayField.js.map +1 -0
  229. package/dist/ts/components/forms/HintForm.d.ts +22 -0
  230. package/dist/ts/components/forms/HintForm.d.ts.map +1 -0
  231. package/dist/ts/components/forms/HintForm.js +195 -0
  232. package/dist/ts/components/forms/HintForm.js.map +1 -0
  233. package/dist/ts/components/forms/SchemaForm.d.ts +15 -0
  234. package/dist/ts/components/forms/SchemaForm.d.ts.map +1 -0
  235. package/dist/ts/components/forms/SchemaForm.js +103 -0
  236. package/dist/ts/components/forms/SchemaForm.js.map +1 -0
  237. package/dist/ts/components/index.d.ts +8 -0
  238. package/dist/ts/components/index.d.ts.map +1 -0
  239. package/dist/ts/components/index.js +14 -0
  240. package/dist/ts/components/index.js.map +1 -0
  241. package/dist/ts/components/media/AssetCard.d.ts +14 -0
  242. package/dist/ts/components/media/AssetCard.d.ts.map +1 -0
  243. package/dist/ts/components/media/AssetCard.js +26 -0
  244. package/dist/ts/components/media/AssetCard.js.map +1 -0
  245. package/dist/ts/components/media/AssetDetailSidebar.d.ts +15 -0
  246. package/dist/ts/components/media/AssetDetailSidebar.d.ts.map +1 -0
  247. package/dist/ts/components/media/AssetDetailSidebar.js +122 -0
  248. package/dist/ts/components/media/AssetDetailSidebar.js.map +1 -0
  249. package/dist/ts/components/media/BulkActionBar.d.ts +9 -0
  250. package/dist/ts/components/media/BulkActionBar.d.ts.map +1 -0
  251. package/dist/ts/components/media/BulkActionBar.js +9 -0
  252. package/dist/ts/components/media/BulkActionBar.js.map +1 -0
  253. package/dist/ts/components/media/FolderNav.d.ts +7 -0
  254. package/dist/ts/components/media/FolderNav.d.ts.map +1 -0
  255. package/dist/ts/components/media/FolderNav.js +13 -0
  256. package/dist/ts/components/media/FolderNav.js.map +1 -0
  257. package/dist/ts/components/media/FolderTreeSidebar.d.ts +9 -0
  258. package/dist/ts/components/media/FolderTreeSidebar.d.ts.map +1 -0
  259. package/dist/ts/components/media/FolderTreeSidebar.js +46 -0
  260. package/dist/ts/components/media/FolderTreeSidebar.js.map +1 -0
  261. package/dist/ts/components/media/ImagePicker.d.ts +14 -0
  262. package/dist/ts/components/media/ImagePicker.d.ts.map +1 -0
  263. package/dist/ts/components/media/ImagePicker.js +44 -0
  264. package/dist/ts/components/media/ImagePicker.js.map +1 -0
  265. package/dist/ts/components/media/MediaLibrary.d.ts +31 -0
  266. package/dist/ts/components/media/MediaLibrary.d.ts.map +1 -0
  267. package/dist/ts/components/media/MediaLibrary.js +87 -0
  268. package/dist/ts/components/media/MediaLibrary.js.map +1 -0
  269. package/dist/ts/components/media/MediaToolbar.d.ts +21 -0
  270. package/dist/ts/components/media/MediaToolbar.d.ts.map +1 -0
  271. package/dist/ts/components/media/MediaToolbar.js +7 -0
  272. package/dist/ts/components/media/MediaToolbar.js.map +1 -0
  273. package/dist/ts/components/media/UploadModal.d.ts +9 -0
  274. package/dist/ts/components/media/UploadModal.d.ts.map +1 -0
  275. package/dist/ts/components/media/UploadModal.js +36 -0
  276. package/dist/ts/components/media/UploadModal.js.map +1 -0
  277. package/dist/ts/components/media/index.d.ts +10 -0
  278. package/dist/ts/components/media/index.d.ts.map +1 -0
  279. package/dist/ts/components/media/index.js +10 -0
  280. package/dist/ts/components/media/index.js.map +1 -0
  281. package/dist/ts/components/pages/DataList.d.ts +7 -0
  282. package/dist/ts/components/pages/DataList.d.ts.map +1 -0
  283. package/dist/ts/components/pages/DataList.js +267 -0
  284. package/dist/ts/components/pages/DataList.js.map +1 -0
  285. package/dist/ts/components/pages/FragmentList.d.ts +2 -0
  286. package/dist/ts/components/pages/FragmentList.d.ts.map +1 -0
  287. package/dist/ts/components/pages/FragmentList.js +281 -0
  288. package/dist/ts/components/pages/FragmentList.js.map +1 -0
  289. package/dist/ts/components/pages/MediaPage.d.ts +8 -0
  290. package/dist/ts/components/pages/MediaPage.d.ts.map +1 -0
  291. package/dist/ts/components/pages/MediaPage.js +146 -0
  292. package/dist/ts/components/pages/MediaPage.js.map +1 -0
  293. package/dist/ts/components/pages/PageList.d.ts +7 -0
  294. package/dist/ts/components/pages/PageList.d.ts.map +1 -0
  295. package/dist/ts/components/pages/PageList.js +299 -0
  296. package/dist/ts/components/pages/PageList.js.map +1 -0
  297. package/dist/ts/components/pages/index.d.ts +3 -0
  298. package/dist/ts/components/pages/index.d.ts.map +1 -0
  299. package/dist/ts/components/pages/index.js +3 -0
  300. package/dist/ts/components/pages/index.js.map +1 -0
  301. package/dist/ts/components/puck/MDXContent.d.ts +19 -0
  302. package/dist/ts/components/puck/MDXContent.d.ts.map +1 -0
  303. package/dist/ts/components/puck/MDXContent.js +110 -0
  304. package/dist/ts/components/puck/MDXContent.js.map +1 -0
  305. package/dist/ts/components/puck/index.d.ts +2 -0
  306. package/dist/ts/components/puck/index.d.ts.map +1 -0
  307. package/dist/ts/components/puck/index.js +2 -0
  308. package/dist/ts/components/puck/index.js.map +1 -0
  309. package/dist/ts/components/sandbox/ContentSandbox.d.ts +31 -0
  310. package/dist/ts/components/sandbox/ContentSandbox.d.ts.map +1 -0
  311. package/dist/ts/components/sandbox/ContentSandbox.js +148 -0
  312. package/dist/ts/components/sandbox/ContentSandbox.js.map +1 -0
  313. package/dist/ts/components/sandbox/frame-runtime.d.ts +7 -0
  314. package/dist/ts/components/sandbox/frame-runtime.d.ts.map +1 -0
  315. package/dist/ts/components/sandbox/frame-runtime.js +7 -0
  316. package/dist/ts/components/sandbox/frame-runtime.js.map +1 -0
  317. package/dist/ts/components/toast.d.ts +44 -0
  318. package/dist/ts/components/toast.d.ts.map +1 -0
  319. package/dist/ts/components/toast.js +8 -0
  320. package/dist/ts/components/toast.js.map +1 -0
  321. package/dist/ts/components/ui/Banner.d.ts +76 -0
  322. package/dist/ts/components/ui/Banner.d.ts.map +1 -0
  323. package/dist/ts/components/ui/Banner.js +50 -0
  324. package/dist/ts/components/ui/Banner.js.map +1 -0
  325. package/dist/ts/components/ui/Button.d.ts +25 -0
  326. package/dist/ts/components/ui/Button.d.ts.map +1 -0
  327. package/dist/ts/components/ui/Button.js +34 -0
  328. package/dist/ts/components/ui/Button.js.map +1 -0
  329. package/dist/ts/components/ui/Card.d.ts +72 -0
  330. package/dist/ts/components/ui/Card.d.ts.map +1 -0
  331. package/dist/ts/components/ui/Card.js +50 -0
  332. package/dist/ts/components/ui/Card.js.map +1 -0
  333. package/dist/ts/components/ui/FieldError.d.ts +24 -0
  334. package/dist/ts/components/ui/FieldError.d.ts.map +1 -0
  335. package/dist/ts/components/ui/FieldError.js +18 -0
  336. package/dist/ts/components/ui/FieldError.js.map +1 -0
  337. package/dist/ts/components/ui/IconButton.d.ts +13 -0
  338. package/dist/ts/components/ui/IconButton.d.ts.map +1 -0
  339. package/dist/ts/components/ui/IconButton.js +11 -0
  340. package/dist/ts/components/ui/IconButton.js.map +1 -0
  341. package/dist/ts/components/ui/Input.d.ts +37 -0
  342. package/dist/ts/components/ui/Input.d.ts.map +1 -0
  343. package/dist/ts/components/ui/Input.js +10 -0
  344. package/dist/ts/components/ui/Input.js.map +1 -0
  345. package/dist/ts/components/ui/SaveIndicator.d.ts +8 -0
  346. package/dist/ts/components/ui/SaveIndicator.d.ts.map +1 -0
  347. package/dist/ts/components/ui/SaveIndicator.js +33 -0
  348. package/dist/ts/components/ui/SaveIndicator.js.map +1 -0
  349. package/dist/ts/components/ui/Select.d.ts +8 -0
  350. package/dist/ts/components/ui/Select.d.ts.map +1 -0
  351. package/dist/ts/components/ui/Select.js +10 -0
  352. package/dist/ts/components/ui/Select.js.map +1 -0
  353. package/dist/ts/components/ui/Separator.d.ts +7 -0
  354. package/dist/ts/components/ui/Separator.d.ts.map +1 -0
  355. package/dist/ts/components/ui/Separator.js +9 -0
  356. package/dist/ts/components/ui/Separator.js.map +1 -0
  357. package/dist/ts/components/ui/Textarea.d.ts +8 -0
  358. package/dist/ts/components/ui/Textarea.d.ts.map +1 -0
  359. package/dist/ts/components/ui/Textarea.js +6 -0
  360. package/dist/ts/components/ui/Textarea.js.map +1 -0
  361. package/dist/ts/components/ui/Tooltip.d.ts +9 -0
  362. package/dist/ts/components/ui/Tooltip.d.ts.map +1 -0
  363. package/dist/ts/components/ui/Tooltip.js +6 -0
  364. package/dist/ts/components/ui/Tooltip.js.map +1 -0
  365. package/dist/ts/components/ui/index.d.ts +14 -0
  366. package/dist/ts/components/ui/index.d.ts.map +1 -0
  367. package/dist/ts/components/ui/index.js +18 -0
  368. package/dist/ts/components/ui/index.js.map +1 -0
  369. package/dist/ts/data-schemas.d.ts +36 -0
  370. package/dist/ts/data-schemas.d.ts.map +1 -0
  371. package/dist/ts/data-schemas.js +52 -0
  372. package/dist/ts/data-schemas.js.map +1 -0
  373. package/dist/ts/dev-entry.d.ts +2 -0
  374. package/dist/ts/dev-entry.d.ts.map +1 -0
  375. package/dist/ts/dev-entry.js +23 -0
  376. package/dist/ts/dev-entry.js.map +1 -0
  377. package/dist/ts/editor-flush.d.ts +26 -0
  378. package/dist/ts/editor-flush.d.ts.map +1 -0
  379. package/dist/ts/editor-flush.js +40 -0
  380. package/dist/ts/editor-flush.js.map +1 -0
  381. package/dist/ts/hooks/index.d.ts +10 -0
  382. package/dist/ts/hooks/index.d.ts.map +1 -0
  383. package/dist/ts/hooks/index.js +8 -0
  384. package/dist/ts/hooks/index.js.map +1 -0
  385. package/dist/ts/hooks/useCanvasTheme.d.ts +12 -0
  386. package/dist/ts/hooks/useCanvasTheme.d.ts.map +1 -0
  387. package/dist/ts/hooks/useCanvasTheme.js +34 -0
  388. package/dist/ts/hooks/useCanvasTheme.js.map +1 -0
  389. package/dist/ts/hooks/useClickOutside.d.ts.map +1 -0
  390. package/dist/ts/hooks/useClickOutside.js +19 -0
  391. package/dist/ts/hooks/useClickOutside.js.map +1 -0
  392. package/dist/ts/hooks/useDialogState.d.ts.map +1 -0
  393. package/dist/ts/hooks/useDialogState.js +32 -0
  394. package/dist/ts/hooks/useDialogState.js.map +1 -0
  395. package/dist/ts/hooks/useEditorPref.d.ts.map +1 -0
  396. package/dist/ts/hooks/useEditorPref.js +50 -0
  397. package/dist/ts/hooks/useEditorPref.js.map +1 -0
  398. package/dist/ts/hooks/useErrorModal.d.ts +15 -0
  399. package/dist/ts/hooks/useErrorModal.d.ts.map +1 -0
  400. package/dist/ts/hooks/useErrorModal.js +36 -0
  401. package/dist/ts/hooks/useErrorModal.js.map +1 -0
  402. package/dist/ts/hooks/useSiteBaseUrl.d.ts +10 -0
  403. package/dist/ts/hooks/useSiteBaseUrl.d.ts.map +1 -0
  404. package/dist/ts/hooks/useSiteBaseUrl.js +15 -0
  405. package/dist/ts/hooks/useSiteBaseUrl.js.map +1 -0
  406. package/dist/ts/hooks/useTheme.d.ts +12 -0
  407. package/dist/ts/hooks/useTheme.d.ts.map +1 -0
  408. package/dist/ts/hooks/useTheme.js +55 -0
  409. package/dist/ts/hooks/useTheme.js.map +1 -0
  410. package/dist/ts/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
  411. package/dist/ts/hooks/useUnsavedChangesGuard.js +30 -0
  412. package/dist/ts/hooks/useUnsavedChangesGuard.js.map +1 -0
  413. package/dist/ts/hooks/useUpload.d.ts +5 -0
  414. package/dist/ts/hooks/useUpload.d.ts.map +1 -0
  415. package/dist/ts/hooks/useUpload.js +15 -0
  416. package/dist/ts/hooks/useUpload.js.map +1 -0
  417. package/dist/ts/hooks/useUploadFlow.d.ts +47 -0
  418. package/dist/ts/hooks/useUploadFlow.d.ts.map +1 -0
  419. package/dist/ts/hooks/useUploadFlow.js +154 -0
  420. package/dist/ts/hooks/useUploadFlow.js.map +1 -0
  421. package/dist/ts/host-discovery.d.ts +40 -0
  422. package/dist/ts/host-discovery.d.ts.map +1 -0
  423. package/dist/ts/host-discovery.js +39 -0
  424. package/dist/ts/host-discovery.js.map +1 -0
  425. package/dist/ts/host-style-probe.d.ts +81 -0
  426. package/dist/ts/host-style-probe.d.ts.map +1 -0
  427. package/dist/ts/host-style-probe.js +638 -0
  428. package/dist/ts/host-style-probe.js.map +1 -0
  429. package/dist/ts/index.d.ts +13 -0
  430. package/dist/ts/index.d.ts.map +1 -0
  431. package/dist/ts/index.js +17 -0
  432. package/dist/ts/index.js.map +1 -0
  433. package/dist/ts/lib/utils.d.ts.map +1 -0
  434. package/dist/ts/lib/utils.js +48 -0
  435. package/dist/ts/lib/utils.js.map +1 -0
  436. package/dist/ts/main-spa.d.ts.map +1 -0
  437. package/dist/ts/main-spa.js +58 -0
  438. package/dist/ts/main-spa.js.map +1 -0
  439. package/dist/ts/main.d.ts.map +1 -0
  440. package/dist/ts/main.js +16 -0
  441. package/dist/ts/main.js.map +1 -0
  442. package/dist/ts/mdx-components-define.d.ts +185 -0
  443. package/dist/ts/mdx-components-define.d.ts.map +1 -0
  444. package/dist/ts/mdx-components-define.js +140 -0
  445. package/dist/ts/mdx-components-define.js.map +1 -0
  446. package/dist/ts/mdx-components.d.ts +63 -0
  447. package/dist/ts/mdx-components.d.ts.map +1 -0
  448. package/dist/ts/mdx-components.js +129 -0
  449. package/dist/ts/mdx-components.js.map +1 -0
  450. package/dist/ts/media/AssetScopePill.d.ts +30 -0
  451. package/dist/ts/media/AssetScopePill.d.ts.map +1 -0
  452. package/dist/ts/media/AssetScopePill.js +31 -0
  453. package/dist/ts/media/AssetScopePill.js.map +1 -0
  454. package/dist/ts/media/MediaIssueBadge.d.ts +33 -0
  455. package/dist/ts/media/MediaIssueBadge.d.ts.map +1 -0
  456. package/dist/ts/media/MediaIssueBadge.js +55 -0
  457. package/dist/ts/media/MediaIssueBadge.js.map +1 -0
  458. package/dist/ts/media/types.d.ts +108 -0
  459. package/dist/ts/media/types.d.ts.map +1 -0
  460. package/dist/ts/media/types.js +2 -0
  461. package/dist/ts/media/types.js.map +1 -0
  462. package/dist/ts/media/use-asset-scope.d.ts +24 -0
  463. package/dist/ts/media/use-asset-scope.d.ts.map +1 -0
  464. package/dist/ts/media/use-asset-scope.js +57 -0
  465. package/dist/ts/media/use-asset-scope.js.map +1 -0
  466. package/dist/ts/media/use-media-issue.d.ts +24 -0
  467. package/dist/ts/media/use-media-issue.d.ts.map +1 -0
  468. package/dist/ts/media/use-media-issue.js +52 -0
  469. package/dist/ts/media/use-media-issue.js.map +1 -0
  470. package/dist/ts/merge-default-props.d.ts +23 -0
  471. package/dist/ts/merge-default-props.d.ts.map +1 -0
  472. package/dist/ts/merge-default-props.js +51 -0
  473. package/dist/ts/merge-default-props.js.map +1 -0
  474. package/dist/ts/mock-puck-config.d.ts.map +1 -0
  475. package/dist/ts/mock-puck-config.js +74 -0
  476. package/dist/ts/mock-puck-config.js.map +1 -0
  477. package/dist/ts/page-schema-define.d.ts +134 -0
  478. package/dist/ts/page-schema-define.d.ts.map +1 -0
  479. package/dist/ts/page-schema-define.js +60 -0
  480. package/dist/ts/page-schema-define.js.map +1 -0
  481. package/dist/ts/page-schemas.d.ts +31 -0
  482. package/dist/ts/page-schemas.d.ts.map +1 -0
  483. package/dist/ts/page-schemas.js +56 -0
  484. package/dist/ts/page-schemas.js.map +1 -0
  485. package/dist/ts/page-setting-attributes.d.ts +27 -0
  486. package/dist/ts/page-setting-attributes.d.ts.map +1 -0
  487. package/dist/ts/page-setting-attributes.js +11 -0
  488. package/dist/ts/page-setting-attributes.js.map +1 -0
  489. package/dist/ts/prose-surface-css.d.ts +92 -0
  490. package/dist/ts/prose-surface-css.d.ts.map +1 -0
  491. package/dist/ts/prose-surface-css.js +349 -0
  492. package/dist/ts/prose-surface-css.js.map +1 -0
  493. package/dist/ts/puck-config.d.ts.map +1 -0
  494. package/dist/ts/puck-config.js +51 -0
  495. package/dist/ts/puck-config.js.map +1 -0
  496. package/dist/ts/sandbox-preview-styles.d.ts +63 -0
  497. package/dist/ts/sandbox-preview-styles.d.ts.map +1 -0
  498. package/dist/ts/sandbox-preview-styles.js +169 -0
  499. package/dist/ts/sandbox-preview-styles.js.map +1 -0
  500. package/dist/ts/selected-block.d.ts +61 -0
  501. package/dist/ts/selected-block.d.ts.map +1 -0
  502. package/dist/ts/selected-block.js +65 -0
  503. package/dist/ts/selected-block.js.map +1 -0
  504. package/dist/ts/site-css-layer.d.ts +40 -0
  505. package/dist/ts/site-css-layer.d.ts.map +1 -0
  506. package/dist/ts/site-css-layer.js +110 -0
  507. package/dist/ts/site-css-layer.js.map +1 -0
  508. package/dist/ts/site-styles.d.ts +141 -0
  509. package/dist/ts/site-styles.d.ts.map +1 -0
  510. package/dist/ts/site-styles.js +426 -0
  511. package/dist/ts/site-styles.js.map +1 -0
  512. package/dist/ts/theme.d.ts +46 -0
  513. package/dist/ts/theme.d.ts.map +1 -0
  514. package/dist/ts/theme.js +96 -0
  515. package/dist/ts/theme.js.map +1 -0
  516. package/dist/ts/types.d.ts +58 -0
  517. package/dist/ts/types.d.ts.map +1 -0
  518. package/dist/ts/types.js +2 -0
  519. package/dist/ts/types.js.map +1 -0
  520. package/dist/ts/ui-config.d.ts +249 -0
  521. package/dist/ts/ui-config.d.ts.map +1 -0
  522. package/dist/ts/ui-config.js +142 -0
  523. package/dist/ts/ui-config.js.map +1 -0
  524. package/dist/ts/utils/asset-url.d.ts +9 -0
  525. package/dist/ts/utils/asset-url.d.ts.map +1 -0
  526. package/dist/ts/utils/asset-url.js +19 -0
  527. package/dist/ts/utils/asset-url.js.map +1 -0
  528. package/dist/ts/utils/cn.d.ts.map +1 -0
  529. package/dist/ts/utils/cn.js +6 -0
  530. package/dist/ts/utils/cn.js.map +1 -0
  531. package/dist/ts/utils/content-failure.d.ts +32 -0
  532. package/dist/ts/utils/content-failure.d.ts.map +1 -0
  533. package/dist/ts/utils/content-failure.js +67 -0
  534. package/dist/ts/utils/content-failure.js.map +1 -0
  535. package/dist/ts/utils/entry-meta.d.ts +29 -0
  536. package/dist/ts/utils/entry-meta.d.ts.map +1 -0
  537. package/dist/ts/utils/entry-meta.js +38 -0
  538. package/dist/ts/utils/entry-meta.js.map +1 -0
  539. package/dist/ts/utils/entry-name.d.ts +11 -0
  540. package/dist/ts/utils/entry-name.d.ts.map +1 -0
  541. package/dist/ts/utils/entry-name.js +19 -0
  542. package/dist/ts/utils/entry-name.js.map +1 -0
  543. package/dist/ts/utils/format-date.d.ts.map +1 -0
  544. package/dist/ts/utils/format-date.js +38 -0
  545. package/dist/ts/utils/format-date.js.map +1 -0
  546. package/dist/ts/utils/mdast-to-html.d.ts.map +1 -0
  547. package/dist/ts/utils/mdast-to-html.js +235 -0
  548. package/dist/ts/utils/mdast-to-html.js.map +1 -0
  549. package/dist/ts/utils/mdast-tree.d.ts.map +1 -0
  550. package/dist/ts/utils/mdast-tree.js +286 -0
  551. package/dist/ts/utils/mdast-tree.js.map +1 -0
  552. package/dist/ts/utils/menu-placement.d.ts +8 -0
  553. package/dist/ts/utils/menu-placement.d.ts.map +1 -0
  554. package/dist/ts/utils/menu-placement.js +10 -0
  555. package/dist/ts/utils/menu-placement.js.map +1 -0
  556. package/dist/ts/utils/pageMetadata.d.ts +80 -0
  557. package/dist/ts/utils/pageMetadata.d.ts.map +1 -0
  558. package/dist/ts/utils/pageMetadata.js +249 -0
  559. package/dist/ts/utils/pageMetadata.js.map +1 -0
  560. package/dist/ts/utils/sanitize-html.d.ts +31 -0
  561. package/dist/ts/utils/sanitize-html.d.ts.map +1 -0
  562. package/dist/ts/utils/sanitize-html.js +84 -0
  563. package/dist/ts/utils/sanitize-html.js.map +1 -0
  564. package/dist/ts/utils/slugify.d.ts +14 -0
  565. package/dist/ts/utils/slugify.d.ts.map +1 -0
  566. package/dist/ts/utils/slugify.js +22 -0
  567. package/dist/ts/utils/slugify.js.map +1 -0
  568. package/dist/ts/utils/zodIntrospect.d.ts +19 -0
  569. package/dist/ts/utils/zodIntrospect.d.ts.map +1 -0
  570. package/dist/ts/utils/zodIntrospect.js +95 -0
  571. package/dist/ts/utils/zodIntrospect.js.map +1 -0
  572. package/dist/ts/write-access.d.ts +48 -0
  573. package/dist/ts/write-access.d.ts.map +1 -0
  574. package/dist/ts/write-access.js +140 -0
  575. package/dist/ts/write-access.js.map +1 -0
  576. package/package.json +145 -98
  577. package/src/App.tsx +78 -0
  578. package/src/CmsSpaApp.tsx +63 -0
  579. package/src/components/CMSDashboard.tsx +118 -0
  580. package/src/components/CMSLayout.tsx +25 -0
  581. package/src/components/ConlocaLogo.tsx +10 -0
  582. package/src/components/GitStatusPanel.tsx +188 -0
  583. package/src/components/MobileTopBar.tsx +22 -0
  584. package/src/components/Sidebar.tsx +146 -0
  585. package/src/components/UserAvatar.tsx +28 -0
  586. package/src/components/cards/DataEntryCard.tsx +163 -0
  587. package/src/components/cards/SectionCard.tsx +103 -0
  588. package/src/components/cards/index.ts +1 -0
  589. package/src/components/dashboard/RecentActivity.tsx +114 -0
  590. package/src/components/dialog.tsx +78 -0
  591. package/src/components/dialogs/ConflictDialog.tsx +139 -0
  592. package/src/components/dialogs/CreateDataDialog.tsx +70 -0
  593. package/src/components/dialogs/CreateFolderDialog.tsx +94 -0
  594. package/src/components/dialogs/CreatePageDialog.tsx +465 -0
  595. package/src/components/dialogs/DataPropertiesDialog.tsx +84 -0
  596. package/src/components/dialogs/DeleteConfirmDialog.tsx +61 -0
  597. package/src/components/dialogs/ErrorModal.tsx +109 -0
  598. package/src/components/dialogs/FragmentPropertiesDialog.tsx +97 -0
  599. package/src/components/dialogs/MoveFolderDialog.tsx +205 -0
  600. package/src/components/dialogs/PageMetadataDialog.tsx +311 -0
  601. package/src/components/dialogs/UnsavedChangesDialog.tsx +43 -0
  602. package/src/components/dialogs/index.ts +8 -0
  603. package/src/components/editor/CMSMDXEditor.tsx +281 -0
  604. package/src/components/editor/ContentDiff.tsx +251 -0
  605. package/src/components/editor/CreateFragmentDialog.tsx +227 -0
  606. package/src/components/editor/DrawerItemOverride.tsx +62 -0
  607. package/src/components/editor/EditorChromeToggles.tsx +35 -0
  608. package/src/components/editor/FragmentEditor.tsx +506 -0
  609. package/src/components/editor/FragmentWrappers.tsx +72 -0
  610. package/src/components/editor/GenericBlock.tsx +1361 -0
  611. package/src/components/editor/ImagePickerDialog.tsx +25 -0
  612. package/src/components/editor/JsxPropsPanel.tsx +293 -0
  613. package/src/components/editor/LocaleSelector.tsx +60 -0
  614. package/src/components/editor/MDXLivePreview.tsx +179 -0
  615. package/src/components/editor/MdxPageEditor.tsx +546 -0
  616. package/src/components/editor/PageEditor.tsx +529 -0
  617. package/src/components/editor/PageEditorHeaderActions.tsx +160 -0
  618. package/src/components/editor/PageEditorWrapper.tsx +502 -0
  619. package/src/components/editor/PuckWithUntouchedMetadata.tsx +65 -0
  620. package/src/components/editor/SearchableSelect.tsx +186 -0
  621. package/src/components/editor/host-wrapper-plugin.ts +91 -0
  622. package/src/components/editor/index.ts +8 -0
  623. package/src/components/editor/insert-menu/InsertMdxComponentButton.tsx +149 -0
  624. package/src/components/editor/insert-menu/SlashMenuPlugin.tsx +152 -0
  625. package/src/components/editor/insert-menu/insert-payload.ts +150 -0
  626. package/src/components/editor/insert-menu/mdx-components-plugin.ts +14 -0
  627. package/src/components/editor/page-setting-targets.tsx +154 -0
  628. package/src/components/editor/preview-availability.ts +20 -0
  629. package/src/components/editors/DataEditor.tsx +270 -0
  630. package/src/components/fields/ContentFragmentSelectorField.tsx +290 -0
  631. package/src/components/fields/ImageField.tsx +75 -0
  632. package/src/components/fields/MDXEditField.tsx +54 -0
  633. package/src/components/forms/ChipArrayField.tsx +81 -0
  634. package/src/components/forms/HintForm.tsx +437 -0
  635. package/src/components/forms/SchemaForm.tsx +307 -0
  636. package/src/components/index.ts +14 -0
  637. package/src/components/media/AssetCard.tsx +84 -0
  638. package/src/components/media/AssetDetailSidebar.tsx +335 -0
  639. package/src/components/media/BulkActionBar.tsx +33 -0
  640. package/src/components/media/FolderNav.tsx +44 -0
  641. package/src/components/media/FolderTreeSidebar.tsx +171 -0
  642. package/src/components/media/ImagePicker.tsx +102 -0
  643. package/src/components/media/MediaLibrary.tsx +183 -0
  644. package/src/components/media/MediaToolbar.tsx +100 -0
  645. package/src/components/media/UploadModal.tsx +266 -0
  646. package/src/components/media/index.ts +9 -0
  647. package/src/components/pages/DataList.tsx +496 -0
  648. package/src/components/pages/FragmentList.tsx +592 -0
  649. package/src/components/pages/MediaPage.tsx +284 -0
  650. package/src/components/pages/PageList.tsx +683 -0
  651. package/src/components/pages/index.ts +2 -0
  652. package/src/components/puck/MDXContent.tsx +199 -0
  653. package/src/components/puck/index.ts +1 -0
  654. package/src/components/sandbox/ContentSandbox.tsx +191 -0
  655. package/src/components/sandbox/frame-runtime.ts +15 -0
  656. package/src/components/toast.tsx +48 -0
  657. package/src/components/ui/Banner.tsx +108 -0
  658. package/src/components/ui/Button.tsx +51 -0
  659. package/src/components/ui/Card.tsx +124 -0
  660. package/src/components/ui/FieldError.tsx +37 -0
  661. package/src/components/ui/IconButton.tsx +40 -0
  662. package/src/components/ui/Input.tsx +66 -0
  663. package/src/components/ui/SaveIndicator.tsx +44 -0
  664. package/src/components/ui/Select.tsx +29 -0
  665. package/src/components/ui/Separator.tsx +14 -0
  666. package/src/components/ui/Textarea.tsx +22 -0
  667. package/src/components/ui/Tooltip.tsx +25 -0
  668. package/src/components/ui/index.ts +18 -0
  669. package/src/data-schemas.ts +82 -0
  670. package/src/dev-entry.tsx +25 -0
  671. package/src/dev.html +36 -0
  672. package/src/editor-flush.ts +47 -0
  673. package/src/hooks/index.ts +22 -0
  674. package/src/hooks/useCanvasTheme.tsx +52 -0
  675. package/src/hooks/useClickOutside.ts +24 -0
  676. package/src/hooks/useDialogState.ts +40 -0
  677. package/src/hooks/useEditorPref.ts +58 -0
  678. package/src/hooks/useErrorModal.tsx +63 -0
  679. package/src/hooks/useSiteBaseUrl.ts +16 -0
  680. package/src/hooks/useTheme.tsx +76 -0
  681. package/src/hooks/useUnsavedChangesGuard.ts +32 -0
  682. package/src/hooks/useUpload.ts +19 -0
  683. package/src/hooks/useUploadFlow.ts +227 -0
  684. package/src/host-discovery.ts +77 -0
  685. package/src/host-style-probe.ts +684 -0
  686. package/src/index.ts +42 -0
  687. package/src/lib/utils.ts +56 -0
  688. package/src/main-spa.tsx +69 -0
  689. package/src/main.css +1095 -0
  690. package/src/main.html +43 -0
  691. package/src/main.tsx +16 -0
  692. package/src/mdx-components-define.ts +296 -0
  693. package/src/mdx-components.ts +154 -0
  694. package/src/media/AssetScopePill.tsx +56 -0
  695. package/src/media/MediaIssueBadge.tsx +86 -0
  696. package/src/media/types.ts +96 -0
  697. package/src/media/use-asset-scope.ts +58 -0
  698. package/src/media/use-media-issue.ts +53 -0
  699. package/src/merge-default-props.ts +58 -0
  700. package/src/mock-puck-config.tsx +115 -0
  701. package/src/page-schema-define.ts +176 -0
  702. package/src/page-schemas.ts +80 -0
  703. package/src/page-setting-attributes.ts +40 -0
  704. package/src/prose-surface-css.ts +359 -0
  705. package/src/puck-config.ts +77 -0
  706. package/src/sandbox-preview-styles.ts +166 -0
  707. package/src/selected-block.ts +121 -0
  708. package/src/site-css-layer.ts +109 -0
  709. package/src/site-styles.ts +524 -0
  710. package/src/theme.ts +102 -0
  711. package/src/types.ts +63 -0
  712. package/src/ui-config.ts +334 -0
  713. package/src/utils/asset-url.ts +22 -0
  714. package/src/utils/cn.ts +6 -0
  715. package/src/utils/content-failure.ts +74 -0
  716. package/src/utils/entry-meta.ts +47 -0
  717. package/src/utils/entry-name.ts +21 -0
  718. package/src/utils/format-date.ts +34 -0
  719. package/src/utils/mdast-to-html.ts +247 -0
  720. package/src/utils/mdast-tree.ts +292 -0
  721. package/src/utils/menu-placement.ts +13 -0
  722. package/src/utils/pageMetadata.ts +285 -0
  723. package/src/utils/sanitize-html.ts +84 -0
  724. package/src/utils/slugify.ts +21 -0
  725. package/src/utils/zodIntrospect.ts +136 -0
  726. package/src/vite-env.d.ts +10 -0
  727. package/src/write-access.ts +147 -0
  728. package/styles/stylesheet.d.ts +6 -0
  729. package/styles/tailwind-theme.css +7 -5
  730. package/dist/App-Bk1LNxbS.mjs +0 -10851
  731. package/dist/App-Bk1LNxbS.mjs.map +0 -1
  732. package/dist/App.d.ts +0 -35
  733. package/dist/App.d.ts.map +0 -1
  734. package/dist/App.js +0 -52
  735. package/dist/CmsSpaApp.d.ts +0 -13
  736. package/dist/CmsSpaApp.d.ts.map +0 -1
  737. package/dist/CmsSpaApp.js +0 -33
  738. package/dist/cn-dlASUkDY.mjs +0 -10
  739. package/dist/cn-dlASUkDY.mjs.map +0 -1
  740. package/dist/components/CMSDashboard.d.ts +0 -2
  741. package/dist/components/CMSDashboard.d.ts.map +0 -1
  742. package/dist/components/CMSDashboard.js +0 -20
  743. package/dist/components/CMSLayout.d.ts +0 -2
  744. package/dist/components/CMSLayout.d.ts.map +0 -1
  745. package/dist/components/CMSLayout.js +0 -15
  746. package/dist/components/ConlocaLogo.d.ts +0 -2
  747. package/dist/components/ConlocaLogo.d.ts.map +0 -1
  748. package/dist/components/ConlocaLogo.js +0 -4
  749. package/dist/components/GitStatusPanel.d.ts +0 -25
  750. package/dist/components/GitStatusPanel.d.ts.map +0 -1
  751. package/dist/components/GitStatusPanel.js +0 -77
  752. package/dist/components/MobileTopBar.d.ts +0 -6
  753. package/dist/components/MobileTopBar.d.ts.map +0 -1
  754. package/dist/components/MobileTopBar.js +0 -6
  755. package/dist/components/Sidebar.d.ts +0 -8
  756. package/dist/components/Sidebar.d.ts.map +0 -1
  757. package/dist/components/Sidebar.js +0 -40
  758. package/dist/components/UserAvatar.d.ts +0 -2
  759. package/dist/components/UserAvatar.d.ts.map +0 -1
  760. package/dist/components/UserAvatar.js +0 -14
  761. package/dist/components/cards/DataEntryCard.d.ts +0 -14
  762. package/dist/components/cards/DataEntryCard.d.ts.map +0 -1
  763. package/dist/components/cards/DataEntryCard.js +0 -32
  764. package/dist/components/cards/SectionCard.d.ts +0 -15
  765. package/dist/components/cards/SectionCard.d.ts.map +0 -1
  766. package/dist/components/cards/SectionCard.js +0 -10
  767. package/dist/components/cards/index.d.ts +0 -2
  768. package/dist/components/cards/index.d.ts.map +0 -1
  769. package/dist/components/cards/index.js +0 -1
  770. package/dist/components/dashboard/RecentActivity.d.ts +0 -2
  771. package/dist/components/dashboard/RecentActivity.d.ts.map +0 -1
  772. package/dist/components/dashboard/RecentActivity.js +0 -58
  773. package/dist/components/dialog.d.ts +0 -53
  774. package/dist/components/dialog.d.ts.map +0 -1
  775. package/dist/components/dialog.js +0 -56
  776. package/dist/components/dialogs/BlockPropertiesDialog.d.ts +0 -12
  777. package/dist/components/dialogs/BlockPropertiesDialog.d.ts.map +0 -1
  778. package/dist/components/dialogs/BlockPropertiesDialog.js +0 -42
  779. package/dist/components/dialogs/ConflictDialog.d.ts +0 -10
  780. package/dist/components/dialogs/ConflictDialog.d.ts.map +0 -1
  781. package/dist/components/dialogs/ConflictDialog.js +0 -29
  782. package/dist/components/dialogs/CreateDataDialog.d.ts +0 -9
  783. package/dist/components/dialogs/CreateDataDialog.d.ts.map +0 -1
  784. package/dist/components/dialogs/CreateDataDialog.js +0 -20
  785. package/dist/components/dialogs/CreateFolderDialog.d.ts +0 -9
  786. package/dist/components/dialogs/CreateFolderDialog.d.ts.map +0 -1
  787. package/dist/components/dialogs/CreateFolderDialog.js +0 -33
  788. package/dist/components/dialogs/CreatePageDialog.d.ts +0 -10
  789. package/dist/components/dialogs/CreatePageDialog.d.ts.map +0 -1
  790. package/dist/components/dialogs/CreatePageDialog.js +0 -155
  791. package/dist/components/dialogs/DataPropertiesDialog.d.ts +0 -10
  792. package/dist/components/dialogs/DataPropertiesDialog.d.ts.map +0 -1
  793. package/dist/components/dialogs/DataPropertiesDialog.js +0 -38
  794. package/dist/components/dialogs/DeleteConfirmDialog.d.ts +0 -12
  795. package/dist/components/dialogs/DeleteConfirmDialog.d.ts.map +0 -1
  796. package/dist/components/dialogs/DeleteConfirmDialog.js +0 -7
  797. package/dist/components/dialogs/ErrorModal.d.ts +0 -14
  798. package/dist/components/dialogs/ErrorModal.d.ts.map +0 -1
  799. package/dist/components/dialogs/ErrorModal.js +0 -38
  800. package/dist/components/dialogs/MoveFolderDialog.d.ts +0 -11
  801. package/dist/components/dialogs/MoveFolderDialog.d.ts.map +0 -1
  802. package/dist/components/dialogs/MoveFolderDialog.js +0 -45
  803. package/dist/components/dialogs/PageMetadataDialog.d.ts +0 -10
  804. package/dist/components/dialogs/PageMetadataDialog.d.ts.map +0 -1
  805. package/dist/components/dialogs/PageMetadataDialog.js +0 -85
  806. package/dist/components/dialogs/UnsavedChangesDialog.d.ts +0 -8
  807. package/dist/components/dialogs/UnsavedChangesDialog.d.ts.map +0 -1
  808. package/dist/components/dialogs/UnsavedChangesDialog.js +0 -6
  809. package/dist/components/dialogs/index.d.ts +0 -9
  810. package/dist/components/dialogs/index.d.ts.map +0 -1
  811. package/dist/components/dialogs/index.js +0 -8
  812. package/dist/components/editor/BlockEditor.d.ts +0 -8
  813. package/dist/components/editor/BlockEditor.d.ts.map +0 -1
  814. package/dist/components/editor/BlockEditor.js +0 -262
  815. package/dist/components/editor/BlockWrappers.d.ts +0 -15
  816. package/dist/components/editor/BlockWrappers.d.ts.map +0 -1
  817. package/dist/components/editor/BlockWrappers.js +0 -29
  818. package/dist/components/editor/CMSMDXEditor.d.ts +0 -13
  819. package/dist/components/editor/CMSMDXEditor.d.ts.map +0 -1
  820. package/dist/components/editor/CMSMDXEditor.js +0 -123
  821. package/dist/components/editor/ContentDiff.d.ts +0 -10
  822. package/dist/components/editor/ContentDiff.d.ts.map +0 -1
  823. package/dist/components/editor/ContentDiff.js +0 -51
  824. package/dist/components/editor/CreateBlockDialog.d.ts +0 -26
  825. package/dist/components/editor/CreateBlockDialog.d.ts.map +0 -1
  826. package/dist/components/editor/CreateBlockDialog.js +0 -131
  827. package/dist/components/editor/DrawerItemOverride.d.ts +0 -8
  828. package/dist/components/editor/DrawerItemOverride.d.ts.map +0 -1
  829. package/dist/components/editor/DrawerItemOverride.js +0 -41
  830. package/dist/components/editor/EditorChromeToggles.d.ts +0 -16
  831. package/dist/components/editor/EditorChromeToggles.d.ts.map +0 -1
  832. package/dist/components/editor/EditorChromeToggles.js +0 -16
  833. package/dist/components/editor/GenericBlock.d.ts +0 -3
  834. package/dist/components/editor/GenericBlock.d.ts.map +0 -1
  835. package/dist/components/editor/GenericBlock.js +0 -1067
  836. package/dist/components/editor/ImagePickerDialog.d.ts +0 -6
  837. package/dist/components/editor/ImagePickerDialog.d.ts.map +0 -1
  838. package/dist/components/editor/ImagePickerDialog.js +0 -24
  839. package/dist/components/editor/JsxPropsPanel.d.ts +0 -16
  840. package/dist/components/editor/JsxPropsPanel.d.ts.map +0 -1
  841. package/dist/components/editor/JsxPropsPanel.js +0 -145
  842. package/dist/components/editor/LocaleSelector.d.ts +0 -9
  843. package/dist/components/editor/LocaleSelector.d.ts.map +0 -1
  844. package/dist/components/editor/LocaleSelector.js +0 -13
  845. package/dist/components/editor/MDXLivePreview.d.ts +0 -14
  846. package/dist/components/editor/MDXLivePreview.d.ts.map +0 -1
  847. package/dist/components/editor/MDXLivePreview.js +0 -103
  848. package/dist/components/editor/MdxPageEditor.d.ts +0 -10
  849. package/dist/components/editor/MdxPageEditor.d.ts.map +0 -1
  850. package/dist/components/editor/MdxPageEditor.js +0 -297
  851. package/dist/components/editor/PageEditor.d.ts +0 -18
  852. package/dist/components/editor/PageEditor.d.ts.map +0 -1
  853. package/dist/components/editor/PageEditor.js +0 -288
  854. package/dist/components/editor/PageEditorHeaderActions.d.ts +0 -16
  855. package/dist/components/editor/PageEditorHeaderActions.d.ts.map +0 -1
  856. package/dist/components/editor/PageEditorHeaderActions.js +0 -19
  857. package/dist/components/editor/PageEditorWrapper.d.ts +0 -7
  858. package/dist/components/editor/PageEditorWrapper.d.ts.map +0 -1
  859. package/dist/components/editor/PageEditorWrapper.js +0 -319
  860. package/dist/components/editor/SearchableSelect.d.ts +0 -34
  861. package/dist/components/editor/SearchableSelect.d.ts.map +0 -1
  862. package/dist/components/editor/SearchableSelect.js +0 -116
  863. package/dist/components/editor/host-wrapper-plugin.d.ts.map +0 -1
  864. package/dist/components/editor/host-wrapper-plugin.js +0 -37
  865. package/dist/components/editor/index.d.ts +0 -9
  866. package/dist/components/editor/index.d.ts.map +0 -1
  867. package/dist/components/editor/index.js +0 -7
  868. package/dist/components/editor/insert-menu/InsertMdxComponentButton.d.ts +0 -15
  869. package/dist/components/editor/insert-menu/InsertMdxComponentButton.d.ts.map +0 -1
  870. package/dist/components/editor/insert-menu/InsertMdxComponentButton.js +0 -90
  871. package/dist/components/editor/insert-menu/SlashMenuPlugin.d.ts +0 -12
  872. package/dist/components/editor/insert-menu/SlashMenuPlugin.d.ts.map +0 -1
  873. package/dist/components/editor/insert-menu/SlashMenuPlugin.js +0 -106
  874. package/dist/components/editor/insert-menu/insert-payload.d.ts +0 -76
  875. package/dist/components/editor/insert-menu/insert-payload.d.ts.map +0 -1
  876. package/dist/components/editor/insert-menu/insert-payload.js +0 -94
  877. package/dist/components/editor/insert-menu/mdx-components-plugin.d.ts.map +0 -1
  878. package/dist/components/editor/insert-menu/mdx-components-plugin.js +0 -13
  879. package/dist/components/editors/DataEditor.d.ts +0 -19
  880. package/dist/components/editors/DataEditor.d.ts.map +0 -1
  881. package/dist/components/editors/DataEditor.js +0 -139
  882. package/dist/components/fields/ContentBlockSelectorField.d.ts +0 -14
  883. package/dist/components/fields/ContentBlockSelectorField.d.ts.map +0 -1
  884. package/dist/components/fields/ContentBlockSelectorField.js +0 -105
  885. package/dist/components/fields/ImageField.d.ts +0 -16
  886. package/dist/components/fields/ImageField.d.ts.map +0 -1
  887. package/dist/components/fields/ImageField.js +0 -39
  888. package/dist/components/fields/MDXEditField.d.ts +0 -17
  889. package/dist/components/fields/MDXEditField.d.ts.map +0 -1
  890. package/dist/components/fields/MDXEditField.js +0 -28
  891. package/dist/components/forms/ChipArrayField.d.ts +0 -12
  892. package/dist/components/forms/ChipArrayField.d.ts.map +0 -1
  893. package/dist/components/forms/ChipArrayField.js +0 -40
  894. package/dist/components/forms/HintForm.d.ts +0 -22
  895. package/dist/components/forms/HintForm.d.ts.map +0 -1
  896. package/dist/components/forms/HintForm.js +0 -162
  897. package/dist/components/forms/SchemaForm.d.ts +0 -15
  898. package/dist/components/forms/SchemaForm.d.ts.map +0 -1
  899. package/dist/components/forms/SchemaForm.js +0 -106
  900. package/dist/components/index.d.ts +0 -8
  901. package/dist/components/index.d.ts.map +0 -1
  902. package/dist/components/index.js +0 -13
  903. package/dist/components/media/AssetCard.d.ts +0 -14
  904. package/dist/components/media/AssetCard.d.ts.map +0 -1
  905. package/dist/components/media/AssetCard.js +0 -31
  906. package/dist/components/media/AssetDetailSidebar.d.ts +0 -11
  907. package/dist/components/media/AssetDetailSidebar.d.ts.map +0 -1
  908. package/dist/components/media/AssetDetailSidebar.js +0 -101
  909. package/dist/components/media/BulkActionBar.d.ts +0 -9
  910. package/dist/components/media/BulkActionBar.d.ts.map +0 -1
  911. package/dist/components/media/BulkActionBar.js +0 -8
  912. package/dist/components/media/FolderNav.d.ts +0 -7
  913. package/dist/components/media/FolderNav.d.ts.map +0 -1
  914. package/dist/components/media/FolderNav.js +0 -12
  915. package/dist/components/media/FolderTreeSidebar.d.ts +0 -9
  916. package/dist/components/media/FolderTreeSidebar.d.ts.map +0 -1
  917. package/dist/components/media/FolderTreeSidebar.js +0 -41
  918. package/dist/components/media/ImagePicker.d.ts +0 -14
  919. package/dist/components/media/ImagePicker.d.ts.map +0 -1
  920. package/dist/components/media/ImagePicker.js +0 -45
  921. package/dist/components/media/MediaLibrary.d.ts +0 -35
  922. package/dist/components/media/MediaLibrary.d.ts.map +0 -1
  923. package/dist/components/media/MediaLibrary.js +0 -100
  924. package/dist/components/media/MediaToolbar.d.ts +0 -21
  925. package/dist/components/media/MediaToolbar.d.ts.map +0 -1
  926. package/dist/components/media/MediaToolbar.js +0 -6
  927. package/dist/components/media/UploadModal.d.ts +0 -9
  928. package/dist/components/media/UploadModal.d.ts.map +0 -1
  929. package/dist/components/media/UploadModal.js +0 -42
  930. package/dist/components/media/UploadZone.d.ts +0 -8
  931. package/dist/components/media/UploadZone.d.ts.map +0 -1
  932. package/dist/components/media/UploadZone.js +0 -22
  933. package/dist/components/media/index.d.ts +0 -11
  934. package/dist/components/media/index.d.ts.map +0 -1
  935. package/dist/components/media/index.js +0 -10
  936. package/dist/components/pages/BlockList.d.ts +0 -2
  937. package/dist/components/pages/BlockList.d.ts.map +0 -1
  938. package/dist/components/pages/BlockList.js +0 -280
  939. package/dist/components/pages/DataList.d.ts +0 -7
  940. package/dist/components/pages/DataList.d.ts.map +0 -1
  941. package/dist/components/pages/DataList.js +0 -244
  942. package/dist/components/pages/MediaPage.d.ts +0 -8
  943. package/dist/components/pages/MediaPage.d.ts.map +0 -1
  944. package/dist/components/pages/MediaPage.js +0 -107
  945. package/dist/components/pages/PageList.d.ts +0 -7
  946. package/dist/components/pages/PageList.d.ts.map +0 -1
  947. package/dist/components/pages/PageList.js +0 -308
  948. package/dist/components/pages/index.d.ts +0 -3
  949. package/dist/components/pages/index.d.ts.map +0 -1
  950. package/dist/components/pages/index.js +0 -2
  951. package/dist/components/puck/MDXContent.d.ts +0 -10
  952. package/dist/components/puck/MDXContent.d.ts.map +0 -1
  953. package/dist/components/puck/MDXContent.js +0 -80
  954. package/dist/components/puck/index.d.ts +0 -2
  955. package/dist/components/puck/index.d.ts.map +0 -1
  956. package/dist/components/puck/index.js +0 -1
  957. package/dist/components/toast.d.ts +0 -44
  958. package/dist/components/toast.d.ts.map +0 -1
  959. package/dist/components/toast.js +0 -7
  960. package/dist/components/ui/Banner.d.ts +0 -76
  961. package/dist/components/ui/Banner.d.ts.map +0 -1
  962. package/dist/components/ui/Banner.js +0 -49
  963. package/dist/components/ui/Button.d.ts +0 -25
  964. package/dist/components/ui/Button.d.ts.map +0 -1
  965. package/dist/components/ui/Button.js +0 -33
  966. package/dist/components/ui/Card.d.ts +0 -72
  967. package/dist/components/ui/Card.d.ts.map +0 -1
  968. package/dist/components/ui/Card.js +0 -49
  969. package/dist/components/ui/FieldError.d.ts +0 -24
  970. package/dist/components/ui/FieldError.d.ts.map +0 -1
  971. package/dist/components/ui/FieldError.js +0 -17
  972. package/dist/components/ui/IconButton.d.ts +0 -13
  973. package/dist/components/ui/IconButton.d.ts.map +0 -1
  974. package/dist/components/ui/IconButton.js +0 -10
  975. package/dist/components/ui/Input.d.ts +0 -37
  976. package/dist/components/ui/Input.d.ts.map +0 -1
  977. package/dist/components/ui/Input.js +0 -9
  978. package/dist/components/ui/SaveIndicator.d.ts +0 -8
  979. package/dist/components/ui/SaveIndicator.d.ts.map +0 -1
  980. package/dist/components/ui/SaveIndicator.js +0 -32
  981. package/dist/components/ui/Select.d.ts +0 -8
  982. package/dist/components/ui/Select.d.ts.map +0 -1
  983. package/dist/components/ui/Select.js +0 -9
  984. package/dist/components/ui/Separator.d.ts +0 -7
  985. package/dist/components/ui/Separator.d.ts.map +0 -1
  986. package/dist/components/ui/Separator.js +0 -8
  987. package/dist/components/ui/Textarea.d.ts +0 -8
  988. package/dist/components/ui/Textarea.d.ts.map +0 -1
  989. package/dist/components/ui/Textarea.js +0 -5
  990. package/dist/components/ui/Tooltip.d.ts +0 -9
  991. package/dist/components/ui/Tooltip.d.ts.map +0 -1
  992. package/dist/components/ui/Tooltip.js +0 -7
  993. package/dist/components/ui/index.d.ts +0 -14
  994. package/dist/components/ui/index.d.ts.map +0 -1
  995. package/dist/components/ui/index.js +0 -17
  996. package/dist/data-schemas.d.mts +0 -25
  997. package/dist/data-schemas.d.mts.map +0 -1
  998. package/dist/data-schemas.d.ts +0 -22
  999. package/dist/data-schemas.d.ts.map +0 -1
  1000. package/dist/data-schemas.js +0 -51
  1001. package/dist/data-schemas.mjs +0 -51
  1002. package/dist/data-schemas.mjs.map +0 -1
  1003. package/dist/dev-entry.d.ts +0 -2
  1004. package/dist/dev-entry.d.ts.map +0 -1
  1005. package/dist/dev-entry.js +0 -19
  1006. package/dist/dialog.d.mts +0 -56
  1007. package/dist/dialog.d.mts.map +0 -1
  1008. package/dist/dialog.mjs +0 -67
  1009. package/dist/dialog.mjs.map +0 -1
  1010. package/dist/hooks/index.d.ts +0 -10
  1011. package/dist/hooks/index.d.ts.map +0 -1
  1012. package/dist/hooks/index.js +0 -7
  1013. package/dist/hooks/useCanvasTheme.d.ts +0 -12
  1014. package/dist/hooks/useCanvasTheme.d.ts.map +0 -1
  1015. package/dist/hooks/useCanvasTheme.js +0 -33
  1016. package/dist/hooks/useClickOutside.d.ts.map +0 -1
  1017. package/dist/hooks/useClickOutside.js +0 -18
  1018. package/dist/hooks/useDialogState.d.ts.map +0 -1
  1019. package/dist/hooks/useDialogState.js +0 -31
  1020. package/dist/hooks/useEditorPref.d.ts.map +0 -1
  1021. package/dist/hooks/useEditorPref.js +0 -49
  1022. package/dist/hooks/useErrorModal.d.ts +0 -15
  1023. package/dist/hooks/useErrorModal.d.ts.map +0 -1
  1024. package/dist/hooks/useErrorModal.js +0 -35
  1025. package/dist/hooks/useSiteBaseUrl.d.ts +0 -10
  1026. package/dist/hooks/useSiteBaseUrl.d.ts.map +0 -1
  1027. package/dist/hooks/useSiteBaseUrl.js +0 -14
  1028. package/dist/hooks/useTheme.d.ts +0 -13
  1029. package/dist/hooks/useTheme.d.ts.map +0 -1
  1030. package/dist/hooks/useTheme.js +0 -69
  1031. package/dist/hooks/useUnsavedChangesGuard.d.ts.map +0 -1
  1032. package/dist/hooks/useUnsavedChangesGuard.js +0 -29
  1033. package/dist/hooks/useUpload.d.ts +0 -10
  1034. package/dist/hooks/useUpload.d.ts.map +0 -1
  1035. package/dist/hooks/useUpload.js +0 -42
  1036. package/dist/hooks/useUploadFlow.d.ts +0 -42
  1037. package/dist/hooks/useUploadFlow.d.ts.map +0 -1
  1038. package/dist/hooks/useUploadFlow.js +0 -148
  1039. package/dist/host-style-probe.d.ts +0 -22
  1040. package/dist/host-style-probe.d.ts.map +0 -1
  1041. package/dist/host-style-probe.js +0 -508
  1042. package/dist/index.d.mts +0 -253
  1043. package/dist/index.d.mts.map +0 -1
  1044. package/dist/index.d.ts +0 -10
  1045. package/dist/index.d.ts.map +0 -1
  1046. package/dist/index.js +0 -12
  1047. package/dist/index.mjs +0 -38
  1048. package/dist/index.mjs.map +0 -1
  1049. package/dist/lib/utils.d.ts.map +0 -1
  1050. package/dist/lib/utils.js +0 -47
  1051. package/dist/main-spa-781YUplS.mjs +0 -46
  1052. package/dist/main-spa-781YUplS.mjs.map +0 -1
  1053. package/dist/main-spa.d.ts.map +0 -1
  1054. package/dist/main-spa.js +0 -61
  1055. package/dist/main.d.mts +0 -1
  1056. package/dist/main.d.ts.map +0 -1
  1057. package/dist/main.js +0 -13
  1058. package/dist/main.mjs +0 -17
  1059. package/dist/main.mjs.map +0 -1
  1060. package/dist/mdx-components.d.mts +0 -207
  1061. package/dist/mdx-components.d.mts.map +0 -1
  1062. package/dist/mdx-components.d.ts +0 -204
  1063. package/dist/mdx-components.d.ts.map +0 -1
  1064. package/dist/mdx-components.js +0 -217
  1065. package/dist/mdx-components.mjs +0 -208
  1066. package/dist/mdx-components.mjs.map +0 -1
  1067. package/dist/media/AssetScopePill.d.ts +0 -30
  1068. package/dist/media/AssetScopePill.d.ts.map +0 -1
  1069. package/dist/media/AssetScopePill.js +0 -30
  1070. package/dist/media/MediaIssueBadge.d.ts +0 -33
  1071. package/dist/media/MediaIssueBadge.d.ts.map +0 -1
  1072. package/dist/media/MediaIssueBadge.js +0 -54
  1073. package/dist/media/types.d.ts +0 -101
  1074. package/dist/media/types.d.ts.map +0 -1
  1075. package/dist/media/types.js +0 -1
  1076. package/dist/media/use-asset-scope.d.ts +0 -25
  1077. package/dist/media/use-asset-scope.d.ts.map +0 -1
  1078. package/dist/media/use-asset-scope.js +0 -54
  1079. package/dist/media/use-media-issue.d.ts +0 -24
  1080. package/dist/media/use-media-issue.d.ts.map +0 -1
  1081. package/dist/media/use-media-issue.js +0 -49
  1082. package/dist/mock-puck-config.d.mts +0 -23
  1083. package/dist/mock-puck-config.d.mts.map +0 -1
  1084. package/dist/mock-puck-config.d.ts.map +0 -1
  1085. package/dist/mock-puck-config.js +0 -73
  1086. package/dist/mock-puck-config.mjs +0 -125
  1087. package/dist/mock-puck-config.mjs.map +0 -1
  1088. package/dist/page-schemas.d.mts +0 -159
  1089. package/dist/page-schemas.d.mts.map +0 -1
  1090. package/dist/page-schemas.d.ts +0 -156
  1091. package/dist/page-schemas.d.ts.map +0 -1
  1092. package/dist/page-schemas.js +0 -118
  1093. package/dist/page-schemas.mjs +0 -120
  1094. package/dist/page-schemas.mjs.map +0 -1
  1095. package/dist/puck-config.d.mts +0 -33
  1096. package/dist/puck-config.d.mts.map +0 -1
  1097. package/dist/puck-config.d.ts.map +0 -1
  1098. package/dist/puck-config.js +0 -50
  1099. package/dist/puck-config.mjs +0 -50
  1100. package/dist/puck-config.mjs.map +0 -1
  1101. package/dist/selected-block.d.ts +0 -61
  1102. package/dist/selected-block.d.ts.map +0 -1
  1103. package/dist/selected-block.js +0 -64
  1104. package/dist/site-styles.d.mts +0 -123
  1105. package/dist/site-styles.d.mts.map +0 -1
  1106. package/dist/site-styles.d.ts +0 -121
  1107. package/dist/site-styles.d.ts.map +0 -1
  1108. package/dist/site-styles.js +0 -253
  1109. package/dist/site-styles.mjs +0 -234
  1110. package/dist/site-styles.mjs.map +0 -1
  1111. package/dist/toast.d.mts +0 -7
  1112. package/dist/toast.d.mts.map +0 -1
  1113. package/dist/toast.mjs +0 -16
  1114. package/dist/toast.mjs.map +0 -1
  1115. package/dist/types.d.ts +0 -57
  1116. package/dist/types.d.ts.map +0 -1
  1117. package/dist/types.js +0 -1
  1118. package/dist/ui-CIacC6Mv.mjs +0 -318
  1119. package/dist/ui-CIacC6Mv.mjs.map +0 -1
  1120. package/dist/ui-config.d.ts +0 -70
  1121. package/dist/ui-config.d.ts.map +0 -1
  1122. package/dist/ui-config.js +0 -44
  1123. package/dist/ui.d.mts +0 -290
  1124. package/dist/ui.d.mts.map +0 -1
  1125. package/dist/ui.mjs +0 -2
  1126. package/dist/utils/asset-url.d.ts +0 -3
  1127. package/dist/utils/asset-url.d.ts.map +0 -1
  1128. package/dist/utils/asset-url.js +0 -7
  1129. package/dist/utils/cn.d.ts.map +0 -1
  1130. package/dist/utils/cn.js +0 -5
  1131. package/dist/utils/format-date.d.ts.map +0 -1
  1132. package/dist/utils/format-date.js +0 -37
  1133. package/dist/utils/mdast-to-html.d.ts.map +0 -1
  1134. package/dist/utils/mdast-to-html.js +0 -206
  1135. package/dist/utils/mdast-tree.d.ts.map +0 -1
  1136. package/dist/utils/mdast-tree.js +0 -285
  1137. package/dist/utils/pageMetadata.d.ts +0 -67
  1138. package/dist/utils/pageMetadata.d.ts.map +0 -1
  1139. package/dist/utils/pageMetadata.js +0 -161
  1140. package/dist/utils/slugify.d.ts +0 -12
  1141. package/dist/utils/slugify.d.ts.map +0 -1
  1142. package/dist/utils/slugify.js +0 -17
  1143. package/dist/utils/zodIntrospect.d.ts +0 -24
  1144. package/dist/utils/zodIntrospect.d.ts.map +0 -1
  1145. package/dist/utils/zodIntrospect.js +0 -88
  1146. package/styles/styles.css.d.ts +0 -2
  1147. package/styles/tailwind-theme.css.d.ts +0 -2
  1148. /package/dist/{components → ts/components}/editor/host-wrapper-plugin.d.ts +0 -0
  1149. /package/dist/{components → ts/components}/editor/insert-menu/mdx-components-plugin.d.ts +0 -0
  1150. /package/dist/{hooks → ts/hooks}/useClickOutside.d.ts +0 -0
  1151. /package/dist/{hooks → ts/hooks}/useDialogState.d.ts +0 -0
  1152. /package/dist/{hooks → ts/hooks}/useEditorPref.d.ts +0 -0
  1153. /package/dist/{hooks → ts/hooks}/useUnsavedChangesGuard.d.ts +0 -0
  1154. /package/dist/{lib → ts/lib}/utils.d.ts +0 -0
  1155. /package/dist/{main-spa.d.ts → ts/main-spa.d.ts} +0 -0
  1156. /package/dist/{main.d.ts → ts/main.d.ts} +0 -0
  1157. /package/dist/{mock-puck-config.d.ts → ts/mock-puck-config.d.ts} +0 -0
  1158. /package/dist/{puck-config.d.ts → ts/puck-config.d.ts} +0 -0
  1159. /package/dist/{utils → ts/utils}/cn.d.ts +0 -0
  1160. /package/dist/{utils → ts/utils}/format-date.d.ts +0 -0
  1161. /package/dist/{utils → ts/utils}/mdast-to-html.d.ts +0 -0
  1162. /package/dist/{utils → ts/utils}/mdast-tree.d.ts +0 -0
@@ -1,208 +0,0 @@
1
- import { useEffect, useState } from "react";
2
- //#region src/mdx-components.ts
3
- /** Type guard: descriptor is the JSX variant (vs. a snippet). */
4
- function isJsxDescriptor(d) {
5
- return d.kind === "flow" || d.kind === "text";
6
- }
7
- /** Type guard: descriptor is the snippet variant. */
8
- function isSnippetDescriptor(d) {
9
- return d.kind === "snippet";
10
- }
11
- /**
12
- * Identity helper that validates registration-time invariants.
13
- *
14
- * Throws on:
15
- * - duplicate `name` across the array (across kinds — a JSX `<Aside>` and a
16
- * snippet named 'Aside' would clash in the insert menu);
17
- * - `kind: 'text'` with `hasChildren: true` (text-kind JSX is treated as an
18
- * inline atom by the Lexical bridge);
19
- * - two JSX descriptors with conflicting `import.from` for the same `name`
20
- * (deterministic merge failure that would otherwise surface as a confusing
21
- * save-time error);
22
- * - snippet descriptors with an empty `content` string (would silently
23
- * insert nothing and look like a broken menu item).
24
- */
25
- function defineMdxComponents(components) {
26
- const seen = /* @__PURE__ */ new Map();
27
- for (const descriptor of components) {
28
- const existing = seen.get(descriptor.name);
29
- if (existing) {
30
- const a = isJsxDescriptor(existing) ? existing.import?.from : void 0;
31
- const b = isJsxDescriptor(descriptor) ? descriptor.import?.from : void 0;
32
- if (a !== b) throw new Error(`defineMdxComponents: duplicate descriptor for '${descriptor.name}' with conflicting import.from ('${a ?? "<none>"}' vs '${b ?? "<none>"}').`);
33
- throw new Error(`defineMdxComponents: duplicate descriptor for '${descriptor.name}'.`);
34
- }
35
- if (isJsxDescriptor(descriptor) && descriptor.kind === "text" && descriptor.hasChildren) throw new Error(`defineMdxComponents: descriptor '${descriptor.name}' has kind: 'text' with hasChildren: true — text-kind JSX is treated as an inline atom; use kind: 'flow' for components with children.`);
36
- if (isSnippetDescriptor(descriptor) && descriptor.content.length === 0) throw new Error(`defineMdxComponents: snippet descriptor '${descriptor.name}' has empty content — a snippet with no content would silently insert nothing.`);
37
- seen.set(descriptor.name, descriptor);
38
- }
39
- return components;
40
- }
41
- /**
42
- * Read a string-valued JSX attribute from an mdast flow element. Returns
43
- * an empty string when the attribute is missing or holds an expression
44
- * value (e.g. `prop={2}`). Designed for use inside `Editor` components on
45
- * an `MdxComponentDescriptor` — the typed editor that wants to drive a
46
- * controlled `<input value={...}>` against a string prop.
47
- */
48
- /**
49
- * Conservative detection for "this string prop value carries markdown
50
- * formatting." Used to decide whether inline editing in the SSR'd
51
- * preview is safe: a plaintext-only contenteditable would strip the
52
- * formatting on commit, so we'd rather route those props through the
53
- * side panel (where the author sees the raw text and decides).
54
- *
55
- * Detects only unambiguous markers — `**bold**` / `*em*`, inline code
56
- * `` `x` ``, and the `[text](url)` link form. Skips `_` / `__` (would
57
- * false-positive on filenames like `__init__.py`) and skips single
58
- * `*` (false-positive risk on prose). False positives just mean "edit
59
- * via panel instead of inline" which is the safe fallback; false
60
- * negatives silently destroy formatting, which is not.
61
- */
62
- const MARKDOWN_MARKER_RE = /\*\*|`|\[[^\]\n]+?\]\([^)\n]+?\)/;
63
- function containsMarkdownMarkers(value) {
64
- return MARKDOWN_MARKER_RE.test(value);
65
- }
66
- function readStringAttribute(node, name) {
67
- const attr = node.attributes.find((a) => a.type === "mdxJsxAttribute" && a.name === name);
68
- if (!attr || typeof attr.value !== "string") return "";
69
- return attr.value;
70
- }
71
- /**
72
- * Return a new attributes array with the given string attribute set to
73
- * `value`, or with the attribute removed entirely when `value` is empty.
74
- * The empty-removes-the-attribute behaviour avoids serializing `prop=""`
75
- * back to the file.
76
- */
77
- function writeStringAttribute(attributes, name, value) {
78
- const next = attributes.filter((a) => !(a.type === "mdxJsxAttribute" && a.name === name));
79
- if (value.length > 0) next.push({
80
- type: "mdxJsxAttribute",
81
- name,
82
- value
83
- });
84
- return next;
85
- }
86
- /**
87
- * Type-aware attribute writer. Encodes the value into the right
88
- * mdast shape so the saved MDX matches what an author would write
89
- * by hand:
90
- *
91
- * - `string` → `prop="value"` (or removed if empty)
92
- * - `boolean true` → `prop` (JSX shorthand; value: null)
93
- * - `boolean false` → REMOVED (default is implicit-false)
94
- * - `number` → `prop={42}` (expression so `2` ≠ `"2"`)
95
- * - `null`/`undefined` → REMOVED
96
- *
97
- * The string-only `writeStringAttribute` stays for callers that only
98
- * deal with strings (the inline-prop editor, free-text inputs). This
99
- * is for the side panel where booleans and numbers need correct mdast
100
- * encoding so a `stagger?: boolean` round-trips as `<CardGrid stagger>`
101
- * and not the truthy-but-incorrect `<CardGrid stagger="true">`.
102
- */
103
- function writeAttribute(attributes, name, value) {
104
- const next = attributes.filter((a) => !(a.type === "mdxJsxAttribute" && a.name === name));
105
- if (value === null || value === void 0) return next;
106
- if (typeof value === "string") {
107
- if (value.length === 0) return next;
108
- next.push({
109
- type: "mdxJsxAttribute",
110
- name,
111
- value
112
- });
113
- } else if (typeof value === "boolean") {
114
- if (!value) return next;
115
- next.push({
116
- type: "mdxJsxAttribute",
117
- name,
118
- value: null
119
- });
120
- } else if (typeof value === "number") next.push({
121
- type: "mdxJsxAttribute",
122
- name,
123
- value: {
124
- type: "mdxJsxAttributeValueExpression",
125
- value: String(value)
126
- }
127
- });
128
- return next;
129
- }
130
- /**
131
- * Translate a JSX-flavored plugin descriptor to the upstream
132
- * `JsxComponentDescriptor` shape that `@mdxeditor/editor` consumes.
133
- * Booleans surface as expressions (`{true}`) because the upstream
134
- * `JsxPropertyDescriptor.type` is `'string' | 'number' | 'expression'`.
135
- *
136
- * The fallback editor is injected by the CMS editor entrypoint. Keeping that
137
- * dependency one-way prevents the registry module from importing GenericBlock,
138
- * which itself consumes this registry.
139
- *
140
- * Snippet descriptors are not JSX — call sites filter them out before
141
- * dispatching here. Passing one throws to surface the misuse loudly.
142
- */
143
- function toJsxComponentDescriptor(d, fallbackEditor) {
144
- if (!isJsxDescriptor(d)) throw new Error(`toJsxComponentDescriptor: '${d.name}' is a snippet, not a JSX component.`);
145
- return {
146
- name: d.name,
147
- kind: d.kind,
148
- props: (d.props ?? []).map((p) => ({
149
- name: p.name,
150
- type: p.type === "boolean" ? "expression" : p.type,
151
- required: p.required
152
- })),
153
- hasChildren: d.hasChildren,
154
- Editor: d.Editor ?? fallbackEditor,
155
- ...d.import ? {
156
- source: d.import.from,
157
- defaultExport: d.import.default ?? false
158
- } : {}
159
- };
160
- }
161
- const getSharedState = () => {
162
- if (typeof window !== "undefined") {
163
- const w = window;
164
- if (!w.__MDX_COMPONENTS_STATE__) w.__MDX_COMPONENTS_STATE__ = {
165
- components: [],
166
- subscribers: /* @__PURE__ */ new Set()
167
- };
168
- return w.__MDX_COMPONENTS_STATE__;
169
- }
170
- return {
171
- components: [],
172
- subscribers: /* @__PURE__ */ new Set()
173
- };
174
- };
175
- /**
176
- * Replace the registered MDX components. Called by the virtual module that
177
- * loads the host's `schemas.ts`. Notifies subscribers so the editor picks
178
- * up HMR updates without remounting.
179
- */
180
- function setMdxComponents(components) {
181
- const state = getSharedState();
182
- state.components = components;
183
- for (const fn of state.subscribers) fn(components);
184
- }
185
- /** Read the current registry synchronously. */
186
- function getMdxComponents() {
187
- return getSharedState().components;
188
- }
189
- /**
190
- * React hook subscribing to registry changes. Returns the current array and
191
- * updates on HMR.
192
- */
193
- function useMdxComponents() {
194
- const [components, setComponents] = useState(() => getSharedState().components);
195
- useEffect(() => {
196
- const state = getSharedState();
197
- if (state.components !== components) setComponents(state.components);
198
- state.subscribers.add(setComponents);
199
- return () => {
200
- state.subscribers.delete(setComponents);
201
- };
202
- }, [components]);
203
- return components;
204
- }
205
- //#endregion
206
- export { containsMarkdownMarkers, defineMdxComponents, getMdxComponents, isJsxDescriptor, isSnippetDescriptor, readStringAttribute, setMdxComponents, toJsxComponentDescriptor, useMdxComponents, writeAttribute, writeStringAttribute };
207
-
208
- //# sourceMappingURL=mdx-components.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mdx-components.mjs","names":[],"sources":["../src/mdx-components.ts"],"sourcesContent":["import type { JsxComponentDescriptor, JsxEditorProps } from '@mdxeditor/editor';\nimport type { MdxJsxAttribute, MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx-jsx';\nimport type { ComponentType } from 'react';\nimport { useEffect, useState } from 'react';\n\n/**\n * Plugin API for registering insertable content for the CMS editor.\n *\n * Two flavors live in the same registry:\n *\n * 1. JSX components (`kind: 'flow' | 'text'`) — typed MDX components with\n * prop-editor forms and optional auto-import injection.\n * 2. Markdown snippets (`kind: 'snippet'`) — host-defined boilerplate\n * chunks the toolbar/slash menu insert as raw MDX. Used for \"starting\n * points\" that are pure prose (callouts, comparison tables, lists)\n * rather than reusable JSX surfaces.\n *\n * Mirrors the shape of `page-schemas.ts` — same `define*` identity helper,\n * same `setX/getX/useX` triad backed by a shared window-state cell, same\n * HMR subscriber pattern. Hosts add an `mdxComponents` export to the file\n * pointed at by the Astro integration's `schemasPath` option; the virtual\n * module loader in `@conloca/astro-cms` picks it up alongside `pageSchemas`.\n *\n * Pruning caveat (JSX flavor only): when `import.from` is set, the import\n * is added/removed by `@mdxeditor/editor`'s own export pipeline, which\n * rebuilds the import block on every save from the components actually\n * referenced in the document. Unrelated author imports (types, side\n * effects) are dropped. See the astro-cms README for the full constraint.\n */\n\nexport type MdxComponentProp =\n | {\n name: string;\n type: 'string';\n required?: boolean;\n label?: string;\n help?: string;\n defaultValue?: string;\n options?: ReadonlyArray<{ value: string; label: string }>;\n }\n | {\n name: string;\n type: 'number';\n required?: boolean;\n label?: string;\n help?: string;\n defaultValue?: number;\n }\n | {\n name: string;\n type: 'boolean';\n required?: boolean;\n label?: string;\n help?: string;\n defaultValue?: boolean;\n };\n\nexport interface MdxComponentInsertHint {\n /** Human-readable label shown in the slash menu and the toolbar dropdown. */\n label: string;\n /** Optional one-line description shown under the label in the slash menu. */\n description?: string;\n /** Optional Lucide icon name (rendered by the existing icon registry). */\n icon?: string;\n /** Aliases that match in slash-menu search ('callout' would match Aside). */\n keywords?: ReadonlyArray<string>;\n /**\n * Optional grouping label for the toolbar dropdown. Descriptors with the\n * same `category` render under a shared section header; descriptors that\n * omit it land in the default ungrouped bucket. Slash-menu rendering\n * currently ignores this — typeahead works better as a flat list.\n */\n category?: string;\n}\n\n/**\n * JSX component descriptor — a typed MDX surface the editor can prop-edit\n * and (optionally) keep imports synced for.\n */\nexport interface MdxJsxComponentDescriptor {\n /** Tag name authors write in MDX, e.g. 'Steps'. Unique across the registry. */\n name: string;\n /** Block-level (`flow`) or inline (`text`). */\n kind: 'flow' | 'text';\n /** Insert-time UI hints. Omit to hide from the slash menu and toolbar. */\n insert?: MdxComponentInsertHint;\n /** Props the in-place editor surfaces in its form. */\n props?: ReadonlyArray<MdxComponentProp>;\n /** Whether the component accepts children (nested rich-text editor). */\n hasChildren?: boolean;\n /** Default attributes used at insert time. */\n defaults?: {\n attributes?: Record<string, string | number | boolean>;\n /** Raw MDX snippet parsed to mdast children at insert time. */\n children?: string;\n };\n /** Custom in-place editor. Falls back to GenericJsxEditor when omitted. */\n Editor?: ComponentType<JsxEditorProps>;\n /**\n * Opt-in import injection. When set, the editor's save serializer emits\n * `import { Name } from '<from>'` (or `import Name from '<from>'` when\n * `default: true`) whenever this component appears in the document.\n * Maps directly to upstream `JsxComponentDescriptor.source` +\n * `defaultExport`. See the pruning caveat at the top of this file.\n */\n import?: { from: string; default?: boolean };\n}\n\n/**\n * Markdown snippet descriptor — a host-defined boilerplate chunk inserted\n * as raw MDX. No props, no auto-import, no in-place editor: once inserted\n * the snippet *is* the document content, edited inline like any other\n * markdown.\n */\nexport interface MdxSnippetDescriptor {\n /**\n * Stable id. Not exposed in the output MDX; used only as a registry key\n * (so two snippets named 'Callout' would collide the same way two JSX\n * `<Callout>` components would).\n */\n name: string;\n kind: 'snippet';\n /** Insert-time UI hints. Required — a snippet with no label can't be inserted. */\n insert: MdxComponentInsertHint;\n /**\n * Raw MDX inserted at the cursor when the snippet is chosen. Parsed by\n * `@mdxeditor/editor`'s markdown insertion path, so JSX (e.g. nested\n * `<Card>`) round-trips through the registered JSX descriptors.\n */\n content: string;\n}\n\nexport type MdxComponentDescriptor = MdxJsxComponentDescriptor | MdxSnippetDescriptor;\n\nexport type MdxComponents = ReadonlyArray<MdxComponentDescriptor>;\n\n/** Type guard: descriptor is the JSX variant (vs. a snippet). */\nexport function isJsxDescriptor(d: MdxComponentDescriptor): d is MdxJsxComponentDescriptor {\n return d.kind === 'flow' || d.kind === 'text';\n}\n\n/** Type guard: descriptor is the snippet variant. */\nexport function isSnippetDescriptor(d: MdxComponentDescriptor): d is MdxSnippetDescriptor {\n return d.kind === 'snippet';\n}\n\n/**\n * Identity helper that validates registration-time invariants.\n *\n * Throws on:\n * - duplicate `name` across the array (across kinds — a JSX `<Aside>` and a\n * snippet named 'Aside' would clash in the insert menu);\n * - `kind: 'text'` with `hasChildren: true` (text-kind JSX is treated as an\n * inline atom by the Lexical bridge);\n * - two JSX descriptors with conflicting `import.from` for the same `name`\n * (deterministic merge failure that would otherwise surface as a confusing\n * save-time error);\n * - snippet descriptors with an empty `content` string (would silently\n * insert nothing and look like a broken menu item).\n */\nexport function defineMdxComponents(components: MdxComponents): MdxComponents {\n const seen = new Map<string, MdxComponentDescriptor>();\n for (const descriptor of components) {\n const existing = seen.get(descriptor.name);\n if (existing) {\n // Duplicate-import is reported with its specific message because that\n // class of mistake comes from two registration files merging — the\n // generic 'duplicate descriptor' hint isn't enough to debug it.\n const a = isJsxDescriptor(existing) ? existing.import?.from : undefined;\n const b = isJsxDescriptor(descriptor) ? descriptor.import?.from : undefined;\n if (a !== b) {\n throw new Error(\n `defineMdxComponents: duplicate descriptor for '${descriptor.name}' with conflicting import.from (` +\n `'${a ?? '<none>'}' vs '${b ?? '<none>'}').`,\n );\n }\n throw new Error(`defineMdxComponents: duplicate descriptor for '${descriptor.name}'.`);\n }\n if (isJsxDescriptor(descriptor) && descriptor.kind === 'text' && descriptor.hasChildren) {\n throw new Error(\n `defineMdxComponents: descriptor '${descriptor.name}' has kind: 'text' with hasChildren: true — ` +\n \"text-kind JSX is treated as an inline atom; use kind: 'flow' for components with children.\",\n );\n }\n if (isSnippetDescriptor(descriptor) && descriptor.content.length === 0) {\n throw new Error(\n `defineMdxComponents: snippet descriptor '${descriptor.name}' has empty content — ` +\n 'a snippet with no content would silently insert nothing.',\n );\n }\n seen.set(descriptor.name, descriptor);\n }\n return components;\n}\n\n/**\n * Read a string-valued JSX attribute from an mdast flow element. Returns\n * an empty string when the attribute is missing or holds an expression\n * value (e.g. `prop={2}`). Designed for use inside `Editor` components on\n * an `MdxComponentDescriptor` — the typed editor that wants to drive a\n * controlled `<input value={...}>` against a string prop.\n */\n/**\n * Conservative detection for \"this string prop value carries markdown\n * formatting.\" Used to decide whether inline editing in the SSR'd\n * preview is safe: a plaintext-only contenteditable would strip the\n * formatting on commit, so we'd rather route those props through the\n * side panel (where the author sees the raw text and decides).\n *\n * Detects only unambiguous markers — `**bold**` / `*em*`, inline code\n * `` `x` ``, and the `[text](url)` link form. Skips `_` / `__` (would\n * false-positive on filenames like `__init__.py`) and skips single\n * `*` (false-positive risk on prose). False positives just mean \"edit\n * via panel instead of inline\" which is the safe fallback; false\n * negatives silently destroy formatting, which is not.\n */\nconst MARKDOWN_MARKER_RE = /\\*\\*|`|\\[[^\\]\\n]+?\\]\\([^)\\n]+?\\)/;\nexport function containsMarkdownMarkers(value: string): boolean {\n return MARKDOWN_MARKER_RE.test(value);\n}\n\nexport function readStringAttribute(node: MdxJsxFlowElement | MdxJsxTextElement, name: string): string {\n const attr = node.attributes.find((a): a is MdxJsxAttribute => a.type === 'mdxJsxAttribute' && a.name === name);\n if (!attr || typeof attr.value !== 'string') return '';\n return attr.value;\n}\n\n/**\n * Return a new attributes array with the given string attribute set to\n * `value`, or with the attribute removed entirely when `value` is empty.\n * The empty-removes-the-attribute behaviour avoids serializing `prop=\"\"`\n * back to the file.\n */\nexport function writeStringAttribute<T extends MdxJsxFlowElement | MdxJsxTextElement>(\n attributes: T['attributes'],\n name: string,\n value: string,\n): T['attributes'] {\n const next = attributes.filter((a) => !(a.type === 'mdxJsxAttribute' && a.name === name));\n if (value.length > 0) {\n next.push({ type: 'mdxJsxAttribute', name, value });\n }\n return next as T['attributes'];\n}\n\n/**\n * Type-aware attribute writer. Encodes the value into the right\n * mdast shape so the saved MDX matches what an author would write\n * by hand:\n *\n * - `string` → `prop=\"value\"` (or removed if empty)\n * - `boolean true` → `prop` (JSX shorthand; value: null)\n * - `boolean false` → REMOVED (default is implicit-false)\n * - `number` → `prop={42}` (expression so `2` ≠ `\"2\"`)\n * - `null`/`undefined` → REMOVED\n *\n * The string-only `writeStringAttribute` stays for callers that only\n * deal with strings (the inline-prop editor, free-text inputs). This\n * is for the side panel where booleans and numbers need correct mdast\n * encoding so a `stagger?: boolean` round-trips as `<CardGrid stagger>`\n * and not the truthy-but-incorrect `<CardGrid stagger=\"true\">`.\n */\nexport function writeAttribute<T extends MdxJsxFlowElement | MdxJsxTextElement>(\n attributes: T['attributes'],\n name: string,\n value: string | boolean | number | null | undefined,\n): T['attributes'] {\n const next = attributes.filter((a) => !(a.type === 'mdxJsxAttribute' && a.name === name));\n if (value === null || value === undefined) return next as T['attributes'];\n if (typeof value === 'string') {\n if (value.length === 0) return next as T['attributes'];\n next.push({ type: 'mdxJsxAttribute', name, value });\n } else if (typeof value === 'boolean') {\n if (!value) return next as T['attributes'];\n // JSX shorthand: `<Component prop />` is `value: null` in mdast.\n next.push({ type: 'mdxJsxAttribute', name, value: null });\n } else if (typeof value === 'number') {\n // Numbers must be expressions so the compiler reads `2` as a\n // number, not the string `\"2\"`. mdast-util-mdx-jsx expects an\n // `mdxJsxAttributeValueExpression` whose `value` is the source\n // text the runtime will evaluate.\n next.push({\n type: 'mdxJsxAttribute',\n name,\n value: { type: 'mdxJsxAttributeValueExpression', value: String(value) },\n });\n }\n return next as T['attributes'];\n}\n\n/**\n * Translate a JSX-flavored plugin descriptor to the upstream\n * `JsxComponentDescriptor` shape that `@mdxeditor/editor` consumes.\n * Booleans surface as expressions (`{true}`) because the upstream\n * `JsxPropertyDescriptor.type` is `'string' | 'number' | 'expression'`.\n *\n * The fallback editor is injected by the CMS editor entrypoint. Keeping that\n * dependency one-way prevents the registry module from importing GenericBlock,\n * which itself consumes this registry.\n *\n * Snippet descriptors are not JSX — call sites filter them out before\n * dispatching here. Passing one throws to surface the misuse loudly.\n */\nexport function toJsxComponentDescriptor(\n d: MdxComponentDescriptor,\n fallbackEditor: ComponentType<JsxEditorProps>,\n): JsxComponentDescriptor {\n if (!isJsxDescriptor(d)) {\n throw new Error(`toJsxComponentDescriptor: '${d.name}' is a snippet, not a JSX component.`);\n }\n return {\n name: d.name,\n kind: d.kind,\n props: (d.props ?? []).map((p) => ({\n name: p.name,\n type: p.type === 'boolean' ? 'expression' : p.type,\n required: p.required,\n })),\n hasChildren: d.hasChildren,\n Editor: d.Editor ?? fallbackEditor,\n ...(d.import ? { source: d.import.from, defaultExport: d.import.default ?? false } : {}),\n };\n}\n\ninterface SharedMdxComponentsState {\n components: MdxComponents;\n subscribers: Set<(components: MdxComponents) => void>;\n}\n\nconst getSharedState = (): SharedMdxComponentsState => {\n if (typeof window !== 'undefined') {\n const w = window as unknown as { __MDX_COMPONENTS_STATE__?: SharedMdxComponentsState };\n if (!w.__MDX_COMPONENTS_STATE__) {\n w.__MDX_COMPONENTS_STATE__ = {\n components: [],\n subscribers: new Set(),\n };\n }\n return w.__MDX_COMPONENTS_STATE__;\n }\n return { components: [], subscribers: new Set() };\n};\n\n/**\n * Replace the registered MDX components. Called by the virtual module that\n * loads the host's `schemas.ts`. Notifies subscribers so the editor picks\n * up HMR updates without remounting.\n */\nexport function setMdxComponents(components: MdxComponents): void {\n const state = getSharedState();\n state.components = components;\n for (const fn of state.subscribers) {\n fn(components);\n }\n}\n\n/** Read the current registry synchronously. */\nexport function getMdxComponents(): MdxComponents {\n return getSharedState().components;\n}\n\n/**\n * React hook subscribing to registry changes. Returns the current array and\n * updates on HMR.\n */\nexport function useMdxComponents(): MdxComponents {\n const [components, setComponents] = useState(() => getSharedState().components);\n\n useEffect(() => {\n const state = getSharedState();\n if (state.components !== components) {\n setComponents(state.components);\n }\n state.subscribers.add(setComponents);\n return () => {\n state.subscribers.delete(setComponents);\n };\n }, [components]);\n\n return components;\n}\n"],"mappings":";;;AAyIA,SAAgB,gBAAgB,GAA2D;CACzF,OAAO,EAAE,SAAS,UAAU,EAAE,SAAS;AACzC;;AAGA,SAAgB,oBAAoB,GAAsD;CACxF,OAAO,EAAE,SAAS;AACpB;;;;;;;;;;;;;;;AAgBA,SAAgB,oBAAoB,YAA0C;CAC5E,MAAM,uBAAO,IAAI,IAAoC;CACrD,KAAK,MAAM,cAAc,YAAY;EACnC,MAAM,WAAW,KAAK,IAAI,WAAW,IAAI;EACzC,IAAI,UAAU;GAIZ,MAAM,IAAI,gBAAgB,QAAQ,IAAI,SAAS,QAAQ,OAAO,KAAA;GAC9D,MAAM,IAAI,gBAAgB,UAAU,IAAI,WAAW,QAAQ,OAAO,KAAA;GAClE,IAAI,MAAM,GACR,MAAM,IAAI,MACR,kDAAkD,WAAW,KAAK,mCAC5D,KAAK,SAAS,QAAQ,KAAK,SAAS,IAC5C;GAEF,MAAM,IAAI,MAAM,kDAAkD,WAAW,KAAK,GAAG;EACvF;EACA,IAAI,gBAAgB,UAAU,KAAK,WAAW,SAAS,UAAU,WAAW,aAC1E,MAAM,IAAI,MACR,oCAAoC,WAAW,KAAK,uIAEtD;EAEF,IAAI,oBAAoB,UAAU,KAAK,WAAW,QAAQ,WAAW,GACnE,MAAM,IAAI,MACR,4CAA4C,WAAW,KAAK,+EAE9D;EAEF,KAAK,IAAI,WAAW,MAAM,UAAU;CACtC;CACA,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAM,qBAAqB;AAC3B,SAAgB,wBAAwB,OAAwB;CAC9D,OAAO,mBAAmB,KAAK,KAAK;AACtC;AAEA,SAAgB,oBAAoB,MAA6C,MAAsB;CACrG,MAAM,OAAO,KAAK,WAAW,MAAM,MAA4B,EAAE,SAAS,qBAAqB,EAAE,SAAS,IAAI;CAC9G,IAAI,CAAC,QAAQ,OAAO,KAAK,UAAU,UAAU,OAAO;CACpD,OAAO,KAAK;AACd;;;;;;;AAQA,SAAgB,qBACd,YACA,MACA,OACiB;CACjB,MAAM,OAAO,WAAW,QAAQ,MAAM,EAAE,EAAE,SAAS,qBAAqB,EAAE,SAAS,KAAK;CACxF,IAAI,MAAM,SAAS,GACjB,KAAK,KAAK;EAAE,MAAM;EAAmB;EAAM;CAAM,CAAC;CAEpD,OAAO;AACT;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,eACd,YACA,MACA,OACiB;CACjB,MAAM,OAAO,WAAW,QAAQ,MAAM,EAAE,EAAE,SAAS,qBAAqB,EAAE,SAAS,KAAK;CACxF,IAAI,UAAU,QAAQ,UAAU,KAAA,GAAW,OAAO;CAClD,IAAI,OAAO,UAAU,UAAU;EAC7B,IAAI,MAAM,WAAW,GAAG,OAAO;EAC/B,KAAK,KAAK;GAAE,MAAM;GAAmB;GAAM;EAAM,CAAC;CACpD,OAAO,IAAI,OAAO,UAAU,WAAW;EACrC,IAAI,CAAC,OAAO,OAAO;EAEnB,KAAK,KAAK;GAAE,MAAM;GAAmB;GAAM,OAAO;EAAK,CAAC;CAC1D,OAAO,IAAI,OAAO,UAAU,UAK1B,KAAK,KAAK;EACR,MAAM;EACN;EACA,OAAO;GAAE,MAAM;GAAkC,OAAO,OAAO,KAAK;EAAE;CACxE,CAAC;CAEH,OAAO;AACT;;;;;;;;;;;;;;AAeA,SAAgB,yBACd,GACA,gBACwB;CACxB,IAAI,CAAC,gBAAgB,CAAC,GACpB,MAAM,IAAI,MAAM,8BAA8B,EAAE,KAAK,qCAAqC;CAE5F,OAAO;EACL,MAAM,EAAE;EACR,MAAM,EAAE;EACR,QAAQ,EAAE,SAAS,CAAC,EAAA,CAAG,KAAK,OAAO;GACjC,MAAM,EAAE;GACR,MAAM,EAAE,SAAS,YAAY,eAAe,EAAE;GAC9C,UAAU,EAAE;EACd,EAAE;EACF,aAAa,EAAE;EACf,QAAQ,EAAE,UAAU;EACpB,GAAI,EAAE,SAAS;GAAE,QAAQ,EAAE,OAAO;GAAM,eAAe,EAAE,OAAO,WAAW;EAAM,IAAI,CAAC;CACxF;AACF;AAOA,MAAM,uBAAiD;CACrD,IAAI,OAAO,WAAW,aAAa;EACjC,MAAM,IAAI;EACV,IAAI,CAAC,EAAE,0BACL,EAAE,2BAA2B;GAC3B,YAAY,CAAC;GACb,6BAAa,IAAI,IAAI;EACvB;EAEF,OAAO,EAAE;CACX;CACA,OAAO;EAAE,YAAY,CAAC;EAAG,6BAAa,IAAI,IAAI;CAAE;AAClD;;;;;;AAOA,SAAgB,iBAAiB,YAAiC;CAChE,MAAM,QAAQ,eAAe;CAC7B,MAAM,aAAa;CACnB,KAAK,MAAM,MAAM,MAAM,aACrB,GAAG,UAAU;AAEjB;;AAGA,SAAgB,mBAAkC;CAChD,OAAO,eAAe,CAAC,CAAC;AAC1B;;;;;AAMA,SAAgB,mBAAkC;CAChD,MAAM,CAAC,YAAY,iBAAiB,eAAe,eAAe,CAAC,CAAC,UAAU;CAE9E,gBAAgB;EACd,MAAM,QAAQ,eAAe;EAC7B,IAAI,MAAM,eAAe,YACvB,cAAc,MAAM,UAAU;EAEhC,MAAM,YAAY,IAAI,aAAa;EACnC,aAAa;GACX,MAAM,YAAY,OAAO,aAAa;EACxC;CACF,GAAG,CAAC,UAAU,CAAC;CAEf,OAAO;AACT"}
@@ -1,30 +0,0 @@
1
- import type { AssetScope } from './types';
2
- interface AssetScopePillProps {
3
- scope: AssetScope | null;
4
- /**
5
- * Visual size variant. `sm` is the AssetCard corner badge;
6
- * `md` is the AssetDetailSidebar inline label. Defaults to `sm`.
7
- */
8
- size?: 'sm' | 'md';
9
- className?: string;
10
- }
11
- /**
12
- * Pill rendering the hosted-mode `AssetScope` ("Branch only" /
13
- * "Published"). When `scope` is `null`, renders nothing — callers
14
- * can safely render this unconditionally and let it disappear when
15
- * no bridge is installed (the local-Astro case).
16
- *
17
- * Colour vocabulary mirrors the broader cms-spa palette:
18
- *
19
- * - `published` → green (matches the deploy "live" indicator —
20
- * "this is what your site is serving").
21
- * - `branch` → amber (matches the "work in flight" idiom from
22
- * git-status / divergence banners — "yours alone for now,
23
- * needs promotion before anyone else sees it").
24
- *
25
- * The pill itself is purely presentational; the bridge wiring and
26
- * promotion gate live in the host shell.
27
- */
28
- export declare function AssetScopePill({ scope, size, className }: AssetScopePillProps): import("react/jsx-runtime").JSX.Element | null;
29
- export {};
30
- //# sourceMappingURL=AssetScopePill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssetScopePill.d.ts","sourceRoot":"","sources":["../../src/media/AssetScopePill.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,UAAU,mBAAmB;IAC3B,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,IAAW,EAAE,SAAS,EAAE,EAAE,mBAAmB,kDAyBpF"}
@@ -1,30 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
3
- /**
4
- * Pill rendering the hosted-mode `AssetScope` ("Branch only" /
5
- * "Published"). When `scope` is `null`, renders nothing — callers
6
- * can safely render this unconditionally and let it disappear when
7
- * no bridge is installed (the local-Astro case).
8
- *
9
- * Colour vocabulary mirrors the broader cms-spa palette:
10
- *
11
- * - `published` → green (matches the deploy "live" indicator —
12
- * "this is what your site is serving").
13
- * - `branch` → amber (matches the "work in flight" idiom from
14
- * git-status / divergence banners — "yours alone for now,
15
- * needs promotion before anyone else sees it").
16
- *
17
- * The pill itself is purely presentational; the bridge wiring and
18
- * promotion gate live in the host shell.
19
- */
20
- export function AssetScopePill({ scope, size = 'sm', className }) {
21
- if (!scope)
22
- return null;
23
- const isBranch = scope === 'branch';
24
- const label = isBranch ? 'Branch only' : 'Published';
25
- const sizeClasses = size === 'sm' ? 'text-[10px] px-1.5 py-0.5 leading-tight' : 'text-xs px-2 py-0.5';
26
- const variantClasses = isBranch
27
- ? 'bg-yellow-11 dark:bg-yellow-02 text-yellow-04 dark:text-yellow-09 border-yellow-08 dark:border-yellow-03'
28
- : 'bg-green-11 dark:bg-green-02 text-green-04 dark:text-green-08 border-green-08 dark:border-green-03';
29
- return (_jsx("span", { role: "status", "aria-label": `Asset scope: ${label}`, className: cn('inline-flex items-center font-medium rounded border uppercase tracking-wide', sizeClasses, variantClasses, className), children: label }));
30
- }
@@ -1,33 +0,0 @@
1
- import type { MediaIssue } from './types';
2
- interface MediaIssueBadgeProps {
3
- issue: MediaIssue | null;
4
- /**
5
- * Visual size variant. `sm` is the AssetCard corner badge;
6
- * `md` is the AssetDetailSidebar inline block (with full reason
7
- * text). Defaults to `sm`.
8
- */
9
- size?: 'sm' | 'md';
10
- className?: string;
11
- }
12
- /**
13
- * Badge rendering a hosted-mode `MediaIssue` ("Oversized" /
14
- * "Blocked"). When `issue` is `null`, renders nothing — callers
15
- * can mount this unconditionally and let it disappear when the
16
- * host has no bridge or the asset is healthy.
17
- *
18
- * Colour vocabulary:
19
- *
20
- * - `blocked` → red (matches the destructive / fail palette —
21
- * "this cannot ship").
22
- * - `oversized` → amber (matches the "work in flight / take
23
- * action" idiom shared with `AssetScopePill`'s branch variant —
24
- * "it ships, just slower than it should").
25
- *
26
- * `sm` paints a compact one-word badge for the AssetCard corner
27
- * (sits below the scope pill so the two stack cleanly). `md` paints
28
- * a wider block with the full reason / size detail for the
29
- * AssetDetailSidebar header.
30
- */
31
- export declare function MediaIssueBadge({ issue, size, className }: MediaIssueBadgeProps): import("react/jsx-runtime").JSX.Element | null;
32
- export {};
33
- //# sourceMappingURL=MediaIssueBadge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MediaIssueBadge.d.ts","sourceRoot":"","sources":["../../src/media/MediaIssueBadge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,UAAU,oBAAoB;IAC5B,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,IAAW,EAAE,SAAS,EAAE,EAAE,oBAAoB,kDAsCtF"}
@@ -1,54 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
3
- /**
4
- * Format an oversized issue's size delta into customer-facing copy
5
- * for the `md` variant. `sm` only uses the short label so the corner
6
- * badge stays scannable; this helper kicks in for the sidebar block.
7
- *
8
- * Rounds to one decimal MB for readability — promoting "5.4 MB"
9
- * over "5,400,000 bytes" matches the rest of cms-spa's file-size
10
- * vocabulary (`formatFileSize`).
11
- */
12
- function formatOversizedDetail(sizeBytes, limitBytes) {
13
- const mb = (bytes) => `${(bytes / 1_000_000).toFixed(1).replace(/\.0$/, '')} MB`;
14
- return `${mb(sizeBytes)} exceeds the ${mb(limitBytes)} inline limit. Move to media storage.`;
15
- }
16
- /**
17
- * Badge rendering a hosted-mode `MediaIssue` ("Oversized" /
18
- * "Blocked"). When `issue` is `null`, renders nothing — callers
19
- * can mount this unconditionally and let it disappear when the
20
- * host has no bridge or the asset is healthy.
21
- *
22
- * Colour vocabulary:
23
- *
24
- * - `blocked` → red (matches the destructive / fail palette —
25
- * "this cannot ship").
26
- * - `oversized` → amber (matches the "work in flight / take
27
- * action" idiom shared with `AssetScopePill`'s branch variant —
28
- * "it ships, just slower than it should").
29
- *
30
- * `sm` paints a compact one-word badge for the AssetCard corner
31
- * (sits below the scope pill so the two stack cleanly). `md` paints
32
- * a wider block with the full reason / size detail for the
33
- * AssetDetailSidebar header.
34
- */
35
- export function MediaIssueBadge({ issue, size = 'sm', className }) {
36
- if (!issue)
37
- return null;
38
- const isBlocked = issue.kind === 'blocked';
39
- const shortLabel = isBlocked ? 'Blocked' : 'Oversized';
40
- const sizeClasses = size === 'sm' ? 'text-[10px] px-1.5 py-0.5 leading-tight' : 'text-xs px-2 py-1';
41
- const variantClasses = isBlocked
42
- ? 'bg-red-11 dark:bg-red-02 text-red-04 dark:text-red-08 border-red-08 dark:border-red-03'
43
- : 'bg-amber-11 dark:bg-amber-02 text-amber-04 dark:text-amber-08 border-amber-08 dark:border-amber-03';
44
- // `md` paints the full reason / size delta so the sidebar
45
- // surface reads as a self-contained explanation, not just a
46
- // label. `sm` stays at the short label so the AssetCard corner
47
- // doesn't get crowded.
48
- const detail = size === 'md'
49
- ? issue.kind === 'blocked'
50
- ? issue.reason
51
- : formatOversizedDetail(issue.sizeBytes, issue.limitBytes)
52
- : null;
53
- return (_jsxs("span", { role: "status", "aria-label": `Media issue: ${shortLabel}${detail ? ` — ${detail}` : ''}`, className: cn('inline-flex items-center font-medium rounded border', size === 'sm' ? 'uppercase tracking-wide' : 'gap-2', sizeClasses, variantClasses, className), children: [_jsx("span", { className: size === 'md' ? 'uppercase tracking-wide font-semibold' : undefined, children: shortLabel }), detail ? _jsx("span", { className: "font-normal normal-case tracking-normal", children: detail }) : null] }));
54
- }
@@ -1,101 +0,0 @@
1
- /**
2
- * Lifecycle scope of a media asset in a hosted-mode (branch-aware)
3
- * context. cms-spa's renderer-neutral `AssetEntry` (in
4
- * `content-api/asset-types.ts`) doesn't model this — branch vs
5
- * published is meaningful only when an asset lives in a working
6
- * tree separate from the published default branch.
7
- *
8
- * The hosted shell surfaces the distinction through
9
- * `UIConfig.mediaBridge.getAssetScope`. cms-spa's media surfaces
10
- * (AssetCard, AssetDetailSidebar) paint a "Branch only" /
11
- * "Published" pill based on the bridge's reply. When no bridge is
12
- * installed (local Astro dev, astro-cms standalone), the pill is
13
- * hidden — surfaces render exactly as they did before.
14
- *
15
- * - `branch` — exists only on this branch's working tree. Needs
16
- * promotion before the published site can see it.
17
- * - `published` — promoted into the org's default branch and
18
- * visible from every branch.
19
- */
20
- export type AssetScope = 'branch' | 'published';
21
- /**
22
- * Standing media issue surfaced by the host shell alongside the
23
- * `AssetScope` pill. Distinct from a per-call promote outcome:
24
- * an issue here is a property OF the asset that persists until
25
- * the customer resolves it.
26
- *
27
- * cms-spa's renderer-neutral asset model doesn't carry these
28
- * fields because the local-Astro case has no notion of upload
29
- * limits or media scanning — they're hosted-mode state the
30
- * host exposes through `UIConfig.mediaBridge.getMediaIssue`.
31
- *
32
- * - `oversized` — file exceeds the inline-blob limit. The asset
33
- * is still served, just slower than it should be. Surface
34
- * paints an amber warning with "move to media storage"
35
- * guidance.
36
- * - `blocked` — content is held back by the passthrough scanner
37
- * (malware, EXIF leak, policy violation). Preview falls back
38
- * to a placeholder; publishing is hard-blocked until resolved.
39
- * Surface paints a red error with the scanner's reason.
40
- *
41
- * Both variants carry `filename` so flat lists are self-joinable
42
- * to the user's dirty page set without a second lookup.
43
- */
44
- export type MediaIssue = {
45
- kind: 'oversized';
46
- filename: string;
47
- sizeBytes: number;
48
- limitBytes: number;
49
- } | {
50
- kind: 'blocked';
51
- filename: string;
52
- reason: string;
53
- };
54
- /**
55
- * Bridge cms-spa uses to read host-shell-supplied metadata about
56
- * media assets that cms-spa's renderer-neutral model doesn't carry.
57
- * Installed by the host shell via `UIConfig.mediaBridge` before
58
- * rendering `<CmsSpaApp />`; cms-spa never reaches for the
59
- * HostClient directly.
60
- *
61
- * The bridge is optional in `UIConfig` — absence means "no host
62
- * wiring," in which case cms-spa surfaces degrade cleanly (no
63
- * scope pill, no host-side hooks fire).
64
- */
65
- export interface MediaBridge {
66
- /**
67
- * Resolve the lifecycle scope of a single asset. Called by
68
- * AssetCard / AssetDetailSidebar whenever they need to render
69
- * the scope pill. Returns `null` when the host has no opinion
70
- * (asset unknown to the host, pre-bootstrap state, or a
71
- * non-hosted mount); the surface treats `null` the same as
72
- * "no bridge" — pill hidden.
73
- *
74
- * The host is responsible for caching: cms-spa calls this
75
- * synchronously-from-the-surface's-POV via TanStack so
76
- * repeated renders don't refetch. The bridge implementation
77
- * (in the host shell) wraps its client's `getAssetScope`
78
- * call in a `useQuery` so the resolved scope is memoised.
79
- */
80
- getAssetScope(input: {
81
- filename: string;
82
- }): Promise<AssetScope | null>;
83
- /**
84
- * Resolve the standing media issue for a single asset, or `null`
85
- * when the asset is healthy. Called by AssetCard /
86
- * AssetDetailSidebar whenever they paint the per-asset
87
- * error/warning badge.
88
- *
89
- * Returns `null` for the same reasons as `getAssetScope`: host
90
- * has no opinion (asset unknown, pre-bootstrap state, non-hosted
91
- * mount). Surfaces treat `null` the same as "no bridge" — badge
92
- * hidden, `AssetEntry` rendered unchanged.
93
- *
94
- * The host caches the lookup so cms-spa's `useMediaIssue` wrapper
95
- * doesn't have to think about per-asset cache windows.
96
- */
97
- getMediaIssue(input: {
98
- filename: string;
99
- }): Promise<MediaIssue | null>;
100
- }
101
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/media/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACvE;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;CACxE"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,25 +0,0 @@
1
- import type { AssetScope } from './types';
2
- /**
3
- * Resolve the hosted-mode lifecycle scope of a single asset.
4
- *
5
- * Returns `null` when:
6
- *
7
- * - No `mediaBridge` is configured (cms-spa running standalone /
8
- * astro-cms / local dev) — the surface knows "the host has no
9
- * opinion" and hides the scope pill.
10
- * - The bridge resolves to `null` (asset unknown to the host or
11
- * pre-bootstrap state).
12
- *
13
- * The pill is only rendered when this returns `'branch'` or
14
- * `'published'`. Loading state is also treated as `null` for the
15
- * caller's purposes — a flashing pill on first paint reads worse
16
- * than no pill, and the scope is metadata, not primary content.
17
- *
18
- * The bridge implementation (in the host shell) wraps its
19
- * client's `getAssetScope` so the actual fetch is mocked + cached
20
- * one level deeper. From cms-spa's POV this is just a lookup; the
21
- * TanStack wrapper here is so repeat AssetCard renders don't re-call
22
- * the bridge for the same filename.
23
- */
24
- export declare function useAssetScope(filename: string | undefined): AssetScope | null;
25
- //# sourceMappingURL=use-asset-scope.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-asset-scope.d.ts","sourceRoot":"","sources":["../../src/media/use-asset-scope.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAc1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,IAAI,CAiB7E"}
@@ -1,54 +0,0 @@
1
- import { useQuery } from '@tanstack/react-query';
2
- import { getUIConfig } from '../ui-config';
3
- /**
4
- * Cache-key namespace for per-asset scope lookups. Keyed by
5
- * filename — the host shell owns the (orgId, branchName) scoping
6
- * behind the bridge, so cms-spa sees a flat "which filename?"
7
- * surface and the bridge resolves it against the active workspace.
8
- *
9
- * When the user switches branches, the host shell invalidates this
10
- * whole prefix (`['asset-scope']`) so stale scope answers don't
11
- * leak across the boundary.
12
- */
13
- const ASSET_SCOPE_QUERY_KEY_PREFIX = ['asset-scope'];
14
- /**
15
- * Resolve the hosted-mode lifecycle scope of a single asset.
16
- *
17
- * Returns `null` when:
18
- *
19
- * - No `mediaBridge` is configured (cms-spa running standalone /
20
- * astro-cms / local dev) — the surface knows "the host has no
21
- * opinion" and hides the scope pill.
22
- * - The bridge resolves to `null` (asset unknown to the host or
23
- * pre-bootstrap state).
24
- *
25
- * The pill is only rendered when this returns `'branch'` or
26
- * `'published'`. Loading state is also treated as `null` for the
27
- * caller's purposes — a flashing pill on first paint reads worse
28
- * than no pill, and the scope is metadata, not primary content.
29
- *
30
- * The bridge implementation (in the host shell) wraps its
31
- * client's `getAssetScope` so the actual fetch is mocked + cached
32
- * one level deeper. From cms-spa's POV this is just a lookup; the
33
- * TanStack wrapper here is so repeat AssetCard renders don't re-call
34
- * the bridge for the same filename.
35
- */
36
- export function useAssetScope(filename) {
37
- const query = useQuery({
38
- queryKey: [...ASSET_SCOPE_QUERY_KEY_PREFIX, filename ?? ''],
39
- queryFn: async () => {
40
- const bridge = getUIConfig().mediaBridge;
41
- if (!bridge || !filename)
42
- return null;
43
- return bridge.getAssetScope({ filename });
44
- },
45
- // Per-filename scope is stable for the lifetime of a branch
46
- // session — only a promote mutation changes it, and the host
47
- // shell invalidates the prefix on success. 5 minutes matches
48
- // the cms-spa default staleTime so the surface doesn't have to
49
- // think about cache windows.
50
- staleTime: 1000 * 60 * 5,
51
- enabled: Boolean(filename),
52
- });
53
- return query.data ?? null;
54
- }
@@ -1,24 +0,0 @@
1
- import type { MediaIssue } from './types';
2
- /**
3
- * Resolve the hosted-mode standing media issue for a single asset.
4
- *
5
- * Returns `null` when:
6
- *
7
- * - No `mediaBridge` is configured (cms-spa standalone, astro-cms,
8
- * local dev) — the surface knows "the host has no opinion" and
9
- * hides the issue badge.
10
- * - The bridge resolves to `null` (asset healthy, unknown to the
11
- * host, or pre-bootstrap state).
12
- *
13
- * The badge is only rendered when this returns a real issue. Loading
14
- * state is treated as `null` for the caller's purposes — a flashing
15
- * badge on first paint reads worse than no badge, and issue state is
16
- * metadata, not primary content.
17
- *
18
- * Mirrors the `useAssetScope` discipline: cms-spa stays a thin
19
- * consumer of `getUIConfig().mediaBridge`; the bridge implementation
20
- * in the host shell wraps `HostClient.getMediaIssue` with its own
21
- * TanStack hook so the cache is hit one level deeper.
22
- */
23
- export declare function useMediaIssue(filename: string | undefined): MediaIssue | null;
24
- //# sourceMappingURL=use-media-issue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-media-issue.d.ts","sourceRoot":"","sources":["../../src/media/use-media-issue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAU1C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,IAAI,CAiB7E"}