@canvas-digital/blog-sdk 2.0.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 (658) hide show
  1. package/README.md +110 -0
  2. package/dist/BlogPlatform.d.ts +40 -0
  3. package/dist/BlogPlatform.d.ts.map +1 -0
  4. package/dist/BlogPlatform.js +38 -0
  5. package/dist/admin/components/BlogAdmin.d.ts +10 -0
  6. package/dist/admin/components/BlogAdmin.d.ts.map +1 -0
  7. package/dist/admin/components/BlogAdmin.js +36 -0
  8. package/dist/admin/components/CategoryManager.d.ts +5 -0
  9. package/dist/admin/components/CategoryManager.d.ts.map +1 -0
  10. package/dist/admin/components/CategoryManager.js +43 -0
  11. package/dist/admin/components/MediaManager.d.ts +7 -0
  12. package/dist/admin/components/MediaManager.d.ts.map +1 -0
  13. package/dist/admin/components/MediaManager.js +37 -0
  14. package/dist/admin/components/PostEditor.d.ts +7 -0
  15. package/dist/admin/components/PostEditor.d.ts.map +1 -0
  16. package/dist/admin/components/PostEditor.js +160 -0
  17. package/dist/admin/components/PostList.d.ts +8 -0
  18. package/dist/admin/components/PostList.d.ts.map +1 -0
  19. package/dist/admin/components/PostList.js +32 -0
  20. package/dist/admin/components/TagManager.d.ts +5 -0
  21. package/dist/admin/components/TagManager.d.ts.map +1 -0
  22. package/dist/admin/components/TagManager.js +41 -0
  23. package/dist/admin/components/editor/RichTextEditor.d.ts +8 -0
  24. package/dist/admin/components/editor/RichTextEditor.d.ts.map +1 -0
  25. package/dist/admin/components/editor/RichTextEditor.js +47 -0
  26. package/dist/admin/components/internal/States.d.ts +16 -0
  27. package/dist/admin/components/internal/States.d.ts.map +1 -0
  28. package/dist/admin/components/internal/States.js +15 -0
  29. package/dist/admin/hooks/useAsync.d.ts +23 -0
  30. package/dist/admin/hooks/useAsync.d.ts.map +1 -0
  31. package/dist/admin/hooks/useAsync.js +40 -0
  32. package/dist/admin/index.d.ts +10 -0
  33. package/dist/admin/index.d.ts.map +1 -0
  34. package/dist/admin/index.js +9 -0
  35. package/dist/admin/theme.d.ts +6 -0
  36. package/dist/admin/theme.d.ts.map +1 -0
  37. package/dist/admin/theme.js +52 -0
  38. package/dist/admin/types.d.ts +27 -0
  39. package/dist/admin/types.d.ts.map +1 -0
  40. package/dist/admin/types.js +1 -0
  41. package/dist/blog-client.iife.js +1 -0
  42. package/dist/client/admin-client.d.ts +33 -0
  43. package/dist/client/admin-client.d.ts.map +1 -0
  44. package/dist/client/admin-client.js +153 -0
  45. package/dist/client/errors.d.ts +14 -0
  46. package/dist/client/errors.d.ts.map +1 -0
  47. package/dist/client/errors.js +26 -0
  48. package/dist/client/http.d.ts +12 -0
  49. package/dist/client/http.d.ts.map +1 -0
  50. package/dist/client/http.js +135 -0
  51. package/dist/client/index.d.ts +7 -0
  52. package/dist/client/index.d.ts.map +1 -0
  53. package/dist/client/index.js +6 -0
  54. package/dist/client/pagination.d.ts +4 -0
  55. package/dist/client/pagination.d.ts.map +1 -0
  56. package/dist/client/pagination.js +32 -0
  57. package/dist/client/public-client.d.ts +23 -0
  58. package/dist/client/public-client.d.ts.map +1 -0
  59. package/dist/client/public-client.js +94 -0
  60. package/dist/client/types.d.ts +115 -0
  61. package/dist/client/types.d.ts.map +1 -0
  62. package/dist/client/types.js +1 -0
  63. package/dist/components/BlogUploader/BackButton.d.ts +5 -0
  64. package/dist/components/BlogUploader/BackButton.d.ts.map +1 -0
  65. package/dist/components/BlogUploader/BackButton.js +27 -0
  66. package/dist/components/BlogUploader/CommentSection.d.ts +12 -0
  67. package/dist/components/BlogUploader/CommentSection.d.ts.map +1 -0
  68. package/dist/components/BlogUploader/CommentSection.js +65 -0
  69. package/dist/components/BlogUploader/PostCard.d.ts +17 -0
  70. package/dist/components/BlogUploader/PostCard.d.ts.map +1 -0
  71. package/dist/components/BlogUploader/PostCard.js +42 -0
  72. package/dist/components/BlogUploader/PostFormatHero.d.ts +7 -0
  73. package/dist/components/BlogUploader/PostFormatHero.d.ts.map +1 -0
  74. package/dist/components/BlogUploader/PostFormatHero.js +47 -0
  75. package/dist/components/BlogUploader/ReadingProgress.d.ts +9 -0
  76. package/dist/components/BlogUploader/ReadingProgress.d.ts.map +1 -0
  77. package/dist/components/BlogUploader/ReadingProgress.js +28 -0
  78. package/dist/components/BlogUploader/RichText.d.ts +5 -0
  79. package/dist/components/BlogUploader/RichText.d.ts.map +1 -0
  80. package/dist/components/BlogUploader/RichText.js +59 -0
  81. package/dist/components/BlogUploader/ShareRow.d.ts +12 -0
  82. package/dist/components/BlogUploader/ShareRow.d.ts.map +1 -0
  83. package/dist/components/BlogUploader/ShareRow.js +13 -0
  84. package/dist/components/BlogUploader/ViewBeacon.d.ts +12 -0
  85. package/dist/components/BlogUploader/ViewBeacon.d.ts.map +1 -0
  86. package/dist/components/BlogUploader/ViewBeacon.js +37 -0
  87. package/dist/components/BlogUploader/dashboard/BrandSettings.d.ts +28 -0
  88. package/dist/components/BlogUploader/dashboard/BrandSettings.d.ts.map +1 -0
  89. package/dist/components/BlogUploader/dashboard/BrandSettings.js +60 -0
  90. package/dist/components/BlogUploader/dashboard/BrandSwitcher.d.ts +14 -0
  91. package/dist/components/BlogUploader/dashboard/BrandSwitcher.d.ts.map +1 -0
  92. package/dist/components/BlogUploader/dashboard/BrandSwitcher.js +25 -0
  93. package/dist/components/BlogUploader/dashboard/Chips.d.ts +15 -0
  94. package/dist/components/BlogUploader/dashboard/Chips.d.ts.map +1 -0
  95. package/dist/components/BlogUploader/dashboard/Chips.js +15 -0
  96. package/dist/components/BlogUploader/dashboard/CommentsManager.d.ts +19 -0
  97. package/dist/components/BlogUploader/dashboard/CommentsManager.d.ts.map +1 -0
  98. package/dist/components/BlogUploader/dashboard/CommentsManager.js +32 -0
  99. package/dist/components/BlogUploader/dashboard/LogOutButton.d.ts +4 -0
  100. package/dist/components/BlogUploader/dashboard/LogOutButton.d.ts.map +1 -0
  101. package/dist/components/BlogUploader/dashboard/LogOutButton.js +22 -0
  102. package/dist/components/BlogUploader/dashboard/MediaLibrary.d.ts +16 -0
  103. package/dist/components/BlogUploader/dashboard/MediaLibrary.d.ts.map +1 -0
  104. package/dist/components/BlogUploader/dashboard/MediaLibrary.js +124 -0
  105. package/dist/components/BlogUploader/dashboard/MediaPicker.d.ts +19 -0
  106. package/dist/components/BlogUploader/dashboard/MediaPicker.d.ts.map +1 -0
  107. package/dist/components/BlogUploader/dashboard/MediaPicker.js +99 -0
  108. package/dist/components/BlogUploader/dashboard/PostsTable.d.ts +46 -0
  109. package/dist/components/BlogUploader/dashboard/PostsTable.d.ts.map +1 -0
  110. package/dist/components/BlogUploader/dashboard/PostsTable.js +109 -0
  111. package/dist/components/BlogUploader/dashboard/Shell.d.ts +25 -0
  112. package/dist/components/BlogUploader/dashboard/Shell.d.ts.map +1 -0
  113. package/dist/components/BlogUploader/dashboard/Shell.js +128 -0
  114. package/dist/components/BlogUploader/dashboard/TermManager.d.ts +29 -0
  115. package/dist/components/BlogUploader/dashboard/TermManager.d.ts.map +1 -0
  116. package/dist/components/BlogUploader/dashboard/TermManager.js +96 -0
  117. package/dist/components/BlogUploader/dashboard/ToastProvider.d.ts +6 -0
  118. package/dist/components/BlogUploader/dashboard/ToastProvider.d.ts.map +1 -0
  119. package/dist/components/BlogUploader/dashboard/ToastProvider.js +5 -0
  120. package/dist/components/BlogUploader/dashboard/UsersManager.d.ts +32 -0
  121. package/dist/components/BlogUploader/dashboard/UsersManager.d.ts.map +1 -0
  122. package/dist/components/BlogUploader/dashboard/UsersManager.js +98 -0
  123. package/dist/components/BlogUploader/dashboard/charts.d.ts +22 -0
  124. package/dist/components/BlogUploader/dashboard/charts.d.ts.map +1 -0
  125. package/dist/components/BlogUploader/dashboard/charts.js +79 -0
  126. package/dist/components/BlogUploader/dashboard/editor/FormatContentPanel.d.ts +25 -0
  127. package/dist/components/BlogUploader/dashboard/editor/FormatContentPanel.d.ts.map +1 -0
  128. package/dist/components/BlogUploader/dashboard/editor/FormatContentPanel.js +62 -0
  129. package/dist/components/BlogUploader/dashboard/editor/PostEditor.d.ts +95 -0
  130. package/dist/components/BlogUploader/dashboard/editor/PostEditor.d.ts.map +1 -0
  131. package/dist/components/BlogUploader/dashboard/editor/PostEditor.js +649 -0
  132. package/dist/components/BlogUploader/dashboard/editor/RichTextEditor.d.ts +37 -0
  133. package/dist/components/BlogUploader/dashboard/editor/RichTextEditor.d.ts.map +1 -0
  134. package/dist/components/BlogUploader/dashboard/editor/RichTextEditor.js +475 -0
  135. package/dist/components/BlogUploader/dashboard/editor/SeoAnalysisPanel.d.ts +11 -0
  136. package/dist/components/BlogUploader/dashboard/editor/SeoAnalysisPanel.d.ts.map +1 -0
  137. package/dist/components/BlogUploader/dashboard/editor/SeoAnalysisPanel.js +31 -0
  138. package/dist/components/BlogUploader/dashboard/editor/YoastCollapsible.d.ts +12 -0
  139. package/dist/components/BlogUploader/dashboard/editor/YoastCollapsible.d.ts.map +1 -0
  140. package/dist/components/BlogUploader/dashboard/editor/YoastCollapsible.js +5 -0
  141. package/dist/components/BlogUploader/dashboard/editor/YoastInsightsPanel.d.ts +4 -0
  142. package/dist/components/BlogUploader/dashboard/editor/YoastInsightsPanel.d.ts.map +1 -0
  143. package/dist/components/BlogUploader/dashboard/editor/YoastInsightsPanel.js +31 -0
  144. package/dist/components/BlogUploader/dashboard/editor/YoastInternalLinksPanel.d.ts +4 -0
  145. package/dist/components/BlogUploader/dashboard/editor/YoastInternalLinksPanel.d.ts.map +1 -0
  146. package/dist/components/BlogUploader/dashboard/editor/YoastInternalLinksPanel.js +35 -0
  147. package/dist/components/BlogUploader/dashboard/editor/YoastSeoAnalysisPanel.d.ts +11 -0
  148. package/dist/components/BlogUploader/dashboard/editor/YoastSeoAnalysisPanel.d.ts.map +1 -0
  149. package/dist/components/BlogUploader/dashboard/editor/YoastSeoAnalysisPanel.js +23 -0
  150. package/dist/components/BlogUploader/dashboard/editor/YoastSeoMetabox.d.ts +50 -0
  151. package/dist/components/BlogUploader/dashboard/editor/YoastSeoMetabox.d.ts.map +1 -0
  152. package/dist/components/BlogUploader/dashboard/editor/YoastSeoMetabox.js +101 -0
  153. package/dist/components/BlogUploader/dashboard/editor/YoastSnippetField.d.ts +22 -0
  154. package/dist/components/BlogUploader/dashboard/editor/YoastSnippetField.d.ts.map +1 -0
  155. package/dist/components/BlogUploader/dashboard/editor/YoastSnippetField.js +51 -0
  156. package/dist/components/BlogUploader/dashboard/editor/load.d.ts +10 -0
  157. package/dist/components/BlogUploader/dashboard/editor/load.d.ts.map +1 -0
  158. package/dist/components/BlogUploader/dashboard/editor/load.js +141 -0
  159. package/dist/components/BlogUploader/dashboard/loadTerms.d.ts +13 -0
  160. package/dist/components/BlogUploader/dashboard/loadTerms.d.ts.map +1 -0
  161. package/dist/components/BlogUploader/dashboard/loadTerms.js +41 -0
  162. package/dist/components/BlogUploader/dashboard/seo/BrandSeoActions.d.ts +8 -0
  163. package/dist/components/BlogUploader/dashboard/seo/BrandSeoActions.d.ts.map +1 -0
  164. package/dist/components/BlogUploader/dashboard/seo/BrandSeoActions.js +35 -0
  165. package/dist/components/BlogUploader/dashboard/seo/Ga4Settings.d.ts +9 -0
  166. package/dist/components/BlogUploader/dashboard/seo/Ga4Settings.d.ts.map +1 -0
  167. package/dist/components/BlogUploader/dashboard/seo/Ga4Settings.js +40 -0
  168. package/dist/components/BlogUploader/dashboard/seo/RedirectAnalyticsDashboard.d.ts +5 -0
  169. package/dist/components/BlogUploader/dashboard/seo/RedirectAnalyticsDashboard.d.ts.map +1 -0
  170. package/dist/components/BlogUploader/dashboard/seo/RedirectAnalyticsDashboard.js +29 -0
  171. package/dist/components/BlogUploader/dashboard/seo/RedirectDetail.d.ts +10 -0
  172. package/dist/components/BlogUploader/dashboard/seo/RedirectDetail.d.ts.map +1 -0
  173. package/dist/components/BlogUploader/dashboard/seo/RedirectDetail.js +31 -0
  174. package/dist/components/BlogUploader/dashboard/seo/RedirectForm.d.ts +27 -0
  175. package/dist/components/BlogUploader/dashboard/seo/RedirectForm.d.ts.map +1 -0
  176. package/dist/components/BlogUploader/dashboard/seo/RedirectForm.js +79 -0
  177. package/dist/components/BlogUploader/dashboard/seo/RedirectList.d.ts +20 -0
  178. package/dist/components/BlogUploader/dashboard/seo/RedirectList.d.ts.map +1 -0
  179. package/dist/components/BlogUploader/dashboard/seo/RedirectList.js +33 -0
  180. package/dist/components/BlogUploader/dashboard/seo/RobotsEditor.d.ts +11 -0
  181. package/dist/components/BlogUploader/dashboard/seo/RobotsEditor.d.ts.map +1 -0
  182. package/dist/components/BlogUploader/dashboard/seo/RobotsEditor.js +54 -0
  183. package/dist/components/BlogUploader/dashboard/seo/SearchConsoleSettings.d.ts +9 -0
  184. package/dist/components/BlogUploader/dashboard/seo/SearchConsoleSettings.d.ts.map +1 -0
  185. package/dist/components/BlogUploader/dashboard/seo/SearchConsoleSettings.js +38 -0
  186. package/dist/components/BlogUploader/dashboard/seo/SeoBrandList.d.ts +28 -0
  187. package/dist/components/BlogUploader/dashboard/seo/SeoBrandList.d.ts.map +1 -0
  188. package/dist/components/BlogUploader/dashboard/seo/SeoBrandList.js +29 -0
  189. package/dist/components/BlogUploader/dashboard/seo/SeoBrandLists.d.ts +17 -0
  190. package/dist/components/BlogUploader/dashboard/seo/SeoBrandLists.d.ts.map +1 -0
  191. package/dist/components/BlogUploader/dashboard/seo/SeoBrandLists.js +8 -0
  192. package/dist/components/BlogUploader/dashboard/seo/shared.d.ts +18 -0
  193. package/dist/components/BlogUploader/dashboard/seo/shared.d.ts.map +1 -0
  194. package/dist/components/BlogUploader/dashboard/seo/shared.js +6 -0
  195. package/dist/components/BlogUploader/dashboard/tools/ExportTool.d.ts +8 -0
  196. package/dist/components/BlogUploader/dashboard/tools/ExportTool.d.ts.map +1 -0
  197. package/dist/components/BlogUploader/dashboard/tools/ExportTool.js +78 -0
  198. package/dist/components/BlogUploader/dashboard/tools/ImportTool.d.ts +7 -0
  199. package/dist/components/BlogUploader/dashboard/tools/ImportTool.d.ts.map +1 -0
  200. package/dist/components/BlogUploader/dashboard/tools/ImportTool.js +70 -0
  201. package/dist/components/BlogUploader/dashboard/upload.d.ts +47 -0
  202. package/dist/components/BlogUploader/dashboard/upload.d.ts.map +1 -0
  203. package/dist/components/BlogUploader/dashboard/upload.js +68 -0
  204. package/dist/components/BlogUploader/site/ArticleDetailHero.d.ts +27 -0
  205. package/dist/components/BlogUploader/site/ArticleDetailHero.d.ts.map +1 -0
  206. package/dist/components/BlogUploader/site/ArticleDetailHero.js +13 -0
  207. package/dist/components/BlogUploader/site/ArticleRailDetails.d.ts +27 -0
  208. package/dist/components/BlogUploader/site/ArticleRailDetails.d.ts.map +1 -0
  209. package/dist/components/BlogUploader/site/ArticleRailDetails.js +17 -0
  210. package/dist/components/BlogUploader/site/BlogIndexView.d.ts +28 -0
  211. package/dist/components/BlogUploader/site/BlogIndexView.d.ts.map +1 -0
  212. package/dist/components/BlogUploader/site/BlogIndexView.js +34 -0
  213. package/dist/components/BlogUploader/site/BrandTableOfContents.d.ts +18 -0
  214. package/dist/components/BlogUploader/site/BrandTableOfContents.d.ts.map +1 -0
  215. package/dist/components/BlogUploader/site/BrandTableOfContents.js +15 -0
  216. package/dist/components/BlogUploader/site/HeroFadeSlide.d.ts +11 -0
  217. package/dist/components/BlogUploader/site/HeroFadeSlide.d.ts.map +1 -0
  218. package/dist/components/BlogUploader/site/HeroFadeSlide.js +3 -0
  219. package/dist/components/BlogUploader/site/HeroMediaVisual.d.ts +23 -0
  220. package/dist/components/BlogUploader/site/HeroMediaVisual.d.ts.map +1 -0
  221. package/dist/components/BlogUploader/site/HeroMediaVisual.js +50 -0
  222. package/dist/components/BlogUploader/site/IndexFeedSection.d.ts +14 -0
  223. package/dist/components/BlogUploader/site/IndexFeedSection.d.ts.map +1 -0
  224. package/dist/components/BlogUploader/site/IndexFeedSection.js +12 -0
  225. package/dist/components/BlogUploader/site/InfinitePostFeed.d.ts +23 -0
  226. package/dist/components/BlogUploader/site/InfinitePostFeed.d.ts.map +1 -0
  227. package/dist/components/BlogUploader/site/InfinitePostFeed.js +152 -0
  228. package/dist/components/BlogUploader/site/SiteMediaHero.d.ts +12 -0
  229. package/dist/components/BlogUploader/site/SiteMediaHero.d.ts.map +1 -0
  230. package/dist/components/BlogUploader/site/SiteMediaHero.js +80 -0
  231. package/dist/components/BlogUploader/site/SiteMotion.d.ts +12 -0
  232. package/dist/components/BlogUploader/site/SiteMotion.d.ts.map +1 -0
  233. package/dist/components/BlogUploader/site/SiteMotion.js +27 -0
  234. package/dist/components/BlogUploader/site/SiteNavAuth.d.ts +8 -0
  235. package/dist/components/BlogUploader/site/SiteNavAuth.d.ts.map +1 -0
  236. package/dist/components/BlogUploader/site/SiteNavAuth.js +36 -0
  237. package/dist/components/admin/AdminPostDetail.d.ts +7 -0
  238. package/dist/components/admin/AdminPostDetail.d.ts.map +1 -0
  239. package/dist/components/admin/AdminPostDetail.js +105 -0
  240. package/dist/components/admin/BrandSettings.d.ts +11 -0
  241. package/dist/components/admin/BrandSettings.d.ts.map +1 -0
  242. package/dist/components/admin/BrandSettings.js +71 -0
  243. package/dist/components/admin/BrandSwitcher.d.ts +3 -0
  244. package/dist/components/admin/BrandSwitcher.d.ts.map +1 -0
  245. package/dist/components/admin/BrandSwitcher.js +12 -0
  246. package/dist/components/admin/CategoryManager.d.ts +2 -0
  247. package/dist/components/admin/CategoryManager.d.ts.map +1 -0
  248. package/dist/components/admin/CategoryManager.js +1 -0
  249. package/dist/components/admin/Chips.d.ts +15 -0
  250. package/dist/components/admin/Chips.d.ts.map +1 -0
  251. package/dist/components/admin/Chips.js +15 -0
  252. package/dist/components/admin/CommentsManager.d.ts +6 -0
  253. package/dist/components/admin/CommentsManager.d.ts.map +1 -0
  254. package/dist/components/admin/CommentsManager.js +30 -0
  255. package/dist/components/admin/Dashboard.d.ts +3 -0
  256. package/dist/components/admin/Dashboard.d.ts.map +1 -0
  257. package/dist/components/admin/Dashboard.js +34 -0
  258. package/dist/components/admin/MediaLibrary.d.ts +4 -0
  259. package/dist/components/admin/MediaLibrary.d.ts.map +1 -0
  260. package/dist/components/admin/MediaLibrary.js +119 -0
  261. package/dist/components/admin/MediaManager.d.ts +2 -0
  262. package/dist/components/admin/MediaManager.d.ts.map +1 -0
  263. package/dist/components/admin/MediaManager.js +1 -0
  264. package/dist/components/admin/MediaPicker.d.ts +10 -0
  265. package/dist/components/admin/MediaPicker.d.ts.map +1 -0
  266. package/dist/components/admin/MediaPicker.js +86 -0
  267. package/dist/components/admin/PostEditor.d.ts +2 -0
  268. package/dist/components/admin/PostEditor.d.ts.map +1 -0
  269. package/dist/components/admin/PostEditor.js +1 -0
  270. package/dist/components/admin/PostList.d.ts +13 -0
  271. package/dist/components/admin/PostList.d.ts.map +1 -0
  272. package/dist/components/admin/PostList.js +93 -0
  273. package/dist/components/admin/PostsTable.d.ts +15 -0
  274. package/dist/components/admin/PostsTable.d.ts.map +1 -0
  275. package/dist/components/admin/PostsTable.js +106 -0
  276. package/dist/components/admin/Shell.d.ts +18 -0
  277. package/dist/components/admin/Shell.d.ts.map +1 -0
  278. package/dist/components/admin/Shell.js +99 -0
  279. package/dist/components/admin/TagManager.d.ts +2 -0
  280. package/dist/components/admin/TagManager.d.ts.map +1 -0
  281. package/dist/components/admin/TagManager.js +1 -0
  282. package/dist/components/admin/TermManager.d.ts +9 -0
  283. package/dist/components/admin/TermManager.d.ts.map +1 -0
  284. package/dist/components/admin/TermManager.js +105 -0
  285. package/dist/components/admin/UsersManager.d.ts +5 -0
  286. package/dist/components/admin/UsersManager.d.ts.map +1 -0
  287. package/dist/components/admin/UsersManager.js +96 -0
  288. package/dist/components/admin/api/mappers.d.ts +37 -0
  289. package/dist/components/admin/api/mappers.d.ts.map +1 -0
  290. package/dist/components/admin/api/mappers.js +174 -0
  291. package/dist/components/admin/charts.d.ts +30 -0
  292. package/dist/components/admin/charts.d.ts.map +1 -0
  293. package/dist/components/admin/charts.js +79 -0
  294. package/dist/components/admin/editor/FormatContentPanel.d.ts +25 -0
  295. package/dist/components/admin/editor/FormatContentPanel.d.ts.map +1 -0
  296. package/dist/components/admin/editor/FormatContentPanel.js +62 -0
  297. package/dist/components/admin/editor/PostEditor.d.ts +5 -0
  298. package/dist/components/admin/editor/PostEditor.d.ts.map +1 -0
  299. package/dist/components/admin/editor/PostEditor.js +404 -0
  300. package/dist/components/admin/editor/RichTextEditor.d.ts +42 -0
  301. package/dist/components/admin/editor/RichTextEditor.d.ts.map +1 -0
  302. package/dist/components/admin/editor/RichTextEditor.js +475 -0
  303. package/dist/components/admin/editor/SeoAnalysisPanel.d.ts +11 -0
  304. package/dist/components/admin/editor/SeoAnalysisPanel.d.ts.map +1 -0
  305. package/dist/components/admin/editor/SeoAnalysisPanel.js +31 -0
  306. package/dist/components/admin/editor/YoastCollapsible.d.ts +12 -0
  307. package/dist/components/admin/editor/YoastCollapsible.d.ts.map +1 -0
  308. package/dist/components/admin/editor/YoastCollapsible.js +5 -0
  309. package/dist/components/admin/editor/YoastInsightsPanel.d.ts +4 -0
  310. package/dist/components/admin/editor/YoastInsightsPanel.d.ts.map +1 -0
  311. package/dist/components/admin/editor/YoastInsightsPanel.js +31 -0
  312. package/dist/components/admin/editor/YoastInternalLinksPanel.d.ts +4 -0
  313. package/dist/components/admin/editor/YoastInternalLinksPanel.d.ts.map +1 -0
  314. package/dist/components/admin/editor/YoastInternalLinksPanel.js +35 -0
  315. package/dist/components/admin/editor/YoastSeoAnalysisPanel.d.ts +11 -0
  316. package/dist/components/admin/editor/YoastSeoAnalysisPanel.d.ts.map +1 -0
  317. package/dist/components/admin/editor/YoastSeoAnalysisPanel.js +23 -0
  318. package/dist/components/admin/editor/YoastSeoMetabox.d.ts +54 -0
  319. package/dist/components/admin/editor/YoastSeoMetabox.d.ts.map +1 -0
  320. package/dist/components/admin/editor/YoastSeoMetabox.js +101 -0
  321. package/dist/components/admin/editor/YoastSnippetField.d.ts +22 -0
  322. package/dist/components/admin/editor/YoastSnippetField.d.ts.map +1 -0
  323. package/dist/components/admin/editor/YoastSnippetField.js +51 -0
  324. package/dist/components/admin/editor/load.d.ts +10 -0
  325. package/dist/components/admin/editor/load.d.ts.map +1 -0
  326. package/dist/components/admin/editor/load.js +141 -0
  327. package/dist/components/admin/index.d.ts +28 -0
  328. package/dist/components/admin/index.d.ts.map +1 -0
  329. package/dist/components/admin/index.js +27 -0
  330. package/dist/components/admin/internal/States.d.ts +16 -0
  331. package/dist/components/admin/internal/States.d.ts.map +1 -0
  332. package/dist/components/admin/internal/States.js +15 -0
  333. package/dist/components/admin/lib/format.d.ts +7 -0
  334. package/dist/components/admin/lib/format.d.ts.map +1 -0
  335. package/dist/components/admin/lib/format.js +43 -0
  336. package/dist/components/admin/lib/publishing.d.ts +8 -0
  337. package/dist/components/admin/lib/publishing.d.ts.map +1 -0
  338. package/dist/components/admin/lib/publishing.js +10 -0
  339. package/dist/components/admin/lib/robots.d.ts +13 -0
  340. package/dist/components/admin/lib/robots.d.ts.map +1 -0
  341. package/dist/components/admin/lib/robots.js +22 -0
  342. package/dist/components/admin/mock/fixtures.d.ts +240 -0
  343. package/dist/components/admin/mock/fixtures.d.ts.map +1 -0
  344. package/dist/components/admin/mock/fixtures.js +546 -0
  345. package/dist/components/admin/mock/store.d.ts +139 -0
  346. package/dist/components/admin/mock/store.d.ts.map +1 -0
  347. package/dist/components/admin/mock/store.js +1067 -0
  348. package/dist/components/admin/seo/Ga4Settings.d.ts +34 -0
  349. package/dist/components/admin/seo/Ga4Settings.d.ts.map +1 -0
  350. package/dist/components/admin/seo/Ga4Settings.js +80 -0
  351. package/dist/components/admin/seo/RedirectAnalyticsDashboard.d.ts +5 -0
  352. package/dist/components/admin/seo/RedirectAnalyticsDashboard.d.ts.map +1 -0
  353. package/dist/components/admin/seo/RedirectAnalyticsDashboard.js +24 -0
  354. package/dist/components/admin/seo/RedirectDetail.d.ts +11 -0
  355. package/dist/components/admin/seo/RedirectDetail.d.ts.map +1 -0
  356. package/dist/components/admin/seo/RedirectDetail.js +30 -0
  357. package/dist/components/admin/seo/RedirectForm.d.ts +29 -0
  358. package/dist/components/admin/seo/RedirectForm.d.ts.map +1 -0
  359. package/dist/components/admin/seo/RedirectForm.js +89 -0
  360. package/dist/components/admin/seo/RedirectList.d.ts +10 -0
  361. package/dist/components/admin/seo/RedirectList.d.ts.map +1 -0
  362. package/dist/components/admin/seo/RedirectList.js +28 -0
  363. package/dist/components/admin/seo/RobotsEditor.d.ts +5 -0
  364. package/dist/components/admin/seo/RobotsEditor.d.ts.map +1 -0
  365. package/dist/components/admin/seo/RobotsEditor.js +50 -0
  366. package/dist/components/admin/seo/SearchConsoleSettings.d.ts +3 -0
  367. package/dist/components/admin/seo/SearchConsoleSettings.d.ts.map +1 -0
  368. package/dist/components/admin/seo/SearchConsoleSettings.js +1 -0
  369. package/dist/components/admin/seo/SeoBrandList.d.ts +3 -0
  370. package/dist/components/admin/seo/SeoBrandList.d.ts.map +1 -0
  371. package/dist/components/admin/seo/SeoBrandList.js +1 -0
  372. package/dist/components/admin/seo/shared.d.ts +17 -0
  373. package/dist/components/admin/seo/shared.d.ts.map +1 -0
  374. package/dist/components/admin/seo/shared.js +7 -0
  375. package/dist/components/admin/tools/ExportTool.d.ts +3 -0
  376. package/dist/components/admin/tools/ExportTool.d.ts.map +1 -0
  377. package/dist/components/admin/tools/ExportTool.js +1 -0
  378. package/dist/components/admin/tools/ImportTool.d.ts +3 -0
  379. package/dist/components/admin/tools/ImportTool.d.ts.map +1 -0
  380. package/dist/components/admin/tools/ImportTool.js +1 -0
  381. package/dist/components/admin/tools/ToolsHub.d.ts +10 -0
  382. package/dist/components/admin/tools/ToolsHub.d.ts.map +1 -0
  383. package/dist/components/admin/tools/ToolsHub.js +106 -0
  384. package/dist/components/admin/tools/index.d.ts +3 -0
  385. package/dist/components/admin/tools/index.d.ts.map +1 -0
  386. package/dist/components/admin/tools/index.js +1 -0
  387. package/dist/components/index.d.ts +3 -0
  388. package/dist/components/index.d.ts.map +1 -0
  389. package/dist/components/index.js +2 -0
  390. package/dist/components/user/BlogCard.d.ts +20 -0
  391. package/dist/components/user/BlogCard.d.ts.map +1 -0
  392. package/dist/components/user/BlogCard.js +22 -0
  393. package/dist/components/user/BlogCategories.d.ts +6 -0
  394. package/dist/components/user/BlogCategories.d.ts.map +1 -0
  395. package/dist/components/user/BlogCategories.js +11 -0
  396. package/dist/components/user/BlogDetail.d.ts +25 -0
  397. package/dist/components/user/BlogDetail.d.ts.map +1 -0
  398. package/dist/components/user/BlogDetail.js +90 -0
  399. package/dist/components/user/BlogList.d.ts +20 -0
  400. package/dist/components/user/BlogList.d.ts.map +1 -0
  401. package/dist/components/user/BlogList.js +56 -0
  402. package/dist/components/user/BlogSearch.d.ts +8 -0
  403. package/dist/components/user/BlogSearch.d.ts.map +1 -0
  404. package/dist/components/user/BlogSearch.js +19 -0
  405. package/dist/components/user/BlogTags.d.ts +6 -0
  406. package/dist/components/user/BlogTags.d.ts.map +1 -0
  407. package/dist/components/user/BlogTags.js +11 -0
  408. package/dist/components/user/FeaturedBlogs.d.ts +8 -0
  409. package/dist/components/user/FeaturedBlogs.d.ts.map +1 -0
  410. package/dist/components/user/FeaturedBlogs.js +12 -0
  411. package/dist/components/user/RelatedBlogs.d.ts +9 -0
  412. package/dist/components/user/RelatedBlogs.d.ts.map +1 -0
  413. package/dist/components/user/RelatedBlogs.js +12 -0
  414. package/dist/components/user/SiteMediaHero.d.ts +14 -0
  415. package/dist/components/user/SiteMediaHero.d.ts.map +1 -0
  416. package/dist/components/user/SiteMediaHero.js +43 -0
  417. package/dist/components/user/detail/ArticleDetailHero.d.ts +30 -0
  418. package/dist/components/user/detail/ArticleDetailHero.d.ts.map +1 -0
  419. package/dist/components/user/detail/ArticleDetailHero.js +29 -0
  420. package/dist/components/user/detail/ArticleRailDetails.d.ts +24 -0
  421. package/dist/components/user/detail/ArticleRailDetails.d.ts.map +1 -0
  422. package/dist/components/user/detail/ArticleRailDetails.js +12 -0
  423. package/dist/components/user/detail/BackButton.d.ts +7 -0
  424. package/dist/components/user/detail/BackButton.d.ts.map +1 -0
  425. package/dist/components/user/detail/BackButton.js +18 -0
  426. package/dist/components/user/detail/CommentSection.d.ts +28 -0
  427. package/dist/components/user/detail/CommentSection.d.ts.map +1 -0
  428. package/dist/components/user/detail/CommentSection.js +68 -0
  429. package/dist/components/user/detail/HeroFadeSlide.d.ts +12 -0
  430. package/dist/components/user/detail/HeroFadeSlide.d.ts.map +1 -0
  431. package/dist/components/user/detail/HeroFadeSlide.js +5 -0
  432. package/dist/components/user/detail/ReadingProgress.d.ts +2 -0
  433. package/dist/components/user/detail/ReadingProgress.d.ts.map +1 -0
  434. package/dist/components/user/detail/ReadingProgress.js +20 -0
  435. package/dist/components/user/detail/ShareRow.d.ts +7 -0
  436. package/dist/components/user/detail/ShareRow.d.ts.map +1 -0
  437. package/dist/components/user/detail/ShareRow.js +7 -0
  438. package/dist/components/user/detail/toc.d.ts +14 -0
  439. package/dist/components/user/detail/toc.d.ts.map +1 -0
  440. package/dist/components/user/detail/toc.js +106 -0
  441. package/dist/components/user/index.d.ts +14 -0
  442. package/dist/components/user/index.d.ts.map +1 -0
  443. package/dist/components/user/index.js +13 -0
  444. package/dist/components/user/internal/States.d.ts +18 -0
  445. package/dist/components/user/internal/States.d.ts.map +1 -0
  446. package/dist/components/user/internal/States.js +21 -0
  447. package/dist/constants/index.d.ts +4 -0
  448. package/dist/constants/index.d.ts.map +1 -0
  449. package/dist/constants/index.js +3 -0
  450. package/dist/hooks/index.d.ts +2 -0
  451. package/dist/hooks/index.d.ts.map +1 -0
  452. package/dist/hooks/index.js +1 -0
  453. package/dist/hooks/useAsync.d.ts +23 -0
  454. package/dist/hooks/useAsync.d.ts.map +1 -0
  455. package/dist/hooks/useAsync.js +40 -0
  456. package/dist/index.d.ts +12 -0
  457. package/dist/index.d.ts.map +1 -0
  458. package/dist/index.js +9 -0
  459. package/dist/lib/access.d.ts +64 -0
  460. package/dist/lib/access.d.ts.map +1 -0
  461. package/dist/lib/access.js +127 -0
  462. package/dist/lib/canonical.d.ts +15 -0
  463. package/dist/lib/canonical.d.ts.map +1 -0
  464. package/dist/lib/canonical.js +34 -0
  465. package/dist/lib/comments.d.ts +9 -0
  466. package/dist/lib/comments.d.ts.map +1 -0
  467. package/dist/lib/comments.js +23 -0
  468. package/dist/lib/dashboard.d.ts +39 -0
  469. package/dist/lib/dashboard.d.ts.map +1 -0
  470. package/dist/lib/dashboard.js +157 -0
  471. package/dist/lib/data-transfer.d.ts +23 -0
  472. package/dist/lib/data-transfer.d.ts.map +1 -0
  473. package/dist/lib/data-transfer.js +436 -0
  474. package/dist/lib/default-author.d.ts +12 -0
  475. package/dist/lib/default-author.d.ts.map +1 -0
  476. package/dist/lib/default-author.js +57 -0
  477. package/dist/lib/format-media.d.ts +6 -0
  478. package/dist/lib/format-media.d.ts.map +1 -0
  479. package/dist/lib/format-media.js +18 -0
  480. package/dist/lib/format.d.ts +7 -0
  481. package/dist/lib/format.d.ts.map +1 -0
  482. package/dist/lib/format.js +43 -0
  483. package/dist/lib/hero-post.d.ts +24 -0
  484. package/dist/lib/hero-post.d.ts.map +1 -0
  485. package/dist/lib/hero-post.js +95 -0
  486. package/dist/lib/lexical-build.d.ts +30 -0
  487. package/dist/lib/lexical-build.d.ts.map +1 -0
  488. package/dist/lib/lexical-build.js +57 -0
  489. package/dist/lib/lexical-doc.d.ts +88 -0
  490. package/dist/lib/lexical-doc.d.ts.map +1 -0
  491. package/dist/lib/lexical-doc.js +385 -0
  492. package/dist/lib/lexical-dom.d.ts +19 -0
  493. package/dist/lib/lexical-dom.d.ts.map +1 -0
  494. package/dist/lib/lexical-dom.js +181 -0
  495. package/dist/lib/lexical.d.ts +31 -0
  496. package/dist/lib/lexical.d.ts.map +1 -0
  497. package/dist/lib/lexical.js +59 -0
  498. package/dist/lib/post-categories.d.ts +11 -0
  499. package/dist/lib/post-categories.d.ts.map +1 -0
  500. package/dist/lib/post-categories.js +27 -0
  501. package/dist/lib/post-format.d.ts +39 -0
  502. package/dist/lib/post-format.d.ts.map +1 -0
  503. package/dist/lib/post-format.js +82 -0
  504. package/dist/lib/publishing.d.ts +3 -0
  505. package/dist/lib/publishing.d.ts.map +1 -0
  506. package/dist/lib/publishing.js +1 -0
  507. package/dist/lib/queries.d.ts +49 -0
  508. package/dist/lib/queries.d.ts.map +1 -0
  509. package/dist/lib/queries.js +340 -0
  510. package/dist/lib/redirect-analytics.d.ts +27 -0
  511. package/dist/lib/redirect-analytics.d.ts.map +1 -0
  512. package/dist/lib/redirect-analytics.js +147 -0
  513. package/dist/lib/redirects.d.ts +39 -0
  514. package/dist/lib/redirects.d.ts.map +1 -0
  515. package/dist/lib/redirects.js +96 -0
  516. package/dist/lib/revalidate.d.ts +30 -0
  517. package/dist/lib/revalidate.d.ts.map +1 -0
  518. package/dist/lib/revalidate.js +91 -0
  519. package/dist/lib/robots.d.ts +19 -0
  520. package/dist/lib/robots.d.ts.map +1 -0
  521. package/dist/lib/robots.js +38 -0
  522. package/dist/lib/seo-analysis.d.ts +28 -0
  523. package/dist/lib/seo-analysis.d.ts.map +1 -0
  524. package/dist/lib/seo-analysis.js +153 -0
  525. package/dist/lib/seo-limits.d.ts +19 -0
  526. package/dist/lib/seo-limits.d.ts.map +1 -0
  527. package/dist/lib/seo-limits.js +39 -0
  528. package/dist/lib/seo.d.ts +50 -0
  529. package/dist/lib/seo.d.ts.map +1 -0
  530. package/dist/lib/seo.js +238 -0
  531. package/dist/lib/slug.d.ts +3 -0
  532. package/dist/lib/slug.d.ts.map +1 -0
  533. package/dist/lib/slug.js +9 -0
  534. package/dist/lib/stats.d.ts +71 -0
  535. package/dist/lib/stats.d.ts.map +1 -0
  536. package/dist/lib/stats.js +207 -0
  537. package/dist/lib/tenant-host.d.ts +9 -0
  538. package/dist/lib/tenant-host.d.ts.map +1 -0
  539. package/dist/lib/tenant-host.js +15 -0
  540. package/dist/lib/tenant.d.ts +41 -0
  541. package/dist/lib/tenant.d.ts.map +1 -0
  542. package/dist/lib/tenant.js +140 -0
  543. package/dist/lib/toc.d.ts +16 -0
  544. package/dist/lib/toc.d.ts.map +1 -0
  545. package/dist/lib/toc.js +28 -0
  546. package/dist/lib/yoast-snippet.d.ts +25 -0
  547. package/dist/lib/yoast-snippet.d.ts.map +1 -0
  548. package/dist/lib/yoast-snippet.js +79 -0
  549. package/dist/pages/admin/BlogAdmin.d.ts +9 -0
  550. package/dist/pages/admin/BlogAdmin.d.ts.map +1 -0
  551. package/dist/pages/admin/BlogAdmin.js +234 -0
  552. package/dist/pages/admin/index.d.ts +2 -0
  553. package/dist/pages/admin/index.d.ts.map +1 -0
  554. package/dist/pages/admin/index.js +1 -0
  555. package/dist/pages/index.d.ts +3 -0
  556. package/dist/pages/index.d.ts.map +1 -0
  557. package/dist/pages/index.js +2 -0
  558. package/dist/pages/user/UserBlogPage.d.ts +10 -0
  559. package/dist/pages/user/UserBlogPage.d.ts.map +1 -0
  560. package/dist/pages/user/UserBlogPage.js +15 -0
  561. package/dist/pages/user/index.d.ts +2 -0
  562. package/dist/pages/user/index.d.ts.map +1 -0
  563. package/dist/pages/user/index.js +1 -0
  564. package/dist/services/admin-client.d.ts +33 -0
  565. package/dist/services/admin-client.d.ts.map +1 -0
  566. package/dist/services/admin-client.js +154 -0
  567. package/dist/services/admin-sdk-client.d.ts +285 -0
  568. package/dist/services/admin-sdk-client.d.ts.map +1 -0
  569. package/dist/services/admin-sdk-client.js +242 -0
  570. package/dist/services/errors.d.ts +14 -0
  571. package/dist/services/errors.d.ts.map +1 -0
  572. package/dist/services/errors.js +26 -0
  573. package/dist/services/http.d.ts +24 -0
  574. package/dist/services/http.d.ts.map +1 -0
  575. package/dist/services/http.js +159 -0
  576. package/dist/services/index.d.ts +8 -0
  577. package/dist/services/index.d.ts.map +1 -0
  578. package/dist/services/index.js +7 -0
  579. package/dist/services/pagination.d.ts +4 -0
  580. package/dist/services/pagination.d.ts.map +1 -0
  581. package/dist/services/pagination.js +32 -0
  582. package/dist/services/public-client.d.ts +23 -0
  583. package/dist/services/public-client.d.ts.map +1 -0
  584. package/dist/services/public-client.js +94 -0
  585. package/dist/services/types.d.ts +124 -0
  586. package/dist/services/types.d.ts.map +1 -0
  587. package/dist/services/types.js +1 -0
  588. package/dist/style.css +3105 -0
  589. package/dist/styles/adminTheme.d.ts +6 -0
  590. package/dist/styles/adminTheme.d.ts.map +1 -0
  591. package/dist/styles/adminTheme.js +52 -0
  592. package/dist/styles/index.d.ts +3 -0
  593. package/dist/styles/index.d.ts.map +1 -0
  594. package/dist/styles/index.js +2 -0
  595. package/dist/styles/userTheme.d.ts +8 -0
  596. package/dist/styles/userTheme.d.ts.map +1 -0
  597. package/dist/styles/userTheme.js +60 -0
  598. package/dist/types/admin.d.ts +28 -0
  599. package/dist/types/admin.d.ts.map +1 -0
  600. package/dist/types/admin.js +1 -0
  601. package/dist/types/index.d.ts +4 -0
  602. package/dist/types/index.d.ts.map +1 -0
  603. package/dist/types/index.js +1 -0
  604. package/dist/types/user.d.ts +41 -0
  605. package/dist/types/user.d.ts.map +1 -0
  606. package/dist/types/user.js +1 -0
  607. package/dist/user/components/BlogCard.d.ts +15 -0
  608. package/dist/user/components/BlogCard.d.ts.map +1 -0
  609. package/dist/user/components/BlogCard.js +31 -0
  610. package/dist/user/components/BlogCategories.d.ts +6 -0
  611. package/dist/user/components/BlogCategories.d.ts.map +1 -0
  612. package/dist/user/components/BlogCategories.js +11 -0
  613. package/dist/user/components/BlogDetail.d.ts +7 -0
  614. package/dist/user/components/BlogDetail.d.ts.map +1 -0
  615. package/dist/user/components/BlogDetail.js +19 -0
  616. package/dist/user/components/BlogList.d.ts +8 -0
  617. package/dist/user/components/BlogList.d.ts.map +1 -0
  618. package/dist/user/components/BlogList.js +18 -0
  619. package/dist/user/components/BlogSearch.d.ts +8 -0
  620. package/dist/user/components/BlogSearch.d.ts.map +1 -0
  621. package/dist/user/components/BlogSearch.js +19 -0
  622. package/dist/user/components/BlogTags.d.ts +6 -0
  623. package/dist/user/components/BlogTags.d.ts.map +1 -0
  624. package/dist/user/components/BlogTags.js +11 -0
  625. package/dist/user/components/FeaturedBlogs.d.ts +8 -0
  626. package/dist/user/components/FeaturedBlogs.d.ts.map +1 -0
  627. package/dist/user/components/FeaturedBlogs.js +12 -0
  628. package/dist/user/components/RelatedBlogs.d.ts +9 -0
  629. package/dist/user/components/RelatedBlogs.d.ts.map +1 -0
  630. package/dist/user/components/RelatedBlogs.js +12 -0
  631. package/dist/user/components/internal/States.d.ts +18 -0
  632. package/dist/user/components/internal/States.d.ts.map +1 -0
  633. package/dist/user/components/internal/States.js +16 -0
  634. package/dist/user/hooks/useAsync.d.ts +21 -0
  635. package/dist/user/hooks/useAsync.d.ts.map +1 -0
  636. package/dist/user/hooks/useAsync.js +40 -0
  637. package/dist/user/index.d.ts +11 -0
  638. package/dist/user/index.d.ts.map +1 -0
  639. package/dist/user/index.js +10 -0
  640. package/dist/user/sanitize.d.ts +2 -0
  641. package/dist/user/sanitize.d.ts.map +1 -0
  642. package/dist/user/sanitize.js +120 -0
  643. package/dist/user/theme.d.ts +8 -0
  644. package/dist/user/theme.d.ts.map +1 -0
  645. package/dist/user/theme.js +60 -0
  646. package/dist/user/types.d.ts +41 -0
  647. package/dist/user/types.d.ts.map +1 -0
  648. package/dist/user/types.js +1 -0
  649. package/dist/utils/env.d.ts +16 -0
  650. package/dist/utils/env.d.ts.map +1 -0
  651. package/dist/utils/env.js +57 -0
  652. package/dist/utils/index.d.ts +3 -0
  653. package/dist/utils/index.d.ts.map +1 -0
  654. package/dist/utils/index.js +2 -0
  655. package/dist/utils/sanitize.d.ts +2 -0
  656. package/dist/utils/sanitize.d.ts.map +1 -0
  657. package/dist/utils/sanitize.js +120 -0
  658. package/package.json +63 -0
