@prenta/admin 0.92.0 → 0.94.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 (425) hide show
  1. package/CHANGELOG.md +663 -0
  2. package/design-system/tokens.css +173 -71
  3. package/design-system/tokens.json +244 -63
  4. package/design-system/tokens.scss +203 -98
  5. package/design-system/tokens.tailwind.cjs +93 -38
  6. package/dist/AdminRoot.d.ts +27 -6
  7. package/dist/AdminRoot.d.ts.map +1 -1
  8. package/dist/AdminRoot.js.map +1 -1
  9. package/dist/__tests__/components/breakpoint-controls.render.test.d.ts +2 -0
  10. package/dist/__tests__/components/breakpoint-controls.render.test.d.ts.map +1 -0
  11. package/dist/__tests__/components/breakpoint-controls.render.test.js +51 -0
  12. package/dist/__tests__/components/breakpoint-controls.render.test.js.map +1 -0
  13. package/dist/__tests__/components/canvas-edit-tip.render.test.d.ts +2 -0
  14. package/dist/__tests__/components/canvas-edit-tip.render.test.d.ts.map +1 -0
  15. package/dist/__tests__/components/canvas-edit-tip.render.test.js +37 -0
  16. package/dist/__tests__/components/canvas-edit-tip.render.test.js.map +1 -0
  17. package/dist/__tests__/components/editor-rail.render.test.d.ts +2 -0
  18. package/dist/__tests__/components/editor-rail.render.test.d.ts.map +1 -0
  19. package/dist/__tests__/components/editor-rail.render.test.js +138 -0
  20. package/dist/__tests__/components/editor-rail.render.test.js.map +1 -0
  21. package/dist/__tests__/components/media-block.render.test.d.ts +2 -0
  22. package/dist/__tests__/components/media-block.render.test.d.ts.map +1 -0
  23. package/dist/__tests__/components/media-block.render.test.js +108 -0
  24. package/dist/__tests__/components/media-block.render.test.js.map +1 -0
  25. package/dist/__tests__/components/page-audit-panel.render.test.d.ts +2 -0
  26. package/dist/__tests__/components/page-audit-panel.render.test.d.ts.map +1 -0
  27. package/dist/__tests__/components/page-audit-panel.render.test.js +59 -0
  28. package/dist/__tests__/components/page-audit-panel.render.test.js.map +1 -0
  29. package/dist/__tests__/components/reflow-meter.render.test.d.ts +2 -0
  30. package/dist/__tests__/components/reflow-meter.render.test.d.ts.map +1 -0
  31. package/dist/__tests__/components/reflow-meter.render.test.js +94 -0
  32. package/dist/__tests__/components/reflow-meter.render.test.js.map +1 -0
  33. package/dist/__tests__/components/seo-char-count.test.js +24 -6
  34. package/dist/__tests__/components/seo-char-count.test.js.map +1 -1
  35. package/dist/__tests__/components/serp-preview.render.test.d.ts +2 -0
  36. package/dist/__tests__/components/serp-preview.render.test.d.ts.map +1 -0
  37. package/dist/__tests__/components/serp-preview.render.test.js +25 -0
  38. package/dist/__tests__/components/serp-preview.render.test.js.map +1 -0
  39. package/dist/__tests__/lib/breakpoints.test.d.ts +2 -0
  40. package/dist/__tests__/lib/breakpoints.test.d.ts.map +1 -0
  41. package/dist/__tests__/lib/breakpoints.test.js +67 -0
  42. package/dist/__tests__/lib/breakpoints.test.js.map +1 -0
  43. package/dist/__tests__/lib/canvas-edit-chrome.test.d.ts +2 -0
  44. package/dist/__tests__/lib/canvas-edit-chrome.test.d.ts.map +1 -0
  45. package/dist/__tests__/lib/canvas-edit-chrome.test.js +44 -0
  46. package/dist/__tests__/lib/canvas-edit-chrome.test.js.map +1 -0
  47. package/dist/__tests__/lib/media-format.test.d.ts +2 -0
  48. package/dist/__tests__/lib/media-format.test.d.ts.map +1 -0
  49. package/dist/__tests__/lib/media-format.test.js +70 -0
  50. package/dist/__tests__/lib/media-format.test.js.map +1 -0
  51. package/dist/__tests__/lib/page-audit-input.test.d.ts +2 -0
  52. package/dist/__tests__/lib/page-audit-input.test.d.ts.map +1 -0
  53. package/dist/__tests__/lib/page-audit-input.test.js +122 -0
  54. package/dist/__tests__/lib/page-audit-input.test.js.map +1 -0
  55. package/dist/__tests__/lib/page-editor-service.test.js +2 -0
  56. package/dist/__tests__/lib/page-editor-service.test.js.map +1 -1
  57. package/dist/__tests__/lib/page-redirect.test.d.ts +2 -0
  58. package/dist/__tests__/lib/page-redirect.test.d.ts.map +1 -0
  59. package/dist/__tests__/lib/page-redirect.test.js +26 -0
  60. package/dist/__tests__/lib/page-redirect.test.js.map +1 -0
  61. package/dist/__tests__/lib/rail-width.test.d.ts +2 -0
  62. package/dist/__tests__/lib/rail-width.test.d.ts.map +1 -0
  63. package/dist/__tests__/lib/rail-width.test.js +69 -0
  64. package/dist/__tests__/lib/rail-width.test.js.map +1 -0
  65. package/dist/__tests__/lib/reflow-baseline.test.d.ts +2 -0
  66. package/dist/__tests__/lib/reflow-baseline.test.d.ts.map +1 -0
  67. package/dist/__tests__/lib/reflow-baseline.test.js +56 -0
  68. package/dist/__tests__/lib/reflow-baseline.test.js.map +1 -0
  69. package/dist/__tests__/lib/reflow-probe.test.d.ts +2 -0
  70. package/dist/__tests__/lib/reflow-probe.test.d.ts.map +1 -0
  71. package/dist/__tests__/lib/reflow-probe.test.js +73 -0
  72. package/dist/__tests__/lib/reflow-probe.test.js.map +1 -0
  73. package/dist/__tests__/lib/version-diff.test.d.ts +2 -0
  74. package/dist/__tests__/lib/version-diff.test.d.ts.map +1 -0
  75. package/dist/__tests__/lib/version-diff.test.js +230 -0
  76. package/dist/__tests__/lib/version-diff.test.js.map +1 -0
  77. package/dist/__tests__/lib/version-history.test.d.ts +2 -0
  78. package/dist/__tests__/lib/version-history.test.d.ts.map +1 -0
  79. package/dist/__tests__/lib/version-history.test.js +125 -0
  80. package/dist/__tests__/lib/version-history.test.js.map +1 -0
  81. package/dist/__tests__/styles/canvas-container-queries.test.d.ts +2 -0
  82. package/dist/__tests__/styles/canvas-container-queries.test.d.ts.map +1 -0
  83. package/dist/__tests__/styles/canvas-container-queries.test.js +87 -0
  84. package/dist/__tests__/styles/canvas-container-queries.test.js.map +1 -0
  85. package/dist/__tests__/styles/packaging.test.d.ts +2 -0
  86. package/dist/__tests__/styles/packaging.test.d.ts.map +1 -0
  87. package/dist/__tests__/styles/packaging.test.js +31 -0
  88. package/dist/__tests__/styles/packaging.test.js.map +1 -0
  89. package/dist/__tests__/styles/responsive-layer.test.d.ts +2 -0
  90. package/dist/__tests__/styles/responsive-layer.test.d.ts.map +1 -0
  91. package/dist/__tests__/styles/responsive-layer.test.js +127 -0
  92. package/dist/__tests__/styles/responsive-layer.test.js.map +1 -0
  93. package/dist/__tests__/styles/tokens-drift.test.d.ts +2 -0
  94. package/dist/__tests__/styles/tokens-drift.test.d.ts.map +1 -0
  95. package/dist/__tests__/styles/tokens-drift.test.js +92 -0
  96. package/dist/__tests__/styles/tokens-drift.test.js.map +1 -0
  97. package/dist/__tests__/views/admin-renderer-compat.test.d.ts +2 -0
  98. package/dist/__tests__/views/admin-renderer-compat.test.d.ts.map +1 -0
  99. package/dist/__tests__/views/admin-renderer-compat.test.js +43 -0
  100. package/dist/__tests__/views/admin-renderer-compat.test.js.map +1 -0
  101. package/dist/__tests__/views/admin-section-renderers.test.js +52 -4
  102. package/dist/__tests__/views/admin-section-renderers.test.js.map +1 -1
  103. package/dist/__tests__/views/canvas-review-mode.render.test.d.ts +2 -0
  104. package/dist/__tests__/views/canvas-review-mode.render.test.d.ts.map +1 -0
  105. package/dist/__tests__/views/canvas-review-mode.render.test.js +70 -0
  106. package/dist/__tests__/views/canvas-review-mode.render.test.js.map +1 -0
  107. package/dist/__tests__/views/editor-top-bar.render.test.js +30 -1
  108. package/dist/__tests__/views/editor-top-bar.render.test.js.map +1 -1
  109. package/dist/__tests__/views/page-tab.render.test.d.ts +2 -0
  110. package/dist/__tests__/views/page-tab.render.test.d.ts.map +1 -0
  111. package/dist/__tests__/views/page-tab.render.test.js +151 -0
  112. package/dist/__tests__/views/page-tab.render.test.js.map +1 -0
  113. package/dist/__tests__/views/section-class-parity.test.d.ts +2 -0
  114. package/dist/__tests__/views/section-class-parity.test.d.ts.map +1 -0
  115. package/dist/__tests__/views/section-class-parity.test.js +81 -0
  116. package/dist/__tests__/views/section-class-parity.test.js.map +1 -0
  117. package/dist/__tests__/views/sections-panel-design-owned.render.test.d.ts +2 -0
  118. package/dist/__tests__/views/sections-panel-design-owned.render.test.d.ts.map +1 -0
  119. package/dist/__tests__/views/sections-panel-design-owned.render.test.js +86 -0
  120. package/dist/__tests__/views/sections-panel-design-owned.render.test.js.map +1 -0
  121. package/dist/__tests__/views/version-history-panel.render.test.d.ts +2 -0
  122. package/dist/__tests__/views/version-history-panel.render.test.d.ts.map +1 -0
  123. package/dist/__tests__/views/version-history-panel.render.test.js +153 -0
  124. package/dist/__tests__/views/version-history-panel.render.test.js.map +1 -0
  125. package/dist/components/BreakpointPicker.d.ts +18 -0
  126. package/dist/components/BreakpointPicker.d.ts.map +1 -0
  127. package/dist/components/BreakpointPicker.js +31 -0
  128. package/dist/components/BreakpointPicker.js.map +1 -0
  129. package/dist/components/CanvasEditTip.d.ts +6 -0
  130. package/dist/components/CanvasEditTip.d.ts.map +1 -0
  131. package/dist/components/CanvasEditTip.js +22 -0
  132. package/dist/components/CanvasEditTip.js.map +1 -0
  133. package/dist/components/EditorRail.d.ts +36 -0
  134. package/dist/components/EditorRail.d.ts.map +1 -0
  135. package/dist/components/EditorRail.js +104 -0
  136. package/dist/components/EditorRail.js.map +1 -0
  137. package/dist/components/EditorRailTabs.d.ts +32 -0
  138. package/dist/components/EditorRailTabs.d.ts.map +1 -0
  139. package/dist/components/EditorRailTabs.js +45 -0
  140. package/dist/components/EditorRailTabs.js.map +1 -0
  141. package/dist/components/MediaBlock.d.ts +49 -0
  142. package/dist/components/MediaBlock.d.ts.map +1 -0
  143. package/dist/components/MediaBlock.js +50 -0
  144. package/dist/components/MediaBlock.js.map +1 -0
  145. package/dist/components/ReflowMeter.d.ts +28 -0
  146. package/dist/components/ReflowMeter.d.ts.map +1 -0
  147. package/dist/components/ReflowMeter.js +42 -0
  148. package/dist/components/ReflowMeter.js.map +1 -0
  149. package/dist/components/ZoomChip.d.ts +17 -0
  150. package/dist/components/ZoomChip.d.ts.map +1 -0
  151. package/dist/components/ZoomChip.js +17 -0
  152. package/dist/components/ZoomChip.js.map +1 -0
  153. package/dist/components/breakpoint-icons.d.ts +3 -0
  154. package/dist/components/breakpoint-icons.d.ts.map +1 -0
  155. package/dist/components/breakpoint-icons.js +16 -0
  156. package/dist/components/breakpoint-icons.js.map +1 -0
  157. package/dist/components/page-tab/AuthorPicker.d.ts +31 -0
  158. package/dist/components/page-tab/AuthorPicker.d.ts.map +1 -0
  159. package/dist/components/page-tab/AuthorPicker.js +95 -0
  160. package/dist/components/page-tab/AuthorPicker.js.map +1 -0
  161. package/dist/components/page-tab/DirectiveSwitch.d.ts +38 -0
  162. package/dist/components/page-tab/DirectiveSwitch.d.ts.map +1 -0
  163. package/dist/components/page-tab/DirectiveSwitch.js +33 -0
  164. package/dist/components/page-tab/DirectiveSwitch.js.map +1 -0
  165. package/dist/components/seo/EditorSeoScoreBadge.d.ts +8 -1
  166. package/dist/components/seo/EditorSeoScoreBadge.d.ts.map +1 -1
  167. package/dist/components/seo/EditorSeoScoreBadge.js +2 -2
  168. package/dist/components/seo/EditorSeoScoreBadge.js.map +1 -1
  169. package/dist/components/seo/PageAuditPanel.d.ts +14 -0
  170. package/dist/components/seo/PageAuditPanel.d.ts.map +1 -0
  171. package/dist/components/seo/PageAuditPanel.js +59 -0
  172. package/dist/components/seo/PageAuditPanel.js.map +1 -0
  173. package/dist/components/seo/SeoCharCount.d.ts +19 -7
  174. package/dist/components/seo/SeoCharCount.d.ts.map +1 -1
  175. package/dist/components/seo/SeoCharCount.js +30 -16
  176. package/dist/components/seo/SeoCharCount.js.map +1 -1
  177. package/dist/components/seo/SeoEditorPane.d.ts +15 -1
  178. package/dist/components/seo/SeoEditorPane.d.ts.map +1 -1
  179. package/dist/components/seo/SeoEditorPane.js +118 -21
  180. package/dist/components/seo/SeoEditorPane.js.map +1 -1
  181. package/dist/components/seo/SerpPreview.d.ts +20 -0
  182. package/dist/components/seo/SerpPreview.d.ts.map +1 -0
  183. package/dist/components/seo/SerpPreview.js +6 -0
  184. package/dist/components/seo/SerpPreview.js.map +1 -0
  185. package/dist/hooks/usePageAudit.d.ts +41 -0
  186. package/dist/hooks/usePageAudit.d.ts.map +1 -0
  187. package/dist/hooks/usePageAudit.js +68 -0
  188. package/dist/hooks/usePageAudit.js.map +1 -0
  189. package/dist/hooks/useReflowGuard.d.ts +47 -0
  190. package/dist/hooks/useReflowGuard.d.ts.map +1 -0
  191. package/dist/hooks/useReflowGuard.js +52 -0
  192. package/dist/hooks/useReflowGuard.js.map +1 -0
  193. package/dist/layout/primitives/AdminShell.d.ts.map +1 -1
  194. package/dist/layout/primitives/AdminShell.js +2 -2
  195. package/dist/layout/primitives/AdminShell.js.map +1 -1
  196. package/dist/lib/breakpoints.d.ts +51 -0
  197. package/dist/lib/breakpoints.d.ts.map +1 -0
  198. package/dist/lib/breakpoints.js +84 -0
  199. package/dist/lib/breakpoints.js.map +1 -0
  200. package/dist/lib/canvas-edit-chrome.d.ts +22 -0
  201. package/dist/lib/canvas-edit-chrome.d.ts.map +1 -0
  202. package/dist/lib/canvas-edit-chrome.js +81 -0
  203. package/dist/lib/canvas-edit-chrome.js.map +1 -0
  204. package/dist/lib/media-format.d.ts +55 -0
  205. package/dist/lib/media-format.d.ts.map +1 -0
  206. package/dist/lib/media-format.js +93 -0
  207. package/dist/lib/media-format.js.map +1 -0
  208. package/dist/lib/page-audit-input.d.ts +45 -0
  209. package/dist/lib/page-audit-input.d.ts.map +1 -0
  210. package/dist/lib/page-audit-input.js +53 -0
  211. package/dist/lib/page-audit-input.js.map +1 -0
  212. package/dist/lib/page-editor-service.d.ts +12 -0
  213. package/dist/lib/page-editor-service.d.ts.map +1 -1
  214. package/dist/lib/page-editor-service.js +6 -0
  215. package/dist/lib/page-editor-service.js.map +1 -1
  216. package/dist/lib/page-redirect.d.ts +39 -0
  217. package/dist/lib/page-redirect.d.ts.map +1 -0
  218. package/dist/lib/page-redirect.js +38 -0
  219. package/dist/lib/page-redirect.js.map +1 -0
  220. package/dist/lib/rail-width.d.ts +23 -0
  221. package/dist/lib/rail-width.d.ts.map +1 -0
  222. package/dist/lib/rail-width.js +59 -0
  223. package/dist/lib/rail-width.js.map +1 -0
  224. package/dist/lib/reflow-baseline.d.ts +45 -0
  225. package/dist/lib/reflow-baseline.d.ts.map +1 -0
  226. package/dist/lib/reflow-baseline.js +38 -0
  227. package/dist/lib/reflow-baseline.js.map +1 -0
  228. package/dist/lib/reflow-probe.d.ts +159 -0
  229. package/dist/lib/reflow-probe.d.ts.map +1 -0
  230. package/dist/lib/reflow-probe.js +228 -0
  231. package/dist/lib/reflow-probe.js.map +1 -0
  232. package/dist/lib/seo-service.d.ts +10 -0
  233. package/dist/lib/seo-service.d.ts.map +1 -1
  234. package/dist/lib/seo-service.js.map +1 -1
  235. package/dist/lib/version-diff.d.ts +50 -0
  236. package/dist/lib/version-diff.d.ts.map +1 -0
  237. package/dist/lib/version-diff.js +294 -0
  238. package/dist/lib/version-diff.js.map +1 -0
  239. package/dist/lib/version-history.d.ts +73 -0
  240. package/dist/lib/version-history.d.ts.map +1 -0
  241. package/dist/lib/version-history.js +126 -0
  242. package/dist/lib/version-history.js.map +1 -0
  243. package/dist/prenta-admin.css +1 -1
  244. package/dist/views/page-editor/CanvasMetaLine.d.ts +19 -0
  245. package/dist/views/page-editor/CanvasMetaLine.d.ts.map +1 -0
  246. package/dist/views/page-editor/CanvasMetaLine.js +23 -0
  247. package/dist/views/page-editor/CanvasMetaLine.js.map +1 -0
  248. package/dist/views/page-editor/EditorCanvas.d.ts +47 -8
  249. package/dist/views/page-editor/EditorCanvas.d.ts.map +1 -1
  250. package/dist/views/page-editor/EditorCanvas.js +68 -34
  251. package/dist/views/page-editor/EditorCanvas.js.map +1 -1
  252. package/dist/views/page-editor/EditorTopBar.d.ts +21 -2
  253. package/dist/views/page-editor/EditorTopBar.d.ts.map +1 -1
  254. package/dist/views/page-editor/EditorTopBar.js +13 -20
  255. package/dist/views/page-editor/EditorTopBar.js.map +1 -1
  256. package/dist/views/page-editor/PageSectionEditor.d.ts.map +1 -1
  257. package/dist/views/page-editor/PageSectionEditor.js +383 -78
  258. package/dist/views/page-editor/PageSectionEditor.js.map +1 -1
  259. package/dist/views/page-editor/PageTab.d.ts +36 -0
  260. package/dist/views/page-editor/PageTab.d.ts.map +1 -0
  261. package/dist/views/page-editor/PageTab.js +65 -0
  262. package/dist/views/page-editor/PageTab.js.map +1 -0
  263. package/dist/views/page-editor/ReviewBar.d.ts +21 -0
  264. package/dist/views/page-editor/ReviewBar.d.ts.map +1 -0
  265. package/dist/views/page-editor/ReviewBar.js +22 -0
  266. package/dist/views/page-editor/ReviewBar.js.map +1 -0
  267. package/dist/views/page-editor/SectionInspector.d.ts.map +1 -1
  268. package/dist/views/page-editor/SectionInspector.js +64 -20
  269. package/dist/views/page-editor/SectionInspector.js.map +1 -1
  270. package/dist/views/page-editor/SectionsPanel.d.ts +30 -5
  271. package/dist/views/page-editor/SectionsPanel.d.ts.map +1 -1
  272. package/dist/views/page-editor/SectionsPanel.js +38 -7
  273. package/dist/views/page-editor/SectionsPanel.js.map +1 -1
  274. package/dist/views/page-editor/SitePreviewFrame.d.ts.map +1 -1
  275. package/dist/views/page-editor/SitePreviewFrame.js +3 -0
  276. package/dist/views/page-editor/SitePreviewFrame.js.map +1 -1
  277. package/dist/views/page-editor/VersionHistoryPanel.d.ts +29 -0
  278. package/dist/views/page-editor/VersionHistoryPanel.d.ts.map +1 -0
  279. package/dist/views/page-editor/VersionHistoryPanel.js +81 -0
  280. package/dist/views/page-editor/VersionHistoryPanel.js.map +1 -0
  281. package/dist/views/page-editor/reflow-context.d.ts +28 -0
  282. package/dist/views/page-editor/reflow-context.d.ts.map +1 -0
  283. package/dist/views/page-editor/reflow-context.js +14 -0
  284. package/dist/views/page-editor/reflow-context.js.map +1 -0
  285. package/dist/views/page-editor/sections/ByTheNumbersSection.d.ts.map +1 -1
  286. package/dist/views/page-editor/sections/ByTheNumbersSection.js +1 -1
  287. package/dist/views/page-editor/sections/ByTheNumbersSection.js.map +1 -1
  288. package/dist/views/page-editor/sections/CtaBannerSection.d.ts.map +1 -1
  289. package/dist/views/page-editor/sections/CtaBannerSection.js +1 -1
  290. package/dist/views/page-editor/sections/CtaBannerSection.js.map +1 -1
  291. package/dist/views/page-editor/sections/FeatureHighlightSection.d.ts.map +1 -1
  292. package/dist/views/page-editor/sections/FeatureHighlightSection.js +2 -2
  293. package/dist/views/page-editor/sections/FeatureHighlightSection.js.map +1 -1
  294. package/dist/views/page-editor/sections/GallerySection.d.ts.map +1 -1
  295. package/dist/views/page-editor/sections/GallerySection.js +7 -3
  296. package/dist/views/page-editor/sections/GallerySection.js.map +1 -1
  297. package/dist/views/page-editor/sections/HeroBannerSection.js +1 -1
  298. package/dist/views/page-editor/sections/HeroBannerSection.js.map +1 -1
  299. package/dist/views/page-editor/sections/MissionSection.d.ts.map +1 -1
  300. package/dist/views/page-editor/sections/MissionSection.js +1 -1
  301. package/dist/views/page-editor/sections/MissionSection.js.map +1 -1
  302. package/dist/views/page-editor/sections/PullQuoteSection.d.ts.map +1 -1
  303. package/dist/views/page-editor/sections/PullQuoteSection.js +1 -1
  304. package/dist/views/page-editor/sections/PullQuoteSection.js.map +1 -1
  305. package/dist/views/page-editor/sections/RelatedPostsSection.d.ts.map +1 -1
  306. package/dist/views/page-editor/sections/RelatedPostsSection.js +1 -1
  307. package/dist/views/page-editor/sections/RelatedPostsSection.js.map +1 -1
  308. package/dist/views/page-editor/sections/SectionRenderer.d.ts +13 -1
  309. package/dist/views/page-editor/sections/SectionRenderer.d.ts.map +1 -1
  310. package/dist/views/page-editor/sections/SectionRenderer.js +66 -26
  311. package/dist/views/page-editor/sections/SectionRenderer.js.map +1 -1
  312. package/dist/views/page-editor/sections/admin-renderers.d.ts +47 -15
  313. package/dist/views/page-editor/sections/admin-renderers.d.ts.map +1 -1
  314. package/dist/views/page-editor/sections/admin-renderers.js +27 -15
  315. package/dist/views/page-editor/sections/admin-renderers.js.map +1 -1
  316. package/dist/views/page-editor/sections/parts.d.ts +0 -1
  317. package/dist/views/page-editor/sections/parts.d.ts.map +1 -1
  318. package/dist/views/page-editor/sections/parts.js +41 -16
  319. package/dist/views/page-editor/sections/parts.js.map +1 -1
  320. package/dist/views/page-editor/viewports.d.ts +7 -14
  321. package/dist/views/page-editor/viewports.d.ts.map +1 -1
  322. package/dist/views/page-editor/viewports.js +7 -12
  323. package/dist/views/page-editor/viewports.js.map +1 -1
  324. package/dist/views/post-editor/PostEditorCanvas.d.ts +2 -1
  325. package/dist/views/post-editor/PostEditorCanvas.d.ts.map +1 -1
  326. package/dist/views/post-editor/PostEditorCanvas.js +5 -2
  327. package/dist/views/post-editor/PostEditorCanvas.js.map +1 -1
  328. package/dist/views/post-editor/PostSectionEditor.d.ts.map +1 -1
  329. package/dist/views/post-editor/PostSectionEditor.js +2 -20
  330. package/dist/views/post-editor/PostSectionEditor.js.map +1 -1
  331. package/dist/views/post-editor/PostTemplateEditor.d.ts.map +1 -1
  332. package/dist/views/post-editor/PostTemplateEditor.js +4 -1
  333. package/dist/views/post-editor/PostTemplateEditor.js.map +1 -1
  334. package/package.json +5 -3
  335. package/src/AdminRoot.tsx +27 -6
  336. package/src/__tests__/components/breakpoint-controls.render.test.tsx +57 -0
  337. package/src/__tests__/components/canvas-edit-tip.render.test.tsx +41 -0
  338. package/src/__tests__/components/editor-rail.render.test.tsx +192 -0
  339. package/src/__tests__/components/media-block.render.test.tsx +126 -0
  340. package/src/__tests__/components/page-audit-panel.render.test.tsx +64 -0
  341. package/src/__tests__/components/reflow-meter.render.test.tsx +144 -0
  342. package/src/__tests__/components/seo-char-count.test.tsx +26 -6
  343. package/src/__tests__/components/serp-preview.render.test.tsx +32 -0
  344. package/src/__tests__/lib/breakpoints.test.ts +84 -0
  345. package/src/__tests__/lib/canvas-edit-chrome.test.ts +56 -0
  346. package/src/__tests__/lib/media-format.test.ts +89 -0
  347. package/src/__tests__/lib/page-audit-input.test.ts +144 -0
  348. package/src/__tests__/lib/page-editor-service.test.ts +2 -0
  349. package/src/__tests__/lib/page-redirect.test.ts +29 -0
  350. package/src/__tests__/lib/rail-width.test.ts +86 -0
  351. package/src/__tests__/lib/reflow-baseline.test.ts +64 -0
  352. package/src/__tests__/lib/reflow-probe.test.ts +95 -0
  353. package/src/__tests__/lib/version-diff.test.ts +278 -0
  354. package/src/__tests__/lib/version-history.test.ts +166 -0
  355. package/src/__tests__/styles/canvas-container-queries.test.ts +103 -0
  356. package/src/__tests__/styles/packaging.test.ts +38 -0
  357. package/src/__tests__/styles/responsive-layer.test.ts +152 -0
  358. package/src/__tests__/styles/tokens-drift.test.ts +110 -0
  359. package/src/__tests__/views/admin-renderer-compat.test.ts +48 -0
  360. package/src/__tests__/views/admin-section-renderers.test.tsx +70 -4
  361. package/src/__tests__/views/canvas-review-mode.render.test.tsx +94 -0
  362. package/src/__tests__/views/editor-top-bar.render.test.tsx +43 -1
  363. package/src/__tests__/views/page-tab.render.test.tsx +226 -0
  364. package/src/__tests__/views/section-class-parity.test.ts +98 -0
  365. package/src/__tests__/views/sections-panel-design-owned.render.test.tsx +104 -0
  366. package/src/__tests__/views/version-history-panel.render.test.tsx +195 -0
  367. package/src/components/BreakpointPicker.tsx +114 -0
  368. package/src/components/CanvasEditTip.tsx +46 -0
  369. package/src/components/EditorRail.tsx +219 -0
  370. package/src/components/EditorRailTabs.tsx +117 -0
  371. package/src/components/MediaBlock.tsx +223 -0
  372. package/src/components/ReflowMeter.tsx +125 -0
  373. package/src/components/ZoomChip.tsx +39 -0
  374. package/src/components/breakpoint-icons.ts +17 -0
  375. package/src/components/page-tab/AuthorPicker.tsx +240 -0
  376. package/src/components/page-tab/DirectiveSwitch.tsx +89 -0
  377. package/src/components/seo/EditorSeoScoreBadge.tsx +9 -1
  378. package/src/components/seo/PageAuditPanel.tsx +192 -0
  379. package/src/components/seo/SeoCharCount.tsx +55 -24
  380. package/src/components/seo/SeoEditorPane.tsx +213 -31
  381. package/src/components/seo/SerpPreview.tsx +41 -0
  382. package/src/hooks/usePageAudit.ts +98 -0
  383. package/src/hooks/useReflowGuard.ts +96 -0
  384. package/src/layout/primitives/AdminShell.tsx +13 -1
  385. package/src/lib/breakpoints.ts +107 -0
  386. package/src/lib/canvas-edit-chrome.ts +82 -0
  387. package/src/lib/media-format.ts +99 -0
  388. package/src/lib/page-audit-input.ts +104 -0
  389. package/src/lib/page-editor-service.ts +18 -0
  390. package/src/lib/page-redirect.ts +60 -0
  391. package/src/lib/rail-width.ts +58 -0
  392. package/src/lib/reflow-baseline.ts +70 -0
  393. package/src/lib/reflow-probe.ts +299 -0
  394. package/src/lib/seo-service.ts +10 -0
  395. package/src/lib/version-diff.ts +376 -0
  396. package/src/lib/version-history.ts +192 -0
  397. package/src/styles/prenta-tokens.css +120 -42
  398. package/src/styles/responsive.css +281 -0
  399. package/src/styles/theme.css +138 -0
  400. package/src/views/page-editor/CanvasMetaLine.tsx +50 -0
  401. package/src/views/page-editor/EditorCanvas.tsx +140 -54
  402. package/src/views/page-editor/EditorTopBar.tsx +55 -51
  403. package/src/views/page-editor/PageSectionEditor.tsx +575 -185
  404. package/src/views/page-editor/PageTab.tsx +433 -0
  405. package/src/views/page-editor/ReviewBar.tsx +76 -0
  406. package/src/views/page-editor/SectionInspector.tsx +84 -42
  407. package/src/views/page-editor/SectionsPanel.tsx +282 -141
  408. package/src/views/page-editor/SitePreviewFrame.tsx +3 -0
  409. package/src/views/page-editor/VersionHistoryPanel.tsx +302 -0
  410. package/src/views/page-editor/reflow-context.ts +43 -0
  411. package/src/views/page-editor/sections/ByTheNumbersSection.tsx +3 -2
  412. package/src/views/page-editor/sections/CtaBannerSection.tsx +3 -1
  413. package/src/views/page-editor/sections/FeatureHighlightSection.tsx +3 -2
  414. package/src/views/page-editor/sections/GallerySection.tsx +7 -3
  415. package/src/views/page-editor/sections/HeroBannerSection.tsx +2 -2
  416. package/src/views/page-editor/sections/MissionSection.tsx +4 -2
  417. package/src/views/page-editor/sections/PullQuoteSection.tsx +3 -1
  418. package/src/views/page-editor/sections/RelatedPostsSection.tsx +2 -1
  419. package/src/views/page-editor/sections/SectionRenderer.tsx +115 -34
  420. package/src/views/page-editor/sections/admin-renderers.tsx +54 -15
  421. package/src/views/page-editor/sections/parts.tsx +46 -18
  422. package/src/views/page-editor/viewports.ts +13 -26
  423. package/src/views/post-editor/PostEditorCanvas.tsx +18 -11
  424. package/src/views/post-editor/PostSectionEditor.tsx +1 -56
  425. package/src/views/post-editor/PostTemplateEditor.tsx +3 -0
