@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,319 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useAuth, useConfig, usePreferences } from '@payloadcms/ui';
4
+ import { usePathname, useRouter } from 'next/navigation.js';
5
+ import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';
6
+ import { byIdsUrl, documentFromPath, matchCommands, matchRank, pushRecent, readRecent, searchUrl, } from './sources.js';
7
+ import { PALETTE_CSS } from './styles.js';
8
+ /*
9
+ Cmd-K (Ctrl-K elsewhere), from any admin screen: find a document by a few
10
+ letters of its title, whatever collection it is in, or jump to a screen. From
11
+ forumone-2026's `admin/palette/CommandPalette.tsx` (#760 there).
12
+
13
+ An admin `provider`, so it is mounted once around the whole admin and survives
14
+ navigation. It renders its children untouched and, while open, a native
15
+ `<dialog>`, which brings focus trapping, Escape and the backdrop with it.
16
+ `editorialPlugin` registers it, passing the site's sources and the reports as
17
+ `clientProps`.
18
+
19
+ Three kinds of result:
20
+
21
+ - **Documents**, from one REST `find` per source (`searchUrl`), read with the
22
+ viewer's own cookie, so nothing appears that they could not open.
23
+ - **Commands**: "Go to" every collection, global and report the viewer can read,
24
+ and "New …" for the collections they can create in.
25
+ - **Recently opened**, before anything is typed. Kept in Payload's own per-user
26
+ preferences, so it follows the person across browsers, and read back through
27
+ the same access-controlled REST.
28
+
29
+ "Recently opened" rather than "recently edited", because nothing records who
30
+ edited a document.
31
+ */
32
+ const DEBOUNCE_MS = 150;
33
+ function labelOf(value, fallback) {
34
+ return typeof value === 'string' ? value : fallback;
35
+ }
36
+ async function titles(url, source, signal) {
37
+ const response = await fetch(url, { credentials: 'include', signal });
38
+ if (!response.ok)
39
+ return [];
40
+ const { docs } = (await response.json());
41
+ return (docs ?? []).map((doc) => {
42
+ const value = doc[source.titleField];
43
+ return {
44
+ id: doc['id'],
45
+ title: typeof value === 'string' && value !== '' ? value : 'Untitled',
46
+ };
47
+ });
48
+ }
49
+ function Palette({ apiBase, adminRoute, commands, sources, singular, loadRecent, onClose, }) {
50
+ const router = useRouter();
51
+ const dialog = useRef(null);
52
+ const listId = useId();
53
+ const [query, setQuery] = useState('');
54
+ const [documents, setDocuments] = useState([]);
55
+ const [recent, setRecent] = useState([]);
56
+ const [searching, setSearching] = useState(false);
57
+ const [active, setActive] = useState(0);
58
+ /*
59
+ Opened with `showModal()`. Every way of closing it (Escape, a backdrop click,
60
+ choosing a result) calls `onClose` directly, which unmounts the dialog, rather
61
+ than waiting for the native `close` event: that event is queued and does not
62
+ arrive at all in a hidden tab, and React's `onClose` prop missed Escape, which
63
+ left the dialog mounted and closed so the next Cmd-K toggled it shut. The
64
+ listener stays as a fallback for any close this code did not start.
65
+ */
66
+ useEffect(() => {
67
+ const element = dialog.current;
68
+ if (!element)
69
+ return;
70
+ if (!element.open)
71
+ element.showModal();
72
+ element.addEventListener('close', onClose);
73
+ return () => element.removeEventListener('close', onClose);
74
+ }, [onClose]);
75
+ const docHref = useCallback((collection, id) => `${adminRoute}/collections/${collection}/${encodeURIComponent(String(id))}`, [adminRoute]);
76
+ // Recently opened, once, in the order they were opened.
77
+ useEffect(() => {
78
+ const controller = new AbortController();
79
+ void (async () => {
80
+ const entries = await loadRecent().catch(() => []);
81
+ const bySource = new Map();
82
+ for (const entry of entries) {
83
+ const list = bySource.get(entry.collection) ?? [];
84
+ list.push(entry);
85
+ bySource.set(entry.collection, list);
86
+ }
87
+ const found = new Map();
88
+ await Promise.allSettled(sources
89
+ .filter((source) => bySource.has(source.slug))
90
+ .map(async (source) => {
91
+ const ids = (bySource.get(source.slug) ?? []).map((entry) => entry.id);
92
+ for (const row of await titles(byIdsUrl(apiBase, source, ids), source, controller.signal))
93
+ found.set(`${source.slug}:${String(row.id)}`, row.title);
94
+ }));
95
+ if (controller.signal.aborted)
96
+ return;
97
+ setRecent(entries.flatMap((entry) => {
98
+ const title = found.get(`${entry.collection}:${entry.id}`);
99
+ if (title === undefined)
100
+ return [];
101
+ return [
102
+ {
103
+ key: `recent:${entry.collection}:${entry.id}`,
104
+ label: title,
105
+ hint: singular.get(entry.collection) ?? entry.collection,
106
+ href: docHref(entry.collection, entry.id),
107
+ },
108
+ ];
109
+ }));
110
+ })();
111
+ return () => controller.abort();
112
+ }, [apiBase, docHref, loadRecent, singular, sources]);
113
+ // Documents, debounced; a newer keystroke aborts the older requests.
114
+ useEffect(() => {
115
+ const q = query.trim();
116
+ if (q === '') {
117
+ setDocuments([]);
118
+ setSearching(false);
119
+ return;
120
+ }
121
+ const controller = new AbortController();
122
+ setSearching(true);
123
+ const timer = setTimeout(() => {
124
+ void Promise.allSettled(sources.map(async (source) => (await titles(searchUrl(apiBase, source, q), source, controller.signal)).map((row) => ({
125
+ key: `doc:${source.slug}:${String(row.id)}`,
126
+ label: row.title,
127
+ hint: singular.get(source.slug) ?? source.slug,
128
+ href: docHref(source.slug, row.id),
129
+ rank: matchRank(row.title, q),
130
+ })))).then((settled) => {
131
+ if (controller.signal.aborted)
132
+ return;
133
+ const rows = settled.flatMap((result) => result.status === 'fulfilled' ? result.value : []);
134
+ // Stable sort: best match first, source order within a rank.
135
+ rows.sort((a, b) => a.rank - b.rank);
136
+ setDocuments(rows);
137
+ setSearching(false);
138
+ });
139
+ }, DEBOUNCE_MS);
140
+ return () => {
141
+ clearTimeout(timer);
142
+ controller.abort();
143
+ };
144
+ }, [apiBase, docHref, query, singular, sources]);
145
+ const items = useMemo(() => {
146
+ if (query.trim() === '')
147
+ return recent;
148
+ const matched = matchCommands(commands, query)
149
+ .slice(0, 4)
150
+ .map((command) => ({
151
+ key: command.id,
152
+ label: command.label,
153
+ hint: command.hint,
154
+ href: command.href,
155
+ }));
156
+ return [...documents, ...matched];
157
+ }, [commands, documents, query, recent]);
158
+ useEffect(() => setActive(0), [items]);
159
+ const go = (item) => {
160
+ if (!item)
161
+ return;
162
+ onClose();
163
+ router.push(item.href);
164
+ };
165
+ const onKeyDown = (event) => {
166
+ if (event.key === 'ArrowDown') {
167
+ event.preventDefault();
168
+ setActive((index) => Math.min(index + 1, items.length - 1));
169
+ }
170
+ else if (event.key === 'ArrowUp') {
171
+ event.preventDefault();
172
+ setActive((index) => Math.max(index - 1, 0));
173
+ }
174
+ else if (event.key === 'Escape') {
175
+ // A search input clears itself on Escape; close instead.
176
+ event.preventDefault();
177
+ onClose();
178
+ }
179
+ else if (event.key === 'Enter') {
180
+ event.preventDefault();
181
+ go(items[active]);
182
+ }
183
+ };
184
+ const status = query.trim() === ''
185
+ ? recent.length === 0
186
+ ? 'Type to search by title.'
187
+ : 'Recently opened'
188
+ : searching && items.length === 0
189
+ ? 'Searching…'
190
+ : items.length === 0
191
+ ? 'Nothing matches.'
192
+ : null;
193
+ return (_jsxs("dialog", { ref: dialog, className: "tl-palette", "aria-label": "Search the admin", onCancel: (event) => {
194
+ // Escape. Unmount rather than let the browser close it; see above.
195
+ event.preventDefault();
196
+ onClose();
197
+ }, onClick: (event) => {
198
+ // A click on the backdrop lands on the dialog itself.
199
+ if (event.target === dialog.current)
200
+ onClose();
201
+ }, children: [_jsx("input", { className: "tl-palette__input", type: "search", role: "combobox", "aria-expanded": items.length > 0, "aria-controls": listId, "aria-activedescendant": items[active] ? `${listId}-${active}` : undefined, "aria-autocomplete": "list", placeholder: "Search by title, or go to\u2026", autoFocus: true, value: query, onChange: (event) => setQuery(event.target.value), onKeyDown: onKeyDown }), status && (_jsx("p", { className: "tl-palette__status", role: "status", children: status })), _jsx("ul", { className: "tl-palette__list", id: listId, role: "listbox", "aria-label": "Results", children: items.map((item, index) => (_jsxs("li", { id: `${listId}-${index}`, role: "option", "aria-selected": index === active, className: "tl-palette__item", onMouseMove: () => setActive(index), onClick: () => go(item), children: [_jsx("span", { className: "tl-palette__label", children: item.label }), _jsx("span", { className: "tl-palette__hint", children: item.hint })] }, item.key))) }), _jsx("p", { className: "tl-palette__keys", "aria-hidden": "true", children: "\u2191\u2193 to move \u00B7 Enter to open \u00B7 Esc to close" })] }));
202
+ }
203
+ export function CommandPalette({ children, sources, reports = [], creatable, preferenceKey = 'throughline-command-palette-recent', }) {
204
+ const { user, permissions } = useAuth();
205
+ const { config } = useConfig();
206
+ const { getPreference, setPreference } = usePreferences();
207
+ const pathname = usePathname();
208
+ const [open, setOpen] = useState(false);
209
+ const { admin } = config.routes;
210
+ const searched = useMemo(() => sources.map((source) => source.slug), [sources]);
211
+ useEffect(() => {
212
+ if (!user)
213
+ return;
214
+ const onKey = (event) => {
215
+ if (event.key.toLowerCase() !== 'k' || event.altKey || event.shiftKey)
216
+ return;
217
+ if (!(event.metaKey || event.ctrlKey))
218
+ return;
219
+ event.preventDefault();
220
+ setOpen((value) => !value);
221
+ };
222
+ window.addEventListener('keydown', onKey);
223
+ return () => window.removeEventListener('keydown', onKey);
224
+ }, [user]);
225
+ // Remember each document editor the person opens.
226
+ useEffect(() => {
227
+ if (!user)
228
+ return;
229
+ const entry = documentFromPath(pathname, admin, searched);
230
+ if (!entry)
231
+ return;
232
+ let cancelled = false;
233
+ void getPreference(preferenceKey)
234
+ .then((stored) => {
235
+ if (cancelled)
236
+ return;
237
+ const current = readRecent(stored);
238
+ if (current[0]?.collection === entry.collection && current[0]?.id === entry.id)
239
+ return;
240
+ return setPreference(preferenceKey, pushRecent(current, entry));
241
+ })
242
+ .catch(() => undefined);
243
+ return () => {
244
+ cancelled = true;
245
+ };
246
+ }, [pathname, admin, user, getPreference, setPreference, preferenceKey, searched]);
247
+ /** Collection slug to singular label, for the hint beside each result. */
248
+ const singular = useMemo(() => {
249
+ const map = new Map();
250
+ for (const collection of config.collections)
251
+ map.set(collection.slug, labelOf(collection.labels?.singular, collection.slug));
252
+ return map;
253
+ }, [config.collections]);
254
+ const canRead = useCallback((slug) => Boolean(permissions?.collections?.[slug]?.read), [permissions]);
255
+ const commands = useMemo(() => {
256
+ const list = [];
257
+ for (const report of reports)
258
+ list.push({
259
+ id: `report:${report.path}`,
260
+ label: report.label,
261
+ hint: 'Go to',
262
+ href: `${admin}${report.path}`,
263
+ ...(report.keywords ? { keywords: report.keywords } : {}),
264
+ });
265
+ for (const collection of config.collections) {
266
+ if (!canRead(collection.slug))
267
+ continue;
268
+ if (collection.admin?.group === false)
269
+ continue;
270
+ list.push({
271
+ id: `collection:${collection.slug}`,
272
+ label: labelOf(collection.labels?.plural, collection.slug),
273
+ hint: 'Go to',
274
+ href: `${admin}/collections/${collection.slug}`,
275
+ keywords: collection.slug,
276
+ });
277
+ }
278
+ for (const global of config.globals) {
279
+ if (!permissions?.globals?.[global.slug]?.read)
280
+ continue;
281
+ list.push({
282
+ id: `global:${global.slug}`,
283
+ label: labelOf(global.label, global.slug),
284
+ hint: 'Go to',
285
+ href: `${admin}/globals/${global.slug}`,
286
+ keywords: global.slug,
287
+ });
288
+ }
289
+ for (const slug of creatable ?? searched) {
290
+ if (!permissions?.collections?.[slug]?.create)
291
+ continue;
292
+ list.push({
293
+ id: `create:${slug}`,
294
+ label: singular.get(slug) ?? slug,
295
+ hint: 'New',
296
+ href: `${admin}/collections/${slug}/create`,
297
+ keywords: 'create add',
298
+ });
299
+ }
300
+ return list;
301
+ }, [
302
+ admin,
303
+ canRead,
304
+ config.collections,
305
+ config.globals,
306
+ creatable,
307
+ permissions,
308
+ reports,
309
+ searched,
310
+ singular,
311
+ ]);
312
+ const readable = useMemo(() => sources.filter((source) => canRead(source.slug)), [canRead, sources]);
313
+ const loadRecent = useCallback(async () => readRecent(await getPreference(preferenceKey)), [getPreference, preferenceKey]);
314
+ const close = useCallback(() => setOpen(false), []);
315
+ if (!user)
316
+ return _jsx(_Fragment, { children: children });
317
+ return (_jsxs(_Fragment, { children: [children, open && (_jsxs(_Fragment, { children: [_jsx("style", { href: "throughline-palette", precedence: "default", children: PALETTE_CSS }), _jsx(Palette, { apiBase: `${config.serverURL}${config.routes.api}`, adminRoute: admin, commands: commands, sources: readable, singular: singular, loadRecent: loadRecent, onClose: close })] }))] }));
318
+ }
319
+ //# sourceMappingURL=CommandPalette.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPalette.js","sourceRoot":"","sources":["../../../src/editorial/palette/CommandPalette.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAChG,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,S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AI,CAAC,CAAC,EACtD,CAAC,OAAO,EAAE,OAAO,CAAC,CACnB,CAAA;IACD,MAAM,UAAU,GAAG,WAAW,CAC5B,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,aAAa,CAAU,aAAa,CAAC,CAAC,EACnE,CAAC,aAAa,EAAE,aAAa,CAAC,CAC/B,CAAA;IACD,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAA;IAEnD,IAAI,CAAC,IAAI;QAAE,OAAO,4BAAG,QAAQ,GAAI,CAAA;IAEjC,OAAO,CACL,8BACG,QAAQ,EACR,IAAI,IAAI,CACP,8BACE,gBAAO,IAAI,EAAC,qBAAqB,EAAC,UAAU,EAAC,SAAS,YACnD,WAAW,GACN,EACR,KAAC,OAAO,IACN,OAAO,EAAE,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,EAClD,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,KAAK,GACd,IACD,CACJ,IACA,CACJ,CAAA;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Report } from './sources.js';
2
+ export declare function ReportsNav({ reports }: {
3
+ reports?: Report[];
4
+ }): import("react").JSX.Element | null;
5
+ //# sourceMappingURL=ReportsNav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReportsNav.d.ts","sourceRoot":"","sources":["../../../src/editorial/palette/ReportsNav.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAiB1C,wBAAgB,UAAU,CAAC,EAAE,OAAY,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,sCAiClE"}
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { NavGroup, useConfig } from '@payloadcms/ui';
4
+ import NextLinkImport from 'next/link.js';
5
+ import { usePathname } from 'next/navigation.js';
6
+ // `next/link` is CommonJS: under NodeNext its default import is the module, so
7
+ // unwrap it as Payload's own UI does.
8
+ const Link = 'default' in NextLinkImport ? NextLinkImport.default : NextLinkImport;
9
+ /*
10
+ The sidebar's "Reports" group: the admin's own screens, which are not
11
+ collections and so get no link from Payload's nav. Drawn with Payload's classes,
12
+ so an entry here looks and highlights exactly like a collection's. From
13
+ forumone-2026's `admin/ReportsNav.tsx`.
14
+
15
+ `editorialPlugin` adds it after the collection groups, with the views it
16
+ registered and any the site adds: the sidebar is where editors go to reach
17
+ content, and a report above Content pushed it down.
18
+ */
19
+ export function ReportsNav({ reports = [] }) {
20
+ const pathname = usePathname();
21
+ const { config: { routes: { admin }, }, } = useConfig();
22
+ if (reports.length === 0)
23
+ return null;
24
+ return (_jsx(NavGroup, { label: "Reports", children: reports.map(({ path, label }) => {
25
+ const href = `${admin}${path}`;
26
+ const active = pathname === href || pathname.startsWith(`${href}/`);
27
+ const content = (_jsxs(_Fragment, { children: [active && _jsx("div", { className: "nav__link-indicator" }), _jsx("span", { className: "nav__link-label", children: label })] }));
28
+ return pathname === href ? (_jsx("div", { className: "nav__link", children: content }, path)) : (_jsx(Link, { className: "nav__link", href: href, prefetch: false, children: content }, path));
29
+ }) }));
30
+ }
31
+ //# sourceMappingURL=ReportsNav.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReportsNav.js","sourceRoot":"","sources":["../../../src/editorial/palette/ReportsNav.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,cAAc,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MA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type { Payload, PayloadRequest } from 'payload';
2
+ import { type SearchSource } from './sources.js';
3
+ export interface SearchHit {
4
+ collection: string;
5
+ /** The collection's singular label. */
6
+ label: string;
7
+ id: number | string;
8
+ title: string;
9
+ /** 0 exact, 1 prefix, 2 word start, 3 anywhere. */
10
+ rank: number;
11
+ }
12
+ export declare function searchContent(payload: Payload, options: {
13
+ sources: readonly SearchSource[];
14
+ query: string;
15
+ user: PayloadRequest['user'];
16
+ perSource?: number;
17
+ }): Promise<SearchHit[]>;
18
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/editorial/palette/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,EAAsC,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AAQpF,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAsB,aAAa,CACjC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;IACP,OAAO,EAAE,SAAS,YAAY,EAAE,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GACA,OAAO,CAAC,SAAS,EAAE,CAAC,CAqCtB"}
@@ -0,0 +1,41 @@
1
+ import { matchRank, PER_SOURCE, searchWhere } from './sources.js';
2
+ export async function searchContent(payload, options) {
3
+ const q = options.query.trim();
4
+ if (q === '')
5
+ return [];
6
+ const settled = await Promise.allSettled(options.sources.map(async (source) => {
7
+ const { docs } = await payload.find({
8
+ collection: source.slug,
9
+ where: searchWhere(source, q),
10
+ limit: options.perSource ?? PER_SOURCE,
11
+ depth: 0,
12
+ select: { [source.titleField]: true },
13
+ sort: '-updatedAt',
14
+ ...(source.drafts ? { draft: true } : {}),
15
+ overrideAccess: false,
16
+ user: options.user,
17
+ });
18
+ const singular = payload.collections[source.slug]?.config.labels.singular;
19
+ return docs.map((doc) => {
20
+ const value = doc[source.titleField];
21
+ const title = typeof value === 'string' && value !== '' ? value : 'Untitled';
22
+ return {
23
+ collection: source.slug,
24
+ label: typeof singular === 'string' ? singular : source.slug,
25
+ id: doc['id'],
26
+ title,
27
+ rank: matchRank(title, q),
28
+ };
29
+ });
30
+ }));
31
+ const hits = [];
32
+ for (const result of settled) {
33
+ if (result.status === 'fulfilled')
34
+ hits.push(...result.value);
35
+ else
36
+ payload.logger.warn({ err: result.reason }, 'Search: a collection did not answer.');
37
+ }
38
+ // Stable: best match first, source order within a rank, as the palette orders them.
39
+ return hits.sort((a, b) => a.rank - b.rank);
40
+ }
41
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/editorial/palette/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAqB,MAAM,cAAc,CAAA;AAkBpF,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAgB,EAChB,OAKC;IAED,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;IAC9B,IAAI,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,CAAA;IACvB,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CACtC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACnC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;YAClC,UAAU,EAAE,MAAM,CAAC,IAAsB;YACzC,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AM,KAAK,WAAW;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;YACxD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,sCAAsC,CAAC,CAAA;IAC1F,CAAC;IACD,oFAAoF;IACpF,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;AAC7C,CAAC"}
@@ -0,0 +1,64 @@
1
+ import type { Where } from 'payload';
2
+ export interface SearchSource {
3
+ slug: string;
4
+ /** The field shown as the result's title. */
5
+ titleField: string;
6
+ /** Fields matched against the query, OR'd. */
7
+ searchFields: readonly string[];
8
+ /** Whether the collection has drafts, so the latest draft's title is the one searched. */
9
+ drafts: boolean;
10
+ }
11
+ /** Results per collection. Enough to see the one you meant; the list view has the rest. */
12
+ export declare const PER_SOURCE = 5;
13
+ /** The query for one source: any search field `like` what was typed. */
14
+ export declare function searchWhere(source: SearchSource, query: string): Where;
15
+ /**
16
+ * The REST query for one source. Read with the viewer's own cookie, so access
17
+ * control applies exactly as it does in the list view, and `select` keeps each
18
+ * row to the one field shown.
19
+ */
20
+ export declare function searchUrl(apiRoute: string, source: SearchSource, query: string, perSource?: number): string;
21
+ /** The REST query for a set of documents by id, for the recent list. */
22
+ export declare function byIdsUrl(apiRoute: string, source: SearchSource, ids: readonly (number | string)[]): string;
23
+ /**
24
+ * How well a title matches: 0 exact, 1 prefix, 2 a word starts with it,
25
+ * 3 anywhere. The database answers "does it match"; this orders what it
26
+ * returned, so typing "about" puts "About" above "What we talk about".
27
+ */
28
+ export declare function matchRank(title: string, query: string): number;
29
+ export interface Command {
30
+ id: string;
31
+ label: string;
32
+ /** What kind of thing it is, shown beside it: "Go to", "New", a collection label. */
33
+ hint: string;
34
+ href: string;
35
+ /** Extra words it answers to. */
36
+ keywords?: string;
37
+ }
38
+ /** Commands whose label or keywords contain every word of the query, best match first. */
39
+ export declare function matchCommands(commands: readonly Command[], query: string): Command[];
40
+ export interface RecentEntry {
41
+ collection: string;
42
+ id: string;
43
+ }
44
+ /** How many recently opened documents are remembered. */
45
+ export declare const RECENT_LIMIT = 6;
46
+ /**
47
+ * The document an admin path is the editor for, or `null`. A version or API
48
+ * sub-view is still that document; a list, `create` or `trash` is not; and only
49
+ * collections the palette searches are remembered.
50
+ */
51
+ export declare function documentFromPath(pathname: string, adminRoute: string, searched: readonly string[]): RecentEntry | null;
52
+ /** `entry` moved to the front of `list`, de-duplicated and capped. */
53
+ export declare function pushRecent(list: readonly RecentEntry[], entry: RecentEntry): RecentEntry[];
54
+ /** A stored preference read defensively: anything that is not a list of entries is an empty list. */
55
+ export declare function readRecent(value: unknown): RecentEntry[];
56
+ /** An admin screen that is not a collection, for the palette and the Reports nav. */
57
+ export interface Report {
58
+ /** Under the admin route: `/content-health`. */
59
+ path: string;
60
+ label: string;
61
+ /** Extra words the palette matches it by. */
62
+ keywords?: string;
63
+ }
64
+ //# sourceMappingURL=sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../src/editorial/palette/sources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAkBpC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAA;IAClB,8CAA8C;IAC9C,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B,0FAA0F;IAC1F,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,2FAA2F;AAC3F,eAAO,MAAM,UAAU,IAAI,CAAA;AAE3B,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,CAGtE;AAM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D;AAED,qFAAqF;AACrF,MAAM,WAAW,MAAM;IACrB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
@@ -0,0 +1,103 @@
1
+ import { whereQuery } from '../health/checks.js';
2
+ /** Results per collection. Enough to see the one you meant; the list view has the rest. */
3
+ export const PER_SOURCE = 5;
4
+ /** The query for one source: any search field `like` what was typed. */
5
+ export function searchWhere(source, query) {
6
+ const q = query.trim();
7
+ return { or: source.searchFields.map((field) => ({ [field]: { like: q } })) };
8
+ }
9
+ function param(key, value) {
10
+ return `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`;
11
+ }
12
+ /**
13
+ * The REST query for one source. Read with the viewer's own cookie, so access
14
+ * control applies exactly as it does in the list view, and `select` keeps each
15
+ * row to the one field shown.
16
+ */
17
+ export function searchUrl(apiRoute, source, query, perSource = PER_SOURCE) {
18
+ const parts = [
19
+ whereQuery(searchWhere(source, query)),
20
+ param('limit', perSource),
21
+ param('depth', 0),
22
+ param(`select[${source.titleField}]`, true),
23
+ param('sort', '-updatedAt'),
24
+ ];
25
+ if (source.drafts)
26
+ parts.push(param('draft', true));
27
+ return `${apiRoute}/${source.slug}?${parts.join('&')}`;
28
+ }
29
+ /** The REST query for a set of documents by id, for the recent list. */
30
+ export function byIdsUrl(apiRoute, source, ids) {
31
+ const parts = [
32
+ param('where[id][in]', ids.join(',')),
33
+ param('limit', ids.length),
34
+ param('depth', 0),
35
+ param(`select[${source.titleField}]`, true),
36
+ ];
37
+ if (source.drafts)
38
+ parts.push(param('draft', true));
39
+ return `${apiRoute}/${source.slug}?${parts.join('&')}`;
40
+ }
41
+ /**
42
+ * How well a title matches: 0 exact, 1 prefix, 2 a word starts with it,
43
+ * 3 anywhere. The database answers "does it match"; this orders what it
44
+ * returned, so typing "about" puts "About" above "What we talk about".
45
+ */
46
+ export function matchRank(title, query) {
47
+ const t = title.toLowerCase();
48
+ const q = query.trim().toLowerCase();
49
+ if (q === '')
50
+ return 3;
51
+ if (t === q)
52
+ return 0;
53
+ if (t.startsWith(q))
54
+ return 1;
55
+ if (t.split(/[^a-z0-9]+/).some((word) => word.startsWith(q)))
56
+ return 2;
57
+ return 3;
58
+ }
59
+ /** Commands whose label or keywords contain every word of the query, best match first. */
60
+ export function matchCommands(commands, query) {
61
+ const words = query.trim().toLowerCase().split(/\s+/).filter(Boolean);
62
+ if (words.length === 0)
63
+ return [];
64
+ return commands
65
+ .filter((command) => {
66
+ const haystack = `${command.hint} ${command.label} ${command.keywords ?? ''}`.toLowerCase();
67
+ return words.every((word) => haystack.includes(word));
68
+ })
69
+ .sort((a, b) => matchRank(a.label, query) - matchRank(b.label, query));
70
+ }
71
+ /** How many recently opened documents are remembered. */
72
+ export const RECENT_LIMIT = 6;
73
+ /**
74
+ * The document an admin path is the editor for, or `null`. A version or API
75
+ * sub-view is still that document; a list, `create` or `trash` is not; and only
76
+ * collections the palette searches are remembered.
77
+ */
78
+ export function documentFromPath(pathname, adminRoute, searched) {
79
+ const prefix = `${adminRoute}/collections/`;
80
+ if (!pathname.startsWith(prefix))
81
+ return null;
82
+ const [collection, id] = pathname.slice(prefix.length).split('/');
83
+ if (!collection || !id || id === 'create' || id === 'trash')
84
+ return null;
85
+ if (!searched.includes(collection))
86
+ return null;
87
+ return { collection, id: decodeURIComponent(id) };
88
+ }
89
+ /** `entry` moved to the front of `list`, de-duplicated and capped. */
90
+ export function pushRecent(list, entry) {
91
+ const rest = list.filter((item) => !(item.collection === entry.collection && item.id === entry.id));
92
+ return [entry, ...rest].slice(0, RECENT_LIMIT);
93
+ }
94
+ /** A stored preference read defensively: anything that is not a list of entries is an empty list. */
95
+ export function readRecent(value) {
96
+ if (!Array.isArray(value))
97
+ return [];
98
+ return value.filter((item) => typeof item === 'object' &&
99
+ item !== null &&
100
+ typeof item.collection === 'string' &&
101
+ typeof item.id === 'string');
102
+ }
103
+ //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