@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
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,259 @@ Subpaths are noted per entry. `.` is the package index; `./manifest` is the
|
|
|
8
8
|
server-safe manifest contract subpath, which pulls in no React and no
|
|
9
9
|
`@kardalum/ui`.
|
|
10
10
|
|
|
11
|
+
## 0.20.0
|
|
12
|
+
|
|
13
|
+
The built-in views follow the admin's language and direction.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- `.` and `./manifest`: a plugin settings field's `description` may be 240 characters in each language, up from 120 (evidence 91): `PLUGIN_SETTING_DESCRIPTION_MAX` and `PluginSettingDescriptionSchema` in `@kardalum/api-schemas`, which the manifest schema, `kardalum plugin validate` and the marketplace's `Plugin settings` check all read. A field's `label` stays at `PLUGIN_LABEL_MAX` (120). A secret's `description` takes the same 240 (`pluginDescriptionSchema()`), so a secret is never held shorter than the setting that names it.
|
|
18
|
+
- `@kardalum/api-schemas` (evidence 148): `GET` and `PUT /api/manage/v1/plugins/:pluginId/settings` and `GET .../secrets` answer each label, description, choice label and task name as the manifest declares it, a string or a language map (`PluginLabel`), instead of one string in the site's default language, and the admin shows a map in the signed-in person's language (else its primary language, else English). `PluginSettingsFieldView`, `PluginSettingsTaskView` and `PluginSecretRow` widen accordingly; `pluginSettingsFieldView(field, null)` keeps the labels as declared. Code that reads these answers resolves a map with `resolveLabel`.
|
|
19
|
+
- `kardalum plugin validate` and the marketplace (evidence 149): `label languages` asks for `locales/<language>.json` only of a plugin with screens (a view-bearing contribution: `dataTypes`, `adminSections`, `railEntries`, `dashboardWidgets`, `editorPanels`, `treeActions`). A plugin without screens keeps its words in its label maps and is no longer warned that its languages have no locale file; a map that lacks a language another carries is still reported. The marketplace listing agrees: for a plugin without screens a language every label map carries is listed as complete (`summarizePluginLanguages` in `@kardalum/api-schemas` takes those languages as a fourth argument, `wordsInLabels`), where it was listed as partial.
|
|
20
|
+
- `.` and `./manifest`: on a route or site route of an install with no public URL, `listPublishedPages`, `getPublishedContent`'s `addresses`, `pageAddresses` and `publicMediaUrl` print a domain stored without a scheme with the request's own scheme, as `siteOfHost` answers, where they printed `https` before (SEO rework Task 1). With a public URL set, its scheme as before; in a hook or a scheduled task, which have no request, `https` as before.
|
|
21
|
+
- `.` and `./manifest`: BREAKING for code that calls `context.protectionFields()` or builds a `PluginApiRouteContext` itself (a test's fake route or site route context) (M33, Forms review). `protectionFields()` now answers a promise, `Promise<ProtectionFields>`, and `ProtectionFields` (defined once in `@kardalum/api-schemas`) gains `minSeconds`: the built-in check's live minimum time from Server settings (`FORM_PROTECTION_MIN_SECONDS`, 3, by default), read on every call as the check reads it. A front end of the site's own that sends with the token waits at least that long, where it had to assume the default and was refused in silence when the operator raised it. Add `await` where the fields are read.
|
|
22
|
+
- `.` and `./manifest`: a form protection, search or media store entry's `label` and `description` now keep to the door's limits in the manifest schema too (core part 7 fix wave): a label of at most `PROVIDER_LABEL_MAX` (80) characters and a description of at most `PROVIDER_DESCRIPTION_MAX` (300) characters per language, both in `@kardalum/api-schemas` (`providerLabelSchema()` and `providerDescriptionSchema()`), where the schema took the shared 120 for both before. A description of 121 to 300 characters that `kardalum plugin validate` refused now passes; a label of 81 to 120 that only the `Providers and secrets` check refused is now refused by the schema as well.
|
|
23
|
+
- `@kardalum/api-schemas` (core part 7 fix wave): the sign-in card's state gains `passwordRequiredCount`, the linked people with no password whose role now manages the site (whom sign-in refuses with `password_required`), and `icon`; each identity in the sign-in methods answer gains `icon` (`"key"` once the button is no longer attached), so a button without a picture draws its own icon.
|
|
24
|
+
|
|
25
|
+
- `.` and `./manifest`: a sign-in entry (`SignInProviderContribution`) gains two fields and narrows one (M33 K56, K57, K58). `description` is now shown on the login page, the card and the Connect dialog, so it is at most `SIGN_IN_DESCRIPTION_MAX` (160, in `@kardalum/api-schemas`) characters per language, narrower than other providers' 300 (and wider than the 120 the shared label rule allowed it before), with no control, direction or other hidden character; the manifest schema, the attach and the `Providers and secrets` check refuse a longer one. `mark` (new) is the file name of a PNG in the plugin's own `public/` folder (`isSignInMark`: 5 to 64 lower-case letters, digits and `-`, ending in `.png`), drawn at the button's inline start with the `icon` as its fallback. `hostedDomainClaim` (new, `oidc` only, refused on `oauth2`) names the ID token claim that carries the organisation's domain (`isSignInHostedDomainClaim`: a lower-case letter, then lower-case letters, digits and `_`, 1 to 64 characters), such as Google's `"hd"`. In `@kardalum/api-schemas`, `SIGN_IN_ERROR_CODES` gains `domain_not_hosted` and `password_required`, `SIGN_IN_NOT_OFFERED_REASONS` gains `issuer_invalid` and `issuer_has_own_button`, a sign-in provider's settings gain an optional `displayName` (1 to 60 characters after trimming, or `null`), and the public provider list, the card's state and the sign-in methods answers gain `description`, `markUrl`, `displayName` and `hostedDomainChecked` where they apply. Code that switches over every error code or reason needs two more cases each.
|
|
26
|
+
- `.` and `./manifest`: BREAKING for code that builds a `PluginApiRouteContext` itself (a test's fake route or site route context) (M33 K52). It gains a required `protectionWidget(): Promise<ProtectionWidgetInfo | null>` (`ProtectionWidgetInfo` exported): the chosen form protection provider's `{ provider, fieldPrefix, widget, script }` for a front end the site builds itself, with `widget` the checked parts `{% form_protection %}` writes (`class`, `data`, `fallbackText`) or `null`, `script` the provider's script address under its asset folder or `null`, and `null` for the whole answer while the built-in check serves alone. The widget is asked with no language (`culture` is `null`). It is read once a call and asks for no capability, as it answers what any page shows a visitor.
|
|
27
|
+
- `.` and `./manifest`: a protection provider's `verify` may tell a refusal with one word (M33 K53, evidence 134): `{ ok: false, reason, tell }`, where `tell` is a `ProtectionTellWord` from `PROTECTION_TELL_WORDS`, a list that only grows: `"needsScript"` (the send came without the check's script), `"expired"` (the answer's challenge had run out) or `"unavailable"` (the provider could not check). `context.protect` then answers `{ ok: false, check: "provider", reason: "provider_refused", tell }`, so a plugin may show its visitor one fixed sentence. Any other `tell` value is dropped and the refusal stays silent; no provider text reaches a visitor. A caller that does not know the word answers as before. A caller that tells its visitor answers `"expired"`, `"unavailable"` and `provider_unavailable` alike ("not sent, please send it again"), and never tells a wrong or reused answer, which a provider answers without a word.
|
|
28
|
+
- `kardalum plugin validate` and the marketplace refuse a package that declares a protection provider's `widgetScript` (M33 K51) while its `cmsVersion` admits any version below 0.20.0, in the check that already holds `outboundRequests`, `sealedValues`, durable hooks and `heldEmbeds` to that floor, because an older CMS ignores the field and loads no script. In the install screen a provider with a `widgetScript` shows the line `<id>: public/<file>` with the note that it adds its own script, in place of its name.
|
|
29
|
+
- `.` and `./manifest`: a protection provider's `widget` gets a context, and its answer may carry a visible sentence (M33 K50). `widget(context)` receives `ProtectionWidgetContext` (exported): `culture` (the render's language, or `null`), `settingsValues` (the plugin's non-secret settings values as a frozen plain record, read once before the call, `{}` when that read fails; a record, not the asynchronous `settings` reader of other contexts, because `widget` is synchronous), `assetBase` (the plugin's own `public/` folder at its installed version, as on the page head) and `minSeconds` (the built-in check's live minimum time, so a browser half never sends before the built-in check would accept). The answer, `ProtectionWidgetAnswer` (exported), may carry `fallbackText`: 1 to `PROTECTION_WIDGET_FALLBACK_MAX` (300, in `@kardalum/api-schemas`) characters, not blank, with no control, direction or other hidden character and no lone surrogate (as a sign-in entry's line), written escaped and visible as the widget's only child, `<p data-protection-fallback>`, on a page render only (an edit render writes the `<div>` without it). The provider's script removes it. An invalid one is left out, the rest of the widget kept, and logged once a minute. A widget written without the parameter keeps working; a promise is still a malformed answer.
|
|
30
|
+
- `.` and `./manifest`: a protection provider may name its own script, `widgetScript` (M33 K51): a `.js` file of the plugin's own `public/` folder by the one rule for such files (`isPluginPublicFilePath`; `isProtectionWidgetScript` in `@kardalum/api-schemas`), such as `"captcha.js"`. `{% form_protection %}` writes `<script src="/plugin-assets/<id>/<version>/public/<file>" defer></script>` once a render, right after the first widget, never in an edit render and never when the widget wrote nothing, so the script loads only on pages with a protected form and no longer depends on `{% plugin_head %}`. The manifest schema, the attach check and the `Providers and secrets` delivery check refuse any other value, and the delivery check also requires the file in the package. The install screen shows the bare line `<id>: public/<file>` with the note "adds its own script to pages with a protected form".
|
|
31
|
+
- `.` and `./manifest`: BREAKING for code that builds a `PageHeadContext` itself (a test's fake page head context) (M33 K49). It gains a required `assetBase`: the address of the plugin's own `public/` folder at its installed version, `/plugin-assets/<id>/<version>/public/`, with the closing slash, taken from the version the registry attached (an update brings the new one). A head script or stylesheet is `assetBase` plus a file named by the one rule `isPluginPublicFilePath` (new, exported from `@kardalum/api-schemas`: 1 to 200 characters, segments of letters, digits, `-`, `_` and `.`, no empty, `.` or `..` segment, no leading `/`). The own-file check on head entries now uses that rule, so a file name with `~` or over 200 characters is refused. A head that only reads its context is unchanged.
|
|
32
|
+
- BREAKING for a package whose locale file holds a plural form its language does not use (M33 K37). `kardalum plugin validate` and the marketplace's door run `locale parity` in each file's own language: an English plural group (`x_one` and `x_other`) asks the language for its CLDR forms (German `one` and `other`, Arabic `zero`, `one`, `two`, `few`, `many` and `other`, Japanese `other`; French, Spanish, Italian and Portuguese `one`, `many` and `other`, so their files, which passed with `_one` and `_other`, now warn until they add `_many`; Russian, Polish, Ukrainian and Czech `one`, `few`, `many` and `other`), so a `ja.json` that carries `x_one`, which passed before, now fails as a key English lacks, and an Arabic `x_few`, which failed before, now passes. Each form keeps English `_other`'s placeholders, except that the zero, one and two forms may leave `{{count}}` out. A form a language lacks only warns, and the warning counts the keys the language is asked for (`ar.json: 4 of 6 keys missing`); the marketplace lists such a language as partial. In `@kardalum/api-schemas`, `compareLocaleFiles(language, en, other)` takes the language first (BREAKING for a caller of the old two-argument form), and `pluralBase(key)` and `localeKeysAsked(language, en)` are exported. No first-party plugin's files change result.
|
|
33
|
+
- `.`: a plugin's `t` picks plural forms (M33 K37). `t(key, { count })` with a finite number reads `key_<category>` by the admin language's CLDR plural rules (`zero`, `one`, `two`, `few`, `many`, `other`), then that language's `key_other`, then English's form for the count and English's `key_other`, then the key as before; `{{count}}` is printed in the admin's number style. A call without a `count`, or with one that is not a number, reads the key unchanged. A plugin that called `t("items", { count })` against keys named `items_one` and `items_other` used to print the key `items`; it now prints the form. `pluralCategories(language)` and `pluralCategoryOf(count, language)` are exported from `@kardalum/api-schemas` (a tag the runtime does not know takes English's rules).
|
|
34
|
+
- `.`: BREAKING for code that builds an `EditorPanelContext` itself (a test's fake context handed to `EditorPanelProvider`) (M33 K28). The context gains a required `fields` (`ReadonlyArray<Readonly<PluginFieldInfo>>`: every top-level field of the page's document type, in order, `id`, `name` and `dataType` the editor id, private fields included, because the editor sees them; only a server-side page render drops private fields), and `node` is now `EditorPanelPage` (new, exported): `EditorPanelNode` plus `url`, the page's address in the panel's language, the one the editor's save bar already shows, or `null` when the page has no address in that language. The context, its node and its fields are frozen, so a panel changes the editor only through `propose`. A panel that only reads its context is unchanged; a tree action's `node` is unchanged and has no `url`.
|
|
35
|
+
- `.` and `./manifest`: BREAKING for code that switches over every `PageHeadEntry` tag (a plugin's own writer or test helper) (M33 K27). The union gains `{ tag: "title", text }` (1 to `PAGE_HEAD_TITLE_MAX`, 300, characters, no control character, not whitespace alone), so such an exhaustive switch no longer compiles until it adds the case. `PageHeadContribution` gains `setsTitle?: true`: a plugin that declares it may answer one `title` entry, and the first declaring plugin in id order that does sets the page's title (the core replaces the text of the layout's first `<title>` in `<head>`, escaped, or inserts one before `</head>`, reading at most `PAGE_TITLE_SCAN_BYTES`, 65,536, bytes of the page), only on a page whose layout writes `{% plugin_head %}` and never in the on-page editor. A `title` entry from a plugin without the declaration is dropped and logged. The `render.pageHead` capability of a declaring plugin carries the detail `{ text: "", notes: ["setsTitle"] }`, shown as "may set the page title", and `kardalum plugin validate` and the door refuse a `setsTitle` that is not `true`. A head that returns the other entries is unchanged.
|
|
36
|
+
- `.` and `./manifest`: BREAKING for code that builds a server context or a `PageHeadContext` itself (a test's fake hook, task, route, site fallback or page head context) (M33 K26). `PluginServerContextBase` and `PageHeadContext` gain a required `publicMediaUrl(id)`: the address a visitor may open for a public media item that is not in the bin, by the rule the site's own pages use (the store's own public address when it has one, else `/media/...`), or `null` for a private, trashed or missing item and for anything that is not a media id, never an error and never a private file's address. In the page head it is a full URL on the base the page is rendered on, and a plugin may call it `PAGE_HEAD_MEDIA_READS_MAX` (4, from `@kardalum/api-schemas`) times a render: a fifth call answers `null`. On a server context it is on the public URL, else on the default address when it has a name, else a site path. A plugin that only reads its context is unchanged.
|
|
37
|
+
- `.` and `./manifest`: BREAKING for code that builds a `PublishedPageItem` itself (a test's fake `listPublishedPages`) (M33 K24). Each item gains a required `rendered: boolean | null`: `true` when the server would answer the page's address with a page (its document type's template, else the site's catch-all, the render's own choice), `false` when it would find none, `null` on a server that renders no site. `ListPublishedPagesOptions` gains `host`: only the pages whose printed address is on that host, by the core's address rule (a site's domain lists that site, the default address the default site and every site without a domain, a host the site does not name nothing while the default address has a name), walked one site after another by `path` with the sites of other domains skipped unread. `host` with `site`, or a host `siteOfHost` answers `null` for, throws `TypeError`. Each document type, template and the catch-all are read once a call.
|
|
38
|
+
- `.` and `./manifest`: BREAKING for code that builds a server context itself (a test's fake hook, task, route or site fallback context) (M33 K23). `PluginServerContextBase` gains a required `siteOfHost(host, { scheme? })`, on every server context: which site a request's host belongs to, by the rule the server answers that host with, as `SiteOfHost` (`{ site, origin, isMainHost, named }`: the site's top-level page id or `null` on the default address, the origin its pages are printed with, `false` on a site's other domains, and `false` for `named` when the default address has no stored name and the origin was made from the host asked), or `null` for a host that cannot be read (over 300 characters among them). `scheme` is `"http"` or `"https"`, anything else throws `TypeError`. `SiteOfHost` and `SiteOfHostOptions` are exported from both entries. A plugin that only reads its context is unchanged.
|
|
39
|
+
- `.` and `./manifest`: BREAKING for code that builds a `PluginHookContext` itself (a test's fake context) or hands a `SiteFallbackContext` where a hook's context is expected (M33 K19). The hook context gains a required `eventId: string`: the id of this occurrence of the event, minted once when it is raised, the same for every plugin that hears it and on every replay of a durable event. Only a hook's context has it; a task's, a route's and a site fallback's do not.
|
|
40
|
+
- `.` and `./manifest`: BREAKING for code that reads a manifest's `contributions.hooks` and calls each value (M33 K18). A `hooks` value is now a `PluginHookEntry`: a `HookHandler` as before, or `{ handler, durable: true }` (`DurableHookEntry`), a hook whose events the host keeps across restarts in the core outbox until the handler settles, tried up to 4 times, delivered at least once (tell a second delivery apart by `context.eventId`). `durable: false`, a handler without the marker and any other key are refused. Read a value of either form with `hookHandlerOf(entry)` and `isDurableHookEntry(entry)`, never by calling it. A manifest that writes handlers is unchanged.
|
|
41
|
+
- `.` and `./manifest`: BREAKING for code that builds a `PageHeadContext` itself (a test's fake context) (M33 K21, K25). The page head's `page` gains `name` (the page's name as a public read in this language names it), `canonical` (its canonical address, always a full URL, the one `kardalum.culture.canonical` prints), `alternates` (a `PageAddress[]`: its full address in each language it is served in, in the site's order) and `fields` (a `PluginFieldInfo[]`, the document type's top-level fields, built after the private field pruning, so a private field is in neither `fields` nor `data`). A head function that reads the context is unchanged.
|
|
42
|
+
- `.` and `./manifest`: BREAKING for a page that is not published in the default language, and for code that builds a `PublishedContent` itself (a test's fake context) (M33 K22, K21). `getPublishedContent(id, { culture? })` reads a published page in one language: with no `culture` the default language, or the first published one when the default is not published (until now that page answered null); with a `culture`, that language or null, never another one; a `culture` that is not one of the site's languages throws `TypeError`. The answer adds `culture` (the language that came back), `addresses` (a `PageAddress[]`, the same list as the page's `cultures` on `listPublishedPages`) and `fields` (a `PluginFieldInfo[]`: the document type's top-level fields in order, `id`, `name` and `dataType`, the editor id). Published values only, and a private field is in neither `data` nor `fields`. `GetPublishedContentOptions` and `PublishedContent` are exported from both entries.
|
|
43
|
+
- `.` and `./manifest`: BREAKING for code that builds a `SerializerContext` itself (a test's fake context for `extendContentResponse` or a `customFormats[].build`) (M33 K21 step 3). The context gains a required `fields` (`ReadonlyArray<Readonly<PluginFieldInfo>>`): the document type's fields in order, private fields and a field whose data type is gone left out, as `data` leaves them out, `[]` when the type is missing; each call gets its own frozen copy, every level frozen. Every `fields` entry (on `getPublishedContent`, the page head's `page`, the editor panel and the serializer context) now carries `group` for a Group (`{ fields: [{ alias, name, shape }] }`, `shape` null for a sub-type that is missing or cannot nest) and `list` for a Repeatable list (`{ item }`, null when the list names no item type or it is missing), copied by an allow-list: an editor id, aliases and names only, never a data type's settings, ids, bounds or whether a sub-field is required. `getPublishedContent` and the page head now leave out a field whose data type row is gone, which they used to list with that row's id as `dataType` (a field that names its editor id directly is still listed with it); the editor panel still lists it, with `dataType` empty. A serializer that only reads its context is unchanged.
|
|
44
|
+
- `.` and `./manifest`: `PageAddress` (`{ culture, url }`), `PageAddressState` (a `PageAddress` with `published`), `PluginFieldInfo` and `PluginFieldShape` are exported (M33 K21, K22), defined once in `@kardalum/api-schemas`. A `listPublishedPages` item's `cultures` is typed `PageAddress[]`; its value is unchanged. A `PluginFieldInfo`'s `dataType` is the editor id a plugin declares under `dataTypes`, never a data type row id.
|
|
45
|
+
- `.` and `./manifest`: `TransactionRolledBackError`, `isTransactionRolledBackError` and `TRANSACTION_ROLLED_BACK_CODE` are exported (M33, core part 1 carry). A structured transaction, and each statement in it after the database rolled the transaction back, reject with this error; until now a plugin could only match its `name`. The class is the one the host throws, and the error now carries `code: "TRANSACTION_ROLLED_BACK"`, which `isTransactionRolledBackError` reads with the name, so a bundle with its own copy of the SDK still recognises it. Matching on `err.name` keeps working.
|
|
46
|
+
- `.` and `./manifest`: BREAKING for code that reads capability details (M33 K2). Each detail in `CapabilityPayload.details` is a plain string as before, or `{ text, notes? }`, the plugin's own words (`text`, a string or a label map) and the core's notes on them by id from the closed list `CAPABILITY_NOTES` (`rawBody`, `identifiesPeople`, `durable`, `methods`, `leavesServer`, `setsTitle`, `embedFrom`, `embedKindMap`, `embedKindContent`, `privacyNoticeAt`, `addsScript`), a note optionally `{ id, value }`. Code that read each detail as a string no longer type-checks: print a detail with `formatCapabilityDetail` (from `@kardalum/api-schemas`) and the words `CAPABILITY_NOTE_WORDS` gives. A route that declares `rawBody` now derives the detail `{ text: "POST /notify", notes: ["rawBody"] }`. The marketplace answers a CMS of 0.19.0 or older with every detail as its English line, so a published CMS keeps reading its listings; this CMS asks for the objects with the `x-kardalum-capability-details: objects` header, and reads any detail shape a newer marketplace sends (a key it adds is dropped, a shape it does not know is shown as its text).
|
|
47
|
+
- `.` and `./manifest`: BREAKING for code that matched the driver's error (M33 1.3b). A structured `insert` or `update`, inside a transaction as well, throws `StructuredDuplicateKeyError` (code `STRUCTURED_DUPLICATE_KEY_CODE`, the driver's error as `cause`) for a row that repeats a primary key, a `unique` column or a `unique` index, the same error on PostgreSQL, MySQL and SQLite; every other failure is thrown as before. Test it with `isStructuredDuplicateKeyError(err)`, never `instanceof`.
|
|
48
|
+
- `.` and `./manifest`: a structured transaction runs each statement under its own savepoint on every database (M33 fix wave). A callback that catches an error (a duplicate key, say) keeps a usable transaction, and the rows it wrote before and after the caught statement commit together, on PostgreSQL as on MySQL and SQLite; `transaction` rejects if the database turned its commit into a rollback, and never resolves for writes it did not store. When the database rolls the whole transaction back under a failing statement (a MySQL deadlock), that statement and every later one reject with `TransactionRolledBackError` (the statement's error as `cause`) and `transaction` rejects after the callback returns, even if the callback caught the error. Statements started together inside one transaction run one at a time, in the order they were started.
|
|
49
|
+
- `.` and `./manifest`: a plugin's text columns compare byte for byte on every database (M33 fix wave). On MySQL they are created with `utf8mb4_0900_bin`, so `Shoes` and `shoes`, or `e` and `é`, are two keys there as on PostgreSQL and SQLite, and an equality `where` matches only the value it names. A table created before this keeps its old collation until it is created again.
|
|
50
|
+
- `.` and `./manifest`: `cmsVersion` reads pre-release tails on every side (M33 K67, fix wave). A tail on a full version is a pre-release below its stable version, in a range token (`>=1.0.0-rc.1` admits 1.0.0-rc.2 and 1.0.0), in the SDK version (an SDK 1.0.0-rc.1 build writes `>=1.0.0-rc.1 <2.0.0`) and in the site's own version. An exact `1.0.0-rc.1` admits that one version. A site on a pre-release is inside a range that holds it and either names a pre-release of the same version or also holds that version's stable release, so `>=0.19.0 <1.0.0` refuses a site on 1.0.0-rc.1 and `>=1.0.0 <2.0.0` admits one on 1.1.0-rc.1. `kardalum plugin validate` fails a range that admits no version and never warns about the SDK a plugin is built with.
|
|
51
|
+
- `.` and `./manifest`: each server context is a named type built from one base (M33 K1): `PluginServerContextBase` (new) carries what every context has; `PluginHookContext` is the base, `SiteFallbackContext` (new) is what a site fallback's `resolve` receives, `PluginTaskContext` is the base with `settings` always present plus `content`, `media`, `task` and `signal`, and `PluginApiRouteContext` is the base plus `content`, `media`, `protect`, `protectionFields` and `caller`. A context typed before the split is still assignable.
|
|
52
|
+
|
|
53
|
+
- `.` and `./manifest`: a declared document type field's `id` is at most 64 characters (M32 L3), the cap `FieldDefinitionSchema` now has, so every field can be named in a content list's `fields`; a longer one is refused by `kardalum plugin validate` and by install.
|
|
54
|
+
- `.` and `./manifest`: BREAKING for code that reads a manifest's `contributions.documentTypes` as `CreateDocumentTypeRequest[]` (M33 K12): the member is now `PluginDocumentType[]` (exported too), where a field's `name` and `help` and a tab's `name` may be a label map (`{ en, de?, ar?, ... }`, English required), resolved in the site's default language at install. A manifest that writes plain strings is unchanged. The type's own `name` stays a plain string. An update moves a field's or a tab's name, as it moves a note, only while it is still the text the previous version wrote.
|
|
55
|
+
- `.` and `./manifest`: BREAKING for a mail sender that switches over every `MailPurpose`: the union gains `pluginMail`, so such a sender's `send` may now receive it and its exhaustive switch no longer compiles until it adds the case (M33 K11).
|
|
56
|
+
- `.` and `./manifest`: BREAKING, notification kinds (M32 G). `contributions.notifications` is a list of kinds (`id`, `label`, optional `description`, `audience: { actions?, roles? }`) instead of `true`. An audience action is a core action or one the plugin declares and a gated contribution names; to address people by a permission of its own a plugin offers a role. `context.notify` takes `{ kind, title, text, link? }`; `to` is refused, so recipients are never passed. A new refusal reason `unknownKind` joins `invalid`, `unknownTarget`, `nobody`, `overLimit`, `rateLimited` and `inactive`; a host failure throws a plain `Error` with a fixed message. `notify` is on the hook, `apiRoutes`, scheduled task and site fallback contexts. Each person chooses under Notification choices which kinds also reach them by email.
|
|
57
|
+
- `.` and `./manifest`: `contributions.outboundRequests` (`{ reason, methods }`, M33 K16) and `contributions.sealedValues` (`[{ id, label, leavesServer? }]`, M33 K17) are keys of `PluginContributions`. They derive the mediated capabilities `network.outbound` and `secrets.sealedValues`, shown at install with the reason and the methods, and the kinds' labels.
|
|
58
|
+
- `.` and `./manifest`: the install screen's hook row reads "Reacts to events on your site: the ones listed" (M33 K20). The three user events carry the note `identifiesPeople`, and a durable event the note `durable`; the written `manifest.json` lists a durable event as `{ event, durable: true }`.
|
|
59
|
+
- `.` and `./manifest`: BREAKING for code that reads a data type's `name` as a string (M33 K45). `DataTypePlugin.name` and the manifest's `dataTypes[].name` are a `PluginLabel`: a string, or a map of languages with English required, which every surface reads in the reader's language. A plugin or a test that calls `listDataTypes()` or `getDataType()` and treats `name` as text must resolve it first; `PluginReference.dataTypes[].name` may now be a map, and the `content.dataType` capability details are `{ text }`, not bare strings. A plain string name still parses and is unchanged.
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
- `.` and `./manifest`: `PAGE_ADDRESSES_TARGETS_MAX` (100), so a plugin batches its `pageAddresses` calls against the core's number without copying it.
|
|
64
|
+
- `.` and `./manifest`: `PROTECTION_WIDGET_FALLBACK_MAX`, `PROTECTION_WIDGET_DATA_MAX`, `PROTECTION_WIDGET_VALUE_MAX`, `PROTECTION_FIELDS_MAX`, `PROTECTION_FIELDS_BYTES_MAX` and `isProtectionWidgetFallbackText`, re-exported from `@kardalum/api-schemas` (M33, Captcha), so a protection provider builds its widget and fields within the core's own limits.
|
|
65
|
+
- `.` and `./manifest`: `HELD_EMBED_TITLE_MAX`, `HELD_EMBED_SRC_MAX`, `HELD_EMBED_RATIOS`, `HELD_EMBED_RATIO_DEFAULT`, `TEMPLATE_OUTPUT_LIMIT_BYTES`, `DATA_TYPE_ISSUE_PARAMS_MAX` and `DATA_TYPE_ISSUE_MESSAGE_MAX`, and the types `HeldEmbedRequest` and `HeldEmbedRatio`, re-exported from `@kardalum/api-schemas` (M33, Google Maps), so a plugin checks its tag's answer and its issues against the core's own numbers.
|
|
66
|
+
- `.` and `./manifest`: `PAGE_HEAD_ENTRIES_MAX` (20), `PAGE_HEAD_TITLE_MAX` (300), `PAGE_HEAD_MEDIA_READS_MAX` (4), `PUBLISHED_PAGES_LIMIT_MAX` (500), `SITE_ROUTE_ANSWER_LIMIT_BYTES` (5,242,880) and `PLUGIN_TASK_TIME_MS` (600,000, a scheduled run's time, now defined in `@kardalum/api-schemas`), re-exported from `@kardalum/api-schemas`, so a plugin checks its head, sitemap and task limits against the core's own numbers without copying them (SEO rework Task 1).
|
|
67
|
+
- `.` and `./manifest`: `HOOK_EVENTS` (the events a plugin may hook), `OUTBOUND_PLUGIN_IN_FLIGHT_MAX` (8) and `OUTBOUND_WAIT_MAX_MS` (30,000), so a plugin sizes its own sending and its claims against the core's numbers without copying them.
|
|
68
|
+
- `.` and `./manifest`: `PLUGIN_MAIL_TEXT_MAX` (20,000) and `isPluginMailRef`, re-exported from `@kardalum/api-schemas`, so a plugin that sends email checks its text length and its `ref` against the core's own rule without copying it.
|
|
69
|
+
- `./datatype-validation`: a data type's `validate` may return a keyed issue (M33 K46): `{ key, params?, message?, path? }`, a `key` from the plugin's own `locales/` with its `{{name}}` values in `params` and the English sentence in `message`, beside the plain `{ message, path? }`. `DataTypeValidatorIssue` is exported and `DataTypeValidatorEntry.validate` returns `DataTypeValidatorIssue[]`. The core sets `plugin`, the owning plugin's id, on every issue (a `plugin` the hook returns is replaced), so a key is read only in that plugin's strings; a key that is not a plugin locale key (a `:` among them) is dropped and the message kept; a keyed issue without a message is shown with a generic sentence, never the key. The limits are api-schemas' constants: `DATA_TYPE_ISSUE_PARAMS_MAX` (8 params, more keep none), `DATA_TYPE_ISSUE_PARAM_NAME_MAX` (a name of letters, digits and `_`), `DATA_TYPE_ISSUE_PARAM_TEXT_MAX` (a string value cut at 80 characters), `DATA_TYPE_ISSUE_MESSAGE_MAX` (the message cut at 300), `DATA_TYPE_ISSUE_PATH_MAX` (a `path` over 200 characters, or holding a control or direction character, is dropped) and `DATA_TYPE_ISSUES_MAX` (at most 20 issues a call are kept). Control and direction characters are removed from the message and the values.
|
|
70
|
+
- Uninstalling a plugin names the site's templates that still use its template tags or filters (M33 K41). Nothing a plugin declares changes. The install record read (`GET /api/manage/v1/plugins/:pluginId/install-record`, `PluginInstallRecordSummary` in `@kardalum/api-schemas`) gains `heldByTemplates` (each template's `id`, `name` and the full names it `uses`), `templatesNotListed` and `templatesScanStopped`. A template counts when its current source names one of the plugin's full names (a bundle's members' with its own) as a whole name: the characters on both sides of it are not letters, digits, `_` or `-`, so `acme_mapper` is not `acme_map`. The plugin's own templates, which the uninstall removes, are left out. At most `UNINSTALL_TEMPLATES_SCANNED_MAX` (2,000) templates are read, in pages; `templatesScanStopped` is true when more were left unread. At most `UNINSTALL_TEMPLATES_LISTED_MAX` (50) are named and `templatesNotListed` counts the rest. Read only: the uninstall changes no template and refuses nothing. The admin's uninstall dialog lists them, each a link to its editor, with how many more and whether every template was checked. `kardalum plugins uninstall` prints the list in its question for any plugin, simple storage included; `--yes` skips the question, and a run that cannot ask refuses and names `--yes`, as for every uninstall. Plan-mode settlement: the field is `heldByTemplates`, shaped like `heldByDataTypes`'s holders, and carried by the read both the dialog and the command line make before they ask.
|
|
71
|
+
- `./text` (new subpath): plain text of rich text and of HTML, the same in a plugin's server code and its browser bundle (M33 K36). No React, no DOM, no node built-ins; the federation share names the main entry only, so a plugin's bundle carries it. `richTextToText(doc, { maxLength?, onCut? })` is the core's own, moved into `@kardalum/api-schemas` and still re-exported by `@kardalum/client`: the text runs in order, one line per block, a bare string as it is. Called with no options it is unchanged from 0.19, character for character and with no node cap. `htmlToText(html, { maxLength?, onCut? })` reads the text a reader sees in one left-to-right pass with no regular expression: a tag of an inline element (`a`, `b`, `em`, `span`, `strong` and the rest of a closed set of phrasing elements) is no break, so `Kar<b>da</b>lum` is one word, and every other tag (`br` and `img` too) is a line break, never two in a row; this departs on purpose from the Reading time design's "every tag reads as a break", because a word count must not split a word at its markup; each run of ASCII whitespace reads as one space (none at a line's start or end), comments and the contents of `script`, `style` and `template` give nothing, `<` starts a tag only before an ASCII letter, `/`, `!` or `?`, and `&`, `<`, `>`, `"`, `'`, ` ` and numeric references (with their `;`) are decoded; a numeric reference to U+0000, a surrogate or past U+10FFFF reads as U+FFFD, one longer than 7 decimal or 6 hex digits and any other named reference stay as written. Both stop at `maxLength` characters (a whole number of zero or more, else `TypeError`) and after `RICH_TEXT_READ_NODES_MAX` (100,000; not the stored shape's `RICH_TEXT_MAX_NODES`) nodes or tags or 4 times `maxLength` with a floor of `RICH_TEXT_READ_NODES_FLOOR` (1,024), whichever is fewer (for `richTextToText` only when an option is given); `richTextToText` also leaves out what lies deeper than `RICH_TEXT_MAX_DEPTH` and reports that through `onCut`; `htmlToText` reads at most `HTML_TO_TEXT_INPUT_MAX` (2 MiB, 2,097,152 characters) of input. **How a cut is reported:** the functions still return a string, and `onCut` is called once when a reader stopped before the end or left a part out (the text read so far is returned). A callback option was chosen over a second function or an object result because it is the smallest shape that keeps every caller of the one-argument `richTextToText` compiling and behaving unchanged and adds no export. Also exported: `RICH_TEXT_MAX_DEPTH` (now one constant, the shape check's), `RICH_TEXT_READ_NODES_MAX`, `RICH_TEXT_READ_NODES_FLOOR`, `HTML_TO_TEXT_INPUT_MAX` and the type `PlainTextOptions`.
|
|
72
|
+
- `.` and `./manifest`: the core's site address rules are exported (M33 K33): `siteLocationProblem(location)` (why a redirect location is refused, or null), `SITE_LOCATION_MAX` (2,000), `isReservedRootSlug`, `RESERVED_ROOT_SLUGS`, and two new plain functions. `fallbackPathOf(address)` answers the path a site fallback receives for an address (decoded, a trailing slash kept; null for an escape that does not decode or a control character), the one function the server itself uses. `joinSiteLocation(stored, { rest?, query? })` makes a location from a stored target, the rest of a visitor's decoded path below it (split at "/", every segment percent-encoded, an empty, "." or ".." segment answers null, one trailing "/" of the stored path dropped, put before the stored target's own query and fragment) and the visitor's query (printable ASCII without "#", joined with "?" or "&"); the result must pass `siteLocationProblem`, else null. It never changes the scheme or host. Nothing is declared and nothing is gated.
|
|
73
|
+
- `.` and `./manifest`: a site fallback's redirect may carry `maxAgeSeconds` (M33 K34), a whole number from 0 to `SITE_REDIRECT_MAX_AGE_MAX` (86,400, one day); a larger or fractional value is a refused answer. The core sends `Cache-Control: max-age=<n>` on a 301 or 308, `max-age=3600` (`SITE_REDIRECT_MAX_AGE_DEFAULT`) when none is given, which is new for a 301 or 308 that gave none; a 302 or 307 is sent as before, with no cache header.
|
|
74
|
+
- `.` and `./manifest`: `context.simpleStorage` (`PluginSimpleStorage`, exported from both entries) on the hook, scheduled task, route, site route and site fallback contexts (never a template call, the page head or a provider call) (M33 K30). `get(contentId, fieldId)` answers the plugin's own stored value (null when never set) and `set(contentId, fieldId, value)` stores one, in the same store and under the same key a view's `SimpleStorageValueProvider` uses, bound to the calling plugin, so it never reaches another plugin's values. `contentId` is a page's UUID (a missing or binned page throws `TypeError`); `fieldId` is a letter, then letters, digits and `_`, at most `CONTENT_LIST_FIELD_ID_MAX` (64) characters, else `TypeError`; `value` is JSON-serialisable and at most `SIMPLE_STORAGE_VALUE_MAX_BYTES` (65,536, from `@kardalum/api-schemas`) bytes serialised, else `TypeError`. The HTTP door (`GET` and `PUT /api/plugins/:pluginId/storage/:contentId/:fieldId`) takes the same field id and size limits and answers 400 past them; until now its field id had no maximum and its value only the body limit. A plugin that is switched off gets `PluginNotActiveError`, a read-only plugin's `set` `PluginReadOnlyError`, and on an admin or API key route the caller's access to the page applies as on the HTTP door (`get` needs the page readable, `set` editable), else `PluginPageAccessError`, which a route that does not catch it answers with a 403 carrying the error's message, and no error log line; a hook, task, site route or fallback acts for no person and has no such check. The three error classes and `isPluginNotActiveError`, `isPluginReadOnlyError` and `isPluginPageAccessError` are exported from both entries; test with the `is` functions, since the host throws its own copy. BREAKING only for code that builds a server context itself (a test's fake hook, task, route or site fallback context): `PluginServerContextBase` gains the required `simpleStorage`.
|
|
75
|
+
- `.` and `./manifest`: `context.pageAtAddress(address)` (`PluginAddressLookup`, `PageAtAddressAnswer`, exported from both entries) on the hook, scheduled task, route and site route contexts (never a site fallback, a template call, the page head or a provider call) (M33 K32). It answers the published page a visitor gets at `address` as `{ page, culture, redirected }`, read as the delivery API's lookup by address reads one: a site path is read on the default address, an absolute `http` or `https` URL's host selects the site (a host no site claims reads as the default address, so ask `siteOfHost` first to know whether a URL is the installation's own), the language prefix is read as the renderer reads it (`culture` is that language, else the default one), and the query and fragment are ignored. `redirected` is true when the core would first send a visitor on (a site's second domain, a default-site page's long form, a language root written with a trailing "/"). Null for no page, a draft, a reserved first segment, or an address that cannot be read (an empty segment, another scheme, a host that is no domain, a path the URL parser reads as another host). A non-string, or an address over `SITE_LOCATION_MAX` (2,000) characters, throws `TypeError`. Ungated: it is the answer the delivery API gives anyone. BREAKING only for code that builds a hook, task or route context itself (a test's fake context): `PluginHookContext`, `PluginTaskContext` and `PluginApiRouteContext` gain the required `pageAtAddress`.
|
|
76
|
+
- `.` and `./manifest`: `context.pageAddresses(targets)` (`PageAddressTarget`, `PageAddresses`, exported from both entries) on the hook, scheduled task, route, site route and site fallback contexts (never a template call, the page head or a provider call) (M33 K31). It takes 1 to `PAGE_ADDRESSES_TARGETS_MAX` (100, from `@kardalum/api-schemas`) targets, each `{ page }` (a page's UUID) or `{ path, site? }` (a tree path, also one no page holds any more), and answers for each, in the order asked, `{ path, addresses }` or null. `addresses` lists every language of the site, in its order, as `PageAddressState` (`{ culture, url, published }`): `url` is made as `listPublishedPages` makes its `cultures` (a full URL when the site has a domain, else the path with the language prefix), and `published` is true when a page is stored at that path (for `{ page }`, that page), is not in the trash, is published in that language and its site is served to visitors. For a published page the published entries equal its `cultures` and `getPublishedContent`'s `addresses`. `site` names the top-level page whose site record applies to a position whose first segment no longer names one (a move hook passes the event's `contentId` when `previousPath` has one segment). An entry is null for an unknown or trashed page, for a path whose first segment names no top-level page when no `site` is given, for a `site` that is not a top-level page, and for a site a visitor cannot reach. No targets or more than 100, a path that does not start with "/", has an empty segment or is over `SITE_LOCATION_MAX` (2,000) characters, an id that is no UUID, or `page` with `path` or `site`, throws `TypeError` before any read. Ungated: addresses are public, and no content is read. BREAKING only for code that builds a server context itself (a test's fake hook, task, route or site fallback context): `PluginServerContextBase` gains the required `pageAddresses`.
|
|
77
|
+
- `.` and `./ui`: `SimpleStorageValueProvider`'s refusal and failure lines are SDK strings (`simpleStorage.*` in `SDK_STRINGS_EN`), so inside the admin they read in its language, English, German or Arabic, from its locale files (M33 K35). Outside a host the English is unchanged.
|
|
78
|
+
- `./manifest`: an action may declare `offerTo` (M33 K29), one of `PLUGIN_ACTION_OFFER_TARGETS` from `@kardalum/api-schemas` (`content.read`, `content.update`, `content.publish`, `media.read`): the install screen, in the admin and the setup wizard, offers the action to every role that holds that core action, the administrator left out, with a box ticked when only editor panels, admin sections, rail entries, dashboard widgets and `GET` routes name the action and unticked when another route method or a tree action does. Only a person who holds `roles.update` sees it, and it is given only when that person holds the action too; otherwise it waits under Plugins, Installed. The install answers gain `grants` (the offered actions to give), refused from a key or a person without `roles.update`, and the answers an `onInstall` or `onUpdate` hook is told carry the `grants` the install accepted. An update never applies an offer. Any other target is refused by `kardalum plugin validate` and the install. Not breaking: a manifest without `offerTo` is unchanged.
|
|
79
|
+
- `.` and `./manifest`: `context.outbound.check` answers `{ ok: false, reason: "busy" }` past `OUTBOUND_CHECK_IN_FLIGHT_MAX` (4) checks of one plugin at once, or when the server's name lookups are full, and `{ ok: false, reason: "inactive" }` for a plugin switched off; `OutboundCheckResult`'s `reason` is now an `OutboundCheckRefusal` (`OUTBOUND_CHECK_REFUSALS`: the address refusals, `busy`, `inactive`), both exported (core part 3 fix wave). A plugin's `request` past 32 calls of its own waiting throws `busy` at once. `kardalum plugin validate` and the marketplace refuse a package that uses `outboundRequests`, `sealedValues` or a durable hook while its `cmsVersion` admits any version below 0.20.0, because an older CMS cannot run them.
|
|
80
|
+
- `.` and `./manifest`: `context.sealing` (`PluginSealing`) for a plugin that declares `sealedValues`, on the hook, scheduled task, route, site route and provider contexts (never a site fallback, a template call or the page head) (M33 K17). Each kind seals under its own key, derived from `JWT_SECRET` for the plugin and the kind, and a sealed text is bound to its record key, so it does not open under another plugin, kind or record key. `seal` throws `SealingRefusedError` with reason `inactive` (the plugin is switched off), `unknownKind` (a kind the manifest does not declare) or `invalid` (a record key or value outside its limits); `open` throws the same for its kind and record key, and answers null for any text that does not open. The host stores and logs nothing.
|
|
81
|
+
- `.` and `./manifest`: `contributions.heldEmbeds` (`[{ id, origin, pathPrefix, provider, privacyNotice, kind, allow? }]`, `HeldEmbedContribution`, M33 K42): content from other sites a template tag may show, held until a visitor clicks. It derives the mediated capability `render.heldEmbed` ("Content from other sites"), shown at install one line a declaration: the provider, the origin and path prefix, the kind and the privacy notice's host. `kardalum plugin validate` and the marketplace check it in "site extensions"; the rules and limits are api-schemas' `PluginHeldEmbedSchema` and the `HELD_EMBED_*` constants.
|
|
82
|
+
- `.` and `./manifest`: a template tag may answer `{ embed, html? }` (`TemplateTagOutput`, M33 K42): `embed` is a `HeldEmbedRequest` (`{ id, src, title, ratio? }`) naming one of the plugin's own `heldEmbeds`. The host writes its placeholder (the visitor words in en, de or ar, a privacy link and a "Show" button its loader reveals), then the cleaned `html`, which serves as the fallback; the frame is built only after a visitor clicks. A request `heldEmbedRequestProblem` refuses, or one past `HELD_EMBEDS_PER_RENDER_MAX` (20) in a render, writes only the cleaned `html`, logged once a minute per plugin and reason. A package that declares `heldEmbeds` states a `cmsVersion` admitting no version below 0.20.0. A tag that answers text or `{ html }` is unchanged.
|
|
83
|
+
- `.` and `./manifest`: `context.outbound` (`PluginOutbound`) for a plugin that declares `outboundRequests`, on the hook, scheduled task, route and site route contexts (never a site fallback, a template call, the page head or a provider) (M33 K16). Each hop is checked and the connection is made only to an address the check accepts, looked up again for that connection; a call after the plugin is switched off, or at shutdown, throws `OutboundError` with kind `inactive`. A call refused as `private` or `unresolved` is written to the site audit log with the host name only, at most once a plugin and host an hour.
|
|
84
|
+
- `.` and `./manifest`: the contract of checked outbound requests (M33 K16): `PluginOutbound` (`check(url)` answering `OutboundCheckResult`, `request(url, init)` answering `OutboundResponse`), `OutboundInit`, `OutboundMethod`, `OutboundAddressRefusal` (`invalid`, `scheme`, `credentials`, `port`, `private`, `unresolved`), `OutboundErrorKind`, and `OutboundRequestsContribution` (`{ reason, methods }`: a label map of 1 to 300 characters in each language, 1 to 6 of `GET`, `HEAD`, `POST`, `PUT`, `PATCH`, `DELETE`, each once). `request` throws `OutboundError` (its `kind` one of `OUTBOUND_ERROR_KINDS`; `isOutboundError` narrows it), whose message names the kind and never the address, a header or the body. The limits are exported: `OUTBOUND_URL_MAX` (2,000), `OUTBOUND_TIMEOUT_DEFAULT_MS` (10,000), `OUTBOUND_TIMEOUT_MAX_MS` (30,000), `OUTBOUND_RESPONSE_DEFAULT_BYTES` (65,536), `OUTBOUND_RESPONSE_MAX_BYTES` and `OUTBOUND_REQUEST_BODY_MAX_BYTES` (1,048,576), `OUTBOUND_REDIRECTS_MAX` (3), `OUTBOUND_HEADERS_MAX` (30), `OUTBOUND_HEADER_VALUE_MAX` (8,192), `OUTBOUND_REASON_MAX` (300), with `OUTBOUND_METHODS` and `OUTBOUND_ADDRESS_REFUSALS`.
|
|
85
|
+
- `.` and `./manifest`: the contract of sealed values (M33 K17): `PluginSealing` (`seal(kind, recordKey, value)`, `open(kind, recordKey, sealed)` answering null for a text that does not open), `SealedValueContribution` (`{ id, label, leavesServer? }`, 1 to 10 kinds, an id under the settings id rule), and `SealingRefusedError` with `reason` `unknownKind`, `invalid` or `inactive` (`SEALING_REFUSAL_REASONS`, `isSealingRefusedError`). A value is 1 to `PLUGIN_SEALED_VALUE_MAX_BYTES` (4,096) UTF-8 bytes, a record key 1 to `PLUGIN_SEALED_RECORD_KEY_MAX` (200) printable ASCII characters, at most `PLUGIN_SEALED_KINDS_MAX` (10) kinds.
|
|
86
|
+
- `.` and `./manifest`: `hookHandlerOf` and `isDurableHookEntry`, `DurableHookEntry` and `PluginHookEntry` (M33 K18, see Changed).
|
|
87
|
+
- `.` and `./manifest`: `context.mail` (`PluginMail`) for a plugin that declares `mailKinds`, on the hook, scheduled task, route and site route contexts (never a site fallback's) (M33 K11). `send({ kind, to, subject, text, language?, replyTo?, ref })` answers `{ sent: true }` or `{ sent: false, reason }` (`PluginMailResult`; `reason` one of `off`, `notReady`, `unknownKind`, `invalid`, `rateLimited`, `inactive`) and never throws for these; `state(kind)` answers `on`, `off` or `notReady`. The core builds every header, opens the email with its own line and ends it with its footer, both naming the site, and sends it through the site's sender and outbox as purpose `pluginMail`: subject 1 to 150 characters, plain text 1 to 20,000, `ref` 1 to 100 id characters (letters, digits, `.`, `_`, `-`, `:`), at most 10 emails an hour to one recipient across plugins and 300 an hour per plugin, refused sends counted toward the 300 too. Each send is audited with the plugin, the kind, `ref` and the result, never the address or the text; a send throttled past the hourly limit is not audited. In a stopped scheduled task `send` rejects with `PluginTaskAbortedError`, like every member of that context. `PluginMailInput`, `PluginMailReason` and `PluginMailState` are exported too. `OutgoingMail` gains an optional `replyTo`, set only on a `pluginMail` that asked for one, so a mail sender adds it as the Reply-To header.
|
|
88
|
+
- `.` and `./manifest`: `contributions.mailKinds` (`MailKindContribution`: `id`, `label`, optional `description`), at most 10 kinds of email the plugin sends, each to one person (M33 K11). An `id` is a letter, then letters, digits and `_`, 1 to 40 characters, used once. It derives the promised capability `mail.direct` ("Plugin emails"), one detail per kind with its label, shown under "Needs your consent". Each kind is off until the site owner switches it on.
|
|
89
|
+
- `./manifest`: `apiRoutes[].rawBody: true` on a `POST`, `PUT` or `PATCH` route hands the handler `request.rawBody` (`PluginRequestView`), a `Uint8Array` copy of the exact request bytes beside the parsed body, for a JSON or plain text body (a form body is refused with 415, as before), within the 64 KiB body limit and after every parse check (M33 K4). The host never logs the bytes. `kardalum plugin validate` and the marketplace refuse it on another method or as any value but `true`.
|
|
90
|
+
- `.` and `./manifest`: `context.caller` (`PluginCaller`) on an `admin` or `apiKey` route: `{ kind: "user", userId, name }` or `{ kind: "key", keyId, keyName }`, frozen, never an email, an address or a token; absent on a public route and a site route (M33 K5).
|
|
91
|
+
- `.` and `./manifest`: `paginate({ cursor?, limit, direction? })` pages a plugin's own rows by the primary key, `direction` `"asc"` (the default) or `"desc"` for newest first (M33 K3).
|
|
92
|
+
- `.` and `./manifest`: `CAPABILITY_NOTE_WORDS`, the English words of each capability note, for printing a capability detail (M33 K2).
|
|
93
|
+
- `.` and `./manifest`: `isMailAddress`, `canonicalMailAddress`, `isFormFieldName` and `MAIL_ADDRESS_MAX`, the core's own address and form field name checks (M33 K7).
|
|
94
|
+
- `.` and `./manifest`: `MAIL_SUBJECT_MAX` (150), `NOTIFICATION_TITLE_MAX` (120), `NOTIFICATION_TEXT_MAX` (1,000), `FORM_REPLY_ADDRESS_FIELDS_MAX` (5), `SITE_ROUTE_BODY_LIMIT_BYTES` (65,536) and `SITE_ROUTE_FORM_FIELDS_MAX` (200), re-exported from `@kardalum/api-schemas`, so a forms plugin checks its own limits against the core's numbers without retyping them.
|
|
95
|
+
- `.`: six more admin parts from `@kardalum/ui` (M33 K8): `Checkbox` (`CheckboxProps`), the `AlertDialog` family (`AlertDialog`, `AlertDialogTrigger`, `AlertDialogPortal`, `AlertDialogOverlay`, `AlertDialogContent`, `AlertDialogHeader`, `AlertDialogFooter`, `AlertDialogTitle`, `AlertDialogDescription`, `AlertDialogAction`, `AlertDialogCancel`), the `Dialog` family (`Dialog`, `DialogTrigger`, `DialogPortal`, `DialogOverlay`, `DialogClose`, `DialogCloseButton`, `DialogContent`, `DialogHeader`, `DialogFooter`, `DialogTitle`, `DialogDescription`), the `DropdownMenu` family (`DropdownMenu`, `DropdownMenuContainer`, `DropdownMenuTrigger`, `DropdownMenuPortal`, `DropdownMenuGroup`, `DropdownMenuRadioGroup`, `DropdownMenuRadioItem`, `DropdownMenuContent`, `DropdownMenuItem`, `DropdownMenuLabel`, `DropdownMenuSeparator`), `EmptyState` (`EmptyStateProps`) and `Skeleton`.
|
|
96
|
+
- `.` and `./manifest`: a notification may open one of the plugin's own admin screens at a row (M33 K6): `link: { kind: "screen", section, entry?, item? }` for its own section, or `{ kind: "screen", builtIn, entry, item? }` for its entry in a built-in rail, `item` 1 to 100 letters, digits, `-` and `_`. An undeclared screen or another item is refused with `unknownTarget`; a reader who may not open the screen sees the notification without it. `.`: the screen reads the row as `usePluginScreen().item` (`PluginScreenContext.item`, `string | null`, optional in the type so a context built by hand stays valid).
|
|
97
|
+
- `.` and `./manifest`: `SiteFallbackContext` and `PluginServerContextBase` (M33 K1, see Changed).
|
|
98
|
+
|
|
99
|
+
- `.` and `./manifest`: declared data types, private fields, sample page tokens and the site's top page (M32 J). `contributions.dataTypeConfigs` (`PluginDataTypeConfig`: `name`, `editorId`, optional `settings`; at most 50, a name of 1 to 191 characters) lets a plugin ship data types of any built-in editor or of its own editors (for example a Group, a Repeatable list, or a content picker for its own document types), referred to by name from its document types' fields and from each other; it derives the `content.dataType` capability beside `dataTypes`. The field flag `private` (`FieldDefinition.private`) keeps a field's value off the delivery API, GraphQL, templates, the search feed and a plugin's published reads; the core text search leaves out the pages of a type that has one. Sample content may write `{{page:<slug>}}` as a whole string to name another page of the same file; it cannot fill a required field. Templates get `kardalum.site.page`, the site's top page as a listed page. A page whose type has no template now answers on a site without the delivery API as an address with no page does: a site fallback is asked, then the site's 404.
|
|
100
|
+
- `.` and `./manifest`: mail senders and form replies (M32 H). `contributions.mailSenders` declares up to 3 senders (`MailSenderContribution`: `send(mail, context)` answering `MailSendResult`, optional `ready`; `OutgoingMail` carries `purpose`, `to`, `from`, `subject` and plain `text`) and derives `provider.mail`; the site owner chooses one instead of the built-in SMTP sender (`KARDALUM_MAIL_SENDER`). `contributions.formReplies: { label, description? }` derives `mail.formReplies`; once the site owner switches it on for the plugin, an `ok` `ProtectionResult` carries `reply({ field, subject, text })`, which sends one email to an address the protected form carried (`FormReply`, `FormReplyResult`, `FormReplyReason`). Do not copy a visitor's free text into a reply.
|
|
101
|
+
- `.` and `./manifest`: media store public addresses, moves and leftovers, and template search (M32 F4e). `MediaStoreContribution.publicBaseUrl?(context)` is an asynchronous public base address for public, live files (https only, no user, password, query or fragment, `STORE_PUBLIC_BASE_MAX`, remembered for `STORE_PUBLIC_BASE_MEMO_MS`; private items keep `/media/...`). Files can be moved out of a store in the background (a plugin store holding none can then be uninstalled) and objects a removal could not delete are recorded and deleted when the store is back. Templates get `{% search %}` and `kardalum.request.q`. `kardalum __complete` completes plugin command prefixes and names, and `npm create kardalum-plugin -- --cli` scaffolds a command.
|
|
102
|
+
- `.` and `./manifest`: plugin settings and scheduled tasks (M32 F4d). `contributions.settings` declares at
|
|
103
|
+
most 32 fields (`text`, `number`, `onOff`, `choice`, `secret`; `PluginSettingField`), drawn, checked and
|
|
104
|
+
stored by the core, optionally asked at install (`askAtInstall`), and derives no capability.
|
|
105
|
+
`context.settings` (`PluginSettingsReader`: `get`, `all`) is on every server context; an undeclared id
|
|
106
|
+
throws `PluginSettingUndeclaredError` and a failed read `PluginSettingsUnavailableError`, never the defaults
|
|
107
|
+
(`isPluginSettingUndeclaredError`, `isPluginSettingsUnavailableError`). `SettingsHookPayload` gains `pluginId`
|
|
108
|
+
and `settings:afterChange` has the area `plugin`. The server now runs `scheduledTasks` (five-field UTC cron,
|
|
109
|
+
at most 5 a plugin, once across instances): `ScheduledTaskContribution.run` receives a `PluginTaskContext`
|
|
110
|
+
(hook context plus `secrets`, `settings`, `content`, `media`, `task` and `signal`). `kardalum plugin
|
|
111
|
+
validate` and the marketplace run a 40th check, `Plugin settings`.
|
|
112
|
+
- `.` and `./manifest`: `DataTypePlugin.nestable` lets a plugin data type sit inside a Group or a Repeatable
|
|
113
|
+
list; it requires `validate`.
|
|
114
|
+
- `.` and `./manifest`: the unused `culture` argument is removed from the search provider's query input before release.
|
|
115
|
+
- `.` and `./manifest`: the hook catalog is nineteen events and every one fires (M32 F4c). New:
|
|
116
|
+
`content:afterSave` (`ContentSaveHookPayload`), `content:afterMove`
|
|
117
|
+
(`ContentMoveHookPayload`), `plugin:afterUpdate` (with `fromVersion`), `plugin:afterActivate`,
|
|
118
|
+
`plugin:afterDeactivate` and `audit:afterRecord` (`AuditHookPayload`: no email, name or IP address, and
|
|
119
|
+
`summary` is always `{}`). `content:beforeSave`, `content:beforePublish`, `content:beforeDelete` and
|
|
120
|
+
`api:beforeResponse` are removed from `HookEvent`, so a manifest naming one is refused. A plugin has at
|
|
121
|
+
most 4 hook handlers counted as running at once and 1,000 queued events.
|
|
122
|
+
- `.` and `./manifest`: `TemplateCallContext` and `PageHeadContext` gain `entitlement` and `requestHost`;
|
|
123
|
+
`requireEntitlement` accepts a `requestHost` of `null`. `PluginHookContext` and `PluginApiRouteContext` gain
|
|
124
|
+
`listPublishedPages(opts?)` (`PublishedPageItem`, `PublishedPagesPage`, `ListPublishedPagesOptions`).
|
|
125
|
+
- `.` and `./manifest`: `contributions.mediaAccess` (`media.read`, `media.create`), deriving the
|
|
126
|
+
`media.access` capability, and `context.media.upload` and `get` on a route context (`PluginMediaLibrary`,
|
|
127
|
+
`PluginMediaUpload`, `MediaAccessRefusedError`, `isMediaAccessRefusedError`).
|
|
128
|
+
- `.`: `EditorPanelContext.propose(changes)` and `ProposeResult`, which fill a page's fields as unsaved
|
|
129
|
+
changes the person reviews and may undo.
|
|
130
|
+
- `.` and `./manifest`: four contributions for providers and secrets (M32 F4), `protectionProviders`, `searchProviders`
|
|
131
|
+
and `mediaStores` (at most 3 each, with an `id`, a `label` and the functions of their kind) and `secrets` (at most
|
|
132
|
+
10, a `name` and a `label`), with their types (`ProtectionProviderContribution`, `SearchProviderContribution`,
|
|
133
|
+
`MediaStoreContribution`, `SecretDeclaration`, `ProviderContext`, `SearchDocument`, `PluginSecrets`), the derived
|
|
134
|
+
capabilities `provider.formProtection`, `provider.search`, `provider.mediaStore` and `secrets`, and a
|
|
135
|
+
`secrets` member on the route, hook and task contexts. `./manifest` adds `PluginSecretUndeclaredError` and
|
|
136
|
+
`isPluginSecretUndeclaredError`. `kardalum plugin validate` and the marketplace run a 39th check, `Providers and
|
|
137
|
+
secrets`, from 0.20.0.
|
|
138
|
+
- `./cli`: the types of the commands a plugin package adds to the `kardalum` CLI (`PluginCliContext`,
|
|
139
|
+
`PluginCliCommand`, `PluginCliCommands`) and the identity helper `defineCliCommands`. A package
|
|
140
|
+
declares its commands in its own `package.json` (`kardalum.cli`), not in the manifest. `.` and
|
|
141
|
+
`./manifest`: an `apiKey` `GET` route may mark `graphqlField` (`GraphqlFieldDeclaration`, a
|
|
142
|
+
`name` and a `description`) to be offered as a field of the delivery API's GraphQL `Query` type.
|
|
143
|
+
Neither is a contribution key or a capability. `kardalum plugin validate` runs two more checks,
|
|
144
|
+
`GraphQL fields` and `CLI commands` (a 38th), and the marketplace runs the first.
|
|
145
|
+
- `.` and `./manifest`: two contributions for the admin editor, `editorPanels` (a panel beside an
|
|
146
|
+
existing page's editor) and `treeActions` (an item in a content tree row's menu that opens a
|
|
147
|
+
dialog), at most 5 each, with an `id`, a `label`, an `action` and an optional `documentTypes`
|
|
148
|
+
list, with their types (`EditorPanelContribution`, `TreeActionContribution`), the derived
|
|
149
|
+
capabilities `admin.editorPanel` and `admin.treeAction`, and `usePluginEditorPanel()` and
|
|
150
|
+
`usePluginTreeAction()` with their providers and contexts (`EditorPanelContext`,
|
|
151
|
+
`TreeActionContext`, `EditorPanelNode`). Seven hook events join the catalogue and fire:
|
|
152
|
+
`user:afterCreate`, `user:afterDelete`, `media:afterTrash`, `media:afterDelete`,
|
|
153
|
+
`settings:afterChange`, `plugin:afterInstall` and `plugin:afterUninstall`, with the payload types
|
|
154
|
+
`UserHookPayload`, `MediaHookPayload`, `SettingsHookPayload`, `PluginLifecycleHookPayload` and
|
|
155
|
+
`HookPayload`. `kardalum plugin validate` runs a 36th check, `editor extensions`.
|
|
156
|
+
- `./manifest`: `PluginContentLibrary.documentTypeId(name)`, which answers the id of a document
|
|
157
|
+
type the plugin's `contentAccess` names: the plugin's own type of that name first, otherwise the
|
|
158
|
+
one site type of that name, otherwise `null` (also when two site types share it). A name the
|
|
159
|
+
declaration does not hold throws `ContentAccessRefusedError`. A plugin test that builds a
|
|
160
|
+
`PluginContentLibrary` literal adds it.
|
|
161
|
+
- `./manifest`: five contributions for the public site, `siteRoutes` (fixed GET or POST
|
|
162
|
+
addresses such as `/sitemap.xml`), `siteFallback` (answers an address no page holds with a
|
|
163
|
+
redirect or "gone"), `templateFilters` and `templateTags` (named `<the id's last segment>_<name>`)
|
|
164
|
+
and `pageHead` (meta, link, script and JSON-LD entries for every page's head, scripts only from
|
|
165
|
+
the plugin's own assets or the origins in `scriptOrigins`), with their types
|
|
166
|
+
(`SiteRouteContribution`, `SiteFallbackContribution`, `TemplateFilterContribution`,
|
|
167
|
+
`TemplateTagContribution`, `PageHeadContribution` and the contexts they receive), the derived
|
|
168
|
+
capabilities `site.route`, `site.fallback`, `render.templateFilter`, `render.templateTag` and
|
|
169
|
+
`render.pageHead`, the handler views `PluginRequestView` and `PluginReplyView`, and the re-exported
|
|
170
|
+
`TemplateData`, `PageHeadEntry` and `SiteFallbackAnswer`.
|
|
171
|
+
- `./manifest`: `PluginContributions.contentAccess` (the document types a plugin's code
|
|
172
|
+
may create, read or change, with the actions and parent types), the derived
|
|
173
|
+
`content.access` capability, `context.content` (`PluginContentLibrary`) on an API
|
|
174
|
+
route, `context.protect` and `context.protectionFields` (form protection),
|
|
175
|
+
`ContentAccessRefusedError`, `isContentAccessRefusedError`, `ProtectionResult` and
|
|
176
|
+
`ProtectionFields`.
|
|
177
|
+
`protect` and `protectionFields` are required members of `PluginApiRouteContext`, so
|
|
178
|
+
a plugin test that builds a `PluginApiRouteContext` literal adds both.
|
|
179
|
+
- `./manifest`: `ApiRouteContribution.mcpTool` (`McpToolDeclaration`): an
|
|
180
|
+
`apiKey` route offered to an AI app as a tool; `PluginContributions.aiContext`:
|
|
181
|
+
the plugin's context for an AI app; `help` on a manifest's document types and
|
|
182
|
+
fields; `derivesCapability`; the hook event `content:afterUnpublish` and
|
|
183
|
+
`ContentLifecycleHookPayload.cultures`.
|
|
184
|
+
- `.`: `SDK_STRINGS_EN` (every word the built-in views show, keyed
|
|
185
|
+
`<view>.<name>`), `SdkHostProvider` (a host renders it once with `t`,
|
|
186
|
+
`dir` and an optional `locale`), `useSdkString`, `useAdminDirection`
|
|
187
|
+
(for a plugin's own Radix roots) and `useSdkLocale` (the host's
|
|
188
|
+
formatting locale, undefined outside a host), with the types
|
|
189
|
+
`AdminDirection`, `SdkHostProviderProps`, `SdkStringKey`,
|
|
190
|
+
`SdkStringVars` and `SdkTranslate`.
|
|
191
|
+
- The built-in views (the image field, the media picker, the content list,
|
|
192
|
+
the file upload, the rich text toolbar and its menus) follow the host's
|
|
193
|
+
language and direction, and format dates and sizes by the host's locale.
|
|
194
|
+
Without a host they read English and the document's direction, as before.
|
|
195
|
+
- `.`: `SdkHostProvider` takes an optional `lang` (the admin's language as an
|
|
196
|
+
HTML `lang` value), read by `useAdminLanguage`. `useAdminChromeProps`
|
|
197
|
+
answers the `dir` and `lang` a view's chrome root takes.
|
|
198
|
+
`SdkContentLanguageProvider` (the host renders it around a field with the
|
|
199
|
+
content's `lang` and `dir`), `useContentLanguage` and
|
|
200
|
+
`useContentTypingProps` give a typing surface nested in that chrome the
|
|
201
|
+
content's language back, with the types `ContentLanguage` and
|
|
202
|
+
`SdkContentLanguageProviderProps`.
|
|
203
|
+
- `.`: `RESERVED_SDK_VARIABLES`, the placeholder names an SDK string may not
|
|
204
|
+
use because i18next reads them as options (`count` only in a plural
|
|
205
|
+
form's key).
|
|
206
|
+
|
|
207
|
+
### Changed
|
|
208
|
+
|
|
209
|
+
- The image, file upload, content list, date range and asset input views put
|
|
210
|
+
their root on the admin's direction and language, so their buttons, size
|
|
211
|
+
and accepts lines, table headers and pickers no longer take the content's
|
|
212
|
+
`lang` and `dir` from the field wrapper. The content list's search box and
|
|
213
|
+
the media picker's alt text keep the content's. Without a host the root
|
|
214
|
+
carries the document's direction (or `ltr`) and no `lang`, so it inherits
|
|
215
|
+
its ancestors' language as before. The rich text toolbar also takes the
|
|
216
|
+
admin's `lang` beside its `dir`.
|
|
217
|
+
|
|
218
|
+
### Fixed
|
|
219
|
+
|
|
220
|
+
- `./manifest`: a plugin API route's own error answer reaches its caller as the plugin wrote it, as `schema.response` always promised ("sent unchecked"). The dispatcher used to run its own error shape, `{ message }`, over every answer with status `400`, `401`, `403`, `404`, `500` or `503`: a body without `message`, such as Forms' `400 { ok: false, errors }`, became a `500` (`Response doesn't match the schema`), and one with `message` lost every other member. An answer with a status outside `200` to `299`, sent with `reply.send` or returned, is now written as JSON as given, up to `PLUGIN_ROUTE_ERROR_BODY_LIMIT_BYTES` (64 KiB of JSON text, new in `@kardalum/api-schemas`); a larger one, or one JSON cannot hold (a cycle, a `BigInt`), is the host's own `500 { message }`, logged without the body. A number or `null` sent with such a status is sent as JSON, where it was a `500` before; a string, bytes and an empty answer are sent as before, and a stream, which cannot be measured, is the host's `500` (as on a site route). The host's own refusals on those routes keep `{ message }`, and the OpenAPI documents say on each error status that a handler's own answer there is the plugin's.
|
|
221
|
+
|
|
222
|
+
## 0.19.0
|
|
223
|
+
|
|
224
|
+
Plugin views get the admin's tooltips: an icon-only button can name itself
|
|
225
|
+
on hover and focus, and a name cut off by its column shows in full. The
|
|
226
|
+
SDK's own pickers and rich text toolbar use them, and a bundle must now name
|
|
227
|
+
its members.
|
|
228
|
+
|
|
229
|
+
### Added
|
|
230
|
+
|
|
231
|
+
- `.`: `IconTooltip` (with `IconTooltipProps`), which wraps an icon-only
|
|
232
|
+
control and shows its `aria-label` as a tooltip, and `TruncatedText` (with
|
|
233
|
+
`TruncatedTextProps`), which renders text that truncates and shows the
|
|
234
|
+
whole text in a tooltip only when it is cut. The admin's
|
|
235
|
+
`TooltipProvider` sits above every mounted plugin view.
|
|
236
|
+
- `./ui`: everything `@kardalum/ui` gained comes through, so also
|
|
237
|
+
`Tooltip`, `TooltipContent`, `TooltipProvider`, `TooltipTrigger`,
|
|
238
|
+
`isTextCut` and `DropdownMenuContainer`.
|
|
239
|
+
|
|
240
|
+
### Changed
|
|
241
|
+
|
|
242
|
+
- `.`: the rich text view's toolbar buttons show their names in a tooltip
|
|
243
|
+
instead of the browser's `title`, and the media picker, the asset picker,
|
|
244
|
+
the asset and image views and the rich text block panel show a cut-off
|
|
245
|
+
file or folder name in full through `TruncatedText`.
|
|
246
|
+
- `./manifest` and `.`: `contributions.bundledPlugins` must name at least
|
|
247
|
+
one member plugin id. Declaring members is what makes a plugin a bundle,
|
|
248
|
+
so an empty list is refused; a plugin that bundles none leaves the key
|
|
249
|
+
out.
|
|
250
|
+
|
|
251
|
+
### Tools
|
|
252
|
+
|
|
253
|
+
- `kardalum plugin build --out <dir>` refuses an output folder that is not
|
|
254
|
+
new, empty, a previous package or a folder holding a `remoteEntry` file,
|
|
255
|
+
and the default `kardalum-package` refuses a folder holding `.git`,
|
|
256
|
+
`package.json` or `node_modules`.
|
|
257
|
+
- `kardalum plugin validate` has a 30th check that warns when the
|
|
258
|
+
federation plugin's type declarations are on (`dts: false` is missing),
|
|
259
|
+
and build and pack drop the `@mf-types` files.
|
|
260
|
+
- A plugin whose migration rollback fails keeps the records of the
|
|
261
|
+
migrations still applied, and a later install or update treats them as
|
|
262
|
+
applied without running `up()` again.
|
|
263
|
+
|
|
11
264
|
## 0.18.0
|
|
12
265
|
|
|
13
266
|
Plugins can be sold on plans with a term they can read, and a plugin can call its
|
package/README.md
CHANGED
|
@@ -60,6 +60,25 @@ the root; the subpaths below are bundled into whatever imports them.
|
|
|
60
60
|
Two more entries in `exports`, `./datatype-validation` and
|
|
61
61
|
`./register-built-ins`, are host and server internals a plugin never imports.
|
|
62
62
|
|
|
63
|
+
## Direction in a plugin's own widgets
|
|
64
|
+
|
|
65
|
+
The admin runs left to right or right to left with its language (Arabic and
|
|
66
|
+
Hebrew read right to left), and its own Radix widgets learn the direction
|
|
67
|
+
from a provider at the admin's root. A plugin bundles its own Radix copy,
|
|
68
|
+
which cannot see that provider, so a plugin that renders a Radix root
|
|
69
|
+
(a dropdown menu, a popover, a tabs or radio group) passes it the admin's
|
|
70
|
+
direction itself: `const dir = useAdminDirection();` from the package root,
|
|
71
|
+
then `<DropdownMenu.Root dir={dir}>`. Outside the admin it answers the
|
|
72
|
+
document's own direction, or `ltr`. Content a person types keeps its own
|
|
73
|
+
language's direction; `useAdminDirection()` is for the controls around it.
|
|
74
|
+
|
|
75
|
+
The host wraps each field in the content's `lang` and `dir`, so a field
|
|
76
|
+
view's own buttons and labels sit in the content's language unless the view
|
|
77
|
+
says otherwise. Spread `useAdminChromeProps()` (the admin's `dir`, and its
|
|
78
|
+
`lang` inside the admin) on the view's root, and `useContentTypingProps()`
|
|
79
|
+
on a text box nested inside it, so the words typed there keep the content's
|
|
80
|
+
language and direction.
|
|
81
|
+
|
|
63
82
|
## The management API base
|
|
64
83
|
|
|
65
84
|
The root also exports `MANAGE_API`, the string `/api/manage/v1`: the base of the
|
|
@@ -73,7 +92,7 @@ every operation.
|
|
|
73
92
|
## Docs
|
|
74
93
|
|
|
75
94
|
The plugin guide, the manifest reference and the storage reference are at
|
|
76
|
-
[dev.kardalum.com/docs](https://dev.kardalum.com/docs/v1/
|
|
95
|
+
[dev.kardalum.com/docs](https://dev.kardalum.com/docs/v1/plugins/build-a-plugin/).
|
|
77
96
|
|
|
78
97
|
## Support
|
|
79
98
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, DashboardWidgetContribution, PluginManifest } from "./manifest.js";
|
|
1
|
+
import type { AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, DashboardWidgetContribution, EditorPanelContribution, PluginManifest, TreeActionContribution } from "./manifest.js";
|
|
2
2
|
/** @internal A section in the host's registry, with the plugin it came from. */
|
|
3
3
|
export interface RegisteredSection {
|
|
4
4
|
pluginId: string;
|
|
@@ -15,6 +15,16 @@ export interface RegisteredDashboardWidget {
|
|
|
15
15
|
pluginId: string;
|
|
16
16
|
widget: DashboardWidgetContribution;
|
|
17
17
|
}
|
|
18
|
+
/** @internal An editor panel in the host's registry, with its plugin (M32 F3). */
|
|
19
|
+
export interface RegisteredEditorPanel {
|
|
20
|
+
pluginId: string;
|
|
21
|
+
panel: EditorPanelContribution;
|
|
22
|
+
}
|
|
23
|
+
/** @internal A tree action in the host's registry, with its plugin (M32 F3). */
|
|
24
|
+
export interface RegisteredTreeAction {
|
|
25
|
+
pluginId: string;
|
|
26
|
+
action: TreeActionContribution;
|
|
27
|
+
}
|
|
18
28
|
/**
|
|
19
29
|
* Register every slot a plugin's manifest declares: its top-level sections
|
|
20
30
|
* (each with its own rail), its rail entries in built-in sections and its
|
|
@@ -38,6 +48,11 @@ export declare function getRailEntry(section: BuiltInRailSection, pluginId: stri
|
|
|
38
48
|
/** @internal Every registered dashboard widget, in registration order. A
|
|
39
49
|
* copy: changing it changes nothing registered. */
|
|
40
50
|
export declare function listDashboardWidgets(): RegisteredDashboardWidget[];
|
|
51
|
+
/** @internal Every registered editor panel, sorted by plugin id and then declaration order, so the
|
|
52
|
+
* editor shows the same panels in the same order whichever plugin loaded first. A copy. */
|
|
53
|
+
export declare function listEditorPanels(): RegisteredEditorPanel[];
|
|
54
|
+
/** @internal Every registered tree action, sorted like listEditorPanels. A copy. */
|
|
55
|
+
export declare function listTreeActions(): RegisteredTreeAction[];
|
|
41
56
|
/** @internal Clears every registered slot and plugin id. Tests only: the
|
|
42
57
|
* admin registers once per page load. */
|
|
43
58
|
export declare function resetPluginSlotsForTests(): void;
|
|
@@ -2,6 +2,8 @@ const registeredPlugins = new Set();
|
|
|
2
2
|
const sections = [];
|
|
3
3
|
const railEntries = [];
|
|
4
4
|
const dashboardWidgets = [];
|
|
5
|
+
const editorPanels = [];
|
|
6
|
+
const treeActions = [];
|
|
5
7
|
/**
|
|
6
8
|
* Register every slot a plugin's manifest declares: its top-level sections
|
|
7
9
|
* (each with its own rail), its rail entries in built-in sections and its
|
|
@@ -25,6 +27,12 @@ export function registerPluginSlots(pluginId, manifest) {
|
|
|
25
27
|
for (const widget of manifest.contributions.dashboardWidgets ?? []) {
|
|
26
28
|
dashboardWidgets.push({ pluginId, widget });
|
|
27
29
|
}
|
|
30
|
+
for (const panel of manifest.contributions.editorPanels ?? []) {
|
|
31
|
+
editorPanels.push({ pluginId, panel });
|
|
32
|
+
}
|
|
33
|
+
for (const action of manifest.contributions.treeActions ?? []) {
|
|
34
|
+
treeActions.push({ pluginId, action });
|
|
35
|
+
}
|
|
28
36
|
}
|
|
29
37
|
/** @internal Host-only lookup of one plugin's section by its id. */
|
|
30
38
|
export function getPluginSection(pluginId, sectionId) {
|
|
@@ -49,6 +57,19 @@ export function getRailEntry(section, pluginId, entryId) {
|
|
|
49
57
|
export function listDashboardWidgets() {
|
|
50
58
|
return [...dashboardWidgets];
|
|
51
59
|
}
|
|
60
|
+
/** @internal Every registered editor panel, sorted by plugin id and then declaration order, so the
|
|
61
|
+
* editor shows the same panels in the same order whichever plugin loaded first. A copy. */
|
|
62
|
+
export function listEditorPanels() {
|
|
63
|
+
return sortedByPlugin(editorPanels);
|
|
64
|
+
}
|
|
65
|
+
/** @internal Every registered tree action, sorted like listEditorPanels. A copy. */
|
|
66
|
+
export function listTreeActions() {
|
|
67
|
+
return sortedByPlugin(treeActions);
|
|
68
|
+
}
|
|
69
|
+
// Array.prototype.sort is stable, so declaration order (registration order) holds within one plugin.
|
|
70
|
+
function sortedByPlugin(list) {
|
|
71
|
+
return [...list].sort((a, b) => (a.pluginId < b.pluginId ? -1 : a.pluginId > b.pluginId ? 1 : 0));
|
|
72
|
+
}
|
|
52
73
|
/** @internal Clears every registered slot and plugin id. Tests only: the
|
|
53
74
|
* admin registers once per page load. */
|
|
54
75
|
export function resetPluginSlotsForTests() {
|
|
@@ -56,4 +77,6 @@ export function resetPluginSlotsForTests() {
|
|
|
56
77
|
sections.length = 0;
|
|
57
78
|
railEntries.length = 0;
|
|
58
79
|
dashboardWidgets.length = 0;
|
|
80
|
+
editorPanels.length = 0;
|
|
81
|
+
treeActions.length = 0;
|
|
59
82
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo, useRef, useState } from "react";
|
|
3
3
|
import { ChevronRight, Folder as FolderIcon } from "lucide-react";
|
|
4
4
|
import { assetPathAccepted, assetPathIsImage } from "@kardalum/api-schemas";
|
|
5
|
-
import { Button, cn, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle } from "@kardalum/ui";
|
|
5
|
+
import { Button, cn, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, TruncatedText } from "@kardalum/ui";
|
|
6
6
|
import { usePluginTranslate } from "../plugin-screen-context.js";
|
|
7
7
|
import { gridArrowStep } from "../grid-arrow-step.js";
|
|
8
8
|
import { assetBaseName, assetParent, normalizeStartFolder, useAssetThumbnail, useAssetTree } from "./asset-tree.js";
|
|
@@ -94,12 +94,12 @@ export function AssetPicker({ accepts, startFolder: rawStartFolder, currentPath
|
|
|
94
94
|
event.preventDefault();
|
|
95
95
|
opener.focus();
|
|
96
96
|
}
|
|
97
|
-
}, children: [_jsxs(SheetHeader, { className: "flex-col items-start gap-1", children: [_jsx(SheetTitle, { children: t("asset.pickerTitle") }), _jsx(SheetDescription, { children: t(accepts === "any" ? "asset.pickerAny" : "asset.pickerImages") })] }), _jsx("nav", { "aria-label": t("asset.location"), className: "shrink-0 border-b border-border-default px-4 py-2", children: _jsxs("ol", { className: "flex flex-wrap items-center gap-1 text-sm text-text-tertiary", children: [_jsx("li", { children: folder === "" ? (_jsx("span", { "aria-current": "page", className: "font-medium text-text-primary", children: t("asset.root") })) : (_jsx("button", { type: "button", onClick: () => openFolder(""), className: LINK_CLASS, children: t("asset.root") })) }), crumbs.map((crumb, index) => (_jsxs("li", { className: "flex min-w-0 items-center gap-1", children: [_jsx(ChevronRight, { "aria-hidden": "true", className: "size-3 shrink-0 rtl:rotate-180" }), index === crumbs.length - 1 ? (_jsx(
|
|
97
|
+
}, children: [_jsxs(SheetHeader, { className: "flex-col items-start gap-1", children: [_jsx(SheetTitle, { children: t("asset.pickerTitle") }), _jsx(SheetDescription, { children: t(accepts === "any" ? "asset.pickerAny" : "asset.pickerImages") })] }), _jsx("nav", { "aria-label": t("asset.location"), className: "shrink-0 border-b border-border-default px-4 py-2", children: _jsxs("ol", { className: "flex flex-wrap items-center gap-1 text-sm text-text-tertiary", children: [_jsx("li", { children: folder === "" ? (_jsx("span", { "aria-current": "page", className: "font-medium text-text-primary", children: t("asset.root") })) : (_jsx("button", { type: "button", onClick: () => openFolder(""), className: LINK_CLASS, children: t("asset.root") })) }), crumbs.map((crumb, index) => (_jsxs("li", { className: "flex min-w-0 items-center gap-1", children: [_jsx(ChevronRight, { "aria-hidden": "true", className: "size-3 shrink-0 rtl:rotate-180" }), index === crumbs.length - 1 ? (_jsx(TruncatedText, { "aria-current": "page", className: "truncate font-medium text-text-primary", children: crumb.name })) : (_jsx("button", { type: "button", onClick: () => openFolder(crumb.path), className: cn("min-w-0", LINK_CLASS), children: _jsx(TruncatedText, { className: "block truncate", children: crumb.name }) }))] }, crumb.path)))] }) }), _jsxs("div", { className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4", children: [tree.status === "loading" && _jsx("p", { className: "text-sm text-text-secondary", children: t("asset.loading") }), tree.status === "forbidden" && _jsx("p", { className: "text-sm text-text-secondary", children: t("asset.noAccess") }), tree.status === "failed" && _jsx("p", { className: "text-sm text-danger-600", children: t("asset.loadFailed") }), tree.status === "ready" && tree.truncated && _jsx("p", { className: "text-sm text-text-tertiary", children: t("asset.truncated") }), folders.length > 0 && (_jsx("ul", { "aria-label": t("asset.folders"), className: "flex flex-wrap gap-2", children: folders.map((entry) => (_jsx("li", { className: "min-w-0", children: _jsxs("button", { type: "button", onClick: () => openFolder(entry.path), className: "flex max-w-full items-center gap-2 rounded-full border border-border-default bg-background-elevated px-3 py-1 text-xs text-text-secondary hover:bg-background-hover focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary-600", children: [_jsx(FolderIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-text-tertiary" }), _jsx(TruncatedText, { className: "truncate", children: assetBaseName(entry.path) })] }) }, entry.path))) })), tree.status === "ready" && files.length === 0 && folders.length === 0 && (_jsx("p", { className: "text-sm text-text-secondary", children: t("asset.empty") })), files.length > 0 && (_jsx("div", { role: "listbox", "aria-label": t("asset.files"), onKeyDown: handleGridKeyDown, className: "grid grid-cols-2 gap-3 sm:grid-cols-3", children: files.map((entry, index) => {
|
|
98
98
|
const accepted = assetPathAccepted(entry.path, accepts);
|
|
99
99
|
const selected = selectedPath === entry.path;
|
|
100
100
|
return (_jsxs("button", { type: "button", ref: (element) => {
|
|
101
101
|
optionRefs.current[index] = element;
|
|
102
|
-
}, role: "option", "aria-selected": selected, "aria-disabled": !accepted, tabIndex: index === activeIndex ? 0 : -1, onFocus: () => setActiveIndex(index), onClick: () => choose(entry), className: cn("flex flex-col overflow-hidden rounded-md border text-start focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary-600", selected ? "border-primary-600 bg-primary-100" : "border-border-subtle hover:bg-background-elevated", !accepted && "cursor-not-allowed opacity-50 hover:bg-transparent"), children: [_jsx(TileThumbnail, { path: entry.path }), _jsxs("span", { className: "block min-w-0 px-2 py-1", children: [_jsx(
|
|
102
|
+
}, role: "option", "aria-selected": selected, "aria-disabled": !accepted, tabIndex: index === activeIndex ? 0 : -1, onFocus: () => setActiveIndex(index), onClick: () => choose(entry), className: cn("flex flex-col overflow-hidden rounded-md border text-start focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary-600", selected ? "border-primary-600 bg-primary-100" : "border-border-subtle hover:bg-background-elevated", !accepted && "cursor-not-allowed opacity-50 hover:bg-transparent"), children: [_jsx(TileThumbnail, { path: entry.path }), _jsxs("span", { className: "block min-w-0 px-2 py-1", children: [_jsx(TruncatedText, { className: "block truncate font-mono text-xs text-text-primary", children: assetBaseName(entry.path) }), _jsx(TruncatedText, { className: "block truncate text-xs text-text-tertiary", children: accepted ? formatSize(entry.size) : t("asset.notAnImage") })] })] }, entry.path));
|
|
103
103
|
}) }))] }), _jsxs(SheetFooter, { className: "items-center justify-end gap-2", children: [_jsx(Button, { type: "button", variant: "outline", onClick: onClose, children: t("asset.cancel") }), _jsx(Button, { type: "button", disabled: selectedPath === null, onClick: () => {
|
|
104
104
|
if (selectedPath === null)
|
|
105
105
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { BUILT_IN_EDITOR_IDS } from "@kardalum/api-schemas";
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
// the install refuses it, because the admin would refuse to register it and the server would
|
|
4
|
-
// validate the field by the built-in's rules. built-ins.test.tsx holds this list to what
|
|
5
|
-
// built-ins.tsx registers.
|
|
6
|
-
export const BUILT_IN_EDITOR_IDS = [
|
|
7
|
-
"com.kardalum.text",
|
|
8
|
-
"com.kardalum.number",
|
|
9
|
-
"com.kardalum.boolean",
|
|
10
|
-
"com.kardalum.date",
|
|
11
|
-
"com.kardalum.image",
|
|
12
|
-
"com.kardalum.fileupload",
|
|
13
|
-
"com.kardalum.richtext",
|
|
14
|
-
"com.kardalum.html",
|
|
15
|
-
"com.kardalum.daterange",
|
|
16
|
-
"com.kardalum.contentlist",
|
|
17
|
-
"com.kardalum.crop",
|
|
18
|
-
"com.kardalum.thumbnail",
|
|
19
|
-
"com.kardalum.asset",
|
|
20
|
-
];
|
|
1
|
+
// M32 J (J2): the list lives in @kardalum/api-schemas, where the delivery checks read it too.
|
|
2
|
+
export { BUILT_IN_EDITOR_IDS } from "@kardalum/api-schemas";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// ./datatypes subpath (Session 69's "no browser weight in the server
|
|
4
4
|
// process" boundary), while built-ins.tsx re-imports them so the browser
|
|
5
5
|
// registry contract is unchanged. All six are identity today (Session
|
|
6
|
-
// 111 wires the PIPELINE, not new output shapes)
|
|
6
|
+
// 111 wires the PIPELINE, not new output shapes), so a built-in that needs
|
|
7
7
|
// a real serialized projection later changes its entry here and nowhere
|
|
8
8
|
// else. Keys are editor ids (DataTypeConfig.editorId), matching
|
|
9
9
|
// BUILT_IN_DATA_TYPE_CONFIGS in @kardalum/api-schemas.
|
|
@@ -13,4 +13,14 @@ export declare const CROP_DEFAULT_SETTINGS: Record<string, unknown>;
|
|
|
13
13
|
export declare const THUMBNAIL_DEFAULT_SETTINGS: Record<string, unknown>;
|
|
14
14
|
export declare const ASSET_SETTINGS_SCHEMA: JSONSchema7;
|
|
15
15
|
export declare const ASSET_DEFAULT_SETTINGS: Record<string, unknown>;
|
|
16
|
+
export declare const CONTENT_PICKER_SETTINGS_SCHEMA: JSONSchema7;
|
|
17
|
+
export declare const CONTENT_PICKER_DEFAULT_SETTINGS: Record<string, unknown>;
|
|
18
|
+
export declare const OPTIONS_SETTINGS_SCHEMA: JSONSchema7;
|
|
19
|
+
export declare const OPTIONS_DEFAULT_SETTINGS: Record<string, unknown>;
|
|
20
|
+
export declare const LINK_SETTINGS_SCHEMA: JSONSchema7;
|
|
21
|
+
export declare const LINK_DEFAULT_SETTINGS: Record<string, unknown>;
|
|
22
|
+
export declare const GROUP_SETTINGS_SCHEMA: JSONSchema7;
|
|
23
|
+
export declare const GROUP_DEFAULT_SETTINGS: Record<string, unknown>;
|
|
24
|
+
export declare const REPEATABLE_LIST_SETTINGS_SCHEMA: JSONSchema7;
|
|
25
|
+
export declare const REPEATABLE_LIST_DEFAULT_SETTINGS: Record<string, unknown>;
|
|
16
26
|
export declare const BUILT_IN_SETTINGS_SCHEMAS: Readonly<Record<string, JSONSchema7>>;
|