@elytracms/studio 0.0.1

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 (558) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -0
  3. package/convex/assets.ts +107 -0
  4. package/convex/auth.config.ts +15 -0
  5. package/convex/auth.ts +50 -0
  6. package/convex/cliTokens.ts +63 -0
  7. package/convex/cms.ts +174 -0
  8. package/convex/content.ts +316 -0
  9. package/convex/delivery.ts +266 -0
  10. package/convex/functions.ts +35 -0
  11. package/convex/graphs.ts +51 -0
  12. package/convex/guard.ts +67 -0
  13. package/convex/http.ts +30 -0
  14. package/convex/members.ts +83 -0
  15. package/convex/publishing.ts +102 -0
  16. package/convex/references.ts +168 -0
  17. package/convex/schema.ts +173 -0
  18. package/convex/sync.ts +322 -0
  19. package/convex/tsconfig.json +12 -0
  20. package/convex/users.ts +23 -0
  21. package/convex/webhooks.ts +85 -0
  22. package/dist/components/assets/asset-library.d.ts +14 -0
  23. package/dist/components/assets/asset-library.js +191 -0
  24. package/dist/components/assets/asset-library.js.map +1 -0
  25. package/dist/components/assets/asset-metadata.d.ts +34 -0
  26. package/dist/components/assets/asset-metadata.js +40 -0
  27. package/dist/components/assets/asset-metadata.js.map +1 -0
  28. package/dist/components/assets/asset-search.d.ts +7 -0
  29. package/dist/components/assets/asset-search.js +12 -0
  30. package/dist/components/assets/asset-search.js.map +1 -0
  31. package/dist/components/assets/asset-selection.d.ts +17 -0
  32. package/dist/components/assets/asset-selection.js +33 -0
  33. package/dist/components/assets/asset-selection.js.map +1 -0
  34. package/dist/components/assets/assets-store.d.ts +51 -0
  35. package/dist/components/assets/assets-store.js +153 -0
  36. package/dist/components/assets/assets-store.js.map +1 -0
  37. package/dist/components/auth-context.d.ts +38 -0
  38. package/dist/components/auth-context.js +88 -0
  39. package/dist/components/auth-context.js.map +1 -0
  40. package/dist/components/backend-gate.d.ts +19 -0
  41. package/dist/components/backend-gate.js +63 -0
  42. package/dist/components/backend-gate.js.map +1 -0
  43. package/dist/components/breadcrumb-context.d.ts +39 -0
  44. package/dist/components/breadcrumb-context.js +38 -0
  45. package/dist/components/breadcrumb-context.js.map +1 -0
  46. package/dist/components/builder/blocks-model.d.ts +80 -0
  47. package/dist/components/builder/blocks-model.js +181 -0
  48. package/dist/components/builder/blocks-model.js.map +1 -0
  49. package/dist/components/builder/blocks-panel.d.ts +44 -0
  50. package/dist/components/builder/blocks-panel.js +147 -0
  51. package/dist/components/builder/blocks-panel.js.map +1 -0
  52. package/dist/components/builder/builder-store.d.ts +69 -0
  53. package/dist/components/builder/builder-store.js +294 -0
  54. package/dist/components/builder/builder-store.js.map +1 -0
  55. package/dist/components/builder/canvas-stylesheet.d.ts +4 -0
  56. package/dist/components/builder/canvas-stylesheet.js +24 -0
  57. package/dist/components/builder/canvas-stylesheet.js.map +1 -0
  58. package/dist/components/builder/canvas.d.ts +8 -0
  59. package/dist/components/builder/canvas.js +723 -0
  60. package/dist/components/builder/canvas.js.map +1 -0
  61. package/dist/components/builder/clipboard-actions.d.ts +93 -0
  62. package/dist/components/builder/clipboard-actions.js +246 -0
  63. package/dist/components/builder/clipboard-actions.js.map +1 -0
  64. package/dist/components/builder/composition-field-editor.d.ts +11 -0
  65. package/dist/components/builder/composition-field-editor.js +150 -0
  66. package/dist/components/builder/composition-field-editor.js.map +1 -0
  67. package/dist/components/builder/composition-scope.d.ts +16 -0
  68. package/dist/components/builder/composition-scope.js +7 -0
  69. package/dist/components/builder/composition-scope.js.map +1 -0
  70. package/dist/components/builder/drag-session.d.ts +41 -0
  71. package/dist/components/builder/drag-session.js +51 -0
  72. package/dist/components/builder/drag-session.js.map +1 -0
  73. package/dist/components/builder/fixture-thumbnail.d.ts +18 -0
  74. package/dist/components/builder/fixture-thumbnail.js +97 -0
  75. package/dist/components/builder/fixture-thumbnail.js.map +1 -0
  76. package/dist/components/builder/inline-edit.d.ts +142 -0
  77. package/dist/components/builder/inline-edit.js +136 -0
  78. package/dist/components/builder/inline-edit.js.map +1 -0
  79. package/dist/components/builder/insert-context.d.ts +14 -0
  80. package/dist/components/builder/insert-context.js +65 -0
  81. package/dist/components/builder/insert-context.js.map +1 -0
  82. package/dist/components/builder/insert-menu.d.ts +9 -0
  83. package/dist/components/builder/insert-menu.js +9 -0
  84. package/dist/components/builder/insert-menu.js.map +1 -0
  85. package/dist/components/builder/layout-inspector.d.ts +14 -0
  86. package/dist/components/builder/layout-inspector.js +84 -0
  87. package/dist/components/builder/layout-inspector.js.map +1 -0
  88. package/dist/components/builder/node-factory.d.ts +17 -0
  89. package/dist/components/builder/node-factory.js +90 -0
  90. package/dist/components/builder/node-factory.js.map +1 -0
  91. package/dist/components/builder/page-tree.d.ts +3 -0
  92. package/dist/components/builder/page-tree.js +207 -0
  93. package/dist/components/builder/page-tree.js.map +1 -0
  94. package/dist/components/builder/property-inspector.d.ts +1 -0
  95. package/dist/components/builder/property-inspector.js +233 -0
  96. package/dist/components/builder/property-inspector.js.map +1 -0
  97. package/dist/components/builder/rich-text-toolbar.d.ts +4 -0
  98. package/dist/components/builder/rich-text-toolbar.js +104 -0
  99. package/dist/components/builder/rich-text-toolbar.js.map +1 -0
  100. package/dist/components/builder/spacing-handles.d.ts +22 -0
  101. package/dist/components/builder/spacing-handles.js +213 -0
  102. package/dist/components/builder/spacing-handles.js.map +1 -0
  103. package/dist/components/cms/asset-picker.d.ts +12 -0
  104. package/dist/components/cms/asset-picker.js +60 -0
  105. package/dist/components/cms/asset-picker.js.map +1 -0
  106. package/dist/components/cms/bulk-actions.d.ts +60 -0
  107. package/dist/components/cms/bulk-actions.js +95 -0
  108. package/dist/components/cms/bulk-actions.js.map +1 -0
  109. package/dist/components/cms/bulk-bar.d.ts +23 -0
  110. package/dist/components/cms/bulk-bar.js +26 -0
  111. package/dist/components/cms/bulk-bar.js.map +1 -0
  112. package/dist/components/cms/cell-edit.d.ts +91 -0
  113. package/dist/components/cms/cell-edit.js +144 -0
  114. package/dist/components/cms/cell-edit.js.map +1 -0
  115. package/dist/components/cms/cell.d.ts +29 -0
  116. package/dist/components/cms/cell.js +127 -0
  117. package/dist/components/cms/cell.js.map +1 -0
  118. package/dist/components/cms/cms-index.d.ts +8 -0
  119. package/dist/components/cms/cms-index.js +23 -0
  120. package/dist/components/cms/cms-index.js.map +1 -0
  121. package/dist/components/cms/cms-store.d.ts +188 -0
  122. package/dist/components/cms/cms-store.js +702 -0
  123. package/dist/components/cms/cms-store.js.map +1 -0
  124. package/dist/components/cms/collection-table.d.ts +6 -0
  125. package/dist/components/cms/collection-table.js +250 -0
  126. package/dist/components/cms/collection-table.js.map +1 -0
  127. package/dist/components/cms/collections-sidebar.d.ts +9 -0
  128. package/dist/components/cms/collections-sidebar.js +25 -0
  129. package/dist/components/cms/collections-sidebar.js.map +1 -0
  130. package/dist/components/cms/detail-editor.d.ts +7 -0
  131. package/dist/components/cms/detail-editor.js +386 -0
  132. package/dist/components/cms/detail-editor.js.map +1 -0
  133. package/dist/components/cms/doc-state.d.ts +13 -0
  134. package/dist/components/cms/doc-state.js +18 -0
  135. package/dist/components/cms/doc-state.js.map +1 -0
  136. package/dist/components/cms/document-editor-context.d.ts +48 -0
  137. package/dist/components/cms/document-editor-context.js +23 -0
  138. package/dist/components/cms/document-editor-context.js.map +1 -0
  139. package/dist/components/cms/editable-cell.d.ts +22 -0
  140. package/dist/components/cms/editable-cell.js +176 -0
  141. package/dist/components/cms/editable-cell.js.map +1 -0
  142. package/dist/components/cms/field-control.d.ts +8 -0
  143. package/dist/components/cms/field-control.js +149 -0
  144. package/dist/components/cms/field-control.js.map +1 -0
  145. package/dist/components/cms/filter-builder.d.ts +12 -0
  146. package/dist/components/cms/filter-builder.js +84 -0
  147. package/dist/components/cms/filter-builder.js.map +1 -0
  148. package/dist/components/cms/import-export.d.ts +6 -0
  149. package/dist/components/cms/import-export.js +33 -0
  150. package/dist/components/cms/import-export.js.map +1 -0
  151. package/dist/components/cms/new-page-dialog.d.ts +22 -0
  152. package/dist/components/cms/new-page-dialog.js +42 -0
  153. package/dist/components/cms/new-page-dialog.js.map +1 -0
  154. package/dist/components/cms/reference-confirm.d.ts +25 -0
  155. package/dist/components/cms/reference-confirm.js +124 -0
  156. package/dist/components/cms/reference-confirm.js.map +1 -0
  157. package/dist/components/cms/relation-picker.d.ts +16 -0
  158. package/dist/components/cms/relation-picker.js +47 -0
  159. package/dist/components/cms/relation-picker.js.map +1 -0
  160. package/dist/components/cms/use-cell-edit.d.ts +33 -0
  161. package/dist/components/cms/use-cell-edit.js +125 -0
  162. package/dist/components/cms/use-cell-edit.js.map +1 -0
  163. package/dist/components/cms/versions-model.d.ts +15 -0
  164. package/dist/components/cms/versions-model.js +23 -0
  165. package/dist/components/cms/versions-model.js.map +1 -0
  166. package/dist/components/cms/versions-pane.d.ts +14 -0
  167. package/dist/components/cms/versions-pane.js +86 -0
  168. package/dist/components/cms/versions-pane.js.map +1 -0
  169. package/dist/components/cms/view-bar.d.ts +11 -0
  170. package/dist/components/cms/view-bar.js +80 -0
  171. package/dist/components/cms/view-bar.js.map +1 -0
  172. package/dist/components/collab/collab-context.d.ts +34 -0
  173. package/dist/components/collab/collab-context.js +52 -0
  174. package/dist/components/collab/collab-context.js.map +1 -0
  175. package/dist/components/collab/collab-seed.d.ts +27 -0
  176. package/dist/components/collab/collab-seed.js +42 -0
  177. package/dist/components/collab/collab-seed.js.map +1 -0
  178. package/dist/components/components/component-detail.d.ts +9 -0
  179. package/dist/components/components/component-detail.js +30 -0
  180. package/dist/components/components/component-detail.js.map +1 -0
  181. package/dist/components/components/component-status.d.ts +10 -0
  182. package/dist/components/components/component-status.js +30 -0
  183. package/dist/components/components/component-status.js.map +1 -0
  184. package/dist/components/components/components-index.d.ts +8 -0
  185. package/dist/components/components/components-index.js +42 -0
  186. package/dist/components/components/components-index.js.map +1 -0
  187. package/dist/components/components/field-inspector.d.ts +9 -0
  188. package/dist/components/components/field-inspector.js +38 -0
  189. package/dist/components/components/field-inspector.js.map +1 -0
  190. package/dist/components/components/fixture-runner.d.ts +10 -0
  191. package/dist/components/components/fixture-runner.js +24 -0
  192. package/dist/components/components/fixture-runner.js.map +1 -0
  193. package/dist/components/components/registry-browser.d.ts +4 -0
  194. package/dist/components/components/registry-browser.js +64 -0
  195. package/dist/components/components/registry-browser.js.map +1 -0
  196. package/dist/components/current-user-menu.d.ts +13 -0
  197. package/dist/components/current-user-menu.js +31 -0
  198. package/dist/components/current-user-menu.js.map +1 -0
  199. package/dist/components/dev-login-badge.d.ts +9 -0
  200. package/dist/components/dev-login-badge.js +18 -0
  201. package/dist/components/dev-login-badge.js.map +1 -0
  202. package/dist/components/extensions/extensions-view.d.ts +7 -0
  203. package/dist/components/extensions/extensions-view.js +126 -0
  204. package/dist/components/extensions/extensions-view.js.map +1 -0
  205. package/dist/components/guards.d.ts +27 -0
  206. package/dist/components/guards.js +46 -0
  207. package/dist/components/guards.js.map +1 -0
  208. package/dist/components/inspector/inspector-sidebar.d.ts +26 -0
  209. package/dist/components/inspector/inspector-sidebar.js +17 -0
  210. package/dist/components/inspector/inspector-sidebar.js.map +1 -0
  211. package/dist/components/operation-error.d.ts +17 -0
  212. package/dist/components/operation-error.js +54 -0
  213. package/dist/components/operation-error.js.map +1 -0
  214. package/dist/components/playground-badge.d.ts +10 -0
  215. package/dist/components/playground-badge.js +19 -0
  216. package/dist/components/playground-badge.js.map +1 -0
  217. package/dist/components/project-list.d.ts +15 -0
  218. package/dist/components/project-list.js +52 -0
  219. package/dist/components/project-list.js.map +1 -0
  220. package/dist/components/project-session.d.ts +46 -0
  221. package/dist/components/project-session.js +107 -0
  222. package/dist/components/project-session.js.map +1 -0
  223. package/dist/components/project-switcher.d.ts +11 -0
  224. package/dist/components/project-switcher.js +44 -0
  225. package/dist/components/project-switcher.js.map +1 -0
  226. package/dist/components/references/builder-deep-link.d.ts +12 -0
  227. package/dist/components/references/builder-deep-link.js +53 -0
  228. package/dist/components/references/builder-deep-link.js.map +1 -0
  229. package/dist/components/references/references-panel.d.ts +17 -0
  230. package/dist/components/references/references-panel.js +66 -0
  231. package/dist/components/references/references-panel.js.map +1 -0
  232. package/dist/components/routes/redirect-chain.d.ts +9 -0
  233. package/dist/components/routes/redirect-chain.js +16 -0
  234. package/dist/components/routes/redirect-chain.js.map +1 -0
  235. package/dist/components/routes/redirect-manager.d.ts +13 -0
  236. package/dist/components/routes/redirect-manager.js +24 -0
  237. package/dist/components/routes/redirect-manager.js.map +1 -0
  238. package/dist/components/routes/route-list.d.ts +35 -0
  239. package/dist/components/routes/route-list.js +69 -0
  240. package/dist/components/routes/route-list.js.map +1 -0
  241. package/dist/components/routes/routes-shell.d.ts +14 -0
  242. package/dist/components/routes/routes-shell.js +68 -0
  243. package/dist/components/routes/routes-shell.js.map +1 -0
  244. package/dist/components/section-nav.d.ts +17 -0
  245. package/dist/components/section-nav.js +33 -0
  246. package/dist/components/section-nav.js.map +1 -0
  247. package/dist/components/section-state.d.ts +24 -0
  248. package/dist/components/section-state.js +78 -0
  249. package/dist/components/section-state.js.map +1 -0
  250. package/dist/components/section-surface.d.ts +31 -0
  251. package/dist/components/section-surface.js +46 -0
  252. package/dist/components/section-surface.js.map +1 -0
  253. package/dist/components/sections.d.ts +38 -0
  254. package/dist/components/sections.js +72 -0
  255. package/dist/components/sections.js.map +1 -0
  256. package/dist/components/settings-form.d.ts +10 -0
  257. package/dist/components/settings-form.js +17 -0
  258. package/dist/components/settings-form.js.map +1 -0
  259. package/dist/components/studio-context.d.ts +22 -0
  260. package/dist/components/studio-context.js +48 -0
  261. package/dist/components/studio-context.js.map +1 -0
  262. package/dist/components/studio-project-screen.d.ts +19 -0
  263. package/dist/components/studio-project-screen.js +195 -0
  264. package/dist/components/studio-project-screen.js.map +1 -0
  265. package/dist/components/studio-shell.d.ts +18 -0
  266. package/dist/components/studio-shell.js +64 -0
  267. package/dist/components/studio-shell.js.map +1 -0
  268. package/dist/components/theme-context.d.ts +17 -0
  269. package/dist/components/theme-context.js +26 -0
  270. package/dist/components/theme-context.js.map +1 -0
  271. package/dist/components/workspace-gate.d.ts +12 -0
  272. package/dist/components/workspace-gate.js +27 -0
  273. package/dist/components/workspace-gate.js.map +1 -0
  274. package/dist/components/workspace-projects.d.ts +13 -0
  275. package/dist/components/workspace-projects.js +18 -0
  276. package/dist/components/workspace-projects.js.map +1 -0
  277. package/dist/lib/assets/delete-asset.d.ts +34 -0
  278. package/dist/lib/assets/delete-asset.js +34 -0
  279. package/dist/lib/assets/delete-asset.js.map +1 -0
  280. package/dist/lib/assets/image-dimensions.d.ts +18 -0
  281. package/dist/lib/assets/image-dimensions.js +26 -0
  282. package/dist/lib/assets/image-dimensions.js.map +1 -0
  283. package/dist/lib/assets/index.d.ts +9 -0
  284. package/dist/lib/assets/index.js +10 -0
  285. package/dist/lib/assets/index.js.map +1 -0
  286. package/dist/lib/assets/upload-state.d.ts +53 -0
  287. package/dist/lib/assets/upload-state.js +59 -0
  288. package/dist/lib/assets/upload-state.js.map +1 -0
  289. package/dist/lib/assets/upload.d.ts +56 -0
  290. package/dist/lib/assets/upload.js +125 -0
  291. package/dist/lib/assets/upload.js.map +1 -0
  292. package/dist/lib/auth/auth-adapter.d.ts +57 -0
  293. package/dist/lib/auth/auth-adapter.js +13 -0
  294. package/dist/lib/auth/auth-adapter.js.map +1 -0
  295. package/dist/lib/auth/convex-auth-adapter.d.ts +39 -0
  296. package/dist/lib/auth/convex-auth-adapter.js +171 -0
  297. package/dist/lib/auth/convex-auth-adapter.js.map +1 -0
  298. package/dist/lib/auth/dev-auto-login-adapter.d.ts +25 -0
  299. package/dist/lib/auth/dev-auto-login-adapter.js +40 -0
  300. package/dist/lib/auth/dev-auto-login-adapter.js.map +1 -0
  301. package/dist/lib/auth/index.d.ts +28 -0
  302. package/dist/lib/auth/index.js +61 -0
  303. package/dist/lib/auth/index.js.map +1 -0
  304. package/dist/lib/auth/local-auth-adapter.d.ts +57 -0
  305. package/dist/lib/auth/local-auth-adapter.js +78 -0
  306. package/dist/lib/auth/local-auth-adapter.js.map +1 -0
  307. package/dist/lib/auth/route-guard.d.ts +33 -0
  308. package/dist/lib/auth/route-guard.js +51 -0
  309. package/dist/lib/auth/route-guard.js.map +1 -0
  310. package/dist/lib/auth-errors.d.ts +42 -0
  311. package/dist/lib/auth-errors.js +74 -0
  312. package/dist/lib/auth-errors.js.map +1 -0
  313. package/dist/lib/bindings/section-bindings.d.ts +24 -0
  314. package/dist/lib/bindings/section-bindings.js +9 -0
  315. package/dist/lib/bindings/section-bindings.js.map +1 -0
  316. package/dist/lib/clipboard/index.d.ts +7 -0
  317. package/dist/lib/clipboard/index.js +8 -0
  318. package/dist/lib/clipboard/index.js.map +1 -0
  319. package/dist/lib/clipboard/os-clipboard.d.ts +46 -0
  320. package/dist/lib/clipboard/os-clipboard.js +105 -0
  321. package/dist/lib/clipboard/os-clipboard.js.map +1 -0
  322. package/dist/lib/clipboard/paste-issues.d.ts +34 -0
  323. package/dist/lib/clipboard/paste-issues.js +67 -0
  324. package/dist/lib/clipboard/paste-issues.js.map +1 -0
  325. package/dist/lib/clipboard/paste-target.d.ts +20 -0
  326. package/dist/lib/clipboard/paste-target.js +28 -0
  327. package/dist/lib/clipboard/paste-target.js.map +1 -0
  328. package/dist/lib/cms/published-documents.d.ts +30 -0
  329. package/dist/lib/cms/published-documents.js +75 -0
  330. package/dist/lib/cms/published-documents.js.map +1 -0
  331. package/dist/lib/cms-views/index.d.ts +9 -0
  332. package/dist/lib/cms-views/index.js +10 -0
  333. package/dist/lib/cms-views/index.js.map +1 -0
  334. package/dist/lib/cms-views/selection.d.ts +29 -0
  335. package/dist/lib/cms-views/selection.js +46 -0
  336. package/dist/lib/cms-views/selection.js.map +1 -0
  337. package/dist/lib/cms-views/view-model.d.ts +192 -0
  338. package/dist/lib/cms-views/view-model.js +353 -0
  339. package/dist/lib/cms-views/view-model.js.map +1 -0
  340. package/dist/lib/cms-views/views-store.d.ts +70 -0
  341. package/dist/lib/cms-views/views-store.js +129 -0
  342. package/dist/lib/cms-views/views-store.js.map +1 -0
  343. package/dist/lib/data/collection-content.d.ts +105 -0
  344. package/dist/lib/data/collection-content.js +196 -0
  345. package/dist/lib/data/collection-content.js.map +1 -0
  346. package/dist/lib/data/data-store.d.ts +97 -0
  347. package/dist/lib/data/data-store.js +205 -0
  348. package/dist/lib/data/data-store.js.map +1 -0
  349. package/dist/lib/data/index.d.ts +4 -0
  350. package/dist/lib/data/index.js +8 -0
  351. package/dist/lib/data/index.js.map +1 -0
  352. package/dist/lib/data/providers.d.ts +143 -0
  353. package/dist/lib/data/providers.js +255 -0
  354. package/dist/lib/data/providers.js.map +1 -0
  355. package/dist/lib/data/sample-capture.d.ts +30 -0
  356. package/dist/lib/data/sample-capture.js +70 -0
  357. package/dist/lib/data/sample-capture.js.map +1 -0
  358. package/dist/lib/data/sources-store.d.ts +42 -0
  359. package/dist/lib/data/sources-store.js +120 -0
  360. package/dist/lib/data/sources-store.js.map +1 -0
  361. package/dist/lib/dnd/drop-rules.d.ts +219 -0
  362. package/dist/lib/dnd/drop-rules.js +257 -0
  363. package/dist/lib/dnd/drop-rules.js.map +1 -0
  364. package/dist/lib/dnd/gap-drag.d.ts +66 -0
  365. package/dist/lib/dnd/gap-drag.js +95 -0
  366. package/dist/lib/dnd/gap-drag.js.map +1 -0
  367. package/dist/lib/locale/binding-fallback.d.ts +28 -0
  368. package/dist/lib/locale/binding-fallback.js +66 -0
  369. package/dist/lib/locale/binding-fallback.js.map +1 -0
  370. package/dist/lib/locale/fallback.d.ts +43 -0
  371. package/dist/lib/locale/fallback.js +52 -0
  372. package/dist/lib/locale/fallback.js.map +1 -0
  373. package/dist/lib/locale/index.d.ts +6 -0
  374. package/dist/lib/locale/index.js +7 -0
  375. package/dist/lib/locale/index.js.map +1 -0
  376. package/dist/lib/locale/locale-store.d.ts +40 -0
  377. package/dist/lib/locale/locale-store.js +61 -0
  378. package/dist/lib/locale/locale-store.js.map +1 -0
  379. package/dist/lib/locale/locale-switcher.d.ts +10 -0
  380. package/dist/lib/locale/locale-switcher.js +24 -0
  381. package/dist/lib/locale/locale-switcher.js.map +1 -0
  382. package/dist/lib/locale/route-variant.d.ts +14 -0
  383. package/dist/lib/locale/route-variant.js +11 -0
  384. package/dist/lib/locale/route-variant.js.map +1 -0
  385. package/dist/lib/locale/use-studio-locale.d.ts +10 -0
  386. package/dist/lib/locale/use-studio-locale.js +8 -0
  387. package/dist/lib/locale/use-studio-locale.js.map +1 -0
  388. package/dist/lib/operations/asset-repository.d.ts +15 -0
  389. package/dist/lib/operations/asset-repository.js +56 -0
  390. package/dist/lib/operations/asset-repository.js.map +1 -0
  391. package/dist/lib/operations/cms-persistence.d.ts +35 -0
  392. package/dist/lib/operations/cms-persistence.js +75 -0
  393. package/dist/lib/operations/cms-persistence.js.map +1 -0
  394. package/dist/lib/operations/graph-commands.d.ts +140 -0
  395. package/dist/lib/operations/graph-commands.js +86 -0
  396. package/dist/lib/operations/graph-commands.js.map +1 -0
  397. package/dist/lib/operations/graph-persistence.d.ts +27 -0
  398. package/dist/lib/operations/graph-persistence.js +35 -0
  399. package/dist/lib/operations/graph-persistence.js.map +1 -0
  400. package/dist/lib/operations/index.d.ts +13 -0
  401. package/dist/lib/operations/index.js +14 -0
  402. package/dist/lib/operations/index.js.map +1 -0
  403. package/dist/lib/operations/operations-package.d.ts +6 -0
  404. package/dist/lib/operations/operations-package.js +7 -0
  405. package/dist/lib/operations/operations-package.js.map +1 -0
  406. package/dist/lib/operations/persist-queue.d.ts +16 -0
  407. package/dist/lib/operations/persist-queue.js +18 -0
  408. package/dist/lib/operations/persist-queue.js.map +1 -0
  409. package/dist/lib/operations/session-hydration.d.ts +84 -0
  410. package/dist/lib/operations/session-hydration.js +112 -0
  411. package/dist/lib/operations/session-hydration.js.map +1 -0
  412. package/dist/lib/operations/studio-operations.d.ts +59 -0
  413. package/dist/lib/operations/studio-operations.js +92 -0
  414. package/dist/lib/operations/studio-operations.js.map +1 -0
  415. package/dist/lib/persistence/backend-mode.d.ts +69 -0
  416. package/dist/lib/persistence/backend-mode.js +120 -0
  417. package/dist/lib/persistence/backend-mode.js.map +1 -0
  418. package/dist/lib/persistence/convex-adapter.d.ts +34 -0
  419. package/dist/lib/persistence/convex-adapter.js +681 -0
  420. package/dist/lib/persistence/convex-adapter.js.map +1 -0
  421. package/dist/lib/persistence/convex-blob-storage.d.ts +57 -0
  422. package/dist/lib/persistence/convex-blob-storage.js +97 -0
  423. package/dist/lib/persistence/convex-blob-storage.js.map +1 -0
  424. package/dist/lib/persistence/convex-client.d.ts +19 -0
  425. package/dist/lib/persistence/convex-client.js +40 -0
  426. package/dist/lib/persistence/convex-client.js.map +1 -0
  427. package/dist/lib/persistence/index.d.ts +30 -0
  428. package/dist/lib/persistence/index.js +60 -0
  429. package/dist/lib/persistence/index.js.map +1 -0
  430. package/dist/lib/persona/labels.d.ts +23 -0
  431. package/dist/lib/persona/labels.js +122 -0
  432. package/dist/lib/persona/labels.js.map +1 -0
  433. package/dist/lib/rail.d.ts +11 -0
  434. package/dist/lib/rail.js +26 -0
  435. package/dist/lib/rail.js.map +1 -0
  436. package/dist/lib/references/impact.d.ts +64 -0
  437. package/dist/lib/references/impact.js +62 -0
  438. package/dist/lib/references/impact.js.map +1 -0
  439. package/dist/lib/references/index.d.ts +7 -0
  440. package/dist/lib/references/index.js +8 -0
  441. package/dist/lib/references/index.js.map +1 -0
  442. package/dist/lib/references/reference-model.d.ts +125 -0
  443. package/dist/lib/references/reference-model.js +242 -0
  444. package/dist/lib/references/reference-model.js.map +1 -0
  445. package/dist/lib/references/references-store.d.ts +65 -0
  446. package/dist/lib/references/references-store.js +221 -0
  447. package/dist/lib/references/references-store.js.map +1 -0
  448. package/dist/lib/registry/index.d.ts +65 -0
  449. package/dist/lib/registry/index.js +114 -0
  450. package/dist/lib/registry/index.js.map +1 -0
  451. package/dist/lib/registry/preview.d.ts +15 -0
  452. package/dist/lib/registry/preview.js +110 -0
  453. package/dist/lib/registry/preview.js.map +1 -0
  454. package/dist/lib/registry/project-components.d.ts +16 -0
  455. package/dist/lib/registry/project-components.js +152 -0
  456. package/dist/lib/registry/project-components.js.map +1 -0
  457. package/dist/lib/routing/index.d.ts +10 -0
  458. package/dist/lib/routing/index.js +11 -0
  459. package/dist/lib/routing/index.js.map +1 -0
  460. package/dist/lib/routing/routing-analysis.d.ts +26 -0
  461. package/dist/lib/routing/routing-analysis.js +37 -0
  462. package/dist/lib/routing/routing-analysis.js.map +1 -0
  463. package/dist/lib/routing/routing-store.d.ts +50 -0
  464. package/dist/lib/routing/routing-store.js +72 -0
  465. package/dist/lib/routing/routing-store.js.map +1 -0
  466. package/dist/lib/starters/kit-session.d.ts +5 -0
  467. package/dist/lib/starters/kit-session.js +17 -0
  468. package/dist/lib/starters/kit-session.js.map +1 -0
  469. package/dist/lib/theme.d.ts +21 -0
  470. package/dist/lib/theme.js +32 -0
  471. package/dist/lib/theme.js.map +1 -0
  472. package/dist/lib/utils.d.ts +11 -0
  473. package/dist/lib/utils.js +28 -0
  474. package/dist/lib/utils.js.map +1 -0
  475. package/dist/lib/webhooks/config.d.ts +15 -0
  476. package/dist/lib/webhooks/config.js +64 -0
  477. package/dist/lib/webhooks/config.js.map +1 -0
  478. package/dist/lib/webhooks/dispatcher.d.ts +67 -0
  479. package/dist/lib/webhooks/dispatcher.js +61 -0
  480. package/dist/lib/webhooks/dispatcher.js.map +1 -0
  481. package/dist/lib/webhooks/index.d.ts +11 -0
  482. package/dist/lib/webhooks/index.js +10 -0
  483. package/dist/lib/webhooks/index.js.map +1 -0
  484. package/dist/lib/webhooks/signing.d.ts +15 -0
  485. package/dist/lib/webhooks/signing.js +24 -0
  486. package/dist/lib/webhooks/signing.js.map +1 -0
  487. package/dist/lib/webhooks/tags.d.ts +25 -0
  488. package/dist/lib/webhooks/tags.js +173 -0
  489. package/dist/lib/webhooks/tags.js.map +1 -0
  490. package/dist/lib/working-graph.d.ts +82 -0
  491. package/dist/lib/working-graph.js +113 -0
  492. package/dist/lib/working-graph.js.map +1 -0
  493. package/dist/lib/workspace/index.d.ts +109 -0
  494. package/dist/lib/workspace/index.js +206 -0
  495. package/dist/lib/workspace/index.js.map +1 -0
  496. package/dist/lib/workspace/switcher-source.d.ts +39 -0
  497. package/dist/lib/workspace/switcher-source.js +23 -0
  498. package/dist/lib/workspace/switcher-source.js.map +1 -0
  499. package/dist/lib/workspace/workspace-source.d.ts +47 -0
  500. package/dist/lib/workspace/workspace-source.js +67 -0
  501. package/dist/lib/workspace/workspace-source.js.map +1 -0
  502. package/dist/router/index.d.ts +32 -0
  503. package/dist/router/index.js +32 -0
  504. package/dist/router/index.js.map +1 -0
  505. package/dist/router/match.d.ts +75 -0
  506. package/dist/router/match.js +87 -0
  507. package/dist/router/match.js.map +1 -0
  508. package/dist/router/search.d.ts +22 -0
  509. package/dist/router/search.js +16 -0
  510. package/dist/router/search.js.map +1 -0
  511. package/dist/ui/avatar.d.ts +17 -0
  512. package/dist/ui/avatar.js +38 -0
  513. package/dist/ui/avatar.js.map +1 -0
  514. package/dist/ui/badge.d.ts +9 -0
  515. package/dist/ui/badge.js +23 -0
  516. package/dist/ui/badge.js.map +1 -0
  517. package/dist/ui/button.d.ts +11 -0
  518. package/dist/ui/button.js +30 -0
  519. package/dist/ui/button.js.map +1 -0
  520. package/dist/ui/card.d.ts +11 -0
  521. package/dist/ui/card.js +23 -0
  522. package/dist/ui/card.js.map +1 -0
  523. package/dist/ui/dialog.d.ts +12 -0
  524. package/dist/ui/dialog.js +27 -0
  525. package/dist/ui/dialog.js.map +1 -0
  526. package/dist/ui/dropdown-menu.d.ts +15 -0
  527. package/dist/ui/dropdown-menu.js +24 -0
  528. package/dist/ui/dropdown-menu.js.map +1 -0
  529. package/dist/ui/field.d.ts +15 -0
  530. package/dist/ui/field.js +14 -0
  531. package/dist/ui/field.js.map +1 -0
  532. package/dist/ui/index.d.ts +14 -0
  533. package/dist/ui/index.js +15 -0
  534. package/dist/ui/index.js.map +1 -0
  535. package/dist/ui/input.d.ts +3 -0
  536. package/dist/ui/input.js +7 -0
  537. package/dist/ui/input.js.map +1 -0
  538. package/dist/ui/inspector.d.ts +18 -0
  539. package/dist/ui/inspector.js +14 -0
  540. package/dist/ui/inspector.js.map +1 -0
  541. package/dist/ui/layout.d.ts +45 -0
  542. package/dist/ui/layout.js +48 -0
  543. package/dist/ui/layout.js.map +1 -0
  544. package/dist/ui/panel.d.ts +12 -0
  545. package/dist/ui/panel.js +20 -0
  546. package/dist/ui/panel.js.map +1 -0
  547. package/dist/ui/separator.d.ts +6 -0
  548. package/dist/ui/separator.js +7 -0
  549. package/dist/ui/separator.js.map +1 -0
  550. package/dist/ui/toolbar.d.ts +9 -0
  551. package/dist/ui/toolbar.js +16 -0
  552. package/dist/ui/toolbar.js.map +1 -0
  553. package/dist/ui/typography.d.ts +50 -0
  554. package/dist/ui/typography.js +43 -0
  555. package/dist/ui/typography.js.map +1 -0
  556. package/package.json +149 -0
  557. package/src/styles/studio.css +101 -0
  558. package/src/styles/tokens.css +63 -0