@@ -0,0 +1,281 @@
1
+ /*
2
+ * Prenta admin — responsive + accessibility layer.
3
+ *
4
+ * Port of `design-system/cms-responsive.css` from the page-builder design
5
+ * bundle. The prototype's own selectors (`.ni`, `.sec-panel`, `.icbtn`) do not
6
+ * exist here — this admin is Tailwind over the same tokens — so what is ported
7
+ * is the RULES, re-expressed against this codebase's real structure.
8
+ *
9
+ * Loaded after `theme.css`'s token blocks so it can adapt them, and scoped to
10
+ * `.prenta-admin` throughout: the admin renders inside consumer applications
11
+ * and must not restyle the host.
12
+ *
13
+ * Two rules from the source deliberately did NOT come across:
14
+ *
15
+ * - The prototype turns the sidebar into a fixed bottom bar under 768px.
16
+ * `AdminShell` already solves that size with a slide-in overlay driven by
17
+ * `matchMedia`, which the whole admin is built around; replacing a working
18
+ * navigation pattern was not part of finishing the page builder.
19
+ * - The blanket `min-height: 44px` on a list of prototype control classes.
20
+ * The equivalent here is `.prenta-touch-target`, applied per control —
21
+ * see the coarse-pointer block below for why a blanket `button` rule is
22
+ * the wrong shape.
23
+ */
24
+
25
+ /* ── Accessibility: applies at every size ─────────────────────────── */
26
+
27
+ /*
28
+ * A visible focus ring on everything, as a floor.
29
+ *
30
+ * `:focus-visible` rather than `:focus` so pointer users never see it. This
31
+ * sits in the base layer, so any component that opts into its own ring
32
+ * (`focus-visible:ring-2 focus-visible:outline-none`) still wins — utilities
33
+ * are a later layer — and this only fills in for the controls that have none.
34
+ */
35
+ .prenta-admin :focus-visible {
36
+ outline: var(--bw-focus, 2px) solid var(--acc);
37
+ outline-offset: 2px;
38
+ border-radius: 4px;
39
+ }
40
+
41
+ /* Controls flush against a panel edge draw the ring inside their own box, or
42
+ it is clipped by the scroll container they sit in. */
43
+ .prenta-admin [role='tab']:focus-visible,
44
+ .prenta-admin [role='separator']:focus-visible {
45
+ outline-offset: -2px;
46
+ }
47
+
48
+ /*
49
+ * Skip link. Rendered as the first child of the admin root by `AdminShell`,
50
+ * which also owns the `#prenta-main` target.
51
+ */
52
+ .prenta-admin .prenta-skip-link {
53
+ position: absolute;
54
+ left: -9999px;
55
+ top: 0;
56
+ z-index: 999;
57
+ padding: 10px 16px;
58
+ background: var(--acc);
59
+ color: #fff;
60
+ font-size: var(--fs-body, 13px);
61
+ font-weight: 600;
62
+ border-radius: 0 0 8px 0;
63
+ }
64
+
65
+ .prenta-admin .prenta-skip-link:focus {
66
+ left: 0;
67
+ }
68
+
69
+ /*
70
+ * Honour a stated preference for less motion.
71
+ *
72
+ * Tailwind's `motion-safe:` variant already covers the transitions written
73
+ * with it, but plenty of the admin's motion is unconditional, and a preference
74
+ * that holds for most of a screen is not honoured. `.reduce-motion` (an
75
+ * explicit Appearance setting, in theme.css) is the same rule by another
76
+ * trigger.
77
+ */
78
+ @media (prefers-reduced-motion: reduce) {
79
+ .prenta-admin,
80
+ .prenta-admin *,
81
+ .prenta-admin *::before,
82
+ .prenta-admin *::after {
83
+ animation-duration: 0.01ms !important;
84
+ animation-iteration-count: 1 !important;
85
+ transition-duration: 0.01ms !important;
86
+ scroll-behavior: auto !important;
87
+ }
88
+ }
89
+
90
+ /*
91
+ * Honour a stated preference for more contrast.
92
+ *
93
+ * Only the three tertiary tokens move, and only in the direction of more
94
+ * contrast than the shipped values — which are already an AA correction over
95
+ * the handoff's own numbers (see the `--muted` note in prenta-tokens.css).
96
+ * Set here rather than in the token file because that file is generated.
97
+ */
98
+ @media (prefers-contrast: more) {
99
+ .prenta-admin {
100
+ --muted: #5a5770;
101
+ --sub: #3d3a52;
102
+ --bdr: #c9c5dc;
103
+ }
104
+
105
+ .dark .prenta-admin,
106
+ .prenta-admin.dark,
107
+ .prenta-admin[data-theme='dark'] {
108
+ --muted: #a9a6c0;
109
+ --sub: #c4c1d8;
110
+ --bdr: #454263;
111
+ }
112
+ }
113
+
114
+ /*
115
+ * Touch devices: named controls clear the 44px target minimum.
116
+ *
117
+ * Opt-in per control rather than a blanket `button { min-height: 44px }`.
118
+ * The admin is full of dense tables and inline row actions where growing
119
+ * every button reflows the layout it sits in, and the prototype hit the same
120
+ * wall — it carries a curated list for exactly this reason. `.prenta-touch-target`
121
+ * is that list, expressed where the control is written instead of in a
122
+ * stylesheet that has to be kept in sync with class names.
123
+ *
124
+ * Pointer-based sizing is untouched: a 26px button is right with a mouse and
125
+ * wrong with a thumb.
126
+ */
127
+ @media (pointer: coarse) {
128
+ .prenta-admin .prenta-touch-target {
129
+ min-height: 44px;
130
+ min-width: 44px;
131
+ }
132
+
133
+ /*
134
+ * The exception, and the reason this is not one rule: a switch positions its
135
+ * knob against the track's own box, so stretching the track to 44px leaves
136
+ * the knob floating in the middle of dead space. Grow the HIT AREA instead
137
+ * and let the control paint at its designed size. Use this for any small
138
+ * control whose internals are positioned against its box.
139
+ *
140
+ * The insets are sized for the 34×19 directive switch: 19 + 26 = 45 tall,
141
+ * 34 + 12 = 46 wide.
142
+ */
143
+ .prenta-admin .prenta-touch-hit {
144
+ position: relative;
145
+ }
146
+
147
+ .prenta-admin .prenta-touch-hit::after {
148
+ content: '';
149
+ position: absolute;
150
+ inset-block: -13px;
151
+ inset-inline: -6px;
152
+ }
153
+ }
154
+
155
+ /* ── 4K / Retina (≥2000px) ────────────────────────────────────────── */
156
+ /* Stop the chrome thinning out to a ribbon on a very wide display. */
157
+ @media (min-width: 2000px) {
158
+ .prenta-admin {
159
+ --sbw: 280px;
160
+ }
161
+ }
162
+
163
+ /* ── Editor header (≤1180px): let the action cluster wrap ─────────── */
164
+ /*
165
+ * The breakpoint picker and zoom chip already hide below `md`. What remains
166
+ * still outgrows the bar before then, and a fixed-height flex row resolves
167
+ * that by crushing the title. Wrapping keeps the title readable and gives the
168
+ * actions a second line.
169
+ */
170
+ @media (max-width: 1180px) {
171
+ .prenta-admin .prenta-editor-header {
172
+ height: auto;
173
+ min-height: 0;
174
+ flex-wrap: wrap;
175
+ row-gap: 8px;
176
+ padding-top: 8px;
177
+ padding-bottom: 8px;
178
+ }
179
+
180
+ .prenta-admin .prenta-editor-header > * {
181
+ min-width: 0;
182
+ }
183
+ }
184
+
185
+ /* ── Tablet portrait (≤900px): the two-pane editor stacks ─────────── */
186
+ /*
187
+ * Side by side stops working before the canvas becomes useless, so the rail
188
+ * moves ABOVE the canvas and both take the full width. `!important` is
189
+ * required on the width: the rail's is an inline style (it is drag-resizable
190
+ * and persisted), and at this size a stored pixel width is meaningless anyway.
191
+ */
192
+ @media (max-width: 900px) {
193
+ .prenta-admin .prenta-editor-body {
194
+ flex-direction: column;
195
+ }
196
+
197
+ .prenta-admin .prenta-editor-rail {
198
+ width: 100% !important;
199
+ min-width: 0 !important;
200
+ max-height: 46vh;
201
+ border-right: none;
202
+ border-bottom: 1px solid var(--bdr);
203
+ }
204
+
205
+ /* Dragging a horizontal edge to set a width that no longer applies. */
206
+ .prenta-admin .prenta-editor-rail [role='separator'] {
207
+ display: none;
208
+ }
209
+
210
+ /* The collapsed strip's vertical label has no room to be vertical. */
211
+ .prenta-admin .prenta-editor-rail-collapsed {
212
+ width: 100% !important;
213
+ flex-direction: row;
214
+ align-items: center;
215
+ justify-content: flex-start;
216
+ gap: 10px;
217
+ padding: 0 12px;
218
+ height: 44px;
219
+ border-right: none;
220
+ border-bottom: 1px solid var(--bdr);
221
+ }
222
+
223
+ .prenta-admin .prenta-editor-rail-collapsed .prenta-rail-label {
224
+ writing-mode: horizontal-tb;
225
+ }
226
+
227
+ /* The inspector is a third column that no longer fits beside two others. */
228
+ .prenta-admin .prenta-editor-inspector {
229
+ width: 100% !important;
230
+ max-height: 46vh;
231
+ }
232
+ }
233
+
234
+ /* ── Mobile (≤460px) ──────────────────────────────────────────────── */
235
+ @media (max-width: 460px) {
236
+ /* Buttons that read as a pair go full width rather than shrinking to
237
+ nothing — the review bar's Restore / Back to current, in particular. */
238
+ .prenta-admin .prenta-editor-header button {
239
+ flex: 1 1 auto;
240
+ justify-content: center;
241
+ }
242
+ }
243
+
244
+ /* Landscape phones are short, not narrow — reclaim vertical space. */
245
+ @media (max-height: 520px) and (orientation: landscape) {
246
+ .prenta-admin .prenta-editor-rail {
247
+ max-height: none;
248
+ }
249
+
250
+ .prenta-admin .prenta-editor-header {
251
+ padding-top: 4px;
252
+ padding-bottom: 4px;
253
+ }
254
+ }
255
+
256
+ /*
257
+ * Printing a CMS screen is almost always a mistake. If it happens, drop the
258
+ * chrome and let the canvas print at its natural size rather than as a
259
+ * transformed, clipped thumbnail.
260
+ */
261
+ @media print {
262
+ .prenta-admin .prenta-editor-header,
263
+ .prenta-admin .prenta-editor-rail,
264
+ .prenta-admin .prenta-editor-rail-collapsed,
265
+ .prenta-admin .prenta-skip-link {
266
+ display: none !important;
267
+ }
268
+
269
+ .prenta-admin .prenta-canvas-scroll {
270
+ overflow: visible !important;
271
+ padding: 0 !important;
272
+ }
273
+
274
+ .prenta-admin .prenta-canvas-fit,
275
+ .prenta-admin .prenta-canvas {
276
+ width: auto !important;
277
+ height: auto !important;
278
+ transform: none !important;
279
+ box-shadow: none !important;
280
+ }
281
+ }
@@ -162,6 +162,29 @@
162
162
  --text-xs: var(--fs-hint);
