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

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 (521) 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-UA2kIIOw.js +135 -0
  6. package/app-dist/assets/index-DkDHhCG6.css +2 -0
  7. package/app-dist/assets/index-DovlPZTn.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 +29 -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 +29 -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 +183 -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 +37 -0
  40. package/dist/app/RequestState.js.map +1 -0
  41. package/dist/app/RouteError.d.ts +9 -0
  42. package/dist/app/RouteError.d.ts.map +1 -0
  43. package/dist/app/RouteError.js +16 -0
  44. package/dist/app/RouteError.js.map +1 -0
  45. package/dist/app/paths.d.ts +38 -0
  46. package/dist/app/paths.d.ts.map +1 -0
  47. package/dist/app/paths.js +37 -0
  48. package/dist/app/paths.js.map +1 -0
  49. package/dist/app/routes.d.ts +4 -0
  50. package/dist/app/routes.d.ts.map +1 -0
  51. package/dist/app/routes.js +68 -0
  52. package/dist/app/routes.js.map +1 -0
  53. package/dist/app/use-go.d.ts +7 -0
  54. package/dist/app/use-go.d.ts.map +1 -0
  55. package/dist/app/use-go.js +11 -0
  56. package/dist/app/use-go.js.map +1 -0
  57. package/dist/client/admin-client.d.ts +338 -0
  58. package/dist/client/admin-client.d.ts.map +1 -0
  59. package/dist/client/admin-client.js +2 -0
  60. package/dist/client/admin-client.js.map +1 -0
  61. package/dist/client/client-context.d.ts +10 -0
  62. package/dist/client/client-context.d.ts.map +1 -0
  63. package/dist/client/client-context.js +14 -0
  64. package/dist/client/client-context.js.map +1 -0
  65. package/dist/client/errors.d.ts +22 -0
  66. package/dist/client/errors.d.ts.map +1 -0
  67. package/dist/client/errors.js +17 -0
  68. package/dist/client/errors.js.map +1 -0
  69. package/dist/client/http-client.d.ts +133 -0
  70. package/dist/client/http-client.d.ts.map +1 -0
  71. package/dist/client/http-client.js +399 -0
  72. package/dist/client/http-client.js.map +1 -0
  73. package/dist/client/queries.d.ts +232 -0
  74. package/dist/client/queries.d.ts.map +1 -0
  75. package/dist/client/queries.js +780 -0
  76. package/dist/client/queries.js.map +1 -0
  77. package/dist/fields/BlocksControl.d.ts +14 -0
  78. package/dist/fields/BlocksControl.d.ts.map +1 -0
  79. package/dist/fields/BlocksControl.js +476 -0
  80. package/dist/fields/BlocksControl.js.map +1 -0
  81. package/dist/fields/CustomFieldsDialog.d.ts +7 -0
  82. package/dist/fields/CustomFieldsDialog.d.ts.map +1 -0
  83. package/dist/fields/CustomFieldsDialog.js +29 -0
  84. package/dist/fields/CustomFieldsDialog.js.map +1 -0
  85. package/dist/fields/FieldEditor.d.ts +17 -0
  86. package/dist/fields/FieldEditor.d.ts.map +1 -0
  87. package/dist/fields/FieldEditor.js +25 -0
  88. package/dist/fields/FieldEditor.js.map +1 -0
  89. package/dist/fields/FieldGrid.d.ts +31 -0
  90. package/dist/fields/FieldGrid.d.ts.map +1 -0
  91. package/dist/fields/FieldGrid.js +42 -0
  92. package/dist/fields/FieldGrid.js.map +1 -0
  93. package/dist/fields/FieldSetDialog.d.ts +11 -0
  94. package/dist/fields/FieldSetDialog.d.ts.map +1 -0
  95. package/dist/fields/FieldSetDialog.js +73 -0
  96. package/dist/fields/FieldSetDialog.js.map +1 -0
  97. package/dist/fields/FieldSetEditor.d.ts +9 -0
  98. package/dist/fields/FieldSetEditor.d.ts.map +1 -0
  99. package/dist/fields/FieldSetEditor.js +49 -0
  100. package/dist/fields/FieldSetEditor.js.map +1 -0
  101. package/dist/fields/FieldSummary.d.ts +9 -0
  102. package/dist/fields/FieldSummary.d.ts.map +1 -0
  103. package/dist/fields/FieldSummary.js +28 -0
  104. package/dist/fields/FieldSummary.js.map +1 -0
  105. package/dist/fields/LinkControl.d.ts +8 -0
  106. package/dist/fields/LinkControl.d.ts.map +1 -0
  107. package/dist/fields/LinkControl.js +54 -0
  108. package/dist/fields/LinkControl.js.map +1 -0
  109. package/dist/fields/SiteImagePicker.d.ts +22 -0
  110. package/dist/fields/SiteImagePicker.d.ts.map +1 -0
  111. package/dist/fields/SiteImagePicker.js +42 -0
  112. package/dist/fields/SiteImagePicker.js.map +1 -0
  113. package/dist/fields/block-icons.d.ts +4 -0
  114. package/dist/fields/block-icons.d.ts.map +1 -0
  115. package/dist/fields/block-icons.js +53 -0
  116. package/dist/fields/block-icons.js.map +1 -0
  117. package/dist/fields/carry.d.ts +19 -0
  118. package/dist/fields/carry.d.ts.map +1 -0
  119. package/dist/fields/carry.js +61 -0
  120. package/dist/fields/carry.js.map +1 -0
  121. package/dist/fields/controls.d.ts +4 -0
  122. package/dist/fields/controls.d.ts.map +1 -0
  123. package/dist/fields/controls.js +363 -0
  124. package/dist/fields/controls.js.map +1 -0
  125. package/dist/fields/custom-values.d.ts +23 -0
  126. package/dist/fields/custom-values.d.ts.map +1 -0
  127. package/dist/fields/custom-values.js +30 -0
  128. package/dist/fields/custom-values.js.map +1 -0
  129. package/dist/fields/field-control.d.ts +170 -0
  130. package/dist/fields/field-control.d.ts.map +1 -0
  131. package/dist/fields/field-control.js +19 -0
  132. package/dist/fields/field-control.js.map +1 -0
  133. package/dist/fields/field-set.d.ts +39 -0
  134. package/dist/fields/field-set.d.ts.map +1 -0
  135. package/dist/fields/field-set.js +24 -0
  136. package/dist/fields/field-set.js.map +1 -0
  137. package/dist/fields/index.d.ts +7 -0
  138. package/dist/fields/index.d.ts.map +1 -0
  139. package/dist/fields/index.js +7 -0
  140. package/dist/fields/index.js.map +1 -0
  141. package/dist/fields/page-focus.d.ts +82 -0
  142. package/dist/fields/page-focus.d.ts.map +1 -0
  143. package/dist/fields/page-focus.js +104 -0
  144. package/dist/fields/page-focus.js.map +1 -0
  145. package/dist/fields/settings.d.ts +40 -0
  146. package/dist/fields/settings.d.ts.map +1 -0
  147. package/dist/fields/settings.js +99 -0
  148. package/dist/fields/settings.js.map +1 -0
  149. package/dist/index.d.ts +8 -0
  150. package/dist/index.d.ts.map +1 -0
  151. package/dist/index.js +6 -0
  152. package/dist/index.js.map +1 -0
  153. package/dist/lib/arrangement.d.ts +20 -0
  154. package/dist/lib/arrangement.d.ts.map +1 -0
  155. package/dist/lib/arrangement.js +52 -0
  156. package/dist/lib/arrangement.js.map +1 -0
  157. package/dist/lib/boot.d.ts +25 -0
  158. package/dist/lib/boot.d.ts.map +1 -0
  159. package/dist/lib/boot.js +87 -0
  160. package/dist/lib/boot.js.map +1 -0
  161. package/dist/lib/content.d.ts +45 -0
  162. package/dist/lib/content.d.ts.map +1 -0
  163. package/dist/lib/content.js +99 -0
  164. package/dist/lib/content.js.map +1 -0
  165. package/dist/lib/csv.d.ts +10 -0
  166. package/dist/lib/csv.d.ts.map +1 -0
  167. package/dist/lib/csv.js +54 -0
  168. package/dist/lib/csv.js.map +1 -0
  169. package/dist/lib/day-part.d.ts +5 -0
  170. package/dist/lib/day-part.d.ts.map +1 -0
  171. package/dist/lib/day-part.js +10 -0
  172. package/dist/lib/day-part.js.map +1 -0
  173. package/dist/lib/download.d.ts +6 -0
  174. package/dist/lib/download.d.ts.map +1 -0
  175. package/dist/lib/download.js +13 -0
  176. package/dist/lib/download.js.map +1 -0
  177. package/dist/lib/keys.d.ts +5 -0
  178. package/dist/lib/keys.d.ts.map +1 -0
  179. package/dist/lib/keys.js +26 -0
  180. package/dist/lib/keys.js.map +1 -0
  181. package/dist/lib/load-fresh.d.ts +8 -0
  182. package/dist/lib/load-fresh.d.ts.map +1 -0
  183. package/dist/lib/load-fresh.js +51 -0
  184. package/dist/lib/load-fresh.js.map +1 -0
  185. package/dist/lib/open-site.d.ts +6 -0
  186. package/dist/lib/open-site.d.ts.map +1 -0
  187. package/dist/lib/open-site.js +8 -0
  188. package/dist/lib/open-site.js.map +1 -0
  189. package/dist/lib/prepare-image.d.ts +11 -0
  190. package/dist/lib/prepare-image.d.ts.map +1 -0
  191. package/dist/lib/prepare-image.js +50 -0
  192. package/dist/lib/prepare-image.js.map +1 -0
  193. package/dist/lib/preview-tab.d.ts +14 -0
  194. package/dist/lib/preview-tab.d.ts.map +1 -0
  195. package/dist/lib/preview-tab.js +24 -0
  196. package/dist/lib/preview-tab.js.map +1 -0
  197. package/dist/lib/relative-time.d.ts +3 -0
  198. package/dist/lib/relative-time.d.ts.map +1 -0
  199. package/dist/lib/relative-time.js +18 -0
  200. package/dist/lib/relative-time.js.map +1 -0
  201. package/dist/lib/rich-from-html.d.ts +9 -0
  202. package/dist/lib/rich-from-html.d.ts.map +1 -0
  203. package/dist/lib/rich-from-html.js +129 -0
  204. package/dist/lib/rich-from-html.js.map +1 -0
  205. package/dist/lib/sittings.d.ts +16 -0
  206. package/dist/lib/sittings.d.ts.map +1 -0
  207. package/dist/lib/sittings.js +29 -0
  208. package/dist/lib/sittings.js.map +1 -0
  209. package/dist/lib/slug.d.ts +3 -0
  210. package/dist/lib/slug.d.ts.map +1 -0
  211. package/dist/lib/slug.js +10 -0
  212. package/dist/lib/slug.js.map +1 -0
  213. package/dist/lib/small-image.d.ts +7 -0
  214. package/dist/lib/small-image.d.ts.map +1 -0
  215. package/dist/lib/small-image.js +6 -0
  216. package/dist/lib/small-image.js.map +1 -0
  217. package/dist/lib/type-icon.d.ts +3 -0
  218. package/dist/lib/type-icon.d.ts.map +1 -0
  219. package/dist/lib/type-icon.js +27 -0
  220. package/dist/lib/type-icon.js.map +1 -0
  221. package/dist/lib/use-closing.d.ts +19 -0
  222. package/dist/lib/use-closing.d.ts.map +1 -0
  223. package/dist/lib/use-closing.js +24 -0
  224. package/dist/lib/use-closing.js.map +1 -0
  225. package/dist/lib/use-command-key.d.ts +16 -0
  226. package/dist/lib/use-command-key.d.ts.map +1 -0
  227. package/dist/lib/use-command-key.js +30 -0
  228. package/dist/lib/use-command-key.js.map +1 -0
  229. package/dist/lib/use-escapes.d.ts +7 -0
  230. package/dist/lib/use-escapes.d.ts.map +1 -0
  231. package/dist/lib/use-escapes.js +19 -0
  232. package/dist/lib/use-escapes.js.map +1 -0
  233. package/dist/lib/use-history.d.ts +24 -0
  234. package/dist/lib/use-history.d.ts.map +1 -0
  235. package/dist/lib/use-history.js +48 -0
  236. package/dist/lib/use-history.js.map +1 -0
  237. package/dist/lib/use-leave-guard.d.ts +16 -0
  238. package/dist/lib/use-leave-guard.d.ts.map +1 -0
  239. package/dist/lib/use-leave-guard.js +29 -0
  240. package/dist/lib/use-leave-guard.js.map +1 -0
  241. package/dist/lib/use-narrow.d.ts +5 -0
  242. package/dist/lib/use-narrow.d.ts.map +1 -0
  243. package/dist/lib/use-narrow.js +19 -0
  244. package/dist/lib/use-narrow.js.map +1 -0
  245. package/dist/lib/use-panel-sizes.d.ts +7 -0
  246. package/dist/lib/use-panel-sizes.d.ts.map +1 -0
  247. package/dist/lib/use-panel-sizes.js +33 -0
  248. package/dist/lib/use-panel-sizes.js.map +1 -0
  249. package/dist/lib/use-save-key.d.ts +15 -0
  250. package/dist/lib/use-save-key.d.ts.map +1 -0
  251. package/dist/lib/use-save-key.js +27 -0
  252. package/dist/lib/use-save-key.js.map +1 -0
  253. package/dist/lib/use-undo-keys.d.ts +14 -0
  254. package/dist/lib/use-undo-keys.d.ts.map +1 -0
  255. package/dist/lib/use-undo-keys.js +46 -0
  256. package/dist/lib/use-undo-keys.js.map +1 -0
  257. package/dist/messages/en.d.ts +1334 -0
  258. package/dist/messages/en.d.ts.map +1 -0
  259. package/dist/messages/en.js +1280 -0
  260. package/dist/messages/en.js.map +1 -0
  261. package/dist/messages/messages-context.d.ts +17 -0
  262. package/dist/messages/messages-context.d.ts.map +1 -0
  263. package/dist/messages/messages-context.js +16 -0
  264. package/dist/messages/messages-context.js.map +1 -0
  265. package/dist/page-bridge/index.d.ts +7 -0
  266. package/dist/page-bridge/index.d.ts.map +1 -0
  267. package/dist/page-bridge/index.js +7 -0
  268. package/dist/page-bridge/index.js.map +1 -0
  269. package/dist/page-bridge/preview-bridge.d.ts +35 -0
  270. package/dist/page-bridge/preview-bridge.d.ts.map +1 -0
  271. package/dist/page-bridge/preview-bridge.js +1821 -0
  272. package/dist/page-bridge/preview-bridge.js.map +1 -0
  273. package/dist/plugins/PluginBoundary.d.ts +21 -0
  274. package/dist/plugins/PluginBoundary.d.ts.map +1 -0
  275. package/dist/plugins/PluginBoundary.js +20 -0
  276. package/dist/plugins/PluginBoundary.js.map +1 -0
  277. package/dist/plugins/plugin-editor.d.ts +114 -0
  278. package/dist/plugins/plugin-editor.d.ts.map +1 -0
  279. package/dist/plugins/plugin-editor.js +142 -0
  280. package/dist/plugins/plugin-editor.js.map +1 -0
  281. package/dist/plugins/plugin-ui.d.ts +45 -0
  282. package/dist/plugins/plugin-ui.d.ts.map +1 -0
  283. package/dist/plugins/plugin-ui.js +44 -0
  284. package/dist/plugins/plugin-ui.js.map +1 -0
  285. package/dist/screens/Contact/ContactDeals.d.ts +6 -0
  286. package/dist/screens/Contact/ContactDeals.d.ts.map +1 -0
  287. package/dist/screens/Contact/ContactDeals.js +41 -0
  288. package/dist/screens/Contact/ContactDeals.js.map +1 -0
  289. package/dist/screens/Contact/ContactScreen.d.ts +3 -0
  290. package/dist/screens/Contact/ContactScreen.d.ts.map +1 -0
  291. package/dist/screens/Contact/ContactScreen.js +165 -0
  292. package/dist/screens/Contact/ContactScreen.js.map +1 -0
  293. package/dist/screens/Contact/ContactWork.d.ts +6 -0
  294. package/dist/screens/Contact/ContactWork.d.ts.map +1 -0
  295. package/dist/screens/Contact/ContactWork.js +50 -0
  296. package/dist/screens/Contact/ContactWork.js.map +1 -0
  297. package/dist/screens/Contacts/ContactsScreen.d.ts +3 -0
  298. package/dist/screens/Contacts/ContactsScreen.d.ts.map +1 -0
  299. package/dist/screens/Contacts/ContactsScreen.js +133 -0
  300. package/dist/screens/Contacts/ContactsScreen.js.map +1 -0
  301. package/dist/screens/Contacts/ImportDialog.d.ts +5 -0
  302. package/dist/screens/Contacts/ImportDialog.d.ts.map +1 -0
  303. package/dist/screens/Contacts/ImportDialog.js +90 -0
  304. package/dist/screens/Contacts/ImportDialog.js.map +1 -0
  305. package/dist/screens/Contacts/PipelineBoard.d.ts +11 -0
  306. package/dist/screens/Contacts/PipelineBoard.d.ts.map +1 -0
  307. package/dist/screens/Contacts/PipelineBoard.js +74 -0
  308. package/dist/screens/Contacts/PipelineBoard.js.map +1 -0
  309. package/dist/screens/Contacts/StagesDialog.d.ts +8 -0
  310. package/dist/screens/Contacts/StagesDialog.d.ts.map +1 -0
  311. package/dist/screens/Contacts/StagesDialog.js +61 -0
  312. package/dist/screens/Contacts/StagesDialog.js.map +1 -0
  313. package/dist/screens/Contacts/contact-source.d.ts +4 -0
  314. package/dist/screens/Contacts/contact-source.d.ts.map +1 -0
  315. package/dist/screens/Contacts/contact-source.js +18 -0
  316. package/dist/screens/Contacts/contact-source.js.map +1 -0
  317. package/dist/screens/Contacts/pipeline.d.ts +23 -0
  318. package/dist/screens/Contacts/pipeline.d.ts.map +1 -0
  319. package/dist/screens/Contacts/pipeline.js +57 -0
  320. package/dist/screens/Contacts/pipeline.js.map +1 -0
  321. package/dist/screens/ContentList/ContentListScreen.d.ts +3 -0
  322. package/dist/screens/ContentList/ContentListScreen.d.ts.map +1 -0
  323. package/dist/screens/ContentList/ContentListScreen.js +112 -0
  324. package/dist/screens/ContentList/ContentListScreen.js.map +1 -0
  325. package/dist/screens/ContentType/ContentTypeScreen.d.ts +3 -0
  326. package/dist/screens/ContentType/ContentTypeScreen.d.ts.map +1 -0
  327. package/dist/screens/ContentType/ContentTypeScreen.js +140 -0
  328. package/dist/screens/ContentType/ContentTypeScreen.js.map +1 -0
  329. package/dist/screens/ContentType/FieldDialog.d.ts +12 -0
  330. package/dist/screens/ContentType/FieldDialog.d.ts.map +1 -0
  331. package/dist/screens/ContentType/FieldDialog.js +110 -0
  332. package/dist/screens/ContentType/FieldDialog.js.map +1 -0
  333. package/dist/screens/ContentType/SectionsDialog.d.ts +7 -0
  334. package/dist/screens/ContentType/SectionsDialog.d.ts.map +1 -0
  335. package/dist/screens/ContentType/SectionsDialog.js +67 -0
  336. package/dist/screens/ContentType/SectionsDialog.js.map +1 -0
  337. package/dist/screens/ContentType/SettingsDialog.d.ts +7 -0
  338. package/dist/screens/ContentType/SettingsDialog.d.ts.map +1 -0
  339. package/dist/screens/ContentType/SettingsDialog.js +75 -0
  340. package/dist/screens/ContentType/SettingsDialog.js.map +1 -0
  341. package/dist/screens/ContentTypes/ContentTypesScreen.d.ts +3 -0
  342. package/dist/screens/ContentTypes/ContentTypesScreen.d.ts.map +1 -0
  343. package/dist/screens/ContentTypes/ContentTypesScreen.js +103 -0
  344. package/dist/screens/ContentTypes/ContentTypesScreen.js.map +1 -0
  345. package/dist/screens/Deals/DealDialog.d.ts +16 -0
  346. package/dist/screens/Deals/DealDialog.d.ts.map +1 -0
  347. package/dist/screens/Deals/DealDialog.js +84 -0
  348. package/dist/screens/Deals/DealDialog.js.map +1 -0
  349. package/dist/screens/Deals/DealsScreen.d.ts +3 -0
  350. package/dist/screens/Deals/DealsScreen.d.ts.map +1 -0
  351. package/dist/screens/Deals/DealsScreen.js +117 -0
  352. package/dist/screens/Deals/DealsScreen.js.map +1 -0
  353. package/dist/screens/Deals/deal-subject.d.ts +30 -0
  354. package/dist/screens/Deals/deal-subject.d.ts.map +1 -0
  355. package/dist/screens/Deals/deal-subject.js +57 -0
  356. package/dist/screens/Deals/deal-subject.js.map +1 -0
  357. package/dist/screens/EntryEditor/EntryDeals.d.ts +11 -0
  358. package/dist/screens/EntryEditor/EntryDeals.d.ts.map +1 -0
  359. package/dist/screens/EntryEditor/EntryDeals.js +45 -0
  360. package/dist/screens/EntryEditor/EntryDeals.js.map +1 -0
  361. package/dist/screens/EntryEditor/EntryEditorScreen.d.ts +3 -0
  362. package/dist/screens/EntryEditor/EntryEditorScreen.d.ts.map +1 -0
  363. package/dist/screens/EntryEditor/EntryEditorScreen.js +70 -0
  364. package/dist/screens/EntryEditor/EntryEditorScreen.js.map +1 -0
  365. package/dist/screens/EntryEditor/EntryForm.d.ts +26 -0
  366. package/dist/screens/EntryEditor/EntryForm.d.ts.map +1 -0
  367. package/dist/screens/EntryEditor/EntryForm.js +480 -0
  368. package/dist/screens/EntryEditor/EntryForm.js.map +1 -0
  369. package/dist/screens/EntryEditor/HistoryDialog.d.ts +17 -0
  370. package/dist/screens/EntryEditor/HistoryDialog.d.ts.map +1 -0
  371. package/dist/screens/EntryEditor/HistoryDialog.js +71 -0
  372. package/dist/screens/EntryEditor/HistoryDialog.js.map +1 -0
  373. package/dist/screens/EntryEditor/PagePane.d.ts +45 -0
  374. package/dist/screens/EntryEditor/PagePane.d.ts.map +1 -0
  375. package/dist/screens/EntryEditor/PagePane.js +82 -0
  376. package/dist/screens/EntryEditor/PagePane.js.map +1 -0
  377. package/dist/screens/EntryEditor/ScheduleDialog.d.ts +15 -0
  378. package/dist/screens/EntryEditor/ScheduleDialog.d.ts.map +1 -0
  379. package/dist/screens/EntryEditor/ScheduleDialog.js +70 -0
  380. package/dist/screens/EntryEditor/ScheduleDialog.js.map +1 -0
  381. package/dist/screens/EntryEditor/SectionOutline.d.ts +11 -0
  382. package/dist/screens/EntryEditor/SectionOutline.d.ts.map +1 -0
  383. package/dist/screens/EntryEditor/SectionOutline.js +46 -0
  384. package/dist/screens/EntryEditor/SectionOutline.js.map +1 -0
  385. package/dist/screens/EntryEditor/ThemeCard.d.ts +32 -0
  386. package/dist/screens/EntryEditor/ThemeCard.d.ts.map +1 -0
  387. package/dist/screens/EntryEditor/ThemeCard.js +71 -0
  388. package/dist/screens/EntryEditor/ThemeCard.js.map +1 -0
  389. package/dist/screens/Form/FormFields.d.ts +9 -0
  390. package/dist/screens/Form/FormFields.d.ts.map +1 -0
  391. package/dist/screens/Form/FormFields.js +26 -0
  392. package/dist/screens/Form/FormFields.js.map +1 -0
  393. package/dist/screens/Form/FormScreen.d.ts +3 -0
  394. package/dist/screens/Form/FormScreen.d.ts.map +1 -0
  395. package/dist/screens/Form/FormScreen.js +66 -0
  396. package/dist/screens/Form/FormScreen.js.map +1 -0
  397. package/dist/screens/Form/FormSettingsDialog.d.ts +8 -0
  398. package/dist/screens/Form/FormSettingsDialog.d.ts.map +1 -0
  399. package/dist/screens/Form/FormSettingsDialog.js +78 -0
  400. package/dist/screens/Form/FormSettingsDialog.js.map +1 -0
  401. package/dist/screens/Form/Submissions.d.ts +6 -0
  402. package/dist/screens/Form/Submissions.d.ts.map +1 -0
  403. package/dist/screens/Form/Submissions.js +98 -0
  404. package/dist/screens/Form/Submissions.js.map +1 -0
  405. package/dist/screens/Form/form-fields.d.ts +3 -0
  406. package/dist/screens/Form/form-fields.d.ts.map +1 -0
  407. package/dist/screens/Form/form-fields.js +9 -0
  408. package/dist/screens/Form/form-fields.js.map +1 -0
  409. package/dist/screens/Forms/FormsScreen.d.ts +3 -0
  410. package/dist/screens/Forms/FormsScreen.d.ts.map +1 -0
  411. package/dist/screens/Forms/FormsScreen.js +142 -0
  412. package/dist/screens/Forms/FormsScreen.js.map +1 -0
  413. package/dist/screens/Home/FollowUps.d.ts +8 -0
  414. package/dist/screens/Home/FollowUps.d.ts.map +1 -0
  415. package/dist/screens/Home/FollowUps.js +43 -0
  416. package/dist/screens/Home/FollowUps.js.map +1 -0
  417. package/dist/screens/Home/HomeScreen.d.ts +6 -0
  418. package/dist/screens/Home/HomeScreen.d.ts.map +1 -0
  419. package/dist/screens/Home/HomeScreen.js +156 -0
  420. package/dist/screens/Home/HomeScreen.js.map +1 -0
  421. package/dist/screens/Media/MediaScreen.d.ts +3 -0
  422. package/dist/screens/Media/MediaScreen.d.ts.map +1 -0
  423. package/dist/screens/Media/MediaScreen.js +72 -0
  424. package/dist/screens/Media/MediaScreen.js.map +1 -0
  425. package/dist/screens/People/PeopleScreen.d.ts +3 -0
  426. package/dist/screens/People/PeopleScreen.d.ts.map +1 -0
  427. package/dist/screens/People/PeopleScreen.js +78 -0
  428. package/dist/screens/People/PeopleScreen.js.map +1 -0
  429. package/dist/screens/PluginScreen/PluginScreenScreen.d.ts +3 -0
  430. package/dist/screens/PluginScreen/PluginScreenScreen.d.ts.map +1 -0
  431. package/dist/screens/PluginScreen/PluginScreenScreen.js +16 -0
  432. package/dist/screens/PluginScreen/PluginScreenScreen.js.map +1 -0
  433. package/dist/screens/Plugins/PluginActivityDialog.d.ts +7 -0
  434. package/dist/screens/Plugins/PluginActivityDialog.d.ts.map +1 -0
  435. package/dist/screens/Plugins/PluginActivityDialog.js +49 -0
  436. package/dist/screens/Plugins/PluginActivityDialog.js.map +1 -0
  437. package/dist/screens/Plugins/PluginSecrets.d.ts +7 -0
  438. package/dist/screens/Plugins/PluginSecrets.d.ts.map +1 -0
  439. package/dist/screens/Plugins/PluginSecrets.js +44 -0
  440. package/dist/screens/Plugins/PluginSecrets.js.map +1 -0
  441. package/dist/screens/Plugins/PluginSettingsDialog.d.ts +7 -0
  442. package/dist/screens/Plugins/PluginSettingsDialog.d.ts.map +1 -0
  443. package/dist/screens/Plugins/PluginSettingsDialog.js +46 -0
  444. package/dist/screens/Plugins/PluginSettingsDialog.js.map +1 -0
  445. package/dist/screens/Plugins/PluginsScreen.d.ts +3 -0
  446. package/dist/screens/Plugins/PluginsScreen.d.ts.map +1 -0
  447. package/dist/screens/Plugins/PluginsScreen.js +68 -0
  448. package/dist/screens/Plugins/PluginsScreen.js.map +1 -0
  449. package/dist/screens/Settings/EmailSettings.d.ts +3 -0
  450. package/dist/screens/Settings/EmailSettings.d.ts.map +1 -0
  451. package/dist/screens/Settings/EmailSettings.js +76 -0
  452. package/dist/screens/Settings/EmailSettings.js.map +1 -0
  453. package/dist/screens/Settings/FormsSettings.d.ts +3 -0
  454. package/dist/screens/Settings/FormsSettings.d.ts.map +1 -0
  455. package/dist/screens/Settings/FormsSettings.js +91 -0
  456. package/dist/screens/Settings/FormsSettings.js.map +1 -0
  457. package/dist/screens/Settings/GeneralSettings.d.ts +3 -0
  458. package/dist/screens/Settings/GeneralSettings.d.ts.map +1 -0
  459. package/dist/screens/Settings/GeneralSettings.js +42 -0
  460. package/dist/screens/Settings/GeneralSettings.js.map +1 -0
  461. package/dist/screens/Settings/SettingsPage.d.ts +9 -0
  462. package/dist/screens/Settings/SettingsPage.d.ts.map +1 -0
  463. package/dist/screens/Settings/SettingsPage.js +42 -0
  464. package/dist/screens/Settings/SettingsPage.js.map +1 -0
  465. package/dist/screens/Settings/SettingsScreen.d.ts +7 -0
  466. package/dist/screens/Settings/SettingsScreen.d.ts.map +1 -0
  467. package/dist/screens/Settings/SettingsScreen.js +53 -0
  468. package/dist/screens/Settings/SettingsScreen.js.map +1 -0
  469. package/dist/screens/Settings/StorageSettings.d.ts +3 -0
  470. package/dist/screens/Settings/StorageSettings.d.ts.map +1 -0
  471. package/dist/screens/Settings/StorageSettings.js +82 -0
  472. package/dist/screens/Settings/StorageSettings.js.map +1 -0
  473. package/dist/screens/SignIn/SignInScreen.d.ts +6 -0
  474. package/dist/screens/SignIn/SignInScreen.d.ts.map +1 -0
  475. package/dist/screens/SignIn/SignInScreen.js +52 -0
  476. package/dist/screens/SignIn/SignInScreen.js.map +1 -0
  477. package/dist/screens/Trash/TrashScreen.d.ts +3 -0
  478. package/dist/screens/Trash/TrashScreen.d.ts.map +1 -0
  479. package/dist/screens/Trash/TrashScreen.js +73 -0
  480. package/dist/screens/Trash/TrashScreen.js.map +1 -0
  481. package/dist/standalone/config.d.ts +19 -0
  482. package/dist/standalone/config.d.ts.map +1 -0
  483. package/dist/standalone/config.js +20 -0
  484. package/dist/standalone/config.js.map +1 -0
  485. package/dist/standalone/main.d.ts +7 -0
  486. package/dist/standalone/main.d.ts.map +1 -0
  487. package/dist/standalone/main.js +26 -0
  488. package/dist/standalone/main.js.map +1 -0
  489. package/dist/testing/admin-client-contract.d.ts +24 -0
  490. package/dist/testing/admin-client-contract.d.ts.map +1 -0
  491. package/dist/testing/admin-client-contract.js +615 -0
  492. package/dist/testing/admin-client-contract.js.map +1 -0
  493. package/dist/testing/http-server.d.ts +18 -0
  494. package/dist/testing/http-server.d.ts.map +1 -0
  495. package/dist/testing/http-server.js +56 -0
  496. package/dist/testing/http-server.js.map +1 -0
  497. package/dist/testing/index.d.ts +3 -0
  498. package/dist/testing/index.d.ts.map +1 -0
  499. package/dist/testing/index.js +3 -0
  500. package/dist/testing/index.js.map +1 -0
  501. package/dist/testing/memory-client.d.ts +166 -0
  502. package/dist/testing/memory-client.d.ts.map +1 -0
  503. package/dist/testing/memory-client.js +449 -0
  504. package/dist/testing/memory-client.js.map +1 -0
  505. package/dist/testing/memory-mail.d.ts +48 -0
  506. package/dist/testing/memory-mail.d.ts.map +1 -0
  507. package/dist/testing/memory-mail.js +74 -0
  508. package/dist/testing/memory-mail.js.map +1 -0
  509. package/dist/testing/memory-people.d.ts +18 -0
  510. package/dist/testing/memory-people.d.ts.map +1 -0
  511. package/dist/testing/memory-people.js +70 -0
  512. package/dist/testing/memory-people.js.map +1 -0
  513. package/dist/testing/render-app.d.ts +8 -0
  514. package/dist/testing/render-app.d.ts.map +1 -0
  515. package/dist/testing/render-app.js +10 -0
  516. package/dist/testing/render-app.js.map +1 -0
  517. package/dist/testing/sample-content.d.ts +29 -0
  518. package/dist/testing/sample-content.d.ts.map +1 -0
  519. package/dist/testing/sample-content.js +258 -0
  520. package/dist/testing/sample-content.js.map +1 -0
  521. package/package.json +74 -3
