@cosmicdrift/kumiko-bundled-features 0.368.0 → 0.370.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/dist/account-security/constants.d.ts +4 -0
- package/dist/account-security/constants.js +5 -0
- package/dist/account-security/feature.d.ts +14 -0
- package/dist/account-security/feature.js +62 -0
- package/dist/account-security/i18n.d.ts +6 -0
- package/dist/account-security/i18n.js +6 -0
- package/dist/account-security/index.d.ts +3 -0
- package/dist/account-security/index.js +3 -0
- package/dist/admin-shell/feature.d.ts +1 -1
- package/dist/admin-shell/index.d.ts +4 -4
- package/dist/admin-shell/overview-panels.d.ts +1 -1
- package/dist/admin-shell/web/index.d.ts +1 -1
- package/dist/agent-tools/agent-manifest.d.ts +1 -1
- package/dist/agent-tools/index.d.ts +8 -8
- package/dist/agent-tools/manifest-deny-qns.d.ts +1 -1
- package/dist/agent-tools/tool-catalog.d.ts +1 -1
- package/dist/agent-tools/tool-dispatch.d.ts +1 -1
- package/dist/audit/handlers/resolve-audit-tenant.d.ts +1 -1
- package/dist/audit/index.d.ts +3 -3
- package/dist/audit/web/index.d.ts +1 -1
- package/dist/auth-email-password/bootstrap.d.ts +1 -1
- package/dist/auth-email-password/feature.d.ts +7 -6
- package/dist/auth-email-password/feature.js +3 -1
- package/dist/auth-email-password/handlers/confirm-token-flow.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-accept-with-login.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.d.ts +2 -2
- package/dist/auth-email-password/handlers/invite-signup-complete.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/login.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-account-unlock.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-email-verification.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-password-reset.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/signup-confirm.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/signup-request.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/switch-tenant-mfa-gate.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/token-request-handler.d.ts +2 -2
- package/dist/auth-email-password/index.d.ts +13 -13
- package/dist/auth-email-password/lockout-store.d.ts +1 -1
- package/dist/auth-email-password/magic-link-mail.d.ts +1 -1
- package/dist/auth-email-password/seeding.d.ts +3 -3
- package/dist/auth-email-password/signed-token.d.ts +1 -1
- package/dist/auth-email-password/signup-token-store.d.ts +1 -1
- package/dist/auth-email-password/testing.d.ts +1 -1
- package/dist/auth-email-password/web/auth-gate.d.ts +1 -1
- package/dist/auth-email-password/web/client-plugin.d.ts +2 -2
- package/dist/auth-email-password/web/index.d.ts +42 -42
- package/dist/auth-email-password/web/session-bootstrap-error.d.ts +1 -1
- package/dist/auth-email-password/web/session.d.ts +1 -1
- package/dist/auth-email-password/web/signup-complete-screen.d.ts +1 -1
- package/dist/auth-foundation/feature.d.ts +2 -6
- package/dist/auth-foundation/feature.js +0 -2
- package/dist/auth-foundation/index.d.ts +3 -3
- package/dist/auth-foundation/index.js +1 -1
- package/dist/auth-foundation/resolve-anonymous-access.d.ts +1 -1
- package/dist/auth-mfa/env.d.ts +13 -0
- package/dist/auth-mfa/env.js +24 -0
- package/dist/auth-mfa/errors.d.ts +1 -1
- package/dist/auth-mfa/feature-exports.d.ts +12 -0
- package/dist/auth-mfa/feature-exports.js +72 -0
- package/dist/auth-mfa/feature.d.ts +6 -12
- package/dist/auth-mfa/feature.js +53 -70
- package/dist/auth-mfa/handlers/reencrypt.job.d.ts +1 -1
- package/dist/auth-mfa/index.d.ts +12 -9
- package/dist/auth-mfa/index.js +4 -2
- package/dist/auth-mfa/mfa-challenge-token.d.ts +1 -1
- package/dist/auth-mfa/mfa-preauth-setup-token.d.ts +1 -1
- package/dist/auth-mfa/mfa-status-checker.d.ts +1 -1
- package/dist/auth-mfa/mfa-verify-attempts.d.ts +1 -1
- package/dist/auth-mfa/testing.d.ts +1 -1
- package/dist/auth-mfa/token-secrets.d.ts +7 -0
- package/dist/auth-mfa/token-secrets.js +13 -0
- package/dist/auth-mfa/verify-factor.d.ts +1 -1
- package/dist/auth-mfa/web/index.d.ts +15 -15
- package/dist/auth-mfa/web/mfa-client.d.ts +1 -1
- package/dist/auth-mfa-user-data/index.d.ts +0 -4
- package/dist/auth-mfa-user-data/index.js +0 -2
- package/dist/billing-foundation/checkout-core.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/confirmation-mail.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/consent-gate.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/consent-text.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/issue-confirmation.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/register-consent.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/register-termination.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/termination-mail.d.ts +3 -3
- package/dist/billing-foundation/consumer-protection/termination-notify.d.ts +5 -5
- package/dist/billing-foundation/consumer-protection/termination-pages.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/termination-record.d.ts +3 -3
- package/dist/billing-foundation/consumer-protection/termination-request.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/termination-texts.d.ts +2 -2
- package/dist/billing-foundation/feature.d.ts +1 -3
- package/dist/billing-foundation/feature.js +0 -2
- package/dist/billing-foundation/handlers/billing-plans.query.d.ts +1 -1
- package/dist/billing-foundation/handlers/create-checkout-session.write.d.ts +1 -1
- package/dist/billing-foundation/handlers/create-portal-session.write.d.ts +1 -1
- package/dist/billing-foundation/handlers/start-plan-checkout.write.d.ts +1 -1
- package/dist/billing-foundation/handlers/switch-plan.write.d.ts +1 -1
- package/dist/billing-foundation/index.d.ts +16 -16
- package/dist/billing-foundation/index.js +1 -1
- package/dist/billing-foundation/plan-catalog.d.ts +1 -1
- package/dist/billing-foundation/subscription-tier-sync.d.ts +3 -1
- package/dist/billing-foundation/subscription-tier-sync.js +3 -2
- package/dist/billing-foundation/types.d.ts +3 -3
- package/dist/billing-foundation/validate-options.d.ts +1 -1
- package/dist/billing-foundation/web/checkout-consent-dialog.d.ts +1 -1
- package/dist/billing-foundation/web/index.d.ts +6 -6
- package/dist/cap-counter/calendar-cap-usage-reservation.d.ts +4 -4
- package/dist/cap-counter/cap-reservation.d.ts +1 -1
- package/dist/cap-counter/enforce-cap.d.ts +1 -1
- package/dist/cap-counter/feature.d.ts +0 -4
- package/dist/cap-counter/feature.js +0 -2
- package/dist/cap-counter/index.d.ts +13 -13
- package/dist/cap-counter/index.js +1 -1
- package/dist/cap-counter/value-cap-guard.d.ts +1 -1
- package/dist/cap-counter/with-cap-enforcement.d.ts +1 -1
- package/dist/cap-overview/feature.d.ts +1 -1
- package/dist/cap-overview/handlers/caps-usage.query.d.ts +1 -1
- package/dist/cap-overview/handlers/tenant-caps-list.query.d.ts +1 -1
- package/dist/cap-overview/index.d.ts +6 -6
- package/dist/cap-overview/screens.d.ts +1 -1
- package/dist/cap-overview/types.d.ts +1 -1
- package/dist/cap-overview/usage-math.d.ts +1 -1
- package/dist/cap-overview/web/cap-usage-bar.d.ts +1 -1
- package/dist/cap-overview/web/index.d.ts +4 -4
- package/dist/channel-discord/discord-channel.d.ts +1 -1
- package/dist/channel-discord/feature.d.ts +1 -1
- package/dist/channel-discord/index.d.ts +2 -2
- package/dist/channel-email/email-channel.d.ts +15 -7
- package/dist/channel-email/email-channel.js +17 -3
- package/dist/channel-email/env.d.ts +14 -0
- package/dist/channel-email/env.js +27 -0
- package/dist/channel-email/feature.d.ts +14 -3
- package/dist/channel-email/feature.js +6 -2
- package/dist/channel-email/index.d.ts +6 -5
- package/dist/channel-email/index.js +2 -1
- package/dist/channel-email/pii-guard.d.ts +1 -1
- package/dist/channel-email/smtp-transport.d.ts +1 -1
- package/dist/channel-email/types.d.ts +1 -1
- package/dist/channel-in-app/in-app-channel.d.ts +1 -1
- package/dist/channel-in-app/index.d.ts +4 -4
- package/dist/channel-push/feature.d.ts +1 -1
- package/dist/channel-push/index.d.ts +3 -3
- package/dist/channel-push/push-channel.d.ts +2 -2
- package/dist/channel-slack/feature.d.ts +1 -1
- package/dist/channel-slack/index.d.ts +2 -2
- package/dist/channel-slack/slack-channel.d.ts +1 -1
- package/dist/channel-teams/feature.d.ts +1 -1
- package/dist/channel-teams/index.d.ts +2 -2
- package/dist/channel-teams/teams-channel.d.ts +1 -1
- package/dist/channel-telegram/feature.d.ts +1 -1
- package/dist/channel-telegram/index.d.ts +2 -2
- package/dist/channel-telegram/telegram-channel.d.ts +1 -1
- package/dist/compliance-profiles/feature.d.ts +1 -1
- package/dist/compliance-profiles/index.d.ts +3 -3
- package/dist/compliance-profiles/web/index.d.ts +2 -2
- package/dist/compliance-profiles-ops/index.d.ts +0 -8
- package/dist/compliance-profiles-ops/index.js +0 -2
- package/dist/config/feature.d.ts +1 -1
- package/dist/config/handlers/reencrypt.job.d.ts +1 -1
- package/dist/config/index.d.ts +8 -8
- package/dist/config/web/client-plugin.d.ts +1 -1
- package/dist/config/web/i18n.js +1 -2
- package/dist/config/web/index.d.ts +2 -2
- package/dist/crypto-shredding/env/index.d.ts +21 -0
- package/dist/crypto-shredding/env/index.js +78 -0
- package/dist/crypto-shredding/feature.d.ts +17 -2
- package/dist/crypto-shredding/feature.js +5 -1
- package/dist/crypto-shredding/index.d.ts +4 -3
- package/dist/crypto-shredding/index.js +1 -0
- package/dist/custom-fields/feature.d.ts +0 -17
- package/dist/custom-fields/feature.js +0 -2
- package/dist/custom-fields/index.d.ts +10 -10
- package/dist/custom-fields/index.js +1 -1
- package/dist/custom-fields/lib/define-or-resurrect.d.ts +2 -2
- package/dist/custom-fields/lib/field-access.d.ts +1 -1
- package/dist/custom-fields/lib/field-definition-row.d.ts +1 -1
- package/dist/custom-fields/lib/quota.d.ts +1 -1
- package/dist/custom-fields/web/index.d.ts +3 -3
- package/dist/data-retention/_internal/parse-override.d.ts +1 -1
- package/dist/data-retention/feature.d.ts +7 -7
- package/dist/data-retention/handlers/policy-for.query.d.ts +1 -1
- package/dist/data-retention/index.d.ts +3 -3
- package/dist/data-retention/resolve-for-tenant.d.ts +2 -2
- package/dist/data-retention/resolve-tenant-preset.d.ts +1 -1
- package/dist/data-retention/resolver.d.ts +1 -1
- package/dist/data-retention/run-retention-cleanup.d.ts +2 -2
- package/dist/delivery/attachment-ref.d.ts +1 -1
- package/dist/delivery/attempt-log.d.ts +1 -1
- package/dist/delivery/channel-context.d.ts +2 -2
- package/dist/delivery/chat-webhook-channel.d.ts +2 -2
- package/dist/delivery/constants.d.ts +1 -1
- package/dist/delivery/delivery-service.d.ts +2 -2
- package/dist/delivery/feature.js +3 -1
- package/dist/delivery/handlers/log.query.d.ts +1 -1
- package/dist/delivery/handlers/unsubscribe-page-chrome.query.d.ts +5 -0
- package/dist/delivery/handlers/unsubscribe-page-chrome.query.js +44 -0
- package/dist/delivery/index.d.ts +20 -19
- package/dist/delivery/index.js +3 -2
- package/dist/delivery/notify-factory.d.ts +1 -1
- package/dist/delivery/public-names.d.ts +1 -0
- package/dist/delivery/public-names.js +1 -0
- package/dist/delivery/testing.d.ts +3 -3
- package/dist/delivery/types.d.ts +3 -3
- package/dist/delivery/unsubscribe-link.d.ts +1 -1
- package/dist/delivery/unsubscribe-page-strings.d.ts +4 -0
- package/dist/delivery/unsubscribe-page-strings.js +4 -0
- package/dist/delivery/unsubscribe-page.d.ts +27 -0
- package/dist/delivery/unsubscribe-page.js +192 -0
- package/dist/delivery/unsubscribe.d.ts +22 -1
- package/dist/delivery/unsubscribe.js +152 -65
- package/dist/delivery/web/index.d.ts +2 -2
- package/dist/derivatives-sharp/feature.d.ts +0 -4
- package/dist/derivatives-sharp/feature.js +0 -2
- package/dist/derivatives-sharp/index.d.ts +2 -2
- package/dist/derivatives-sharp/index.js +1 -1
- package/dist/document-ingest-foundation/feature.d.ts +0 -7
- package/dist/document-ingest-foundation/feature.js +0 -2
- package/dist/document-ingest-foundation/index.d.ts +7 -7
- package/dist/document-ingest-foundation/index.js +1 -1
- package/dist/document-ingest-foundation/pages.d.ts +1 -1
- package/dist/document-ingest-foundation/providers.d.ts +1 -1
- package/dist/document-ingest-foundation/write-document-extract.d.ts +1 -1
- package/dist/feature-toggles/compose-tier-resolver.d.ts +1 -1
- package/dist/feature-toggles/feature.d.ts +5 -5
- package/dist/feature-toggles/handlers/set.write.d.ts +1 -1
- package/dist/feature-toggles/index.d.ts +3 -3
- package/dist/feature-toggles/toggle-sync-signal.d.ts +1 -1
- package/dist/feature-toggles/web/index.d.ts +1 -1
- package/dist/file-derivatives/feature.d.ts +0 -2
- package/dist/file-derivatives/feature.js +0 -2
- package/dist/file-derivatives/index.d.ts +4 -4
- package/dist/file-derivatives/index.js +1 -1
- package/dist/file-foundation/feature.d.ts +0 -6
- package/dist/file-foundation/feature.js +0 -2
- package/dist/file-foundation/index.d.ts +2 -2
- package/dist/file-foundation/index.js +1 -1
- package/dist/file-provider-inmemory/feature.d.ts +0 -4
- package/dist/file-provider-inmemory/feature.js +0 -2
- package/dist/file-provider-inmemory/index.d.ts +1 -1
- package/dist/file-provider-inmemory/index.js +1 -1
- package/dist/file-provider-s3/env-feature.d.ts +12 -2
- package/dist/file-provider-s3/env-feature.js +9 -6
- package/dist/file-provider-s3/env-schema.d.ts +38 -0
- package/dist/file-provider-s3/env-schema.js +51 -0
- package/dist/file-provider-s3/feature.d.ts +1 -14
- package/dist/file-provider-s3/feature.js +0 -2
- package/dist/file-provider-s3/index.d.ts +2 -1
- package/dist/file-provider-s3/index.js +2 -1
- package/dist/file-provider-s3/lib/env-helper.d.ts +1 -1
- package/dist/file-provider-s3/lib/index.d.ts +3 -3
- package/dist/files/index.d.ts +1 -1
- package/dist/files-tenant-data/index.d.ts +2 -2
- package/dist/folders/feature.d.ts +0 -4
- package/dist/folders/feature.js +0 -2
- package/dist/folders/index.d.ts +7 -7
- package/dist/folders/index.js +1 -1
- package/dist/folders/web/folder-manager.d.ts +1 -1
- package/dist/folders/web/index.d.ts +5 -5
- package/dist/folders-user-data/index.d.ts +0 -4
- package/dist/folders-user-data/index.js +0 -2
- package/dist/form-draft/db/queries/cleanup.d.ts +1 -1
- package/dist/form-draft/feature.d.ts +0 -4
- package/dist/form-draft/feature.js +0 -2
- package/dist/form-draft/handlers/cleanup.job.d.ts +1 -1
- package/dist/form-draft/handlers/get.query.d.ts +1 -1
- package/dist/form-draft/index.d.ts +10 -10
- package/dist/form-draft/index.js +1 -1
- package/dist/form-draft/lookup.d.ts +1 -1
- package/dist/form-draft/release-file-refs.d.ts +1 -1
- package/dist/form-draft-user-data/index.d.ts +0 -4
- package/dist/form-draft-user-data/index.js +0 -2
- package/dist/foundation-shared/build-info-env.d.ts +7 -0
- package/dist/foundation-shared/build-info-env.js +15 -0
- package/dist/foundation-shared/demo-admin-env.d.ts +12 -0
- package/dist/foundation-shared/demo-admin-env.js +21 -0
- package/dist/foundation-shared/index.d.ts +5 -3
- package/dist/foundation-shared/index.js +2 -0
- package/dist/host-routing/constants.d.ts +8 -0
- package/dist/host-routing/constants.js +19 -0
- package/dist/host-routing/dispatch.d.ts +24 -0
- package/dist/host-routing/dispatch.js +102 -0
- package/dist/host-routing/feature.d.ts +3 -0
- package/dist/host-routing/feature.js +102 -0
- package/dist/host-routing/host.d.ts +14 -0
- package/dist/host-routing/host.js +37 -0
- package/dist/host-routing/index.d.ts +5 -0
- package/dist/host-routing/index.js +4 -0
- package/dist/host-routing/options.d.ts +27 -0
- package/dist/host-routing/options.js +1 -0
- package/dist/host-routing/validate-options.d.ts +2 -0
- package/dist/host-routing/validate-options.js +29 -0
- package/dist/inbound-mail-foundation/connect-routes.d.ts +2 -2
- package/dist/inbound-mail-foundation/feature.d.ts +0 -4
- package/dist/inbound-mail-foundation/feature.js +0 -2
- package/dist/inbound-mail-foundation/handlers/account-state.d.ts +1 -1
- package/dist/inbound-mail-foundation/index.d.ts +12 -12
- package/dist/inbound-mail-foundation/index.js +1 -1
- package/dist/inbound-mail-foundation/oauth-access-token.d.ts +1 -1
- package/dist/inbound-mail-foundation/provider-factory.d.ts +1 -1
- package/dist/inbound-mail-foundation/types.d.ts +1 -1
- package/dist/inbound-mail-foundation/watch-supervisor.d.ts +2 -2
- package/dist/inbound-provider-imap/feature.d.ts +1 -5
- package/dist/inbound-provider-imap/feature.js +0 -2
- package/dist/inbound-provider-imap/imap-client.d.ts +1 -1
- package/dist/inbound-provider-imap/index.d.ts +3 -3
- package/dist/inbound-provider-imap/index.js +1 -1
- package/dist/inbound-provider-inmemory/feature.d.ts +0 -4
- package/dist/inbound-provider-inmemory/feature.js +0 -2
- package/dist/inbound-provider-inmemory/index.d.ts +1 -1
- package/dist/inbound-provider-inmemory/index.js +1 -1
- package/dist/jobs/handlers/tenant-runs.query.d.ts +1 -1
- package/dist/jobs/index.d.ts +9 -9
- package/dist/jobs/web/index.d.ts +1 -1
- package/dist/ledger/feature.d.ts +0 -4
- package/dist/ledger/feature.js +0 -2
- package/dist/ledger/index.d.ts +10 -10
- package/dist/ledger/index.js +1 -1
- package/dist/ledger/recurring.d.ts +2 -2
- package/dist/ledger/reports.d.ts +2 -2
- package/dist/ledger/web/index.d.ts +3 -3
- package/dist/legal-pages/constants.d.ts +12 -0
- package/dist/legal-pages/constants.js +16 -0
- package/dist/legal-pages/feature.d.ts +6 -3
- package/dist/legal-pages/feature.js +5 -2
- package/dist/legal-pages/index.d.ts +5 -3
- package/dist/legal-pages/index.js +3 -1
- package/dist/legal-pages/layout.d.ts +10 -0
- package/dist/legal-pages/layout.js +32 -0
- package/dist/legal-pages/lib/boot-check.d.ts +1 -1
- package/dist/legal-pages/lib/validate-routes.d.ts +1 -1
- package/dist/legal-pages/markdown.d.ts +2 -2
- package/dist/legal-pages/seed.d.ts +12 -0
- package/dist/legal-pages/seed.js +38 -0
- package/dist/legal-pages/web/index.d.ts +1 -1
- package/dist/mail-foundation/feature.d.ts +4 -7
- package/dist/mail-foundation/feature.js +16 -14
- package/dist/mail-foundation/i18n.d.ts +14 -0
- package/dist/mail-foundation/i18n.js +8 -0
- package/dist/mail-foundation/index.d.ts +1 -1
- package/dist/mail-foundation/index.js +1 -1
- package/dist/mail-transport-inmemory/feature.d.ts +0 -4
- package/dist/mail-transport-inmemory/feature.js +6 -2
- package/dist/mail-transport-inmemory/index.d.ts +1 -1
- package/dist/mail-transport-inmemory/index.js +1 -1
- package/dist/mail-transport-smtp/config-keys.d.ts +7 -0
- package/dist/mail-transport-smtp/config-keys.js +65 -0
- package/dist/mail-transport-smtp/feature.d.ts +0 -16
- package/dist/mail-transport-smtp/feature.js +5 -35
- package/dist/mail-transport-smtp/i18n.d.ts +41 -0
- package/dist/mail-transport-smtp/i18n.js +28 -0
- package/dist/mail-transport-smtp/index.d.ts +1 -1
- package/dist/mail-transport-smtp/index.js +1 -1
- package/dist/managed-pages/branding.d.ts +1 -1
- package/dist/managed-pages/feature.d.ts +1 -1
- package/dist/managed-pages/handlers/branding.query.d.ts +1 -1
- package/dist/managed-pages/index.d.ts +5 -5
- package/dist/managed-pages/web/index.d.ts +2 -2
- package/dist/metrics/compute.d.ts +2 -2
- package/dist/metrics/default-metrics.d.ts +9 -9
- package/dist/metrics/feature.d.ts +1 -1
- package/dist/metrics/filters.d.ts +1 -1
- package/dist/metrics/index.d.ts +5 -5
- package/dist/metrics/types.d.ts +1 -1
- package/dist/metrics/validate.d.ts +1 -1
- package/dist/metrics/window.d.ts +2 -2
- package/dist/notes-history/feature.d.ts +0 -4
- package/dist/notes-history/feature.js +0 -2
- package/dist/notes-history/handlers/add-note.write.d.ts +1 -1
- package/dist/notes-history/index.d.ts +6 -6
- package/dist/notes-history/index.js +1 -1
- package/dist/notes-history/web/index.d.ts +3 -3
- package/dist/notes-history-user-data/index.d.ts +1 -5
- package/dist/notes-history-user-data/index.js +0 -2
- package/dist/page-render/index.d.ts +7 -7
- package/dist/page-render/layout.d.ts +1 -1
- package/dist/page-render/web.d.ts +5 -5
- package/dist/personal-access-tokens/feature.d.ts +3 -3
- package/dist/personal-access-tokens/handlers/available-scopes.query.d.ts +1 -1
- package/dist/personal-access-tokens/i18n.d.ts +1 -1
- package/dist/personal-access-tokens/index.d.ts +13 -13
- package/dist/personal-access-tokens/resolver.d.ts +1 -1
- package/dist/personal-access-tokens/screens.d.ts +1 -1
- package/dist/presets/dsgvo-self-service.d.ts +3 -1
- package/dist/presets/dsgvo-self-service.js +2 -0
- package/dist/presets/index.d.ts +2 -2
- package/dist/presets/security-baseline.d.ts +2 -0
- package/dist/presets/security-baseline.js +2 -0
- package/dist/rate-limiting/index.d.ts +2 -2
- package/dist/readiness/feature.d.ts +0 -8
- package/dist/readiness/feature.js +0 -2
- package/dist/readiness/index.d.ts +3 -3
- package/dist/readiness/index.js +1 -1
- package/dist/renderer-foundation/api.d.ts +2 -2
- package/dist/renderer-foundation/constants.d.ts +2 -2
- package/dist/renderer-foundation/feature.d.ts +1 -1
- package/dist/renderer-foundation/index.d.ts +5 -5
- package/dist/renderer-foundation/types.d.ts +24 -2
- package/dist/renderer-pdf/feature.d.ts +1 -1
- package/dist/renderer-pdf/index.d.ts +2 -2
- package/dist/renderer-pdf/render-table-pdf.d.ts +1 -1
- package/dist/secrets/constants.d.ts +7 -0
- package/dist/secrets/constants.js +7 -0
- package/dist/secrets/db/queries/read.d.ts +1 -1
- package/dist/secrets/feature.d.ts +5 -3
- package/dist/secrets/feature.js +19 -5
- package/dist/secrets/handlers/delete.write.js +4 -3
- package/dist/secrets/handlers/rotate.job.d.ts +1 -1
- package/dist/secrets/handlers/set.write.js +4 -3
- package/dist/secrets/index.d.ts +7 -7
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/secrets-context.d.ts +1 -1
- package/dist/seo/feature.d.ts +3 -3
- package/dist/seo/index.d.ts +6 -6
- package/dist/sessions/feature.d.ts +1 -1
- package/dist/sessions/index.d.ts +8 -8
- package/dist/sessions/session-callbacks.d.ts +1 -1
- package/dist/sessions/testing.d.ts +1 -1
- package/dist/shared/index.d.ts +31 -31
- package/dist/step-dispatcher/dispatch-payload.d.ts +2 -2
- package/dist/step-dispatcher/index.d.ts +3 -3
- package/dist/subscription-mollie/feature.d.ts +2 -2
- package/dist/subscription-mollie/index.d.ts +3 -3
- package/dist/subscription-mollie/verify-webhook.d.ts +1 -1
- package/dist/subscription-stripe/feature.d.ts +17 -1
- package/dist/subscription-stripe/feature.js +19 -1
- package/dist/subscription-stripe/index.d.ts +2 -2
- package/dist/subscription-stripe/index.js +1 -1
- package/dist/subscription-stripe/plugin-methods.d.ts +1 -1
- package/dist/subscription-stripe/verify-webhook.d.ts +1 -1
- package/dist/tags/feature.d.ts +0 -4
- package/dist/tags/feature.js +0 -2
- package/dist/tags/handlers/assign-tag.write.d.ts +1 -1
- package/dist/tags/handlers/remove-tag.write.d.ts +1 -1
- package/dist/tags/index.d.ts +11 -11
- package/dist/tags/index.js +1 -1
- package/dist/tags/web/index.d.ts +9 -9
- package/dist/template-resolver/api.d.ts +4 -4
- package/dist/template-resolver/constants.d.ts +1 -2
- package/dist/template-resolver/constants.js +0 -1
- package/dist/template-resolver/document-sanitizer.d.ts +1 -1
- package/dist/template-resolver/handlers/bundle-import.d.ts +3 -3
- package/dist/template-resolver/handlers/collection-shared.d.ts +2 -2
- package/dist/template-resolver/handlers/copy-locale.write.d.ts +1 -1
- package/dist/template-resolver/handlers/diff-to-system.query.d.ts +1 -1
- package/dist/template-resolver/handlers/find-by-id.query.d.ts +1 -1
- package/dist/template-resolver/handlers/import-bundle-system.write.d.ts +1 -1
- package/dist/template-resolver/handlers/import-bundle.write.d.ts +1 -1
- package/dist/template-resolver/handlers/layout-source.query.d.ts +3 -3
- package/dist/template-resolver/handlers/override-diff.d.ts +2 -2
- package/dist/template-resolver/handlers/overview.query.d.ts +3 -3
- package/dist/template-resolver/handlers/preview.query.d.ts +1 -1
- package/dist/template-resolver/handlers/resource-link-pdf.write.d.ts +1 -1
- package/dist/template-resolver/handlers/resource-upload.write.d.ts +1 -1
- package/dist/template-resolver/handlers/send-test.write.d.ts +1 -1
- package/dist/template-resolver/handlers/send-test.write.js +4 -2
- package/dist/template-resolver/handlers/shared.d.ts +1 -1
- package/dist/template-resolver/handlers/template-gates.d.ts +4 -4
- package/dist/template-resolver/handlers/template-write.d.ts +4 -4
- package/dist/template-resolver/handlers/tenant-overrides.query.d.ts +1 -1
- package/dist/template-resolver/handlers/toggle-status.write.d.ts +1 -1
- package/dist/template-resolver/handlers/upsert-system.write.d.ts +1 -1
- package/dist/template-resolver/handlers/upsert-tenant.write.d.ts +1 -1
- package/dist/template-resolver/handlers/usage.query.d.ts +1 -1
- package/dist/template-resolver/handlers/validate.query.d.ts +3 -3
- package/dist/template-resolver/index.d.ts +25 -25
- package/dist/template-resolver/layout-appearance.d.ts +1 -1
- package/dist/template-resolver/layout-regions.d.ts +2 -2
- package/dist/template-resolver/linked-resources.d.ts +1 -1
- package/dist/template-resolver/preview-display-html.d.ts +1 -1
- package/dist/template-resolver/resource-image.d.ts +1 -1
- package/dist/template-resolver/seeding.d.ts +2 -2
- package/dist/template-resolver/store-template-resource.d.ts +1 -1
- package/dist/template-resolver/template-draft.d.ts +2 -2
- package/dist/template-resolver/template-meta.d.ts +2 -2
- package/dist/template-resolver/template-preview.d.ts +7 -6
- package/dist/template-resolver/template-preview.js +19 -12
- package/dist/template-resolver/template-resources.d.ts +1 -1
- package/dist/template-resolver/template-usage.d.ts +3 -1
- package/dist/template-resolver/template-usage.js +1 -0
- package/dist/template-resolver/template-validation.d.ts +1 -1
- package/dist/template-resolver/testing.d.ts +1 -1
- package/dist/template-resolver/user-content-table.d.ts +1 -1
- package/dist/template-resolver/web/document-editor-extensions.d.ts +1 -1
- package/dist/template-resolver/web/document-editor-extensions.js +6 -2
- package/dist/template-resolver/web/document-editor.d.ts +1 -1
- package/dist/template-resolver/web/document-tiptap-editor.d.ts +1 -1
- package/dist/template-resolver/web/document-tiptap-editor.js +13 -10
- package/dist/template-resolver/web/editor-handle.d.ts +1 -1
- package/dist/template-resolver/web/index.d.ts +7 -7
- package/dist/template-resolver/web/placeholder-line-editor-lazy.d.ts +2 -2
- package/dist/template-resolver/web/placeholder-line-editor.d.ts +1 -1
- package/dist/template-resolver-user-data/index.d.ts +0 -4
- package/dist/template-resolver-user-data/index.js +0 -2
- package/dist/tenant/feature.d.ts +1 -1
- package/dist/tenant/index.d.ts +10 -10
- package/dist/tenant/is-tenant-serving-public-content.d.ts +1 -1
- package/dist/tenant/testing.d.ts +1 -1
- package/dist/tenant/web/index.d.ts +3 -3
- package/dist/tenant-handover/feature.d.ts +1 -1
- package/dist/tenant-handover/index.d.ts +3 -3
- package/dist/tenant-handover/signup-handover-provider.d.ts +1 -1
- package/dist/tenant-lifecycle/feature.d.ts +2 -2
- package/dist/tenant-lifecycle/index.d.ts +3 -3
- package/dist/tenant-lifecycle/run-tenant-destroy.d.ts +1 -1
- package/dist/tenant-lifecycle/stages.d.ts +1 -1
- package/dist/tenant-lifecycle/testing.d.ts +1 -1
- package/dist/tenant-settings/feature.d.ts +1 -3
- package/dist/tenant-settings/feature.js +0 -2
- package/dist/tenant-settings/index.d.ts +4 -4
- package/dist/tenant-settings/index.js +1 -1
- package/dist/tier-engine/entity.d.ts +1 -1
- package/dist/tier-engine/feature.d.ts +2 -4
- package/dist/tier-engine/feature.js +0 -2
- package/dist/tier-engine/handlers/get-tenant-tier.query.d.ts +1 -1
- package/dist/tier-engine/i18n.d.ts +0 -2
- package/dist/tier-engine/i18n.js +4 -4
- package/dist/tier-engine/index.d.ts +8 -8
- package/dist/tier-engine/index.js +1 -1
- package/dist/tier-engine/tier-option-gate.d.ts +1 -1
- package/dist/tier-engine/tier-resolver.d.ts +1 -1
- package/dist/tier-engine/web/client-plugin.js +3 -2
- package/dist/tier-engine/web/index.d.ts +1 -1
- package/dist/user/index.d.ts +8 -8
- package/dist/user/invited-global-roles.d.ts +1 -1
- package/dist/user/principal-status.d.ts +1 -1
- package/dist/user/seeding.d.ts +1 -1
- package/dist/user/testing.d.ts +1 -1
- package/dist/user-data-rights/deletion-token.d.ts +1 -1
- package/dist/user-data-rights/feature.d.ts +5 -5
- package/dist/user-data-rights/feature.js +7 -4
- package/dist/user-data-rights/handlers/request-deletion.write.d.ts +1 -1
- package/dist/user-data-rights/handlers/run-forget-cleanup.write.d.ts +3 -3
- package/dist/user-data-rights/index.d.ts +13 -13
- package/dist/user-data-rights/lib/default-mailers.d.ts +7 -4
- package/dist/user-data-rights/lib/default-mailers.js +25 -3
- package/dist/user-data-rights/web/client-plugin.d.ts +1 -1
- package/dist/user-data-rights/web/index.d.ts +8 -8
- package/dist/user-data-rights-defaults/index.d.ts +11 -11
- package/dist/user-profile/index.d.ts +2 -2
- package/dist/user-profile/web/index.d.ts +2 -2
- package/dist/waitlist/constants.d.ts +9 -0
- package/dist/waitlist/constants.js +11 -0
- package/dist/waitlist/entity.d.ts +38 -6
- package/dist/waitlist/entity.js +4 -2
- package/dist/waitlist/entries-admin.d.ts +4 -0
- package/dist/waitlist/entries-admin.js +42 -0
- package/dist/waitlist/feature.d.ts +1 -1
- package/dist/waitlist/feature.js +16 -1
- package/dist/waitlist/handlers/export-purge.write.d.ts +12 -0
- package/dist/waitlist/handlers/export-purge.write.js +61 -0
- package/dist/waitlist/handlers/invite.write.d.ts +1 -1
- package/dist/waitlist/handlers/submit.write.d.ts +1 -1
- package/dist/waitlist/i18n.js +4 -0
- package/dist/waitlist/import.d.ts +24 -0
- package/dist/waitlist/import.js +51 -0
- package/dist/waitlist/index.d.ts +7 -5
- package/dist/waitlist/index.js +2 -0
- package/dist/waitlist/legacy-migrate.d.ts +27 -0
- package/dist/waitlist/legacy-migrate.js +173 -0
- package/dist/waitlist/lib.d.ts +2 -2
- package/dist/waitlist/link-on-signup.d.ts +3 -0
- package/dist/waitlist/link-on-signup.js +83 -0
- package/dist/waitlist/options.d.ts +11 -3
- package/dist/waitlist/payloads.d.ts +3 -0
- package/dist/waitlist/payloads.js +1 -0
- package/dist/workflow-runner/feature.d.ts +0 -4
- package/dist/workflow-runner/feature.js +0 -2
- package/dist/workflow-runner/index.d.ts +4 -4
- package/dist/workflow-runner/index.js +1 -1
- package/package.json +43 -27
- package/src/account-security/changes.json +8 -0
- package/src/auth-email-password/changes.json +6 -0
- package/src/auth-foundation/changes.json +8 -0
- package/src/auth-mfa/changes.json +6 -0
- package/src/auth-mfa-user-data/changes.json +10 -1
- package/src/billing-foundation/changes.json +8 -0
- package/src/cap-counter/changes.json +8 -0
- package/src/channel-email/changes.json +13 -0
- package/src/compliance-profiles-ops/changes.json +10 -0
- package/src/crypto-shredding/changes.json +6 -0
- package/src/custom-fields/changes.json +8 -0
- package/src/delivery/changes.json +12 -0
- package/src/derivatives-sharp/changes.json +8 -0
- package/src/document-ingest-foundation/changes.json +8 -0
- package/src/file-derivatives/changes.json +8 -0
- package/src/file-foundation/changes.json +8 -0
- package/src/file-provider-inmemory/changes.json +10 -1
- package/src/file-provider-s3/changes.json +22 -0
- package/src/folders/changes.json +8 -0
- package/src/folders-user-data/changes.json +10 -1
- package/src/form-draft/changes.json +8 -0
- package/src/form-draft-user-data/changes.json +10 -1
- package/src/foundation-shared/changes.json +8 -1
- package/src/host-routing/changes.json +8 -0
- package/src/inbound-mail-foundation/changes.json +8 -0
- package/src/inbound-provider-imap/changes.json +8 -0
- package/src/inbound-provider-inmemory/changes.json +10 -1
- package/src/ledger/changes.json +8 -0
- package/src/legal-pages/changes.json +6 -0
- package/src/mail-foundation/changes.json +10 -1
- package/src/mail-transport-inmemory/changes.json +10 -1
- package/src/mail-transport-smtp/changes.json +15 -0
- package/src/notes-history/changes.json +8 -0
- package/src/notes-history-user-data/changes.json +8 -0
- package/src/presets/changes.json +6 -0
- package/src/readiness/changes.json +10 -1
- package/src/secrets/changes.json +18 -0
- package/src/subscription-stripe/changes.json +6 -0
- package/src/tags/changes.json +8 -0
- package/src/template-resolver/changes.json +6 -0
- package/src/template-resolver-user-data/changes.json +10 -0
- package/src/tenant-settings/changes.json +10 -1
- package/src/tier-engine/changes.json +8 -0
- package/src/user-data-rights/changes.json +6 -0
- package/src/waitlist/changes.json +7 -0
- package/src/workflow-runner/changes.json +8 -0
- package/dist/file-provider-s3-env/index.d.ts +0 -8
- package/dist/file-provider-s3-env/index.js +0 -7
- package/dist/files-provider-s3/index.d.ts +0 -5
- package/dist/files-provider-s3/index.js +0 -5
- package/src/file-provider-s3-env/changes.json +0 -1
- package/src/files-provider-s3/changes.json +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { selectMany } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { NotFoundError, UnprocessableError, ValidationError, } from "@cosmicdrift/kumiko-framework/errors";
|
|
3
3
|
import { fileRefsTable } from "@cosmicdrift/kumiko-framework/files";
|
|
4
|
+
import { createI18n } from "@cosmicdrift/kumiko-framework/i18n";
|
|
4
5
|
import { escapeHtml } from "@cosmicdrift/kumiko-headless";
|
|
5
6
|
import { createEmailAttachmentReader, createTemplateMailRenderer } from "../delivery/index.js";
|
|
6
7
|
import { fileContextForTenant } from "../file-foundation/index.js";
|
|
@@ -19,14 +20,15 @@ import { isMailTemplateMeta, parseTemplateMeta, readPdfTemplateMeta, } from "./t
|
|
|
19
20
|
const SAMPLE_LINK = "https://example.com";
|
|
20
21
|
const SAMPLE_DATE = "2026-01-15";
|
|
21
22
|
const SAMPLE_LIST_ROWS = 3;
|
|
22
|
-
function sampleScalar(name, def) {
|
|
23
|
+
function sampleScalar(name, def, labelText) {
|
|
23
24
|
if (def.example !== undefined)
|
|
24
25
|
return def.example;
|
|
26
|
+
const label = def.label === undefined ? name : labelText(def.label);
|
|
25
27
|
switch (def.type) {
|
|
26
28
|
case "text":
|
|
27
|
-
return `[${
|
|
29
|
+
return `[${label}]`;
|
|
28
30
|
case "richText":
|
|
29
|
-
return `<p>[${escapeHtml(
|
|
31
|
+
return `<p>[${escapeHtml(label)}]</p>`;
|
|
30
32
|
case "link":
|
|
31
33
|
return SAMPLE_LINK;
|
|
32
34
|
case "money":
|
|
@@ -37,28 +39,33 @@ function sampleScalar(name, def) {
|
|
|
37
39
|
return 0;
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
|
-
function sampleRow(item, given = {}) {
|
|
42
|
+
function sampleRow(item, labelText, given = {}) {
|
|
41
43
|
const row = {};
|
|
42
44
|
for (const [name, def] of Object.entries(item))
|
|
43
|
-
row[name] = sampleScalar(name, def);
|
|
45
|
+
row[name] = sampleScalar(name, def, labelText);
|
|
44
46
|
return { ...row, ...given };
|
|
45
47
|
}
|
|
46
|
-
function sampleList(def) {
|
|
48
|
+
function sampleList(def, labelText) {
|
|
47
49
|
const rows = (def.example ?? [])
|
|
48
50
|
.slice(0, SAMPLE_LIST_ROWS)
|
|
49
|
-
.map((given) => sampleRow(def.item, given));
|
|
51
|
+
.map((given) => sampleRow(def.item, labelText, given));
|
|
50
52
|
while (rows.length < SAMPLE_LIST_ROWS)
|
|
51
|
-
rows.push(sampleRow(def.item));
|
|
53
|
+
rows.push(sampleRow(def.item, labelText));
|
|
52
54
|
return rows;
|
|
53
55
|
}
|
|
54
56
|
// Declared examples win; the fallbacks are deterministic so a preview never differs between calls.
|
|
55
|
-
export function sampleValuesFor(variables) {
|
|
57
|
+
export function sampleValuesFor(variables, labelText = (label) => label) {
|
|
56
58
|
const values = {};
|
|
57
59
|
for (const [name, def] of Object.entries(variables)) {
|
|
58
|
-
values[name] =
|
|
60
|
+
values[name] =
|
|
61
|
+
def.type === "list" ? sampleList(def, labelText) : sampleScalar(name, def, labelText);
|
|
59
62
|
}
|
|
60
63
|
return values;
|
|
61
64
|
}
|
|
65
|
+
function labelTextFor(ctx, locale) {
|
|
66
|
+
const i18n = createI18n(ctx.registry, { defaultLocale: "en" });
|
|
67
|
+
return (label) => i18n.t(label, locale);
|
|
68
|
+
}
|
|
62
69
|
const utf8Bytes = (value) => new TextEncoder().encode(value).length;
|
|
63
70
|
const failed = (error) => ({ ok: false, error });
|
|
64
71
|
async function loadStoredDraft(ctx, user, input) {
|
|
@@ -286,7 +293,7 @@ export async function evaluateDocumentDraft(ctx, user, scope, draft) {
|
|
|
286
293
|
content: evaluation.content ?? "",
|
|
287
294
|
meta: meta.ok ? readPdfTemplateMeta(meta.meta) : null,
|
|
288
295
|
variableSchema: draft.variableSchema,
|
|
289
|
-
sampleValues: sampleValuesFor(response.variables),
|
|
296
|
+
sampleValues: sampleValuesFor(response.variables, labelTextFor(ctx, draft.locale)),
|
|
290
297
|
};
|
|
291
298
|
}
|
|
292
299
|
// The posted draft when it carries content, else the stored template; null when none is stored.
|
|
@@ -397,7 +404,7 @@ export async function renderTemplatePreview(ctx, user, input) {
|
|
|
397
404
|
return failed(new ValidationError({ fields: [...evaluation.issues] }));
|
|
398
405
|
const content = evaluation.content ?? "";
|
|
399
406
|
const meta = parseTemplateMeta(input.kind, parseStoredJson(evaluation.metaJson));
|
|
400
|
-
const sampleValues = sampleValuesFor(validation.variables);
|
|
407
|
+
const sampleValues = sampleValuesFor(validation.variables, labelTextFor(ctx, input.locale));
|
|
401
408
|
if (input.kind === "document-pdf") {
|
|
402
409
|
return renderDocumentPreview(ctx, user, {
|
|
403
410
|
input,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HandlerContext, SessionUser, TenantId, WriteResult } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import type { LinkedResourceEntry } from "./linked-resources.
|
|
2
|
+
import type { LinkedResourceEntry } from "./linked-resources.ts";
|
|
3
3
|
export type TemplateResourceFile = {
|
|
4
4
|
readonly fileName: string;
|
|
5
5
|
readonly contentType: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Registry } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import { type TemplateKind } from "./constants.
|
|
2
|
+
import { type TemplateKind } from "./constants.ts";
|
|
3
3
|
type UsageRole = "template" | "layout";
|
|
4
4
|
export type TemplateUsageEntry = {
|
|
5
5
|
readonly qualifiedName: string;
|
|
@@ -7,6 +7,8 @@ export type TemplateUsageEntry = {
|
|
|
7
7
|
readonly notification: string;
|
|
8
8
|
readonly trigger: string | null;
|
|
9
9
|
readonly role: UsageRole;
|
|
10
|
+
/** The mail goes through the tenant's own transport when it has a provider. */
|
|
11
|
+
readonly tenantTransport: boolean;
|
|
10
12
|
};
|
|
11
13
|
/** Layout slug of the effective stored mail template, by notification qualified
|
|
12
14
|
* name and locale. The renderer reads the layout from the stored row's meta,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Registry, TemplateVariables } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import type { TemplateMeta } from "./template-meta.
|
|
2
|
+
import type { TemplateMeta } from "./template-meta.ts";
|
|
3
3
|
export declare const SYSTEM_PLACEHOLDERS: ReadonlySet<string>;
|
|
4
4
|
export declare function systemPlaceholdersFor(kind: string): ReadonlySet<string>;
|
|
5
5
|
export type TemplateValidation = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
2
|
-
import type { ResolveRequest, TemplateResource } from "./api.
|
|
2
|
+
import type { ResolveRequest, TemplateResource } from "./api.ts";
|
|
3
3
|
export type TemplateConsumer = {
|
|
4
4
|
readonly resolve: (args: ResolveRequest) => Promise<TemplateResource>;
|
|
5
5
|
readonly resolveResources?: (template: TemplateResource) => Promise<Record<string, string>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Extensions, NodeViewRenderer } from "@tiptap/core";
|
|
2
|
-
import type { DocumentResourcePreview } from "./document-toolbar-blocks.
|
|
2
|
+
import type { DocumentResourcePreview } from "./document-toolbar-blocks.ts";
|
|
3
3
|
export declare const DOCUMENT_BLOCK_ATTRIBUTE = "data-document-block";
|
|
4
4
|
export type DocumentEditorLabels = {
|
|
5
5
|
readonly placeholder: string;
|
|
@@ -36,8 +36,12 @@ export function createVariableView(variableLabels, systemVariables, labelOnly =
|
|
|
36
36
|
const label = Object.hasOwn(variableLabels, labelKey) ? variableLabels[labelKey] : undefined;
|
|
37
37
|
const dom = createElementWithClass("span", systemVariables.includes(name) ? SYSTEM_CHIP_CLASS : USER_CHIP_CLASS);
|
|
38
38
|
dom.contentEditable = "false";
|
|
39
|
-
dom.
|
|
40
|
-
|
|
39
|
+
dom.setAttribute("data-variable-chip", "");
|
|
40
|
+
const hasOwnLabel = label !== undefined && label !== "" && label !== name;
|
|
41
|
+
dom.append(document.createTextNode(hasOwnLabel ? label : name));
|
|
42
|
+
if (hasOwnLabel)
|
|
43
|
+
dom.title = name;
|
|
44
|
+
if (!labelOnly && hasOwnLabel) {
|
|
41
45
|
dom.append(createElementWithClass("small", "font-mono text-[10px] opacity-75", name));
|
|
42
46
|
}
|
|
43
47
|
return { dom };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { DocumentEditorProps, DocumentToolbarBlock } from "./document-toolbar-blocks.
|
|
2
|
+
import type { DocumentEditorProps, DocumentToolbarBlock } from "./document-toolbar-blocks.ts";
|
|
3
3
|
export declare const DocumentBlocksContext: import("react").Context<readonly DocumentToolbarBlock[] | undefined>;
|
|
4
4
|
export declare function DocumentContentEditor(props: DocumentEditorProps): ReactNode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type DocumentEditorProps } from "./document-toolbar-blocks.
|
|
2
|
+
import { type DocumentEditorProps } from "./document-toolbar-blocks.ts";
|
|
3
3
|
export default function DocumentTiptapEditor({ id, value, onChange, variables, readOnly, blocks, variableLabels, systemVariables, resourcePreviews, chrome, toolbar, renderPaper, toolbarHost, onEditorReady, }: DocumentEditorProps): ReactNode;
|
|
@@ -94,11 +94,12 @@ function toggleRepeatHeader(editor) {
|
|
|
94
94
|
const PARAGRAPH_STYLES = ["paragraph", "1", "2", "3"];
|
|
95
95
|
const HEADING_LEVELS = { "1": 1, "2": 2, "3": 3 };
|
|
96
96
|
const PLACEHOLDER_HREF = /^\{\{([^{}]+)\}\}$/;
|
|
97
|
+
function variableLabelOf(name, labels) {
|
|
98
|
+
return Object.hasOwn(labels, name) ? (labels[name] ?? name) : name;
|
|
99
|
+
}
|
|
97
100
|
function buttonTargetLabel(href, labels) {
|
|
98
101
|
const name = PLACEHOLDER_HREF.exec(href)?.[1];
|
|
99
|
-
|
|
100
|
-
return href;
|
|
101
|
-
return Object.hasOwn(labels, name) ? (labels[name] ?? name) : name;
|
|
102
|
+
return name === undefined ? href : variableLabelOf(name, labels);
|
|
102
103
|
}
|
|
103
104
|
// The bubble menu registers its plugin once per mount, so a rebuilt editor needs a fresh mount.
|
|
104
105
|
const editorMountKeys = new WeakMap();
|
|
@@ -173,11 +174,11 @@ function PanelActions({ onInsert, onRemoveLink, onCancel, }) {
|
|
|
173
174
|
const t = useTranslation();
|
|
174
175
|
return (_jsxs("div", { className: "flex gap-2", children: [onInsert && (_jsx(Button, { type: "button", size: "sm", onClick: onInsert, children: t("template-resolver.documentEditor.insert") })), onRemoveLink && (_jsx(Button, { type: "button", size: "sm", variant: "danger-ghost", onClick: onRemoveLink, children: t("template-resolver.documentEditor.removeLink") })), _jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: onCancel, children: t("template-resolver.documentEditor.cancel") })] }));
|
|
175
176
|
}
|
|
176
|
-
function NameSelect({ id, label, names, value, onChange }) {
|
|
177
|
+
function NameSelect({ id, label, names, labels, value, onChange }) {
|
|
177
178
|
const { Field, Input } = usePrimitives();
|
|
178
|
-
return (_jsx(Field, { id: id, label: label, children: _jsx(Input, { kind: "select", id: id, name: id, value: value, onChange: onChange, display: "dropdown", options: names.map((name) => ({ value: name, label: name })) }) }));
|
|
179
|
+
return (_jsx(Field, { id: id, label: label, children: _jsx(Input, { kind: "select", id: id, name: id, value: value, onChange: onChange, display: "dropdown", options: names.map((name) => ({ value: name, label: variableLabelOf(name, labels) })) }) }));
|
|
179
180
|
}
|
|
180
|
-
function InsertPanel({ editor, editorId, kind, variables, onClose }) {
|
|
181
|
+
function InsertPanel({ editor, editorId, kind, variables, variableLabels, onClose, }) {
|
|
181
182
|
const { Button, Field, Input } = usePrimitives();
|
|
182
183
|
const t = useTranslation();
|
|
183
184
|
const [href, setHref] = useState(() => {
|
|
@@ -245,7 +246,7 @@ function InsertPanel({ editor, editorId, kind, variables, onClose }) {
|
|
|
245
246
|
const needsVariables = kind === "button" || kind === "repeat" || kind === "placeholder" || kind === "steps";
|
|
246
247
|
const noVariables = needsVariables && selectable.length === 0;
|
|
247
248
|
const idPrefix = `${editorId}-panel`;
|
|
248
|
-
return (_jsxs("div", { className: "flex flex-col gap-2 border-b border-input bg-muted/40 p-2", children: [noVariables && (_jsx("p", { className: "text-sm text-muted-foreground", children: t("template-resolver.documentEditor.noVariables") })), kind === "link" && (_jsx(Field, { id: `${idPrefix}-href`, label: t("template-resolver.documentEditor.linkHref"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-href`, name: "href", value: href, onChange: setHref, placeholder: t("template-resolver.documentEditor.linkHrefPlaceholder") }) })), kind === "placeholder" && !noVariables && (_jsx("div", { className: "flex flex-wrap gap-1", children: _jsx(VariableChips, { variables: selectable, onInsert: (name) => insertAndClose({ type: "variable", attrs: { name } }) }) })), kind === "align" && (_jsx("div", { className: "flex flex-wrap gap-1", children: DOCUMENT_TEXT_ALIGNMENTS.map((alignment) => (_jsxs(Button, { type: "button", variant: "secondary", size: "sm", onClick: () => {
|
|
249
|
+
return (_jsxs("div", { className: "flex flex-col gap-2 border-b border-input bg-muted/40 p-2", children: [noVariables && (_jsx("p", { className: "text-sm text-muted-foreground", children: t("template-resolver.documentEditor.noVariables") })), kind === "link" && (_jsx(Field, { id: `${idPrefix}-href`, label: t("template-resolver.documentEditor.linkHref"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-href`, name: "href", value: href, onChange: setHref, placeholder: t("template-resolver.documentEditor.linkHrefPlaceholder") }) })), kind === "placeholder" && !noVariables && (_jsx("div", { className: "flex flex-wrap gap-1", children: _jsx(VariableChips, { variables: selectable, labels: variableLabels, onInsert: (name) => insertAndClose({ type: "variable", attrs: { name } }) }) })), kind === "align" && (_jsx("div", { className: "flex flex-wrap gap-1", children: DOCUMENT_TEXT_ALIGNMENTS.map((alignment) => (_jsxs(Button, { type: "button", variant: "secondary", size: "sm", onClick: () => {
|
|
249
250
|
editor
|
|
250
251
|
.chain()
|
|
251
252
|
.focus()
|
|
@@ -253,7 +254,7 @@ function InsertPanel({ editor, editorId, kind, variables, onClose }) {
|
|
|
253
254
|
.updateAttributes("heading", { textAlign: alignment })
|
|
254
255
|
.run();
|
|
255
256
|
onClose();
|
|
256
|
-
}, children: [ALIGNMENT_ICONS[alignment], t(ALIGNMENT_LABEL_KEYS[alignment])] }, alignment))) })), kind === "image" && (_jsxs(_Fragment, { children: [_jsx(Field, { id: `${idPrefix}-resource`, label: t("template-resolver.documentEditor.resourceKey"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-resource`, name: "resource", value: resource, onChange: setResource }) }), _jsx(Field, { id: `${idPrefix}-alt`, label: t("template-resolver.documentEditor.imageAlt"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-alt`, name: "alt", value: alt, onChange: setAlt }) })] })), kind === "button" && !noVariables && (_jsxs(_Fragment, { children: [_jsx(NameSelect, { id: `${idPrefix}-target`, label: t("template-resolver.documentEditor.buttonTarget"), names: selectable, value: selectedName, onChange: setChosenName }), _jsx(Field, { id: `${idPrefix}-text`, label: t("template-resolver.documentEditor.buttonText"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-text`, name: "text", value: buttonText, onChange: setButtonText }) })] })), kind === "repeat" && !noVariables && (_jsx(NameSelect, { id: `${idPrefix}-list`, label: t("template-resolver.documentEditor.repeatList"), names: selectable, value: selectedName, onChange: setChosenName })), kind === "steps" && !noVariables && (_jsxs(_Fragment, { children: [_jsx(NameSelect, { id: `${idPrefix}-steps-variable`, label: t("template-resolver.documentEditor.stepsVariable"), names: selectable, value: selectedName, onChange: setChosenName }), _jsx(Field, { id: `${idPrefix}-steps-list`, label: t("template-resolver.documentEditor.stepsList"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-steps-list`, name: "steps", value: stepsText, onChange: setStepsText }) })] })), error !== null && (_jsx("p", { role: "alert", className: "text-sm text-destructive", children: error })), _jsx("div", { className: "flex flex-wrap gap-2", children: _jsx(PanelActions, { onCancel: onClose, ...(kind === "link" && { onInsert: submitLink }), ...(kind === "link" &&
|
|
257
|
+
}, children: [ALIGNMENT_ICONS[alignment], t(ALIGNMENT_LABEL_KEYS[alignment])] }, alignment))) })), kind === "image" && (_jsxs(_Fragment, { children: [_jsx(Field, { id: `${idPrefix}-resource`, label: t("template-resolver.documentEditor.resourceKey"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-resource`, name: "resource", value: resource, onChange: setResource }) }), _jsx(Field, { id: `${idPrefix}-alt`, label: t("template-resolver.documentEditor.imageAlt"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-alt`, name: "alt", value: alt, onChange: setAlt }) })] })), kind === "button" && !noVariables && (_jsxs(_Fragment, { children: [_jsx(NameSelect, { id: `${idPrefix}-target`, label: t("template-resolver.documentEditor.buttonTarget"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName }), _jsx(Field, { id: `${idPrefix}-text`, label: t("template-resolver.documentEditor.buttonText"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-text`, name: "text", value: buttonText, onChange: setButtonText }) })] })), kind === "repeat" && !noVariables && (_jsx(NameSelect, { id: `${idPrefix}-list`, label: t("template-resolver.documentEditor.repeatList"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName })), kind === "steps" && !noVariables && (_jsxs(_Fragment, { children: [_jsx(NameSelect, { id: `${idPrefix}-steps-variable`, label: t("template-resolver.documentEditor.stepsVariable"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName }), _jsx(Field, { id: `${idPrefix}-steps-list`, label: t("template-resolver.documentEditor.stepsList"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-steps-list`, name: "steps", value: stepsText, onChange: setStepsText }) })] })), error !== null && (_jsx("p", { role: "alert", className: "text-sm text-destructive", children: error })), _jsx("div", { className: "flex flex-wrap gap-2", children: _jsx(PanelActions, { onCancel: onClose, ...(kind === "link" && { onInsert: submitLink }), ...(kind === "link" &&
|
|
257
258
|
editor.isActive("link") && {
|
|
258
259
|
onRemoveLink: () => {
|
|
259
260
|
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
@@ -448,7 +449,9 @@ export default function DocumentTiptapEditor({ id, value, onChange, variables, r
|
|
|
448
449
|
? "[&_.ProseMirror]:outline-none"
|
|
449
450
|
: "[&_.ProseMirror]:min-h-40 [&_.ProseMirror]:outline-none", "[&_ul]:list-disc [&_ol]:list-decimal [&_ul]:pl-6 [&_ol]:pl-6", "[&_h1]:text-xl [&_h1]:font-bold [&_h2]:text-lg [&_h2]:font-bold [&_h3]:text-base [&_h3]:font-bold", "[&_a]:underline [&_a]:text-primary", "[&_strong]:font-bold [&_em]:italic [&_u]:underline", canvas
|
|
450
451
|
? "[&_table]:mb-2 [&_table]:mt-6 [&_.ProseMirror>:first-child_table]:mt-0 [&_.ProseMirror>table:first-child]:mt-0 [&_td:last-child>p[data-size=small][data-align=right]]:whitespace-nowrap"
|
|
451
|
-
: "[&_table]:my-2", "[&_table]:w-full [&_table]:border-collapse", "[&_td]:border-b [&_td]:border-border [&_td]:px-2 [&_td]:py-1.5 [&_td>p]:m-0 [&_th>p]:m-0", "[&_th]:border-b [&_th]:border-border [&_th]:px-2 [&_th]:py-1.5 [&_th]:text-left [&_th]:text-xs [&_th]:font-medium [&_th]:text-muted-foreground", "[&_tr[data-each]>td]:bg-muted/50", "[&_[data-align=left]]:text-left [&_[data-align=center]]:text-center [&_[data-align=right]]:text-right [&_[data-align=justify]]:text-justify", "[&_p[data-size=small]]:text-xs [&_p[data-size=small]]:text-muted-foreground", "[&_a[data-button]]:inline-block [&_a[data-button]]:rounded-full [&_a[data-button]]:bg-primary [&_a[data-button]]:px-4 [&_a[data-button]]:py-1.5 [&_a[data-button]]:text-primary-foreground [&_a[data-button]]:no-underline",
|
|
452
|
+
: "[&_table]:my-2", "[&_table]:w-full [&_table]:border-collapse", "[&_td]:border-b [&_td]:border-border [&_td]:px-2 [&_td]:py-1.5 [&_td>p]:m-0 [&_th>p]:m-0", "[&_th]:border-b [&_th]:border-border [&_th]:px-2 [&_th]:py-1.5 [&_th]:text-left [&_th]:text-xs [&_th]:font-medium [&_th]:text-muted-foreground", "[&_tr[data-each]>td]:bg-muted/50", "[&_[data-align=left]]:text-left [&_[data-align=center]]:text-center [&_[data-align=right]]:text-right [&_[data-align=justify]]:text-justify", "[&_p[data-size=small]]:text-xs [&_p[data-size=small]]:text-muted-foreground", "[&_a[data-button]]:inline-block [&_a[data-button]]:rounded-full [&_a[data-button]]:bg-primary [&_a[data-button]]:px-4 [&_a[data-button]]:py-1.5 [&_a[data-button]]:text-primary-foreground [&_a[data-button]]:no-underline",
|
|
453
|
+
// A chip in the button would be primary on primary; it inverts to stay readable.
|
|
454
|
+
"[&_a[data-button]_[data-variable-chip]]:border-primary-foreground/40 [&_a[data-button]_[data-variable-chip]]:bg-primary-foreground/15 [&_a[data-button]_[data-variable-chip]]:text-primary-foreground", "[&_hr]:my-3 [&_hr]:border-input", "[&_.is-editor-empty]:before:pointer-events-none [&_.is-editor-empty]:before:float-left [&_.is-editor-empty]:before:h-0 [&_.is-editor-empty]:before:text-muted-foreground [&_.is-editor-empty]:before:content-[attr(data-placeholder)]") }));
|
|
452
455
|
// The canvas toolbar never scrolls sideways: the rarer blocks and the HTML view sit in the menu.
|
|
453
456
|
const menuBlocks = canvas && ActionOverflowMenu !== undefined
|
|
454
457
|
? blocks.filter((block) => !CANVAS_INLINE_BLOCKS.includes(block))
|
|
@@ -504,7 +507,7 @@ export default function DocumentTiptapEditor({ id, value, onChange, variables, r
|
|
|
504
507
|
: t("template-resolver.documentEditor.buttonTarget"), ": ", selectedBlock.type === "button" ? (_jsx("strong", { children: buttonTargetLabel(selectedBlock.detail, variableLabels) })) : (_jsx("code", { children: selectedBlock.detail }))] }), _jsx(Button, { type: "button", size: "sm", variant: "danger-ghost", onClick: () => {
|
|
505
508
|
editor.chain().focus().deleteNode(selectedBlock.type).run();
|
|
506
509
|
}, children: t("template-resolver.documentEditor.removeBlock") })] })) : (repeatTable !== null && (_jsxs("div", { "data-testid": "document-repeat-bar", className: BUBBLE_BAR_CLASS, children: [_jsx("span", { className: "px-1.5 text-[10px] uppercase tracking-wide text-muted-foreground", children: repeatBarLabel }), _jsx(Button, { type: "button", variant: "secondary", size: "sm", pressed: repeatTable.headerRepeats, onClick: () => toggleRepeatHeader(editor), children: t("template-resolver.documentEditor.repeatHeader") })] }))) }, mountKeyOf(editor)));
|
|
507
|
-
const insertPanel = openPanel !== null && !readOnly && (_jsx(InsertPanel, { editor: editor, editorId: id, kind: openPanel, variables: variables, onClose: () => setOpenPanel(null) }, openPanel));
|
|
510
|
+
const insertPanel = openPanel !== null && !readOnly && (_jsx(InsertPanel, { editor: editor, editorId: id, kind: openPanel, variables: variables, variableLabels: stableLabels, onClose: () => setOpenPanel(null) }, openPanel));
|
|
508
511
|
if (hosted) {
|
|
509
512
|
return (_jsxs(_Fragment, { children: [toolbarHost !== null &&
|
|
510
513
|
createPortal(_jsxs(_Fragment, { children: [toolbarBar, insertPanel] }), toolbarHost), !readOnly && bubbleMenu, editorContent] }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Editor } from "@tiptap/core";
|
|
2
|
-
import type { DocumentEditorHandle } from "./document-toolbar-blocks.
|
|
2
|
+
import type { DocumentEditorHandle } from "./document-toolbar-blocks.ts";
|
|
3
3
|
export declare function createEditorHandle(editor: Editor): DocumentEditorHandle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { MAIL_TONES, type MailTone } from "../mail-constants.
|
|
2
|
-
export { PDF_DEFAULT_MARGIN_MM, PDF_FOOTER_MARGIN_MM, PDF_HEADER_MARGIN_MM, PDF_ORIENTATIONS, PDF_PAGE_FORMATS, } from "../pdf-constants.
|
|
3
|
-
export { TemplateResolverErrors, TemplateResolverHandlers, TemplateResolverQueries, } from "../qualified-names.
|
|
4
|
-
export { textBlocksClient } from "./client-plugin.
|
|
5
|
-
export { DocumentContentEditor } from "./document-editor.
|
|
6
|
-
export { type DocumentEditorChrome, type DocumentEditorHandle, type DocumentEditorProps, type DocumentResourcePreview, type DocumentToolbarBlock, MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS, } from "./document-toolbar-blocks.
|
|
7
|
-
export { PlaceholderLineEditor, type PlaceholderLineEditorProps, } from "./placeholder-line-editor-lazy.
|
|
1
|
+
export { MAIL_TONES, type MailTone } from "../mail-constants.ts";
|
|
2
|
+
export { PDF_DEFAULT_MARGIN_MM, PDF_FOOTER_MARGIN_MM, PDF_HEADER_MARGIN_MM, PDF_ORIENTATIONS, PDF_PAGE_FORMATS, } from "../pdf-constants.ts";
|
|
3
|
+
export { TemplateResolverErrors, TemplateResolverHandlers, TemplateResolverQueries, } from "../qualified-names.ts";
|
|
4
|
+
export { textBlocksClient } from "./client-plugin.tsx";
|
|
5
|
+
export { DocumentContentEditor } from "./document-editor.tsx";
|
|
6
|
+
export { type DocumentEditorChrome, type DocumentEditorHandle, type DocumentEditorProps, type DocumentResourcePreview, type DocumentToolbarBlock, MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS, } from "./document-toolbar-blocks.ts";
|
|
7
|
+
export { PlaceholderLineEditor, type PlaceholderLineEditorProps, } from "./placeholder-line-editor-lazy.tsx";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { PlaceholderLineEditorProps } from "./placeholder-line-editor.
|
|
3
|
-
export type { PlaceholderLineEditorProps } from "./placeholder-line-editor.
|
|
2
|
+
import type { PlaceholderLineEditorProps } from "./placeholder-line-editor.tsx";
|
|
3
|
+
export type { PlaceholderLineEditorProps } from "./placeholder-line-editor.tsx";
|
|
4
4
|
export declare function PlaceholderLineEditor(props: PlaceholderLineEditorProps): ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { DocumentEditorHandle } from "./document-toolbar-blocks.
|
|
2
|
+
import type { DocumentEditorHandle } from "./document-toolbar-blocks.ts";
|
|
3
3
|
export type PlaceholderLineEditorProps = {
|
|
4
4
|
readonly id: string;
|
|
5
5
|
/** Plain text with `{{name}}` placeholders. */
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
export declare function createTemplateResolverUserDataFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
2
2
|
readonly exports: void;
|
|
3
3
|
};
|
|
4
|
-
/** @deprecated Use createTemplateResolverUserDataFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
5
|
-
export declare const templateResolverUserDataFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
6
|
-
readonly exports: void;
|
|
7
|
-
};
|
|
@@ -21,5 +21,3 @@ export function createTemplateResolverUserDataFeature() {
|
|
|
21
21
|
});
|
|
22
22
|
}, { dedupeOptions: {} });
|
|
23
23
|
}
|
|
24
|
-
/** @deprecated Use createTemplateResolverUserDataFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
25
|
-
export const templateResolverUserDataFeature = createTemplateResolverUserDataFeature();
|
package/dist/tenant/feature.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AssignableAppRoles, type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
export { tenantEntity, tenantTable } from "./schema/tenant.
|
|
2
|
+
export { tenantEntity, tenantTable } from "./schema/tenant.ts";
|
|
3
3
|
export type TenantFeatureOptions = {
|
|
4
4
|
/** Adds the /members "invite" drawer button + its `invite-create`
|
|
5
5
|
* actionForm, bound to auth-email-password's `invite-create` write-
|
package/dist/tenant/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { cancelPendingInvitation } from "./cancel-pending-invitation.
|
|
2
|
-
export { TenantCommandSchemas } from "./command-schemas.
|
|
3
|
-
export { OWNER_INVITE_ROLE_OPTIONS, TENANT_FEATURE, TenantErrors, TenantHandlers, TenantQueries, } from "./constants.
|
|
4
|
-
export { decryptTenantNames } from "./decrypt-tenant-names.
|
|
5
|
-
export { collectAssignableAppRoles, createTenantFeature } from "./feature.
|
|
6
|
-
export type { InvitationStatus } from "./invitation-table.
|
|
7
|
-
export { INVITATION_STATUS, INVITATION_STATUSES, tenantInvitationEntity, tenantInvitationsTable, } from "./invitation-table.
|
|
8
|
-
export { isTenantServingPublicContent } from "./is-tenant-serving-public-content.
|
|
9
|
-
export { tenantMembershipEntity, tenantMembershipsTable } from "./membership-table.
|
|
10
|
-
export { TENANT_LIFECYCLE_STATUSES, type TenantLifecycleStatus, tenantEntity, tenantTable, } from "./schema/tenant.
|
|
1
|
+
export { cancelPendingInvitation } from "./cancel-pending-invitation.ts";
|
|
2
|
+
export { TenantCommandSchemas } from "./command-schemas.ts";
|
|
3
|
+
export { OWNER_INVITE_ROLE_OPTIONS, TENANT_FEATURE, TenantErrors, TenantHandlers, TenantQueries, } from "./constants.ts";
|
|
4
|
+
export { decryptTenantNames } from "./decrypt-tenant-names.ts";
|
|
5
|
+
export { collectAssignableAppRoles, createTenantFeature } from "./feature.ts";
|
|
6
|
+
export type { InvitationStatus } from "./invitation-table.ts";
|
|
7
|
+
export { INVITATION_STATUS, INVITATION_STATUSES, tenantInvitationEntity, tenantInvitationsTable, } from "./invitation-table.ts";
|
|
8
|
+
export { isTenantServingPublicContent } from "./is-tenant-serving-public-content.ts";
|
|
9
|
+
export { tenantMembershipEntity, tenantMembershipsTable } from "./membership-table.ts";
|
|
10
|
+
export { TENANT_LIFECYCLE_STATUSES, type TenantLifecycleStatus, tenantEntity, tenantTable, } from "./schema/tenant.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TenantLifecycleStatus } from "./schema/tenant.
|
|
1
|
+
import type { TenantLifecycleStatus } from "./schema/tenant.ts";
|
|
2
2
|
/** Whether a tenant still serves content to anonymous/public callers.
|
|
3
3
|
* `destroyRequested` is deliberately blocked too, not just `destroying`
|
|
4
4
|
* onward — secure by default: the tenant already asked to be removed, so
|
package/dist/tenant/testing.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./seeding.
|
|
1
|
+
export * from "./seeding.ts";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type TenantClientOptions, tenantClient } from "./client-plugin.
|
|
2
|
-
export { MemberRolesCell } from "./member-roles-cell.
|
|
3
|
-
export { MemberStatusCell } from "./member-status-cell.
|
|
1
|
+
export { type TenantClientOptions, tenantClient } from "./client-plugin.tsx";
|
|
2
|
+
export { MemberRolesCell } from "./member-roles-cell.tsx";
|
|
3
|
+
export { MemberStatusCell } from "./member-status-cell.tsx";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import { type ClaimTenantHandoverOptions } from "./handlers/claim.write.
|
|
2
|
+
import { type ClaimTenantHandoverOptions } from "./handlers/claim.write.ts";
|
|
3
3
|
export type TenantHandoverFeatureOptions = ClaimTenantHandoverOptions;
|
|
4
4
|
export declare function createTenantHandoverFeature(opts?: TenantHandoverFeatureOptions): FeatureDefinition;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createTenantHandoverFeature, type TenantHandoverFeatureOptions, } from "./feature.
|
|
2
|
-
export { signTenantHandoverGrant, tenantHandoverPurpose } from "./grant.
|
|
3
|
-
export { type ClaimTenantHandoverOptions, createClaimTenantHandoverHandler, } from "./handlers/claim.write.
|
|
1
|
+
export { createTenantHandoverFeature, type TenantHandoverFeatureOptions, } from "./feature.ts";
|
|
2
|
+
export { signTenantHandoverGrant, tenantHandoverPurpose } from "./grant.ts";
|
|
3
|
+
export { type ClaimTenantHandoverOptions, createClaimTenantHandoverHandler, } from "./handlers/claim.write.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
export declare function createTenantLifecycleFeature(): FeatureDefinition;
|
|
3
|
-
export { TENANT_LIFECYCLE_FEATURE, TenantLifecycleHandlers, } from "./constants.
|
|
4
|
-
export { resolveTenantLifecycleGate, runTenantDestructionSweep } from "./run-tenant-destroy.
|
|
3
|
+
export { TENANT_LIFECYCLE_FEATURE, TenantLifecycleHandlers, } from "./constants.ts";
|
|
4
|
+
export { resolveTenantLifecycleGate, runTenantDestructionSweep } from "./run-tenant-destroy.ts";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { TENANT_DESTRUCTION_STAGES, TENANT_LIFECYCLE_FEATURE, TenantLifecycleHandlers, } from "./constants.
|
|
2
|
-
export { createTenantLifecycleFeature } from "./feature.
|
|
3
|
-
export { resolveTenantLifecycleGate } from "./run-tenant-destroy.
|
|
1
|
+
export { TENANT_DESTRUCTION_STAGES, TENANT_LIFECYCLE_FEATURE, TenantLifecycleHandlers, } from "./constants.ts";
|
|
2
|
+
export { createTenantLifecycleFeature } from "./feature.ts";
|
|
3
|
+
export { resolveTenantLifecycleGate } from "./run-tenant-destroy.ts";
|
|
@@ -38,4 +38,4 @@ export declare function runTenantDestructionSweep(args: {
|
|
|
38
38
|
readonly triggered: number;
|
|
39
39
|
readonly advanced: number;
|
|
40
40
|
}>;
|
|
41
|
-
export { invalidateTenantLifecycleGate, resolveTenantLifecycleGate } from "./lifecycle-gate.
|
|
41
|
+
export { invalidateTenantLifecycleGate, resolveTenantLifecycleGate } from "./lifecycle-gate.ts";
|
|
@@ -3,7 +3,7 @@ import { type EscapeHatchAuditSink, type Registry, type TenantId } from "@cosmic
|
|
|
3
3
|
import type { FileProviderResolver } from "@cosmicdrift/kumiko-framework/files";
|
|
4
4
|
import { type Logger } from "@cosmicdrift/kumiko-framework/logging";
|
|
5
5
|
import { type SearchAdapter } from "@cosmicdrift/kumiko-framework/search";
|
|
6
|
-
import type { TenantDestructionStageName } from "./constants.
|
|
6
|
+
import type { TenantDestructionStageName } from "./constants.ts";
|
|
7
7
|
export type DestructionStageCtx = {
|
|
8
8
|
readonly db: DbRunner;
|
|
9
9
|
readonly registry: Registry;
|
|
@@ -2,7 +2,7 @@ import type { DbConnection } from "@cosmicdrift/kumiko-framework/db";
|
|
|
2
2
|
import type { TenantId } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
3
|
import type { SearchAdapter } from "@cosmicdrift/kumiko-framework/search";
|
|
4
4
|
import type { TestStack } from "@cosmicdrift/kumiko-testing/stack";
|
|
5
|
-
import { runTenantDestructionSweep } from "./run-tenant-destroy.
|
|
5
|
+
import { runTenantDestructionSweep } from "./run-tenant-destroy.ts";
|
|
6
6
|
export declare function seedDestroyingTenant(db: DbConnection, tenantId: TenantId): Promise<void>;
|
|
7
7
|
export declare function driveDestructionToCompletion(stack: TestStack, db: DbConnection, tenantId: TenantId, searchAdapter?: SearchAdapter): Promise<string>;
|
|
8
8
|
export { runTenantDestructionSweep };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import { type TenantSettingsKeyOptions } from "./config.
|
|
2
|
+
import { type TenantSettingsKeyOptions } from "./config.ts";
|
|
3
3
|
export type TenantSettingsFeatureOptions = TenantSettingsKeyOptions;
|
|
4
4
|
export declare function createTenantSettingsFeature(opts?: TenantSettingsFeatureOptions): FeatureDefinition;
|
|
5
|
-
/** @deprecated Use createTenantSettingsFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
6
|
-
export declare const tenantSettingsFeature: FeatureDefinition;
|
|
@@ -43,5 +43,3 @@ export function createTenantSettingsFeature(opts = {}) {
|
|
|
43
43
|
});
|
|
44
44
|
}, Object.keys(opts).length === 0 ? { dedupeOptions: {} } : undefined);
|
|
45
45
|
}
|
|
46
|
-
/** @deprecated Use createTenantSettingsFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
47
|
-
export const tenantSettingsFeature = createTenantSettingsFeature();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { buildTenantSettingsKeys, type TenantSettingsKeyOptions } from "./config.
|
|
2
|
-
export { TENANT_SETTINGS_FEATURE_NAME, TenantSettingsConfig } from "./constants.
|
|
3
|
-
export { createTenantSettingsFeature, type TenantSettingsFeatureOptions,
|
|
4
|
-
export { defineCreateWithTenantDefaults } from "./tenant-defaults.
|
|
1
|
+
export { buildTenantSettingsKeys, type TenantSettingsKeyOptions } from "./config.ts";
|
|
2
|
+
export { TENANT_SETTINGS_FEATURE_NAME, TenantSettingsConfig } from "./constants.ts";
|
|
3
|
+
export { createTenantSettingsFeature, type TenantSettingsFeatureOptions, } from "./feature.ts";
|
|
4
|
+
export { defineCreateWithTenantDefaults } from "./tenant-defaults.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { buildTenantSettingsKeys } from "./config.js";
|
|
2
2
|
export { TENANT_SETTINGS_FEATURE_NAME, TenantSettingsConfig } from "./constants.js";
|
|
3
|
-
export { createTenantSettingsFeature,
|
|
3
|
+
export { createTenantSettingsFeature, } from "./feature.js";
|
|
4
4
|
export { defineCreateWithTenantDefaults } from "./tenant-defaults.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import type { TierMap } from "./compose-app.
|
|
3
|
-
import { type TrialPolicy } from "./trial.
|
|
2
|
+
import type { TierMap } from "./compose-app.ts";
|
|
3
|
+
import { type TrialPolicy } from "./trial.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Options for createTierEngineFeature. Both fields optional — wenn beide
|
|
6
6
|
* leer, ist die feature nur Storage (back-compat zu legacy `tierEngineFeature`).
|
|
@@ -38,5 +38,3 @@ export type CreateTierEngineOptions<TCaps extends Readonly<Record<string, unknow
|
|
|
38
38
|
* mountable in run-config.
|
|
39
39
|
*/
|
|
40
40
|
export declare function createTierEngineFeature<TCaps extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>>(opts?: CreateTierEngineOptions<TCaps>): FeatureDefinition;
|
|
41
|
-
/** @deprecated Use createTierEngineFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
42
|
-
export declare const tierEngineFeature: FeatureDefinition;
|
|
@@ -511,5 +511,3 @@ export function createTierEngineFeature(opts = {}) {
|
|
|
511
511
|
r.useExtension(TENANT_TIER_RESOLVER_EXT, TIER_ENGINE_FEATURE, plugin);
|
|
512
512
|
}, Object.keys(opts).length === 0 ? { dedupeOptions: {} } : undefined);
|
|
513
513
|
}
|
|
514
|
-
/** @deprecated Use createTierEngineFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
515
|
-
export const tierEngineFeature = createTierEngineFeature();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
import { type TierAssignmentRow } from "../entity.
|
|
2
|
+
import { type TierAssignmentRow } from "../entity.ts";
|
|
3
3
|
export declare const getTenantTierQuery: import("@cosmicdrift/kumiko-types/define-handler").QueryHandlerDefinition<"get-tenant-tier", z.ZodObject<{
|
|
4
4
|
tenantId: z.ZodString;
|
|
5
5
|
}, z.core.$strip>, TierAssignmentRow | null, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { type TranslationsByLocale } from "@cosmicdrift/kumiko-renderer";
|
|
2
1
|
type LocalizedString = {
|
|
3
2
|
readonly en: string;
|
|
4
3
|
};
|
|
5
4
|
export declare const TIER_ENGINE_I18N: Readonly<Record<string, LocalizedString>>;
|
|
6
|
-
export declare const defaultTranslations: TranslationsByLocale;
|
|
7
5
|
export {};
|
package/dist/tier-engine/i18n.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// @runtime client
|
|
2
2
|
// Server + client i18n for the tier-admin actionForm. Single source of
|
|
3
3
|
// truth: r.translations({ keys: TIER_ENGINE_I18N }) registers these
|
|
4
|
-
// server-side,
|
|
5
|
-
// from the same map so the two can't drift.
|
|
6
|
-
|
|
4
|
+
// server-side, web/client-plugin derives the client-side locale bundle
|
|
5
|
+
// from the same map so the two can't drift. No renderer import here: the
|
|
6
|
+
// server feature loads this file, and the renderer is .tsx that non-JSX
|
|
7
|
+
// server projects (runProdApp consumers) cannot typecheck.
|
|
7
8
|
export const TIER_ENGINE_I18N = {
|
|
8
9
|
"screen:tier-admin.title": { en: "Assign tier manually" },
|
|
9
10
|
"tier-admin.screen.subtitle": {
|
|
@@ -20,4 +21,3 @@ export const TIER_ENGINE_I18N = {
|
|
|
20
21
|
"tier-admin.submit": { en: "Assign tier" },
|
|
21
22
|
"tier-admin.success": { en: "Tier assigned: {tenantId} → {tier}" },
|
|
22
23
|
};
|
|
23
|
-
export const defaultTranslations = translationsByLocaleFromKeys(TIER_ENGINE_I18N);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { tierAssignmentAggregateId } from "./aggregate-id.
|
|
2
|
-
export { type AddOnDefinition, type AddOnMap, type ComposeAppInput, type ComposedApp, composeApp, type TierDefinition, type TierMap, } from "./compose-app.
|
|
3
|
-
export { isTierAssignmentSource, TIER_ENGINE_FEATURE, type TierAssignmentSource, TierAssignmentSources, TierEngineHandlers, TierEngineQueries, } from "./constants.
|
|
4
|
-
export { tierAssignmentEntity } from "./entity.
|
|
5
|
-
export { type CreateTierEngineOptions, createTierEngineFeature,
|
|
6
|
-
export { createTierOptionGate, type TierOptionAvailability, type TierOptionGate, type TierOptionGateDeps, type TierOptionSpec, } from "./tier-option-gate.
|
|
7
|
-
export { createTierResolver, type TierResolver, type TierResolverDeps, } from "./tier-resolver.
|
|
8
|
-
export { isTrialActive, type TrialPolicy } from "./trial.
|
|
1
|
+
export { tierAssignmentAggregateId } from "./aggregate-id.ts";
|
|
2
|
+
export { type AddOnDefinition, type AddOnMap, type ComposeAppInput, type ComposedApp, composeApp, type TierDefinition, type TierMap, } from "./compose-app.ts";
|
|
3
|
+
export { isTierAssignmentSource, TIER_ENGINE_FEATURE, type TierAssignmentSource, TierAssignmentSources, TierEngineHandlers, TierEngineQueries, } from "./constants.ts";
|
|
4
|
+
export { tierAssignmentEntity } from "./entity.ts";
|
|
5
|
+
export { type CreateTierEngineOptions, createTierEngineFeature, } from "./feature.ts";
|
|
6
|
+
export { createTierOptionGate, type TierOptionAvailability, type TierOptionGate, type TierOptionGateDeps, type TierOptionSpec, } from "./tier-option-gate.ts";
|
|
7
|
+
export { createTierResolver, type TierResolver, type TierResolverDeps, } from "./tier-resolver.ts";
|
|
8
|
+
export { isTrialActive, type TrialPolicy } from "./trial.ts";
|
|
@@ -10,7 +10,7 @@ export { tierAssignmentAggregateId } from "./aggregate-id.js";
|
|
|
10
10
|
export { composeApp, } from "./compose-app.js";
|
|
11
11
|
export { isTierAssignmentSource, TIER_ENGINE_FEATURE, TierAssignmentSources, TierEngineHandlers, TierEngineQueries, } from "./constants.js";
|
|
12
12
|
export { tierAssignmentEntity } from "./entity.js";
|
|
13
|
-
export { createTierEngineFeature,
|
|
13
|
+
export { createTierEngineFeature, } from "./feature.js";
|
|
14
14
|
export { createTierOptionGate, } from "./tier-option-gate.js";
|
|
15
15
|
export { createTierResolver, } from "./tier-resolver.js";
|
|
16
16
|
export { isTrialActive } from "./trial.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EntityTableMeta, SchemaTable, TenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import type { WriteHandlerDef } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
3
|
import { type WriteFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
|
-
import { type CapGuardContext, type CapLimitContext } from "../cap-counter/index.
|
|
4
|
+
import { type CapGuardContext, type CapLimitContext } from "../cap-counter/index.ts";
|
|
5
5
|
export type TierOptionSpec<TCaps> = {
|
|
6
6
|
readonly field: string;
|
|
7
7
|
readonly options: readonly string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
2
|
-
import type { CapLimitContext } from "../cap-counter/index.
|
|
2
|
+
import type { CapLimitContext } from "../cap-counter/index.ts";
|
|
3
3
|
export type TierResolverDeps<TTier extends string, TCaps> = {
|
|
4
4
|
readonly capsForTier: (tier: TTier, context: CapLimitContext) => TCaps | Promise<TCaps>;
|
|
5
5
|
readonly isTierName: (value: string) => value is TTier;
|