@plumix/core 0.5.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 (454) 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/context/app.d.ts +12 -0
  6. package/dist/context/app.d.ts.map +1 -1
  7. package/dist/context/app.js +10 -4
  8. package/dist/context/app.js.map +1 -1
  9. package/dist/context/memo.d.ts +22 -0
  10. package/dist/context/memo.d.ts.map +1 -0
  11. package/dist/context/memo.js +27 -0
  12. package/dist/context/memo.js.map +1 -0
  13. package/dist/context/traced-slots.d.ts +17 -0
  14. package/dist/context/traced-slots.d.ts.map +1 -0
  15. package/dist/context/traced-slots.js +57 -0
  16. package/dist/context/traced-slots.js.map +1 -0
  17. package/dist/entries/read-service.d.ts +6 -0
  18. package/dist/entries/read-service.d.ts.map +1 -1
  19. package/dist/entries/read-service.js +19 -3
  20. package/dist/entries/read-service.js.map +1 -1
  21. package/dist/index.d.ts +6 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +3 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/plugin/errors.d.ts +7 -1
  26. package/dist/plugin/errors.d.ts.map +1 -1
  27. package/dist/plugin/errors.js +5 -0
  28. package/dist/plugin/errors.js.map +1 -1
  29. package/dist/plugin/fields/builder.d.ts +106 -0
  30. package/dist/plugin/fields/builder.d.ts.map +1 -0
  31. package/dist/plugin/fields/builder.js +162 -0
  32. package/dist/plugin/fields/builder.js.map +1 -0
  33. package/dist/plugin/fields/color.d.ts +78 -18
  34. package/dist/plugin/fields/color.d.ts.map +1 -1
  35. package/dist/plugin/fields/color.js +116 -25
  36. package/dist/plugin/fields/color.js.map +1 -1
  37. package/dist/plugin/fields/condition.d.ts +40 -0
  38. package/dist/plugin/fields/condition.d.ts.map +1 -0
  39. package/dist/plugin/fields/condition.js +115 -0
  40. package/dist/plugin/fields/condition.js.map +1 -0
  41. package/dist/plugin/fields/contributions.d.ts +233 -0
  42. package/dist/plugin/fields/contributions.d.ts.map +1 -0
  43. package/dist/plugin/fields/contributions.js +1 -0
  44. package/dist/plugin/fields/contributions.js.map +1 -0
  45. package/dist/plugin/fields/entry.d.ts +24 -20
  46. package/dist/plugin/fields/entry.d.ts.map +1 -1
  47. package/dist/plugin/fields/entry.js +13 -21
  48. package/dist/plugin/fields/entry.js.map +1 -1
  49. package/dist/plugin/fields/errors.d.ts +23 -11
  50. package/dist/plugin/fields/errors.d.ts.map +1 -1
  51. package/dist/plugin/fields/errors.js +20 -13
  52. package/dist/plugin/fields/errors.js.map +1 -1
  53. package/dist/plugin/fields/group.d.ts +90 -0
  54. package/dist/plugin/fields/group.d.ts.map +1 -0
  55. package/dist/plugin/fields/group.js +124 -0
  56. package/dist/plugin/fields/group.js.map +1 -0
  57. package/dist/plugin/fields/index.d.ts +22 -45
  58. package/dist/plugin/fields/index.d.ts.map +1 -1
  59. package/dist/plugin/fields/index.js +25 -30
  60. package/dist/plugin/fields/index.js.map +1 -1
  61. package/dist/plugin/fields/json.d.ts +71 -9
  62. package/dist/plugin/fields/json.d.ts.map +1 -1
  63. package/dist/plugin/fields/json.js +110 -16
  64. package/dist/plugin/fields/json.js.map +1 -1
  65. package/dist/plugin/fields/link.d.ts +96 -0
  66. package/dist/plugin/fields/link.d.ts.map +1 -0
  67. package/dist/plugin/fields/link.js +160 -0
  68. package/dist/plugin/fields/link.js.map +1 -0
  69. package/dist/plugin/fields/number.d.ts +86 -13
  70. package/dist/plugin/fields/number.d.ts.map +1 -1
  71. package/dist/plugin/fields/number.js +133 -20
  72. package/dist/plugin/fields/number.js.map +1 -1
  73. package/dist/plugin/fields/range.d.ts +101 -17
  74. package/dist/plugin/fields/range.d.ts.map +1 -1
  75. package/dist/plugin/fields/range.js +153 -38
  76. package/dist/plugin/fields/range.js.map +1 -1
  77. package/dist/plugin/fields/reference.d.ts +171 -0
  78. package/dist/plugin/fields/reference.d.ts.map +1 -0
  79. package/dist/plugin/fields/reference.js +193 -0
  80. package/dist/plugin/fields/reference.js.map +1 -0
  81. package/dist/plugin/fields/repeater.d.ts +111 -8
  82. package/dist/plugin/fields/repeater.d.ts.map +1 -1
  83. package/dist/plugin/fields/repeater.js +157 -66
  84. package/dist/plugin/fields/repeater.js.map +1 -1
  85. package/dist/plugin/fields/richtext-validate.d.ts +7 -0
  86. package/dist/plugin/fields/richtext-validate.d.ts.map +1 -1
  87. package/dist/plugin/fields/richtext-validate.js +11 -5
  88. package/dist/plugin/fields/richtext-validate.js.map +1 -1
  89. package/dist/plugin/fields/richtext.d.ts +78 -12
  90. package/dist/plugin/fields/richtext.d.ts.map +1 -1
  91. package/dist/plugin/fields/richtext.js +121 -26
  92. package/dist/plugin/fields/richtext.js.map +1 -1
  93. package/dist/plugin/fields/select.d.ts +150 -10
  94. package/dist/plugin/fields/select.d.ts.map +1 -1
  95. package/dist/plugin/fields/select.js +205 -17
  96. package/dist/plugin/fields/select.js.map +1 -1
  97. package/dist/plugin/fields/sub-fields.d.ts +12 -0
  98. package/dist/plugin/fields/sub-fields.d.ts.map +1 -0
  99. package/dist/plugin/fields/sub-fields.js +62 -0
  100. package/dist/plugin/fields/sub-fields.js.map +1 -0
  101. package/dist/plugin/fields/temporal.d.ts +124 -0
  102. package/dist/plugin/fields/temporal.d.ts.map +1 -0
  103. package/dist/plugin/fields/temporal.js +180 -0
  104. package/dist/plugin/fields/temporal.js.map +1 -0
  105. package/dist/plugin/fields/term.d.ts +11 -16
  106. package/dist/plugin/fields/term.d.ts.map +1 -1
  107. package/dist/plugin/fields/term.js +11 -19
  108. package/dist/plugin/fields/term.js.map +1 -1
  109. package/dist/plugin/fields/toggle.d.ts +97 -0
  110. package/dist/plugin/fields/toggle.d.ts.map +1 -0
  111. package/dist/plugin/fields/toggle.js +135 -0
  112. package/dist/plugin/fields/toggle.js.map +1 -0
  113. package/dist/plugin/fields/user.d.ts +14 -26
  114. package/dist/plugin/fields/user.d.ts.map +1 -1
  115. package/dist/plugin/fields/user.js +11 -25
  116. package/dist/plugin/fields/user.js.map +1 -1
  117. package/dist/plugin/lookup.d.ts +74 -10
  118. package/dist/plugin/lookup.d.ts.map +1 -1
  119. package/dist/plugin/manifest.d.ts +319 -160
  120. package/dist/plugin/manifest.d.ts.map +1 -1
  121. package/dist/plugin/manifest.js +94 -4
  122. package/dist/plugin/manifest.js.map +1 -1
  123. package/dist/plugin/setup-context.d.ts +10 -4
  124. package/dist/plugin/setup-context.d.ts.map +1 -1
  125. package/dist/plugin/setup-context.js +10 -3
  126. package/dist/plugin/setup-context.js.map +1 -1
  127. package/dist/plugin/validation/meta-box-fields.d.ts.map +1 -1
  128. package/dist/plugin/validation/meta-box-fields.js +16 -0
  129. package/dist/plugin/validation/meta-box-fields.js.map +1 -1
  130. package/dist/route/render/asset-manifest.d.ts +1 -1
  131. package/dist/route/render/asset-manifest.d.ts.map +1 -1
  132. package/dist/route/render/asset-manifest.js +7 -1
  133. package/dist/route/render/asset-manifest.js.map +1 -1
  134. package/dist/route/render/build-resolved-entries.d.ts.map +1 -1
  135. package/dist/route/render/build-resolved-entries.js +25 -12
  136. package/dist/route/render/build-resolved-entries.js.map +1 -1
  137. package/dist/route/render/render-template.d.ts +1 -1
  138. package/dist/route/render/render-template.d.ts.map +1 -1
  139. package/dist/route/render/render-template.js +50 -23
  140. package/dist/route/render/render-template.js.map +1 -1
  141. package/dist/route/render/template-builders.d.ts +15 -10
  142. package/dist/route/render/template-builders.d.ts.map +1 -1
  143. package/dist/route/render/template-builders.js.map +1 -1
  144. package/dist/rpc/base.d.ts +7 -0
  145. package/dist/rpc/base.d.ts.map +1 -1
  146. package/dist/rpc/errors.d.ts +7 -0
  147. package/dist/rpc/errors.d.ts.map +1 -1
  148. package/dist/rpc/errors.js +16 -0
  149. package/dist/rpc/errors.js.map +1 -1
  150. package/dist/rpc/meta/core.d.ts +92 -14
  151. package/dist/rpc/meta/core.d.ts.map +1 -1
  152. package/dist/rpc/meta/core.js +524 -406
  153. package/dist/rpc/meta/core.js.map +1 -1
  154. package/dist/rpc/meta/field-messages.d.ts +67 -0
  155. package/dist/rpc/meta/field-messages.d.ts.map +1 -0
  156. package/dist/rpc/meta/field-messages.js +67 -0
  157. package/dist/rpc/meta/field-messages.js.map +1 -0
  158. package/dist/rpc/meta/field-pipeline.d.ts +52 -0
  159. package/dist/rpc/meta/field-pipeline.d.ts.map +1 -0
  160. package/dist/rpc/meta/field-pipeline.js +501 -0
  161. package/dist/rpc/meta/field-pipeline.js.map +1 -0
  162. package/dist/rpc/procedures/auth/allowed-domains/create.d.ts +7 -0
  163. package/dist/rpc/procedures/auth/allowed-domains/create.d.ts.map +1 -1
  164. package/dist/rpc/procedures/auth/allowed-domains/delete.d.ts +7 -0
  165. package/dist/rpc/procedures/auth/allowed-domains/delete.d.ts.map +1 -1
  166. package/dist/rpc/procedures/auth/allowed-domains/index.d.ts +28 -0
  167. package/dist/rpc/procedures/auth/allowed-domains/index.d.ts.map +1 -1
  168. package/dist/rpc/procedures/auth/allowed-domains/list.d.ts +7 -0
  169. package/dist/rpc/procedures/auth/allowed-domains/list.d.ts.map +1 -1
  170. package/dist/rpc/procedures/auth/allowed-domains/update.d.ts +7 -0
  171. package/dist/rpc/procedures/auth/allowed-domains/update.d.ts.map +1 -1
  172. package/dist/rpc/procedures/auth/api-tokens/admin-list.d.ts +7 -0
  173. package/dist/rpc/procedures/auth/api-tokens/admin-list.d.ts.map +1 -1
  174. package/dist/rpc/procedures/auth/api-tokens/admin-revoke.d.ts +7 -0
  175. package/dist/rpc/procedures/auth/api-tokens/admin-revoke.d.ts.map +1 -1
  176. package/dist/rpc/procedures/auth/api-tokens/create.d.ts +7 -0
  177. package/dist/rpc/procedures/auth/api-tokens/create.d.ts.map +1 -1
  178. package/dist/rpc/procedures/auth/api-tokens/index.d.ts +35 -0
  179. package/dist/rpc/procedures/auth/api-tokens/index.d.ts.map +1 -1
  180. package/dist/rpc/procedures/auth/api-tokens/list.d.ts +7 -0
  181. package/dist/rpc/procedures/auth/api-tokens/list.d.ts.map +1 -1
  182. package/dist/rpc/procedures/auth/api-tokens/revoke.d.ts +7 -0
  183. package/dist/rpc/procedures/auth/api-tokens/revoke.d.ts.map +1 -1
  184. package/dist/rpc/procedures/auth/credentials/delete.d.ts +7 -0
  185. package/dist/rpc/procedures/auth/credentials/delete.d.ts.map +1 -1
  186. package/dist/rpc/procedures/auth/credentials/index.d.ts +21 -0
  187. package/dist/rpc/procedures/auth/credentials/index.d.ts.map +1 -1
  188. package/dist/rpc/procedures/auth/credentials/list.d.ts +7 -0
  189. package/dist/rpc/procedures/auth/credentials/list.d.ts.map +1 -1
  190. package/dist/rpc/procedures/auth/credentials/rename.d.ts +7 -0
  191. package/dist/rpc/procedures/auth/credentials/rename.d.ts.map +1 -1
  192. package/dist/rpc/procedures/auth/device-flow/approve.d.ts +7 -0
  193. package/dist/rpc/procedures/auth/device-flow/approve.d.ts.map +1 -1
  194. package/dist/rpc/procedures/auth/device-flow/deny.d.ts +7 -0
  195. package/dist/rpc/procedures/auth/device-flow/deny.d.ts.map +1 -1
  196. package/dist/rpc/procedures/auth/device-flow/index.d.ts +21 -0
  197. package/dist/rpc/procedures/auth/device-flow/index.d.ts.map +1 -1
  198. package/dist/rpc/procedures/auth/device-flow/lookup.d.ts +7 -0
  199. package/dist/rpc/procedures/auth/device-flow/lookup.d.ts.map +1 -1
  200. package/dist/rpc/procedures/auth/index.d.ts +154 -0
  201. package/dist/rpc/procedures/auth/index.d.ts.map +1 -1
  202. package/dist/rpc/procedures/auth/login-links.d.ts +7 -0
  203. package/dist/rpc/procedures/auth/login-links.d.ts.map +1 -1
  204. package/dist/rpc/procedures/auth/mailer/index.d.ts +7 -0
  205. package/dist/rpc/procedures/auth/mailer/index.d.ts.map +1 -1
  206. package/dist/rpc/procedures/auth/mailer/test-send.d.ts +7 -0
  207. package/dist/rpc/procedures/auth/mailer/test-send.d.ts.map +1 -1
  208. package/dist/rpc/procedures/auth/oauth-providers.d.ts +7 -0
  209. package/dist/rpc/procedures/auth/oauth-providers.d.ts.map +1 -1
  210. package/dist/rpc/procedures/auth/session.d.ts +7 -0
  211. package/dist/rpc/procedures/auth/session.d.ts.map +1 -1
  212. package/dist/rpc/procedures/auth/sessions/index.d.ts +21 -0
  213. package/dist/rpc/procedures/auth/sessions/index.d.ts.map +1 -1
  214. package/dist/rpc/procedures/auth/sessions/list.d.ts +7 -0
  215. package/dist/rpc/procedures/auth/sessions/list.d.ts.map +1 -1
  216. package/dist/rpc/procedures/auth/sessions/revoke-others.d.ts +7 -0
  217. package/dist/rpc/procedures/auth/sessions/revoke-others.d.ts.map +1 -1
  218. package/dist/rpc/procedures/auth/sessions/revoke.d.ts +7 -0
  219. package/dist/rpc/procedures/auth/sessions/revoke.d.ts.map +1 -1
  220. package/dist/rpc/procedures/entry/activity.d.ts +7 -0
  221. package/dist/rpc/procedures/entry/activity.d.ts.map +1 -1
  222. package/dist/rpc/procedures/entry/bulk.d.ts +21 -0
  223. package/dist/rpc/procedures/entry/bulk.d.ts.map +1 -1
  224. package/dist/rpc/procedures/entry/create-preview-link.d.ts +7 -0
  225. package/dist/rpc/procedures/entry/create-preview-link.d.ts.map +1 -1
  226. package/dist/rpc/procedures/entry/create.d.ts +8 -1
  227. package/dist/rpc/procedures/entry/create.d.ts.map +1 -1
  228. package/dist/rpc/procedures/entry/create.js +8 -8
  229. package/dist/rpc/procedures/entry/create.js.map +1 -1
  230. package/dist/rpc/procedures/entry/dashboard.d.ts +14 -0
  231. package/dist/rpc/procedures/entry/dashboard.d.ts.map +1 -1
  232. package/dist/rpc/procedures/entry/delete-permanent.d.ts +7 -0
  233. package/dist/rpc/procedures/entry/delete-permanent.d.ts.map +1 -1
  234. package/dist/rpc/procedures/entry/discard-draft.d.ts +7 -0
  235. package/dist/rpc/procedures/entry/discard-draft.d.ts.map +1 -1
  236. package/dist/rpc/procedures/entry/duplicate.d.ts +7 -0
  237. package/dist/rpc/procedures/entry/duplicate.d.ts.map +1 -1
  238. package/dist/rpc/procedures/entry/duplicate.js +2 -2
  239. package/dist/rpc/procedures/entry/duplicate.js.map +1 -1
  240. package/dist/rpc/procedures/entry/get.d.ts +7 -0
  241. package/dist/rpc/procedures/entry/get.d.ts.map +1 -1
  242. package/dist/rpc/procedures/entry/get.js +2 -2
  243. package/dist/rpc/procedures/entry/get.js.map +1 -1
  244. package/dist/rpc/procedures/entry/index.d.ts +156 -2
  245. package/dist/rpc/procedures/entry/index.d.ts.map +1 -1
  246. package/dist/rpc/procedures/entry/list.d.ts +7 -0
  247. package/dist/rpc/procedures/entry/list.d.ts.map +1 -1
  248. package/dist/rpc/procedures/entry/lookup.d.ts +8 -2
  249. package/dist/rpc/procedures/entry/lookup.d.ts.map +1 -1
  250. package/dist/rpc/procedures/entry/lookup.js +74 -12
  251. package/dist/rpc/procedures/entry/lookup.js.map +1 -1
  252. package/dist/rpc/procedures/entry/meta.d.ts +37 -3
  253. package/dist/rpc/procedures/entry/meta.d.ts.map +1 -1
  254. package/dist/rpc/procedures/entry/meta.js +63 -7
  255. package/dist/rpc/procedures/entry/meta.js.map +1 -1
  256. package/dist/rpc/procedures/entry/publish.d.ts +7 -0
  257. package/dist/rpc/procedures/entry/publish.d.ts.map +1 -1
  258. package/dist/rpc/procedures/entry/publish.js +6 -4
  259. package/dist/rpc/procedures/entry/publish.js.map +1 -1
  260. package/dist/rpc/procedures/entry/refresh-block-loader.d.ts +7 -0
  261. package/dist/rpc/procedures/entry/refresh-block-loader.d.ts.map +1 -1
  262. package/dist/rpc/procedures/entry/restore.d.ts +7 -0
  263. package/dist/rpc/procedures/entry/restore.d.ts.map +1 -1
  264. package/dist/rpc/procedures/entry/revisions.d.ts +56 -0
  265. package/dist/rpc/procedures/entry/revisions.d.ts.map +1 -1
  266. package/dist/rpc/procedures/entry/schemas.d.ts +2 -2
  267. package/dist/rpc/procedures/entry/schemas.d.ts.map +1 -1
  268. package/dist/rpc/procedures/entry/schemas.js +9 -2
  269. package/dist/rpc/procedures/entry/schemas.js.map +1 -1
  270. package/dist/rpc/procedures/entry/trash.d.ts +7 -0
  271. package/dist/rpc/procedures/entry/trash.d.ts.map +1 -1
  272. package/dist/rpc/procedures/entry/update.d.ts +8 -1
  273. package/dist/rpc/procedures/entry/update.d.ts.map +1 -1
  274. package/dist/rpc/procedures/entry/update.js +77 -18
  275. package/dist/rpc/procedures/entry/update.js.map +1 -1
  276. package/dist/rpc/procedures/lookup/index.d.ts +14 -0
  277. package/dist/rpc/procedures/lookup/index.d.ts.map +1 -1
  278. package/dist/rpc/procedures/lookup/list.d.ts +7 -0
  279. package/dist/rpc/procedures/lookup/list.d.ts.map +1 -1
  280. package/dist/rpc/procedures/lookup/resolve.d.ts +7 -0
  281. package/dist/rpc/procedures/lookup/resolve.d.ts.map +1 -1
  282. package/dist/rpc/procedures/lookup/resolve.js +1 -1
  283. package/dist/rpc/procedures/lookup/resolve.js.map +1 -1
  284. package/dist/rpc/procedures/lookup.errors.d.ts +2 -1
  285. package/dist/rpc/procedures/lookup.errors.d.ts.map +1 -1
  286. package/dist/rpc/procedures/lookup.errors.js +3 -0
  287. package/dist/rpc/procedures/lookup.errors.js.map +1 -1
  288. package/dist/rpc/procedures/search/index.d.ts +7 -0
  289. package/dist/rpc/procedures/search/index.d.ts.map +1 -1
  290. package/dist/rpc/procedures/settings/get.d.ts +7 -0
  291. package/dist/rpc/procedures/settings/get.d.ts.map +1 -1
  292. package/dist/rpc/procedures/settings/index.d.ts +14 -0
  293. package/dist/rpc/procedures/settings/index.d.ts.map +1 -1
  294. package/dist/rpc/procedures/settings/upsert.d.ts +7 -0
  295. package/dist/rpc/procedures/settings/upsert.d.ts.map +1 -1
  296. package/dist/rpc/procedures/settings/upsert.js +9 -0
  297. package/dist/rpc/procedures/settings/upsert.js.map +1 -1
  298. package/dist/rpc/procedures/term/create.d.ts +7 -0
  299. package/dist/rpc/procedures/term/create.d.ts.map +1 -1
  300. package/dist/rpc/procedures/term/create.js +3 -3
  301. package/dist/rpc/procedures/term/create.js.map +1 -1
  302. package/dist/rpc/procedures/term/delete.d.ts +7 -0
  303. package/dist/rpc/procedures/term/delete.d.ts.map +1 -1
  304. package/dist/rpc/procedures/term/get.d.ts +7 -0
  305. package/dist/rpc/procedures/term/get.d.ts.map +1 -1
  306. package/dist/rpc/procedures/term/index.d.ts +35 -0
  307. package/dist/rpc/procedures/term/index.d.ts.map +1 -1
  308. package/dist/rpc/procedures/term/list.d.ts +7 -0
  309. package/dist/rpc/procedures/term/list.d.ts.map +1 -1
  310. package/dist/rpc/procedures/term/lookup.d.ts +7 -2
  311. package/dist/rpc/procedures/term/lookup.d.ts.map +1 -1
  312. package/dist/rpc/procedures/term/lookup.js +29 -8
  313. package/dist/rpc/procedures/term/lookup.js.map +1 -1
  314. package/dist/rpc/procedures/term/meta.d.ts +3 -2
  315. package/dist/rpc/procedures/term/meta.d.ts.map +1 -1
  316. package/dist/rpc/procedures/term/meta.js +7 -5
  317. package/dist/rpc/procedures/term/meta.js.map +1 -1
  318. package/dist/rpc/procedures/term/update.d.ts +7 -0
  319. package/dist/rpc/procedures/term/update.d.ts.map +1 -1
  320. package/dist/rpc/procedures/term/update.js +4 -4
  321. package/dist/rpc/procedures/term/update.js.map +1 -1
  322. package/dist/rpc/procedures/user/cancel-email-change.d.ts +7 -0
  323. package/dist/rpc/procedures/user/cancel-email-change.d.ts.map +1 -1
  324. package/dist/rpc/procedures/user/delete.d.ts +7 -0
  325. package/dist/rpc/procedures/user/delete.d.ts.map +1 -1
  326. package/dist/rpc/procedures/user/disable.d.ts +7 -0
  327. package/dist/rpc/procedures/user/disable.d.ts.map +1 -1
  328. package/dist/rpc/procedures/user/enable.d.ts +7 -0
  329. package/dist/rpc/procedures/user/enable.d.ts.map +1 -1
  330. package/dist/rpc/procedures/user/get.d.ts +7 -0
  331. package/dist/rpc/procedures/user/get.d.ts.map +1 -1
  332. package/dist/rpc/procedures/user/get.js +2 -2
  333. package/dist/rpc/procedures/user/get.js.map +1 -1
  334. package/dist/rpc/procedures/user/index.d.ts +77 -0
  335. package/dist/rpc/procedures/user/index.d.ts.map +1 -1
  336. package/dist/rpc/procedures/user/invite.d.ts +7 -0
  337. package/dist/rpc/procedures/user/invite.d.ts.map +1 -1
  338. package/dist/rpc/procedures/user/list.d.ts +7 -0
  339. package/dist/rpc/procedures/user/list.d.ts.map +1 -1
  340. package/dist/rpc/procedures/user/lookup.d.ts +6 -2
  341. package/dist/rpc/procedures/user/lookup.d.ts.map +1 -1
  342. package/dist/rpc/procedures/user/lookup.js +29 -0
  343. package/dist/rpc/procedures/user/lookup.js.map +1 -1
  344. package/dist/rpc/procedures/user/meta.d.ts +3 -2
  345. package/dist/rpc/procedures/user/meta.d.ts.map +1 -1
  346. package/dist/rpc/procedures/user/meta.js +7 -5
  347. package/dist/rpc/procedures/user/meta.js.map +1 -1
  348. package/dist/rpc/procedures/user/pending-email-change.d.ts +7 -0
  349. package/dist/rpc/procedures/user/pending-email-change.d.ts.map +1 -1
  350. package/dist/rpc/procedures/user/request-email-change.d.ts +7 -0
  351. package/dist/rpc/procedures/user/request-email-change.d.ts.map +1 -1
  352. package/dist/rpc/procedures/user/set-locale.d.ts +7 -0
  353. package/dist/rpc/procedures/user/set-locale.d.ts.map +1 -1
  354. package/dist/rpc/procedures/user/update.d.ts +7 -0
  355. package/dist/rpc/procedures/user/update.d.ts.map +1 -1
  356. package/dist/rpc/procedures/user/update.js +4 -4
  357. package/dist/rpc/procedures/user/update.js.map +1 -1
  358. package/dist/rpc/router.d.ts +457 -2
  359. package/dist/rpc/router.d.ts.map +1 -1
  360. package/dist/rpc/validation.d.ts +1 -0
  361. package/dist/rpc/validation.d.ts.map +1 -1
  362. package/dist/rpc/validation.js +1 -0
  363. package/dist/rpc/validation.js.map +1 -1
  364. package/dist/runtime/dispatcher.d.ts.map +1 -1
  365. package/dist/runtime/dispatcher.js +90 -39
  366. package/dist/runtime/dispatcher.js.map +1 -1
  367. package/dist/seo/feed.d.ts.map +1 -1
  368. package/dist/seo/feed.js +7 -1
  369. package/dist/seo/feed.js.map +1 -1
  370. package/dist/settings-core.js +1 -1
  371. package/dist/settings-core.js.map +1 -1
  372. package/dist/telemetry-otel.d.ts +29 -0
  373. package/dist/telemetry-otel.d.ts.map +1 -0
  374. package/dist/telemetry-otel.js +218 -0
  375. package/dist/telemetry-otel.js.map +1 -0
  376. package/dist/template-deps-core.d.ts.map +1 -1
  377. package/dist/template-deps-core.js +31 -14
  378. package/dist/template-deps-core.js.map +1 -1
  379. package/dist/template-deps.d.ts.map +1 -1
  380. package/dist/template-deps.js +12 -8
  381. package/dist/template-deps.js.map +1 -1
  382. package/dist/template-registry.d.ts +0 -16
  383. package/dist/template-registry.d.ts.map +1 -1
  384. package/dist/terms/read-service.js +2 -2
  385. package/dist/terms/read-service.js.map +1 -1
  386. package/dist/test/index.d.ts +3 -0
  387. package/dist/test/index.d.ts.map +1 -1
  388. package/dist/test/index.js +4 -0
  389. package/dist/test/index.js.map +1 -1
  390. package/dist/test/traced-context.d.ts +17 -0
  391. package/dist/test/traced-context.d.ts.map +1 -0
  392. package/dist/test/traced-context.js +28 -0
  393. package/dist/test/traced-context.js.map +1 -0
  394. package/package.json +6 -2
  395. package/dist/plugin/fields/checkbox.d.ts +0 -19
  396. package/dist/plugin/fields/checkbox.d.ts.map +0 -1
  397. package/dist/plugin/fields/checkbox.js +0 -20
  398. package/dist/plugin/fields/checkbox.js.map +0 -1
  399. package/dist/plugin/fields/date.d.ts +0 -24
  400. package/dist/plugin/fields/date.d.ts.map +0 -1
  401. package/dist/plugin/fields/date.js +0 -23
  402. package/dist/plugin/fields/date.js.map +0 -1
  403. package/dist/plugin/fields/datetime.d.ts +0 -26
  404. package/dist/plugin/fields/datetime.d.ts.map +0 -1
  405. package/dist/plugin/fields/datetime.js +0 -25
  406. package/dist/plugin/fields/datetime.js.map +0 -1
  407. package/dist/plugin/fields/email.d.ts +0 -17
  408. package/dist/plugin/fields/email.d.ts.map +0 -1
  409. package/dist/plugin/fields/email.js +0 -18
  410. package/dist/plugin/fields/email.js.map +0 -1
  411. package/dist/plugin/fields/entry-list.d.ts +0 -28
  412. package/dist/plugin/fields/entry-list.d.ts.map +0 -1
  413. package/dist/plugin/fields/entry-list.js +0 -31
  414. package/dist/plugin/fields/entry-list.js.map +0 -1
  415. package/dist/plugin/fields/multiselect.d.ts +0 -21
  416. package/dist/plugin/fields/multiselect.d.ts.map +0 -1
  417. package/dist/plugin/fields/multiselect.js +0 -43
  418. package/dist/plugin/fields/multiselect.js.map +0 -1
  419. package/dist/plugin/fields/password.d.ts +0 -24
  420. package/dist/plugin/fields/password.d.ts.map +0 -1
  421. package/dist/plugin/fields/password.js +0 -25
  422. package/dist/plugin/fields/password.js.map +0 -1
  423. package/dist/plugin/fields/radio.d.ts +0 -16
  424. package/dist/plugin/fields/radio.d.ts.map +0 -1
  425. package/dist/plugin/fields/radio.js +0 -17
  426. package/dist/plugin/fields/radio.js.map +0 -1
  427. package/dist/plugin/fields/repeater-validate.d.ts +0 -34
  428. package/dist/plugin/fields/repeater-validate.d.ts.map +0 -1
  429. package/dist/plugin/fields/repeater-validate.js +0 -104
  430. package/dist/plugin/fields/repeater-validate.js.map +0 -1
  431. package/dist/plugin/fields/term-list.d.ts +0 -27
  432. package/dist/plugin/fields/term-list.d.ts.map +0 -1
  433. package/dist/plugin/fields/term-list.js +0 -30
  434. package/dist/plugin/fields/term-list.js.map +0 -1
  435. package/dist/plugin/fields/text.d.ts +0 -37
  436. package/dist/plugin/fields/text.d.ts.map +0 -1
  437. package/dist/plugin/fields/text.js +0 -31
  438. package/dist/plugin/fields/text.js.map +0 -1
  439. package/dist/plugin/fields/textarea.d.ts +0 -20
  440. package/dist/plugin/fields/textarea.d.ts.map +0 -1
  441. package/dist/plugin/fields/textarea.js +0 -21
  442. package/dist/plugin/fields/textarea.js.map +0 -1
  443. package/dist/plugin/fields/time.d.ts +0 -24
  444. package/dist/plugin/fields/time.d.ts.map +0 -1
  445. package/dist/plugin/fields/time.js +0 -23
  446. package/dist/plugin/fields/time.js.map +0 -1
  447. package/dist/plugin/fields/url.d.ts +0 -17
  448. package/dist/plugin/fields/url.d.ts.map +0 -1
  449. package/dist/plugin/fields/url.js +0 -18
  450. package/dist/plugin/fields/url.js.map +0 -1
  451. package/dist/plugin/fields/user-list.d.ts +0 -29
  452. package/dist/plugin/fields/user-list.d.ts.map +0 -1
  453. package/dist/plugin/fields/user-list.js +0 -31
  454. package/dist/plugin/fields/user-list.js.map +0 -1