@@ -0,0 +1,449 @@
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 { MemoryChallengeRoom, MemoryMailRoom, MemoryStorageRoom } from './memory-mail.js';
5
+ import { AdminRequestError } from '../client/errors.js';
6
+ /** Makes the forms and takes the submissions a test starts with, as the site's own code would. */
7
+ export async function seedForms(cms, forms = [], submissions = []) {
8
+ for (const form of forms)
9
+ await cms.forms.create({ kind: 'user', id: 'seed', role: 'owner' }, form);
10
+ for (const { form, sent, page, suspected } of submissions) {
11
+ await cms.submissions.submit(form, sent, { ...(page !== undefined && { page }), ...(suspected !== undefined && { suspected }) });
12
+ }
13
+ }
14
+ const KNOWN_CODES = new Set(['validation_failed', 'conflict', 'not_found', 'forbidden']);
15
+ /**
16
+ * An `AdminClient` with the real CMS behind it and nothing stored: the services and rules of
17
+ * `cms-core`, over repositories that live in memory. It stands in for the server in tests and in
18
+ * the development preview, so a screen that works here meets the same validation, the same
19
+ * conflicts and the same publishing rules as on a site.
20
+ */
21
+ /** Signs this stand-in's preview links. Nothing real is behind them. */
22
+ const PREVIEW_SECRET = 'memory-admin-client-preview-secret';
23
+ export class MemoryAdminClient {
24
+ /** Every address a sign-in link was asked for, in order. */
25
+ linkRequests = [];
26
+ #passkeys = [];
27
+ #passkeysMade = 0;
28
+ /** Set to make the next request fail with this message. */
29
+ failNextWith = null;
30
+ #user;
31
+ #passkeyUser;
32
+ #defaultLocale;
33
+ #cms;
34
+ /** How this site's email leaves: nothing is sent, and the tests asked for are kept. */
35
+ mail;
36
+ /** How this site's uploads are kept: in memory, and the tests of a bucket asked for are counted. */
37
+ storage;
38
+ /** The challenge service: never reached, and the checks of the keys asked for are counted. */
39
+ challenge = new MemoryChallengeRoom();
40
+ #people;
41
+ /** Settles once the content given to the constructor is in place. Every request waits for it. */
42
+ #ready;
43
+ #delay;
44
+ /** Where the browser can show each upload, by name, when `showUploads` is on. */
45
+ #shown;
46
+ constructor(options = {}) {
47
+ this.#user = options.user ?? null;
48
+ this.#passkeyUser = options.passkeyUser ?? null;
49
+ this.#defaultLocale = options.defaultLocale ?? 'en';
50
+ this.#delay = options.delay ?? 0;
51
+ this.#shown = options.showUploads === true ? new Map() : null;
52
+ this.#people = new MemoryPeople(options.people ?? (options.user ? [options.user] : []));
53
+ const types = new InMemorySchemaRepository();
54
+ const entries = new InMemoryEntryRepository();
55
+ const storage = { files: new InMemoryMediaRepository(), store: new InMemoryMediaStore() };
56
+ const cms = createCms({ types, entries, team: this.#people, previews: { secret: PREVIEW_SECRET }, ...(options.uploads !== false && { media: { storage } }) });
57
+ this.#cms = cms;
58
+ this.mail = new MemoryMailRoom(cms.settings);
59
+ this.mail.fixed = options.emailFixedBy ?? null;
60
+ cms.settings.useMail(this.mail);
61
+ this.storage = new MemoryStorageRoom(cms.settings, options.uploads !== false);
62
+ this.storage.fixed = options.storageFixedBy ?? null;
63
+ cms.settings.useStorage(this.storage);
64
+ cms.settings.useChallenge(this.challenge);
65
+ cms.settings.useSite({ defaultName: 'Lakeshore Realty', fixedBy: options.siteNameFixedBy ?? null });
66
+ cms.media.include(new InMemoryImageLibrary(options.images));
67
+ this.#ready = (async () => {
68
+ for (const type of options.contentTypes ?? [])
69
+ await types.save(type);
70
+ for (const entry of options.entries ?? [])
71
+ await entries.save(entry, { expectedRevision: null, actorId: 'seed' });
72
+ await seedForms(cms, options.forms, options.submissions);
73
+ await cms.plugins.load(options.plugins ?? []);
74
+ })();
75
+ }
76
+ async getSession() {
77
+ this.#failIfAsked();
78
+ return this.#user;
79
+ }
80
+ async requestSignInLink(email) {
81
+ this.#failIfAsked();
82
+ this.linkRequests.push(email);
83
+ }
84
+ async signInWithPasskey() {
85
+ this.#failIfAsked();
86
+ if (!this.#passkeyUser)
87
+ throw new Error('No passkey was offered.');
88
+ this.#user = this.#passkeyUser;
89
+ return this.#user;
90
+ }
91
+ async signOut() {
92
+ this.#failIfAsked();
93
+ this.#user = null;
94
+ }
95
+ listContentTypes() {
96
+ return this.#request(() => this.#cms.schema.list());
97
+ }
98
+ listArchivedContentTypes() {
99
+ return this.#request((actor) => this.#cms.schema.listArchived(actor));
100
+ }
101
+ archiveContentType(id) {
102
+ return this.#request((actor) => this.#cms.schema.archive(actor, id));
103
+ }
104
+ restoreContentType(id) {
105
+ return this.#request((actor) => this.#cms.schema.restore(actor, id));
106
+ }
107
+ createContentType(type) {
108
+ return this.#request((actor) => this.#cms.schema.create(actor, type));
109
+ }
110
+ updateContentType(id, changes) {
111
+ return this.#request((actor) => this.#cms.schema.update(actor, id, changes));
112
+ }
113
+ addField(typeId, { section, ...field }, within = []) {
114
+ return this.#request((actor) => this.#cms.schema.addField(actor, typeId, field, { within, ...(section !== undefined && { section }) }));
115
+ }
116
+ changeField(typeId, fieldId, changes, within) {
117
+ return this.#request((actor) => this.#cms.schema.changeField(actor, typeId, fieldId, changes, within));
118
+ }
119
+ removeField(typeId, fieldId, within) {
120
+ return this.#request((actor) => this.#cms.schema.removeField(actor, typeId, fieldId, within));
121
+ }
122
+ restoreField(typeId, fieldId, within) {
123
+ return this.#request((actor) => this.#cms.schema.restoreField(actor, typeId, fieldId, within));
124
+ }
125
+ arrangeFields(typeId, arrangement) {
126
+ return this.#request((actor) => this.#cms.schema.arrangeFields(actor, typeId, arrangement));
127
+ }
128
+ setSections(typeId, sections) {
129
+ return this.#request((actor) => this.#cms.schema.setSections(actor, typeId, sections));
130
+ }
131
+ listFieldTypes() {
132
+ return this.#request(async () => this.#cms.fields.list().map(({ type, editor, takesSubmissions }) => ({ type, editor, takesSubmissions })));
133
+ }
134
+ listImages() {
135
+ const { media } = this.#cms;
136
+ return this.#request(async (actor) => ({
137
+ items: (await media.images(actor)).map((image) => ({ ...image, url: this.#shown?.get(image.name) ?? image.url })),
138
+ upload: (await media.takesUploads()) ? { maxBytes: media.maxUploadBytes } : null,
139
+ }));
140
+ }
141
+ uploadImage(upload) {
142
+ return this.#request(async (actor) => {
143
+ const image = await this.#cms.media.upload(actor, upload);
144
+ if (!this.#shown)
145
+ return image;
146
+ const url = URL.createObjectURL(new Blob([new Uint8Array(upload.bytes)]));
147
+ this.#shown.set(image.name, url);
148
+ return { ...image, url };
149
+ });
150
+ }
151
+ removeImage(name) {
152
+ return this.#request((actor) => this.#cms.media.remove(actor, name));
153
+ }
154
+ listEntries(query) {
155
+ return this.#request(async (actor) => {
156
+ const type = await this.#cms.schema.getByKey(query.type);
157
+ return this.#cms.content.find(actor, {
158
+ typeId: type.id,
159
+ order: 'updated',
160
+ limit: query.limit ?? 50,
161
+ offset: query.offset ?? 0,
162
+ ...(query.locale !== undefined && { locale: query.locale }),
163
+ });
164
+ });
165
+ }
166
+ getEntry(id) {
167
+ return this.#request((actor) => this.#cms.content.get(actor, id));
168
+ }
169
+ createEntry(entry) {
170
+ return this.#request(async (actor) => {
171
+ const type = await this.#cms.schema.getByKey(entry.type);
172
+ return this.#cms.content.create(actor, {
173
+ typeId: type.id,
174
+ locale: entry.locale ?? this.#defaultLocale,
175
+ slug: entry.slug,
176
+ data: entry.data,
177
+ });
178
+ });
179
+ }
180
+ updateEntry(id, changes) {
181
+ return this.#request((actor) => this.#cms.content.update(actor, id, changes));
182
+ }
183
+ publishEntry(id, expectedRevision) {
184
+ return this.#request((actor) => this.#cms.content.publish(actor, id, expectedRevision));
185
+ }
186
+ unpublishEntry(id) {
187
+ return this.#request((actor) => this.#cms.content.unpublish(actor, id));
188
+ }
189
+ duplicateEntry(id) {
190
+ return this.#request((actor) => this.#cms.content.duplicate(actor, id));
191
+ }
192
+ scheduleEntry(id, input) {
193
+ return this.#request((actor) => this.#cms.content.schedule(actor, id, input));
194
+ }
195
+ unscheduleEntry(id) {
196
+ return this.#request((actor) => this.#cms.content.unschedule(actor, id));
197
+ }
198
+ entryHistory(id) {
199
+ return this.#request((actor) => this.#cms.content.history(actor, id));
200
+ }
201
+ revertEntry(id, input) {
202
+ return this.#request((actor) => this.#cms.content.revert(actor, id, input));
203
+ }
204
+ trashEntry(id) {
205
+ return this.#request((actor) => this.#cms.content.trash(actor, id));
206
+ }
207
+ restoreEntry(id) {
208
+ return this.#request((actor) => this.#cms.content.restore(actor, id));
209
+ }
210
+ listTrash(query = {}) {
211
+ return this.#request((actor) => this.#cms.content.find(actor, { trashed: true, order: 'updated', limit: query.limit ?? 50, offset: query.offset ?? 0 }));
212
+ }
213
+ deleteEntry(id) {
214
+ return this.#request((actor) => this.#cms.content.delete(actor, id));
215
+ }
216
+ listForms() {
217
+ return this.#request((actor) => this.#cms.forms.list(actor));
218
+ }
219
+ createForm(form) {
220
+ return this.#request((actor) => this.#cms.forms.create(actor, form));
221
+ }
222
+ updateForm(id, changes) {
223
+ return this.#request((actor) => this.#cms.forms.update(actor, id, changes));
224
+ }
225
+ trashForm(id) {
226
+ return this.#request((actor) => this.#cms.forms.trash(actor, id));
227
+ }
228
+ restoreForm(id) {
229
+ return this.#request((actor) => this.#cms.forms.restore(actor, id));
230
+ }
231
+ listTrashedForms() {
232
+ return this.#request((actor) => this.#cms.forms.listTrashed(actor));
233
+ }
234
+ deleteForm(id) {
235
+ return this.#request((actor) => this.#cms.forms.delete(actor, id));
236
+ }
237
+ listSubmissions(query) {
238
+ 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 }) }));
239
+ }
240
+ countSubmissions(formId) {
241
+ return this.#request((actor) => this.#cms.submissions.counts(actor, formId));
242
+ }
243
+ markSubmission(id, status) {
244
+ return this.#request((actor) => this.#cms.submissions.mark(actor, id, status));
245
+ }
246
+ deleteSubmission(id) {
247
+ return this.#request((actor) => this.#cms.submissions.delete(actor, id));
248
+ }
249
+ exportSubmissions(formId) {
250
+ return this.#request((actor) => this.#cms.submissions.export(actor, formId));
251
+ }
252
+ forgetSender(email) {
253
+ return this.#request((actor) => this.#cms.submissions.erase(actor, email));
254
+ }
255
+ listContacts(query = {}) {
256
+ return this.#request((actor) => this.#cms.contacts.find(actor, {
257
+ limit: query.limit ?? 50,
258
+ offset: query.offset ?? 0,
259
+ ...(query.search !== undefined && query.search !== '' && { search: query.search }),
260
+ ...(query.stage !== undefined && { stage: query.stage }),
261
+ ...(query.ownerId !== undefined && { ownerId: query.ownerId }),
262
+ ...(query.followUpBy !== undefined && { followUpBy: query.followUpBy }),
263
+ }));
264
+ }
265
+ listDeals(query = {}) {
266
+ return this.#request((actor) => this.#cms.deals.find(actor, { ...query, limit: query.limit ?? 50, offset: query.offset ?? 0 }));
267
+ }
268
+ createDeal(input) {
269
+ return this.#request((actor) => this.#cms.deals.create(actor, input));
270
+ }
271
+ updateDeal(id, changes) {
272
+ return this.#request((actor) => this.#cms.deals.update(actor, id, changes));
273
+ }
274
+ deleteDeal(id) {
275
+ return this.#request((actor) => this.#cms.deals.delete(actor, id));
276
+ }
277
+ getForecast() {
278
+ return this.#request((actor) => this.#cms.deals.forecast(actor));
279
+ }
280
+ getEmailSettings() {
281
+ return this.#request((actor) => this.#cms.settings.email(actor));
282
+ }
283
+ saveEmailSettings(changes) {
284
+ return this.#request((actor) => this.#cms.settings.saveEmail(actor, changes));
285
+ }
286
+ sendTestEmail() {
287
+ return this.#request((actor) => this.#cms.settings.testEmail(actor));
288
+ }
289
+ getGeneralSettings() {
290
+ return this.#request((actor) => this.#cms.settings.general(actor));
291
+ }
292
+ saveGeneralSettings(changes) {
293
+ return this.#request((actor) => this.#cms.settings.saveGeneral(actor, changes));
294
+ }
295
+ getFormsSettings() {
296
+ return this.#request((actor) => this.#cms.settings.forms(actor));
297
+ }
298
+ saveFormsSettings(changes) {
299
+ return this.#request((actor) => this.#cms.settings.saveForms(actor, changes));
300
+ }
301
+ testFormsSettings() {
302
+ return this.#request((actor) => this.#cms.settings.testForms(actor));
303
+ }
304
+ getStorageSettings() {
305
+ return this.#request((actor) => this.#cms.settings.storage(actor));
306
+ }
307
+ saveStorageSettings(changes) {
308
+ return this.#request((actor) => this.#cms.settings.saveStorage(actor, changes));
309
+ }
310
+ testStorage() {
311
+ return this.#request((actor) => this.#cms.settings.testStorage(actor));
312
+ }
313
+ getPipeline() {
314
+ return this.#request((actor) => this.#cms.pipeline.get(actor));
315
+ }
316
+ savePipeline(changes) {
317
+ return this.#request((actor) => this.#cms.pipeline.save(actor, changes));
318
+ }
319
+ getCustomFields() {
320
+ return this.#request((actor) => this.#cms.customFields.get(actor));
321
+ }
322
+ saveCustomFields(changes) {
323
+ return this.#request((actor) => this.#cms.customFields.save(actor, changes));
324
+ }
325
+ listTeam() {
326
+ return this.#request((actor) => this.#cms.contacts.owners(actor));
327
+ }
328
+ getContact(id) {
329
+ return this.#request((actor) => this.#cms.contacts.get(actor, id));
330
+ }
331
+ createContact(input) {
332
+ return this.#request((actor) => this.#cms.contacts.create(actor, input));
333
+ }
334
+ importContacts(rows) {
335
+ return this.#request((actor) => this.#cms.contacts.import(actor, rows));
336
+ }
337
+ updateContact(id, changes) {
338
+ return this.#request((actor) => this.#cms.contacts.update(actor, id, changes));
339
+ }
340
+ eraseContact(id) {
341
+ return this.#request((actor) => this.#cms.contacts.erase(actor, id));
342
+ }
343
+ contactTimeline(id) {
344
+ return this.#request((actor) => this.#cms.contacts.timeline(actor, id));
345
+ }
346
+ addContactNote(id, text) {
347
+ return this.#request((actor) => this.#cms.contacts.addNote(actor, id, text));
348
+ }
349
+ deleteContactNote(id, noteId) {
350
+ return this.#request((actor) => this.#cms.contacts.deleteNote(actor, id, noteId));
351
+ }
352
+ exportContact(id) {
353
+ return this.#request((actor) => this.#cms.contacts.export(actor, id));
354
+ }
355
+ /** Takes what a visitor sends through a form, as the site's public address would. For tests. */
356
+ async visitorSends(formKey, sent) {
357
+ await this.#ready;
358
+ return this.#cms.submissions.submit(formKey, sent);
359
+ }
360
+ previewEntry(id) {
361
+ return this.#request((actor) => this.#cms.previews.link(actor, id));
362
+ }
363
+ listPeople() {
364
+ return this.#request((actor) => this.#people.listUsers(actor));
365
+ }
366
+ invitePerson(person) {
367
+ return this.#request((actor) => this.#people.invite(actor, person));
368
+ }
369
+ changePersonRole(id, role) {
370
+ return this.#request((actor) => this.#people.changeRole(actor, id, role));
371
+ }
372
+ removePerson(id) {
373
+ return this.#request((actor) => this.#people.remove(actor, id));
374
+ }
375
+ /** The name of every passkey the person has, in the order they were added. */
376
+ get passkeys() {
377
+ return this.#passkeys.map((passkey) => passkey.name);
378
+ }
379
+ addPasskey(name) {
380
+ return this.#request(async () => void this.#passkeys.push({ id: `passkey-${++this.#passkeysMade}`, name, createdAt: new Date().toISOString() }));
381
+ }
382
+ listPlugins() {
383
+ return this.#request(async (actor) => this.#cms.plugins.list(actor));
384
+ }
385
+ listPluginEditors() {
386
+ return this.#request((actor) => this.#cms.plugins.editors(actor));
387
+ }
388
+ callPlugin(name, method, path, input = {}) {
389
+ // What a plugin answers crosses the wire as JSON on a real site, so it does here too.
390
+ return this.#request(async (actor) => {
391
+ const answer = await this.#cms.plugins.call(actor, name, method, path, { query: input.query ?? {}, body: method === 'GET' ? undefined : (input.body ?? {}) });
392
+ return answer === undefined ? {} : JSON.parse(JSON.stringify(answer));
393
+ });
394
+ }
395
+ setPluginEnabled(name, enabled) {
396
+ return this.#request((actor) => this.#cms.plugins.setEnabled(actor, name, enabled));
397
+ }
398
+ getPluginSettings(name) {
399
+ return this.#request((actor) => this.#cms.plugins.settings(actor, name));
400
+ }
401
+ savePluginSettings(name, values) {
402
+ return this.#request((actor) => this.#cms.plugins.saveSettings(actor, name, values));
403
+ }
404
+ setPluginSecret(name, key, value) {
405
+ return this.#request((actor) => this.#cms.plugins.setSecret(actor, name, key, value));
406
+ }
407
+ listPluginTasks(name) {
408
+ return this.#request((actor) => this.#cms.plugins.tasks(actor, name));
409
+ }
410
+ retryPluginTask(name, id) {
411
+ return this.#request((actor) => this.#cms.plugins.retryTask(actor, name, id));
412
+ }
413
+ listPasskeys() {
414
+ return this.#request(async () => [...this.#passkeys]);
415
+ }
416
+ removePasskey(id) {
417
+ return this.#request(async () => {
418
+ const index = this.#passkeys.findIndex((passkey) => passkey.id === id);
419
+ if (index < 0)
420
+ throw new NotFoundError('Passkey', id);
421
+ this.#passkeys.splice(index, 1);
422
+ });
423
+ }
424
+ /** Runs one signed-in request against the CMS, and reports a refusal the way a server would. */
425
+ async #request(run) {
426
+ this.#failIfAsked();
427
+ if (!this.#user)
428
+ throw new AdminRequestError('Sign in to continue.', 'unauthenticated');
429
+ await this.#ready;
430
+ if (this.#delay > 0)
431
+ await new Promise((resolve) => setTimeout(resolve, this.#delay));
432
+ try {
433
+ return await run({ kind: 'user', id: this.#user.id, role: this.#user.role });
434
+ }
435
+ catch (error) {
436
+ if (!(error instanceof CmsError))
437
+ throw error;
438
+ const code = KNOWN_CODES.has(error.code) ? error.code : 'unknown';
439
+ throw new AdminRequestError(error.message, code, error instanceof ValidationError ? error.issues : []);
440
+ }
441
+ }
442
+ #failIfAsked() {
443
+ const message = this.failNextWith;
444
+ this.failNextWith = null;
445
+ if (message !== null)
446
+ throw new Error(message);
447
+ }
448
+ }
449
+ //# 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,GAoDV,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,mBAAmB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAyB,MAAM,qBAAqB,CAAC;AA4C/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;QAC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,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,CAAC,KAAK,YAAY,QAAQ,CAAC;gBAAE,MAAM,KAAK,CAAC;YAC9C,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,IAAyB,CAAC,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,48 @@
1
+ import { type Actor, type Cms, type MailFixedBy, type MailRoom, type SettingFixedBy, type StorageKeeping, type StorageRoom, type ChallengeRoom } from '@velocity-astro/cms-core';
2
+ /**
3
+ * How email leaves a site that has no server: nothing is sent, and each test asked for is kept
4
+ * in `tests`. A test can be sent once the settings hold a key and a sender, as on a real site.
5
+ */
6
+ export declare class MemoryMailRoom implements MailRoom {
7
+ private readonly settings;
8
+ /** Who asked for a test email, in order. */
9
+ readonly tests: string[];
10
+ /** Set to have something other than the editor's settings decide how email is sent. */
11
+ fixed: MailFixedBy | null;
12
+ /** Set to have the email service refuse the next tests with these words. */
13
+ refuseWith: string | null;
14
+ constructor(settings: Cms['settings']);
15
+ fixedBy(): MailFixedBy | null;
16
+ canTest(): Promise<boolean>;
17
+ sendTest(actor: Actor): Promise<void>;
18
+ }
19
+ /**
20
+ * How uploads are kept on a site that has no server: no bucket is ever reached, and each test
21
+ * of one is counted in `tests`. Uploads go to "the disk" until the settings name a bucket.
22
+ */
23
+ export declare class MemoryStorageRoom implements StorageRoom {
24
+ private readonly settings;
25
+ /** Whether the site has a disk to keep uploads on. */
26
+ private readonly hasDisk;
27
+ /** How many times a test of the bucket was asked for. */
28
+ tests: number;
29
+ /** Set to have something other than the editor's settings decide where uploads are kept. */
30
+ fixed: SettingFixedBy | null;
31
+ /** Set to have the storage service refuse the next tests with these words. */
32
+ refuseWith: string | null;
33
+ constructor(settings: Cms['settings'],
34
+ /** Whether the site has a disk to keep uploads on. */
35
+ hasDisk: boolean);
36
+ fixedBy(): SettingFixedBy | null;
37
+ keeping(): Promise<StorageKeeping>;
38
+ test(): Promise<void>;
39
+ }
40
+ /** The challenge service on a site that has no server: it is never reached, and each check of the keys is counted in `tests`. */
41
+ export declare class MemoryChallengeRoom implements ChallengeRoom {
42
+ /** How many times a check of the keys was asked for. */
43
+ tests: number;
44
+ /** Set to have the challenge service refuse the next checks with these words. */
45
+ refuseWith: string | null;
46
+ test(): Promise<void>;
47
+ }
48
+ //# sourceMappingURL=memory-mail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-mail.d.ts","sourceRoot":"","sources":["../../src/testing/memory-mail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,KAAK,EAAE,KAAK,GAAG,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEhM;;;GAGG;AACH,qBAAa,cAAe,YAAW,QAAQ;IAQjC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAPrC,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAM;IAC9B,uFAAuF;IACvF,KAAK,EAAE,WAAW,GAAG,IAAI,CAAQ;IACjC,4EAA4E;IAC5E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;gBAEJ,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC;IAEtD,OAAO,IAAI,WAAW,GAAG,IAAI;IAIvB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IAI3B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;CAI5C;AAED;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,WAAW;IASjD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,sDAAsD;IACtD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAV1B,yDAAyD;IACzD,KAAK,SAAK;IACV,4FAA4F;IAC5F,KAAK,EAAE,cAAc,GAAG,IAAI,CAAQ;IACpC,8EAA8E;IAC9E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;gBAGd,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC;IAC1C,sDAAsD;IACrC,OAAO,EAAE,OAAO;IAGnC,OAAO,IAAI,cAAc,GAAG,IAAI;IAI1B,OAAO,IAAI,OAAO,CAAC,cAAc,CAAC;IAKlC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAI5B;AAED,iIAAiI;AACjI,qBAAa,mBAAoB,YAAW,aAAa;IACvD,wDAAwD;IACxD,KAAK,SAAK;IACV,iFAAiF;IACjF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAI5B"}
@@ -0,0 +1,74 @@
1
+ import { ConflictError } from '@velocity-astro/cms-core';
2
+ /**
3
+ * How email leaves a site that has no server: nothing is sent, and each test asked for is kept
4
+ * in `tests`. A test can be sent once the settings hold a key and a sender, as on a real site.
5
+ */
6
+ export class MemoryMailRoom {
7
+ settings;
8
+ /** Who asked for a test email, in order. */
9
+ tests = [];
10
+ /** Set to have something other than the editor's settings decide how email is sent. */
11
+ fixed = null;
12
+ /** Set to have the email service refuse the next tests with these words. */
13
+ refuseWith = null;
14
+ constructor(settings) {
15
+ this.settings = settings;
16
+ }
17
+ fixedBy() {
18
+ return this.fixed;
19
+ }
20
+ async canTest() {
21
+ return this.fixed !== null || (await this.settings.mailAccount()) !== null;
22
+ }
23
+ async sendTest(actor) {
24
+ if (this.refuseWith !== null)
25
+ throw new ConflictError(this.refuseWith);
26
+ this.tests.push(actor.id);
27
+ }
28
+ }
29
+ /**
30
+ * How uploads are kept on a site that has no server: no bucket is ever reached, and each test
31
+ * of one is counted in `tests`. Uploads go to "the disk" until the settings name a bucket.
32
+ */
33
+ export class MemoryStorageRoom {
34
+ settings;
35
+ hasDisk;
36
+ /** How many times a test of the bucket was asked for. */
37
+ tests = 0;
38
+ /** Set to have something other than the editor's settings decide where uploads are kept. */
39
+ fixed = null;
40
+ /** Set to have the storage service refuse the next tests with these words. */
41
+ refuseWith = null;
42
+ constructor(settings,
43
+ /** Whether the site has a disk to keep uploads on. */
44
+ hasDisk) {
45
+ this.settings = settings;
46
+ this.hasDisk = hasDisk;
47
+ }
48
+ fixedBy() {
49
+ return this.fixed;
50
+ }
51
+ async keeping() {
52
+ if (this.fixed !== null)
53
+ return 'bucket';
54
+ return (await this.settings.bucketAccount()) !== null ? 'bucket' : this.hasDisk ? 'folder' : 'none';
55
+ }
56
+ async test() {
57
+ if (this.refuseWith !== null)
58
+ throw new ConflictError(this.refuseWith);
59
+ this.tests += 1;
60
+ }
61
+ }
62
+ /** The challenge service on a site that has no server: it is never reached, and each check of the keys is counted in `tests`. */
63
+ export class MemoryChallengeRoom {
64
+ /** How many times a check of the keys was asked for. */
65
+ tests = 0;
66
+ /** Set to have the challenge service refuse the next checks with these words. */
67
+ refuseWith = null;
68
+ async test() {
69
+ if (this.refuseWith !== null)
70
+ throw new ConflictError(this.refuseWith);
71
+ this.tests += 1;
72
+ }
73
+ }
74
+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IACpB,CAAC;IAED,KAAK,CAAC,OAAO;QACX,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;YAAE,OAAO,QAAQ,CAAC;QACzC,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACtG,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI;YAAE,MAAM,IAAI,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvE,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;IAClB,CAAC;CACF;AAED,iIAAiI;AACjI,MAAM,OAAO,mBAAmB;IAC9B,wDAAwD;IACxD,KAAK,GAAG,CAAC,CAAC;IACV,iFAAiF;IACjF,UAAU,GAAkB,IAAI,CAAC;IAEjC,KAAK,CAAC,IAAI;QACR,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI;YAAE,MAAM,IAAI,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvE,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;IAClB,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"}