@@ -0,0 +1,109 @@
1
+ import type { ElytraConfigInput } from '@elytracms/studio-core';
2
+ import type { CollectionDef, RedirectRecord, RouteRecord } from '@elytracms/cms-core';
3
+ import type { WorkspaceState } from './workspace-source';
4
+ export { resolveWorkspaceState, WORKSPACE_ENV_VAR } from './workspace-source';
5
+ export type { WorkspaceSources, WorkspaceState } from './workspace-source';
6
+ export { persistedProjects, selectSwitcherProjects, unprovisionedProjects } from './switcher-source';
7
+ export type { SwitcherEntry, SwitcherSourceInput } from './switcher-source';
8
+ /**
9
+ * Mount the studio against a project config (EC-223 mount contract). The
10
+ * consumer's entry point does `import config from './elytra.config'` and calls
11
+ * this — an explicit init, NOT an `import.meta.glob` autoload that reaches into
12
+ * the consumer's filesystem (Oli, 2026-06-19: "there's always an entry point that
13
+ * can trigger a function call"). This is the config-injection responsibility of
14
+ * the eventual `createStudio(config)` package export; it seeds the workspace state
15
+ * every later query (`getActiveProjectSlug`, `resolveDeployment*`) reads.
16
+ */
17
+ export declare function createStudio(config: ElytraConfigInput): void;
18
+ /** Set the active project slug; returns whether the resolved deployment changed. */
19
+ export declare function setActiveProjectSlug(slug: string | null): boolean;
20
+ export declare function getActiveProjectSlug(): string | null;
21
+ /** Test seam: reset the active project slug. Never used by app code. */
22
+ export declare function setActiveProjectSlugForTests(slug: string | null): void;
23
+ /** Extract a project slug from a studio path (`/<slug>/...`), else `null`. */
24
+ export declare function projectSlugFromPath(pathname: string): string | null;
25
+ /**
26
+ * The project whose backend the studio should bind for a given location
27
+ * (EC-179). A project path (`/<slug>`) binds that project; the sign-in screen
28
+ * binds the project from its `redirect` target so the *initial* sign-in
29
+ * authenticates against the backend the user is heading for (Sanity-style).
30
+ * Anywhere else (the launcher) → `null`, i.e. the default/first project.
31
+ */
32
+ export declare function activeSlugForLocation(pathname: string, redirect?: string): string | null;
33
+ /**
34
+ * The studio's resolved workspace state. Deterministic per boot: the config is
35
+ * static input (bundled file or deployment env), so it is resolved once and
36
+ * cached — every consumer (gate, switcher, launcher) sees the same state.
37
+ */
38
+ export declare function getWorkspaceState(): WorkspaceState;
39
+ /** Test seam: clear/replace the cached state. Never used by app code. */
40
+ export declare function setWorkspaceStateForTests(next: WorkspaceState | null): void;
41
+ /**
42
+ * Resolve the Convex deployment URL the studio should connect to (vision AD-8:
43
+ * the backend is wired in config). One project per backend, so the **active**
44
+ * project (see {@link setActiveProjectSlug}) selects the deployment via its
45
+ * `convex.deployment` (or its production environment's). At the launcher (no
46
+ * active project) the first configured project is the default backend. Absent
47
+ * config — or a project without a wired deployment — falls back to
48
+ * `VITE_CONVEX_URL` (`fallbackUrl`) for local single-deployment development.
49
+ */
50
+ export declare function resolveDeploymentUrl(fallbackUrl: string): string;
51
+ /** The deployment URL for a specific project slug (per-backend auth checks). */
52
+ export declare function deploymentUrlForSlug(slug: string, fallbackUrl: string): string;
53
+ /**
54
+ * The slug of the project bound to the active deployment (EC-179). One project
55
+ * per backend, so the active config project's slug identifies the deployment's
56
+ * one project; the Convex adapter stamps it onto deployment-scoped records.
57
+ * Absent config falls back to `fallbackId` (used only when wired by env alone).
58
+ */
59
+ export declare function resolveDeploymentProjectId(fallbackId: string): string;
60
+ /**
61
+ * The CMS collections of the active config project (AD-11, EC-183). CMS
62
+ * collection schemas are config-owned: the studio reads the model from
63
+ * `elytra.config.ts` (served through the persistence port — the backend has no
64
+ * `cmsSchemas` table). `[]` when the active project declares none, or when the
65
+ * studio is wired by env alone with no config.
66
+ */
67
+ export declare function resolveDeploymentCollections(): CollectionDef[];
68
+ /**
69
+ * The resolved URL routes of the active config project (EC-207, "routes as
70
+ * code"). Routes are config-sourced: the studio reads the materialized
71
+ * `RouteRecord[]` from the active `elytra.config.ts` project — never from the
72
+ * backend (the `routes` system collection is retired). The Routes surface and
73
+ * the per-page URL preview both read through here. `[]` when the active project
74
+ * declares none, or when the studio is wired by env alone with no config.
75
+ */
76
+ export declare function resolveDeploymentRoutes(): RouteRecord[];
77
+ /**
78
+ * The resolved redirects of the active config project (EC-207). Config-sourced
79
+ * exactly like {@link resolveDeploymentRoutes}: the `redirects` system
80
+ * collection is retired and nothing is read from the backend. `[]` when none
81
+ * are declared.
82
+ */
83
+ export declare function resolveDeploymentRedirects(): RedirectRecord[];
84
+ /**
85
+ * The configured locales of the active config project (AD-8). The same locale
86
+ * set the host stamps onto its per-locale cache tags — used by the revalidation
87
+ * webhook layer (EC-192) so a publish always invalidates EVERY configured locale
88
+ * (e.g. `/de`, `/fr`), never just the default. `[]` when wired by env alone.
89
+ */
90
+ export declare function resolveDeploymentLocales(): string[];
91
+ /**
92
+ * The active project's components reference (EC-194, AD-11): where the consuming
93
+ * repo's OWN real components live (`{ package }` or `{ dir }`). When set, the
94
+ * studio registry composes with the repo's components instead of the built-in
95
+ * demo fixtures — so the page builder edits the repo's actual component library.
96
+ * `undefined` → the project ships no code components; the studio falls back to the
97
+ * golden-path fixtures.
98
+ */
99
+ export declare function resolveDeploymentComponents(): readonly import("@elytracms/studio-core").HostComponentEntry[] | undefined;
100
+ /**
101
+ * The active project's public site URL (EC-215): the live site's base URL the
102
+ * studio links to (a document's live URL + open-live button, EC-216). Resolved
103
+ * in lockstep with {@link resolveDeploymentUrl} — the environment bound to the
104
+ * active deployment (the first with a wired deployment) provides the URL, falling
105
+ * back to the project-level `frontendUrl`. No active-environment selector exists
106
+ * yet, so the bound environment is the active one. `undefined` when the active
107
+ * project (or env-only wiring) configures no frontend URL.
108
+ */
109
+ export declare function resolveDeploymentFrontendUrl(): string | undefined;
@@ -0,0 +1,206 @@
1
+ import { frontendUrlForEnvironment } from '@elytracms/studio-core';
2
+ import { resolveWorkspaceState } from './workspace-source';
3
+ export { resolveWorkspaceState, WORKSPACE_ENV_VAR } from './workspace-source';
4
+ export { persistedProjects, selectSwitcherProjects, unprovisionedProjects } from './switcher-source';
5
+ let cached = null;
6
+ /**
7
+ * Mount the studio against a project config (EC-223 mount contract). The
8
+ * consumer's entry point does `import config from './elytra.config'` and calls
9
+ * this — an explicit init, NOT an `import.meta.glob` autoload that reaches into
10
+ * the consumer's filesystem (Oli, 2026-06-19: "there's always an entry point that
11
+ * can trigger a function call"). This is the config-injection responsibility of
12
+ * the eventual `createStudio(config)` package export; it seeds the workspace state
13
+ * every later query (`getActiveProjectSlug`, `resolveDeployment*`) reads.
14
+ */
15
+ export function createStudio(config) {
16
+ cached = resolveWorkspaceState({
17
+ fileModule: { default: config },
18
+ fileName: 'elytra.config.ts',
19
+ });
20
+ }
21
+ /**
22
+ * The active project slug (EC-179, vision AD-8). One project per backend, so the
23
+ * active project selects which Convex deployment the studio talks to. The root
24
+ * layout sets this from the URL (`/<slug>`) — or, on the sign-in screen, from
25
+ * the `redirect` target's slug — before the auth/persistence adapters are
26
+ * selected, so the *initial* sign-in authenticates against the project the user
27
+ * is heading for (Sanity-style: authenticate to one workspace, then the full
28
+ * config-based switcher is available). `null` at the launcher → the default
29
+ * (first) configured project's deployment.
30
+ */
31
+ let activeProjectSlug = null;
32
+ /** Set the active project slug; returns whether the resolved deployment changed. */
33
+ export function setActiveProjectSlug(slug) {
34
+ const before = resolveDeploymentUrl('');
35
+ activeProjectSlug = slug && slug.trim() !== '' ? slug : null;
36
+ return resolveDeploymentUrl('') !== before;
37
+ }
38
+ export function getActiveProjectSlug() {
39
+ return activeProjectSlug;
40
+ }
41
+ /** Test seam: reset the active project slug. Never used by app code. */
42
+ export function setActiveProjectSlugForTests(slug) {
43
+ activeProjectSlug = slug;
44
+ }
45
+ /**
46
+ * Reserved first-path segments that are NOT project slugs: the studio's own
47
+ * root routes (EC-220). Project surfaces now live at `/<slug>/...` (no `/p/`
48
+ * prefix), so the studio's root namespace is shared between project slugs and
49
+ * these fixed routes — they must be excluded from slug extraction. Keep in
50
+ * sync with the non-`$projectId` files in `src/routes/`; the launcher (`/`) is
51
+ * the empty segment, excluded by the regex requiring one path char.
52
+ */
53
+ const RESERVED_ROOT_SEGMENTS = new Set(['sign-in', 'styleguide']);
54
+ /** Extract a project slug from a studio path (`/<slug>/...`), else `null`. */
55
+ export function projectSlugFromPath(pathname) {
56
+ const match = /^\/([^/?#]+)/.exec(pathname);
57
+ if (!match)
58
+ return null;
59
+ const segment = decodeURIComponent(match[1]);
60
+ return RESERVED_ROOT_SEGMENTS.has(segment) ? null : segment;
61
+ }
62
+ /**
63
+ * The project whose backend the studio should bind for a given location
64
+ * (EC-179). A project path (`/<slug>`) binds that project; the sign-in screen
65
+ * binds the project from its `redirect` target so the *initial* sign-in
66
+ * authenticates against the backend the user is heading for (Sanity-style).
67
+ * Anywhere else (the launcher) → `null`, i.e. the default/first project.
68
+ */
69
+ export function activeSlugForLocation(pathname, redirect) {
70
+ const direct = projectSlugFromPath(pathname);
71
+ if (direct)
72
+ return direct;
73
+ if (pathname === '/sign-in' && redirect)
74
+ return projectSlugFromPath(redirect);
75
+ return null;
76
+ }
77
+ /** The active config project (by slug), or the first configured project. */
78
+ function activeConfigProject() {
79
+ const state = getWorkspaceState();
80
+ if (state.kind !== 'config')
81
+ return undefined;
82
+ if (activeProjectSlug) {
83
+ const match = state.projects.find((p) => p.slug === activeProjectSlug);
84
+ if (match)
85
+ return match;
86
+ }
87
+ return state.projects[0];
88
+ }
89
+ /**
90
+ * The studio's resolved workspace state. Deterministic per boot: the config is
91
+ * static input (bundled file or deployment env), so it is resolved once and
92
+ * cached — every consumer (gate, switcher, launcher) sees the same state.
93
+ */
94
+ export function getWorkspaceState() {
95
+ // Seeded by `createStudio(config)` at the entry point. Until then — or when the
96
+ // consumer wires no config — resolve to the empty `none` state (the single-project
97
+ // golden path), rather than reaching for the filesystem.
98
+ if (!cached)
99
+ cached = resolveWorkspaceState({});
100
+ return cached;
101
+ }
102
+ /** Test seam: clear/replace the cached state. Never used by app code. */
103
+ export function setWorkspaceStateForTests(next) {
104
+ cached = next;
105
+ }
106
+ /**
107
+ * Resolve the Convex deployment URL the studio should connect to (vision AD-8:
108
+ * the backend is wired in config). One project per backend, so the **active**
109
+ * project (see {@link setActiveProjectSlug}) selects the deployment via its
110
+ * `convex.deployment` (or its production environment's). At the launcher (no
111
+ * active project) the first configured project is the default backend. Absent
112
+ * config — or a project without a wired deployment — falls back to
113
+ * `VITE_CONVEX_URL` (`fallbackUrl`) for local single-deployment development.
114
+ */
115
+ export function resolveDeploymentUrl(fallbackUrl) {
116
+ return projectDeploymentUrl(activeConfigProject(), fallbackUrl);
117
+ }
118
+ /** The deployment URL for a specific project slug (per-backend auth checks). */
119
+ export function deploymentUrlForSlug(slug, fallbackUrl) {
120
+ const state = getWorkspaceState();
121
+ const project = state.kind === 'config' ? state.projects.find((p) => p.slug === slug) : undefined;
122
+ return projectDeploymentUrl(project, fallbackUrl);
123
+ }
124
+ /** A project's wired deployment: per-environment ref → project ref → env fallback. */
125
+ function projectDeploymentUrl(project, fallbackUrl) {
126
+ if (!project)
127
+ return fallbackUrl;
128
+ const envDeployment = project.environments.find((e) => e.convex?.deployment)?.convex?.deployment;
129
+ return envDeployment ?? project.convex?.deployment ?? fallbackUrl;
130
+ }
131
+ /**
132
+ * The slug of the project bound to the active deployment (EC-179). One project
133
+ * per backend, so the active config project's slug identifies the deployment's
134
+ * one project; the Convex adapter stamps it onto deployment-scoped records.
135
+ * Absent config falls back to `fallbackId` (used only when wired by env alone).
136
+ */
137
+ export function resolveDeploymentProjectId(fallbackId) {
138
+ return activeConfigProject()?.slug ?? fallbackId;
139
+ }
140
+ /**
141
+ * The CMS collections of the active config project (AD-11, EC-183). CMS
142
+ * collection schemas are config-owned: the studio reads the model from
143
+ * `elytra.config.ts` (served through the persistence port — the backend has no
144
+ * `cmsSchemas` table). `[]` when the active project declares none, or when the
145
+ * studio is wired by env alone with no config.
146
+ */
147
+ export function resolveDeploymentCollections() {
148
+ return activeConfigProject()?.collections ?? [];
149
+ }
150
+ /**
151
+ * The resolved URL routes of the active config project (EC-207, "routes as
152
+ * code"). Routes are config-sourced: the studio reads the materialized
153
+ * `RouteRecord[]` from the active `elytra.config.ts` project — never from the
154
+ * backend (the `routes` system collection is retired). The Routes surface and
155
+ * the per-page URL preview both read through here. `[]` when the active project
156
+ * declares none, or when the studio is wired by env alone with no config.
157
+ */
158
+ export function resolveDeploymentRoutes() {
159
+ return activeConfigProject()?.routes ?? [];
160
+ }
161
+ /**
162
+ * The resolved redirects of the active config project (EC-207). Config-sourced
163
+ * exactly like {@link resolveDeploymentRoutes}: the `redirects` system
164
+ * collection is retired and nothing is read from the backend. `[]` when none
165
+ * are declared.
166
+ */
167
+ export function resolveDeploymentRedirects() {
168
+ return activeConfigProject()?.redirects ?? [];
169
+ }
170
+ /**
171
+ * The configured locales of the active config project (AD-8). The same locale
172
+ * set the host stamps onto its per-locale cache tags — used by the revalidation
173
+ * webhook layer (EC-192) so a publish always invalidates EVERY configured locale
174
+ * (e.g. `/de`, `/fr`), never just the default. `[]` when wired by env alone.
175
+ */
176
+ export function resolveDeploymentLocales() {
177
+ return activeConfigProject()?.locales ?? [];
178
+ }
179
+ /**
180
+ * The active project's components reference (EC-194, AD-11): where the consuming
181
+ * repo's OWN real components live (`{ package }` or `{ dir }`). When set, the
182
+ * studio registry composes with the repo's components instead of the built-in
183
+ * demo fixtures — so the page builder edits the repo's actual component library.
184
+ * `undefined` → the project ships no code components; the studio falls back to the
185
+ * golden-path fixtures.
186
+ */
187
+ export function resolveDeploymentComponents() {
188
+ return activeConfigProject()?.components;
189
+ }
190
+ /**
191
+ * The active project's public site URL (EC-215): the live site's base URL the
192
+ * studio links to (a document's live URL + open-live button, EC-216). Resolved
193
+ * in lockstep with {@link resolveDeploymentUrl} — the environment bound to the
194
+ * active deployment (the first with a wired deployment) provides the URL, falling
195
+ * back to the project-level `frontendUrl`. No active-environment selector exists
196
+ * yet, so the bound environment is the active one. `undefined` when the active
197
+ * project (or env-only wiring) configures no frontend URL.
198
+ */
199
+ export function resolveDeploymentFrontendUrl() {
200
+ const project = activeConfigProject();
201
+ if (!project)
202
+ return undefined;
203
+ const boundEnv = project.environments.find((e) => e.convex?.deployment);
204
+ return frontendUrlForEnvironment(project, boundEnv?.key);
205
+ }
206
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/workspace/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,39 @@
1
+ import type { Project } from '@elytracms/studio-core';
2
+ import type { ResolvedWorkspaceProject } from '@elytracms/studio-core';
3
+ import type { WorkspaceState } from './workspace-source';
4
+ /**
5
+ * Config-driven switcher source (EC-154, reframed for EC-179 per-backend
6
+ * projects). Pure logic deciding what the project switcher and launcher list:
7
+ *
8
+ * - **No workspace config** → exactly today's behavior: the adapter-listed
9
+ * projects, untouched (single-project golden path).
10
+ * - **Config present** → every configured project, in config order, as a
11
+ * navigable entry; one that has no persisted counterpart yet is an explicit
12
+ * `unprovisioned` state ("run `builder init --project <slug>`") rather than an
13
+ * error. Persisted projects *not* in the config are not listed: the config is
14
+ * the source of truth for what this workspace is.
15
+ *
16
+ * Visibility is **not** filtered by membership. One project per backend (vision
17
+ * AD-8): a configured project lives on its own deployment, so the *active*
18
+ * backend's memberships cannot speak to another project's. Access is enforced
19
+ * where it belongs — per-backend sign-in plus the EC-150 role hook on entry —
20
+ * not by hiding projects you'd authenticate into. (Hiding them was the
21
+ * single-backend assumption; cross-backend it just made projects unreachable.)
22
+ */
23
+ export type SwitcherEntry = {
24
+ kind: 'project';
25
+ project: Project;
26
+ } | {
27
+ kind: 'unprovisioned';
28
+ config: ResolvedWorkspaceProject;
29
+ };
30
+ export interface SwitcherSourceInput {
31
+ workspace: WorkspaceState;
32
+ /** The studio store's read model (config-derived under a workspace config). */
33
+ persisted: readonly Project[];
34
+ }
35
+ export declare function selectSwitcherProjects(input: SwitcherSourceInput): SwitcherEntry[];
36
+ /** The persisted projects among the entries (for list surfaces filtering by status). */
37
+ export declare function persistedProjects(entries: readonly SwitcherEntry[]): Project[];
38
+ /** The not-yet-provisioned config entries (rendered as explicit CLI-hint states). */
39
+ export declare function unprovisionedProjects(entries: readonly SwitcherEntry[]): ResolvedWorkspaceProject[];
@@ -0,0 +1,23 @@
1
+ export function selectSwitcherProjects(input) {
2
+ if (input.workspace.kind !== 'config') {
3
+ // No-config golden path (an invalid config never reaches the switcher —
4
+ // the WorkspaceGate blocks boot): today's adapter-listed behavior.
5
+ return input.persisted.map((project) => ({ kind: 'project', project }));
6
+ }
7
+ const bySlug = new Map(input.persisted.map((project) => [project.slug, project]));
8
+ return input.workspace.projects.map((config) => {
9
+ const persisted = bySlug.get(config.slug);
10
+ return persisted
11
+ ? { kind: 'project', project: persisted }
12
+ : { kind: 'unprovisioned', config };
13
+ });
14
+ }
15
+ /** The persisted projects among the entries (for list surfaces filtering by status). */
16
+ export function persistedProjects(entries) {
17
+ return entries.flatMap((entry) => (entry.kind === 'project' ? [entry.project] : []));
18
+ }
19
+ /** The not-yet-provisioned config entries (rendered as explicit CLI-hint states). */
20
+ export function unprovisionedProjects(entries) {
21
+ return entries.flatMap((entry) => (entry.kind === 'unprovisioned' ? [entry.config] : []));
22
+ }
23
+ //# sourceMappingURL=switcher-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switcher-source.js","sourceRoot":"","sources":["../../../src/lib/workspace/switcher-source.ts"],"names":[],"mappings":"AAkCA,MAAM,UAAU,sBAAsB,CAAC,KAA0B;IAC/D,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtC,wEAAwE;QACxE,mEAAmE;QACnE,OAAO,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;IACzE,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACjF,OAAO,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACzC,OAAO,SAAS;YACd,CAAC,CAAC,EAAE,IAAI,EAAE,SAAkB,EAAE,OAAO,EAAE,SAAS,EAAE;YAClD,CAAC,CAAC,EAAE,IAAI,EAAE,eAAwB,EAAE,MAAM,EAAE,CAAA;IAChD,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,iBAAiB,CAAC,OAAiC;IACjE,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACtF,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,qBAAqB,CACnC,OAAiC;IAEjC,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAC3F,CAAC"}
@@ -0,0 +1,47 @@
1
+ import type { ResolvedWorkspaceProject, WorkspaceConfigIssue } from '@elytracms/studio-core';
2
+ /**
3
+ * Workspace-config resolution for the studio (EC-154, vision AD-8).
4
+ *
5
+ * The hosted studio can receive a code-first workspace config through two
6
+ * channels, resolved here as pure, testable logic (the channel wiring lives in
7
+ * `./index.ts`):
8
+ *
9
+ * 1. **Bundled config file** — an `elytra.config.ts` at the builder app root,
10
+ * picked up by Vite (`import.meta.glob`). This is the honest channel for
11
+ * studio development and for a self-hosted builder whose repo *is* the
12
+ * workspace.
13
+ * 2. **Env-injected JSON** — `VITE_ELYTRA_WORKSPACE` carrying the JSON form
14
+ * of the config. This is the honest channel for a hosted builder deployment
15
+ * serving a separate host repo: the host's CLI/CI serializes its
16
+ * `elytra.config.ts` into the deployment env, so the studio sees exactly
17
+ * the projects the repo declares without bundling host code.
18
+ *
19
+ * A bundled file wins over the env (the more deliberate, code-reviewed act).
20
+ * No channel → `none`: the single-project golden path, identical to today's
21
+ * adapter-listed behavior. An invalid config from either channel is a
22
+ * deterministic boot-error state (see `WorkspaceGate`) — never a silent
23
+ * fallback to the unconfigured behavior.
24
+ */
25
+ /** Env var carrying the JSON-serialized workspace config for hosted deployments. */
26
+ export declare const WORKSPACE_ENV_VAR = "VITE_ELYTRA_WORKSPACE";
27
+ export type WorkspaceState = {
28
+ kind: 'none';
29
+ } | {
30
+ kind: 'config';
31
+ source: string;
32
+ projects: ResolvedWorkspaceProject[];
33
+ } | {
34
+ kind: 'invalid';
35
+ source: string;
36
+ issues: WorkspaceConfigIssue[];
37
+ };
38
+ export interface WorkspaceSources {
39
+ /** Module namespace of the bundled `elytra.config.ts`, when one was bundled. */
40
+ fileModule?: unknown;
41
+ /** Source label for file-channel issues (defaults to the conventional name). */
42
+ fileName?: string;
43
+ /** Raw value of {@link WORKSPACE_ENV_VAR}, when set. */
44
+ envJson?: string;
45
+ }
46
+ /** Resolve the workspace state from the available channels. Pure and deterministic. */
47
+ export declare function resolveWorkspaceState(sources: WorkspaceSources): WorkspaceState;
@@ -0,0 +1,67 @@
1
+ import { extractWorkspaceConfigExport, resolveWorkspaceConfig, WORKSPACE_CONFIG_FILE, } from '@elytracms/studio-core';
2
+ /**
3
+ * Workspace-config resolution for the studio (EC-154, vision AD-8).
4
+ *
5
+ * The hosted studio can receive a code-first workspace config through two
6
+ * channels, resolved here as pure, testable logic (the channel wiring lives in
7
+ * `./index.ts`):
8
+ *
9
+ * 1. **Bundled config file** — an `elytra.config.ts` at the builder app root,
10
+ * picked up by Vite (`import.meta.glob`). This is the honest channel for
11
+ * studio development and for a self-hosted builder whose repo *is* the
12
+ * workspace.
13
+ * 2. **Env-injected JSON** — `VITE_ELYTRA_WORKSPACE` carrying the JSON form
14
+ * of the config. This is the honest channel for a hosted builder deployment
15
+ * serving a separate host repo: the host's CLI/CI serializes its
16
+ * `elytra.config.ts` into the deployment env, so the studio sees exactly
17
+ * the projects the repo declares without bundling host code.
18
+ *
19
+ * A bundled file wins over the env (the more deliberate, code-reviewed act).
20
+ * No channel → `none`: the single-project golden path, identical to today's
21
+ * adapter-listed behavior. An invalid config from either channel is a
22
+ * deterministic boot-error state (see `WorkspaceGate`) — never a silent
23
+ * fallback to the unconfigured behavior.
24
+ */
25
+ /** Env var carrying the JSON-serialized workspace config for hosted deployments. */
26
+ export const WORKSPACE_ENV_VAR = 'VITE_ELYTRA_WORKSPACE';
27
+ function fromValue(value, source) {
28
+ const result = resolveWorkspaceConfig(value, { file: source });
29
+ return result.ok
30
+ ? { kind: 'config', source, projects: result.projects }
31
+ : { kind: 'invalid', source, issues: result.issues };
32
+ }
33
+ /** Resolve the workspace state from the available channels. Pure and deterministic. */
34
+ export function resolveWorkspaceState(sources) {
35
+ if (sources.fileModule !== undefined) {
36
+ const file = sources.fileName ?? WORKSPACE_CONFIG_FILE;
37
+ const extracted = extractWorkspaceConfigExport(sources.fileModule, file);
38
+ if ('issue' in extracted)
39
+ return { kind: 'invalid', source: file, issues: [extracted.issue] };
40
+ return fromValue(extracted.value, file);
41
+ }
42
+ if (sources.envJson !== undefined && sources.envJson.trim() !== '') {
43
+ const source = WORKSPACE_ENV_VAR;
44
+ let parsed;
45
+ try {
46
+ parsed = JSON.parse(sources.envJson);
47
+ }
48
+ catch (cause) {
49
+ return {
50
+ kind: 'invalid',
51
+ source,
52
+ issues: [
53
+ {
54
+ code: 'invalid-config-shape',
55
+ severity: 'error',
56
+ message: `${WORKSPACE_ENV_VAR} is not valid JSON: ${cause instanceof Error ? cause.message : String(cause)}`,
57
+ path: [],
58
+ file: source,
59
+ },
60
+ ],
61
+ };
62
+ }
63
+ return fromValue(parsed, source);
64
+ }
65
+ return { kind: 'none' };
66
+ }
67
+ //# sourceMappingURL=workspace-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-source.js","sourceRoot":"","sources":["../../../src/lib/workspace/workspace-source.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,wBAAwB,CAAA;AAG/B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAA;AAgBxD,SAAS,SAAS,CAAC,KAAc,EAAE,MAAc;IAC/C,MAAM,MAAM,GAAG,sBAAsB,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;IAC9D,OAAO,MAAM,CAAC,EAAE;QACd,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;QACvD,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAA;AACxD,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,qBAAqB,CAAC,OAAyB;IAC7D,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,IAAI,qBAAqB,CAAA;QACtD,MAAM,SAAS,GAAG,4BAA4B,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;QACxE,IAAI,OAAO,IAAI,SAAS;YAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAA;QAC7F,OAAO,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC;IAED,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACnE,MAAM,MAAM,GAAG,iBAAiB,CAAA;QAChC,IAAI,MAAe,CAAA;QACnB,IAAI,CAAC;YACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACtC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,IAAI,EAAE,SAAS;gBACf,MAAM;gBACN,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,sBAAsB;wBAC5B,QAAQ,EAAE,OAAO;wBACjB,OAAO,EAAE,GAAG,iBAAiB,uBAAuB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;wBAC5G,IAAI,EAAE,EAAE;wBACR,IAAI,EAAE,MAAM;qBACb;iBACF;aACF,CAAA;QACH,CAAC;QACD,OAAO,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;AACzB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Studio router adapter (EC-223 Stage 3 — the gating seam). The studio UI
3
+ * navigates through these primitives instead of importing `@tanstack/react-router`
4
+ * directly, so the engine owns its router CHOICE (TanStack Router) without being
5
+ * hard-wired to a specific app: the consuming app provides the router INSTANCE +
6
+ * the generated route tree (for Aurora, via TanStack Start). `@tanstack/react-router`
7
+ * is a PEER dependency so there is exactly one instance — hence one router context
8
+ * the re-exported hooks read.
9
+ *
10
+ * Only the runtime navigation primitives the studio components use are surfaced
11
+ * here; route DEFINITION (`createFileRoute`/`createRouter`) stays in the consumer's
12
+ * route files. Paths are addressed as plain strings (`to="/$projectId"`), so the
13
+ * components don't depend on the consumer's route-tree types.
14
+ */
15
+ export { Link, Navigate, useBlocker, useLocation, useNavigate, useParams, useSearch, } from '@tanstack/react-router';
16
+ export type { LinkProps } from '@tanstack/react-router';
17
+ /**
18
+ * The studio's single in-project route (EC-223 Stage 6 — catch-all routing).
19
+ * Every URL under a project is served by one splat, addressed by its `_splat`
20
+ * subpath. By the route-table contract (`./match`), that subpath is the section
21
+ * id for a top-level section (`'cms'`, `'settings'`, …) and the deep path for a
22
+ * nested screen (`'cms/<collection>/<doc>'`). Navigate to a section with
23
+ * `to={STUDIO_PROJECT_ROUTE} params={{ projectId, _splat }}` rather than a
24
+ * per-section path that no longer exists in the consumer's route tree.
25
+ */
26
+ export declare const STUDIO_PROJECT_ROUTE: "/$projectId/$";
27
+ /**
28
+ * Typed `_splat` builder for the studio splat — the inverse of the engine route
29
+ * table (`./match`). Re-exported here so a component imports the link seam from
30
+ * one place: `{ Link, STUDIO_PROJECT_ROUTE, studioPath }`.
31
+ */
32
+ export { studioPath } from './match';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Studio router adapter (EC-223 Stage 3 — the gating seam). The studio UI
3
+ * navigates through these primitives instead of importing `@tanstack/react-router`
4
+ * directly, so the engine owns its router CHOICE (TanStack Router) without being
5
+ * hard-wired to a specific app: the consuming app provides the router INSTANCE +
6
+ * the generated route tree (for Aurora, via TanStack Start). `@tanstack/react-router`
7
+ * is a PEER dependency so there is exactly one instance — hence one router context
8
+ * the re-exported hooks read.
9
+ *
10
+ * Only the runtime navigation primitives the studio components use are surfaced
11
+ * here; route DEFINITION (`createFileRoute`/`createRouter`) stays in the consumer's
12
+ * route files. Paths are addressed as plain strings (`to="/$projectId"`), so the
13
+ * components don't depend on the consumer's route-tree types.
14
+ */
15
+ export { Link, Navigate, useBlocker, useLocation, useNavigate, useParams, useSearch, } from '@tanstack/react-router';
16
+ /**
17
+ * The studio's single in-project route (EC-223 Stage 6 — catch-all routing).
18
+ * Every URL under a project is served by one splat, addressed by its `_splat`
19
+ * subpath. By the route-table contract (`./match`), that subpath is the section
20
+ * id for a top-level section (`'cms'`, `'settings'`, …) and the deep path for a
21
+ * nested screen (`'cms/<collection>/<doc>'`). Navigate to a section with
22
+ * `to={STUDIO_PROJECT_ROUTE} params={{ projectId, _splat }}` rather than a
23
+ * per-section path that no longer exists in the consumer's route tree.
24
+ */
25
+ export const STUDIO_PROJECT_ROUTE = '/$projectId/$';
26
+ /**
27
+ * Typed `_splat` builder for the studio splat — the inverse of the engine route
28
+ * table (`./match`). Re-exported here so a component imports the link seam from
29
+ * one place: `{ Link, STUDIO_PROJECT_ROUTE, studioPath }`.
30
+ */
31
+ export { studioPath } from './match';
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/router/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,SAAS,GACV,MAAM,wBAAwB,CAAA;AAG/B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAwB,CAAA;AAE5D;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}