@cossackframework/cms 0.0.0-stage → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +147 -2
  3. package/agent-docs.json +259 -0
  4. package/app/README.md +78 -0
  5. package/app/cossack-recipe.json +43 -0
  6. package/app/src/auth-bot-check.ts +32 -0
  7. package/app/src/auth-bot-token.ts +11 -0
  8. package/app/src/auth-input.ts +35 -0
  9. package/app/src/auth-options.ts +18 -0
  10. package/app/src/auth-providers.ts +16 -0
  11. package/app/src/auth.ts +1082 -0
  12. package/app/src/brand.ts +68 -0
  13. package/app/src/cms/ai.ts +54 -0
  14. package/app/src/cms/analytics.ts +33 -0
  15. package/app/src/cms/block-errors.ts +55 -0
  16. package/app/src/cms/block-inserter.ts +111 -0
  17. package/app/src/cms/block-panel.ts +68 -0
  18. package/app/src/cms/block-rows.ts +44 -0
  19. package/app/src/cms/block-tree.ts +585 -0
  20. package/app/src/cms/blocks.css +708 -0
  21. package/app/src/cms/builder.ts +126 -0
  22. package/app/src/cms/cache.ts +44 -0
  23. package/app/src/cms/carousel.client.ts +52 -0
  24. package/app/src/cms/collab/presence.ts +69 -0
  25. package/app/src/cms/collab/rich-text-collab.client.ts +197 -0
  26. package/app/src/cms/collab/rich-text-notes.client.ts +138 -0
  27. package/app/src/cms/collab/room.ts +881 -0
  28. package/app/src/cms/compare.client.ts +47 -0
  29. package/app/src/cms/condition-control.ts +109 -0
  30. package/app/src/cms/content-api.ts +143 -0
  31. package/app/src/cms/content.ts +524 -0
  32. package/app/src/cms/countdown.client.ts +37 -0
  33. package/app/src/cms/editor-layout-editor.ts +260 -0
  34. package/app/src/cms/editor-layout-view.ts +37 -0
  35. package/app/src/cms/editor.ts +381 -0
  36. package/app/src/cms/entry.ts +26 -0
  37. package/app/src/cms/feeds.ts +145 -0
  38. package/app/src/cms/field-controls.ts +222 -0
  39. package/app/src/cms/field-group-editor.ts +105 -0
  40. package/app/src/cms/field-group-view.ts +211 -0
  41. package/app/src/cms/form-view.ts +203 -0
  42. package/app/src/cms/form.client.ts +203 -0
  43. package/app/src/cms/guards.ts +27 -0
  44. package/app/src/cms/handoff.ts +202 -0
  45. package/app/src/cms/headings.ts +51 -0
  46. package/app/src/cms/icons.ts +80 -0
  47. package/app/src/cms/import.client.ts +16 -0
  48. package/app/src/cms/index.ts +191 -0
  49. package/app/src/cms/lightbox.client.ts +109 -0
  50. package/app/src/cms/machine.ts +118 -0
  51. package/app/src/cms/maintenance.ts +97 -0
  52. package/app/src/cms/manage.ts +1236 -0
  53. package/app/src/cms/mcp-tools.ts +388 -0
  54. package/app/src/cms/mcp.ts +242 -0
  55. package/app/src/cms/media-chooser.ts +123 -0
  56. package/app/src/cms/media-usage.ts +57 -0
  57. package/app/src/cms/middleware.ts +199 -0
  58. package/app/src/cms/middlewares.ts +13 -0
  59. package/app/src/cms/network-ui.ts +36 -0
  60. package/app/src/cms/network-view.ts +38 -0
  61. package/app/src/cms/notes-announce.ts +65 -0
  62. package/app/src/cms/notes-rail.ts +207 -0
  63. package/app/src/cms/notification-rules.ts +66 -0
  64. package/app/src/cms/recovery.ts +82 -0
  65. package/app/src/cms/replace.ts +63 -0
  66. package/app/src/cms/reserved-paths.ts +19 -0
  67. package/app/src/cms/rich-text-field.ts +325 -0
  68. package/app/src/cms/rich-text-schema.ts +91 -0
  69. package/app/src/cms/rich-text.client.ts +255 -0
  70. package/app/src/cms/search.client.ts +116 -0
  71. package/app/src/cms/seo-head.ts +78 -0
  72. package/app/src/cms/seo.ts +241 -0
  73. package/app/src/cms/settings-draft.ts +218 -0
  74. package/app/src/cms/settings-file.ts +127 -0
  75. package/app/src/cms/settings-form.ts +180 -0
  76. package/app/src/cms/settings-languages.ts +125 -0
  77. package/app/src/cms/settings-nav.ts +102 -0
  78. package/app/src/cms/settings-network.ts +151 -0
  79. package/app/src/cms/settings-permalinks.ts +114 -0
  80. package/app/src/cms/settings-scroll.ts +10 -0
  81. package/app/src/cms/settings-search.ts +77 -0
  82. package/app/src/cms/settings-section.ts +38 -0
  83. package/app/src/cms/share.client.ts +27 -0
  84. package/app/src/cms/site-editing.ts +219 -0
  85. package/app/src/cms/site-editor.client.ts +1008 -0
  86. package/app/src/cms/site-editor.ts +99 -0
  87. package/app/src/cms/site-export.ts +60 -0
  88. package/app/src/cms/site-forms.ts +143 -0
  89. package/app/src/cms/site-import.ts +28 -0
  90. package/app/src/cms/site-session.ts +36 -0
  91. package/app/src/cms/site-taskbar.ts +77 -0
  92. package/app/src/cms/site-view.ts +1014 -0
  93. package/app/src/cms/site.ts +1322 -0
  94. package/app/src/cms/sitemaps.ts +131 -0
  95. package/app/src/cms/stat.client.ts +56 -0
  96. package/app/src/cms/style-controls.ts +252 -0
  97. package/app/src/cms/tabs.client.ts +36 -0
  98. package/app/src/cms/taskbar.ts +134 -0
  99. package/app/src/cms/term-icons.ts +10 -0
  100. package/app/src/cms/traffic.ts +26 -0
  101. package/app/src/cms/ui.ts +170 -0
  102. package/app/src/cms/updates.ts +124 -0
  103. package/app/src/cms/uploads.ts +26 -0
  104. package/app/src/cms/worker.ts +13 -0
  105. package/app/src/config/auth.ts +30 -0
  106. package/app/src/config/cms.ts +18 -0
  107. package/app/src/dashboard/access.ts +344 -0
  108. package/app/src/dashboard/agent-icons.ts +44 -0
  109. package/app/src/dashboard/app-passwords.ts +74 -0
  110. package/app/src/dashboard/avatar-field.ts +58 -0
  111. package/app/src/dashboard/bulk.ts +53 -0
  112. package/app/src/dashboard/head.ts +29 -0
  113. package/app/src/dashboard/icons.ts +15 -0
  114. package/app/src/dashboard/list-table.ts +120 -0
  115. package/app/src/dashboard/modules/roles.ts +15 -0
  116. package/app/src/dashboard/modules/sessions.ts +15 -0
  117. package/app/src/dashboard/modules/settings.ts +15 -0
  118. package/app/src/dashboard/modules/users.ts +18 -0
  119. package/app/src/dashboard/page.ts +67 -0
  120. package/app/src/dashboard/registry.ts +13 -0
  121. package/app/src/dashboard/session-list.ts +98 -0
  122. package/app/src/dashboard/tabs.ts +26 -0
  123. package/app/src/dashboard/time-ago.ts +16 -0
  124. package/app/src/dashboard/types.ts +40 -0
  125. package/app/src/dashboard/user-sections.ts +172 -0
  126. package/app/src/lib/permissions.ts +84 -0
  127. package/app/src/middlewares/auth.ts +117 -0
  128. package/app/src/pages/(site)/[...path]/index.ts +609 -0
  129. package/app/src/pages/(site)/feed/[...rest]/index.ts +13 -0
  130. package/app/src/pages/(site)/feed/index.ts +12 -0
  131. package/app/src/pages/(site)/index.ts +11 -0
  132. package/app/src/pages/(site)/indexnow/[file]/index.ts +18 -0
  133. package/app/src/pages/(site)/layout.ts +219 -0
  134. package/app/src/pages/(site)/llms.txt/index.ts +23 -0
  135. package/app/src/pages/(site)/manifest.webmanifest/index.ts +29 -0
  136. package/app/src/pages/(site)/media/[id]/[name]/index.ts +59 -0
  137. package/app/src/pages/(site)/preview/[collection]/[id]/index.ts +115 -0
  138. package/app/src/pages/(site)/robots.txt/index.ts +29 -0
  139. package/app/src/pages/(site)/search/index.ts +36 -0
  140. package/app/src/pages/(site)/sitemap.xml/index.ts +26 -0
  141. package/app/src/pages/(site)/sitemaps/[file]/index.ts +33 -0
  142. package/app/src/pages/api/auth/session.ts +48 -0
  143. package/app/src/pages/api/cms/appearance/areas/[name].ts +12 -0
  144. package/app/src/pages/api/cms/appearance/areas/index.ts +6 -0
  145. package/app/src/pages/api/cms/appearance/locations/[location].ts +6 -0
  146. package/app/src/pages/api/cms/appearance/locations/index.ts +6 -0
  147. package/app/src/pages/api/cms/appearance/menus/[id].ts +12 -0
  148. package/app/src/pages/api/cms/appearance/menus/index.ts +13 -0
  149. package/app/src/pages/api/cms/appearance/themes/[name]/activate.ts +6 -0
  150. package/app/src/pages/api/cms/appearance/themes/index.ts +6 -0
  151. package/app/src/pages/api/cms/cache/purge.ts +6 -0
  152. package/app/src/pages/api/cms/collections/index.ts +6 -0
  153. package/app/src/pages/api/cms/commands/[plugin]/[command].ts +26 -0
  154. package/app/src/pages/api/cms/comments/[id].ts +9 -0
  155. package/app/src/pages/api/cms/comments/index.ts +126 -0
  156. package/app/src/pages/api/cms/comments/queue.ts +6 -0
  157. package/app/src/pages/api/cms/content/[collection]/[entry]/autosave.ts +27 -0
  158. package/app/src/pages/api/cms/content/[collection]/[entry]/blocks/[block].ts +16 -0
  159. package/app/src/pages/api/cms/content/[collection]/[entry]/notes.ts +18 -0
  160. package/app/src/pages/api/cms/content/[collection]/[entry]/publish.ts +11 -0
  161. package/app/src/pages/api/cms/content/[collection]/[entry]/revisions/[revision]/index.ts +6 -0
  162. package/app/src/pages/api/cms/content/[collection]/[entry]/revisions/[revision]/restore.ts +6 -0
  163. package/app/src/pages/api/cms/content/[collection]/[entry]/revisions/index.ts +6 -0
  164. package/app/src/pages/api/cms/content/[collection]/[entry]/unpublish.ts +6 -0
  165. package/app/src/pages/api/cms/content/[collection]/[entry].ts +42 -0
  166. package/app/src/pages/api/cms/content/[collection]/index.ts +24 -0
  167. package/app/src/pages/api/cms/export/[collection].ts +37 -0
  168. package/app/src/pages/api/cms/forms/[slug]/index.ts +173 -0
  169. package/app/src/pages/api/cms/forms/[slug]/submissions/[submission]/files/[file].ts +25 -0
  170. package/app/src/pages/api/cms/forms/[slug]/submissions/export.ts +34 -0
  171. package/app/src/pages/api/cms/forms/[slug]/submissions/index.ts +24 -0
  172. package/app/src/pages/api/cms/import/[collection].ts +23 -0
  173. package/app/src/pages/api/cms/mcp.ts +29 -0
  174. package/app/src/pages/api/cms/me/index.ts +6 -0
  175. package/app/src/pages/api/cms/me/recent-blocks.ts +37 -0
  176. package/app/src/pages/api/cms/me/tokens/[id].ts +6 -0
  177. package/app/src/pages/api/cms/me/tokens/index.ts +13 -0
  178. package/app/src/pages/api/cms/media/[id].ts +6 -0
  179. package/app/src/pages/api/cms/media.ts +26 -0
  180. package/app/src/pages/api/cms/menus/[location].ts +14 -0
  181. package/app/src/pages/api/cms/network/sites/[id]/export.ts +15 -0
  182. package/app/src/pages/api/cms/network/sites/[id]/index.ts +9 -0
  183. package/app/src/pages/api/cms/network/sites/index.ts +14 -0
  184. package/app/src/pages/api/cms/notes/[id].ts +13 -0
  185. package/app/src/pages/api/cms/notes/index.ts +6 -0
  186. package/app/src/pages/api/cms/payments/webhook.ts +28 -0
  187. package/app/src/pages/api/cms/plugins/[name]/grant.ts +6 -0
  188. package/app/src/pages/api/cms/plugins/[name]/revoke.ts +6 -0
  189. package/app/src/pages/api/cms/plugins/index.ts +6 -0
  190. package/app/src/pages/api/cms/recovery.ts +29 -0
  191. package/app/src/pages/api/cms/redirects/index.ts +9 -0
  192. package/app/src/pages/api/cms/roles/index.ts +6 -0
  193. package/app/src/pages/api/cms/schema/[collection].ts +13 -0
  194. package/app/src/pages/api/cms/search.ts +16 -0
  195. package/app/src/pages/api/cms/settings/[group].ts +9 -0
  196. package/app/src/pages/api/cms/settings/index.ts +9 -0
  197. package/app/src/pages/api/cms/site-export.ts +34 -0
  198. package/app/src/pages/api/cms/taxonomies/index.ts +6 -0
  199. package/app/src/pages/api/cms/terms/[taxonomy]/[id].ts +12 -0
  200. package/app/src/pages/api/cms/terms/[taxonomy]/index.ts +9 -0
  201. package/app/src/pages/api/cms/uploads/[id]/complete.ts +15 -0
  202. package/app/src/pages/api/cms/uploads/[id]/index.ts +15 -0
  203. package/app/src/pages/api/cms/uploads/index.ts +26 -0
  204. package/app/src/pages/api/cms/users/[id]/index.ts +12 -0
  205. package/app/src/pages/api/cms/users/[id]/meta.ts +40 -0
  206. package/app/src/pages/api/cms/users/index.ts +12 -0
  207. package/app/src/pages/api/cms/webhooks/[id].ts +6 -0
  208. package/app/src/pages/api/cms/webhooks/index.ts +9 -0
  209. package/app/src/pages/auth/[provider]/callback.ts +11 -0
  210. package/app/src/pages/auth/[provider]/redirect.ts +9 -0
  211. package/app/src/pages/auth/forgot-password/index.ts +75 -0
  212. package/app/src/pages/auth/layout.ts +32 -0
  213. package/app/src/pages/auth/login/index.ts +198 -0
  214. package/app/src/pages/auth/magic/index.ts +68 -0
  215. package/app/src/pages/auth/register/index.ts +117 -0
  216. package/app/src/pages/auth/reset-password/index.ts +65 -0
  217. package/app/src/pages/auth/setup/index.ts +194 -0
  218. package/app/src/pages/auth/two-factor/index.ts +67 -0
  219. package/app/src/pages/auth/verify/index.ts +62 -0
  220. package/app/src/pages/dashboard/(cms)/appearance/customize/index.ts +263 -0
  221. package/app/src/pages/dashboard/(cms)/appearance/dashboard-menu/index.ts +241 -0
  222. package/app/src/pages/dashboard/(cms)/appearance/index.ts +89 -0
  223. package/app/src/pages/dashboard/(cms)/appearance/menus/[id]/index.ts +697 -0
  224. package/app/src/pages/dashboard/(cms)/appearance/menus/index.ts +145 -0
  225. package/app/src/pages/dashboard/(cms)/appearance/widgets/index.ts +279 -0
  226. package/app/src/pages/dashboard/(cms)/blocks/index.ts +84 -0
  227. package/app/src/pages/dashboard/(cms)/calendar/index.ts +92 -0
  228. package/app/src/pages/dashboard/(cms)/collections/[name]/index.ts +525 -0
  229. package/app/src/pages/dashboard/(cms)/collections/index.ts +72 -0
  230. package/app/src/pages/dashboard/(cms)/collections/new/index.ts +66 -0
  231. package/app/src/pages/dashboard/(cms)/comments/index.ts +237 -0
  232. package/app/src/pages/dashboard/(cms)/content/[collection]/[id]/index.ts +2382 -0
  233. package/app/src/pages/dashboard/(cms)/content/[collection]/[id]/revisions/index.ts +126 -0
  234. package/app/src/pages/dashboard/(cms)/content/[collection]/index.ts +693 -0
  235. package/app/src/pages/dashboard/(cms)/field-groups/[id]/index.ts +193 -0
  236. package/app/src/pages/dashboard/(cms)/field-groups/index.ts +65 -0
  237. package/app/src/pages/dashboard/(cms)/forms/[id]/submissions/[submission]/index.ts +279 -0
  238. package/app/src/pages/dashboard/(cms)/forms/[id]/submissions/index.ts +170 -0
  239. package/app/src/pages/dashboard/(cms)/forms/index.ts +171 -0
  240. package/app/src/pages/dashboard/(cms)/media/[id]/index.ts +317 -0
  241. package/app/src/pages/dashboard/(cms)/media/index.ts +156 -0
  242. package/app/src/pages/dashboard/(cms)/media/new/index.ts +9 -0
  243. package/app/src/pages/dashboard/(cms)/media/summary/index.ts +74 -0
  244. package/app/src/pages/dashboard/(cms)/my-sites/index.ts +63 -0
  245. package/app/src/pages/dashboard/(cms)/network/index.ts +53 -0
  246. package/app/src/pages/dashboard/(cms)/network/plugins/index.ts +110 -0
  247. package/app/src/pages/dashboard/(cms)/network/sites/[id]/index.ts +243 -0
  248. package/app/src/pages/dashboard/(cms)/network/sites/index.ts +186 -0
  249. package/app/src/pages/dashboard/(cms)/network/sites/new/index.ts +77 -0
  250. package/app/src/pages/dashboard/(cms)/network/themes/index.ts +82 -0
  251. package/app/src/pages/dashboard/(cms)/network/updates/index.ts +48 -0
  252. package/app/src/pages/dashboard/(cms)/network/users/[id]/index.ts +176 -0
  253. package/app/src/pages/dashboard/(cms)/network/users/index.ts +174 -0
  254. package/app/src/pages/dashboard/(cms)/network/users/new/index.ts +66 -0
  255. package/app/src/pages/dashboard/(cms)/plugins/index.ts +172 -0
  256. package/app/src/pages/dashboard/(cms)/profile/public/index.ts +105 -0
  257. package/app/src/pages/dashboard/(cms)/registrations/index.ts +70 -0
  258. package/app/src/pages/dashboard/(cms)/settings/index.ts +359 -0
  259. package/app/src/pages/dashboard/(cms)/settings/json/index.ts +202 -0
  260. package/app/src/pages/dashboard/(cms)/settings/layout.ts +67 -0
  261. package/app/src/pages/dashboard/(cms)/taxonomies/[name]/index.ts +85 -0
  262. package/app/src/pages/dashboard/(cms)/taxonomies/index.ts +98 -0
  263. package/app/src/pages/dashboard/(cms)/terms/[taxonomy]/[id]/index.ts +244 -0
  264. package/app/src/pages/dashboard/(cms)/terms/[taxonomy]/index.ts +148 -0
  265. package/app/src/pages/dashboard/(cms)/tools/activity/index.ts +94 -0
  266. package/app/src/pages/dashboard/(cms)/tools/automations/index.ts +131 -0
  267. package/app/src/pages/dashboard/(cms)/tools/cache/index.ts +92 -0
  268. package/app/src/pages/dashboard/(cms)/tools/export/index.ts +99 -0
  269. package/app/src/pages/dashboard/(cms)/tools/health/index.ts +189 -0
  270. package/app/src/pages/dashboard/(cms)/tools/jobs/index.ts +93 -0
  271. package/app/src/pages/dashboard/(cms)/tools/links/index.ts +115 -0
  272. package/app/src/pages/dashboard/(cms)/tools/redirects/index.ts +161 -0
  273. package/app/src/pages/dashboard/(cms)/tools/replace/index.ts +124 -0
  274. package/app/src/pages/dashboard/(cms)/tools/schema/index.ts +54 -0
  275. package/app/src/pages/dashboard/(cms)/tools/seo/index.ts +156 -0
  276. package/app/src/pages/dashboard/(cms)/tools/updates/index.ts +114 -0
  277. package/app/src/pages/dashboard/(cms)/tools/webhooks/index.ts +182 -0
  278. package/app/src/pages/dashboard/index.ts +214 -0
  279. package/app/src/pages/dashboard/layout.ts +320 -0
  280. package/app/src/pages/dashboard/profile/index.ts +211 -0
  281. package/app/src/pages/dashboard/profile/security/index.ts +255 -0
  282. package/app/src/pages/dashboard/roles/[id]/index.ts +116 -0
  283. package/app/src/pages/dashboard/roles/index.ts +134 -0
  284. package/app/src/pages/dashboard/roles/new/index.ts +95 -0
  285. package/app/src/pages/dashboard/sessions/index.ts +105 -0
  286. package/app/src/pages/dashboard/users/[id]/index.ts +472 -0
  287. package/app/src/pages/dashboard/users/index.ts +299 -0
  288. package/app/src/pages/dashboard/users/new/index.ts +123 -0
  289. package/app/src/passkeys.client.ts +18 -0
  290. package/app/src/plugins/default-theme/assets/cover.svg +31 -0
  291. package/app/src/plugins/default-theme/assets/logo.svg +8 -0
  292. package/app/src/plugins/default-theme/parts/comments.ts +66 -0
  293. package/app/src/plugins/default-theme/parts/list.ts +38 -0
  294. package/app/src/plugins/default-theme/parts/media.ts +15 -0
  295. package/app/src/plugins/default-theme/parts/options.ts +45 -0
  296. package/app/src/plugins/default-theme/plugin.json +275 -0
  297. package/app/src/plugins/default-theme/templates/archive.ts +14 -0
  298. package/app/src/plugins/default-theme/templates/entry-blank.ts +13 -0
  299. package/app/src/plugins/default-theme/templates/entry.ts +27 -0
  300. package/app/src/plugins/default-theme/templates/home.ts +8 -0
  301. package/app/src/plugins/default-theme/templates/layout.ts +40 -0
  302. package/app/src/plugins/default-theme/templates/not-found.ts +10 -0
  303. package/app/src/plugins/default-theme/templates/search.ts +32 -0
  304. package/app/src/services/rbac.ts +65 -0
  305. package/app/src/services/roles.ts +89 -0
  306. package/app/src/services/users.ts +173 -0
  307. package/package.json +123 -3
  308. package/src/automations.ts +95 -0
  309. package/src/bindings.ts +138 -0
  310. package/src/block-references.ts +239 -0
  311. package/src/block-shape.ts +155 -0
  312. package/src/blocks.ts +1157 -0
  313. package/src/cache.ts +54 -0
  314. package/src/checks.ts +198 -0
  315. package/src/cloudflare-workers.d.ts +13 -0
  316. package/src/cloudflare.ts +61 -0
  317. package/src/collab.ts +372 -0
  318. package/src/collections.ts +421 -0
  319. package/src/comments.ts +46 -0
  320. package/src/cron.ts +95 -0
  321. package/src/dashboard-menu.ts +105 -0
  322. package/src/diff.ts +113 -0
  323. package/src/editor-layout.ts +316 -0
  324. package/src/errors.ts +50 -0
  325. package/src/field-groups.ts +498 -0
  326. package/src/fields.ts +411 -0
  327. package/src/form-builder.ts +1053 -0
  328. package/src/forms.ts +109 -0
  329. package/src/highlight.ts +134 -0
  330. package/src/hooks.ts +510 -0
  331. package/src/icon-catalog.ts +55 -0
  332. package/src/icons.ts +128 -0
  333. package/src/images.ts +149 -0
  334. package/src/index.ts +100 -0
  335. package/src/isolate-core.ts +245 -0
  336. package/src/isolate.ts +19 -0
  337. package/src/isolation.ts +69 -0
  338. package/src/mail.ts +182 -0
  339. package/src/manifest.ts +476 -0
  340. package/src/media.ts +193 -0
  341. package/src/menus.ts +287 -0
  342. package/src/module.ts +32 -0
  343. package/src/modules/content.ts +64 -0
  344. package/src/modules/forms.ts +35 -0
  345. package/src/node.ts +66 -0
  346. package/src/notes.ts +237 -0
  347. package/src/permissions.ts +139 -0
  348. package/src/plugin-settings.ts +114 -0
  349. package/src/records.ts +56 -0
  350. package/src/redirects.ts +59 -0
  351. package/src/resource.ts +245 -0
  352. package/src/richtext.ts +402 -0
  353. package/src/schema-json.ts +112 -0
  354. package/src/search.ts +89 -0
  355. package/src/seo.ts +477 -0
  356. package/src/server/accounts.ts +418 -0
  357. package/src/server/ai.ts +33 -0
  358. package/src/server/api-tokens.ts +91 -0
  359. package/src/server/areas.ts +116 -0
  360. package/src/server/audit.ts +94 -0
  361. package/src/server/auth.ts +89 -0
  362. package/src/server/automations.ts +190 -0
  363. package/src/server/autosaves.ts +69 -0
  364. package/src/server/brand-icons.ts +50 -0
  365. package/src/server/brands.ts +86 -0
  366. package/src/server/budget.ts +97 -0
  367. package/src/server/cache.ts +104 -0
  368. package/src/server/capabilities.ts +333 -0
  369. package/src/server/cloudflare.ts +92 -0
  370. package/src/server/comments.ts +237 -0
  371. package/src/server/drafts.ts +176 -0
  372. package/src/server/field-groups.ts +88 -0
  373. package/src/server/files.ts +780 -0
  374. package/src/server/forms.ts +726 -0
  375. package/src/server/handoffs.ts +107 -0
  376. package/src/server/host-schema.ts +312 -0
  377. package/src/server/host.ts +2892 -0
  378. package/src/server/images.ts +34 -0
  379. package/src/server/index.ts +59 -0
  380. package/src/server/indexnow.ts +91 -0
  381. package/src/server/isolation.ts +183 -0
  382. package/src/server/locked.ts +45 -0
  383. package/src/server/mail.ts +93 -0
  384. package/src/server/markdown.ts +24 -0
  385. package/src/server/menus.ts +286 -0
  386. package/src/server/network-policy.ts +60 -0
  387. package/src/server/network.ts +665 -0
  388. package/src/server/notes.ts +275 -0
  389. package/src/server/outbox.ts +213 -0
  390. package/src/server/path-moves.ts +33 -0
  391. package/src/server/payments.ts +59 -0
  392. package/src/server/previews.ts +62 -0
  393. package/src/server/purge.ts +140 -0
  394. package/src/server/reconcile.ts +38 -0
  395. package/src/server/redirects.ts +183 -0
  396. package/src/server/repository.ts +1107 -0
  397. package/src/server/schedules.ts +105 -0
  398. package/src/server/schema.ts +562 -0
  399. package/src/server/security.ts +391 -0
  400. package/src/server/seed.ts +52 -0
  401. package/src/server/shared-fields.ts +34 -0
  402. package/src/server/site-export.ts +151 -0
  403. package/src/server/site-import.ts +482 -0
  404. package/src/server/site-search.ts +289 -0
  405. package/src/server/site-settings.ts +286 -0
  406. package/src/server/sites.ts +243 -0
  407. package/src/server/stores.ts +314 -0
  408. package/src/server/stripe.ts +173 -0
  409. package/src/server/taxonomies.ts +415 -0
  410. package/src/server/tokens.ts +25 -0
  411. package/src/server/traffic.ts +118 -0
  412. package/src/server/users.ts +653 -0
  413. package/src/server/webhooks.ts +245 -0
  414. package/src/settings-controls.ts +54 -0
  415. package/src/settings-document.ts +111 -0
  416. package/src/settings.ts +426 -0
  417. package/src/storage/cloudflare.ts +94 -0
  418. package/src/storage/index.ts +30 -0
  419. package/src/storage/node.ts +114 -0
  420. package/src/taxonomy.ts +51 -0
  421. package/src/theme.ts +1135 -0
  422. package/src/to-markdown.ts +179 -0
  423. package/src/updates.ts +126 -0
  424. package/src/version.ts +2 -0
  425. package/src/vite.d.ts +25 -0
  426. package/src/vite.js +199 -0
  427. package/src/webhooks.ts +107 -0
