@kardalum/plugin-sdk 0.18.0 → 0.20.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 +253 -0
- package/README.md +20 -1
- package/dist/admin-section-registry.d.ts +16 -1
- package/dist/admin-section-registry.js +23 -0
- package/dist/assets/asset-picker.js +3 -3
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-serializers.js +1 -1
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +90 -4
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +48 -17
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +55 -3
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/content-library.d.ts +85 -0
- package/dist/content-library.js +15 -0
- package/dist/content-picker/page-picker-sheet.d.ts +13 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-tree.d.ts +25 -0
- package/dist/content-picker/page-tree.js +132 -0
- package/dist/data-type-plugin.d.ts +9 -3
- package/dist/datatype-validation.d.ts +6 -11
- package/dist/datatype-validation.js +141 -3
- package/dist/define-plugin.d.ts +4 -4
- package/dist/define-plugin.js +5 -5
- package/dist/entitlement-entry.d.ts +1 -1
- package/dist/entitlement-entry.js +1 -1
- package/dist/entitlement-gate.d.ts +14 -0
- package/dist/entitlement-gate.js +64 -7
- package/dist/entitlement-plan.d.ts +6 -0
- package/dist/entitlement-plan.js +10 -0
- package/dist/entitlement-types.d.ts +36 -12
- package/dist/entitlement.d.ts +31 -4
- package/dist/entitlement.js +58 -17
- package/dist/hook-entry.d.ts +5 -0
- package/dist/hook-entry.js +30 -0
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +38 -4
- package/dist/index.js +54 -3
- package/dist/mail.d.ts +30 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +29 -4
- package/dist/manifest-entry.js +39 -2
- package/dist/manifest-schema.d.ts +443 -29
- package/dist/manifest-schema.js +292 -24
- package/dist/manifest.d.ts +450 -51
- package/dist/manifest.js +1 -1
- package/dist/media/media-picker.js +33 -20
- package/dist/media/upload-error.d.ts +5 -1
- package/dist/media/upload-error.js +14 -2
- package/dist/media-library.d.ts +32 -0
- package/dist/media-library.js +15 -0
- package/dist/nested-field-host.d.ts +76 -0
- package/dist/nested-field-host.js +90 -0
- package/dist/notify.d.ts +12 -4
- package/dist/notify.js +1 -1
- package/dist/outbound.d.ts +47 -0
- package/dist/outbound.js +1 -0
- package/dist/plugin-context.d.ts +5 -0
- package/dist/plugin-context.js +3 -3
- package/dist/plugin-screen-context.d.ts +112 -0
- package/dist/plugin-screen-context.js +26 -0
- package/dist/providers.d.ts +268 -0
- package/dist/providers.js +74 -0
- package/dist/read-all-pages.d.ts +5 -0
- package/dist/read-all-pages.js +3 -2
- package/dist/register-built-ins.js +6 -6
- package/dist/registry.js +1 -1
- package/dist/richtext/block-panel.js +12 -7
- package/dist/richtext/extensions.js +7 -7
- package/dist/richtext/insert-menu.js +12 -9
- package/dist/richtext/style-listbox.js +7 -5
- package/dist/richtext/text-style-class.js +1 -1
- package/dist/sdk-strings.d.ts +285 -0
- package/dist/sdk-strings.js +347 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/simple-storage-value-provider.js +27 -27
- package/dist/structured-storage-types.d.ts +309 -9
- package/dist/structured-storage-types.js +2 -2
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +6 -0
- package/dist/tokens/tailwind-theme.css +5 -0
- package/dist/tokens/tokens.css +15 -3
- package/dist/tokens/tokens.json +8 -3
- package/dist/ui-entry.js +3 -3
- package/dist/views/asset-view.js +6 -3
- package/dist/views/content-list-preview.js +3 -1
- package/dist/views/content-list-settings-view.js +11 -7
- package/dist/views/content-list-view.d.ts +5 -3
- package/dist/views/content-list-view.js +38 -34
- package/dist/views/content-picker-view.d.ts +3 -0
- package/dist/views/content-picker-view.js +143 -0
- package/dist/views/crop-view.d.ts +4 -6
- package/dist/views/crop-view.js +22 -13
- package/dist/views/date-range-view.js +9 -6
- package/dist/views/file-upload-view.d.ts +5 -7
- package/dist/views/file-upload-view.js +16 -7
- package/dist/views/group-view.d.ts +8 -0
- package/dist/views/group-view.js +123 -0
- package/dist/views/html-code-editor.js +2 -2
- package/dist/views/html-view.js +12 -11
- package/dist/views/image-view.js +40 -22
- package/dist/views/link-view.d.ts +3 -0
- package/dist/views/link-view.js +150 -0
- package/dist/views/options-list-view.d.ts +3 -0
- package/dist/views/options-list-view.js +104 -0
- package/dist/views/repeatable-list-view.d.ts +3 -0
- package/dist/views/repeatable-list-view.js +113 -0
- package/dist/views/rich-text-view.js +32 -16
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +215 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +179 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +116 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +71 -18
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +57 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +137 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +3 -3
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +10 -5
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +7 -4
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +9 -1
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +4 -4
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +267 -12
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +54 -8
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +98 -13
- package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +122 -43
- package/node_modules/@kardalum/api-schemas/dist/index.js +92 -27
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
- package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.d.ts +46 -0
- package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.js +52 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +224 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +404 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +359 -8
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +85 -11
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +22 -10
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +9 -5
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +53 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +284 -0
- package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
- package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +42 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +74 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +38 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +237 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +205 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +357 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +279 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +16 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +34 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +22 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +31 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +310 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +430 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +342 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +400 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +180 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +612 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +50 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +4 -4
- package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +82 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +497 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +91 -1
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +289 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +205 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +121 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +51 -10
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +384 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +616 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +160 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +35 -4
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +8 -2
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +5 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +3 -3
- package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +2 -2
- package/node_modules/@kardalum/design-tokens/dist/theme-css.js +2 -2
- package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +2 -2
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +3 -3
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +3 -3
- package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/themes/light.js +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +15 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +4 -4
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +17 -8
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +2 -2
- package/node_modules/@kardalum/design-tokens/dist/types.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +21 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +8 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +355 -22
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +34 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +47 -5
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +95 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +298 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +27 -5
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +140 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +10 -0
- package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +2 -2
- package/node_modules/@kardalum/plugin-package/dist/envelope.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +3 -3
- package/node_modules/@kardalum/plugin-package/dist/extract.js +9 -9
- package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/hash.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
- package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +2 -2
- package/node_modules/@kardalum/plugin-package/dist/package-contract.js +5 -5
- package/node_modules/@kardalum/plugin-package/dist/types.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +8 -3
- package/node_modules/@kardalum/ui/dist/components/badge.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/button.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/dialog.js +49 -4
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +5 -1
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +18 -5
- package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +4 -4
- package/node_modules/@kardalum/ui/dist/components/input.js +6 -1
- package/node_modules/@kardalum/ui/dist/components/property-field.js +3 -3
- package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +1 -1
- package/node_modules/@kardalum/ui/dist/components/sheet.js +12 -7
- package/node_modules/@kardalum/ui/dist/components/skeleton.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +3 -3
- package/node_modules/@kardalum/ui/dist/components/toast.js +4 -3
- package/node_modules/@kardalum/ui/dist/components/tooltip.d.ts +27 -0
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +81 -0
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +16 -0
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +95 -0
- package/node_modules/@kardalum/ui/dist/components/use-toast.js +2 -2
- package/node_modules/@kardalum/ui/dist/index.d.ts +3 -1
- package/node_modules/@kardalum/ui/dist/index.js +3 -1
- package/node_modules/@kardalum/ui/dist/lib/menu-host.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/lib/menu-host.js +17 -0
- package/node_modules/@kardalum/ui/package.json +8 -6
- package/package.json +18 -7
|
@@ -30,16 +30,19 @@
|
|
|
30
30
|
* them, and they read as a closing caveat rather than as a feature.
|
|
31
31
|
*
|
|
32
32
|
* This package cannot name the SDK's `PluginContributions` (the SDK depends
|
|
33
|
-
* on it), so the SDK asserts at the type level that these
|
|
34
|
-
* exactly `keyof PluginContributions`:
|
|
33
|
+
* on it), so the SDK asserts at the type level that these keys are
|
|
34
|
+
* exactly `keyof PluginContributions`: a contribution added to the
|
|
35
35
|
* contract and not classified here is a compile error in the SDK's build.
|
|
36
36
|
*/
|
|
37
37
|
export const CONTRIBUTION_EMISSION_ORDER = [
|
|
38
38
|
"dataTypes",
|
|
39
|
+
"dataTypeConfigs",
|
|
39
40
|
"documentTypes",
|
|
40
41
|
"adminSections",
|
|
41
42
|
"railEntries",
|
|
42
43
|
"dashboardWidgets",
|
|
44
|
+
"editorPanels",
|
|
45
|
+
"treeActions",
|
|
43
46
|
"templates",
|
|
44
47
|
"assets",
|
|
45
48
|
"themeTokens",
|
|
@@ -48,10 +51,30 @@ export const CONTRIBUTION_EMISSION_ORDER = [
|
|
|
48
51
|
"mediaProcessors",
|
|
49
52
|
"serializers",
|
|
50
53
|
"apiRoutes",
|
|
54
|
+
"contentAccess",
|
|
55
|
+
"mediaAccess",
|
|
56
|
+
"siteRoutes",
|
|
57
|
+
"siteFallback",
|
|
58
|
+
"templateFilters",
|
|
59
|
+
"templateTags",
|
|
60
|
+
"pageHead",
|
|
61
|
+
"heldEmbeds",
|
|
62
|
+
"protectionProviders",
|
|
63
|
+
"searchProviders",
|
|
64
|
+
"mediaStores",
|
|
65
|
+
"signInProviders",
|
|
66
|
+
"mailSenders",
|
|
67
|
+
"formReplies",
|
|
68
|
+
"mailKinds",
|
|
69
|
+
"outboundRequests",
|
|
70
|
+
"secrets",
|
|
71
|
+
"sealedValues",
|
|
51
72
|
"exposedServices",
|
|
52
73
|
"notifications",
|
|
53
74
|
"bundledPlugins",
|
|
54
75
|
"bundledTemplate",
|
|
76
|
+
"aiContext",
|
|
77
|
+
"settings",
|
|
55
78
|
];
|
|
56
79
|
/** The assertion kinds, in emission order. The SDK asserts these are
|
|
57
80
|
* exactly `keyof PluginAssertions`, for the reason above. */
|
|
@@ -87,6 +110,8 @@ export const ASSERTION_KEYS = ["externalNetwork", "filesystemAccess"];
|
|
|
87
110
|
*/
|
|
88
111
|
const CONTRIBUTION_RULES = {
|
|
89
112
|
dataTypes: { derives: "one", id: "content.dataType", mediation: "mediated", actionGated: false },
|
|
113
|
+
// M32 J (J6): declared data types are disclosed under the id editors already have, as one capability.
|
|
114
|
+
dataTypeConfigs: { derives: "one", id: "content.dataType", mediation: "mediated", actionGated: false },
|
|
90
115
|
documentTypes: { derives: "one", id: "content.documentType", mediation: "mediated", actionGated: false },
|
|
91
116
|
adminSections: { derives: "one", id: "admin.section", mediation: "mediated", actionGated: true },
|
|
92
117
|
// S280: a rail entry in a built-in section. Mediated like a section: the
|
|
@@ -95,6 +120,9 @@ const CONTRIBUTION_RULES = {
|
|
|
95
120
|
// they are disclosed under admin.section rather than counted here.
|
|
96
121
|
railEntries: { derives: "one", id: "admin.railEntry", mediation: "mediated", actionGated: true },
|
|
97
122
|
dashboardWidgets: { derives: "one", id: "admin.dashboardWidget", mediation: "mediated", actionGated: true },
|
|
123
|
+
// M32 F3: the host decides where a panel or a tree action renders and checks its action before it does.
|
|
124
|
+
editorPanels: { derives: "one", id: "admin.editorPanel", mediation: "mediated", actionGated: true },
|
|
125
|
+
treeActions: { derives: "one", id: "admin.treeAction", mediation: "mediated", actionGated: true },
|
|
98
126
|
templates: { derives: "one", id: "render.template", mediation: "mediated", actionGated: false },
|
|
99
127
|
assets: { derives: "one", id: "render.asset", mediation: "mediated", actionGated: false },
|
|
100
128
|
themeTokens: { derives: "one", id: "theme.tokens", mediation: "mediated", actionGated: false },
|
|
@@ -109,14 +137,61 @@ const CONTRIBUTION_RULES = {
|
|
|
109
137
|
bundledPlugins: { derives: "one", id: "bundle.plugin", mediation: "mediated", actionGated: false },
|
|
110
138
|
bundledTemplate: { derives: "one", id: "bundle.template", mediation: "mediated", actionGated: false },
|
|
111
139
|
apiRoutes: { derives: "perApiRouteTier", actionGated: true },
|
|
140
|
+
// M32 F (D7): the host checks every call against the declaration and the route's action, so it is mediated.
|
|
141
|
+
contentAccess: { derives: "one", id: "content.access", mediation: "mediated", actionGated: false },
|
|
142
|
+
// M32 F4c (D10): every call goes through the management API as the plugin's subject, which holds only
|
|
143
|
+
// the declared actions, so the host decides the outcome: mediated.
|
|
144
|
+
mediaAccess: { derives: "one", id: "media.access", mediation: "mediated", actionGated: false },
|
|
145
|
+
// M32 F2 (7.1): the host routes, budgets and escapes every call, so each is mediated.
|
|
146
|
+
siteRoutes: { derives: "one", id: "site.route", mediation: "mediated", actionGated: false },
|
|
147
|
+
siteFallback: { derives: "one", id: "site.fallback", mediation: "mediated", actionGated: false },
|
|
148
|
+
templateFilters: { derives: "one", id: "render.templateFilter", mediation: "mediated", actionGated: false },
|
|
149
|
+
templateTags: { derives: "one", id: "render.templateTag", mediation: "mediated", actionGated: false },
|
|
150
|
+
pageHead: { derives: "one", id: "render.pageHead", mediation: "mediated", actionGated: false },
|
|
151
|
+
// M33 K42: the core writes every placeholder and builds every frame, from a declared origin and
|
|
152
|
+
// path only and only after a visitor's click, so it decides the outcome: mediated.
|
|
153
|
+
heldEmbeds: { derives: "one", id: "render.heldEmbed", mediation: "mediated", actionGated: false },
|
|
154
|
+
// M32 F4 (D8, D10): a provider is plugin code the host calls with the site's data (every posted form's
|
|
155
|
+
// fields and address, every published page, every uploaded file), so what it does with them is the
|
|
156
|
+
// plugin's: promised, read by a reviewer. A secret is kept encrypted by the host and handed only to
|
|
157
|
+
// the plugin's own server code, so the host decides the outcome: mediated.
|
|
158
|
+
protectionProviders: { derives: "one", id: "provider.formProtection", mediation: "promised", actionGated: false },
|
|
159
|
+
searchProviders: { derives: "one", id: "provider.search", mediation: "promised", actionGated: false },
|
|
160
|
+
mediaStores: { derives: "one", id: "provider.mediaStore", mediation: "promised", actionGated: false },
|
|
161
|
+
// M32 F4b (D48): a sign-in provider vouches for who signs in to the admin; for oauth2 its own
|
|
162
|
+
// `profile` decides it, so what the provider is trusted with is the plugin's: promised.
|
|
163
|
+
signInProviders: { derives: "one", id: "provider.signIn", mediation: "promised", actionGated: false },
|
|
164
|
+
// M32 H (H2, H19): a mail sender sees every email the site sends (reset links included), and a form
|
|
165
|
+
// reply goes to an address a visitor typed, so what each does with them is the plugin's: promised.
|
|
166
|
+
mailSenders: { derives: "one", id: "provider.mail", mediation: "promised", actionGated: false },
|
|
167
|
+
formReplies: { derives: "one", id: "mail.formReplies", mediation: "promised", actionGated: false },
|
|
168
|
+
// M33 K11 (consolidation 3.15): the host bounds the kinds, the rates and the owner's switch, but to
|
|
169
|
+
// whom the plugin sends and what it writes is the plugin's code, kept to the authors' rule only by
|
|
170
|
+
// review: promised, so it stands under "Needs your consent".
|
|
171
|
+
mailKinds: { derives: "one", id: "mail.direct", mediation: "promised", actionGated: false },
|
|
172
|
+
// M33 K16 (consolidation 3.2): the host makes every call through the checked connection, refuses
|
|
173
|
+
// private networks and bounds the methods, so it decides the outcome: mediated.
|
|
174
|
+
outboundRequests: { derives: "one", id: "network.outbound", mediation: "mediated", actionGated: false },
|
|
175
|
+
secrets: { derives: "one", id: "secrets", mediation: "mediated", actionGated: false },
|
|
176
|
+
// M33 K17: the host seals and opens under a key per plugin and kind, so it decides the outcome: mediated.
|
|
177
|
+
sealedValues: { derives: "one", id: "secrets.sealedValues", mediation: "mediated", actionGated: false },
|
|
178
|
+
// M31.5 D (D9): text for an MCP host, read into the host's own instructions. A route marked as
|
|
179
|
+
// a tool (mcpTool) adds nothing either: its route's tier capability discloses it.
|
|
180
|
+
aiContext: { derives: "none", actionGated: false },
|
|
181
|
+
// M32 F4d (D1): a form the site owner fills grants the plugin no power; a secret field's power is the `secrets` capability.
|
|
182
|
+
settings: { derives: "none", actionGated: false },
|
|
112
183
|
};
|
|
113
184
|
/** Whether this contribution kind sits behind a named permission action.
|
|
114
185
|
* Lives on CONTRIBUTION_RULES rather than in a separate list, because that
|
|
115
|
-
* record is compiler-total over the
|
|
186
|
+
* record is compiler-total over the contribution keys: a new key
|
|
116
187
|
* cannot be added without classifying it here. */
|
|
117
188
|
export function isActionGated(key) {
|
|
118
189
|
return CONTRIBUTION_RULES[key].actionGated;
|
|
119
190
|
}
|
|
191
|
+
/** M31.5 D (D9): whether a contribution kind produces a capability at all (aiContext does not). */
|
|
192
|
+
export function derivesCapability(key) {
|
|
193
|
+
return CONTRIBUTION_RULES[key].derives !== "none";
|
|
194
|
+
}
|
|
120
195
|
/**
|
|
121
196
|
* The access tiers, in emission order, with the classification S267
|
|
122
197
|
* section 6 gives each.
|
|
@@ -209,13 +284,16 @@ function vendorServiceHost(declaration) {
|
|
|
209
284
|
* need to be pinned against it (the marketplace's static mirror) and for
|
|
210
285
|
* the reference page S289 generates. */
|
|
211
286
|
export const CAPABILITY_IDS = [
|
|
212
|
-
|
|
213
|
-
...
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
287
|
+
// M32 J (J6): without repeats, each id at its first position: two keys derive content.dataType.
|
|
288
|
+
...new Set([
|
|
289
|
+
STRUCTURED_STORAGE_ID,
|
|
290
|
+
...CONTRIBUTION_EMISSION_ORDER.flatMap((key) => {
|
|
291
|
+
const rule = CONTRIBUTION_RULES[key];
|
|
292
|
+
return rule.derives === "one" ? [rule.id] : rule.derives === "none" ? [] : API_ROUTE_TIERS.map((entry) => entry.id);
|
|
293
|
+
}),
|
|
294
|
+
...ASSERTION_ENTRIES.map(([, id]) => id),
|
|
295
|
+
VENDOR_SERVICE_ID,
|
|
296
|
+
]),
|
|
219
297
|
];
|
|
220
298
|
// ---------------------------------------------------------------------------
|
|
221
299
|
// Reading a declaration's readable detail
|
|
@@ -239,12 +317,70 @@ function readableField(value) {
|
|
|
239
317
|
}
|
|
240
318
|
return null;
|
|
241
319
|
}
|
|
242
|
-
|
|
320
|
+
const CONTENT_ACCESS_WORDS = [
|
|
321
|
+
["content.read", "read"],
|
|
322
|
+
["content.create", "create drafts"],
|
|
323
|
+
["content.update", "edit"],
|
|
324
|
+
["content.publish", "publish"],
|
|
325
|
+
["content.unpublish", "unpublish"],
|
|
326
|
+
["content.delete", "move to the trash"],
|
|
327
|
+
];
|
|
328
|
+
const MEDIA_ACCESS_WORDS = [
|
|
329
|
+
["media.read", "read every file"],
|
|
330
|
+
["media.create", "add files"],
|
|
331
|
+
];
|
|
332
|
+
/** M32 F4c (D10): "read every file, add files", or null when the declaration names no action. */
|
|
333
|
+
function describeMediaAccess(entry) {
|
|
334
|
+
const actions = entry !== null && typeof entry === "object" ? entry.actions : undefined;
|
|
335
|
+
if (!Array.isArray(actions))
|
|
336
|
+
return null;
|
|
337
|
+
const words = MEDIA_ACCESS_WORDS.filter(([action]) => actions.includes(action)).map(([, word]) => word);
|
|
338
|
+
return words.length === 0 ? null : words.join(", ");
|
|
339
|
+
}
|
|
340
|
+
/** M32 F (D7): "Comment under Post: create drafts", or null when the entry names nothing readable. */
|
|
341
|
+
function describeContentAccess(record) {
|
|
342
|
+
const type = readableField(record.documentType);
|
|
343
|
+
const actions = Array.isArray(record.actions) ? record.actions : [];
|
|
344
|
+
const words = CONTENT_ACCESS_WORDS.filter(([action]) => actions.includes(action)).map(([, word]) => word);
|
|
345
|
+
if (type === null || words.length === 0)
|
|
346
|
+
return null;
|
|
347
|
+
const parents = Array.isArray(record.parents) ? record.parents.filter((p) => typeof p === "string" && p.trim() !== "") : [];
|
|
348
|
+
return `${type} ${parents.length > 0 ? `under ${parents.join(", ")}` : "(any parent)"}: ${words.join(", ")}`;
|
|
349
|
+
}
|
|
350
|
+
/** M32 G (G6): "New comment (content.publish, blog-moderator)", the label then the actions and roles the kind names. */
|
|
351
|
+
function describeNotificationKind(entry) {
|
|
352
|
+
const record = entry !== null && typeof entry === "object" ? entry : null;
|
|
353
|
+
if (record === null)
|
|
354
|
+
return null;
|
|
355
|
+
let label = readableField(record.label);
|
|
356
|
+
if (label === null && record.label !== null && typeof record.label === "object") {
|
|
357
|
+
for (const value of Object.values(record.label)) {
|
|
358
|
+
if (typeof value === "string" && value.trim() !== "") {
|
|
359
|
+
label = value;
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
if (label === null)
|
|
365
|
+
return null;
|
|
366
|
+
const audience = record.audience !== null && typeof record.audience === "object" ? record.audience : {};
|
|
367
|
+
const named = [];
|
|
368
|
+
for (const list of [audience.actions, audience.roles]) {
|
|
369
|
+
if (Array.isArray(list))
|
|
370
|
+
for (const item of list)
|
|
371
|
+
if (typeof item === "string" && item.trim() !== "")
|
|
372
|
+
named.push(item);
|
|
373
|
+
}
|
|
374
|
+
return named.length > 0 ? `${label} (${named.join(", ")})` : label;
|
|
375
|
+
}
|
|
376
|
+
function describeEntry(entry, key) {
|
|
243
377
|
if (typeof entry === "string")
|
|
244
378
|
return entry.trim() || null;
|
|
245
379
|
if (entry === null || typeof entry !== "object")
|
|
246
380
|
return null;
|
|
247
381
|
const record = entry;
|
|
382
|
+
if (key === "contentAccess" && typeof record.documentType === "string" && Array.isArray(record.actions))
|
|
383
|
+
return describeContentAccess(record);
|
|
248
384
|
// An apiRoute is named by what it exposes, not by an id it has no field
|
|
249
385
|
// for: "GET /orders" is the thing a reviewer looks up in the code.
|
|
250
386
|
if (typeof record.method === "string" && typeof record.path === "string") {
|
|
@@ -257,6 +393,197 @@ function describeEntry(entry) {
|
|
|
257
393
|
}
|
|
258
394
|
return null;
|
|
259
395
|
}
|
|
396
|
+
/** M32 F2 (D14): `<last id segment, "-" written "_">_<name>`, api-schemas' templateNameOf restated:
|
|
397
|
+
* this module is on the browser-loadable reference subpath, which imports nothing from api-schemas
|
|
398
|
+
* at run time (reference-entry.test.ts), and the SDK's capabilities test pins the two together. */
|
|
399
|
+
function templateName(pluginId, name) {
|
|
400
|
+
if (typeof pluginId !== "string")
|
|
401
|
+
return name;
|
|
402
|
+
return `${pluginId.slice(pluginId.lastIndexOf(".") + 1).split("-").join("_")}_${name}`;
|
|
403
|
+
}
|
|
404
|
+
/** M33 K4: a route's detail, "<method> <path>", with the core's `rawBody` note when it reads the
|
|
405
|
+
* request exactly as sent (an object detail; every other route stays a plain string). */
|
|
406
|
+
function describeRoute(route) {
|
|
407
|
+
const text = describeEntry(route);
|
|
408
|
+
if (text === null)
|
|
409
|
+
return null;
|
|
410
|
+
const rawBody = route !== null && typeof route === "object" && route.rawBody === true;
|
|
411
|
+
return rawBody ? { text, notes: ["rawBody"] } : text;
|
|
412
|
+
}
|
|
413
|
+
/** M33 K11: a mail kind's label as written (a string or a map read in the reader's language), or null when it has none. */
|
|
414
|
+
function describeMailKind(entry) {
|
|
415
|
+
const label = entry !== null && typeof entry === "object" ? entry.label : undefined;
|
|
416
|
+
if (typeof label === "string")
|
|
417
|
+
return label.trim() === "" ? null : { text: label };
|
|
418
|
+
if (label === null || typeof label !== "object" || Array.isArray(label))
|
|
419
|
+
return null;
|
|
420
|
+
const map = {};
|
|
421
|
+
for (const [code, text] of Object.entries(label))
|
|
422
|
+
if (typeof text === "string")
|
|
423
|
+
map[code] = text;
|
|
424
|
+
return typeof map.en === "string" && map.en.trim() !== "" ? { text: map } : null;
|
|
425
|
+
}
|
|
426
|
+
/** A label as a detail's text: a string as written, or a map read in the reader's language (English required), else null. */
|
|
427
|
+
function labelText(label) {
|
|
428
|
+
if (typeof label === "string")
|
|
429
|
+
return label.trim() === "" ? null : label;
|
|
430
|
+
if (label === null || typeof label !== "object" || Array.isArray(label))
|
|
431
|
+
return null;
|
|
432
|
+
const map = {};
|
|
433
|
+
for (const [code, text] of Object.entries(label))
|
|
434
|
+
if (typeof text === "string")
|
|
435
|
+
map[code] = text;
|
|
436
|
+
return typeof map.en === "string" && map.en.trim() !== "" ? map : null;
|
|
437
|
+
}
|
|
438
|
+
/** M33 K16: the reason as the text and the methods as the core's `methods` note, or null with no readable reason. */
|
|
439
|
+
function describeOutboundRequests(entry) {
|
|
440
|
+
const record = entry !== null && typeof entry === "object" ? entry : null;
|
|
441
|
+
const text = record === null ? null : labelText(record.reason);
|
|
442
|
+
if (text === null || record === null)
|
|
443
|
+
return null;
|
|
444
|
+
const methods = Array.isArray(record.methods) ? record.methods.filter((m) => typeof m === "string" && m !== "") : [];
|
|
445
|
+
return methods.length === 0 ? { text } : { text, notes: [{ id: "methods", value: methods.join(", ") }] };
|
|
446
|
+
}
|
|
447
|
+
/** M33 K17: a sealed value kind's label as the text, with the `leavesServer` note when it is handed to visitors. */
|
|
448
|
+
function describeSealedValue(entry) {
|
|
449
|
+
const record = entry !== null && typeof entry === "object" ? entry : null;
|
|
450
|
+
const text = record === null ? null : labelText(record.label);
|
|
451
|
+
if (text === null || record === null)
|
|
452
|
+
return null;
|
|
453
|
+
return record.leavesServer === true ? { text, notes: ["leavesServer"] } : { text };
|
|
454
|
+
}
|
|
455
|
+
/** The longest privacy notice address read: api-schemas' HELD_EMBED_PRIVACY_URL_MAX, restated
|
|
456
|
+
* because this module imports nothing from api-schemas at run time (see templateName). */
|
|
457
|
+
const HELD_EMBED_PRIVACY_READ_MAX = 500;
|
|
458
|
+
/** The host of an https address, or null (the URL parser; no user or password). For the note's
|
|
459
|
+
* value only: the declaration's rules are plugin-held-embeds.ts's, run by the door and validate. */
|
|
460
|
+
function httpsHost(value) {
|
|
461
|
+
if (typeof value !== "string" || value.length === 0 || value.length > HELD_EMBED_PRIVACY_READ_MAX)
|
|
462
|
+
return null;
|
|
463
|
+
let url;
|
|
464
|
+
try {
|
|
465
|
+
url = new VendorUrlCtor(value);
|
|
466
|
+
}
|
|
467
|
+
catch {
|
|
468
|
+
return null;
|
|
469
|
+
}
|
|
470
|
+
return url.protocol === "https:" && url.username === "" && url.password === "" && url.host !== "" ? url.host : null;
|
|
471
|
+
}
|
|
472
|
+
/** M33 K42: a held embed's line, the provider as the text and the core's notes: where the frame
|
|
473
|
+
* comes from (origin and path prefix), the kind, and the privacy notice's host. A note whose value
|
|
474
|
+
* cannot be read is left out; a declaration with no readable provider gives no line. */
|
|
475
|
+
function describeHeldEmbed(entry) {
|
|
476
|
+
const record = entry !== null && typeof entry === "object" ? entry : null;
|
|
477
|
+
const text = record === null ? null : labelText(record.provider);
|
|
478
|
+
if (text === null || record === null)
|
|
479
|
+
return null;
|
|
480
|
+
const notes = [];
|
|
481
|
+
if (typeof record.origin === "string" && record.origin !== "" && typeof record.pathPrefix === "string" && record.pathPrefix !== "") {
|
|
482
|
+
notes.push({ id: "embedFrom", value: `${record.origin}${record.pathPrefix}` });
|
|
483
|
+
}
|
|
484
|
+
if (record.kind === "map")
|
|
485
|
+
notes.push("embedKindMap");
|
|
486
|
+
else if (record.kind === "content")
|
|
487
|
+
notes.push("embedKindContent");
|
|
488
|
+
const host = httpsHost(record.privacyNotice);
|
|
489
|
+
if (host !== null)
|
|
490
|
+
notes.push({ id: "privacyNoticeAt", value: host });
|
|
491
|
+
return notes.length === 0 ? { text } : { text, notes };
|
|
492
|
+
}
|
|
493
|
+
/** The user events that name an account, so the install screen says they identify people (M33 K20). */
|
|
494
|
+
const PEOPLE_HOOK_EVENTS = ["user:afterLogin", "user:afterCreate", "user:afterDelete"];
|
|
495
|
+
/** M33 K45: a plugin editor's name as `{ text }` (a string, or its label map read in the reader's
|
|
496
|
+
* language by every surface); with no readable name, the entry's other name fields as the text. */
|
|
497
|
+
function describeDataType(entry) {
|
|
498
|
+
const text = labelText(entry !== null && typeof entry === "object" ? entry.name : undefined);
|
|
499
|
+
if (text !== null)
|
|
500
|
+
return { text };
|
|
501
|
+
const fallback = describeEntry(entry, "dataTypes");
|
|
502
|
+
return fallback === null ? null : { text: fallback };
|
|
503
|
+
}
|
|
504
|
+
/** M33 K20: a hook event as a plain name, or with the core's notes for an account event and a durable one.
|
|
505
|
+
* The entry is the event name, or (a durable hook, live or redacted) `{ event, durable: true }`. */
|
|
506
|
+
function describeHook(entry) {
|
|
507
|
+
const record = entry !== null && typeof entry === "object" ? entry : null;
|
|
508
|
+
const event = typeof entry === "string" ? entry : typeof record?.event === "string" ? record.event : "";
|
|
509
|
+
if (event.trim() === "")
|
|
510
|
+
return null;
|
|
511
|
+
const notes = [];
|
|
512
|
+
if (PEOPLE_HOOK_EVENTS.includes(event))
|
|
513
|
+
notes.push("identifiesPeople");
|
|
514
|
+
if (record?.durable === true)
|
|
515
|
+
notes.push("durable");
|
|
516
|
+
return notes.length === 0 ? event : { text: event, notes };
|
|
517
|
+
}
|
|
518
|
+
/** M33 K51: a protection provider's line is its name, and for a provider with a widget script
|
|
519
|
+
* instead the bare line `<id>: public/<file>` with the core's `addsScript` note (Captcha design
|
|
520
|
+
* C2). The file's rule is the delivery check's and the attach check's; this module only shows
|
|
521
|
+
* what was declared. */
|
|
522
|
+
function describeProtectionProvider(entry) {
|
|
523
|
+
const record = entry !== null && typeof entry === "object" ? entry : null;
|
|
524
|
+
const id = record?.id;
|
|
525
|
+
const file = record?.widgetScript;
|
|
526
|
+
if (typeof id === "string" && id.trim() !== "" && typeof file === "string" && file.trim() !== "") {
|
|
527
|
+
return [{ text: `${id}: public/${file}`, notes: ["addsScript"] }];
|
|
528
|
+
}
|
|
529
|
+
const name = describeEntry(entry, "protectionProviders");
|
|
530
|
+
return name === null ? [] : [name];
|
|
531
|
+
}
|
|
532
|
+
/** The detail lines of a `derives: "one"` contribution. */
|
|
533
|
+
function detailsOf(key, entries, pluginId) {
|
|
534
|
+
if (key === "protectionProviders")
|
|
535
|
+
return entries.flatMap(describeProtectionProvider);
|
|
536
|
+
if (key === "hooks")
|
|
537
|
+
return entries.map(describeHook).filter((detail) => detail !== null);
|
|
538
|
+
if (key === "outboundRequests")
|
|
539
|
+
return entries.map(describeOutboundRequests).filter((detail) => detail !== null);
|
|
540
|
+
if (key === "heldEmbeds")
|
|
541
|
+
return entries.map(describeHeldEmbed).filter((detail) => detail !== null);
|
|
542
|
+
if (key === "sealedValues")
|
|
543
|
+
return entries.map(describeSealedValue).filter((detail) => detail !== null);
|
|
544
|
+
if (key === "mailKinds")
|
|
545
|
+
return entries.map(describeMailKind).filter((detail) => detail !== null);
|
|
546
|
+
if (key === "templateFilters" || key === "templateTags") {
|
|
547
|
+
return entries.flatMap((entry) => {
|
|
548
|
+
const name = entry !== null && typeof entry === "object" ? entry.name : undefined;
|
|
549
|
+
return typeof name === "string" && name.trim() !== "" ? [templateName(pluginId, name)] : [];
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
if (key === "pageHead") {
|
|
553
|
+
// The bare origins: the capability's label and shopper text say what they are, in every
|
|
554
|
+
// locale, and a detail is shown as written. M33 K27: then, for a head that declares
|
|
555
|
+
// `setsTitle: true`, a detail that is only the core's note "may set the page title".
|
|
556
|
+
return entries.flatMap((entry) => {
|
|
557
|
+
const head = entry !== null && typeof entry === "object" ? entry : null;
|
|
558
|
+
const origins = head?.scriptOrigins;
|
|
559
|
+
const lines = Array.isArray(origins) ? origins.filter((o) => typeof o === "string" && o.trim() !== "") : [];
|
|
560
|
+
if (head?.setsTitle === true)
|
|
561
|
+
lines.push({ text: "", notes: ["setsTitle"] });
|
|
562
|
+
return lines;
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
if (key === "notifications")
|
|
566
|
+
return entries.map(describeNotificationKind).filter((detail) => detail !== null);
|
|
567
|
+
if (key === "mediaAccess")
|
|
568
|
+
return entries.map(describeMediaAccess).filter((detail) => detail !== null);
|
|
569
|
+
if (key === "dataTypes")
|
|
570
|
+
return entries.map(describeDataType).filter((detail) => detail !== null);
|
|
571
|
+
if (key === "dataTypeConfigs") {
|
|
572
|
+
// M32 J (J6): "<name> (<the editor id's last segment>)", e.g. "Highlight (group)". M33 K45: as
|
|
573
|
+
// `{ text }`, the same kind of line as a plugin editor's name beside it.
|
|
574
|
+
return entries.flatMap((entry) => {
|
|
575
|
+
const declared = entry !== null && typeof entry === "object" ? entry : null;
|
|
576
|
+
const name = typeof declared?.name === "string" ? declared.name.trim() : "";
|
|
577
|
+
if (name === "")
|
|
578
|
+
return [];
|
|
579
|
+
const editorId = typeof declared?.editorId === "string" ? declared.editorId : "";
|
|
580
|
+
const kind = editorId.slice(editorId.lastIndexOf(".") + 1);
|
|
581
|
+
return [{ text: kind === "" ? name : `${name} (${kind})` }];
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
// A bare string is no content access entry (they are objects), so it counts but names nothing.
|
|
585
|
+
return entries.map((entry) => (key === "contentAccess" && typeof entry === "string" ? null : describeEntry(entry, key))).filter((detail) => detail !== null);
|
|
586
|
+
}
|
|
260
587
|
/**
|
|
261
588
|
* Normalises one declared contribution value into the entries that
|
|
262
589
|
* produced it, handling the three shapes the contract uses: a list, the
|
|
@@ -287,8 +614,11 @@ function declaredEntries(key, value) {
|
|
|
287
614
|
return [];
|
|
288
615
|
// `hooks` is Record<event, handler> live and string[] once redacted; the
|
|
289
616
|
// array branch above already covered the redacted form.
|
|
290
|
-
|
|
291
|
-
|
|
617
|
+
// M33 K18: a durable entry (`{ handler, durable: true }`) is read as `{ event, durable: true }`, the form
|
|
618
|
+
// the redacted list carries, so one reader serves both.
|
|
619
|
+
if (key === "hooks") {
|
|
620
|
+
return Object.entries(value).map(([event, hook]) => hook !== null && typeof hook === "object" && hook.durable === true ? { event, durable: true } : event);
|
|
621
|
+
}
|
|
292
622
|
// A present-but-empty object buys nothing, which is the rule the array
|
|
293
623
|
// branch gets for free: `themeTokens: {}` declares no tokens, so it is
|
|
294
624
|
// not a theme capability.
|
|
@@ -336,15 +666,18 @@ export function deriveCapabilities(manifest) {
|
|
|
336
666
|
if (entries.length === 0)
|
|
337
667
|
continue;
|
|
338
668
|
const rule = CONTRIBUTION_RULES[key];
|
|
669
|
+
if (rule.derives === "none")
|
|
670
|
+
continue;
|
|
339
671
|
if (rule.derives === "one") {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
}
|
|
672
|
+
const details = detailsOf(key, entries, source.id);
|
|
673
|
+
const at = capabilities.findIndex((capability) => capability.id === rule.id);
|
|
674
|
+
if (at !== -1) {
|
|
675
|
+
// M32 J (J6): dataTypeConfigs derives content.dataType beside dataTypes, as one capability.
|
|
676
|
+
const before = capabilities[at];
|
|
677
|
+
capabilities[at] = { ...before, payload: { count: before.payload.count + entries.length, details: [...before.payload.details, ...details] } };
|
|
678
|
+
continue;
|
|
679
|
+
}
|
|
680
|
+
capabilities.push({ id: rule.id, payload: { count: entries.length, details }, mediation: rule.mediation });
|
|
348
681
|
continue;
|
|
349
682
|
}
|
|
350
683
|
// One contribution, up to three capabilities: the routes are grouped
|
|
@@ -358,7 +691,7 @@ export function deriveCapabilities(manifest) {
|
|
|
358
691
|
id: tier.id,
|
|
359
692
|
payload: {
|
|
360
693
|
count: routes.length,
|
|
361
|
-
details: routes.map(
|
|
694
|
+
details: routes.map(describeRoute).filter((detail) => detail !== null),
|
|
362
695
|
},
|
|
363
696
|
mediation: tier.mediation,
|
|
364
697
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VIEW_BEARING_CONTRIBUTIONS: readonly ["dataTypes", "adminSections", "railEntries", "dashboardWidgets"];
|
|
1
|
+
export declare const VIEW_BEARING_CONTRIBUTIONS: readonly ["dataTypes", "adminSections", "railEntries", "dashboardWidgets", "editorPanels", "treeActions"];
|
|
2
2
|
/** An empty array declares nothing and so buys no bundle. Named for what it
|
|
3
3
|
* answers, not `hasClientBundle`: that name once took a `type` string. */
|
|
4
4
|
export declare function declaresClientBundle(contributions: unknown): boolean;
|
|
@@ -9,6 +9,8 @@ export const VIEW_BEARING_CONTRIBUTIONS = [
|
|
|
9
9
|
"adminSections",
|
|
10
10
|
"railEntries",
|
|
11
11
|
"dashboardWidgets",
|
|
12
|
+
"editorPanels",
|
|
13
|
+
"treeActions",
|
|
12
14
|
];
|
|
13
15
|
/** An empty array declares nothing and so buys no bundle. Named for what it
|
|
14
16
|
* answers, not `hasClientBundle`: that name once took a `type` string. */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Whether `version` satisfies `range`. True also whenever either text cannot
|
|
2
|
+
* be read (see the header). */
|
|
3
|
+
export declare function cmsRangeAllows(range: string, version: string): boolean;
|
|
4
|
+
/** The range `kardalum plugin build` writes for a plugin built with this SDK
|
|
5
|
+
* version: `>=0.19.0 <1.0.0` before 1.0, `>=1.4.2 <2.0.0` after it, and
|
|
6
|
+
* `>=1.0.0-rc.1 <2.0.0` for a release candidate (its own tail is the lower bound). */
|
|
7
|
+
export declare function builtCmsRange(sdkVersion: string): string;
|
|
8
|
+
/** Whether a range admits any version below `floor` (a full stable version such as `0.20.0`),
|
|
9
|
+
* for a manifest that uses something only that version and later can run. A pre-release of the
|
|
10
|
+
* floor itself (`0.20.0-rc.1`) counts as the floor. Unlike cmsRangeAllows, a range that cannot be
|
|
11
|
+
* read answers true: what it admits cannot be shown to start at the floor. */
|
|
12
|
+
export declare function cmsRangeAdmitsBelow(range: string, floor: string): boolean;
|
|
13
|
+
export type CmsRangeAgainstBuilt = "inside" | "outside" | "empty" | "unreadable";
|
|
14
|
+
/** A hand-written range against the versions a build with this SDK was made
|
|
15
|
+
* for: inside them, admitting a version outside them, admitting no version
|
|
16
|
+
* at all, or text that cannot be read. */
|
|
17
|
+
export declare function cmsRangeAgainstBuilt(range: string, sdkVersion: string): CmsRangeAgainstBuilt;
|