@kardalum/plugin-sdk 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -0
- package/dist/admin-section-registry.d.ts +33 -1
- package/dist/admin-section-registry.js +67 -0
- package/dist/capabilities.js +46 -1
- package/dist/consent-entry.d.ts +11 -0
- package/dist/consent-entry.js +18 -0
- package/dist/content-library.d.ts +17 -0
- package/dist/content-list-extensions.d.ts +50 -0
- package/dist/content-list-extensions.js +11 -0
- package/dist/content-picker/page-picker-sheet.d.ts +2 -0
- package/dist/content-picker/page-picker-sheet.js +1 -1
- package/dist/content-picker/page-picker.d.ts +18 -0
- package/dist/content-picker/page-picker.js +20 -0
- package/dist/datatype-validation.js +10 -2
- package/dist/datatypes-entry.d.ts +1 -0
- package/dist/datatypes-entry.js +2 -0
- package/dist/entitlement-types.d.ts +18 -1
- package/dist/host-entry.d.ts +7 -1
- package/dist/host-entry.js +14 -1
- package/dist/index.d.ts +35 -7
- package/dist/index.js +46 -5
- package/dist/mail.d.ts +6 -2
- package/dist/manifest-entry.d.ts +22 -4
- package/dist/manifest-entry.js +25 -1
- package/dist/manifest-schema.d.ts +570 -31
- package/dist/manifest-schema.js +240 -12
- package/dist/manifest.d.ts +757 -32
- package/dist/manifest.js +8 -4
- package/dist/plugin-context.d.ts +47 -0
- package/dist/plugin-context.js +27 -0
- package/dist/plugin-permissions.d.ts +18 -0
- package/dist/plugin-permissions.js +25 -0
- package/dist/plugin-screen-context.d.ts +152 -11
- package/dist/plugin-screen-context.js +30 -0
- package/dist/providers.d.ts +47 -2
- package/dist/render-page.d.ts +15 -0
- package/dist/render-page.js +20 -0
- package/dist/richtext/block-panel.d.ts +12 -1
- package/dist/richtext/block-panel.js +27 -21
- package/dist/richtext/button-view.d.ts +11 -0
- package/dist/richtext/button-view.js +45 -0
- package/dist/richtext/content-guard.d.ts +4 -0
- package/dist/richtext/content-guard.js +27 -0
- package/dist/richtext/editor-handle.d.ts +34 -0
- package/dist/richtext/editor-handle.js +225 -0
- package/dist/richtext/extensions.d.ts +6 -0
- package/dist/richtext/extensions.js +16 -0
- package/dist/richtext/insert-menu.d.ts +6 -1
- package/dist/richtext/insert-menu.js +38 -18
- package/dist/richtext/item-attributes.d.ts +6 -0
- package/dist/richtext/item-attributes.js +19 -0
- package/dist/richtext/item-panel.d.ts +25 -0
- package/dist/richtext/item-panel.js +118 -0
- package/dist/richtext/item-view.d.ts +58 -0
- package/dist/richtext/item-view.js +172 -0
- package/dist/richtext/mark-form.d.ts +10 -0
- package/dist/richtext/mark-form.js +38 -0
- package/dist/richtext/paste-choice.d.ts +9 -0
- package/dist/richtext/paste-choice.js +13 -0
- package/dist/richtext/plugin-items.d.ts +72 -0
- package/dist/richtext/plugin-items.js +562 -0
- package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
- package/dist/richtext/plugin-mark-tooltips.js +44 -0
- package/dist/richtext/plugin-toolbar.d.ts +57 -0
- package/dist/richtext/plugin-toolbar.js +186 -0
- package/dist/richtext/rich-item-icons.d.ts +5 -0
- package/dist/richtext/rich-item-icons.js +42 -0
- package/dist/richtext/rich-items.d.ts +42 -0
- package/dist/richtext/rich-items.js +68 -0
- package/dist/richtext/rich-text-view-host.d.ts +24 -0
- package/dist/richtext/rich-text-view-host.js +11 -0
- package/dist/richtext/toolbar-button.d.ts +16 -0
- package/dist/richtext/toolbar-button.js +9 -0
- package/dist/richtext/url-paste.d.ts +20 -0
- package/dist/richtext/url-paste.js +82 -0
- package/dist/richtext-html-entry.d.ts +5 -0
- package/dist/richtext-html-entry.js +11 -0
- package/dist/sdk-strings.d.ts +59 -0
- package/dist/sdk-strings.js +64 -0
- package/dist/service-contract.d.ts +17 -0
- package/dist/service-contract.js +39 -0
- package/dist/services.d.ts +114 -0
- package/dist/services.js +1 -0
- package/dist/structured-storage-types.d.ts +124 -4
- package/dist/tailwind.js +10 -5
- package/dist/template-reads.d.ts +16 -0
- package/dist/template-reads.js +21 -0
- package/dist/testing-entry.d.ts +38 -0
- package/dist/testing-entry.js +173 -0
- package/dist/text-entry.d.ts +1 -1
- package/dist/text-entry.js +3 -2
- package/dist/tokens/system-dark.css +1 -0
- package/dist/tokens/tailwind-theme.css +2 -0
- package/dist/tokens/tokens.css +4 -0
- package/dist/tokens/tokens.json +5 -1
- package/dist/uploads.d.ts +43 -0
- package/dist/uploads.js +1 -0
- package/dist/user-library.d.ts +51 -0
- package/dist/user-library.js +15 -0
- package/dist/view-helpers.d.ts +18 -0
- package/dist/view-helpers.js +64 -0
- package/dist/views/content-list-view.js +207 -8
- package/dist/views/content-picker-view.js +1 -1
- package/dist/views/rich-text-view.d.ts +2 -0
- package/dist/views/rich-text-view.js +182 -24
- package/dist/views/unreadable-rich-text.d.ts +17 -0
- package/dist/views/unreadable-rich-text.js +40 -0
- package/dist/visitors.d.ts +81 -0
- package/dist/visitors.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +127 -8
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +82 -7
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +11 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +18 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +80 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +41 -2
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +50 -13
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +19 -10
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +37 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +52 -14
- package/node_modules/@kardalum/api-schemas/dist/index.js +53 -9
- package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +4 -2
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +6 -1
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +178 -2
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +51 -2
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +4 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +12 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +5 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +10 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +48 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +5 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +6 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +67 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +15 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +80 -15
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +67 -23
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +10 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +33 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +2 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +7 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +43 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +36 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +10 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +171 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +406 -42
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +303 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +66 -1
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +465 -7
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +15 -118
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +110 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +9 -2
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +7 -2
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +5 -3
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +3 -1
- package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +9 -1
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +4 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +6 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +5 -1
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +9 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +276 -19
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +21 -8
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +23 -10
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +30 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +6 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +24 -6
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +15 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +14 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +44 -11
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/index.js +5 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
- package/node_modules/@kardalum/plugin-package/package.json +4 -0
- package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
- package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/index.js +2 -0
- package/package.json +15 -3
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { PROVIDER_ID_MAX, PROVIDER_LABEL_MAX, PROVIDER_TABLE_FUNCTIONS, PROVIDERS_PER_KIND_MAX, isProviderId, isSignInStepKind, signInStepDeclarationProblems, signInStepFunctionsProblem, signInStepManifestProblems, } from "@kardalum/api-schemas";
|
|
2
|
+
import { providerTextProblem } from "./providers.js";
|
|
3
|
+
import { contributionsOf, failed, list, passed, plural, record } from "./support.js";
|
|
4
|
+
// M35 U3a (D5): the delivery check that runs right after the `Providers and secrets` check. It owns
|
|
5
|
+
// `signInSteps` whole: the `Providers and secrets` check skips that key. A step entry keeps to the provider table's count, id and label rules, its kind's functions (live as functions,
|
|
6
|
+
// in manifest.json as names in `functions`), a description of at most SIGN_IN_DESCRIPTION_MAX
|
|
7
|
+
// (signInStepDeclarationProblems), and a factor step's plugin declares sealedValues and structured
|
|
8
|
+
// storage. Names a field, never a value.
|
|
9
|
+
export const SIGN_IN_STEPS_CHECK_NAME = "sign-in steps";
|
|
10
|
+
/** Every function a step kind may have, read from the one definition in api-schemas. */
|
|
11
|
+
const STEP_FUNCTION_NAMES = [...PROVIDER_TABLE_FUNCTIONS.signInStep.required, ...PROVIDER_TABLE_FUNCTIONS.signInStep.optional];
|
|
12
|
+
function present(entry) {
|
|
13
|
+
const names = new Set();
|
|
14
|
+
for (const name of STEP_FUNCTION_NAMES) {
|
|
15
|
+
if (typeof entry[name] === "function" || (Array.isArray(entry.functions) && entry.functions.includes(name)))
|
|
16
|
+
names.add(name);
|
|
17
|
+
}
|
|
18
|
+
return names;
|
|
19
|
+
}
|
|
20
|
+
export const signInStepsCheck = {
|
|
21
|
+
name: SIGN_IN_STEPS_CHECK_NAME,
|
|
22
|
+
rule: `\`signInSteps\` lists at most ${PROVIDERS_PER_KIND_MAX} steps, each with an \`id\` of 1 to ${PROVIDER_ID_MAX} lower-case letters, digits and "-", ` +
|
|
23
|
+
`a \`label\` of at most ${PROVIDER_LABEL_MAX} characters, a \`kind\` of "factor" and the functions \`status\`, \`challenge\`, \`verify\`, ` +
|
|
24
|
+
"`setupBegin`, `setupFinish` and `setupRemove`; a plugin with a factor step declares `sealedValues` and structured storage. Experimental.",
|
|
25
|
+
gates: ["cli", "door"],
|
|
26
|
+
needsManifest: true,
|
|
27
|
+
run: ({ manifest }) => {
|
|
28
|
+
const steps = contributionsOf(manifest).signInSteps;
|
|
29
|
+
if (steps === undefined)
|
|
30
|
+
return passed("no sign-in steps declared");
|
|
31
|
+
if (!Array.isArray(steps))
|
|
32
|
+
return failed("contributions.signInSteps must be a list");
|
|
33
|
+
const issues = [];
|
|
34
|
+
if (steps.length > PROVIDERS_PER_KIND_MAX)
|
|
35
|
+
issues.push(`contributions.signInSteps holds ${steps.length} entries; at most ${PROVIDERS_PER_KIND_MAX} are allowed`);
|
|
36
|
+
const seen = new Set();
|
|
37
|
+
list(steps)
|
|
38
|
+
.slice(0, PROVIDERS_PER_KIND_MAX + 1)
|
|
39
|
+
.forEach((raw, index) => {
|
|
40
|
+
const where = `contributions.signInSteps[${index}]`;
|
|
41
|
+
const entry = record(raw);
|
|
42
|
+
if (entry === null)
|
|
43
|
+
return void issues.push(`${where} must be an object`);
|
|
44
|
+
if (typeof entry.id !== "string" || !isProviderId(entry.id))
|
|
45
|
+
issues.push(`${where}.id must be 1 to ${PROVIDER_ID_MAX} lower-case letters, digits and "-"`);
|
|
46
|
+
else if (seen.has(entry.id))
|
|
47
|
+
issues.push(`${where}.id is used twice`);
|
|
48
|
+
else
|
|
49
|
+
seen.add(entry.id);
|
|
50
|
+
if (entry.label === undefined)
|
|
51
|
+
issues.push(`${where}.label is required`);
|
|
52
|
+
else {
|
|
53
|
+
const problem = providerTextProblem(entry.label, PROVIDER_LABEL_MAX);
|
|
54
|
+
if (problem !== null)
|
|
55
|
+
issues.push(`${where}.label ${problem}`);
|
|
56
|
+
}
|
|
57
|
+
// The description is signInStepDeclarationProblems' (SIGN_IN_DESCRIPTION_MAX, 160), named once, as the
|
|
58
|
+
// providers check leaves a sign-in provider's description to signInDeclarationProblems.
|
|
59
|
+
issues.push(...signInStepDeclarationProblems(entry, where));
|
|
60
|
+
if (isSignInStepKind(entry.kind)) {
|
|
61
|
+
const problem = signInStepFunctionsProblem(entry.kind, present(entry));
|
|
62
|
+
if (problem !== null)
|
|
63
|
+
issues.push(`${where}: ${problem}`);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
issues.push(...signInStepManifestProblems(manifest));
|
|
67
|
+
if (issues.length > 0)
|
|
68
|
+
return failed(issues.join("; "));
|
|
69
|
+
return passed(`${plural(steps.length, "sign-in step")} (experimental: signInSteps)`);
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { HELD_EMBEDS_DECLARED_MAX, HELD_EMBED_PATH_PREFIX_MAX, PAGE_HEAD_SCRIPT_ORIGINS_MAX, SITE_ROUTES_MAX, TEMPLATE_EXTENSIONS_MAX, checkSiteExtensionDeclarations, listIssues, } from "@kardalum/api-schemas";
|
|
1
|
+
import { HELD_EMBEDS_DECLARED_MAX, HELD_EMBED_PATH_PREFIX_MAX, PAGE_HEAD_SCRIPT_ORIGINS_MAX, SITE_ROUTES_MAX, SITE_ROUTE_PARAMS_MAX, TEMPLATE_BLOCK_ON_FAILURE, TEMPLATE_EXTENSIONS_MAX, TEMPLATE_FILTER_ON_FAILURE, checkSiteExtensionDeclarations, experimentalPointsDeclared, listIssues, readSiteRoutePath, } from "@kardalum/api-schemas";
|
|
2
2
|
import { contributionsOf, failed, list, passed, record } from "./support.js";
|
|
3
|
+
/** The contribution keys this check reads, so its pass line names only their experimental points. */
|
|
4
|
+
const SITE_EXTENSION_KEYS = new Set(["siteRoutes", "siteFallback", "templateFilters", "templateTags", "pageHead", "heldEmbeds", "pageOutput", "requestGuard", "responseHeaders", "pageCache", "pageGate"]);
|
|
3
5
|
const count = (n, one, many) => `${n} ${n === 1 ? one : many}`;
|
|
4
6
|
// M32 F2: the rules the SDK's manifest schema runs, read here from manifest.json so the CLI and the
|
|
5
7
|
// marketplace door cannot disagree.
|
|
6
8
|
export const siteExtensionsCheck = {
|
|
7
9
|
name: "site extensions",
|
|
8
|
-
rule: `\`siteRoutes\` (at most ${SITE_ROUTES_MAX}) are
|
|
9
|
-
|
|
10
|
+
rule: `\`siteRoutes\` (at most ${SITE_ROUTES_MAX}) are GET or POST site addresses outside the server's own: a fixed path, a GET one holding a "." in some segment, answers before the pages; ` +
|
|
11
|
+
`a path with \`:name\` parameters (at most ${SITE_ROUTE_PARAMS_MAX}), a last \`*\` or no "." in a GET answers after the pages, its first segment a fixed name no other plugin's route starts with; ` +
|
|
12
|
+
`\`templateFilters\` and \`templateTags\` (at most ${TEMPLATE_EXTENSIONS_MAX} each) have lower-case names used as <the id's last segment>_<name>; a tag's \`block\` is \`true\` when given, ` +
|
|
13
|
+
`a filter's \`onFailure\` is one of ${TEMPLATE_FILTER_ON_FAILURE.join(", ")} and a block tag's one of ${TEMPLATE_BLOCK_ON_FAILURE.join(", ")}; ` +
|
|
10
14
|
`\`pageHead.scriptOrigins\` (at most ${PAGE_HEAD_SCRIPT_ORIGINS_MAX}) are bare https origins; ` +
|
|
15
|
+
`\`pageHead.inlineSnippets\` is \`true\` when declared; \`pageOutput\` is \`true\` or an object (its \`transform\` is code); ` +
|
|
16
|
+
`\`requestGuard\`, \`responseHeaders\`, \`pageGate\` and \`pageCache\` are \`true\` or an object (each is code); a site route's \`rawBody\` is \`true\` on a POST route; its \`uploads\` is a good declaration on a POST route without \`rawBody\`; ` +
|
|
11
17
|
`\`heldEmbeds\` (at most ${HELD_EMBEDS_DECLARED_MAX}) each name a bare https origin, a path prefix of at most ${HELD_EMBED_PATH_PREFIX_MAX} characters that starts and ends with "/", holds no "..", "%2e", "%2f" or "%5c" and is written as the URL parser writes it, a provider, an https privacy notice and a kind.`,
|
|
12
18
|
gates: ["cli", "door"],
|
|
13
19
|
needsManifest: true,
|
|
@@ -17,20 +23,47 @@ export const siteExtensionsCheck = {
|
|
|
17
23
|
return failed(`manifest.json declares its site extensions wrongly: ${listIssues(issues)}`);
|
|
18
24
|
const contributions = contributionsOf(manifest);
|
|
19
25
|
const parts = [];
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
|
|
26
|
+
const routeList = list(contributions.siteRoutes);
|
|
27
|
+
if (routeList.length > 0) {
|
|
28
|
+
const after = routeList.filter((route) => {
|
|
29
|
+
const entry = record(route);
|
|
30
|
+
if (entry === null || typeof entry.method !== "string" || typeof entry.path !== "string")
|
|
31
|
+
return false;
|
|
32
|
+
const read = readSiteRoutePath(entry.method, entry.path);
|
|
33
|
+
return read.ok && read.pattern.phase === "afterPages";
|
|
34
|
+
}).length;
|
|
35
|
+
parts.push(`${count(routeList.length, "site route", "site routes")}${after > 0 ? ` (${after} after the pages)` : ""}`);
|
|
36
|
+
}
|
|
23
37
|
if (contributions.siteFallback !== undefined)
|
|
24
38
|
parts.push("a fallback");
|
|
25
|
-
|
|
39
|
+
if (contributions.requestGuard !== undefined)
|
|
40
|
+
parts.push("a request guard");
|
|
41
|
+
if (contributions.responseHeaders !== undefined)
|
|
42
|
+
parts.push("response headers");
|
|
43
|
+
if (contributions.pageGate !== undefined)
|
|
44
|
+
parts.push("a page gate");
|
|
45
|
+
const tagList = list(contributions.templateTags);
|
|
46
|
+
const names = list(contributions.templateFilters).length + tagList.length;
|
|
47
|
+
const blocks = tagList.filter((tag) => record(tag)?.block === true).length;
|
|
26
48
|
if (names > 0)
|
|
27
|
-
parts.push(count(names, "template name", "template names"));
|
|
49
|
+
parts.push(`${count(names, "template name", "template names")}${blocks > 0 ? ` (${count(blocks, "block tag", "block tags")})` : ""}`);
|
|
28
50
|
const head = record(contributions.pageHead);
|
|
29
|
-
if (head !== null)
|
|
30
|
-
|
|
51
|
+
if (head !== null) {
|
|
52
|
+
const title = head.setsTitle === true ? " that sets the page title" : "";
|
|
53
|
+
const inline = head.inlineSnippets === true ? `${title === "" ? " that" : " and"} writes inline code` : "";
|
|
54
|
+
parts.push(`page head with ${count(list(head.scriptOrigins).length, "script origin", "script origins")}${title}${inline}`);
|
|
55
|
+
}
|
|
31
56
|
const held = list(contributions.heldEmbeds).length;
|
|
32
57
|
if (held > 0)
|
|
33
58
|
parts.push(count(held, "held embed", "held embeds"));
|
|
34
|
-
|
|
59
|
+
if (contributions.pageOutput !== undefined)
|
|
60
|
+
parts.push("a page output transform");
|
|
61
|
+
if (contributions.pageCache !== undefined)
|
|
62
|
+
parts.push("a page cache");
|
|
63
|
+
if (parts.length === 0)
|
|
64
|
+
return passed("no site extensions declared");
|
|
65
|
+
// M35 P1 (D4): the experimental points among these keys, so an author knows what may still change.
|
|
66
|
+
const experimental = experimentalPointsDeclared(manifest).filter((point) => SITE_EXTENSION_KEYS.has(point.split(".")[0]));
|
|
67
|
+
return passed(`${parts.join(", ")}${experimental.length > 0 ? ` (experimental: ${experimental.join(", ")})` : ""}`);
|
|
35
68
|
},
|
|
36
69
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RichTextVersionSummary } from "@kardalum/api-schemas";
|
|
1
2
|
import type { DocsContractInput } from "../docs-contract.js";
|
|
2
3
|
import type { ShippedSampleContent } from "../sample-content.js";
|
|
3
4
|
export type DeliveryGate = "cli" | "door";
|
|
@@ -44,6 +45,12 @@ export interface DeliveryContext {
|
|
|
44
45
|
dir: string;
|
|
45
46
|
buildError?: string;
|
|
46
47
|
};
|
|
48
|
+
/** M35 C4b (C4b-D13): the previous published version's rich text summary, which the door reads from its own store and
|
|
49
|
+
* `validate --online` from the listing; absent offline. `summary` is null for a version stored before summaries. */
|
|
50
|
+
previousRichText?: {
|
|
51
|
+
version: string;
|
|
52
|
+
summary: RichTextVersionSummary | null;
|
|
53
|
+
};
|
|
47
54
|
}
|
|
48
55
|
export interface DeliveryRunContext extends Omit<DeliveryContext, "manifest"> {
|
|
49
56
|
manifest: Record<string, unknown>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PLUGIN_USER_ACCESS_ACTIONS, PLUGIN_USER_FIELDS_MAX, checkUserAccessDeclarations, checkUserFieldsDeclarations, experimentalPointsDeclared, listIssues } from "@kardalum/api-schemas";
|
|
2
|
+
import { contributionsOf, failed, list, passed, plural, record } from "./support.js";
|
|
3
|
+
// M35 U1 (W6): the 43rd delivery check. `userAccess` and `userFields` are checked by the schemas the
|
|
4
|
+
// SDK's manifest schema runs (api-schemas). No CMS floor yet: the workspace is at the published
|
|
5
|
+
// 0.20.0, and the floor for every month 35 point comes with the next release's version bump (D8).
|
|
6
|
+
// The pass line names the experimental points the package declares.
|
|
7
|
+
export const USER_ACCOUNTS_CHECK_NAME = "user accounts";
|
|
8
|
+
export const userAccountsCheck = {
|
|
9
|
+
name: USER_ACCOUNTS_CHECK_NAME,
|
|
10
|
+
rule: `\`userAccess\` is an object whose \`actions\` names 1 or more of ${PLUGIN_USER_ACCESS_ACTIONS.map((a) => `\`${a}\``).join(", ")}, each once, \`users.update\` only with \`users.read\`; ` +
|
|
11
|
+
`\`userFields\` lists at most ${PLUGIN_USER_FIELDS_MAX} account fields of the plugin settings field types other than \`secret\`, each id once and none \`askAtInstall\`.`,
|
|
12
|
+
gates: ["cli", "door"],
|
|
13
|
+
needsManifest: true,
|
|
14
|
+
run: ({ manifest }) => {
|
|
15
|
+
const problems = [];
|
|
16
|
+
const access = checkUserAccessDeclarations(manifest);
|
|
17
|
+
const fields = checkUserFieldsDeclarations(manifest);
|
|
18
|
+
if (access.length > 0)
|
|
19
|
+
problems.push(`manifest.json declares its account access wrongly: ${listIssues(access)}`);
|
|
20
|
+
if (fields.length > 0)
|
|
21
|
+
problems.push(`manifest.json declares its account fields wrongly: ${listIssues(fields)}`);
|
|
22
|
+
if (problems.length > 0)
|
|
23
|
+
return failed(problems.join("; "));
|
|
24
|
+
const contributions = contributionsOf(manifest);
|
|
25
|
+
const accessDeclared = contributions.userAccess !== undefined;
|
|
26
|
+
const fieldsDeclared = contributions.userFields !== undefined;
|
|
27
|
+
if (!accessDeclared && !fieldsDeclared)
|
|
28
|
+
return passed("no account access or account fields declared");
|
|
29
|
+
const parts = [
|
|
30
|
+
...(accessDeclared ? [`account access: ${list(record(contributions.userAccess)?.actions).map(String).join(", ")}`] : []),
|
|
31
|
+
...(fieldsDeclared ? [plural(list(contributions.userFields).length, "account field")] : []),
|
|
32
|
+
];
|
|
33
|
+
const experimental = experimentalPointsDeclared(manifest).filter((point) => point === "userAccess" || point === "userFields");
|
|
34
|
+
return passed(`${parts.join("; ")}${experimental.length > 0 ? ` (experimental: ${experimental.join(", ")})` : ""}`);
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PLUGIN_VISITOR_ACCOUNT_SECTIONS_MAX, PLUGIN_VISITOR_GROUPS_MAX, VISITOR_POINTS_WITHOUT_DATA_WARNING, checkVisitorPointDeclarations, experimentalPointsDeclared, listIssues } from "@kardalum/api-schemas";
|
|
2
|
+
import { contributionsOf, failed, list, passed, plural, record, warning } from "./support.js";
|
|
3
|
+
// M35 U2b (W8, design 4.13): the visitor points, checked by the rules the SDK's manifest schema runs
|
|
4
|
+
// (api-schemas' checkVisitorPointDeclarations). The functions (`data`, `export`, `erase`) are the SDK's
|
|
5
|
+
// runtime check: manifest.json carries none. The pass line names the experimental points declared.
|
|
6
|
+
export const VISITOR_POINTS_CHECK_NAME = "visitor accounts";
|
|
7
|
+
const VISITOR_KEYS = ["visitorIdentity", "visitorGroups", "visitorAccountSections", "visitorData"];
|
|
8
|
+
export const visitorPointsCheck = {
|
|
9
|
+
name: VISITOR_POINTS_CHECK_NAME,
|
|
10
|
+
rule: `\`visitorGroups\` (1 to ${PLUGIN_VISITOR_GROUPS_MAX} groups), \`visitorAccountSections\` (1 to ${PLUGIN_VISITOR_ACCOUNT_SECTIONS_MAX} sections, each drawn with one of the plugin's own partial templates) and \`visitorData\` each need \`visitorIdentity\`; ` +
|
|
11
|
+
"an id is 1 to 40 of a-z, 0-9, `-` and `_`, a letter first, each once. `visitorIdentity` without `visitorData` warns: deletion and export reach only what a plugin declares.",
|
|
12
|
+
gates: ["cli", "door"],
|
|
13
|
+
needsManifest: true,
|
|
14
|
+
run: ({ manifest }) => {
|
|
15
|
+
const issues = checkVisitorPointDeclarations(manifest);
|
|
16
|
+
if (issues.length > 0)
|
|
17
|
+
return failed(`manifest.json declares its visitor points wrongly: ${listIssues(issues)}`);
|
|
18
|
+
const contributions = contributionsOf(manifest);
|
|
19
|
+
if (VISITOR_KEYS.every((key) => contributions[key] === undefined))
|
|
20
|
+
return passed("no visitor points declared");
|
|
21
|
+
if (contributions.visitorIdentity !== undefined && contributions.visitorData === undefined)
|
|
22
|
+
return warning(VISITOR_POINTS_WITHOUT_DATA_WARNING);
|
|
23
|
+
const identity = record(contributions.visitorIdentity);
|
|
24
|
+
const parts = [
|
|
25
|
+
...(contributions.visitorIdentity !== undefined ? [identity?.email === true ? "visitor identity with email" : "visitor identity"] : []),
|
|
26
|
+
...(contributions.visitorGroups !== undefined ? [plural(list(contributions.visitorGroups).length, "visitor group")] : []),
|
|
27
|
+
...(contributions.visitorAccountSections !== undefined ? [plural(list(contributions.visitorAccountSections).length, "account section")] : []),
|
|
28
|
+
...(contributions.visitorData !== undefined ? ["visitor data"] : []),
|
|
29
|
+
];
|
|
30
|
+
const experimental = experimentalPointsDeclared(manifest).filter((point) => VISITOR_KEYS.includes(point) || point.startsWith("hooks.visitor:"));
|
|
31
|
+
return passed(`${parts.join("; ")}${experimental.length > 0 ? ` (experimental: ${experimental.join(", ")})` : ""}`);
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -6,6 +6,7 @@ export { canonicalizeLicenseVerdict, canonicalizeLicenseVerdictEnd, canonicalize
|
|
|
6
6
|
export { VENDOR_TOKEN_LEEWAY_SECONDS, VENDOR_TOKEN_SIGNING_PREFIX, signVendorToken, verifyVendorToken } from "./vendor-token.js";
|
|
7
7
|
export type { VendorTokenFailure, VendorTokenVerifyResult } from "./vendor-token.js";
|
|
8
8
|
export { hashBuffer, hashArchive, hashDirectories } from "./hash.js";
|
|
9
|
+
export { contractDocumentFor, contractFingerprint, documentFingerprintHolds } from "./contract-fingerprint.js";
|
|
9
10
|
export type { AdmittedEntry, PlannedEntry } from "./extract.js";
|
|
10
11
|
export { createEntryGate, createPathKeyGate, decodeEntryName, ENTRY_NAME_MAX, ENTRY_SEGMENTS_MAX, entryViolation, extractArtifact, MAX_ENTRIES, MAX_ENTRY_BYTES, MAX_TOTAL_BYTES, normalizeEntryName, plannedEntryRefusal, } from "./extract.js";
|
|
11
12
|
export type { ShippedEntry } from "./shipped-files.js";
|
|
@@ -18,7 +19,10 @@ export { checkCoverContract, checkPackageContract, checkReadmeContract, COVER_HE
|
|
|
18
19
|
export type { DocsContractInput } from "./docs-contract.js";
|
|
19
20
|
export { capViolations, checkDocsContract, countRemoteImages, docsFilesToShip, MAX_PACKAGE_JSON_BYTES, MAX_VIOLATIONS, packageFilePath, readDocsContractInput } from "./docs-contract.js";
|
|
20
21
|
export { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle } from "./client-bundle.js";
|
|
22
|
+
export { richTextExtensionsSummary } from "./rich-text-summary.js";
|
|
23
|
+
export { isPublicSuffix, publicSuffixPasteHosts } from "./public-suffix.js";
|
|
21
24
|
export { resolvePluginManifestEntry } from "./manifest-entry.js";
|
|
25
|
+
export { registerStylesheetLoadHook } from "./stylesheet-load-hook.js";
|
|
22
26
|
export * from "./delivery/index.js";
|
|
23
27
|
export type { CmsRangeAgainstBuilt } from "./cms-range.js";
|
|
24
28
|
export { builtCmsRange, cmsRangeAgainstBuilt, cmsRangeAllows } from "./cms-range.js";
|
|
@@ -4,6 +4,8 @@ export { canonicalizeLicenseVerdict, canonicalizeLicenseVerdictEnd, canonicalize
|
|
|
4
4
|
// S320: the vendor token (spec 3a).
|
|
5
5
|
export { VENDOR_TOKEN_LEEWAY_SECONDS, VENDOR_TOKEN_SIGNING_PREFIX, signVendorToken, verifyVendorToken } from "./vendor-token.js";
|
|
6
6
|
export { hashBuffer, hashArchive, hashDirectories } from "./hash.js";
|
|
7
|
+
// M35 B1c (plan decision 3): a contract version's fingerprint and the one builder of its document.
|
|
8
|
+
export { contractDocumentFor, contractFingerprint, documentFingerprintHolds } from "./contract-fingerprint.js";
|
|
7
9
|
export { createEntryGate, createPathKeyGate, decodeEntryName, ENTRY_NAME_MAX, ENTRY_SEGMENTS_MAX, entryViolation, extractArtifact, MAX_ENTRIES, MAX_ENTRY_BYTES, MAX_TOTAL_BYTES, normalizeEntryName, plannedEntryRefusal, } from "./extract.js";
|
|
8
10
|
export { EXCLUDED_NAMES, createShippedLookup, isExcludedSegment, walkShipped, whyNotShipped } from "./shipped-files.js";
|
|
9
11
|
export { SAMPLE_CONTENT_MAX_BYTES, hasSampleContentConsumer, installFactsOf, readShippedInstallFacts, readShippedSampleContent } from "./sample-content.js";
|
|
@@ -11,6 +13,9 @@ export { MAX_SHIPPED_LOCALES, readShippedLocales } from "./shipped-locales.js";
|
|
|
11
13
|
export { checkCoverContract, checkPackageContract, checkReadmeContract, COVER_HEIGHT, COVER_PATH, COVER_WIDTH, pngSize, } from "./package-contract.js";
|
|
12
14
|
export { capViolations, checkDocsContract, countRemoteImages, docsFilesToShip, MAX_PACKAGE_JSON_BYTES, MAX_VIOLATIONS, packageFilePath, readDocsContractInput } from "./docs-contract.js";
|
|
13
15
|
export { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle } from "./client-bundle.js";
|
|
16
|
+
export { richTextExtensionsSummary } from "./rich-text-summary.js";
|
|
17
|
+
export { isPublicSuffix, publicSuffixPasteHosts } from "./public-suffix.js";
|
|
14
18
|
export { resolvePluginManifestEntry } from "./manifest-entry.js";
|
|
19
|
+
export { registerStylesheetLoadHook } from "./stylesheet-load-hook.js";
|
|
15
20
|
export * from "./delivery/index.js";
|
|
16
21
|
export { builtCmsRange, cmsRangeAgainstBuilt, cmsRangeAllows } from "./cms-range.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function isPublicSuffix(host: string): boolean;
|
|
2
|
+
/** Every `*.<rest>` host a node's fromUrl lists whose `<rest>` is a public suffix. Read defensively: the door runs it on
|
|
3
|
+
* a manifest.json it has not trusted yet. */
|
|
4
|
+
export declare function publicSuffixPasteHosts(richTextExtensions: unknown): Array<{
|
|
5
|
+
node: string;
|
|
6
|
+
host: string;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getPublicSuffix } from "tldts";
|
|
2
|
+
// M35 C4b (W9, design D17): whether a paste host's wildcard covers a public suffix, by the public suffix list tldts
|
|
3
|
+
// carries (pinned exactly in package.json). Both sections count, so github.io is a suffix as co.uk is. Read only by
|
|
4
|
+
// `kardalum plugin validate`, the marketplace door and the server's install; the editor never loads it.
|
|
5
|
+
export function isPublicSuffix(host) {
|
|
6
|
+
const suffix = getPublicSuffix(host, { allowPrivateDomains: true });
|
|
7
|
+
return suffix !== null && suffix === host;
|
|
8
|
+
}
|
|
9
|
+
/** Every `*.<rest>` host a node's fromUrl lists whose `<rest>` is a public suffix. Read defensively: the door runs it on
|
|
10
|
+
* a manifest.json it has not trusted yet. */
|
|
11
|
+
export function publicSuffixPasteHosts(richTextExtensions) {
|
|
12
|
+
const out = [];
|
|
13
|
+
const nodes = richTextExtensions !== null && typeof richTextExtensions === "object" ? richTextExtensions.nodes : undefined;
|
|
14
|
+
for (const raw of Array.isArray(nodes) ? nodes : []) {
|
|
15
|
+
const node = raw !== null && typeof raw === "object" ? raw : {};
|
|
16
|
+
const hosts = Array.isArray(node.fromUrl?.hosts) ? node.fromUrl.hosts : [];
|
|
17
|
+
for (const host of hosts) {
|
|
18
|
+
if (typeof host === "string" && host.startsWith("*.") && host.length <= 255 && isPublicSuffix(host.slice(2)))
|
|
19
|
+
out.push({ node: typeof node.name === "string" ? node.name : "", host });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return out;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function richTextExtensionsSummary(value: unknown): unknown;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// M35 C4b (C4b-D1): a rich text declaration in manifest.json's form: plain JSON (a JSON round trip drops every function,
|
|
2
|
+
// a node's validate and every view among them) with `hasView: true` where a node, a mark or a button's `does` carried a
|
|
3
|
+
// view. The CLI's manifest writer and the server's declaration index both call it, so the two sides of an install read
|
|
4
|
+
// one shape. Pure data, no node: import.
|
|
5
|
+
const entries = (value) => (Array.isArray(value) ? value : []);
|
|
6
|
+
const isEntry = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
7
|
+
export function richTextExtensionsSummary(value) {
|
|
8
|
+
if (!isEntry(value))
|
|
9
|
+
return value;
|
|
10
|
+
const plain = JSON.parse(JSON.stringify(value));
|
|
11
|
+
const mark = (key) => {
|
|
12
|
+
entries(value[key]).forEach((live, index) => {
|
|
13
|
+
const written = entries(plain[key])[index];
|
|
14
|
+
if (isEntry(live) && typeof live.view === "function" && isEntry(written))
|
|
15
|
+
written.hasView = true;
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
mark("nodes");
|
|
19
|
+
mark("marks");
|
|
20
|
+
entries(value.buttons).forEach((live, index) => {
|
|
21
|
+
const written = entries(plain.buttons)[index];
|
|
22
|
+
const does = isEntry(live) && isEntry(live.does) ? live.does : null;
|
|
23
|
+
if (does && typeof does.view === "function" && isEntry(written) && isEntry(written.does))
|
|
24
|
+
written.does.hasView = true;
|
|
25
|
+
});
|
|
26
|
+
return plain;
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { register } from "node:module";
|
|
2
|
+
// M35 C3 (design D4): a view ships its styles as a CSS file it imports (`import './view.css'`), which
|
|
3
|
+
// Vite bundles and `kardalum plugin build` wraps in the plugin's layer. Loading a plugin's manifest in
|
|
4
|
+
// Node (`kardalum plugin validate`, and `kardalum dev start`'s sandbox registration) runs the manifest
|
|
5
|
+
// module's whole graph, views included, and Node has no loader for `.css`: it fails "Unknown file
|
|
6
|
+
// extension .css". A stylesheet means nothing to the manifest, so every `.css` URL loads as an empty
|
|
7
|
+
// module (a default export too, for `import styles from './x.css'`).
|
|
8
|
+
//
|
|
9
|
+
// One registration per process. tsx's hooks pass a `.css` URL on down the chain to this one, whichever
|
|
10
|
+
// namespace they serve, and a hook registered after tsx's runs before them, so either order works.
|
|
11
|
+
// module.register is the off-thread hooks API of the pinned Node 22 line; later Node lines deprecate it
|
|
12
|
+
// for module.registerHooks, and the Node upgrade moves this one call.
|
|
13
|
+
const STYLESHEET_HOOKS = [
|
|
14
|
+
"export async function load(url, context, nextLoad) {",
|
|
15
|
+
' if (new URL(url).pathname.toLowerCase().endsWith(".css")) {',
|
|
16
|
+
' return { format: "module", source: "export default {};", shortCircuit: true };',
|
|
17
|
+
" }",
|
|
18
|
+
" return nextLoad(url, context);",
|
|
19
|
+
"}",
|
|
20
|
+
].join("\n");
|
|
21
|
+
let registered = false;
|
|
22
|
+
/** Makes every `.css` import in this process load as an empty module, once. */
|
|
23
|
+
export function registerStylesheetLoadHook() {
|
|
24
|
+
if (registered)
|
|
25
|
+
return;
|
|
26
|
+
register(`data:text/javascript,${encodeURIComponent(STYLESHEET_HOOKS)}`, import.meta.url);
|
|
27
|
+
registered = true;
|
|
28
|
+
}
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://kardalum.com",
|
|
37
37
|
"peerDependencies": {
|
|
38
|
+
"postcss": "8.5.26",
|
|
39
|
+
"tldts": "7.4.19",
|
|
38
40
|
"yauzl": "3.4.0"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
@@ -42,6 +44,8 @@
|
|
|
42
44
|
"@types/yauzl": "^3.4.0",
|
|
43
45
|
"@types/yazl": "^3.3.1",
|
|
44
46
|
"lucide-react": "1.38.0",
|
|
47
|
+
"postcss": "8.5.26",
|
|
48
|
+
"tldts": "7.4.19",
|
|
45
49
|
"typescript": "6.0.3",
|
|
46
50
|
"vitest": "4.1.12",
|
|
47
51
|
"yauzl": "3.4.0",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** @experimental */
|
|
3
|
+
export type SelectProps = React.ComponentProps<'select'>;
|
|
4
|
+
/** M35 C3 (W25): a native select with the admin's look. @experimental */
|
|
5
|
+
declare function Select({ className, children, ...props }: SelectProps): React.JSX.Element;
|
|
6
|
+
export { Select };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../lib/cn.js';
|
|
3
|
+
/** M35 C3 (W25): a native select with the admin's look. @experimental */
|
|
4
|
+
function Select({ className, children, ...props }) {
|
|
5
|
+
return (_jsxs("div", { "data-slot": "select-wrapper", className: cn('relative w-full', className), children: [_jsx("select", { "data-slot": "select", className: cn('flex h-10 w-full appearance-none rounded-md border border-border-strong bg-background-elevated py-2 ps-3 pe-10 text-sm text-text-primary transition-colors duration-fast focus-visible:border-primary-600 focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-primary-50 disabled:cursor-not-allowed disabled:opacity-50'), ...props, children: children }), _jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute inset-y-0 end-3 flex items-center text-text-secondary", children: _jsx("svg", { viewBox: "0 0 24 24", className: "size-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "m6 9 6 6 6-6" }) }) })] }));
|
|
6
|
+
}
|
|
7
|
+
export { Select };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** @experimental */
|
|
3
|
+
export type TextareaProps = React.ComponentProps<'textarea'>;
|
|
4
|
+
/** M35 C3 (W25): a native text area with the admin's look. @experimental */
|
|
5
|
+
declare function Textarea({ className, ...props }: TextareaProps): React.JSX.Element;
|
|
6
|
+
export { Textarea };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../lib/cn.js';
|
|
3
|
+
/** M35 C3 (W25): a native text area with the admin's look. @experimental */
|
|
4
|
+
function Textarea({ className, ...props }) {
|
|
5
|
+
return (_jsx("textarea", { "data-slot": "textarea", className: cn('flex min-h-20 w-full rounded-md border border-border-strong bg-background-elevated px-3 py-2 text-sm text-text-primary placeholder:text-text-tertiary transition-colors duration-fast focus-visible:border-primary-600 focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-primary-50 disabled:cursor-not-allowed disabled:opacity-50', className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
export { Textarea };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { Button, buttonVariants, type ButtonProps } from './components/button.js';
|
|
2
2
|
export { Input, type InputProps } from './components/input.js';
|
|
3
|
+
export { Select, type SelectProps } from './components/select.js';
|
|
4
|
+
export { Textarea, type TextareaProps } from './components/textarea.js';
|
|
3
5
|
export { Checkbox, type CheckboxProps } from './components/checkbox.js';
|
|
4
6
|
export { Switch, type SwitchProps } from './components/switch.js';
|
|
5
7
|
export { Panel, type PanelProps } from './components/panel.js';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { Button, buttonVariants } from './components/button.js';
|
|
2
2
|
export { Input } from './components/input.js';
|
|
3
|
+
export { Select } from './components/select.js';
|
|
4
|
+
export { Textarea } from './components/textarea.js';
|
|
3
5
|
export { Checkbox } from './components/checkbox.js';
|
|
4
6
|
export { Switch } from './components/switch.js';
|
|
5
7
|
export { Panel } from './components/panel.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kardalum/plugin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "The SDK for building Kardalum plugins: manifest declaration, data type and admin section registries, storage-value providers, and shared UI components.",
|
|
6
6
|
"engines": {
|
|
@@ -55,6 +55,11 @@
|
|
|
55
55
|
"import": "./dist/text-entry.js",
|
|
56
56
|
"default": "./dist/text-entry.js"
|
|
57
57
|
},
|
|
58
|
+
"./consent": {
|
|
59
|
+
"types": "./dist/consent-entry.d.ts",
|
|
60
|
+
"import": "./dist/consent-entry.js",
|
|
61
|
+
"default": "./dist/consent-entry.js"
|
|
62
|
+
},
|
|
58
63
|
"./ui": {
|
|
59
64
|
"types": "./dist/ui-entry.d.ts",
|
|
60
65
|
"import": "./dist/ui-entry.js",
|
|
@@ -70,6 +75,11 @@
|
|
|
70
75
|
"import": "./dist/entitlement-entry.js",
|
|
71
76
|
"default": "./dist/entitlement-entry.js"
|
|
72
77
|
},
|
|
78
|
+
"./testing": {
|
|
79
|
+
"types": "./dist/testing-entry.d.ts",
|
|
80
|
+
"import": "./dist/testing-entry.js",
|
|
81
|
+
"default": "./dist/testing-entry.js"
|
|
82
|
+
},
|
|
73
83
|
"./cli": {
|
|
74
84
|
"types": "./dist/cli.d.ts",
|
|
75
85
|
"import": "./dist/cli.js",
|
|
@@ -135,13 +145,15 @@
|
|
|
135
145
|
"clsx": "2.1.1",
|
|
136
146
|
"happy-dom": "21.0.4",
|
|
137
147
|
"lucide-react": "1.38.0",
|
|
148
|
+
"postcss": "8.5.26",
|
|
138
149
|
"tailwind-merge": "3.6.0",
|
|
150
|
+
"tldts": "7.4.19",
|
|
139
151
|
"yauzl": "3.4.0",
|
|
140
152
|
"zod": "4.6.6",
|
|
141
153
|
"@kardalum/api-schemas": "0.14.0",
|
|
142
|
-
"@kardalum/design-tokens": "0.14.0",
|
|
143
154
|
"@kardalum/plugin-package": "0.14.0",
|
|
144
|
-
"@kardalum/ui": "0.14.0"
|
|
155
|
+
"@kardalum/ui": "0.14.0",
|
|
156
|
+
"@kardalum/design-tokens": "0.14.0"
|
|
145
157
|
},
|
|
146
158
|
"peerDependencies": {
|
|
147
159
|
"react": "^19.0.0",
|