@prenta/admin 1.17.1 → 1.17.2

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 (268) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/__tests__/views/ai-settings.render.test.js +67 -1
  3. package/dist/__tests__/views/ai-settings.render.test.js.map +1 -1
  4. package/dist/components/CoauthorResultPopover.d.ts.map +1 -1
  5. package/dist/components/CoauthorResultPopover.js +4 -1
  6. package/dist/components/CoauthorResultPopover.js.map +1 -1
  7. package/dist/components/CommentSidePanel.d.ts +0 -7
  8. package/dist/components/CommentSidePanel.d.ts.map +1 -1
  9. package/dist/components/CommentSidePanel.js +0 -2
  10. package/dist/components/CommentSidePanel.js.map +1 -1
  11. package/dist/components/EditorRail.d.ts +2 -1
  12. package/dist/components/EditorRail.d.ts.map +1 -1
  13. package/dist/components/MediaPickerModal.d.ts +2 -1
  14. package/dist/components/MediaPickerModal.d.ts.map +1 -1
  15. package/dist/components/TipTapEditor.d.ts +3 -2
  16. package/dist/components/TipTapEditor.d.ts.map +1 -1
  17. package/dist/components/forms/EntriesTable.d.ts +0 -1
  18. package/dist/components/forms/EntriesTable.d.ts.map +1 -1
  19. package/dist/components/forms/EntriesTable.js +1 -1
  20. package/dist/components/forms/EntriesTable.js.map +1 -1
  21. package/dist/components/pages/tag-badges.d.ts +2 -2
  22. package/dist/components/pages/tag-badges.d.ts.map +1 -1
  23. package/dist/components/pages/tag-badges.js.map +1 -1
  24. package/dist/components/seo/FaqProposalPreview.d.ts +2 -3
  25. package/dist/components/seo/FaqProposalPreview.d.ts.map +1 -1
  26. package/dist/components/seo/FaqProposalPreview.js +1 -1
  27. package/dist/components/seo/FaqProposalPreview.js.map +1 -1
  28. package/dist/components/seo/SeoCopilotDrawer.js +1 -1
  29. package/dist/components/seo/SeoCopilotDrawer.js.map +1 -1
  30. package/dist/components/seo/SeoEditorPane.d.ts.map +1 -1
  31. package/dist/components/seo/SeoEditorPane.js +4 -1
  32. package/dist/components/seo/SeoEditorPane.js.map +1 -1
  33. package/dist/components/ui/Badge.d.ts +3 -9
  34. package/dist/components/ui/Badge.d.ts.map +1 -1
  35. package/dist/components/ui/Badge.js +2 -3
  36. package/dist/components/ui/Badge.js.map +1 -1
  37. package/dist/components/ui/Button.d.ts +2 -2
  38. package/dist/components/ui/Button.d.ts.map +1 -1
  39. package/dist/components/ui/Button.js +0 -1
  40. package/dist/components/ui/Button.js.map +1 -1
  41. package/dist/components/ui/Card.d.ts +2 -3
  42. package/dist/components/ui/Card.d.ts.map +1 -1
  43. package/dist/components/ui/Card.js +0 -4
  44. package/dist/components/ui/Card.js.map +1 -1
  45. package/dist/components/ui/Input.d.ts +6 -8
  46. package/dist/components/ui/Input.d.ts.map +1 -1
  47. package/dist/components/ui/Input.js +6 -6
  48. package/dist/components/ui/Input.js.map +1 -1
  49. package/dist/components/ui/Modal.d.ts +1 -1
  50. package/dist/components/ui/Modal.d.ts.map +1 -1
  51. package/dist/components/ui/ResizableAside.d.ts +0 -13
  52. package/dist/components/ui/ResizableAside.d.ts.map +1 -1
  53. package/dist/components/ui/ResizableAside.js +5 -5
  54. package/dist/components/ui/ResizableAside.js.map +1 -1
  55. package/dist/components/ui/StatusBadge.d.ts +2 -2
  56. package/dist/components/ui/StatusBadge.d.ts.map +1 -1
  57. package/dist/components/ui/StatusBadge.js +0 -1
  58. package/dist/components/ui/StatusBadge.js.map +1 -1
  59. package/dist/components/ui/Toggle.d.ts +2 -8
  60. package/dist/components/ui/Toggle.d.ts.map +1 -1
  61. package/dist/components/ui/Toggle.js +0 -1
  62. package/dist/components/ui/Toggle.js.map +1 -1
  63. package/dist/fields/FieldRenderer.d.ts +2 -1
  64. package/dist/fields/FieldRenderer.d.ts.map +1 -1
  65. package/dist/fields/index.d.ts +0 -17
  66. package/dist/fields/index.d.ts.map +1 -1
  67. package/dist/fields/index.js +0 -15
  68. package/dist/fields/index.js.map +1 -1
  69. package/dist/layout/primitives/tokens.d.ts +0 -2
  70. package/dist/layout/primitives/tokens.d.ts.map +1 -1
  71. package/dist/layout/primitives/tokens.js +0 -6
  72. package/dist/layout/primitives/tokens.js.map +1 -1
  73. package/dist/lib/brand-voice-client.d.ts +14 -1
  74. package/dist/lib/brand-voice-client.d.ts.map +1 -1
  75. package/dist/lib/brand-voice-client.js +7 -0
  76. package/dist/lib/brand-voice-client.js.map +1 -1
  77. package/dist/lib/coauthor-client.d.ts +2 -1
  78. package/dist/lib/coauthor-client.d.ts.map +1 -1
  79. package/dist/lib/collection-schema.d.ts +0 -9
  80. package/dist/lib/collection-schema.d.ts.map +1 -1
  81. package/dist/lib/collection-schema.js +2 -2
  82. package/dist/lib/collection-schema.js.map +1 -1
  83. package/dist/lib/editor-seo-content.d.ts +0 -10
  84. package/dist/lib/editor-seo-content.d.ts.map +1 -1
  85. package/dist/lib/editor-seo-content.js +0 -13
  86. package/dist/lib/editor-seo-content.js.map +1 -1
  87. package/dist/lib/forms-service.d.ts +3 -21
  88. package/dist/lib/forms-service.d.ts.map +1 -1
  89. package/dist/lib/forms-service.js +0 -25
  90. package/dist/lib/forms-service.js.map +1 -1
  91. package/dist/lib/notifications-client.d.ts +4 -3
  92. package/dist/lib/notifications-client.d.ts.map +1 -1
  93. package/dist/lib/page-audit-input.d.ts +0 -10
  94. package/dist/lib/page-audit-input.d.ts.map +1 -1
  95. package/dist/lib/page-audit-input.js +1 -1
  96. package/dist/lib/page-audit-input.js.map +1 -1
  97. package/dist/lib/page-editor-service.d.ts +2 -4
  98. package/dist/lib/page-editor-service.d.ts.map +1 -1
  99. package/dist/lib/page-editor-service.js +3 -3
  100. package/dist/lib/page-editor-service.js.map +1 -1
  101. package/dist/lib/pages-service.d.ts +2 -13
  102. package/dist/lib/pages-service.d.ts.map +1 -1
  103. package/dist/lib/pages-service.js +3 -24
  104. package/dist/lib/pages-service.js.map +1 -1
  105. package/dist/lib/plan.d.ts +2 -1
  106. package/dist/lib/plan.d.ts.map +1 -1
  107. package/dist/lib/post-editor-service.d.ts +3 -13
  108. package/dist/lib/post-editor-service.d.ts.map +1 -1
  109. package/dist/lib/post-editor-service.js +5 -6
  110. package/dist/lib/post-editor-service.js.map +1 -1
  111. package/dist/lib/post-types-service.d.ts +2 -3
  112. package/dist/lib/post-types-service.d.ts.map +1 -1
  113. package/dist/lib/post-types-service.js +1 -1
  114. package/dist/lib/post-types-service.js.map +1 -1
  115. package/dist/lib/posts-service.d.ts +2 -1
  116. package/dist/lib/posts-service.d.ts.map +1 -1
  117. package/dist/lib/preview-link.d.ts +0 -9
  118. package/dist/lib/preview-link.d.ts.map +1 -1
  119. package/dist/lib/preview-link.js +0 -15
  120. package/dist/lib/preview-link.js.map +1 -1
  121. package/dist/lib/rail-width.d.ts +0 -1
  122. package/dist/lib/rail-width.d.ts.map +1 -1
  123. package/dist/lib/rail-width.js +1 -1
  124. package/dist/lib/rail-width.js.map +1 -1
  125. package/dist/lib/reflow-probe.d.ts +0 -67
  126. package/dist/lib/reflow-probe.d.ts.map +1 -1
  127. package/dist/lib/reflow-probe.js +4 -4
  128. package/dist/lib/reflow-probe.js.map +1 -1
  129. package/dist/lib/seo-service.d.ts +14 -32
  130. package/dist/lib/seo-service.d.ts.map +1 -1
  131. package/dist/lib/seo-service.js +7 -26
  132. package/dist/lib/seo-service.js.map +1 -1
  133. package/dist/lib/theme-chrome.d.ts +0 -1
  134. package/dist/lib/theme-chrome.d.ts.map +1 -1
  135. package/dist/lib/theme-chrome.js +1 -1
  136. package/dist/lib/theme-chrome.js.map +1 -1
  137. package/dist/lib/version-history.d.ts +2 -2
  138. package/dist/lib/version-history.d.ts.map +1 -1
  139. package/dist/lib/workflow-chrome.d.ts +0 -3
  140. package/dist/lib/workflow-chrome.d.ts.map +1 -1
  141. package/dist/lib/workflow-chrome.js +3 -3
  142. package/dist/lib/workflow-chrome.js.map +1 -1
  143. package/dist/views/Login.d.ts +2 -1
  144. package/dist/views/Login.d.ts.map +1 -1
  145. package/dist/views/MediaBrowser.d.ts.map +1 -1
  146. package/dist/views/MediaBrowser.js +3 -2
  147. package/dist/views/MediaBrowser.js.map +1 -1
  148. package/dist/views/PageEditor.d.ts +2 -1
  149. package/dist/views/PageEditor.d.ts.map +1 -1
  150. package/dist/views/Pages/PagesListView.d.ts +0 -1
  151. package/dist/views/Pages/PagesListView.d.ts.map +1 -1
  152. package/dist/views/Pages/PagesListView.js +1 -1
  153. package/dist/views/Pages/PagesListView.js.map +1 -1
  154. package/dist/views/Pages.d.ts +2 -1
  155. package/dist/views/Pages.d.ts.map +1 -1
  156. package/dist/views/Redirects.d.ts +2 -1
  157. package/dist/views/Redirects.d.ts.map +1 -1
  158. package/dist/views/page-editor/section-types.d.ts +2 -2
  159. package/dist/views/page-editor/section-types.d.ts.map +1 -1
  160. package/dist/views/page-editor/section-types.js +1 -1
  161. package/dist/views/page-editor/section-types.js.map +1 -1
  162. package/dist/views/page-editor/sections/admin-renderers.d.ts +2 -1
  163. package/dist/views/page-editor/sections/admin-renderers.d.ts.map +1 -1
  164. package/dist/views/page-editor/theme-chrome/index.d.ts +1 -6
  165. package/dist/views/page-editor/theme-chrome/index.d.ts.map +1 -1
  166. package/dist/views/page-editor/theme-chrome/index.js +1 -3
  167. package/dist/views/page-editor/theme-chrome/index.js.map +1 -1
  168. package/dist/views/page-editor/viewports.d.ts +1 -1
  169. package/dist/views/page-editor/viewports.d.ts.map +1 -1
  170. package/dist/views/page-editor/viewports.js +1 -1
  171. package/dist/views/page-editor/viewports.js.map +1 -1
  172. package/dist/views/settings/AISettingsTab.d.ts.map +1 -1
  173. package/dist/views/settings/AISettingsTab.js +13 -3
  174. package/dist/views/settings/AISettingsTab.js.map +1 -1
  175. package/dist/views/settings/BrandVoiceCard.d.ts +3 -0
  176. package/dist/views/settings/BrandVoiceCard.d.ts.map +1 -1
  177. package/dist/views/settings/BrandVoiceCard.js +2 -2
  178. package/dist/views/settings/BrandVoiceCard.js.map +1 -1
  179. package/dist/views/settings/brand-voice/BrandVoiceAlignmentPanel.d.ts.map +1 -1
  180. package/dist/views/settings/brand-voice/BrandVoiceAlignmentPanel.js +4 -1
  181. package/dist/views/settings/brand-voice/BrandVoiceAlignmentPanel.js.map +1 -1
  182. package/dist/views/settings/featureModel.d.ts +0 -3
  183. package/dist/views/settings/featureModel.d.ts.map +1 -1
  184. package/dist/views/settings/featureModel.js +2 -2
  185. package/dist/views/settings/featureModel.js.map +1 -1
  186. package/dist/views/settings/useAiSettings.d.ts +2 -2
  187. package/dist/views/settings/useAiSettings.d.ts.map +1 -1
  188. package/dist/views/settings/useAiSettings.js +6 -2
  189. package/dist/views/settings/useAiSettings.js.map +1 -1
  190. package/dist/views/settings/useAppearanceSettings.d.ts +5 -6
  191. package/dist/views/settings/useAppearanceSettings.d.ts.map +1 -1
  192. package/dist/views/settings/useAppearanceSettings.js +1 -1
  193. package/dist/views/settings/useAppearanceSettings.js.map +1 -1
  194. package/dist/views/settings/useEmailSettings.d.ts +3 -2
  195. package/dist/views/settings/useEmailSettings.d.ts.map +1 -1
  196. package/dist/views/settings/useGeneralSettings.d.ts +2 -11
  197. package/dist/views/settings/useGeneralSettings.d.ts.map +1 -1
  198. package/dist/views/settings/useGeneralSettings.js +3 -3
  199. package/dist/views/settings/useGeneralSettings.js.map +1 -1
  200. package/dist/views/settings/useSeoSettings.d.ts +1 -1
  201. package/dist/views/settings/useSeoSettings.d.ts.map +1 -1
  202. package/dist/views/settings/useUpdates.d.ts +1 -3
  203. package/dist/views/settings/useUpdates.d.ts.map +1 -1
  204. package/dist/views/settings/useUpdates.js +1 -1
  205. package/dist/views/settings/useUpdates.js.map +1 -1
  206. package/package.json +4 -4
  207. package/src/__tests__/views/ai-settings.render.test.tsx +86 -2
  208. package/src/components/CoauthorResultPopover.tsx +3 -1
  209. package/src/components/CommentSidePanel.tsx +0 -1
  210. package/src/components/EditorRail.tsx +1 -1
  211. package/src/components/MediaPickerModal.tsx +1 -1
  212. package/src/components/TipTapEditor.tsx +2 -2
  213. package/src/components/forms/EntriesTable.tsx +1 -1
  214. package/src/components/pages/tag-badges.tsx +1 -1
  215. package/src/components/seo/FaqProposalPreview.tsx +2 -2
  216. package/src/components/seo/SeoCopilotDrawer.tsx +1 -1
  217. package/src/components/seo/SeoEditorPane.tsx +3 -1
  218. package/src/components/ui/Badge.tsx +4 -6
  219. package/src/components/ui/Button.tsx +1 -3
  220. package/src/components/ui/Card.tsx +1 -14
  221. package/src/components/ui/Input.tsx +7 -15
  222. package/src/components/ui/Modal.tsx +1 -1
  223. package/src/components/ui/ResizableAside.tsx +5 -5
  224. package/src/components/ui/StatusBadge.tsx +1 -3
  225. package/src/components/ui/Toggle.tsx +1 -3
  226. package/src/fields/FieldRenderer.tsx +1 -1
  227. package/src/fields/index.ts +0 -17
  228. package/src/layout/primitives/tokens.ts +0 -7
  229. package/src/lib/brand-voice-client.ts +18 -1
  230. package/src/lib/coauthor-client.ts +1 -1
  231. package/src/lib/collection-schema.ts +2 -2
  232. package/src/lib/editor-seo-content.ts +0 -22
  233. package/src/lib/forms-service.ts +2 -42
  234. package/src/lib/notifications-client.ts +3 -3
  235. package/src/lib/page-audit-input.ts +1 -1
  236. package/src/lib/page-editor-service.ts +1 -3
  237. package/src/lib/pages-service.ts +4 -29
  238. package/src/lib/plan.ts +1 -1
  239. package/src/lib/post-editor-service.ts +4 -10
  240. package/src/lib/post-types-service.ts +2 -2
  241. package/src/lib/posts-service.ts +1 -1
  242. package/src/lib/preview-link.ts +0 -14
  243. package/src/lib/rail-width.ts +1 -1
  244. package/src/lib/reflow-probe.ts +4 -4
  245. package/src/lib/seo-service.ts +20 -60
  246. package/src/lib/theme-chrome.ts +1 -1
  247. package/src/lib/version-history.ts +2 -2
  248. package/src/lib/workflow-chrome.ts +3 -3
  249. package/src/views/Login.tsx +1 -1
  250. package/src/views/MediaBrowser.tsx +3 -2
  251. package/src/views/PageEditor.tsx +1 -1
  252. package/src/views/Pages/PagesListView.tsx +1 -1
  253. package/src/views/Pages.tsx +1 -1
  254. package/src/views/Redirects.tsx +1 -1
  255. package/src/views/page-editor/section-types.ts +0 -9
  256. package/src/views/page-editor/sections/admin-renderers.tsx +1 -1
  257. package/src/views/page-editor/theme-chrome/index.ts +2 -10
  258. package/src/views/page-editor/viewports.ts +0 -3
  259. package/src/views/settings/AISettingsTab.tsx +15 -3
  260. package/src/views/settings/BrandVoiceCard.tsx +11 -1
  261. package/src/views/settings/brand-voice/BrandVoiceAlignmentPanel.tsx +3 -1
  262. package/src/views/settings/featureModel.ts +2 -2
  263. package/src/views/settings/useAiSettings.ts +8 -3
  264. package/src/views/settings/useAppearanceSettings.ts +4 -6
  265. package/src/views/settings/useEmailSettings.ts +2 -2
  266. package/src/views/settings/useGeneralSettings.ts +5 -10
  267. package/src/views/settings/useSeoSettings.ts +1 -1
  268. package/src/views/settings/useUpdates.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"useUpdates.js","sourceRoot":"","sources":["../../../src/views/settings/useUpdates.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AA8CzC,MAAM,YAAY,GAAG,oCAAoC,CAAA;AAEzD,iFAAiF;AACjF,MAAM,UAAU,gBAAgB,CAAC,IAA+B;IAC9D,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAA;IACpC,OAAO,CAAC,KAAK,OAAO,IAAI,CAAC,KAAK,OAAO,CAAA;AACvC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,IAAI,EAAqB;IACpD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAoB,IAAI,CAAC,CAAA;IACzD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAA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KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACxB,CAAC;aAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACpB,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YACrB,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAA;QACrC,CAAC;QACD,WAAW,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAA;IAErB,OAAO;QACL,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,KAAK;QACL,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,IAAI;QACJ,QAAQ;QACR,KAAK;QACL,SAAS;QACT,SAAS;QACT,SAAS;QACT,IAAI;QACJ,KAAK;QACL,KAAK;QACL,KAAK;KACN,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prenta/admin",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -99,15 +99,15 @@
99
99
  "typescript": "^5.7.0",
100
100
  "vitest": "^4.1.0",
101
101
  "@prenta/component-blocks": "0.3.1",
102
- "@prenta/core": "6.0.0",
103
- "@prenta/plugin-ai": "2.0.0",
102
+ "@prenta/core": "7.0.0",
103
+ "@prenta/plugin-ai": "3.0.0",
104
104
  "@prenta/plugin-blocks": "0.2.0",
105
105
  "@prenta/plugin-commerce": "0.2.1",
106
106
  "@prenta/plugin-forms": "0.1.0",
107
107
  "@prenta/plugin-media": "0.2.0",
108
108
  "@prenta/plugin-navigation": "0.3.0",
109
109
  "@prenta/plugin-seo": "1.0.0",
110
- "@prenta/sections-react": "0.17.41"
110
+ "@prenta/sections-react": "0.17.42"
111
111
  },