163
163
  }
164
164
 
165
+ /*
166
+ * Canvas reflow steps — the container-query breakpoints the previewed PAGE
167
+ * reflows at, as distinct from Tailwind's `sm:`/`md:` viewport breakpoints,
168
+ * which describe the admin chrome around it.
169
+ *
170
+ * The canvas renders at a device's real CSS width and is scaled with a
171
+ * transform, so a viewport query there is meaningless: it would report the
172
+ * editor window's width, and picking "Mobile" on a wide monitor would render
173
+ * a 390px-wide canvas still laid out for desktop. Section renderers under
174
+ * `views/page-editor/sections/` must use `@pv-*`, never `sm:`/`md:`/`lg:`.
175
+ *
176
+ * Values come from the page-builder design handoff. Any element carrying
177
+ * these variants needs an ancestor with `@container` — EditorCanvas,
178
+ * PostEditorCanvas, PagePreview and PostPreview all declare it.
179
+ */
180
+ @theme {
181
+ --container-pv-sm: 460px; /* below: stats 1-up, buttons full width */
182
+ --container-pv-md: 700px; /* below: image+text stacks, quotes 1-up */
183
+ --container-pv-lg: 900px; /* below: quote grid 2-up, stats collapse */
184
+ --container-pv-xl: 1100px; /* below: general step-down */
185
+ --container-pv-2xl: 2000px; /* above: type and padding scale up */
186
+ }
187
+
165
188
  @layer base {
166
189
  .prenta-admin * {
167
190
  @apply border-border outline-ring/50;
@@ -255,6 +278,23 @@
255
278
  * The canvas re-establishes the site's typographic context: headings and
256
279
  * body text fall back to inheritance rather than the admin scale above.
257
280
  */
281
+ /*
282
+ * The canvas is the query container for every previewed section (`@pv-*`
283
+ * variants — see the step scale above). It lives here rather than as an
284
+ * `@container` utility on each host because FOUR surfaces render these
285
+ * sections — EditorCanvas, PostEditorCanvas, PagePreview, PostPreview — and
286
+ * a host that forgets it degrades silently: with no container ancestor,
287
+ * every `@pv-*` variant simply never matches and the page renders at its
288
+ * narrowest layout regardless of the selected breakpoint. Tying containment
289
+ * to the class that defines the surface makes that unforgettable.
290
+ *
291
+ * `inline-size` only: the canvas must stay free to grow as tall as its
292
+ * content, which `size` containment would prevent.
293
+ */
294
+ .prenta-admin .prenta-canvas {
295
+ container-type: inline-size;
296
+ }
297
+
258
298
  .prenta-admin .prenta-canvas :is(h1, h2, h3, h4) {
259
299
  font-size: revert-layer;
260
300
  font-weight: revert-layer;
@@ -383,6 +423,96 @@
383
423
  border-radius: var(--radius-md);
384
424
  margin: 1em 0;
385
425
  }
426
+
427
+ /*
428
+ * Structure canvas — lite hover outline on editable sections.
429
+ * Selected section chrome stays on the element (Tailwind outline-violet).
430
+ * Field-level chrome applies when renderers expose data-cms-field.
431
+ */
432
+ .prenta-admin .prenta-canvas [data-section-id][data-editable='true']:not([data-selected='true']) {
433
+ outline: 1px solid transparent;
434
+ outline-offset: -1px;
435
+ transition: outline-color 120ms ease;
436
+ }
437
+
438
+ .prenta-admin
439
+ .prenta-canvas
440
+ [data-section-id][data-editable='true']:not([data-selected='true']):hover {
441
+ outline-color: color-mix(in oklab, var(--acc) 40%, transparent);
442
+ }
443
+
444
+ .prenta-admin .prenta-canvas [data-cms-field] {
445
+ outline: 1px solid transparent;
446
+ outline-offset: 2px;
447
+ border-radius: 2px;
448
+ transition: outline-color 120ms ease;
449
+ cursor: text;
450
+ }
451
+
452
+ .prenta-admin .prenta-canvas [data-cms-field]:hover,
453
+ .prenta-admin .prenta-canvas [data-cms-field]:focus,
454
+ .prenta-admin .prenta-canvas [data-cms-field]:focus-within {
455
+ outline-color: color-mix(in oklab, var(--acc) 45%, transparent);
456
+ }
457
+
458
+ .prenta-admin .prenta-canvas [data-cms-field][data-cms-field-kind='media'] {
459
+ cursor: pointer;
460
+ }
461
+
462
+ @media (prefers-reduced-motion: reduce) {
463
+ .prenta-admin .prenta-canvas [data-section-id][data-editable='true'],
464
+ .prenta-admin .prenta-canvas [data-cms-field] {
465
+ transition: none;
466
+ }
467
+ }
468
+ }
469
+
470
+ /*
471
+ * Restore the stock Tailwind type scale inside the canvas.
472
+ *
473
+ * The `@theme inline` block above deliberately remaps six size keys onto admin
474
+ * design tokens so `text-base` means "admin body text, 13px" across the shell.
475
+ * That aliasing is right for admin chrome and wrong for the canvas, which
476
+ * renders the consumer's WEBSITE: there, `text-base` must mean 16px, the size
477
+ * a visitor actually reads. Left unscoped, every section renderer styles
478
+ * website copy on the admin scale — body text 3px small, `text-2xl` headings
479
+ * at 21px instead of 24px.
480
+ *
481
+ * This matters beyond looks. The reflow guard measures how copy wraps by
482
+ * laying it out in the canvas's own class chain; if the canvas renders type at
483
+ * the admin scale, every line count it reports is measured against a font size
484
+ * the live page never uses, and the guard is confidently wrong.
485
+ *
486
+ * Must live in `@layer utilities`, not `@layer base`: layer order beats
487
+ * specificity, so a base-layer rule — however specific — loses to the utility
488
+ * it is trying to correct. Inside the same layer, specificity decides, and
489
+ * three classes beat one.
490
+ *
491
+ * Only `font-size` is restated. The line-height half of each utility is a
492
+ * unitless ratio that scales correctly on its own.
493
+ *
494
+ * Values are Tailwind's defaults; the remapped keys are the only ones listed,
495
+ * because every other step (`text-3xl` and up) was never aliased.
496
+ */
497
+ @layer utilities {
498
+ .prenta-admin .prenta-canvas .text-xs {
499
+ font-size: 0.75rem;
500
+ }
501
+ .prenta-admin .prenta-canvas .text-sm {
502
+ font-size: 0.875rem;
503
+ }
504
+ .prenta-admin .prenta-canvas .text-base {
505
+ font-size: 1rem;
506
+ }
507
+ .prenta-admin .prenta-canvas .text-lg {
508
+ font-size: 1.125rem;
509
+ }
510
+ .prenta-admin .prenta-canvas .text-xl {
511
+ font-size: 1.25rem;
512
+ }
513
+ .prenta-admin .prenta-canvas .text-2xl {
514
+ font-size: 1.5rem;
515
+ }
386
516
  }
387
517
 
388
518
  .prenta-admin.reduce-motion,
@@ -394,3 +524,11 @@
394
524
  transition-duration: 0.001ms;
395
525
  scroll-behavior: auto;
396
526
  }
