@velocity-astro/cms-admin 0.0.0-stage → 0.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -2
  3. package/app-directory.d.mts +2 -0
  4. package/app-directory.mjs +8 -0
  5. package/app-dist/assets/RichTextEditor-Ci93Tlgw.js +135 -0
  6. package/app-dist/assets/index-CczBKhBz.css +2 -0
  7. package/app-dist/assets/index-DOIcFJow.js +80 -0
  8. package/app-dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  9. package/app-dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  10. package/app-dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  11. package/app-dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  12. package/app-dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  13. package/app-dist/assets/manrope-cyrillic-wght-normal-Dvxsihut.woff2 +0 -0
  14. package/app-dist/assets/manrope-greek-wght-normal-DL7QRZyv.woff2 +0 -0
  15. package/app-dist/assets/manrope-latin-ext-wght-normal-Ch3YOpNY.woff2 +0 -0
  16. package/app-dist/assets/manrope-latin-wght-normal-DHIcAJRg.woff2 +0 -0
  17. package/app-dist/assets/manrope-vietnamese-wght-normal-usUDDRr7.woff2 +0 -0
  18. package/app-dist/assets/outfit-latin-ext-wght-normal-DdQaqQDo.woff2 +0 -0
  19. package/app-dist/assets/outfit-latin-wght-normal-Bc-8i84L.woff2 +0 -0
  20. package/app-dist/index.html +15 -0
  21. package/dist/app/AdminApp.d.ts +34 -0
  22. package/dist/app/AdminApp.d.ts.map +1 -0
  23. package/dist/app/AdminApp.js +26 -0
  24. package/dist/app/AdminApp.js.map +1 -0
  25. package/dist/app/AdminLayout.d.ts +7 -0
  26. package/dist/app/AdminLayout.d.ts.map +1 -0
  27. package/dist/app/AdminLayout.js +128 -0
  28. package/dist/app/AdminLayout.js.map +1 -0
  29. package/dist/app/NavigationBridge.d.ts +6 -0
  30. package/dist/app/NavigationBridge.d.ts.map +1 -0
  31. package/dist/app/NavigationBridge.js +15 -0
  32. package/dist/app/NavigationBridge.js.map +1 -0
  33. package/dist/app/PasskeysDialog.d.ts +5 -0
  34. package/dist/app/PasskeysDialog.d.ts.map +1 -0
  35. package/dist/app/PasskeysDialog.js +51 -0
  36. package/dist/app/PasskeysDialog.js.map +1 -0
  37. package/dist/app/RequestState.d.ts +20 -0
  38. package/dist/app/RequestState.d.ts.map +1 -0
  39. package/dist/app/RequestState.js +33 -0
  40. package/dist/app/RequestState.js.map +1 -0
  41. package/dist/app/paths.d.ts +29 -0
  42. package/dist/app/paths.d.ts.map +1 -0
  43. package/dist/app/paths.js +29 -0
  44. package/dist/app/paths.js.map +1 -0
  45. package/dist/app/routes.d.ts +4 -0
  46. package/dist/app/routes.d.ts.map +1 -0
  47. package/dist/app/routes.js +53 -0
  48. package/dist/app/routes.js.map +1 -0
  49. package/dist/app/use-go.d.ts +7 -0
  50. package/dist/app/use-go.d.ts.map +1 -0
  51. package/dist/app/use-go.js +11 -0
  52. package/dist/app/use-go.js.map +1 -0
  53. package/dist/client/admin-client.d.ts +317 -0
  54. package/dist/client/admin-client.d.ts.map +1 -0
  55. package/dist/client/admin-client.js +2 -0
  56. package/dist/client/admin-client.js.map +1 -0
  57. package/dist/client/client-context.d.ts +10 -0
  58. package/dist/client/client-context.d.ts.map +1 -0
  59. package/dist/client/client-context.js +14 -0
  60. package/dist/client/client-context.js.map +1 -0
  61. package/dist/client/errors.d.ts +22 -0
  62. package/dist/client/errors.d.ts.map +1 -0
  63. package/dist/client/errors.js +17 -0
  64. package/dist/client/errors.js.map +1 -0
  65. package/dist/client/http-client.d.ts +122 -0
  66. package/dist/client/http-client.d.ts.map +1 -0
  67. package/dist/client/http-client.js +366 -0
  68. package/dist/client/http-client.js.map +1 -0
  69. package/dist/client/queries.d.ts +213 -0
  70. package/dist/client/queries.d.ts.map +1 -0
  71. package/dist/client/queries.js +672 -0
  72. package/dist/client/queries.js.map +1 -0
  73. package/dist/fields/BlocksControl.d.ts +8 -0
  74. package/dist/fields/BlocksControl.d.ts.map +1 -0
  75. package/dist/fields/BlocksControl.js +154 -0
  76. package/dist/fields/BlocksControl.js.map +1 -0
  77. package/dist/fields/CustomFieldsDialog.d.ts +7 -0
  78. package/dist/fields/CustomFieldsDialog.d.ts.map +1 -0
  79. package/dist/fields/CustomFieldsDialog.js +29 -0
  80. package/dist/fields/CustomFieldsDialog.js.map +1 -0
  81. package/dist/fields/FieldEditor.d.ts +17 -0
  82. package/dist/fields/FieldEditor.d.ts.map +1 -0
  83. package/dist/fields/FieldEditor.js +25 -0
  84. package/dist/fields/FieldEditor.js.map +1 -0
  85. package/dist/fields/FieldGrid.d.ts +19 -0
  86. package/dist/fields/FieldGrid.d.ts.map +1 -0
  87. package/dist/fields/FieldGrid.js +36 -0
  88. package/dist/fields/FieldGrid.js.map +1 -0
  89. package/dist/fields/FieldSetDialog.d.ts +11 -0
  90. package/dist/fields/FieldSetDialog.d.ts.map +1 -0
  91. package/dist/fields/FieldSetDialog.js +73 -0
  92. package/dist/fields/FieldSetDialog.js.map +1 -0
  93. package/dist/fields/FieldSetEditor.d.ts +9 -0
  94. package/dist/fields/FieldSetEditor.d.ts.map +1 -0
  95. package/dist/fields/FieldSetEditor.js +49 -0
  96. package/dist/fields/FieldSetEditor.js.map +1 -0
  97. package/dist/fields/FieldSummary.d.ts +9 -0
  98. package/dist/fields/FieldSummary.d.ts.map +1 -0
  99. package/dist/fields/FieldSummary.js +28 -0
  100. package/dist/fields/FieldSummary.js.map +1 -0
  101. package/dist/fields/LinkControl.d.ts +8 -0
  102. package/dist/fields/LinkControl.d.ts.map +1 -0
  103. package/dist/fields/LinkControl.js +54 -0
  104. package/dist/fields/LinkControl.js.map +1 -0
  105. package/dist/fields/block-icons.d.ts +4 -0
  106. package/dist/fields/block-icons.d.ts.map +1 -0
  107. package/dist/fields/block-icons.js +51 -0
  108. package/dist/fields/block-icons.js.map +1 -0
  109. package/dist/fields/controls.d.ts +4 -0
  110. package/dist/fields/controls.d.ts.map +1 -0
  111. package/dist/fields/controls.js +292 -0
  112. package/dist/fields/controls.js.map +1 -0
  113. package/dist/fields/custom-values.d.ts +23 -0
  114. package/dist/fields/custom-values.d.ts.map +1 -0
  115. package/dist/fields/custom-values.js +30 -0
  116. package/dist/fields/custom-values.js.map +1 -0
  117. package/dist/fields/field-control.d.ts +72 -0
  118. package/dist/fields/field-control.d.ts.map +1 -0
  119. package/dist/fields/field-control.js +19 -0
  120. package/dist/fields/field-control.js.map +1 -0
  121. package/dist/fields/field-set.d.ts +39 -0
  122. package/dist/fields/field-set.d.ts.map +1 -0
  123. package/dist/fields/field-set.js +24 -0
  124. package/dist/fields/field-set.js.map +1 -0
  125. package/dist/fields/index.d.ts +7 -0
  126. package/dist/fields/index.d.ts.map +1 -0
  127. package/dist/fields/index.js +7 -0
  128. package/dist/fields/index.js.map +1 -0
  129. package/dist/fields/page-focus.d.ts +23 -0
  130. package/dist/fields/page-focus.d.ts.map +1 -0
  131. package/dist/fields/page-focus.js +14 -0
  132. package/dist/fields/page-focus.js.map +1 -0
  133. package/dist/fields/settings.d.ts +40 -0
  134. package/dist/fields/settings.d.ts.map +1 -0
  135. package/dist/fields/settings.js +92 -0
  136. package/dist/fields/settings.js.map +1 -0
  137. package/dist/index.d.ts +8 -0
  138. package/dist/index.d.ts.map +1 -0
  139. package/dist/index.js +6 -0
  140. package/dist/index.js.map +1 -0
  141. package/dist/lib/arrangement.d.ts +20 -0
  142. package/dist/lib/arrangement.d.ts.map +1 -0
  143. package/dist/lib/arrangement.js +52 -0
  144. package/dist/lib/arrangement.js.map +1 -0
  145. package/dist/lib/content.d.ts +45 -0
  146. package/dist/lib/content.d.ts.map +1 -0
  147. package/dist/lib/content.js +99 -0
  148. package/dist/lib/content.js.map +1 -0
  149. package/dist/lib/csv.d.ts +10 -0
  150. package/dist/lib/csv.d.ts.map +1 -0
  151. package/dist/lib/csv.js +54 -0
  152. package/dist/lib/csv.js.map +1 -0
  153. package/dist/lib/day-part.d.ts +5 -0
  154. package/dist/lib/day-part.d.ts.map +1 -0
  155. package/dist/lib/day-part.js +10 -0
  156. package/dist/lib/day-part.js.map +1 -0
  157. package/dist/lib/download.d.ts +6 -0
  158. package/dist/lib/download.d.ts.map +1 -0
  159. package/dist/lib/download.js +13 -0
  160. package/dist/lib/download.js.map +1 -0
  161. package/dist/lib/keys.d.ts +5 -0
  162. package/dist/lib/keys.d.ts.map +1 -0
  163. package/dist/lib/keys.js +26 -0
  164. package/dist/lib/keys.js.map +1 -0
  165. package/dist/lib/prepare-image.d.ts +11 -0
  166. package/dist/lib/prepare-image.d.ts.map +1 -0
  167. package/dist/lib/prepare-image.js +52 -0
  168. package/dist/lib/prepare-image.js.map +1 -0
  169. package/dist/lib/preview-tab.d.ts +14 -0
  170. package/dist/lib/preview-tab.d.ts.map +1 -0
  171. package/dist/lib/preview-tab.js +24 -0
  172. package/dist/lib/preview-tab.js.map +1 -0
  173. package/dist/lib/relative-time.d.ts +3 -0
  174. package/dist/lib/relative-time.d.ts.map +1 -0
  175. package/dist/lib/relative-time.js +18 -0
  176. package/dist/lib/relative-time.js.map +1 -0
  177. package/dist/lib/slug.d.ts +3 -0
  178. package/dist/lib/slug.d.ts.map +1 -0
  179. package/dist/lib/slug.js +10 -0
  180. package/dist/lib/slug.js.map +1 -0
  181. package/dist/lib/type-icon.d.ts +3 -0
  182. package/dist/lib/type-icon.d.ts.map +1 -0
  183. package/dist/lib/type-icon.js +27 -0
  184. package/dist/lib/type-icon.js.map +1 -0
  185. package/dist/lib/use-closing.d.ts +19 -0
  186. package/dist/lib/use-closing.d.ts.map +1 -0
  187. package/dist/lib/use-closing.js +24 -0
  188. package/dist/lib/use-closing.js.map +1 -0
  189. package/dist/lib/use-leave-guard.d.ts +16 -0
  190. package/dist/lib/use-leave-guard.d.ts.map +1 -0
  191. package/dist/lib/use-leave-guard.js +29 -0
  192. package/dist/lib/use-leave-guard.js.map +1 -0
  193. package/dist/messages/en.d.ts +1068 -0
  194. package/dist/messages/en.d.ts.map +1 -0
  195. package/dist/messages/en.js +1041 -0
  196. package/dist/messages/en.js.map +1 -0
  197. package/dist/messages/messages-context.d.ts +17 -0
  198. package/dist/messages/messages-context.d.ts.map +1 -0
  199. package/dist/messages/messages-context.js +16 -0
  200. package/dist/messages/messages-context.js.map +1 -0
  201. package/dist/plugins/PluginBoundary.d.ts +21 -0
  202. package/dist/plugins/PluginBoundary.d.ts.map +1 -0
  203. package/dist/plugins/PluginBoundary.js +20 -0
  204. package/dist/plugins/PluginBoundary.js.map +1 -0
  205. package/dist/plugins/plugin-editor.d.ts +112 -0
  206. package/dist/plugins/plugin-editor.d.ts.map +1 -0
  207. package/dist/plugins/plugin-editor.js +142 -0
  208. package/dist/plugins/plugin-editor.js.map +1 -0
  209. package/dist/plugins/plugin-ui.d.ts +45 -0
  210. package/dist/plugins/plugin-ui.d.ts.map +1 -0
  211. package/dist/plugins/plugin-ui.js +44 -0
  212. package/dist/plugins/plugin-ui.js.map +1 -0
  213. package/dist/screens/Contact/ContactDeals.d.ts +6 -0
  214. package/dist/screens/Contact/ContactDeals.d.ts.map +1 -0
  215. package/dist/screens/Contact/ContactDeals.js +41 -0
  216. package/dist/screens/Contact/ContactDeals.js.map +1 -0
  217. package/dist/screens/Contact/ContactScreen.d.ts +3 -0
  218. package/dist/screens/Contact/ContactScreen.d.ts.map +1 -0
  219. package/dist/screens/Contact/ContactScreen.js +153 -0
  220. package/dist/screens/Contact/ContactScreen.js.map +1 -0
  221. package/dist/screens/Contact/ContactWork.d.ts +6 -0
  222. package/dist/screens/Contact/ContactWork.d.ts.map +1 -0
  223. package/dist/screens/Contact/ContactWork.js +50 -0
  224. package/dist/screens/Contact/ContactWork.js.map +1 -0
  225. package/dist/screens/Contacts/ContactsScreen.d.ts +3 -0
  226. package/dist/screens/Contacts/ContactsScreen.d.ts.map +1 -0
  227. package/dist/screens/Contacts/ContactsScreen.js +127 -0
  228. package/dist/screens/Contacts/ContactsScreen.js.map +1 -0
  229. package/dist/screens/Contacts/ImportDialog.d.ts +5 -0
  230. package/dist/screens/Contacts/ImportDialog.d.ts.map +1 -0
  231. package/dist/screens/Contacts/ImportDialog.js +90 -0
  232. package/dist/screens/Contacts/ImportDialog.js.map +1 -0
  233. package/dist/screens/Contacts/PipelineBoard.d.ts +11 -0
  234. package/dist/screens/Contacts/PipelineBoard.d.ts.map +1 -0
  235. package/dist/screens/Contacts/PipelineBoard.js +74 -0
  236. package/dist/screens/Contacts/PipelineBoard.js.map +1 -0
  237. package/dist/screens/Contacts/StagesDialog.d.ts +8 -0
  238. package/dist/screens/Contacts/StagesDialog.d.ts.map +1 -0
  239. package/dist/screens/Contacts/StagesDialog.js +58 -0
  240. package/dist/screens/Contacts/StagesDialog.js.map +1 -0
  241. package/dist/screens/Contacts/contact-source.d.ts +4 -0
  242. package/dist/screens/Contacts/contact-source.d.ts.map +1 -0
  243. package/dist/screens/Contacts/contact-source.js +18 -0
  244. package/dist/screens/Contacts/contact-source.js.map +1 -0
  245. package/dist/screens/Contacts/pipeline.d.ts +23 -0
  246. package/dist/screens/Contacts/pipeline.d.ts.map +1 -0
  247. package/dist/screens/Contacts/pipeline.js +57 -0
  248. package/dist/screens/Contacts/pipeline.js.map +1 -0
  249. package/dist/screens/ContentList/ContentListScreen.d.ts +3 -0
  250. package/dist/screens/ContentList/ContentListScreen.d.ts.map +1 -0
  251. package/dist/screens/ContentList/ContentListScreen.js +105 -0
  252. package/dist/screens/ContentList/ContentListScreen.js.map +1 -0
  253. package/dist/screens/ContentType/ContentTypeScreen.d.ts +3 -0
  254. package/dist/screens/ContentType/ContentTypeScreen.d.ts.map +1 -0
  255. package/dist/screens/ContentType/ContentTypeScreen.js +133 -0
  256. package/dist/screens/ContentType/ContentTypeScreen.js.map +1 -0
  257. package/dist/screens/ContentType/FieldDialog.d.ts +12 -0
  258. package/dist/screens/ContentType/FieldDialog.d.ts.map +1 -0
  259. package/dist/screens/ContentType/FieldDialog.js +110 -0
  260. package/dist/screens/ContentType/FieldDialog.js.map +1 -0
  261. package/dist/screens/ContentType/SectionsDialog.d.ts +7 -0
  262. package/dist/screens/ContentType/SectionsDialog.d.ts.map +1 -0
  263. package/dist/screens/ContentType/SectionsDialog.js +67 -0
  264. package/dist/screens/ContentType/SectionsDialog.js.map +1 -0
  265. package/dist/screens/ContentType/SettingsDialog.d.ts +7 -0
  266. package/dist/screens/ContentType/SettingsDialog.d.ts.map +1 -0
  267. package/dist/screens/ContentType/SettingsDialog.js +75 -0
  268. package/dist/screens/ContentType/SettingsDialog.js.map +1 -0
  269. package/dist/screens/ContentTypes/ContentTypesScreen.d.ts +3 -0
  270. package/dist/screens/ContentTypes/ContentTypesScreen.d.ts.map +1 -0
  271. package/dist/screens/ContentTypes/ContentTypesScreen.js +103 -0
  272. package/dist/screens/ContentTypes/ContentTypesScreen.js.map +1 -0
  273. package/dist/screens/Deals/DealDialog.d.ts +16 -0
  274. package/dist/screens/Deals/DealDialog.d.ts.map +1 -0
  275. package/dist/screens/Deals/DealDialog.js +84 -0
  276. package/dist/screens/Deals/DealDialog.js.map +1 -0
  277. package/dist/screens/Deals/DealsScreen.d.ts +3 -0
  278. package/dist/screens/Deals/DealsScreen.d.ts.map +1 -0
  279. package/dist/screens/Deals/DealsScreen.js +93 -0
  280. package/dist/screens/Deals/DealsScreen.js.map +1 -0
  281. package/dist/screens/Deals/deal-subject.d.ts +30 -0
  282. package/dist/screens/Deals/deal-subject.d.ts.map +1 -0
  283. package/dist/screens/Deals/deal-subject.js +57 -0
  284. package/dist/screens/Deals/deal-subject.js.map +1 -0
  285. package/dist/screens/EntryEditor/EntryDeals.d.ts +11 -0
  286. package/dist/screens/EntryEditor/EntryDeals.d.ts.map +1 -0
  287. package/dist/screens/EntryEditor/EntryDeals.js +45 -0
  288. package/dist/screens/EntryEditor/EntryDeals.js.map +1 -0
  289. package/dist/screens/EntryEditor/EntryEditorScreen.d.ts +3 -0
  290. package/dist/screens/EntryEditor/EntryEditorScreen.d.ts.map +1 -0
  291. package/dist/screens/EntryEditor/EntryEditorScreen.js +65 -0
  292. package/dist/screens/EntryEditor/EntryEditorScreen.js.map +1 -0
  293. package/dist/screens/EntryEditor/EntryForm.d.ts +22 -0
  294. package/dist/screens/EntryEditor/EntryForm.d.ts.map +1 -0
  295. package/dist/screens/EntryEditor/EntryForm.js +279 -0
  296. package/dist/screens/EntryEditor/EntryForm.js.map +1 -0
  297. package/dist/screens/EntryEditor/HistoryDialog.d.ts +16 -0
  298. package/dist/screens/EntryEditor/HistoryDialog.d.ts.map +1 -0
  299. package/dist/screens/EntryEditor/HistoryDialog.js +52 -0
  300. package/dist/screens/EntryEditor/HistoryDialog.js.map +1 -0
  301. package/dist/screens/EntryEditor/PagePane.d.ts +15 -0
  302. package/dist/screens/EntryEditor/PagePane.d.ts.map +1 -0
  303. package/dist/screens/EntryEditor/PagePane.js +25 -0
  304. package/dist/screens/EntryEditor/PagePane.js.map +1 -0
  305. package/dist/screens/EntryEditor/ScheduleDialog.d.ts +15 -0
  306. package/dist/screens/EntryEditor/ScheduleDialog.d.ts.map +1 -0
  307. package/dist/screens/EntryEditor/ScheduleDialog.js +70 -0
  308. package/dist/screens/EntryEditor/ScheduleDialog.js.map +1 -0
  309. package/dist/screens/Form/FormFields.d.ts +9 -0
  310. package/dist/screens/Form/FormFields.d.ts.map +1 -0
  311. package/dist/screens/Form/FormFields.js +26 -0
  312. package/dist/screens/Form/FormFields.js.map +1 -0
  313. package/dist/screens/Form/FormScreen.d.ts +3 -0
  314. package/dist/screens/Form/FormScreen.d.ts.map +1 -0
  315. package/dist/screens/Form/FormScreen.js +58 -0
  316. package/dist/screens/Form/FormScreen.js.map +1 -0
  317. package/dist/screens/Form/FormSettingsDialog.d.ts +8 -0
  318. package/dist/screens/Form/FormSettingsDialog.d.ts.map +1 -0
  319. package/dist/screens/Form/FormSettingsDialog.js +78 -0
  320. package/dist/screens/Form/FormSettingsDialog.js.map +1 -0
  321. package/dist/screens/Form/Submissions.d.ts +6 -0
  322. package/dist/screens/Form/Submissions.d.ts.map +1 -0
  323. package/dist/screens/Form/Submissions.js +98 -0
  324. package/dist/screens/Form/Submissions.js.map +1 -0
  325. package/dist/screens/Form/form-fields.d.ts +3 -0
  326. package/dist/screens/Form/form-fields.d.ts.map +1 -0
  327. package/dist/screens/Form/form-fields.js +9 -0
  328. package/dist/screens/Form/form-fields.js.map +1 -0
  329. package/dist/screens/Forms/FormsScreen.d.ts +3 -0
  330. package/dist/screens/Forms/FormsScreen.d.ts.map +1 -0
  331. package/dist/screens/Forms/FormsScreen.js +139 -0
  332. package/dist/screens/Forms/FormsScreen.js.map +1 -0
  333. package/dist/screens/Home/FollowUps.d.ts +8 -0
  334. package/dist/screens/Home/FollowUps.d.ts.map +1 -0
  335. package/dist/screens/Home/FollowUps.js +43 -0
  336. package/dist/screens/Home/FollowUps.js.map +1 -0
  337. package/dist/screens/Home/HomeScreen.d.ts +6 -0
  338. package/dist/screens/Home/HomeScreen.d.ts.map +1 -0
  339. package/dist/screens/Home/HomeScreen.js +67 -0
  340. package/dist/screens/Home/HomeScreen.js.map +1 -0
  341. package/dist/screens/Media/MediaScreen.d.ts +3 -0
  342. package/dist/screens/Media/MediaScreen.d.ts.map +1 -0
  343. package/dist/screens/Media/MediaScreen.js +71 -0
  344. package/dist/screens/Media/MediaScreen.js.map +1 -0
  345. package/dist/screens/People/PeopleScreen.d.ts +3 -0
  346. package/dist/screens/People/PeopleScreen.d.ts.map +1 -0
  347. package/dist/screens/People/PeopleScreen.js +78 -0
  348. package/dist/screens/People/PeopleScreen.js.map +1 -0
  349. package/dist/screens/PluginScreen/PluginScreenScreen.d.ts +3 -0
  350. package/dist/screens/PluginScreen/PluginScreenScreen.d.ts.map +1 -0
  351. package/dist/screens/PluginScreen/PluginScreenScreen.js +16 -0
  352. package/dist/screens/PluginScreen/PluginScreenScreen.js.map +1 -0
  353. package/dist/screens/Plugins/PluginActivityDialog.d.ts +7 -0
  354. package/dist/screens/Plugins/PluginActivityDialog.d.ts.map +1 -0
  355. package/dist/screens/Plugins/PluginActivityDialog.js +49 -0
  356. package/dist/screens/Plugins/PluginActivityDialog.js.map +1 -0
  357. package/dist/screens/Plugins/PluginSecrets.d.ts +7 -0
  358. package/dist/screens/Plugins/PluginSecrets.d.ts.map +1 -0
  359. package/dist/screens/Plugins/PluginSecrets.js +44 -0
  360. package/dist/screens/Plugins/PluginSecrets.js.map +1 -0
  361. package/dist/screens/Plugins/PluginSettingsDialog.d.ts +7 -0
  362. package/dist/screens/Plugins/PluginSettingsDialog.d.ts.map +1 -0
  363. package/dist/screens/Plugins/PluginSettingsDialog.js +46 -0
  364. package/dist/screens/Plugins/PluginSettingsDialog.js.map +1 -0
  365. package/dist/screens/Plugins/PluginsScreen.d.ts +3 -0
  366. package/dist/screens/Plugins/PluginsScreen.d.ts.map +1 -0
  367. package/dist/screens/Plugins/PluginsScreen.js +68 -0
  368. package/dist/screens/Plugins/PluginsScreen.js.map +1 -0
  369. package/dist/screens/SignIn/SignInScreen.d.ts +6 -0
  370. package/dist/screens/SignIn/SignInScreen.d.ts.map +1 -0
  371. package/dist/screens/SignIn/SignInScreen.js +52 -0
  372. package/dist/screens/SignIn/SignInScreen.js.map +1 -0
  373. package/dist/screens/Trash/TrashScreen.d.ts +3 -0
  374. package/dist/screens/Trash/TrashScreen.d.ts.map +1 -0
  375. package/dist/screens/Trash/TrashScreen.js +73 -0
  376. package/dist/screens/Trash/TrashScreen.js.map +1 -0
  377. package/dist/standalone/config.d.ts +19 -0
  378. package/dist/standalone/config.d.ts.map +1 -0
  379. package/dist/standalone/config.js +20 -0
  380. package/dist/standalone/config.js.map +1 -0
  381. package/dist/standalone/main.d.ts +7 -0
  382. package/dist/standalone/main.d.ts.map +1 -0
  383. package/dist/standalone/main.js +26 -0
  384. package/dist/standalone/main.js.map +1 -0
  385. package/dist/testing/admin-client-contract.d.ts +24 -0
  386. package/dist/testing/admin-client-contract.d.ts.map +1 -0
  387. package/dist/testing/admin-client-contract.js +571 -0
  388. package/dist/testing/admin-client-contract.js.map +1 -0
  389. package/dist/testing/http-server.d.ts +18 -0
  390. package/dist/testing/http-server.d.ts.map +1 -0
  391. package/dist/testing/http-server.js +51 -0
  392. package/dist/testing/http-server.js.map +1 -0
  393. package/dist/testing/index.d.ts +3 -0
  394. package/dist/testing/index.d.ts.map +1 -0
  395. package/dist/testing/index.js +3 -0
  396. package/dist/testing/index.js.map +1 -0
  397. package/dist/testing/memory-client.d.ts +142 -0
  398. package/dist/testing/memory-client.d.ts.map +1 -0
  399. package/dist/testing/memory-client.js +401 -0
  400. package/dist/testing/memory-client.js.map +1 -0
  401. package/dist/testing/memory-people.d.ts +18 -0
  402. package/dist/testing/memory-people.d.ts.map +1 -0
  403. package/dist/testing/memory-people.js +70 -0
  404. package/dist/testing/memory-people.js.map +1 -0
  405. package/dist/testing/render-app.d.ts +8 -0
  406. package/dist/testing/render-app.d.ts.map +1 -0
  407. package/dist/testing/render-app.js +10 -0
  408. package/dist/testing/render-app.js.map +1 -0
  409. package/dist/testing/sample-content.d.ts +23 -0
  410. package/dist/testing/sample-content.d.ts.map +1 -0
  411. package/dist/testing/sample-content.js +225 -0
  412. package/dist/testing/sample-content.js.map +1 -0
  413. package/package.json +70 -3
