@kardalum/plugin-sdk 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +211 -0
- package/README.md +19 -0
- package/dist/admin-section-registry.d.ts +16 -1
- package/dist/admin-section-registry.js +23 -0
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +86 -0
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +38 -7
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +55 -3
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/content-library.d.ts +85 -0
- package/dist/content-library.js +15 -0
- package/dist/content-picker/page-picker-sheet.d.ts +13 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-tree.d.ts +25 -0
- package/dist/content-picker/page-tree.js +132 -0
- package/dist/data-type-plugin.d.ts +7 -1
- package/dist/datatype-validation.d.ts +4 -9
- package/dist/datatype-validation.js +139 -1
- package/dist/entitlement-entry.d.ts +1 -1
- package/dist/entitlement-entry.js +1 -1
- package/dist/entitlement-gate.d.ts +14 -0
- package/dist/entitlement-gate.js +64 -7
- package/dist/entitlement-plan.d.ts +6 -0
- package/dist/entitlement-plan.js +10 -0
- package/dist/entitlement-types.d.ts +36 -12
- package/dist/entitlement.d.ts +31 -4
- package/dist/entitlement.js +58 -17
- package/dist/hook-entry.d.ts +5 -0
- package/dist/hook-entry.js +30 -0
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +36 -4
- package/dist/index.js +50 -3
- package/dist/mail.d.ts +30 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +29 -4
- package/dist/manifest-entry.js +39 -2
- package/dist/manifest-schema.d.ts +443 -29
- package/dist/manifest-schema.js +285 -23
- package/dist/manifest.d.ts +450 -51
- package/dist/manifest.js +1 -1
- package/dist/media/media-picker.js +31 -18
- package/dist/media/upload-error.d.ts +5 -1
- package/dist/media/upload-error.js +14 -2
- package/dist/media-library.d.ts +32 -0
- package/dist/media-library.js +15 -0
- package/dist/nested-field-host.d.ts +76 -0
- package/dist/nested-field-host.js +90 -0
- package/dist/notify.d.ts +12 -4
- package/dist/notify.js +1 -1
- package/dist/outbound.d.ts +47 -0
- package/dist/outbound.js +1 -0
- package/dist/plugin-context.d.ts +5 -0
- package/dist/plugin-screen-context.d.ts +112 -0
- package/dist/plugin-screen-context.js +26 -0
- package/dist/providers.d.ts +268 -0
- package/dist/providers.js +74 -0
- package/dist/read-all-pages.d.ts +5 -0
- package/dist/read-all-pages.js +3 -2
- package/dist/richtext/block-panel.js +11 -6
- package/dist/richtext/insert-menu.js +9 -6
- package/dist/richtext/style-listbox.js +6 -4
- package/dist/sdk-strings.d.ts +285 -0
- package/dist/sdk-strings.js +347 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/simple-storage-value-provider.js +24 -24
- package/dist/structured-storage-types.d.ts +309 -9
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +6 -0
- package/dist/tokens/tailwind-theme.css +5 -0
- package/dist/tokens/tokens.css +15 -3
- package/dist/tokens/tokens.json +8 -3
- package/dist/views/asset-view.js +4 -1
- package/dist/views/content-list-preview.js +3 -1
- package/dist/views/content-list-settings-view.js +11 -7
- package/dist/views/content-list-view.d.ts +5 -3
- package/dist/views/content-list-view.js +38 -34
- package/dist/views/content-picker-view.d.ts +3 -0
- package/dist/views/content-picker-view.js +143 -0
- package/dist/views/crop-view.d.ts +4 -6
- package/dist/views/crop-view.js +22 -13
- package/dist/views/date-range-view.js +4 -1
- package/dist/views/file-upload-view.d.ts +5 -7
- package/dist/views/file-upload-view.js +16 -7
- package/dist/views/group-view.d.ts +8 -0
- package/dist/views/group-view.js +123 -0
- package/dist/views/html-view.js +7 -6
- package/dist/views/image-view.js +37 -19
- package/dist/views/link-view.d.ts +3 -0
- package/dist/views/link-view.js +150 -0
- package/dist/views/options-list-view.d.ts +3 -0
- package/dist/views/options-list-view.js +104 -0
- package/dist/views/repeatable-list-view.d.ts +3 -0
- package/dist/views/repeatable-list-view.js +113 -0
- package/dist/views/rich-text-view.js +28 -13
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +215 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +179 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +57 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +137 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +10 -5
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +7 -4
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +180 -15
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +41 -5
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
- package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +117 -41
- package/node_modules/@kardalum/api-schemas/dist/index.js +89 -26
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +224 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +404 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +312 -8
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +43 -3
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +53 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +284 -0
- package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
- package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +42 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +74 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +38 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +237 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +205 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +335 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +242 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +16 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +34 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +22 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +31 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +310 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +430 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +342 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +400 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +180 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +612 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +82 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +497 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +91 -1
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +90 -8
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +59 -1
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +110 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +34 -2
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +384 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +616 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +160 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +34 -3
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +6 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +5 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +15 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +12 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +21 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +8 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +355 -22
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +34 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +47 -5
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +95 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +298 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +25 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +140 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +10 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
- package/package.json +12 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// M33 (core part 1, task 1.3b): the one error structured storage throws when
|
|
2
|
+
// an insert would give a table a second row with the same primary key or the
|
|
3
|
+
// same value under a unique column or unique index. Each adapter maps its
|
|
4
|
+
// driver's unique violation to it (postgresql 23505, mysql ER_DUP_ENTRY 1062,
|
|
5
|
+
// sqlite SQLITE_CONSTRAINT_PRIMARYKEY or SQLITE_CONSTRAINT_UNIQUE, and the
|
|
6
|
+
// mock's own check), so a plugin can tell "that key is taken" (a lock already
|
|
7
|
+
// held, a value already used) from any other failure without knowing which
|
|
8
|
+
// database is active. The plugin SDK exports it.
|
|
9
|
+
/** The error's stable code: what isStructuredDuplicateKeyError reads. */
|
|
10
|
+
export const STRUCTURED_DUPLICATE_KEY_CODE = "STRUCTURED_DUPLICATE_KEY";
|
|
11
|
+
export class StructuredDuplicateKeyError extends Error {
|
|
12
|
+
code = STRUCTURED_DUPLICATE_KEY_CODE;
|
|
13
|
+
/** `cause` is the driver's own error, kept for the server's logs. */
|
|
14
|
+
constructor(options = {}) {
|
|
15
|
+
super("A row with this key already exists", options);
|
|
16
|
+
this.name = "StructuredDuplicateKeyError";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** Whether a thrown value is the duplicate key error. Read by name and code,
|
|
20
|
+
* not by `instanceof`, so a plugin bundle that carries its own copy of the
|
|
21
|
+
* SDK still recognises the error the host threw. */
|
|
22
|
+
export function isStructuredDuplicateKeyError(value) {
|
|
23
|
+
if (!(value instanceof Error))
|
|
24
|
+
return false;
|
|
25
|
+
return value.name === "StructuredDuplicateKeyError" && value.code === STRUCTURED_DUPLICATE_KEY_CODE;
|
|
26
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { DataTypeConfig } from "./data-type-config.schema.js";
|
|
3
|
+
export declare const CONTENT_PICKER_EDITOR_ID = "com.kardalum.contentpicker";
|
|
4
|
+
export declare const OPTIONS_EDITOR_ID = "com.kardalum.options";
|
|
5
|
+
export declare const LINK_EDITOR_ID = "com.kardalum.link";
|
|
6
|
+
export declare const CONTENT_PICKER_DATA_TYPE_ID = "b1e00000-0000-4000-8000-000000000015";
|
|
7
|
+
export declare const LINK_DATA_TYPE_ID = "b1e00000-0000-4000-8000-000000000016";
|
|
8
|
+
/** Every picked list is bounded, whatever the field's maximum says (D2). */
|
|
9
|
+
export declare const CONTENT_PICKER_MAX_ITEMS = 50;
|
|
10
|
+
export declare const OPTIONS_MAX = 200;
|
|
11
|
+
export declare const OPTION_TEXT_MAX = 200;
|
|
12
|
+
export declare const LINK_LABEL_MAX = 200;
|
|
13
|
+
export declare const LINK_URL_MAX = 2048;
|
|
14
|
+
export declare const ContentPickerSettingsSchema: z.ZodObject<{
|
|
15
|
+
startNode: z.ZodDefault<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
16
|
+
documentTypes: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
17
|
+
multiple: z.ZodDefault<z.ZodBoolean>;
|
|
18
|
+
max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export type ContentPickerSettings = z.output<typeof ContentPickerSettingsSchema>;
|
|
21
|
+
export declare const OptionSchema: z.ZodObject<{
|
|
22
|
+
label: z.ZodString;
|
|
23
|
+
value: z.ZodString;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export declare const OptionsListSettingsSchema: z.ZodObject<{
|
|
26
|
+
options: z.ZodArray<z.ZodObject<{
|
|
27
|
+
label: z.ZodString;
|
|
28
|
+
value: z.ZodString;
|
|
29
|
+
}, z.core.$strict>>;
|
|
30
|
+
multiple: z.ZodDefault<z.ZodBoolean>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export type OptionsListSettings = z.output<typeof OptionsListSettingsSchema>;
|
|
33
|
+
export declare const LINK_ALLOW: readonly ["internal", "external", "both"];
|
|
34
|
+
export type LinkAllow = (typeof LINK_ALLOW)[number];
|
|
35
|
+
export declare const LinkSettingsSchema: z.ZodObject<{
|
|
36
|
+
allow: z.ZodDefault<z.ZodEnum<{
|
|
37
|
+
external: "external";
|
|
38
|
+
internal: "internal";
|
|
39
|
+
both: "both";
|
|
40
|
+
}>>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export type LinkSettings = z.output<typeof LinkSettingsSchema>;
|
|
43
|
+
export type LinkValue = {
|
|
44
|
+
page: string;
|
|
45
|
+
url?: undefined;
|
|
46
|
+
label: string;
|
|
47
|
+
newTab: boolean;
|
|
48
|
+
} | {
|
|
49
|
+
url: string;
|
|
50
|
+
page?: undefined;
|
|
51
|
+
label: string;
|
|
52
|
+
newTab: boolean;
|
|
53
|
+
};
|
|
54
|
+
/** An outside address a link may hold (D4): parsed with URL, never matched with a pattern. */
|
|
55
|
+
export declare function isOutsideLinkAddress(url: string): boolean;
|
|
56
|
+
export declare function readContentPickerSettings(raw: unknown): ContentPickerSettings;
|
|
57
|
+
export declare function readOptionsListSettings(raw: unknown): OptionsListSettings;
|
|
58
|
+
export declare function readLinkSettings(raw: unknown): LinkSettings;
|
|
59
|
+
/** One id or a list, as stored under either setting (D5). */
|
|
60
|
+
export declare function readPickedIds(value: unknown): string[];
|
|
61
|
+
export declare function readOptionValues(value: unknown): string[];
|
|
62
|
+
export declare function readLinkValue(value: unknown): LinkValue | null;
|
|
63
|
+
/** The page ids a value of this editor holds (D7, and session D's nested walk). */
|
|
64
|
+
export declare function pickedPageIdsOf(editorId: string, value: unknown): string[];
|
|
65
|
+
export declare const CONTENT_PICKER_DATA_TYPE_CONFIG: DataTypeConfig;
|
|
66
|
+
export declare const LINK_DATA_TYPE_CONFIG: DataTypeConfig;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { UuidStringSchema } from "./uuid.schema.js";
|
|
3
|
+
// M32 C (D1 to D5): three built-in data types whose values are JSON read by alias. The Zod
|
|
4
|
+
// schemas are the source of truth; plugin-sdk keeps JSON Schema mirrors of the settings, generated
|
|
5
|
+
// in input mode (every object is `.strict()` so the mirror keeps `additionalProperties: false`).
|
|
6
|
+
// The read* functions never throw: they read a stored value or settings bag that may predate a
|
|
7
|
+
// change of settings (D5) and keep what still makes sense.
|
|
8
|
+
export const CONTENT_PICKER_EDITOR_ID = "com.kardalum.contentpicker";
|
|
9
|
+
export const OPTIONS_EDITOR_ID = "com.kardalum.options";
|
|
10
|
+
export const LINK_EDITOR_ID = "com.kardalum.link";
|
|
11
|
+
// The b1e00000 block continues after the Asset's 0014.
|
|
12
|
+
export const CONTENT_PICKER_DATA_TYPE_ID = "b1e00000-0000-4000-8000-000000000015";
|
|
13
|
+
export const LINK_DATA_TYPE_ID = "b1e00000-0000-4000-8000-000000000016";
|
|
14
|
+
/** Every picked list is bounded, whatever the field's maximum says (D2). */
|
|
15
|
+
export const CONTENT_PICKER_MAX_ITEMS = 50;
|
|
16
|
+
export const OPTIONS_MAX = 200;
|
|
17
|
+
export const OPTION_TEXT_MAX = 200;
|
|
18
|
+
export const LINK_LABEL_MAX = 200;
|
|
19
|
+
export const LINK_URL_MAX = 2048;
|
|
20
|
+
const lowerUuid = UuidStringSchema.transform((id) => id.toLowerCase());
|
|
21
|
+
export const ContentPickerSettingsSchema = z
|
|
22
|
+
.object({
|
|
23
|
+
startNode: lowerUuid.nullable().default(null),
|
|
24
|
+
documentTypes: z.array(lowerUuid).max(500).default([]),
|
|
25
|
+
multiple: z.boolean().default(false),
|
|
26
|
+
max: z.number().int().min(1).max(CONTENT_PICKER_MAX_ITEMS).nullable().default(null),
|
|
27
|
+
})
|
|
28
|
+
.strict();
|
|
29
|
+
const optionText = z.string().trim().min(1, { message: "Every option needs a label and a value." }).max(OPTION_TEXT_MAX);
|
|
30
|
+
export const OptionSchema = z.object({ label: optionText, value: optionText }).strict();
|
|
31
|
+
export const OptionsListSettingsSchema = z
|
|
32
|
+
.object({
|
|
33
|
+
options: z
|
|
34
|
+
.array(OptionSchema)
|
|
35
|
+
.min(1, { message: "Add at least one option." })
|
|
36
|
+
.max(OPTIONS_MAX)
|
|
37
|
+
.refine((options) => new Set(options.map((option) => option.value)).size === options.length, {
|
|
38
|
+
message: "Two options share a value.",
|
|
39
|
+
}),
|
|
40
|
+
multiple: z.boolean().default(false),
|
|
41
|
+
})
|
|
42
|
+
.strict();
|
|
43
|
+
export const LINK_ALLOW = ["internal", "external", "both"];
|
|
44
|
+
export const LinkSettingsSchema = z.object({ allow: z.enum(LINK_ALLOW).default("both") }).strict();
|
|
45
|
+
const OUTSIDE_SCHEMES = new Set(["http:", "https:", "mailto:", "tel:"]);
|
|
46
|
+
/** An outside address a link may hold (D4): parsed with URL, never matched with a pattern. */
|
|
47
|
+
export function isOutsideLinkAddress(url) {
|
|
48
|
+
if (typeof url !== "string")
|
|
49
|
+
return false;
|
|
50
|
+
const trimmed = url.trim();
|
|
51
|
+
if (trimmed === "" || trimmed.length > LINK_URL_MAX)
|
|
52
|
+
return false;
|
|
53
|
+
try {
|
|
54
|
+
const parsed = new URL(trimmed);
|
|
55
|
+
if (!OUTSIDE_SCHEMES.has(parsed.protocol))
|
|
56
|
+
return false;
|
|
57
|
+
if (parsed.protocol === "mailto:")
|
|
58
|
+
return parsed.pathname.trim() !== "";
|
|
59
|
+
if (parsed.protocol === "tel:") {
|
|
60
|
+
for (const char of parsed.pathname)
|
|
61
|
+
if (char >= "0" && char <= "9")
|
|
62
|
+
return true;
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function record(raw) {
|
|
72
|
+
return typeof raw === "object" && raw !== null && !Array.isArray(raw) ? raw : {};
|
|
73
|
+
}
|
|
74
|
+
function uuidOrNull(raw) {
|
|
75
|
+
return typeof raw === "string" && UuidStringSchema.safeParse(raw).success ? raw.toLowerCase() : null;
|
|
76
|
+
}
|
|
77
|
+
export function readContentPickerSettings(raw) {
|
|
78
|
+
const bag = record(raw);
|
|
79
|
+
const types = Array.isArray(bag.documentTypes) ? bag.documentTypes.map(uuidOrNull).filter((id) => id !== null) : [];
|
|
80
|
+
const max = typeof bag.max === "number" && Number.isInteger(bag.max) && bag.max >= 1 && bag.max <= CONTENT_PICKER_MAX_ITEMS ? bag.max : null;
|
|
81
|
+
return { startNode: uuidOrNull(bag.startNode), documentTypes: [...new Set(types)], multiple: bag.multiple === true, max };
|
|
82
|
+
}
|
|
83
|
+
export function readOptionsListSettings(raw) {
|
|
84
|
+
const bag = record(raw);
|
|
85
|
+
const list = Array.isArray(bag.options) ? bag.options.slice(0, OPTIONS_MAX) : [];
|
|
86
|
+
const seen = new Set();
|
|
87
|
+
const options = [];
|
|
88
|
+
for (const entry of list) {
|
|
89
|
+
const parsed = OptionSchema.safeParse(entry);
|
|
90
|
+
if (!parsed.success || seen.has(parsed.data.value))
|
|
91
|
+
continue;
|
|
92
|
+
seen.add(parsed.data.value);
|
|
93
|
+
options.push(parsed.data);
|
|
94
|
+
}
|
|
95
|
+
return { options, multiple: bag.multiple === true };
|
|
96
|
+
}
|
|
97
|
+
export function readLinkSettings(raw) {
|
|
98
|
+
const allow = record(raw).allow;
|
|
99
|
+
return { allow: allow === "internal" || allow === "external" ? allow : "both" };
|
|
100
|
+
}
|
|
101
|
+
/** One id or a list, as stored under either setting (D5). */
|
|
102
|
+
export function readPickedIds(value) {
|
|
103
|
+
const list = Array.isArray(value) ? value : value === null || value === undefined ? [] : [value];
|
|
104
|
+
const out = [];
|
|
105
|
+
for (const entry of list) {
|
|
106
|
+
const id = uuidOrNull(entry);
|
|
107
|
+
if (id !== null && !out.includes(id))
|
|
108
|
+
out.push(id);
|
|
109
|
+
if (out.length >= CONTENT_PICKER_MAX_ITEMS)
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
return out;
|
|
113
|
+
}
|
|
114
|
+
export function readOptionValues(value) {
|
|
115
|
+
const list = Array.isArray(value) ? value.slice(0, OPTIONS_MAX) : [value];
|
|
116
|
+
const out = [];
|
|
117
|
+
for (const entry of list) {
|
|
118
|
+
if (typeof entry === "string" && entry !== "" && !out.includes(entry))
|
|
119
|
+
out.push(entry);
|
|
120
|
+
}
|
|
121
|
+
return out;
|
|
122
|
+
}
|
|
123
|
+
export function readLinkValue(value) {
|
|
124
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
125
|
+
return null;
|
|
126
|
+
const bag = value;
|
|
127
|
+
const label = typeof bag.label === "string" ? bag.label : "";
|
|
128
|
+
const newTab = bag.newTab === true;
|
|
129
|
+
const page = uuidOrNull(bag.page);
|
|
130
|
+
const url = typeof bag.url === "string" && bag.url.trim() !== "" ? bag.url.trim() : null;
|
|
131
|
+
if (page !== null && url === null && (bag.url === undefined || bag.url === null || bag.url === ""))
|
|
132
|
+
return { page, label, newTab };
|
|
133
|
+
if (url !== null && (bag.page === undefined || bag.page === null))
|
|
134
|
+
return { url, label, newTab };
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
/** The page ids a value of this editor holds (D7, and session D's nested walk). */
|
|
138
|
+
export function pickedPageIdsOf(editorId, value) {
|
|
139
|
+
if (editorId === CONTENT_PICKER_EDITOR_ID)
|
|
140
|
+
return readPickedIds(value);
|
|
141
|
+
if (editorId === LINK_EDITOR_ID) {
|
|
142
|
+
const link = readLinkValue(value);
|
|
143
|
+
return link?.page !== undefined ? [link.page] : [];
|
|
144
|
+
}
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
// Seeded by migration 0035 (D1), never by BUILT_IN_DATA_TYPE_CONFIGS. Parsed settings, so the
|
|
148
|
+
// stored row is what the data types screen saves back unchanged.
|
|
149
|
+
export const CONTENT_PICKER_DATA_TYPE_CONFIG = {
|
|
150
|
+
id: CONTENT_PICKER_DATA_TYPE_ID,
|
|
151
|
+
name: "Content Picker",
|
|
152
|
+
editorId: CONTENT_PICKER_EDITOR_ID,
|
|
153
|
+
settings: ContentPickerSettingsSchema.parse({}),
|
|
154
|
+
};
|
|
155
|
+
export const LINK_DATA_TYPE_CONFIG = {
|
|
156
|
+
id: LINK_DATA_TYPE_ID,
|
|
157
|
+
name: "Link",
|
|
158
|
+
editorId: LINK_EDITOR_ID,
|
|
159
|
+
settings: LinkSettingsSchema.parse({}),
|
|
160
|
+
};
|
|
@@ -6,6 +6,7 @@ export declare const TemplateKindSchema: z.ZodEnum<{
|
|
|
6
6
|
}>;
|
|
7
7
|
export type TemplateKind = z.infer<typeof TemplateKindSchema>;
|
|
8
8
|
export declare const TEMPLATE_ALIAS_MAX_SEGMENTS = 8;
|
|
9
|
+
export declare const TEMPLATE_BATCH_READ_MAX = 100;
|
|
9
10
|
export declare const TemplateAliasSchema: z.ZodString;
|
|
10
11
|
export declare const TEMPLATE_KIND_FOLDERS: {
|
|
11
12
|
readonly page: "pages";
|
|
@@ -18,6 +18,9 @@ export const TemplateKindSchema = z.enum(TEMPLATE_KINDS);
|
|
|
18
18
|
// service still asserts the joined path stays inside its folder. Plugin
|
|
19
19
|
// manifests keep flat aliases (PluginTemplateAliasSchema).
|
|
20
20
|
export const TEMPLATE_ALIAS_MAX_SEGMENTS = 8;
|
|
21
|
+
// M33 core part 7: the most template ids getCurrentTemplateVersions reads in one query. One page
|
|
22
|
+
// of templates (100); a caller with more reads them in chunks of this size.
|
|
23
|
+
export const TEMPLATE_BATCH_READ_MAX = 100;
|
|
21
24
|
const ALIAS_SEGMENT = "[a-z0-9]+(?:-[a-z0-9]+)*";
|
|
22
25
|
const TEMPLATE_ALIAS_REGEX = new RegExp(`^${ALIAS_SEGMENT}(?:/${ALIAS_SEGMENT}){0,${TEMPLATE_ALIAS_MAX_SEGMENTS - 1}}$`);
|
|
23
26
|
export const TemplateAliasSchema = z
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The error's stable code: what isTransactionRolledBackError reads. */
|
|
2
|
+
export declare const TRANSACTION_ROLLED_BACK_CODE = "TRANSACTION_ROLLED_BACK";
|
|
3
|
+
export declare class TransactionRolledBackError extends Error {
|
|
4
|
+
readonly code: typeof TRANSACTION_ROLLED_BACK_CODE;
|
|
5
|
+
/** `cause` is the failing statement's own error, when one ended the transaction. */
|
|
6
|
+
constructor(options?: {
|
|
7
|
+
cause?: unknown;
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
/** Whether a thrown value is the rolled back error. Read by name and code, not by
|
|
11
|
+
* `instanceof`, so a plugin bundle that carries its own copy of the SDK still recognises
|
|
12
|
+
* the error the host threw. */
|
|
13
|
+
export declare function isTransactionRolledBackError(value: unknown): value is TransactionRolledBackError;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// M33 (core part 1 carry): the error a structured transaction rejects with when the database
|
|
2
|
+
// rolled the transaction back. Thrown when the commit turned into a ROLLBACK (PostgreSQL does
|
|
3
|
+
// this, without an error, for a transaction a failed statement aborted), and when the database
|
|
4
|
+
// ended the transaction itself while a statement in it failed (a MySQL deadlock, 1213, which
|
|
5
|
+
// InnoDB answers by rolling the whole transaction back; a lost connection; an SQLite automatic
|
|
6
|
+
// rollback), so the rollback to that statement's savepoint failed too. `cause` is then the
|
|
7
|
+
// statement's own error, and a structured transaction that saw it refuses every later statement
|
|
8
|
+
// and rejects when its callback returns (on MySQL a statement after the rollback would otherwise
|
|
9
|
+
// autocommit on its own, and the commit would succeed as a no-op). The callback's writes are gone, so the transaction never resolves as
|
|
10
|
+
// though they were stored. The adapters throw this class and the plugin SDK exports it, so a
|
|
11
|
+
// plugin can tell "nothing was stored, retry the whole transaction" from any other failure.
|
|
12
|
+
/** The error's stable code: what isTransactionRolledBackError reads. */
|
|
13
|
+
export const TRANSACTION_ROLLED_BACK_CODE = "TRANSACTION_ROLLED_BACK";
|
|
14
|
+
export class TransactionRolledBackError extends Error {
|
|
15
|
+
code = TRANSACTION_ROLLED_BACK_CODE;
|
|
16
|
+
/** `cause` is the failing statement's own error, when one ended the transaction. */
|
|
17
|
+
constructor(options = {}) {
|
|
18
|
+
super("The transaction was rolled back because a statement inside it failed; none of its writes were stored", options);
|
|
19
|
+
this.name = "TransactionRolledBackError";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** Whether a thrown value is the rolled back error. Read by name and code, not by
|
|
23
|
+
* `instanceof`, so a plugin bundle that carries its own copy of the SDK still recognises
|
|
24
|
+
* the error the host threw. */
|
|
25
|
+
export function isTransactionRolledBackError(value) {
|
|
26
|
+
if (!(value instanceof Error))
|
|
27
|
+
return false;
|
|
28
|
+
return value.name === "TransactionRolledBackError" && value.code === TRANSACTION_ROLLED_BACK_CODE;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** M32 I (R9, R10): the most rows one permanent-delete call removes; `more` says another call is due. */
|
|
3
|
+
export declare const TRASH_PURGE_BATCH = 200;
|
|
4
|
+
export declare const TrashPurgeResponseSchema: z.ZodObject<{
|
|
5
|
+
purged: z.ZodNumber;
|
|
6
|
+
more: z.ZodBoolean;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type TrashPurgeResponse = z.infer<typeof TrashPurgeResponseSchema>;
|
|
9
|
+
/** The path of one trashed template, partial or asset. */
|
|
10
|
+
export declare const TrashedItemParamsSchema: z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export type TrashedItemParams = z.infer<typeof TrashedItemParamsSchema>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** M32 I (R9, R10): the most rows one permanent-delete call removes; `more` says another call is due. */
|
|
3
|
+
export const TRASH_PURGE_BATCH = 200;
|
|
4
|
+
export const TrashPurgeResponseSchema = z.object({ purged: z.number().int().nonnegative(), more: z.boolean() });
|
|
5
|
+
/** The path of one trashed template, partial or asset. */
|
|
6
|
+
export const TrashedItemParamsSchema = z.object({ id: z.string().uuid() }).strict();
|
|
@@ -6,6 +6,9 @@ export declare const UserSummarySchema: z.ZodObject<{
|
|
|
6
6
|
role: z.ZodString;
|
|
7
7
|
createdAt: z.ZodString;
|
|
8
8
|
system: z.ZodBoolean;
|
|
9
|
+
passwordSet: z.ZodBoolean;
|
|
10
|
+
identityCount: z.ZodNumber;
|
|
11
|
+
disabledAt: z.ZodNullable<z.ZodString>;
|
|
9
12
|
}, z.core.$strip>;
|
|
10
13
|
export type UserSummary = z.infer<typeof UserSummarySchema>;
|
|
11
14
|
export declare const UserParamsSchema: z.ZodObject<{
|
|
@@ -25,6 +28,9 @@ export declare const UserListResponseSchema: z.ZodObject<{
|
|
|
25
28
|
role: z.ZodString;
|
|
26
29
|
createdAt: z.ZodString;
|
|
27
30
|
system: z.ZodBoolean;
|
|
31
|
+
passwordSet: z.ZodBoolean;
|
|
32
|
+
identityCount: z.ZodNumber;
|
|
33
|
+
disabledAt: z.ZodNullable<z.ZodString>;
|
|
28
34
|
}, z.core.$strip>>;
|
|
29
35
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
30
36
|
}, z.core.$strip>;
|
|
@@ -44,6 +50,9 @@ export declare const CreateUserResponseSchema: z.ZodObject<{
|
|
|
44
50
|
role: z.ZodString;
|
|
45
51
|
createdAt: z.ZodString;
|
|
46
52
|
system: z.ZodBoolean;
|
|
53
|
+
passwordSet: z.ZodBoolean;
|
|
54
|
+
identityCount: z.ZodNumber;
|
|
55
|
+
disabledAt: z.ZodNullable<z.ZodString>;
|
|
47
56
|
}, z.core.$strip>;
|
|
48
57
|
}, z.core.$strip>;
|
|
49
58
|
export type CreateUserResponse = z.infer<typeof CreateUserResponseSchema>;
|
|
@@ -59,14 +68,60 @@ export declare const UpdateUserRoleResponseSchema: z.ZodObject<{
|
|
|
59
68
|
role: z.ZodString;
|
|
60
69
|
createdAt: z.ZodString;
|
|
61
70
|
system: z.ZodBoolean;
|
|
71
|
+
passwordSet: z.ZodBoolean;
|
|
72
|
+
identityCount: z.ZodNumber;
|
|
73
|
+
disabledAt: z.ZodNullable<z.ZodString>;
|
|
62
74
|
}, z.core.$strip>;
|
|
63
75
|
}, z.core.$strip>;
|
|
64
76
|
export type UpdateUserRoleResponse = z.infer<typeof UpdateUserRoleResponseSchema>;
|
|
77
|
+
/**
|
|
78
|
+
* M32 I6f (S11): the 409 of a role change that would give a role managing the site (one holding an
|
|
79
|
+
* action of SIGN_IN_BARRED_ACTIONS) to an account without a password. Password sign-in never
|
|
80
|
+
* depends on a plugin, so every account that manages the site keeps a way in when a sign-in
|
|
81
|
+
* provider plugin is switched off.
|
|
82
|
+
*/
|
|
83
|
+
export declare const PASSWORD_NEEDED_MESSAGE = "This person signs in only through a sign-in plugin. Ask them to set a password first, with 'Forgot password?'";
|
|
84
|
+
/** M32 I6f (S11): the same 409 from PATCH /roles/:id, when the edit adds a managing action to a role a person without a password holds. */
|
|
85
|
+
export declare const ROLE_PASSWORD_NEEDED_MESSAGE = "Someone with this role signs in only through a sign-in plugin. Ask them to set a password first, with 'Forgot password?'";
|
|
86
|
+
export declare const PasswordNeededErrorSchema: z.ZodObject<{
|
|
87
|
+
code: z.ZodLiteral<"password_needed">;
|
|
88
|
+
message: z.ZodString;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export type PasswordNeededError = z.infer<typeof PasswordNeededErrorSchema>;
|
|
91
|
+
export declare const SetUserDisabledRequestSchema: z.ZodObject<{
|
|
92
|
+
disabled: z.ZodBoolean;
|
|
93
|
+
revokeKeys: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
export type SetUserDisabledRequest = z.infer<typeof SetUserDisabledRequestSchema>;
|
|
96
|
+
export declare const SetUserDisabledResponseSchema: z.ZodObject<{
|
|
97
|
+
user: z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
email: z.ZodString;
|
|
100
|
+
name: z.ZodNullable<z.ZodString>;
|
|
101
|
+
role: z.ZodString;
|
|
102
|
+
createdAt: z.ZodString;
|
|
103
|
+
system: z.ZodBoolean;
|
|
104
|
+
passwordSet: z.ZodBoolean;
|
|
105
|
+
identityCount: z.ZodNumber;
|
|
106
|
+
disabledAt: z.ZodNullable<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
keysRevoked: z.ZodNumber;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type SetUserDisabledResponse = z.infer<typeof SetUserDisabledResponseSchema>;
|
|
111
|
+
export declare const DeleteUserQuerySchema: z.ZodObject<{
|
|
112
|
+
revokeKeys: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
true: "true";
|
|
114
|
+
false: "false";
|
|
115
|
+
}>>;
|
|
116
|
+
}, z.core.$strict>;
|
|
117
|
+
export type DeleteUserQuery = z.infer<typeof DeleteUserQuerySchema>;
|
|
65
118
|
export declare const DeleteUserResponseSchema: z.ZodObject<{
|
|
66
119
|
deleted: z.ZodLiteral<true>;
|
|
120
|
+
keysRevoked: z.ZodNumber;
|
|
67
121
|
}, z.core.$strip>;
|
|
122
|
+
export declare const REVOKE_KEYS_SESSION_ONLY_MESSAGE = "Revoking a person's API keys takes a signed-in person whose role holds apiKeys.revoke";
|
|
68
123
|
export type DeleteUserResponse = z.infer<typeof DeleteUserResponseSchema>;
|
|
69
|
-
export declare const ADMIN_LOCALES: readonly ["en", "de"];
|
|
124
|
+
export declare const ADMIN_LOCALES: readonly ["en", "de", "ar"];
|
|
70
125
|
export type AdminLocale = (typeof ADMIN_LOCALES)[number];
|
|
71
126
|
export declare const ThemeModeSchema: z.ZodEnum<{
|
|
72
127
|
system: "system";
|
|
@@ -76,6 +131,7 @@ export declare const ThemeModeSchema: z.ZodEnum<{
|
|
|
76
131
|
export declare const UserPreferencesSchema: z.ZodObject<{
|
|
77
132
|
locale: z.ZodNullable<z.ZodEnum<{
|
|
78
133
|
en: "en";
|
|
134
|
+
ar: "ar";
|
|
79
135
|
de: "de";
|
|
80
136
|
}>>;
|
|
81
137
|
themeMode: z.ZodNullable<z.ZodEnum<{
|
|
@@ -95,6 +151,7 @@ export type UserPreferences = z.infer<typeof UserPreferencesSchema>;
|
|
|
95
151
|
export declare const UpdateUserPreferencesSchema: z.ZodObject<{
|
|
96
152
|
locale: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
97
153
|
en: "en";
|
|
154
|
+
ar: "ar";
|
|
98
155
|
de: "de";
|
|
99
156
|
}>>>;
|
|
100
157
|
themeMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NewPasswordSchema } from "./password-reset.schema.js";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import { HomeLayoutSchema } from "./home.schema.js";
|
|
3
4
|
import { RoleIdSchema } from "./role.schema.js";
|
|
@@ -13,6 +14,13 @@ export const UserSummarySchema = z.object({
|
|
|
13
14
|
// S301: true for the one account the server writes under for an API key (the
|
|
14
15
|
// system account, api-author@kardalum.internal). A person's account is false.
|
|
15
16
|
system: z.boolean(),
|
|
17
|
+
// M32 F4b (D52): whether the person has a password they can use, and how many sign-in
|
|
18
|
+
// providers they are linked to, so the users list can say how each person signs in.
|
|
19
|
+
passwordSet: z.boolean(),
|
|
20
|
+
identityCount: z.number().int().nonnegative(),
|
|
21
|
+
// M32 F4b (D59): when the person was disabled, or null while they may sign in. A disabled
|
|
22
|
+
// person signs in by no method, and none of their sessions or AI connection keys answers.
|
|
23
|
+
disabledAt: z.string().datetime().nullable(),
|
|
16
24
|
});
|
|
17
25
|
// S301: the params of PATCH /users/:id/role, moved here from the route file.
|
|
18
26
|
export const UserParamsSchema = z.object({ id: z.string().uuid() });
|
|
@@ -28,7 +36,7 @@ export const UserListResponseSchema = z.object({
|
|
|
28
36
|
export const CreateUserRequestSchema = z.object({
|
|
29
37
|
email: z.string().email(),
|
|
30
38
|
name: z.string().min(1).optional(),
|
|
31
|
-
password:
|
|
39
|
+
password: NewPasswordSchema,
|
|
32
40
|
role: RoleIdSchema,
|
|
33
41
|
});
|
|
34
42
|
export const CreateUserResponseSchema = z.object({
|
|
@@ -40,9 +48,32 @@ export const UpdateUserRoleRequestSchema = z.object({
|
|
|
40
48
|
export const UpdateUserRoleResponseSchema = z.object({
|
|
41
49
|
user: UserSummarySchema,
|
|
42
50
|
});
|
|
51
|
+
/**
|
|
52
|
+
* M32 I6f (S11): the 409 of a role change that would give a role managing the site (one holding an
|
|
53
|
+
* action of SIGN_IN_BARRED_ACTIONS) to an account without a password. Password sign-in never
|
|
54
|
+
* depends on a plugin, so every account that manages the site keeps a way in when a sign-in
|
|
55
|
+
* provider plugin is switched off.
|
|
56
|
+
*/
|
|
57
|
+
export const PASSWORD_NEEDED_MESSAGE = "This person signs in only through a sign-in plugin. Ask them to set a password first, with 'Forgot password?'";
|
|
58
|
+
/** M32 I6f (S11): the same 409 from PATCH /roles/:id, when the edit adds a managing action to a role a person without a password holds. */
|
|
59
|
+
export const ROLE_PASSWORD_NEEDED_MESSAGE = "Someone with this role signs in only through a sign-in plugin. Ask them to set a password first, with 'Forgot password?'";
|
|
60
|
+
export const PasswordNeededErrorSchema = z.object({
|
|
61
|
+
code: z.literal("password_needed"),
|
|
62
|
+
message: z.string(),
|
|
63
|
+
});
|
|
64
|
+
// M32 F4b (D59): the body of PATCH /users/:id/disabled. True disables the account (every session
|
|
65
|
+
// ends, and its AI connection keys stop answering); false enables it again, bringing no session back.
|
|
66
|
+
export const SetUserDisabledRequestSchema = z.object({ disabled: z.boolean(), revokeKeys: z.boolean().optional() }).strict();
|
|
67
|
+
export const SetUserDisabledResponseSchema = z.object({
|
|
68
|
+
user: UserSummarySchema,
|
|
69
|
+
// M32 I (R4): how many live keys the person made were revoked with this call.
|
|
70
|
+
keysRevoked: z.number().int().nonnegative(),
|
|
71
|
+
});
|
|
43
72
|
// S309: DELETE /users/:id answers this. The delete removes the account, ends its
|
|
44
73
|
// sessions and moves its uploads to the system account; it rewrites no authored row.
|
|
45
|
-
export const
|
|
74
|
+
export const DeleteUserQuerySchema = z.object({ revokeKeys: z.enum(["true", "false"]).optional() }).strict();
|
|
75
|
+
export const DeleteUserResponseSchema = z.object({ deleted: z.literal(true), keysRevoked: z.number().int().nonnegative() });
|
|
76
|
+
export const REVOKE_KEYS_SESSION_ONLY_MESSAGE = "Revoking a person's API keys takes a signed-in person whose role holds apiKeys.revoke";
|
|
46
77
|
// The admin interface languages that actually ship. ONE list, here,
|
|
47
78
|
// because three consumers have to agree: the server validates against
|
|
48
79
|
// it, the admin registers a bundle per entry, and the user menu offers
|
|
@@ -62,7 +93,7 @@ export const DeleteUserResponseSchema = z.object({ deleted: z.literal(true) });
|
|
|
62
93
|
// Languages screen). See the spec's section 1: that is what language the
|
|
63
94
|
// site's CONTENT is written in, this is what language the admin's own
|
|
64
95
|
// chrome renders in.
|
|
65
|
-
export const ADMIN_LOCALES = ["en", "de"];
|
|
96
|
+
export const ADMIN_LOCALES = ["en", "de", "ar"];
|
|
66
97
|
export const ThemeModeSchema = z.enum(["light", "dark", "system"]);
|
|
67
98
|
export const UserPreferencesSchema = z.object({
|
|
68
99
|
locale: z.enum(ADMIN_LOCALES).nullable(),
|
|
@@ -57,9 +57,9 @@ export declare const VendorTokenPayloadSchema: z.ZodObject<{
|
|
|
57
57
|
term: z.ZodObject<{
|
|
58
58
|
state: z.ZodEnum<{
|
|
59
59
|
active: "active";
|
|
60
|
+
lapsed: "lapsed";
|
|
60
61
|
renewing: "renewing";
|
|
61
62
|
past_due: "past_due";
|
|
62
|
-
lapsed: "lapsed";
|
|
63
63
|
}>;
|
|
64
64
|
endsAt: z.ZodNullable<z.ZodISODateTime>;
|
|
65
65
|
}, z.core.$strict>;
|
|
@@ -74,6 +74,10 @@ export declare const VendorTokenRequestSchema: z.ZodObject<{
|
|
|
74
74
|
pluginId: z.ZodString;
|
|
75
75
|
domain: z.ZodString;
|
|
76
76
|
aud: z.ZodString;
|
|
77
|
+
address: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
local: "local";
|
|
79
|
+
public: "public";
|
|
80
|
+
}>>;
|
|
77
81
|
}, z.core.$strict>;
|
|
78
82
|
export type VendorTokenRequest = z.infer<typeof VendorTokenRequestSchema>;
|
|
79
83
|
export declare const VendorTokenResponseSchema: z.ZodObject<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { LicenceKeyFieldSchema, SiteReachSchema } from "./marketplace-sites.schema.js";
|
|
2
3
|
import { PLAN_KEY_MAX, PLAN_NAME_MAX } from "./plan-editor.schema.js";
|
|
3
4
|
// S320 (2026-11-01-s320-vendor-service-design.md): the vendor service. A paid
|
|
4
5
|
// plugin's server-side code calls its author's server through the CMS, which
|
|
@@ -88,12 +89,12 @@ export const VendorTokenPayloadSchema = z
|
|
|
88
89
|
/** Spec 3b: what the CMS sends. The key is the credential. */
|
|
89
90
|
export const VendorTokenRequestSchema = z
|
|
90
91
|
.object({
|
|
91
|
-
key:
|
|
92
|
+
key: LicenceKeyFieldSchema,
|
|
92
93
|
pluginId: z.string().min(1).max(128),
|
|
93
|
-
// Trimmed before the length check, so a whitespace-only domain is a 400
|
|
94
|
-
// here and never reaches the signer as "" (S320 fix wave, M7).
|
|
95
94
|
domain: z.string().trim().min(1).max(253),
|
|
96
95
|
aud: z.string().min(1).max(VENDOR_SERVICE_ORIGIN_MAX),
|
|
96
|
+
// S367d (D4, D5): whether the site answers public visitors, as the CMS saw it.
|
|
97
|
+
address: SiteReachSchema.optional(),
|
|
97
98
|
})
|
|
98
99
|
.strict();
|
|
99
100
|
export const VendorTokenResponseSchema = z.object({ token: z.string().min(3).max(VENDOR_TOKEN_MAX_LENGTH), expiresAt: instant });
|
|
@@ -34,6 +34,12 @@ export function buildTokensCss() {
|
|
|
34
34
|
'/* Arabic locales lead with Plex Sans Arabic: same token, language-conditional value. */',
|
|
35
35
|
'[lang="ar"], [lang^="ar-"] {',
|
|
36
36
|
` --font-family-sans: ${ARABIC_SANS_FONT_FAMILY};`,
|
|
37
|
+
// Arabic letters join, so any tracking pulls a word apart. The admin's
|
|
38
|
+
// tracking-* classes read these variables (measured in S366f), so zeroing
|
|
39
|
+
// the variables fixes every use without a class in a component.
|
|
40
|
+
...['tighter', 'tight', 'normal', 'wide', 'wider', 'widest'].map((name) => ` --tracking-${name}: 0em;`),
|
|
41
|
+
// A slanted or smeared Arabic word is broken text, so never synthesize.
|
|
42
|
+
' font-synthesis-style: none;',
|
|
37
43
|
'}',
|
|
38
44
|
].join('\n');
|
|
39
45
|
return ([
|
|
@@ -126,6 +126,11 @@
|
|
|
126
126
|
--text-3xl: var(--font-size-3xl);
|
|
127
127
|
--text-4xl: var(--font-size-4xl);
|
|
128
128
|
--text-5xl: var(--font-size-5xl);
|
|
129
|
+
--text-site-small: var(--font-size-site-small);
|
|
130
|
+
--text-site-body: var(--font-size-site-body);
|
|
131
|
+
--text-site-lede: var(--font-size-site-lede);
|
|
132
|
+
--text-site-heading: var(--font-size-site-heading);
|
|
133
|
+
--text-site-display: var(--font-size-site-display);
|
|
129
134
|
--font-weight-normal: var(--font-weight-normal);
|
|
130
135
|
--font-weight-medium: var(--font-weight-medium);
|
|
131
136
|
--font-weight-semibold: var(--font-weight-semibold);
|
|
@@ -23,7 +23,7 @@ export declare const tailwindTheme: {
|
|
|
23
23
|
serif: string;
|
|
24
24
|
mono: string;
|
|
25
25
|
};
|
|
26
|
-
fontSize: Record<"xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl", string>;
|
|
26
|
+
fontSize: Record<"xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "site-small" | "site-body" | "site-lede" | "site-heading" | "site-display", string>;
|
|
27
27
|
fontWeight: Record<"normal" | "medium" | "semibold" | "bold", string>;
|
|
28
28
|
lineHeight: Record<"normal" | "tight" | "relaxed", string>;
|
|
29
29
|
spacing: Record<import("./types.js").SpacingStep, string>;
|
|
@@ -145,8 +145,8 @@
|
|
|
145
145
|
--motion-easing-exit: cubic-bezier(0.4, 0, 1, 1);
|
|
146
146
|
--direction: ltr;
|
|
147
147
|
--font-family-sans: 'IBM Plex Sans', 'IBM Plex Sans Arabic', ui-sans-serif, system-ui, sans-serif;
|
|
148
|
-
--font-family-serif: 'Literata', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
|
|
149
|
-
--font-family-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
|
|
148
|
+
--font-family-serif: 'Literata', 'IBM Plex Sans Arabic', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
|
|
149
|
+
--font-family-mono: 'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, 'Cascadia Code', Consolas, monospace;
|
|
150
150
|
--font-size-xs: 0.75rem;
|
|
151
151
|
--font-size-sm: 0.8125rem;
|
|
152
152
|
--font-size-base: 0.875rem;
|
|
@@ -156,6 +156,11 @@
|
|
|
156
156
|
--font-size-3xl: 1.875rem;
|
|
157
157
|
--font-size-4xl: clamp(1.9rem, 3.4vw, 2.6rem);
|
|
158
158
|
--font-size-5xl: clamp(2.6rem, 4.6vw, 3.4rem);
|
|
159
|
+
--font-size-site-small: 0.8125rem;
|
|
160
|
+
--font-size-site-body: 0.9375rem;
|
|
161
|
+
--font-size-site-lede: 1.125rem;
|
|
162
|
+
--font-size-site-heading: 1.5rem;
|
|
163
|
+
--font-size-site-display: clamp(1.9rem, 3.4vw, 2.6rem);
|
|
159
164
|
--font-weight-normal: 400;
|
|
160
165
|
--font-weight-medium: 500;
|
|
161
166
|
--font-weight-semibold: 600;
|
|
@@ -237,5 +242,12 @@
|
|
|
237
242
|
|
|
238
243
|
/* Arabic locales lead with Plex Sans Arabic: same token, language-conditional value. */
|
|
239
244
|
[lang="ar"], [lang^="ar-"] {
|
|
240
|
-
--font-family-sans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
|
|
245
|
+
--font-family-sans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', ui-sans-serif, system-ui, 'Segoe UI', Tahoma, sans-serif;
|
|
246
|
+
--tracking-tighter: 0em;
|
|
247
|
+
--tracking-tight: 0em;
|
|
248
|
+
--tracking-normal: 0em;
|
|
249
|
+
--tracking-wide: 0em;
|
|
250
|
+
--tracking-wider: 0em;
|
|
251
|
+
--tracking-widest: 0em;
|
|
252
|
+
font-synthesis-style: none;
|
|
241
253
|
}
|