package/src/hooks.ts ADDED
@@ -0,0 +1,510 @@
1
+ /**
2
+ * Named, versioned CMS extension points. Plugins register handlers in their `server.ts`;
3
+ * the host invokes them through `@cossackframework/core/hooks`.
4
+ */
5
+ import { defineAction, defineFilter } from '@cossackframework/core/hooks';
6
+ import type { RecordShape } from './records';
7
+ import type { Block } from './blocks';
8
+ import type { FormField, FormValues, NotificationRule, SubmissionShape } from './form-builder';
9
+ import type { CommentStatus } from './comments';
10
+ import type { MenuItem } from './menus';
11
+ import type { TermShape } from './taxonomy';
12
+
13
+ export interface WriteActor {
14
+ readonly kind: 'user' | 'system' | 'anonymous';
15
+ readonly id: string;
16
+ }
17
+
18
+ export interface BeforeWriteInput {
19
+ readonly resource: string;
20
+ readonly action: 'create' | 'update';
21
+ /** Record ID; null on create until the host assigns it. */
22
+ readonly id: string | null;
23
+ readonly previous: RecordShape | null;
24
+ readonly actor: WriteActor;
25
+ }
26
+
27
+ /** Field values about to be written. */
28
+ export type Draft = { readonly [field: string]: unknown };
29
+
30
+ /**
31
+ * Validate or adjust a draft before the batch is prepared. Runs under a deadline;
32
+ * no external effects. Throw to reject the write; the host reports a validation error.
33
+ */
34
+ export const beforeWrite = defineFilter<Draft, BeforeWriteInput>('cms.resource.before-write', { version: 1, timeoutMs: 2_000 });
35
+
36
+ export interface ResourceEvent {
37
+ /** Outbox ID, stable across repeated deliveries: use it as the idempotency key. */
38
+ readonly eventId: string;
39
+ readonly topic: 'resource.created' | 'resource.updated' | 'resource.deleted';
40
+ readonly resource: string;
41
+ readonly id: string;
42
+ readonly revision: number;
43
+ readonly actor: WriteActor;
44
+ readonly at: number;
45
+ /**
46
+ * The record after the write, as its readers see it; null after delete. A protected or
47
+ * members-only entry comes without its password and content (`lockedView`): read it with a
48
+ * grant of your own when you need them.
49
+ */
50
+ readonly record: RecordShape | null;
51
+ /** The record's `status` before the write, for resources with one; null on create. */
52
+ readonly previousStatus?: string | null;
53
+ }
54
+
55
+ /** After-commit work, run from the outbox. Deliveries can repeat. */
56
+ export const afterCommit = defineAction<ResourceEvent>('cms.resource.after-commit', { version: 1, timeoutMs: 10_000 });
57
+
58
+ /** A purge of the caches in front of the site: the tags and URLs of the pages a change touched. */
59
+ export interface CachePurgeEvent {
60
+ /** Outbox ID, stable across repeated deliveries: use it as the idempotency key. */
61
+ readonly eventId: string;
62
+ readonly topic: 'cache.purge';
63
+ readonly at: number;
64
+ /** The site whose pages changed: `main`, or the registry ID. */
65
+ readonly site: string;
66
+ /** What changed: `entry:<collection>`, `settings`, `menus`, `comments`, `manual`, and so on. */
67
+ readonly reason: string;
68
+ /** `Cache-Tag` values to purge; the site's tag alone (`cms:<site>`) means every page of the site. */
69
+ readonly tags: readonly string[];
70
+ /** Absolute URLs to purge, for caches without tags. */
71
+ readonly urls: readonly string[];
72
+ }
73
+
74
+ /**
75
+ * Purge the caches in front of the site, run from the outbox. Handlers are purgers: the
76
+ * Cloudflare one the application adds, and a plugin's for another CDN. Deliveries can repeat.
77
+ */
78
+ export const cachePurge = defineAction<CachePurgeEvent>('cms.cache.purge', { version: 1, timeoutMs: 15_000 });
79
+
80
+ /**
81
+ * A plugin's job: queued by `context.jobs.enqueue`, or by the clock through the manifest's
82
+ * `schedules`, and delivered from the outbox to the plugin's handler of `name`.
83
+ */
84
+ export interface PluginJobEvent {
85
+ readonly eventId: string;
86
+ readonly topic: 'plugin.job';
87
+ readonly at: number;
88
+ readonly plugin: string;
89
+ readonly name: string;
90
+ readonly payload: unknown;
91
+ /** The occurrence a schedule queued, or null for a job the plugin queued. */
92
+ readonly scheduledAt: number | null;
93
+ /** The key `enqueue` was given, or null. */
94
+ readonly key: string | null;
95
+ }
96
+ /** Internal: the host routes each event to its plugin's handler. Not an extension point plugins declare. */
97
+ export const pluginJob = defineAction<PluginJobEvent>('cms.plugin.job', { version: 1, timeoutMs: 60_000 });
98
+
99
+ /** A payment provider's webhook, verified and normalized; delivered from the outbox, so handlers key on `eventId`. */
100
+ export interface PaymentEvent {
101
+ readonly eventId: string;
102
+ readonly topic: 'payment.event';
103
+ readonly at: number;
104
+ readonly provider: string;
105
+ /**
106
+ * `checkout.pending`: the checkout is done but its payment is still on its way (a bank transfer);
107
+ * `checkout.completed` follows when it is paid, `payment.failed` when it is not. `refund`'s
108
+ * `amount` is the amount refunded.
109
+ */
110
+ readonly type: 'checkout.completed' | 'checkout.pending' | 'payment.succeeded' | 'payment.failed' | 'subscription.updated' | 'subscription.cancelled' | 'refund';
111
+ /** The provider's own event type, such as `checkout.session.completed`. */
112
+ readonly providerType: string;
113
+ readonly checkoutId: string | null;
114
+ /** Whether this event's payment or subscription was made by a CMS checkout. */
115
+ readonly fromCheckout: boolean;
116
+ /**
117
+ * Whether this event completes a payment: a paid checkout, or a paid invoice (a subscription's
118
+ * renewal, or the first payment of a subscription no CMS checkout made). One payment has one
119
+ * completing event, so a handler counting completed orders counts these; `payment.completed`
120
+ * automations and webhooks fire for them. A payment intent's own events never complete.
121
+ */
122
+ readonly completes: boolean;
123
+ /** The plugin's key for the order, as given to `checkout()`. */
124
+ readonly reference: string | null;
125
+ readonly customerEmail: string | null;
126
+ /** In the currency's minor unit. */
127
+ readonly amount: number | null;
128
+ readonly currency: string | null;
129
+ readonly metadata: { readonly [key: string]: string };
130
+ /** The provider's object as sent, for what the normalized fields leave out. */
131
+ readonly object: unknown;
132
+ }
133
+ export const paymentEvent = defineAction<PaymentEvent>('cms.payment.event', { version: 1, timeoutMs: 15_000 });
134
+
135
+ // --- Forms ----------------------------------------------------------------------------
136
+
137
+ /** The form a hook runs for. */
138
+ export interface FormRef {
139
+ readonly id: string;
140
+ readonly slug: string;
141
+ readonly title: string;
142
+ readonly inputs: readonly FormField[];
143
+ }
144
+
145
+ /** Who submits and from where. */
146
+ export interface SubmissionContext {
147
+ readonly form: FormRef;
148
+ readonly actor: WriteActor;
149
+ readonly ip?: string;
150
+ readonly userAgent?: string;
151
+ /** The page the form was on. */
152
+ readonly page?: string;
153
+ }
154
+
155
+ /** Messages by input name; `_form` for one about the whole submission. */
156
+ export type FormErrors = { readonly [name: string]: string };
157
+
158
+ /**
159
+ * Check a submission after the form's own checks, as Gravity Forms' `gform_validation`: return
160
+ * the errors with yours added. The values are those of the shown inputs. No external effects.
161
+ */
162
+ export const formValidate = defineFilter<FormErrors, SubmissionContext & { readonly values: FormValues }>('cms.form.validate', { version: 1, timeoutMs: 2_000 });
163
+
164
+ /** Change the values about to be stored, once they are valid. They are checked again after. */
165
+ export const formBeforeSubmit = defineFilter<FormValues, SubmissionContext>('cms.form.before-submit', { version: 1, timeoutMs: 2_000 });
166
+
167
+ /** Values a form starts with: the defaults, then hidden fields from the page address. */
168
+ export const formPrefill = defineFilter<FormValues, { readonly form: FormRef; readonly actor: WriteActor; readonly query: { readonly [name: string]: string } }>('cms.form.prefill', { version: 1, timeoutMs: 1_000 });
169
+
170
+ /** What the sender sees after submitting: a Markdown message, or a page to go to. */
171
+ export type FormConfirmation = { readonly kind: 'message'; readonly message: string } | { readonly kind: 'redirect'; readonly url: string };
172
+ export const formConfirmation = defineFilter<FormConfirmation, { readonly form: FormRef; readonly submission: SubmissionShape }>('cms.form.confirmation', { version: 1, timeoutMs: 2_000 });
173
+
174
+ /** An email about to go out for a notification rule. Return null to not send it. */
175
+ export interface FormEmail {
176
+ readonly to: readonly string[];
177
+ readonly subject: string;
178
+ readonly text: string;
179
+ readonly replyTo?: string;
180
+ }
181
+ export const formNotification = defineFilter<FormEmail | null, { readonly form: FormRef; readonly submission: SubmissionShape; readonly rule: NotificationRule }>('cms.form.notification', { version: 1, timeoutMs: 2_000 });
182
+
183
+ export interface FormSubmittedEvent {
184
+ /** Outbox ID, stable across repeated deliveries: use it as the idempotency key. */
185
+ readonly eventId: string;
186
+ readonly topic: 'form.submitted';
187
+ readonly form: FormRef;
188
+ readonly submission: SubmissionShape;
189
+ readonly actor: WriteActor;
190
+ readonly at: number;
191
+ /** False when the form keeps no submissions: the event is all there is. */
192
+ readonly stored: boolean;
193
+ /** The site's address the form was sent from, such as `https://example.com`, for links. */
194
+ readonly origin?: string;
195
+ }
196
+
197
+ /** After a submission is committed, run from the outbox, as Gravity Forms' `gform_after_submission`. Deliveries can repeat. */
198
+ export const formSubmitted = defineAction<FormSubmittedEvent>('cms.form.submitted', { version: 1, timeoutMs: 10_000 });
199
+
200
+ // --- Terms, comments and menus --------------------------------------------------------
201
+
202
+ /** A term about to be written: what the dashboard or the API sent, after the host's own checks. */
203
+ export interface TermDraft {
204
+ readonly name: string;
205
+ readonly slug: string;
206
+ readonly description: string;
207
+ readonly parent: string | null;
208
+ /** Solar icon name, or empty. */
209
+ readonly icon: string;
210
+ /** Values of the field groups attached to the taxonomy, checked before the filter runs. */
211
+ readonly meta: { readonly [field: string]: unknown };
212
+ }
213
+
214
+ export interface TermWriteInput {
215
+ readonly taxonomy: string;
216
+ readonly action: 'create' | 'update';
217
+ /** The term's ID; null on create until the host assigns it. */
218
+ readonly id: string | null;
219
+ readonly previous: TermShape | null;
220
+ readonly actor: WriteActor;
221
+ }
222
+
223
+ /** Adjust or reject a term before it is saved, such as to derive slugs your own way. Throw to reject. */
224
+ export const termBeforeSave = defineFilter<TermDraft, TermWriteInput>('cms.term.before-save', { version: 1, timeoutMs: 2_000 });
225
+
226
+ /** A comment about to be stored, with the status the Discussion settings chose for it. */
227
+ export interface CommentDraft {
228
+ readonly content: string;
229
+ readonly authorName: string;
230
+ readonly authorEmail: string;
231
+ readonly authorUrl: string;
232
+ readonly status: CommentStatus;
233
+ }
234
+
235
+ export interface CommentWriteInput {
236
+ readonly collection: string;
237
+ readonly entry: string;
238
+ readonly parent: string | null;
239
+ readonly actor: WriteActor;
240
+ readonly ip?: string;
241
+ readonly userAgent?: string;
242
+ }
243
+
244
+ /**
245
+ * Moderate, check or change a comment before it is stored: return it with `status: 'spam'` to
246
+ * hold it, or throw a validation error to refuse it.
247
+ */
248
+ export const commentBeforeSave = defineFilter<CommentDraft, CommentWriteInput>('cms.comment.before-save', { version: 1, timeoutMs: 3_000 });
249
+
250
+ export interface MenuWriteInput {
251
+ /** The menu's ID; null while it is created. */
252
+ readonly id: string | null;
253
+ readonly name: string;
254
+ readonly actor: WriteActor;
255
+ }
256
+
257
+ /** Adjust or reject a menu's items before they are saved. They are checked again after. */
258
+ export const menuBeforeSave = defineFilter<readonly MenuItem[], MenuWriteInput>('cms.menu.before-save', { version: 1, timeoutMs: 2_000 });
259
+
260
+ // --- Dashboard lists -----------------------------------------------------------------------
261
+
262
+ /** The quick actions entries lists build in, by `EntryAction.id`; the list runs them itself. */
263
+ export const ENTRY_ACTION_IDS = Object.freeze(['edit', 'duplicate', 'trash', 'delete', 'view', 'restore', 'delete-permanently'] as const);
264
+ export type BuiltinEntryAction = (typeof ENTRY_ACTION_IDS)[number];
265
+
266
+ /** An action in an entry's row or the bulk actions menu: a built-in one, a link, or a plugin command to run. */
267
+ export interface EntryAction {
268
+ /** A built-in action's name (`ENTRY_ACTION_IDS`), or any name a plugin gives its own so other plugins can find it. */
269
+ readonly id?: string;
270
+ /** What the action says: the quick action's text, or the bulk action's menu entry. */
271
+ readonly label: string;
272
+ /** Where the action goes. */
273
+ readonly href?: string;
274
+ /** The plugin command to run instead, with `{ resource, id }` or `{ resource, ids }` as its input. */
275
+ readonly command?: { readonly plugin: string; readonly name: string };
276
+ /** Shown in the destructive color. */
277
+ readonly danger?: boolean;
278
+ /** A question to confirm before running. */
279
+ readonly confirm?: string;
280
+ }
281
+
282
+ /** A column a plugin adds to an entries list: its values by record ID. */
283
+ export interface EntryColumn {
284
+ readonly id: string;
285
+ readonly label: string;
286
+ readonly values: { readonly [recordId: string]: string };
287
+ }
288
+
289
+ export interface EntryListInput {
290
+ readonly resource: string;
291
+ readonly actor: WriteActor;
292
+ }
293
+
294
+ /**
295
+ * The quick actions under an entry in its list, the built-in ones included (named by `id`, in
296
+ * `ENTRY_ACTION_IDS`): add yours, remove or reorder them.
297
+ */
298
+ export const entryActions = defineFilter<readonly EntryAction[], EntryListInput & { readonly record: RecordShape }>('cms.dashboard.entry-actions', { version: 1, timeoutMs: 1_000 });
299
+ /** Columns of an entries list after the built-in ones, with values for the records shown. */
300
+ export const entryColumns = defineFilter<readonly EntryColumn[], EntryListInput & { readonly records: readonly RecordShape[] }>('cms.dashboard.entry-columns', { version: 1, timeoutMs: 2_000 });
301
+ /** Actions offered for the selected entries of a list, after the built-in ones. */
302
+ export const bulkActions = defineFilter<readonly EntryAction[], EntryListInput>('cms.dashboard.bulk-actions', { version: 1, timeoutMs: 1_000 });
303
+
304
+ /** A message at the top of every dashboard screen, such as "Connect your payment account". */
305
+ export interface DashboardNotice {
306
+ /** Names the notice, so another plugin can find or remove it. */
307
+ readonly id: string;
308
+ readonly tone: 'info' | 'success' | 'warning' | 'error';
309
+ /** Plain text, up to 300 characters. */
310
+ readonly message: string;
311
+ /** A same-site path the notice links to. */
312
+ readonly href?: string;
313
+ }
314
+
315
+ /** What waits for someone, on the dashboard's taskbar: a label, where to go, and a count. */
316
+ export interface TaskbarItem {
317
+ readonly id: string;
318
+ readonly label: string;
319
+ /** A same-site path. */
320
+ readonly href: string;
321
+ readonly count?: number;
322
+ readonly tone?: 'info' | 'warning' | 'error';
323
+ }
324
+
325
+ /** Notices above every dashboard screen for the signed-in user. Starts empty. */
326
+ export const dashboardNotices = defineFilter<readonly DashboardNotice[], { readonly actor: WriteActor }>('cms.dashboard.notices', { version: 1, timeoutMs: 1_000 });
327
+ /** The taskbar's items for the signed-in user, the built-in ones included (comments to moderate, pending review, …). */
328
+ export const dashboardTaskbar = defineFilter<readonly TaskbarItem[], { readonly actor: WriteActor }>('cms.dashboard.taskbar', { version: 1, timeoutMs: 1_000 });
329
+
330
+ /**
331
+ * An entry as machines read it (`Accept: text/markdown`, `?format=md`): the Markdown document
332
+ * with its front matter. Return it with your text added, such as a licence or a source note.
333
+ */
334
+ export const siteMarkdown = defineFilter<string, { readonly collection: string; readonly id: string; readonly url: string; readonly record: RecordShape }>('cms.site.markdown', { version: 1, timeoutMs: 1_000 });
335
+
336
+ // --- The site's entries -----------------------------------------------------------
337
+
338
+ /** What a `cms.site.entry-view` filter may change of an entry shown on the site. */
339
+ export interface EntryViewParts {
340
+ readonly title: string;
341
+ readonly excerpt: string;
342
+ /**
343
+ * Blocks shown before and after the entry's content, in the stored shape (`{ _id, type, data }`),
344
+ * rendered as the entry's own are. `core/html` is refused, so a filter, an isolated plugin's
345
+ * included, never puts markup of its own, or script, on the site.
346
+ */
347
+ readonly before: readonly Block[];
348
+ readonly after: readonly Block[];
349
+ }
350
+
351
+ /**
352
+ * An entry's full view on the site, after it is rendered and before the theme draws it, as
353
+ * WordPress's `the_title` and `the_content`: change its title and excerpt, add blocks before or
354
+ * after its content. Not run for a locked entry (password or members only).
355
+ */
356
+ export const siteEntryView = defineFilter<EntryViewParts, { readonly collection: string; readonly id: string; readonly url: string | null; readonly record: RecordShape; readonly signedIn: boolean }>('cms.site.entry-view', { version: 1, timeoutMs: 1_000 });
357
+
358
+ /** Block types a `cms.site.entry-view` filter may not add: their data is markup. */
359
+ export const ENTRY_VIEW_REFUSED_BLOCKS: ReadonlySet<string> = new Set(['core/html']);
360
+
361
+ // --- Users ------------------------------------------------------------------------
362
+
363
+ /** A registration before the account is made: what a `cms.user.before-register` filter may change. */
364
+ export interface RegistrationDraft {
365
+ readonly email: string;
366
+ readonly name: string;
367
+ /** Role IDs the account gets; roles the site does not have are dropped. */
368
+ readonly roles: readonly string[];
369
+ /** The account waits for an administrator's approval (Settings → General, or a filter's choice). */
370
+ readonly approval: boolean;
371
+ /** Set to refuse the registration: the message the visitor sees. */
372
+ readonly refused: string | null;
373
+ }
374
+
375
+ /**
376
+ * Before a visitor's account is made, as WordPress's `registration_errors` and `user_register`
377
+ * meet: refuse it (an email domain allowlist), choose its roles, or hold it for approval.
378
+ */
379
+ export const userBeforeRegister = defineFilter<RegistrationDraft, { readonly origin: string }>('cms.user.before-register', { version: 1, timeoutMs: 2_000 });
380
+
381
+ export interface UserRef {
382
+ readonly id: string;
383
+ readonly email: string;
384
+ readonly name: string;
385
+ }
386
+
387
+ export interface UserRegisteredEvent {
388
+ /** Outbox ID, stable across repeated deliveries: use it as the idempotency key. */
389
+ readonly eventId: string;
390
+ readonly topic: 'user.registered';
391
+ readonly at: number;
392
+ readonly user: UserRef;
393
+ /** What the account waits for: nothing (`active`), its email link (`verification`), or an administrator (`approval`). */
394
+ readonly state: 'active' | 'verification' | 'approval';
395
+ }
396
+
397
+ /** After a visitor registered, run from the outbox: a welcome email, a CRM contact. Deliveries can repeat. */
398
+ export const userRegistered = defineAction<UserRegisteredEvent>('cms.user.registered', { version: 1, timeoutMs: 10_000 });
399
+
400
+ export interface UserSignedInEvent {
401
+ /** Outbox ID, stable across repeated deliveries: use it as the idempotency key. */
402
+ readonly eventId: string;
403
+ readonly topic: 'user.signed-in';
404
+ readonly at: number;
405
+ readonly user: UserRef;
406
+ }
407
+
408
+ /**
409
+ * After a session started for a user, run from the outbox: by any sign-in method, or the
410
+ * automatic sign-in after registering or confirming the email. Deliveries can repeat.
411
+ */
412
+ export const userSignedIn = defineAction<UserSignedInEvent>('cms.user.signed-in', { version: 1, timeoutMs: 10_000 });
413
+
414
+ /** A `cms.user.before-register` result the host can use: the original email, existing roles, bounded text. */
415
+ export function registrationDraftOf(value: unknown, original: RegistrationDraft, roles: ReadonlySet<string>): RegistrationDraft {
416
+ const draft = value && typeof value === 'object' ? value as Partial<RegistrationDraft> : {};
417
+ const name = typeof draft.name === 'string' && draft.name.trim() ? draft.name.trim().slice(0, 191) : original.name;
418
+ const chosen = Array.isArray(draft.roles) ? draft.roles.filter((role): role is string => typeof role === 'string' && roles.has(role)).slice(0, 10) : [...original.roles];
419
+ const refused = typeof draft.refused === 'string' && draft.refused.trim() ? draft.refused.trim().slice(0, 300) : null;
420
+ return { email: original.email, name, roles: [...new Set(chosen)], approval: typeof draft.approval === 'boolean' ? draft.approval : original.approval, refused };
421
+ }
422
+
423
+ // --- Mail -------------------------------------------------------------------------
424
+
425
+ /** What an email the CMS sends is for. `other` is mail application code sends without saying. */
426
+ export const MAIL_KINDS = Object.freeze(['verification', 'reset', 'magic-link', 'invitation', 'comment', 'note', 'automation', 'form', 'plugin', 'other'] as const);
427
+ export type MailKind = (typeof MAIL_KINDS)[number];
428
+
429
+ /** An email about to go out: its plain text, and the HTML the site's layout (Settings → Email) made from it. */
430
+ export interface MailMessage {
431
+ readonly to: string;
432
+ /** The site's sender (`MAIL_FROM`); filters cannot change it. */
433
+ readonly from: string;
434
+ readonly subject: string;
435
+ readonly text: string;
436
+ readonly html: string;
437
+ readonly replyTo?: string;
438
+ }
439
+
440
+ export interface MailSendInput {
441
+ readonly kind: MailKind;
442
+ /** The plugin that sent it through `context.mail` (`kind: 'plugin'`); null for the CMS's own mail. */
443
+ readonly plugin: string | null;
444
+ /** The site sending it: `main`, or the registry ID. */
445
+ readonly site: string;
446
+ }
447
+
448
+ /**
449
+ * Change or stop an email just before it is sent, after the layout: return it with another
450
+ * subject, text or HTML, or null to not send it. Sign-in, reset and invitation mail (and
451
+ * `other`) keep their recipient and reply address whatever a filter returns. A failing or slow
452
+ * filter does not stop the mail: it goes out as the layout made it.
453
+ */
454
+ export const mailBeforeSend = defineFilter<MailMessage | null, MailSendInput>('cms.mail.before-send', { version: 1, timeoutMs: 2_000 });
455
+
456
+ /** The largest subject, text and HTML a `cms.mail.before-send` filter may return, in characters. */
457
+ export const MAIL_LIMITS = Object.freeze({ subject: 300, text: 100_000, html: 300_000 });
458
+
459
+ /** Kinds whose `to` and `replyTo` a filter may change: none of them carries a sign-in link. */
460
+ const OPEN_RECIPIENTS: ReadonlySet<MailKind> = new Set(['comment', 'note', 'automation', 'form', 'plugin']);
461
+ const MAIL_ADDRESS = /^[^\s@<>,;"]+@[^\s@<>,;"]+\.[^\s@<>,;"]+$/;
462
+
463
+ /** Whether a filter may send this kind of mail elsewhere: never for verification, reset, magic-link, invitation and other mail. */
464
+ export function mailRecipientsLocked(kind: MailKind): boolean {
465
+ return !OPEN_RECIPIENTS.has(kind);
466
+ }
467
+
468
+ /**
469
+ * A `cms.mail.before-send` result the host can send: null when a filter cancelled the mail;
470
+ * otherwise the original sender, the original recipient and reply address for locked kinds, one
471
+ * valid address each for the others, a one-line subject, and a text and HTML within
472
+ * `MAIL_LIMITS` (a field that is missing, empty or too large keeps the original).
473
+ */
474
+ export function mailMessageOf(value: unknown, original: MailMessage, kind: MailKind): MailMessage | null {
475
+ if (value === null) return null;
476
+ if (!value || typeof value !== 'object') return original;
477
+ const next = value as { readonly [key in keyof MailMessage]?: unknown };
478
+ const subject = typeof next.subject === 'string' && next.subject.trim() ? next.subject.replace(/[\r\n]+/g, ' ').trim().slice(0, MAIL_LIMITS.subject) : original.subject;
479
+ const text = typeof next.text === 'string' && next.text.trim() && next.text.length <= MAIL_LIMITS.text ? next.text : original.text;
480
+ const html = typeof next.html === 'string' && next.html.trim() && next.html.length <= MAIL_LIMITS.html ? next.html : original.html;
481
+ const address = (candidate: unknown): string | null => typeof candidate === 'string' && candidate.trim().length <= 320 && MAIL_ADDRESS.test(candidate.trim()) ? candidate.trim() : null;
482
+ if (mailRecipientsLocked(kind)) return { to: original.to, from: original.from, subject, text, html, ...(original.replyTo ? { replyTo: original.replyTo } : {}) };
483
+ const to = address(next.to) ?? original.to;
484
+ const replyTo = next.replyTo === undefined || next.replyTo === '' ? undefined : address(next.replyTo) ?? original.replyTo;
485
+ return { to, from: original.from, subject, text, html, ...(replyTo ? { replyTo } : {}) };
486
+ }
487
+
488
+ export const EXTENSION_POINTS = Object.freeze([beforeWrite, afterCommit, cachePurge, paymentEvent, formValidate, formBeforeSubmit, formPrefill, formConfirmation, formNotification, formSubmitted,
489
+ termBeforeSave, commentBeforeSave, menuBeforeSave, entryActions, entryColumns, bulkActions, dashboardNotices, dashboardTaskbar, siteMarkdown, siteEntryView,
490
+ userBeforeRegister, userRegistered, userSignedIn,
491
+ mailBeforeSend]);
492
+
493
+ const TONES = new Set(['info', 'success', 'warning', 'error']);
494
+ const sameSitePath = (value: unknown): value is string => typeof value === 'string' && value.startsWith('/') && !value.startsWith('//') && value.length <= 500;
495
+
496
+ /** The notices a filter returned that the dashboard can show: well-formed, at most ten. Anything else is dropped. */
497
+ export function dashboardNoticesOf(value: unknown): DashboardNotice[] {
498
+ if (!Array.isArray(value)) return [];
499
+ return value.filter((entry): entry is DashboardNotice => !!entry && typeof entry === 'object' && typeof entry.id === 'string' && TONES.has(entry.tone)
500
+ && typeof entry.message === 'string' && entry.message.trim().length > 0 && (entry.href === undefined || sameSitePath(entry.href)))
501
+ .slice(0, 10).map(entry => ({ id: entry.id.slice(0, 80), tone: entry.tone, message: entry.message.trim().slice(0, 300), ...(entry.href ? { href: entry.href } : {}) }));
502
+ }
503
+
504
+ /** The taskbar items a filter returned that the taskbar can show: well-formed, at most twenty. */
505
+ export function taskbarItemsOf(value: unknown): TaskbarItem[] {
506
+ if (!Array.isArray(value)) return [];
507
+ return value.filter((entry): entry is TaskbarItem => !!entry && typeof entry === 'object' && typeof entry.id === 'string' && typeof entry.label === 'string' && entry.label.trim().length > 0
508
+ && sameSitePath(entry.href) && (entry.count === undefined || (Number.isSafeInteger(entry.count) && entry.count >= 0)) && (entry.tone === undefined || (TONES.has(entry.tone) && entry.tone !== 'success')))
509
+ .slice(0, 20).map(entry => ({ id: entry.id.slice(0, 80), label: entry.label.trim().slice(0, 60), href: entry.href, ...(entry.count !== undefined ? { count: entry.count } : {}), ...(entry.tone ? { tone: entry.tone } : {}) }));
510
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Every icon of @cossackframework/solar-icons 0.7.1 by Solar's category, written by
3
+ * scripts/icon-catalog.mjs; do not edit. The picker browses it and `field.icon()` values are
4
+ * checked against it. A test keeps it in step with the installed package.
5
+ */
6
+
7
+ export interface IconCategory {
8
+ readonly id: string;
9
+ readonly label: string;
10
+ readonly names: readonly string[];
11
+ }
12
+
13
+ /** The version of the icon package the catalog and the sprites were made from. */
14
+ export const ICON_SET_VERSION = "0.7.1";
15
+
16
+ export const ICON_CATEGORIES: readonly IconCategory[] = Object.freeze([
17
+ { id: "arrows", label: "Arrows", names: ['alt-arrow-down', 'alt-arrow-left', 'alt-arrow-right', 'alt-arrow-up', 'arrow-down', 'arrow-left', 'arrow-left-down', 'arrow-left-up', 'arrow-right', 'arrow-right-down', 'arrow-right-up', 'arrow-up', 'double-alt-arrow-down', 'double-alt-arrow-left', 'double-alt-arrow-right', 'double-alt-arrow-up', 'refresh', 'refresh-circle', 'refresh-square', 'restart', 'restart-circle', 'restart-square', 'round-alt-arrow-down', 'round-alt-arrow-left', 'round-alt-arrow-right', 'round-alt-arrow-up', 'round-arrow-down', 'round-arrow-left', 'round-arrow-left-down', 'round-arrow-left-up', 'round-arrow-right', 'round-arrow-right-down', 'round-arrow-right-up', 'round-arrow-up', 'round-double-alt-arrow-down', 'round-double-alt-arrow-left', 'round-double-alt-arrow-right', 'round-double-alt-arrow-up', 'round-sort-horizontal', 'round-sort-vertical', 'round-transfer-diagonal', 'round-transfer-horizontal', 'round-transfer-vertical', 'sort-horizontal', 'sort-vertical', 'square-alt-arrow-down', 'square-alt-arrow-left', 'square-alt-arrow-right', 'square-alt-arrow-up', 'square-arrow-down', 'square-arrow-left', 'square-arrow-left-down', 'square-arrow-left-up', 'square-arrow-right', 'square-arrow-right-down', 'square-arrow-right-up', 'square-arrow-up', 'square-double-alt-arrow-down', 'square-double-alt-arrow-left', 'square-double-alt-arrow-right', 'square-double-alt-arrow-up', 'square-sort-horizontal', 'square-sort-vertical', 'square-transfer-horizontal', 'square-transfer-vertical', 'transfer-horizontal', 'transfer-vertical'] },
18
+ { id: "arrows-action", label: "Arrows Action", names: ['arrow-to-down-left', 'arrow-to-down-right', 'arrow-to-top-left', 'arrow-to-top-right', 'circle-bottom-down', 'circle-bottom-up', 'circle-top-down', 'circle-top-up', 'download', 'download-minimalistic', 'download-square', 'download-twice-square', 'exit', 'export', 'forward', 'forward-2', 'import', 'login', 'login-2', 'login-3', 'logout', 'logout-2', 'logout-3', 'maximize', 'maximize-square', 'maximize-square-2', 'maximize-square-3', 'maximize-square-minimalistic', 'minimize', 'minimize-square', 'minimize-square-2', 'minimize-square-3', 'minimize-square-minimalistic', 'receive-square', 'receive-twice-square', 'reorder-2', 'reply', 'reply-2', 'scaling', 'screen-share', 'send-square', 'send-twice-square', 'square-bottom-down', 'square-bottom-up', 'square-top-down', 'square-top-up', 'undo-left', 'undo-left-round', 'undo-left-round-square', 'undo-left-square', 'undo-right', 'undo-right-round', 'undo-right-round-square', 'undo-right-square', 'upload', 'upload-minimalistic', 'upload-square', 'upload-twice-square'] },
19
+ { id: "astronomy", label: "Astronomy", names: ['asteroid', 'atom', 'black-hole', 'black-hole-2', 'black-hole-3', 'earth', 'infinite', 'men', 'planet', 'planet-2', 'planet-3', 'planet-4', 'rocket', 'rocket-2', 'satellite', 'star-2', 'star-angle', 'star-circle', 'star-fall', 'star-fall-2', 'star-fall-minimalistic', 'star-fall-minimalistic-2', 'star-rainbow', 'star-ring', 'star-rings', 'stars-2', 'stars-line', 'stars-minimalistic', 'ufo', 'ufo-2', 'ufo-3', 'women'] },
20
+ { id: "building", label: "Building", names: ['buildings', 'buildings-2', 'buildings-3', 'city', 'garage', 'hospital', 'house'] },
21
+ { id: "business", label: "Business", names: ['chart', 'chart-2', 'chart-square', 'course-down', 'course-up', 'diagram-down', 'diagram-up', 'graph', 'graph-down', 'graph-down-new', 'graph-new', 'graph-new-up', 'graph-up', 'pie-chart', 'pie-chart-2', 'pie-chart-3', 'presentation-graph', 'round-graph'] },
22
+ { id: "call", label: "Call", names: ['call-cancel', 'call-cancel-rounded', 'call-chat', 'call-chat-rounded', 'call-dropped', 'call-dropped-rounded', 'call-medicine', 'call-medicine-rounded', 'end-call', 'end-call-rounded', 'incoming-call', 'incoming-call-rounded', 'outgoing-call', 'outgoing-call-rounded', 'phone', 'phone-calling', 'phone-calling-rounded', 'phone-rounded', 'record-circle', 'record-minimalistic', 'record-square'] },
23
+ { id: "devices", label: "Devices", names: ['airbuds', 'airbuds-case', 'airbuds-case-charge', 'airbuds-case-minimalistic', 'airbuds-case-open', 'airbuds-charge', 'airbuds-check', 'airbuds-left', 'airbuds-remove', 'airbuds-right', 'bluetooth', 'bluetooth-circle', 'bluetooth-square', 'bluetooth-wave', 'boombox', 'cassette', 'cassette-2', 'cloud-storage', 'cpu', 'cpu-bolt', 'devices', 'diskette', 'display', 'flash-drive', 'gameboy', 'gamepad', 'gamepad-charge', 'gamepad-minimalistic', 'gamepad-no-charge', 'gamepad-old', 'headphones-round', 'headphones-round-sound', 'headphones-square', 'headphones-square-sound', 'i-phone', 'keyboard', 'laptop', 'laptop-2', 'laptop-3', 'laptop-minimalistic', 'lightbulb', 'lightbulb-bolt', 'lightbulb-minimalistic', 'lightning', 'monitor', 'monitor-camera', 'monitor-smartphone', 'mouse', 'mouse-circle', 'mouse-minimalistic', 'plug-circle', 'printer', 'printer-2', 'printer-minimalistic', 'projector', 'radio', 'radio-minimalistic', 'scale', 'sd-card', 'server', 'server-2', 'server-minimalistic', 'server-path', 'server-square', 'server-square-cloud', 'server-square-update', 'sim-card', 'sim-card-minimalistic', 'sim-cards', 'smart-speaker', 'smart-speaker-2', 'smart-speaker-minimalistic', 'smartphone', 'smartphone-2', 'smartphone-rotate-2', 'smartphone-rotate-angle', 'smartphone-rotate-orientation', 'smartphone-update', 'smartphone-vibration', 'socket', 'ssd-round', 'ssd-square', 'tablet', 'telescope', 'turntable', 'turntable-minimalistic', 'turntable-music-note', 'tv', 'wireless-charge'] },
24
+ { id: "faces", label: "Faces", names: ['confounded-circle', 'confounded-square', 'emoji-funny-circle', 'emoji-funny-square', 'expressionless-circle', 'expressionless-square', 'face-scan-circle', 'face-scan-square', 'facemask-circle', 'facemask-square', 'sad-circle', 'sad-square', 'sleeping-circle', 'sleeping-square', 'smile-circle', 'smile-square', 'sticker-circle', 'sticker-smile-circle', 'sticker-smile-circle-2', 'sticker-smile-square', 'sticker-square'] },
25
+ { id: "files", label: "Files", names: ['file', 'file-check', 'file-corrupted', 'file-download', 'file-favorite', 'file-left', 'file-remove', 'file-right', 'file-send', 'file-smile', 'file-text'] },
26
+ { id: "folders", label: "Folders", names: ['add-folder', 'folder', 'folder-2', 'folder-check', 'folder-cloud', 'folder-error', 'folder-favorite-bookmark', 'folder-favorite-star', 'folder-open', 'folder-path-connect', 'folder-security', 'folder-with-files', 'move-to-folder', 'remove-folder'] },
27
+ { id: "food", label: "Food", names: ['bottle', 'chef-hat', 'chef-hat-heart', 'chef-hat-minimalistic', 'corkscrew', 'cup-hot', 'cup-paper', 'donut', 'donut-bitten', 'ladle', 'mug', 'oven-mitts', 'oven-mitts-minimalistic', 'rolling-pin', 'tea-cup', 'whisk', 'wineglass', 'wineglass-triangle'] },
28
+ { id: "hands", label: "Hands", names: ['hand-heart', 'hand-money', 'hand-pills', 'hand-shake', 'hand-stars'] },
29
+ { id: "home", label: "Home", names: ['armchair', 'armchair-2', 'bar-chair', 'bath', 'bed', 'bedside-table', 'bedside-table-2', 'bedside-table-3', 'bedside-table-4', 'chair', 'chair-2', 'chandelier', 'closet', 'closet-2', 'conditioner', 'conditioner-2', 'floor-lamp', 'floor-lamp-minimalistic', 'fridge', 'lamp', 'mirror', 'remote-controller', 'remote-controller-2', 'remote-controller-minimalistic', 'smart-vacuum-cleaner', 'smart-vacuum-cleaner-2', 'sofa', 'sofa-2', 'sofa-3', 'speaker', 'speaker-minimalistic', 'vanity', 'volume-knob', 'washing-machine', 'washing-machine-minimalistic'] },
30
+ { id: "it", label: "IT", names: ['bug', 'bug-minimalistic', 'code', 'code-2', 'code-circle', 'code-square', 'command', 'hashtag', 'hashtag-chat', 'hashtag-circle', 'hashtag-square', 'programming', 'screencast', 'screencast-2', 'sidebar-code', 'slash-circle', 'slash-square', 'station', 'station-minimalistic', 'structure', 'translation', 'translation-2', 'usb', 'usb-circle', 'usb-square', 'wi-fi-router', 'wi-fi-router-minimalistic', 'wi-fi-router-round', 'window-frame'] },
31
+ { id: "like", label: "Like", names: ['dislike', 'heart', 'heart-angle', 'heart-crack', 'heart-lock', 'heart-shine', 'heart-unlock', 'hearts', 'like', 'medal-ribbon', 'medal-ribbon-star', 'medal-ribbons-star', 'medal-star', 'medal-star-circle', 'medal-star-square', 'star', 'star-shine'] },
32
+ { id: "list", label: "List", names: ['bill-2', 'checklist', 'checklist-minimalistic', 'list', 'list-arrow-down', 'list-arrow-down-minimalistic', 'list-arrow-up', 'list-arrow-up-minimalistic', 'list-check', 'list-check-minimalistic', 'list-cross', 'list-cross-minimalistic', 'list-down', 'list-down-minimalistic', 'list-heart', 'list-heart-minimalistic', 'list-up', 'list-up-minimalistic', 'list-vertical', 'playlist', 'playlist-2', 'playlist-minimalistic', 'playlist-minimalistic-2', 'playlist-minimalistic-3', 'sort-alphabetically', 'sort-by-time', 'sort-from-bottom-to-top', 'sort-from-top-to-bottom'] },
33
+ { id: "map", label: "Map", names: ['branching-paths-down', 'branching-paths-up', 'compass', 'compass-big', 'compass-square', 'global', 'globe', 'gps', 'map', 'map-arrow-down', 'map-arrow-left', 'map-arrow-right', 'map-arrow-square', 'map-arrow-up', 'map-point', 'map-point-add', 'map-point-favorite', 'map-point-hospital', 'map-point-remove', 'map-point-rotate', 'map-point-school', 'map-point-search', 'map-point-wave', 'people-nearby', 'point-on-map', 'point-on-map-perspective', 'radar', 'radar-2', 'route', 'routing', 'routing-2', 'routing-3', 'signpost', 'signpost-2', 'streets', 'streets-map-point', 'streets-navigation'] },
34
+ { id: "medicine", label: "Medicine", names: ['adhesive-plaster', 'adhesive-plaster-2', 'bacteria', 'benzene-ring', 'bone', 'bone-crack', 'bone-fracture', 'bones', 'dna', 'dropper', 'dropper-2', 'dropper-3', 'dropper-minimalistic', 'dropper-minimalistic-2', 'health', 'heart-pulse', 'heart-pulse-2', 'jar-of-pills', 'jar-of-pills-2', 'medical-kit', 'pill', 'pills', 'pills-2', 'pills-3', 'pulse', 'pulse-2', 'stethoscope', 'syringe', 'test-tube', 'test-tube-minimalistic', 'thermometer', 'virus'] },
35
+ { id: "messages", label: "Messages", names: ['chat-round', 'chat-round-call', 'chat-round-check', 'chat-round-dots', 'chat-round-like', 'chat-round-line', 'chat-round-money', 'chat-round-unread', 'chat-round-video', 'chat-square', 'chat-square-arrow', 'chat-square-call', 'chat-square-check', 'chat-square-code', 'chat-square-like', 'check-read', 'dialog', 'dialog-2', 'forward-right', 'inbox', 'inbox-archive', 'inbox-in', 'inbox-line', 'inbox-out', 'inbox-unread', 'letter', 'letter-opened', 'letter-unread', 'mailbox', 'multiple-forward-left', 'multiple-forward-right', 'paperclip', 'paperclip-2', 'paperclip-rounded', 'paperclip-rounded-2', 'pen', 'pen-2', 'pen-new-round', 'pen-new-square', 'plane', 'plane-2', 'plane-3', 'square-forward', 'square-share-line', 'unread'] },
36
+ { id: "money", label: "Money", names: ['banknote', 'banknote-2', 'bill', 'bill-check', 'bill-cross', 'bill-list', 'card', 'card-2', 'card-receive', 'card-search', 'card-send', 'card-transfer', 'cardholder', 'cash-out', 'dollar', 'dollar-minimalistic', 'euro', 'money-bag', 'money-roll', 'ruble', 'safe-2', 'safe-circle', 'safe-square', 'sale', 'sale-square', 'tag', 'tag-horizontal', 'tag-price', 'ticket', 'ticket-sale', 'verified-check', 'wallet', 'wallet-2', 'wallet-money'] },
37
+ { id: "nature", label: "Nature", names: ['bonfire', 'fire', 'fire-minimalistic', 'fire-square', 'flame', 'leaf', 'suitcase', 'suitcase-lines', 'suitcase-tag'] },
38
+ { id: "notes", label: "Notes", names: ['archive', 'archive-check', 'archive-down', 'archive-down-minimalistic', 'archive-minimalistic', 'archive-up', 'archive-up-minimalistic', 'clipboard', 'clipboard-add', 'clipboard-check', 'clipboard-heart', 'clipboard-list', 'clipboard-remove', 'clipboard-text', 'document', 'document-add', 'document-medicine', 'document-text', 'documents', 'documents-minimalistic', 'notebook', 'notes', 'notes-minimalistic'] },
39
+ { id: "notifications", label: "Notifications", names: ['bell', 'bell-off', 'bell-ring', 'notification-lines-remove', 'notification-remove', 'notification-unread', 'notification-unread-lines'] },
40
+ { id: "parts", label: "Parts", names: ['bus', 'car-battery', 'electric-refueling', 'gas-station', 'kick-scooter', 'scooter', 'shock-absorber', 'speedometer-low', 'speedometer-max', 'speedometer-middle', 'suspension', 'suspension-bolt', 'suspension-cross', 'tram', 'transmission', 'transmission-circle', 'transmission-square', 'wheel', 'wheel-angle'] },
41
+ { id: "school", label: "School", names: ['backpack', 'book', 'book-2', 'book-bookmark', 'book-bookmark-minimalistic', 'book-minimalistic', 'bookmark', 'bookmark-circle', 'bookmark-opened', 'bookmark-square', 'bookmark-square-minimalistic', 'calculator', 'calculator-minimalistic', 'case', 'case-minimalistic', 'case-round', 'case-round-minimalistic', 'diploma', 'diploma-verified', 'document-2', 'notebook-2', 'notebook-bookmark', 'notebook-minimalistic', 'notebook-square', 'passport', 'passport-minimalistic', 'plus-minus', 'square-academic-cap', 'square-academic-cap-2'] },
42
+ { id: "search", label: "Search", names: ['magnifier', 'magnifier-bug', 'magnifier-zoom-in', 'magnifier-zoom-out', 'minimalistic-magnifier', 'minimalistic-magnifier-bug', 'minimalistic-magnifier-zoom-in', 'minimalistic-magnifier-zoom-out', 'rounded-magnifier', 'rounded-magnifier-bug', 'rounded-magnifier-zoom-in', 'rounded-magnifier-zoom-out'] },
43
+ { id: "security", label: "Security", names: ['bomb', 'bomb-emoji', 'bomb-minimalistic', 'code-scan', 'eye', 'eye-closed', 'eye-scan', 'incognito', 'key', 'key-minimalistic', 'key-minimalistic-2', 'key-minimalistic-square', 'key-minimalistic-square-2', 'key-minimalistic-square-3', 'key-square', 'key-square-2', 'lock', 'lock-keyhole', 'lock-keyhole-minimalistic', 'lock-keyhole-minimalistic-unlocked', 'lock-keyhole-unlocked', 'lock-password', 'lock-password-unlocked', 'lock-unlocked', 'object-scan', 'password', 'password-minimalistic', 'password-minimalistic-input', 'qr-code', 'scanner', 'scanner-2', 'shield', 'shield-check', 'shield-cross', 'shield-keyhole', 'shield-keyhole-minimalistic', 'shield-minimalistic', 'shield-minus', 'shield-network', 'shield-plus', 'shield-star', 'shield-up', 'shield-user', 'shield-warning', 'siren', 'siren-rounded'] },
44
+ { id: "settings", label: "Settings", names: ['settings', 'settings-minimalistic', 'tuning', 'tuning-2', 'tuning-3', 'tuning-4', 'tuning-square', 'tuning-square-2', 'widget', 'widget-2', 'widget-3', 'widget-4', 'widget-5', 'widget-6', 'widget-add'] },
45
+ { id: "shopping", label: "Shopping", names: ['bag', 'bag-2', 'bag-3', 'bag-4', 'bag-5', 'bag-check', 'bag-cross', 'bag-heart', 'bag-music', 'bag-music-2', 'bag-smile', 'cart', 'cart-2', 'cart-3', 'cart-4', 'cart-5', 'cart-check', 'cart-cross', 'cart-large', 'cart-large-2', 'cart-large-3', 'cart-large-4', 'cart-large-minimalistic', 'cart-plus', 'shop', 'shop-2', 'shop-minimalistic'] },
46
+ { id: "sports", label: "Sports", names: ['balls', 'basketball', 'bicycling', 'bicycling-round', 'body-shape', 'body-shape-minimalistic', 'bowling', 'dumbbell', 'dumbbell-large', 'dumbbell-large-minimalistic', 'dumbbell-small', 'dumbbells', 'dumbbells-2', 'football', 'golf', 'hiking', 'hiking-minimalistic', 'hiking-round', 'meditation', 'meditation-round', 'ranking', 'rugby', 'running', 'running-2', 'running-round', 'skateboard', 'skateboarding', 'skateboarding-round', 'stretching', 'stretching-round', 'swimming', 'tennis', 'tennis-2', 'treadmill', 'treadmill-round', 'volleyball', 'volleyball-2', 'walking', 'walking-round', 'water', 'water-sun'] },
47
+ { id: "text-formatting", label: "Text Formatting", names: ['backspace', 'eraser', 'eraser-circle', 'eraser-square', 'link', 'link-circle', 'link-minimalistic', 'link-minimalistic-2', 'link-round', 'link-round-angle', 'link-square', 'paragraph-spacing', 'text-bold', 'text-bold-circle', 'text-bold-square', 'text-circle', 'text-cross', 'text-cross-circle', 'text-cross-square', 'text-field', 'text-field-focus', 'text-format', 'text-italic', 'text-italic-circle', 'text-italic-square', 'text-selection', 'text-square', 'text-square-2', 'text-underline', 'text-underline-circle', 'text-underline-cross', 'unlink', 'unlink-minimalistic'] },
48
+ { id: "time", label: "Time", names: ['alarm', 'alarm-add', 'alarm-pause', 'alarm-play', 'alarm-remove', 'alarm-sleep', 'alarm-turn-off', 'calendar', 'calendar-add', 'calendar-date', 'calendar-mark', 'calendar-minimalistic', 'calendar-search', 'clock-circle', 'clock-square', 'history', 'history-2', 'history-3', 'hourglass', 'hourglass-line', 'stopwatch', 'stopwatch-pause', 'stopwatch-play', 'watch-round', 'watch-square', 'watch-square-minimalistic', 'watch-square-minimalistic-charge'] },
49
+ { id: "tools", label: "Tools", names: ['align-bottom', 'align-horizontal-center', 'align-horizontal-spacing', 'align-left', 'align-right', 'align-top', 'align-vertical-center', 'align-vertical-spacing', 'colour-tuning', 'crop', 'crop-minimalistic', 'filters', 'flip-horizontal', 'flip-vertical', 'layers', 'layers-minimalistic', 'mirror-left', 'mirror-right', 'paint-roller', 'palette', 'palette-2', 'palette-round', 'pipette', 'radial-blur', 'ruler', 'ruler-angular', 'ruler-cross-pen', 'ruler-pen', 'three-squares'] },
50
+ { id: "ui", label: "UI", names: ['accessibility', 'add-circle', 'add-square', 'augmented-reality', 'balloon', 'battery-charge', 'battery-charge-minimalistic', 'battery-full', 'battery-full-minimalistic', 'battery-half', 'battery-half-minimalistic', 'battery-low', 'battery-low-minimalistic', 'body', 'bolt', 'bolt-circle', 'box', 'box-minimalistic', 'broom', 'cat', 'check-circle', 'check-square', 'close-circle', 'close-square', 'confetti', 'confetti-minimalistic', 'copy', 'copyright', 'cosmetic', 'creative-commons', 'crown', 'crown-line', 'crown-minimalistic', 'crown-star', 'cup', 'cup-first', 'cup-music', 'cup-star', 'cursor', 'cursor-square', 'danger', 'danger-circle', 'danger-square', 'danger-triangle', 'database', 'delivery', 'explicit', 'feed', 'ferris-wheel', 'figma', 'filter', 'flag', 'flag-2', 'flashlight', 'flashlight-on', 'forbidden', 'forbidden-circle', 'four-k', 'fuel', 'ghost', 'ghost-smile', 'gift', 'glasses', 'hamburger-menu', 'hanger', 'hanger-2', 'help', 'high-definition', 'high-quality', 'home', 'home-2', 'home-add', 'home-add-angle', 'home-angle', 'home-angle-2', 'home-smile', 'home-smile-angle', 'home-wi-fi', 'home-wi-fi-angle', 'info-circle', 'info-square', 'magic-wand', 'magic-wand-2', 'magic-wand-3', 'magnet', 'magnet-wave', 'mask-happy', 'mask-sad', 'masks', 'mention-circle', 'mention-square', 'menu-dots', 'menu-dots-circle', 'menu-dots-square', 'minus-circle', 'minus-square', 'mirror-2', 'paper-bin', 'paw', 'perfume', 'pin', 'pin-circle', 'pin-list', 'plate', 'posts-carousel-horizontal', 'posts-carousel-vertical', 'power', 'question-circle', 'question-square', 'reorder', 'revote', 'scissors', 'scissors-square', 'share', 'share-circle', 'skirt', 'sledgehammer', 'sleeping', 'slider-horizontal', 'slider-minimalistic-horizontal', 'slider-vertical', 'slider-vertical-minimalistic', 'smart-home', 'smart-home-angle', 'sort', 'special-effects', 'subtitles', 't-shirt', 'target', 'traffic', 'traffic-economy', 'trash-bin-2', 'trash-bin-minimalistic', 'trash-bin-minimalistic-2', 'trash-bin-trash', 'umbrella', 'waterdrop', 'win-rar', 'xxx'] },
51
+ { id: "users", label: "Users", names: ['user', 'user-block', 'user-block-rounded', 'user-check', 'user-check-rounded', 'user-circle', 'user-cross', 'user-cross-rounded', 'user-hand-up', 'user-hands', 'user-heart', 'user-heart-rounded', 'user-id', 'user-minus', 'user-minus-rounded', 'user-plus', 'user-plus-rounded', 'user-rounded', 'user-speak', 'user-speak-rounded', 'users-group-rounded', 'users-group-two-rounded'] },
52
+ { id: "video", label: "Video", names: ['album', 'camera', 'camera-add', 'camera-minimalistic', 'camera-rotate', 'camera-square', 'clapperboard', 'clapperboard-edit', 'clapperboard-open', 'clapperboard-open-play', 'clapperboard-play', 'clapperboard-text', 'full-screen', 'full-screen-circle', 'full-screen-square', 'gallery', 'gallery-add', 'gallery-check', 'gallery-circle', 'gallery-download', 'gallery-edit', 'gallery-favorite', 'gallery-minimalistic', 'gallery-remove', 'gallery-round', 'gallery-send', 'gallery-wide', 'library', 'microphone', 'microphone-2', 'microphone-3', 'microphone-large', 'music-library', 'music-library-2', 'music-note', 'music-note-2', 'music-note-3', 'music-note-4', 'music-note-slider', 'music-note-slider-2', 'music-notes', 'muted', 'panorama', 'pause', 'pause-circle', 'pip', 'pip-2', 'play', 'play-circle', 'play-stream', 'playback-speed', 'podcast', 'quit-full-screen', 'quit-full-screen-circle', 'quit-full-screen-square', 'quit-pip', 'record', 'record-audio-circle', 'reel', 'reel-2', 'repeat', 'repeat-one', 'repeat-one-minimalistic', 'rewind-10-seconds-back', 'rewind-10-seconds-forward', 'rewind-15-seconds-back', 'rewind-15-seconds-forward', 'rewind-5-seconds-back', 'rewind-5-seconds-forward', 'rewind-back', 'rewind-back-circle', 'rewind-forward', 'rewind-forward-circle', 'shuffle', 'skip-next', 'skip-previous', 'soundwave', 'soundwave-circle', 'soundwave-square', 'stop', 'stop-circle', 'stream', 'to-pip', 'upload-track', 'upload-track-2', 'video-frame', 'video-frame-2', 'video-frame-cut', 'video-frame-cut-2', 'video-frame-play-horizontal', 'video-frame-play-vertical', 'video-frame-replace', 'video-library', 'videocamera', 'videocamera-add', 'videocamera-record', 'vinyl', 'vinyl-record', 'volume', 'volume-cross', 'volume-loud', 'volume-small', 'wallpaper'] },
53
+ { id: "weather", label: "Weather", names: ['cloud', 'cloud-bolt', 'cloud-bolt-minimalistic', 'cloud-check', 'cloud-cross', 'cloud-download', 'cloud-minus', 'cloud-plus', 'cloud-rain', 'cloud-snowfall', 'cloud-snowfall-minimalistic', 'cloud-storm', 'cloud-sun', 'cloud-sun-2', 'cloud-upload', 'cloud-waterdrop', 'cloud-waterdrops', 'clouds', 'cloudy-moon', 'fog', 'moon', 'moon-fog', 'moon-sleep', 'moon-stars', 'snowflake', 'stars', 'sun', 'sun-2', 'sun-fog', 'sunrise', 'sunset', 'temperature', 'tornado', 'tornado-small', 'waterdrops', 'wind'] },
54
+ { id: "other", label: "Other", names: ['chat-dots', 'chat-line', 'chat-square-2', 'chat-unread', 'cloud-file', 'code-file', 'figma-file', 'sidebar', 'sidebar-minimalistic', 'ticker-star', 'zip-file'] },
55
+ ]);