@@ -1,24 +0,0 @@
1
- import type { Label } from "../../i18n/label.js";
2
- import type { DateMetaBoxField, MetaBoxFieldSpan } from "../manifest.js";
3
- export interface DateFieldOptions {
4
- readonly key: string;
5
- readonly label: Label;
6
- /** ISO 8601 date string `YYYY-MM-DD`. Lower bound applied client-side. */
7
- readonly min?: string;
8
- /** ISO 8601 date string `YYYY-MM-DD`. Upper bound applied client-side. */
9
- readonly max?: string;
10
- readonly required?: boolean;
11
- readonly description?: Label;
12
- readonly default?: string;
13
- readonly span?: MetaBoxFieldSpan;
14
- readonly capability?: string;
15
- readonly sanitize?: (value: unknown) => unknown;
16
- }
17
- /**
18
- * Build a typed `date` meta-box field. Stored as a `YYYY-MM-DD`
19
- * calendar string; renders as a native `<input type="date">` in the
20
- * admin. Use `parseMetaDate` to coerce stored values into a JS `Date`
21
- * on the read side.
22
- */
23
- export declare function date(options: DateFieldOptions): DateMetaBoxField;
24
- //# sourceMappingURL=date.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACjD;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAehE"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Build a typed `date` meta-box field. Stored as a `YYYY-MM-DD`
3
- * calendar string; renders as a native `<input type="date">` in the
4
- * admin. Use `parseMetaDate` to coerce stored values into a JS `Date`
5
- * on the read side.
6
- */
7
- export function date(options) {
8
- return {
9
- key: options.key,
10
- label: options.label,
11
- type: "string",
12
- inputType: "date",
13
- min: options.min,
14
- max: options.max,
15
- required: options.required,
16
- description: options.description,
17
- default: options.default,
18
- span: options.span,
19
- capability: options.capability,
20
- sanitize: options.sanitize,
21
- };
22
- }
23
- //# sourceMappingURL=date.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.js","sourceRoot":"","sources":["../../../src/plugin/fields/date.ts"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,MAAM,UAAU,IAAI,CAAC,OAAyB;IAC5C,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,MAAM;QACjB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAC;AACJ,CAAC"}
@@ -1,26 +0,0 @@
1
- import type { Label } from "../../i18n/label.js";
2
- import type { DateTimeMetaBoxField, MetaBoxFieldSpan } from "../manifest.js";
3
- export interface DateTimeFieldOptions {
4
- readonly key: string;
5
- readonly label: Label;
6
- /** ISO 8601 datetime-local string (`YYYY-MM-DDTHH:MM`). */
7
- readonly min?: string;
8
- /** ISO 8601 datetime-local string (`YYYY-MM-DDTHH:MM`). */
9
- readonly max?: string;
10
- readonly required?: boolean;
11
- readonly description?: Label;
12
- readonly default?: string;
13
- readonly span?: MetaBoxFieldSpan;
14
- readonly capability?: string;
15
- readonly sanitize?: (value: unknown) => unknown;
16
- }
17
- /**
18
- * Build a typed `datetime` meta-box field. Storage is a partial ISO
19
- * 8601 string (`YYYY-MM-DDTHH:MM` with optional `:SS`) reflecting
20
- * what the author entered via `<input type="datetime-local">` —
21
- * naive local time, no timezone offset baked in. A future iteration
22
- * may upgrade storage to ISO with offset; consumers who need
23
- * timezone semantics today should anchor with `Temporal` or similar.
24
- */
25
- export declare function datetime(options: DateTimeFieldOptions): DateTimeMetaBoxField;
26
- //# sourceMappingURL=datetime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/datetime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,2DAA2D;IAC3D,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACjD;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,oBAAoB,GAAG,oBAAoB,CAe5E"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Build a typed `datetime` meta-box field. Storage is a partial ISO
3
- * 8601 string (`YYYY-MM-DDTHH:MM` with optional `:SS`) reflecting
4
- * what the author entered via `<input type="datetime-local">` —
5
- * naive local time, no timezone offset baked in. A future iteration
6
- * may upgrade storage to ISO with offset; consumers who need
7
- * timezone semantics today should anchor with `Temporal` or similar.
8
- */
9
- export function datetime(options) {
10
- return {
11
- key: options.key,
12
- label: options.label,
13
- type: "string",
14
- inputType: "datetime",
15
- min: options.min,
16
- max: options.max,
17
- required: options.required,
18
- description: options.description,
19
- default: options.default,
20
- span: options.span,
21
- capability: options.capability,
22
- sanitize: options.sanitize,
23
- };
24
- }
25
- //# sourceMappingURL=datetime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datetime.js","sourceRoot":"","sources":["../../../src/plugin/fields/datetime.ts"],"names":[],"mappings":"AAkBA;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,OAA6B;IACpD,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,UAAU;QACrB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAC;AACJ,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { Label } from "../../i18n/label.js";
2
- import type { EmailMetaBoxField, MetaBoxFieldSpan } from "../manifest.js";
3
- export interface EmailFieldOptions {
4
- readonly key: string;
5
- readonly label: Label;
6
- readonly placeholder?: Label;
7
- readonly maxLength?: number;
8
- readonly required?: boolean;
9
- readonly description?: Label;
10
- readonly default?: string;
11
- readonly span?: MetaBoxFieldSpan;
12
- readonly capability?: string;
13
- readonly sanitize?: (value: unknown) => unknown;
14
- }
15
- /** Build a typed `email` meta-box field. Renders as `<input type="email">`. */
16
- export declare function email(options: EmailFieldOptions): EmailMetaBoxField;
17
- //# sourceMappingURL=email.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE1E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACjD;AAED,+EAA+E;AAC/E,wBAAgB,KAAK,CAAC,OAAO,EAAE,iBAAiB,GAAG,iBAAiB,CAenE"}
@@ -1,18 +0,0 @@
1
- /** Build a typed `email` meta-box field. Renders as `<input type="email">`. */
2
- export function email(options) {
3
- return {
4
- key: options.key,
5
- label: options.label,
6
- type: "string",
7
- inputType: "email",
8
- placeholder: options.placeholder,
9
- maxLength: options.maxLength,
10
- required: options.required,
11
- description: options.description,
12
- default: options.default,
13
- span: options.span,
14
- capability: options.capability,
15
- sanitize: options.sanitize,
16
- };
17
- }
18
- //# sourceMappingURL=email.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email.js","sourceRoot":"","sources":["../../../src/plugin/fields/email.ts"],"names":[],"mappings":"AAgBA,+EAA+E;AAC/E,MAAM,UAAU,KAAK,CAAC,OAA0B;IAC9C,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,OAAO;QAClB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAC;AACJ,CAAC"}
@@ -1,28 +0,0 @@
1
- import type { Label } from "../../i18n/label.js";
2
- import type { EntryListMetaBoxField, MetaBoxFieldSpan } from "../manifest.js";
3
- export interface EntryListFieldOptions {
4
- readonly key: string;
5
- readonly label: Label;
6
- readonly required?: boolean;
7
- readonly description?: Label;
8
- readonly default?: readonly string[];
9
- readonly span?: MetaBoxFieldSpan;
10
- readonly capability?: string;
11
- readonly entryTypes: readonly string[];
12
- readonly includeTrashed?: boolean;
13
- /** Max items allowed in the array. Omitted = unbounded. */
14
- readonly max?: number;
15
- }
16
- /**
17
- * Build a typed `entryList` reference field — the multi-value
18
- * counterpart to `entry()`. Storage is a JSON array of bare entry
19
- * ids (`["42", "43"]`); reads filter out orphans (the array stays
20
- * dense — missing IDs are dropped, not nulled). The admin renders
21
- * a `MultiReferencePicker` with drag-to-reorder; the picker stays
22
- * open until the author closes it or hits `max`.
23
- *
24
- * Reuses `EntryFieldScope` so the same `entryTypes` /
25
- * `includeTrashed` filters carry through to the entry adapter.
26
- */
27
- export declare function entryList(options: EntryListFieldOptions): EntryListMetaBoxField;
28
- //# sourceMappingURL=entry-list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entry-list.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/entry-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAG9E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,2DAA2D;IAC3D,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,qBAAqB,GAC7B,qBAAqB,CAkBvB"}
@@ -1,31 +0,0 @@
1
- /**
2
- * Build a typed `entryList` reference field — the multi-value
3
- * counterpart to `entry()`. Storage is a JSON array of bare entry
4
- * ids (`["42", "43"]`); reads filter out orphans (the array stays
5
- * dense — missing IDs are dropped, not nulled). The admin renders
6
- * a `MultiReferencePicker` with drag-to-reorder; the picker stays
7
- * open until the author closes it or hits `max`.
8
- *
9
- * Reuses `EntryFieldScope` so the same `entryTypes` /
10
- * `includeTrashed` filters carry through to the entry adapter.
11
- */
12
- export function entryList(options) {
13
- const scope = {
14
- entryTypes: options.entryTypes,
15
- includeTrashed: options.includeTrashed,
16
- };
17
- return {
18
- key: options.key,
19
- label: options.label,
20
- type: "json",
21
- inputType: "entryList",
22
- referenceTarget: { kind: "entry", scope, multiple: true },
23
- max: options.max,
24
- required: options.required,
25
- description: options.description,
26
- default: options.default,
27
- span: options.span,
28
- capability: options.capability,
29
- };
30
- }
31
- //# sourceMappingURL=entry-list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entry-list.js","sourceRoot":"","sources":["../../../src/plugin/fields/entry-list.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,SAAS,CACvB,OAA8B;IAE9B,MAAM,KAAK,GAAoB;QAC7B,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,cAAc,EAAE,OAAO,CAAC,cAAc;KACvC,CAAC;IACF,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,WAAW;QACtB,eAAe,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE;QACzD,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC;AACJ,CAAC"}
@@ -1,21 +0,0 @@
1
- import type { Label } from "../../i18n/label.js";
2
- import type { MetaBoxFieldOption, MetaBoxFieldSpan, MultiselectMetaBoxField } from "../manifest.js";
3
- export interface MultiselectFieldOptions {
4
- readonly key: string;
5
- readonly label: Label;
6
- readonly options: readonly MetaBoxFieldOption[];
7
- readonly required?: boolean;
8
- readonly description?: Label;
9
- readonly default?: readonly string[];
10
- readonly span?: MetaBoxFieldSpan;
11
- readonly capability?: string;
12
- readonly sanitize?: (value: unknown) => unknown;
13
- }
14
- /**
15
- * Build a typed `multiselect` meta-box field. `options` is required.
16
- * Storage is an array of selected option `value` strings; the
17
- * default sanitizer rejects values outside the declared options
18
- * and de-duplicates.
19
- */
20
- export declare function multiselect(options: MultiselectFieldOptions): MultiselectMetaBoxField;
21
- //# sourceMappingURL=multiselect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multiselect.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/multiselect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACjD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,uBAAuB,GAC/B,uBAAuB,CAczB"}
@@ -1,43 +0,0 @@
1
- /**
2
- * Build a typed `multiselect` meta-box field. `options` is required.
3
- * Storage is an array of selected option `value` strings; the
4
- * default sanitizer rejects values outside the declared options
5
- * and de-duplicates.
6
- */
7
- export function multiselect(options) {
8
- return {
9
- key: options.key,
10
- label: options.label,
11
- type: "json",
12
- inputType: "multiselect",
13
- options: options.options,
14
- required: options.required,
15
- description: options.description,
16
- default: options.default,
17
- span: options.span,
18
- capability: options.capability,
19
- sanitize: options.sanitize ?? buildOptionSanitizer(options.options),
20
- };
21
- }
22
- function buildOptionSanitizer(optionList) {
23
- const allowed = new Set(optionList.map((opt) => opt.value));
24
- return (value) => {
25
- // eslint-disable-next-line no-restricted-syntax -- sanitizer flow-control sentinel; migrated in the field-sanitizer-error slice
26
- if (!Array.isArray(value))
27
- throw new Error("invalid_value");
28
- const out = [];
29
- const seen = new Set();
30
- for (const item of value) {
31
- if (typeof item !== "string" || !allowed.has(item)) {
32
- // eslint-disable-next-line no-restricted-syntax -- sanitizer flow-control sentinel; migrated in the field-sanitizer-error slice
33
- throw new Error("invalid_value");
34
- }
35
- if (!seen.has(item)) {
36
- seen.add(item);
37
- out.push(item);
38
- }
39
- }
40
- return out;
41
- };
42
- }
43
- //# sourceMappingURL=multiselect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multiselect.js","sourceRoot":"","sources":["../../../src/plugin/fields/multiselect.ts"],"names":[],"mappings":"AAmBA;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,OAAgC;IAEhC,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,aAAa;QACxB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC;KACpE,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAC3B,UAAyC;IAEzC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,gIAAgI;QAChI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QAC5D,MAAM,GAAG,GAAa,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnD,gIAAgI;gBAChI,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;YACnC,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBACpB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACf,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC;QACH,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC"}
@@ -1,24 +0,0 @@
1
- import type { Label } from "../../i18n/label.js";
2
- import type { MetaBoxFieldSpan, PasswordMetaBoxField } from "../manifest.js";
3
- export interface PasswordFieldOptions {
4
- readonly key: string;
5
- readonly label: Label;
6
- readonly placeholder?: Label;
7
- readonly maxLength?: number;
8
- readonly required?: boolean;
9
- readonly description?: Label;
10
- readonly default?: string;
11
- readonly span?: MetaBoxFieldSpan;
12
- readonly capability?: string;
13
- readonly sanitize?: (value: unknown) => unknown;
14
- }
15
- /**
16
- * Build a typed `password` meta-box field. Renders with masked input
17
- * (`<input type="password">`) so the value isn't visible at a glance
18
- * — useful for non-secret-but-sensitive fields (display PINs,
19
- * recovery codes copied into a settings group). Storage shape is
20
- * identical to `text`; nothing here is a substitute for actual
21
- * encrypted-at-rest storage if the value is a real secret.
22
- */
23
- export declare function password(options: PasswordFieldOptions): PasswordMetaBoxField;
24
- //# sourceMappingURL=password.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/password.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACjD;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,oBAAoB,GAAG,oBAAoB,CAe5E"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Build a typed `password` meta-box field. Renders with masked input
3
- * (`<input type="password">`) so the value isn't visible at a glance
4
- * — useful for non-secret-but-sensitive fields (display PINs,
5
- * recovery codes copied into a settings group). Storage shape is
6
- * identical to `text`; nothing here is a substitute for actual
7
- * encrypted-at-rest storage if the value is a real secret.
8
- */
9
- export function password(options) {
10
- return {
11
- key: options.key,
12
- label: options.label,
13
- type: "string",
14
- inputType: "password",
15
- placeholder: options.placeholder,
16
- maxLength: options.maxLength,
17
- required: options.required,
18
- description: options.description,
19
- default: options.default,
20
- span: options.span,
21
- capability: options.capability,
22
- sanitize: options.sanitize,
23
- };
24
- }
25
- //# sourceMappingURL=password.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"password.js","sourceRoot":"","sources":["../../../src/plugin/fields/password.ts"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,OAA6B;IACpD,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,UAAU;QACrB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAC;AACJ,CAAC"}
@@ -1,16 +0,0 @@
1
- import type { Label } from "../../i18n/label.js";
2
- import type { MetaBoxFieldOption, MetaBoxFieldSpan, RadioMetaBoxField } from "../manifest.js";
3
- export interface RadioFieldOptions {
4
- readonly key: string;
5
- readonly label: Label;
6
- readonly options: readonly MetaBoxFieldOption[];
7
- readonly required?: boolean;
8
- readonly description?: Label;
9
- readonly default?: string;
10
- readonly span?: MetaBoxFieldSpan;
11
- readonly capability?: string;
12
- readonly sanitize?: (value: unknown) => unknown;
13
- }
14
- /** Build a typed `radio` meta-box field. `options` is required. */
15
- export declare function radio(options: RadioFieldOptions): RadioMetaBoxField;
16
- //# sourceMappingURL=radio.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/radio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CACjD;AAED,mEAAmE;AACnE,wBAAgB,KAAK,CAAC,OAAO,EAAE,iBAAiB,GAAG,iBAAiB,CAcnE"}
@@ -1,17 +0,0 @@
1
- /** Build a typed `radio` meta-box field. `options` is required. */
2
- export function radio(options) {
3
- return {
4
- key: options.key,
5
- label: options.label,
6
- type: "string",
7
- inputType: "radio",
8
- options: options.options,
9
- required: options.required,
10
- description: options.description,
11
- default: options.default,
12
- span: options.span,
13
- capability: options.capability,
14
- sanitize: options.sanitize,
15
- };
16
- }
17
- //# sourceMappingURL=radio.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"radio.js","sourceRoot":"","sources":["../../../src/plugin/fields/radio.ts"],"names":[],"mappings":"AAmBA,mEAAmE;AACnE,MAAM,UAAU,KAAK,CAAC,OAA0B;IAC9C,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,OAAO;QAClB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAC;AACJ,CAAC"}
@@ -1,34 +0,0 @@
1
- import type { MetaBoxField } from "../manifest.js";
2
- interface RepeaterValidationOptions {
3
- readonly min?: number;
4
- readonly max?: number;
5
- }
6
- export declare function walkRepeaterRows(subFields: readonly MetaBoxField[], options?: RepeaterValidationOptions): (value: unknown) => unknown;
7
- type RepeaterValidationReason = "invalid_shape" | "below_min" | "above_max" | "subfield_invalid";
8
- export declare class RepeaterValidationError extends Error {
9
- readonly path: string;
10
- readonly reason: RepeaterValidationReason;
11
- private constructor();
12
- static rootNotArray(): RepeaterValidationError;
13
- static tooManyRows(ctx: {
14
- maxRows: number;
15
- }): RepeaterValidationError;
16
- static rowNotPlainObject(ctx: {
17
- path: string;
18
- }): RepeaterValidationError;
19
- static belowMin(ctx: {
20
- min: number;
21
- rowCount: number;
22
- }): RepeaterValidationError;
23
- static aboveMax(ctx: {
24
- max: number;
25
- rowCount: number;
26
- }): RepeaterValidationError;
27
- static subfieldInvalid(ctx: {
28
- path: string;
29
- fieldKey: string;
30
- detail: string;
31
- }): RepeaterValidationError;
32
- }
33
- export {};
34
- //# sourceMappingURL=repeater-validate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"repeater-validate.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/repeater-validate.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,UAAU,yBAAyB;IACjC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AASD,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,YAAY,EAAE,EAClC,OAAO,GAAE,yBAA8B,GACtC,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CA+C7B;AAED,KAAK,wBAAwB,GAC3B,eAAe,GAAG,WAAW,GAAG,WAAW,GAAG,kBAAkB,CAAC;AAEnE,qBAAa,uBAAwB,SAAQ,KAAK;IAKhD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAE1C,OAAO;IAUP,MAAM,CAAC,YAAY,IAAI,uBAAuB;IAQ9C,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,uBAAuB;IAQrE,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,uBAAuB;IAQxE,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,uBAAuB;IAQ3B,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,uBAAuB;IAQ3B,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE;QAC1B,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,uBAAuB;CAO5B"}
@@ -1,104 +0,0 @@
1
- // Empty rows are stripped before min/max bounds apply: blank rows are an
2
- // authoring affordance, not data the caller meant to persist. Reference
3
- // subfields inside rows skip the live-id check that top-level refs get
4
- // from validateMetaReferences — recursion into rows is a post-0.1 follow-up.
5
- // Hard ceiling on row count regardless of field-level `max`. The 256 KiB
6
- // meta byte cap doesn't bound work pre-walk: a payload of N empty rows
7
- // allocates O(N) before the byte cap measures the post-strip output.
8
- // 1000 covers any realistic authoring (FAQ lists, link strips, gallery
9
- // captions); above that, the user has modeled the wrong abstraction.
10
- const MAX_REPEATER_ROWS = 1000;
11
- export function walkRepeaterRows(subFields, options = {}) {
12
- return (value) => {
13
- if (value === null || value === undefined)
14
- return value;
15
- if (!Array.isArray(value)) {
16
- throw RepeaterValidationError.rootNotArray();
17
- }
18
- if (value.length > MAX_REPEATER_ROWS) {
19
- throw RepeaterValidationError.tooManyRows({ maxRows: MAX_REPEATER_ROWS });
20
- }
21
- const rows = [];
22
- value.forEach((rawRow, i) => {
23
- if (rawRow === null ||
24
- typeof rawRow !== "object" ||
25
- Array.isArray(rawRow)) {
26
- throw RepeaterValidationError.rowNotPlainObject({ path: `[${i}]` });
27
- }
28
- const inputRow = rawRow;
29
- const next = {};
30
- let hasValue = false;
31
- for (const sf of subFields) {
32
- const raw = inputRow[sf.key];
33
- const sanitized = sf.sanitize
34
- ? runSubSanitize(sf, raw, `[${i}].${sf.key}`)
35
- : raw;
36
- if (sanitized !== null && sanitized !== undefined && sanitized !== "") {
37
- hasValue = true;
38
- }
39
- next[sf.key] = sanitized;
40
- }
41
- if (hasValue)
42
- rows.push(next);
43
- });
44
- if (options.min !== undefined && rows.length < options.min) {
45
- throw RepeaterValidationError.belowMin({
46
- min: options.min,
47
- rowCount: rows.length,
48
- });
49
- }
50
- if (options.max !== undefined && rows.length > options.max) {
51
- throw RepeaterValidationError.aboveMax({
52
- max: options.max,
53
- rowCount: rows.length,
54
- });
55
- }
56
- return rows;
57
- };
58
- }
59
- export class RepeaterValidationError extends Error {
60
- static {
61
- RepeaterValidationError.prototype.name = "RepeaterValidationError";
62
- }
63
- path;
64
- reason;
65
- constructor(reason, path, message) {
66
- super(message);
67
- this.path = path;
68
- this.reason = reason;
69
- }
70
- static rootNotArray() {
71
- return new RepeaterValidationError("invalid_shape", "<root>", "repeater value must be an array of rows");
72
- }
73
- static tooManyRows(ctx) {
74
- return new RepeaterValidationError("invalid_shape", "<root>", `repeater input exceeds ${String(ctx.maxRows)} rows`);
75
- }
76
- static rowNotPlainObject(ctx) {
77
- return new RepeaterValidationError("invalid_shape", ctx.path, "repeater row must be a plain object");
78
- }
79
- static belowMin(ctx) {
80
- return new RepeaterValidationError("below_min", "<root>", `repeater requires at least ${String(ctx.min)} non-empty row(s); got ${String(ctx.rowCount)}`);
81
- }
82
- static aboveMax(ctx) {
83
- return new RepeaterValidationError("above_max", "<root>", `repeater allows at most ${String(ctx.max)} row(s); got ${String(ctx.rowCount)}`);
84
- }
85
- static subfieldInvalid(ctx) {
86
- return new RepeaterValidationError("subfield_invalid", ctx.path, `repeater subfield "${ctx.fieldKey}" rejected value: ${ctx.detail}`);
87
- }
88
- }
89
- function runSubSanitize(field, value, path) {
90
- // Caller gates on `field.sanitize` — cast is a type-narrowing shortcut.
91
- const sanitize = field.sanitize;
92
- try {
93
- return sanitize(value);
94
- }
95
- catch (cause) {
96
- const detail = cause instanceof Error ? cause.message : String(cause);
97
- throw RepeaterValidationError.subfieldInvalid({
98
- path,
99
- fieldKey: field.key,
100
- detail,
101
- });
102
- }
103
- }
104
- //# sourceMappingURL=repeater-validate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"repeater-validate.js","sourceRoot":"","sources":["../../../src/plugin/fields/repeater-validate.ts"],"names":[],"mappings":"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"}
@@ -1,27 +0,0 @@
1
- import type { Label } from "../../i18n/label.js";
2
- import type { MetaBoxFieldSpan, TermListMetaBoxField } from "../manifest.js";
3
- export interface TermListFieldOptions {
4
- readonly key: string;
5
- readonly label: Label;
6
- readonly required?: boolean;
7
- readonly description?: Label;
8
- readonly default?: readonly string[];
9
- readonly span?: MetaBoxFieldSpan;
10
- readonly capability?: string;
11
- readonly termTaxonomies: readonly string[];
12
- /** Max items allowed in the array. Omitted = unbounded. */
13
- readonly max?: number;
14
- }
15
- /**
16
- * Build a typed `termList` reference field — the multi-value
17
- * counterpart to `term()`. Storage is a JSON array of bare term
18
- * ids (`["42", "43"]`); reads filter out orphans the same way
19
- * `entryList` does. The admin renders a `MultiReferencePicker`
20
- * with drag-to-reorder; the picker stays open until the author
21
- * closes it or hits `max`.
22
- *
23
- * Reuses `TermFieldScope` so the same `termTaxonomies` filter
24
- * carries through to the term adapter.
25
- */
26
- export declare function termList(options: TermListFieldOptions): TermListMetaBoxField;
27
- //# sourceMappingURL=term-list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"term-list.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/term-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG7E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,2DAA2D;IAC3D,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,oBAAoB,GAAG,oBAAoB,CAiB5E"}
@@ -1,30 +0,0 @@
1
- /**
2
- * Build a typed `termList` reference field — the multi-value
3
- * counterpart to `term()`. Storage is a JSON array of bare term
4
- * ids (`["42", "43"]`); reads filter out orphans the same way
5
- * `entryList` does. The admin renders a `MultiReferencePicker`
6
- * with drag-to-reorder; the picker stays open until the author
7
- * closes it or hits `max`.
8
- *
9
- * Reuses `TermFieldScope` so the same `termTaxonomies` filter
10
- * carries through to the term adapter.
11
- */
12
- export function termList(options) {
13
- const scope = {
14
- termTaxonomies: options.termTaxonomies,
15
- };
16
- return {
17
- key: options.key,
18
- label: options.label,
19
- type: "json",
20
- inputType: "termList",
21
- referenceTarget: { kind: "term", scope, multiple: true },
22
- max: options.max,
23
- required: options.required,
24
- description: options.description,
25
- default: options.default,
26
- span: options.span,
27
- capability: options.capability,
28
- };
29
- }
30
- //# sourceMappingURL=term-list.js.map