@@ -0,0 +1,401 @@
1
+ import { CmsError, NotFoundError, ValidationError, createCms, } from '@velocity-astro/cms-core';
2
+ import { InMemoryEntryRepository, InMemoryImageLibrary, InMemoryMediaRepository, InMemoryMediaStore, InMemorySchemaRepository, } from '@velocity-astro/cms-core/in-memory';
3
+ import { MemoryPeople } from './memory-people.js';
4
+ import { AdminRequestError } from '../client/errors.js';
5
+ /** Makes the forms and takes the submissions a test starts with, as the site's own code would. */
6
+ export async function seedForms(cms, forms = [], submissions = []) {
7
+ for (const form of forms)
8
+ await cms.forms.create({ kind: 'user', id: 'seed', role: 'owner' }, form);
9
+ for (const { form, sent, page, suspected } of submissions) {
10
+ await cms.submissions.submit(form, sent, { ...(page !== undefined && { page }), ...(suspected !== undefined && { suspected }) });
11
+ }
12
+ }
13
+ const KNOWN_CODES = new Set(['validation_failed', 'conflict', 'not_found', 'forbidden']);
14
+ /**
15
+ * An `AdminClient` with the real CMS behind it and nothing stored: the services and rules of
16
+ * `cms-core`, over repositories that live in memory. It stands in for the server in tests and in
17
+ * the development preview, so a screen that works here meets the same validation, the same
18
+ * conflicts and the same publishing rules as on a site.
19
+ */
20
+ /** Signs this stand-in's preview links. Nothing real is behind them. */
21
+ const PREVIEW_SECRET = 'memory-admin-client-preview-secret';
22
+ export class MemoryAdminClient {
23
+ /** Every address a sign-in link was asked for, in order. */
24
+ linkRequests = [];
25
+ #passkeys = [];
26
+ #passkeysMade = 0;
27
+ /** Set to make the next request fail with this message. */
28
+ failNextWith = null;
29
+ #user;
30
+ #passkeyUser;
31
+ #defaultLocale;
32
+ #cms;
33
+ #people;
34
+ /** Settles once the content given to the constructor is in place. Every request waits for it. */
35
+ #ready;
36
+ #delay;
37
+ /** Where the browser can show each upload, by name, when `showUploads` is on. */
38
+ #shown;
39
+ constructor(options = {}) {
40
+ this.#user = options.user ?? null;
41
+ this.#passkeyUser = options.passkeyUser ?? null;
42
+ this.#defaultLocale = options.defaultLocale ?? 'en';
43
+ this.#delay = options.delay ?? 0;
44
+ this.#shown = options.showUploads === true ? new Map() : null;
45
+ this.#people = new MemoryPeople(options.people ?? (options.user ? [options.user] : []));
46
+ const types = new InMemorySchemaRepository();
47
+ const entries = new InMemoryEntryRepository();
48
+ const storage = { files: new InMemoryMediaRepository(), store: new InMemoryMediaStore() };
49
+ const cms = createCms({ types, entries, team: this.#people, previews: { secret: PREVIEW_SECRET }, ...(options.uploads !== false && { media: { storage } }) });
50
+ this.#cms = cms;
51
+ cms.media.include(new InMemoryImageLibrary(options.images));
52
+ this.#ready = (async () => {
53
+ for (const type of options.contentTypes ?? [])
54
+ await types.save(type);
55
+ for (const entry of options.entries ?? [])
56
+ await entries.save(entry, { expectedRevision: null, actorId: 'seed' });
57
+ await seedForms(cms, options.forms, options.submissions);
58
+ await cms.plugins.load(options.plugins ?? []);
59
+ })();
60
+ }
61
+ async getSession() {
62
+ this.#failIfAsked();
63
+ return this.#user;
64
+ }
65
+ async requestSignInLink(email) {
66
+ this.#failIfAsked();
67
+ this.linkRequests.push(email);
68
+ }
69
+ async signInWithPasskey() {
70
+ this.#failIfAsked();
71
+ if (!this.#passkeyUser)
72
+ throw new Error('No passkey was offered.');
73
+ this.#user = this.#passkeyUser;
74
+ return this.#user;
75
+ }
76
+ async signOut() {
77
+ this.#failIfAsked();
78
+ this.#user = null;
79
+ }
80
+ listContentTypes() {
81
+ return this.#request(() => this.#cms.schema.list());
82
+ }
83
+ listArchivedContentTypes() {
84
+ return this.#request((actor) => this.#cms.schema.listArchived(actor));
85
+ }
86
+ archiveContentType(id) {
87
+ return this.#request((actor) => this.#cms.schema.archive(actor, id));
88
+ }
89
+ restoreContentType(id) {
90
+ return this.#request((actor) => this.#cms.schema.restore(actor, id));
91
+ }
92
+ createContentType(type) {
93
+ return this.#request((actor) => this.#cms.schema.create(actor, type));
94
+ }
95
+ updateContentType(id, changes) {
96
+ return this.#request((actor) => this.#cms.schema.update(actor, id, changes));
97
+ }
98
+ addField(typeId, { section, ...field }, within = []) {
99
+ return this.#request((actor) => this.#cms.schema.addField(actor, typeId, field, { within, ...(section !== undefined && { section }) }));
100
+ }
101
+ changeField(typeId, fieldId, changes, within) {
102
+ return this.#request((actor) => this.#cms.schema.changeField(actor, typeId, fieldId, changes, within));
103
+ }
104
+ removeField(typeId, fieldId, within) {
105
+ return this.#request((actor) => this.#cms.schema.removeField(actor, typeId, fieldId, within));
106
+ }
107
+ restoreField(typeId, fieldId, within) {
108
+ return this.#request((actor) => this.#cms.schema.restoreField(actor, typeId, fieldId, within));
109
+ }
110
+ arrangeFields(typeId, arrangement) {
111
+ return this.#request((actor) => this.#cms.schema.arrangeFields(actor, typeId, arrangement));
112
+ }
113
+ setSections(typeId, sections) {
114
+ return this.#request((actor) => this.#cms.schema.setSections(actor, typeId, sections));
115
+ }
116
+ listFieldTypes() {
117
+ return this.#request(async () => this.#cms.fields.list().map(({ type, editor, takesSubmissions }) => ({ type, editor, takesSubmissions })));
118
+ }
119
+ listImages() {
120
+ const { media } = this.#cms;
121
+ return this.#request(async (actor) => ({
122
+ items: (await media.images(actor)).map((image) => ({ ...image, url: this.#shown?.get(image.name) ?? image.url })),
123
+ upload: media.takesUploads ? { maxBytes: media.maxUploadBytes } : null,
124
+ }));
125
+ }
126
+ uploadImage(upload) {
127
+ return this.#request(async (actor) => {
128
+ const image = await this.#cms.media.upload(actor, upload);
129
+ if (!this.#shown)
130
+ return image;
131
+ const url = URL.createObjectURL(new Blob([new Uint8Array(upload.bytes)]));
132
+ this.#shown.set(image.name, url);
133
+ return { ...image, url };
134
+ });
135
+ }
136
+ removeImage(name) {
137
+ return this.#request((actor) => this.#cms.media.remove(actor, name));
138
+ }
139
+ listEntries(query) {
140
+ return this.#request(async (actor) => {
141
+ const type = await this.#cms.schema.getByKey(query.type);
142
+ return this.#cms.content.find(actor, {
143
+ typeId: type.id,
144
+ order: 'updated',
145
+ limit: query.limit ?? 50,
146
+ offset: query.offset ?? 0,
147
+ ...(query.locale !== undefined && { locale: query.locale }),
148
+ });
149
+ });
150
+ }
151
+ getEntry(id) {
152
+ return this.#request((actor) => this.#cms.content.get(actor, id));
153
+ }
154
+ createEntry(entry) {
155
+ return this.#request(async (actor) => {
156
+ const type = await this.#cms.schema.getByKey(entry.type);
157
+ return this.#cms.content.create(actor, {
158
+ typeId: type.id,
159
+ locale: entry.locale ?? this.#defaultLocale,
160
+ slug: entry.slug,
161
+ data: entry.data,
162
+ });
163
+ });
164
+ }
165
+ updateEntry(id, changes) {
166
+ return this.#request((actor) => this.#cms.content.update(actor, id, changes));
167
+ }
168
+ publishEntry(id, expectedRevision) {
169
+ return this.#request((actor) => this.#cms.content.publish(actor, id, expectedRevision));
170
+ }
171
+ unpublishEntry(id) {
172
+ return this.#request((actor) => this.#cms.content.unpublish(actor, id));
173
+ }
174
+ duplicateEntry(id) {
175
+ return this.#request((actor) => this.#cms.content.duplicate(actor, id));
176
+ }
177
+ scheduleEntry(id, input) {
178
+ return this.#request((actor) => this.#cms.content.schedule(actor, id, input));
179
+ }
180
+ unscheduleEntry(id) {
181
+ return this.#request((actor) => this.#cms.content.unschedule(actor, id));
182
+ }
183
+ entryHistory(id) {
184
+ return this.#request((actor) => this.#cms.content.history(actor, id));
185
+ }
186
+ revertEntry(id, input) {
187
+ return this.#request((actor) => this.#cms.content.revert(actor, id, input));
188
+ }
189
+ trashEntry(id) {
190
+ return this.#request((actor) => this.#cms.content.trash(actor, id));
191
+ }
192
+ restoreEntry(id) {
193
+ return this.#request((actor) => this.#cms.content.restore(actor, id));
194
+ }
195
+ listTrash(query = {}) {
196
+ return this.#request((actor) => this.#cms.content.find(actor, { trashed: true, order: 'updated', limit: query.limit ?? 50, offset: query.offset ?? 0 }));
197
+ }
198
+ deleteEntry(id) {
199
+ return this.#request((actor) => this.#cms.content.delete(actor, id));
200
+ }
201
+ listForms() {
202
+ return this.#request((actor) => this.#cms.forms.list(actor));
203
+ }
204
+ createForm(form) {
205
+ return this.#request((actor) => this.#cms.forms.create(actor, form));
206
+ }
207
+ updateForm(id, changes) {
208
+ return this.#request((actor) => this.#cms.forms.update(actor, id, changes));
209
+ }
210
+ trashForm(id) {
211
+ return this.#request((actor) => this.#cms.forms.trash(actor, id));
212
+ }
213
+ restoreForm(id) {
214
+ return this.#request((actor) => this.#cms.forms.restore(actor, id));
215
+ }
216
+ listTrashedForms() {
217
+ return this.#request((actor) => this.#cms.forms.listTrashed(actor));
218
+ }
219
+ deleteForm(id) {
220
+ return this.#request((actor) => this.#cms.forms.delete(actor, id));
221
+ }
222
+ listSubmissions(query) {
223
+ return this.#request((actor) => this.#cms.submissions.find(actor, { formId: query.formId, limit: query.limit ?? 50, offset: query.offset ?? 0, ...(query.status !== undefined && { status: query.status }) }));
224
+ }
225
+ countSubmissions(formId) {
226
+ return this.#request((actor) => this.#cms.submissions.counts(actor, formId));
227
+ }
228
+ markSubmission(id, status) {
229
+ return this.#request((actor) => this.#cms.submissions.mark(actor, id, status));
230
+ }
231
+ deleteSubmission(id) {
232
+ return this.#request((actor) => this.#cms.submissions.delete(actor, id));
233
+ }
234
+ exportSubmissions(formId) {
235
+ return this.#request((actor) => this.#cms.submissions.export(actor, formId));
236
+ }
237
+ forgetSender(email) {
238
+ return this.#request((actor) => this.#cms.submissions.erase(actor, email));
239
+ }
240
+ listContacts(query = {}) {
241
+ return this.#request((actor) => this.#cms.contacts.find(actor, {
242
+ limit: query.limit ?? 50,
243
+ offset: query.offset ?? 0,
244
+ ...(query.search !== undefined && query.search !== '' && { search: query.search }),
245
+ ...(query.stage !== undefined && { stage: query.stage }),
246
+ ...(query.ownerId !== undefined && { ownerId: query.ownerId }),
247
+ ...(query.followUpBy !== undefined && { followUpBy: query.followUpBy }),
248
+ }));
249
+ }
250
+ listDeals(query = {}) {
251
+ return this.#request((actor) => this.#cms.deals.find(actor, { ...query, limit: query.limit ?? 50, offset: query.offset ?? 0 }));
252
+ }
253
+ createDeal(input) {
254
+ return this.#request((actor) => this.#cms.deals.create(actor, input));
255
+ }
256
+ updateDeal(id, changes) {
257
+ return this.#request((actor) => this.#cms.deals.update(actor, id, changes));
258
+ }
259
+ deleteDeal(id) {
260
+ return this.#request((actor) => this.#cms.deals.delete(actor, id));
261
+ }
262
+ getForecast() {
263
+ return this.#request((actor) => this.#cms.deals.forecast(actor));
264
+ }
265
+ getPipeline() {
266
+ return this.#request((actor) => this.#cms.pipeline.get(actor));
267
+ }
268
+ savePipeline(changes) {
269
+ return this.#request((actor) => this.#cms.pipeline.save(actor, changes));
270
+ }
271
+ getCustomFields() {
272
+ return this.#request((actor) => this.#cms.customFields.get(actor));
273
+ }
274
+ saveCustomFields(changes) {
275
+ return this.#request((actor) => this.#cms.customFields.save(actor, changes));
276
+ }
277
+ listTeam() {
278
+ return this.#request((actor) => this.#cms.contacts.owners(actor));
279
+ }
280
+ getContact(id) {
281
+ return this.#request((actor) => this.#cms.contacts.get(actor, id));
282
+ }
283
+ createContact(input) {
284
+ return this.#request((actor) => this.#cms.contacts.create(actor, input));
285
+ }
286
+ importContacts(rows) {
287
+ return this.#request((actor) => this.#cms.contacts.import(actor, rows));
288
+ }
289
+ updateContact(id, changes) {
290
+ return this.#request((actor) => this.#cms.contacts.update(actor, id, changes));
291
+ }
292
+ eraseContact(id) {
293
+ return this.#request((actor) => this.#cms.contacts.erase(actor, id));
294
+ }
295
+ contactTimeline(id) {
296
+ return this.#request((actor) => this.#cms.contacts.timeline(actor, id));
297
+ }
298
+ addContactNote(id, text) {
299
+ return this.#request((actor) => this.#cms.contacts.addNote(actor, id, text));
300
+ }
301
+ deleteContactNote(id, noteId) {
302
+ return this.#request((actor) => this.#cms.contacts.deleteNote(actor, id, noteId));
303
+ }
304
+ exportContact(id) {
305
+ return this.#request((actor) => this.#cms.contacts.export(actor, id));
306
+ }
307
+ /** Takes what a visitor sends through a form, as the site's public address would. For tests. */
308
+ async visitorSends(formKey, sent) {
309
+ await this.#ready;
310
+ return this.#cms.submissions.submit(formKey, sent);
311
+ }
312
+ previewEntry(id) {
313
+ return this.#request((actor) => this.#cms.previews.link(actor, id));
314
+ }
315
+ listPeople() {
316
+ return this.#request((actor) => this.#people.listUsers(actor));
317
+ }
318
+ invitePerson(person) {
319
+ return this.#request((actor) => this.#people.invite(actor, person));
320
+ }
321
+ changePersonRole(id, role) {
322
+ return this.#request((actor) => this.#people.changeRole(actor, id, role));
323
+ }
324
+ removePerson(id) {
325
+ return this.#request((actor) => this.#people.remove(actor, id));
326
+ }
327
+ /** The name of every passkey the person has, in the order they were added. */
328
+ get passkeys() {
329
+ return this.#passkeys.map((passkey) => passkey.name);
330
+ }
331
+ addPasskey(name) {
332
+ return this.#request(async () => void this.#passkeys.push({ id: `passkey-${++this.#passkeysMade}`, name, createdAt: new Date().toISOString() }));
333
+ }
334
+ listPlugins() {
335
+ return this.#request(async (actor) => this.#cms.plugins.list(actor));
336
+ }
337
+ listPluginEditors() {
338
+ return this.#request((actor) => this.#cms.plugins.editors(actor));
339
+ }
340
+ callPlugin(name, method, path, input = {}) {
341
+ // What a plugin answers crosses the wire as JSON on a real site, so it does here too.
342
+ return this.#request(async (actor) => {
343
+ const answer = await this.#cms.plugins.call(actor, name, method, path, { query: input.query ?? {}, body: method === 'GET' ? undefined : (input.body ?? {}) });
344
+ return answer === undefined ? {} : JSON.parse(JSON.stringify(answer));
345
+ });
346
+ }
347
+ setPluginEnabled(name, enabled) {
348
+ return this.#request((actor) => this.#cms.plugins.setEnabled(actor, name, enabled));
349
+ }
350
+ getPluginSettings(name) {
351
+ return this.#request((actor) => this.#cms.plugins.settings(actor, name));
352
+ }
353
+ savePluginSettings(name, values) {
354
+ return this.#request((actor) => this.#cms.plugins.saveSettings(actor, name, values));
355
+ }
356
+ setPluginSecret(name, key, value) {
357
+ return this.#request((actor) => this.#cms.plugins.setSecret(actor, name, key, value));
358
+ }
359
+ listPluginTasks(name) {
360
+ return this.#request((actor) => this.#cms.plugins.tasks(actor, name));
361
+ }
362
+ retryPluginTask(name, id) {
363
+ return this.#request((actor) => this.#cms.plugins.retryTask(actor, name, id));
364
+ }
365
+ listPasskeys() {
366
+ return this.#request(async () => [...this.#passkeys]);
367
+ }
368
+ removePasskey(id) {
369
+ return this.#request(async () => {
370
+ const index = this.#passkeys.findIndex((passkey) => passkey.id === id);
371
+ if (index < 0)
372
+ throw new NotFoundError('Passkey', id);
373
+ this.#passkeys.splice(index, 1);
374
+ });
375
+ }
376
+ /** Runs one signed-in request against the CMS, and reports a refusal the way a server would. */
377
+ async #request(run) {
378
+ this.#failIfAsked();
379
+ if (!this.#user)
380
+ throw new AdminRequestError('Sign in to continue.', 'unauthenticated');
381
+ await this.#ready;
382
+ if (this.#delay > 0)
383
+ await new Promise((resolve) => setTimeout(resolve, this.#delay));
384
+ try {
385
+ return await run({ kind: 'user', id: this.#user.id, role: this.#user.role });
386
+ }
387
+ catch (error) {
388
+ if (!(error instanceof CmsError))
389
+ throw error;
390
+ const code = KNOWN_CODES.has(error.code) ? error.code : 'unknown';
391
+ throw new AdminRequestError(error.message, code, error instanceof ValidationError ? error.issues : []);
392
+ }
393
+ }
394
+ #failIfAsked() {
395
+ const message = this.failNextWith;
396
+ this.failNextWith = null;
397
+ if (message !== null)
398
+ throw new Error(message);
399
+ }
400
+ }
401
+ //# sourceMappingURL=memory-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-client.js","sourceRoot":"","sources":["../../src/testing/memory-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,eAAe,EACf,SAAS,GA0CV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAyB,MAAM,qBAAqB,CAAC;AAsC/E,kGAAkG;AAClG,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,GAAQ,EAAE,QAA4B,EAAE,EAAE,cAAyC,EAAE;IACnH,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,MAAM,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;IACpG,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,WAAW,EAAE,CAAC;QAC1D,MAAM,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,IA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CAAC,CAAC,SAAS,CAAC;YACxF,MAAM,IAAI,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,YAAY,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACzG,CAAC;IACH,CAAC;IAED,YAAY;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,OAAO,KAAK,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import { type Actor, type Role, type Team, type TeamMember } from '@velocity-astro/cms-core';
2
+ import type { NewPerson, Person } from '../client/admin-client.js';
3
+ /**
4
+ * Who can sign in, kept in memory, with the rules a real site's sign-in applies: only owners
5
+ * manage people, an address is here once, nobody removes themselves and one owner always stays.
6
+ * It stands in for `cms-auth` behind both test clients.
7
+ */
8
+ export declare class MemoryPeople implements Team {
9
+ #private;
10
+ constructor(people?: readonly Person[]);
11
+ /** The team as the CMS sees it: ids, names and roles. */
12
+ members(): Promise<TeamMember[]>;
13
+ listUsers(actor: Actor): Promise<Person[]>;
14
+ invite(actor: Actor, person: NewPerson): Promise<Person>;
15
+ changeRole(actor: Actor, id: string, role: Role): Promise<Person>;
16
+ remove(actor: Actor, id: string): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=memory-people.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-people.d.ts","sourceRoot":"","sources":["../../src/testing/memory-people.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,KAAK,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAClK,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAInE;;;;GAIG;AACH,qBAAa,YAAa,YAAW,IAAI;;gBAI3B,MAAM,GAAE,SAAS,MAAM,EAAO;IAI1C,yDAAyD;IACnD,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAIhC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAK1C,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBxD,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC;IAUjE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAmBtD"}
@@ -0,0 +1,70 @@
1
+ import { AccessControl, ConflictError, NotFoundError, ROLES, ValidationError } from '@velocity-astro/cms-core';
2
+ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
3
+ /**
4
+ * Who can sign in, kept in memory, with the rules a real site's sign-in applies: only owners
5
+ * manage people, an address is here once, nobody removes themselves and one owner always stays.
6
+ * It stands in for `cms-auth` behind both test clients.
7
+ */
8
+ export class MemoryPeople {
9
+ #people;
10
+ #access = new AccessControl();
11
+ constructor(people = []) {
12
+ this.#people = [...people];
13
+ }
14
+ /** The team as the CMS sees it: ids, names and roles. */
15
+ async members() {
16
+ return this.#people.map(({ id, name, role }) => ({ id, name, role })).sort((a, b) => a.name.localeCompare(b.name));
17
+ }
18
+ async listUsers(actor) {
19
+ this.#access.require(actor, 'user:manage');
20
+ return [...this.#people].sort((a, b) => a.name.localeCompare(b.name));
21
+ }
22
+ async invite(actor, person) {
23
+ this.#access.require(actor, 'user:manage');
24
+ const email = person.email.trim().toLowerCase();
25
+ const issues = [
26
+ ...(EMAIL.test(email) ? [] : [{ path: ['email'], message: 'Enter an email address, such as name@example.com.' }]),
27
+ ...(person.name.trim() === '' ? [{ path: ['name'], message: "Enter the person's name." }] : []),
28
+ ...(ROLES.includes(person.role) ? [] : [{ path: ['role'], message: `Choose a role: ${ROLES.join(', ')}.` }]),
29
+ ];
30
+ const [first] = issues;
31
+ if (first)
32
+ throw new ValidationError(first.message, issues);
33
+ if (this.#people.some((other) => other.email === email))
34
+ throw new ConflictError(`${email} can already sign in.`);
35
+ const added = { id: `person-${this.#people.length + 1}`, email, name: person.name.trim(), role: person.role, hasSignedIn: false };
36
+ this.#people.push(added);
37
+ return added;
38
+ }
39
+ async changeRole(actor, id, role) {
40
+ this.#access.require(actor, 'user:manage');
41
+ const index = this.#indexOf(id);
42
+ const person = this.#people[index];
43
+ if (person.role === 'owner' && role !== 'owner')
44
+ this.#requireAnotherOwner(id);
45
+ const changed = { ...person, role };
46
+ this.#people[index] = changed;
47
+ return changed;
48
+ }
49
+ async remove(actor, id) {
50
+ this.#access.require(actor, 'user:manage');
51
+ const index = this.#indexOf(id);
52
+ if (actor.id === id)
53
+ throw new ConflictError('You cannot remove yourself. Ask another owner to do it.');
54
+ if (this.#people[index]?.role === 'owner')
55
+ this.#requireAnotherOwner(id);
56
+ this.#people.splice(index, 1);
57
+ }
58
+ #indexOf(id) {
59
+ const index = this.#people.findIndex((person) => person.id === id);
60
+ if (index < 0)
61
+ throw new NotFoundError('Person', id);
62
+ return index;
63
+ }
64
+ #requireAnotherOwner(id) {
65
+ if (!this.#people.some((person) => person.role === 'owner' && person.id !== id)) {
66
+ throw new ConflictError("This is the site's only owner, and a site needs one. Make someone else an owner first.");
67
+ }
68
+ }
69
+ }
70
+ //# sourceMappingURL=memory-people.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-people.js","sourceRoot":"","sources":["../../src/testing/memory-people.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,EAAqD,MAAM,0BAA0B,CAAC;AAGlK,MAAM,KAAK,GAAG,4BAA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BAAoB,CAAC,EAAU;QAC7B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YAChF,MAAM,IAAI,aAAa,CAAC,wFAAwF,CAAC,CAAC;QACpH,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import { type RenderResult } from '@testing-library/react';
2
+ import type { PluginEditorLoader } from '../plugins/plugin-editor.js';
3
+ import { MemoryAdminClient, type MemoryAdminClientOptions } from './memory-client.js';
4
+ /** Renders the whole editor at an address, against an in-memory server. */
5
+ export declare function renderApp(path: string, options?: MemoryAdminClientOptions, pluginEditors?: PluginEditorLoader): RenderResult & {
6
+ client: MemoryAdminClient;
7
+ };
8
+ //# sourceMappingURL=render-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-app.d.ts","sourceRoot":"","sources":["../../src/testing/render-app.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,wBAA6B,EAAE,aAAa,CAAC,EAAE,kBAAkB,GAAG,YAAY,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,CAGhK"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { render } from '@testing-library/react';
3
+ import { AdminApp } from '../app/AdminApp.js';
4
+ import { MemoryAdminClient } from './memory-client.js';
5
+ /** Renders the whole editor at an address, against an in-memory server. */
6
+ export function renderApp(path, options = {}, pluginEditors) {
7
+ const client = new MemoryAdminClient(options);
8
+ return { client, ...render(_jsx(AdminApp, { client: client, siteName: "Lakeshore Realty", initialPath: path, ...(pluginEditors && { pluginEditors }) })) };
9
+ }
10
+ //# sourceMappingURL=render-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-app.js","sourceRoot":"","sources":["../../src/testing/render-app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAiC,MAAM,oBAAoB,CAAC;AAEtF,2EAA2E;AAC3E,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,UAAoC,EAAE,EAAE,aAAkC;IAChH,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC9C,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,KAAC,QAAQ,IAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAC,kBAAkB,EAAC,WAAW,EAAE,IAAI,KAAM,CAAC,aAAa,IAAI,EAAE,aAAa,EAAE,CAAC,GAAI,CAAC,EAAE,CAAC;AACtJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { NewForm } from '@velocity-astro/cms-core';
2
+ import type { SeedSubmission } from './memory-client.js';
3
+ import type { ContentTypeDef, Entry } from '@velocity-astro/cms-core';
4
+ import type { SessionUser } from '../client/admin-client.js';
5
+ /** A small real-estate site, for tests and the development preview. */
6
+ export declare const sampleUser: SessionUser;
7
+ export declare const sampleContentTypes: readonly ContentTypeDef[];
8
+ /**
9
+ * A type whose entries are pages built from sections, and one page of it. Kept apart from the
10
+ * types above, so a test or the preview adds them when it is about pages.
11
+ */
12
+ export declare const samplePagesType: ContentTypeDef;
13
+ export declare function samplePage(now?: Date): Entry;
14
+ /** The site's menus: one entry, whose links go to pages by name or to an address typed by hand. */
15
+ export declare const sampleNavigationType: ContentTypeDef;
16
+ export declare function sampleNavigation(now?: Date): Entry;
17
+ /** Listings in each state the list can show. Times are relative to `now`, so the list always reads the same. */
18
+ export declare function sampleEntries(now?: Date): readonly Entry[];
19
+ /** Two forms a site might have: a contact form with people to tell, and a tour request. */
20
+ export declare const sampleForms: readonly NewForm[];
21
+ /** What visitors sent through them, oldest first. */
22
+ export declare const sampleSubmissions: readonly SeedSubmission[];
23
+ //# sourceMappingURL=sample-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample-content.d.ts","sourceRoot":"","sources":["../../src/testing/sample-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAY,MAAM,0BAA0B,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,uEAAuE;AACvE,eAAO,MAAM,UAAU,EAAE,WAAkF,CAAC;AAa5G,eAAO,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAgCvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,cAoD7B,CAAC;AAEF,wBAAgB,UAAU,CAAC,GAAG,GAAE,IAAiB,GAAG,KAAK,CAoBxD;AAED,mGAAmG;AACnG,eAAO,MAAM,oBAAoB,EAAE,cAelC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,IAAiB,GAAG,KAAK,CAkB9D;AAID,gHAAgH;AAChH,wBAAgB,aAAa,CAAC,GAAG,GAAE,IAAiB,GAAG,SAAS,KAAK,EAAE,CA+BtE;AAED,2FAA2F;AAC3F,eAAO,MAAM,WAAW,EAAE,SAAS,OAAO,EAsBzC,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAKtD,CAAC"}