@kardalum/plugin-sdk 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +281 -0
- package/README.md +19 -0
- package/dist/admin-section-registry.d.ts +48 -1
- package/dist/admin-section-registry.js +90 -0
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +86 -0
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +38 -7
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +101 -4
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/consent-entry.d.ts +11 -0
- package/dist/consent-entry.js +18 -0
- package/dist/content-library.d.ts +102 -0
- package/dist/content-library.js +15 -0
- package/dist/content-list-extensions.d.ts +50 -0
- package/dist/content-list-extensions.js +11 -0
- package/dist/content-picker/page-picker-sheet.d.ts +15 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-picker.d.ts +18 -0
- package/dist/content-picker/page-picker.js +20 -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 +7 -1
- package/dist/datatype-validation.d.ts +4 -9
- package/dist/datatype-validation.js +147 -1
- package/dist/datatypes-entry.d.ts +1 -0
- package/dist/datatypes-entry.js +2 -0
- 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 +53 -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 +7 -1
- package/dist/host-entry.js +14 -1
- package/dist/index.d.ts +67 -7
- package/dist/index.js +94 -6
- package/dist/mail.d.ts +34 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +47 -4
- package/dist/manifest-entry.js +63 -2
- package/dist/manifest-schema.d.ts +993 -40
- package/dist/manifest-schema.js +516 -26
- package/dist/manifest.d.ts +1186 -62
- package/dist/manifest.js +8 -4
- package/dist/media/media-picker.js +31 -18
- 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 +52 -0
- package/dist/plugin-context.js +27 -0
- package/dist/plugin-permissions.d.ts +18 -0
- package/dist/plugin-permissions.js +25 -0
- package/dist/plugin-screen-context.d.ts +262 -9
- package/dist/plugin-screen-context.js +56 -0
- package/dist/providers.d.ts +313 -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/render-page.d.ts +15 -0
- package/dist/render-page.js +20 -0
- package/dist/richtext/block-panel.d.ts +12 -1
- package/dist/richtext/block-panel.js +36 -25
- package/dist/richtext/button-view.d.ts +11 -0
- package/dist/richtext/button-view.js +45 -0
- package/dist/richtext/content-guard.d.ts +4 -0
- package/dist/richtext/content-guard.js +27 -0
- package/dist/richtext/editor-handle.d.ts +34 -0
- package/dist/richtext/editor-handle.js +225 -0
- package/dist/richtext/extensions.d.ts +6 -0
- package/dist/richtext/extensions.js +16 -0
- package/dist/richtext/insert-menu.d.ts +6 -1
- package/dist/richtext/insert-menu.js +45 -22
- package/dist/richtext/item-attributes.d.ts +6 -0
- package/dist/richtext/item-attributes.js +19 -0
- package/dist/richtext/item-panel.d.ts +25 -0
- package/dist/richtext/item-panel.js +118 -0
- package/dist/richtext/item-view.d.ts +58 -0
- package/dist/richtext/item-view.js +172 -0
- package/dist/richtext/mark-form.d.ts +10 -0
- package/dist/richtext/mark-form.js +38 -0
- package/dist/richtext/paste-choice.d.ts +9 -0
- package/dist/richtext/paste-choice.js +13 -0
- package/dist/richtext/plugin-items.d.ts +72 -0
- package/dist/richtext/plugin-items.js +562 -0
- package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
- package/dist/richtext/plugin-mark-tooltips.js +44 -0
- package/dist/richtext/plugin-toolbar.d.ts +57 -0
- package/dist/richtext/plugin-toolbar.js +186 -0
- package/dist/richtext/rich-item-icons.d.ts +5 -0
- package/dist/richtext/rich-item-icons.js +42 -0
- package/dist/richtext/rich-items.d.ts +42 -0
- package/dist/richtext/rich-items.js +68 -0
- package/dist/richtext/rich-text-view-host.d.ts +24 -0
- package/dist/richtext/rich-text-view-host.js +11 -0
- package/dist/richtext/style-listbox.js +6 -4
- package/dist/richtext/toolbar-button.d.ts +16 -0
- package/dist/richtext/toolbar-button.js +9 -0
- package/dist/richtext/url-paste.d.ts +20 -0
- package/dist/richtext/url-paste.js +82 -0
- package/dist/richtext-html-entry.d.ts +5 -0
- package/dist/richtext-html-entry.js +11 -0
- package/dist/sdk-strings.d.ts +344 -0
- package/dist/sdk-strings.js +411 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/service-contract.d.ts +17 -0
- package/dist/service-contract.js +39 -0
- package/dist/services.d.ts +114 -0
- package/dist/services.js +1 -0
- package/dist/simple-storage-value-provider.js +24 -24
- package/dist/structured-storage-types.d.ts +429 -9
- package/dist/tailwind.js +10 -5
- package/dist/template-reads.d.ts +16 -0
- package/dist/template-reads.js +21 -0
- package/dist/testing-entry.d.ts +38 -0
- package/dist/testing-entry.js +173 -0
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +7 -0
- package/dist/tokens/system-dark.css +1 -0
- package/dist/tokens/tailwind-theme.css +7 -0
- package/dist/tokens/tokens.css +19 -3
- package/dist/tokens/tokens.json +13 -4
- package/dist/uploads.d.ts +43 -0
- package/dist/uploads.js +1 -0
- package/dist/user-library.d.ts +51 -0
- package/dist/user-library.js +15 -0
- package/dist/view-helpers.d.ts +18 -0
- package/dist/view-helpers.js +64 -0
- package/dist/views/asset-view.js +4 -1
- 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 +243 -40
- 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 +4 -1
- 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-view.js +7 -6
- package/dist/views/image-view.js +37 -19
- 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.d.ts +2 -0
- package/dist/views/rich-text-view.js +208 -35
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/dist/views/unreadable-rich-text.d.ts +17 -0
- package/dist/views/unreadable-rich-text.js +40 -0
- package/dist/visitors.d.ts +81 -0
- package/dist/visitors.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +334 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +254 -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-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/audit-api.schema.d.ts +11 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +144 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +137 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +178 -2
- 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-reads.schema.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
- package/node_modules/@kardalum/api-schemas/dist/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-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/contribution-issues.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +55 -13
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +22 -10
- 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 +8 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
- 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 +257 -15
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +78 -5
- 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 +90 -5
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/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/html-scan.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +162 -48
- package/node_modules/@kardalum/api-schemas/dist/index.js +137 -30
- 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/json-depth.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
- package/node_modules/@kardalum/api-schemas/dist/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/mail-rules.d.ts +226 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +409 -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 +490 -10
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +53 -3
- 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 +38 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
- 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 +5 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +8 -0
- 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 +60 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +333 -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/page-audience.schema.d.ts +87 -0
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
- package/node_modules/@kardalum/api-schemas/dist/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-admin-slots.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-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 +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +84 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-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 +44 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +44 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +16 -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 +34 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-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-guards.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +119 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +216 -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 +46 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +41 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +304 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +220 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-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 +408 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +307 -23
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +23 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +61 -3
- 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 +23 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +37 -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 +346 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +461 -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-rich-text.d.ts +638 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-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-service-call.d.ts +36 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +352 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +409 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +347 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +976 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/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-cache.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +307 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +71 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +540 -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 +394 -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 +201 -1
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +97 -8
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +64 -1
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +53 -2
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +386 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +618 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/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/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 +70 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +188 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
- package/node_modules/@kardalum/api-schemas/dist/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/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 +72 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +36 -3
- 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/dist/visitor-accounts.d.ts +482 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
- package/node_modules/@kardalum/api-schemas/package.json +2 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +15 -1
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +7 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +2 -1
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +19 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +18 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +13 -4
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +5 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +38 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +17 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +625 -35
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -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/contract-fingerprint.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/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/bundle.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +47 -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 +40 -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/icons.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +76 -6
- 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 +99 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/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 +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +316 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +40 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +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 +150 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +69 -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 +17 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +8 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +7 -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/public-suffix.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
- package/node_modules/@kardalum/plugin-package/package.json +4 -0
- package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
- package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/index.js +2 -0
- package/package.json +25 -3
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
const richTextViews = [];
|
|
2
|
+
/** @internal Whether a live richTextExtensions declares any view. */
|
|
3
|
+
export function richTextDeclaresViews(contributions) {
|
|
4
|
+
const rich = contributions.richTextExtensions;
|
|
5
|
+
return (rich?.nodes ?? []).some((node) => node.view !== undefined) || (rich?.marks ?? []).some((mark) => mark.view !== undefined) || (rich?.buttons ?? []).some((button) => "view" in button.does);
|
|
6
|
+
}
|
|
1
7
|
const registeredPlugins = new Set();
|
|
2
8
|
const sections = [];
|
|
3
9
|
const railEntries = [];
|
|
4
10
|
const dashboardWidgets = [];
|
|
11
|
+
const editorPanels = [];
|
|
12
|
+
const treeActions = [];
|
|
13
|
+
const contentColumns = [];
|
|
14
|
+
const treeBadges = [];
|
|
15
|
+
const listFilters = [];
|
|
16
|
+
const bulkActions = [];
|
|
17
|
+
const adminSlots = [];
|
|
5
18
|
/**
|
|
6
19
|
* Register every slot a plugin's manifest declares: its top-level sections
|
|
7
20
|
* (each with its own rail), its rail entries in built-in sections and its
|
|
@@ -25,6 +38,42 @@ export function registerPluginSlots(pluginId, manifest) {
|
|
|
25
38
|
for (const widget of manifest.contributions.dashboardWidgets ?? []) {
|
|
26
39
|
dashboardWidgets.push({ pluginId, widget });
|
|
27
40
|
}
|
|
41
|
+
for (const panel of manifest.contributions.editorPanels ?? []) {
|
|
42
|
+
editorPanels.push({ pluginId, panel });
|
|
43
|
+
}
|
|
44
|
+
for (const action of manifest.contributions.treeActions ?? []) {
|
|
45
|
+
treeActions.push({ pluginId, action });
|
|
46
|
+
}
|
|
47
|
+
// M35 C2 (W5, W26): content list columns, tree badges, list filters, bulk actions and admin slots.
|
|
48
|
+
for (const entry of manifest.contributions.contentColumns ?? [])
|
|
49
|
+
contentColumns.push({ pluginId, entry });
|
|
50
|
+
for (const entry of manifest.contributions.treeBadges ?? [])
|
|
51
|
+
treeBadges.push({ pluginId, entry });
|
|
52
|
+
for (const entry of manifest.contributions.listFilters ?? [])
|
|
53
|
+
listFilters.push({ pluginId, entry });
|
|
54
|
+
for (const entry of manifest.contributions.bulkActions ?? [])
|
|
55
|
+
bulkActions.push({ pluginId, entry });
|
|
56
|
+
for (const entry of manifest.contributions.adminSlots ?? [])
|
|
57
|
+
adminSlots.push({ pluginId, entry });
|
|
58
|
+
// M35 C4b (design D15, D16): rich text item, mark and button views.
|
|
59
|
+
const rich = manifest.contributions.richTextExtensions;
|
|
60
|
+
for (const node of rich?.nodes ?? [])
|
|
61
|
+
if (node.view)
|
|
62
|
+
richTextViews.push({ pluginId, kind: "node", name: node.name, view: node.view, action: null });
|
|
63
|
+
for (const mark of rich?.marks ?? [])
|
|
64
|
+
if (mark.view)
|
|
65
|
+
richTextViews.push({ pluginId, kind: "mark", name: mark.name, view: mark.view, action: null });
|
|
66
|
+
for (const button of rich?.buttons ?? [])
|
|
67
|
+
if ("view" in button.does)
|
|
68
|
+
richTextViews.push({ pluginId, kind: "button", name: button.id, view: button.does.view, action: button.does.action });
|
|
69
|
+
}
|
|
70
|
+
/** @internal M35 C4b: one plugin's rich text view of a kind and a name (a node's or a mark's name, a button's id). */
|
|
71
|
+
export function getRichTextView(pluginId, kind, name) {
|
|
72
|
+
return richTextViews.find((entry) => entry.pluginId === pluginId && entry.kind === kind && entry.name === name);
|
|
73
|
+
}
|
|
74
|
+
/** @internal M35 C4b: every registered rich text view, in registration order. A copy. */
|
|
75
|
+
export function listRichTextViews() {
|
|
76
|
+
return [...richTextViews];
|
|
28
77
|
}
|
|
29
78
|
/** @internal Host-only lookup of one plugin's section by its id. */
|
|
30
79
|
export function getPluginSection(pluginId, sectionId) {
|
|
@@ -49,6 +98,39 @@ export function getRailEntry(section, pluginId, entryId) {
|
|
|
49
98
|
export function listDashboardWidgets() {
|
|
50
99
|
return [...dashboardWidgets];
|
|
51
100
|
}
|
|
101
|
+
/** @internal Every registered editor panel, sorted by plugin id and then declaration order, so the
|
|
102
|
+
* editor shows the same panels in the same order whichever plugin loaded first. A copy. */
|
|
103
|
+
export function listEditorPanels() {
|
|
104
|
+
return sortedByPlugin(editorPanels);
|
|
105
|
+
}
|
|
106
|
+
/** @internal Every registered tree action, sorted like listEditorPanels. A copy. */
|
|
107
|
+
export function listTreeActions() {
|
|
108
|
+
return sortedByPlugin(treeActions);
|
|
109
|
+
}
|
|
110
|
+
/** @internal Every registered content list column, sorted like listEditorPanels (M35 C2). A copy. */
|
|
111
|
+
export function listContentColumns() {
|
|
112
|
+
return sortedByPlugin(contentColumns);
|
|
113
|
+
}
|
|
114
|
+
/** @internal Every registered tree badge, sorted like listEditorPanels (M35 C2). A copy. */
|
|
115
|
+
export function listTreeBadges() {
|
|
116
|
+
return sortedByPlugin(treeBadges);
|
|
117
|
+
}
|
|
118
|
+
/** @internal Every registered list filter, sorted like listEditorPanels (M35 C2). A copy. */
|
|
119
|
+
export function listListFilters() {
|
|
120
|
+
return sortedByPlugin(listFilters);
|
|
121
|
+
}
|
|
122
|
+
/** @internal Every registered bulk action, sorted like listEditorPanels (M35 C2). A copy. */
|
|
123
|
+
export function listBulkActions() {
|
|
124
|
+
return sortedByPlugin(bulkActions);
|
|
125
|
+
}
|
|
126
|
+
/** @internal The admin slots of one place, sorted by plugin id then declaration order (M35 C2). A copy. */
|
|
127
|
+
export function listAdminSlots(place) {
|
|
128
|
+
return sortedByPlugin(adminSlots).filter((registered) => registered.entry.slot === place);
|
|
129
|
+
}
|
|
130
|
+
// Array.prototype.sort is stable, so declaration order (registration order) holds within one plugin.
|
|
131
|
+
function sortedByPlugin(list) {
|
|
132
|
+
return [...list].sort((a, b) => (a.pluginId < b.pluginId ? -1 : a.pluginId > b.pluginId ? 1 : 0));
|
|
133
|
+
}
|
|
52
134
|
/** @internal Clears every registered slot and plugin id. Tests only: the
|
|
53
135
|
* admin registers once per page load. */
|
|
54
136
|
export function resetPluginSlotsForTests() {
|
|
@@ -56,4 +138,12 @@ export function resetPluginSlotsForTests() {
|
|
|
56
138
|
sections.length = 0;
|
|
57
139
|
railEntries.length = 0;
|
|
58
140
|
dashboardWidgets.length = 0;
|
|
141
|
+
editorPanels.length = 0;
|
|
142
|
+
treeActions.length = 0;
|
|
143
|
+
contentColumns.length = 0;
|
|
144
|
+
treeBadges.length = 0;
|
|
145
|
+
listFilters.length = 0;
|
|
146
|
+
bulkActions.length = 0;
|
|
147
|
+
adminSlots.length = 0;
|
|
148
|
+
richTextViews.length = 0;
|
|
59
149
|
}
|
|
@@ -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";
|
|
@@ -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>>;
|
|
@@ -234,6 +234,87 @@ export const ASSET_SETTINGS_SCHEMA = {
|
|
|
234
234
|
};
|
|
235
235
|
// The settings migration 0033 seeds (ASSET_DATA_TYPE_CONFIG in @kardalum/api-schemas).
|
|
236
236
|
export const ASSET_DEFAULT_SETTINGS = { accepts: "images", startFolder: null };
|
|
237
|
+
// M32 C: hand-kept mirror of ContentPickerSettingsSchema, input mode.
|
|
238
|
+
const UUID_PATTERN = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$";
|
|
239
|
+
export const CONTENT_PICKER_SETTINGS_SCHEMA = {
|
|
240
|
+
type: "object",
|
|
241
|
+
properties: {
|
|
242
|
+
startNode: { anyOf: [{ type: "string", format: "uuid", pattern: UUID_PATTERN }, { type: "null" }] },
|
|
243
|
+
documentTypes: { maxItems: 500, type: "array", items: { type: "string", format: "uuid", pattern: UUID_PATTERN } },
|
|
244
|
+
multiple: { default: false, type: "boolean" },
|
|
245
|
+
max: { default: null, anyOf: [{ type: "integer", minimum: 1, maximum: 50 }, { type: "null" }] },
|
|
246
|
+
},
|
|
247
|
+
additionalProperties: false,
|
|
248
|
+
};
|
|
249
|
+
export const CONTENT_PICKER_DEFAULT_SETTINGS = { startNode: null, documentTypes: [], multiple: false, max: null };
|
|
250
|
+
// M32 C: hand-kept mirror of OptionsListSettingsSchema, input mode. It cannot say "distinct values";
|
|
251
|
+
// the server checks that with the Zod schema after ajv.
|
|
252
|
+
export const OPTIONS_SETTINGS_SCHEMA = {
|
|
253
|
+
type: "object",
|
|
254
|
+
properties: {
|
|
255
|
+
options: {
|
|
256
|
+
minItems: 1,
|
|
257
|
+
maxItems: 200,
|
|
258
|
+
type: "array",
|
|
259
|
+
items: {
|
|
260
|
+
type: "object",
|
|
261
|
+
properties: {
|
|
262
|
+
label: { type: "string", minLength: 1, maxLength: 200 },
|
|
263
|
+
value: { type: "string", minLength: 1, maxLength: 200 },
|
|
264
|
+
},
|
|
265
|
+
required: ["label", "value"],
|
|
266
|
+
additionalProperties: false,
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
multiple: { default: false, type: "boolean" },
|
|
270
|
+
},
|
|
271
|
+
required: ["options"],
|
|
272
|
+
additionalProperties: false,
|
|
273
|
+
};
|
|
274
|
+
// The editor's empty start; a save asks for one option ("Add at least one option.").
|
|
275
|
+
export const OPTIONS_DEFAULT_SETTINGS = { options: [], multiple: false };
|
|
276
|
+
// M32 C: hand-kept mirror of LinkSettingsSchema, input mode.
|
|
277
|
+
export const LINK_SETTINGS_SCHEMA = {
|
|
278
|
+
type: "object",
|
|
279
|
+
properties: { allow: { default: "both", type: "string", enum: ["internal", "external", "both"] } },
|
|
280
|
+
additionalProperties: false,
|
|
281
|
+
};
|
|
282
|
+
export const LINK_DEFAULT_SETTINGS = { allow: "both" };
|
|
283
|
+
// M32 D: hand-kept mirrors of GroupSettingsSchema and RepeatableListSettingsSchema, input mode.
|
|
284
|
+
// They cannot say "distinct aliases" or "min not above max"; the server checks those with the Zod
|
|
285
|
+
// schemas before ajv.
|
|
286
|
+
export const GROUP_SETTINGS_SCHEMA = {
|
|
287
|
+
type: "object",
|
|
288
|
+
properties: {
|
|
289
|
+
fields: {
|
|
290
|
+
maxItems: 20,
|
|
291
|
+
type: "array",
|
|
292
|
+
items: {
|
|
293
|
+
type: "object",
|
|
294
|
+
properties: {
|
|
295
|
+
alias: { type: "string", maxLength: 64, pattern: "^[a-zA-Z][a-zA-Z0-9_]*$" },
|
|
296
|
+
name: { type: "string", minLength: 1, maxLength: 200 },
|
|
297
|
+
dataTypeId: { type: "string", format: "uuid", pattern: UUID_PATTERN },
|
|
298
|
+
required: { default: false, type: "boolean" },
|
|
299
|
+
},
|
|
300
|
+
required: ["alias", "name", "dataTypeId"],
|
|
301
|
+
additionalProperties: false,
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
additionalProperties: false,
|
|
306
|
+
};
|
|
307
|
+
export const GROUP_DEFAULT_SETTINGS = { fields: [] };
|
|
308
|
+
export const REPEATABLE_LIST_SETTINGS_SCHEMA = {
|
|
309
|
+
type: "object",
|
|
310
|
+
properties: {
|
|
311
|
+
itemDataTypeId: { anyOf: [{ type: "string", format: "uuid", pattern: UUID_PATTERN }, { type: "null" }] },
|
|
312
|
+
min: { default: null, anyOf: [{ type: "integer", minimum: 0, maximum: 100 }, { type: "null" }] },
|
|
313
|
+
max: { default: null, anyOf: [{ type: "integer", minimum: 1, maximum: 100 }, { type: "null" }] },
|
|
314
|
+
},
|
|
315
|
+
additionalProperties: false,
|
|
316
|
+
};
|
|
317
|
+
export const REPEATABLE_LIST_DEFAULT_SETTINGS = { itemDataTypeId: null, min: null, max: null };
|
|
237
318
|
// com.kardalum.contentlist is the first entry whose schema has a REQUIRED
|
|
238
319
|
// member (`columns`), so unlike the three above it cannot fall back to the
|
|
239
320
|
// "stored settings are {} until a webmaster edits them" convention: its
|
|
@@ -249,4 +330,9 @@ export const BUILT_IN_SETTINGS_SCHEMAS = {
|
|
|
249
330
|
"com.kardalum.crop": CROP_SETTINGS_SCHEMA,
|
|
250
331
|
"com.kardalum.thumbnail": THUMBNAIL_SETTINGS_SCHEMA,
|
|
251
332
|
"com.kardalum.asset": ASSET_SETTINGS_SCHEMA,
|
|
333
|
+
"com.kardalum.contentpicker": CONTENT_PICKER_SETTINGS_SCHEMA,
|
|
334
|
+
"com.kardalum.options": OPTIONS_SETTINGS_SCHEMA,
|
|
335
|
+
"com.kardalum.link": LINK_SETTINGS_SCHEMA,
|
|
336
|
+
"com.kardalum.group": GROUP_SETTINGS_SCHEMA,
|
|
337
|
+
"com.kardalum.list": REPEATABLE_LIST_SETTINGS_SCHEMA,
|
|
252
338
|
};
|
|
@@ -47,4 +47,39 @@ export const BUILT_IN_VALUE_SCHEMAS = {
|
|
|
47
47
|
// S314p (D3). A path under public/, as Settings, Assets names the file; the address a template
|
|
48
48
|
// prints is worked out at render.
|
|
49
49
|
"com.kardalum.asset": { type: "string" },
|
|
50
|
+
// M32 C (D2, D10): one page id, or a list of distinct page ids (at most 50); null when empty.
|
|
51
|
+
"com.kardalum.contentpicker": {
|
|
52
|
+
anyOf: [
|
|
53
|
+
{ type: "string", format: "uuid" },
|
|
54
|
+
{ type: "array", items: { type: "string", format: "uuid" }, maxItems: 50, uniqueItems: true },
|
|
55
|
+
{ type: "null" },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
// M32 C (D3): one option's value, or a list of distinct values; null when empty.
|
|
59
|
+
"com.kardalum.options": {
|
|
60
|
+
anyOf: [{ type: "string" }, { type: "array", items: { type: "string" }, uniqueItems: true }, { type: "null" }],
|
|
61
|
+
},
|
|
62
|
+
// M32 C (D4): a page on this site or an outside address, with a label and a new-tab flag.
|
|
63
|
+
"com.kardalum.link": {
|
|
64
|
+
anyOf: [
|
|
65
|
+
{
|
|
66
|
+
type: "object",
|
|
67
|
+
properties: { page: { type: "string", format: "uuid" }, label: { type: "string", maxLength: 200 }, newTab: { type: "boolean" } },
|
|
68
|
+
required: ["page"],
|
|
69
|
+
additionalProperties: false,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: { url: { type: "string", maxLength: 2048 }, label: { type: "string", maxLength: 200 }, newTab: { type: "boolean" } },
|
|
74
|
+
required: ["url"],
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
},
|
|
77
|
+
{ type: "null" },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
// M32 D (D1): a Group stores an object keyed by its sub-fields' aliases; a Repeatable list an array
|
|
81
|
+
// of at most 100 items. The per-field schema built from the data type tree replaces these on the
|
|
82
|
+
// delivery API.
|
|
83
|
+
"com.kardalum.group": { anyOf: [{ type: "object" }, { type: "null" }] },
|
|
84
|
+
"com.kardalum.list": { anyOf: [{ type: "array", maxItems: 100 }, { type: "null" }] },
|
|
50
85
|
};
|
package/dist/built-ins.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CONTENT_LIST_DEFAULT_SETTINGS } from "@kardalum/api-schemas";
|
|
3
3
|
import { Checkbox, Input, PropertyField, usePropertyFieldControl } from "@kardalum/ui";
|
|
4
|
-
import { ASSET_DEFAULT_SETTINGS, ASSET_SETTINGS_SCHEMA, CONTENT_LIST_SETTINGS_SCHEMA, CROP_DEFAULT_SETTINGS, CROP_SETTINGS_SCHEMA, FILE_UPLOAD_SETTINGS_SCHEMA, HTML_DEFAULT_SETTINGS, HTML_SETTINGS_SCHEMA, IMAGE_DEFAULT_SETTINGS, IMAGE_SETTINGS_SCHEMA, TEXT_DEFAULT_SETTINGS, TEXT_SETTINGS_SCHEMA, THUMBNAIL_DEFAULT_SETTINGS, THUMBNAIL_SETTINGS_SCHEMA, } from "./built-in-settings-schemas.js";
|
|
4
|
+
import { ASSET_DEFAULT_SETTINGS, ASSET_SETTINGS_SCHEMA, CONTENT_LIST_SETTINGS_SCHEMA, CONTENT_PICKER_DEFAULT_SETTINGS, CONTENT_PICKER_SETTINGS_SCHEMA, CROP_DEFAULT_SETTINGS, CROP_SETTINGS_SCHEMA, FILE_UPLOAD_SETTINGS_SCHEMA, HTML_DEFAULT_SETTINGS, HTML_SETTINGS_SCHEMA, IMAGE_DEFAULT_SETTINGS, IMAGE_SETTINGS_SCHEMA, LINK_DEFAULT_SETTINGS, LINK_SETTINGS_SCHEMA, OPTIONS_DEFAULT_SETTINGS, OPTIONS_SETTINGS_SCHEMA, GROUP_DEFAULT_SETTINGS, GROUP_SETTINGS_SCHEMA, REPEATABLE_LIST_DEFAULT_SETTINGS, REPEATABLE_LIST_SETTINGS_SCHEMA, TEXT_DEFAULT_SETTINGS, TEXT_SETTINGS_SCHEMA, THUMBNAIL_DEFAULT_SETTINGS, THUMBNAIL_SETTINGS_SCHEMA, } from "./built-in-settings-schemas.js";
|
|
5
5
|
import { BUILT_IN_VALUE_SCHEMAS } from "./built-in-value-schemas.js";
|
|
6
6
|
import { BUILT_IN_SERIALIZERS, identitySerializer } from "./built-in-serializers.js";
|
|
7
7
|
import { BUILT_IN_DATATYPE_VALIDATORS } from "./datatype-validation.js";
|
|
8
8
|
import { definePlugin } from "./define-plugin.js";
|
|
9
9
|
import { usePluginSettings, usePluginSettingsValue, usePluginValue } from "./plugin-context.js";
|
|
10
10
|
import { registerDataType } from "./registry.js";
|
|
11
|
+
import { useSdkString } from "./sdk-strings.js";
|
|
11
12
|
import { AssetInputView, AssetReadOnlyView, AssetSettingsView } from "./views/asset-view.js";
|
|
13
|
+
import { ContentPickerInputView, ContentPickerReadOnlyView, ContentPickerSettingsView } from "./views/content-picker-view.js";
|
|
14
|
+
import { GroupInputView, GroupReadOnlyView, GroupSettingsView } from "./views/group-view.js";
|
|
15
|
+
import { RepeatableListInputView, RepeatableListReadOnlyView, RepeatableListSettingsView } from "./views/repeatable-list-view.js";
|
|
16
|
+
import { LinkInputView, LinkReadOnlyView, LinkSettingsView } from "./views/link-view.js";
|
|
17
|
+
import { OptionsListInputView, OptionsListReadOnlyView, OptionsListSettingsView } from "./views/options-list-view.js";
|
|
12
18
|
import { ContentListPreview } from "./views/content-list-preview.js";
|
|
13
19
|
import { ContentListSettingsView } from "./views/content-list-settings-view.js";
|
|
14
20
|
import { ContentListInputView, ContentListReadOnlyView } from "./views/content-list-view.js";
|
|
@@ -48,13 +54,12 @@ function TextReadOnlyView() {
|
|
|
48
54
|
// Rendered by the Data Types editor only (data-type-editor.tsx), a
|
|
49
55
|
// settings-EDITING view, so it uses usePluginSettingsValue() (write path),
|
|
50
56
|
// not usePluginSettings() (read-only, used by the input/readOnly views
|
|
51
|
-
// above).
|
|
52
|
-
//
|
|
53
|
-
// deliberately deferred piece of SDK scope, not yet implemented,
|
|
54
|
-
// matching ImageInputView's existing "Remove"/"Loading…" precedent.
|
|
57
|
+
// above). Its words come from useSdkString() (S366f D11), the host's
|
|
58
|
+
// language inside the admin and English anywhere else.
|
|
55
59
|
function TextSettingsView() {
|
|
56
60
|
const { value: settings, onChange } = usePluginSettingsValue();
|
|
57
|
-
|
|
61
|
+
const s = useSdkString();
|
|
62
|
+
return (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx(PropertyField, { label: s("text.placeholderLabel"), htmlFor: "text-settings-placeholder", children: _jsx(Input, { id: "text-settings-placeholder", value: settings.placeholder ?? "", onChange: (e) => onChange({ ...settings, placeholder: e.target.value || undefined }) }) }), _jsx(PropertyField, { label: s("text.maxLengthLabel"), htmlFor: "text-settings-max-length", helpText: s("text.maxLengthHelp"), children: _jsx(Input, { id: "text-settings-max-length", type: "number", min: 1, value: settings.maxLength ?? "", onChange: (e) => onChange({ ...settings, maxLength: e.target.value === "" ? undefined : Number(e.target.value) }) }) })] }));
|
|
58
63
|
}
|
|
59
64
|
function NumberInputView() {
|
|
60
65
|
const { value, onChange } = usePluginValue();
|
|
@@ -72,7 +77,8 @@ function BooleanInputView() {
|
|
|
72
77
|
}
|
|
73
78
|
function BooleanReadOnlyView() {
|
|
74
79
|
const { value } = usePluginValue();
|
|
75
|
-
|
|
80
|
+
const s = useSdkString();
|
|
81
|
+
return _jsx("p", { children: value ? s("boolean.yes") : s("boolean.no") });
|
|
76
82
|
}
|
|
77
83
|
function DateInputView() {
|
|
78
84
|
const { value, onChange } = usePluginValue();
|
|
@@ -264,3 +270,28 @@ registerDataType(builtIn("asset", "Asset", "folder-open", BUILT_IN_VALUE_SCHEMAS
|
|
|
264
270
|
settings: AssetSettingsView,
|
|
265
271
|
preview: AssetReadOnlyView,
|
|
266
272
|
}, { settingsSchema: ASSET_SETTINGS_SCHEMA, defaultSettings: ASSET_DEFAULT_SETTINGS }));
|
|
273
|
+
// M32 C (D1): the Content Picker, Options List and Link editors. Views arrive in their own tasks;
|
|
274
|
+
// until then the placeholders render nothing.
|
|
275
|
+
registerDataType(builtIn("contentpicker", "Content Picker", "file-search", BUILT_IN_VALUE_SCHEMAS["com.kardalum.contentpicker"], { input: ContentPickerInputView, readOnly: ContentPickerReadOnlyView, settings: ContentPickerSettingsView, preview: ContentPickerReadOnlyView }, {
|
|
276
|
+
settingsSchema: CONTENT_PICKER_SETTINGS_SCHEMA,
|
|
277
|
+
defaultSettings: CONTENT_PICKER_DEFAULT_SETTINGS,
|
|
278
|
+
}));
|
|
279
|
+
registerDataType(builtIn("options", "Options List", "list", BUILT_IN_VALUE_SCHEMAS["com.kardalum.options"], { input: OptionsListInputView, readOnly: OptionsListReadOnlyView, settings: OptionsListSettingsView, preview: OptionsListReadOnlyView }, {
|
|
280
|
+
settingsSchema: OPTIONS_SETTINGS_SCHEMA,
|
|
281
|
+
defaultSettings: OPTIONS_DEFAULT_SETTINGS,
|
|
282
|
+
}));
|
|
283
|
+
registerDataType(builtIn("link", "Link", "link", BUILT_IN_VALUE_SCHEMAS["com.kardalum.link"], { input: LinkInputView, readOnly: LinkReadOnlyView, settings: LinkSettingsView, preview: LinkReadOnlyView }, {
|
|
284
|
+
settingsSchema: LINK_SETTINGS_SCHEMA,
|
|
285
|
+
defaultSettings: LINK_DEFAULT_SETTINGS,
|
|
286
|
+
}));
|
|
287
|
+
// M32 D (D1): the Group and Repeatable List editors.
|
|
288
|
+
const GROUP_VIEWS = { input: GroupInputView, readOnly: GroupReadOnlyView, settings: GroupSettingsView, preview: GroupReadOnlyView };
|
|
289
|
+
const LIST_VIEWS = { input: RepeatableListInputView, readOnly: RepeatableListReadOnlyView, settings: RepeatableListSettingsView, preview: RepeatableListReadOnlyView };
|
|
290
|
+
registerDataType(builtIn("group", "Group", "layers", BUILT_IN_VALUE_SCHEMAS["com.kardalum.group"], GROUP_VIEWS, {
|
|
291
|
+
settingsSchema: GROUP_SETTINGS_SCHEMA,
|
|
292
|
+
defaultSettings: GROUP_DEFAULT_SETTINGS,
|
|
293
|
+
}));
|
|
294
|
+
registerDataType(builtIn("list", "Repeatable List", "list-ordered", BUILT_IN_VALUE_SCHEMAS["com.kardalum.list"], LIST_VIEWS, {
|
|
295
|
+
settingsSchema: REPEATABLE_LIST_SETTINGS_SCHEMA,
|
|
296
|
+
defaultSettings: REPEATABLE_LIST_DEFAULT_SETTINGS,
|
|
297
|
+
}));
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CapabilityNote } from "@kardalum/api-schemas";
|
|
2
|
+
export { CAPABILITY_IDS, deriveCapabilities, derivesCapability, isActionGated, type Capability, type CapabilityMediation, type CapabilityPayload, } from "@kardalum/plugin-package/reference";
|
|
2
3
|
/**
|
|
3
4
|
* S289 (S347): the one sentence every surface uses for what declaring a
|
|
4
5
|
* promised capability means for review. Every submission that passes
|
|
@@ -18,6 +19,15 @@ export declare const PROMISED_CAPABILITY_SENTENCE = "is a promised capability, s
|
|
|
18
19
|
export type CapabilityAudience = "operator" | "shopper";
|
|
19
20
|
export type CapabilityLabels = Record<CapabilityAudience, string>;
|
|
20
21
|
export declare const CAPABILITY_LABELS: Record<string, CapabilityLabels>;
|
|
22
|
+
/**
|
|
23
|
+
* M33 K2: the core's notes a capability's detail may carry beside the
|
|
24
|
+
* plugin's own words, in English. The admin's locales (`capabilityNotes`)
|
|
25
|
+
* and the marketplace's dictionaries hold the same words in every language
|
|
26
|
+
* they carry, the English held to this table by their label tests. A note's
|
|
27
|
+
* words may hold one `{{value}}`, where the detail's value is printed as
|
|
28
|
+
* written (formatCapabilityDetail in @kardalum/api-schemas).
|
|
29
|
+
*/
|
|
30
|
+
export declare const CAPABILITY_NOTE_WORDS: Record<CapabilityNote, string>;
|
|
21
31
|
/**
|
|
22
32
|
* The heading a renderer puts in front of a capability's details.
|
|
23
33
|
*
|
package/dist/capabilities.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// S289: the derivation moved to @kardalum/plugin-package/reference so the one
|
|
2
2
|
// reference builder can call it (the SDK depends on plugin-package, never the
|
|
3
3
|
// reverse). The SDK's public names are unchanged; the labels stay here.
|
|
4
|
-
export { CAPABILITY_IDS, deriveCapabilities, isActionGated, } from "@kardalum/plugin-package/reference";
|
|
4
|
+
export { CAPABILITY_IDS, deriveCapabilities, derivesCapability, isActionGated, } from "@kardalum/plugin-package/reference";
|
|
5
5
|
// A contribution or assertion added to the manifest and not classified in
|
|
6
6
|
// the derivation is a compile error here, as it was before the move.
|
|
7
7
|
const contributionKeysAreTotal = true;
|
|
@@ -35,27 +35,124 @@ export const CAPABILITY_LABELS = {
|
|
|
35
35
|
"admin.section": { operator: "Admin sections", shopper: "Adds admin screens" },
|
|
36
36
|
"admin.railEntry": { operator: "Admin rail entries", shopper: "Adds screens to built-in sections" },
|
|
37
37
|
"admin.dashboardWidget": { operator: "Dashboard widgets", shopper: "Adds dashboard widgets" },
|
|
38
|
+
"admin.editorPanel": { operator: "Editor panels", shopper: "Adds panels to the page editor" },
|
|
39
|
+
"admin.treeAction": { operator: "Tree actions", shopper: "Adds actions to the content tree" },
|
|
40
|
+
"admin.contentColumn": { operator: "Content list columns", shopper: "Adds columns to content lists" },
|
|
41
|
+
"admin.treeBadge": { operator: "Content tree badges", shopper: "Adds badges to rows of the content tree" },
|
|
42
|
+
"admin.listFilter": { operator: "Content list filters", shopper: "Adds filters to content lists" },
|
|
43
|
+
"admin.bulkAction": { operator: "Bulk actions", shopper: "Adds actions for several selected pages" },
|
|
44
|
+
"admin.slot": { operator: "Panels in core screens", shopper: "Adds panels and buttons to the admin's own screens" },
|
|
38
45
|
"admin.notifications": {
|
|
39
46
|
operator: "Notifications",
|
|
40
|
-
shopper: "Sends notifications
|
|
47
|
+
shopper: "Sends notifications of the kinds it lists, each to the people the kind names.",
|
|
41
48
|
},
|
|
42
49
|
"render.template": { operator: "Render templates", shopper: "Ships render templates" },
|
|
43
50
|
"render.asset": { operator: "Editable assets", shopper: "Ships editable assets" },
|
|
44
51
|
"theme.tokens": { operator: "Theme tokens", shopper: "Restyles the admin" },
|
|
45
|
-
"server.hook": { operator: "Lifecycle hooks", shopper: "Reacts to
|
|
52
|
+
"server.hook": { operator: "Lifecycle hooks", shopper: "Reacts to events on your site: the ones listed" },
|
|
53
|
+
"server.guard": { operator: "Write guards", shopper: "Can refuse saving, publishing, moving or deleting pages: at the points listed" },
|
|
46
54
|
"server.scheduledTask": { operator: "Scheduled tasks", shopper: "Runs work on a schedule" },
|
|
47
55
|
"media.processor": { operator: "Media processors", shopper: "Processes uploaded media" },
|
|
48
56
|
"api.serializer": { operator: "Response extensions", shopper: "Extends content API responses" },
|
|
49
57
|
"api.route.admin": { operator: "Admin API routes", shopper: "Adds admin-only API routes" },
|
|
50
58
|
"api.route.apiKey": { operator: "API-key routes", shopper: "Adds API-key routes" },
|
|
51
59
|
"api.route.public": { operator: "Public API routes", shopper: "Adds routes anyone can call" },
|
|
52
|
-
|
|
60
|
+
// M35 B1a (W16)
|
|
61
|
+
"service.contract": { operator: "Service contracts", shopper: "Lets other plugins offer and use services it defines: the ones listed" },
|
|
62
|
+
"service.offer": { operator: "Services offered", shopper: "Offers services to other plugins: the ones listed" },
|
|
63
|
+
"service.use": { operator: "Services used", shopper: "Calls services other plugins offer: the ones listed" },
|
|
64
|
+
"event.raise": { operator: "Plugin events", shopper: "Tells other plugins when something happens: the events listed" },
|
|
53
65
|
"bundle.plugin": { operator: "Bundled plugins", shopper: "Installs other plugins with it" },
|
|
66
|
+
"content.access": { operator: "Content access", shopper: "Reads, creates or changes content of the types it names" },
|
|
67
|
+
// M32 F4c (D10)
|
|
68
|
+
"media.access": { operator: "Media access", shopper: "Reads every media file, private ones included, or adds media files" },
|
|
69
|
+
// M35 U1 (W6)
|
|
70
|
+
"users.access": { operator: "Account access", shopper: "Reads your admin users' accounts (names, email addresses, roles) or moves people between the roles it offers" },
|
|
71
|
+
"users.fields": { operator: "Account fields", shopper: "Keeps fields of its own on your admin users' accounts" },
|
|
72
|
+
// M35 U2b (W8)
|
|
73
|
+
"visitors.identify": { operator: "Visitor identity", shopper: "Knows which signed-in visitor of your site is reading, by name and groups" },
|
|
74
|
+
"visitors.groups": { operator: "Visitor groups", shopper: "Puts visitors into groups of its own and takes them out, such as paying members" },
|
|
75
|
+
"visitors.accountSections": { operator: "Account page sections", shopper: "Adds a section to your visitors' account page, such as their orders" },
|
|
76
|
+
"visitors.data": { operator: "Visitor data", shopper: "Keeps data about your visitors, which their data download and account deletion reach" },
|
|
77
|
+
"site.route": { operator: "Site addresses", shopper: "Answers at addresses of your site" },
|
|
78
|
+
"site.fallback": { operator: "Unclaimed addresses", shopper: "Answers addresses no page answers, for example with a redirect" },
|
|
79
|
+
// M35 P2 (W2)
|
|
80
|
+
"site.requestGuard": { operator: "Request guard", shopper: "Sees every visit to your site's pages, files and API before it is answered, and may refuse or redirect it" },
|
|
81
|
+
"site.responseHeaders": { operator: "Response headers", shopper: "Adds security and search engine headers to your site's answers, such as a content security policy" },
|
|
82
|
+
"site.pageGate": { operator: "Page gate", shopper: "Is asked before each page of your site is shown, and may redirect it or mark it as gone" },
|
|
83
|
+
"render.templateFilter": { operator: "Template filters", shopper: "Adds template filters" },
|
|
84
|
+
"render.templateTag": { operator: "Template tags", shopper: "Adds template tags" },
|
|
85
|
+
"render.pageHead": { operator: "Page head", shopper: "Adds tags to the head of every page, scripts only from the places it names" },
|
|
86
|
+
// M32 F4 (D8, D10)
|
|
87
|
+
"provider.formProtection": { operator: "Form protection provider", shopper: "Can check your site's forms" },
|
|
88
|
+
"provider.search": { operator: "Search provider", shopper: "Receives every published page to answer site search" },
|
|
89
|
+
"provider.mediaStore": { operator: "Media store", shopper: "Can store every uploaded file" },
|
|
90
|
+
// M32 H (H2, H19)
|
|
91
|
+
"provider.mail": { operator: "Mail sender", shopper: "Sends every email the site sends, password reset links included" },
|
|
92
|
+
"provider.consent": { operator: "Consent tool", shopper: "Can show your visitors a consent banner and keep which kinds of scripts and content they allow" },
|
|
93
|
+
// M33 K11
|
|
94
|
+
"mail.direct": { operator: "Plugin emails", shopper: "Sends emails of the kinds it lists, each to one person, such as an order confirmation to a buyer, when you switch each kind on" },
|
|
95
|
+
"mail.formReplies": { operator: "Form replies", shopper: "Can send one reply email to the address a visitor types into a form, when you switch it on" },
|
|
96
|
+
// M32 F4b (D48)
|
|
97
|
+
"provider.signIn": { operator: "Sign-in provider", shopper: "Can let people sign in to the admin, and vouches for who they are" },
|
|
98
|
+
// M35 U3a (D5)
|
|
99
|
+
"provider.signInStep": { operator: "Sign-in step", shopper: "Can stop people signing in to the admin, and asks them a second time who they are" },
|
|
100
|
+
secrets: { operator: "Secrets", shopper: "Keeps secret values you enter, encrypted" },
|
|
101
|
+
// M33 K42
|
|
102
|
+
"render.heldEmbed": { operator: "Content from other sites", shopper: "Shows content from the sites it names on your pages, only after a visitor clicks to show it" },
|
|
103
|
+
// M35 P1 (W3)
|
|
104
|
+
"render.pageOutput": { operator: "Page output", shopper: "Changes the HTML of every page after it is rendered, such as its links and images" },
|
|
105
|
+
"render.pageCache": { operator: "Page caching", shopper: "Tells caches and CDNs how long your pages may be kept, and labels them so they can be cleared" },
|
|
106
|
+
// M35 C4a (W9)
|
|
107
|
+
"content.richText": { operator: "Rich text items", shopper: "Adds items you can place in rich text, such as cards and highlights, which Kardalum draws and stores" },
|
|
108
|
+
// M33 K17
|
|
109
|
+
"secrets.sealedValues": { operator: "Sealed values", shopper: "Keeps secrets it makes, encrypted with your server's key" },
|
|
110
|
+
// M33 K16
|
|
111
|
+
"network.outbound": {
|
|
112
|
+
operator: "Outbound requests",
|
|
113
|
+
shopper: "Calls web addresses through the server's checked connection, which refuses this server and private networks unless whoever runs the server allows a range",
|
|
114
|
+
},
|
|
54
115
|
"bundle.template": { operator: "Bundled starter", shopper: "Comes with a frontend starter" },
|
|
55
116
|
"network.external": { operator: "External network", shopper: "Reaches the network" },
|
|
56
117
|
"network.vendorService": { operator: "Vendor service", shopper: "Serves its paid features from the author's server" },
|
|
57
118
|
"filesystem.access": { operator: "Filesystem access", shopper: "Reads or writes files" },
|
|
58
119
|
};
|
|
120
|
+
/**
|
|
121
|
+
* M33 K2: the core's notes a capability's detail may carry beside the
|
|
122
|
+
* plugin's own words, in English. The admin's locales (`capabilityNotes`)
|
|
123
|
+
* and the marketplace's dictionaries hold the same words in every language
|
|
124
|
+
* they carry, the English held to this table by their label tests. A note's
|
|
125
|
+
* words may hold one `{{value}}`, where the detail's value is printed as
|
|
126
|
+
* written (formatCapabilityDetail in @kardalum/api-schemas).
|
|
127
|
+
*/
|
|
128
|
+
export const CAPABILITY_NOTE_WORDS = {
|
|
129
|
+
rawBody: "reads the request exactly as sent",
|
|
130
|
+
identifiesPeople: "identifies people",
|
|
131
|
+
durable: "kept across restarts",
|
|
132
|
+
methods: "may use: {{value}}",
|
|
133
|
+
leavesServer: "handed to visitors as a sealed token, readable only by this server",
|
|
134
|
+
setsTitle: "may set the page title",
|
|
135
|
+
embedFrom: "from {{value}}",
|
|
136
|
+
embedKindMap: "a map",
|
|
137
|
+
embedKindContent: "content",
|
|
138
|
+
privacyNoticeAt: "privacy notice: {{value}}",
|
|
139
|
+
addsScript: "adds its own script to pages with a protected form",
|
|
140
|
+
inlineCode: "writes its own code into every page",
|
|
141
|
+
optionalUse: "optional",
|
|
142
|
+
carriesPersonalData: "its answers carry personal data",
|
|
143
|
+
takesFiles: "takes files sent to it ({{value}}); those it keeps are private in the media library",
|
|
144
|
+
richTextBlock: "a block",
|
|
145
|
+
richTextInline: "inside a sentence",
|
|
146
|
+
richTextWrapper: "a box around text",
|
|
147
|
+
richTextMark: "a mark on text",
|
|
148
|
+
richTextButtons: "{{value}} toolbar buttons",
|
|
149
|
+
// M35 C4b: an editorial item, a node made from pasted addresses, a button that opens a view.
|
|
150
|
+
richTextEditorial: "editorial, never on the public site",
|
|
151
|
+
richTextPasteHosts: "made from pasted addresses of {{value}}",
|
|
152
|
+
richTextButtonView: "opens a tool that reads and changes the text you are editing ({{value}})",
|
|
153
|
+
// M35 U2b: visitorIdentity with email: true.
|
|
154
|
+
readsVisitorEmail: "reads the email of signed-in visitors",
|
|
155
|
+
};
|
|
59
156
|
/**
|
|
60
157
|
* The heading a renderer puts in front of a capability's details.
|
|
61
158
|
*
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** M32 I3 (B13): what a command may do with standard input, without `@types/node`. */
|
|
2
|
+
export interface CliReadableStream {
|
|
3
|
+
readonly isTTY?: boolean;
|
|
4
|
+
read(size?: number): string | Uint8Array | null;
|
|
5
|
+
setEncoding(encoding: "ascii" | "utf8" | "utf-8" | "utf16le" | "utf-16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex"): this;
|
|
6
|
+
pause(): this;
|
|
7
|
+
resume(): this;
|
|
8
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
9
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
|
10
|
+
off(event: string, listener: (...args: any[]) => void): this;
|
|
11
|
+
pipe(destination: any, options?: {
|
|
12
|
+
end?: boolean;
|
|
13
|
+
}): any;
|
|
14
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<string | Uint8Array>;
|
|
15
|
+
}
|
|
16
|
+
/** M32 I3 (B13): what a command may do with standard output or error, without `@types/node`. */
|
|
17
|
+
export interface CliWritableStream {
|
|
18
|
+
readonly isTTY?: boolean;
|
|
19
|
+
readonly columns?: number;
|
|
20
|
+
write(chunk: string | Uint8Array, callback?: (error?: Error | null) => void): boolean;
|
|
21
|
+
end(callback?: () => void): this;
|
|
22
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
23
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
|
24
|
+
off(event: string, listener: (...args: any[]) => void): this;
|
|
25
|
+
}
|
|
26
|
+
/** What a command receives. No environment copy, no profile record and no key. */
|
|
27
|
+
export interface PluginCliContext {
|
|
28
|
+
command: {
|
|
29
|
+
/** The plugin id's last segment (cut at 32): the first word of the command line. */
|
|
30
|
+
prefix: string;
|
|
31
|
+
/** The command's declared name: the second word. */
|
|
32
|
+
name: string;
|
|
33
|
+
packageName: string;
|
|
34
|
+
packageVersion: string;
|
|
35
|
+
};
|
|
36
|
+
/** The arguments after the command name, unchanged and frozen. */
|
|
37
|
+
argv: readonly string[];
|
|
38
|
+
cwd: string;
|
|
39
|
+
cliVersion: string;
|
|
40
|
+
stdin: CliReadableStream;
|
|
41
|
+
/** `stdout` and `stderr` are the raw streams: what is written to them is not redacted, unlike `out` and `err`. */
|
|
42
|
+
stdout: CliWritableStream;
|
|
43
|
+
stderr: CliWritableStream;
|
|
44
|
+
/** One line to stdout, through the CLI's redaction. */
|
|
45
|
+
out(line: string): void;
|
|
46
|
+
/** One line to stderr, through the CLI's redaction. */
|
|
47
|
+
err(line: string): void;
|
|
48
|
+
/**
|
|
49
|
+
* The developer's own management client (`KardalumManageClient` from `@kardalum/client`), made
|
|
50
|
+
* on first call: a command that never calls this never resolves a profile or reads a credential.
|
|
51
|
+
* The profile is resolved as for every command (the `KARDALUM_URL` and `KARDALUM_API_KEY` pair,
|
|
52
|
+
* then `options.profile`, `KARDALUM_PROFILE`, the default). A production profile is refused
|
|
53
|
+
* unless the command names it in `options.profile`, so forward the user's own `--profile`.
|
|
54
|
+
* Typed `unknown` here so the SDK carries no dependency on the client; cast it to
|
|
55
|
+
* `KardalumManageClient`.
|
|
56
|
+
*/
|
|
57
|
+
client(options?: {
|
|
58
|
+
profile?: string;
|
|
59
|
+
}): Promise<unknown>;
|
|
60
|
+
}
|
|
61
|
+
/** A command answers nothing (exit 0) or an integer 0 to 255 (that exit code). */
|
|
62
|
+
export type PluginCliCommand = (context: PluginCliContext) => void | number | Promise<void | number>;
|
|
63
|
+
/** A commands module's `commands` export: a plain object, one function per declared name. */
|
|
64
|
+
export type PluginCliCommands = Record<string, PluginCliCommand>;
|
|
65
|
+
/** Returns `commands` unchanged; it only checks each command against `PluginCliCommand`. */
|
|
66
|
+
export declare function defineCliCommands<T extends PluginCliCommands>(commands: T): T;
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// The `@kardalum/plugin-sdk/cli` subpath (M32 F3b, D7): the types of the commands a plugin package adds
|
|
2
|
+
// to the `kardalum` CLI, and `defineCliCommands`, an identity helper that checks a commands object
|
|
3
|
+
// against them. Types only, plus that one function: nothing here imports React or a Node module at
|
|
4
|
+
// run time, so the commands module of a package can import it cheaply.
|
|
5
|
+
//
|
|
6
|
+
// A package declares its commands in its own package.json (`kardalum.cli`: `plugin`, `module` and
|
|
7
|
+
// `commands`, each with a `name` and a `summary`) and the module exports them as `commands`:
|
|
8
|
+
//
|
|
9
|
+
// import { defineCliCommands } from "@kardalum/plugin-sdk/cli";
|
|
10
|
+
// export const commands = defineCliCommands({
|
|
11
|
+
// audit: async (context) => {
|
|
12
|
+
// const client = await context.client();
|
|
13
|
+
// context.out("checked");
|
|
14
|
+
// },
|
|
15
|
+
// });
|
|
16
|
+
//
|
|
17
|
+
// The CLI runs `kardalum <prefix> <name> [arguments]`, where the prefix is the last segment of the
|
|
18
|
+
// plugin id. A command is code the developer installed: it runs with their rights.
|
|
19
|
+
/** Returns `commands` unchanged; it only checks each command against `PluginCliCommand`. */
|
|
20
|
+
export function defineCliCommands(commands) {
|
|
21
|
+
return commands;
|
|
22
|
+
}
|