@forumone/throughline 0.0.0-stage → 1.0.0-next.0

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 (918) hide show
  1. package/CHANGELOG.md +584 -0
  2. package/LICENSE +21 -0
  3. package/README.md +351 -2
  4. package/bin/payload-cli.mjs +443 -0
  5. package/bin/throughline-payload.mjs +6 -0
  6. package/dist/access/coreCollections.d.ts +18 -0
  7. package/dist/access/coreCollections.d.ts.map +1 -0
  8. package/dist/access/coreCollections.js +56 -0
  9. package/dist/access/coreCollections.js.map +1 -0
  10. package/dist/approvals/collection.d.ts +21 -0
  11. package/dist/approvals/collection.d.ts.map +1 -0
  12. package/dist/approvals/collection.js +99 -0
  13. package/dist/approvals/collection.js.map +1 -0
  14. package/dist/approvals/endpoints/action.d.ts +31 -0
  15. package/dist/approvals/endpoints/action.d.ts.map +1 -0
  16. package/dist/approvals/endpoints/action.js +205 -0
  17. package/dist/approvals/endpoints/action.js.map +1 -0
  18. package/dist/approvals/index.d.ts +19 -0
  19. package/dist/approvals/index.d.ts.map +1 -0
  20. package/dist/approvals/index.js +13 -0
  21. package/dist/approvals/index.js.map +1 -0
  22. package/dist/approvals/jobs/expire-stale-approvals.d.ts +14 -0
  23. package/dist/approvals/jobs/expire-stale-approvals.d.ts.map +1 -0
  24. package/dist/approvals/jobs/expire-stale-approvals.js +101 -0
  25. package/dist/approvals/jobs/expire-stale-approvals.js.map +1 -0
  26. package/dist/approvals/options.d.ts +76 -0
  27. package/dist/approvals/options.d.ts.map +1 -0
  28. package/dist/approvals/options.js +47 -0
  29. package/dist/approvals/options.js.map +1 -0
  30. package/dist/approvals/plugin.d.ts +4 -0
  31. package/dist/approvals/plugin.d.ts.map +1 -0
  32. package/dist/approvals/plugin.js +92 -0
  33. package/dist/approvals/plugin.js.map +1 -0
  34. package/dist/approvals/resolver.d.ts +18 -0
  35. package/dist/approvals/resolver.d.ts.map +1 -0
  36. package/dist/approvals/resolver.js +57 -0
  37. package/dist/approvals/resolver.js.map +1 -0
  38. package/dist/approvals/symbol.d.ts +12 -0
  39. package/dist/approvals/symbol.d.ts.map +1 -0
  40. package/dist/approvals/symbol.js +12 -0
  41. package/dist/approvals/symbol.js.map +1 -0
  42. package/dist/approvals/tokens.d.ts +48 -0
  43. package/dist/approvals/tokens.d.ts.map +1 -0
  44. package/dist/approvals/tokens.js +123 -0
  45. package/dist/approvals/tokens.js.map +1 -0
  46. package/dist/approvals/tools/descriptors.d.ts +26 -0
  47. package/dist/approvals/tools/descriptors.d.ts.map +1 -0
  48. package/dist/approvals/tools/descriptors.js +35 -0
  49. package/dist/approvals/tools/descriptors.js.map +1 -0
  50. package/dist/approvals/tools/get-approval-status.d.ts +11 -0
  51. package/dist/approvals/tools/get-approval-status.d.ts.map +1 -0
  52. package/dist/approvals/tools/get-approval-status.js +94 -0
  53. package/dist/approvals/tools/get-approval-status.js.map +1 -0
  54. package/dist/approvals/tools/index.d.ts +7 -0
  55. package/dist/approvals/tools/index.d.ts.map +1 -0
  56. package/dist/approvals/tools/index.js +7 -0
  57. package/dist/approvals/tools/index.js.map +1 -0
  58. package/dist/approvals/tools/list-my-requests.d.ts +11 -0
  59. package/dist/approvals/tools/list-my-requests.d.ts.map +1 -0
  60. package/dist/approvals/tools/list-my-requests.js +55 -0
  61. package/dist/approvals/tools/list-my-requests.js.map +1 -0
  62. package/dist/approvals/tools/list-pending-approvals.d.ts +11 -0
  63. package/dist/approvals/tools/list-pending-approvals.d.ts.map +1 -0
  64. package/dist/approvals/tools/list-pending-approvals.js +53 -0
  65. package/dist/approvals/tools/list-pending-approvals.js.map +1 -0
  66. package/dist/approvals/tools/request-approval.d.ts +13 -0
  67. package/dist/approvals/tools/request-approval.d.ts.map +1 -0
  68. package/dist/approvals/tools/request-approval.js +123 -0
  69. package/dist/approvals/tools/request-approval.js.map +1 -0
  70. package/dist/approvals/tools/respond-to-approval.d.ts +13 -0
  71. package/dist/approvals/tools/respond-to-approval.d.ts.map +1 -0
  72. package/dist/approvals/tools/respond-to-approval.js +98 -0
  73. package/dist/approvals/tools/respond-to-approval.js.map +1 -0
  74. package/dist/audit/collection.d.ts +22 -0
  75. package/dist/audit/collection.d.ts.map +1 -0
  76. package/dist/audit/collection.js +109 -0
  77. package/dist/audit/collection.js.map +1 -0
  78. package/dist/audit/index.d.ts +16 -0
  79. package/dist/audit/index.d.ts.map +1 -0
  80. package/dist/audit/index.js +11 -0
  81. package/dist/audit/index.js.map +1 -0
  82. package/dist/audit/jobs/audit-event-echo.d.ts +14 -0
  83. package/dist/audit/jobs/audit-event-echo.d.ts.map +1 -0
  84. package/dist/audit/jobs/audit-event-echo.js +61 -0
  85. package/dist/audit/jobs/audit-event-echo.js.map +1 -0
  86. package/dist/audit/plugin.d.ts +20 -0
  87. package/dist/audit/plugin.d.ts.map +1 -0
  88. package/dist/audit/plugin.js +55 -0
  89. package/dist/audit/plugin.js.map +1 -0
  90. package/dist/audit/query/formatting/index.d.ts +40 -0
  91. package/dist/audit/query/formatting/index.d.ts.map +1 -0
  92. package/dist/audit/query/formatting/index.js +73 -0
  93. package/dist/audit/query/formatting/index.js.map +1 -0
  94. package/dist/audit/query/options.d.ts +34 -0
  95. package/dist/audit/query/options.d.ts.map +1 -0
  96. package/dist/audit/query/options.js +8 -0
  97. package/dist/audit/query/options.js.map +1 -0
  98. package/dist/audit/query/plugin.d.ts +11 -0
  99. package/dist/audit/query/plugin.d.ts.map +1 -0
  100. package/dist/audit/query/plugin.js +68 -0
  101. package/dist/audit/query/plugin.js.map +1 -0
  102. package/dist/audit/query/tools/access.d.ts +9 -0
  103. package/dist/audit/query/tools/access.d.ts.map +1 -0
  104. package/dist/audit/query/tools/access.js +14 -0
  105. package/dist/audit/query/tools/access.js.map +1 -0
  106. package/dist/audit/query/tools/descriptors.d.ts +26 -0
  107. package/dist/audit/query/tools/descriptors.d.ts.map +1 -0
  108. package/dist/audit/query/tools/descriptors.js +35 -0
  109. package/dist/audit/query/tools/descriptors.js.map +1 -0
  110. package/dist/audit/query/tools/get-change-history.d.ts +23 -0
  111. package/dist/audit/query/tools/get-change-history.d.ts.map +1 -0
  112. package/dist/audit/query/tools/get-change-history.js +44 -0
  113. package/dist/audit/query/tools/get-change-history.js.map +1 -0
  114. package/dist/audit/query/tools/get-recent-failures.d.ts +23 -0
  115. package/dist/audit/query/tools/get-recent-failures.d.ts.map +1 -0
  116. package/dist/audit/query/tools/get-recent-failures.js +56 -0
  117. package/dist/audit/query/tools/get-recent-failures.js.map +1 -0
  118. package/dist/audit/query/tools/index.d.ts +13 -0
  119. package/dist/audit/query/tools/index.d.ts.map +1 -0
  120. package/dist/audit/query/tools/index.js +8 -0
  121. package/dist/audit/query/tools/index.js.map +1 -0
  122. package/dist/audit/query/tools/query-audit.d.ts +53 -0
  123. package/dist/audit/query/tools/query-audit.d.ts.map +1 -0
  124. package/dist/audit/query/tools/query-audit.js +78 -0
  125. package/dist/audit/query/tools/query-audit.js.map +1 -0
  126. package/dist/audit/query/tools/what-changed-in-range.d.ts +23 -0
  127. package/dist/audit/query/tools/what-changed-in-range.d.ts.map +1 -0
  128. package/dist/audit/query/tools/what-changed-in-range.js +86 -0
  129. package/dist/audit/query/tools/what-changed-in-range.js.map +1 -0
  130. package/dist/audit/query/tools/who-changed-what.d.ts +38 -0
  131. package/dist/audit/query/tools/who-changed-what.d.ts.map +1 -0
  132. package/dist/audit/query/tools/who-changed-what.js +66 -0
  133. package/dist/audit/query/tools/who-changed-what.js.map +1 -0
  134. package/dist/audit/types.d.ts +11 -0
  135. package/dist/audit/types.d.ts.map +1 -0
  136. package/dist/audit/types.js +45 -0
  137. package/dist/audit/types.js.map +1 -0
  138. package/dist/audit/writer.d.ts +50 -0
  139. package/dist/audit/writer.d.ts.map +1 -0
  140. package/dist/audit/writer.js +101 -0
  141. package/dist/audit/writer.js.map +1 -0
  142. package/dist/cache-tags.d.ts +31 -0
  143. package/dist/cache-tags.d.ts.map +1 -0
  144. package/dist/cache-tags.js +53 -0
  145. package/dist/cache-tags.js.map +1 -0
  146. package/dist/components/index.d.ts +8 -0
  147. package/dist/components/index.d.ts.map +1 -0
  148. package/dist/components/index.js +7 -0
  149. package/dist/components/index.js.map +1 -0
  150. package/dist/components/manifest-source.d.ts +17 -0
  151. package/dist/components/manifest-source.d.ts.map +1 -0
  152. package/dist/components/manifest-source.js +60 -0
  153. package/dist/components/manifest-source.js.map +1 -0
  154. package/dist/components/matching/index.d.ts +3 -0
  155. package/dist/components/matching/index.d.ts.map +1 -0
  156. package/dist/components/matching/index.js +2 -0
  157. package/dist/components/matching/index.js.map +1 -0
  158. package/dist/components/matching/tfidf.d.ts +13 -0
  159. package/dist/components/matching/tfidf.d.ts.map +1 -0
  160. package/dist/components/matching/tfidf.js +118 -0
  161. package/dist/components/matching/tfidf.js.map +1 -0
  162. package/dist/components/matching/types.d.ts +22 -0
  163. package/dist/components/matching/types.d.ts.map +1 -0
  164. package/dist/components/matching/types.js +2 -0
  165. package/dist/components/matching/types.js.map +1 -0
  166. package/dist/components/options.d.ts +136 -0
  167. package/dist/components/options.d.ts.map +1 -0
  168. package/dist/components/options.js +40 -0
  169. package/dist/components/options.js.map +1 -0
  170. package/dist/components/plugin.d.ts +4 -0
  171. package/dist/components/plugin.d.ts.map +1 -0
  172. package/dist/components/plugin.js +95 -0
  173. package/dist/components/plugin.js.map +1 -0
  174. package/dist/components/tools/descriptors.d.ts +34 -0
  175. package/dist/components/tools/descriptors.d.ts.map +1 -0
  176. package/dist/components/tools/descriptors.js +43 -0
  177. package/dist/components/tools/descriptors.js.map +1 -0
  178. package/dist/components/tools/find-anti-pattern.d.ts +9 -0
  179. package/dist/components/tools/find-anti-pattern.d.ts.map +1 -0
  180. package/dist/components/tools/find-anti-pattern.js +31 -0
  181. package/dist/components/tools/find-anti-pattern.js.map +1 -0
  182. package/dist/components/tools/get-contract.d.ts +4 -0
  183. package/dist/components/tools/get-contract.d.ts.map +1 -0
  184. package/dist/components/tools/get-contract.js +19 -0
  185. package/dist/components/tools/get-contract.js.map +1 -0
  186. package/dist/components/tools/get-tokens.d.ts +4 -0
  187. package/dist/components/tools/get-tokens.d.ts.map +1 -0
  188. package/dist/components/tools/get-tokens.js +19 -0
  189. package/dist/components/tools/get-tokens.js.map +1 -0
  190. package/dist/components/tools/get-variants.d.ts +4 -0
  191. package/dist/components/tools/get-variants.d.ts.map +1 -0
  192. package/dist/components/tools/get-variants.js +19 -0
  193. package/dist/components/tools/get-variants.js.map +1 -0
  194. package/dist/components/tools/index.d.ts +9 -0
  195. package/dist/components/tools/index.d.ts.map +1 -0
  196. package/dist/components/tools/index.js +9 -0
  197. package/dist/components/tools/index.js.map +1 -0
  198. package/dist/components/tools/list-components.d.ts +4 -0
  199. package/dist/components/tools/list-components.d.ts.map +1 -0
  200. package/dist/components/tools/list-components.js +25 -0
  201. package/dist/components/tools/list-components.js.map +1 -0
  202. package/dist/components/tools/suggest-for-intent.d.ts +12 -0
  203. package/dist/components/tools/suggest-for-intent.d.ts.map +1 -0
  204. package/dist/components/tools/suggest-for-intent.js +83 -0
  205. package/dist/components/tools/suggest-for-intent.js.map +1 -0
  206. package/dist/components/tools/validate-composition.d.ts +9 -0
  207. package/dist/components/tools/validate-composition.d.ts.map +1 -0
  208. package/dist/components/tools/validate-composition.js +31 -0
  209. package/dist/components/tools/validate-composition.js.map +1 -0
  210. package/dist/components/validation/composition.d.ts +38 -0
  211. package/dist/components/validation/composition.d.ts.map +1 -0
  212. package/dist/components/validation/composition.js +135 -0
  213. package/dist/components/validation/composition.js.map +1 -0
  214. package/dist/editorial/calendar/ContentCalendarReport.d.ts +9 -0
  215. package/dist/editorial/calendar/ContentCalendarReport.d.ts.map +1 -0
  216. package/dist/editorial/calendar/ContentCalendarReport.js +47 -0
  217. package/dist/editorial/calendar/ContentCalendarReport.js.map +1 -0
  218. package/dist/editorial/calendar/ContentCalendarView.d.ts +3 -0
  219. package/dist/editorial/calendar/ContentCalendarView.d.ts.map +1 -0
  220. package/dist/editorial/calendar/ContentCalendarView.js +36 -0
  221. package/dist/editorial/calendar/ContentCalendarView.js.map +1 -0
  222. package/dist/editorial/calendar/calendar.d.ts +30 -0
  223. package/dist/editorial/calendar/calendar.d.ts.map +1 -0
  224. package/dist/editorial/calendar/calendar.js +23 -0
  225. package/dist/editorial/calendar/calendar.js.map +1 -0
  226. package/dist/editorial/calendar/find.d.ts +41 -0
  227. package/dist/editorial/calendar/find.d.ts.map +1 -0
  228. package/dist/editorial/calendar/find.js +108 -0
  229. package/dist/editorial/calendar/find.js.map +1 -0
  230. package/dist/editorial/calendar/month.d.ts +45 -0
  231. package/dist/editorial/calendar/month.d.ts.map +1 -0
  232. package/dist/editorial/calendar/month.js +120 -0
  233. package/dist/editorial/calendar/month.js.map +1 -0
  234. package/dist/editorial/calendar/tool.d.ts +50 -0
  235. package/dist/editorial/calendar/tool.d.ts.map +1 -0
  236. package/dist/editorial/calendar/tool.js +68 -0
  237. package/dist/editorial/calendar/tool.js.map +1 -0
  238. package/dist/editorial/config.d.ts +25 -0
  239. package/dist/editorial/config.d.ts.map +1 -0
  240. package/dist/editorial/config.js +12 -0
  241. package/dist/editorial/config.js.map +1 -0
  242. package/dist/editorial/health/ContentHealthReport.d.ts +7 -0
  243. package/dist/editorial/health/ContentHealthReport.d.ts.map +1 -0
  244. package/dist/editorial/health/ContentHealthReport.js +29 -0
  245. package/dist/editorial/health/ContentHealthReport.js.map +1 -0
  246. package/dist/editorial/health/ContentHealthView.d.ts +3 -0
  247. package/dist/editorial/health/ContentHealthView.d.ts.map +1 -0
  248. package/dist/editorial/health/ContentHealthView.js +29 -0
  249. package/dist/editorial/health/ContentHealthView.js.map +1 -0
  250. package/dist/editorial/health/HealthSummary.d.ts +6 -0
  251. package/dist/editorial/health/HealthSummary.d.ts.map +1 -0
  252. package/dist/editorial/health/HealthSummary.js +39 -0
  253. package/dist/editorial/health/HealthSummary.js.map +1 -0
  254. package/dist/editorial/health/checks.d.ts +104 -0
  255. package/dist/editorial/health/checks.d.ts.map +1 -0
  256. package/dist/editorial/health/checks.js +188 -0
  257. package/dist/editorial/health/checks.js.map +1 -0
  258. package/dist/editorial/health/find.d.ts +43 -0
  259. package/dist/editorial/health/find.d.ts.map +1 -0
  260. package/dist/editorial/health/find.js +97 -0
  261. package/dist/editorial/health/find.js.map +1 -0
  262. package/dist/editorial/health/tool.d.ts +53 -0
  263. package/dist/editorial/health/tool.d.ts.map +1 -0
  264. package/dist/editorial/health/tool.js +80 -0
  265. package/dist/editorial/health/tool.js.map +1 -0
  266. package/dist/editorial/index.d.ts +25 -0
  267. package/dist/editorial/index.d.ts.map +1 -0
  268. package/dist/editorial/index.js +15 -0
  269. package/dist/editorial/index.js.map +1 -0
  270. package/dist/editorial/palette/CommandPalette.d.ts +15 -0
  271. package/dist/editorial/palette/CommandPalette.d.ts.map +1 -0
  272. package/dist/editorial/palette/CommandPalette.js +319 -0
  273. package/dist/editorial/palette/CommandPalette.js.map +1 -0
  274. package/dist/editorial/palette/ReportsNav.d.ts +5 -0
  275. package/dist/editorial/palette/ReportsNav.d.ts.map +1 -0
  276. package/dist/editorial/palette/ReportsNav.js +31 -0
  277. package/dist/editorial/palette/ReportsNav.js.map +1 -0
  278. package/dist/editorial/palette/search.d.ts +18 -0
  279. package/dist/editorial/palette/search.d.ts.map +1 -0
  280. package/dist/editorial/palette/search.js +41 -0
  281. package/dist/editorial/palette/search.js.map +1 -0
  282. package/dist/editorial/palette/sources.d.ts +64 -0
  283. package/dist/editorial/palette/sources.d.ts.map +1 -0
  284. package/dist/editorial/palette/sources.js +103 -0
  285. package/dist/editorial/palette/sources.js.map +1 -0
  286. package/dist/editorial/palette/styles.d.ts +2 -0
  287. package/dist/editorial/palette/styles.d.ts.map +1 -0
  288. package/dist/editorial/palette/styles.js +76 -0
  289. package/dist/editorial/palette/styles.js.map +1 -0
  290. package/dist/editorial/palette/tool.d.ts +31 -0
  291. package/dist/editorial/palette/tool.d.ts.map +1 -0
  292. package/dist/editorial/palette/tool.js +63 -0
  293. package/dist/editorial/palette/tool.js.map +1 -0
  294. package/dist/editorial/plugin.d.ts +76 -0
  295. package/dist/editorial/plugin.d.ts.map +1 -0
  296. package/dist/editorial/plugin.js +186 -0
  297. package/dist/editorial/plugin.js.map +1 -0
  298. package/dist/editorial/relativeTime.d.ts +3 -0
  299. package/dist/editorial/relativeTime.d.ts.map +1 -0
  300. package/dist/editorial/relativeTime.js +27 -0
  301. package/dist/editorial/relativeTime.js.map +1 -0
  302. package/dist/editorial/styles.d.ts +2 -0
  303. package/dist/editorial/styles.d.ts.map +1 -0
  304. package/dist/editorial/styles.js +191 -0
  305. package/dist/editorial/styles.js.map +1 -0
  306. package/dist/editorial/work/YourWork.d.ts +13 -0
  307. package/dist/editorial/work/YourWork.d.ts.map +1 -0
  308. package/dist/editorial/work/YourWork.js +40 -0
  309. package/dist/editorial/work/YourWork.js.map +1 -0
  310. package/dist/editorial/work/tool.d.ts +45 -0
  311. package/dist/editorial/work/tool.d.ts.map +1 -0
  312. package/dist/editorial/work/tool.js +54 -0
  313. package/dist/editorial/work/tool.js.map +1 -0
  314. package/dist/editorial/work/work.d.ts +31 -0
  315. package/dist/editorial/work/work.d.ts.map +1 -0
  316. package/dist/editorial/work/work.js +68 -0
  317. package/dist/editorial/work/work.js.map +1 -0
  318. package/dist/email/client.d.ts +78 -0
  319. package/dist/email/client.d.ts.map +1 -0
  320. package/dist/email/client.js +63 -0
  321. package/dist/email/client.js.map +1 -0
  322. package/dist/email/functions/_shared.d.ts +17 -0
  323. package/dist/email/functions/_shared.d.ts.map +1 -0
  324. package/dist/email/functions/_shared.js +40 -0
  325. package/dist/email/functions/_shared.js.map +1 -0
  326. package/dist/email/functions/index.d.ts +7 -0
  327. package/dist/email/functions/index.d.ts.map +1 -0
  328. package/dist/email/functions/index.js +4 -0
  329. package/dist/email/functions/index.js.map +1 -0
  330. package/dist/email/functions/notify-approval-decision.d.ts +34 -0
  331. package/dist/email/functions/notify-approval-decision.d.ts.map +1 -0
  332. package/dist/email/functions/notify-approval-decision.js +77 -0
  333. package/dist/email/functions/notify-approval-decision.js.map +1 -0
  334. package/dist/email/functions/notify-approval-expired.d.ts +32 -0
  335. package/dist/email/functions/notify-approval-expired.d.ts.map +1 -0
  336. package/dist/email/functions/notify-approval-expired.js +54 -0
  337. package/dist/email/functions/notify-approval-expired.js.map +1 -0
  338. package/dist/email/functions/notify-approval-request.d.ts +35 -0
  339. package/dist/email/functions/notify-approval-request.d.ts.map +1 -0
  340. package/dist/email/functions/notify-approval-request.js +89 -0
  341. package/dist/email/functions/notify-approval-request.js.map +1 -0
  342. package/dist/email/index.d.ts +17 -0
  343. package/dist/email/index.d.ts.map +1 -0
  344. package/dist/email/index.js +12 -0
  345. package/dist/email/index.js.map +1 -0
  346. package/dist/email/options.d.ts +100 -0
  347. package/dist/email/options.d.ts.map +1 -0
  348. package/dist/email/options.js +55 -0
  349. package/dist/email/options.js.map +1 -0
  350. package/dist/email/plugin.d.ts +28 -0
  351. package/dist/email/plugin.d.ts.map +1 -0
  352. package/dist/email/plugin.js +113 -0
  353. package/dist/email/plugin.js.map +1 -0
  354. package/dist/email/templates/ApprovalDecision.d.ts +15 -0
  355. package/dist/email/templates/ApprovalDecision.d.ts.map +1 -0
  356. package/dist/email/templates/ApprovalDecision.js +56 -0
  357. package/dist/email/templates/ApprovalDecision.js.map +1 -0
  358. package/dist/email/templates/ApprovalExpired.d.ts +10 -0
  359. package/dist/email/templates/ApprovalExpired.d.ts.map +1 -0
  360. package/dist/email/templates/ApprovalExpired.js +8 -0
  361. package/dist/email/templates/ApprovalExpired.js.map +1 -0
  362. package/dist/email/templates/ApprovalRequest.d.ts +24 -0
  363. package/dist/email/templates/ApprovalRequest.d.ts.map +1 -0
  364. package/dist/email/templates/ApprovalRequest.js +58 -0
  365. package/dist/email/templates/ApprovalRequest.js.map +1 -0
  366. package/dist/email/templates/_layout.d.ts +17 -0
  367. package/dist/email/templates/_layout.d.ts.map +1 -0
  368. package/dist/email/templates/_layout.js +39 -0
  369. package/dist/email/templates/_layout.js.map +1 -0
  370. package/dist/email/templates/index.d.ts +9 -0
  371. package/dist/email/templates/index.d.ts.map +1 -0
  372. package/dist/email/templates/index.js +5 -0
  373. package/dist/email/templates/index.js.map +1 -0
  374. package/dist/email/tokens.d.ts +39 -0
  375. package/dist/email/tokens.d.ts.map +1 -0
  376. package/dist/email/tokens.js +17 -0
  377. package/dist/email/tokens.js.map +1 -0
  378. package/dist/env/index.d.ts +54 -0
  379. package/dist/env/index.d.ts.map +1 -0
  380. package/dist/env/index.js +113 -0
  381. package/dist/env/index.js.map +1 -0
  382. package/dist/events/inngest.d.ts +24 -0
  383. package/dist/events/inngest.d.ts.map +1 -0
  384. package/dist/events/inngest.js +24 -0
  385. package/dist/events/inngest.js.map +1 -0
  386. package/dist/events/taxonomy.d.ts +84 -0
  387. package/dist/events/taxonomy.d.ts.map +1 -0
  388. package/dist/events/taxonomy.js +10 -0
  389. package/dist/events/taxonomy.js.map +1 -0
  390. package/dist/events/vercel.d.ts +47 -0
  391. package/dist/events/vercel.d.ts.map +1 -0
  392. package/dist/events/vercel.js +69 -0
  393. package/dist/events/vercel.js.map +1 -0
  394. package/dist/exports/client.d.ts +24 -0
  395. package/dist/exports/client.d.ts.map +1 -0
  396. package/dist/exports/client.js +21 -0
  397. package/dist/exports/client.js.map +1 -0
  398. package/dist/exports/rsc.d.ts +17 -0
  399. package/dist/exports/rsc.d.ts.map +1 -0
  400. package/dist/exports/rsc.js +19 -0
  401. package/dist/exports/rsc.js.map +1 -0
  402. package/dist/fields/CharacterCountField.d.ts +4 -0
  403. package/dist/fields/CharacterCountField.d.ts.map +1 -0
  404. package/dist/fields/CharacterCountField.js +94 -0
  405. package/dist/fields/CharacterCountField.js.map +1 -0
  406. package/dist/fields/characterCount.d.ts +15 -0
  407. package/dist/fields/characterCount.d.ts.map +1 -0
  408. package/dist/fields/characterCount.js +92 -0
  409. package/dist/fields/characterCount.js.map +1 -0
  410. package/dist/fields/checkSlug.d.ts +62 -0
  411. package/dist/fields/checkSlug.d.ts.map +1 -0
  412. package/dist/fields/checkSlug.js +119 -0
  413. package/dist/fields/checkSlug.js.map +1 -0
  414. package/dist/fields/index.d.ts +9 -0
  415. package/dist/fields/index.d.ts.map +1 -0
  416. package/dist/fields/index.js +9 -0
  417. package/dist/fields/index.js.map +1 -0
  418. package/dist/fields/mapFields.d.ts +13 -0
  419. package/dist/fields/mapFields.d.ts.map +1 -0
  420. package/dist/fields/mapFields.js +32 -0
  421. package/dist/fields/mapFields.js.map +1 -0
  422. package/dist/fields/publishing.d.ts +33 -0
  423. package/dist/fields/publishing.d.ts.map +1 -0
  424. package/dist/fields/publishing.js +81 -0
  425. package/dist/fields/publishing.js.map +1 -0
  426. package/dist/fields/revisedAt.d.ts +15 -0
  427. package/dist/fields/revisedAt.d.ts.map +1 -0
  428. package/dist/fields/revisedAt.js +79 -0
  429. package/dist/fields/revisedAt.js.map +1 -0
  430. package/dist/fields/slug.d.ts +21 -0
  431. package/dist/fields/slug.d.ts.map +1 -0
  432. package/dist/fields/slug.js +102 -0
  433. package/dist/fields/slug.js.map +1 -0
  434. package/dist/fields/unlisted.d.ts +13 -0
  435. package/dist/fields/unlisted.d.ts.map +1 -0
  436. package/dist/fields/unlisted.js +35 -0
  437. package/dist/fields/unlisted.js.map +1 -0
  438. package/dist/fields/usedBy.d.ts +12 -0
  439. package/dist/fields/usedBy.d.ts.map +1 -0
  440. package/dist/fields/usedBy.js +36 -0
  441. package/dist/fields/usedBy.js.map +1 -0
  442. package/dist/index.d.ts +21 -0
  443. package/dist/index.d.ts.map +1 -0
  444. package/dist/index.js +18 -0
  445. package/dist/index.js.map +1 -0
  446. package/dist/integrations/admin/SyncButton.d.ts +27 -0
  447. package/dist/integrations/admin/SyncButton.d.ts.map +1 -0
  448. package/dist/integrations/admin/SyncButton.js +134 -0
  449. package/dist/integrations/admin/SyncButton.js.map +1 -0
  450. package/dist/integrations/admin/sync-client.d.ts +83 -0
  451. package/dist/integrations/admin/sync-client.d.ts.map +1 -0
  452. package/dist/integrations/admin/sync-client.js +121 -0
  453. package/dist/integrations/admin/sync-client.js.map +1 -0
  454. package/dist/integrations/collection.d.ts +26 -0
  455. package/dist/integrations/collection.d.ts.map +1 -0
  456. package/dist/integrations/collection.js +193 -0
  457. package/dist/integrations/collection.js.map +1 -0
  458. package/dist/integrations/endpoints/sync.d.ts +27 -0
  459. package/dist/integrations/endpoints/sync.d.ts.map +1 -0
  460. package/dist/integrations/endpoints/sync.js +90 -0
  461. package/dist/integrations/endpoints/sync.js.map +1 -0
  462. package/dist/integrations/index.d.ts +22 -0
  463. package/dist/integrations/index.d.ts.map +1 -0
  464. package/dist/integrations/index.js +15 -0
  465. package/dist/integrations/index.js.map +1 -0
  466. package/dist/integrations/integrations/index.d.ts +3 -0
  467. package/dist/integrations/integrations/index.d.ts.map +1 -0
  468. package/dist/integrations/integrations/index.js +2 -0
  469. package/dist/integrations/integrations/index.js.map +1 -0
  470. package/dist/integrations/integrations/webhook/config-fields.d.ts +33 -0
  471. package/dist/integrations/integrations/webhook/config-fields.d.ts.map +1 -0
  472. package/dist/integrations/integrations/webhook/config-fields.js +54 -0
  473. package/dist/integrations/integrations/webhook/config-fields.js.map +1 -0
  474. package/dist/integrations/integrations/webhook/functions.d.ts +24 -0
  475. package/dist/integrations/integrations/webhook/functions.d.ts.map +1 -0
  476. package/dist/integrations/integrations/webhook/functions.js +139 -0
  477. package/dist/integrations/integrations/webhook/functions.js.map +1 -0
  478. package/dist/integrations/integrations/webhook/healthcheck.d.ts +10 -0
  479. package/dist/integrations/integrations/webhook/healthcheck.d.ts.map +1 -0
  480. package/dist/integrations/integrations/webhook/healthcheck.js +26 -0
  481. package/dist/integrations/integrations/webhook/healthcheck.js.map +1 -0
  482. package/dist/integrations/integrations/webhook/hmac.d.ts +11 -0
  483. package/dist/integrations/integrations/webhook/hmac.d.ts.map +1 -0
  484. package/dist/integrations/integrations/webhook/hmac.js +25 -0
  485. package/dist/integrations/integrations/webhook/hmac.js.map +1 -0
  486. package/dist/integrations/integrations/webhook/index.d.ts +6 -0
  487. package/dist/integrations/integrations/webhook/index.d.ts.map +1 -0
  488. package/dist/integrations/integrations/webhook/index.js +47 -0
  489. package/dist/integrations/integrations/webhook/index.js.map +1 -0
  490. package/dist/integrations/integrations/webhook/payload.d.ts +9 -0
  491. package/dist/integrations/integrations/webhook/payload.d.ts.map +1 -0
  492. package/dist/integrations/integrations/webhook/payload.js +19 -0
  493. package/dist/integrations/integrations/webhook/payload.js.map +1 -0
  494. package/dist/integrations/jobs/healthcheck.d.ts +24 -0
  495. package/dist/integrations/jobs/healthcheck.d.ts.map +1 -0
  496. package/dist/integrations/jobs/healthcheck.js +133 -0
  497. package/dist/integrations/jobs/healthcheck.js.map +1 -0
  498. package/dist/integrations/options.d.ts +54 -0
  499. package/dist/integrations/options.d.ts.map +1 -0
  500. package/dist/integrations/options.js +8 -0
  501. package/dist/integrations/options.js.map +1 -0
  502. package/dist/integrations/plugin.d.ts +51 -0
  503. package/dist/integrations/plugin.d.ts.map +1 -0
  504. package/dist/integrations/plugin.js +215 -0
  505. package/dist/integrations/plugin.js.map +1 -0
  506. package/dist/integrations/registry.d.ts +27 -0
  507. package/dist/integrations/registry.d.ts.map +1 -0
  508. package/dist/integrations/registry.js +39 -0
  509. package/dist/integrations/registry.js.map +1 -0
  510. package/dist/integrations/sync/manual-sync.d.ts +70 -0
  511. package/dist/integrations/sync/manual-sync.d.ts.map +1 -0
  512. package/dist/integrations/sync/manual-sync.js +91 -0
  513. package/dist/integrations/sync/manual-sync.js.map +1 -0
  514. package/dist/integrations/sync/problems.d.ts +31 -0
  515. package/dist/integrations/sync/problems.d.ts.map +1 -0
  516. package/dist/integrations/sync/problems.js +40 -0
  517. package/dist/integrations/sync/problems.js.map +1 -0
  518. package/dist/integrations/sync/status.d.ts +15 -0
  519. package/dist/integrations/sync/status.d.ts.map +1 -0
  520. package/dist/integrations/sync/status.js +31 -0
  521. package/dist/integrations/sync/status.js.map +1 -0
  522. package/dist/integrations/tools/access.d.ts +5 -0
  523. package/dist/integrations/tools/access.d.ts.map +1 -0
  524. package/dist/integrations/tools/access.js +14 -0
  525. package/dist/integrations/tools/access.js.map +1 -0
  526. package/dist/integrations/tools/descriptors.d.ts +26 -0
  527. package/dist/integrations/tools/descriptors.d.ts.map +1 -0
  528. package/dist/integrations/tools/descriptors.js +35 -0
  529. package/dist/integrations/tools/descriptors.js.map +1 -0
  530. package/dist/integrations/tools/get-integration-status.d.ts +17 -0
  531. package/dist/integrations/tools/get-integration-status.d.ts.map +1 -0
  532. package/dist/integrations/tools/get-integration-status.js +41 -0
  533. package/dist/integrations/tools/get-integration-status.js.map +1 -0
  534. package/dist/integrations/tools/index.d.ts +13 -0
  535. package/dist/integrations/tools/index.d.ts.map +1 -0
  536. package/dist/integrations/tools/index.js +8 -0
  537. package/dist/integrations/tools/index.js.map +1 -0
  538. package/dist/integrations/tools/list-integration-types.d.ts +10 -0
  539. package/dist/integrations/tools/list-integration-types.d.ts.map +1 -0
  540. package/dist/integrations/tools/list-integration-types.js +22 -0
  541. package/dist/integrations/tools/list-integration-types.js.map +1 -0
  542. package/dist/integrations/tools/list-integrations.d.ts +20 -0
  543. package/dist/integrations/tools/list-integrations.d.ts.map +1 -0
  544. package/dist/integrations/tools/list-integrations.js +49 -0
  545. package/dist/integrations/tools/list-integrations.js.map +1 -0
  546. package/dist/integrations/tools/test-integration.d.ts +19 -0
  547. package/dist/integrations/tools/test-integration.d.ts.map +1 -0
  548. package/dist/integrations/tools/test-integration.js +51 -0
  549. package/dist/integrations/tools/test-integration.js.map +1 -0
  550. package/dist/integrations/tools/trigger-sync.d.ts +26 -0
  551. package/dist/integrations/tools/trigger-sync.d.ts.map +1 -0
  552. package/dist/integrations/tools/trigger-sync.js +44 -0
  553. package/dist/integrations/tools/trigger-sync.js.map +1 -0
  554. package/dist/integrations/types.d.ts +183 -0
  555. package/dist/integrations/types.d.ts.map +1 -0
  556. package/dist/integrations/types.js +2 -0
  557. package/dist/integrations/types.js.map +1 -0
  558. package/dist/jobs/define.d.ts +17 -0
  559. package/dist/jobs/define.d.ts.map +1 -0
  560. package/dist/jobs/define.js +39 -0
  561. package/dist/jobs/define.js.map +1 -0
  562. package/dist/jobs/failure-handler.d.ts +39 -0
  563. package/dist/jobs/failure-handler.d.ts.map +1 -0
  564. package/dist/jobs/failure-handler.js +62 -0
  565. package/dist/jobs/failure-handler.js.map +1 -0
  566. package/dist/jobs/index.d.ts +28 -0
  567. package/dist/jobs/index.d.ts.map +1 -0
  568. package/dist/jobs/index.js +7 -0
  569. package/dist/jobs/index.js.map +1 -0
  570. package/dist/jobs/inngest/adapter.d.ts +39 -0
  571. package/dist/jobs/inngest/adapter.d.ts.map +1 -0
  572. package/dist/jobs/inngest/adapter.js +81 -0
  573. package/dist/jobs/inngest/adapter.js.map +1 -0
  574. package/dist/jobs/inngest/index.d.ts +15 -0
  575. package/dist/jobs/inngest/index.d.ts.map +1 -0
  576. package/dist/jobs/inngest/index.js +13 -0
  577. package/dist/jobs/inngest/index.js.map +1 -0
  578. package/dist/jobs/options.d.ts +18 -0
  579. package/dist/jobs/options.d.ts.map +1 -0
  580. package/dist/jobs/options.js +12 -0
  581. package/dist/jobs/options.js.map +1 -0
  582. package/dist/jobs/payload/adapter.d.ts +33 -0
  583. package/dist/jobs/payload/adapter.d.ts.map +1 -0
  584. package/dist/jobs/payload/adapter.js +257 -0
  585. package/dist/jobs/payload/adapter.js.map +1 -0
  586. package/dist/jobs/payload/index.d.ts +8 -0
  587. package/dist/jobs/payload/index.d.ts.map +1 -0
  588. package/dist/jobs/payload/index.js +7 -0
  589. package/dist/jobs/payload/index.js.map +1 -0
  590. package/dist/jobs/sender.d.ts +4 -0
  591. package/dist/jobs/sender.d.ts.map +1 -0
  592. package/dist/jobs/sender.js +19 -0
  593. package/dist/jobs/sender.js.map +1 -0
  594. package/dist/jobs/types.d.ts +105 -0
  595. package/dist/jobs/types.d.ts.map +1 -0
  596. package/dist/jobs/types.js +2 -0
  597. package/dist/jobs/types.js.map +1 -0
  598. package/dist/jobs/workflow-types.d.ts +280 -0
  599. package/dist/jobs/workflow-types.d.ts.map +1 -0
  600. package/dist/jobs/workflow-types.js +22 -0
  601. package/dist/jobs/workflow-types.js.map +1 -0
  602. package/dist/logger/index.d.ts +9 -0
  603. package/dist/logger/index.d.ts.map +1 -0
  604. package/dist/logger/index.js +41 -0
  605. package/dist/logger/index.js.map +1 -0
  606. package/dist/mcp/api-key-access.d.ts +50 -0
  607. package/dist/mcp/api-key-access.d.ts.map +1 -0
  608. package/dist/mcp/api-key-access.js +94 -0
  609. package/dist/mcp/api-key-access.js.map +1 -0
  610. package/dist/mcp/audit-context.d.ts +39 -0
  611. package/dist/mcp/audit-context.d.ts.map +1 -0
  612. package/dist/mcp/audit-context.js +36 -0
  613. package/dist/mcp/audit-context.js.map +1 -0
  614. package/dist/mcp/audit-server.d.ts +13 -0
  615. package/dist/mcp/audit-server.d.ts.map +1 -0
  616. package/dist/mcp/audit-server.js +68 -0
  617. package/dist/mcp/audit-server.js.map +1 -0
  618. package/dist/mcp/collector.d.ts +51 -0
  619. package/dist/mcp/collector.d.ts.map +1 -0
  620. package/dist/mcp/collector.js +96 -0
  621. package/dist/mcp/collector.js.map +1 -0
  622. package/dist/mcp/envelope.d.ts +22 -0
  623. package/dist/mcp/envelope.d.ts.map +1 -0
  624. package/dist/mcp/envelope.js +22 -0
  625. package/dist/mcp/envelope.js.map +1 -0
  626. package/dist/mcp/index.d.ts +12 -0
  627. package/dist/mcp/index.d.ts.map +1 -0
  628. package/dist/mcp/index.js +8 -0
  629. package/dist/mcp/index.js.map +1 -0
  630. package/dist/mcp/meta.d.ts +74 -0
  631. package/dist/mcp/meta.d.ts.map +1 -0
  632. package/dist/mcp/meta.js +27 -0
  633. package/dist/mcp/meta.js.map +1 -0
  634. package/dist/mcp/payload-mcp.d.ts +68 -0
  635. package/dist/mcp/payload-mcp.d.ts.map +1 -0
  636. package/dist/mcp/payload-mcp.js +175 -0
  637. package/dist/mcp/payload-mcp.js.map +1 -0
  638. package/dist/media/hooks.d.ts +70 -0
  639. package/dist/media/hooks.d.ts.map +1 -0
  640. package/dist/media/hooks.js +200 -0
  641. package/dist/media/hooks.js.map +1 -0
  642. package/dist/media/index.d.ts +8 -0
  643. package/dist/media/index.d.ts.map +1 -0
  644. package/dist/media/index.js +7 -0
  645. package/dist/media/index.js.map +1 -0
  646. package/dist/media/svg.d.ts +17 -0
  647. package/dist/media/svg.d.ts.map +1 -0
  648. package/dist/media/svg.js +241 -0
  649. package/dist/media/svg.js.map +1 -0
  650. package/dist/media/uploadKey.d.ts +25 -0
  651. package/dist/media/uploadKey.d.ts.map +1 -0
  652. package/dist/media/uploadKey.js +70 -0
  653. package/dist/media/uploadKey.js.map +1 -0
  654. package/dist/observability/collection.d.ts +13 -0
  655. package/dist/observability/collection.d.ts.map +1 -0
  656. package/dist/observability/collection.js +76 -0
  657. package/dist/observability/collection.js.map +1 -0
  658. package/dist/observability/index.d.ts +10 -0
  659. package/dist/observability/index.d.ts.map +1 -0
  660. package/dist/observability/index.js +6 -0
  661. package/dist/observability/index.js.map +1 -0
  662. package/dist/observability/plugin.d.ts +24 -0
  663. package/dist/observability/plugin.d.ts.map +1 -0
  664. package/dist/observability/plugin.js +59 -0
  665. package/dist/observability/plugin.js.map +1 -0
  666. package/dist/observability/report.d.ts +175 -0
  667. package/dist/observability/report.d.ts.map +1 -0
  668. package/dist/observability/report.js +274 -0
  669. package/dist/observability/report.js.map +1 -0
  670. package/dist/observability/tool.d.ts +33 -0
  671. package/dist/observability/tool.d.ts.map +1 -0
  672. package/dist/observability/tool.js +75 -0
  673. package/dist/observability/tool.js.map +1 -0
  674. package/dist/observability/writer.d.ts +24 -0
  675. package/dist/observability/writer.d.ts.map +1 -0
  676. package/dist/observability/writer.js +72 -0
  677. package/dist/observability/writer.js.map +1 -0
  678. package/dist/plugin-contract/admin.d.ts +45 -0
  679. package/dist/plugin-contract/admin.d.ts.map +1 -0
  680. package/dist/plugin-contract/admin.js +12 -0
  681. package/dist/plugin-contract/admin.js.map +1 -0
  682. package/dist/plugin-contract/env.d.ts +29 -0
  683. package/dist/plugin-contract/env.d.ts.map +1 -0
  684. package/dist/plugin-contract/env.js +2 -0
  685. package/dist/plugin-contract/env.js.map +1 -0
  686. package/dist/plugin-contract/index.d.ts +39 -0
  687. package/dist/plugin-contract/index.d.ts.map +1 -0
  688. package/dist/plugin-contract/index.js +5 -0
  689. package/dist/plugin-contract/index.js.map +1 -0
  690. package/dist/plugin-contract/mcp.d.ts +51 -0
  691. package/dist/plugin-contract/mcp.d.ts.map +1 -0
  692. package/dist/plugin-contract/mcp.js +2 -0
  693. package/dist/plugin-contract/mcp.js.map +1 -0
  694. package/dist/plugin-contract/registry.d.ts +23 -0
  695. package/dist/plugin-contract/registry.d.ts.map +1 -0
  696. package/dist/plugin-contract/registry.js +51 -0
  697. package/dist/plugin-contract/registry.js.map +1 -0
  698. package/dist/publishing/admin/PublishButton.d.ts +22 -0
  699. package/dist/publishing/admin/PublishButton.d.ts.map +1 -0
  700. package/dist/publishing/admin/PublishButton.js +164 -0
  701. package/dist/publishing/admin/PublishButton.js.map +1 -0
  702. package/dist/publishing/admin/SchedulePublishField.d.ts +24 -0
  703. package/dist/publishing/admin/SchedulePublishField.d.ts.map +1 -0
  704. package/dist/publishing/admin/SchedulePublishField.js +160 -0
  705. package/dist/publishing/admin/SchedulePublishField.js.map +1 -0
  706. package/dist/publishing/admin/UnpublishButton.d.ts +15 -0
  707. package/dist/publishing/admin/UnpublishButton.d.ts.map +1 -0
  708. package/dist/publishing/admin/UnpublishButton.js +90 -0
  709. package/dist/publishing/admin/UnpublishButton.js.map +1 -0
  710. package/dist/publishing/admin/publishing-client.d.ts +105 -0
  711. package/dist/publishing/admin/publishing-client.d.ts.map +1 -0
  712. package/dist/publishing/admin/publishing-client.js +139 -0
  713. package/dist/publishing/admin/publishing-client.js.map +1 -0
  714. package/dist/publishing/admin/schedule-state.d.ts +30 -0
  715. package/dist/publishing/admin/schedule-state.d.ts.map +1 -0
  716. package/dist/publishing/admin/schedule-state.js +39 -0
  717. package/dist/publishing/admin/schedule-state.js.map +1 -0
  718. package/dist/publishing/checks/alt-text.d.ts +17 -0
  719. package/dist/publishing/checks/alt-text.d.ts.map +1 -0
  720. package/dist/publishing/checks/alt-text.js +63 -0
  721. package/dist/publishing/checks/alt-text.js.map +1 -0
  722. package/dist/publishing/checks/heading-hierarchy.d.ts +11 -0
  723. package/dist/publishing/checks/heading-hierarchy.d.ts.map +1 -0
  724. package/dist/publishing/checks/heading-hierarchy.js +32 -0
  725. package/dist/publishing/checks/heading-hierarchy.js.map +1 -0
  726. package/dist/publishing/checks/index.d.ts +6 -0
  727. package/dist/publishing/checks/index.d.ts.map +1 -0
  728. package/dist/publishing/checks/index.js +13 -0
  729. package/dist/publishing/checks/index.js.map +1 -0
  730. package/dist/publishing/checks/link-labels.d.ts +9 -0
  731. package/dist/publishing/checks/link-labels.d.ts.map +1 -0
  732. package/dist/publishing/checks/link-labels.js +44 -0
  733. package/dist/publishing/checks/link-labels.js.map +1 -0
  734. package/dist/publishing/endpoints/admin.d.ts +19 -0
  735. package/dist/publishing/endpoints/admin.d.ts.map +1 -0
  736. package/dist/publishing/endpoints/admin.js +112 -0
  737. package/dist/publishing/endpoints/admin.js.map +1 -0
  738. package/dist/publishing/events.d.ts +16 -0
  739. package/dist/publishing/events.d.ts.map +1 -0
  740. package/dist/publishing/events.js +30 -0
  741. package/dist/publishing/events.js.map +1 -0
  742. package/dist/publishing/hooks/block-status-writes.d.ts +52 -0
  743. package/dist/publishing/hooks/block-status-writes.d.ts.map +1 -0
  744. package/dist/publishing/hooks/block-status-writes.js +242 -0
  745. package/dist/publishing/hooks/block-status-writes.js.map +1 -0
  746. package/dist/publishing/hooks/draft-writes.d.ts +32 -0
  747. package/dist/publishing/hooks/draft-writes.d.ts.map +1 -0
  748. package/dist/publishing/hooks/draft-writes.js +76 -0
  749. package/dist/publishing/hooks/draft-writes.js.map +1 -0
  750. package/dist/publishing/hooks/schedule-events.d.ts +26 -0
  751. package/dist/publishing/hooks/schedule-events.d.ts.map +1 -0
  752. package/dist/publishing/hooks/schedule-events.js +54 -0
  753. package/dist/publishing/hooks/schedule-events.js.map +1 -0
  754. package/dist/publishing/index.d.ts +35 -0
  755. package/dist/publishing/index.d.ts.map +1 -0
  756. package/dist/publishing/index.js +32 -0
  757. package/dist/publishing/index.js.map +1 -0
  758. package/dist/publishing/jobs/execute-scheduled-publishes.d.ts +24 -0
  759. package/dist/publishing/jobs/execute-scheduled-publishes.d.ts.map +1 -0
  760. package/dist/publishing/jobs/execute-scheduled-publishes.js +114 -0
  761. package/dist/publishing/jobs/execute-scheduled-publishes.js.map +1 -0
  762. package/dist/publishing/jobs/next-revalidate.d.ts +43 -0
  763. package/dist/publishing/jobs/next-revalidate.d.ts.map +1 -0
  764. package/dist/publishing/jobs/next-revalidate.js +42 -0
  765. package/dist/publishing/jobs/next-revalidate.js.map +1 -0
  766. package/dist/publishing/jobs/publish-at-scheduled-time.d.ts +24 -0
  767. package/dist/publishing/jobs/publish-at-scheduled-time.d.ts.map +1 -0
  768. package/dist/publishing/jobs/publish-at-scheduled-time.js +136 -0
  769. package/dist/publishing/jobs/publish-at-scheduled-time.js.map +1 -0
  770. package/dist/publishing/jobs/revalidate-on-publish.d.ts +24 -0
  771. package/dist/publishing/jobs/revalidate-on-publish.d.ts.map +1 -0
  772. package/dist/publishing/jobs/revalidate-on-publish.js +78 -0
  773. package/dist/publishing/jobs/revalidate-on-publish.js.map +1 -0
  774. package/dist/publishing/jobs/revalidate-tag-hooks.d.ts +80 -0
  775. package/dist/publishing/jobs/revalidate-tag-hooks.d.ts.map +1 -0
  776. package/dist/publishing/jobs/revalidate-tag-hooks.js +116 -0
  777. package/dist/publishing/jobs/revalidate-tag-hooks.js.map +1 -0
  778. package/dist/publishing/options.d.ts +100 -0
  779. package/dist/publishing/options.d.ts.map +1 -0
  780. package/dist/publishing/options.js +56 -0
  781. package/dist/publishing/options.js.map +1 -0
  782. package/dist/publishing/pipeline/index.d.ts +20 -0
  783. package/dist/publishing/pipeline/index.d.ts.map +1 -0
  784. package/dist/publishing/pipeline/index.js +88 -0
  785. package/dist/publishing/pipeline/index.js.map +1 -0
  786. package/dist/publishing/pipeline/steps/accessibility.d.ts +13 -0
  787. package/dist/publishing/pipeline/steps/accessibility.d.ts.map +1 -0
  788. package/dist/publishing/pipeline/steps/accessibility.js +37 -0
  789. package/dist/publishing/pipeline/steps/accessibility.js.map +1 -0
  790. package/dist/publishing/pipeline/steps/approval.d.ts +14 -0
  791. package/dist/publishing/pipeline/steps/approval.d.ts.map +1 -0
  792. package/dist/publishing/pipeline/steps/approval.js +54 -0
  793. package/dist/publishing/pipeline/steps/approval.js.map +1 -0
  794. package/dist/publishing/pipeline/steps/composition.d.ts +14 -0
  795. package/dist/publishing/pipeline/steps/composition.d.ts.map +1 -0
  796. package/dist/publishing/pipeline/steps/composition.js +63 -0
  797. package/dist/publishing/pipeline/steps/composition.js.map +1 -0
  798. package/dist/publishing/pipeline/steps/embargo.d.ts +12 -0
  799. package/dist/publishing/pipeline/steps/embargo.d.ts.map +1 -0
  800. package/dist/publishing/pipeline/steps/embargo.js +41 -0
  801. package/dist/publishing/pipeline/steps/embargo.js.map +1 -0
  802. package/dist/publishing/pipeline/steps/execute.d.ts +52 -0
  803. package/dist/publishing/pipeline/steps/execute.d.ts.map +1 -0
  804. package/dist/publishing/pipeline/steps/execute.js +161 -0
  805. package/dist/publishing/pipeline/steps/execute.js.map +1 -0
  806. package/dist/publishing/pipeline/steps/exist.d.ts +9 -0
  807. package/dist/publishing/pipeline/steps/exist.d.ts.map +1 -0
  808. package/dist/publishing/pipeline/steps/exist.js +31 -0
  809. package/dist/publishing/pipeline/steps/exist.js.map +1 -0
  810. package/dist/publishing/pipeline/steps/required-fields.d.ts +9 -0
  811. package/dist/publishing/pipeline/steps/required-fields.d.ts.map +1 -0
  812. package/dist/publishing/pipeline/steps/required-fields.js +63 -0
  813. package/dist/publishing/pipeline/steps/required-fields.js.map +1 -0
  814. package/dist/publishing/pipeline/types.d.ts +72 -0
  815. package/dist/publishing/pipeline/types.d.ts.map +1 -0
  816. package/dist/publishing/pipeline/types.js +2 -0
  817. package/dist/publishing/pipeline/types.js.map +1 -0
  818. package/dist/publishing/plugin.d.ts +4 -0
  819. package/dist/publishing/plugin.d.ts.map +1 -0
  820. package/dist/publishing/plugin.js +196 -0
  821. package/dist/publishing/plugin.js.map +1 -0
  822. package/dist/publishing/service.d.ts +149 -0
  823. package/dist/publishing/service.d.ts.map +1 -0
  824. package/dist/publishing/service.js +474 -0
  825. package/dist/publishing/service.js.map +1 -0
  826. package/dist/publishing/tools/actor.d.ts +32 -0
  827. package/dist/publishing/tools/actor.d.ts.map +1 -0
  828. package/dist/publishing/tools/actor.js +40 -0
  829. package/dist/publishing/tools/actor.js.map +1 -0
  830. package/dist/publishing/tools/descriptors.d.ts +26 -0
  831. package/dist/publishing/tools/descriptors.d.ts.map +1 -0
  832. package/dist/publishing/tools/descriptors.js +38 -0
  833. package/dist/publishing/tools/descriptors.js.map +1 -0
  834. package/dist/publishing/tools/get-publish-status.d.ts +12 -0
  835. package/dist/publishing/tools/get-publish-status.d.ts.map +1 -0
  836. package/dist/publishing/tools/get-publish-status.js +45 -0
  837. package/dist/publishing/tools/get-publish-status.js.map +1 -0
  838. package/dist/publishing/tools/index.d.ts +7 -0
  839. package/dist/publishing/tools/index.d.ts.map +1 -0
  840. package/dist/publishing/tools/index.js +7 -0
  841. package/dist/publishing/tools/index.js.map +1 -0
  842. package/dist/publishing/tools/publish.d.ts +14 -0
  843. package/dist/publishing/tools/publish.d.ts.map +1 -0
  844. package/dist/publishing/tools/publish.js +35 -0
  845. package/dist/publishing/tools/publish.js.map +1 -0
  846. package/dist/publishing/tools/rollback.d.ts +11 -0
  847. package/dist/publishing/tools/rollback.d.ts.map +1 -0
  848. package/dist/publishing/tools/rollback.js +98 -0
  849. package/dist/publishing/tools/rollback.js.map +1 -0
  850. package/dist/publishing/tools/schedule-publish.d.ts +20 -0
  851. package/dist/publishing/tools/schedule-publish.d.ts.map +1 -0
  852. package/dist/publishing/tools/schedule-publish.js +49 -0
  853. package/dist/publishing/tools/schedule-publish.js.map +1 -0
  854. package/dist/publishing/tools/unpublish.d.ts +14 -0
  855. package/dist/publishing/tools/unpublish.d.ts.map +1 -0
  856. package/dist/publishing/tools/unpublish.js +29 -0
  857. package/dist/publishing/tools/unpublish.js.map +1 -0
  858. package/dist/references/UsedOnPanel.d.ts +3 -0
  859. package/dist/references/UsedOnPanel.d.ts.map +1 -0
  860. package/dist/references/UsedOnPanel.js +47 -0
  861. package/dist/references/UsedOnPanel.js.map +1 -0
  862. package/dist/references/find.d.ts +46 -0
  863. package/dist/references/find.d.ts.map +1 -0
  864. package/dist/references/find.js +142 -0
  865. package/dist/references/find.js.map +1 -0
  866. package/dist/references/guards.d.ts +32 -0
  867. package/dist/references/guards.d.ts.map +1 -0
  868. package/dist/references/guards.js +76 -0
  869. package/dist/references/guards.js.map +1 -0
  870. package/dist/references/index.d.ts +11 -0
  871. package/dist/references/index.d.ts.map +1 -0
  872. package/dist/references/index.js +6 -0
  873. package/dist/references/index.js.map +1 -0
  874. package/dist/references/plugin.d.ts +51 -0
  875. package/dist/references/plugin.d.ts.map +1 -0
  876. package/dist/references/plugin.js +111 -0
  877. package/dist/references/plugin.js.map +1 -0
  878. package/dist/references/tools.d.ts +54 -0
  879. package/dist/references/tools.d.ts.map +1 -0
  880. package/dist/references/tools.js +124 -0
  881. package/dist/references/tools.js.map +1 -0
  882. package/dist/references/walk.d.ts +43 -0
  883. package/dist/references/walk.d.ts.map +1 -0
  884. package/dist/references/walk.js +214 -0
  885. package/dist/references/walk.js.map +1 -0
  886. package/dist/testing/anonymousAccess.d.ts +111 -0
  887. package/dist/testing/anonymousAccess.d.ts.map +1 -0
  888. package/dist/testing/anonymousAccess.js +185 -0
  889. package/dist/testing/anonymousAccess.js.map +1 -0
  890. package/dist/testing/describeAnonymousAccess.d.ts +26 -0
  891. package/dist/testing/describeAnonymousAccess.d.ts.map +1 -0
  892. package/dist/testing/describeAnonymousAccess.js +76 -0
  893. package/dist/testing/describeAnonymousAccess.js.map +1 -0
  894. package/dist/testing/index.d.ts +11 -0
  895. package/dist/testing/index.d.ts.map +1 -0
  896. package/dist/testing/index.js +9 -0
  897. package/dist/testing/index.js.map +1 -0
  898. package/dist/utils/content-hash.d.ts +31 -0
  899. package/dist/utils/content-hash.d.ts.map +1 -0
  900. package/dist/utils/content-hash.js +94 -0
  901. package/dist/utils/content-hash.js.map +1 -0
  902. package/dist/utils/index.d.ts +6 -0
  903. package/dist/utils/index.d.ts.map +1 -0
  904. package/dist/utils/index.js +5 -0
  905. package/dist/utils/index.js.map +1 -0
  906. package/dist/utils/relationships.d.ts +17 -0
  907. package/dist/utils/relationships.d.ts.map +1 -0
  908. package/dist/utils/relationships.js +26 -0
  909. package/dist/utils/relationships.js.map +1 -0
  910. package/dist/utils/sha256.d.ts +10 -0
  911. package/dist/utils/sha256.d.ts.map +1 -0
  912. package/dist/utils/sha256.js +16 -0
  913. package/dist/utils/sha256.js.map +1 -0
  914. package/dist/utils/zod-issues.d.ts +19 -0
  915. package/dist/utils/zod-issues.d.ts.map +1 -0
  916. package/dist/utils/zod-issues.js +22 -0
  917. package/dist/utils/zod-issues.js.map +1 -0
  918. package/package.json +180 -3
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ import { auditContext } from '../../mcp/audit-context.js';
3
+ import { withMeta } from '../../mcp/meta.js';
4
+ import { validateComposition } from '../validation/composition.js';
5
+ import { COMPONENTS_TOOLS } from './descriptors.js';
6
+ export function createValidateCompositionTool(deps) {
7
+ const inputSchema = withMeta({
8
+ blocks: z
9
+ .array(z.object({
10
+ type: z.string(),
11
+ variant: z.string().optional(),
12
+ }))
13
+ .min(1),
14
+ });
15
+ return {
16
+ ...COMPONENTS_TOOLS.validateComposition,
17
+ inputSchema,
18
+ handler: async (input, ctx) => {
19
+ const manifest = await deps.loader.get();
20
+ const result = validateComposition({ blocks: input.blocks }, manifest);
21
+ await deps.auditWriter({
22
+ ...auditContext(ctx, input._meta),
23
+ action: 'design.validate',
24
+ mcpServer: 'component',
25
+ mcpTool: 'validate_composition',
26
+ });
27
+ return result;
28
+ },
29
+ };
30
+ }
31
+ //# sourceMappingURL=validate-composition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-composition.js","sourceRoot":"","sources":["../../../src/components/tools/validate-composition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAOnD,MAAM,UAAU,6BAA6B,CAAC,IAA6B;IACzE,MAAM,WAAW,GAAG,QAAQ,CAAC;QAC3B,MAAM,EAAE,CAAC;aACN,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;YACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;YAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC/B,CAAC,CACH;aACA,GAAG,CAAC,CAAC,CAAC;KACV,CAAC,CAAA;IAEF,OAAO;QACL,GAAG,gBAAgB,CAAC,mBAAmB;QACvC,WAAW;QACX,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAA;YACxC,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAA;YAEtE,MAAM,IAAI,CAAC,WAAW,CAAC;gBACrB,GAAG,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC;gBACjC,MAAM,EAAE,iBAAiB;gBACzB,SAAS,EAAE,WAAW;gBACtB,OAAO,EAAE,sBAAsB;aAChC,CAAC,CAAA;YAEF,OAAO,MAAM,CAAA;QACf,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { LoadedManifest } from '@forumone/throughline-design-contract';
2
+ export interface CompositionBlock {
3
+ type: string;
4
+ variant?: string;
5
+ }
6
+ export interface CompositionInput {
7
+ blocks: CompositionBlock[];
8
+ }
9
+ export interface CompositionIssue {
10
+ severity: 'error' | 'warning';
11
+ rule: string;
12
+ message: string;
13
+ blockIndex?: number;
14
+ }
15
+ export interface CompositionResult {
16
+ valid: boolean;
17
+ issues: CompositionIssue[];
18
+ }
19
+ export interface AntiPatternMatch {
20
+ pattern: string;
21
+ why: string;
22
+ useInstead?: string | undefined;
23
+ blockIndex: number;
24
+ }
25
+ /**
26
+ * Validates a proposed page layout against the design system's composition
27
+ * rules: forbiddenAdjacent, maxPerPage, requiredSiblings, unknown components,
28
+ * unknown variants. Errors block; warnings advise.
29
+ */
30
+ export declare function validateComposition(input: CompositionInput, manifest: LoadedManifest): CompositionResult;
31
+ /**
32
+ * Surfaces structural anti-patterns inferred from each component's
33
+ * `antiExamples` plus position-aware heuristics. The current rule set is
34
+ * intentionally small and explicit; new rules should be added with care
35
+ * since false positives are worse than missed detections here.
36
+ */
37
+ export declare function findAntiPatterns(input: CompositionInput, manifest: LoadedManifest): AntiPatternMatch[];
38
+ //# sourceMappingURL=composition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../src/components/validation/composition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AAE3E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,gBAAgB,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,gBAAgB,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,cAAc,GACvB,iBAAiB,CA+EnB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,cAAc,GACvB,gBAAgB,EAAE,CAmDpB"}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Validates a proposed page layout against the design system's composition
3
+ * rules: forbiddenAdjacent, maxPerPage, requiredSiblings, unknown components,
4
+ * unknown variants. Errors block; warnings advise.
5
+ */
6
+ export function validateComposition(input, manifest) {
7
+ const issues = [];
8
+ const counts = new Map();
9
+ for (let i = 0; i < input.blocks.length; i++) {
10
+ const block = input.blocks[i];
11
+ if (!block)
12
+ continue;
13
+ counts.set(block.type, (counts.get(block.type) ?? 0) + 1);
14
+ const contract = manifest.getComponent(block.type);
15
+ if (!contract) {
16
+ issues.push({
17
+ severity: 'error',
18
+ rule: 'unknown-component',
19
+ message: `Unknown component "${block.type}". Not present in the design system.`,
20
+ blockIndex: i,
21
+ });
22
+ continue;
23
+ }
24
+ if (block.variant && contract.content.variants) {
25
+ const has = contract.content.variants.some((v) => v.name === block.variant);
26
+ if (!has) {
27
+ issues.push({
28
+ severity: 'error',
29
+ rule: 'unknown-variant',
30
+ message: `Component "${block.type}" does not have variant "${block.variant}"`,
31
+ blockIndex: i,
32
+ });
33
+ }
34
+ }
35
+ const prev = i > 0 ? input.blocks[i - 1] : undefined;
36
+ const next = i < input.blocks.length - 1 ? input.blocks[i + 1] : undefined;
37
+ for (const forbidden of contract.composition.forbiddenAdjacent) {
38
+ if (prev?.type === forbidden) {
39
+ issues.push({
40
+ severity: 'error',
41
+ rule: 'forbidden-adjacent',
42
+ message: `"${block.type}" cannot appear directly after "${forbidden}"`,
43
+ blockIndex: i,
44
+ });
45
+ }
46
+ if (next?.type === forbidden) {
47
+ issues.push({
48
+ severity: 'error',
49
+ rule: 'forbidden-adjacent',
50
+ message: `"${block.type}" cannot appear directly before "${forbidden}"`,
51
+ blockIndex: i,
52
+ });
53
+ }
54
+ }
55
+ }
56
+ for (const [type, count] of counts) {
57
+ const contract = manifest.getComponent(type);
58
+ if (!contract)
59
+ continue;
60
+ const max = contract.composition.maxPerPage;
61
+ if (max !== null && count > max) {
62
+ issues.push({
63
+ severity: 'error',
64
+ rule: 'max-per-page',
65
+ message: `Component "${type}" appears ${count} times but the maximum allowed is ${max}`,
66
+ });
67
+ }
68
+ for (const required of contract.composition.requiredSiblings) {
69
+ if (!counts.has(required)) {
70
+ issues.push({
71
+ severity: 'warning',
72
+ rule: 'required-sibling-missing',
73
+ message: `Component "${type}" expects a sibling "${required}" but none is present`,
74
+ });
75
+ }
76
+ }
77
+ }
78
+ return { valid: issues.every((issue) => issue.severity !== 'error'), issues };
79
+ }
80
+ /**
81
+ * Surfaces structural anti-patterns inferred from each component's
82
+ * `antiExamples` plus position-aware heuristics. The current rule set is
83
+ * intentionally small and explicit; new rules should be added with care
84
+ * since false positives are worse than missed detections here.
85
+ */
86
+ export function findAntiPatterns(input, manifest) {
87
+ const matches = [];
88
+ const counts = new Map();
89
+ for (const block of input.blocks) {
90
+ counts.set(block.type, (counts.get(block.type) ?? 0) + 1);
91
+ }
92
+ for (let i = 0; i < input.blocks.length; i++) {
93
+ const block = input.blocks[i];
94
+ if (!block)
95
+ continue;
96
+ const contract = manifest.getComponent(block.type);
97
+ if (!contract)
98
+ continue;
99
+ const isLast = i === input.blocks.length - 1;
100
+ for (const anti of contract.antiExamples) {
101
+ const labelLower = anti.label.toLowerCase();
102
+ const isMultiplePattern = labelLower.includes('multiple') || labelLower.includes('two') || labelLower.includes('stacked');
103
+ if (isMultiplePattern && (counts.get(block.type) ?? 0) > 1) {
104
+ matches.push({
105
+ pattern: anti.label,
106
+ why: anti.why,
107
+ useInstead: anti.useInstead,
108
+ blockIndex: i,
109
+ });
110
+ continue;
111
+ }
112
+ const isEndOfPagePattern = labelLower.includes('end of') ||
113
+ labelLower.includes('bottom') ||
114
+ labelLower.includes('closer');
115
+ if (isEndOfPagePattern && isLast && contract.composition.placement.includes('page')) {
116
+ matches.push({
117
+ pattern: anti.label,
118
+ why: anti.why,
119
+ useInstead: anti.useInstead,
120
+ blockIndex: i,
121
+ });
122
+ }
123
+ }
124
+ }
125
+ // De-duplicate (same blockIndex + pattern can fire twice if both branches match)
126
+ const seen = new Set();
127
+ return matches.filter((m) => {
128
+ const key = `${m.blockIndex}:${m.pattern}`;
129
+ if (seen.has(key))
130
+ return false;
131
+ seen.add(key);
132
+ return true;
133
+ });
134
+ }
135
+ //# sourceMappingURL=composition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition.js","sourceRoot":"","sources":["../../../src/components/validation/composition.ts"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAuB,EACvB,QAAwB;IAExB,MAAM,MAAM,GAAuB,EAAE,CAAA;IACrC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAA;IAExC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,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;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,iFAAiF;IACjF,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAA;IAC9B,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;QAC1B,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,OAAO,EAAE,CAAA;QAC1C,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAA;QAC/B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACb,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { type CalendarMonth } from './calendar.js';
2
+ export declare function ContentCalendarReport({ calendar, view, here, adminRoute, }: {
3
+ calendar: CalendarMonth;
4
+ view: 'grid' | 'list';
5
+ /** The view's own URL, for month and view links. */
6
+ here: string;
7
+ adminRoute: string;
8
+ }): import("react").JSX.Element;
9
+ //# sourceMappingURL=ContentCalendarReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentCalendarReport.d.ts","sourceRoot":"","sources":["../../../src/editorial/calendar/ContentCalendarReport.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,eAAe,CAAA;AAyB/D,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,UAAU,GACX,EAAE;IACD,QAAQ,EAAE,aAAa,CAAA;IACvB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,+BA0HA"}
@@ -0,0 +1,47 @@
1
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { EditorialStyles } from '../health/ContentHealthReport.js';
3
+ import { daysInMonth } from './calendar.js';
4
+ import { dayTitle, monthParam, monthTitle, shiftMonth } from './month.js';
5
+ /*
6
+ The content calendar, as markup. Pure: it takes a month already read and
7
+ renders it, so the parity test can render exactly what an editor sees from
8
+ exactly the items the tool returns. From forumone-2026's
9
+ `admin/ContentCalendar.tsx` (#761 there).
10
+
11
+ A grid, or `?view=list` for the same month as an agenda, which reads better on a
12
+ phone and with a screen reader. Kinds differ by border style as well as colour.
13
+ */
14
+ const KIND_LABEL = {
15
+ scheduled: 'Scheduled',
16
+ published: 'Published',
17
+ event: 'Event',
18
+ };
19
+ /** Items drawn in one grid cell before the rest collapse into "+N more". */
20
+ const PER_CELL = 4;
21
+ const WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
22
+ export function ContentCalendarReport({ calendar, view, here, adminRoute, }) {
23
+ const { month, days, items, today, clock } = calendar;
24
+ const inMonth = new Set(daysInMonth(calendar));
25
+ const href = (target, targetView = view) => `${here}?month=${monthParam(target)}${targetView === 'list' ? '&view=list' : ''}`;
26
+ const docHref = (item) => `${adminRoute}/collections/${item.collection}/${String(item.id)}`;
27
+ const describe = (item) => `${KIND_LABEL[item.kind]}${item.draft ? ' (draft)' : ''} · ${clock.timeLabel(item.at, item.zone)}`;
28
+ const keyOf = (item) => `${item.kind}:${item.collection}:${String(item.id)}`;
29
+ const chip = (item) => (_jsxs("a", { className: `tl-calendar__item tl-calendar__item--${item.kind}`, href: docHref(item), title: `${item.title} — ${describe(item)}`, children: [_jsxs("span", { className: "tl-calendar__kind", children: [KIND_LABEL[item.kind], ": "] }), item.title] }, keyOf(item)));
30
+ const monthDays = days.filter((key) => inMonth.has(key));
31
+ const count = monthDays.reduce((sum, key) => sum + (items.get(key)?.length ?? 0), 0);
32
+ return (_jsxs(_Fragment, { children: [_jsx(EditorialStyles, {}), _jsxs("div", { className: "tl-calendar__header", children: [_jsx("h1", { children: monthTitle(month) }), _jsxs("nav", { className: "tl-calendar__controls", "aria-label": "Month", children: [_jsx("a", { href: href(shiftMonth(month, -1)), children: "\u2190 Previous" }), _jsx("a", { href: href(clock.parseMonth(undefined, new Date())), children: "Today" }), _jsx("a", { href: href(shiftMonth(month, 1)), children: "Next \u2192" }), _jsx("span", { "aria-hidden": "true", children: "|" }), view === 'grid' ? (_jsx("a", { href: href(month, 'list'), children: "List" })) : (_jsx("a", { href: href(month, 'grid'), children: "Grid" }))] })] }), _jsxs("p", { className: "tl-calendar__legend", children: [_jsx("span", { className: "tl-calendar__item tl-calendar__item--scheduled", children: "Scheduled publish" }), _jsx("span", { className: "tl-calendar__item tl-calendar__item--published", children: "Published" }), _jsx("span", { className: "tl-calendar__item tl-calendar__item--event", children: "Event" }), _jsxs("span", { className: "tl-editorial__meta", children: ["Times are ", clock.label, ", the site\u2019s time zone."] })] }), view === 'grid' ? (_jsxs("table", { className: "tl-calendar__grid", children: [_jsxs("caption", { className: "tl-calendar__caption", children: [monthTitle(month), ": ", count, " ", count === 1 ? 'item' : 'items'] }), _jsx("thead", { children: _jsx("tr", { children: WEEKDAYS.map((day) => (_jsx("th", { scope: "col", children: day }, day))) }) }), _jsx("tbody", { children: Array.from({ length: days.length / 7 }, (_, week) => (_jsx("tr", { children: days.slice(week * 7, week * 7 + 7).map((key) => {
33
+ const list = items.get(key) ?? [];
34
+ const classes = ['tl-calendar__day'];
35
+ if (!inMonth.has(key))
36
+ classes.push('tl-calendar__day--outside');
37
+ if (key === today)
38
+ classes.push('tl-calendar__day--today');
39
+ return (_jsxs("td", { className: classes.join(' '), children: [_jsxs("span", { className: "tl-calendar__date", children: [Number(key.slice(8)), key === today && _jsx("span", { className: "tl-calendar__kind", children: " (today)" })] }), list.slice(0, PER_CELL).map(chip), list.length > PER_CELL && (_jsxs("a", { className: "tl-calendar__more", href: `${href(month, 'list')}#day-${key}`, children: ["+", list.length - PER_CELL, " more"] }))] }, key));
40
+ }) }, week))) })] })) : count === 0 ? (_jsx("p", { className: "tl-editorial__empty", children: "Nothing is scheduled, published or happening this month." })) : (monthDays.map((key) => {
41
+ const list = items.get(key) ?? [];
42
+ if (list.length === 0)
43
+ return null;
44
+ return (_jsxs("section", { id: `day-${key}`, className: "tl-editorial__panel", children: [_jsxs("h2", { children: [dayTitle(key), key === today ? ' (today)' : ''] }), _jsx("ul", { className: "tl-editorial__list", children: list.map((item) => (_jsxs("li", { className: "tl-editorial__row", children: [_jsx("a", { href: docHref(item), children: item.title }), _jsx("span", { className: "tl-editorial__meta", children: describe(item) })] }, keyOf(item)))) })] }, key));
45
+ }))] }));
46
+ }
47
+ //# sourceMappingURL=ContentCalendarReport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentCalendarReport.js","sourceRoot":"","sources":["../../../src/editorial/calendar/ContentCalendarReport.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAAE,WAAW,EAAsB,MAAM,eAAe,CAAA;AAE/D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAc,MAAM,YAAY,CAAA;AAErF;;;;;;;;EAQE;AAEF,MAAM,UAAU,GAAiC;IAC/C,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,OAAO;CACf,CAAA;AAED,4EAA4E;AAC5E,MAAM,QAAQ,GAAG,CAAC,CAAA;AAElB,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;AAElE,MAAM,UAAU,qBAAqB,CAAC,EACpC,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,UAAU,GAOX;IACC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAA;IACrD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAA;IAE9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 +1,3 @@
1
+ import type { AdminViewServerProps } from 'payload';
2
+ export declare function ContentCalendarView({ initPageResult, params, searchParams, payload, i18n, }: AdminViewServerProps): Promise<import("react").JSX.Element>;
3
+ //# sourceMappingURL=ContentCalendarView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentCalendarView.d.ts","sourceRoot":"","sources":["../../../src/editorial/calendar/ContentCalendarView.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAenD,wBAAsB,mBAAmB,CAAC,EACxC,cAAc,EACd,MAAM,EACN,YAAY,EACZ,OAAO,EACP,IAAI,GACL,EAAE,oBAAoB,wCAkCtB"}
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DefaultTemplate } from '@payloadcms/next/templates';
3
+ import { Gutter } from '@payloadcms/ui';
4
+ import { redirect } from 'next/navigation.js';
5
+ import { editorialRuntime } from '../config.js';
6
+ import { readCalendarMonth } from './calendar.js';
7
+ import { ContentCalendarReport } from './ContentCalendarReport.js';
8
+ /*
9
+ `/admin/content-calendar`: a month at a glance. The dashboard lists the next
10
+ few scheduled publishes; this shows the month: what goes live next week, whether
11
+ two campaign pages collide, an event beside the post announcing it.
12
+
13
+ Read-only. Rescheduling is a pipeline operation, done from the document's own
14
+ Schedule control. The month is in the URL (`?month=2026-10`) so it can be
15
+ linked. `editorialPlugin` registers it with the site's sources and zone.
16
+ */
17
+ export async function ContentCalendarView({ initPageResult, params, searchParams, payload, i18n, }) {
18
+ const { req, permissions, locale, visibleEntities } = initPageResult;
19
+ // The signed-in person arrives on the request, not as the `user` prop.
20
+ const { user } = req;
21
+ const { admin } = payload.config.routes;
22
+ const runtime = editorialRuntime(payload.config).calendar;
23
+ const here = `${admin}${runtime?.path ?? '/content-calendar'}`;
24
+ if (!user)
25
+ redirect(`${admin}/login?redirect=${encodeURIComponent(here)}`);
26
+ if (!runtime)
27
+ throw new Error('ContentCalendarView: editorialPlugin was given no `calendar`.');
28
+ const calendar = await readCalendarMonth(payload, {
29
+ calendar: runtime.options,
30
+ user,
31
+ month: searchParams?.['month'],
32
+ });
33
+ const view = searchParams?.['view'] === 'list' ? 'list' : 'grid';
34
+ return (_jsx(DefaultTemplate, { i18n: i18n, ...(locale ? { locale } : {}), ...(params ? { params } : {}), payload: payload, permissions: permissions, req: req, ...(searchParams ? { searchParams } : {}), user: user, visibleEntities: visibleEntities, children: _jsx(Gutter, { className: "tl-calendar", children: _jsx(ContentCalendarReport, { calendar: calendar, view: view, here: here, adminRoute: admin }) }) }));
35
+ }
36
+ //# sourceMappingURL=ContentCalendarView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentCalendarView.js","sourceRoot":"","sources":["../../../src/editorial/calendar/ContentCalendarView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAElE;;;;;;;;EAQE;AAEF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EACxC,cAAc,EACd,MAAM,EACN,YAAY,EACZ,OAAO,EACP,IAAI,GACiB;IACrB,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,cAAc,CAAA;IACpE,uEAAuE;IACvE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;IACpB,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAA;IACvC,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC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@@ -0,0 +1,30 @@
1
+ import type { Payload, PayloadRequest } from 'payload';
2
+ import { type CalendarItem, type CalendarSources } from './find.js';
3
+ import { type CalendarClock, type Month } from './month.js';
4
+ export interface CalendarOptions extends CalendarSources {
5
+ /** The site's IANA zone. Every item is placed on its day there. */
6
+ timeZone: string;
7
+ /** "ET" for `America/New_York`. Default: Intl's short generic name. */
8
+ zoneLabel?: (zone: string) => string;
9
+ }
10
+ export interface CalendarMonth {
11
+ month: Month;
12
+ /** Every day on the grid, whole weeks, Sunday first. */
13
+ days: string[];
14
+ /** Items by day key, sorted by time. */
15
+ items: Map<string, CalendarItem[]>;
16
+ /** Today's key, in the site's zone. */
17
+ today: string;
18
+ clock: CalendarClock;
19
+ }
20
+ export declare function clockFor(options: CalendarOptions): CalendarClock;
21
+ export declare function readCalendarMonth(payload: Payload, options: {
22
+ calendar: CalendarOptions;
23
+ user: PayloadRequest['user'];
24
+ /** `2026-10`; anything else means the current month. */
25
+ month?: unknown;
26
+ now?: Date;
27
+ }): Promise<CalendarMonth>;
28
+ /** The days of the month itself, without the grid's lead-in and run-out. */
29
+ export declare function daysInMonth(calendar: CalendarMonth): string[];
30
+ //# sourceMappingURL=calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/editorial/calendar/calendar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,EAAuB,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAA;AACxF,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,KAAK,EACX,MAAM,YAAY,CAAA;AAQnB,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAA;IAChB,uEAAuE;IACvE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CACrC;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAA;IACZ,wDAAwD;IACxD,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,wCAAwC;IACxC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IAClC,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,aAAa,CAAA;CACrB;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAEhE;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;IACP,QAAQ,EAAE,eAAe,CAAA;IACzB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAC5B,wDAAwD;IACxD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,IAAI,CAAA;CACX,GACA,OAAO,CAAC,aAAa,CAAC,CAYxB;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,EAAE,CAE7D"}
@@ -0,0 +1,23 @@
1
+ import { findContentCalendar } from './find.js';
2
+ import { calendarClock, gridDays, monthParam, queryRange, } from './month.js';
3
+ export function clockFor(options) {
4
+ return calendarClock(options.timeZone, options.zoneLabel);
5
+ }
6
+ export async function readCalendarMonth(payload, options) {
7
+ const clock = clockFor(options.calendar);
8
+ const now = options.now ?? new Date();
9
+ const month = clock.parseMonth(options.month, now);
10
+ const days = gridDays(month);
11
+ const items = await findContentCalendar(payload, {
12
+ sources: options.calendar,
13
+ clock,
14
+ user: options.user,
15
+ range: queryRange(days),
16
+ });
17
+ return { month, days, items, today: clock.dayKey(now), clock };
18
+ }
19
+ /** The days of the month itself, without the grid's lead-in and run-out. */
20
+ export function daysInMonth(calendar) {
21
+ return calendar.days.filter((key) => key.startsWith(monthParam(calendar.month)));
22
+ }
23
+ //# sourceMappingURL=calendar.js.map
@@ -0,0 +1 @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,CAAC,CAAA;AAClF,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { CollectionSlug, Payload, PayloadRequest } from 'payload';
2
+ import type { CalendarClock } from './month.js';
3
+ export type CalendarKind = 'scheduled' | 'published' | 'event';
4
+ export interface CalendarItem {
5
+ kind: CalendarKind;
6
+ collection: string;
7
+ id: number | string;
8
+ title: string;
9
+ at: string;
10
+ /** The event's own zone, for `timeLabel`. */
11
+ zone?: string;
12
+ /** An event that has never been published. */
13
+ draft?: boolean;
14
+ }
15
+ export interface CalendarEventSource {
16
+ collection: CollectionSlug;
17
+ /** Default `startsAt`. */
18
+ startsField?: string;
19
+ /** The field holding the zone the start was entered in, if any. Payload's own is `<startsField>_tz`. */
20
+ zoneField?: string;
21
+ }
22
+ export interface CalendarSources {
23
+ /** The collections whose scheduled publishes and publishes are shown. */
24
+ collections: readonly CollectionSlug[];
25
+ /** Default `scheduledPublishAt`, the field `publishingPlugin` schedules by. */
26
+ scheduledField?: string;
27
+ /** Default `publishedAt`. */
28
+ publishedField?: string;
29
+ events?: readonly CalendarEventSource[];
30
+ }
31
+ /** Every item between `from` and `to`, bucketed by site day and sorted by time. */
32
+ export declare function findContentCalendar(payload: Payload, options: {
33
+ sources: CalendarSources;
34
+ clock: CalendarClock;
35
+ user: PayloadRequest['user'];
36
+ range: {
37
+ from: string;
38
+ to: string;
39
+ };
40
+ }): Promise<Map<string, CalendarItem[]>>;
41
+ //# sourceMappingURL=find.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/editorial/calendar/find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAS,MAAM,SAAS,CAAA;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAyB/C,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,CAAA;AAE9D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,YAAY,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,CAAA;IACV,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8CAA8C;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,cAAc,CAAA;IAC1B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wGAAwG;IACxG,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,yEAAyE;IACzE,WAAW,EAAE,SAAS,cAAc,EAAE,CAAA;IACtC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAA;CACxC;AAcD,mFAAmF;AACnF,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;IACP,OAAO,EAAE,eAAe,CAAA;IACxB,KAAK,EAAE,aAAa,CAAA;IACpB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAC5B,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CACpC,GACA,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,CA2GtC"}
@@ -0,0 +1,108 @@
1
+ const between = (field, from, to) => ({
2
+ and: [{ [field]: { greater_than_equal: from } }, { [field]: { less_than: to } }],
3
+ });
4
+ function titleOf(doc) {
5
+ for (const key of ['title', 'name']) {
6
+ const value = doc[key];
7
+ if (typeof value === 'string' && value !== '')
8
+ return value;
9
+ }
10
+ return 'Untitled';
11
+ }
12
+ /** Every item between `from` and `to`, bucketed by site day and sorted by time. */
13
+ export async function findContentCalendar(payload, options) {
14
+ const { from, to } = options.range;
15
+ const scheduledField = options.sources.scheduledField ?? 'scheduledPublishAt';
16
+ const publishedField = options.sources.publishedField ?? 'publishedAt';
17
+ const common = {
18
+ depth: 0,
19
+ limit: 0,
20
+ pagination: false,
21
+ overrideAccess: false,
22
+ user: options.user,
23
+ };
24
+ const rows = (docs) => docs;
25
+ const reads = [];
26
+ for (const collection of options.sources.collections) {
27
+ reads.push(payload
28
+ .find({
29
+ ...common,
30
+ collection,
31
+ draft: true,
32
+ where: between(scheduledField, from, to),
33
+ select: { title: true, name: true, [scheduledField]: true },
34
+ })
35
+ .then(({ docs }) => rows(docs).map((doc) => ({
36
+ kind: 'scheduled',
37
+ collection,
38
+ id: doc['id'],
39
+ title: titleOf(doc),
40
+ at: doc[scheduledField],
41
+ }))), payload
42
+ .find({
43
+ ...common,
44
+ collection,
45
+ where: { and: [{ _status: { equals: 'published' } }, between(publishedField, from, to)] },
46
+ select: { title: true, name: true, [publishedField]: true },
47
+ })
48
+ .then(({ docs }) => rows(docs).map((doc) => ({
49
+ kind: 'published',
50
+ collection,
51
+ id: doc['id'],
52
+ title: titleOf(doc),
53
+ at: doc[publishedField],
54
+ }))));
55
+ }
56
+ for (const source of options.sources.events ?? []) {
57
+ const starts = source.startsField ?? 'startsAt';
58
+ reads.push(payload
59
+ .find({
60
+ ...common,
61
+ collection: source.collection,
62
+ draft: true,
63
+ where: between(starts, from, to),
64
+ select: {
65
+ title: true,
66
+ name: true,
67
+ [starts]: true,
68
+ ...(source.zoneField ? { [source.zoneField]: true } : {}),
69
+ _status: true,
70
+ [publishedField]: true,
71
+ },
72
+ })
73
+ .then(({ docs }) => rows(docs).map((doc) => {
74
+ const zone = source.zoneField ? doc[source.zoneField] : undefined;
75
+ return {
76
+ kind: 'event',
77
+ collection: source.collection,
78
+ id: doc['id'],
79
+ title: titleOf(doc),
80
+ at: doc[starts],
81
+ ...(typeof zone === 'string' ? { zone } : {}),
82
+ // The latest version of a published event with pending edits is
83
+ // a draft; the publish stamp is what says it has been live.
84
+ ...(doc['_status'] !== 'published' && !doc[publishedField] ? { draft: true } : {}),
85
+ };
86
+ })));
87
+ }
88
+ const settled = await Promise.allSettled(reads);
89
+ const days = new Map();
90
+ for (const result of settled) {
91
+ if (result.status === 'rejected') {
92
+ payload.logger.warn({ err: result.reason }, 'Content calendar: a collection did not answer.');
93
+ continue;
94
+ }
95
+ for (const item of result.value) {
96
+ if (typeof item.at !== 'string')
97
+ continue;
98
+ const key = options.clock.dayKey(item.at);
99
+ const list = days.get(key) ?? [];
100
+ list.push(item);
101
+ days.set(key, list);
102
+ }
103
+ }
104
+ for (const list of days.values())
105
+ list.sort((a, b) => a.at.localeCompare(b.at));
106
+ return days;
107
+ }
108
+ //# sourceMappingURL=find.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.js","sourceRoot":"","sources":["../../../src/editorial/calendar/find.ts"],"names":[],"mappings":"AA0DA,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,IAAY,EAAE,EAAU,EAAS,EAAE,CAAC,CAAC;IACnE,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC;CACjF,CAAC,CAAA;AAEF,SAAS,OAAO,CAAC,GAA4B;IAC3C,KAAK,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;QACtB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,EAAE;YAAE,OAAO,KAAK,CAAA;IAC7D,CAAC;IACD,OAAO,UAAU,CAAA;AACnB,CAAC;AAED,mFAAmF;AACnF,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MAAM,CAAC,MAAM,EAAE,EAAE,gDAAgD,CAAC,CAAA;YAC7F,SAAQ;QACV,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,QAAQ;gBAAE,SAAQ;YACzC,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACzC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACf,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QACrB,CAAC;IACH,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC/E,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -0,0 +1,45 @@
1
+ export interface Month {
2
+ year: number;
3
+ /** 1–12. */
4
+ month: number;
5
+ }
6
+ /** `2026-10`, as the query string carries it. */
7
+ export declare function monthParam({ year, month }: Month): string;
8
+ /** The month `delta` months from `from`. */
9
+ export declare function shiftMonth(from: Month, delta: number): Month;
10
+ /** Every day key in the grid: whole weeks, Sunday first, covering the month. */
11
+ export declare function gridDays({ year, month }: Month): string[];
12
+ /**
13
+ * The instants to query between so nothing on the grid is missed. No zone is
14
+ * more than fourteen hours from UTC, so a day either side is enough; the extra
15
+ * rows are dropped when items are bucketed by `dayKey`.
16
+ */
17
+ export declare function queryRange(days: readonly string[]): {
18
+ from: string;
19
+ to: string;
20
+ };
21
+ /** "October 2026". */
22
+ export declare function monthTitle({ year, month }: Month): string;
23
+ /** "Thursday, October 1", for the agenda list. */
24
+ export declare function dayTitle(key: string): string;
25
+ /** What follows a time: "ET". Intl's short generic name, e.g. "ET", "PT". */
26
+ export declare function defaultZoneLabel(zone: string): string;
27
+ export interface CalendarClock {
28
+ zone: string;
29
+ /** The zone's label: "ET". */
30
+ label: string;
31
+ /** The calendar day an instant falls on, in the site's zone. */
32
+ dayKey: (instant: string | Date) => string;
33
+ /** `?month=2026-10`, or the current month in the site's zone when absent or malformed. */
34
+ parseMonth: (param: unknown, now: Date) => Month;
35
+ /**
36
+ * The time of an item in the site's zone, and in its own zone too when that
37
+ * differs: "2:00 PM ET (11:00 AM PT)". An event entered in Pacific time is
38
+ * still placed on the site's day, and the second clause keeps what its author
39
+ * typed.
40
+ */
41
+ timeLabel: (instant: string, ownZone?: unknown) => string;
42
+ }
43
+ /** The zone-bound half of the arithmetic. */
44
+ export declare function calendarClock(zone: string, zoneLabel?: (zone: string) => string): CalendarClock;
45
+ //# sourceMappingURL=month.d.ts.map