527
+
528
+ /*
529
+ * Responsive + accessibility layer. LAST on purpose: it adapts the tokens and
530
+ * rules above (the `prefers-contrast` block overrides token values, the
531
+ * editor-stacking rules override the rail's own borders), so it has to come
532
+ * after them.
533
+ */
534
+ @import './responsive.css';
@@ -0,0 +1,50 @@
1
+ 'use client'
2
+
3
+ import { Laptop, Monitor, Smartphone, Tablet, type LucideIcon } from 'lucide-react'
4
+ import type { Breakpoint } from '../../lib/breakpoints.js'
5
+
6
+ const ICONS: Record<string, LucideIcon> = {
7
+ monitor: Monitor,
8
+ laptop: Laptop,
9
+ tablet: Tablet,
10
+ smartphone: Smartphone,
11
+ }
12
+
13
+ interface CanvasMetaLineProps {
14
+ breakpoint: Breakpoint
15
+ /** Unscaled page height in px, measured from the canvas surface. */
16
+ pageHeight: number
17
+ /** Current transform scale, 0–1. */
18
+ scale: number
19
+ }
20
+
21
+ /**
22
+ * Reads out what the canvas is currently showing:
23
+ * `▣ Wide Screen | 1920 × 2174 px | 42% scale`.
24
+ *
25
+ * The dimensions are the page's own, before scaling — the number an editor
26
+ * needs when reasoning about the live page. The scale is the separate fact
27
+ * that the preview is shrunk to fit.
28
+ */
29
+ export function CanvasMetaLine({ breakpoint, pageHeight, scale }: CanvasMetaLineProps) {
30
+ const Icon = ICONS[breakpoint.icon] ?? Monitor
31
+ const percent = Math.round(scale * 100)
32
+
33
+ return (
34
+ <p
35
+ className="text-muted-foreground mb-3 inline-flex items-center gap-1.5 text-[11px] font-semibold tracking-[0.3px] whitespace-nowrap"
36
+ // The canvas is decorative chrome around the real content; announcing
37
+ // these numbers on every keystroke would flood a screen reader.
38
+ aria-hidden
39
+ >
40
+ <Icon className="h-3 w-3" />
41
+ <span className="text-foreground/70">{breakpoint.name}</span>
42
+ <span aria-hidden>|</span>
43
+ <span className="tabular-nums">
44
+ {breakpoint.width} × {pageHeight ? Math.round(pageHeight) : '—'} px
45
+ </span>
46
+ <span aria-hidden>|</span>
47
+ <span className="tabular-nums">{percent}% scale</span>
48
+ </p>
49
+ )
50
+ }