@elytracms/studio 0.0.93 → 0.0.95

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 (541) hide show
  1. package/convex/analytics-cost.test.ts +817 -0
  2. package/convex/asset-alt-migration.test.ts +2 -2
  3. package/convex/asset-meta-patch.test.ts +218 -0
  4. package/convex/asset-replace-delete-race.test.ts +127 -0
  5. package/convex/assets.ts +27 -2
  6. package/convex/auth.ts +5 -2
  7. package/convex/authority.ts +35 -11
  8. package/convex/contract-parity.test.ts +7 -0
  9. package/convex/delivery-redirects.test.ts +167 -0
  10. package/convex/delivery.ts +23 -10
  11. package/convex/guard.ts +9 -7
  12. package/convex/http-routes.test.ts +18 -8
  13. package/convex/http.ts +23 -17
  14. package/convex/ingest.test.ts +326 -0
  15. package/convex/ingest.ts +281 -0
  16. package/convex/invites.ts +13 -5
  17. package/convex/members.ts +10 -4
  18. package/convex/rail-write-parity.test.ts +6 -6
  19. package/convex/record-functions.ts +325 -0
  20. package/convex/records.test.ts +156 -0
  21. package/convex/redirect-migration.test.ts +205 -0
  22. package/convex/redirect-revalidate.test.ts +5 -1
  23. package/convex/redirects.ts +120 -79
  24. package/convex/role-policy.test.ts +315 -0
  25. package/convex/roles.ts +83 -0
  26. package/convex/schema.ts +36 -0
  27. package/convex/triggers.ts +21 -1
  28. package/dist/addon.d.ts +71 -0
  29. package/dist/addon.js +67 -0
  30. package/dist/addon.js.map +1 -0
  31. package/dist/components/account/account-settings.js +2 -2
  32. package/dist/components/account/account-settings.js.map +1 -1
  33. package/dist/components/account/credential-panel.js +2 -2
  34. package/dist/components/account/credential-panel.js.map +1 -1
  35. package/dist/components/account/self-account-schema.d.ts +6 -15
  36. package/dist/components/account/self-account-schema.js +52 -34
  37. package/dist/components/account/self-account-schema.js.map +1 -1
  38. package/dist/components/account/self-account-view-source.d.ts +1 -1
  39. package/dist/components/account/self-account-view-source.js +6 -4
  40. package/dist/components/account/self-account-view-source.js.map +1 -1
  41. package/dist/components/ai/ai-chat-panel-lazy.js +1 -1
  42. package/dist/components/ai/ai-chat-panel-lazy.js.map +1 -1
  43. package/dist/components/ai/ai-chat-panel.js +6 -6
  44. package/dist/components/ai/ai-chat-panel.js.map +1 -1
  45. package/dist/components/ai/ai-cms-panel.js +2 -2
  46. package/dist/components/ai/ai-cms-panel.js.map +1 -1
  47. package/dist/components/ai/ai-panel-toggle.js +4 -4
  48. package/dist/components/ai/ai-panel-toggle.js.map +1 -1
  49. package/dist/components/ai/chat-ui.js +2 -2
  50. package/dist/components/ai/chat-ui.js.map +1 -1
  51. package/dist/components/ai/proposal-card.d.ts +2 -2
  52. package/dist/components/ai/proposal-card.js +2 -2
  53. package/dist/components/ai/proposal-card.js.map +1 -1
  54. package/dist/components/ai/proposal-issues.js +2 -2
  55. package/dist/components/ai/proposal-issues.js.map +1 -1
  56. package/dist/components/ai/translate-document-action.js +2 -2
  57. package/dist/components/ai/translate-document-action.js.map +1 -1
  58. package/dist/components/ai/translate-document-dialog.js +6 -6
  59. package/dist/components/ai/translate-document-dialog.js.map +1 -1
  60. package/dist/components/ai/translate-skipped.d.ts +1 -1
  61. package/dist/components/ai/translate-skipped.js +2 -2
  62. package/dist/components/ai/translate-skipped.js.map +1 -1
  63. package/dist/components/app-views/default-modules.d.ts +50 -2
  64. package/dist/components/app-views/default-modules.js +65 -20
  65. package/dist/components/app-views/default-modules.js.map +1 -1
  66. package/dist/components/app-views/module.d.ts +53 -3
  67. package/dist/components/app-views/module.js +14 -7
  68. package/dist/components/app-views/module.js.map +1 -1
  69. package/dist/components/app-views/sidebar.js +1 -1
  70. package/dist/components/app-views/sidebar.js.map +1 -1
  71. package/dist/components/app-views/studio-config.d.ts +11 -2
  72. package/dist/components/app-views/studio-config.js.map +1 -1
  73. package/dist/components/assets/asset-detail.js +28 -13
  74. package/dist/components/assets/asset-detail.js.map +1 -1
  75. package/dist/components/assets/asset-grid.js +2 -2
  76. package/dist/components/assets/asset-grid.js.map +1 -1
  77. package/dist/components/assets/asset-locale.d.ts +9 -0
  78. package/dist/components/assets/asset-locale.js +16 -0
  79. package/dist/components/assets/asset-locale.js.map +1 -0
  80. package/dist/components/assets/asset-meta-label.d.ts +12 -0
  81. package/dist/components/assets/asset-meta-label.js +15 -0
  82. package/dist/components/assets/asset-meta-label.js.map +1 -0
  83. package/dist/components/assets/asset-metadata.d.ts +69 -15
  84. package/dist/components/assets/asset-metadata.js +99 -11
  85. package/dist/components/assets/asset-metadata.js.map +1 -1
  86. package/dist/components/assets/asset-search.js +8 -2
  87. package/dist/components/assets/asset-search.js.map +1 -1
  88. package/dist/components/assets/asset-thumb.js +9 -5
  89. package/dist/components/assets/asset-thumb.js.map +1 -1
  90. package/dist/components/assets/assets-collection-view-source.d.ts +25 -11
  91. package/dist/components/assets/assets-collection-view-source.js +78 -26
  92. package/dist/components/assets/assets-collection-view-source.js.map +1 -1
  93. package/dist/components/assets/assets-module.js +1 -1
  94. package/dist/components/assets/assets-module.js.map +1 -1
  95. package/dist/components/assets/assets-store.d.ts +2 -2
  96. package/dist/components/assets/assets-store.js +22 -9
  97. package/dist/components/assets/assets-store.js.map +1 -1
  98. package/dist/components/assets/assets-view-preference.js +1 -1
  99. package/dist/components/assets/assets-view-preference.js.map +1 -1
  100. package/dist/components/assets/replace-file.js +1 -1
  101. package/dist/components/assets/replace-file.js.map +1 -1
  102. package/dist/components/auth-context.d.ts +1 -1
  103. package/dist/components/auth-context.js +6 -6
  104. package/dist/components/auth-context.js.map +1 -1
  105. package/dist/components/builder/blocks-model.d.ts +1 -1
  106. package/dist/components/builder/blocks-model.js +3 -3
  107. package/dist/components/builder/blocks-model.js.map +1 -1
  108. package/dist/components/builder/blocks-panel.d.ts +1 -1
  109. package/dist/components/builder/blocks-panel.js +4 -4
  110. package/dist/components/builder/blocks-panel.js.map +1 -1
  111. package/dist/components/builder/builder-store.d.ts +21 -0
  112. package/dist/components/builder/builder-store.js +24 -2
  113. package/dist/components/builder/builder-store.js.map +1 -1
  114. package/dist/components/builder/canvas-breakpoints.js +1 -1
  115. package/dist/components/builder/canvas-breakpoints.js.map +1 -1
  116. package/dist/components/builder/canvas-commit-boundary.d.ts +22 -0
  117. package/dist/components/builder/canvas-commit-boundary.js +27 -0
  118. package/dist/components/builder/canvas-commit-boundary.js.map +1 -0
  119. package/dist/components/builder/canvas-dnd.d.ts +2 -2
  120. package/dist/components/builder/canvas-dnd.js +1 -1
  121. package/dist/components/builder/canvas-dnd.js.map +1 -1
  122. package/dist/components/builder/canvas-inline-editing.d.ts +1 -1
  123. package/dist/components/builder/canvas-inline-editing.js.map +1 -1
  124. package/dist/components/builder/canvas-overlay-geometry.d.ts +1 -1
  125. package/dist/components/builder/canvas-overlay-geometry.js.map +1 -1
  126. package/dist/components/builder/canvas-rebase.d.ts +77 -0
  127. package/dist/components/builder/canvas-rebase.js +169 -0
  128. package/dist/components/builder/canvas-rebase.js.map +1 -0
  129. package/dist/components/builder/canvas-render-context.d.ts +7 -4
  130. package/dist/components/builder/canvas-render-context.js +21 -13
  131. package/dist/components/builder/canvas-render-context.js.map +1 -1
  132. package/dist/components/builder/canvas-theme-notice.js +2 -2
  133. package/dist/components/builder/canvas-theme-notice.js.map +1 -1
  134. package/dist/components/builder/canvas.js +3 -3
  135. package/dist/components/builder/canvas.js.map +1 -1
  136. package/dist/components/builder/clipboard-actions.d.ts +2 -2
  137. package/dist/components/builder/clipboard-actions.js +4 -4
  138. package/dist/components/builder/clipboard-actions.js.map +1 -1
  139. package/dist/components/builder/composition-field-editor-lazy.js +1 -1
  140. package/dist/components/builder/composition-field-editor-lazy.js.map +1 -1
  141. package/dist/components/builder/composition-field-editor.d.ts +21 -3
  142. package/dist/components/builder/composition-field-editor.js +48 -30
  143. package/dist/components/builder/composition-field-editor.js.map +1 -1
  144. package/dist/components/builder/drag-session.d.ts +1 -1
  145. package/dist/components/builder/drag-session.js.map +1 -1
  146. package/dist/components/builder/fixture-thumbnail.js +1 -1
  147. package/dist/components/builder/fixture-thumbnail.js.map +1 -1
  148. package/dist/components/builder/insert-context.d.ts +1 -1
  149. package/dist/components/builder/insert-context.js +3 -3
  150. package/dist/components/builder/insert-context.js.map +1 -1
  151. package/dist/components/builder/layout-inspector.js +1 -1
  152. package/dist/components/builder/layout-inspector.js.map +1 -1
  153. package/dist/components/builder/node-factory.js +15 -3
  154. package/dist/components/builder/node-factory.js.map +1 -1
  155. package/dist/components/builder/node-title.js +1 -1
  156. package/dist/components/builder/node-title.js.map +1 -1
  157. package/dist/components/builder/page-tree.d.ts +1 -1
  158. package/dist/components/builder/page-tree.js +5 -5
  159. package/dist/components/builder/page-tree.js.map +1 -1
  160. package/dist/components/builder/placement-refusal.js +3 -3
  161. package/dist/components/builder/placement-refusal.js.map +1 -1
  162. package/dist/components/builder/property-inspector.js +7 -5
  163. package/dist/components/builder/property-inspector.js.map +1 -1
  164. package/dist/components/builder/reuse-context.js +4 -4
  165. package/dist/components/builder/reuse-context.js.map +1 -1
  166. package/dist/components/builder/reuse.js +1 -1
  167. package/dist/components/builder/reuse.js.map +1 -1
  168. package/dist/components/builder/rich-text-toolbar.js +1 -1
  169. package/dist/components/builder/rich-text-toolbar.js.map +1 -1
  170. package/dist/components/builder/run-inspector.js +11 -7
  171. package/dist/components/builder/run-inspector.js.map +1 -1
  172. package/dist/components/builder/selection-overlay.js +3 -3
  173. package/dist/components/builder/selection-overlay.js.map +1 -1
  174. package/dist/components/builder/spacing-handles.d.ts +2 -2
  175. package/dist/components/builder/spacing-handles.js +3 -3
  176. package/dist/components/builder/spacing-handles.js.map +1 -1
  177. package/dist/components/cms/asset-field.d.ts +5 -2
  178. package/dist/components/cms/asset-field.js +36 -19
  179. package/dist/components/cms/asset-field.js.map +1 -1
  180. package/dist/components/cms/asset-picker.js +5 -3
  181. package/dist/components/cms/asset-picker.js.map +1 -1
  182. package/dist/components/cms/bulk-actions.d.ts +1 -1
  183. package/dist/components/cms/bulk-actions.js +2 -2
  184. package/dist/components/cms/bulk-actions.js.map +1 -1
  185. package/dist/components/cms/bulk-bar.d.ts +2 -2
  186. package/dist/components/cms/bulk-bar.js +2 -2
  187. package/dist/components/cms/bulk-bar.js.map +1 -1
  188. package/dist/components/cms/canvas-commit.d.ts +56 -0
  189. package/dist/components/cms/canvas-commit.js +35 -0
  190. package/dist/components/cms/canvas-commit.js.map +1 -0
  191. package/dist/components/cms/cell-edit.d.ts +1 -1
  192. package/dist/components/cms/cell-edit.js +1 -1
  193. package/dist/components/cms/cell-edit.js.map +1 -1
  194. package/dist/components/cms/cell.d.ts +1 -1
  195. package/dist/components/cms/cell.js +3 -3
  196. package/dist/components/cms/cell.js.map +1 -1
  197. package/dist/components/cms/cms-index.js +2 -2
  198. package/dist/components/cms/cms-index.js.map +1 -1
  199. package/dist/components/cms/cms-labels.js +2 -2
  200. package/dist/components/cms/cms-labels.js.map +1 -1
  201. package/dist/components/cms/cms-store.d.ts +2 -2
  202. package/dist/components/cms/cms-store.js +10 -10
  203. package/dist/components/cms/cms-store.js.map +1 -1
  204. package/dist/components/cms/collection-table.js +30 -14
  205. package/dist/components/cms/collection-table.js.map +1 -1
  206. package/dist/components/cms/commit-policy.d.ts +6 -2
  207. package/dist/components/cms/commit-policy.js +1 -1
  208. package/dist/components/cms/commit-policy.js.map +1 -1
  209. package/dist/components/cms/detail-editor.d.ts +5 -2
  210. package/dist/components/cms/detail-editor.js +31 -15
  211. package/dist/components/cms/detail-editor.js.map +1 -1
  212. package/dist/components/cms/details-pane.js +1 -1
  213. package/dist/components/cms/details-pane.js.map +1 -1
  214. package/dist/components/cms/doc-state.js +1 -1
  215. package/dist/components/cms/doc-state.js.map +1 -1
  216. package/dist/components/cms/document-diff-view.js +5 -5
  217. package/dist/components/cms/document-diff-view.js.map +1 -1
  218. package/dist/components/cms/document-editor-context.js +1 -1
  219. package/dist/components/cms/document-editor-context.js.map +1 -1
  220. package/dist/components/cms/document-staging.js +1 -1
  221. package/dist/components/cms/document-staging.js.map +1 -1
  222. package/dist/components/cms/document-url-path.js +2 -2
  223. package/dist/components/cms/document-url-path.js.map +1 -1
  224. package/dist/components/cms/duplicate-document.d.ts +1 -1
  225. package/dist/components/cms/duplicate-document.js.map +1 -1
  226. package/dist/components/cms/editable-cell.js +3 -3
  227. package/dist/components/cms/editable-cell.js.map +1 -1
  228. package/dist/components/cms/field-collaboration.d.ts +1 -1
  229. package/dist/components/cms/field-collaboration.js +1 -1
  230. package/dist/components/cms/field-collaboration.js.map +1 -1
  231. package/dist/components/cms/field-connection.d.ts +1 -1
  232. package/dist/components/cms/field-connection.js +2 -2
  233. package/dist/components/cms/field-connection.js.map +1 -1
  234. package/dist/components/cms/field-control-lib.js +1 -1
  235. package/dist/components/cms/field-control-lib.js.map +1 -1
  236. package/dist/components/cms/field-control.js +4 -4
  237. package/dist/components/cms/field-control.js.map +1 -1
  238. package/dist/components/cms/field-renderer.d.ts +1 -1
  239. package/dist/components/cms/field-renderer.js +2 -2
  240. package/dist/components/cms/field-renderer.js.map +1 -1
  241. package/dist/components/cms/filter-builder.d.ts +1 -1
  242. package/dist/components/cms/filter-builder.js +3 -3
  243. package/dist/components/cms/filter-builder.js.map +1 -1
  244. package/dist/components/cms/gate-validation.js +1 -1
  245. package/dist/components/cms/gate-validation.js.map +1 -1
  246. package/dist/components/cms/import-export.js +2 -2
  247. package/dist/components/cms/import-export.js.map +1 -1
  248. package/dist/components/cms/issue-copy.js +1 -1
  249. package/dist/components/cms/issue-copy.js.map +1 -1
  250. package/dist/components/cms/issues-pane.js +3 -3
  251. package/dist/components/cms/issues-pane.js.map +1 -1
  252. package/dist/components/cms/object-array-field.js +2 -2
  253. package/dist/components/cms/object-array-field.js.map +1 -1
  254. package/dist/components/cms/prop-fields.js +2 -2
  255. package/dist/components/cms/prop-fields.js.map +1 -1
  256. package/dist/components/cms/reference-confirm.d.ts +1 -1
  257. package/dist/components/cms/reference-confirm.js +2 -2
  258. package/dist/components/cms/reference-confirm.js.map +1 -1
  259. package/dist/components/cms/relation-picker.js +2 -2
  260. package/dist/components/cms/relation-picker.js.map +1 -1
  261. package/dist/components/cms/rich-text/block-style.js +1 -1
  262. package/dist/components/cms/rich-text/block-style.js.map +1 -1
  263. package/dist/components/cms/rich-text/component-embed.js +4 -4
  264. package/dist/components/cms/rich-text/component-embed.js.map +1 -1
  265. package/dist/components/cms/rich-text/editor.js +3 -3
  266. package/dist/components/cms/rich-text/editor.js.map +1 -1
  267. package/dist/components/cms/rich-text/embed-picker.js +3 -3
  268. package/dist/components/cms/rich-text/embed-picker.js.map +1 -1
  269. package/dist/components/cms/rich-text/embed-props.js +3 -3
  270. package/dist/components/cms/rich-text/embed-props.js.map +1 -1
  271. package/dist/components/cms/rich-text/extensions.js +1 -1
  272. package/dist/components/cms/rich-text/extensions.js.map +1 -1
  273. package/dist/components/cms/rich-text/font-size-control.d.ts +1 -1
  274. package/dist/components/cms/rich-text/font-size-control.js +2 -2
  275. package/dist/components/cms/rich-text/font-size-control.js.map +1 -1
  276. package/dist/components/cms/rich-text/lazy.js +1 -1
  277. package/dist/components/cms/rich-text/lazy.js.map +1 -1
  278. package/dist/components/cms/rich-text/link-control.js +2 -2
  279. package/dist/components/cms/rich-text/link-control.js.map +1 -1
  280. package/dist/components/cms/rich-text/slash-command.js +3 -3
  281. package/dist/components/cms/rich-text/slash-command.js.map +1 -1
  282. package/dist/components/cms/rich-text/toolbar.js +1 -1
  283. package/dist/components/cms/rich-text/toolbar.js.map +1 -1
  284. package/dist/components/cms/rich-text/unknown-node.js +2 -2
  285. package/dist/components/cms/rich-text/unknown-node.js.map +1 -1
  286. package/dist/components/cms/rich-text-preview.js +2 -2
  287. package/dist/components/cms/rich-text-preview.js.map +1 -1
  288. package/dist/components/cms/row-actions.d.ts +1 -1
  289. package/dist/components/cms/row-actions.js.map +1 -1
  290. package/dist/components/cms/scalar-value-editor.d.ts +1 -1
  291. package/dist/components/cms/scalar-value-editor.js +2 -2
  292. package/dist/components/cms/scalar-value-editor.js.map +1 -1
  293. package/dist/components/cms/use-discard-controller.d.ts +1 -1
  294. package/dist/components/cms/use-discard-controller.js +1 -1
  295. package/dist/components/cms/use-discard-controller.js.map +1 -1
  296. package/dist/components/cms/use-document-draft.d.ts +69 -5
  297. package/dist/components/cms/use-document-draft.js +118 -34
  298. package/dist/components/cms/use-document-draft.js.map +1 -1
  299. package/dist/components/cms/use-document-versions.js +1 -1
  300. package/dist/components/cms/use-document-versions.js.map +1 -1
  301. package/dist/components/cms/use-field-focus.d.ts +1 -1
  302. package/dist/components/cms/use-field-focus.js +2 -2
  303. package/dist/components/cms/use-field-focus.js.map +1 -1
  304. package/dist/components/cms/use-live-url.d.ts +7 -2
  305. package/dist/components/cms/use-live-url.js +15 -12
  306. package/dist/components/cms/use-live-url.js.map +1 -1
  307. package/dist/components/cms/use-publish-controller.d.ts +1 -1
  308. package/dist/components/cms/use-publish-controller.js +1 -1
  309. package/dist/components/cms/use-publish-controller.js.map +1 -1
  310. package/dist/components/cms/use-published-perspective.d.ts +1 -1
  311. package/dist/components/cms/use-published-perspective.js.map +1 -1
  312. package/dist/components/cms/use-restore-version.d.ts +1 -1
  313. package/dist/components/cms/use-restore-version.js +1 -1
  314. package/dist/components/cms/use-restore-version.js.map +1 -1
  315. package/dist/components/cms/version-compare-lazy.js +1 -1
  316. package/dist/components/cms/version-compare-lazy.js.map +1 -1
  317. package/dist/components/cms/version-compare.js +1 -1
  318. package/dist/components/cms/version-compare.js.map +1 -1
  319. package/dist/components/cms/versions-pane.js +3 -3
  320. package/dist/components/cms/versions-pane.js.map +1 -1
  321. package/dist/components/cms/view-bar.js +3 -3
  322. package/dist/components/cms/view-bar.js.map +1 -1
  323. package/dist/components/collection-view/cms-collection-view-source.d.ts +1 -1
  324. package/dist/components/collection-view/cms-collection-view-source.js +11 -7
  325. package/dist/components/collection-view/cms-collection-view-source.js.map +1 -1
  326. package/dist/components/collection-view/collection-view-context.d.ts +1 -1
  327. package/dist/components/collection-view/collection-view-context.js +1 -1
  328. package/dist/components/collection-view/collection-view-context.js.map +1 -1
  329. package/dist/components/collection-view/collection-view-surface.d.ts +13 -0
  330. package/dist/components/collection-view/collection-view-surface.js +18 -0
  331. package/dist/components/collection-view/collection-view-surface.js.map +1 -0
  332. package/dist/components/components/component-detail.js +10 -10
  333. package/dist/components/components/component-detail.js.map +1 -1
  334. package/dist/components/components/component-preview.d.ts +2 -2
  335. package/dist/components/components/component-preview.js +5 -5
  336. package/dist/components/components/component-preview.js.map +1 -1
  337. package/dist/components/components/component-status.d.ts +1 -1
  338. package/dist/components/components/component-status.js +1 -1
  339. package/dist/components/components/component-status.js.map +1 -1
  340. package/dist/components/components/components-index.js +2 -2
  341. package/dist/components/components/components-index.js.map +1 -1
  342. package/dist/components/components/field-inspector.js +1 -1
  343. package/dist/components/components/field-inspector.js.map +1 -1
  344. package/dist/components/components/registry-browser.js +3 -3
  345. package/dist/components/components/registry-browser.js.map +1 -1
  346. package/dist/components/components/taxonomy.d.ts +1 -1
  347. package/dist/components/components/taxonomy.js.map +1 -1
  348. package/dist/components/components/transfer-dialog.js +3 -3
  349. package/dist/components/components/transfer-dialog.js.map +1 -1
  350. package/dist/components/current-user-menu.js +1 -1
  351. package/dist/components/current-user-menu.js.map +1 -1
  352. package/dist/components/delivery-health-banner.js +2 -2
  353. package/dist/components/delivery-health-banner.js.map +1 -1
  354. package/dist/components/deployment-setup-gate.js +13 -4
  355. package/dist/components/deployment-setup-gate.js.map +1 -1
  356. package/dist/components/dev-login-badge.js +2 -2
  357. package/dist/components/dev-login-badge.js.map +1 -1
  358. package/dist/components/guards.js +1 -1
  359. package/dist/components/guards.js.map +1 -1
  360. package/dist/components/inspector/document-panes.d.ts +54 -0
  361. package/dist/components/inspector/document-panes.js +41 -0
  362. package/dist/components/inspector/document-panes.js.map +1 -0
  363. package/dist/components/inspector/inspector-sidebar.js +1 -1
  364. package/dist/components/inspector/inspector-sidebar.js.map +1 -1
  365. package/dist/components/nav-issues-registry.d.ts +53 -0
  366. package/dist/components/nav-issues-registry.js +69 -0
  367. package/dist/components/nav-issues-registry.js.map +1 -0
  368. package/dist/components/nav-issues.js +4 -4
  369. package/dist/components/nav-issues.js.map +1 -1
  370. package/dist/components/operation-error.d.ts +1 -1
  371. package/dist/components/operation-error.js +4 -4
  372. package/dist/components/operation-error.js.map +1 -1
  373. package/dist/components/playground-badge.js +2 -2
  374. package/dist/components/playground-badge.js.map +1 -1
  375. package/dist/components/project-list.js +3 -3
  376. package/dist/components/project-list.js.map +1 -1
  377. package/dist/components/project-session.d.ts +2 -2
  378. package/dist/components/project-session.js +5 -5
  379. package/dist/components/project-session.js.map +1 -1
  380. package/dist/components/project-switcher.js +2 -2
  381. package/dist/components/project-switcher.js.map +1 -1
  382. package/dist/components/rail-store-status.js +1 -1
  383. package/dist/components/rail-store-status.js.map +1 -1
  384. package/dist/components/rail-view-source.d.ts +6 -5
  385. package/dist/components/rail-view-source.js +4 -3
  386. package/dist/components/rail-view-source.js.map +1 -1
  387. package/dist/components/records/record-lens.d.ts +51 -0
  388. package/dist/components/records/record-lens.js +151 -0
  389. package/dist/components/records/record-lens.js.map +1 -0
  390. package/dist/components/records/record-rail.d.ts +86 -0
  391. package/dist/components/records/record-rail.js +241 -0
  392. package/dist/components/records/record-rail.js.map +1 -0
  393. package/dist/components/redirects/redirects-schema.js +1 -1
  394. package/dist/components/redirects/redirects-schema.js.map +1 -1
  395. package/dist/components/references/references-panel.js +2 -2
  396. package/dist/components/references/references-panel.js.map +1 -1
  397. package/dist/components/section-nav.js +27 -11
  398. package/dist/components/section-nav.js.map +1 -1
  399. package/dist/components/section-state.js +2 -2
  400. package/dist/components/section-state.js.map +1 -1
  401. package/dist/components/section-surface.js +2 -2
  402. package/dist/components/section-surface.js.map +1 -1
  403. package/dist/components/session-expired-overlay.js +3 -3
  404. package/dist/components/session-expired-overlay.js.map +1 -1
  405. package/dist/components/settings-form.js +1 -1
  406. package/dist/components/settings-form.js.map +1 -1
  407. package/dist/components/sign-in-needed-badge.js +1 -1
  408. package/dist/components/sign-in-needed-badge.js.map +1 -1
  409. package/dist/components/sign-in-view.d.ts +2 -2
  410. package/dist/components/sign-in-view.js +5 -5
  411. package/dist/components/sign-in-view.js.map +1 -1
  412. package/dist/components/studio-context.js +3 -3
  413. package/dist/components/studio-context.js.map +1 -1
  414. package/dist/components/studio-project-screen.js +30 -3
  415. package/dist/components/studio-project-screen.js.map +1 -1
  416. package/dist/components/studio-shell.js +6 -5
  417. package/dist/components/studio-shell.js.map +1 -1
  418. package/dist/components/theme-context.d.ts +1 -1
  419. package/dist/components/theme-context.js +2 -2
  420. package/dist/components/theme-context.js.map +1 -1
  421. package/dist/components/use-hydration-phase.d.ts +1 -1
  422. package/dist/components/use-hydration-phase.js +1 -1
  423. package/dist/components/use-hydration-phase.js.map +1 -1
  424. package/dist/components/users/invite-user-bar.d.ts +27 -0
  425. package/dist/components/users/invite-user-bar.js +25 -9
  426. package/dist/components/users/invite-user-bar.js.map +1 -1
  427. package/dist/components/users/role-policy-drift-issues.d.ts +38 -0
  428. package/dist/components/users/role-policy-drift-issues.js +71 -0
  429. package/dist/components/users/role-policy-drift-issues.js.map +1 -0
  430. package/dist/components/users/users-collection-view-source.d.ts +1 -1
  431. package/dist/components/users/users-collection-view-source.js +4 -2
  432. package/dist/components/users/users-collection-view-source.js.map +1 -1
  433. package/dist/components/users/users-module.js +1 -1
  434. package/dist/components/users/users-module.js.map +1 -1
  435. package/dist/components/users/users-schema.d.ts +10 -1
  436. package/dist/components/users/users-schema.js +45 -25
  437. package/dist/components/users/users-schema.js.map +1 -1
  438. package/dist/components/users/users-store.js +3 -3
  439. package/dist/components/users/users-store.js.map +1 -1
  440. package/dist/components/workspace-projects.d.ts +1 -1
  441. package/dist/components/workspace-projects.js +1 -1
  442. package/dist/components/workspace-projects.js.map +1 -1
  443. package/dist/lib/ai/index.d.ts +1 -1
  444. package/dist/lib/ai/index.js +1 -1
  445. package/dist/lib/ai/index.js.map +1 -1
  446. package/dist/lib/ai/node-handler.d.ts +1 -1
  447. package/dist/lib/ai/node-handler.js.map +1 -1
  448. package/dist/lib/ai/translate-document.js +1 -1
  449. package/dist/lib/ai/translate-document.js.map +1 -1
  450. package/dist/lib/assets/upload.d.ts +25 -7
  451. package/dist/lib/assets/upload.js +30 -21
  452. package/dist/lib/assets/upload.js.map +1 -1
  453. package/dist/lib/clipboard/paste-issues.js +1 -1
  454. package/dist/lib/clipboard/paste-issues.js.map +1 -1
  455. package/dist/lib/clipboard/paste-target.js +2 -2
  456. package/dist/lib/clipboard/paste-target.js.map +1 -1
  457. package/dist/lib/cms/published-documents.d.ts +24 -6
  458. package/dist/lib/cms/published-documents.js +39 -6
  459. package/dist/lib/cms/published-documents.js.map +1 -1
  460. package/dist/lib/cms-views/view-model.d.ts +12 -99
  461. package/dist/lib/cms-views/view-model.js +22 -103
  462. package/dist/lib/cms-views/view-model.js.map +1 -1
  463. package/dist/lib/collection-view/collection-view-source.d.ts +13 -3
  464. package/dist/lib/collection-view/collection-view-source.js.map +1 -1
  465. package/dist/lib/data/content-session-refresh.d.ts +1 -1
  466. package/dist/lib/data/content-session-refresh.js.map +1 -1
  467. package/dist/lib/data/playground-unload-guard.d.ts +1 -1
  468. package/dist/lib/data/playground-unload-guard.js +1 -1
  469. package/dist/lib/data/playground-unload-guard.js.map +1 -1
  470. package/dist/lib/engine-version.d.ts +1 -1
  471. package/dist/lib/engine-version.js +1 -1
  472. package/dist/lib/engine-version.js.map +1 -1
  473. package/dist/lib/i18n/i18n.js +1 -1
  474. package/dist/lib/i18n/i18n.js.map +1 -1
  475. package/dist/lib/i18n/messages.de.js +11 -3
  476. package/dist/lib/i18n/messages.de.js.map +1 -1
  477. package/dist/lib/i18n/messages.en.d.ts +9 -1
  478. package/dist/lib/i18n/messages.en.js +16 -4
  479. package/dist/lib/i18n/messages.en.js.map +1 -1
  480. package/dist/lib/operations/config-manifest-lookup.d.ts +1 -1
  481. package/dist/lib/operations/config-manifest-lookup.js +3 -3
  482. package/dist/lib/operations/config-manifest-lookup.js.map +1 -1
  483. package/dist/lib/operations/project-runtime-config.d.ts +9 -0
  484. package/dist/lib/operations/project-runtime-config.js +13 -0
  485. package/dist/lib/operations/project-runtime-config.js.map +1 -1
  486. package/dist/lib/operations/studio-operations.d.ts +9 -1
  487. package/dist/lib/operations/studio-operations.js +6 -1
  488. package/dist/lib/operations/studio-operations.js.map +1 -1
  489. package/dist/lib/persistence/convex-adapter.d.ts +16 -3
  490. package/dist/lib/persistence/convex-adapter.js +78 -47
  491. package/dist/lib/persistence/convex-adapter.js.map +1 -1
  492. package/dist/lib/persistence/deployment-readiness.js +14 -11
  493. package/dist/lib/persistence/deployment-readiness.js.map +1 -1
  494. package/dist/lib/persistence/index.js +14 -1
  495. package/dist/lib/persistence/index.js.map +1 -1
  496. package/dist/lib/persona/labels.js +2 -1
  497. package/dist/lib/persona/labels.js.map +1 -1
  498. package/dist/lib/query/index.d.ts +2 -2
  499. package/dist/lib/query/index.js +1 -1
  500. package/dist/lib/query/index.js.map +1 -1
  501. package/dist/lib/query/operations-query.d.ts +27 -1
  502. package/dist/lib/query/operations-query.js +13 -1
  503. package/dist/lib/query/operations-query.js.map +1 -1
  504. package/dist/lib/references/reference-model.js +1 -1
  505. package/dist/lib/references/reference-model.js.map +1 -1
  506. package/dist/lib/references/references-store.js +1 -1
  507. package/dist/lib/references/references-store.js.map +1 -1
  508. package/dist/lib/registry/index.js +2 -2
  509. package/dist/lib/registry/index.js.map +1 -1
  510. package/dist/lib/registry/preview.d.ts +10 -0
  511. package/dist/lib/registry/preview.js +13 -4
  512. package/dist/lib/registry/preview.js.map +1 -1
  513. package/dist/lib/routes/route-issues.js +6 -3
  514. package/dist/lib/routes/route-issues.js.map +1 -1
  515. package/dist/lib/workspace/index.d.ts +6 -0
  516. package/dist/lib/workspace/index.js +8 -0
  517. package/dist/lib/workspace/index.js.map +1 -1
  518. package/dist/lib/workspace/workspace-source.js +6 -7
  519. package/dist/lib/workspace/workspace-source.js.map +1 -1
  520. package/dist/mount.d.ts +28 -0
  521. package/dist/mount.js +27 -0
  522. package/dist/mount.js.map +1 -0
  523. package/dist/previews/entry-node.d.ts +14 -0
  524. package/dist/previews/entry-node.js +22 -0
  525. package/dist/previews/entry-node.js.map +1 -0
  526. package/dist/previews/harness.js +2 -16
  527. package/dist/previews/harness.js.map +1 -1
  528. package/dist/router/root.js +10 -10
  529. package/dist/router/root.js.map +1 -1
  530. package/dist/ui/badge.d.ts +1 -1
  531. package/dist/ui/button.d.ts +2 -2
  532. package/package.json +15 -11
  533. package/dist/components/redirects/redirects-collection-view-source.d.ts +0 -53
  534. package/dist/components/redirects/redirects-collection-view-source.js +0 -146
  535. package/dist/components/redirects/redirects-collection-view-source.js.map +0 -1
  536. package/dist/components/redirects/redirects-module.d.ts +0 -21
  537. package/dist/components/redirects/redirects-module.js +0 -40
  538. package/dist/components/redirects/redirects-module.js.map +0 -1
  539. package/dist/components/redirects/redirects-store.d.ts +0 -68
  540. package/dist/components/redirects/redirects-store.js +0 -132
  541. package/dist/components/redirects/redirects-store.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"root.js","sourceRoot":"","sources":["../../src/router/root.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,eAAe,EACf,WAAW,EACX,MAAM,EACN,OAAO,EACP,WAAW,GACZ,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAA;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAA;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAA;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAA;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE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,iBAAiB,EAAE,GAAI,IAC7D,EACP,gBAAM,SAAS,EAAC,kEAAkE,aAC/E,QAAQ,EACT,KAAC,OAAO,KAAG,IACN,IACF,CACR,CAAA;AACH,CAAC","sourcesContent":["import type { ReactNode } from 'react'\nimport {\n createRootRoute,\n HeadContent,\n Outlet,\n Scripts,\n useLocation,\n} from '@tanstack/react-router'\nimport { NavigateOnce } from './navigate-once'\nimport { AuthProvider, useAuth } from '@elytracms/studio/components/auth-context'\nimport { DeploymentSetupGate } from '@elytracms/studio/components/deployment-setup-gate'\nimport { SessionExpiredOverlay } from '@elytracms/studio/components/session-expired-overlay'\nimport { StudioProvider } from '@elytracms/studio/components/studio-context'\nimport { ThemeProvider } from '@elytracms/studio/components/theme-context'\nimport { Loader2 } from 'lucide-react'\nimport { SIGN_IN_PATH, resolveRouteGuard } from '@elytracms/studio/lib/auth'\nimport { useHydrated, useT, useUiLocale } from '@elytracms/studio/lib/i18n'\nimport { setStudioBaseTitle } from '@elytracms/studio/lib/tab-title'\nimport { activeSlugForLocation, setActiveProjectSlug } from '@elytracms/studio/lib/workspace'\nimport { THEME_INIT_SCRIPT } from '@elytracms/studio/lib/theme'\n\n/**\n * Studio root-route boot factory (EC-375; consolidated from the copy-pasted\n * consumer `__root.tsx` by EC-369 finding #7). It assembles the ONE canonical\n * provider/gate stack — ThemeProvider → DeploymentSetupGate → AuthProvider(keyed)\n * → AuthGate → StudioProvider → Outlet — plus the `RootDocument` shell\n * (html/head with the pre-hydration theme script + the chrome stylesheet).\n *\n * Its whole purpose is to make the NEXT required-gate addition automatic on\n * package upgrade: when EC-258 added `DeploymentSetupGate`, every hand-copied\n * `__root.tsx` had to be manually re-synced, and Konditorei's silently missed\n * it for five releases (EC-367). Owning the composition here means a consumer's\n * `__root.tsx` shrinks to a thin shell and picks up new gates for free.\n *\n * The consumer re-exports the returned route as `Route` (the generated route\n * tree imports `Route` from `./routes/__root`):\n *\n * ```tsx\n * import { createStudioRootRoute } from '@elytracms/studio/router/root'\n * import appCss from '../styles/app.css?url'\n * export const Route = createStudioRootRoute({ appCssUrl: appCss })\n * ```\n */\nexport interface StudioRootRouteOptions {\n /**\n * URL of the studio chrome stylesheet, from the consumer's Vite `?url` import\n * (`import appCss from '../styles/app.css?url'`). The one option every consumer\n * must pass — the sheet is project-owned (it carries the delivery theme).\n */\n appCssUrl: string\n /** Document `<title>`. Default: `'Elytra'`. */\n title?: string\n /**\n * `<html lang>`. Defaults to the **resolved studio-UI locale** (EC-513): the\n * config-pinned `i18n.locale` if there is one, otherwise the default locale on the\n * server and, once browser detection takes over after hydration, the visitor's\n * preferred locale. Pass a value only to fix `lang` to something the chrome is not\n * actually rendered in.\n */\n htmlLang?: string\n /**\n * Extra `<head>` meta entries appended after the defaults (charset, viewport,\n * title). Same shape TanStack Router's `head().meta` takes.\n */\n meta?: Array<Record<string, string>>\n /** Extra `<head>` link entries appended after the app stylesheet. */\n links?: Array<Record<string, string>>\n /**\n * Escape hatch: wrap additional project-specific providers around the routed\n * subtree. Rendered INSIDE `StudioProvider` and around `<Outlet />`, so nested\n * providers see the full studio/auth/theme context and remount with the active\n * project. Return the passed `children` wrapped in your providers.\n */\n providers?: (children: ReactNode) => ReactNode\n}\n\nexport function createStudioRootRoute(options: StudioRootRouteOptions) {\n const { appCssUrl, title = 'Elytra', htmlLang, meta = [], links = [], providers } = options\n\n // EC-402: register the base title for the shell's per-view tab-title effect\n // (`StudioTabTitle` composes `deepest crumb · view · project · <this title>`\n // and restores exactly this value when leaving a project view). Module-holder\n // seam — same pattern as `setActiveProjectSlug` — so the shell never has to\n // capture `document.title` and race the router's own head effect.\n setStudioBaseTitle(title)\n\n function RootComponent() {\n const location = useLocation()\n // EC-513: locale resolution is client-side, so the studio boots in the server's\n // locale (default, or the `i18n.locale` pin) and hands over to the browser's\n // preference AFTER hydration — the hydration render has to reproduce the server's\n // markup or React discards the tree with a mismatch error. Subscribing HERE, at the\n // one root above the whole chrome, is what makes the handover visible everywhere:\n // ~948 of the studio's localized render sites call the non-hook `translate()` and\n // would otherwise never re-render for it. It also keeps `<html lang>` honest —\n // it names the language the chrome is actually rendered in, at every moment.\n const uiLocale = useUiLocale()\n // EC-179: the active project selects its Convex backend. Resolve it from the\n // URL (or the sign-in redirect target) and bind it *before* the auth and\n // persistence adapters are selected, so the initial sign-in authenticates\n // against the project the user is heading for. Keying the auth/studio subtree\n // by the active project remounts it on a project switch, so the adapters\n // re-select against the new backend and the session is restored per-backend.\n const activeSlug = activeSlugForLocation(\n location.pathname,\n (location.search as { redirect?: string }).redirect,\n )\n setActiveProjectSlug(activeSlug)\n\n return (\n <RootDocument htmlLang={htmlLang ?? uiLocale}>\n <ThemeProvider>\n {/* EC-258: one deployment-setup gate runs before auth — a misconfigured or\n unreachable backend, an invalid workspace config, or any failing readiness\n precondition (missing auth signing key, required collections, …) is a\n single visible boot screen with copy-pasteable fixes, never a silent\n in-memory fallback or a misleading downstream error. All checks passing\n renders children as before. */}\n <DeploymentSetupGate>\n <AuthProvider key={activeSlug ?? '__launcher__'}>\n <AuthGate>\n <StudioProvider>\n {providers ? providers(<Outlet />) : <Outlet />}\n {/* EC-403: the blocking in-place re-auth overlay — mounted over\n every route, INSIDE StudioProvider (it invalidates the studio\n query cache on re-auth) and inside AuthProvider (it reads the\n sessionExpired state). Renders null unless the session died. */}\n <SessionExpiredOverlay />\n </StudioProvider>\n </AuthGate>\n </AuthProvider>\n </DeploymentSetupGate>\n </ThemeProvider>\n </RootDocument>\n )\n }\n\n return createRootRoute({\n head: () => ({\n meta: [\n { charSet: 'utf-8' },\n { name: 'viewport', content: 'width=device-width, initial-scale=1' },\n { title },\n ...meta,\n ],\n links: [{ rel: 'stylesheet', href: appCssUrl }, ...links],\n }),\n component: RootComponent,\n })\n}\n\n/**\n * Route guard (EC-150): one chokepoint in the root layout. Unauthenticated\n * visitors on protected paths are redirected to the sign-in screen (with the\n * intended target preserved); signed-in users never see the sign-in screen.\n * The decision logic is the pure, unit-tested `resolveRouteGuard`.\n */\nfunction AuthGate({ children }: { children: ReactNode }) {\n const { status } = useAuth()\n const location = useLocation()\n // EC-451: feed the still-pending `?redirect` search param into the decision.\n // Dev auto-login (or any fast real sign-in — SSO return, password-manager\n // autofill) can flip the session to signed-in while the location is still\n // `/sign-in?redirect=…`, BEFORE `SignInView`'s own post-sign-in navigation\n // runs; the gate's bounce then fires first and must consume the target\n // instead of dropping it on an unconditional `/`. The target is validated\n // by `postSignInTarget` inside `resolveRouteGuard` (same-origin relative\n // paths only — redirect is an attacker-suppliable search param).\n const rawRedirect = (location.search as { redirect?: unknown }).redirect\n const redirect = typeof rawRedirect === 'string' ? rawRedirect : undefined\n const decision = resolveRouteGuard(location.pathname, status, redirect)\n\n if (decision.kind === 'pending') return <SessionLoading />\n if (decision.kind === 'redirect-to-sign-in') {\n // EC-441: `NavigateOnce`, not `<Navigate>` — the gate stays mounted while\n // the sign-in transition is pending, and a per-render re-navigate spirals\n // into the router's update-depth rejection.\n return <NavigateOnce to={SIGN_IN_PATH} search={{ redirect: decision.redirect }} replace />\n }\n if (decision.kind === 'redirect-home') return <NavigateOnce to={decision.target} replace />\n return children\n}\n\n/**\n * The studio's boot screen: the deterministic session-restore state and — because a\n * request-less render always finds the auth gate `pending` — the entire body of the\n * build-time prerendered SPA shell (`dist/client/_shell.html`).\n *\n * **It is deliberately wordless** (EC-523; owner-ratified 2026-08-01: *\"remove the text\n * — if we really need something while loading, add a simple spinner, but not mandatory —\n * the shell should stay free of side-effects\"*). A build-time prerender has no request,\n * hence no `Accept-Language` and no session, so it cannot know the visitor's language.\n * EC-513 fixed the one string that flipped after hydration; removing the words removes\n * the possibility of the next one.\n *\n * **Accessibility**, because \"no words\" must not mean \"no accessible name\": moving the\n * text into an `aria-label` bakes the very same wrong-language string into the shell,\n * only somewhere a screen-reader user cannot notice it flip. So the shell ships an\n * **empty** `role=\"status\"` region — the correct live-region shape in any case, since a\n * region must already exist in the DOM for a later insertion to be announced — and\n * `useHydrated` fills it once hydration is done, in the visitor's actual locale. The\n * unannounced window is bounded by hydration, i.e. exactly the window in which no\n * announcement could have been correct.\n *\n * Do **not** add `aria-busy` here: on a live region it tells assistive tech to withhold\n * updates, which would suppress the very announcement this shape exists to deliver.\n *\n * Exported so the shell's pre-hydration markup is pinnable with `renderToStaticMarkup`\n * (`root.test.tsx`) — the built artefact is the real proof, but nothing else in the\n * node test pattern can reach this render.\n */\nexport function SessionLoading() {\n const hydrated = useHydrated()\n const t = useT()\n return (\n <div className=\"grid min-h-dvh place-items-center bg-background\" role=\"status\">\n <Loader2 className=\"size-6 animate-spin text-muted-foreground\" aria-hidden=\"true\" />\n {hydrated ? <span className=\"sr-only\">{t('auth.boot.checkingSession')}</span> : null}\n </div>\n )\n}\n\nfunction RootDocument({ children, htmlLang }: { children: ReactNode; htmlLang: string }) {\n // Dark-first SSR baseline; THEME_INIT_SCRIPT flips the class pre-hydration\n // from the stored preference, and ThemeProvider keeps it reactive thereafter.\n // suppressHydrationWarning: the script intentionally mutates the class before\n // React hydrates, so a className mismatch on <html> is expected, not a bug.\n // The app stylesheet is emitted via head().links and rendered by <HeadContent />.\n //\n // EC-523: `lang` is the ONE locale-dependent value that stays in the prerendered\n // shell, and it must. There is no locale-free value for it, and dropping it is a real\n // accessibility regression (a screen reader picks its voice from the document\n // language). It is baked as the build's default locale and flips to the visitor's\n // after hydration — honest at every moment, since EC-513 made it name the language the\n // chrome is actually rendered in. The mismatch it would otherwise raise is covered by\n // the same `suppressHydrationWarning` the theme script needs. Do not \"fix\" it by\n // hard-coding a value: that trades an attribute that is briefly stale for one that is\n // permanently wrong.\n return (\n <html lang={htmlLang} className=\"dark\" suppressHydrationWarning>\n <head>\n <HeadContent />\n <script dangerouslySetInnerHTML={{ __html: THEME_INIT_SCRIPT }} />\n </head>\n <body className=\"min-h-screen bg-background font-sans text-foreground antialiased\">\n {children}\n <Scripts />\n </body>\n </html>\n )\n}\n"]}