112
112
  "scripts": {
113
113
  "build": "tsc --project tsconfig.json && npx @tailwindcss/cli -i src/styles/build-input.css -o dist/prenta-admin.css --minify",
@@ -345,8 +345,12 @@ describe('AISettingsTab', () => {
345
345
  ),
346
346
  )
347
347
 
348
- expect((within(region).getByLabelText('Tone') as HTMLInputElement).value).toBe(
349
- 'confident, warm',
348
+ // The draft lands in state after the mocked promise resolves — wait on the
349
+ // rendered value, not just on the request having been made (CI flake).
350
+ await waitFor(() =>
351
+ expect((within(region).getByLabelText('Tone') as HTMLInputElement).value).toBe(
352
+ 'confident, warm',
353
+ ),
350
354
  )
351
355
  expect((within(region).getByLabelText('Name') as HTMLInputElement).value).toBe('Acme Voice')
352
356
  })
@@ -390,6 +394,86 @@ describe('AISettingsTab', () => {
390
394
  expect(screen.getByText(/set via an environment variable/i)).toBeTruthy()
391
395
  })
392
396
 
397
+ describe('brand voice readiness on a zero-config (env key) site', () => {
398
+ const ENV_PROVIDER = {
399
+ id: 'env:openai',
400
+ provider: 'openai',
401
+ displayName: 'OpenAI (environment)',
402
+ enabled: true,
403
+ status: 'unknown',
404
+ apiKeyLast4: '1234',
405
+ apiKeySource: 'environment',
406
+ keyManagedExternally: true,
407
+ hasKey: true,
408
+ createdAt: '1970-01-01T00:00:00.000Z',
409
+ updatedAt: '1970-01-01T00:00:00.000Z',
410
+ updatedBy: 'system',
411
+ }
412
+
413
+ const PAGES_CONFIG = { collections: { pages: { slug: 'pages', type: 'page' } } }
414
+
415
+ function zeroConfigSettings(hasKey: boolean) {
416
+ const next = deepClone(SETTINGS_RESPONSE)
417
+ next.settings.defaultProviderId = ''
418
+ next.settings.defaultModelId = ''
419
+ next.providers = [
420
+ { ...ENV_PROVIDER, hasKey } as (typeof SETTINGS_RESPONSE)['providers'][number],
421
+ ]
422
+ return next
423
+ }
424
+
425
+ it('is ready with a keyed provider and no explicit default model, and says so', async () => {
426
+ settingsResponse = zeroConfigSettings(true)
427
+ render(<AISettingsTab role="ADMIN" config={PAGES_CONFIG} />)
428
+ const region = await screen.findByRole('region', { name: 'Brand voice' })
429
+ await waitFor(() =>
430
+ expect(
431
+ within(region).getByText(
432
+ 'No default model selected — using the provider’s recommended default.',
433
+ ),
434
+ ).toBeTruthy(),
435
+ )
436
+ expect(within(region).queryByText(/Select a default model/)).toBeNull()
437
+ expect(
438
+ (
439
+ within(region).getByRole('button', {
440
+ name: 'Analyze & draft profile',
441
+ }) as HTMLButtonElement
442
+ ).disabled,
443
+ ).toBe(false)
444
+ })
445
+
446
+ it('still asks for a default model when the only provider has no key', async () => {
447
+ settingsResponse = zeroConfigSettings(false)
448
+ render(<AISettingsTab role="ADMIN" config={PAGES_CONFIG} />)
449
+ const region = await screen.findByRole('region', { name: 'Brand voice' })
450
+ await waitFor(() => expect(within(region).getByText(/Select a default model/)).toBeTruthy())
451
+ expect(within(region).queryByText(/recommended default/)).toBeNull()
452
+ })
453
+
454
+ it('still asks for a default model when the only keyed provider is a custom endpoint', async () => {
455
+ // Custom endpoints have no curated catalog, so the runtime cannot pick a
456
+ // provider default for them — readiness must not claim otherwise.
457
+ settingsResponse = zeroConfigSettings(true)
458
+ settingsResponse.providers = [
459
+ {
460
+ ...ENV_PROVIDER,
461
+ id: 'p-custom',
462
+ provider: 'custom',
463
+ displayName: 'Local LLM',
464
+ baseUrl: 'https://llm.example.com/v1',
465
+ apiKeySource: 'database',
466
+ keyManagedExternally: false,
467
+ hasKey: true,
468
+ } as (typeof SETTINGS_RESPONSE)['providers'][number],
469
+ ]
470
+ render(<AISettingsTab role="ADMIN" config={PAGES_CONFIG} />)
471
+ const region = await screen.findByRole('region', { name: 'Brand voice' })
472
+ await waitFor(() => expect(within(region).getByText(/Select a default model/)).toBeTruthy())
473
+ expect(within(region).queryByText(/recommended default/)).toBeNull()
474
+ })
475
+ })
476
+
393
477
  it('warns when the configured default model is no longer available', async () => {
394
478
  settingsResponse = deepClone(SETTINGS_RESPONSE)
395
479
  settingsResponse.settings.defaultModelId = 'anthropic:ghost-model'
@@ -5,7 +5,7 @@ import { Check, Copy, Loader2, Sparkles, Wand2, X } from 'lucide-react'
5
5
  import type { BrandAlignmentScoreResult } from '@prenta/core/brand-voice'
6
6
  import type { CoauthorAction, ProofreadChange } from '../lib/coauthor-client.js'
7
7
  import { coauthorActionLabel } from '../lib/coauthor-client.js'
8
- import { fixBrandVoiceContent } from '../lib/brand-voice-client.js'
8
+ import { brandVoiceFixAiNotice, fixBrandVoiceContent } from '../lib/brand-voice-client.js'
9
9
  import { BrandVoiceAlignmentBadge } from './BrandVoiceAlignmentBadge.js'
10
10
  import { toast } from 'sonner'
11
11
 
@@ -100,6 +100,8 @@ export function CoauthorResultPopover({
100
100
  ? 'Copy revised to match brand voice.'
101
101
  : 'Applied brand voice rule fixes.',
102
102
  )
103
+ const notice = brandVoiceFixAiNotice(res.result)
104
+ if (notice) toast.info(notice)
103
105
  } finally {
104
106
  setFixing(false)
105
107
  }
@@ -541,4 +541,3 @@ function formatRelative(iso: string): string {
541
541
  }
542
542
 
543
543
  // Re-export for tests that build their own CommentsApi.
544
- export { formatRelative as _formatRelative }
@@ -13,7 +13,7 @@ import {
13
13
  } from '../lib/rail-width.js'
14
14
 
15
15
  /** What the rail hands its children so they can render a header. */
16
- export interface RailState {
16
+ interface RailState {
17
17
  width: number
18
18
  dragging: boolean
19
19
  collapse: () => void
@@ -23,7 +23,7 @@ interface MediaItem {
23
23
  }
24
24
 
25
25
  /** Minimal selected-asset shape exposed to callers that need the asset id. */
26
- export interface SelectedMediaItem {
26
+ interface SelectedMediaItem {
27
27
  id: string
28
28
  storageKey: string
29
29
  /** Normalized public URL (falls back to storageKey when absent). */
@@ -73,7 +73,7 @@ const lowlight = createLowlight(common)
73
73
  * `onChange` still fires on every local update so existing autosave wiring
74
74
  * keeps working.
75
75
  */
76
- export interface TipTapCollaborationConfig {
76
+ interface TipTapCollaborationConfig {
77
77
  documentId: string
78
78
  /**
79
79
  * Base URL of the realtime gateway. `wss://your.app/api/cms/realtime/sync`
@@ -122,7 +122,7 @@ export interface TipTapEditorProps {
122
122
  * against the slice-4 endpoints; this prop is just the small set of
123
123
  * presentation + identity bits the panel can't infer from the editor.
124
124
  */
125
- export interface TipTapCommentsConfig {
125
+ interface TipTapCommentsConfig {
126
126
  documentId: string
127
127
  /** Logged-in user id — gates edit + delete affordances. */
128
128
  currentUserId: string
@@ -11,7 +11,7 @@ import { Star } from 'lucide-react'
11
11
  import type { FormSubmission } from '../../lib/forms-service.js'
12
12
  import { btnGhostIcon } from './primitives.js'
13
13
 
14
- export function formatEntryDateTime(iso: string | null | undefined): string {
14
+ function formatEntryDateTime(iso: string | null | undefined): string {
15
15
  if (!iso) return '—'
16
16
  const d = new Date(iso)
17
17
  if (Number.isNaN(d.getTime())) return '—'
@@ -13,7 +13,7 @@ import { paletteFor, TAG_COLOR_KEYS, type TagColorKey } from '../posts/badges.js
13
13
  * stay consistent with Post Type badges and work in light/dark mode.
14
14
  */
15
15
 
16
- export { TAG_COLOR_KEYS, type TagColorKey }
16
+ export { TAG_COLOR_KEYS }
17
17
 
18
18
  const DOT_COLOR: Record<TagColorKey, string> = {
19
19
  purple: 'bg-tag-purple',
@@ -13,11 +13,11 @@ import type { SeoFaqSignals } from '../../lib/seo-service.js'
13
13
  /** Server-enforced floor: a FAQ section with one question is not a FAQ. */
14
14
  export const FAQ_MIN_SELECTED = 2
15
15
  /** Mirrors core's `FAQ_HEADING_MAX` (measured after trim). */
16
- export const FAQ_HEADING_MAX = 80
16
+ const FAQ_HEADING_MAX = 80
17
17
  /** The window core aggregates FAQ signals over (`FAQ_SIGNAL_WINDOW_DAYS`). */
18
18
  const SIGNAL_WINDOW_DAYS = 28
19
19
 
20
- export interface FaqProposalPreviewItem {
20
+ interface FaqProposalPreviewItem {
21
21
  question: string
22
22
  answer: string
23
23
  /** Verbatim page quote the answer was grounded in; omit / `''` when none survived. */
@@ -60,7 +60,7 @@ export function SeoCopilotDrawer({
60
60
  <SeoEmptyState
61
61
  icon={<Bot size={24} />}
62
62
  title="AI is not configured"
63
- description="Install and configure an AI provider (plugin-ai) to enable the SEO Copilot."
63
+ description="Connect an AI provider in Settings → AI to enable the SEO Copilot."
64
64
  />
65
65
  ) : summary ? (
66
66
  <div className="text-foreground space-y-3 text-sm leading-relaxed">
@@ -38,7 +38,7 @@ import {
38
38
  type SeoFieldPayload,
39
39
  type LlmsInclude,
40
40
  } from '../../lib/seo-service.js'
41
- import { fixBrandVoiceContent } from '../../lib/brand-voice-client.js'
41
+ import { brandVoiceFixAiNotice, fixBrandVoiceContent } from '../../lib/brand-voice-client.js'
42
42
  import { BrandVoiceAlignmentBadge } from '../BrandVoiceAlignmentBadge.js'
43
43
  import { InspectorPaneBody, InspectorPaneFooter, InspectorPaneHeader } from '../ui/InspectorPane.js'
44
44
  import { Toggle } from '../ui/Toggle.js'
@@ -386,6 +386,8 @@ export function SeoEditorPane({
386
386
  update({ [field]: res.result.text } as Partial<SeoFieldPayload>)
387
387
  setAiAlignments((prev) => ({ ...prev, [field]: res.result!.afterScore }))
388
388
  toast.success('Copy adjusted to match brand voice.')
389
+ const notice = brandVoiceFixAiNotice(res.result)
390
+ if (notice) toast.info(notice)
389
391
  } finally {
390
392
  setAiFixBusy(null)
391
393
  }
@@ -20,27 +20,27 @@ const badge = cv('inline-flex items-center rounded-full px-2.5 py-0.5 text-xs fo
20
20
  defaultVariants: { tone: 'neutral', size: 'md' },
21
21
  })
22
22
 
23
- export type BadgeVariants = VariantProps<typeof badge>
23
+ type BadgeVariants = VariantProps<typeof badge>
24
24
 
25
25
  /**
26
26
  * Map document statuses to badge tones. Exposed so callers can reuse the
27
27
  * mapping (e.g. for the same status rendered as a dot indicator).
28
28
  */
29
- export const STATUS_TONE: Record<DocumentStatus, BadgeVariants['tone']> = {
29
+ const STATUS_TONE: Record<DocumentStatus, BadgeVariants['tone']> = {
30
30
  published: 'success',
31
31
  draft: 'neutral',
32
32
  archived: 'warning',
33
33
  scheduled: 'info',
34
34
  }
35
35
 
36
- export const STATUS_LABEL: Record<DocumentStatus, string> = {
36
+ const STATUS_LABEL: Record<DocumentStatus, string> = {
37
37
  published: 'Published',
38
38
  draft: 'Draft',
39
39
  archived: 'Archived',
40
40
  scheduled: 'Scheduled',
41
41
  }
42
42
 
43
- export type DocumentStatus = 'published' | 'draft' | 'archived' | 'scheduled'
43
+ type DocumentStatus = 'published' | 'draft' | 'archived' | 'scheduled'
44
44
 
45
45
  export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, BadgeVariants {
46
46
  /**
@@ -75,5 +75,3 @@ export function Badge({ status, tone, outline, size, className, children, ...res
75
75
  </span>
76
76
  )
77
77
  }
78
-
79
- export { badge as badgeVariants }
@@ -32,7 +32,7 @@ const button = cv(
32
32
  },
33
33
  )
34
34
 
35
- export type ButtonVariants = VariantProps<typeof button>
35
+ type ButtonVariants = VariantProps<typeof button>
36
36
 
37
37
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariants {
38
38
  loading?: boolean
@@ -96,5 +96,3 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button
96
96
  </button>
97
97
  )
98
98
  })
99
-
100
- export { button as buttonVariants }
@@ -23,7 +23,7 @@ const card = cv(
23
23
  },
24
24
  )
25
25
 
26
- export type CardVariants = VariantProps<typeof card>
26
+ type CardVariants = VariantProps<typeof card>
27
27
 
28
28
  const INTERACTIVE_CLASS =
29
29
  'motion-safe:transition-shadow motion-safe:duration-[var(--motion-fast)] hover:shadow-[var(--shd2)] focus-within:shadow-[var(--shd2)]'
@@ -103,16 +103,3 @@ export function CardContent({ className = '', children, ...rest }: HTMLAttribute
103
103
  </div>
104
104
  )
105
105
  }
106
-
107
- export function CardFooter({ className = '', children, ...rest }: HTMLAttributes<HTMLDivElement>) {
108
- return (
109
- <div
110
- className={`flex items-center justify-end gap-2 border-t border-[var(--bdr)] px-6 py-4 ${className}`}
111
- {...rest}
112
- >
113
- {children}
114
- </div>
115
- )
116
- }
117
-
118
- export { card as cardVariants }
@@ -1,7 +1,11 @@
1
- import { forwardRef, type InputHTMLAttributes } from 'react'
2
- import { cv, type VariantProps } from '../../lib/cv.js'
1
+ import { cv } from '../../lib/cv.js'
3
2
  import { formControlBase, formControlState } from './form-control.js'
4
3
 
4
+ /**
5
+ * Input class-variance recipe shared by the header search and `SearchInput`.
6
+ * Consumers render their own `<input>` with `inputVariants({ size, state })`;
7
+ * there is no wrapper component.
8
+ */
5
9
  const input = cv(formControlBase, {
6
10
  variants: {
7
11
  size: {
@@ -18,16 +22,4 @@ const input = cv(formControlBase, {
18
22
  defaultVariants: { size: 'md', state: 'default' },
19
23
  })
20
24
 
21
- export type InputVariants = VariantProps<typeof input>
22
-
23
- export interface InputProps
24
- extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, InputVariants {}
25
-
26
- export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
27
- { size, state, className, ...rest },
28
- ref,
29
- ) {
30
- return <input ref={ref} className={input({ size, state, class: className })} {...rest} />
31
- })
32
-
33
- export { input as inputVariants, formControlBase, formControlState }
25
+ export { input as inputVariants }
@@ -12,7 +12,7 @@ const MODAL_SIZE_CLASS = {
12
12
  xl: 'flex max-h-[min(92vh,880px)] max-w-5xl flex-col',
13
13
  } as const
14
14
 
15
- export type ModalSize = keyof typeof MODAL_SIZE_CLASS
15
+ type ModalSize = keyof typeof MODAL_SIZE_CLASS
16
16
 
17
17
  export interface ModalProps {
18
18
  open: boolean
@@ -17,11 +17,11 @@ import { Maximize2, Minimize2 } from 'lucide-react'
17
17
  export const SECTION_INSPECTOR_WIDTH_KEY = 'prenta:section-inspector-width'
18
18
  export const SECTION_INSPECTOR_DEFAULT_WIDTH = 320
19
19
  export const SECTION_INSPECTOR_MIN_WIDTH = 280
20
- export const SECTION_INSPECTOR_MAX_WIDTH = 640
21
- export const SECTION_INSPECTOR_MIN_CANVAS_WIDTH = 96
20
+ const SECTION_INSPECTOR_MAX_WIDTH = 640
21
+ const SECTION_INSPECTOR_MIN_CANVAS_WIDTH = 96
22
22
  /** Below this editor-row width the expand action uses an overlay panel. */
23
- export const SECTION_INSPECTOR_OVERLAY_BREAKPOINT = 768
24
- export const SECTION_INSPECTOR_OVERLAY_MAX_WIDTH = 480
23
+ const SECTION_INSPECTOR_OVERLAY_BREAKPOINT = 768
24
+ const SECTION_INSPECTOR_OVERLAY_MAX_WIDTH = 480
25
25
 
26
26
  function clampWidth(width: number, max = SECTION_INSPECTOR_MAX_WIDTH): number {
27
27
  return Math.min(max, Math.max(SECTION_INSPECTOR_MIN_WIDTH, width))
@@ -81,7 +81,7 @@ interface InspectorResizeContextValue {
81
81
 
82
82
  const InspectorResizeContext = createContext<InspectorResizeContextValue | null>(null)
83
83
 
84
- export function useInspectorResize(): InspectorResizeContextValue | null {
84
+ function useInspectorResize(): InspectorResizeContextValue | null {
85
85
  return useContext(InspectorResizeContext)
86
86
  }
87
87
 
@@ -40,7 +40,7 @@ const DOT_CLASS: Record<NonNullable<StatusBadgeVariants['tone']>, string> = {
40
40
  muted: 'bg-[var(--muted)]',
41
41
  }
42
42
 
43
- export type StatusBadgeVariants = VariantProps<typeof statusBadge>
43
+ type StatusBadgeVariants = VariantProps<typeof statusBadge>
44
44
  export type StatusBadgeTone = NonNullable<StatusBadgeVariants['tone']>
45
45
 
46
46
  export interface StatusBadgeProps extends HTMLAttributes<HTMLSpanElement>, StatusBadgeVariants {
@@ -62,5 +62,3 @@ export function StatusBadge({ tone, dot = true, className, children, ...rest }:
62
62
  </span>
63
63
  )
64
64
  }
65
-
66
- export { statusBadge as statusBadgeVariants }
@@ -40,7 +40,7 @@ const toggleThumb = cv(
40
40
  },
41
41
  )
42
42
 
43
- export type ToggleVariants = VariantProps<typeof toggleTrack>
43
+ type ToggleVariants = VariantProps<typeof toggleTrack>
44
44
 
45
45
  export interface ToggleProps extends ToggleVariants {
46
46
  checked: boolean
@@ -82,5 +82,3 @@ export function Toggle({
82
82
  </Switch.Root>
83
83
  )
84
84
  }
85
-
86
- export { toggleTrack as toggleTrackVariants, toggleThumb as toggleThumbVariants }
@@ -15,7 +15,7 @@ import { NavBuilderField } from './NavBuilderField.js'
15
15
  import { NumberField } from './NumberField.js'
16
16
  import { ComponentBlockField } from './ComponentBlockField.js'
17
17
 
18
- export interface FieldDefinition {
18
+ interface FieldDefinition {
19
19
  name: string
20
20
  type: string
21
21
  label: string
@@ -1,20 +1,3 @@
1
- export { FieldRenderer } from './FieldRenderer.js'
2
- export type { FieldRendererProps, FieldDefinition } from './FieldRenderer.js'
3
- export { TextField } from './TextField.js'
4
- export { RichTextField } from './RichTextField.js'
5
- export { SlugField } from './SlugField.js'
6
- export { SelectField } from './SelectField.js'
7
- export { MediaField } from './MediaField.js'
8
- export { RelationshipField } from './RelationshipField.js'
9
- export { DateField } from './DateField.js'
10
- export { ToggleField } from './ToggleField.js'
11
- export { ArrayField } from './ArrayField.js'
12
- export { BlockBuilderField } from './BlockBuilderField.js'
13
- export { PRESET_BLOCKS } from './block-types.js'
14
- export type { BlockTypeDefinition } from './block-types.js'
15
- export { GroupField } from './GroupField.js'
16
- export { NavBuilderField } from './NavBuilderField.js'
17
- export { NumberField } from './NumberField.js'
18
1
  export { ComponentBlockField } from './ComponentBlockField.js'
19
2
  export type { ComponentBlockFieldProps, ComponentBlockValue } from './ComponentBlockField.js'
20
3
  export { PropInput, defaultForType } from './PropInput.js'
@@ -74,10 +74,3 @@ export const tokens = {
74
74
  '2xl': 1536,
75
75
  } as const,
76
76
  }
77
-
78
- /** Map a space token to the corresponding Tailwind `space-y-*` / `gap-*` value. */
79
- export function spaceToTw(t: SpaceToken): string {
80
- // Tailwind's spacing utility already accepts the same scale, so we map
81
- // 1:1. Centralizing here means callers don't repeat the string literal.
82
- return t
83
- }
@@ -1,7 +1,16 @@
1
1
  import type { BrandAlignmentScoreResult } from '@prenta/core/brand-voice'
2
2
  import { cmsApi } from './api.js'
3
3
 
4
- export type { BrandAlignmentScoreResult }
4
+ /**
5
+ * Present only when an AI rewrite was wanted (`useAi`, remaining issues) but
6
+ * the governed runtime refused — `code` is the runtime refusal code and `hint`
7
+ * the operator-facing next step for the 503 "not configured" cases.
8
+ */
9
+ interface BrandVoiceFixAiUnavailable {
10
+ code: string
11
+ message: string
12
+ hint?: string
13
+ }
5
14
 
6
15
  export interface BrandVoiceFixResult {
7
16
  text: string
@@ -9,6 +18,14 @@ export interface BrandVoiceFixResult {
9
18
  beforeScore: BrandAlignmentScoreResult
10
19
  afterScore: BrandAlignmentScoreResult
11
20
  usedAi: boolean
21
+ aiUnavailable?: BrandVoiceFixAiUnavailable
22
+ }
23
+
24
+ /** Toast copy for a fix that fell back to rule-only edits because AI refused. */
25
+ export function brandVoiceFixAiNotice(result: BrandVoiceFixResult): string | null {
26
+ if (result.usedAi || !result.aiUnavailable) return null
27
+ const { message, hint } = result.aiUnavailable
28
+ return hint ? `${message} ${hint}` : message
12
29
  }
13
30
 
14
31
  export async function fixBrandVoiceContent(input: {
@@ -64,7 +64,7 @@ export interface CoauthorOptions {
64
64
  targetLength?: number
65
65
  }
66
66
 
67
- export interface CoauthorResult {
67
+ interface CoauthorResult {
68
68
  action: CoauthorAction
69
69
  text: string
70
70
  /** Populated only when `action === 'proofread'`. */
@@ -19,7 +19,7 @@ interface CollectionLike {
19
19
  }
20
20
 
21
21
  /** Look up a collection by slug; `collections` may be a record or an array. */
22
- export function findCollection(config: unknown, slug: string): CollectionLike | null {
22
+ function findCollection(config: unknown, slug: string): CollectionLike | null {
23
23
  const collections = (config as { collections?: unknown } | null | undefined)?.collections
24
24
  if (!collections) return null
25
25
  if (Array.isArray(collections)) {
@@ -32,7 +32,7 @@ export function findCollection(config: unknown, slug: string): CollectionLike |
32
32
  }
33
33
 
34
34
  /** Field definitions may be a record (keyed by name) or an array of `{ name }`. */
35
- export function declaredFieldNames(fields: unknown): Set<string> | null {
35
+ function declaredFieldNames(fields: unknown): Set<string> | null {
36
36
  if (!fields) return null
37
37
  if (Array.isArray(fields)) {
38
38
  return new Set(
@@ -3,7 +3,6 @@ import {
3
3
  isSectionEffectivelyVisible,
4
4
  type PageSection,
5
5
  } from '@prenta/core/page-sections'
6
- import { analyzeContent } from '@prenta/core/seo/analysis'
7
6
 
8
7
  const HTML_LIKE = /<\/?[a-z][\s\S]*>/i
9
8
 
@@ -19,27 +18,6 @@ export function buildEditorContentHtml(sections: PageSection[], body = ''): stri
19
18
  return parts.join('\n')
20
19
  }
21
20
 
22
- /** Live 0–100 SEO score from the current in-editor document state. */
23
- export function computeLiveSeoScore(input: {
24
- title: string
25
- slug: string
26
- seoTitle: string
27
- seoDescription: string
28
- focusKeyword?: string
29
- sections: PageSection[]
30
- bodyHtml?: string
31
- }): number {
32
- const content = buildEditorContentHtml(input.sections, input.bodyHtml ?? '')
33
- return analyzeContent({
34
- title: input.title,
35
- slug: input.slug,
36
- content,
37
- metaTitle: input.seoTitle,
38
- metaDescription: input.seoDescription,
39
- focusKeyphrase: input.focusKeyword,
40
- }).score
41
- }
42
-
43
21
  function extractSectionContentHtml(section: PageSection): string {
44
22
  const content = section.content
45
23
  if (!content || typeof content !== 'object') return ''