@kardalum/plugin-sdk 0.20.0 → 0.21.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/CHANGELOG.md +70 -0
- package/dist/admin-section-registry.d.ts +33 -1
- package/dist/admin-section-registry.js +67 -0
- package/dist/capabilities.js +46 -1
- package/dist/consent-entry.d.ts +11 -0
- package/dist/consent-entry.js +18 -0
- package/dist/content-library.d.ts +17 -0
- package/dist/content-list-extensions.d.ts +50 -0
- package/dist/content-list-extensions.js +11 -0
- package/dist/content-picker/page-picker-sheet.d.ts +2 -0
- package/dist/content-picker/page-picker-sheet.js +1 -1
- package/dist/content-picker/page-picker.d.ts +18 -0
- package/dist/content-picker/page-picker.js +20 -0
- package/dist/datatype-validation.js +10 -2
- package/dist/datatypes-entry.d.ts +1 -0
- package/dist/datatypes-entry.js +2 -0
- package/dist/entitlement-types.d.ts +18 -1
- package/dist/host-entry.d.ts +7 -1
- package/dist/host-entry.js +14 -1
- package/dist/index.d.ts +35 -7
- package/dist/index.js +46 -5
- package/dist/mail.d.ts +6 -2
- package/dist/manifest-entry.d.ts +22 -4
- package/dist/manifest-entry.js +25 -1
- package/dist/manifest-schema.d.ts +570 -31
- package/dist/manifest-schema.js +240 -12
- package/dist/manifest.d.ts +757 -32
- package/dist/manifest.js +8 -4
- package/dist/plugin-context.d.ts +47 -0
- package/dist/plugin-context.js +27 -0
- package/dist/plugin-permissions.d.ts +18 -0
- package/dist/plugin-permissions.js +25 -0
- package/dist/plugin-screen-context.d.ts +152 -11
- package/dist/plugin-screen-context.js +30 -0
- package/dist/providers.d.ts +47 -2
- package/dist/render-page.d.ts +15 -0
- package/dist/render-page.js +20 -0
- package/dist/richtext/block-panel.d.ts +12 -1
- package/dist/richtext/block-panel.js +27 -21
- package/dist/richtext/button-view.d.ts +11 -0
- package/dist/richtext/button-view.js +45 -0
- package/dist/richtext/content-guard.d.ts +4 -0
- package/dist/richtext/content-guard.js +27 -0
- package/dist/richtext/editor-handle.d.ts +34 -0
- package/dist/richtext/editor-handle.js +225 -0
- package/dist/richtext/extensions.d.ts +6 -0
- package/dist/richtext/extensions.js +16 -0
- package/dist/richtext/insert-menu.d.ts +6 -1
- package/dist/richtext/insert-menu.js +38 -18
- package/dist/richtext/item-attributes.d.ts +6 -0
- package/dist/richtext/item-attributes.js +19 -0
- package/dist/richtext/item-panel.d.ts +25 -0
- package/dist/richtext/item-panel.js +118 -0
- package/dist/richtext/item-view.d.ts +58 -0
- package/dist/richtext/item-view.js +172 -0
- package/dist/richtext/mark-form.d.ts +10 -0
- package/dist/richtext/mark-form.js +38 -0
- package/dist/richtext/paste-choice.d.ts +9 -0
- package/dist/richtext/paste-choice.js +13 -0
- package/dist/richtext/plugin-items.d.ts +72 -0
- package/dist/richtext/plugin-items.js +562 -0
- package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
- package/dist/richtext/plugin-mark-tooltips.js +44 -0
- package/dist/richtext/plugin-toolbar.d.ts +57 -0
- package/dist/richtext/plugin-toolbar.js +186 -0
- package/dist/richtext/rich-item-icons.d.ts +5 -0
- package/dist/richtext/rich-item-icons.js +42 -0
- package/dist/richtext/rich-items.d.ts +42 -0
- package/dist/richtext/rich-items.js +68 -0
- package/dist/richtext/rich-text-view-host.d.ts +24 -0
- package/dist/richtext/rich-text-view-host.js +11 -0
- package/dist/richtext/toolbar-button.d.ts +16 -0
- package/dist/richtext/toolbar-button.js +9 -0
- package/dist/richtext/url-paste.d.ts +20 -0
- package/dist/richtext/url-paste.js +82 -0
- package/dist/richtext-html-entry.d.ts +5 -0
- package/dist/richtext-html-entry.js +11 -0
- package/dist/sdk-strings.d.ts +59 -0
- package/dist/sdk-strings.js +64 -0
- package/dist/service-contract.d.ts +17 -0
- package/dist/service-contract.js +39 -0
- package/dist/services.d.ts +114 -0
- package/dist/services.js +1 -0
- package/dist/structured-storage-types.d.ts +124 -4
- package/dist/tailwind.js +10 -5
- package/dist/template-reads.d.ts +16 -0
- package/dist/template-reads.js +21 -0
- package/dist/testing-entry.d.ts +38 -0
- package/dist/testing-entry.js +173 -0
- package/dist/text-entry.d.ts +1 -1
- package/dist/text-entry.js +3 -2
- package/dist/tokens/system-dark.css +1 -0
- package/dist/tokens/tailwind-theme.css +2 -0
- package/dist/tokens/tokens.css +4 -0
- package/dist/tokens/tokens.json +5 -1
- package/dist/uploads.d.ts +43 -0
- package/dist/uploads.js +1 -0
- package/dist/user-library.d.ts +51 -0
- package/dist/user-library.js +15 -0
- package/dist/view-helpers.d.ts +18 -0
- package/dist/view-helpers.js +64 -0
- package/dist/views/content-list-view.js +207 -8
- package/dist/views/content-picker-view.js +1 -1
- package/dist/views/rich-text-view.d.ts +2 -0
- package/dist/views/rich-text-view.js +182 -24
- package/dist/views/unreadable-rich-text.d.ts +17 -0
- package/dist/views/unreadable-rich-text.js +40 -0
- package/dist/visitors.d.ts +81 -0
- package/dist/visitors.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +127 -8
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +82 -7
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +11 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +18 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +80 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +41 -2
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +50 -13
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +19 -10
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +37 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +52 -14
- package/node_modules/@kardalum/api-schemas/dist/index.js +53 -9
- package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +4 -2
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +6 -1
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +178 -2
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +51 -2
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +4 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +12 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +5 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +10 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +48 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +5 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +6 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +67 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +15 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +80 -15
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +67 -23
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +10 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +33 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +2 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +7 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +43 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +36 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +10 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +171 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +406 -42
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +303 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +66 -1
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +465 -7
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +15 -118
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +110 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +9 -2
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +7 -2
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +5 -3
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +3 -1
- package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +9 -1
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +4 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +6 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +5 -1
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +9 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +276 -19
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +21 -8
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +23 -10
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +30 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +6 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +24 -6
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +15 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +14 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +44 -11
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/index.js +5 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
- package/node_modules/@kardalum/plugin-package/package.json +4 -0
- package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
- package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/index.js +2 -0
- package/package.json +15 -3
package/dist/manifest-schema.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { BUILT_IN_RAIL_SECTIONS, PLUGIN_HOOK_EVENTS, apiRouteRawBodyProblem, API_ROUTE_ACCESS_TIERS, PluginNotificationKindsSchema, checkNotificationKinds, API_ROUTE_METHODS, DATABASE_DIALECTS, PLUGIN_TYPES, STORAGE_TYPES, TEMPLATE_KINDS, TIER1_DIALECTS, API_ROUTE_RESPONSE_STATUSES_MAX, isApiRouteResponseStatus, ActionStringSchema, DocsLanguageSchema, PLUGIN_ID_MESSAGE, PLUGIN_ID_REGEX, PluginManifestIdSchema, SLOT_ID_MAX, pluginManifestFields, PluginCmsVersionSchema, SLOT_ID_REGEX, PluginDocsPageSchema, PluginInstallDeclarationSchema, PluginVendorServiceSchema, apiRoutePathParams, checkApiRouteActions, checkApiRouteDeclarations, checkPluginAiDeclarations, checkPluginGraphqlFields, checkTemplateAndAssetDeclarations, PluginContentAccessSchema, PluginMediaAccessSchema, SITE_ROUTE_METHODS, checkSiteExtensionDeclarations, checkEditorExtensionDeclarations,
|
|
2
|
+
import { BUILT_IN_RAIL_SECTIONS, PLUGIN_HOOK_EVENTS, NON_DURABLE_HOOK_EVENTS, GUARD_POINTS, PluginGuardDeclarationSchema, apiRouteRawBodyProblem, API_ROUTE_UPLOAD_METHODS, routeUploadsProblem, API_ROUTE_ACCESS_TIERS, PluginNotificationKindsSchema, checkNotificationKinds, API_ROUTE_METHODS, DATABASE_DIALECTS, PLUGIN_TYPES, STORAGE_TYPES, TEMPLATE_KINDS, TIER1_DIALECTS, API_ROUTE_RESPONSE_STATUSES_MAX, isApiRouteResponseStatus, ActionStringSchema, DocsLanguageSchema, PLUGIN_ID_MESSAGE, PLUGIN_ID_REGEX, PluginManifestIdSchema, SLOT_ID_MAX, pluginManifestFields, PluginCmsVersionSchema, SLOT_ID_REGEX, PluginDocsPageSchema, PluginInstallDeclarationSchema, PluginVendorServiceSchema, apiRoutePathParams, checkApiRouteActions, checkApiRouteDeclarations, checkPluginAiDeclarations, checkPluginGraphqlFields, checkTemplateAndAssetDeclarations, PluginContentAccessSchema, PluginMediaAccessSchema, PluginUserAccessSchema, PluginUserFieldsSchema, SITE_ROUTE_METHODS, readSiteRoutePath, checkSiteExtensionDeclarations, checkEditorExtensionDeclarations, checkContentSlotDeclarations, checkAdminSlotDeclarations, PluginAssetPathSchema, PluginTemplateEntrySchema, checkDocsDeclaration, checkInstallDeclaration, PluginDocumentTypeSchema, PluginActionDeclarationSchema, PluginRoleOfferSchema, PluginLabelSchema, pluginDescriptionSchema, FormRepliesDeclarationSchema, PluginMailKindsSchema, PluginOutboundRequestsSchema, PluginSealedValuesSchema, SIGN_IN_CLIENT_AUTH, SIGN_IN_ICONS, SIGN_IN_PROTOCOLS, SlotLabelSchema, checkActionDeclarations as checkActionDeclarationsRule, isPluginActionFor, PluginSettingsDeclarationSchema, checkPluginSettingsDeclaration, PluginDataTypeConfigsSchema, checkDataTypeConfigDeclarations, CRON_EXPRESSION_MAX, PLUGIN_SCHEDULED_TASKS_MAX, parseCronExpression, isProtectionWidgetScript, isConsentToolFile, isSignInHostedDomainClaim, isSignInMark, signInDescriptionSchema, providerDescriptionSchema, providerLabelSchema, SIGN_IN_HOSTED_DOMAIN_CLAIM_MAX, SIGN_IN_MARK_NAME_MAX, SIGN_IN_STEP_KINDS, signInStepFunctionsProblem, signInStepManifestProblems, ExposedServiceFieldsShape, PluginEventDeclarationsSchema, ServiceContractDeclarationsSchema, UsedServiceDeclarationsSchema, checkServiceDeclarations, isServiceMemberName, parsePluginEventKey, SERVICE_METHODS_MAX, RichTextExtensionsSchema, RichTextNodeDeclarationSchema, RichTextMarkDeclarationSchema, RichTextButtonSchema, RICH_TEXT_NODES_PER_PLUGIN_MAX, RICH_TEXT_MARKS_PER_PLUGIN_MAX, RICH_TEXT_BUTTONS_PER_PLUGIN_MAX, checkRichTextExtensionDeclarations, PluginVisitorIdentitySchema, PluginVisitorGroupsSchema, PluginVisitorAccountSectionsSchema, PluginVisitorDataSchema, PLUGIN_VISITOR_ACCOUNT_SECTIONS_MAX, checkVisitorPointDeclarations } from "@kardalum/api-schemas";
|
|
3
3
|
import { isActionGated } from "./capabilities.js";
|
|
4
4
|
// Runtime mirror of manifest.ts: the same contract, enforced for
|
|
5
5
|
// manifests that arrive as VALUES (Module Federation remotes, sideloaded
|
|
@@ -181,9 +181,26 @@ const durableHookSchema = z
|
|
|
181
181
|
})
|
|
182
182
|
.strict();
|
|
183
183
|
const hookEntrySchema = z.union([callable("hook handler"), durableHookSchema]);
|
|
184
|
-
//
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
// M35 B1a: a key is a core event of the catalog, or another plugin's event as <plugin id>:<name>.
|
|
185
|
+
const hookKeySchema = z.string().refine((key) => HOOK_EVENTS.includes(key) || parsePluginEventKey(key) !== null, {
|
|
186
|
+
message: "a hooks key names an event a plugin can hook, or another plugin's event as <plugin id>:<event name>",
|
|
187
|
+
});
|
|
188
|
+
const hooksSchema = z.record(hookKeySchema, hookEntrySchema).superRefine((hooks, ctx) => {
|
|
189
|
+
// M35 B2: a shutdown is gone after a restart, so its hook is never kept in the outbox.
|
|
190
|
+
for (const event of NON_DURABLE_HOOK_EVENTS) {
|
|
191
|
+
const entry = hooks[event];
|
|
192
|
+
if (entry !== null && typeof entry === "object" && entry.durable === true) {
|
|
193
|
+
ctx.addIssue({ code: "custom", path: [event], message: `${event} is never durable: its moment is gone after a restart (write the handler alone)` });
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
// M35 B2: a guard is the declaration of api-schemas plus its handler; each point once.
|
|
198
|
+
const guardSchema = z.object({ ...PluginGuardDeclarationSchema.shape, handler: callable("guard handler") }).strict();
|
|
199
|
+
const guardsSchema = z
|
|
200
|
+
.array(guardSchema)
|
|
201
|
+
.min(1)
|
|
202
|
+
.max(GUARD_POINTS.length)
|
|
203
|
+
.refine((entries) => new Set(entries.map((entry) => entry.point)).size === entries.length, { message: "declares each point once" });
|
|
187
204
|
// The DataTypePlugin contract's structural shape: shared by manifests
|
|
188
205
|
// (dataTypes contributions arriving as data) and definePlugin (which
|
|
189
206
|
// fronts it with friendlier required-view messages).
|
|
@@ -314,6 +331,38 @@ const editorSlotSchema = z
|
|
|
314
331
|
view: componentSchema,
|
|
315
332
|
})
|
|
316
333
|
.strict();
|
|
334
|
+
// M35 C2: the four content slot shapes and the admin slot shape. The id rules, counts, options and places are
|
|
335
|
+
// checkContentSlotDeclarations and checkAdminSlotDeclarations, run once on the whole manifest, so the schema
|
|
336
|
+
// and the delivery check report the same issues. `slot` and `icon` are typed as the contract's union here and
|
|
337
|
+
// checked as strings: the place and the icon rules are the whole-manifest checks' (which name every place).
|
|
338
|
+
// A missing `values` or `match` does not abort the parse (z.custom aborts by default), so those
|
|
339
|
+
// whole-manifest rules still report in the same pass; none of them calls a contribution's function.
|
|
340
|
+
const slotCallable = (label) => z.custom((value) => typeof value === "function", { message: `${label} must be a function`, abort: false });
|
|
341
|
+
const contentValuesSlotSchema = () => z
|
|
342
|
+
.object({ id: z.string(), label: SlotLabelSchema, action: ActionStringSchema, documentTypes: z.array(z.string()).optional(), values: slotCallable("values") })
|
|
343
|
+
.strict();
|
|
344
|
+
const listFilterSchema = z
|
|
345
|
+
.object({
|
|
346
|
+
id: z.string(),
|
|
347
|
+
label: SlotLabelSchema,
|
|
348
|
+
action: ActionStringSchema,
|
|
349
|
+
documentTypes: z.array(z.string()).optional(),
|
|
350
|
+
options: z.array(z.object({ value: z.string(), label: SlotLabelSchema }).strict()),
|
|
351
|
+
match: slotCallable("match"),
|
|
352
|
+
})
|
|
353
|
+
.strict();
|
|
354
|
+
const adminSlotSchema = z
|
|
355
|
+
.object({
|
|
356
|
+
id: z.string(),
|
|
357
|
+
slot: z.custom((value) => typeof value === "string", { message: "slot must be a string" }),
|
|
358
|
+
label: SlotLabelSchema,
|
|
359
|
+
action: ActionStringSchema,
|
|
360
|
+
// The schema checks only for a name; the delivery checks read it against Lucide's names. Not aborting,
|
|
361
|
+
// so the other slot rules of the same manifest are reported in the same pass.
|
|
362
|
+
icon: z.custom((value) => typeof value === "string" && value.length > 0, { message: "icon must be a non-empty string", abort: false }).optional(),
|
|
363
|
+
view: componentSchema,
|
|
364
|
+
})
|
|
365
|
+
.strict();
|
|
317
366
|
// S297: a route's declared success responses. The keys are decided by the rule
|
|
318
367
|
// the host's route table compiles with (isApiRouteResponseStatus), so the two
|
|
319
368
|
// cannot disagree; the values are real Zod schemas like the request parts.
|
|
@@ -331,6 +380,12 @@ const apiRouteResponseSchema = z.record(z.string(), zodSchemaField).superRefine(
|
|
|
331
380
|
}
|
|
332
381
|
}
|
|
333
382
|
});
|
|
383
|
+
// M35 B3 (W17): the shape only; the rule (methods, limits, types, not beside rawBody, no other key) is api-schemas'
|
|
384
|
+
// routeUploadsProblem: per route for an API route, as rawBody's, and in checkSiteExtensionDeclarations for a site
|
|
385
|
+
// route. Passthrough, so an unknown key is reported once, in the rule's words, rather than twice.
|
|
386
|
+
const routeUploadsShape = z
|
|
387
|
+
.object({ maxFiles: z.number(), maxFileBytes: z.number(), maxTotalBytes: z.number().optional(), types: z.array(z.string()) })
|
|
388
|
+
.passthrough();
|
|
334
389
|
const apiRouteSchema = z
|
|
335
390
|
.object({
|
|
336
391
|
method: z.enum(API_ROUTE_METHODS),
|
|
@@ -359,40 +414,76 @@ const apiRouteSchema = z
|
|
|
359
414
|
// M33 K4: `true` or absent; the method rule is api-schemas' apiRouteRawBodyProblem, which the
|
|
360
415
|
// delivery routes check runs on manifest.json too.
|
|
361
416
|
rawBody: z.literal(true).optional(),
|
|
417
|
+
uploads: routeUploadsShape.optional(),
|
|
362
418
|
})
|
|
363
419
|
.strict()
|
|
364
420
|
.superRefine((route, ctx) => {
|
|
365
421
|
const problem = apiRouteRawBodyProblem(route);
|
|
366
422
|
if (problem !== null)
|
|
367
423
|
ctx.addIssue({ code: "custom", message: problem, path: ["rawBody"] });
|
|
424
|
+
const uploads = routeUploadsProblem(route, API_ROUTE_UPLOAD_METHODS, "route");
|
|
425
|
+
if (uploads !== null)
|
|
426
|
+
ctx.addIssue({ code: "custom", message: uploads, path: ["uploads"] });
|
|
368
427
|
});
|
|
369
428
|
// M32 F2: the shapes of the five site extension keys. The path, count, name and prefix rules are
|
|
370
|
-
// api-schemas' (siteRoutePathProblem, checkSiteExtensionDeclarations), the ones the door runs on manifest.json
|
|
429
|
+
// api-schemas' (siteRoutePathProblem, checkSiteExtensionDeclarations), the ones the door runs on manifest.json,
|
|
430
|
+
// run once on the whole manifest below; a per-route copy reported each problem twice.
|
|
371
431
|
const siteRouteSchema = z
|
|
372
432
|
.object({
|
|
373
433
|
method: z.enum(SITE_ROUTE_METHODS),
|
|
374
434
|
path: z.string(),
|
|
375
|
-
schema: z.object({ querystring: zodSchemaField.optional(), body: zodSchemaField.optional() }).strict().optional(),
|
|
435
|
+
schema: z.object({ querystring: zodSchemaField.optional(), body: zodSchemaField.optional(), params: zodSchemaField.optional() }).strict().optional(),
|
|
376
436
|
handler: callable("handler"),
|
|
437
|
+
// M35 P2 (W21): `true` or absent; the method rule is api-schemas' siteRouteRawBodyProblem.
|
|
438
|
+
rawBody: z.literal(true).optional(),
|
|
439
|
+
// M35 B3 (W17): the rule is checkSiteExtensionDeclarations', run once on the whole manifest.
|
|
440
|
+
uploads: routeUploadsShape.optional(),
|
|
377
441
|
})
|
|
378
442
|
.strict()
|
|
379
443
|
.superRefine((route, ctx) => {
|
|
380
|
-
|
|
381
|
-
if (
|
|
382
|
-
|
|
444
|
+
// M35 P3 (W18): params only where the path has some; the path rule itself is api-schemas'.
|
|
445
|
+
if (route.schema?.params === undefined)
|
|
446
|
+
return;
|
|
447
|
+
const read = readSiteRoutePath(route.method, route.path);
|
|
448
|
+
if (read.ok && read.pattern.params.length === 0)
|
|
449
|
+
ctx.addIssue({ code: "custom", path: ["schema", "params"], message: 'schema.params is for a path with a parameter or "*"' });
|
|
383
450
|
});
|
|
384
451
|
const siteFallbackSchema = z.object({ resolve: callable("resolve") }).strict();
|
|
385
|
-
|
|
386
|
-
const
|
|
452
|
+
// M35 P2 (W2): shapes only; the core bounds every call (routes/request-guard.ts, routes/response-headers.ts).
|
|
453
|
+
const requestGuardSchema = z.object({ check: callable("check") }).strict();
|
|
454
|
+
const responseHeadersSchema = z.object({ headers: callable("headers") }).strict();
|
|
455
|
+
const pageCacheSchema = z.object({ headers: callable("headers") }).strict();
|
|
456
|
+
const pageGateSchema = z.object({ check: callable("check") }).strict();
|
|
457
|
+
// M35 P3 (W19, evidence 116): `block` and `onFailure` are shapes only, on one object each, as the comment above
|
|
458
|
+
// says of the other site extension keys: the rule (which values, and onFailure on a block tag only) is api-schemas'
|
|
459
|
+
// checkSiteExtensionDeclarations, run once on the whole manifest, so each mistake is reported once, in its words,
|
|
460
|
+
// rather than twice or as a union's vague "Invalid input" at the entry's path. Typed as the contract types (an
|
|
461
|
+
// unchecked z.custom, as `slot` and `heldEmbeds` are) so the parsed manifest is still a PluginManifest.
|
|
462
|
+
const templateFilterSchema = z
|
|
463
|
+
.object({ name: z.string(), onFailure: z.custom().optional(), filter: callable("filter") })
|
|
464
|
+
.strict();
|
|
465
|
+
const templateTagSchema = z
|
|
466
|
+
.object({
|
|
467
|
+
name: z.string(),
|
|
468
|
+
block: z.unknown().optional(),
|
|
469
|
+
onFailure: z.unknown().optional(),
|
|
470
|
+
render: callable("render"),
|
|
471
|
+
})
|
|
472
|
+
.strict()
|
|
473
|
+
.pipe(z.custom());
|
|
387
474
|
const pageHeadSchema = z
|
|
388
475
|
.object({
|
|
389
476
|
// Shape only: the origin and count rules are checkSiteExtensionDeclarations, run once on the whole manifest.
|
|
390
477
|
scriptOrigins: z.array(z.string()).optional(),
|
|
391
478
|
// M33 K27: the one declaration that lets a title entry set the page title.
|
|
392
479
|
setsTitle: z.literal(true).optional(),
|
|
480
|
+
// M35 P1 (W40): the one declaration that lets a head write inline code.
|
|
481
|
+
inlineSnippets: z.literal(true).optional(),
|
|
393
482
|
entries: callable("entries"),
|
|
394
483
|
})
|
|
395
484
|
.strict();
|
|
485
|
+
// M35 P1 (W3): shape only; the core bounds every call (render/page-output.ts).
|
|
486
|
+
const pageOutputSchema = z.object({ transform: callable("transform") }).strict();
|
|
396
487
|
// M32 F4: the shapes of the provider keys and the secrets list. The id, label, prefix and count rules are
|
|
397
488
|
// the `Providers and secrets` delivery check's, run on the live manifest by validate and on manifest.json at the door.
|
|
398
489
|
// The label and description limits are the door's (PROVIDER_LABEL_MAX, PROVIDER_DESCRIPTION_MAX), one definition each.
|
|
@@ -426,6 +517,17 @@ const mailSenderSchema = z
|
|
|
426
517
|
ready: callable("ready").optional(),
|
|
427
518
|
})
|
|
428
519
|
.strict();
|
|
520
|
+
// M35 P5 (W37): a consent tool's shape; the file rules are isConsentToolFile's, and the delivery check finds the files.
|
|
521
|
+
const consentToolSchema = z
|
|
522
|
+
.object({
|
|
523
|
+
...providerBase,
|
|
524
|
+
script: z.string().refine((path) => isConsentToolFile(path, ".js"), { message: 'script names a .js file in the plugin\'s public/ folder, such as "consent.js"' }),
|
|
525
|
+
stylesheet: z
|
|
526
|
+
.string()
|
|
527
|
+
.refine((path) => isConsentToolFile(path, ".css"), { message: "stylesheet names a .css file in the plugin's public/ folder" })
|
|
528
|
+
.optional(),
|
|
529
|
+
})
|
|
530
|
+
.strict();
|
|
429
531
|
const mediaStoreSchema = z
|
|
430
532
|
.object({
|
|
431
533
|
...providerBase,
|
|
@@ -468,6 +570,26 @@ const signInProviderSchema = z
|
|
|
468
570
|
profile: callable("profile").optional(),
|
|
469
571
|
})
|
|
470
572
|
.strict();
|
|
573
|
+
// M35 U3a (D5): a sign-in step's shape. The kind rule and the parts are api-schemas' (sign-in-steps.ts).
|
|
574
|
+
const signInStepSchema = z
|
|
575
|
+
.object({
|
|
576
|
+
...providerBase,
|
|
577
|
+
description: signInDescriptionSchema().optional(),
|
|
578
|
+
kind: z.enum(SIGN_IN_STEP_KINDS),
|
|
579
|
+
status: callable("status"),
|
|
580
|
+
challenge: callable("challenge").optional(),
|
|
581
|
+
verify: callable("verify").optional(),
|
|
582
|
+
setupBegin: callable("setupBegin").optional(),
|
|
583
|
+
setupFinish: callable("setupFinish").optional(),
|
|
584
|
+
setupRemove: callable("setupRemove").optional(),
|
|
585
|
+
})
|
|
586
|
+
.strict()
|
|
587
|
+
.superRefine((entry, ctx) => {
|
|
588
|
+
const present = new Set(Object.keys(entry).filter((name) => typeof entry[name] === "function"));
|
|
589
|
+
const problem = signInStepFunctionsProblem(entry.kind, present);
|
|
590
|
+
if (problem !== null)
|
|
591
|
+
ctx.addIssue({ code: "custom", message: problem });
|
|
592
|
+
});
|
|
471
593
|
const secretDeclarationSchema = z.object({ name: z.string(), label: PluginLabelSchema, description: pluginDescriptionSchema().optional() }).strict();
|
|
472
594
|
const customFormatContributionSchema = z.object({
|
|
473
595
|
name: z.string().regex(/^[a-z0-9-]+$/),
|
|
@@ -504,8 +626,14 @@ const mediaProcessorSchema = z
|
|
|
504
626
|
process: callable("process"),
|
|
505
627
|
})
|
|
506
628
|
.strict();
|
|
629
|
+
// M35 B1a: an offer, its fields by api-schemas' rule and its implementation as functions by method name.
|
|
507
630
|
const exposedServiceSchema = z
|
|
508
|
-
.object({
|
|
631
|
+
.object({
|
|
632
|
+
...ExposedServiceFieldsShape,
|
|
633
|
+
implementation: z
|
|
634
|
+
.record(z.string().refine((name) => isServiceMemberName(name), { message: "a method name" }), callable("service implementation"))
|
|
635
|
+
.refine((methods) => Object.keys(methods).length >= 1 && Object.keys(methods).length <= SERVICE_METHODS_MAX, { message: `1 to ${SERVICE_METHODS_MAX} methods` }),
|
|
636
|
+
})
|
|
509
637
|
.strict();
|
|
510
638
|
const bundledTemplateSchema = z
|
|
511
639
|
.object({
|
|
@@ -656,6 +784,25 @@ function checkNotificationKindDeclarations(value, ctx) {
|
|
|
656
784
|
// and a field removed by a later version both fail loudly instead of being
|
|
657
785
|
// silently dropped. The two cross-checks it runs are what still binds, and
|
|
658
786
|
// they now run for every manifest rather than for some of the old variants.
|
|
787
|
+
// M35 C4a and C4b (W9): the live form. A node takes its server-only validate and its view, a mark its view, and a
|
|
788
|
+
// button's does may open a view with its action; manifest.json writes each view as hasView (richTextExtensionsSummary).
|
|
789
|
+
const richTextExtensionsSchema = RichTextExtensionsSchema.extend({
|
|
790
|
+
nodes: z
|
|
791
|
+
.array(RichTextNodeDeclarationSchema.omit({ hasView: true }).extend({ validate: callable("validate").optional(), view: componentSchema.optional() }))
|
|
792
|
+
.max(RICH_TEXT_NODES_PER_PLUGIN_MAX)
|
|
793
|
+
.optional(),
|
|
794
|
+
marks: z.array(RichTextMarkDeclarationSchema.omit({ hasView: true }).extend({ view: componentSchema.optional() })).max(RICH_TEXT_MARKS_PER_PLUGIN_MAX).optional(),
|
|
795
|
+
buttons: z
|
|
796
|
+
.array(RichTextButtonSchema.extend({
|
|
797
|
+
does: z.union([
|
|
798
|
+
z.object({ insert: z.string() }).strict(),
|
|
799
|
+
z.object({ toggle: z.string() }).strict(),
|
|
800
|
+
z.object({ view: componentSchema, action: ActionStringSchema }).strict(),
|
|
801
|
+
], { error: "a button's does names one of insert or toggle, or a view with its action" }),
|
|
802
|
+
}))
|
|
803
|
+
.max(RICH_TEXT_BUTTONS_PER_PLUGIN_MAX)
|
|
804
|
+
.optional(),
|
|
805
|
+
});
|
|
659
806
|
const contributionsShape = {
|
|
660
807
|
dataTypes: z.array(DataTypePluginSchema).optional(),
|
|
661
808
|
dataTypeConfigs: PluginDataTypeConfigsSchema.optional(),
|
|
@@ -664,8 +811,15 @@ const contributionsShape = {
|
|
|
664
811
|
dashboardWidgets: z.array(dashboardWidgetSchema).optional(),
|
|
665
812
|
editorPanels: z.array(editorSlotSchema).optional(),
|
|
666
813
|
treeActions: z.array(editorSlotSchema).optional(),
|
|
814
|
+
richTextExtensions: richTextExtensionsSchema.optional(),
|
|
815
|
+
contentColumns: z.array(contentValuesSlotSchema()).optional(),
|
|
816
|
+
treeBadges: z.array(contentValuesSlotSchema()).optional(),
|
|
817
|
+
listFilters: z.array(listFilterSchema).optional(),
|
|
818
|
+
bulkActions: z.array(editorSlotSchema).optional(),
|
|
819
|
+
adminSlots: z.array(adminSlotSchema).optional(),
|
|
667
820
|
apiRoutes: z.array(apiRouteSchema).optional(),
|
|
668
821
|
hooks: hooksSchema.optional(),
|
|
822
|
+
guards: guardsSchema.optional(),
|
|
669
823
|
scheduledTasks: z
|
|
670
824
|
.array(scheduledTaskSchema)
|
|
671
825
|
.max(PLUGIN_SCHEDULED_TASKS_MAX)
|
|
@@ -679,7 +833,10 @@ const contributionsShape = {
|
|
|
679
833
|
})
|
|
680
834
|
.optional(),
|
|
681
835
|
mediaProcessors: z.array(mediaProcessorSchema).optional(),
|
|
836
|
+
serviceContracts: ServiceContractDeclarationsSchema.optional(),
|
|
682
837
|
exposedServices: z.array(exposedServiceSchema).optional(),
|
|
838
|
+
usedServices: UsedServiceDeclarationsSchema.optional(),
|
|
839
|
+
events: PluginEventDeclarationsSchema.optional(),
|
|
683
840
|
serializers: serializerContributionSchema.optional(),
|
|
684
841
|
documentTypes: manifestDocumentTypesSchema,
|
|
685
842
|
themeTokens: themeTokensSchema.optional(),
|
|
@@ -705,22 +862,48 @@ const contributionsShape = {
|
|
|
705
862
|
contentAccess: PluginContentAccessSchema.optional(),
|
|
706
863
|
// M32 F4c (D10): likewise the media rule.
|
|
707
864
|
mediaAccess: PluginMediaAccessSchema.optional(),
|
|
865
|
+
// M35 U1 (W6): account access and account fields, api-schemas' own rules.
|
|
866
|
+
userAccess: PluginUserAccessSchema.optional(),
|
|
867
|
+
userFields: PluginUserFieldsSchema.optional(),
|
|
868
|
+
// M35 U2b (W8): the visitor points, api-schemas' shapes. The functions are checked (and kept) here: manifest.json
|
|
869
|
+
// carries none, so the door reads the rest only.
|
|
870
|
+
visitorIdentity: PluginVisitorIdentitySchema.optional(),
|
|
871
|
+
visitorGroups: PluginVisitorGroupsSchema.optional(),
|
|
872
|
+
visitorAccountSections: z
|
|
873
|
+
.array(PluginVisitorAccountSectionsSchema.element.extend({ data: callable("data") }))
|
|
874
|
+
.min(1)
|
|
875
|
+
.max(PLUGIN_VISITOR_ACCOUNT_SECTIONS_MAX)
|
|
876
|
+
.optional(),
|
|
877
|
+
visitorData: PluginVisitorDataSchema.extend({
|
|
878
|
+
export: callable("export"),
|
|
879
|
+
erase: callable("erase"),
|
|
880
|
+
}).optional(),
|
|
708
881
|
// M32 F2: site addresses, template extensions and the page head.
|
|
709
882
|
siteRoutes: z.array(siteRouteSchema).optional(),
|
|
710
883
|
siteFallback: siteFallbackSchema.optional(),
|
|
884
|
+
// M35 P2 (W2): the request guard and the response headers.
|
|
885
|
+
requestGuard: requestGuardSchema.optional(),
|
|
886
|
+
responseHeaders: responseHeadersSchema.optional(),
|
|
887
|
+
pageGate: pageGateSchema.optional(),
|
|
711
888
|
templateFilters: z.array(templateFilterSchema).optional(),
|
|
712
889
|
templateTags: z.array(templateTagSchema).optional(),
|
|
713
890
|
pageHead: pageHeadSchema.optional(),
|
|
714
891
|
// M33 K42: shape only; the rules are checkSiteExtensionDeclarations', run once on the whole
|
|
715
892
|
// manifest (the door's rules), so a bad entry is refused once, at its field.
|
|
716
893
|
heldEmbeds: z.array(z.custom()).optional(),
|
|
894
|
+
// M35 P1 (W3): the page output transform.
|
|
895
|
+
pageOutput: pageOutputSchema.optional(),
|
|
896
|
+
pageCache: pageCacheSchema.optional(),
|
|
717
897
|
// M32 F4: providers and the secrets they keep.
|
|
718
898
|
protectionProviders: z.array(protectionProviderSchema).optional(),
|
|
719
899
|
searchProviders: z.array(searchProviderSchema).optional(),
|
|
720
900
|
mediaStores: z.array(mediaStoreSchema).optional(),
|
|
721
901
|
signInProviders: z.array(signInProviderSchema).optional(),
|
|
902
|
+
// M35 U3a (D5): sign-in steps; the sealedValues and storage rule is the refinement below.
|
|
903
|
+
signInSteps: z.array(signInStepSchema).optional(),
|
|
722
904
|
// M32 H (H1, H19): mail senders, and the form replies declaration (api-schemas' own rule).
|
|
723
905
|
mailSenders: z.array(mailSenderSchema).optional(),
|
|
906
|
+
consentTools: z.array(consentToolSchema).optional(),
|
|
724
907
|
formReplies: FormRepliesDeclarationSchema.optional(),
|
|
725
908
|
// M33 K11: the kinds of email the plugin sends to one person (api-schemas' own rule).
|
|
726
909
|
mailKinds: PluginMailKindsSchema.optional(),
|
|
@@ -849,6 +1032,40 @@ export const CMSPluginSchema = z
|
|
|
849
1032
|
for (const issue of checkApiRouteActions(value)) {
|
|
850
1033
|
ctx.addIssue({ code: "custom", message: issue.message, path: issue.path });
|
|
851
1034
|
}
|
|
1035
|
+
})
|
|
1036
|
+
// M35 B1a (W16): the services and events rule `kardalum plugin validate` and the door run too. Like the
|
|
1037
|
+
// data types refinement, it stays quiet when a key failed its own schema above, which reported it once.
|
|
1038
|
+
.superRefine((value, ctx) => {
|
|
1039
|
+
const own = value.contributions;
|
|
1040
|
+
const shapes = [
|
|
1041
|
+
["serviceContracts", ServiceContractDeclarationsSchema],
|
|
1042
|
+
["usedServices", UsedServiceDeclarationsSchema],
|
|
1043
|
+
["events", PluginEventDeclarationsSchema],
|
|
1044
|
+
];
|
|
1045
|
+
if (shapes.some(([key, schema]) => own[key] !== undefined && !schema.safeParse(own[key]).success))
|
|
1046
|
+
return;
|
|
1047
|
+
for (const issue of checkServiceDeclarations(value))
|
|
1048
|
+
ctx.addIssue({ code: "custom", message: issue.message, path: ["contributions", ...issue.path] });
|
|
1049
|
+
})
|
|
1050
|
+
// M35 U2b (W8): the visitor points' rules (a point needs visitorIdentity, an id once, a section's partial one of the
|
|
1051
|
+
// plugin's own), the ones the door runs. Quiet when a key failed its own schema above, which reported it once.
|
|
1052
|
+
.superRefine((value, ctx) => {
|
|
1053
|
+
const own = value.contributions;
|
|
1054
|
+
const shapes = [
|
|
1055
|
+
["visitorIdentity", PluginVisitorIdentitySchema],
|
|
1056
|
+
["visitorGroups", PluginVisitorGroupsSchema],
|
|
1057
|
+
["visitorAccountSections", PluginVisitorAccountSectionsSchema],
|
|
1058
|
+
["visitorData", PluginVisitorDataSchema],
|
|
1059
|
+
];
|
|
1060
|
+
if (shapes.some(([key, schema]) => own[key] !== undefined && !schema.safeParse(own[key]).success))
|
|
1061
|
+
return;
|
|
1062
|
+
for (const issue of checkVisitorPointDeclarations(value))
|
|
1063
|
+
ctx.addIssue({ code: "custom", message: issue.message, path: issue.path });
|
|
1064
|
+
})
|
|
1065
|
+
// M35 U3a (D5): a factor step seals its secret in structured storage, by the rule the door runs too.
|
|
1066
|
+
.superRefine((value, ctx) => {
|
|
1067
|
+
for (const message of signInStepManifestProblems(value))
|
|
1068
|
+
ctx.addIssue({ code: "custom", message, path: ["contributions", "signInSteps"] });
|
|
852
1069
|
})
|
|
853
1070
|
// M31.5 D (D1, D5, D9): the tools and the AI context, by the rule the marketplace door runs on
|
|
854
1071
|
// manifest.json too. The document type schema above already caps the help notes.
|
|
@@ -902,6 +1119,17 @@ export const CMSPluginSchema = z
|
|
|
902
1119
|
for (const issue of checkEditorExtensionDeclarations(value)) {
|
|
903
1120
|
ctx.addIssue({ code: "custom", message: issue.message, path: issue.path });
|
|
904
1121
|
}
|
|
1122
|
+
})
|
|
1123
|
+
// M35 C2: the id, count, options, documentTypes and place rules for the content slots and the admin slots.
|
|
1124
|
+
.superRefine((value, ctx) => {
|
|
1125
|
+
for (const issue of [...checkContentSlotDeclarations(value), ...checkAdminSlotDeclarations(value)]) {
|
|
1126
|
+
ctx.addIssue({ code: "custom", message: issue.message, path: issue.path });
|
|
1127
|
+
}
|
|
1128
|
+
})
|
|
1129
|
+
// M35 C4a: partials, textFrom, titleFrom, buttons and the attribute rules, as the door runs them.
|
|
1130
|
+
.superRefine((value, ctx) => {
|
|
1131
|
+
for (const issue of checkRichTextExtensionDeclarations(value))
|
|
1132
|
+
ctx.addIssue({ code: "custom", message: issue.message, path: issue.path });
|
|
905
1133
|
})
|
|
906
1134
|
.superRefine((value, ctx) => {
|
|
907
1135
|
for (const issue of checkDocsDeclaration(value.docs ?? [])) {
|