@plumix/core 0.6.0 → 0.7.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 (418) hide show
  1. package/dist/cache/embedded-tags.d.ts +5 -0
  2. package/dist/cache/embedded-tags.d.ts.map +1 -0
  3. package/dist/cache/embedded-tags.js +30 -0
  4. package/dist/cache/embedded-tags.js.map +1 -0
  5. package/dist/entries/read-service.d.ts.map +1 -1
  6. package/dist/entries/read-service.js +5 -3
  7. package/dist/entries/read-service.js.map +1 -1
  8. package/dist/index.d.ts +3 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +1 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/plugin/errors.d.ts +7 -1
  13. package/dist/plugin/errors.d.ts.map +1 -1
  14. package/dist/plugin/errors.js +5 -0
  15. package/dist/plugin/errors.js.map +1 -1
  16. package/dist/plugin/fields/builder.d.ts +106 -0
  17. package/dist/plugin/fields/builder.d.ts.map +1 -0
  18. package/dist/plugin/fields/builder.js +162 -0
  19. package/dist/plugin/fields/builder.js.map +1 -0
  20. package/dist/plugin/fields/color.d.ts +78 -18
  21. package/dist/plugin/fields/color.d.ts.map +1 -1
  22. package/dist/plugin/fields/color.js +116 -25
  23. package/dist/plugin/fields/color.js.map +1 -1
  24. package/dist/plugin/fields/condition.d.ts +40 -0
  25. package/dist/plugin/fields/condition.d.ts.map +1 -0
  26. package/dist/plugin/fields/condition.js +115 -0
  27. package/dist/plugin/fields/condition.js.map +1 -0
  28. package/dist/plugin/fields/contributions.d.ts +233 -0
  29. package/dist/plugin/fields/contributions.d.ts.map +1 -0
  30. package/dist/plugin/fields/contributions.js +1 -0
  31. package/dist/plugin/fields/contributions.js.map +1 -0
  32. package/dist/plugin/fields/entry.d.ts +18 -22
  33. package/dist/plugin/fields/entry.d.ts.map +1 -1
  34. package/dist/plugin/fields/entry.js +13 -21
  35. package/dist/plugin/fields/entry.js.map +1 -1
  36. package/dist/plugin/fields/errors.d.ts +23 -11
  37. package/dist/plugin/fields/errors.d.ts.map +1 -1
  38. package/dist/plugin/fields/errors.js +20 -13
  39. package/dist/plugin/fields/errors.js.map +1 -1
  40. package/dist/plugin/fields/group.d.ts +90 -0
  41. package/dist/plugin/fields/group.d.ts.map +1 -0
  42. package/dist/plugin/fields/group.js +124 -0
  43. package/dist/plugin/fields/group.js.map +1 -0
  44. package/dist/plugin/fields/index.d.ts +22 -45
  45. package/dist/plugin/fields/index.d.ts.map +1 -1
  46. package/dist/plugin/fields/index.js +25 -30
  47. package/dist/plugin/fields/index.js.map +1 -1
  48. package/dist/plugin/fields/json.d.ts +71 -9
  49. package/dist/plugin/fields/json.d.ts.map +1 -1
  50. package/dist/plugin/fields/json.js +110 -16
  51. package/dist/plugin/fields/json.js.map +1 -1
  52. package/dist/plugin/fields/link.d.ts +96 -0
  53. package/dist/plugin/fields/link.d.ts.map +1 -0
  54. package/dist/plugin/fields/link.js +160 -0
  55. package/dist/plugin/fields/link.js.map +1 -0
  56. package/dist/plugin/fields/number.d.ts +86 -13
  57. package/dist/plugin/fields/number.d.ts.map +1 -1
  58. package/dist/plugin/fields/number.js +133 -20
  59. package/dist/plugin/fields/number.js.map +1 -1
  60. package/dist/plugin/fields/range.d.ts +101 -17
  61. package/dist/plugin/fields/range.d.ts.map +1 -1
  62. package/dist/plugin/fields/range.js +153 -38
  63. package/dist/plugin/fields/range.js.map +1 -1
  64. package/dist/plugin/fields/reference.d.ts +171 -0
  65. package/dist/plugin/fields/reference.d.ts.map +1 -0
  66. package/dist/plugin/fields/reference.js +193 -0
  67. package/dist/plugin/fields/reference.js.map +1 -0
  68. package/dist/plugin/fields/repeater.d.ts +111 -8
  69. package/dist/plugin/fields/repeater.d.ts.map +1 -1
  70. package/dist/plugin/fields/repeater.js +157 -66
  71. package/dist/plugin/fields/repeater.js.map +1 -1
  72. package/dist/plugin/fields/richtext-validate.d.ts +7 -0
  73. package/dist/plugin/fields/richtext-validate.d.ts.map +1 -1
  74. package/dist/plugin/fields/richtext-validate.js +11 -5
  75. package/dist/plugin/fields/richtext-validate.js.map +1 -1
  76. package/dist/plugin/fields/richtext.d.ts +78 -12
  77. package/dist/plugin/fields/richtext.d.ts.map +1 -1
  78. package/dist/plugin/fields/richtext.js +121 -26
  79. package/dist/plugin/fields/richtext.js.map +1 -1
  80. package/dist/plugin/fields/select.d.ts +150 -10
  81. package/dist/plugin/fields/select.d.ts.map +1 -1
  82. package/dist/plugin/fields/select.js +205 -17
  83. package/dist/plugin/fields/select.js.map +1 -1
  84. package/dist/plugin/fields/sub-fields.d.ts +12 -0
  85. package/dist/plugin/fields/sub-fields.d.ts.map +1 -0
  86. package/dist/plugin/fields/sub-fields.js +62 -0
  87. package/dist/plugin/fields/sub-fields.js.map +1 -0
  88. package/dist/plugin/fields/temporal.d.ts +124 -0
  89. package/dist/plugin/fields/temporal.d.ts.map +1 -0
  90. package/dist/plugin/fields/temporal.js +180 -0
  91. package/dist/plugin/fields/temporal.js.map +1 -0
  92. package/dist/plugin/fields/term.d.ts +11 -16
  93. package/dist/plugin/fields/term.d.ts.map +1 -1
  94. package/dist/plugin/fields/term.js +11 -19
  95. package/dist/plugin/fields/term.js.map +1 -1
  96. package/dist/plugin/fields/toggle.d.ts +97 -0
  97. package/dist/plugin/fields/toggle.d.ts.map +1 -0
  98. package/dist/plugin/fields/toggle.js +135 -0
  99. package/dist/plugin/fields/toggle.js.map +1 -0
  100. package/dist/plugin/fields/user.d.ts +14 -26
  101. package/dist/plugin/fields/user.d.ts.map +1 -1
  102. package/dist/plugin/fields/user.js +11 -25
  103. package/dist/plugin/fields/user.js.map +1 -1
  104. package/dist/plugin/lookup.d.ts +70 -1
  105. package/dist/plugin/lookup.d.ts.map +1 -1
  106. package/dist/plugin/manifest.d.ts +308 -128
  107. package/dist/plugin/manifest.d.ts.map +1 -1
  108. package/dist/plugin/manifest.js +94 -4
  109. package/dist/plugin/manifest.js.map +1 -1
  110. package/dist/plugin/setup-context.d.ts +5 -4
  111. package/dist/plugin/setup-context.d.ts.map +1 -1
  112. package/dist/plugin/setup-context.js +10 -3
  113. package/dist/plugin/setup-context.js.map +1 -1
  114. package/dist/plugin/validation/meta-box-fields.d.ts.map +1 -1
  115. package/dist/plugin/validation/meta-box-fields.js +16 -0
  116. package/dist/plugin/validation/meta-box-fields.js.map +1 -1
  117. package/dist/route/render/build-resolved-entries.d.ts.map +1 -1
  118. package/dist/route/render/build-resolved-entries.js +7 -2
  119. package/dist/route/render/build-resolved-entries.js.map +1 -1
  120. package/dist/route/render/render-template.d.ts.map +1 -1
  121. package/dist/route/render/render-template.js +12 -2
  122. package/dist/route/render/render-template.js.map +1 -1
  123. package/dist/route/render/template-builders.d.ts +15 -10
  124. package/dist/route/render/template-builders.d.ts.map +1 -1
  125. package/dist/route/render/template-builders.js.map +1 -1
  126. package/dist/rpc/base.d.ts +7 -0
  127. package/dist/rpc/base.d.ts.map +1 -1
  128. package/dist/rpc/errors.d.ts +7 -0
  129. package/dist/rpc/errors.d.ts.map +1 -1
  130. package/dist/rpc/errors.js +16 -0
  131. package/dist/rpc/errors.js.map +1 -1
  132. package/dist/rpc/meta/core.d.ts +89 -10
  133. package/dist/rpc/meta/core.d.ts.map +1 -1
  134. package/dist/rpc/meta/core.js +465 -282
  135. package/dist/rpc/meta/core.js.map +1 -1
  136. package/dist/rpc/meta/field-messages.d.ts +67 -0
  137. package/dist/rpc/meta/field-messages.d.ts.map +1 -0
  138. package/dist/rpc/meta/field-messages.js +67 -0
  139. package/dist/rpc/meta/field-messages.js.map +1 -0
  140. package/dist/rpc/meta/field-pipeline.d.ts +52 -0
  141. package/dist/rpc/meta/field-pipeline.d.ts.map +1 -0
  142. package/dist/rpc/meta/field-pipeline.js +501 -0
  143. package/dist/rpc/meta/field-pipeline.js.map +1 -0
  144. package/dist/rpc/procedures/auth/allowed-domains/create.d.ts +7 -0
  145. package/dist/rpc/procedures/auth/allowed-domains/create.d.ts.map +1 -1
  146. package/dist/rpc/procedures/auth/allowed-domains/delete.d.ts +7 -0
  147. package/dist/rpc/procedures/auth/allowed-domains/delete.d.ts.map +1 -1
  148. package/dist/rpc/procedures/auth/allowed-domains/index.d.ts +28 -0
  149. package/dist/rpc/procedures/auth/allowed-domains/index.d.ts.map +1 -1
  150. package/dist/rpc/procedures/auth/allowed-domains/list.d.ts +7 -0
  151. package/dist/rpc/procedures/auth/allowed-domains/list.d.ts.map +1 -1
  152. package/dist/rpc/procedures/auth/allowed-domains/update.d.ts +7 -0
  153. package/dist/rpc/procedures/auth/allowed-domains/update.d.ts.map +1 -1
  154. package/dist/rpc/procedures/auth/api-tokens/admin-list.d.ts +7 -0
  155. package/dist/rpc/procedures/auth/api-tokens/admin-list.d.ts.map +1 -1
  156. package/dist/rpc/procedures/auth/api-tokens/admin-revoke.d.ts +7 -0
  157. package/dist/rpc/procedures/auth/api-tokens/admin-revoke.d.ts.map +1 -1
  158. package/dist/rpc/procedures/auth/api-tokens/create.d.ts +7 -0
  159. package/dist/rpc/procedures/auth/api-tokens/create.d.ts.map +1 -1
  160. package/dist/rpc/procedures/auth/api-tokens/index.d.ts +35 -0
  161. package/dist/rpc/procedures/auth/api-tokens/index.d.ts.map +1 -1
  162. package/dist/rpc/procedures/auth/api-tokens/list.d.ts +7 -0
  163. package/dist/rpc/procedures/auth/api-tokens/list.d.ts.map +1 -1
  164. package/dist/rpc/procedures/auth/api-tokens/revoke.d.ts +7 -0
  165. package/dist/rpc/procedures/auth/api-tokens/revoke.d.ts.map +1 -1
  166. package/dist/rpc/procedures/auth/credentials/delete.d.ts +7 -0
  167. package/dist/rpc/procedures/auth/credentials/delete.d.ts.map +1 -1
  168. package/dist/rpc/procedures/auth/credentials/index.d.ts +21 -0
  169. package/dist/rpc/procedures/auth/credentials/index.d.ts.map +1 -1
  170. package/dist/rpc/procedures/auth/credentials/list.d.ts +7 -0
  171. package/dist/rpc/procedures/auth/credentials/list.d.ts.map +1 -1
  172. package/dist/rpc/procedures/auth/credentials/rename.d.ts +7 -0
  173. package/dist/rpc/procedures/auth/credentials/rename.d.ts.map +1 -1
  174. package/dist/rpc/procedures/auth/device-flow/approve.d.ts +7 -0
  175. package/dist/rpc/procedures/auth/device-flow/approve.d.ts.map +1 -1
  176. package/dist/rpc/procedures/auth/device-flow/deny.d.ts +7 -0
  177. package/dist/rpc/procedures/auth/device-flow/deny.d.ts.map +1 -1
  178. package/dist/rpc/procedures/auth/device-flow/index.d.ts +21 -0
  179. package/dist/rpc/procedures/auth/device-flow/index.d.ts.map +1 -1
  180. package/dist/rpc/procedures/auth/device-flow/lookup.d.ts +7 -0
  181. package/dist/rpc/procedures/auth/device-flow/lookup.d.ts.map +1 -1
  182. package/dist/rpc/procedures/auth/index.d.ts +154 -0
  183. package/dist/rpc/procedures/auth/index.d.ts.map +1 -1
  184. package/dist/rpc/procedures/auth/login-links.d.ts +7 -0
  185. package/dist/rpc/procedures/auth/login-links.d.ts.map +1 -1
  186. package/dist/rpc/procedures/auth/mailer/index.d.ts +7 -0
  187. package/dist/rpc/procedures/auth/mailer/index.d.ts.map +1 -1
  188. package/dist/rpc/procedures/auth/mailer/test-send.d.ts +7 -0
  189. package/dist/rpc/procedures/auth/mailer/test-send.d.ts.map +1 -1
  190. package/dist/rpc/procedures/auth/oauth-providers.d.ts +7 -0
  191. package/dist/rpc/procedures/auth/oauth-providers.d.ts.map +1 -1
  192. package/dist/rpc/procedures/auth/session.d.ts +7 -0
  193. package/dist/rpc/procedures/auth/session.d.ts.map +1 -1
  194. package/dist/rpc/procedures/auth/sessions/index.d.ts +21 -0
  195. package/dist/rpc/procedures/auth/sessions/index.d.ts.map +1 -1
  196. package/dist/rpc/procedures/auth/sessions/list.d.ts +7 -0
  197. package/dist/rpc/procedures/auth/sessions/list.d.ts.map +1 -1
  198. package/dist/rpc/procedures/auth/sessions/revoke-others.d.ts +7 -0
  199. package/dist/rpc/procedures/auth/sessions/revoke-others.d.ts.map +1 -1
  200. package/dist/rpc/procedures/auth/sessions/revoke.d.ts +7 -0
  201. package/dist/rpc/procedures/auth/sessions/revoke.d.ts.map +1 -1
  202. package/dist/rpc/procedures/entry/activity.d.ts +7 -0
  203. package/dist/rpc/procedures/entry/activity.d.ts.map +1 -1
  204. package/dist/rpc/procedures/entry/bulk.d.ts +21 -0
  205. package/dist/rpc/procedures/entry/bulk.d.ts.map +1 -1
  206. package/dist/rpc/procedures/entry/create-preview-link.d.ts +7 -0
  207. package/dist/rpc/procedures/entry/create-preview-link.d.ts.map +1 -1
  208. package/dist/rpc/procedures/entry/create.d.ts +8 -1
  209. package/dist/rpc/procedures/entry/create.d.ts.map +1 -1
  210. package/dist/rpc/procedures/entry/create.js +8 -8
  211. package/dist/rpc/procedures/entry/create.js.map +1 -1
  212. package/dist/rpc/procedures/entry/dashboard.d.ts +14 -0
  213. package/dist/rpc/procedures/entry/dashboard.d.ts.map +1 -1
  214. package/dist/rpc/procedures/entry/delete-permanent.d.ts +7 -0
  215. package/dist/rpc/procedures/entry/delete-permanent.d.ts.map +1 -1
  216. package/dist/rpc/procedures/entry/discard-draft.d.ts +7 -0
  217. package/dist/rpc/procedures/entry/discard-draft.d.ts.map +1 -1
  218. package/dist/rpc/procedures/entry/duplicate.d.ts +7 -0
  219. package/dist/rpc/procedures/entry/duplicate.d.ts.map +1 -1
  220. package/dist/rpc/procedures/entry/duplicate.js +2 -2
  221. package/dist/rpc/procedures/entry/duplicate.js.map +1 -1
  222. package/dist/rpc/procedures/entry/get.d.ts +7 -0
  223. package/dist/rpc/procedures/entry/get.d.ts.map +1 -1
  224. package/dist/rpc/procedures/entry/get.js +2 -2
  225. package/dist/rpc/procedures/entry/get.js.map +1 -1
  226. package/dist/rpc/procedures/entry/index.d.ts +156 -2
  227. package/dist/rpc/procedures/entry/index.d.ts.map +1 -1
  228. package/dist/rpc/procedures/entry/list.d.ts +7 -0
  229. package/dist/rpc/procedures/entry/list.d.ts.map +1 -1
  230. package/dist/rpc/procedures/entry/lookup.d.ts +8 -2
  231. package/dist/rpc/procedures/entry/lookup.d.ts.map +1 -1
  232. package/dist/rpc/procedures/entry/lookup.js +60 -1
  233. package/dist/rpc/procedures/entry/lookup.js.map +1 -1
  234. package/dist/rpc/procedures/entry/meta.d.ts +37 -3
  235. package/dist/rpc/procedures/entry/meta.d.ts.map +1 -1
  236. package/dist/rpc/procedures/entry/meta.js +63 -7
  237. package/dist/rpc/procedures/entry/meta.js.map +1 -1
  238. package/dist/rpc/procedures/entry/publish.d.ts +7 -0
  239. package/dist/rpc/procedures/entry/publish.d.ts.map +1 -1
  240. package/dist/rpc/procedures/entry/publish.js +6 -4
  241. package/dist/rpc/procedures/entry/publish.js.map +1 -1
  242. package/dist/rpc/procedures/entry/refresh-block-loader.d.ts +7 -0
  243. package/dist/rpc/procedures/entry/refresh-block-loader.d.ts.map +1 -1
  244. package/dist/rpc/procedures/entry/restore.d.ts +7 -0
  245. package/dist/rpc/procedures/entry/restore.d.ts.map +1 -1
  246. package/dist/rpc/procedures/entry/revisions.d.ts +56 -0
  247. package/dist/rpc/procedures/entry/revisions.d.ts.map +1 -1
  248. package/dist/rpc/procedures/entry/schemas.d.ts +2 -2
  249. package/dist/rpc/procedures/entry/schemas.d.ts.map +1 -1
  250. package/dist/rpc/procedures/entry/schemas.js +9 -2
  251. package/dist/rpc/procedures/entry/schemas.js.map +1 -1
  252. package/dist/rpc/procedures/entry/trash.d.ts +7 -0
  253. package/dist/rpc/procedures/entry/trash.d.ts.map +1 -1
  254. package/dist/rpc/procedures/entry/update.d.ts +8 -1
  255. package/dist/rpc/procedures/entry/update.d.ts.map +1 -1
  256. package/dist/rpc/procedures/entry/update.js +77 -18
  257. package/dist/rpc/procedures/entry/update.js.map +1 -1
  258. package/dist/rpc/procedures/lookup/index.d.ts +14 -0
  259. package/dist/rpc/procedures/lookup/index.d.ts.map +1 -1
  260. package/dist/rpc/procedures/lookup/list.d.ts +7 -0
  261. package/dist/rpc/procedures/lookup/list.d.ts.map +1 -1
  262. package/dist/rpc/procedures/lookup/resolve.d.ts +7 -0
  263. package/dist/rpc/procedures/lookup/resolve.d.ts.map +1 -1
  264. package/dist/rpc/procedures/lookup/resolve.js +1 -1
  265. package/dist/rpc/procedures/lookup/resolve.js.map +1 -1
  266. package/dist/rpc/procedures/search/index.d.ts +7 -0
  267. package/dist/rpc/procedures/search/index.d.ts.map +1 -1
  268. package/dist/rpc/procedures/settings/get.d.ts +7 -0
  269. package/dist/rpc/procedures/settings/get.d.ts.map +1 -1
  270. package/dist/rpc/procedures/settings/index.d.ts +14 -0
  271. package/dist/rpc/procedures/settings/index.d.ts.map +1 -1
  272. package/dist/rpc/procedures/settings/upsert.d.ts +7 -0
  273. package/dist/rpc/procedures/settings/upsert.d.ts.map +1 -1
  274. package/dist/rpc/procedures/settings/upsert.js +9 -0
  275. package/dist/rpc/procedures/settings/upsert.js.map +1 -1
  276. package/dist/rpc/procedures/term/create.d.ts +7 -0
  277. package/dist/rpc/procedures/term/create.d.ts.map +1 -1
  278. package/dist/rpc/procedures/term/create.js +3 -3
  279. package/dist/rpc/procedures/term/create.js.map +1 -1
  280. package/dist/rpc/procedures/term/delete.d.ts +7 -0
  281. package/dist/rpc/procedures/term/delete.d.ts.map +1 -1
  282. package/dist/rpc/procedures/term/get.d.ts +7 -0
  283. package/dist/rpc/procedures/term/get.d.ts.map +1 -1
  284. package/dist/rpc/procedures/term/index.d.ts +35 -0
  285. package/dist/rpc/procedures/term/index.d.ts.map +1 -1
  286. package/dist/rpc/procedures/term/list.d.ts +7 -0
  287. package/dist/rpc/procedures/term/list.d.ts.map +1 -1
  288. package/dist/rpc/procedures/term/lookup.d.ts +7 -2
  289. package/dist/rpc/procedures/term/lookup.d.ts.map +1 -1
  290. package/dist/rpc/procedures/term/lookup.js +26 -0
  291. package/dist/rpc/procedures/term/lookup.js.map +1 -1
  292. package/dist/rpc/procedures/term/meta.d.ts +3 -2
  293. package/dist/rpc/procedures/term/meta.d.ts.map +1 -1
  294. package/dist/rpc/procedures/term/meta.js +7 -5
  295. package/dist/rpc/procedures/term/meta.js.map +1 -1
  296. package/dist/rpc/procedures/term/update.d.ts +7 -0
  297. package/dist/rpc/procedures/term/update.d.ts.map +1 -1
  298. package/dist/rpc/procedures/term/update.js +4 -4
  299. package/dist/rpc/procedures/term/update.js.map +1 -1
  300. package/dist/rpc/procedures/user/cancel-email-change.d.ts +7 -0
  301. package/dist/rpc/procedures/user/cancel-email-change.d.ts.map +1 -1
  302. package/dist/rpc/procedures/user/delete.d.ts +7 -0
  303. package/dist/rpc/procedures/user/delete.d.ts.map +1 -1
  304. package/dist/rpc/procedures/user/disable.d.ts +7 -0
  305. package/dist/rpc/procedures/user/disable.d.ts.map +1 -1
  306. package/dist/rpc/procedures/user/enable.d.ts +7 -0
  307. package/dist/rpc/procedures/user/enable.d.ts.map +1 -1
  308. package/dist/rpc/procedures/user/get.d.ts +7 -0
  309. package/dist/rpc/procedures/user/get.d.ts.map +1 -1
  310. package/dist/rpc/procedures/user/get.js +2 -2
  311. package/dist/rpc/procedures/user/get.js.map +1 -1
  312. package/dist/rpc/procedures/user/index.d.ts +77 -0
  313. package/dist/rpc/procedures/user/index.d.ts.map +1 -1
  314. package/dist/rpc/procedures/user/invite.d.ts +7 -0
  315. package/dist/rpc/procedures/user/invite.d.ts.map +1 -1
  316. package/dist/rpc/procedures/user/list.d.ts +7 -0
  317. package/dist/rpc/procedures/user/list.d.ts.map +1 -1
  318. package/dist/rpc/procedures/user/lookup.d.ts +6 -2
  319. package/dist/rpc/procedures/user/lookup.d.ts.map +1 -1
  320. package/dist/rpc/procedures/user/lookup.js +29 -0
  321. package/dist/rpc/procedures/user/lookup.js.map +1 -1
  322. package/dist/rpc/procedures/user/meta.d.ts +3 -2
  323. package/dist/rpc/procedures/user/meta.d.ts.map +1 -1
  324. package/dist/rpc/procedures/user/meta.js +7 -5
  325. package/dist/rpc/procedures/user/meta.js.map +1 -1
  326. package/dist/rpc/procedures/user/pending-email-change.d.ts +7 -0
  327. package/dist/rpc/procedures/user/pending-email-change.d.ts.map +1 -1
  328. package/dist/rpc/procedures/user/request-email-change.d.ts +7 -0
  329. package/dist/rpc/procedures/user/request-email-change.d.ts.map +1 -1
  330. package/dist/rpc/procedures/user/set-locale.d.ts +7 -0
  331. package/dist/rpc/procedures/user/set-locale.d.ts.map +1 -1
  332. package/dist/rpc/procedures/user/update.d.ts +7 -0
  333. package/dist/rpc/procedures/user/update.d.ts.map +1 -1
  334. package/dist/rpc/procedures/user/update.js +4 -4
  335. package/dist/rpc/procedures/user/update.js.map +1 -1
  336. package/dist/rpc/router.d.ts +457 -2
  337. package/dist/rpc/router.d.ts.map +1 -1
  338. package/dist/rpc/validation.d.ts +1 -0
  339. package/dist/rpc/validation.d.ts.map +1 -1
  340. package/dist/rpc/validation.js +1 -0
  341. package/dist/rpc/validation.js.map +1 -1
  342. package/dist/runtime/dispatcher.d.ts.map +1 -1
  343. package/dist/runtime/dispatcher.js +20 -10
  344. package/dist/runtime/dispatcher.js.map +1 -1
  345. package/dist/seo/feed.d.ts.map +1 -1
  346. package/dist/seo/feed.js +7 -1
  347. package/dist/seo/feed.js.map +1 -1
  348. package/dist/settings-core.js +1 -1
  349. package/dist/settings-core.js.map +1 -1
  350. package/dist/template-registry.d.ts +0 -16
  351. package/dist/template-registry.d.ts.map +1 -1
  352. package/dist/terms/read-service.js +2 -2
  353. package/dist/terms/read-service.js.map +1 -1
  354. package/dist/test/traced-context.d.ts +1 -1
  355. package/dist/test/traced-context.d.ts.map +1 -1
  356. package/dist/test/traced-context.js +2 -2
  357. package/dist/test/traced-context.js.map +1 -1
  358. package/package.json +2 -2
  359. package/dist/plugin/fields/checkbox.d.ts +0 -19
  360. package/dist/plugin/fields/checkbox.d.ts.map +0 -1
  361. package/dist/plugin/fields/checkbox.js +0 -20
  362. package/dist/plugin/fields/checkbox.js.map +0 -1
  363. package/dist/plugin/fields/date.d.ts +0 -24
  364. package/dist/plugin/fields/date.d.ts.map +0 -1
  365. package/dist/plugin/fields/date.js +0 -23
  366. package/dist/plugin/fields/date.js.map +0 -1
  367. package/dist/plugin/fields/datetime.d.ts +0 -26
  368. package/dist/plugin/fields/datetime.d.ts.map +0 -1
  369. package/dist/plugin/fields/datetime.js +0 -25
  370. package/dist/plugin/fields/datetime.js.map +0 -1
  371. package/dist/plugin/fields/email.d.ts +0 -17
  372. package/dist/plugin/fields/email.d.ts.map +0 -1
  373. package/dist/plugin/fields/email.js +0 -18
  374. package/dist/plugin/fields/email.js.map +0 -1
  375. package/dist/plugin/fields/entry-list.d.ts +0 -28
  376. package/dist/plugin/fields/entry-list.d.ts.map +0 -1
  377. package/dist/plugin/fields/entry-list.js +0 -31
  378. package/dist/plugin/fields/entry-list.js.map +0 -1
  379. package/dist/plugin/fields/multiselect.d.ts +0 -21
  380. package/dist/plugin/fields/multiselect.d.ts.map +0 -1
  381. package/dist/plugin/fields/multiselect.js +0 -43
  382. package/dist/plugin/fields/multiselect.js.map +0 -1
  383. package/dist/plugin/fields/password.d.ts +0 -24
  384. package/dist/plugin/fields/password.d.ts.map +0 -1
  385. package/dist/plugin/fields/password.js +0 -25
  386. package/dist/plugin/fields/password.js.map +0 -1
  387. package/dist/plugin/fields/radio.d.ts +0 -16
  388. package/dist/plugin/fields/radio.d.ts.map +0 -1
  389. package/dist/plugin/fields/radio.js +0 -17
  390. package/dist/plugin/fields/radio.js.map +0 -1
  391. package/dist/plugin/fields/repeater-validate.d.ts +0 -34
  392. package/dist/plugin/fields/repeater-validate.d.ts.map +0 -1
  393. package/dist/plugin/fields/repeater-validate.js +0 -104
  394. package/dist/plugin/fields/repeater-validate.js.map +0 -1
  395. package/dist/plugin/fields/term-list.d.ts +0 -27
  396. package/dist/plugin/fields/term-list.d.ts.map +0 -1
  397. package/dist/plugin/fields/term-list.js +0 -30
  398. package/dist/plugin/fields/term-list.js.map +0 -1
  399. package/dist/plugin/fields/text.d.ts +0 -37
  400. package/dist/plugin/fields/text.d.ts.map +0 -1
  401. package/dist/plugin/fields/text.js +0 -31
  402. package/dist/plugin/fields/text.js.map +0 -1
  403. package/dist/plugin/fields/textarea.d.ts +0 -20
  404. package/dist/plugin/fields/textarea.d.ts.map +0 -1
  405. package/dist/plugin/fields/textarea.js +0 -21
  406. package/dist/plugin/fields/textarea.js.map +0 -1
  407. package/dist/plugin/fields/time.d.ts +0 -24
  408. package/dist/plugin/fields/time.d.ts.map +0 -1
  409. package/dist/plugin/fields/time.js +0 -23
  410. package/dist/plugin/fields/time.js.map +0 -1
  411. package/dist/plugin/fields/url.d.ts +0 -17
  412. package/dist/plugin/fields/url.d.ts.map +0 -1
  413. package/dist/plugin/fields/url.js +0 -18
  414. package/dist/plugin/fields/url.js.map +0 -1
  415. package/dist/plugin/fields/user-list.d.ts +0 -29
  416. package/dist/plugin/fields/user-list.d.ts.map +0 -1
  417. package/dist/plugin/fields/user-list.js +0 -31
  418. package/dist/plugin/fields/user-list.js.map +0 -1