@@ -0,0 +1,124 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef, useState, useTransition } from 'react';
4
+ import { deleteMedia, listMedia, updateMedia } from '../../app/(dashboard)/_actions/library';
5
+ import { uploadImages } from './upload';
6
+ const kb = (n) => (n ? `${Math.round(n / 1024)} KB` : '—');
7
+ export const MediaLibrary = ({ tenant, tenantName, total }) => {
8
+ const [items, setItems] = useState([]);
9
+ const [count, setCount] = useState(total);
10
+ const [query, setQuery] = useState('');
11
+ const [page, setPage] = useState(1);
12
+ const [hasMore, setHasMore] = useState(false);
13
+ const [loading, setLoading] = useState(true);
14
+ const [uploading, setUploading] = useState(null);
15
+ const [dragging, setDragging] = useState(false);
16
+ const [error, setError] = useState(null);
17
+ const [open, setOpen] = useState(null);
18
+ const [meta, setMeta] = useState({ alt: '', caption: '', credit: '' });
19
+ const [saving, startSaving] = useTransition();
20
+ const [saved, setSaved] = useState(false);
21
+ const fileRef = useRef(null);
22
+ const load = useCallback(async (nextPage, q, append) => {
23
+ setLoading(true);
24
+ const res = await listMedia(tenant, q, nextPage);
25
+ setItems((prev) => (append ? [...prev, ...res.items] : res.items));
26
+ setHasMore(res.hasMore);
27
+ setCount(res.total);
28
+ setLoading(false);
29
+ }, [tenant]);
30
+ useEffect(() => {
31
+ void load(1, '', false);
32
+ }, [load]);
33
+ useEffect(() => {
34
+ const id = setTimeout(() => {
35
+ setPage(1);
36
+ void load(1, query, false);
37
+ }, 250);
38
+ return () => clearTimeout(id);
39
+ // eslint-disable-next-line react-hooks/exhaustive-deps
40
+ }, [query]);
41
+ const upload = async (files) => {
42
+ const total = Array.from(files).length;
43
+ setError(null);
44
+ setUploading({ done: 0, total });
45
+ const res = await uploadImages(files, tenant, (done) => setUploading({ done, total }));
46
+ setUploading(null);
47
+ if (!res.ok)
48
+ setError(res.error);
49
+ setPage(1);
50
+ await load(1, query, false);
51
+ const first = res.images[0];
52
+ if (first) {
53
+ openDetail({
54
+ id: first.id,
55
+ url: first.url,
56
+ thumbUrl: first.thumbnailUrl || first.url,
57
+ alt: first.alt,
58
+ filename: '',
59
+ width: first.width,
60
+ height: first.height,
61
+ filesize: first.filesize,
62
+ createdAt: new Date().toISOString(),
63
+ });
64
+ }
65
+ };
66
+ const openDetail = (item) => {
67
+ setOpen(item);
68
+ setSaved(false);
69
+ setError(null);
70
+ setMeta({ alt: item.alt, caption: '', credit: '' });
71
+ };
72
+ const saveMeta = () => {
73
+ if (!open)
74
+ return;
75
+ setError(null);
76
+ startSaving(async () => {
77
+ const res = await updateMedia(open.id, meta);
78
+ if (!res.ok) {
79
+ setError(res.error);
80
+ return;
81
+ }
82
+ setSaved(true);
83
+ setItems((list) => list.map((m) => (m.id === open.id ? { ...m, alt: meta.alt } : m)));
84
+ setOpen((o) => (o ? { ...o, alt: meta.alt } : o));
85
+ });
86
+ };
87
+ const removeImage = () => {
88
+ if (!open)
89
+ return;
90
+ if (!window.confirm('Delete this image? It is removed from the library and from disk.'))
91
+ return;
92
+ setError(null);
93
+ startSaving(async () => {
94
+ const res = await deleteMedia(open.id);
95
+ if (!res.ok) {
96
+ setError(res.error);
97
+ return;
98
+ }
99
+ setItems((list) => list.filter((m) => m.id !== open.id));
100
+ setCount((c) => Math.max(0, c - 1));
101
+ setOpen(null);
102
+ });
103
+ };
104
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "filterbar", children: [_jsx("input", { className: "fld", type: "search", value: query, placeholder: "Search alt text or filename\u2026", "aria-label": "Search images", onChange: (e) => setQuery(e.target.value) }), _jsx("button", { className: "btn btn-primary", onClick: () => fileRef.current?.click(), disabled: !!uploading, children: uploading ? `Uploading ${uploading.done}/${uploading.total}…` : '+ Upload images' }), _jsxs("span", { className: "note", children: [count, " image", count === 1 ? '' : 's', " \u00B7 ", tenant ? tenantName : 'all brands'] })] }), _jsx("input", { ref: fileRef, type: "file", accept: "image/jpeg,image/png,image/webp,image/avif,image/gif", multiple: true, hidden: true, onChange: (e) => {
105
+ if (e.target.files?.length)
106
+ void upload(e.target.files);
107
+ e.target.value = '';
108
+ } }), error ? _jsx("p", { className: "form-error", role: "alert", children: error }) : null, _jsxs("p", { className: "explain", children: ["Every upload is ", _jsx("b", { children: "re-encoded by the server" }), " and stripped of EXIF, then stored in four sizes. That is what makes an uploaded file harmless: the bytes on disk are Sharp\u2019s output, never the bytes that arrived."] }), _jsxs("section", { className: `panel dropzone${dragging ? ' is-dragging' : ''}`, onDragOver: (e) => {
109
+ e.preventDefault();
110
+ setDragging(true);
111
+ }, onDragLeave: () => setDragging(false), onDrop: (e) => {
112
+ e.preventDefault();
113
+ setDragging(false);
114
+ if (e.dataTransfer.files?.length)
115
+ void upload(e.dataTransfer.files);
116
+ }, children: [items.length === 0 && !loading ? (_jsx("p", { className: "d-empty", children: "Nothing here yet \u2014 drop images anywhere on this panel to upload." })) : (_jsx("div", { className: "media-grid", children: items.map((item) => (_jsxs("button", { type: "button", className: "media-card", onClick: () => openDetail(item), children: [item.thumbUrl ? _jsx("img", { src: item.thumbUrl, alt: "", loading: "lazy" }) : _jsx("span", { className: "pick-blank" }), _jsxs("span", { className: "media-meta", children: [_jsx("span", { className: "media-alt", children: item.alt || item.filename || 'Image' }), _jsxs("span", { className: "media-sub", children: [item.width && item.height ? `${item.width}×${item.height}` : '—', " \u00B7 ", kb(item.filesize)] })] })] }, item.id))) })), hasMore ? (_jsx("div", { className: "modal-more", children: _jsx("button", { className: "btn", disabled: loading, onClick: () => {
117
+ const next = page + 1;
118
+ setPage(next);
119
+ void load(next, query, true);
120
+ }, children: loading ? 'Loading…' : 'Load more' }) })) : null] }), open ? (_jsx("div", { className: "modal-backdrop", onMouseDown: () => setOpen(null), children: _jsxs("div", { className: "modal", role: "dialog", "aria-modal": "true", "aria-label": "Image details", onMouseDown: (e) => e.stopPropagation(), children: [_jsxs("header", { className: "modal-head", children: [_jsx("h2", { children: "Image details" }), _jsx("button", { className: "icon-btn", onClick: () => setOpen(null), "aria-label": "Close", children: "\u2715" })] }), _jsxs("div", { className: "modal-body detail", children: [_jsx("img", { className: "detail-img", src: open.url || open.thumbUrl, alt: open.alt }), _jsxs("div", { className: "stack", children: [_jsxs("label", { className: "fld-row", children: [_jsx("span", { className: "fld-lbl", children: "Alt text \u2014 what a screen reader reads out" }), _jsx("textarea", { className: "fld", rows: 2, value: meta.alt, onChange: (e) => {
121
+ setMeta((m) => ({ ...m, alt: e.target.value }));
122
+ setSaved(false);
123
+ } })] }), _jsxs("label", { className: "fld-row", children: [_jsx("span", { className: "fld-lbl", children: "Caption" }), _jsx("input", { className: "fld", value: meta.caption, onChange: (e) => setMeta((m) => ({ ...m, caption: e.target.value })) })] }), _jsxs("label", { className: "fld-row", children: [_jsx("span", { className: "fld-lbl", children: "Credit" }), _jsx("input", { className: "fld", value: meta.credit, onChange: (e) => setMeta((m) => ({ ...m, credit: e.target.value })) })] }), _jsxs("dl", { className: "facts", children: [_jsxs("div", { children: [_jsx("dt", { children: "Dimensions" }), _jsx("dd", { children: open.width && open.height ? `${open.width}×${open.height}` : '—' })] }), _jsxs("div", { children: [_jsx("dt", { children: "Size" }), _jsx("dd", { children: kb(open.filesize) })] }), _jsxs("div", { children: [_jsx("dt", { children: "File" }), _jsx("dd", { className: "mono trunc", children: open.url })] })] })] })] }), _jsxs("footer", { className: "modal-foot", children: [_jsx("button", { className: "btn-danger-link", onClick: removeImage, disabled: saving, children: "Delete image" }), _jsxs("div", { className: "modal-foot-actions", children: [saved ? _jsx("span", { className: "form-ok inline", children: "Saved" }) : null, _jsx("button", { className: "btn", onClick: () => setOpen(null), children: "Close" }), _jsx("button", { className: "btn btn-primary", onClick: saveMeta, disabled: saving || !meta.alt.trim(), children: saving ? 'Saving…' : 'Save details' })] })] })] }) })) : null] }));
124
+ };
@@ -0,0 +1,19 @@
1
+ import { type MediaHit } from '../../app/(dashboard)/_actions/library';
2
+ /**
3
+ * One image chooser, used everywhere an image is chosen: the featured image box,
4
+ * the social share image, and the editor's insert-image button.
5
+ *
6
+ * Upload goes through /api/dashboard/upload rather than a server action, because
7
+ * that is the one request in the dashboard measured in megabytes. Everything the
8
+ * collection guarantees — mime allowlist, Sharp re-encode, four derivative sizes,
9
+ * required alt text — applies regardless of which of those callers is asking.
10
+ */
11
+ export type MediaPickerProps = {
12
+ open: boolean;
13
+ tenant: string | null;
14
+ onClose: () => void;
15
+ onSelect: (item: MediaHit) => void;
16
+ title?: string;
17
+ };
18
+ export declare const MediaPicker: ({ open, tenant, onClose, onSelect, title }: MediaPickerProps) => import("react").JSX.Element | null;
19
+ //# sourceMappingURL=MediaPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaPicker.d.ts","sourceRoot":"","sources":["../../../../app/components/BlogUploader/dashboard/MediaPicker.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,wCAAwC,CAAA;AAGjF;;;;;;;;GAQG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAID,eAAO,MAAM,WAAW,GAAI,4CAAgE,gBAAgB,uCAmM3G,CAAA"}
@@ -0,0 +1,99 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef, useState } from 'react';
4
+ import { listMedia } from '../../app/(dashboard)/_actions/library';
5
+ import { uploadImages } from './upload';
6
+ const kb = (n) => (n ? `${Math.round(n / 1024)} KB` : '—');
7
+ export const MediaPicker = ({ open, tenant, onClose, onSelect, title = 'Choose an image' }) => {
8
+ const [items, setItems] = useState([]);
9
+ const [query, setQuery] = useState('');
10
+ const [page, setPage] = useState(1);
11
+ const [total, setTotal] = useState(0);
12
+ const [hasMore, setHasMore] = useState(false);
13
+ const [loading, setLoading] = useState(false);
14
+ const [uploading, setUploading] = useState(false);
15
+ const [error, setError] = useState(null);
16
+ const [dragging, setDragging] = useState(false);
17
+ const [selected, setSelected] = useState(null);
18
+ const fileRef = useRef(null);
19
+ const load = useCallback(async (nextPage, q, append) => {
20
+ setLoading(true);
21
+ const res = await listMedia(tenant, q, nextPage);
22
+ setItems((prev) => (append ? [...prev, ...res.items] : res.items));
23
+ setHasMore(res.hasMore);
24
+ setTotal(res.total);
25
+ setLoading(false);
26
+ }, [tenant]);
27
+ useEffect(() => {
28
+ if (!open)
29
+ return;
30
+ setPage(1);
31
+ setSelected(null);
32
+ void load(1, query, false);
33
+ // eslint-disable-next-line react-hooks/exhaustive-deps
34
+ }, [open, tenant]);
35
+ useEffect(() => {
36
+ if (!open)
37
+ return;
38
+ const id = setTimeout(() => {
39
+ setPage(1);
40
+ void load(1, query, false);
41
+ }, 250);
42
+ return () => clearTimeout(id);
43
+ // eslint-disable-next-line react-hooks/exhaustive-deps
44
+ }, [query]);
45
+ useEffect(() => {
46
+ if (!open)
47
+ return;
48
+ const onKey = (e) => {
49
+ if (e.key === 'Escape')
50
+ onClose();
51
+ };
52
+ document.addEventListener('keydown', onKey);
53
+ return () => document.removeEventListener('keydown', onKey);
54
+ }, [open, onClose]);
55
+ const upload = async (files) => {
56
+ setError(null);
57
+ setUploading(true);
58
+ const res = await uploadImages(files, tenant);
59
+ setUploading(false);
60
+ if (!res.ok)
61
+ setError(res.error);
62
+ await load(1, query, false);
63
+ setPage(1);
64
+ // Uploading is almost always "I want this one", so it lands pre-selected.
65
+ const last = res.images[res.images.length - 1];
66
+ if (last) {
67
+ setSelected({
68
+ id: last.id,
69
+ url: last.url,
70
+ thumbUrl: last.thumbnailUrl || last.url,
71
+ alt: last.alt,
72
+ filename: '',
73
+ width: last.width,
74
+ height: last.height,
75
+ filesize: last.filesize,
76
+ createdAt: new Date().toISOString(),
77
+ });
78
+ }
79
+ };
80
+ if (!open)
81
+ return null;
82
+ return (_jsx("div", { className: "modal-backdrop", onMouseDown: onClose, children: _jsxs("div", { className: "modal modal-wide", role: "dialog", "aria-modal": "true", "aria-label": title, onMouseDown: (e) => e.stopPropagation(), children: [_jsxs("header", { className: "modal-head", children: [_jsx("h2", { children: title }), _jsxs("div", { className: "modal-head-actions", children: [_jsx("input", { className: "fld", type: "search", placeholder: "Search alt text or filename\u2026", value: query, onChange: (e) => setQuery(e.target.value) }), _jsx("button", { type: "button", className: "btn", onClick: () => fileRef.current?.click(), disabled: uploading, children: uploading ? 'Uploading…' : 'Upload' }), _jsx("button", { type: "button", className: "icon-btn", onClick: onClose, "aria-label": "Close", children: "\u2715" })] })] }), _jsx("input", { ref: fileRef, type: "file", accept: "image/jpeg,image/png,image/webp,image/avif,image/gif", multiple: true, hidden: true, onChange: (e) => {
83
+ if (e.target.files?.length)
84
+ void upload(e.target.files);
85
+ e.target.value = '';
86
+ } }), error ? _jsx("p", { className: "form-error", role: "alert", children: error }) : null, _jsxs("div", { className: `modal-body dropzone${dragging ? ' is-dragging' : ''}`, onDragOver: (e) => {
87
+ e.preventDefault();
88
+ setDragging(true);
89
+ }, onDragLeave: () => setDragging(false), onDrop: (e) => {
90
+ e.preventDefault();
91
+ setDragging(false);
92
+ if (e.dataTransfer.files?.length)
93
+ void upload(e.dataTransfer.files);
94
+ }, children: [items.length === 0 && !loading ? (_jsx("p", { className: "d-empty", children: "Nothing in the library yet. Drop an image here, or press Upload." })) : (_jsx("div", { className: "pick-grid", children: items.map((item) => (_jsxs("button", { type: "button", className: `pick${selected?.id === item.id ? ' is-picked' : ''}`, onClick: () => setSelected(item), onDoubleClick: () => onSelect(item), children: [item.thumbUrl ? _jsx("img", { src: item.thumbUrl, alt: "", loading: "lazy" }) : _jsx("span", { className: "pick-blank" }), _jsxs("span", { className: "pick-meta", children: [_jsx("span", { className: `pick-alt${item.alt ? '' : ' is-missing'}`, children: item.alt || 'Image' }), _jsxs("span", { className: "pick-sub", children: [item.width && item.height ? `${item.width}×${item.height}` : '—', " \u00B7 ", kb(item.filesize)] })] })] }, item.id))) })), hasMore ? (_jsx("div", { className: "modal-more", children: _jsx("button", { type: "button", className: "btn", disabled: loading, onClick: () => {
95
+ const next = page + 1;
96
+ setPage(next);
97
+ void load(next, query, true);
98
+ }, children: loading ? 'Loading…' : 'Load more' }) })) : null] }), _jsxs("footer", { className: "modal-foot", children: [_jsxs("span", { className: "note", children: [total, " image", total === 1 ? '' : 's', " \u00B7 drag files anywhere in this window to upload"] }), _jsxs("div", { className: "modal-foot-actions", children: [_jsx("button", { type: "button", className: "btn", onClick: onClose, children: "Cancel" }), _jsx("button", { type: "button", className: "btn btn-primary", disabled: !selected, onClick: () => selected && onSelect(selected), children: "Use this image" })] })] })] }) }));
99
+ };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The posts list.
3
+ *
4
+ * The shape is the one editors already have muscle memory for: a checkbox
5
+ * column, a bulk-action bar, and per-row actions that appear on hover. What it
6
+ * adds is that the row tells the truth about *why* a post is not live — the
7
+ * blockers under the title come from the same function the publish gate throws
8
+ * on, so a row never says "ready" while the server says otherwise.
9
+ *
10
+ * Every action goes through a server action with `overrideAccess: false`, so the
11
+ * buttons shown here are a convenience, not a permission: an author pressing
12
+ * Publish is refused by the collection hook, and the refusal is shown verbatim.
13
+ */
14
+ export type PostRow = {
15
+ id: string;
16
+ title: string;
17
+ slug: string;
18
+ status: 'draft' | 'published';
19
+ reviewState: string;
20
+ scheduledFor: string | null;
21
+ publishedAt: string | null;
22
+ updatedAt: string;
23
+ trashed: boolean;
24
+ categoryIds: string[];
25
+ categoryNames: string[];
26
+ tagNames: string[];
27
+ authorNames: string[];
28
+ brandName: string | null;
29
+ brandSlug: string | null;
30
+ blockers: string[];
31
+ readingMinutes: number | null;
32
+ views: number | null;
33
+ canPublish: boolean;
34
+ };
35
+ type Props = {
36
+ rows: PostRow[];
37
+ categories: {
38
+ id: string;
39
+ name: string;
40
+ }[];
41
+ state: string;
42
+ showBrand: boolean;
43
+ };
44
+ export declare const PostsTable: ({ rows, categories, state, showBrand }: Props) => import("react").JSX.Element;
45
+ export {};
46
+ //# sourceMappingURL=PostsTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostsTable.d.ts","sourceRoot":"","sources":["../../../../app/components/BlogUploader/dashboard/PostsTable.tsx"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,OAAO,GAAG,WAAW,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAuBD,eAAO,MAAM,UAAU,GAAI,wCAAwC,KAAK,gCA2YvE,CAAA"}
@@ -0,0 +1,109 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Fragment, useMemo, useState, useTransition } from 'react';
4
+ import Link from 'next/link';
5
+ import { useRouter } from 'next/navigation';
6
+ import { approve, bulkPostAction, duplicatePost, publishNow, quickEditPost, schedulePost, sendBack, submitForReview, unpublish, } from '../../app/(dashboard)/_actions/posts';
7
+ import { REVIEW_LABELS } from '../../lib/publishing';
8
+ import { formatDateTime, formatShortDate } from '../../lib/format';
9
+ import { postPath } from '../../lib/slug';
10
+ const fmtDate = formatShortDate;
11
+ const fmtDateTime = formatDateTime;
12
+ const toLocalInput = (iso) => {
13
+ if (!iso)
14
+ return '';
15
+ const d = new Date(iso);
16
+ const pad = (n) => String(n).padStart(2, '0');
17
+ return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;
18
+ };
19
+ const StateChip = ({ row }) => {
20
+ if (row.trashed)
21
+ return _jsx("span", { className: "chip chip-blocked", children: "Trashed" });
22
+ if (row.status === 'published')
23
+ return _jsx("span", { className: "chip chip-live", children: "Live" });
24
+ if (row.scheduledFor && row.status === 'draft') {
25
+ return _jsx("span", { className: "chip chip-approved", children: "Scheduled" });
26
+ }
27
+ const rs = row.reviewState;
28
+ const cls = rs === 'in-review' ? 'chip-review' : rs === 'approved' ? 'chip-approved' : 'chip-writing';
29
+ return _jsx("span", { className: `chip ${cls}`, children: REVIEW_LABELS[rs] ?? 'Draft' });
30
+ };
31
+ export const PostsTable = ({ rows, categories, state, showBrand }) => {
32
+ const router = useRouter();
33
+ const [pending, start] = useTransition();
34
+ const [selected, setSelected] = useState([]);
35
+ const [bulk, setBulk] = useState('');
36
+ const [error, setError] = useState(null);
37
+ const [flash, setFlash] = useState(null);
38
+ const [editing, setEditing] = useState(null);
39
+ const [scheduling, setScheduling] = useState(null);
40
+ const [when, setWhen] = useState('');
41
+ const isTrash = state === 'trash';
42
+ const allChecked = rows.length > 0 && selected.length === rows.length;
43
+ const editRow = useMemo(() => rows.find((r) => r.id === editing) ?? null, [rows, editing]);
44
+ const [draft, setDraft] = useState({
45
+ title: '',
46
+ slug: '',
47
+ category: [],
48
+ date: '',
49
+ status: 'draft',
50
+ });
51
+ const run = (fn, message) => {
52
+ setError(null);
53
+ setFlash(null);
54
+ start(async () => {
55
+ const res = await fn();
56
+ if (!res.ok) {
57
+ setError(res.error);
58
+ return;
59
+ }
60
+ if (message)
61
+ setFlash(message);
62
+ setSelected([]);
63
+ setEditing(null);
64
+ setScheduling(null);
65
+ router.refresh();
66
+ });
67
+ };
68
+ const openQuickEdit = (row) => {
69
+ setEditing(row.id);
70
+ setError(null);
71
+ setDraft({
72
+ title: row.title,
73
+ slug: row.slug,
74
+ category: row.categoryIds,
75
+ date: toLocalInput(row.publishedAt),
76
+ status: row.status,
77
+ });
78
+ };
79
+ const toggleDraftCategory = (id) => {
80
+ setDraft((d) => ({
81
+ ...d,
82
+ category: d.category.includes(id) ? d.category.filter((c) => c !== id) : [...d.category, id],
83
+ }));
84
+ };
85
+ const applyBulk = () => {
86
+ if (!bulk || !selected.length)
87
+ return;
88
+ if (bulk === 'delete' && !window.confirm(`Permanently delete ${selected.length} post(s)? This cannot be undone.`)) {
89
+ return;
90
+ }
91
+ run(() => bulkPostAction(selected, bulk), `${selected.length} post(s) updated.`);
92
+ };
93
+ return (_jsxs("div", { className: "list", children: [_jsxs("div", { className: "list-bar", children: [_jsxs("div", { className: "bulk", children: [_jsxs("select", { className: "fld fld-sm", value: bulk, onChange: (e) => setBulk(e.target.value), "aria-label": "Bulk action", children: [_jsx("option", { value: "", children: "Bulk actions\u2026" }), isTrash ? (_jsxs(_Fragment, { children: [_jsx("option", { value: "restore", children: "Restore" }), _jsx("option", { value: "delete", children: "Delete permanently" })] })) : (_jsxs(_Fragment, { children: [_jsx("option", { value: "submit", children: "Submit for review" }), _jsx("option", { value: "approve", children: "Approve" }), _jsx("option", { value: "send-back", children: "Send back to writing" }), _jsx("option", { value: "publish", children: "Publish" }), _jsx("option", { value: "draft", children: "Switch to draft" }), _jsx("option", { value: "trash", children: "Move to trash" })] }))] }), _jsx("button", { className: "btn", disabled: !bulk || !selected.length || pending, onClick: applyBulk, children: "Apply" }), _jsx("span", { className: "note", children: selected.length ? `${selected.length} selected` : `${rows.length} shown` })] }), pending ? _jsx("span", { className: "note", children: "Working\u2026" }) : null] }), error ? _jsx("p", { className: "form-error", role: "alert", children: error }) : null, flash ? _jsx("p", { className: "form-ok", role: "status", children: flash }) : null, _jsx("div", { className: "tw", children: _jsxs("table", { className: "tbl tbl-list", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "col-check", children: _jsx("input", { type: "checkbox", checked: allChecked, "aria-label": "Select all posts", onChange: (e) => setSelected(e.target.checked ? rows.map((r) => r.id) : []) }) }), _jsx("th", { children: "Title" }), showBrand ? _jsx("th", { className: "col-narrow", children: "Brand" }) : null, _jsx("th", { className: "col-narrow", children: "Byline" }), _jsx("th", { className: "col-narrow", children: "Category" }), _jsx("th", { className: "col-narrow", children: "Date" }), _jsx("th", { className: "col-narrow num", children: "Views 30d" }), _jsx("th", { className: "col-narrow", children: "Status" })] }) }), _jsxs("tbody", { children: [rows.length === 0 ? (_jsx("tr", { children: _jsx("td", { colSpan: showBrand ? 8 : 7, children: _jsx("p", { className: "d-empty", children: "No posts match this view." }) }) })) : null, rows.map((row) => (_jsxs(Fragment, { children: [_jsxs("tr", { className: selected.includes(row.id) ? 'is-selected' : undefined, children: [_jsx("td", { className: "col-check", children: _jsx("input", { type: "checkbox", checked: selected.includes(row.id), "aria-label": `Select ${row.title}`, onChange: (e) => setSelected((list) => e.target.checked ? [...list, row.id] : list.filter((id) => id !== row.id)) }) }), _jsxs("td", { className: "col-title", children: [_jsx(Link, { className: "row-title", href: `/admin/posts/${row.id}`, children: row.title || '(no title)' }), row.blockers.length && row.status !== 'published' && !row.trashed ? (_jsx("ul", { className: "blockers", children: row.blockers.map((b) => (_jsxs("li", { children: ["needs ", b] }, b))) })) : null, _jsx("div", { className: "row-actions", children: isTrash ? (_jsxs(_Fragment, { children: [_jsx("button", { onClick: () => run(() => bulkPostAction([row.id], 'restore'), 'Restored.'), children: "Restore" }), _jsx("button", { className: "danger", onClick: () => {
94
+ if (window.confirm('Delete this post permanently? This cannot be undone.')) {
95
+ run(() => bulkPostAction([row.id], 'delete'), 'Deleted.');
96
+ }
97
+ }, children: "Delete permanently" })] })) : (_jsxs(_Fragment, { children: [_jsx(Link, { href: `/admin/posts/${row.id}`, children: "Edit" }), _jsx("button", { onClick: () => openQuickEdit(row), children: "Quick edit" }), row.status !== 'published' && row.reviewState === 'writing' ? (_jsx("button", { onClick: () => run(() => submitForReview(row.id), 'Sent for review.'), children: "Submit" })) : null, row.status !== 'published' && row.reviewState === 'in-review' && row.canPublish ? (_jsxs(_Fragment, { children: [_jsx("button", { onClick: () => run(() => approve(row.id), 'Approved.'), children: "Approve" }), _jsx("button", { onClick: () => run(() => sendBack(row.id), 'Sent back.'), children: "Send back" })] })) : null, row.status !== 'published' && row.reviewState === 'approved' && row.canPublish ? (_jsxs(_Fragment, { children: [_jsx("button", { disabled: row.blockers.length > 0, title: row.blockers.length ? 'Fix what is listed above first' : undefined, onClick: () => run(() => publishNow(row.id), 'Published.'), children: "Publish" }), _jsx("button", { onClick: () => {
98
+ setScheduling(row.id);
99
+ setWhen(toLocalInput(row.scheduledFor) || toLocalInput(new Date(Date.now() + 3600000).toISOString()));
100
+ }, children: "Schedule" })] })) : null, row.status === 'published' && row.canPublish ? (_jsx("button", { onClick: () => run(() => unpublish(row.id), 'Switched to draft.'), children: "Unpublish" })) : null, _jsx("button", { onClick: () => run(() => duplicatePost(row.id), 'Copied as a new draft.'), children: "Duplicate" }), _jsx("button", { className: "danger", onClick: () => run(() => bulkPostAction([row.id], 'trash'), 'Moved to trash.'), children: "Trash" }), row.status === 'published' ? (_jsx("a", { href: postPath(row.slug, row.brandSlug), target: "_blank", rel: "noreferrer", children: "View \u2197" })) : null] })) }), scheduling === row.id ? (_jsxs("div", { className: "inline-form", children: [_jsx("input", { type: "datetime-local", className: "fld fld-sm", value: when, onChange: (e) => setWhen(e.target.value), "aria-label": "Publish date and time" }), _jsx("button", { className: "btn btn-primary btn-tiny", onClick: () => run(() => schedulePost(row.id, new Date(when).toISOString()), 'Scheduled.'), children: "Confirm" }), _jsx("button", { className: "btn btn-tiny", onClick: () => setScheduling(null), children: "Cancel" })] })) : null] }), showBrand ? _jsx("td", { className: "col-narrow muted", children: row.brandName ?? '—' }) : null, _jsx("td", { className: "col-narrow muted", children: row.authorNames.join(', ') || '—' }), _jsx("td", { className: "col-narrow muted", children: row.categoryNames.join(', ') || '—' }), _jsx("td", { className: "col-narrow muted", children: row.status === 'published' ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "cell-lbl", children: "Published" }), fmtDate(row.publishedAt)] })) : row.scheduledFor ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "cell-lbl", children: "Scheduled" }), fmtDateTime(row.scheduledFor)] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "cell-lbl", children: "Edited" }), fmtDate(row.updatedAt)] })) }), _jsx("td", { className: "col-narrow num", children: row.views == null ? '—' : row.views }), _jsx("td", { className: "col-narrow", children: _jsx(StateChip, { row: row }) })] }), editing === row.id && editRow ? (_jsx("tr", { className: "quick-row", children: _jsx("td", { colSpan: showBrand ? 8 : 7, children: _jsxs("div", { className: "quick", children: [_jsx("p", { className: "quick-head", children: "Quick edit \u2014 metadata only, the body stays untouched" }), _jsxs("div", { className: "quick-grid", children: [_jsxs("label", { children: [_jsx("span", { children: "Title" }), _jsx("input", { className: "fld", value: draft.title, onChange: (e) => setDraft((d) => ({ ...d, title: e.target.value })) })] }), _jsxs("label", { children: [_jsx("span", { children: "Slug" }), _jsx("input", { className: "fld mono", value: draft.slug, onChange: (e) => setDraft((d) => ({ ...d, slug: e.target.value })) })] }), _jsxs("div", { className: "span-2", children: [_jsx("span", { className: "fld-lbl", style: { display: 'block', marginBottom: 6 }, children: "Categories" }), _jsx("div", { className: "pick-list pick-list-compact", children: categories.length === 0 ? (_jsx("p", { className: "note", children: "No categories." })) : (categories.map((c) => (_jsxs("label", { className: "pick-row", children: [_jsx("input", { type: "checkbox", checked: draft.category.includes(c.id), onChange: () => toggleDraftCategory(c.id) }), c.name] }, c.id)))) })] }), _jsxs("label", { children: [_jsx("span", { children: "Published date" }), _jsx("input", { type: "datetime-local", className: "fld", value: draft.date, onChange: (e) => setDraft((d) => ({ ...d, date: e.target.value })) })] }), _jsxs("label", { children: [_jsx("span", { children: "Status" }), _jsxs("select", { className: "fld", value: draft.status, disabled: !row.canPublish, onChange: (e) => setDraft((d) => ({ ...d, status: e.target.value })), children: [_jsx("option", { value: "draft", children: "Draft" }), _jsx("option", { value: "published", children: "Published" })] })] })] }), _jsxs("div", { className: "btn-row", children: [_jsx("button", { className: "btn btn-primary", disabled: pending, onClick: () => run(() => quickEditPost({
101
+ id: row.id,
102
+ title: draft.title,
103
+ slug: draft.slug,
104
+ category: draft.category,
105
+ publishedAt: draft.date ? new Date(draft.date).toISOString() : null,
106
+ scheduledFor: row.scheduledFor,
107
+ status: draft.status,
108
+ }), 'Saved.'), children: "Save" }), _jsx("button", { className: "btn", onClick: () => setEditing(null), children: "Cancel" }), _jsx("span", { className: "note", children: "Changing the slug of a live post writes a 301 from the old URL automatically." })] })] }) }) })) : null] }, row.id)))] })] }) })] }));
109
+ };
@@ -0,0 +1,25 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ShellData } from '../../lib/dashboard';
3
+ /**
4
+ * The one app shell.
5
+ *
6
+ * Every screen renders inside it and hands it a title and its own actions, so
7
+ * the header, the brand switcher and the navigation cannot drift apart from one
8
+ * page to the next. Writing, reviewing, scheduling, images, taxonomy and people
9
+ * all live here — the CMS admin at the bottom is a labelled destination for the
10
+ * rare structural job, not the place routine work bounces to.
11
+ *
12
+ * The brand list arrives already filtered by access control, so the switcher can
13
+ * only ever offer brands this account may actually see.
14
+ */
15
+ export type NavKey = 'overview' | 'posts' | 'posts-all' | 'posts-new' | 'attention' | 'scheduled' | 'trash' | 'categories' | 'tags' | 'authors' | 'media' | 'comments' | 'redirects' | 'redirects-all' | 'redirects-new' | 'robots' | 'sitemap' | 'analytics' | 'search-console' | 'users' | 'settings' | 'brands' | 'profile' | 'tools' | 'tools-export' | 'tools-import';
16
+ export declare const Shell: ({ children, active, shell, title, subtitle, actions, wide, }: {
17
+ children: ReactNode;
18
+ active: NavKey;
19
+ shell: ShellData;
20
+ title: string;
21
+ subtitle?: ReactNode;
22
+ actions?: ReactNode;
23
+ wide?: boolean;
24
+ }) => import("react").JSX.Element;
25
+ //# sourceMappingURL=Shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shell.d.ts","sourceRoot":"","sources":["../../../../app/components/BlogUploader/dashboard/Shell.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,MAAM,GACd,UAAU,GACV,OAAO,GACP,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,OAAO,GACP,YAAY,GACZ,MAAM,GACN,SAAS,GACT,OAAO,GACP,UAAU,GACV,WAAW,GACX,eAAe,GACf,eAAe,GACf,QAAQ,GACR,SAAS,GACT,WAAW,GACX,gBAAgB,GAChB,OAAO,GACP,UAAU,GACV,QAAQ,GACR,SAAS,GACT,OAAO,GACP,cAAc,GACd,cAAc,CAAA;AAsHlB,eAAO,MAAM,KAAK,GAAI,8DAQnB;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,gCAuHA,CAAA"}
@@ -0,0 +1,128 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Link from 'next/link';
3
+ import { Suspense } from 'react';
4
+ import { BrandSwitcher } from './BrandSwitcher';
5
+ const Icon = ({ path }) => (_jsx("svg", { viewBox: "0 0 20 20", className: "nav-icon", "aria-hidden": "true", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: path }) }));
6
+ const ICONS = {
7
+ overview: 'M3 10.5 10 4l7 6.5M5 9.5V16h10V9.5',
8
+ posts: 'M6 3h8l2.5 2.5V17H6zM8 8h6M8 11h6M8 14h4',
9
+ media: 'M3.5 5h13v10h-13zM3.5 12.5l3.5-3 3 2.5 2.5-2 3.5 3M7 8.2h.01',
10
+ taxonomy: 'M4 5.5h12M4 10h12M4 14.5h7',
11
+ tags: 'M10.5 3.5H16V9l-6.5 6.5L4 10z M13 6.5h.01',
12
+ authors: 'M10 10.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM4 16.5c.8-2.6 3.1-4 6-4s5.2 1.4 6 4',
13
+ comments: 'M4 5.5h12v8.5H9.5L6 17v-3H4z',
14
+ redirects: 'M4 7.5h9l-2.2-2.2M16 12.5H7l2.2 2.2',
15
+ robots: 'M6 7.5h8v2.5H6zM4.5 12.5h11M7 15.5h6M10 4.5v3',
16
+ sitemap: 'M10 3.5v4M6 7.5h8M6 7.5v4.5h3V15M14 7.5v4.5h-3V15',
17
+ analytics: 'M4 15.5V9.5M8 15.5V6.5M12 15.5v-5M16 15.5V4.5',
18
+ 'search-console': 'M4.5 5.5h11v9h-11zM7 12.5l2-2.5 2 1.5 2.5-3',
19
+ users: 'M8 10a2.6 2.6 0 1 0 0-5.2A2.6 2.6 0 0 0 8 10ZM2.8 16c.7-2.3 2.7-3.5 5.2-3.5s4.5 1.2 5.2 3.5M14 5.2a2.4 2.4 0 0 1 0 4.6M15.5 12.6c1.2.5 2 1.5 2.4 2.9',
20
+ settings: 'M10 12.4a2.4 2.4 0 1 0 0-4.8 2.4 2.4 0 0 0 0 4.8Z M10 2.8l1 1.9 2.1-.4.9 1.6-1.3 1.7.9 1.9-1.9.9.4 2.1-1.6.9-1.7-1.3-1.9.9-.9-1.9-2.1.4-.9-1.6L4.3 9 3.4 7.1l1.9-.9L4.9 4l1.6-.9L8.2 4.4Z',
21
+ brands: 'M4 16V8.5L10 4l6 4.5V16zM8 16v-4h4v4',
22
+ profile: 'M10 10a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM4 16.5c.8-2.6 3.1-4 6-4s5.2 1.4 6 4',
23
+ tools: 'M12.5 3.5l4 4-7.2 7.2H5.3v-4.1L12.5 3.5zM4.5 15.5h11',
24
+ };
25
+ const NAV = [
26
+ {
27
+ title: 'Editorial',
28
+ items: [
29
+ { key: 'overview', label: 'Dashboard', href: '/admin', icon: 'overview' },
30
+ {
31
+ key: 'posts',
32
+ label: 'Posts',
33
+ href: '/admin/posts',
34
+ icon: 'posts',
35
+ badge: 'attention',
36
+ children: [
37
+ { key: 'posts-all', label: 'All Posts', href: '/admin/posts' },
38
+ { key: 'posts-new', label: 'Add Post', href: '/admin/posts/new' },
39
+ { key: 'attention', label: 'Needs attention', href: '/admin/posts?state=attention', badge: 'attention' },
40
+ { key: 'scheduled', label: 'Scheduled', href: '/admin/posts?state=scheduled', badge: 'scheduled' },
41
+ { key: 'trash', label: 'Trash', href: '/admin/posts?state=trash', badge: 'trash' },
42
+ ],
43
+ },
44
+ { key: 'media', label: 'Media', href: '/admin/media', icon: 'media' },
45
+ ],
46
+ },
47
+ {
48
+ title: 'Organise',
49
+ items: [
50
+ { key: 'categories', label: 'Categories', href: '/admin/categories', icon: 'taxonomy' },
51
+ { key: 'tags', label: 'Tags', href: '/admin/tags', icon: 'tags' },
52
+ { key: 'authors', label: 'Authors', href: '/admin/authors', icon: 'authors' },
53
+ { key: 'comments', label: 'Comments', href: '/admin/comments', icon: 'comments' },
54
+ ],
55
+ },
56
+ {
57
+ title: 'SEO & Discovery',
58
+ items: [
59
+ {
60
+ key: 'redirects',
61
+ label: 'Redirect Analytics',
62
+ href: '/admin/redirects',
63
+ icon: 'redirects',
64
+ children: [
65
+ { key: 'redirects-all', label: 'All redirects', href: '/admin/redirects' },
66
+ { key: 'redirects-new', label: 'Add redirect', href: '/admin/redirects/new' },
67
+ ],
68
+ },
69
+ { key: 'robots', label: 'Robots.txt', href: '/admin/robots', icon: 'robots' },
70
+ { key: 'sitemap', label: 'XML Sitemap', href: '/admin/sitemap', icon: 'sitemap' },
71
+ { key: 'analytics', label: 'Google Analytics', href: '/admin/analytics', icon: 'analytics' },
72
+ { key: 'search-console', label: 'Search Console', href: '/admin/search-console', icon: 'search-console' },
73
+ ],
74
+ },
75
+ {
76
+ title: 'Tools',
77
+ items: [
78
+ {
79
+ key: 'tools',
80
+ label: 'Tools',
81
+ href: '/admin/tools',
82
+ icon: 'tools',
83
+ children: [
84
+ { key: 'tools', label: 'Available Tools', href: '/admin/tools' },
85
+ { key: 'tools-export', label: 'Export', href: '/admin/tools/export' },
86
+ { key: 'tools-import', label: 'Import', href: '/admin/tools/import' },
87
+ ],
88
+ },
89
+ ],
90
+ },
91
+ {
92
+ title: 'Administration',
93
+ items: [
94
+ { key: 'brands', label: 'Brands', href: '/admin/brands', icon: 'brands' },
95
+ { key: 'users', label: 'People', href: '/admin/users', icon: 'users', adminOnly: true },
96
+ { key: 'settings', label: 'Settings', href: '/admin/settings', icon: 'settings' },
97
+ ],
98
+ },
99
+ ];
100
+ const POSTS_KEYS = ['posts', 'posts-all', 'posts-new', 'attention', 'scheduled', 'trash'];
101
+ const REDIRECTS_KEYS = ['redirects', 'redirects-all', 'redirects-new'];
102
+ const TOOLS_KEYS = ['tools', 'tools-export', 'tools-import'];
103
+ export const Shell = ({ children, active, shell, title, subtitle, actions, wide, }) => {
104
+ const { tenants, activeBrand, attentionCount, scheduledCount, trashCount, userName, userRole, userAvatarUrl, isAdmin } = shell;
105
+ const withBrand = (href) => {
106
+ // New post keeps a clean URL — brand is chosen in the editor, not the query string.
107
+ if (href === '/admin/posts/new' || href.startsWith('/admin/posts/new?')) {
108
+ return '/admin/posts/new';
109
+ }
110
+ if (!activeBrand)
111
+ return href;
112
+ return href.includes('?') ? `${href}&brand=${activeBrand.slug}` : `${href}?brand=${activeBrand.slug}`;
113
+ };
114
+ const badgeValue = (badge) => badge === 'attention' ? attentionCount : badge === 'scheduled' ? scheduledCount : badge === 'trash' ? trashCount : 0;
115
+ return (_jsxs("div", { className: "shell", children: [_jsxs("aside", { className: "side", children: [_jsxs("div", { className: "side-brand", children: [_jsx("div", { className: "side-mark", "aria-hidden": "true", children: "B" }), _jsxs("div", { children: [_jsx("div", { className: "side-name", children: "Blog Portal" }), _jsx("div", { className: "side-role", children: activeBrand ? activeBrand.name : `${tenants.length} brands` })] })] }), _jsxs(Link, { className: "side-new", href: withBrand('/admin/posts/new'), children: [_jsx("span", { "aria-hidden": "true", children: "\uFF0B" }), " New post"] }), _jsx("div", { className: "side-scroll", children: NAV.map((section) => (_jsxs("div", { className: "side-group", children: [_jsx("p", { className: "side-sect", children: section.title }), _jsx("nav", { className: "side-nav", children: section.items
116
+ .filter((item) => !item.adminOnly || isAdmin)
117
+ .map((item) => {
118
+ const isActive = active === item.key ||
119
+ (item.key === 'posts' && POSTS_KEYS.includes(active)) ||
120
+ (item.key === 'redirects' && REDIRECTS_KEYS.includes(active)) ||
121
+ (item.key === 'tools' && TOOLS_KEYS.includes(active));
122
+ const badge = badgeValue(item.badge);
123
+ return (_jsxs("div", { children: [_jsxs(Link, { href: withBrand(item.href), prefetch: false, "aria-current": active === item.key ? 'page' : undefined, className: isActive ? 'is-open' : undefined, children: [_jsx(Icon, { path: ICONS[item.icon] }), item.label, badge ? _jsx("span", { className: "badge", children: badge }) : null] }), item.children && isActive ? (_jsx("div", { className: "side-sub", children: item.children.map((child) => {
124
+ const childBadge = badgeValue(child.badge);
125
+ return (_jsxs(Link, { href: withBrand(child.href), prefetch: false, "aria-current": active === child.key ? 'page' : undefined, children: [child.label, childBadge ? _jsx("span", { className: "badge", children: childBadge }) : null] }, child.key));
126
+ }) })) : null] }, item.key));
127
+ }) })] }, section.title))) }), _jsx("div", { className: "side-foot", children: _jsxs(Link, { href: "/admin/profile", className: `side-user-card${active === 'profile' ? ' is-active' : ''}`, "aria-current": active === 'profile' ? 'page' : undefined, children: [userAvatarUrl ? (_jsx("img", { className: "side-user-avatar", src: userAvatarUrl, alt: "", width: 36, height: 36 })) : (_jsx("span", { className: "side-user-avatar side-user-avatar-fallback", "aria-hidden": "true", children: userName.slice(0, 1).toUpperCase() })), _jsxs("span", { className: "side-user-meta", children: [_jsx("span", { className: "side-user-name", children: userName }), _jsx("span", { className: "side-user-role", children: userRole })] })] }) })] }), _jsxs("main", { className: "main", children: [_jsxs("header", { className: "top", children: [_jsxs("div", { className: "top-title", children: [_jsx("h1", { children: title }), subtitle ? _jsx("p", { className: "sub", children: subtitle }) : null] }), _jsxs("div", { className: "top-actions", children: [_jsx(Suspense, { fallback: null, children: _jsx(BrandSwitcher, { tenants: tenants, activeBrand: activeBrand }) }), actions] })] }), _jsx("div", { className: wide ? 'body body-wide' : 'body', children: children })] })] }));
128
+ };
@@ -0,0 +1,29 @@
1
+ import { type TermCollection } from '../../app/(dashboard)/_actions/library';
2
+ /**
3
+ * Categories, tags and authors share one screen because they are the same shape
4
+ * of job: a short form on the left, the existing list on the right, editing in
5
+ * place. Three near-identical screens would be three places to fix a bug.
6
+ *
7
+ * Deleting is where they differ, and the difference is enforced on the server:
8
+ * a category or author still in use refuses to go, while a tag detaches itself
9
+ * from its posts first. See _actions/library.ts.
10
+ */
11
+ export type TermRow = {
12
+ id: string;
13
+ name: string;
14
+ slug: string;
15
+ description: string;
16
+ jobTitle: string;
17
+ bio: string;
18
+ count: number;
19
+ };
20
+ type Props = {
21
+ collection: TermCollection;
22
+ rows: TermRow[];
23
+ tenant: string | null;
24
+ tenantName: string;
25
+ brandSlug?: string;
26
+ };
27
+ export declare const TermManager: ({ collection, rows, tenant, tenantName, brandSlug }: Props) => import("react").JSX.Element;
28
+ export {};
29
+ //# sourceMappingURL=TermManager.d.ts.map