@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,160 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useCallback, useState } from 'react';
4
+ import { Button, DatePicker, FieldLabel, toast, useConfig, useDocumentInfo, useField, useForm, useFormModified, } from '@payloadcms/ui';
5
+ import { callPublishingEndpoint, describeBlock, fieldErrorsFromBlock } from './publishing-client.js';
6
+ import { formatScheduledTime, scheduleState } from './schedule-state.js';
7
+ /**
8
+ * The Schedule control, rendered in place of the scheduled-publish date field.
9
+ *
10
+ * The field is not typed into directly. Scheduling goes through the publishing
11
+ * server so the pipeline's checks run *now* — an editor hears about a missing
12
+ * alt text while the page is in front of them, rather than from a log line on
13
+ * the morning it was meant to go out. The same checks run again when the
14
+ * schedule fires; this is the early warning, not the gate.
15
+ *
16
+ * The server writes the time with a draft save, and the control then puts the
17
+ * same value into form state without marking the form modified. That keeps the
18
+ * two in step: the next Save Draft sends the value the server already holds,
19
+ * rather than the empty one the form loaded with, which would silently cancel
20
+ * the schedule.
21
+ */
22
+ export function SchedulePublishField(props) {
23
+ const routePrefix = props.routePrefix ?? '/publishing';
24
+ const { value, setValue } = useField({ path: props.path });
25
+ const { collectionSlug, hasPublishPermission, id, incrementVersionCount } = useDocumentInfo();
26
+ const { config } = useConfig();
27
+ const { dispatchFields, getFields, setIsValid, setSubmitted, submit } = useForm();
28
+ const modified = useFormModified();
29
+ const [chosen, setChosen] = useState(null);
30
+ const [busy, setBusy] = useState(false);
31
+ const { api } = config.routes;
32
+ const serverURL = config.serverURL ?? '';
33
+ const state = scheduleState(value, Date.now());
34
+ const schedule = useCallback(async () => {
35
+ if (id === undefined || id === null || !collectionSlug || !chosen || busy)
36
+ return;
37
+ setBusy(true);
38
+ try {
39
+ // Pending edits are saved first, as a draft, for the same reason the
40
+ // Publish button does it: the checks evaluate what is saved, and the
41
+ // scheduled publish will promote what is saved.
42
+ if (modified) {
43
+ const saved = await submit({
44
+ action: `${serverURL}${api}/${collectionSlug}/${id}?draft=true&depth=0`,
45
+ method: 'PATCH',
46
+ overrides: { _status: 'draft' },
47
+ skipValidation: true,
48
+ disableSuccessStatus: true,
49
+ });
50
+ if (!saved || !saved.res.ok)
51
+ return;
52
+ }
53
+ const result = await callPublishingEndpoint({
54
+ serverURL,
55
+ apiRoute: api,
56
+ routePrefix,
57
+ action: 'schedule',
58
+ collection: collectionSlug,
59
+ id,
60
+ publishAt: chosen.toISOString(),
61
+ });
62
+ if (!result.ok) {
63
+ toast.error(result.message);
64
+ return;
65
+ }
66
+ if (!result.body.scheduled || !result.body.scheduledFor) {
67
+ // A block renders the same way a blocked publish does: on the fields
68
+ // it names, and in full in the toast.
69
+ const fieldErrors = fieldErrorsFromBlock(result.body, Object.keys(getFields()));
70
+ if (fieldErrors.length > 0) {
71
+ dispatchFields({ type: 'ADD_SERVER_ERRORS', errors: fieldErrors });
72
+ setIsValid(false);
73
+ setSubmitted(true);
74
+ }
75
+ const { title, description } = describeBlock(result.body, {
76
+ markedFields: fieldErrors.length,
77
+ });
78
+ toast.error(`Not scheduled. ${title}`, {
79
+ ...(description ? { description } : {}),
80
+ duration: 10_000,
81
+ });
82
+ return;
83
+ }
84
+ setValue(result.body.scheduledFor, true);
85
+ setChosen(null);
86
+ incrementVersionCount();
87
+ const heading = `Scheduled for ${formatScheduledTime(new Date(result.body.scheduledFor))}`;
88
+ const warnings = result.body.warnings ?? [];
89
+ if (warnings.length > 0) {
90
+ toast.warning(heading, { description: warnings.join('\n'), duration: 10_000 });
91
+ }
92
+ else {
93
+ toast.success(heading);
94
+ }
95
+ }
96
+ finally {
97
+ setBusy(false);
98
+ }
99
+ }, [
100
+ api,
101
+ busy,
102
+ chosen,
103
+ collectionSlug,
104
+ dispatchFields,
105
+ getFields,
106
+ id,
107
+ incrementVersionCount,
108
+ modified,
109
+ routePrefix,
110
+ serverURL,
111
+ setIsValid,
112
+ setSubmitted,
113
+ setValue,
114
+ submit,
115
+ ]);
116
+ const cancel = useCallback(async () => {
117
+ if (id === undefined || id === null || !collectionSlug || busy)
118
+ return;
119
+ setBusy(true);
120
+ try {
121
+ const result = await callPublishingEndpoint({
122
+ serverURL,
123
+ apiRoute: api,
124
+ routePrefix,
125
+ action: 'unschedule',
126
+ collection: collectionSlug,
127
+ id,
128
+ });
129
+ if (!result.ok) {
130
+ toast.error(result.message);
131
+ return;
132
+ }
133
+ // "Nothing is scheduled" is still the state the editor asked for.
134
+ setValue(null, true);
135
+ if (result.body.unscheduled)
136
+ incrementVersionCount();
137
+ toast.success('Schedule cancelled');
138
+ }
139
+ finally {
140
+ setBusy(false);
141
+ }
142
+ }, [api, busy, collectionSlug, id, incrementVersionCount, routePrefix, serverURL, setValue]);
143
+ return (_jsxs("div", { className: "field-type", style: { marginBottom: 'var(--spacing-field, 1.5rem)' }, children: [_jsx(FieldLabel, { label: "Scheduled publish", path: props.path }), _jsx(Body, { canSchedule: Boolean(hasPublishPermission), hasDocument: id !== undefined && id !== null, state: state, busy: busy, chosen: chosen, onChoose: setChosen, onSchedule: () => void schedule(), onCancel: () => void cancel() })] }));
144
+ }
145
+ function Body(props) {
146
+ const { state } = props;
147
+ if (state.kind !== 'none') {
148
+ return (_jsxs(_Fragment, { children: [_jsx("p", { style: { margin: '0 0 0.5rem' }, children: state.kind === 'upcoming'
149
+ ? `Publishes automatically ${state.label}.`
150
+ : `Was due to publish ${state.label} and has not: a check refused it, or it is waiting for a retry. Publish now to see what is blocking it.` }), props.canSchedule ? (_jsx(Button, { buttonStyle: "secondary", size: "small", disabled: props.busy, onClick: props.onCancel, children: "Cancel schedule" })) : null] }));
151
+ }
152
+ if (!props.hasDocument) {
153
+ return _jsx("p", { style: { margin: 0 }, children: "Save a draft first, then schedule it." });
154
+ }
155
+ if (!props.canSchedule) {
156
+ return _jsx("p", { style: { margin: 0 }, children: "Not scheduled." });
157
+ }
158
+ return (_jsxs(_Fragment, { children: [_jsx(DatePicker, { pickerAppearance: "dayAndTime", minDate: new Date(), timeIntervals: 15, ...(props.chosen ? { value: props.chosen } : {}), onChange: (date) => props.onChoose(date ?? null), readOnly: props.busy }), _jsx("div", { style: { marginTop: '0.5rem' }, children: _jsx(Button, { buttonStyle: "secondary", size: "small", disabled: !props.chosen || props.busy, onClick: props.onSchedule, children: props.busy ? 'Scheduling…' : 'Schedule' }) })] }));
159
+ }
160
+ //# sourceMappingURL=SchedulePublishField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchedulePublishField.js","sourceRoot":"","sources":["../../../src/publishing/admin/SchedulePublishField.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAc,EAAE,WAA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C,KAAK,CAAC,WAAW,EAAE,CAAC;QACvB,OAAO,YAAG,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,+BAAoB,CAAA;IACpD,CAAC;IAED,OAAO,CACL,8BACE,KAAC,UAAU,IACT,gBAAgB,EAAC,YAAY,EAC7B,OAAO,EAAE,IAAI,IAAI,EAAE,EACnB,aAAa,EAAE,EAAE,KACb,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACjD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,EAChD,QAAQ,EAAE,KAAK,CAAC,IAAI,GACpB,EACF,cAAK,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,YACjC,KAAC,MAAM,IACL,WAAW,EAAC,WAAW,EACvB,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,EACrC,OAAO,EAAE,KAAK,CAAC,UAAU,YAExB,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,GACjC,GACL,IACL,CACJ,CAAA;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ export interface ThroughlineUnpublishButtonProps {
3
+ /** Route prefix the plugin is mounted under. Injected via `clientProps`. */
4
+ routePrefix?: string;
5
+ }
6
+ /**
7
+ * Replaces Payload's Unpublish control on collections the publishing plugin
8
+ * governs. Same reasoning as the Publish button: the native control writes
9
+ * `_status: 'draft'` directly, which the trust boundary rejects. This one
10
+ * routes through the publishing server so the unpublish is audited against
11
+ * the logged-in editor and `content/page.unpublished` fires for
12
+ * revalidation.
13
+ */
14
+ export declare function UnpublishButton(props?: ThroughlineUnpublishButtonProps): React.ReactNode;
15
+ //# sourceMappingURL=UnpublishButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnpublishButton.d.ts","sourceRoot":"","sources":["../../../src/publishing/admin/UnpublishButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAapD,MAAM,WAAW,+BAA+B;IAC9C,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,KAAK,GAAE,+BAAoC,GAC1C,KAAK,CAAC,SAAS,CA4GjB"}
@@ -0,0 +1,90 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import React, { useCallback, useState } from 'react';
4
+ import { ConfirmationModal, PopupList, toast, useConfig, useDocumentInfo, useForm, useModal, useTranslation, } from '@payloadcms/ui';
5
+ import { callPublishingEndpoint } from './publishing-client.js';
6
+ /**
7
+ * Replaces Payload's Unpublish control on collections the publishing plugin
8
+ * governs. Same reasoning as the Publish button: the native control writes
9
+ * `_status: 'draft'` directly, which the trust boundary rejects. This one
10
+ * routes through the publishing server so the unpublish is audited against
11
+ * the logged-in editor and `content/page.unpublished` fires for
12
+ * revalidation.
13
+ */
14
+ export function UnpublishButton(props = {}) {
15
+ const routePrefix = props.routePrefix ?? '/publishing';
16
+ const { collectionSlug, data, hasPublishedDoc, hasPublishPermission, id, incrementVersionCount, isTrashed, setHasPublishedDoc, setMostRecentVersionIsAutosaved, setUnpublishedVersionCount, } = useDocumentInfo();
17
+ const { config } = useConfig();
18
+ const { reset } = useForm();
19
+ const { t } = useTranslation();
20
+ const { toggleModal } = useModal();
21
+ const [unpublishing, setUnpublishing] = useState(false);
22
+ const modalSlug = `throughline-confirm-unpublish-${id}`;
23
+ const { api } = config.routes;
24
+ const serverURL = config.serverURL ?? '';
25
+ const unpublish = useCallback(async () => {
26
+ if (id === undefined || id === null || !collectionSlug || unpublishing)
27
+ return;
28
+ setUnpublishing(true);
29
+ try {
30
+ const result = await callPublishingEndpoint({
31
+ serverURL,
32
+ apiRoute: api,
33
+ routePrefix,
34
+ action: 'unpublish',
35
+ collection: collectionSlug,
36
+ id,
37
+ });
38
+ if (!result.ok) {
39
+ toast.error(result.message);
40
+ return;
41
+ }
42
+ if (!result.body.unpublished) {
43
+ toast.error(result.body.reason ?? t('error:unPublishingDocument'));
44
+ return;
45
+ }
46
+ await reset({ ...(data ?? {}), _status: 'draft' });
47
+ incrementVersionCount();
48
+ setUnpublishedVersionCount(1);
49
+ setMostRecentVersionIsAutosaved(false);
50
+ setHasPublishedDoc(false);
51
+ const warnings = result.body.warnings ?? [];
52
+ if (warnings.length > 0) {
53
+ toast.warning(t('version:unpublishedSuccessfully'), {
54
+ description: warnings.join('\n'),
55
+ duration: 10_000,
56
+ });
57
+ }
58
+ else {
59
+ toast.success(t('version:unpublishedSuccessfully'));
60
+ }
61
+ }
62
+ finally {
63
+ setUnpublishing(false);
64
+ }
65
+ }, [
66
+ api,
67
+ collectionSlug,
68
+ data,
69
+ id,
70
+ incrementVersionCount,
71
+ reset,
72
+ routePrefix,
73
+ serverURL,
74
+ setHasPublishedDoc,
75
+ setMostRecentVersionIsAutosaved,
76
+ setUnpublishedVersionCount,
77
+ t,
78
+ unpublishing,
79
+ ]);
80
+ if (!hasPublishPermission || !hasPublishedDoc || isTrashed)
81
+ return null;
82
+ if (id === undefined || id === null || !collectionSlug)
83
+ return null;
84
+ return (_jsxs(React.Fragment, { children: [_jsx(PopupList.Button, { id: "action-unpublish", onClick: () => {
85
+ toggleModal(modalSlug);
86
+ }, children: t('version:unpublish') }), _jsx(ConfirmationModal, { body: t('version:aboutToUnpublish'), confirmingLabel: t('version:unpublishing'), heading: t('version:confirmUnpublish'), modalSlug: modalSlug, onConfirm: () => {
87
+ void unpublish();
88
+ } })] }));
89
+ }
90
+ //# sourceMappingURL=UnpublishButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnpublishButton.js","sourceRoot":"","sources":["../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AS,CAAC;YACT,eAAe,CAAC,KAAK,CAAC,CAAA;QACxB,CAAC;IACH,CAAC,EAAE;QACD,GAAG;QACH,cAAc;QACd,IAAI;QACJ,EAAE;QACF,qBAAqB;QACrB,KAAK;QACL,WAAW;QACX,SAAS;QACT,kBAAkB;QAClB,+BAA+B;QAC/B,0BAA0B;QAC1B,CAAC;QACD,YAAY;KACb,CAAC,CAAA;IAEF,IAAI,CAAC,oBAAoB,IAAI,CAAC,eAAe,IAAI,SAAS;QAAE,OAAO,IAAI,CAAA;IACvE,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC,cAAc;QAAE,OAAO,IAAI,CAAA;IAEnE,OAAO,CACL,MAAC,KAAK,CAAC,QAAQ,eACb,KAAC,SAAS,CAAC,MAAM,IACf,EAAE,EAAC,kBAAkB,EACrB,OAAO,EAAE,GAAG,EAAE;oBACZ,WAAW,CAAC,SAAS,CAAC,CAAA;gBACxB,CAAC,YAEA,CAAC,CAAC,mBAAmB,CAAC,GACN,EACnB,KAAC,iBAAiB,IAChB,IAAI,EAAE,CAAC,CAAC,0BAA0B,CAAC,EACnC,eAAe,EAAE,CAAC,CAAC,sBAAsB,CAAC,EAC1C,OAAO,EAAE,CAAC,CAAC,0BAA0B,CAAC,EACtC,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,GAAG,EAAE;oBACd,KAAK,SAAS,EAAE,CAAA;gBAClB,CAAC,GACD,IACa,CAClB,CAAA;AACH,CAAC"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Client-side helpers shared by the admin Publish and Unpublish controls.
3
+ * No JSX here so the message formatting can be unit tested directly.
4
+ */
5
+ export interface PublishingIssue {
6
+ field?: string;
7
+ message: string;
8
+ severity?: 'error' | 'warning';
9
+ rule?: string;
10
+ }
11
+ export interface PublishingResponse {
12
+ published?: boolean;
13
+ unpublished?: boolean;
14
+ scheduled?: boolean;
15
+ scheduledFor?: string;
16
+ unscheduled?: boolean;
17
+ publishedAt?: string;
18
+ failedAt?: string;
19
+ reason?: string;
20
+ code?: string;
21
+ issues?: PublishingIssue[];
22
+ suggestion?: string;
23
+ /** Non-fatal problems on an action that otherwise succeeded. */
24
+ warnings?: string[];
25
+ error?: string;
26
+ }
27
+ export interface CallPublishingEndpointArgs {
28
+ serverURL: string;
29
+ apiRoute: string;
30
+ routePrefix: string;
31
+ action: 'publish' | 'unpublish' | 'schedule' | 'unschedule';
32
+ collection: string;
33
+ id: number | string;
34
+ /** `schedule` only: ISO 8601. */
35
+ publishAt?: string;
36
+ }
37
+ export type PublishingCallResult = {
38
+ ok: true;
39
+ body: PublishingResponse;
40
+ } | {
41
+ ok: false;
42
+ message: string;
43
+ };
44
+ /**
45
+ * POSTs to the plugin's admin endpoint using the browser's session cookie.
46
+ * Returns a transport-level failure as `ok: false`; a pipeline block comes
47
+ * back as `ok: true` with a `published: false` body.
48
+ */
49
+ export declare function callPublishingEndpoint(args: CallPublishingEndpointArgs): Promise<PublishingCallResult>;
50
+ /**
51
+ * A field error in the shape Payload's form reducer accepts. `path` is a
52
+ * *form state* path — dotted, with numeric segments for array and block rows —
53
+ * which is not the same dialect the pipeline's issues speak.
54
+ *
55
+ * Structurally `ValidationFieldError` from `payload`, redeclared so this file
56
+ * needs no import of its own and stays unit-testable without a form.
57
+ */
58
+ export interface PublishingFieldError {
59
+ path: string;
60
+ message: string;
61
+ }
62
+ /**
63
+ * Rewrites a pipeline issue's field path into a form state path.
64
+ *
65
+ * The checks address array members with brackets — `layout[2].image` — because
66
+ * they walk a document. Payload's form state keys the same field
67
+ * `layout.2.image`. One is not a prefix of the other, so an unrewritten path
68
+ * matches no field and the error would land nowhere.
69
+ */
70
+ export declare function toFormPath(field: string): string;
71
+ /**
72
+ * Turns a pipeline block into errors attached to the fields that caused it.
73
+ *
74
+ * `formPaths` is what the form actually has — `Object.keys(getFields())` at the
75
+ * call site. Only those paths are used, and that restriction is load-bearing
76
+ * rather than defensive: Payload's reducer *creates* a field state entry for
77
+ * any path it is handed, and an invented entry becomes invented data on the
78
+ * next save. `speakers.0.portrait` is a real issue path — the pipeline walks
79
+ * the document at depth, so a related person's portrait is in the tree — and
80
+ * writing it into form state would turn a relationship's list of ids into a
81
+ * list of objects.
82
+ *
83
+ * An issue whose exact path is not a field falls back to the nearest ancestor
84
+ * that is, so a problem inside a populated relationship marks the relationship
85
+ * and a block-level composition failure marks the block field. That is also
86
+ * what puts the error count on a *collapsed* block row: the reducer propagates
87
+ * every error path up to its parents.
88
+ *
89
+ * Anything that resolves to no field at all is left out and stays in the toast,
90
+ * which is the whole reason the toast keeps listing the issues.
91
+ */
92
+ export declare function fieldErrorsFromBlock(body: PublishingResponse, formPaths: Iterable<string>): PublishingFieldError[];
93
+ /**
94
+ * Turns a pipeline block into something an editor can act on: which step
95
+ * said no, what it objected to, and what to do about it. This is the
96
+ * information the pipeline already returns — it just never had a way to
97
+ * reach the screen.
98
+ */
99
+ export declare function describeBlock(body: PublishingResponse, options?: {
100
+ markedFields?: number;
101
+ }): {
102
+ title: string;
103
+ description: string;
104
+ };
105
+ //# sourceMappingURL=publishing-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publishing-client.d.ts","sourceRoot":"","sources":["../../../src/publishing/admin/publishing-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;I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eD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,kBAAkB,EACxB,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,GACtC;IACD,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;CACpB,CA4BA"}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Client-side helpers shared by the admin Publish and Unpublish controls.
3
+ * No JSX here so the message formatting can be unit tested directly.
4
+ */
5
+ /**
6
+ * POSTs to the plugin's admin endpoint using the browser's session cookie.
7
+ * Returns a transport-level failure as `ok: false`; a pipeline block comes
8
+ * back as `ok: true` with a `published: false` body.
9
+ */
10
+ export async function callPublishingEndpoint(args) {
11
+ const url = `${args.serverURL}${args.apiRoute}${args.routePrefix}/${args.action}`;
12
+ let response;
13
+ try {
14
+ response = await fetch(url, {
15
+ method: 'POST',
16
+ credentials: 'include',
17
+ headers: { 'content-type': 'application/json' },
18
+ body: JSON.stringify({
19
+ collection: args.collection,
20
+ id: args.id,
21
+ ...(args.publishAt ? { publishAt: args.publishAt } : {}),
22
+ }),
23
+ });
24
+ }
25
+ catch {
26
+ return { ok: false, message: 'Could not reach the publishing server.' };
27
+ }
28
+ let body;
29
+ try {
30
+ body = (await response.json());
31
+ }
32
+ catch {
33
+ return { ok: false, message: `Publishing server returned ${response.status}.` };
34
+ }
35
+ if (!response.ok) {
36
+ return {
37
+ ok: false,
38
+ message: body.error ?? `Publishing server returned ${response.status}.`,
39
+ };
40
+ }
41
+ return { ok: true, body };
42
+ }
43
+ /**
44
+ * Rewrites a pipeline issue's field path into a form state path.
45
+ *
46
+ * The checks address array members with brackets — `layout[2].image` — because
47
+ * they walk a document. Payload's form state keys the same field
48
+ * `layout.2.image`. One is not a prefix of the other, so an unrewritten path
49
+ * matches no field and the error would land nowhere.
50
+ */
51
+ export function toFormPath(field) {
52
+ return field
53
+ .replace(/\[(\d+)\]/g, '.$1')
54
+ .replace(/\.{2,}/g, '.')
55
+ .replace(/^\.|\.$/g, '');
56
+ }
57
+ /**
58
+ * Turns a pipeline block into errors attached to the fields that caused it.
59
+ *
60
+ * `formPaths` is what the form actually has — `Object.keys(getFields())` at the
61
+ * call site. Only those paths are used, and that restriction is load-bearing
62
+ * rather than defensive: Payload's reducer *creates* a field state entry for
63
+ * any path it is handed, and an invented entry becomes invented data on the
64
+ * next save. `speakers.0.portrait` is a real issue path — the pipeline walks
65
+ * the document at depth, so a related person's portrait is in the tree — and
66
+ * writing it into form state would turn a relationship's list of ids into a
67
+ * list of objects.
68
+ *
69
+ * An issue whose exact path is not a field falls back to the nearest ancestor
70
+ * that is, so a problem inside a populated relationship marks the relationship
71
+ * and a block-level composition failure marks the block field. That is also
72
+ * what puts the error count on a *collapsed* block row: the reducer propagates
73
+ * every error path up to its parents.
74
+ *
75
+ * Anything that resolves to no field at all is left out and stays in the toast,
76
+ * which is the whole reason the toast keeps listing the issues.
77
+ */
78
+ export function fieldErrorsFromBlock(body, formPaths) {
79
+ const paths = formPaths instanceof Set ? formPaths : new Set(formPaths);
80
+ // Grouped, because several issues can resolve to one field — three bad
81
+ // blocks all land on `layout` — and the reducer keeps one message per path.
82
+ const byPath = new Map();
83
+ for (const issue of body.issues ?? []) {
84
+ if (!issue.field)
85
+ continue;
86
+ const resolved = resolveFieldPath(toFormPath(issue.field), paths);
87
+ if (!resolved)
88
+ continue;
89
+ const messages = byPath.get(resolved) ?? [];
90
+ if (!messages.includes(issue.message))
91
+ messages.push(issue.message);
92
+ byPath.set(resolved, messages);
93
+ }
94
+ return [...byPath].map(([path, messages]) => ({ path, message: messages.join('; ') }));
95
+ }
96
+ /** The path itself if the form has it, else its nearest ancestor that it does. */
97
+ function resolveFieldPath(path, formPaths) {
98
+ if (path === '' || path === '(root)')
99
+ return undefined;
100
+ const segments = path.split('.');
101
+ for (let end = segments.length; end > 0; end--) {
102
+ const candidate = segments.slice(0, end).join('.');
103
+ if (formPaths.has(candidate))
104
+ return candidate;
105
+ }
106
+ return undefined;
107
+ }
108
+ const MAX_LISTED_ISSUES = 5;
109
+ /**
110
+ * Turns a pipeline block into something an editor can act on: which step
111
+ * said no, what it objected to, and what to do about it. This is the
112
+ * information the pipeline already returns — it just never had a way to
113
+ * reach the screen.
114
+ */
115
+ export function describeBlock(body, options = {}) {
116
+ const title = body.reason ?? `Publish blocked at the ${body.failedAt ?? 'policy'} check.`;
117
+ const lines = [];
118
+ if (body.failedAt && body.reason) {
119
+ lines.push(`Blocked at: ${body.failedAt}`);
120
+ }
121
+ const issues = body.issues ?? [];
122
+ for (const issue of issues.slice(0, MAX_LISTED_ISSUES)) {
123
+ lines.push(`• ${issue.field ? `${issue.field}: ` : ''}${issue.message}`);
124
+ }
125
+ if (issues.length > MAX_LISTED_ISSUES) {
126
+ lines.push(`• …and ${issues.length - MAX_LISTED_ISSUES} more`);
127
+ }
128
+ if (body.suggestion) {
129
+ lines.push(`Suggestion: ${body.suggestion}`);
130
+ }
131
+ // Said only when it is true. An editor who has read a toast listing five
132
+ // paths still has to find them, and the answer — they are marked on the
133
+ // fields — is not something the toast otherwise reveals.
134
+ if ((options.markedFields ?? 0) > 0) {
135
+ lines.push('Fields with a problem are highlighted in the form.');
136
+ }
137
+ return { title, description: lines.join('\n') };
138
+ }
139
+ //# sourceMappingURL=publishing-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publishing-client.js","sourceRoot":"","sources":["../../../src/publishing/admin/publishing-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,IAAgC;IAEhC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,EAAE,CAAA;IAEjF,IAAI,QAAkB,CAAA;IACtB,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAC1B,MAAM,E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AAI,CAAC,UAAU,EAAE,CAAC;QACpB,KAAK,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;IAC9C,CAAC;IAED,yEAAyE;IACzE,wEAAwE;IACxE,yDAAyD;IACzD,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAA;IAClE,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAA;AACjD,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * What the Schedule control says about a stored scheduled time. No JSX, so it
3
+ * can be tested without a form.
4
+ */
5
+ export type ScheduleState = {
6
+ kind: 'none';
7
+ } | {
8
+ kind: 'upcoming';
9
+ at: Date;
10
+ label: string;
11
+ }
12
+ /**
13
+ * Past its time and still sitting on the latest version. A publish clears
14
+ * the field, so this means the scheduled publish was refused — a check that
15
+ * failed on the day — or has not run yet. The editor is the only person who
16
+ * will see this, which is why it is said here rather than only logged.
17
+ */
18
+ | {
19
+ kind: 'overdue';
20
+ at: Date;
21
+ label: string;
22
+ };
23
+ export declare function scheduleState(value: unknown, now: number, locale?: string): ScheduleState;
24
+ /**
25
+ * The time in the editor's own zone, with the zone named. An editor in London
26
+ * and one in New York looking at the same post see different wall-clock
27
+ * times, and each needs to know which one they are reading.
28
+ */
29
+ export declare function formatScheduledTime(at: Date, locale?: string): string;
30
+ //# sourceMappingURL=schedule-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-state.d.ts","sourceRoot":"","sources":["../../../src/publishing/admin/schedule-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AAC/C;;;;;GAKG;GACD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAShD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,CASzF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAWrE"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * What the Schedule control says about a stored scheduled time. No JSX, so it
3
+ * can be tested without a form.
4
+ */
5
+ /**
6
+ * How long past its time a schedule may be before it is called overdue. The
7
+ * run wakes on the minute, but it still has to load the document and pass the
8
+ * pipeline; a page opened in that moment should not claim a failure.
9
+ */
10
+ const OVERDUE_AFTER_MS = 5 * 60 * 1000;
11
+ export function scheduleState(value, now, locale) {
12
+ if (typeof value !== 'string')
13
+ return { kind: 'none' };
14
+ const at = new Date(value);
15
+ if (Number.isNaN(at.getTime()))
16
+ return { kind: 'none' };
17
+ const label = formatScheduledTime(at, locale);
18
+ return now - at.getTime() > OVERDUE_AFTER_MS
19
+ ? { kind: 'overdue', at, label }
20
+ : { kind: 'upcoming', at, label };
21
+ }
22
+ /**
23
+ * The time in the editor's own zone, with the zone named. An editor in London
24
+ * and one in New York looking at the same post see different wall-clock
25
+ * times, and each needs to know which one they are reading.
26
+ */
27
+ export function formatScheduledTime(at, locale) {
28
+ // Spelled out rather than `dateStyle`/`timeStyle`, which the spec forbids
29
+ // alongside `timeZoneName` — the constructor throws, in browsers too.
30
+ return new Intl.DateTimeFormat(locale, {
31
+ year: 'numeric',
32
+ month: 'short',
33
+ day: 'numeric',
34
+ hour: 'numeric',
35
+ minute: '2-digit',
36
+ timeZoneName: 'short',
37
+ }).format(at);
38
+ }
39
+ //# sourceMappingURL=schedule-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-state.js","sourceRoot":"","sources":["../../../src/publishing/admin/schedule-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAA;AAEtC,MAAM,UAAU,aAAa,CAAC,KAAc,EAAE,GAAW,EAAE,MAAe;IACxE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;IACtD,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;IAC1B,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;IAEvD,MAAM,KAAK,GAAG,mBAAmB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IAC7C,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,GAAG,gBAAgB;QAC1C,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE;QAChC,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,CAAA;AACrC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAAQ,EAAE,MAAe;IAC3D,0EAA0E;IAC1E,sEAAsE;IACtE,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;QACrC,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,YAAY,EAAE,OAAO;KACtB,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;AACf,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { AccessibilityCheck } from '../options.js';
2
+ /**
3
+ * Walks the document tree looking for image-shaped objects (anything with
4
+ * a `url` or `filename` property whose `mimeType`, if present, starts with
5
+ * `image/`). Flags any whose `alt` is missing or empty.
6
+ *
7
+ * Skips an upload's `sizes` map: Payload's generated derivatives carry
8
+ * `filename` and `mimeType` but never `alt`, which lives on the parent
9
+ * document. They are renditions of an image already checked, not images in
10
+ * their own right — walking into them reports one false failure per
11
+ * configured `imageSize`.
12
+ *
13
+ * Heuristic, not exhaustive. A host can add checks via `accessibilityChecks`
14
+ * and switch a built-in off via `disableAccessibilityChecks`.
15
+ */
16
+ export declare const altTextCheck: AccessibilityCheck;
17
+ //# sourceMappingURL=alt-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alt-text.d.ts","sourceRoot":"","sources":["../../../src/publishing/checks/alt-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAsB,MAAM,eAAe,CAAA;AAE3E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,EAAE,kBAgB1B,CAAA"}