@@ -11,6 +11,7 @@ import type { CustomArchiveData } from "../route/render/resolved-entry.js";
11
11
  import type { NamedTemplateChoice } from "../route/render/template-builders.js";
12
12
  import type { RegisteredTemplateDep } from "../template-deps.js";
13
13
  import type { PluginI18nSlot } from "./define.js";
14
+ import type { MetaFieldCondition } from "./fields/condition.js";
14
15
  import type { RegisteredLookupAdapter } from "./lookup.js";
15
16
  export type { NamedTemplateChoice } from "../route/render/template-builders.js";
16
17
  export { NAMED_TEMPLATE_META_KEY } from "../route/render/template-builders.js";
@@ -236,6 +237,13 @@ export declare function manifestEntryVisibility(entry: Pick<EntryTypeManifestEnt
236
237
  readonly showInSidebar: boolean;
237
238
  };
238
239
  export type MetaScalarType = "string" | "number" | "boolean" | "json";
240
+ /**
241
+ * Stored shape of a field's `.validate()` callback. Sync or async;
242
+ * `true` means valid, a `Label` is the failure message surfaced to the
243
+ * editor. The fluent chain types the parameter with the field's
244
+ * narrowed value type; the definition stores it broad.
245
+ */
246
+ export type MetaBoxFieldValidate = (value: unknown) => true | Label | Promise<true | Label>;
239
247
  export interface MetaBoxFieldOption {
240
248
  readonly value: string;
241
249
  readonly label: Label;
@@ -255,6 +263,8 @@ export type MetaBoxFieldSpan = number | {
255
263
  readonly md?: number;
256
264
  readonly lg?: number;
257
265
  };
266
+ export type { MetaFieldCondition, MetaFieldConditionOperator, MetaFieldConditionRule, } from "./fields/condition.js";
267
+ export { isFieldVisible } from "./fields/condition.js";
258
268
  /**
259
269
  * Shared shape for every meta-box field variant — properties carried
260
270
  * regardless of `inputType`. Each narrowed variant of `MetaBoxField`
@@ -276,6 +286,16 @@ export interface MetaBoxFieldBase {
276
286
  * whitelisting, or normalising shape.
277
287
  */
278
288
  readonly sanitize?: (value: unknown) => unknown;
289
+ /**
290
+ * Custom validation predicate — see `MetaBoxFieldValidate`. Executed
291
+ * server-side by the constraint walker, after `.sanitize()` and the
292
+ * declarative constraints.
293
+ */
294
+ readonly validate?: MetaBoxFieldValidate;
295
+ /** Static adornment rendered before the input (e.g. a URL scheme). */
296
+ readonly prepend?: Label;
297
+ /** Static adornment rendered after the input (e.g. a unit suffix). */
298
+ readonly append?: Label;
279
299
  /** Default surfaced in the admin form when the key has no saved value. */
280
300
  readonly default?: unknown;
281
301
  /** Optional help text rendered under the label on every input type. */
@@ -303,27 +323,42 @@ export interface MetaBoxFieldBase {
303
323
  * so internal fields never leak by default. Has no effect on the admin RPC.
304
324
  */
305
325
  readonly showInApi?: boolean;
326
+ /**
327
+ * Conditional visibility — OR-of-AND rule groups addressing sibling
328
+ * driver fields by key, authored via the builders'
329
+ * `.visibleWhen()` / `.orVisibleWhen()` chains. Semantics live in
330
+ * `isFieldVisible`.
331
+ */
332
+ readonly visibleWhen?: MetaFieldCondition;
306
333
  }
334
+ /** The five string-scalar input types sharing one field shape. */
335
+ export type StringInputType = "text" | "textarea" | "email" | "url" | "password";
307
336
  /**
308
- * The narrowed `text` field variant produced by the `text()` builder
309
- * helper exported from `plumix/fields`. The builder rejects options
310
- * that don't apply to a text input (e.g. `min`, `step`, `options`) at
311
- * the type level; downstream consumers can rely on the narrowed shape
312
- * via the `inputType` discriminator.
337
+ * Shared shape of the five string scalar variants produced by the
338
+ * fluent builders exported from `plumix/fields` they differ only in
339
+ * their `inputType` literal. Downstream consumers rely on the narrowed
340
+ * shape via the `inputType` discriminator.
313
341
  */
314
- export interface TextMetaBoxField extends MetaBoxFieldBase {
315
- readonly inputType: "text";
342
+ export interface StringMetaBoxField<I extends StringInputType = StringInputType> extends MetaBoxFieldBase {
343
+ readonly inputType: I;
316
344
  readonly type: "string";
317
345
  readonly placeholder?: Label;
318
346
  readonly maxLength?: number;
319
347
  }
348
+ /** Single-line text input. */
349
+ export type TextMetaBoxField = StringMetaBoxField<"text">;
320
350
  /** Multi-line text input. Storage shape mirrors `text`. */
321
- export interface TextareaMetaBoxField extends MetaBoxFieldBase {
322
- readonly inputType: "textarea";
323
- readonly type: "string";
324
- readonly placeholder?: Label;
325
- readonly maxLength?: number;
326
- }
351
+ export type TextareaMetaBoxField = StringMetaBoxField<"textarea">;
352
+ /** RFC-5322-shaped email input. */
353
+ export type EmailMetaBoxField = StringMetaBoxField<"email">;
354
+ /** URL input. */
355
+ export type UrlMetaBoxField = StringMetaBoxField<"url">;
356
+ /**
357
+ * Masked-input password field. Visually hides characters in the admin
358
+ * so values aren't shoulder-surfable in shared sessions; storage
359
+ * shape mirrors `text`.
360
+ */
361
+ export type PasswordMetaBoxField = StringMetaBoxField<"password">;
327
362
  /** Numeric input with optional `min` / `max` / `step` bounds. */
328
363
  export interface NumberMetaBoxField extends MetaBoxFieldBase {
329
364
  readonly inputType: "number";
@@ -333,75 +368,73 @@ export interface NumberMetaBoxField extends MetaBoxFieldBase {
333
368
  readonly max?: number;
334
369
  readonly step?: number;
335
370
  }
336
- /** RFC-5322-shaped email input. */
337
- export interface EmailMetaBoxField extends MetaBoxFieldBase {
338
- readonly inputType: "email";
339
- readonly type: "string";
340
- readonly placeholder?: Label;
341
- readonly maxLength?: number;
342
- }
343
- /** URL input. */
344
- export interface UrlMetaBoxField extends MetaBoxFieldBase {
345
- readonly inputType: "url";
346
- readonly type: "string";
347
- readonly placeholder?: Label;
348
- readonly maxLength?: number;
349
- }
371
+ /** The three temporal input types sharing one field shape. */
372
+ export type TemporalInputType = "date" | "datetime" | "time";
350
373
  /**
351
- * Masked-input password field. Visually hides characters in the admin
352
- * so values aren't shoulder-surfable in shared sessions; storage
353
- * shape mirrors `text`.
374
+ * Shared shape of the three temporal variants produced by the fluent
375
+ * builders they differ only in their `inputType` literal and the
376
+ * ISO shape of the stored string. `min` / `max` bounds use the same
377
+ * format as the stored value; the constraint walker enforces them
378
+ * server-side (ISO shapes compare lexicographically in temporal
379
+ * order).
380
+ *
381
+ * `returns: "date"` opts the field's reads into a decode-time
382
+ * projection: the stored ISO string is handed to consumers as a JS
383
+ * `Date` with its wall-clock components anchored to UTC (a `time`
384
+ * value anchors to 1970-01-01 UTC). Storage and the write contract
385
+ * stay ISO strings either way.
354
386
  */
355
- export interface PasswordMetaBoxField extends MetaBoxFieldBase {
356
- readonly inputType: "password";
387
+ export interface TemporalMetaBoxField<I extends TemporalInputType = TemporalInputType> extends MetaBoxFieldBase {
388
+ readonly inputType: I;
357
389
  readonly type: "string";
358
- readonly placeholder?: Label;
359
- readonly maxLength?: number;
390
+ readonly min?: string;
391
+ readonly max?: string;
392
+ readonly returns?: "date";
360
393
  }
394
+ /**
395
+ * Format a UTC-anchored `Date` into the ISO string shape a temporal
396
+ * field stores (`YYYY-MM-DD`, `YYYY-MM-DDTHH:MM[:SS]`, `HH:MM[:SS]`).
397
+ * Seconds appear only when nonzero, mirroring what the native inputs
398
+ * emit. Shared by the server-side meta write encoder and the admin's
399
+ * input prefill so the two can't drift; callers guard invalid Dates.
400
+ */
401
+ export declare function formatTemporalValue(inputType: TemporalInputType, value: Date): string;
402
+ export declare function isTemporalInputType(inputType: string): inputType is TemporalInputType;
403
+ /**
404
+ * Anchor a stored temporal string to a UTC-parseable form — `date` at
405
+ * UTC midnight, `time` on 1970-01-01 UTC. The single source of the
406
+ * anchoring rule shared by the read-side `Date` projection and the
407
+ * write-side validity check, which must stay exact inverses of
408
+ * `formatTemporalValue`.
409
+ */
410
+ export declare function anchorTemporalUtc(inputType: TemporalInputType, value: string): string;
411
+ /** Whether a string is a well-formed stored value (shape + real
412
+ * wall-clock) for the given temporal input type. */
413
+ export declare function isValidTemporalValue(inputType: TemporalInputType, value: string): boolean;
361
414
  /**
362
415
  * Date-only field. Stored as `YYYY-MM-DD` (ISO 8601 calendar date,
363
- * no time, no timezone). Optional `min` / `max` bounds use the same
364
- * format and are enforced as registration-time validation only —
365
- * server-side bound enforcement is deferred to a later release.
416
+ * no time, no timezone).
366
417
  */
367
- export interface DateMetaBoxField extends MetaBoxFieldBase {
368
- readonly inputType: "date";
369
- readonly type: "string";
370
- readonly min?: string;
371
- readonly max?: string;
372
- }
418
+ export type DateMetaBoxField = TemporalMetaBoxField<"date">;
373
419
  /**
374
420
  * Date + time field. Stored as a partial ISO 8601 string
375
421
  * (`YYYY-MM-DDTHH:MM` with optional `:SS`) reflecting whatever the
376
- * author's browser produced via `<input type="datetime-local">`. A
377
- * future iteration may bake in the browser's timezone offset so the
378
- * wall-clock semantics survive cross-region reads; today's storage is
379
- * naive local time and consumers anchor to a timezone explicitly via
380
- * `parseMetaDate` + their own `Temporal.ZonedDateTime` shaping if
381
- * needed.
382
- */
383
- export interface DateTimeMetaBoxField extends MetaBoxFieldBase {
384
- readonly inputType: "datetime";
385
- readonly type: "string";
386
- readonly min?: string;
387
- readonly max?: string;
388
- }
422
+ * author's browser produced via `<input type="datetime-local">`
423
+ * naive local time, no timezone offset baked in. Consumers who need
424
+ * timezone semantics anchor explicitly via `parseMetaDate` + their
425
+ * own `Temporal.ZonedDateTime` shaping.
426
+ */
427
+ export type DateTimeMetaBoxField = TemporalMetaBoxField<"datetime">;
389
428
  /**
390
429
  * Time-only field. Stored as `HH:MM` (with optional `:SS`). No date
391
430
  * anchor, no timezone — useful for "open at 09:00" style values where
392
431
  * the calendar date is supplied separately.
393
432
  */
394
- export interface TimeMetaBoxField extends MetaBoxFieldBase {
395
- readonly inputType: "time";
396
- readonly type: "string";
397
- readonly min?: string;
398
- readonly max?: string;
399
- }
433
+ export type TimeMetaBoxField = TemporalMetaBoxField<"time">;
400
434
  /**
401
435
  * Hex color picker. Stored as a `#xxxxxx` string (the format the
402
- * native `<input type="color">` produces). The builder injects a
403
- * default sanitizer that rejects values that don't match the hex
404
- * shape on write.
436
+ * native `<input type="color">` produces). The constraint walker
437
+ * rejects non-hex values (and lowercases) on write.
405
438
  */
406
439
  export interface ColorMetaBoxField extends MetaBoxFieldBase {
407
440
  readonly inputType: "color";
@@ -410,8 +443,8 @@ export interface ColorMetaBoxField extends MetaBoxFieldBase {
410
443
  /**
411
444
  * Bounded numeric slider. Renders as `<input type="range">`. `min` /
412
445
  * `max` are required so the slider has a concrete range; `step`
413
- * defaults to `1`. The builder injects a default sanitizer that
414
- * enforces the bounds on write.
446
+ * defaults to `1`. The constraint walker enforces the bounds on
447
+ * write.
415
448
  */
416
449
  export interface RangeMetaBoxField extends MetaBoxFieldBase {
417
450
  readonly inputType: "range";
@@ -420,18 +453,6 @@ export interface RangeMetaBoxField extends MetaBoxFieldBase {
420
453
  readonly max: number;
421
454
  readonly step?: number;
422
455
  }
423
- /**
424
- * Multi-value picker over a fixed option list. Storage is a JSON
425
- * array of option `value` strings. Renders as a toggle group in the
426
- * admin so authors see all options at once. The builder ships a
427
- * default sanitizer that rejects values outside the declared
428
- * options.
429
- */
430
- export interface MultiselectMetaBoxField extends MetaBoxFieldBase {
431
- readonly inputType: "multiselect";
432
- readonly type: "json";
433
- readonly options: readonly MetaBoxFieldOption[];
434
- }
435
456
  /**
436
457
  * Free-form JSON value. Storage round-trips through the JSON
437
458
  * serializer so any structure that survives `JSON.stringify`
@@ -451,6 +472,14 @@ export interface JsonMetaBoxField extends MetaBoxFieldBase {
451
472
  * that calls the lookup RPC with `{ kind, scope }` — picker UI is
452
473
  * one component, target-specific knowledge lives in the adapter.
453
474
  */
475
+ /**
476
+ * Read-projection opt-out carried on a reference field. `"id"` makes the
477
+ * field's reads yield the bare stored id(s) instead of the resolved
478
+ * summary — the read pipeline skips the batched hydration join (and its
479
+ * orphan-stripping) for that field. Storage and the write contract are
480
+ * unaffected. Authored via the builder's `.returns("id")`.
481
+ */
482
+ export type ReferenceReadProjection = "id";
454
483
  export interface ReferenceTarget<TScope = unknown> {
455
484
  readonly kind: string;
456
485
  readonly scope?: TScope;
@@ -472,6 +501,8 @@ export interface UserMetaBoxField extends MetaBoxFieldBase {
472
501
  readonly inputType: "user";
473
502
  readonly type: "string";
474
503
  readonly referenceTarget: ReferenceTarget;
504
+ /** `.returns("id")`: reads yield the bare stored id, skipping the read-time hydration join. See {@link ReferenceReadProjection}. */
505
+ readonly returns?: ReferenceReadProjection;
475
506
  }
476
507
  /**
477
508
  * Multi user reference. Storage is a JSON array of bare user ids
@@ -484,6 +515,8 @@ export interface UserListMetaBoxField extends MetaBoxFieldBase {
484
515
  readonly inputType: "userList";
485
516
  readonly type: "json";
486
517
  readonly referenceTarget: ReferenceTarget;
518
+ /** `.returns("id")`: reads yield the bare stored id, skipping the read-time hydration join. See {@link ReferenceReadProjection}. */
519
+ readonly returns?: ReferenceReadProjection;
487
520
  /** Max items allowed in the array. Omitted = unbounded. */
488
521
  readonly max?: number;
489
522
  }
@@ -493,14 +526,15 @@ export interface UserListMetaBoxField extends MetaBoxFieldBase {
493
526
  * trashed. `referenceTarget.scope` carries `entryTypes` (the only
494
527
  * entry-type names this field accepts).
495
528
  *
496
- * Naming note: the `Reference` infix avoids the collision with
497
- * `EntryMetaBoxField` further down the latter is the per-variant
498
- * Omit-distributive union for fields inside an entry meta box.
529
+ * Naming note: the `Reference` infix keeps the name clear of the
530
+ * entry-meta-box option types (`EntryMetaBoxOptions` and friends).
499
531
  */
500
532
  export interface EntryReferenceMetaBoxField extends MetaBoxFieldBase {
501
533
  readonly inputType: "entry";
502
534
  readonly type: "string";
503
535
  readonly referenceTarget: ReferenceTarget;
536
+ /** `.returns("id")`: reads yield the bare stored id, skipping the read-time hydration join. See {@link ReferenceReadProjection}. */
537
+ readonly returns?: ReferenceReadProjection;
504
538
  }
505
539
  /**
506
540
  * Multi entry reference. Storage is a JSON array of bare entry ids;
@@ -513,6 +547,8 @@ export interface EntryListMetaBoxField extends MetaBoxFieldBase {
513
547
  readonly inputType: "entryList";
514
548
  readonly type: "json";
515
549
  readonly referenceTarget: ReferenceTarget;
550
+ /** `.returns("id")`: reads yield the bare stored id, skipping the read-time hydration join. See {@link ReferenceReadProjection}. */
551
+ readonly returns?: ReferenceReadProjection;
516
552
  /** Max items allowed in the array. Omitted = unbounded. */
517
553
  readonly max?: number;
518
554
  }
@@ -526,6 +562,8 @@ export interface TermReferenceMetaBoxField extends MetaBoxFieldBase {
526
562
  readonly inputType: "term";
527
563
  readonly type: "string";
528
564
  readonly referenceTarget: ReferenceTarget;
565
+ /** `.returns("id")`: reads yield the bare stored id, skipping the read-time hydration join. See {@link ReferenceReadProjection}. */
566
+ readonly returns?: ReferenceReadProjection;
529
567
  }
530
568
  /**
531
569
  * Multi term reference. Storage is a JSON array of bare term ids;
@@ -538,6 +576,8 @@ export interface TermListMetaBoxField extends MetaBoxFieldBase {
538
576
  readonly inputType: "termList";
539
577
  readonly type: "json";
540
578
  readonly referenceTarget: ReferenceTarget;
579
+ /** `.returns("id")`: reads yield the bare stored id, skipping the read-time hydration join. See {@link ReferenceReadProjection}. */
580
+ readonly returns?: ReferenceReadProjection;
541
581
  /** Max items allowed in the array. Omitted = unbounded. */
542
582
  readonly max?: number;
543
583
  }
@@ -554,6 +594,8 @@ export interface MediaMetaBoxField extends MetaBoxFieldBase {
554
594
  readonly inputType: "media";
555
595
  readonly type: "json";
556
596
  readonly referenceTarget: ReferenceTarget;
597
+ /** `.returns("id")`: reads yield the bare stored id, skipping the read-time hydration join. See {@link ReferenceReadProjection}. */
598
+ readonly returns?: ReferenceReadProjection;
557
599
  }
558
600
  /**
559
601
  * Multi media reference. Storage is a JSON array of bare media ids;
@@ -565,6 +607,8 @@ export interface MediaListMetaBoxField extends MetaBoxFieldBase {
565
607
  readonly inputType: "mediaList";
566
608
  readonly type: "json";
567
609
  readonly referenceTarget: ReferenceTarget;
610
+ /** `.returns("id")`: reads yield the bare stored id, skipping the read-time hydration join. See {@link ReferenceReadProjection}. */
611
+ readonly returns?: ReferenceReadProjection;
568
612
  /** Max items allowed in the array. Omitted = unbounded. */
569
613
  readonly max?: number;
570
614
  }
@@ -587,8 +631,8 @@ export interface MediaListMetaBoxField extends MetaBoxFieldBase {
587
631
  * toolbar surfaces only the buttons that match the allowlist.
588
632
  *
589
633
  * Replaces the dropped `markdown` and `code` standalone field types —
590
- * `richtext({ nodes: ["codeBlock"] })` covers code-in-meta;
591
- * `richtext({ marks: ["bold","italic","link"], nodes: ["bulletList","orderedList"] })`
634
+ * `richtext("body").nodes(["codeBlock"])` covers code-in-meta;
635
+ * `richtext("body").marks(["bold","italic","link"]).nodes(["bulletList","orderedList"])`
592
636
  * covers markdown-shaped formatting.
593
637
  */
594
638
  export interface RichtextMetaBoxField extends MetaBoxFieldBase {
@@ -599,19 +643,33 @@ export interface RichtextMetaBoxField extends MetaBoxFieldBase {
599
643
  readonly blocks?: readonly string[];
600
644
  }
601
645
  /**
602
- * Flat list of structured rows. Each row carries the same fixed schema
646
+ * Admin layout for a repeater's rows. `block` (the default) stacks each
647
+ * row's fields vertically in a bordered card; `row` lays a single row's
648
+ * fields out inline on one line; `table` renders the rows as aligned
649
+ * table lines with a shared subfield header. A pure-UI axis — the
650
+ * stored value shape is identical across layouts.
651
+ */
652
+ export type RepeaterLayout = "block" | "row" | "table";
653
+ /**
654
+ * Width of the admin row-editor dialog. A pure-UI hint: `sm` suits a
655
+ * couple of narrow fields, `md` (the default) the common case, `lg` a
656
+ * dense multi-column row. Maps to a max-width in the admin; the stored
657
+ * row shape is unaffected.
658
+ */
659
+ export type RepeaterDialogSize = "sm" | "md" | "lg";
660
+ /**
661
+ * List of structured rows. Each row carries the same fixed schema
603
662
  * declared via `subFields`; mixed-row "flexible content" is explicitly
604
- * out of scope. Subfields may be any registered field type *except*
605
- * another repeater nesting is rejected at registration time so v0.1
606
- * doesn't ship recursive UX (lift later non-breakingly if a real use
607
- * case appears).
663
+ * out of scope. Subfields may be any registered field type, including
664
+ * nested repeaters and groups types recurse through arbitrarily
665
+ * nested rows.
608
666
  *
609
667
  * Storage rides on the `json` primitive so any JSON-serialisable row
610
- * shape survives the wire. The auto-injected sanitizer drops rows
611
- * where every subfield value is empty (`null` / `undefined` / `""`),
612
- * then enforces optional `min` / `max` row counts. "Empty" is strictly
668
+ * shape survives the wire. The constraint walker drops rows where
669
+ * every subfield value is empty (`null` / `undefined` / `""`), then
670
+ * enforces optional `min` / `max` row counts. "Empty" is strictly
613
671
  * those three: a row whose only populated subfield is `0` (number) or
614
- * `false` (checkbox) survives — those are real values.
672
+ * `false` (toggle) survives — those are real values.
615
673
  */
616
674
  export interface RepeaterMetaBoxField extends MetaBoxFieldBase {
617
675
  readonly inputType: "repeater";
@@ -619,23 +677,100 @@ export interface RepeaterMetaBoxField extends MetaBoxFieldBase {
619
677
  readonly subFields: readonly MetaBoxField[];
620
678
  readonly min?: number;
621
679
  readonly max?: number;
680
+ /** Custom label for the add-row button (default "Add row"). */
681
+ readonly addLabel?: Label;
682
+ /** Admin row layout — see {@link RepeaterLayout}. Defaults to `block`. */
683
+ readonly layout?: RepeaterLayout;
684
+ /**
685
+ * Sub-field key whose stored value labels a collapsed row. Setting it
686
+ * makes rows collapsible in the admin and each collapsed row shows the
687
+ * chosen sub-field's value as its summary.
688
+ */
689
+ readonly collapsed?: string;
690
+ /** Row-editor dialog width — see {@link RepeaterDialogSize}. Defaults to `md`. */
691
+ readonly dialogSize?: RepeaterDialogSize;
622
692
  }
623
- /** Single-value dropdown picker; `options` is required. */
624
- export interface SelectMetaBoxField extends MetaBoxFieldBase {
693
+ /**
694
+ * A named group of fields stored as a nested object under the group's
695
+ * own key — no key-flattening. `fields` declares the members; each
696
+ * member may be any registered field type, including nested repeaters
697
+ * and further groups (types recurse). Storage rides on the `json`
698
+ * primitive as a plain record keyed by member field key.
699
+ */
700
+ export interface GroupMetaBoxField extends MetaBoxFieldBase {
701
+ readonly inputType: "group";
702
+ readonly type: "json";
703
+ readonly fields: readonly MetaBoxField[];
704
+ }
705
+ /**
706
+ * Pure-UI control axis for choice fields. Maps to the admin's existing
707
+ * controls — dropdown, radio group, toggle-button group, checkbox
708
+ * list — and never changes the value shape. Cardinality restricts the
709
+ * legal values (`radio` is single-only, `checkboxes` multi-only); the
710
+ * fluent builder enforces that at compile time. Absent means the
711
+ * cardinality default: dropdown for single, buttons for multiple.
712
+ */
713
+ export type SelectAppearance = "select" | "radio" | "buttons" | "checkboxes";
714
+ /** Single-value choice — storage is the selected option value string. */
715
+ export interface SingleSelectMetaBoxField extends MetaBoxFieldBase {
625
716
  readonly inputType: "select";
626
717
  readonly type: "string";
627
718
  readonly options: readonly MetaBoxFieldOption[];
719
+ readonly multiple?: false;
720
+ readonly appearance?: SelectAppearance;
628
721
  }
629
- /** Single-value radio group; `options` is required. */
630
- export interface RadioMetaBoxField extends MetaBoxFieldBase {
631
- readonly inputType: "radio";
632
- readonly type: "string";
722
+ /** Multi-value choice storage is a JSON array of option value strings. */
723
+ export interface MultiSelectMetaBoxField extends MetaBoxFieldBase {
724
+ readonly inputType: "select";
725
+ readonly type: "json";
633
726
  readonly options: readonly MetaBoxFieldOption[];
727
+ readonly multiple: true;
728
+ /**
729
+ * Selection-count cap. Carried on the definition and the wire today;
730
+ * server-side enforcement lands with the generic constraint walker.
731
+ */
732
+ readonly max?: number;
733
+ readonly appearance?: SelectAppearance;
634
734
  }
635
- /** Boolean checkbox — storage type pinned to `boolean`. */
636
- export interface CheckboxMetaBoxField extends MetaBoxFieldBase {
637
- readonly inputType: "checkbox";
735
+ /**
736
+ * Choice field over a fixed option list. Cardinality and storage type
737
+ * are correlated variants — `multiple` requires `type: "json"` — so an
738
+ * object literal can't declare an array-emitting control over scalar
739
+ * storage.
740
+ */
741
+ export type SelectMetaBoxField = SingleSelectMetaBoxField | MultiSelectMetaBoxField;
742
+ /**
743
+ * Boolean switch — storage type pinned to `boolean`. Renders as the
744
+ * admin's switch control; `onText` / `offText` label the current state
745
+ * beside it.
746
+ */
747
+ export interface ToggleMetaBoxField extends MetaBoxFieldBase {
748
+ readonly inputType: "toggle";
638
749
  readonly type: "boolean";
750
+ readonly onText?: Label;
751
+ readonly offText?: Label;
752
+ }
753
+ /**
754
+ * Stored value of a `link` field — a CTA-shaped destination. `url` is
755
+ * either an internal path (starts with `/`, produced by the admin's
756
+ * entry picker resolving an entry to its permalink) or an external
757
+ * absolute URL. `label` is the optional link text; `newTab` opts the
758
+ * rendered anchor into `target="_blank"`.
759
+ */
760
+ export interface LinkValue {
761
+ readonly url: string;
762
+ readonly label?: string;
763
+ readonly newTab?: boolean;
764
+ }
765
+ /**
766
+ * CTA-style link field authored via `link()`. Storage rides on the
767
+ * `json` primitive as a `LinkValue`; the injected sanitizer rejects
768
+ * malformed shapes and URLs on write.
769
+ */
770
+ export interface LinkMetaBoxField extends MetaBoxFieldBase {
771
+ readonly inputType: "link";
772
+ readonly type: "json";
773
+ readonly placeholder?: Label;
639
774
  }
640
775
  /**
641
776
  * Catch-all variant for any `inputType` not narrowed into a dedicated
@@ -667,7 +802,26 @@ export interface LegacyMetaBoxField extends MetaBoxFieldBase {
667
802
  * `registerFieldType` registrations and broad object-literal authoring
668
803
  * compiling unchanged.
669
804
  */
670
- export type MetaBoxField = TextMetaBoxField | TextareaMetaBoxField | NumberMetaBoxField | EmailMetaBoxField | UrlMetaBoxField | PasswordMetaBoxField | DateMetaBoxField | DateTimeMetaBoxField | TimeMetaBoxField | ColorMetaBoxField | RangeMetaBoxField | MultiselectMetaBoxField | JsonMetaBoxField | UserMetaBoxField | UserListMetaBoxField | EntryReferenceMetaBoxField | EntryListMetaBoxField | TermReferenceMetaBoxField | TermListMetaBoxField | MediaMetaBoxField | MediaListMetaBoxField | RichtextMetaBoxField | RepeaterMetaBoxField | SelectMetaBoxField | RadioMetaBoxField | CheckboxMetaBoxField | LegacyMetaBoxField;
805
+ export type MetaBoxField = StringMetaBoxField | NumberMetaBoxField | TemporalMetaBoxField | ColorMetaBoxField | RangeMetaBoxField | JsonMetaBoxField | UserMetaBoxField | UserListMetaBoxField | EntryReferenceMetaBoxField | EntryListMetaBoxField | TermReferenceMetaBoxField | TermListMetaBoxField | MediaMetaBoxField | MediaListMetaBoxField | RichtextMetaBoxField | RepeaterMetaBoxField | GroupMetaBoxField | SelectMetaBoxField | ToggleMetaBoxField | LinkMetaBoxField | LegacyMetaBoxField;
806
+ /**
807
+ * A fluent field builder — an immutable chain that compiles to a
808
+ * narrowed `MetaBoxField` variant. Chain method names (`label`,
809
+ * `default`, `sanitize`, …) collide with the definition's data
810
+ * properties, so a builder can't structurally *be* its definition;
811
+ * registration surfaces accept either shape and call `build()` on
812
+ * builders at registration time.
813
+ */
814
+ export interface FieldBuilder<F extends MetaBoxField = MetaBoxField> {
815
+ build(): F;
816
+ }
817
+ /**
818
+ * What `fields` arrays accept on every registration surface: a fluent
819
+ * builder or a compiled field definition (object-literal authoring and
820
+ * `registerFieldType` custom fields).
821
+ */
822
+ export type MetaBoxFieldInput = MetaBoxField | FieldBuilder;
823
+ /** Compile a `fields` array down to definitions — builders build, plain definitions pass through. */
824
+ export declare function compileMetaBoxFields(fields: readonly MetaBoxFieldInput[]): readonly MetaBoxField[];
671
825
  /**
672
826
  * Shared base for every "card of fields" registration surface — entry
673
827
  * meta boxes, term meta boxes, user meta boxes, and settings groups.
@@ -691,28 +845,17 @@ export interface MetaBoxBaseOptions {
691
845
  readonly description?: Label;
692
846
  readonly priority?: number;
693
847
  readonly capability?: string;
694
- readonly fields: readonly MetaBoxField[];
848
+ readonly fields: readonly MetaBoxFieldInput[];
695
849
  }
696
- /**
697
- * Field shape for entry meta boxes. Drops `span` from the shared
698
- * `MetaBoxField` — the editor's document rail is a fixed 256px column,
699
- * so side-by-side layouts can't fit legibly. Compile-time signal to
700
- * plugin authors that spans are a page-width affordance only (term,
701
- * user, settings).
702
- *
703
- * `Omit<MetaBoxField, "span">` would normally distribute over the
704
- * union, but TS's excess-property check across a many-variant
705
- * distributed `Omit` gets pessimistic and starts rejecting options
706
- * that exist only on a subset of variants. The explicit per-variant
707
- * union below preserves the same shape with stable inference.
708
- */
709
- export type EntryMetaBoxField = Omit<TextMetaBoxField, "span"> | Omit<TextareaMetaBoxField, "span"> | Omit<NumberMetaBoxField, "span"> | Omit<EmailMetaBoxField, "span"> | Omit<UrlMetaBoxField, "span"> | Omit<PasswordMetaBoxField, "span"> | Omit<DateMetaBoxField, "span"> | Omit<DateTimeMetaBoxField, "span"> | Omit<TimeMetaBoxField, "span"> | Omit<ColorMetaBoxField, "span"> | Omit<RangeMetaBoxField, "span"> | Omit<MultiselectMetaBoxField, "span"> | Omit<JsonMetaBoxField, "span"> | Omit<UserMetaBoxField, "span"> | Omit<UserListMetaBoxField, "span"> | Omit<EntryReferenceMetaBoxField, "span"> | Omit<EntryListMetaBoxField, "span"> | Omit<TermReferenceMetaBoxField, "span"> | Omit<TermListMetaBoxField, "span"> | Omit<MediaMetaBoxField, "span"> | Omit<MediaListMetaBoxField, "span"> | Omit<RichtextMetaBoxField, "span"> | Omit<RepeaterMetaBoxField, "span"> | Omit<SelectMetaBoxField, "span"> | Omit<RadioMetaBoxField, "span"> | Omit<CheckboxMetaBoxField, "span"> | Omit<LegacyMetaBoxField, "span">;
710
850
  /**
711
851
  * Meta box shown on the entry editor. Scoped by `entryTypes`. Renders
712
852
  * as a collapsible section in the editor's document rail, which is
713
- * fixed at 256px — fields always occupy the full row.
853
+ * fixed at 256px — fields always occupy the full row. `span` is
854
+ * accepted like on every other surface but ignored at render (a
855
+ * universal hint narrow surfaces don't honor), and stripped from the
856
+ * entry wire projection.
714
857
  */
715
- export interface EntryMetaBoxOptions extends Omit<MetaBoxBaseOptions, "fields"> {
858
+ export interface EntryMetaBoxOptions extends MetaBoxBaseOptions {
716
859
  /**
717
860
  * @deprecated The entry editor no longer partitions meta boxes by
718
861
  * location — every registered box renders as a collapsible section in
@@ -722,7 +865,6 @@ export interface EntryMetaBoxOptions extends Omit<MetaBoxBaseOptions, "fields">
722
865
  */
723
866
  readonly location?: "bottom" | "sidebar";
724
867
  readonly entryTypes: readonly string[];
725
- readonly fields: readonly EntryMetaBoxField[];
726
868
  }
727
869
  /** Meta box shown on the termTaxonomy term edit form. Scoped by `termTaxonomies`. */
728
870
  export interface TermMetaBoxOptions extends MetaBoxBaseOptions {
@@ -769,18 +911,22 @@ export interface RegisteredTermTaxonomy extends TermTaxonomyOptions {
769
911
  export interface RegisteredEntryMetaBox extends EntryMetaBoxOptions {
770
912
  readonly id: string;
771
913
  readonly registeredBy: string | null;
914
+ readonly fields: readonly MetaBoxField[];
772
915
  }
773
916
  export interface RegisteredTermMetaBox extends TermMetaBoxOptions {
774
917
  readonly id: string;
775
918
  readonly registeredBy: string | null;
919
+ readonly fields: readonly MetaBoxField[];
776
920
  }
777
921
  export interface RegisteredUserMetaBox extends UserMetaBoxOptions {
778
922
  readonly id: string;
779
923
  readonly registeredBy: string | null;
924
+ readonly fields: readonly MetaBoxField[];
780
925
  }
781
926
  export interface RegisteredSettingsGroup extends SettingsGroupOptions {
782
927
  readonly name: string;
783
928
  readonly registeredBy: string | null;
929
+ readonly fields: readonly MetaBoxField[];
784
930
  }
785
931
  export interface RegisteredSettingsPage extends SettingsPageOptions {
786
932
  readonly name: string;
@@ -1122,6 +1268,14 @@ export declare function createPluginRegistry(): MutablePluginRegistry;
1122
1268
  * so "first match" is the only match.
1123
1269
  */
1124
1270
  export declare function findEntryMetaField(registry: PluginRegistry, entryType: string, key: string): MetaBoxField | undefined;
1271
+ /**
1272
+ * Every `MetaBoxField` registered for an entry type, across all its meta
1273
+ * boxes. Used by the publish gate to validate a promoted bag against the
1274
+ * full schema — so a required field ABSENT from the bag is caught, not
1275
+ * just one stored empty. Key uniqueness per (entryType, key) holds at
1276
+ * registration, so no de-duplication is needed.
1277
+ */
1278
+ export declare function listEntryMetaFields(registry: PluginRegistry, entryType: string): readonly MetaBoxField[];
1125
1279
  /**
1126
1280
  * Like `findEntryMetaField`, but for term meta. Scoped by termTaxonomy.
1127
1281
  */
@@ -1207,6 +1361,9 @@ export interface MetaBoxFieldManifestEntry {
1207
1361
  readonly inputType: string;
1208
1362
  readonly description?: Label;
1209
1363
  readonly required?: boolean;
1364
+ /** Static input adornments — see `MetaBoxFieldBase.prepend` / `.append`. */
1365
+ readonly prepend?: Label;
1366
+ readonly append?: Label;
1210
1367
  readonly placeholder?: Label;
1211
1368
  readonly maxLength?: number;
1212
1369
  /**
@@ -1219,6 +1376,13 @@ export interface MetaBoxFieldManifestEntry {
1219
1376
  readonly max?: number | string;
1220
1377
  readonly step?: number;
1221
1378
  readonly options?: readonly MetaBoxFieldOption[];
1379
+ /** Choice-field cardinality — `select` fields store an array when set. */
1380
+ readonly multiple?: boolean;
1381
+ /** Choice-field control variant — see `SelectAppearance`. */
1382
+ readonly appearance?: SelectAppearance;
1383
+ /** Toggle switch state labels — see `ToggleMetaBoxField`. */
1384
+ readonly onText?: Label;
1385
+ readonly offText?: Label;
1222
1386
  readonly default?: unknown;
1223
1387
  readonly span?: MetaBoxFieldSpan;
1224
1388
  /**
@@ -1237,16 +1401,31 @@ export interface MetaBoxFieldManifestEntry {
1237
1401
  readonly nodes?: readonly string[];
1238
1402
  readonly blocks?: readonly string[];
1239
1403
  /**
1240
- * Repeater subfield manifest, keyed positionally same shape as a
1241
- * top-level field minus `span` (rows are full-width). Sanitize
1242
- * callbacks are stripped from the wire shape; the admin recurses
1243
- * through this list when rendering each row.
1404
+ * Child-field manifest for the composite field types repeater row
1405
+ * schema and group members alike, keyed positionally, same shape as a
1406
+ * top-level field. Children keep their `span`: the row-editor dialog and
1407
+ * group grid lay them out on a 12-column grid that honours it. Sanitize
1408
+ * callbacks are stripped from the wire shape; the admin recurses through
1409
+ * this list when rendering each row / group. The renderer dispatches on
1410
+ * `inputType` (`repeater` vs `group`) to interpret it.
1244
1411
  */
1245
- readonly subFields?: readonly EntryMetaBoxFieldManifestEntry[];
1412
+ readonly subFields?: readonly MetaBoxFieldManifestEntry[];
1413
+ /** Repeater add-row button label — see {@link RepeaterMetaBoxField.addLabel}. */
1414
+ readonly addLabel?: Label;
1415
+ /** Repeater row layout — see {@link RepeaterLayout}. */
1416
+ readonly layout?: RepeaterLayout;
1417
+ /** Repeater collapsed-row summary sub-field key — see {@link RepeaterMetaBoxField.collapsed}. */
1418
+ readonly collapsed?: string;
1419
+ /** Repeater row-editor dialog width — see {@link RepeaterDialogSize}. */
1420
+ readonly dialogSize?: RepeaterDialogSize;
1246
1421
  /**
1247
1422
  * Capability gate for the individual field. See `MetaBoxFieldBase.capability`.
1248
1423
  */
1249
1424
  readonly capability?: string;
1425
+ /**
1426
+ * Conditional visibility rules. See `MetaBoxFieldBase.visibleWhen`.
1427
+ */
1428
+ readonly visibleWhen?: MetaFieldCondition;
1250
1429
  }
1251
1430
  /**
1252
1431
  * Shared base for every "card of fields" serialised entry. Each
@@ -1261,8 +1440,9 @@ export interface MetaBoxBaseManifestEntry {
1261
1440
  readonly fields: readonly MetaBoxFieldManifestEntry[];
1262
1441
  }
1263
1442
  /**
1264
- * Wire-side mirror of `EntryMetaBoxField` — drops `span` from the
1265
- * shared `MetaBoxFieldManifestEntry`. See `EntryMetaBoxField` for why.
1443
+ * Entry-box wire field — drops `span` from the shared
1444
+ * `MetaBoxFieldManifestEntry`. The editor rail can't honor the hint
1445
+ * (see `EntryMetaBoxOptions`), so shipping it would just bloat the wire.
1266
1446
  */
1267
1447
  export type EntryMetaBoxFieldManifestEntry = Omit<MetaBoxFieldManifestEntry, "span">;
1268
1448
  export interface EntryMetaBoxManifestEntry extends Omit<MetaBoxBaseManifestEntry, "fields"> {