@kardalum/plugin-sdk 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +281 -0
- package/README.md +19 -0
- package/dist/admin-section-registry.d.ts +48 -1
- package/dist/admin-section-registry.js +90 -0
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +86 -0
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +38 -7
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +101 -4
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/consent-entry.d.ts +11 -0
- package/dist/consent-entry.js +18 -0
- package/dist/content-library.d.ts +102 -0
- package/dist/content-library.js +15 -0
- package/dist/content-list-extensions.d.ts +50 -0
- package/dist/content-list-extensions.js +11 -0
- package/dist/content-picker/page-picker-sheet.d.ts +15 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-picker.d.ts +18 -0
- package/dist/content-picker/page-picker.js +20 -0
- package/dist/content-picker/page-tree.d.ts +25 -0
- package/dist/content-picker/page-tree.js +132 -0
- package/dist/data-type-plugin.d.ts +7 -1
- package/dist/datatype-validation.d.ts +4 -9
- package/dist/datatype-validation.js +147 -1
- package/dist/datatypes-entry.d.ts +1 -0
- package/dist/datatypes-entry.js +2 -0
- package/dist/entitlement-entry.d.ts +1 -1
- package/dist/entitlement-entry.js +1 -1
- package/dist/entitlement-gate.d.ts +14 -0
- package/dist/entitlement-gate.js +64 -7
- package/dist/entitlement-plan.d.ts +6 -0
- package/dist/entitlement-plan.js +10 -0
- package/dist/entitlement-types.d.ts +53 -12
- package/dist/entitlement.d.ts +31 -4
- package/dist/entitlement.js +58 -17
- package/dist/hook-entry.d.ts +5 -0
- package/dist/hook-entry.js +30 -0
- package/dist/host-entry.d.ts +7 -1
- package/dist/host-entry.js +14 -1
- package/dist/index.d.ts +67 -7
- package/dist/index.js +94 -6
- package/dist/mail.d.ts +34 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +47 -4
- package/dist/manifest-entry.js +63 -2
- package/dist/manifest-schema.d.ts +993 -40
- package/dist/manifest-schema.js +516 -26
- package/dist/manifest.d.ts +1186 -62
- package/dist/manifest.js +8 -4
- package/dist/media/media-picker.js +31 -18
- package/dist/media/upload-error.d.ts +5 -1
- package/dist/media/upload-error.js +14 -2
- package/dist/media-library.d.ts +32 -0
- package/dist/media-library.js +15 -0
- package/dist/nested-field-host.d.ts +76 -0
- package/dist/nested-field-host.js +90 -0
- package/dist/notify.d.ts +12 -4
- package/dist/notify.js +1 -1
- package/dist/outbound.d.ts +47 -0
- package/dist/outbound.js +1 -0
- package/dist/plugin-context.d.ts +52 -0
- package/dist/plugin-context.js +27 -0
- package/dist/plugin-permissions.d.ts +18 -0
- package/dist/plugin-permissions.js +25 -0
- package/dist/plugin-screen-context.d.ts +262 -9
- package/dist/plugin-screen-context.js +56 -0
- package/dist/providers.d.ts +313 -0
- package/dist/providers.js +74 -0
- package/dist/read-all-pages.d.ts +5 -0
- package/dist/read-all-pages.js +3 -2
- package/dist/render-page.d.ts +15 -0
- package/dist/render-page.js +20 -0
- package/dist/richtext/block-panel.d.ts +12 -1
- package/dist/richtext/block-panel.js +36 -25
- package/dist/richtext/button-view.d.ts +11 -0
- package/dist/richtext/button-view.js +45 -0
- package/dist/richtext/content-guard.d.ts +4 -0
- package/dist/richtext/content-guard.js +27 -0
- package/dist/richtext/editor-handle.d.ts +34 -0
- package/dist/richtext/editor-handle.js +225 -0
- package/dist/richtext/extensions.d.ts +6 -0
- package/dist/richtext/extensions.js +16 -0
- package/dist/richtext/insert-menu.d.ts +6 -1
- package/dist/richtext/insert-menu.js +45 -22
- package/dist/richtext/item-attributes.d.ts +6 -0
- package/dist/richtext/item-attributes.js +19 -0
- package/dist/richtext/item-panel.d.ts +25 -0
- package/dist/richtext/item-panel.js +118 -0
- package/dist/richtext/item-view.d.ts +58 -0
- package/dist/richtext/item-view.js +172 -0
- package/dist/richtext/mark-form.d.ts +10 -0
- package/dist/richtext/mark-form.js +38 -0
- package/dist/richtext/paste-choice.d.ts +9 -0
- package/dist/richtext/paste-choice.js +13 -0
- package/dist/richtext/plugin-items.d.ts +72 -0
- package/dist/richtext/plugin-items.js +562 -0
- package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
- package/dist/richtext/plugin-mark-tooltips.js +44 -0
- package/dist/richtext/plugin-toolbar.d.ts +57 -0
- package/dist/richtext/plugin-toolbar.js +186 -0
- package/dist/richtext/rich-item-icons.d.ts +5 -0
- package/dist/richtext/rich-item-icons.js +42 -0
- package/dist/richtext/rich-items.d.ts +42 -0
- package/dist/richtext/rich-items.js +68 -0
- package/dist/richtext/rich-text-view-host.d.ts +24 -0
- package/dist/richtext/rich-text-view-host.js +11 -0
- package/dist/richtext/style-listbox.js +6 -4
- package/dist/richtext/toolbar-button.d.ts +16 -0
- package/dist/richtext/toolbar-button.js +9 -0
- package/dist/richtext/url-paste.d.ts +20 -0
- package/dist/richtext/url-paste.js +82 -0
- package/dist/richtext-html-entry.d.ts +5 -0
- package/dist/richtext-html-entry.js +11 -0
- package/dist/sdk-strings.d.ts +344 -0
- package/dist/sdk-strings.js +411 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/service-contract.d.ts +17 -0
- package/dist/service-contract.js +39 -0
- package/dist/services.d.ts +114 -0
- package/dist/services.js +1 -0
- package/dist/simple-storage-value-provider.js +24 -24
- package/dist/structured-storage-types.d.ts +429 -9
- package/dist/tailwind.js +10 -5
- package/dist/template-reads.d.ts +16 -0
- package/dist/template-reads.js +21 -0
- package/dist/testing-entry.d.ts +38 -0
- package/dist/testing-entry.js +173 -0
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +7 -0
- package/dist/tokens/system-dark.css +1 -0
- package/dist/tokens/tailwind-theme.css +7 -0
- package/dist/tokens/tokens.css +19 -3
- package/dist/tokens/tokens.json +13 -4
- package/dist/uploads.d.ts +43 -0
- package/dist/uploads.js +1 -0
- package/dist/user-library.d.ts +51 -0
- package/dist/user-library.js +15 -0
- package/dist/view-helpers.d.ts +18 -0
- package/dist/view-helpers.js +64 -0
- package/dist/views/asset-view.js +4 -1
- package/dist/views/content-list-preview.js +3 -1
- package/dist/views/content-list-settings-view.js +11 -7
- package/dist/views/content-list-view.d.ts +5 -3
- package/dist/views/content-list-view.js +243 -40
- package/dist/views/content-picker-view.d.ts +3 -0
- package/dist/views/content-picker-view.js +143 -0
- package/dist/views/crop-view.d.ts +4 -6
- package/dist/views/crop-view.js +22 -13
- package/dist/views/date-range-view.js +4 -1
- package/dist/views/file-upload-view.d.ts +5 -7
- package/dist/views/file-upload-view.js +16 -7
- package/dist/views/group-view.d.ts +8 -0
- package/dist/views/group-view.js +123 -0
- package/dist/views/html-view.js +7 -6
- package/dist/views/image-view.js +37 -19
- package/dist/views/link-view.d.ts +3 -0
- package/dist/views/link-view.js +150 -0
- package/dist/views/options-list-view.d.ts +3 -0
- package/dist/views/options-list-view.js +104 -0
- package/dist/views/repeatable-list-view.d.ts +3 -0
- package/dist/views/repeatable-list-view.js +113 -0
- package/dist/views/rich-text-view.d.ts +2 -0
- package/dist/views/rich-text-view.js +208 -35
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/dist/views/unreadable-rich-text.d.ts +17 -0
- package/dist/views/unreadable-rich-text.js +40 -0
- package/dist/visitors.d.ts +81 -0
- package/dist/visitors.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +334 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +254 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +11 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +144 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +137 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +178 -2
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +55 -13
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +22 -10
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +257 -15
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +78 -5
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +162 -48
- package/node_modules/@kardalum/api-schemas/dist/index.js +137 -30
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +226 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +409 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +490 -10
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +53 -3
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +38 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +60 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +333 -0
- package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
- package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +84 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +44 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +44 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +16 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +119 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +216 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +46 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +41 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +304 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +220 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +408 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +307 -23
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +23 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +61 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +23 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +37 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +346 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +461 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +352 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +409 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +347 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +976 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +307 -4
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +71 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +540 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +394 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +201 -1
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +97 -8
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +64 -1
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +53 -2
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +386 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +618 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +188 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +72 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +36 -3
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
- package/node_modules/@kardalum/api-schemas/package.json +2 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +15 -1
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +7 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +2 -1
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +19 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +18 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +13 -4
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +5 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +38 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +17 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +625 -35
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +47 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +40 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +76 -6
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +99 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +5 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +316 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +40 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +150 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +69 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +8 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +7 -1
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
- package/node_modules/@kardalum/plugin-package/package.json +4 -0
- package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
- package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/index.js +2 -0
- package/package.json +25 -3
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { createContext, createElement, Fragment, useContext, useMemo } from "react";
|
|
2
|
+
// S366f spec D11: every word the SDK's built-in views show, in English, keyed
|
|
3
|
+
// `<view>.<name>`. The admin holds the same keys under the `sdk` subtree of its
|
|
4
|
+
// own locale files (a test there keeps its English deep-equal to this object)
|
|
5
|
+
// and renders SdkHostProvider once, so a built-in view mounted in the admin
|
|
6
|
+
// reads in the admin's language. Anywhere else (a plugin's own tests, the dev
|
|
7
|
+
// harness) there is no provider and the views answer from this object.
|
|
8
|
+
export const SDK_STRINGS_EN = {
|
|
9
|
+
"shared.unexpectedAnswer": "unexpected answer",
|
|
10
|
+
"shared.uploadFailed": "Upload failed ({{status}})",
|
|
11
|
+
"shared.mediaStoreSwitchedOff": "The media store was switched off while the file was saved. Upload it again.",
|
|
12
|
+
"text.placeholderLabel": "Placeholder text",
|
|
13
|
+
"text.maxLengthLabel": "Max length",
|
|
14
|
+
"text.maxLengthHelp": "Blocks typing past this many characters. Leave blank for no limit.",
|
|
15
|
+
"boolean.yes": "Yes",
|
|
16
|
+
"boolean.no": "No",
|
|
17
|
+
"dateRange.start": "Start",
|
|
18
|
+
"dateRange.end": "End",
|
|
19
|
+
"html.loading": "Loading code editor…",
|
|
20
|
+
"html.trustedLabel": "Trusted",
|
|
21
|
+
"html.trustedHelp": "Trusted HTML renders exactly as written: including scripts. Only enable for fields edited by people you'd let deploy code.",
|
|
22
|
+
"contentList.caption": "Children",
|
|
23
|
+
"contentList.pageOnly": "Shown on a page's editing screen.",
|
|
24
|
+
"contentList.propertyName": "Name",
|
|
25
|
+
"contentList.propertyId": "Id",
|
|
26
|
+
"contentList.propertyUrl": "URL",
|
|
27
|
+
"contentList.propertyStatus": "Status",
|
|
28
|
+
"contentList.propertyUpdatedAt": "Updated",
|
|
29
|
+
"contentList.propertyPublishedAt": "Published",
|
|
30
|
+
"contentList.statusDraft": "Draft",
|
|
31
|
+
"contentList.statusPublished": "Published",
|
|
32
|
+
"contentList.statusChanges": "Changes not published",
|
|
33
|
+
"contentList.loadError": "Could not load the children.",
|
|
34
|
+
"contentList.restrictedForYou": "Restricted for you",
|
|
35
|
+
"contentList.restricted": "Restricted",
|
|
36
|
+
"contentList.yes": "Yes",
|
|
37
|
+
"contentList.no": "No",
|
|
38
|
+
"contentList.valueRichText": "Rich text",
|
|
39
|
+
"contentList.valueImage": "Image",
|
|
40
|
+
"contentList.valueDateRange": "Date range",
|
|
41
|
+
"contentList.value": "Value",
|
|
42
|
+
"contentList.search": "Search by name",
|
|
43
|
+
"contentList.new": "New",
|
|
44
|
+
"contentList.retry": "Retry",
|
|
45
|
+
"contentList.loading": "Loading…",
|
|
46
|
+
"contentList.noMatches": "Nothing matches.",
|
|
47
|
+
"contentList.noChildren": "No children yet.",
|
|
48
|
+
"contentList.loadMore": "Load more",
|
|
49
|
+
"contentList.filter": "Filter",
|
|
50
|
+
"contentList.filterAll": "All pages",
|
|
51
|
+
"contentList.filterUnavailable": "This filter could not be applied. Try again, or choose All pages.",
|
|
52
|
+
"contentList.scanCapped": "Only part of the list was checked. Load more to keep looking.",
|
|
53
|
+
"contentList.cellUnavailable": "Not available",
|
|
54
|
+
"contentList.rowActions": "Actions for {{name}}",
|
|
55
|
+
"contentList.rowActionsHeader": "Actions",
|
|
56
|
+
"contentList.select": "Select {{name}}",
|
|
57
|
+
"contentList.selectLoaded": "Select the loaded pages",
|
|
58
|
+
"contentList.selectedCount": "Selected: {{selected}}",
|
|
59
|
+
"contentList.selectionLimit": "At most {{max}} pages can be selected.",
|
|
60
|
+
"contentList.clearSelection": "Clear selection",
|
|
61
|
+
"contentList.bulkActionsLabel": "With the selected pages",
|
|
62
|
+
"contentListSettings.fieldColumn": "{{alias}} ({{type}}: {{field}})",
|
|
63
|
+
"contentListSettings.label": "Label",
|
|
64
|
+
"contentListSettings.moveUp": "Move up",
|
|
65
|
+
"contentListSettings.moveUpNamed": "Move up {{column}}",
|
|
66
|
+
"contentListSettings.moveDown": "Move down",
|
|
67
|
+
"contentListSettings.moveDownNamed": "Move down {{column}}",
|
|
68
|
+
"contentListSettings.remove": "Remove",
|
|
69
|
+
"contentListSettings.removeNamed": "Remove {{column}}",
|
|
70
|
+
"contentListSettings.addColumn": "Add column",
|
|
71
|
+
"contentListSettings.chooseColumn": "Choose a column",
|
|
72
|
+
"contentListSettings.properties": "Properties",
|
|
73
|
+
"contentListSettings.fieldOption": "{{field}} ({{alias}})",
|
|
74
|
+
"contentListSettings.otherAlias": "Other alias",
|
|
75
|
+
"contentListSettings.add": "Add",
|
|
76
|
+
"crop.cannotCut": "This format cannot be cut.",
|
|
77
|
+
"crop.notCut": "Not cut yet.",
|
|
78
|
+
"crop.cutRegion": "Cut from a region {{width}} wide and {{height}} tall.",
|
|
79
|
+
"crop.ratio": "Ratio {{ratio}}",
|
|
80
|
+
"crop.noRatio": "No ratio set.",
|
|
81
|
+
"crop.savesAs": "Saves as the {{name}} rendition.",
|
|
82
|
+
"crop.maxWidth": "At most {{width}} px wide.",
|
|
83
|
+
"crop.ratioError": "A ratio looks like 3:4, with no leading zeros.",
|
|
84
|
+
"crop.maxWidthError": "A maximum width is a whole number of pixels, at least 1.",
|
|
85
|
+
"crop.ratioLabel": "Ratio",
|
|
86
|
+
"crop.required": "Required",
|
|
87
|
+
"crop.ratioHelp": "The shape the cropper locks to, width first, such as 3:4.",
|
|
88
|
+
"crop.maxWidthLabel": "Maximum width",
|
|
89
|
+
"crop.maxWidthHelp": "A ceiling in pixels. Leave blank for none: the cut then keeps the source region's own resolution, and it never enlarges.",
|
|
90
|
+
"thumbnail.cannotCut": "This format cannot be cut.",
|
|
91
|
+
"thumbnail.automatic": "Automatic",
|
|
92
|
+
"thumbnail.longestEdge": "Longest edge {{size}} px.",
|
|
93
|
+
"thumbnail.savesAs": "Saves as the {{name}} rendition.",
|
|
94
|
+
"thumbnail.longestEdgeError": "A longest edge is a whole number of pixels, at least 1.",
|
|
95
|
+
"thumbnail.longestEdgeLabel": "Longest edge",
|
|
96
|
+
"thumbnail.required": "Required",
|
|
97
|
+
"thumbnail.longestEdgeHelp": "The thumbnail's longer side in pixels. The shorter side follows the source's own shape.",
|
|
98
|
+
"fileUpload.size": "{{size}} bytes",
|
|
99
|
+
"fileUpload.accepts": "Accepts: {{extensions}}",
|
|
100
|
+
"fileUpload.acceptsAny": "Accepts any file type.",
|
|
101
|
+
"fileUpload.noFile": "No file yet.",
|
|
102
|
+
"fileUpload.extensionsLabel": "Accepted extensions",
|
|
103
|
+
"fileUpload.extensionsHelp": "Comma-separated extensions, no dot, e.g. jpg,png,pdf. Leave blank to accept any file.",
|
|
104
|
+
"fileUpload.maxSizeLabel": "Max file size (bytes)",
|
|
105
|
+
"fileUpload.maxSizeHelp": "e.g. 5000000 for ~5MB. Leave blank for no limit. Enforced on upload and on replace.",
|
|
106
|
+
"image.loadFailed": "Failed to load media ({{status}})",
|
|
107
|
+
"image.loading": "Loading…",
|
|
108
|
+
"image.cropOf": "{{crop}} of {{file}}",
|
|
109
|
+
"image.fullImage": "full image",
|
|
110
|
+
"image.tooLarge": "File is too large ({{size}} bytes): the configured limit is {{limit}} bytes.",
|
|
111
|
+
"image.choose": "Choose",
|
|
112
|
+
"image.upload": "Upload",
|
|
113
|
+
"image.uploading": "Uploading…",
|
|
114
|
+
"image.remove": "Remove",
|
|
115
|
+
"image.uploadAria": "Upload an image",
|
|
116
|
+
"image.asksFor": "This field asks for the {{shape}} rendition. An image without one is shown at full size.",
|
|
117
|
+
"image.documentTypesFailed": "Failed to load document types ({{detail}})",
|
|
118
|
+
"image.dataTypesFailed": "Failed to load data types ({{detail}})",
|
|
119
|
+
"image.loadingCrops": "Loading the crops your media types declare…",
|
|
120
|
+
"image.typesTruncated": "Only the first {{limit}} types could be read, so a crop declared beyond them is missing from this list.",
|
|
121
|
+
"image.acceptedTypesLabel": "Accepted file types",
|
|
122
|
+
"image.acceptedTypesHelp": "Comma-separated MIME types, e.g. image/png,image/jpeg. Leave blank to accept any image.",
|
|
123
|
+
"image.maxSizeLabel": "Max file size (bytes)",
|
|
124
|
+
"image.maxSizeHelp": "e.g. 5000000 for ~5MB. Leave blank for no limit.",
|
|
125
|
+
"image.cropLabel": "Crop",
|
|
126
|
+
"image.cropHelp": "The shape this field asks its picture for. A page gets that crop when the picture has one, and the full image when it does not.",
|
|
127
|
+
"image.noCrop": "No particular crop",
|
|
128
|
+
"image.undeclaredCrop": "{{shape}} (no media type declares this crop)",
|
|
129
|
+
"image.cropChoice": "{{caption}} {{shape}}",
|
|
130
|
+
"picker.root": "Root",
|
|
131
|
+
"picker.foldersFailed": "Failed to load media folders ({{detail}})",
|
|
132
|
+
"picker.foldersTruncated": "Only the first {{limit}} media folders could be read",
|
|
133
|
+
"picker.loadFailed": "Failed to load media ({{status}})",
|
|
134
|
+
"picker.title": "Choose an image",
|
|
135
|
+
"picker.description": "Showing images from your library.",
|
|
136
|
+
"picker.asksForCrop": "This field asks for a {{shape}} crop.",
|
|
137
|
+
"picker.location": "Folder location",
|
|
138
|
+
"picker.folders": "Folders",
|
|
139
|
+
"picker.loading": "Loading…",
|
|
140
|
+
"picker.nothingAccepted": "Nothing here is a kind this field accepts.",
|
|
141
|
+
"picker.emptyLibrary": "No images in the media library yet.",
|
|
142
|
+
"picker.emptyFolder": "No images in this folder yet.",
|
|
143
|
+
"picker.library": "Media library",
|
|
144
|
+
"picker.neverCut": "{{file}}: this format is never cut, so this field shows the full image.",
|
|
145
|
+
"picker.noCropYet": "{{file}}: no {{shape}} crop yet, so this field shows the full image.",
|
|
146
|
+
"picker.fullImage": "full image",
|
|
147
|
+
"picker.loadMore": "Load more",
|
|
148
|
+
"picker.altLabel": "Alt text",
|
|
149
|
+
"picker.altPlaceholder": "Describe this image for screen readers (optional)",
|
|
150
|
+
"picker.uploadPrompt": "Or {{action}}",
|
|
151
|
+
"picker.uploadInto": "upload into {{folder}}",
|
|
152
|
+
"picker.uploadingInto": "uploading into {{folder}}…",
|
|
153
|
+
"picker.uploadIntoAria": "Upload into {{folder}}",
|
|
154
|
+
"picker.cancel": "Cancel",
|
|
155
|
+
"picker.insert": "Insert",
|
|
156
|
+
"picker.close": "Close",
|
|
157
|
+
"richText.toolbar": "Formatting",
|
|
158
|
+
"richText.boldMark": "B",
|
|
159
|
+
"richText.bold": "Bold",
|
|
160
|
+
"richText.italicMark": "I",
|
|
161
|
+
"richText.italic": "Italic",
|
|
162
|
+
"richText.link": "Link",
|
|
163
|
+
"richText.linkUrl": "Link URL",
|
|
164
|
+
"richText.removeLink": "Remove link",
|
|
165
|
+
"richText.apply": "Apply",
|
|
166
|
+
"richText.h2Mark": "H2",
|
|
167
|
+
"richText.heading2": "Heading 2",
|
|
168
|
+
"richText.h3Mark": "H3",
|
|
169
|
+
"richText.heading3": "Heading 3",
|
|
170
|
+
"richText.quote": "Quote",
|
|
171
|
+
"richText.list": "List",
|
|
172
|
+
"richText.bulletedList": "Bulleted list",
|
|
173
|
+
"richText.style": "Style",
|
|
174
|
+
"richText.image": "Image",
|
|
175
|
+
"richText.block": "Block",
|
|
176
|
+
"richText.source": "Source",
|
|
177
|
+
"richText.toggleSource": "Toggle HTML source view",
|
|
178
|
+
"richText.editOnPage": "Edit on page",
|
|
179
|
+
"richText.sourceStale": "Content changed elsewhere. Leaving source view will overwrite it.",
|
|
180
|
+
"richText.sourceLabel": "HTML source",
|
|
181
|
+
"richText.fromPlugins": "From plugins",
|
|
182
|
+
"richText.pluginTools": "Plugin tools",
|
|
183
|
+
"richText.more": "More",
|
|
184
|
+
"styleMenu.label": "Text styles",
|
|
185
|
+
"styleMenu.loading": "Loading…",
|
|
186
|
+
"styleMenu.none": "No theme styles declared",
|
|
187
|
+
"styleMenu.clear": "Clear style",
|
|
188
|
+
"blockMenu.label": "Blocks",
|
|
189
|
+
"blockMenu.loading": "Loading…",
|
|
190
|
+
"blockMenu.empty": "No blocks declared by your templates yet.",
|
|
191
|
+
"blockMenu.heading": "Blocks: from your templates",
|
|
192
|
+
"blockMenu.loadFailed": "Failed to load blocks ({{status}})",
|
|
193
|
+
"blockPanel.close": "Close",
|
|
194
|
+
"blockPanel.livePreview": "Live preview.",
|
|
195
|
+
"blockPanel.livePreviewBody": "This block is rendered by your own template on the server. What you see on the page is exactly what visitors will get.",
|
|
196
|
+
"blockPanel.removeBlock": "Remove block",
|
|
197
|
+
"blockPanel.done": "Done",
|
|
198
|
+
"blockPanel.change": "Change",
|
|
199
|
+
"blockPanel.noImage": "No image selected",
|
|
200
|
+
"blockPanel.partial": "partial: {{partial}}.liquid",
|
|
201
|
+
"blockPanel.fieldsUnavailable": "This block's fields couldn't be loaded. Its template declaration may be missing or the render service is unavailable.",
|
|
202
|
+
"blockPanel.previewLabel": "Preview: {{partial}}",
|
|
203
|
+
"blockPanel.previewLoading": "Loading preview…",
|
|
204
|
+
"richText.itemOff": "From {{plugin}}, which is switched off. It is kept as it is. You can move or delete it.",
|
|
205
|
+
"richText.itemNotInstalled": "From a plugin that is not installed ({{id}}). It is kept as it is. You can move or delete it.",
|
|
206
|
+
"richText.itemDropped": "{{plugin}} no longer offers this item. It is kept as it is.",
|
|
207
|
+
"richText.itemDetailsFailed": "The plugin details could not be loaded. This item is kept as it is.",
|
|
208
|
+
"richText.unreadable": "This text holds content the editor cannot open, so it is not opened and nothing is changed. Its plain text is shown below.",
|
|
209
|
+
"richText.unreadableEarlierVersion": "Open an earlier version",
|
|
210
|
+
"richText.unreadableKeepText": "Keep the text only",
|
|
211
|
+
"richText.unreadableKeepTextHint": "Puts the plain text into the editor as paragraphs, without formatting or plugin items. Nothing is stored until you save, and the stored version stays in the history.",
|
|
212
|
+
"richText.unreadableShortened": "The plain text is longer than {{max}} characters, so only its start is shown here, and Keep the text only keeps only that start. The whole value stays in the stored version.",
|
|
213
|
+
"blockPanel.previewFailed": "Failed to render preview ({{status}})",
|
|
214
|
+
"itemPanel.remove": "Remove item",
|
|
215
|
+
"itemPanel.done": "Done",
|
|
216
|
+
"itemPanel.clear": "Clear",
|
|
217
|
+
"itemPanel.choosePage": "Choose a page",
|
|
218
|
+
"itemPanel.noPage": "No page chosen",
|
|
219
|
+
"itemPanel.addImages": "Add a picture",
|
|
220
|
+
"itemPanel.removeImage": "Remove picture",
|
|
221
|
+
"itemPanel.badAddress": "Enter an address that starts with https://, http://, mailto:, tel: or a single /.",
|
|
222
|
+
// M35 C4b (design D16): a button view's dialog and the editor handle's refusals.
|
|
223
|
+
"richText.handleRefused": "The plugin could not change the text: {{reason}}.",
|
|
224
|
+
"richText.handleReasonReadOnly": "the text cannot be changed now",
|
|
225
|
+
"richText.handleReasonInvalid": "what it sent does not fit",
|
|
226
|
+
"richText.handleReasonTooLarge": "the text would pass its limits",
|
|
227
|
+
"richText.handleReasonNotOwnItem": "it may change only its own items",
|
|
228
|
+
"richText.handleReasonGone": "the item or the tool is no longer open",
|
|
229
|
+
"richText.buttonViewClose": "Close",
|
|
230
|
+
// M35 C4b (design D17): the menu a pasted address opens when two plugins' items list its host.
|
|
231
|
+
"richText.pasteChoose": "Paste this address as",
|
|
232
|
+
"richText.pasteAsLink": "Link",
|
|
233
|
+
// M35 C4b (C4b-D6): an item with its own view, outside the admin's host.
|
|
234
|
+
"itemPanel.viewUnavailable": "This item's own editor is not available here. Its data is kept as it is.",
|
|
235
|
+
"markForm.apply": "Apply",
|
|
236
|
+
"markForm.remove": "Remove",
|
|
237
|
+
"simpleStorage.loadFailed": "Failed to load plugin value ({{status}})",
|
|
238
|
+
"simpleStorage.saveFailed": "Failed to save plugin value ({{status}})",
|
|
239
|
+
"simpleStorage.roleCannotRead": "Could not save this field. Your role cannot view pages.",
|
|
240
|
+
"simpleStorage.roleCannotCreate": "Could not save this field. Your role cannot create pages.",
|
|
241
|
+
"simpleStorage.roleCannotUpdate": "Could not save this field. Your role cannot edit pages.",
|
|
242
|
+
"simpleStorage.roleCannotPublish": "Could not save this field. Your role cannot publish pages.",
|
|
243
|
+
"simpleStorage.roleCannotDelete": "Could not save this field. Your role cannot delete pages.",
|
|
244
|
+
"simpleStorage.restrictedRead": "Could not save this field. Viewing is restricted at {{place}} to: {{who}}.",
|
|
245
|
+
"simpleStorage.restrictedCreate": "Could not save this field. Creating pages is restricted at {{place}} to: {{who}}.",
|
|
246
|
+
"simpleStorage.restrictedUpdate": "Could not save this field. Editing is restricted at {{place}} to: {{who}}.",
|
|
247
|
+
"simpleStorage.restrictedPublish": "Could not save this field. Publishing is restricted at {{place}} to: {{who}}.",
|
|
248
|
+
"simpleStorage.restrictedDelete": "Could not save this field. Deleting is restricted at {{place}} to: {{who}}.",
|
|
249
|
+
"simpleStorage.pageYouCannotView": "a page you cannot view",
|
|
250
|
+
"simpleStorage.aUser": "a user",
|
|
251
|
+
"simpleStorage.adminsOnly": "admins only",
|
|
252
|
+
"simpleStorage.listSeparator": ", ",
|
|
253
|
+
// M35 C3 (W25): the words of the SDK's PagePicker, the admin's builtInViews.contentPicker sheet texts.
|
|
254
|
+
"pagePicker.atMax": "Maximum reached: {{max}}",
|
|
255
|
+
"pagePicker.sheetTitle": "Choose a page",
|
|
256
|
+
"pagePicker.sheetTitleMany": "Choose pages",
|
|
257
|
+
"pagePicker.sheetHint": "Pages you can choose are shown in full; others are dimmed.",
|
|
258
|
+
"pagePicker.expand": "Show the pages under {{name}}",
|
|
259
|
+
"pagePicker.collapse": "Hide the pages under {{name}}",
|
|
260
|
+
"pagePicker.chosen": "Chosen",
|
|
261
|
+
"pagePicker.loadMore": "Load more",
|
|
262
|
+
"pagePicker.loading": "Loading…",
|
|
263
|
+
"pagePicker.loadFailed": "The pages could not be read.",
|
|
264
|
+
"pagePicker.cancel": "Cancel",
|
|
265
|
+
"pagePicker.done": "Done",
|
|
266
|
+
// M35 C3 (W25): useCopyText's two toasts.
|
|
267
|
+
"copy.done": "Copied",
|
|
268
|
+
"copy.failed": "Could not copy. Select the text and copy it yourself.",
|
|
269
|
+
};
|
|
270
|
+
/** Placeholder names an SDK string may not use. The admin hands a view's
|
|
271
|
+
* `vars` straight to i18next as its options, and i18next reads these names as
|
|
272
|
+
* instructions (which language, which namespace, a fallback text, an
|
|
273
|
+
* ordinal), not as values to put in a slot. `count` is the one exception
|
|
274
|
+
* with a rule: i18next picks a plural form by it, so it is allowed only in a
|
|
275
|
+
* plural form's key (`<name>_one`, `<name>_other`, ...), where choosing the
|
|
276
|
+
* form is what it is for. A test holds SDK_STRINGS_EN to this list. */
|
|
277
|
+
export const RESERVED_SDK_VARIABLES = [
|
|
278
|
+
"context",
|
|
279
|
+
"count",
|
|
280
|
+
"defaultValue",
|
|
281
|
+
"fallbackLng",
|
|
282
|
+
"interpolation",
|
|
283
|
+
"joinArrays",
|
|
284
|
+
"keySeparator",
|
|
285
|
+
"lng",
|
|
286
|
+
"lngs",
|
|
287
|
+
"ns",
|
|
288
|
+
"nsSeparator",
|
|
289
|
+
"ordinal",
|
|
290
|
+
"postProcess",
|
|
291
|
+
"replace",
|
|
292
|
+
"returnDetails",
|
|
293
|
+
"returnObjects",
|
|
294
|
+
];
|
|
295
|
+
/** `{{name}}` replaced from `vars` by one left-to-right scan (no pattern
|
|
296
|
+
* matching over the text). A name `vars` does not hold, and a `{{` that is
|
|
297
|
+
* never closed, stay as they are. */
|
|
298
|
+
export function interpolateSdkString(template, vars) {
|
|
299
|
+
if (!vars)
|
|
300
|
+
return template;
|
|
301
|
+
let out = "";
|
|
302
|
+
let at = 0;
|
|
303
|
+
while (at < template.length) {
|
|
304
|
+
const open = template.indexOf("{{", at);
|
|
305
|
+
if (open === -1)
|
|
306
|
+
break;
|
|
307
|
+
const close = template.indexOf("}}", open + 2);
|
|
308
|
+
if (close === -1)
|
|
309
|
+
break;
|
|
310
|
+
const name = template.slice(open + 2, close).trim();
|
|
311
|
+
out += template.slice(at, open);
|
|
312
|
+
out += Object.prototype.hasOwnProperty.call(vars, name) ? String(vars[name]) : template.slice(open, close + 2);
|
|
313
|
+
at = close + 2;
|
|
314
|
+
}
|
|
315
|
+
return out + template.slice(at);
|
|
316
|
+
}
|
|
317
|
+
function englishTranslate(key, vars) {
|
|
318
|
+
const template = SDK_STRINGS_EN[key] ?? key;
|
|
319
|
+
return interpolateSdkString(template, vars);
|
|
320
|
+
}
|
|
321
|
+
const SdkHostContext = createContext(null);
|
|
322
|
+
/** Rendered once by the host admin, above every view it mounts. */
|
|
323
|
+
export function SdkHostProvider({ t, dir, locale, lang, children }) {
|
|
324
|
+
const value = useMemo(() => ({ t, dir, locale, lang }), [t, dir, locale, lang]);
|
|
325
|
+
return createElement(SdkHostContext.Provider, { value }, children);
|
|
326
|
+
}
|
|
327
|
+
/** The admin's language for a view's chrome: undefined outside a host, or
|
|
328
|
+
* when the host did not set one. */
|
|
329
|
+
export function useAdminLanguage() {
|
|
330
|
+
return useContext(SdkHostContext)?.lang;
|
|
331
|
+
}
|
|
332
|
+
/** The attributes a view puts on its chrome root (S366f D10): the admin's
|
|
333
|
+
* direction always, and its language when the host gave one. A field's
|
|
334
|
+
* controls are the admin's words, so they read in the admin's order and
|
|
335
|
+
* voice even inside a field wrapped in the content's language. */
|
|
336
|
+
export function useAdminChromeProps() {
|
|
337
|
+
const dir = useAdminDirection();
|
|
338
|
+
const lang = useAdminLanguage();
|
|
339
|
+
return lang === undefined ? { dir } : { dir, lang };
|
|
340
|
+
}
|
|
341
|
+
const ContentLanguageContext = createContext(null);
|
|
342
|
+
/** Rendered by the host around one field, with the language its value is
|
|
343
|
+
* written in. A view's typing surface nested inside its chrome (a search box,
|
|
344
|
+
* the media picker's alt text) reads it back through useContentTypingProps(). */
|
|
345
|
+
export function SdkContentLanguageProvider({ lang, dir, children }) {
|
|
346
|
+
const value = useMemo(() => ({ lang, dir }), [lang, dir]);
|
|
347
|
+
return createElement(ContentLanguageContext.Provider, { value }, children);
|
|
348
|
+
}
|
|
349
|
+
/** The field's content language, or undefined outside a host that set one. */
|
|
350
|
+
export function useContentLanguage() {
|
|
351
|
+
return useContext(ContentLanguageContext) ?? undefined;
|
|
352
|
+
}
|
|
353
|
+
/** The attributes a typing surface inside a view's chrome takes: the
|
|
354
|
+
* content's `lang` and `dir`, or nothing (inherit) when no content language
|
|
355
|
+
* is known. */
|
|
356
|
+
export function useContentTypingProps() {
|
|
357
|
+
const content = useContentLanguage();
|
|
358
|
+
return content ? { lang: content.lang, dir: content.dir } : {};
|
|
359
|
+
}
|
|
360
|
+
/** The host's formatting locale: undefined outside a host, or when the host
|
|
361
|
+
* did not set one, which is what `Intl` and `toLocaleString` read as "the
|
|
362
|
+
* browser's own". */
|
|
363
|
+
export function useSdkLocale() {
|
|
364
|
+
return useContext(SdkHostContext)?.locale;
|
|
365
|
+
}
|
|
366
|
+
/** The words of the SDK's own views: the host's, or English outside one. */
|
|
367
|
+
export function useSdkString() {
|
|
368
|
+
return useContext(SdkHostContext)?.t ?? englishTranslate;
|
|
369
|
+
}
|
|
370
|
+
/** The admin's direction, for chrome around content (a toolbar, a picker's
|
|
371
|
+
* controls) and for a plugin's own Radix roots, which cannot see the admin's
|
|
372
|
+
* direction provider. Outside a host, the document's own direction. */
|
|
373
|
+
export function useAdminDirection() {
|
|
374
|
+
const host = useContext(SdkHostContext);
|
|
375
|
+
if (host)
|
|
376
|
+
return host.dir;
|
|
377
|
+
if (typeof document !== "undefined" && document.documentElement.dir === "rtl")
|
|
378
|
+
return "rtl";
|
|
379
|
+
return "ltr";
|
|
380
|
+
}
|
|
381
|
+
// A private-use pair marks where a node goes: no translation contains it, so
|
|
382
|
+
// the split below cannot be fooled by the sentence's own text.
|
|
383
|
+
const NODE_OPEN = "";
|
|
384
|
+
const NODE_CLOSE = "";
|
|
385
|
+
/** A sentence with React nodes in it (a name set in a code face, a button
|
|
386
|
+
* inside a sentence): the host translates the whole sentence, then the nodes
|
|
387
|
+
* are put back where the translation placed them. */
|
|
388
|
+
export function sdkStringWithNodes(s, key, nodes, vars = {}) {
|
|
389
|
+
const marked = { ...vars };
|
|
390
|
+
for (const name of Object.keys(nodes))
|
|
391
|
+
marked[name] = NODE_OPEN + name + NODE_CLOSE;
|
|
392
|
+
const text = s(key, marked);
|
|
393
|
+
const parts = [];
|
|
394
|
+
let at = 0;
|
|
395
|
+
while (at < text.length) {
|
|
396
|
+
const open = text.indexOf(NODE_OPEN, at);
|
|
397
|
+
if (open === -1)
|
|
398
|
+
break;
|
|
399
|
+
const close = text.indexOf(NODE_CLOSE, open + 1);
|
|
400
|
+
if (close === -1)
|
|
401
|
+
break;
|
|
402
|
+
const name = text.slice(open + 1, close);
|
|
403
|
+
if (text.slice(at, open))
|
|
404
|
+
parts.push(text.slice(at, open));
|
|
405
|
+
parts.push(createElement(Fragment, { key: `${name}-${open}` }, nodes[name] ?? null));
|
|
406
|
+
at = close + 1;
|
|
407
|
+
}
|
|
408
|
+
if (text.slice(at))
|
|
409
|
+
parts.push(text.slice(at));
|
|
410
|
+
return parts;
|
|
411
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PluginSealedValueKind, SealingRefusalReason } from "@kardalum/api-schemas";
|
|
2
|
+
export type { SealingRefusalReason };
|
|
3
|
+
/** One kind of `contributions.sealedValues`: `id` (the settings id rule), `label`, and
|
|
4
|
+
* `leavesServer: true` for a kind whose sealed text is handed to visitors. */
|
|
5
|
+
export type SealedValueContribution = PluginSealedValueKind;
|
|
6
|
+
export interface PluginSealing {
|
|
7
|
+
/** Seals `value` (1 to 4,096 UTF-8 bytes) of a declared `kind` for `recordKey` (1 to 200 printable
|
|
8
|
+
* ASCII characters). Throws `SealingRefusedError`: `unknownKind`, `invalid` or `inactive`. */
|
|
9
|
+
seal(kind: string, recordKey: string, value: string): Promise<string>;
|
|
10
|
+
/** The value a sealed text holds, or null when it does not open (another plugin, kind or record
|
|
11
|
+
* key, a changed server key, or text that was never sealed). Throws only `SealingRefusedError`
|
|
12
|
+
* for an undeclared kind, a bad record key or a plugin that is no longer active. */
|
|
13
|
+
open(kind: string, recordKey: string, sealed: string): Promise<string | null>;
|
|
14
|
+
}
|
package/dist/sealing.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z, type ZodType } from "zod";
|
|
2
|
+
import type { ServiceMethodContribution } from "./services.js";
|
|
3
|
+
/** @experimental A field holding personal data (design 4.2): listed on the install screen; never in an event. */
|
|
4
|
+
export declare function personal<T extends ZodType>(schema: T): T;
|
|
5
|
+
/** @experimental A page, by id: the reader reads the page through its own published reads (design 4.7). */
|
|
6
|
+
export declare const pageIdSchema: z.ZodString;
|
|
7
|
+
/** @experimental The contract subset's JSON Schema of an object schema, or a TypeError naming what is outside it. */
|
|
8
|
+
export declare function toContractSchema(schema: ZodType): Record<string, unknown>;
|
|
9
|
+
/** @experimental One method, its schemas made from Zod. */
|
|
10
|
+
export declare function contractMethod(method: {
|
|
11
|
+
input: ZodType;
|
|
12
|
+
output: ZodType;
|
|
13
|
+
timeMs?: number;
|
|
14
|
+
writes?: boolean;
|
|
15
|
+
refusals?: string[];
|
|
16
|
+
addedIn?: string;
|
|
17
|
+
}): ServiceMethodContribution;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { readContractSchema } from "@kardalum/api-schemas";
|
|
3
|
+
// M35 B1a (plan decision 1): a contract's schemas travel as JSON Schema, made here from Zod inside the
|
|
4
|
+
// plugin's own bundle, so the server checks every call with its own checker and never runs plugin code
|
|
5
|
+
// to do it. A schema outside the contract subset throws while the manifest is built.
|
|
6
|
+
/** @experimental A field holding personal data (design 4.2): listed on the install screen; never in an event. */
|
|
7
|
+
export function personal(schema) {
|
|
8
|
+
return schema.meta({ personal: true });
|
|
9
|
+
}
|
|
10
|
+
/** @experimental A page, by id: the reader reads the page through its own published reads (design 4.7). */
|
|
11
|
+
export const pageIdSchema = z.string().uuid().describe("A page id. Read the page through getPublishedContent or context.content.");
|
|
12
|
+
/** @experimental The contract subset's JSON Schema of an object schema, or a TypeError naming what is outside it. */
|
|
13
|
+
export function toContractSchema(schema) {
|
|
14
|
+
const json = z.toJSONSchema(schema, {
|
|
15
|
+
unrepresentable: "throw",
|
|
16
|
+
// Copies the personal mark from the registry, so it reaches the JSON Schema in every Zod 4 version.
|
|
17
|
+
override: (ctx) => {
|
|
18
|
+
const meta = z.globalRegistry.get(ctx.zodSchema);
|
|
19
|
+
if (meta?.personal === true)
|
|
20
|
+
ctx.jsonSchema.personal = true;
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
delete json.$schema;
|
|
24
|
+
const read = readContractSchema(json, { root: "object" });
|
|
25
|
+
if (!read.ok)
|
|
26
|
+
throw new TypeError(`A contract schema: ${read.problem}`);
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
/** @experimental One method, its schemas made from Zod. */
|
|
30
|
+
export function contractMethod(method) {
|
|
31
|
+
return {
|
|
32
|
+
input: toContractSchema(method.input),
|
|
33
|
+
output: toContractSchema(method.output),
|
|
34
|
+
...(method.timeMs !== undefined ? { timeMs: method.timeMs } : {}),
|
|
35
|
+
...(method.writes !== undefined ? { writes: method.writes } : {}),
|
|
36
|
+
...(method.refusals !== undefined ? { refusals: [...method.refusals] } : {}),
|
|
37
|
+
...(method.addedIn !== undefined ? { addedIn: method.addedIn } : {}),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { PluginEventRefusal, PluginLabel, ServiceFailure, ServiceProviderState } from "@kardalum/api-schemas";
|
|
2
|
+
import type { PluginTaskContext } from "./entitlement-types.js";
|
|
3
|
+
/** @experimental One implementation of a contract, as `context.services.list` answers it. */
|
|
4
|
+
export interface ServiceProviderInfo {
|
|
5
|
+
provider: string;
|
|
6
|
+
label: PluginLabel;
|
|
7
|
+
version: string;
|
|
8
|
+
state: ServiceProviderState;
|
|
9
|
+
}
|
|
10
|
+
/** @experimental A call's answer: a value, or why there is none. Never a throw. */
|
|
11
|
+
export type ServiceResult<T = unknown> = {
|
|
12
|
+
ok: true;
|
|
13
|
+
value: T;
|
|
14
|
+
} | {
|
|
15
|
+
ok: false;
|
|
16
|
+
reason: ServiceFailure;
|
|
17
|
+
code?: string;
|
|
18
|
+
};
|
|
19
|
+
/** @experimental `{ contract }` asks the one provider there is; `{ contract, provider }` asks that one. */
|
|
20
|
+
export interface ServiceTarget {
|
|
21
|
+
contract: string;
|
|
22
|
+
provider?: string;
|
|
23
|
+
}
|
|
24
|
+
/** @experimental Present on route, site route, hook and scheduled task contexts and inside a service. */
|
|
25
|
+
export interface PluginServices {
|
|
26
|
+
/** The providers of a contract this plugin declares under `usedServices`, in plugin id order. Another contract throws TypeError. */
|
|
27
|
+
list(contract: string): Promise<ServiceProviderInfo[]>;
|
|
28
|
+
/** Calls one method through the core: the owner's schemas, size caps and time limit apply. `timeMs` may only shorten the limit. */
|
|
29
|
+
call<T = unknown>(target: ServiceTarget, method: string, input: unknown, options?: {
|
|
30
|
+
timeMs?: number;
|
|
31
|
+
}): Promise<ServiceResult<T>>;
|
|
32
|
+
}
|
|
33
|
+
/** @experimental */
|
|
34
|
+
export type PluginEventRaised = {
|
|
35
|
+
raised: true;
|
|
36
|
+
eventId: string;
|
|
37
|
+
} | {
|
|
38
|
+
raised: false;
|
|
39
|
+
reason: PluginEventRefusal;
|
|
40
|
+
};
|
|
41
|
+
/** @experimental Present where `services` is. Raises one of this plugin's declared `events`. */
|
|
42
|
+
export interface PluginEvents {
|
|
43
|
+
raise(name: string, payload: unknown): Promise<PluginEventRaised>;
|
|
44
|
+
}
|
|
45
|
+
/** @experimental Who called, set by the core; a consumer cannot forge it. */
|
|
46
|
+
export interface PluginServiceCaller {
|
|
47
|
+
pluginId: string;
|
|
48
|
+
version: string;
|
|
49
|
+
}
|
|
50
|
+
/** @experimental What an implementation receives beside its input: its own plugin's context, a scheduled
|
|
51
|
+
* task's members without `task`, plus `caller`; `signal` aborts at the method's time limit, and after it
|
|
52
|
+
* every library of this context refuses. */
|
|
53
|
+
export interface PluginServiceContext extends Omit<PluginTaskContext, "task"> {
|
|
54
|
+
caller: PluginServiceCaller;
|
|
55
|
+
}
|
|
56
|
+
/** @experimental */
|
|
57
|
+
export type ServiceImplementation = (input: unknown, context: PluginServiceContext) => unknown;
|
|
58
|
+
/** @experimental One method of a contract. `input` and `output` are JSON Schema of the contract subset: build them with `contractMethod`. */
|
|
59
|
+
export interface ServiceMethodContribution {
|
|
60
|
+
input: Record<string, unknown>;
|
|
61
|
+
output: Record<string, unknown>;
|
|
62
|
+
/** SERVICE_CALL_TIME_MS_MIN to SERVICE_CALL_TIME_MS_MAX, default SERVICE_CALL_TIME_MS_DEFAULT. */
|
|
63
|
+
timeMs?: number;
|
|
64
|
+
writes?: boolean;
|
|
65
|
+
/** The codes a provider may answer with `{ refused: "<code>" }`. */
|
|
66
|
+
refusals?: string[];
|
|
67
|
+
/** The minor version that added this method; providers built earlier answer `notImplemented`. */
|
|
68
|
+
addedIn?: string;
|
|
69
|
+
}
|
|
70
|
+
/** @experimental A contract this plugin owns: `<this plugin's id>/<name>`. */
|
|
71
|
+
export interface ServiceContractContribution {
|
|
72
|
+
name: string;
|
|
73
|
+
version: string;
|
|
74
|
+
label: PluginLabel;
|
|
75
|
+
description?: PluginLabel;
|
|
76
|
+
methods: Record<string, ServiceMethodContribution>;
|
|
77
|
+
/** @experimental The uses a provider of this contract needs for it to work: the scaffold adds them to an offer (M35 B1c). */
|
|
78
|
+
providersUse?: Array<{
|
|
79
|
+
contract: string;
|
|
80
|
+
range: string;
|
|
81
|
+
}>;
|
|
82
|
+
}
|
|
83
|
+
/** @experimental An implementation of a contract, this plugin's own or another's. */
|
|
84
|
+
export interface ExposedServiceContribution {
|
|
85
|
+
contract: string;
|
|
86
|
+
version: string;
|
|
87
|
+
label: PluginLabel;
|
|
88
|
+
implementation: Record<string, ServiceImplementation>;
|
|
89
|
+
}
|
|
90
|
+
/** @experimental A contract this plugin calls. `optional: false` (the default) makes the owner a dependency. */
|
|
91
|
+
export interface UsedServiceContribution {
|
|
92
|
+
contract: string;
|
|
93
|
+
range: string;
|
|
94
|
+
optional?: boolean;
|
|
95
|
+
}
|
|
96
|
+
/** @experimental An event this plugin raises; others hear it as `<this plugin's id>:<name>`. No personal fields. */
|
|
97
|
+
export interface PluginEventContribution {
|
|
98
|
+
name: string;
|
|
99
|
+
label: PluginLabel;
|
|
100
|
+
description?: PluginLabel;
|
|
101
|
+
payload: Record<string, unknown>;
|
|
102
|
+
}
|
|
103
|
+
/** @experimental A plugin event's hook key. A core event never has a "." before its ":". */
|
|
104
|
+
export type PluginEventKey = `${string}.${string}:${string}`;
|
|
105
|
+
/** @experimental What a handler of a plugin event receives. `data` is the raiser's payload, checked against its schema. */
|
|
106
|
+
export interface PluginEventHookPayload {
|
|
107
|
+
event: PluginEventKey;
|
|
108
|
+
raisedBy: string;
|
|
109
|
+
name: string;
|
|
110
|
+
data: unknown;
|
|
111
|
+
/** 0 when raised outside a plugin event's handler; a raise inside such a handler carries one more. */
|
|
112
|
+
depth: number;
|
|
113
|
+
occurredAt: string;
|
|
114
|
+
}
|
package/dist/services.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|