@kardalum/plugin-sdk 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -0
- package/dist/admin-section-registry.d.ts +33 -1
- package/dist/admin-section-registry.js +67 -0
- package/dist/capabilities.js +46 -1
- package/dist/consent-entry.d.ts +11 -0
- package/dist/consent-entry.js +18 -0
- package/dist/content-library.d.ts +17 -0
- package/dist/content-list-extensions.d.ts +50 -0
- package/dist/content-list-extensions.js +11 -0
- package/dist/content-picker/page-picker-sheet.d.ts +2 -0
- package/dist/content-picker/page-picker-sheet.js +1 -1
- package/dist/content-picker/page-picker.d.ts +18 -0
- package/dist/content-picker/page-picker.js +20 -0
- package/dist/datatype-validation.js +10 -2
- package/dist/datatypes-entry.d.ts +1 -0
- package/dist/datatypes-entry.js +2 -0
- package/dist/entitlement-types.d.ts +18 -1
- package/dist/host-entry.d.ts +7 -1
- package/dist/host-entry.js +14 -1
- package/dist/index.d.ts +35 -7
- package/dist/index.js +46 -5
- package/dist/mail.d.ts +6 -2
- package/dist/manifest-entry.d.ts +22 -4
- package/dist/manifest-entry.js +25 -1
- package/dist/manifest-schema.d.ts +570 -31
- package/dist/manifest-schema.js +240 -12
- package/dist/manifest.d.ts +757 -32
- package/dist/manifest.js +8 -4
- package/dist/plugin-context.d.ts +47 -0
- package/dist/plugin-context.js +27 -0
- package/dist/plugin-permissions.d.ts +18 -0
- package/dist/plugin-permissions.js +25 -0
- package/dist/plugin-screen-context.d.ts +152 -11
- package/dist/plugin-screen-context.js +30 -0
- package/dist/providers.d.ts +47 -2
- package/dist/render-page.d.ts +15 -0
- package/dist/render-page.js +20 -0
- package/dist/richtext/block-panel.d.ts +12 -1
- package/dist/richtext/block-panel.js +27 -21
- package/dist/richtext/button-view.d.ts +11 -0
- package/dist/richtext/button-view.js +45 -0
- package/dist/richtext/content-guard.d.ts +4 -0
- package/dist/richtext/content-guard.js +27 -0
- package/dist/richtext/editor-handle.d.ts +34 -0
- package/dist/richtext/editor-handle.js +225 -0
- package/dist/richtext/extensions.d.ts +6 -0
- package/dist/richtext/extensions.js +16 -0
- package/dist/richtext/insert-menu.d.ts +6 -1
- package/dist/richtext/insert-menu.js +38 -18
- package/dist/richtext/item-attributes.d.ts +6 -0
- package/dist/richtext/item-attributes.js +19 -0
- package/dist/richtext/item-panel.d.ts +25 -0
- package/dist/richtext/item-panel.js +118 -0
- package/dist/richtext/item-view.d.ts +58 -0
- package/dist/richtext/item-view.js +172 -0
- package/dist/richtext/mark-form.d.ts +10 -0
- package/dist/richtext/mark-form.js +38 -0
- package/dist/richtext/paste-choice.d.ts +9 -0
- package/dist/richtext/paste-choice.js +13 -0
- package/dist/richtext/plugin-items.d.ts +72 -0
- package/dist/richtext/plugin-items.js +562 -0
- package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
- package/dist/richtext/plugin-mark-tooltips.js +44 -0
- package/dist/richtext/plugin-toolbar.d.ts +57 -0
- package/dist/richtext/plugin-toolbar.js +186 -0
- package/dist/richtext/rich-item-icons.d.ts +5 -0
- package/dist/richtext/rich-item-icons.js +42 -0
- package/dist/richtext/rich-items.d.ts +42 -0
- package/dist/richtext/rich-items.js +68 -0
- package/dist/richtext/rich-text-view-host.d.ts +24 -0
- package/dist/richtext/rich-text-view-host.js +11 -0
- package/dist/richtext/toolbar-button.d.ts +16 -0
- package/dist/richtext/toolbar-button.js +9 -0
- package/dist/richtext/url-paste.d.ts +20 -0
- package/dist/richtext/url-paste.js +82 -0
- package/dist/richtext-html-entry.d.ts +5 -0
- package/dist/richtext-html-entry.js +11 -0
- package/dist/sdk-strings.d.ts +59 -0
- package/dist/sdk-strings.js +64 -0
- package/dist/service-contract.d.ts +17 -0
- package/dist/service-contract.js +39 -0
- package/dist/services.d.ts +114 -0
- package/dist/services.js +1 -0
- package/dist/structured-storage-types.d.ts +124 -4
- package/dist/tailwind.js +10 -5
- package/dist/template-reads.d.ts +16 -0
- package/dist/template-reads.js +21 -0
- package/dist/testing-entry.d.ts +38 -0
- package/dist/testing-entry.js +173 -0
- package/dist/text-entry.d.ts +1 -1
- package/dist/text-entry.js +3 -2
- package/dist/tokens/system-dark.css +1 -0
- package/dist/tokens/tailwind-theme.css +2 -0
- package/dist/tokens/tokens.css +4 -0
- package/dist/tokens/tokens.json +5 -1
- package/dist/uploads.d.ts +43 -0
- package/dist/uploads.js +1 -0
- package/dist/user-library.d.ts +51 -0
- package/dist/user-library.js +15 -0
- package/dist/view-helpers.d.ts +18 -0
- package/dist/view-helpers.js +64 -0
- package/dist/views/content-list-view.js +207 -8
- package/dist/views/content-picker-view.js +1 -1
- package/dist/views/rich-text-view.d.ts +2 -0
- package/dist/views/rich-text-view.js +182 -24
- package/dist/views/unreadable-rich-text.d.ts +17 -0
- package/dist/views/unreadable-rich-text.js +40 -0
- package/dist/visitors.d.ts +81 -0
- package/dist/visitors.js +1 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +127 -8
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +82 -7
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +2 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +11 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +18 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +80 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +41 -2
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +50 -13
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +19 -10
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +37 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
- package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
- package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +52 -14
- package/node_modules/@kardalum/api-schemas/dist/index.js +53 -9
- package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +4 -2
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +6 -1
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +178 -2
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +51 -2
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
- package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +4 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +12 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +5 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +10 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +48 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +5 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +6 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +67 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +15 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +80 -15
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +67 -23
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +10 -3
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +33 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +2 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +7 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +43 -7
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +36 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +10 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +171 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +406 -42
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
- package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +303 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +66 -1
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +465 -7
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +15 -118
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +110 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
- package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +9 -2
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +7 -2
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +5 -3
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +3 -1
- package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +14 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
- package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +9 -1
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +4 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +6 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +5 -1
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +9 -0
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +276 -19
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +21 -8
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +23 -10
- package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +30 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +6 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +24 -6
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +15 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +14 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +44 -11
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -0
- package/node_modules/@kardalum/plugin-package/dist/index.js +5 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
- package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
- package/node_modules/@kardalum/plugin-package/package.json +4 -0
- package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
- package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
- package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/index.js +2 -0
- package/package.json +15 -3
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createElement, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
|
+
import { cn } from "@kardalum/ui";
|
|
4
|
+
import { RICH_TEXT_TOOLBAR_PLUGIN_BUTTONS_MAX, itemNodeTypeOf, resolveLabel } from "@kardalum/api-schemas";
|
|
5
|
+
import { firstLetterOf, isPluginMarkActive, pluginMarkDataAt } from "./plugin-items.js";
|
|
6
|
+
import { newItemAttributes } from "./item-panel.js";
|
|
7
|
+
import { MarkForm } from "./mark-form.js";
|
|
8
|
+
import { RICH_ITEM_ICON_COMPONENTS } from "./rich-item-icons.js";
|
|
9
|
+
import { ToolbarButton } from "./toolbar-button.js";
|
|
10
|
+
import { useAdminLanguage, useSdkString } from "../sdk-strings.js";
|
|
11
|
+
import { getRichTextView } from "../admin-section-registry.js";
|
|
12
|
+
import { PluginMarkViewMount } from "./item-view.js";
|
|
13
|
+
import { PluginButtonViewDialog } from "./button-view.js";
|
|
14
|
+
import { useRichTextViewHost } from "./rich-text-view-host.js";
|
|
15
|
+
/** Design D5: the plugin buttons in plugin id order, the first RICH_TEXT_TOOLBAR_PLUGIN_BUTTONS_MAX on the toolbar, the
|
|
16
|
+
* rest and every declared mark under More. Re-read when the listing arrives. */
|
|
17
|
+
export function usePluginToolbarEntries(items, language) {
|
|
18
|
+
const state = useSyncExternalStore(items.subscribe, items.state, items.state);
|
|
19
|
+
const host = useRichTextViewHost();
|
|
20
|
+
return useMemo(() => {
|
|
21
|
+
const buttons = [];
|
|
22
|
+
const marks = [];
|
|
23
|
+
for (const entry of items.plugins()) {
|
|
24
|
+
for (const button of entry.buttons) {
|
|
25
|
+
if ("view" in button.does) {
|
|
26
|
+
// M35 C4b (design D16, C4b-D9): offered only to a person who holds its action, when its view is registered.
|
|
27
|
+
if (host && host.can(button.does.action) && getRichTextView(entry.plugin, "button", button.id)) {
|
|
28
|
+
buttons.push({ key: `plugin:${entry.plugin}:${button.id}`, plugin: entry.plugin, label: resolveLabel(button.label, language), icon: button.icon, does: { view: { buttonId: button.id, action: button.does.action } } });
|
|
29
|
+
}
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const does = "insert" in button.does
|
|
33
|
+
? (() => { const node = entry.nodes.find((n) => n.name === button.does.insert); return node ? { insert: node } : null; })()
|
|
34
|
+
: (() => { const mark = entry.marks.find((m) => m.name === button.does.toggle); return mark ? { toggle: mark } : null; })();
|
|
35
|
+
if (does)
|
|
36
|
+
buttons.push({ key: `plugin:${entry.plugin}:${button.id}`, plugin: entry.plugin, label: resolveLabel(button.label, language), icon: button.icon, does });
|
|
37
|
+
}
|
|
38
|
+
for (const mark of entry.marks)
|
|
39
|
+
marks.push({ key: `mark:${entry.plugin}:${mark.name}`, plugin: entry.plugin, label: resolveLabel(mark.label, language), icon: mark.icon, does: { toggle: mark } });
|
|
40
|
+
}
|
|
41
|
+
return { shown: buttons.slice(0, RICH_TEXT_TOOLBAR_PLUGIN_BUTTONS_MAX), more: [...buttons.slice(RICH_TEXT_TOOLBAR_PLUGIN_BUTTONS_MAX), ...marks] };
|
|
42
|
+
// `state` is a dependency so the entries are made again when the listing arrives; `host` when the actions change.
|
|
43
|
+
}, [items, state, language, host]);
|
|
44
|
+
}
|
|
45
|
+
/** What an entry does: insert its node, or toggle its mark. A mark with attributes always goes through its form,
|
|
46
|
+
* opened with the set mark's data when it is already there, so its data can be changed (Apply) or the mark removed
|
|
47
|
+
* (Remove). */
|
|
48
|
+
export function runToolbarEntry(editor, entry, openMarkForm, openButtonView = () => { }) {
|
|
49
|
+
if ("view" in entry.does) {
|
|
50
|
+
openButtonView(entry);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if ("insert" in entry.does) {
|
|
54
|
+
editor.chain().focus().insertPluginItem(itemNodeTypeOf(entry.does.insert.shape), newItemAttributes(entry.plugin, entry.does.insert)).run();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const mark = entry.does.toggle;
|
|
58
|
+
// M35 C4b (design D15): a mark with its own view opens it, attributes or not.
|
|
59
|
+
if (mark.attrs.length > 0 || mark.hasView) {
|
|
60
|
+
openMarkForm(entry, pluginMarkDataAt(editor, { plugin: entry.plugin, name: mark.name }) ?? {});
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
editor.chain().focus().togglePluginMark({ plugin: entry.plugin, name: mark.name, v: 1, id: null, data: {}, editorial: mark.editorial }).run();
|
|
64
|
+
}
|
|
65
|
+
function EntryIcon({ entry }) {
|
|
66
|
+
const component = entry.icon !== null && Object.prototype.hasOwnProperty.call(RICH_ITEM_ICON_COMPONENTS, entry.icon) ? RICH_ITEM_ICON_COMPONENTS[entry.icon] : null;
|
|
67
|
+
if (component)
|
|
68
|
+
return createElement(component, { className: "size-4", "aria-hidden": true });
|
|
69
|
+
return _jsx("span", { "aria-hidden": "true", children: firstLetterOf(entry.label) });
|
|
70
|
+
}
|
|
71
|
+
/** The one keyboard rule of the plugin menus (More, and the pasted address choice, M35 C4b): an ARIA menu with the arrow
|
|
72
|
+
* keys, Home, End, Enter, Space and Escape, as StyleListbox handles its listbox. Its keys stop at the menu, so the
|
|
73
|
+
* toolbar's own roving keys do not move focus out of it. The first item takes focus when the menu opens. */
|
|
74
|
+
export function useMenuKeys(count, onChoose, onClose) {
|
|
75
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
76
|
+
const itemRefs = useRef([]);
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
itemRefs.current[0]?.focus();
|
|
79
|
+
}, []);
|
|
80
|
+
function focusIndex(index) {
|
|
81
|
+
setActiveIndex(index);
|
|
82
|
+
itemRefs.current[index]?.focus();
|
|
83
|
+
}
|
|
84
|
+
function onKeyDown(event) {
|
|
85
|
+
let handled = true;
|
|
86
|
+
switch (event.key) {
|
|
87
|
+
case "ArrowDown":
|
|
88
|
+
focusIndex((activeIndex + 1) % count);
|
|
89
|
+
break;
|
|
90
|
+
case "ArrowUp":
|
|
91
|
+
focusIndex((activeIndex - 1 + count) % count);
|
|
92
|
+
break;
|
|
93
|
+
case "Home":
|
|
94
|
+
focusIndex(0);
|
|
95
|
+
break;
|
|
96
|
+
case "End":
|
|
97
|
+
focusIndex(count - 1);
|
|
98
|
+
break;
|
|
99
|
+
case "Enter":
|
|
100
|
+
case " ":
|
|
101
|
+
if (activeIndex < count)
|
|
102
|
+
onChoose(activeIndex);
|
|
103
|
+
break;
|
|
104
|
+
case "Escape":
|
|
105
|
+
onClose();
|
|
106
|
+
break;
|
|
107
|
+
case "ArrowLeft":
|
|
108
|
+
case "ArrowRight":
|
|
109
|
+
break;
|
|
110
|
+
default:
|
|
111
|
+
handled = false;
|
|
112
|
+
}
|
|
113
|
+
if (handled) {
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
event.stopPropagation();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return { activeIndex, setActiveIndex, itemRefs, onKeyDown };
|
|
119
|
+
}
|
|
120
|
+
// The More menu, by the shared keyboard rule above.
|
|
121
|
+
function MoreMenu({ entries, editor, onChoose, onClose }) {
|
|
122
|
+
const s = useSdkString();
|
|
123
|
+
const { activeIndex, setActiveIndex, itemRefs, onKeyDown: handleKeyDown } = useMenuKeys(entries.length, (index) => {
|
|
124
|
+
const entry = entries[index];
|
|
125
|
+
if (entry)
|
|
126
|
+
onChoose(entry);
|
|
127
|
+
}, onClose);
|
|
128
|
+
return (_jsx("div", { role: "menu", "aria-label": s("richText.more"), onKeyDown: handleKeyDown, className: "min-w-44 p-1", children: entries.map((entry, index) => {
|
|
129
|
+
const active = "toggle" in entry.does && isPluginMarkActive(editor, { plugin: entry.plugin, name: entry.does.toggle.name });
|
|
130
|
+
return (_jsxs("div", { ref: (el) => {
|
|
131
|
+
itemRefs.current[index] = el;
|
|
132
|
+
}, role: "menuitem", "data-testid": `rt-more-${entry.key}`, tabIndex: index === activeIndex ? 0 : -1, onFocus: () => setActiveIndex(index), onClick: () => onChoose(entry), className: cn("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 text-sm outline-hidden", "focus-visible:ring-2 focus-visible:ring-primary-600", active ? "bg-primary-100 text-primary-800" : "text-text-primary hover:bg-background-hover"), children: [_jsx(EntryIcon, { entry: entry }), _jsx("bdi", { children: entry.label })] }, entry.key));
|
|
133
|
+
}) }));
|
|
134
|
+
}
|
|
135
|
+
const POPOVER_CLASSES = "absolute start-0 top-full z-10 mt-1 rounded-md border border-border-default bg-background-elevated shadow-lg";
|
|
136
|
+
/** The toolbar's "Plugin tools" group: one button a shown entry, then More with the rest and every mark. */
|
|
137
|
+
export function PluginToolbarGroup({ editor, entries, items, culture, sourceMode, activeKey, setActiveKey, registerRef, language: entriesLanguage }) {
|
|
138
|
+
const s = useSdkString();
|
|
139
|
+
// The form's labels in the same language as the buttons beside it.
|
|
140
|
+
const language = useAdminLanguage() ?? entriesLanguage ?? "en";
|
|
141
|
+
const [menuOpen, setMenuOpen] = useState(false);
|
|
142
|
+
// Which button the mark form hangs under ("more" for an entry chosen in the menu), and the data it opens with.
|
|
143
|
+
// M35 C4b (design D16): the open button view and the button it came from (More, when it was chosen in the menu).
|
|
144
|
+
const [buttonView, setButtonView] = useState(null);
|
|
145
|
+
const openButtonView = (chosen) => setButtonView({ entry: chosen, trigger: document.activeElement instanceof HTMLElement ? document.activeElement : null });
|
|
146
|
+
const [markForm, setMarkForm] = useState(null);
|
|
147
|
+
const opened = useRef(0);
|
|
148
|
+
const openForm = (entry, under, initial) => {
|
|
149
|
+
opened.current += 1;
|
|
150
|
+
setMarkForm({ entry, under, initial, opened: opened.current });
|
|
151
|
+
};
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
if (sourceMode) {
|
|
154
|
+
setMenuOpen(false);
|
|
155
|
+
setMarkForm(null);
|
|
156
|
+
}
|
|
157
|
+
}, [sourceMode]);
|
|
158
|
+
const host = useRichTextViewHost();
|
|
159
|
+
function form(under) {
|
|
160
|
+
if (!markForm || markForm.under !== under || !("toggle" in markForm.entry.does))
|
|
161
|
+
return null;
|
|
162
|
+
const { entry } = markForm;
|
|
163
|
+
const mark = markForm.entry.does.toggle;
|
|
164
|
+
// M35 C4b (design D15): a mark's own view through the admin's host, when it has one and it is registered.
|
|
165
|
+
if (mark.hasView && host && getRichTextView(entry.plugin, "mark", mark.name)) {
|
|
166
|
+
return (_jsx("div", { className: POPOVER_CLASSES, onKeyDown: (event) => event.stopPropagation(), children: _jsx(PluginMarkViewMount, { editor: editor, plugin: entry.plugin, mark: mark, culture: culture, onClose: () => setMarkForm(null) }) }));
|
|
167
|
+
}
|
|
168
|
+
return (_jsx("div", { className: POPOVER_CLASSES, onKeyDown: (event) => event.stopPropagation(), children: _jsx(MarkForm, { mark: mark, language: language, initial: markForm.initial, onApply: (data) => {
|
|
169
|
+
editor.chain().focus().setPluginMark({ plugin: entry.plugin, name: mark.name, v: 1, id: null, data, editorial: mark.editorial }).run();
|
|
170
|
+
setMarkForm(null);
|
|
171
|
+
}, onRemove: () => {
|
|
172
|
+
editor.chain().focus().unsetPluginMark({ plugin: entry.plugin, name: mark.name }).run();
|
|
173
|
+
setMarkForm(null);
|
|
174
|
+
}, onClose: () => setMarkForm(null) }, markForm.opened) }));
|
|
175
|
+
}
|
|
176
|
+
return (_jsxs("div", { role: "group", "aria-label": s("richText.pluginTools"), className: "flex flex-wrap items-center gap-1", children: [entries.shown.map((entry) => (_jsxs("div", { className: "relative", children: [_jsx(ToolbarButton, { itemKey: entry.key, label: _jsx(EntryIcon, { entry: entry }), ariaLabel: entry.label, active: "toggle" in entry.does ? isPluginMarkActive(editor, { plugin: entry.plugin, name: entry.does.toggle.name }) : undefined, disabled: sourceMode, isRovingActive: activeKey === entry.key, registerRef: registerRef(entry.key), onFocus: () => setActiveKey(entry.key), onClick: () => {
|
|
177
|
+
setMenuOpen(false);
|
|
178
|
+
runToolbarEntry(editor, entry, (chosen, initial) => openForm(chosen, entry.key, initial), openButtonView);
|
|
179
|
+
} }), form(entry.key)] }, entry.key))), entries.more.length > 0 && (_jsxs("div", { className: "relative", children: [_jsx(ToolbarButton, { itemKey: "more", label: `${s("richText.more")} ▾`, disabled: sourceMode, hasPopup: "menu", expanded: menuOpen, isRovingActive: activeKey === "more", registerRef: registerRef("more"), onFocus: () => setActiveKey("more"), onClick: () => {
|
|
180
|
+
setMarkForm(null);
|
|
181
|
+
setMenuOpen((open) => !open);
|
|
182
|
+
} }), menuOpen && (_jsx("div", { className: POPOVER_CLASSES, children: _jsx(MoreMenu, { entries: entries.more, editor: editor, onChoose: (entry) => {
|
|
183
|
+
setMenuOpen(false);
|
|
184
|
+
runToolbarEntry(editor, entry, (chosen, initial) => openForm(chosen, "more", initial), openButtonView);
|
|
185
|
+
}, onClose: () => setMenuOpen(false) }) })), form("more")] })), buttonView && _jsx(PluginButtonViewDialog, { editor: editor, entry: buttonView.entry, items: items, culture: culture, returnFocusTo: buttonView.trigger, onClose: () => setButtonView(null) })] }));
|
|
186
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type LucideIcon } from "lucide-react";
|
|
2
|
+
import type { RichTextIconName } from "@kardalum/api-schemas";
|
|
3
|
+
export declare const RICH_ITEM_ICON_COMPONENTS: Record<RichTextIconName, LucideIcon>;
|
|
4
|
+
/** Draws an item's icon into a plain-DOM chip (the label's first letter without one); answers the cleanup. */
|
|
5
|
+
export declare function renderRichItemIcon(into: HTMLElement, icon: string | null, label: string): () => void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
import { createRoot } from "react-dom/client";
|
|
3
|
+
import { AtSign, Bookmark, Calendar, ChevronsUpDown, CircleCheck, Clock, Code, CreditCard, FileText, Flag, Gift, Globe, Hash, Heart, Highlighter, Image as ImageIcon, Images, Info, Link as LinkIcon, List, ListChecks, Mail, Map as MapIcon, MapPin, MessageSquare, Music, PanelTop, Phone, Quote, ShoppingCart, Sparkles, Square, Star, Table as TableIcon, Tag, TriangleAlert, User, Users, Utensils, Video, } from "lucide-react";
|
|
4
|
+
// M35 C4a (design D3): the core's fixed icon list mapped to Lucide; a plugin never ships an SVG. The Record type keeps
|
|
5
|
+
// the map total over RICH_TEXT_ICONS.
|
|
6
|
+
export const RICH_ITEM_ICON_COMPONENTS = {
|
|
7
|
+
utensils: Utensils, "map-pin": MapPin, map: MapIcon, image: ImageIcon, images: Images, video: Video, music: Music, quote: Quote,
|
|
8
|
+
"message-square": MessageSquare, info: Info, "triangle-alert": TriangleAlert, "circle-check": CircleCheck, star: Star, heart: Heart,
|
|
9
|
+
tag: Tag, hash: Hash, "at-sign": AtSign, link: LinkIcon, calendar: Calendar, clock: Clock, user: User, users: Users,
|
|
10
|
+
"shopping-cart": ShoppingCart, "credit-card": CreditCard, gift: Gift, "file-text": FileText, table: TableIcon, list: List,
|
|
11
|
+
"list-checks": ListChecks, code: Code, highlighter: Highlighter, bookmark: Bookmark, flag: Flag, globe: Globe, phone: Phone,
|
|
12
|
+
mail: Mail, square: Square, "panel-top": PanelTop, "chevrons-up-down": ChevronsUpDown, sparkles: Sparkles,
|
|
13
|
+
};
|
|
14
|
+
const roots = new WeakMap();
|
|
15
|
+
/** Draws an item's icon into a plain-DOM chip (the label's first letter without one); answers the cleanup. */
|
|
16
|
+
export function renderRichItemIcon(into, icon, label) {
|
|
17
|
+
const component = icon !== null && Object.prototype.hasOwnProperty.call(RICH_ITEM_ICON_COMPONENTS, icon) ? RICH_ITEM_ICON_COMPONENTS[icon] : null;
|
|
18
|
+
const letter = label.slice(0, 1).toUpperCase();
|
|
19
|
+
let entry = roots.get(into);
|
|
20
|
+
if (entry === undefined) {
|
|
21
|
+
if (component === null) {
|
|
22
|
+
into.textContent = letter;
|
|
23
|
+
return () => {
|
|
24
|
+
if (!roots.has(into))
|
|
25
|
+
into.textContent = "";
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
into.textContent = "";
|
|
29
|
+
entry = { root: createRoot(into), draws: 0 };
|
|
30
|
+
roots.set(into, entry);
|
|
31
|
+
}
|
|
32
|
+
const held = entry;
|
|
33
|
+
held.draws += 1;
|
|
34
|
+
const draw = held.draws;
|
|
35
|
+
held.root.render(component === null ? letter : createElement(component, { className: "size-4", "aria-hidden": true }));
|
|
36
|
+
return () => queueMicrotask(() => {
|
|
37
|
+
if (held.draws !== draw || roots.get(into) !== held)
|
|
38
|
+
return;
|
|
39
|
+
roots.delete(into);
|
|
40
|
+
held.root.unmount();
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type RichItemMarkListing, type RichItemNodeListing, type RichItemsListing, type RichItemsResponse, type RichTextItemNodeType } from "@kardalum/api-schemas";
|
|
2
|
+
/** A chip's state sentences. Each is made by the mount's own translator with its value, so i18next (the admin) or
|
|
3
|
+
* the SDK's English table interpolates `{{plugin}}` and `{{id}}`; the directory never fills a placeholder itself. */
|
|
4
|
+
export interface RichItemWords {
|
|
5
|
+
off: (plugin: string) => string;
|
|
6
|
+
notInstalled: (id: string) => string;
|
|
7
|
+
dropped: (plugin: string) => string;
|
|
8
|
+
failed: string;
|
|
9
|
+
}
|
|
10
|
+
export type RichItemsState = {
|
|
11
|
+
status: "loading";
|
|
12
|
+
} | {
|
|
13
|
+
status: "ready";
|
|
14
|
+
listing: RichItemsResponse;
|
|
15
|
+
} | {
|
|
16
|
+
status: "failed";
|
|
17
|
+
};
|
|
18
|
+
export interface RichItemDescription {
|
|
19
|
+
label: string;
|
|
20
|
+
icon: string | null;
|
|
21
|
+
state: string | null;
|
|
22
|
+
on: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface RichItemDirectory {
|
|
25
|
+
readonly language: string;
|
|
26
|
+
state(): RichItemsState;
|
|
27
|
+
set(next: RichItemsState): void;
|
|
28
|
+
subscribe(listener: () => void): () => void;
|
|
29
|
+
describe(type: RichTextItemNodeType | "pluginMark", plugin: string, name: string): RichItemDescription;
|
|
30
|
+
node(plugin: string, name: string): RichItemNodeListing | null;
|
|
31
|
+
mark(plugin: string, name: string): RichItemMarkListing | null;
|
|
32
|
+
/** The switched-on plugins' listings, in plugin id order. */
|
|
33
|
+
plugins(): RichItemsListing[];
|
|
34
|
+
renderIcon?: (into: HTMLElement, icon: string | null, label: string) => () => void;
|
|
35
|
+
}
|
|
36
|
+
export declare function createRichItemDirectory(options: {
|
|
37
|
+
language: string;
|
|
38
|
+
words: RichItemWords;
|
|
39
|
+
renderIcon?: RichItemDirectory["renderIcon"];
|
|
40
|
+
}): RichItemDirectory;
|
|
41
|
+
/** One read of the listing a mount. */
|
|
42
|
+
export declare function useRichItems(): RichItemsState;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { RichItemsResponseSchema, resolveLabel } from "@kardalum/api-schemas";
|
|
3
|
+
import { MANAGE_API, usePluginApi } from "../plugin-context.js";
|
|
4
|
+
const SHAPE_OF = { pluginBlock: "block", pluginInline: "inline", pluginWrapper: "wrapper" };
|
|
5
|
+
export function createRichItemDirectory(options) {
|
|
6
|
+
let current = { status: "loading" };
|
|
7
|
+
const listeners = new Set();
|
|
8
|
+
const entryOf = (plugin) => (current.status === "ready" ? current.listing.find((entry) => entry.plugin === plugin) : undefined);
|
|
9
|
+
return {
|
|
10
|
+
language: options.language,
|
|
11
|
+
...(options.renderIcon ? { renderIcon: options.renderIcon } : {}),
|
|
12
|
+
state: () => current,
|
|
13
|
+
set(next) {
|
|
14
|
+
current = next;
|
|
15
|
+
for (const listener of [...listeners])
|
|
16
|
+
listener();
|
|
17
|
+
},
|
|
18
|
+
subscribe(listener) {
|
|
19
|
+
listeners.add(listener);
|
|
20
|
+
return () => listeners.delete(listener);
|
|
21
|
+
},
|
|
22
|
+
describe(type, plugin, name) {
|
|
23
|
+
const fallback = `${plugin}/${name}`;
|
|
24
|
+
if (current.status === "loading")
|
|
25
|
+
return { label: fallback, icon: null, state: null, on: false };
|
|
26
|
+
if (current.status === "failed")
|
|
27
|
+
return { label: fallback, icon: null, state: options.words.failed, on: false };
|
|
28
|
+
const entry = entryOf(plugin);
|
|
29
|
+
if (!entry)
|
|
30
|
+
return { label: fallback, icon: null, state: options.words.notInstalled(plugin), on: false };
|
|
31
|
+
const declared = type === "pluginMark" ? entry.marks.find((mark) => mark.name === name) : entry.nodes.find((node) => node.name === name && node.shape === SHAPE_OF[type]);
|
|
32
|
+
const label = declared ? resolveLabel(declared.label, options.language) : fallback;
|
|
33
|
+
const icon = declared?.icon ?? null;
|
|
34
|
+
if (!entry.on)
|
|
35
|
+
return { label, icon, state: options.words.off(entry.name), on: false };
|
|
36
|
+
if (!declared)
|
|
37
|
+
return { label, icon, state: options.words.dropped(entry.name), on: false };
|
|
38
|
+
return { label, icon, state: null, on: true };
|
|
39
|
+
},
|
|
40
|
+
node: (plugin, name) => (entryOf(plugin)?.on ? (entryOf(plugin).nodes.find((node) => node.name === name) ?? null) : null),
|
|
41
|
+
mark: (plugin, name) => (entryOf(plugin)?.on ? (entryOf(plugin).marks.find((mark) => mark.name === name) ?? null) : null),
|
|
42
|
+
plugins: () => (current.status === "ready" ? current.listing.filter((entry) => entry.on).sort((a, b) => (a.plugin < b.plugin ? -1 : a.plugin > b.plugin ? 1 : 0)) : []),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** One read of the listing a mount. */
|
|
46
|
+
export function useRichItems() {
|
|
47
|
+
const fetchApi = usePluginApi();
|
|
48
|
+
const [state, setState] = useState({ status: "loading" });
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
let cancelled = false;
|
|
51
|
+
fetchApi(`${MANAGE_API}/render/rich-items`)
|
|
52
|
+
.then(async (response) => {
|
|
53
|
+
if (!response.ok)
|
|
54
|
+
throw new Error(String(response.status));
|
|
55
|
+
const parsed = RichItemsResponseSchema.safeParse(await response.json());
|
|
56
|
+
if (!cancelled)
|
|
57
|
+
setState(parsed.success ? { status: "ready", listing: parsed.data } : { status: "failed" });
|
|
58
|
+
})
|
|
59
|
+
.catch(() => {
|
|
60
|
+
if (!cancelled)
|
|
61
|
+
setState({ status: "failed" });
|
|
62
|
+
});
|
|
63
|
+
return () => {
|
|
64
|
+
cancelled = true;
|
|
65
|
+
};
|
|
66
|
+
}, [fetchApi]);
|
|
67
|
+
return state;
|
|
68
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type RichTextViewSlot = {
|
|
3
|
+
kind: "richTextItem";
|
|
4
|
+
name: string;
|
|
5
|
+
} | {
|
|
6
|
+
kind: "richTextButton";
|
|
7
|
+
buttonId: string;
|
|
8
|
+
};
|
|
9
|
+
export interface RichTextViewHost {
|
|
10
|
+
can(action: string): boolean;
|
|
11
|
+
mount(input: {
|
|
12
|
+
pluginId: string;
|
|
13
|
+
slot: RichTextViewSlot;
|
|
14
|
+
boundaryKey: string;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}): ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/** @internal Host-only: the admin renders it once, inside its AuthProvider. Not a point. */
|
|
19
|
+
export declare function RichTextViewHostProvider({ value, children }: {
|
|
20
|
+
value: RichTextViewHost;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
23
|
+
/** @internal The host, or null outside the admin (a plugin's own test, a story). */
|
|
24
|
+
export declare function useRichTextViewHost(): RichTextViewHost | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
const RichTextViewHostContext = createContext(null);
|
|
4
|
+
/** @internal Host-only: the admin renders it once, inside its AuthProvider. Not a point. */
|
|
5
|
+
export function RichTextViewHostProvider({ value, children }) {
|
|
6
|
+
return _jsx(RichTextViewHostContext.Provider, { value: value, children: children });
|
|
7
|
+
}
|
|
8
|
+
/** @internal The host, or null outside the admin (a plugin's own test, a story). */
|
|
9
|
+
export function useRichTextViewHost() {
|
|
10
|
+
return useContext(RichTextViewHostContext);
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface ToolbarButtonProps {
|
|
3
|
+
itemKey: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
hasPopup?: "listbox" | "dialog" | "menu";
|
|
10
|
+
isRovingActive: boolean;
|
|
11
|
+
registerRef: (el: HTMLButtonElement | null) => void;
|
|
12
|
+
onFocus: () => void;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function ToolbarButton({ itemKey, label, ariaLabel, active, disabled, expanded, hasPopup, isRovingActive, registerRef, onFocus, onClick, }: ToolbarButtonProps): import("react").JSX.Element;
|
|
16
|
+
export declare function ToolbarSeparator(): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn, IconTooltip } from "@kardalum/ui";
|
|
3
|
+
export function ToolbarButton({ itemKey, label, ariaLabel, active, disabled, expanded, hasPopup, isRovingActive, registerRef, onFocus, onClick, }) {
|
|
4
|
+
const button = (_jsx("button", { ref: registerRef, type: "button", "data-testid": `rt-toolbar-${itemKey}`, "aria-label": ariaLabel, "aria-pressed": active, "aria-haspopup": hasPopup, "aria-expanded": hasPopup ? expanded : undefined, disabled: disabled, tabIndex: disabled ? -1 : isRovingActive ? 0 : -1, onFocus: onFocus, onClick: onClick, className: cn("inline-flex h-8 items-center gap-1 rounded-md px-2 text-xs font-medium text-text-secondary hover:bg-background-hover disabled:pointer-events-none disabled:opacity-50", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary-600", active && "bg-primary-100 text-primary-800"), children: label }));
|
|
5
|
+
return ariaLabel ? _jsx(IconTooltip, { children: button }) : button;
|
|
6
|
+
}
|
|
7
|
+
export function ToolbarSeparator() {
|
|
8
|
+
return _jsx("span", { "aria-hidden": "true", className: "mx-1 inline-block h-4 w-px bg-border-default" });
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Extension, type Editor } from "@tiptap/core";
|
|
2
|
+
import { type RichItemNodeListing } from "@kardalum/api-schemas";
|
|
3
|
+
import type { RichItemDirectory } from "./rich-items.js";
|
|
4
|
+
export interface PasteMatch {
|
|
5
|
+
plugin: string;
|
|
6
|
+
node: RichItemNodeListing;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PasteChoice {
|
|
10
|
+
address: string;
|
|
11
|
+
from: number;
|
|
12
|
+
to: number;
|
|
13
|
+
options: PasteMatch[];
|
|
14
|
+
}
|
|
15
|
+
/** Replaces the pasted address at [from, to] with the item, or makes it a link; false when the text there changed. */
|
|
16
|
+
export declare function convertPastedAddress(editor: Editor, choice: PasteChoice, match: PasteMatch | "link"): boolean;
|
|
17
|
+
export declare const PluginItemUrlPaste: Extension<{
|
|
18
|
+
items?: RichItemDirectory;
|
|
19
|
+
onChoice?: (choice: PasteChoice) => void;
|
|
20
|
+
}, any>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Extension } from "@tiptap/core";
|
|
2
|
+
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
|
3
|
+
import { closeHistory } from "@tiptap/pm/history";
|
|
4
|
+
import { hostMatches, itemNodeTypeOf, pastedAddressHost, resolveLabel } from "@kardalum/api-schemas";
|
|
5
|
+
import { newItemAttributes } from "./item-attributes.js";
|
|
6
|
+
import { newItemId } from "./plugin-items.js";
|
|
7
|
+
function matchesOf(items, host) {
|
|
8
|
+
const out = [];
|
|
9
|
+
for (const entry of items.plugins()) {
|
|
10
|
+
for (const node of entry.nodes) {
|
|
11
|
+
if (node.fromUrl !== null && node.shape !== "wrapper" && hostMatches(host, node.fromUrl.hosts))
|
|
12
|
+
out.push({ plugin: entry.plugin, node, label: resolveLabel(node.label, items.language) });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return out;
|
|
16
|
+
}
|
|
17
|
+
/** Replaces the pasted address at [from, to] with the item, or makes it a link; false when the text there changed. */
|
|
18
|
+
export function convertPastedAddress(editor, choice, match) {
|
|
19
|
+
if (editor.isDestroyed || choice.to > editor.state.doc.content.size || editor.state.doc.textBetween(choice.from, choice.to) !== choice.address)
|
|
20
|
+
return false;
|
|
21
|
+
const tr = closeHistory(editor.state.tr);
|
|
22
|
+
if (match === "link") {
|
|
23
|
+
tr.addMark(choice.from, choice.to, editor.schema.marks.link.create({ href: choice.address }));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
if (match.node.fromUrl === null)
|
|
27
|
+
return false;
|
|
28
|
+
const attrs = newItemAttributes(match.plugin, match.node);
|
|
29
|
+
const node = editor.schema.nodes[itemNodeTypeOf(match.node.shape)].create({ ...attrs, data: { ...attrs.data, [match.node.fromUrl.attr]: choice.address }, id: newItemId() });
|
|
30
|
+
tr.replaceRangeWith(choice.from, choice.to, node);
|
|
31
|
+
}
|
|
32
|
+
editor.view.dispatch(tr);
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
export const PluginItemUrlPaste = Extension.create({
|
|
36
|
+
name: "pluginItemUrlPaste",
|
|
37
|
+
priority: 1100,
|
|
38
|
+
addOptions: () => ({ items: undefined, onChoice: undefined }),
|
|
39
|
+
addProseMirrorPlugins() {
|
|
40
|
+
const { items, onChoice } = this.options;
|
|
41
|
+
const editor = this.editor;
|
|
42
|
+
if (!items)
|
|
43
|
+
return [];
|
|
44
|
+
let plainFlag = null;
|
|
45
|
+
return [
|
|
46
|
+
new Plugin({
|
|
47
|
+
key: new PluginKey("kardalumItemUrlPaste"),
|
|
48
|
+
props: {
|
|
49
|
+
transformPastedText: (text, plain) => {
|
|
50
|
+
plainFlag = plain;
|
|
51
|
+
return text;
|
|
52
|
+
},
|
|
53
|
+
handlePaste: (view, event) => {
|
|
54
|
+
const plain = plainFlag === true;
|
|
55
|
+
plainFlag = null;
|
|
56
|
+
if (plain)
|
|
57
|
+
return false;
|
|
58
|
+
const { $from } = view.state.selection;
|
|
59
|
+
if ($from.parent.type.spec.code === true)
|
|
60
|
+
return false;
|
|
61
|
+
const text = event.clipboardData?.getData("text/plain") ?? "";
|
|
62
|
+
const host = pastedAddressHost(text);
|
|
63
|
+
if (host === null)
|
|
64
|
+
return false;
|
|
65
|
+
const options = matchesOf(items, host);
|
|
66
|
+
if (options.length === 0)
|
|
67
|
+
return false;
|
|
68
|
+
const address = text.trim();
|
|
69
|
+
const from = view.state.selection.from;
|
|
70
|
+
view.dispatch(view.state.tr.insertText(address).setMeta("preventAutolink", true));
|
|
71
|
+
const choice = { address, from, to: from + address.length, options };
|
|
72
|
+
if (options.length === 1)
|
|
73
|
+
convertPastedAddress(editor, choice, options[0]);
|
|
74
|
+
else
|
|
75
|
+
onChoice?.(choice);
|
|
76
|
+
return true;
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
}),
|
|
80
|
+
];
|
|
81
|
+
},
|
|
82
|
+
});
|
|
@@ -33,3 +33,8 @@ export declare function isRichtextHtmlError(value: unknown): value is RichtextHt
|
|
|
33
33
|
* item is the caller's question: this package holds no media library.
|
|
34
34
|
*/
|
|
35
35
|
export declare function richtextFromHtml(html: string): RichtextDocument;
|
|
36
|
+
/**
|
|
37
|
+
* M35 C4a (design D6.1): whether the editor's own schema reads a stored value, with the same extension list the HTML
|
|
38
|
+
* conversion loads and no DOM. The server runs it on a changed rich text value after the shape check has bounded it.
|
|
39
|
+
*/
|
|
40
|
+
export declare function richtextSchemaProblem(value: unknown): "unreadable" | null;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
// React, and the extensions' node views are never called by a parser.
|
|
9
9
|
import { generateJSON } from "@tiptap/html/server";
|
|
10
10
|
import { buildRichtextExtensions } from "./richtext/extensions.js";
|
|
11
|
+
import { richTextOpens, richTextSchemaOf } from "./richtext/content-guard.js";
|
|
11
12
|
/** The most a rich text value given as HTML may be, in UTF-8 bytes (1 MiB). */
|
|
12
13
|
export const MAX_RICHTEXT_HTML_BYTES = 1_048_576;
|
|
13
14
|
/**
|
|
@@ -71,3 +72,13 @@ export function richtextFromHtml(html) {
|
|
|
71
72
|
}
|
|
72
73
|
return doc;
|
|
73
74
|
}
|
|
75
|
+
let schema = null;
|
|
76
|
+
/**
|
|
77
|
+
* M35 C4a (design D6.1): whether the editor's own schema reads a stored value, with the same extension list the HTML
|
|
78
|
+
* conversion loads and no DOM. The server runs it on a changed rich text value after the shape check has bounded it.
|
|
79
|
+
*/
|
|
80
|
+
export function richtextSchemaProblem(value) {
|
|
81
|
+
extensions ??= buildRichtextExtensions();
|
|
82
|
+
schema ??= richTextSchemaOf(extensions);
|
|
83
|
+
return richTextOpens(schema, value) ? null : "unreadable";
|
|
84
|
+
}
|
package/dist/sdk-strings.d.ts
CHANGED
|
@@ -40,6 +40,19 @@ export declare const SDK_STRINGS_EN: {
|
|
|
40
40
|
readonly "contentList.noMatches": "Nothing matches.";
|
|
41
41
|
readonly "contentList.noChildren": "No children yet.";
|
|
42
42
|
readonly "contentList.loadMore": "Load more";
|
|
43
|
+
readonly "contentList.filter": "Filter";
|
|
44
|
+
readonly "contentList.filterAll": "All pages";
|
|
45
|
+
readonly "contentList.filterUnavailable": "This filter could not be applied. Try again, or choose All pages.";
|
|
46
|
+
readonly "contentList.scanCapped": "Only part of the list was checked. Load more to keep looking.";
|
|
47
|
+
readonly "contentList.cellUnavailable": "Not available";
|
|
48
|
+
readonly "contentList.rowActions": "Actions for {{name}}";
|
|
49
|
+
readonly "contentList.rowActionsHeader": "Actions";
|
|
50
|
+
readonly "contentList.select": "Select {{name}}";
|
|
51
|
+
readonly "contentList.selectLoaded": "Select the loaded pages";
|
|
52
|
+
readonly "contentList.selectedCount": "Selected: {{selected}}";
|
|
53
|
+
readonly "contentList.selectionLimit": "At most {{max}} pages can be selected.";
|
|
54
|
+
readonly "contentList.clearSelection": "Clear selection";
|
|
55
|
+
readonly "contentList.bulkActionsLabel": "With the selected pages";
|
|
43
56
|
readonly "contentListSettings.fieldColumn": "{{alias}} ({{type}}: {{field}})";
|
|
44
57
|
readonly "contentListSettings.label": "Label";
|
|
45
58
|
readonly "contentListSettings.moveUp": "Move up";
|
|
@@ -159,6 +172,9 @@ export declare const SDK_STRINGS_EN: {
|
|
|
159
172
|
readonly "richText.editOnPage": "Edit on page";
|
|
160
173
|
readonly "richText.sourceStale": "Content changed elsewhere. Leaving source view will overwrite it.";
|
|
161
174
|
readonly "richText.sourceLabel": "HTML source";
|
|
175
|
+
readonly "richText.fromPlugins": "From plugins";
|
|
176
|
+
readonly "richText.pluginTools": "Plugin tools";
|
|
177
|
+
readonly "richText.more": "More";
|
|
162
178
|
readonly "styleMenu.label": "Text styles";
|
|
163
179
|
readonly "styleMenu.loading": "Loading…";
|
|
164
180
|
readonly "styleMenu.none": "No theme styles declared";
|
|
@@ -179,7 +195,36 @@ export declare const SDK_STRINGS_EN: {
|
|
|
179
195
|
readonly "blockPanel.fieldsUnavailable": "This block's fields couldn't be loaded. Its template declaration may be missing or the render service is unavailable.";
|
|
180
196
|
readonly "blockPanel.previewLabel": "Preview: {{partial}}";
|
|
181
197
|
readonly "blockPanel.previewLoading": "Loading preview…";
|
|
198
|
+
readonly "richText.itemOff": "From {{plugin}}, which is switched off. It is kept as it is. You can move or delete it.";
|
|
199
|
+
readonly "richText.itemNotInstalled": "From a plugin that is not installed ({{id}}). It is kept as it is. You can move or delete it.";
|
|
200
|
+
readonly "richText.itemDropped": "{{plugin}} no longer offers this item. It is kept as it is.";
|
|
201
|
+
readonly "richText.itemDetailsFailed": "The plugin details could not be loaded. This item is kept as it is.";
|
|
202
|
+
readonly "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.";
|
|
203
|
+
readonly "richText.unreadableEarlierVersion": "Open an earlier version";
|
|
204
|
+
readonly "richText.unreadableKeepText": "Keep the text only";
|
|
205
|
+
readonly "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.";
|
|
206
|
+
readonly "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.";
|
|
182
207
|
readonly "blockPanel.previewFailed": "Failed to render preview ({{status}})";
|
|
208
|
+
readonly "itemPanel.remove": "Remove item";
|
|
209
|
+
readonly "itemPanel.done": "Done";
|
|
210
|
+
readonly "itemPanel.clear": "Clear";
|
|
211
|
+
readonly "itemPanel.choosePage": "Choose a page";
|
|
212
|
+
readonly "itemPanel.noPage": "No page chosen";
|
|
213
|
+
readonly "itemPanel.addImages": "Add a picture";
|
|
214
|
+
readonly "itemPanel.removeImage": "Remove picture";
|
|
215
|
+
readonly "itemPanel.badAddress": "Enter an address that starts with https://, http://, mailto:, tel: or a single /.";
|
|
216
|
+
readonly "richText.handleRefused": "The plugin could not change the text: {{reason}}.";
|
|
217
|
+
readonly "richText.handleReasonReadOnly": "the text cannot be changed now";
|
|
218
|
+
readonly "richText.handleReasonInvalid": "what it sent does not fit";
|
|
219
|
+
readonly "richText.handleReasonTooLarge": "the text would pass its limits";
|
|
220
|
+
readonly "richText.handleReasonNotOwnItem": "it may change only its own items";
|
|
221
|
+
readonly "richText.handleReasonGone": "the item or the tool is no longer open";
|
|
222
|
+
readonly "richText.buttonViewClose": "Close";
|
|
223
|
+
readonly "richText.pasteChoose": "Paste this address as";
|
|
224
|
+
readonly "richText.pasteAsLink": "Link";
|
|
225
|
+
readonly "itemPanel.viewUnavailable": "This item's own editor is not available here. Its data is kept as it is.";
|
|
226
|
+
readonly "markForm.apply": "Apply";
|
|
227
|
+
readonly "markForm.remove": "Remove";
|
|
183
228
|
readonly "simpleStorage.loadFailed": "Failed to load plugin value ({{status}})";
|
|
184
229
|
readonly "simpleStorage.saveFailed": "Failed to save plugin value ({{status}})";
|
|
185
230
|
readonly "simpleStorage.roleCannotRead": "Could not save this field. Your role cannot view pages.";
|
|
@@ -196,6 +241,20 @@ export declare const SDK_STRINGS_EN: {
|
|
|
196
241
|
readonly "simpleStorage.aUser": "a user";
|
|
197
242
|
readonly "simpleStorage.adminsOnly": "admins only";
|
|
198
243
|
readonly "simpleStorage.listSeparator": ", ";
|
|
244
|
+
readonly "pagePicker.atMax": "Maximum reached: {{max}}";
|
|
245
|
+
readonly "pagePicker.sheetTitle": "Choose a page";
|
|
246
|
+
readonly "pagePicker.sheetTitleMany": "Choose pages";
|
|
247
|
+
readonly "pagePicker.sheetHint": "Pages you can choose are shown in full; others are dimmed.";
|
|
248
|
+
readonly "pagePicker.expand": "Show the pages under {{name}}";
|
|
249
|
+
readonly "pagePicker.collapse": "Hide the pages under {{name}}";
|
|
250
|
+
readonly "pagePicker.chosen": "Chosen";
|
|
251
|
+
readonly "pagePicker.loadMore": "Load more";
|
|
252
|
+
readonly "pagePicker.loading": "Loading…";
|
|
253
|
+
readonly "pagePicker.loadFailed": "The pages could not be read.";
|
|
254
|
+
readonly "pagePicker.cancel": "Cancel";
|
|
255
|
+
readonly "pagePicker.done": "Done";
|
|
256
|
+
readonly "copy.done": "Copied";
|
|
257
|
+
readonly "copy.failed": "Could not copy. Select the text and copy it yourself.";
|
|
199
258
|
};
|
|
200
259
|
/** Placeholder names an SDK string may not use. The admin hands a view's
|
|
201
260
|
* `vars` straight to i18next as its options, and i18next reads these names as
|