@plumix/core 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/entries/read-service.d.ts.map +1 -1
- package/dist/entries/read-service.js +5 -3
- package/dist/entries/read-service.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -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 +18 -22
- 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 +70 -1
- package/dist/plugin/lookup.d.ts.map +1 -1
- package/dist/plugin/manifest.d.ts +308 -128
- 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 +5 -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/build-resolved-entries.d.ts.map +1 -1
- package/dist/route/render/build-resolved-entries.js +7 -2
- package/dist/route/render/build-resolved-entries.js.map +1 -1
- package/dist/route/render/render-template.d.ts.map +1 -1
- package/dist/route/render/render-template.js +12 -2
- 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 +89 -10
- package/dist/rpc/meta/core.d.ts.map +1 -1
- package/dist/rpc/meta/core.js +465 -282
- 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 +60 -1
- 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/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 +26 -0
- 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 +20 -10
- 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/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/traced-context.d.ts +1 -1
- package/dist/test/traced-context.d.ts.map +1 -1
- package/dist/test/traced-context.js +2 -2
- package/dist/test/traced-context.js.map +1 -1
- package/package.json +2 -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
|
@@ -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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"term-list.js","sourceRoot":"","sources":["../../../src/plugin/fields/term-list.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,QAAQ,CAAC,OAA6B;IACpD,MAAM,KAAK,GAAmB;QAC5B,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,UAAU;QACrB,eAAe,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxD,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,37 +0,0 @@
|
|
|
1
|
-
import type { Label } from "../../i18n/label.js";
|
|
2
|
-
import type { MetaBoxFieldSpan, TextMetaBoxField } from "../manifest.js";
|
|
3
|
-
/**
|
|
4
|
-
* Caller-side options for `text()`. Mirrors `TextMetaBoxField` but
|
|
5
|
-
* omits `inputType` and `type` — the builder pins those — and `key` /
|
|
6
|
-
* `label`, which sit on the top level for ergonomics. Excludes every
|
|
7
|
-
* option that doesn't apply to a text input (`min`, `max`, `step`,
|
|
8
|
-
* `options`), so the type system rejects e.g. `text({ min: 5 })`.
|
|
9
|
-
*/
|
|
10
|
-
export interface TextFieldOptions {
|
|
11
|
-
readonly key: string;
|
|
12
|
-
readonly label: Label;
|
|
13
|
-
readonly placeholder?: Label;
|
|
14
|
-
readonly maxLength?: number;
|
|
15
|
-
readonly required?: boolean;
|
|
16
|
-
readonly description?: Label;
|
|
17
|
-
readonly default?: string;
|
|
18
|
-
readonly span?: MetaBoxFieldSpan;
|
|
19
|
-
readonly capability?: string;
|
|
20
|
-
readonly sanitize?: (value: unknown) => unknown;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Build a typed `text` meta-box field. Sugar over the broad
|
|
24
|
-
* `MetaBoxField` shape with the right `inputType` / `type` pinned and
|
|
25
|
-
* non-text options excluded at the type level.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* registerEntryMetaBox("seo", {
|
|
29
|
-
* label: "SEO",
|
|
30
|
-
* entryTypes: ["post"],
|
|
31
|
-
* fields: [
|
|
32
|
-
* text({ key: "title", label: "Meta title", maxLength: 60 }),
|
|
33
|
-
* ],
|
|
34
|
-
* });
|
|
35
|
-
*/
|
|
36
|
-
export declare function text(options: TextFieldOptions): TextMetaBoxField;
|
|
37
|
-
//# sourceMappingURL=text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/plugin/fields/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,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;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAehE"}
|