1
+ {"version":3,"file":"root.js","sourceRoot":"","sources":["../../src/router/root.tsx"],"names":[],"mappings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SAAS,EAAC,SAAS,YAAE,CAAC,CAAC,2BAA2B,CAAC,GAAQ,CAAC,CAAC,CAAC,IAAI,IAChF,CACP,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAA6C;IACrF,2EAA2E;IAC3E,8EAA8E;IAC9E,8EAA8E;IAC9E,4EAA4E;IAC5E,kFAAkF;IAClF,EAAE;IACF,iFAAiF;IACjF,sFAAsF;IACtF,8EAA8E;IAC9E,kFAAkF;IAClF,uFAAuF;IACvF,sFAAsF;IACtF,iFAAiF;IACjF,sFAAsF;IACtF,qBAAqB;IACrB,OAAO,CACL,gBAAM,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,EAAC,wBAAwB,mBAC7D,2BACE,KAAC,WAAW,KAAG,EACf,iBAAQ,uBAAuB,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAI,IAC7D,EACP,gBAAM,SAAS,EAAC,kEAAkE,aAC/E,QAAQ,EACT,KAAC,OAAO,KAAG,IACN,IACF,CACR,CAAA;AACH,CAAC","sourcesContent":["import type { ReactNode } from 'react'\nimport {\n createRootRoute,\n HeadContent,\n Outlet,\n Scripts,\n useLocation,\n} from '@tanstack/react-router'\nimport { NavigateOnce } from './navigate-once'\nimport { AuthProvider, useAuth } from '../components/auth-context'\nimport { DeploymentSetupGate } from '../components/deployment-setup-gate'\nimport { SessionExpiredOverlay } from '../components/session-expired-overlay'\nimport { StudioProvider } from '../components/studio-context'\nimport { ThemeProvider } from '../components/theme-context'\nimport { Loader2 } from 'lucide-react'\nimport { SIGN_IN_PATH, resolveRouteGuard } from '../lib/auth'\nimport { useHydrated, useT, useUiLocale } from '../lib/i18n'\nimport { setStudioBaseTitle } from '../lib/tab-title'\nimport { activeSlugForLocation, setActiveProjectSlug } from '../lib/workspace'\nimport { THEME_INIT_SCRIPT } from '../lib/theme'\n\n/**\n * Studio root-route boot factory (EC-375; consolidated from the copy-pasted\n * consumer `__root.tsx` by EC-369 finding #7). It assembles the ONE canonical\n * provider/gate stack — ThemeProvider → DeploymentSetupGate → AuthProvider(keyed)\n * → AuthGate → StudioProvider → Outlet — plus the `RootDocument` shell\n * (html/head with the pre-hydration theme script + the chrome stylesheet).\n *\n * Its whole purpose is to make the NEXT required-gate addition automatic on\n * package upgrade: when EC-258 added `DeploymentSetupGate`, every hand-copied\n * `__root.tsx` had to be manually re-synced, and Konditorei's silently missed\n * it for five releases (EC-367). Owning the composition here means a consumer's\n * `__root.tsx` shrinks to a thin shell and picks up new gates for free.\n *\n * The consumer re-exports the returned route as `Route` (the generated route\n * tree imports `Route` from `./routes/__root`):\n *\n * ```tsx\n * import { createStudioRootRoute } from '@elytracms/studio/router/root'\n * import appCss from '../styles/app.css?url'\n * export const Route = createStudioRootRoute({ appCssUrl: appCss })\n * ```\n */\nexport interface StudioRootRouteOptions {\n /**\n * URL of the studio chrome stylesheet, from the consumer's Vite `?url` import\n * (`import appCss from '../styles/app.css?url'`). The one option every consumer\n * must pass — the sheet is project-owned (it carries the delivery theme).\n */\n appCssUrl: string\n /** Document `<title>`. Default: `'Elytra'`. */\n title?: string\n /**\n * `<html lang>`. Defaults to the **resolved studio-UI locale** (EC-513): the\n * config-pinned `i18n.locale` if there is one, otherwise the default locale on the\n * server and, once browser detection takes over after hydration, the visitor's\n * preferred locale. Pass a value only to fix `lang` to something the chrome is not\n * actually rendered in.\n */\n htmlLang?: string\n /**\n * Extra `<head>` meta entries appended after the defaults (charset, viewport,\n * title). Same shape TanStack Router's `head().meta` takes.\n */\n meta?: Array<Record<string, string>>\n /** Extra `<head>` link entries appended after the app stylesheet. */\n links?: Array<Record<string, string>>\n /**\n * Escape hatch: wrap additional project-specific providers around the routed\n * subtree. Rendered INSIDE `StudioProvider` and around `<Outlet />`, so nested\n * providers see the full studio/auth/theme context and remount with the active\n * project. Return the passed `children` wrapped in your providers.\n */\n providers?: (children: ReactNode) => ReactNode\n}\n\nexport function createStudioRootRoute(options: StudioRootRouteOptions) {\n const { appCssUrl, title = 'Elytra', htmlLang, meta = [], links = [], providers } = options\n\n // EC-402: register the base title for the shell's per-view tab-title effect\n // (`StudioTabTitle` composes `deepest crumb · view · project · <this title>`\n // and restores exactly this value when leaving a project view). Module-holder\n // seam — same pattern as `setActiveProjectSlug` — so the shell never has to\n // capture `document.title` and race the router's own head effect.\n setStudioBaseTitle(title)\n\n function RootComponent() {\n const location = useLocation()\n // EC-513: locale resolution is client-side, so the studio boots in the server's\n // locale (default, or the `i18n.locale` pin) and hands over to the browser's\n // preference AFTER hydration — the hydration render has to reproduce the server's\n // markup or React discards the tree with a mismatch error. Subscribing HERE, at the\n // one root above the whole chrome, is what makes the handover visible everywhere:\n // ~948 of the studio's localized render sites call the non-hook `translate()` and\n // would otherwise never re-render for it. It also keeps `<html lang>` honest —\n // it names the language the chrome is actually rendered in, at every moment.\n const uiLocale = useUiLocale()\n // EC-179: the active project selects its Convex backend. Resolve it from the\n // URL (or the sign-in redirect target) and bind it *before* the auth and\n // persistence adapters are selected, so the initial sign-in authenticates\n // against the project the user is heading for. Keying the auth/studio subtree\n // by the active project remounts it on a project switch, so the adapters\n // re-select against the new backend and the session is restored per-backend.\n const activeSlug = activeSlugForLocation(\n location.pathname,\n (location.search as { redirect?: string }).redirect,\n )\n setActiveProjectSlug(activeSlug)\n\n return (\n <RootDocument htmlLang={htmlLang ?? uiLocale}>\n <ThemeProvider>\n {/* EC-258: one deployment-setup gate runs before auth — a misconfigured or\n unreachable backend, an invalid workspace config, or any failing readiness\n precondition (missing auth signing key, required collections, …) is a\n single visible boot screen with copy-pasteable fixes, never a silent\n in-memory fallback or a misleading downstream error. All checks passing\n renders children as before. */}\n <DeploymentSetupGate>\n <AuthProvider key={activeSlug ?? '__launcher__'}>\n <AuthGate>\n <StudioProvider>\n {providers ? providers(<Outlet />) : <Outlet />}\n {/* EC-403: the blocking in-place re-auth overlay — mounted over\n every route, INSIDE StudioProvider (it invalidates the studio\n query cache on re-auth) and inside AuthProvider (it reads the\n sessionExpired state). Renders null unless the session died. */}\n <SessionExpiredOverlay />\n </StudioProvider>\n </AuthGate>\n </AuthProvider>\n </DeploymentSetupGate>\n </ThemeProvider>\n </RootDocument>\n )\n }\n\n return createRootRoute({\n head: () => ({\n meta: [\n { charSet: 'utf-8' },\n { name: 'viewport', content: 'width=device-width, initial-scale=1' },\n { title },\n ...meta,\n ],\n links: [{ rel: 'stylesheet', href: appCssUrl }, ...links],\n }),\n component: RootComponent,\n })\n}\n\n/**\n * Route guard (EC-150): one chokepoint in the root layout. Unauthenticated\n * visitors on protected paths are redirected to the sign-in screen (with the\n * intended target preserved); signed-in users never see the sign-in screen.\n * The decision logic is the pure, unit-tested `resolveRouteGuard`.\n */\nfunction AuthGate({ children }: { children: ReactNode }) {\n const { status } = useAuth()\n const location = useLocation()\n // EC-451: feed the still-pending `?redirect` search param into the decision.\n // Dev auto-login (or any fast real sign-in — SSO return, password-manager\n // autofill) can flip the session to signed-in while the location is still\n // `/sign-in?redirect=…`, BEFORE `SignInView`'s own post-sign-in navigation\n // runs; the gate's bounce then fires first and must consume the target\n // instead of dropping it on an unconditional `/`. The target is validated\n // by `postSignInTarget` inside `resolveRouteGuard` (same-origin relative\n // paths only — redirect is an attacker-suppliable search param).\n const rawRedirect = (location.search as { redirect?: unknown }).redirect\n const redirect = typeof rawRedirect === 'string' ? rawRedirect : undefined\n const decision = resolveRouteGuard(location.pathname, status, redirect)\n\n if (decision.kind === 'pending') return <SessionLoading />\n if (decision.kind === 'redirect-to-sign-in') {\n // EC-441: `NavigateOnce`, not `<Navigate>` — the gate stays mounted while\n // the sign-in transition is pending, and a per-render re-navigate spirals\n // into the router's update-depth rejection.\n return <NavigateOnce to={SIGN_IN_PATH} search={{ redirect: decision.redirect }} replace />\n }\n if (decision.kind === 'redirect-home') return <NavigateOnce to={decision.target} replace />\n return children\n}\n\n/**\n * The studio's boot screen: the deterministic session-restore state and — because a\n * request-less render always finds the auth gate `pending` — the entire body of the\n * build-time prerendered SPA shell (`dist/client/_shell.html`).\n *\n * **It is deliberately wordless** (EC-523; owner-ratified 2026-08-01: *\"remove the text\n * — if we really need something while loading, add a simple spinner, but not mandatory —\n * the shell should stay free of side-effects\"*). A build-time prerender has no request,\n * hence no `Accept-Language` and no session, so it cannot know the visitor's language.\n * EC-513 fixed the one string that flipped after hydration; removing the words removes\n * the possibility of the next one.\n *\n * **Accessibility**, because \"no words\" must not mean \"no accessible name\": moving the\n * text into an `aria-label` bakes the very same wrong-language string into the shell,\n * only somewhere a screen-reader user cannot notice it flip. So the shell ships an\n * **empty** `role=\"status\"` region — the correct live-region shape in any case, since a\n * region must already exist in the DOM for a later insertion to be announced — and\n * `useHydrated` fills it once hydration is done, in the visitor's actual locale. The\n * unannounced window is bounded by hydration, i.e. exactly the window in which no\n * announcement could have been correct.\n *\n * Do **not** add `aria-busy` here: on a live region it tells assistive tech to withhold\n * updates, which would suppress the very announcement this shape exists to deliver.\n *\n * Exported so the shell's pre-hydration markup is pinnable with `renderToStaticMarkup`\n * (`root.test.tsx`) — the built artefact is the real proof, but nothing else in the\n * node test pattern can reach this render.\n */\nexport function SessionLoading() {\n const hydrated = useHydrated()\n const t = useT()\n return (\n <div className=\"grid min-h-dvh place-items-center bg-background\" role=\"status\">\n <Loader2 className=\"size-6 animate-spin text-muted-foreground\" aria-hidden=\"true\" />\n {hydrated ? <span className=\"sr-only\">{t('auth.boot.checkingSession')}</span> : null}\n </div>\n )\n}\n\nfunction RootDocument({ children, htmlLang }: { children: ReactNode; htmlLang: string }) {\n // Dark-first SSR baseline; THEME_INIT_SCRIPT flips the class pre-hydration\n // from the stored preference, and ThemeProvider keeps it reactive thereafter.\n // suppressHydrationWarning: the script intentionally mutates the class before\n // React hydrates, so a className mismatch on <html> is expected, not a bug.\n // The app stylesheet is emitted via head().links and rendered by <HeadContent />.\n //\n // EC-523: `lang` is the ONE locale-dependent value that stays in the prerendered\n // shell, and it must. There is no locale-free value for it, and dropping it is a real\n // accessibility regression (a screen reader picks its voice from the document\n // language). It is baked as the build's default locale and flips to the visitor's\n // after hydration — honest at every moment, since EC-513 made it name the language the\n // chrome is actually rendered in. The mismatch it would otherwise raise is covered by\n // the same `suppressHydrationWarning` the theme script needs. Do not \"fix\" it by\n // hard-coding a value: that trades an attribute that is briefly stale for one that is\n // permanently wrong.\n return (\n <html lang={htmlLang} className=\"dark\" suppressHydrationWarning>\n <head>\n <HeadContent />\n <script dangerouslySetInnerHTML={{ __html: THEME_INIT_SCRIPT }} />\n </head>\n <body className=\"min-h-screen bg-background font-sans text-foreground antialiased\">\n {children}\n <Scripts />\n </body>\n </html>\n )\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import type { HTMLAttributes } from 'react';
3
3
  export declare const badgeVariants: (props?: ({
4
- variant?: "error" | "default" | "warning" | "success" | "primary" | "outline" | "info" | null | undefined;
4
+ variant?: "default" | "primary" | "error" | "outline" | "success" | "warning" | "info" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import type { ButtonHTMLAttributes } from 'react';
3
3
  export declare const buttonVariants: (props?: ({
4
- variant?: "default" | "link" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | null | undefined;
4
+ variant?: "link" | "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
5
+ size?: "sm" | "lg" | "default" | "icon" | "icon-sm" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elytracms/studio",
3
3
  "author": "finaldream <hi@finaldream.de>",
4
- "version": "0.0.93",
4
+ "version": "0.0.95",
5
5
  "engines": {
6
6
  "node": ">=22.18.0"
7
7
  },
@@ -15,6 +15,14 @@
15
15
  "types": "./dist/customization.d.ts",
16
16
  "default": "./dist/customization.js"
17
17
  },
18
+ "./addon": {
19
+ "types": "./dist/addon.d.ts",
20
+ "default": "./dist/addon.js"
21
+ },
22
+ "./mount": {
23
+ "types": "./dist/mount.d.ts",
24
+ "default": "./dist/mount.js"
25
+ },
18
26
  "./ui": {
19
27
  "types": "./dist/ui/index.d.ts",
20
28
  "default": "./dist/ui/index.js"
@@ -35,10 +43,6 @@
35
43
  "types": "./dist/components/builder/canvas-stylesheet.d.ts",
36
44
  "default": "./dist/components/builder/canvas-stylesheet.js"
37
45
  },
38
- "./components/*": {
39
- "types": "./dist/components/*.d.ts",
40
- "default": "./dist/components/*.js"
41
- },
42
46
  "./lib/assets": {
43
47
  "types": "./dist/lib/assets/index.d.ts",
44
48
  "default": "./dist/lib/assets/index.js"
@@ -63,6 +67,10 @@
63
67
  "types": "./dist/lib/ai/index.d.ts",
64
68
  "default": "./dist/lib/ai/index.js"
65
69
  },
70
+ "./lib/ai/vite": {
71
+ "types": "./dist/lib/ai/vite.d.ts",
72
+ "default": "./dist/lib/ai/vite.js"
73
+ },
66
74
  "./lib/registry": {
67
75
  "types": "./dist/lib/registry/index.d.ts",
68
76
  "default": "./dist/lib/registry/index.js"
@@ -99,10 +107,6 @@
99
107
  "types": "./dist/lib/auth/index.d.ts",
100
108
  "default": "./dist/lib/auth/index.js"
101
109
  },
102
- "./lib/*": {
103
- "types": "./dist/lib/*.d.ts",
104
- "default": "./dist/lib/*.js"
105
- },
106
110
  "./previews/enumerate": {
107
111
  "types": "./dist/previews/enumerate.d.ts",
108
112
  "default": "./dist/previews/enumerate.js"
@@ -149,7 +153,7 @@
149
153
  "lucide-react": "^1.23.0",
150
154
  "tailwind-merge": "^3.6.0",
151
155
  "zod": "^4.4.3",
152
- "@elytracms/core": "^0.0.93"
156
+ "@elytracms/core": "^0.0.95"
153
157
  },
154
158
  "peerDependencies": {
155
159
  "@tanstack/react-router": "^1.170.0",
@@ -173,7 +177,7 @@
173
177
  "react-dom": "^19.2.7",
174
178
  "typescript": "^6.0.3",
175
179
  "vite": "^8.1.3",
176
- "@elytracms/components": "^0.0.93"
180
+ "@elytracms/components": "^0.0.95"
177
181
  },
178
182
  "scripts": {
179
183
  "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && node ../../scripts/fix-esm-extensions.mjs dist && node ../../scripts/check-esm-extensions.mjs dist",
@@ -1,53 +0,0 @@
1
- import type { CmsDocument, CollectionDef } from '@elytracms/core/cms-core';
2
- import type { RedirectEntry, SaveRedirectInput } from '@elytracms/core/persistence';
3
- import type { CollectionViewCapabilities, CollectionViewSource } from '@elytracms/studio/lib/collection-view/collection-view-source';
4
- /**
5
- * The capability profile of the redirects rail (EC-303): content-gated, create
6
- * + remove, no publish/versions/locales — redirects are CONTENT (an editor
7
- * owns them), so unlike the users rail this source allows `create`, is NOT
8
- * admin-only, and needs no principal field-access policy. Hoisted to a
9
- * module-level constant (EC-327), mirroring `ASSET_COLLECTION_CAPABILITIES`.
10
- */
11
- export declare const REDIRECT_COLLECTION_CAPABILITIES: CollectionViewCapabilities;
12
- /**
13
- * Project a stored redirect into the lens's `values` shape. EC-311 Tier 2:
14
- * additive schema fields round-trip through the open meta bag, spread FIRST so a
15
- * canonical column always wins over a same-named meta key (RESIDUE-3c, EC-577):
16
- * spread last, a stored `meta.to` displayed as the redirect's target and a
17
- * re-save wrote it into the canonical `to`. The record schema now refuses such a
18
- * key on write; this order keeps a row stored before that harmless.
19
- */
20
- export declare function redirectToDocument(entry: RedirectEntry): CmsDocument;
21
- /**
22
- * Map an edited lens document back to the redirect write (EC-577). A column the
23
- * document does not carry is left out of the write, so the stored value is kept:
24
- * `permanent`/`enabled` get their defaults only when the save CREATES the
25
- * redirect, applied once inside the adapter's transaction — this lens no longer
26
- * restates them (`?? true` here was the third copy of the default, RESIDUE-3b).
27
- * `from`/`to` are always sent: the editor owns them, and an empty one is refused
28
- * visibly by the write's validation rather than kept silently.
29
- */
30
- export declare function documentToSaveRedirect(doc: CmsDocument): SaveRedirectInput;
31
- /**
32
- * Assemble a {@link CollectionViewSource} for the **redirects rail** (EC-303) —
33
- * the portable list/edit surfaces over the editorial redirects store instead of
34
- * the CMS store. Redirects are CONTENT (an editor owns them), so unlike the users
35
- * rail this source allows `create`, is NOT admin-only, and needs no principal
36
- * field-access policy. No publish/versions/locales/inline/import — a redirect
37
- * is a small record saved explicitly (a saved+enabled one is live); bulk
38
- * delete rides the shared rail runner (EC-433).
39
- *
40
- * Must be mounted under a `RedirectsProvider` (for {@link useRedirects}).
41
- *
42
- * `schema` defaults to the engine-owned {@link redirectsCollectionDef}; a mount may
43
- * pass a customized def (EC-311 — built-in fields overridden by equal name via
44
- * `nav.redirects({ fields })`). The canonical `from`/`to`/`permanent`/`enabled`
45
- * names+types are contract-locked, so the projection helpers still read the same
46
- * canonical values; a mount's *additive* fields (Tier 2) round-trip through the
47
- * record's open `meta` bag ({@link documentToSaveRedirect}/{@link redirectToDocument}).
48
- *
49
- * The shared scaffold (`useRailViewSource`, EC-327) owns `viewState`/`lastError`
50
- * plumbing and the assembled source; this hook supplies only the redirects-store
51
- * reads/writes, the capability profile, and the registry-driven `validate`.
52
- */
53
- export declare function useRedirectsCollectionViewSource(projectId: string, schema?: CollectionDef): CollectionViewSource;
@@ -1,146 +0,0 @@
1
- import { useCallback, useMemo } from 'react';
2
- import { createCollectionRegistry, validateDocument } from '@elytracms/core/cms-core';
3
- import { studioPath } from '@elytracms/studio/router';
4
- import { useRedirects } from './redirects-store.js';
5
- import { redirectsCollectionDef } from './redirects-schema.js';
6
- import { metaBagProjection, normalizeOkResult, useRailViewSource } from '../rail-view-source.js';
7
- import { parseLocaleConfig } from '@elytracms/core/cms-core';
8
- /** The redirects rail is not localized — one implicit locale keeps the lens honest. */
9
- const REDIRECTS_LOCALE = 'en';
10
- const REDIRECTS_LOCALE_CONFIG = parseLocaleConfig({
11
- default: REDIRECTS_LOCALE,
12
- locales: [REDIRECTS_LOCALE],
13
- });
14
- /**
15
- * The capability profile of the redirects rail (EC-303): content-gated, create
16
- * + remove, no publish/versions/locales — redirects are CONTENT (an editor
17
- * owns them), so unlike the users rail this source allows `create`, is NOT
18
- * admin-only, and needs no principal field-access policy. Hoisted to a
19
- * module-level constant (EC-327), mirroring `ASSET_COLLECTION_CAPABILITIES`.
20
- */
21
- export const REDIRECT_COLLECTION_CAPABILITIES = {
22
- publish: false,
23
- versions: false,
24
- locales: false,
25
- inlineEdit: false,
26
- create: true, // editors create redirects
27
- duplicate: false, // EC-442 owner call: no rail Duplicate for now (redirects deferred)
28
- remove: true,
29
- bulk: true, // EC-433: bulk delete = the same per-id remove, honestly reported
30
- liveUrl: false,
31
- hierarchy: false,
32
- importExport: false,
33
- adminOnly: false, // content, not administration
34
- };
35
- /**
36
- * The canonical redirect fields — the storage/delivery contract of the primitive
37
- * rail. Anything a mount adds via *additive* `nav.redirects({ fields })` (EC-311
38
- * Tier 2) is by definition NOT one of these, so its value round-trips through the
39
- * record's open `meta` bag. Derived from the built-in def so the two never drift.
40
- */
41
- const CANONICAL_REDIRECT_FIELDS = new Set(redirectsCollectionDef.fields.map((f) => f.name));
42
- /**
43
- * Project a stored redirect into the lens's `values` shape. EC-311 Tier 2:
44
- * additive schema fields round-trip through the open meta bag, spread FIRST so a
45
- * canonical column always wins over a same-named meta key (RESIDUE-3c, EC-577):
46
- * spread last, a stored `meta.to` displayed as the redirect's target and a
47
- * re-save wrote it into the canonical `to`. The record schema now refuses such a
48
- * key on write; this order keeps a row stored before that harmless.
49
- */
50
- export function redirectToDocument(entry) {
51
- return {
52
- collection: redirectsCollectionDef.id,
53
- id: entry.id,
54
- values: {
55
- ...(entry.meta ?? {}),
56
- from: entry.from,
57
- to: entry.to,
58
- permanent: entry.permanent,
59
- enabled: entry.enabled,
60
- },
61
- };
62
- }
63
- /**
64
- * Map an edited lens document back to the redirect write (EC-577). A column the
65
- * document does not carry is left out of the write, so the stored value is kept:
66
- * `permanent`/`enabled` get their defaults only when the save CREATES the
67
- * redirect, applied once inside the adapter's transaction — this lens no longer
68
- * restates them (`?? true` here was the third copy of the default, RESIDUE-3b).
69
- * `from`/`to` are always sent: the editor owns them, and an empty one is refused
70
- * visibly by the write's validation rather than kept silently.
71
- */
72
- export function documentToSaveRedirect(doc) {
73
- const values = doc.values ?? {};
74
- // EC-311 Tier 2: any value keyed outside the canonical set comes from a mount's
75
- // additive `nav.redirects({ fields })` override — persist it in the meta bag. The
76
- // editor holds the complete additive set, so this is the whole bag (replace, not
77
- // merge). Omit `meta` entirely for the default rail so its saves are unchanged.
78
- const meta = metaBagProjection(values, CANONICAL_REDIRECT_FIELDS);
79
- return {
80
- id: doc.id,
81
- from: typeof values.from === 'string' ? values.from : '',
82
- to: typeof values.to === 'string' ? values.to : '',
83
- ...(typeof values.permanent === 'boolean' ? { permanent: values.permanent } : {}),
84
- ...(typeof values.enabled === 'boolean' ? { enabled: values.enabled } : {}),
85
- ...(Object.keys(meta).length > 0 ? { meta } : {}),
86
- };
87
- }
88
- /**
89
- * Assemble a {@link CollectionViewSource} for the **redirects rail** (EC-303) —
90
- * the portable list/edit surfaces over the editorial redirects store instead of
91
- * the CMS store. Redirects are CONTENT (an editor owns them), so unlike the users
92
- * rail this source allows `create`, is NOT admin-only, and needs no principal
93
- * field-access policy. No publish/versions/locales/inline/import — a redirect
94
- * is a small record saved explicitly (a saved+enabled one is live); bulk
95
- * delete rides the shared rail runner (EC-433).
96
- *
97
- * Must be mounted under a `RedirectsProvider` (for {@link useRedirects}).
98
- *
99
- * `schema` defaults to the engine-owned {@link redirectsCollectionDef}; a mount may
100
- * pass a customized def (EC-311 — built-in fields overridden by equal name via
101
- * `nav.redirects({ fields })`). The canonical `from`/`to`/`permanent`/`enabled`
102
- * names+types are contract-locked, so the projection helpers still read the same
103
- * canonical values; a mount's *additive* fields (Tier 2) round-trip through the
104
- * record's open `meta` bag ({@link documentToSaveRedirect}/{@link redirectToDocument}).
105
- *
106
- * The shared scaffold (`useRailViewSource`, EC-327) owns `viewState`/`lastError`
107
- * plumbing and the assembled source; this hook supplies only the redirects-store
108
- * reads/writes, the capability profile, and the registry-driven `validate`.
109
- */
110
- export function useRedirectsCollectionViewSource(projectId, schema = redirectsCollectionDef) {
111
- const store = useRedirects();
112
- // EC-311: run the (possibly customized) schema's validation — required/pattern and
113
- // custom `validate` fns on an overridden field must actually fire in the editor.
114
- const registry = useMemo(() => createCollectionRegistry([schema]), [schema]);
115
- const documents = useCallback(() => store.redirects.map(redirectToDocument), [store.redirects]);
116
- const get = useCallback((ref) => {
117
- const record = store.get(ref.id);
118
- return record ? redirectToDocument(record) : undefined;
119
- }, [store]);
120
- const titleOf = useCallback((ref) => store.get(ref.id)?.from || '(new redirect)', [store]);
121
- const validate = useCallback((doc) => validateDocument(registry, doc, { localeConfig: REDIRECTS_LOCALE_CONFIG }), [registry]);
122
- const create = useCallback(() => ({ collection: redirectsCollectionDef.id, id: store.createDraft() }), [store]);
123
- const save = useCallback((doc) => store.save(documentToSaveRedirect(doc)), [store]);
124
- const remove = useCallback((ref) => store.remove(ref.id), [store]);
125
- return useRailViewSource({
126
- projectId,
127
- schema,
128
- capabilities: REDIRECT_COLLECTION_CAPABILITIES,
129
- localeConfig: REDIRECTS_LOCALE_CONFIG,
130
- documents,
131
- get,
132
- titleOf,
133
- // No `referenceCandidates`/`collections` override: redirects carry no
134
- // relation/asset fields, so nothing cross-collection to resolve (the
135
- // factory's `() => []` / `[schema]` defaults apply).
136
- detailPath: (id) => studioPath.redirect(id),
137
- listPath: studioPath.redirects(),
138
- validate,
139
- create,
140
- save,
141
- remove,
142
- normalizeSaveResult: normalizeOkResult,
143
- normalizeRemoveResult: normalizeOkResult,
144
- });
145
- }
146
- //# sourceMappingURL=redirects-collection-view-source.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redirects-collection-view-source.js","sourceRoot":"","sources":["../../../src/components/redirects/redirects-collection-view-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE5C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAErF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAKrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,uFAAuF;AACvF,MAAM,gBAAgB,GAAW,IAAI,CAAA;AACrC,MAAM,uBAAuB,GAAiB,iBAAiB,CAAC;IAC9D,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE,CAAC,gBAAgB,CAAC;CAC5B,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAA+B;IAC1E,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,KAAK;IACjB,MAAM,EAAE,IAAI,EAAE,2BAA2B;IACzC,SAAS,EAAE,KAAK,EAAE,oEAAoE;IACtF,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI,EAAE,kEAAkE;IAC9E,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,KAAK;IAChB,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,KAAK,EAAE,8BAA8B;CACjD,CAAA;AAED;;;;;GAKG;AACH,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,sBAAsB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EA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AAE,CAAC,EAChG,CAAC,QAAQ,CAAC,CACX,CAAA;IACD,MAAM,MAAM,GAAG,WAAW,CACxB,GAAgB,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,sBAAsB,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,EACvF,CAAC,KAAK,CAAC,CACR,CAAA;IACD,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,GAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAChG,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC,GAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAE/E,OAAO,iBAAiB,CAAC;QACvB,SAAS;QACT,MAAM;QACN,YAAY,EAAE,gCAAgC;QAC9C,YAAY,EAAE,uBAAuB;QACrC,SAAS;QACT,GAAG;QACH,OAAO;QACP,sEAAsE;QACtE,qEAAqE;QACrE,qDAAqD;QACrD,UAAU,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnD,QAAQ,EAAE,UAAU,CAAC,SAAS,EAAE;QAChC,QAAQ;QACR,MAAM;QACN,IAAI;QACJ,MAAM;QACN,mBAAmB,EAAE,iBAAiB;QACtC,qBAAqB,EAAE,iBAAiB;KACzC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { useCallback, useMemo } from 'react'\nimport type { CmsDocument, CollectionDef, DocumentRef, Locale, LocaleConfig } from '@elytracms/core/cms-core'\nimport { createCollectionRegistry, validateDocument } from '@elytracms/core/cms-core'\nimport type { RedirectEntry, SaveRedirectInput } from '@elytracms/core/persistence'\nimport { studioPath } from '@elytracms/studio/router'\nimport type {\n CollectionViewCapabilities,\n CollectionViewSource,\n} from '@elytracms/studio/lib/collection-view/collection-view-source'\nimport { useRedirects } from './redirects-store'\nimport { redirectsCollectionDef } from './redirects-schema'\nimport { metaBagProjection, normalizeOkResult, useRailViewSource } from '../rail-view-source'\nimport { parseLocaleConfig } from '@elytracms/core/cms-core'\n\n/** The redirects rail is not localized — one implicit locale keeps the lens honest. */\nconst REDIRECTS_LOCALE: Locale = 'en'\nconst REDIRECTS_LOCALE_CONFIG: LocaleConfig = parseLocaleConfig({\n default: REDIRECTS_LOCALE,\n locales: [REDIRECTS_LOCALE],\n})\n\n/**\n * The capability profile of the redirects rail (EC-303): content-gated, create\n * + remove, no publish/versions/locales — redirects are CONTENT (an editor\n * owns them), so unlike the users rail this source allows `create`, is NOT\n * admin-only, and needs no principal field-access policy. Hoisted to a\n * module-level constant (EC-327), mirroring `ASSET_COLLECTION_CAPABILITIES`.\n */\nexport const REDIRECT_COLLECTION_CAPABILITIES: CollectionViewCapabilities = {\n publish: false,\n versions: false,\n locales: false,\n inlineEdit: false,\n create: true, // editors create redirects\n duplicate: false, // EC-442 owner call: no rail Duplicate for now (redirects deferred)\n remove: true,\n bulk: true, // EC-433: bulk delete = the same per-id remove, honestly reported\n liveUrl: false,\n hierarchy: false,\n importExport: false,\n adminOnly: false, // content, not administration\n}\n\n/**\n * The canonical redirect fields — the storage/delivery contract of the primitive\n * rail. Anything a mount adds via *additive* `nav.redirects({ fields })` (EC-311\n * Tier 2) is by definition NOT one of these, so its value round-trips through the\n * record's open `meta` bag. Derived from the built-in def so the two never drift.\n */\nconst CANONICAL_REDIRECT_FIELDS = new Set(redirectsCollectionDef.fields.map((f) => f.name))\n\n/**\n * Project a stored redirect into the lens's `values` shape. EC-311 Tier 2:\n * additive schema fields round-trip through the open meta bag, spread FIRST so a\n * canonical column always wins over a same-named meta key (RESIDUE-3c, EC-577):\n * spread last, a stored `meta.to` displayed as the redirect's target and a\n * re-save wrote it into the canonical `to`. The record schema now refuses such a\n * key on write; this order keeps a row stored before that harmless.\n */\nexport function redirectToDocument(entry: RedirectEntry): CmsDocument {\n return {\n collection: redirectsCollectionDef.id,\n id: entry.id,\n values: {\n ...(entry.meta ?? {}),\n from: entry.from,\n to: entry.to,\n permanent: entry.permanent,\n enabled: entry.enabled,\n },\n }\n}\n\n/**\n * Map an edited lens document back to the redirect write (EC-577). A column the\n * document does not carry is left out of the write, so the stored value is kept:\n * `permanent`/`enabled` get their defaults only when the save CREATES the\n * redirect, applied once inside the adapter's transaction — this lens no longer\n * restates them (`?? true` here was the third copy of the default, RESIDUE-3b).\n * `from`/`to` are always sent: the editor owns them, and an empty one is refused\n * visibly by the write's validation rather than kept silently.\n */\nexport function documentToSaveRedirect(doc: CmsDocument): SaveRedirectInput {\n const values = doc.values ?? {}\n // EC-311 Tier 2: any value keyed outside the canonical set comes from a mount's\n // additive `nav.redirects({ fields })` override — persist it in the meta bag. The\n // editor holds the complete additive set, so this is the whole bag (replace, not\n // merge). Omit `meta` entirely for the default rail so its saves are unchanged.\n const meta = metaBagProjection(values, CANONICAL_REDIRECT_FIELDS)\n return {\n id: doc.id,\n from: typeof values.from === 'string' ? values.from : '',\n to: typeof values.to === 'string' ? values.to : '',\n ...(typeof values.permanent === 'boolean' ? { permanent: values.permanent } : {}),\n ...(typeof values.enabled === 'boolean' ? { enabled: values.enabled } : {}),\n ...(Object.keys(meta).length > 0 ? { meta } : {}),\n }\n}\n\n/**\n * Assemble a {@link CollectionViewSource} for the **redirects rail** (EC-303) —\n * the portable list/edit surfaces over the editorial redirects store instead of\n * the CMS store. Redirects are CONTENT (an editor owns them), so unlike the users\n * rail this source allows `create`, is NOT admin-only, and needs no principal\n * field-access policy. No publish/versions/locales/inline/import — a redirect\n * is a small record saved explicitly (a saved+enabled one is live); bulk\n * delete rides the shared rail runner (EC-433).\n *\n * Must be mounted under a `RedirectsProvider` (for {@link useRedirects}).\n *\n * `schema` defaults to the engine-owned {@link redirectsCollectionDef}; a mount may\n * pass a customized def (EC-311 — built-in fields overridden by equal name via\n * `nav.redirects({ fields })`). The canonical `from`/`to`/`permanent`/`enabled`\n * names+types are contract-locked, so the projection helpers still read the same\n * canonical values; a mount's *additive* fields (Tier 2) round-trip through the\n * record's open `meta` bag ({@link documentToSaveRedirect}/{@link redirectToDocument}).\n *\n * The shared scaffold (`useRailViewSource`, EC-327) owns `viewState`/`lastError`\n * plumbing and the assembled source; this hook supplies only the redirects-store\n * reads/writes, the capability profile, and the registry-driven `validate`.\n */\nexport function useRedirectsCollectionViewSource(\n projectId: string,\n schema: CollectionDef = redirectsCollectionDef,\n): CollectionViewSource {\n const store = useRedirects()\n // EC-311: run the (possibly customized) schema's validation — required/pattern and\n // custom `validate` fns on an overridden field must actually fire in the editor.\n const registry = useMemo(() => createCollectionRegistry([schema]), [schema])\n\n const documents = useCallback(() => store.redirects.map(redirectToDocument), [store.redirects])\n const get = useCallback(\n (ref: DocumentRef): CmsDocument | undefined => {\n const record = store.get(ref.id)\n return record ? redirectToDocument(record) : undefined\n },\n [store],\n )\n const titleOf = useCallback(\n (ref: DocumentRef): string => store.get(ref.id)?.from || '(new redirect)',\n [store],\n )\n const validate = useCallback(\n (doc: CmsDocument) => validateDocument(registry, doc, { localeConfig: REDIRECTS_LOCALE_CONFIG }),\n [registry],\n )\n const create = useCallback(\n (): DocumentRef => ({ collection: redirectsCollectionDef.id, id: store.createDraft() }),\n [store],\n )\n const save = useCallback((doc: CmsDocument) => store.save(documentToSaveRedirect(doc)), [store])\n const remove = useCallback((ref: DocumentRef) => store.remove(ref.id), [store])\n\n return useRailViewSource({\n projectId,\n schema,\n capabilities: REDIRECT_COLLECTION_CAPABILITIES,\n localeConfig: REDIRECTS_LOCALE_CONFIG,\n documents,\n get,\n titleOf,\n // No `referenceCandidates`/`collections` override: redirects carry no\n // relation/asset fields, so nothing cross-collection to resolve (the\n // factory's `() => []` / `[schema]` defaults apply).\n detailPath: (id: string) => studioPath.redirect(id),\n listPath: studioPath.redirects(),\n validate,\n create,\n save,\n remove,\n normalizeSaveResult: normalizeOkResult,\n normalizeRemoveResult: normalizeOkResult,\n })\n}\n"]}
@@ -1,21 +0,0 @@
1
- import type { CollectionDef } from '@elytracms/core/cms-core';
2
- /**
3
- * The studio Redirects module (EC-303). Editorial redirects as data — the reuse
4
- * proof (with the users rail) that the portable interaction surfaces serve any
5
- * rail: it renders the SAME `LoadedCollectionTable` for the list and the SAME
6
- * `DetailEditor` body (via {@link PortableDetailEditor}) for one redirect, over a
7
- * redirects {@link useRedirectsCollectionViewSource}. The redirects capability
8
- * profile (content-gated, create + remove, no publish/versions/locales) drives
9
- * which regions appear; the edit shell's explicit-save path (no publish) makes a
10
- * saved+enabled redirect live.
11
- *
12
- * `redirectId === null` is the list; a `redirectId` opens that redirect's detail
13
- * (routed via `studioPath.redirect`). No admin gate — redirects are content, so
14
- * viewers read and editors write (enforced at the chokepoint + Convex boundary).
15
- */
16
- export declare function RedirectsModule({ projectId, redirectId, schema, }: {
17
- projectId: string;
18
- redirectId?: string | null;
19
- /** EC-311: a mount-customized redirects def (built-in fields overridden by name). */
20
- schema?: CollectionDef;
21
- }): import("react").JSX.Element;
@@ -1,40 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { translate } from '@elytracms/studio/lib/i18n';
3
- import { RedirectsProvider, useRedirects } from './redirects-store.js';
4
- import { useRedirectsCollectionViewSource } from './redirects-collection-view-source.js';
5
- import { CollectionViewProvider } from '../collection-view/collection-view-context.js';
6
- import { RailStoreStatus } from '../rail-store-status.js';
7
- import { LoadedCollectionTable } from '../cms/collection-table.js';
8
- import { PortableDetailEditor } from '../cms/detail-editor.js';
9
- /**
10
- * The studio Redirects module (EC-303). Editorial redirects as data — the reuse
11
- * proof (with the users rail) that the portable interaction surfaces serve any
12
- * rail: it renders the SAME `LoadedCollectionTable` for the list and the SAME
13
- * `DetailEditor` body (via {@link PortableDetailEditor}) for one redirect, over a
14
- * redirects {@link useRedirectsCollectionViewSource}. The redirects capability
15
- * profile (content-gated, create + remove, no publish/versions/locales) drives
16
- * which regions appear; the edit shell's explicit-save path (no publish) makes a
17
- * saved+enabled redirect live.
18
- *
19
- * `redirectId === null` is the list; a `redirectId` opens that redirect's detail
20
- * (routed via `studioPath.redirect`). No admin gate — redirects are content, so
21
- * viewers read and editors write (enforced at the chokepoint + Convex boundary).
22
- */
23
- export function RedirectsModule({ projectId, redirectId = null, schema, }) {
24
- return (_jsx(RedirectsProvider, { projectId: projectId, children: _jsx(RedirectsSurface, { projectId: projectId, redirectId: redirectId, schema: schema }) }));
25
- }
26
- /** The loaded surface: the portable list (or one redirect's detail) over the source. */
27
- function RedirectsSurface({ projectId, redirectId, schema, }) {
28
- const store = useRedirects();
29
- const source = useRedirectsCollectionViewSource(projectId, schema);
30
- if (store.status !== 'ready') {
31
- return (_jsx(RailStoreStatus, { store: store, errorLabel: translate('redirects.loadFailed'), loadingLabel: translate('redirects.loading'), errorTestId: "redirects-error" }));
32
- }
33
- // One redirect's detail opens in the portable edit shell (AD-19); the list otherwise.
34
- // The shell mounts its own CollectionViewProvider, so only the list wraps here.
35
- if (redirectId !== null) {
36
- return _jsx(PortableDetailEditor, { source: source, projectId: projectId, documentId: redirectId });
37
- }
38
- return (_jsx(CollectionViewProvider, { source: source, children: _jsx(LoadedCollectionTable, { projectId: projectId }) }));
39
- }
40
- //# sourceMappingURL=redirects-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redirects-module.js","sourceRoot":"","sources":["../../../src/components/redirects/redirects-module.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAA;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAA;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAE3D;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,SAAS,EACT,UAAU,GAAG,IAAI,EACjB,MAAM,GAMP;IACC,OAAO,CACL,KAAC,iBAAiB,IAAC,SAAS,EAAE,SAAS,YACrC,KAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAI,GAChE,CACrB,CAAA;AACH,CAAC;AAED,wFAAwF;AACxF,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,UAAU,EACV,MAAM,GAKP;IACC,MAAM,KAAK,GAAG,YAAY,EAAE,CAAA;IAC5B,MAAM,MAAM,GAAG,gCAAgC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAA;IAElE,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC7B,OAAO,CACL,KAAC,eAAe,IACd,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,SAAS,CAAC,sBAAsB,CAAC,EAC7C,YAAY,EAAE,SAAS,CAAC,mBAAmB,CAAC,EAC5C,WAAW,EAAC,iBAAiB,GAC7B,CACH,CAAA;IACH,CAAC;IAED,sFAAsF;IACtF,gFAAgF;IAChF,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,KAAC,oBAAoB,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,GAAI,CAAA;IAC/F,CAAC;IAED,OAAO,CACL,KAAC,sBAAsB,IAAC,MAAM,EAAE,MAAM,YACpC,KAAC,qBAAqB,IAAC,SAAS,EAAE,SAAS,GAAI,GACxB,CAC1B,CAAA;AACH,CAAC","sourcesContent":["import type { CollectionDef } from '@elytracms/core/cms-core'\nimport { translate } from '@elytracms/studio/lib/i18n'\nimport { RedirectsProvider, useRedirects } from './redirects-store'\nimport { useRedirectsCollectionViewSource } from './redirects-collection-view-source'\nimport { CollectionViewProvider } from '../collection-view/collection-view-context'\nimport { RailStoreStatus } from '../rail-store-status'\nimport { LoadedCollectionTable } from '../cms/collection-table'\nimport { PortableDetailEditor } from '../cms/detail-editor'\n\n/**\n * The studio Redirects module (EC-303). Editorial redirects as data — the reuse\n * proof (with the users rail) that the portable interaction surfaces serve any\n * rail: it renders the SAME `LoadedCollectionTable` for the list and the SAME\n * `DetailEditor` body (via {@link PortableDetailEditor}) for one redirect, over a\n * redirects {@link useRedirectsCollectionViewSource}. The redirects capability\n * profile (content-gated, create + remove, no publish/versions/locales) drives\n * which regions appear; the edit shell's explicit-save path (no publish) makes a\n * saved+enabled redirect live.\n *\n * `redirectId === null` is the list; a `redirectId` opens that redirect's detail\n * (routed via `studioPath.redirect`). No admin gate — redirects are content, so\n * viewers read and editors write (enforced at the chokepoint + Convex boundary).\n */\nexport function RedirectsModule({\n projectId,\n redirectId = null,\n schema,\n}: {\n projectId: string\n redirectId?: string | null\n /** EC-311: a mount-customized redirects def (built-in fields overridden by name). */\n schema?: CollectionDef\n}) {\n return (\n <RedirectsProvider projectId={projectId}>\n <RedirectsSurface projectId={projectId} redirectId={redirectId} schema={schema} />\n </RedirectsProvider>\n )\n}\n\n/** The loaded surface: the portable list (or one redirect's detail) over the source. */\nfunction RedirectsSurface({\n projectId,\n redirectId,\n schema,\n}: {\n projectId: string\n redirectId: string | null\n schema?: CollectionDef\n}) {\n const store = useRedirects()\n const source = useRedirectsCollectionViewSource(projectId, schema)\n\n if (store.status !== 'ready') {\n return (\n <RailStoreStatus\n store={store}\n errorLabel={translate('redirects.loadFailed')}\n loadingLabel={translate('redirects.loading')}\n errorTestId=\"redirects-error\"\n />\n )\n }\n\n // One redirect's detail opens in the portable edit shell (AD-19); the list otherwise.\n // The shell mounts its own CollectionViewProvider, so only the list wraps here.\n if (redirectId !== null) {\n return <PortableDetailEditor source={source} projectId={projectId} documentId={redirectId} />\n }\n\n return (\n <CollectionViewProvider source={source}>\n <LoadedCollectionTable projectId={projectId} />\n </CollectionViewProvider>\n )\n}\n"]}
@@ -1,68 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { RedirectEntry, SaveRedirectInput } from '@elytracms/core/persistence';
3
- /**
4
- * Editorial redirects store (EC-303). The redirects rail — data-backed 301/302
5
- * forwards — read + written through the shared operations client (`redirects.*`),
6
- * the same seam the users/assets stores use. Content-gated (a viewer reads, an
7
- * editor writes); no draft/published split — a saved+enabled redirect is live.
8
- *
9
- * The "New" flow keeps an unsaved redirect as a LOCAL draft (memory only) until
10
- * the first explicit save persists it — so an abandoned "New" never writes a stub
11
- * to the backend and never shows in the list. Drafts are reachable via {@link
12
- * RedirectsStore.get} (the detail editor loads one), never listed.
13
- */
14
- export interface RedirectsStore {
15
- projectId: string;
16
- status: 'loading' | 'ready' | 'error';
17
- errorMessage?: string;
18
- /** The persisted redirects, ordered by source path. Unsaved drafts are excluded. */
19
- redirects: readonly RedirectEntry[];
20
- /** One redirect: a local unsaved draft if present, else a persisted record. */
21
- get(id: string): RedirectEntry | undefined;
22
- /** Mint a blank in-memory draft and return its id (the "New" navigation target). */
23
- createDraft(): string;
24
- /** Persist a create/modify; drops the matching draft on success. */
25
- save(input: SaveRedirectInput): Promise<{
26
- ok: true;
27
- redirect: RedirectEntry;
28
- } | {
29
- ok: false;
30
- message: string;
31
- }>;
32
- /** Delete a persisted redirect, or silently discard an unsaved draft. */
33
- remove(id: string): Promise<{
34
- ok: true;
35
- } | {
36
- ok: false;
37
- message: string;
38
- }>;
39
- /** Re-list from the backend. */
40
- refresh(): Promise<void>;
41
- }
42
- declare const useRedirects: () => RedirectsStore;
43
- /**
44
- * The project's redirects, read through the shared operations cache — the ONE query
45
- * this rail uses, without needing {@link RedirectsProvider}.
46
- *
47
- * Extracted (EC-469) so the section rail's URL-map validation can read redirects from
48
- * outside the redirects module while sharing this exact query key. One key, one cache
49
- * entry (AD-17): the rail's foot and the rail itself are the same query, so opening
50
- * Redirects hits a warm cache, and `save`/`remove`'s `cache.patch` below updates both
51
- * at once — a fixed loop stops being reported the moment it is fixed.
52
- */
53
- export declare function useRedirectList(projectId: string): import("@tanstack/react-query").UseQueryResult<{
54
- createdAt: string;
55
- updatedAt: string;
56
- id: string;
57
- projectId: string;
58
- from: string;
59
- to: string;
60
- permanent: boolean;
61
- enabled: boolean;
62
- meta?: Record<string, unknown> | undefined;
63
- }[]>;
64
- export declare function RedirectsProvider({ projectId, children, }: {
65
- projectId: string;
66
- children: ReactNode;
67
- }): import("react").JSX.Element;
68
- export { useRedirects };