@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.
- package/dist/cache/embedded-tags.d.ts +5 -0
- package/dist/cache/embedded-tags.d.ts.map +1 -0
- package/dist/cache/embedded-tags.js +30 -0
- package/dist/cache/embedded-tags.js.map +1 -0
- package/dist/context/app.d.ts +12 -0
- package/dist/context/app.d.ts.map +1 -1
- package/dist/context/app.js +10 -4
- package/dist/context/app.js.map +1 -1
- package/dist/context/memo.d.ts +22 -0
- package/dist/context/memo.d.ts.map +1 -0
- package/dist/context/memo.js +27 -0
- package/dist/context/memo.js.map +1 -0
- package/dist/context/traced-slots.d.ts +17 -0
- package/dist/context/traced-slots.d.ts.map +1 -0
- package/dist/context/traced-slots.js +57 -0
- package/dist/context/traced-slots.js.map +1 -0
- package/dist/entries/read-service.d.ts +6 -0
- package/dist/entries/read-service.d.ts.map +1 -1
- package/dist/entries/read-service.js +19 -3
- package/dist/entries/read-service.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin/errors.d.ts +7 -1
- package/dist/plugin/errors.d.ts.map +1 -1
- package/dist/plugin/errors.js +5 -0
- package/dist/plugin/errors.js.map +1 -1
- package/dist/plugin/fields/builder.d.ts +106 -0
- package/dist/plugin/fields/builder.d.ts.map +1 -0
- package/dist/plugin/fields/builder.js +162 -0
- package/dist/plugin/fields/builder.js.map +1 -0
- package/dist/plugin/fields/color.d.ts +78 -18
- package/dist/plugin/fields/color.d.ts.map +1 -1
- package/dist/plugin/fields/color.js +116 -25
- package/dist/plugin/fields/color.js.map +1 -1
- package/dist/plugin/fields/condition.d.ts +40 -0
- package/dist/plugin/fields/condition.d.ts.map +1 -0
- package/dist/plugin/fields/condition.js +115 -0
- package/dist/plugin/fields/condition.js.map +1 -0
- package/dist/plugin/fields/contributions.d.ts +233 -0
- package/dist/plugin/fields/contributions.d.ts.map +1 -0
- package/dist/plugin/fields/contributions.js +1 -0
- package/dist/plugin/fields/contributions.js.map +1 -0
- package/dist/plugin/fields/entry.d.ts +24 -20
- package/dist/plugin/fields/entry.d.ts.map +1 -1
- package/dist/plugin/fields/entry.js +13 -21
- package/dist/plugin/fields/entry.js.map +1 -1
- package/dist/plugin/fields/errors.d.ts +23 -11
- package/dist/plugin/fields/errors.d.ts.map +1 -1
- package/dist/plugin/fields/errors.js +20 -13
- package/dist/plugin/fields/errors.js.map +1 -1
- package/dist/plugin/fields/group.d.ts +90 -0
- package/dist/plugin/fields/group.d.ts.map +1 -0
- package/dist/plugin/fields/group.js +124 -0
- package/dist/plugin/fields/group.js.map +1 -0
- package/dist/plugin/fields/index.d.ts +22 -45
- package/dist/plugin/fields/index.d.ts.map +1 -1
- package/dist/plugin/fields/index.js +25 -30
- package/dist/plugin/fields/index.js.map +1 -1
- package/dist/plugin/fields/json.d.ts +71 -9
- package/dist/plugin/fields/json.d.ts.map +1 -1
- package/dist/plugin/fields/json.js +110 -16
- package/dist/plugin/fields/json.js.map +1 -1
- package/dist/plugin/fields/link.d.ts +96 -0
- package/dist/plugin/fields/link.d.ts.map +1 -0
- package/dist/plugin/fields/link.js +160 -0
- package/dist/plugin/fields/link.js.map +1 -0
- package/dist/plugin/fields/number.d.ts +86 -13
- package/dist/plugin/fields/number.d.ts.map +1 -1
- package/dist/plugin/fields/number.js +133 -20
- package/dist/plugin/fields/number.js.map +1 -1
- package/dist/plugin/fields/range.d.ts +101 -17
- package/dist/plugin/fields/range.d.ts.map +1 -1
- package/dist/plugin/fields/range.js +153 -38
- package/dist/plugin/fields/range.js.map +1 -1
- package/dist/plugin/fields/reference.d.ts +171 -0
- package/dist/plugin/fields/reference.d.ts.map +1 -0
- package/dist/plugin/fields/reference.js +193 -0
- package/dist/plugin/fields/reference.js.map +1 -0
- package/dist/plugin/fields/repeater.d.ts +111 -8
- package/dist/plugin/fields/repeater.d.ts.map +1 -1
- package/dist/plugin/fields/repeater.js +157 -66
- package/dist/plugin/fields/repeater.js.map +1 -1
- package/dist/plugin/fields/richtext-validate.d.ts +7 -0
- package/dist/plugin/fields/richtext-validate.d.ts.map +1 -1
- package/dist/plugin/fields/richtext-validate.js +11 -5
- package/dist/plugin/fields/richtext-validate.js.map +1 -1
- package/dist/plugin/fields/richtext.d.ts +78 -12
- package/dist/plugin/fields/richtext.d.ts.map +1 -1
- package/dist/plugin/fields/richtext.js +121 -26
- package/dist/plugin/fields/richtext.js.map +1 -1
- package/dist/plugin/fields/select.d.ts +150 -10
- package/dist/plugin/fields/select.d.ts.map +1 -1
- package/dist/plugin/fields/select.js +205 -17
- package/dist/plugin/fields/select.js.map +1 -1
- package/dist/plugin/fields/sub-fields.d.ts +12 -0
- package/dist/plugin/fields/sub-fields.d.ts.map +1 -0
- package/dist/plugin/fields/sub-fields.js +62 -0
- package/dist/plugin/fields/sub-fields.js.map +1 -0
- package/dist/plugin/fields/temporal.d.ts +124 -0
- package/dist/plugin/fields/temporal.d.ts.map +1 -0
- package/dist/plugin/fields/temporal.js +180 -0
- package/dist/plugin/fields/temporal.js.map +1 -0
- package/dist/plugin/fields/term.d.ts +11 -16
- package/dist/plugin/fields/term.d.ts.map +1 -1
- package/dist/plugin/fields/term.js +11 -19
- package/dist/plugin/fields/term.js.map +1 -1
- package/dist/plugin/fields/toggle.d.ts +97 -0
- package/dist/plugin/fields/toggle.d.ts.map +1 -0
- package/dist/plugin/fields/toggle.js +135 -0
- package/dist/plugin/fields/toggle.js.map +1 -0
- package/dist/plugin/fields/user.d.ts +14 -26
- package/dist/plugin/fields/user.d.ts.map +1 -1
- package/dist/plugin/fields/user.js +11 -25
- package/dist/plugin/fields/user.js.map +1 -1
- package/dist/plugin/lookup.d.ts +74 -10
- package/dist/plugin/lookup.d.ts.map +1 -1
- package/dist/plugin/manifest.d.ts +319 -160
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +94 -4
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/setup-context.d.ts +10 -4
- package/dist/plugin/setup-context.d.ts.map +1 -1
- package/dist/plugin/setup-context.js +10 -3
- package/dist/plugin/setup-context.js.map +1 -1
- package/dist/plugin/validation/meta-box-fields.d.ts.map +1 -1
- package/dist/plugin/validation/meta-box-fields.js +16 -0
- package/dist/plugin/validation/meta-box-fields.js.map +1 -1
- package/dist/route/render/asset-manifest.d.ts +1 -1
- package/dist/route/render/asset-manifest.d.ts.map +1 -1
- package/dist/route/render/asset-manifest.js +7 -1
- package/dist/route/render/asset-manifest.js.map +1 -1
- package/dist/route/render/build-resolved-entries.d.ts.map +1 -1
- package/dist/route/render/build-resolved-entries.js +25 -12
- package/dist/route/render/build-resolved-entries.js.map +1 -1
- package/dist/route/render/render-template.d.ts +1 -1
- package/dist/route/render/render-template.d.ts.map +1 -1
- package/dist/route/render/render-template.js +50 -23
- package/dist/route/render/render-template.js.map +1 -1
- package/dist/route/render/template-builders.d.ts +15 -10
- package/dist/route/render/template-builders.d.ts.map +1 -1
- package/dist/route/render/template-builders.js.map +1 -1
- package/dist/rpc/base.d.ts +7 -0
- package/dist/rpc/base.d.ts.map +1 -1
- package/dist/rpc/errors.d.ts +7 -0
- package/dist/rpc/errors.d.ts.map +1 -1
- package/dist/rpc/errors.js +16 -0
- package/dist/rpc/errors.js.map +1 -1
- package/dist/rpc/meta/core.d.ts +92 -14
- package/dist/rpc/meta/core.d.ts.map +1 -1
- package/dist/rpc/meta/core.js +524 -406
- package/dist/rpc/meta/core.js.map +1 -1
- package/dist/rpc/meta/field-messages.d.ts +67 -0
- package/dist/rpc/meta/field-messages.d.ts.map +1 -0
- package/dist/rpc/meta/field-messages.js +67 -0
- package/dist/rpc/meta/field-messages.js.map +1 -0
- package/dist/rpc/meta/field-pipeline.d.ts +52 -0
- package/dist/rpc/meta/field-pipeline.d.ts.map +1 -0
- package/dist/rpc/meta/field-pipeline.js +501 -0
- package/dist/rpc/meta/field-pipeline.js.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/create.d.ts +7 -0
- package/dist/rpc/procedures/auth/allowed-domains/create.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/allowed-domains/delete.d.ts +7 -0
- package/dist/rpc/procedures/auth/allowed-domains/delete.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/allowed-domains/index.d.ts +28 -0
- package/dist/rpc/procedures/auth/allowed-domains/index.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/allowed-domains/list.d.ts +7 -0
- package/dist/rpc/procedures/auth/allowed-domains/list.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/allowed-domains/update.d.ts +7 -0
- package/dist/rpc/procedures/auth/allowed-domains/update.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/api-tokens/admin-list.d.ts +7 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-list.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/api-tokens/admin-revoke.d.ts +7 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-revoke.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/api-tokens/create.d.ts +7 -0
- package/dist/rpc/procedures/auth/api-tokens/create.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/api-tokens/index.d.ts +35 -0
- package/dist/rpc/procedures/auth/api-tokens/index.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/api-tokens/list.d.ts +7 -0
- package/dist/rpc/procedures/auth/api-tokens/list.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/api-tokens/revoke.d.ts +7 -0
- package/dist/rpc/procedures/auth/api-tokens/revoke.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/credentials/delete.d.ts +7 -0
- package/dist/rpc/procedures/auth/credentials/delete.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/credentials/index.d.ts +21 -0
- package/dist/rpc/procedures/auth/credentials/index.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/credentials/list.d.ts +7 -0
- package/dist/rpc/procedures/auth/credentials/list.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/credentials/rename.d.ts +7 -0
- package/dist/rpc/procedures/auth/credentials/rename.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/device-flow/approve.d.ts +7 -0
- package/dist/rpc/procedures/auth/device-flow/approve.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/device-flow/deny.d.ts +7 -0
- package/dist/rpc/procedures/auth/device-flow/deny.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/device-flow/index.d.ts +21 -0
- package/dist/rpc/procedures/auth/device-flow/index.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/device-flow/lookup.d.ts +7 -0
- package/dist/rpc/procedures/auth/device-flow/lookup.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/index.d.ts +154 -0
- package/dist/rpc/procedures/auth/index.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/login-links.d.ts +7 -0
- package/dist/rpc/procedures/auth/login-links.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/mailer/index.d.ts +7 -0
- package/dist/rpc/procedures/auth/mailer/index.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/mailer/test-send.d.ts +7 -0
- package/dist/rpc/procedures/auth/mailer/test-send.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/oauth-providers.d.ts +7 -0
- package/dist/rpc/procedures/auth/oauth-providers.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/session.d.ts +7 -0
- package/dist/rpc/procedures/auth/session.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/sessions/index.d.ts +21 -0
- package/dist/rpc/procedures/auth/sessions/index.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/sessions/list.d.ts +7 -0
- package/dist/rpc/procedures/auth/sessions/list.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/sessions/revoke-others.d.ts +7 -0
- package/dist/rpc/procedures/auth/sessions/revoke-others.d.ts.map +1 -1
- package/dist/rpc/procedures/auth/sessions/revoke.d.ts +7 -0
- package/dist/rpc/procedures/auth/sessions/revoke.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/activity.d.ts +7 -0
- package/dist/rpc/procedures/entry/activity.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/bulk.d.ts +21 -0
- package/dist/rpc/procedures/entry/bulk.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/create-preview-link.d.ts +7 -0
- package/dist/rpc/procedures/entry/create-preview-link.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/create.d.ts +8 -1
- package/dist/rpc/procedures/entry/create.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/create.js +8 -8
- package/dist/rpc/procedures/entry/create.js.map +1 -1
- package/dist/rpc/procedures/entry/dashboard.d.ts +14 -0
- package/dist/rpc/procedures/entry/dashboard.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/delete-permanent.d.ts +7 -0
- package/dist/rpc/procedures/entry/delete-permanent.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/discard-draft.d.ts +7 -0
- package/dist/rpc/procedures/entry/discard-draft.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/duplicate.d.ts +7 -0
- package/dist/rpc/procedures/entry/duplicate.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/duplicate.js +2 -2
- package/dist/rpc/procedures/entry/duplicate.js.map +1 -1
- package/dist/rpc/procedures/entry/get.d.ts +7 -0
- package/dist/rpc/procedures/entry/get.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/get.js +2 -2
- package/dist/rpc/procedures/entry/get.js.map +1 -1
- package/dist/rpc/procedures/entry/index.d.ts +156 -2
- package/dist/rpc/procedures/entry/index.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/list.d.ts +7 -0
- package/dist/rpc/procedures/entry/list.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/lookup.d.ts +8 -2
- package/dist/rpc/procedures/entry/lookup.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/lookup.js +74 -12
- package/dist/rpc/procedures/entry/lookup.js.map +1 -1
- package/dist/rpc/procedures/entry/meta.d.ts +37 -3
- package/dist/rpc/procedures/entry/meta.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/meta.js +63 -7
- package/dist/rpc/procedures/entry/meta.js.map +1 -1
- package/dist/rpc/procedures/entry/publish.d.ts +7 -0
- package/dist/rpc/procedures/entry/publish.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/publish.js +6 -4
- package/dist/rpc/procedures/entry/publish.js.map +1 -1
- package/dist/rpc/procedures/entry/refresh-block-loader.d.ts +7 -0
- package/dist/rpc/procedures/entry/refresh-block-loader.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/restore.d.ts +7 -0
- package/dist/rpc/procedures/entry/restore.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/revisions.d.ts +56 -0
- package/dist/rpc/procedures/entry/revisions.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/schemas.d.ts +2 -2
- package/dist/rpc/procedures/entry/schemas.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/schemas.js +9 -2
- package/dist/rpc/procedures/entry/schemas.js.map +1 -1
- package/dist/rpc/procedures/entry/trash.d.ts +7 -0
- package/dist/rpc/procedures/entry/trash.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/update.d.ts +8 -1
- package/dist/rpc/procedures/entry/update.d.ts.map +1 -1
- package/dist/rpc/procedures/entry/update.js +77 -18
- package/dist/rpc/procedures/entry/update.js.map +1 -1
- package/dist/rpc/procedures/lookup/index.d.ts +14 -0
- package/dist/rpc/procedures/lookup/index.d.ts.map +1 -1
- package/dist/rpc/procedures/lookup/list.d.ts +7 -0
- package/dist/rpc/procedures/lookup/list.d.ts.map +1 -1
- package/dist/rpc/procedures/lookup/resolve.d.ts +7 -0
- package/dist/rpc/procedures/lookup/resolve.d.ts.map +1 -1
- package/dist/rpc/procedures/lookup/resolve.js +1 -1
- package/dist/rpc/procedures/lookup/resolve.js.map +1 -1
- package/dist/rpc/procedures/lookup.errors.d.ts +2 -1
- package/dist/rpc/procedures/lookup.errors.d.ts.map +1 -1
- package/dist/rpc/procedures/lookup.errors.js +3 -0
- package/dist/rpc/procedures/lookup.errors.js.map +1 -1
- package/dist/rpc/procedures/search/index.d.ts +7 -0
- package/dist/rpc/procedures/search/index.d.ts.map +1 -1
- package/dist/rpc/procedures/settings/get.d.ts +7 -0
- package/dist/rpc/procedures/settings/get.d.ts.map +1 -1
- package/dist/rpc/procedures/settings/index.d.ts +14 -0
- package/dist/rpc/procedures/settings/index.d.ts.map +1 -1
- package/dist/rpc/procedures/settings/upsert.d.ts +7 -0
- package/dist/rpc/procedures/settings/upsert.d.ts.map +1 -1
- package/dist/rpc/procedures/settings/upsert.js +9 -0
- package/dist/rpc/procedures/settings/upsert.js.map +1 -1
- package/dist/rpc/procedures/term/create.d.ts +7 -0
- package/dist/rpc/procedures/term/create.d.ts.map +1 -1
- package/dist/rpc/procedures/term/create.js +3 -3
- package/dist/rpc/procedures/term/create.js.map +1 -1
- package/dist/rpc/procedures/term/delete.d.ts +7 -0
- package/dist/rpc/procedures/term/delete.d.ts.map +1 -1
- package/dist/rpc/procedures/term/get.d.ts +7 -0
- package/dist/rpc/procedures/term/get.d.ts.map +1 -1
- package/dist/rpc/procedures/term/index.d.ts +35 -0
- package/dist/rpc/procedures/term/index.d.ts.map +1 -1
- package/dist/rpc/procedures/term/list.d.ts +7 -0
- package/dist/rpc/procedures/term/list.d.ts.map +1 -1
- package/dist/rpc/procedures/term/lookup.d.ts +7 -2
- package/dist/rpc/procedures/term/lookup.d.ts.map +1 -1
- package/dist/rpc/procedures/term/lookup.js +29 -8
- package/dist/rpc/procedures/term/lookup.js.map +1 -1
- package/dist/rpc/procedures/term/meta.d.ts +3 -2
- package/dist/rpc/procedures/term/meta.d.ts.map +1 -1
- package/dist/rpc/procedures/term/meta.js +7 -5
- package/dist/rpc/procedures/term/meta.js.map +1 -1
- package/dist/rpc/procedures/term/update.d.ts +7 -0
- package/dist/rpc/procedures/term/update.d.ts.map +1 -1
- package/dist/rpc/procedures/term/update.js +4 -4
- package/dist/rpc/procedures/term/update.js.map +1 -1
- package/dist/rpc/procedures/user/cancel-email-change.d.ts +7 -0
- package/dist/rpc/procedures/user/cancel-email-change.d.ts.map +1 -1
- package/dist/rpc/procedures/user/delete.d.ts +7 -0
- package/dist/rpc/procedures/user/delete.d.ts.map +1 -1
- package/dist/rpc/procedures/user/disable.d.ts +7 -0
- package/dist/rpc/procedures/user/disable.d.ts.map +1 -1
- package/dist/rpc/procedures/user/enable.d.ts +7 -0
- package/dist/rpc/procedures/user/enable.d.ts.map +1 -1
- package/dist/rpc/procedures/user/get.d.ts +7 -0
- package/dist/rpc/procedures/user/get.d.ts.map +1 -1
- package/dist/rpc/procedures/user/get.js +2 -2
- package/dist/rpc/procedures/user/get.js.map +1 -1
- package/dist/rpc/procedures/user/index.d.ts +77 -0
- package/dist/rpc/procedures/user/index.d.ts.map +1 -1
- package/dist/rpc/procedures/user/invite.d.ts +7 -0
- package/dist/rpc/procedures/user/invite.d.ts.map +1 -1
- package/dist/rpc/procedures/user/list.d.ts +7 -0
- package/dist/rpc/procedures/user/list.d.ts.map +1 -1
- package/dist/rpc/procedures/user/lookup.d.ts +6 -2
- package/dist/rpc/procedures/user/lookup.d.ts.map +1 -1
- package/dist/rpc/procedures/user/lookup.js +29 -0
- package/dist/rpc/procedures/user/lookup.js.map +1 -1
- package/dist/rpc/procedures/user/meta.d.ts +3 -2
- package/dist/rpc/procedures/user/meta.d.ts.map +1 -1
- package/dist/rpc/procedures/user/meta.js +7 -5
- package/dist/rpc/procedures/user/meta.js.map +1 -1
- package/dist/rpc/procedures/user/pending-email-change.d.ts +7 -0
- package/dist/rpc/procedures/user/pending-email-change.d.ts.map +1 -1
- package/dist/rpc/procedures/user/request-email-change.d.ts +7 -0
- package/dist/rpc/procedures/user/request-email-change.d.ts.map +1 -1
- package/dist/rpc/procedures/user/set-locale.d.ts +7 -0
- package/dist/rpc/procedures/user/set-locale.d.ts.map +1 -1
- package/dist/rpc/procedures/user/update.d.ts +7 -0
- package/dist/rpc/procedures/user/update.d.ts.map +1 -1
- package/dist/rpc/procedures/user/update.js +4 -4
- package/dist/rpc/procedures/user/update.js.map +1 -1
- package/dist/rpc/router.d.ts +457 -2
- package/dist/rpc/router.d.ts.map +1 -1
- package/dist/rpc/validation.d.ts +1 -0
- package/dist/rpc/validation.d.ts.map +1 -1
- package/dist/rpc/validation.js +1 -0
- package/dist/rpc/validation.js.map +1 -1
- package/dist/runtime/dispatcher.d.ts.map +1 -1
- package/dist/runtime/dispatcher.js +90 -39
- package/dist/runtime/dispatcher.js.map +1 -1
- package/dist/seo/feed.d.ts.map +1 -1
- package/dist/seo/feed.js +7 -1
- package/dist/seo/feed.js.map +1 -1
- package/dist/settings-core.js +1 -1
- package/dist/settings-core.js.map +1 -1
- package/dist/telemetry-otel.d.ts +29 -0
- package/dist/telemetry-otel.d.ts.map +1 -0
- package/dist/telemetry-otel.js +218 -0
- package/dist/telemetry-otel.js.map +1 -0
- package/dist/template-deps-core.d.ts.map +1 -1
- package/dist/template-deps-core.js +31 -14
- package/dist/template-deps-core.js.map +1 -1
- package/dist/template-deps.d.ts.map +1 -1
- package/dist/template-deps.js +12 -8
- package/dist/template-deps.js.map +1 -1
- package/dist/template-registry.d.ts +0 -16
- package/dist/template-registry.d.ts.map +1 -1
- package/dist/terms/read-service.js +2 -2
- package/dist/terms/read-service.js.map +1 -1
- package/dist/test/index.d.ts +3 -0
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +4 -0
- package/dist/test/index.js.map +1 -1
- package/dist/test/traced-context.d.ts +17 -0
- package/dist/test/traced-context.d.ts.map +1 -0
- package/dist/test/traced-context.js +28 -0
- package/dist/test/traced-context.js.map +1 -0
- package/package.json +6 -2
- package/dist/plugin/fields/checkbox.d.ts +0 -19
- package/dist/plugin/fields/checkbox.d.ts.map +0 -1
- package/dist/plugin/fields/checkbox.js +0 -20
- package/dist/plugin/fields/checkbox.js.map +0 -1
- package/dist/plugin/fields/date.d.ts +0 -24
- package/dist/plugin/fields/date.d.ts.map +0 -1
- package/dist/plugin/fields/date.js +0 -23
- package/dist/plugin/fields/date.js.map +0 -1
- package/dist/plugin/fields/datetime.d.ts +0 -26
- package/dist/plugin/fields/datetime.d.ts.map +0 -1
- package/dist/plugin/fields/datetime.js +0 -25
- package/dist/plugin/fields/datetime.js.map +0 -1
- package/dist/plugin/fields/email.d.ts +0 -17
- package/dist/plugin/fields/email.d.ts.map +0 -1
- package/dist/plugin/fields/email.js +0 -18
- package/dist/plugin/fields/email.js.map +0 -1
- package/dist/plugin/fields/entry-list.d.ts +0 -28
- package/dist/plugin/fields/entry-list.d.ts.map +0 -1
- package/dist/plugin/fields/entry-list.js +0 -31
- package/dist/plugin/fields/entry-list.js.map +0 -1
- package/dist/plugin/fields/multiselect.d.ts +0 -21
- package/dist/plugin/fields/multiselect.d.ts.map +0 -1
- package/dist/plugin/fields/multiselect.js +0 -43
- package/dist/plugin/fields/multiselect.js.map +0 -1
- package/dist/plugin/fields/password.d.ts +0 -24
- package/dist/plugin/fields/password.d.ts.map +0 -1
- package/dist/plugin/fields/password.js +0 -25
- package/dist/plugin/fields/password.js.map +0 -1
- package/dist/plugin/fields/radio.d.ts +0 -16
- package/dist/plugin/fields/radio.d.ts.map +0 -1
- package/dist/plugin/fields/radio.js +0 -17
- package/dist/plugin/fields/radio.js.map +0 -1
- package/dist/plugin/fields/repeater-validate.d.ts +0 -34
- package/dist/plugin/fields/repeater-validate.d.ts.map +0 -1
- package/dist/plugin/fields/repeater-validate.js +0 -104
- package/dist/plugin/fields/repeater-validate.js.map +0 -1
- package/dist/plugin/fields/term-list.d.ts +0 -27
- package/dist/plugin/fields/term-list.d.ts.map +0 -1
- package/dist/plugin/fields/term-list.js +0 -30
- package/dist/plugin/fields/term-list.js.map +0 -1
- package/dist/plugin/fields/text.d.ts +0 -37
- package/dist/plugin/fields/text.d.ts.map +0 -1
- package/dist/plugin/fields/text.js +0 -31
- package/dist/plugin/fields/text.js.map +0 -1
- package/dist/plugin/fields/textarea.d.ts +0 -20
- package/dist/plugin/fields/textarea.d.ts.map +0 -1
- package/dist/plugin/fields/textarea.js +0 -21
- package/dist/plugin/fields/textarea.js.map +0 -1
- package/dist/plugin/fields/time.d.ts +0 -24
- package/dist/plugin/fields/time.d.ts.map +0 -1
- package/dist/plugin/fields/time.js +0 -23
- package/dist/plugin/fields/time.js.map +0 -1
- package/dist/plugin/fields/url.d.ts +0 -17
- package/dist/plugin/fields/url.d.ts.map +0 -1
- package/dist/plugin/fields/url.js +0 -18
- package/dist/plugin/fields/url.js.map +0 -1
- package/dist/plugin/fields/user-list.d.ts +0 -29
- package/dist/plugin/fields/user-list.d.ts.map +0 -1
- package/dist/plugin/fields/user-list.js +0 -31
- 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
|
-
*
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
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
|
|
315
|
-
readonly inputType:
|
|
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
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
/**
|
|
337
|
-
export
|
|
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
|
-
*
|
|
352
|
-
*
|
|
353
|
-
* shape
|
|
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
|
|
356
|
-
readonly inputType:
|
|
387
|
+
export interface TemporalMetaBoxField<I extends TemporalInputType = TemporalInputType> extends MetaBoxFieldBase {
|
|
388
|
+
readonly inputType: I;
|
|
357
389
|
readonly type: "string";
|
|
358
|
-
readonly
|
|
359
|
-
readonly
|
|
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).
|
|
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
|
|
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"
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
|
|
381
|
-
|
|
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
|
|
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
|
|
403
|
-
*
|
|
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
|
|
414
|
-
*
|
|
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,30 +472,24 @@ 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;
|
|
457
486
|
/**
|
|
458
|
-
* Storage cardinality. `false`/absent → single
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
487
|
+
* Storage cardinality. `false`/absent → single bare id string.
|
|
488
|
+
* `true` → array of bare id strings. The server-side write
|
|
489
|
+
* validator and read-side orphan filter dispatch on this flag to
|
|
490
|
+
* handle both shapes uniformly.
|
|
462
491
|
*/
|
|
463
492
|
readonly multiple?: boolean;
|
|
464
|
-
/**
|
|
465
|
-
* Storage shape per item. `"id"` (default) → bare id string —
|
|
466
|
-
* every read needs a join/resolve to get a label. `"object"` →
|
|
467
|
-
* `{ id, ...cachedFields, ...userFields }` — the meta pipeline
|
|
468
|
-
* normalizes cached fields from the adapter on every write so
|
|
469
|
-
* reads can render without a join. Used by `media` (where the
|
|
470
|
-
* thumbnail/mime/filename are needed on every render and a
|
|
471
|
-
* resolve per render is wasteful on the edge).
|
|
472
|
-
*
|
|
473
|
-
* The cached fields come from `LookupResult.cached` returned by
|
|
474
|
-
* the adapter; user-supplied keys (e.g. per-usage `alt`) survive
|
|
475
|
-
* the merge so editors can override per-usage metadata.
|
|
476
|
-
*/
|
|
477
|
-
readonly valueShape?: "id" | "object";
|
|
478
493
|
}
|
|
479
494
|
/**
|
|
480
495
|
* Single user reference. Storage is the bare user id as a string
|
|
@@ -486,6 +501,8 @@ export interface UserMetaBoxField extends MetaBoxFieldBase {
|
|
|
486
501
|
readonly inputType: "user";
|
|
487
502
|
readonly type: "string";
|
|
488
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;
|
|
489
506
|
}
|
|
490
507
|
/**
|
|
491
508
|
* Multi user reference. Storage is a JSON array of bare user ids
|
|
@@ -498,6 +515,8 @@ export interface UserListMetaBoxField extends MetaBoxFieldBase {
|
|
|
498
515
|
readonly inputType: "userList";
|
|
499
516
|
readonly type: "json";
|
|
500
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;
|
|
501
520
|
/** Max items allowed in the array. Omitted = unbounded. */
|
|
502
521
|
readonly max?: number;
|
|
503
522
|
}
|
|
@@ -507,14 +526,15 @@ export interface UserListMetaBoxField extends MetaBoxFieldBase {
|
|
|
507
526
|
* trashed. `referenceTarget.scope` carries `entryTypes` (the only
|
|
508
527
|
* entry-type names this field accepts).
|
|
509
528
|
*
|
|
510
|
-
* Naming note: the `Reference` infix
|
|
511
|
-
*
|
|
512
|
-
* 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).
|
|
513
531
|
*/
|
|
514
532
|
export interface EntryReferenceMetaBoxField extends MetaBoxFieldBase {
|
|
515
533
|
readonly inputType: "entry";
|
|
516
534
|
readonly type: "string";
|
|
517
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;
|
|
518
538
|
}
|
|
519
539
|
/**
|
|
520
540
|
* Multi entry reference. Storage is a JSON array of bare entry ids;
|
|
@@ -527,6 +547,8 @@ export interface EntryListMetaBoxField extends MetaBoxFieldBase {
|
|
|
527
547
|
readonly inputType: "entryList";
|
|
528
548
|
readonly type: "json";
|
|
529
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;
|
|
530
552
|
/** Max items allowed in the array. Omitted = unbounded. */
|
|
531
553
|
readonly max?: number;
|
|
532
554
|
}
|
|
@@ -540,6 +562,8 @@ export interface TermReferenceMetaBoxField extends MetaBoxFieldBase {
|
|
|
540
562
|
readonly inputType: "term";
|
|
541
563
|
readonly type: "string";
|
|
542
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;
|
|
543
567
|
}
|
|
544
568
|
/**
|
|
545
569
|
* Multi term reference. Storage is a JSON array of bare term ids;
|
|
@@ -552,17 +576,15 @@ export interface TermListMetaBoxField extends MetaBoxFieldBase {
|
|
|
552
576
|
readonly inputType: "termList";
|
|
553
577
|
readonly type: "json";
|
|
554
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;
|
|
555
581
|
/** Max items allowed in the array. Omitted = unbounded. */
|
|
556
582
|
readonly max?: number;
|
|
557
583
|
}
|
|
558
584
|
/**
|
|
559
|
-
* Single media reference
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
* extra resolve round-trip per render. `referenceTarget.valueShape`
|
|
563
|
-
* is `"object"`; the meta pipeline overwrites the cached fields
|
|
564
|
-
* (mime/filename) from the lookup adapter on every write but lets
|
|
565
|
-
* user-supplied keys (e.g. per-usage `alt`) survive the merge.
|
|
585
|
+
* Single media reference. Storage is the bare media id as a string;
|
|
586
|
+
* reads return `null` for orphans / scope mismatches, and admin
|
|
587
|
+
* renders resolve labels through the lookup path.
|
|
566
588
|
*
|
|
567
589
|
* Lives in core so the typed builder narrows correctly at call
|
|
568
590
|
* sites — same convention as `entry` / `term`. The actual builder
|
|
@@ -572,20 +594,21 @@ export interface MediaMetaBoxField extends MetaBoxFieldBase {
|
|
|
572
594
|
readonly inputType: "media";
|
|
573
595
|
readonly type: "json";
|
|
574
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;
|
|
575
599
|
}
|
|
576
600
|
/**
|
|
577
|
-
* Multi media reference. Storage is a JSON array of
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
* so admin renders thumbnails for every item without a per-item
|
|
582
|
-
* resolve. `referenceTarget.multiple` is `true`, `valueShape` is
|
|
583
|
-
* `"object"`; `max` caps the array length at write time.
|
|
601
|
+
* Multi media reference. Storage is a JSON array of bare media ids;
|
|
602
|
+
* reads filter out orphans the same way `EntryListMetaBoxField`
|
|
603
|
+
* does. `referenceTarget.multiple` is `true`; `max` caps the array
|
|
604
|
+
* length at write time.
|
|
584
605
|
*/
|
|
585
606
|
export interface MediaListMetaBoxField extends MetaBoxFieldBase {
|
|
586
607
|
readonly inputType: "mediaList";
|
|
587
608
|
readonly type: "json";
|
|
588
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;
|
|
589
612
|
/** Max items allowed in the array. Omitted = unbounded. */
|
|
590
613
|
readonly max?: number;
|
|
591
614
|
}
|
|
@@ -608,8 +631,8 @@ export interface MediaListMetaBoxField extends MetaBoxFieldBase {
|
|
|
608
631
|
* toolbar surfaces only the buttons that match the allowlist.
|
|
609
632
|
*
|
|
610
633
|
* Replaces the dropped `markdown` and `code` standalone field types —
|
|
611
|
-
* `richtext(
|
|
612
|
-
* `richtext(
|
|
634
|
+
* `richtext("body").nodes(["codeBlock"])` covers code-in-meta;
|
|
635
|
+
* `richtext("body").marks(["bold","italic","link"]).nodes(["bulletList","orderedList"])`
|
|
613
636
|
* covers markdown-shaped formatting.
|
|
614
637
|
*/
|
|
615
638
|
export interface RichtextMetaBoxField extends MetaBoxFieldBase {
|
|
@@ -620,19 +643,33 @@ export interface RichtextMetaBoxField extends MetaBoxFieldBase {
|
|
|
620
643
|
readonly blocks?: readonly string[];
|
|
621
644
|
}
|
|
622
645
|
/**
|
|
623
|
-
*
|
|
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
|
|
624
662
|
* declared via `subFields`; mixed-row "flexible content" is explicitly
|
|
625
|
-
* out of scope. Subfields may be any registered field type
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
* 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.
|
|
629
666
|
*
|
|
630
667
|
* Storage rides on the `json` primitive so any JSON-serialisable row
|
|
631
|
-
* shape survives the wire. The
|
|
632
|
-
*
|
|
633
|
-
*
|
|
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
|
|
634
671
|
* those three: a row whose only populated subfield is `0` (number) or
|
|
635
|
-
* `false` (
|
|
672
|
+
* `false` (toggle) survives — those are real values.
|
|
636
673
|
*/
|
|
637
674
|
export interface RepeaterMetaBoxField extends MetaBoxFieldBase {
|
|
638
675
|
readonly inputType: "repeater";
|
|
@@ -640,23 +677,100 @@ export interface RepeaterMetaBoxField extends MetaBoxFieldBase {
|
|
|
640
677
|
readonly subFields: readonly MetaBoxField[];
|
|
641
678
|
readonly min?: number;
|
|
642
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;
|
|
692
|
+
}
|
|
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[];
|
|
643
704
|
}
|
|
644
|
-
/**
|
|
645
|
-
|
|
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 {
|
|
646
716
|
readonly inputType: "select";
|
|
647
717
|
readonly type: "string";
|
|
648
718
|
readonly options: readonly MetaBoxFieldOption[];
|
|
719
|
+
readonly multiple?: false;
|
|
720
|
+
readonly appearance?: SelectAppearance;
|
|
649
721
|
}
|
|
650
|
-
/**
|
|
651
|
-
export interface
|
|
652
|
-
readonly inputType: "
|
|
653
|
-
readonly type: "
|
|
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";
|
|
654
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;
|
|
655
734
|
}
|
|
656
|
-
/**
|
|
657
|
-
|
|
658
|
-
|
|
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";
|
|
659
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;
|
|
660
774
|
}
|
|
661
775
|
/**
|
|
662
776
|
* Catch-all variant for any `inputType` not narrowed into a dedicated
|
|
@@ -688,7 +802,26 @@ export interface LegacyMetaBoxField extends MetaBoxFieldBase {
|
|
|
688
802
|
* `registerFieldType` registrations and broad object-literal authoring
|
|
689
803
|
* compiling unchanged.
|
|
690
804
|
*/
|
|
691
|
-
export type MetaBoxField =
|
|
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[];
|
|
692
825
|
/**
|
|
693
826
|
* Shared base for every "card of fields" registration surface — entry
|
|
694
827
|
* meta boxes, term meta boxes, user meta boxes, and settings groups.
|
|
@@ -712,28 +845,17 @@ export interface MetaBoxBaseOptions {
|
|
|
712
845
|
readonly description?: Label;
|
|
713
846
|
readonly priority?: number;
|
|
714
847
|
readonly capability?: string;
|
|
715
|
-
readonly fields: readonly
|
|
848
|
+
readonly fields: readonly MetaBoxFieldInput[];
|
|
716
849
|
}
|
|
717
|
-
/**
|
|
718
|
-
* Field shape for entry meta boxes. Drops `span` from the shared
|
|
719
|
-
* `MetaBoxField` — the editor's document rail is a fixed 256px column,
|
|
720
|
-
* so side-by-side layouts can't fit legibly. Compile-time signal to
|
|
721
|
-
* plugin authors that spans are a page-width affordance only (term,
|
|
722
|
-
* user, settings).
|
|
723
|
-
*
|
|
724
|
-
* `Omit<MetaBoxField, "span">` would normally distribute over the
|
|
725
|
-
* union, but TS's excess-property check across a many-variant
|
|
726
|
-
* distributed `Omit` gets pessimistic and starts rejecting options
|
|
727
|
-
* that exist only on a subset of variants. The explicit per-variant
|
|
728
|
-
* union below preserves the same shape with stable inference.
|
|
729
|
-
*/
|
|
730
|
-
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">;
|
|
731
850
|
/**
|
|
732
851
|
* Meta box shown on the entry editor. Scoped by `entryTypes`. Renders
|
|
733
852
|
* as a collapsible section in the editor's document rail, which is
|
|
734
|
-
* 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.
|
|
735
857
|
*/
|
|
736
|
-
export interface EntryMetaBoxOptions extends
|
|
858
|
+
export interface EntryMetaBoxOptions extends MetaBoxBaseOptions {
|
|
737
859
|
/**
|
|
738
860
|
* @deprecated The entry editor no longer partitions meta boxes by
|
|
739
861
|
* location — every registered box renders as a collapsible section in
|
|
@@ -743,7 +865,6 @@ export interface EntryMetaBoxOptions extends Omit<MetaBoxBaseOptions, "fields">
|
|
|
743
865
|
*/
|
|
744
866
|
readonly location?: "bottom" | "sidebar";
|
|
745
867
|
readonly entryTypes: readonly string[];
|
|
746
|
-
readonly fields: readonly EntryMetaBoxField[];
|
|
747
868
|
}
|
|
748
869
|
/** Meta box shown on the termTaxonomy term edit form. Scoped by `termTaxonomies`. */
|
|
749
870
|
export interface TermMetaBoxOptions extends MetaBoxBaseOptions {
|
|
@@ -790,18 +911,22 @@ export interface RegisteredTermTaxonomy extends TermTaxonomyOptions {
|
|
|
790
911
|
export interface RegisteredEntryMetaBox extends EntryMetaBoxOptions {
|
|
791
912
|
readonly id: string;
|
|
792
913
|
readonly registeredBy: string | null;
|
|
914
|
+
readonly fields: readonly MetaBoxField[];
|
|
793
915
|
}
|
|
794
916
|
export interface RegisteredTermMetaBox extends TermMetaBoxOptions {
|
|
795
917
|
readonly id: string;
|
|
796
918
|
readonly registeredBy: string | null;
|
|
919
|
+
readonly fields: readonly MetaBoxField[];
|
|
797
920
|
}
|
|
798
921
|
export interface RegisteredUserMetaBox extends UserMetaBoxOptions {
|
|
799
922
|
readonly id: string;
|
|
800
923
|
readonly registeredBy: string | null;
|
|
924
|
+
readonly fields: readonly MetaBoxField[];
|
|
801
925
|
}
|
|
802
926
|
export interface RegisteredSettingsGroup extends SettingsGroupOptions {
|
|
803
927
|
readonly name: string;
|
|
804
928
|
readonly registeredBy: string | null;
|
|
929
|
+
readonly fields: readonly MetaBoxField[];
|
|
805
930
|
}
|
|
806
931
|
export interface RegisteredSettingsPage extends SettingsPageOptions {
|
|
807
932
|
readonly name: string;
|
|
@@ -1143,6 +1268,14 @@ export declare function createPluginRegistry(): MutablePluginRegistry;
|
|
|
1143
1268
|
* so "first match" is the only match.
|
|
1144
1269
|
*/
|
|
1145
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[];
|
|
1146
1279
|
/**
|
|
1147
1280
|
* Like `findEntryMetaField`, but for term meta. Scoped by termTaxonomy.
|
|
1148
1281
|
*/
|
|
@@ -1228,6 +1361,9 @@ export interface MetaBoxFieldManifestEntry {
|
|
|
1228
1361
|
readonly inputType: string;
|
|
1229
1362
|
readonly description?: Label;
|
|
1230
1363
|
readonly required?: boolean;
|
|
1364
|
+
/** Static input adornments — see `MetaBoxFieldBase.prepend` / `.append`. */
|
|
1365
|
+
readonly prepend?: Label;
|
|
1366
|
+
readonly append?: Label;
|
|
1231
1367
|
readonly placeholder?: Label;
|
|
1232
1368
|
readonly maxLength?: number;
|
|
1233
1369
|
/**
|
|
@@ -1240,6 +1376,13 @@ export interface MetaBoxFieldManifestEntry {
|
|
|
1240
1376
|
readonly max?: number | string;
|
|
1241
1377
|
readonly step?: number;
|
|
1242
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;
|
|
1243
1386
|
readonly default?: unknown;
|
|
1244
1387
|
readonly span?: MetaBoxFieldSpan;
|
|
1245
1388
|
/**
|
|
@@ -1258,16 +1401,31 @@ export interface MetaBoxFieldManifestEntry {
|
|
|
1258
1401
|
readonly nodes?: readonly string[];
|
|
1259
1402
|
readonly blocks?: readonly string[];
|
|
1260
1403
|
/**
|
|
1261
|
-
*
|
|
1262
|
-
*
|
|
1263
|
-
*
|
|
1264
|
-
*
|
|
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.
|
|
1265
1411
|
*/
|
|
1266
|
-
readonly subFields?: readonly
|
|
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;
|
|
1267
1421
|
/**
|
|
1268
1422
|
* Capability gate for the individual field. See `MetaBoxFieldBase.capability`.
|
|
1269
1423
|
*/
|
|
1270
1424
|
readonly capability?: string;
|
|
1425
|
+
/**
|
|
1426
|
+
* Conditional visibility rules. See `MetaBoxFieldBase.visibleWhen`.
|
|
1427
|
+
*/
|
|
1428
|
+
readonly visibleWhen?: MetaFieldCondition;
|
|
1271
1429
|
}
|
|
1272
1430
|
/**
|
|
1273
1431
|
* Shared base for every "card of fields" serialised entry. Each
|
|
@@ -1282,8 +1440,9 @@ export interface MetaBoxBaseManifestEntry {
|
|
|
1282
1440
|
readonly fields: readonly MetaBoxFieldManifestEntry[];
|
|
1283
1441
|
}
|
|
1284
1442
|
/**
|
|
1285
|
-
*
|
|
1286
|
-
*
|
|
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.
|
|
1287
1446
|
*/
|
|
1288
1447
|
export type EntryMetaBoxFieldManifestEntry = Omit<MetaBoxFieldManifestEntry, "span">;
|
|
1289
1448
|
export interface EntryMetaBoxManifestEntry extends Omit<MetaBoxBaseManifestEntry, "fields"> {
|