@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
|
@@ -14,8 +14,8 @@ export declare const BlockParamTypeSchema: z.ZodEnum<{
|
|
|
14
14
|
boolean: "boolean";
|
|
15
15
|
text: "text";
|
|
16
16
|
image: "image";
|
|
17
|
-
textarea: "textarea";
|
|
18
17
|
choice: "choice";
|
|
18
|
+
textarea: "textarea";
|
|
19
19
|
}>;
|
|
20
20
|
export type BlockParamType = z.infer<typeof BlockParamTypeSchema>;
|
|
21
21
|
export declare const BlockParamSchema: z.ZodObject<{
|
|
@@ -25,8 +25,8 @@ export declare const BlockParamSchema: z.ZodObject<{
|
|
|
25
25
|
boolean: "boolean";
|
|
26
26
|
text: "text";
|
|
27
27
|
image: "image";
|
|
28
|
-
textarea: "textarea";
|
|
29
28
|
choice: "choice";
|
|
29
|
+
textarea: "textarea";
|
|
30
30
|
}>;
|
|
31
31
|
label: z.ZodString;
|
|
32
32
|
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -42,8 +42,8 @@ export declare const BlockListingSchema: z.ZodObject<{
|
|
|
42
42
|
boolean: "boolean";
|
|
43
43
|
text: "text";
|
|
44
44
|
image: "image";
|
|
45
|
-
textarea: "textarea";
|
|
46
45
|
choice: "choice";
|
|
46
|
+
textarea: "textarea";
|
|
47
47
|
}>;
|
|
48
48
|
label: z.ZodString;
|
|
49
49
|
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -60,8 +60,8 @@ export declare const BlockListResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
60
60
|
boolean: "boolean";
|
|
61
61
|
text: "text";
|
|
62
62
|
image: "image";
|
|
63
|
-
textarea: "textarea";
|
|
64
63
|
choice: "choice";
|
|
64
|
+
textarea: "textarea";
|
|
65
65
|
}>;
|
|
66
66
|
label: z.ZodString;
|
|
67
67
|
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -77,3 +77,306 @@ export declare const RenderBlockResponseSchema: z.ZodObject<{
|
|
|
77
77
|
html: z.ZodString;
|
|
78
78
|
}, z.core.$strict>;
|
|
79
79
|
export type RenderBlockResponse = z.infer<typeof RenderBlockResponseSchema>;
|
|
80
|
+
export declare const RichItemNodeListingSchema: z.ZodObject<{
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
shape: z.ZodEnum<{
|
|
83
|
+
block: "block";
|
|
84
|
+
inline: "inline";
|
|
85
|
+
wrapper: "wrapper";
|
|
86
|
+
}>;
|
|
87
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
88
|
+
en: z.ZodString;
|
|
89
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
90
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
91
|
+
version: z.ZodNumber;
|
|
92
|
+
attrs: z.ZodArray<z.ZodObject<{
|
|
93
|
+
key: z.ZodString;
|
|
94
|
+
type: z.ZodEnum<{
|
|
95
|
+
number: "number";
|
|
96
|
+
boolean: "boolean";
|
|
97
|
+
url: "url";
|
|
98
|
+
text: "text";
|
|
99
|
+
page: "page";
|
|
100
|
+
images: "images";
|
|
101
|
+
image: "image";
|
|
102
|
+
json: "json";
|
|
103
|
+
choice: "choice";
|
|
104
|
+
textarea: "textarea";
|
|
105
|
+
}>;
|
|
106
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
107
|
+
en: z.ZodString;
|
|
108
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
109
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
111
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
113
|
+
}, z.core.$strict>>;
|
|
114
|
+
textFrom: z.ZodNullable<z.ZodString>;
|
|
115
|
+
hasView: z.ZodBoolean;
|
|
116
|
+
editorial: z.ZodDefault<z.ZodBoolean>;
|
|
117
|
+
textFromView: z.ZodDefault<z.ZodBoolean>;
|
|
118
|
+
fromUrl: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
119
|
+
hosts: z.ZodArray<z.ZodString>;
|
|
120
|
+
attr: z.ZodString;
|
|
121
|
+
}, z.core.$strict>>>;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
export declare const RichItemMarkListingSchema: z.ZodObject<{
|
|
124
|
+
name: z.ZodString;
|
|
125
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
126
|
+
en: z.ZodString;
|
|
127
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
128
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
129
|
+
attrs: z.ZodArray<z.ZodObject<{
|
|
130
|
+
key: z.ZodString;
|
|
131
|
+
type: z.ZodEnum<{
|
|
132
|
+
number: "number";
|
|
133
|
+
boolean: "boolean";
|
|
134
|
+
url: "url";
|
|
135
|
+
text: "text";
|
|
136
|
+
page: "page";
|
|
137
|
+
images: "images";
|
|
138
|
+
image: "image";
|
|
139
|
+
json: "json";
|
|
140
|
+
choice: "choice";
|
|
141
|
+
textarea: "textarea";
|
|
142
|
+
}>;
|
|
143
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
144
|
+
en: z.ZodString;
|
|
145
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
146
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
148
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
150
|
+
}, z.core.$strict>>;
|
|
151
|
+
hasView: z.ZodBoolean;
|
|
152
|
+
editorial: z.ZodDefault<z.ZodBoolean>;
|
|
153
|
+
}, z.core.$strict>;
|
|
154
|
+
export declare const RichItemButtonListingSchema: z.ZodObject<{
|
|
155
|
+
id: z.ZodString;
|
|
156
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
157
|
+
en: z.ZodString;
|
|
158
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
159
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
160
|
+
does: z.ZodUnion<readonly [z.ZodObject<{
|
|
161
|
+
insert: z.ZodString;
|
|
162
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
163
|
+
toggle: z.ZodString;
|
|
164
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
165
|
+
view: z.ZodLiteral<true>;
|
|
166
|
+
action: z.ZodString;
|
|
167
|
+
}, z.core.$strict>]>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
export declare const RichItemsListingSchema: z.ZodObject<{
|
|
170
|
+
plugin: z.ZodString;
|
|
171
|
+
name: z.ZodString;
|
|
172
|
+
on: z.ZodBoolean;
|
|
173
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
174
|
+
name: z.ZodString;
|
|
175
|
+
shape: z.ZodEnum<{
|
|
176
|
+
block: "block";
|
|
177
|
+
inline: "inline";
|
|
178
|
+
wrapper: "wrapper";
|
|
179
|
+
}>;
|
|
180
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
181
|
+
en: z.ZodString;
|
|
182
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
183
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
184
|
+
version: z.ZodNumber;
|
|
185
|
+
attrs: z.ZodArray<z.ZodObject<{
|
|
186
|
+
key: z.ZodString;
|
|
187
|
+
type: z.ZodEnum<{
|
|
188
|
+
number: "number";
|
|
189
|
+
boolean: "boolean";
|
|
190
|
+
url: "url";
|
|
191
|
+
text: "text";
|
|
192
|
+
page: "page";
|
|
193
|
+
images: "images";
|
|
194
|
+
image: "image";
|
|
195
|
+
json: "json";
|
|
196
|
+
choice: "choice";
|
|
197
|
+
textarea: "textarea";
|
|
198
|
+
}>;
|
|
199
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
200
|
+
en: z.ZodString;
|
|
201
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
202
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
204
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
206
|
+
}, z.core.$strict>>;
|
|
207
|
+
textFrom: z.ZodNullable<z.ZodString>;
|
|
208
|
+
hasView: z.ZodBoolean;
|
|
209
|
+
editorial: z.ZodDefault<z.ZodBoolean>;
|
|
210
|
+
textFromView: z.ZodDefault<z.ZodBoolean>;
|
|
211
|
+
fromUrl: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
212
|
+
hosts: z.ZodArray<z.ZodString>;
|
|
213
|
+
attr: z.ZodString;
|
|
214
|
+
}, z.core.$strict>>>;
|
|
215
|
+
}, z.core.$strict>>;
|
|
216
|
+
marks: z.ZodArray<z.ZodObject<{
|
|
217
|
+
name: z.ZodString;
|
|
218
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
219
|
+
en: z.ZodString;
|
|
220
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
221
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
222
|
+
attrs: z.ZodArray<z.ZodObject<{
|
|
223
|
+
key: z.ZodString;
|
|
224
|
+
type: z.ZodEnum<{
|
|
225
|
+
number: "number";
|
|
226
|
+
boolean: "boolean";
|
|
227
|
+
url: "url";
|
|
228
|
+
text: "text";
|
|
229
|
+
page: "page";
|
|
230
|
+
images: "images";
|
|
231
|
+
image: "image";
|
|
232
|
+
json: "json";
|
|
233
|
+
choice: "choice";
|
|
234
|
+
textarea: "textarea";
|
|
235
|
+
}>;
|
|
236
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
237
|
+
en: z.ZodString;
|
|
238
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
239
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
241
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
243
|
+
}, z.core.$strict>>;
|
|
244
|
+
hasView: z.ZodBoolean;
|
|
245
|
+
editorial: z.ZodDefault<z.ZodBoolean>;
|
|
246
|
+
}, z.core.$strict>>;
|
|
247
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
250
|
+
en: z.ZodString;
|
|
251
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
252
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
253
|
+
does: z.ZodUnion<readonly [z.ZodObject<{
|
|
254
|
+
insert: z.ZodString;
|
|
255
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
256
|
+
toggle: z.ZodString;
|
|
257
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
258
|
+
view: z.ZodLiteral<true>;
|
|
259
|
+
action: z.ZodString;
|
|
260
|
+
}, z.core.$strict>]>;
|
|
261
|
+
}, z.core.$strict>>;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
export type RichItemsListing = z.infer<typeof RichItemsListingSchema>;
|
|
264
|
+
export type RichItemNodeListing = z.infer<typeof RichItemNodeListingSchema>;
|
|
265
|
+
export type RichItemMarkListing = z.infer<typeof RichItemMarkListingSchema>;
|
|
266
|
+
export type RichItemButtonListing = z.infer<typeof RichItemButtonListingSchema>;
|
|
267
|
+
export declare const RichItemsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
268
|
+
plugin: z.ZodString;
|
|
269
|
+
name: z.ZodString;
|
|
270
|
+
on: z.ZodBoolean;
|
|
271
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
272
|
+
name: z.ZodString;
|
|
273
|
+
shape: z.ZodEnum<{
|
|
274
|
+
block: "block";
|
|
275
|
+
inline: "inline";
|
|
276
|
+
wrapper: "wrapper";
|
|
277
|
+
}>;
|
|
278
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
279
|
+
en: z.ZodString;
|
|
280
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
281
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
282
|
+
version: z.ZodNumber;
|
|
283
|
+
attrs: z.ZodArray<z.ZodObject<{
|
|
284
|
+
key: z.ZodString;
|
|
285
|
+
type: z.ZodEnum<{
|
|
286
|
+
number: "number";
|
|
287
|
+
boolean: "boolean";
|
|
288
|
+
url: "url";
|
|
289
|
+
text: "text";
|
|
290
|
+
page: "page";
|
|
291
|
+
images: "images";
|
|
292
|
+
image: "image";
|
|
293
|
+
json: "json";
|
|
294
|
+
choice: "choice";
|
|
295
|
+
textarea: "textarea";
|
|
296
|
+
}>;
|
|
297
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
298
|
+
en: z.ZodString;
|
|
299
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
300
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
301
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
302
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
304
|
+
}, z.core.$strict>>;
|
|
305
|
+
textFrom: z.ZodNullable<z.ZodString>;
|
|
306
|
+
hasView: z.ZodBoolean;
|
|
307
|
+
editorial: z.ZodDefault<z.ZodBoolean>;
|
|
308
|
+
textFromView: z.ZodDefault<z.ZodBoolean>;
|
|
309
|
+
fromUrl: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
310
|
+
hosts: z.ZodArray<z.ZodString>;
|
|
311
|
+
attr: z.ZodString;
|
|
312
|
+
}, z.core.$strict>>>;
|
|
313
|
+
}, z.core.$strict>>;
|
|
314
|
+
marks: z.ZodArray<z.ZodObject<{
|
|
315
|
+
name: z.ZodString;
|
|
316
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
317
|
+
en: z.ZodString;
|
|
318
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
319
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
320
|
+
attrs: z.ZodArray<z.ZodObject<{
|
|
321
|
+
key: z.ZodString;
|
|
322
|
+
type: z.ZodEnum<{
|
|
323
|
+
number: "number";
|
|
324
|
+
boolean: "boolean";
|
|
325
|
+
url: "url";
|
|
326
|
+
text: "text";
|
|
327
|
+
page: "page";
|
|
328
|
+
images: "images";
|
|
329
|
+
image: "image";
|
|
330
|
+
json: "json";
|
|
331
|
+
choice: "choice";
|
|
332
|
+
textarea: "textarea";
|
|
333
|
+
}>;
|
|
334
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
335
|
+
en: z.ZodString;
|
|
336
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
337
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
339
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
340
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
341
|
+
}, z.core.$strict>>;
|
|
342
|
+
hasView: z.ZodBoolean;
|
|
343
|
+
editorial: z.ZodDefault<z.ZodBoolean>;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
346
|
+
id: z.ZodString;
|
|
347
|
+
label: z.ZodPreprocess<z.ZodObject<{
|
|
348
|
+
en: z.ZodString;
|
|
349
|
+
}, z.core.$catchall<z.ZodString>>, unknown>;
|
|
350
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
351
|
+
does: z.ZodUnion<readonly [z.ZodObject<{
|
|
352
|
+
insert: z.ZodString;
|
|
353
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
354
|
+
toggle: z.ZodString;
|
|
355
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
356
|
+
view: z.ZodLiteral<true>;
|
|
357
|
+
action: z.ZodString;
|
|
358
|
+
}, z.core.$strict>]>;
|
|
359
|
+
}, z.core.$strict>>;
|
|
360
|
+
}, z.core.$strict>>;
|
|
361
|
+
export type RichItemsResponse = z.infer<typeof RichItemsResponseSchema>;
|
|
362
|
+
export declare const RenderRichItemRequestSchema: z.ZodObject<{
|
|
363
|
+
plugin: z.ZodString;
|
|
364
|
+
name: z.ZodString;
|
|
365
|
+
v: z.ZodNumber;
|
|
366
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
367
|
+
text: z.ZodString;
|
|
368
|
+
}, z.core.$strict>;
|
|
369
|
+
export type RenderRichItemRequest = z.infer<typeof RenderRichItemRequestSchema>;
|
|
370
|
+
export declare const RenderRichItemResponseSchema: z.ZodObject<{
|
|
371
|
+
html: z.ZodString;
|
|
372
|
+
}, z.core.$strict>;
|
|
373
|
+
export type RenderRichItemResponse = z.infer<typeof RenderRichItemResponseSchema>;
|
|
374
|
+
export declare const RENDER_RICH_ITEM_ERROR_CODES: readonly ["item_unknown", "item_unavailable"];
|
|
375
|
+
export declare const RenderRichItemErrorSchema: z.ZodObject<{
|
|
376
|
+
message: z.ZodString;
|
|
377
|
+
code: z.ZodEnum<{
|
|
378
|
+
item_unknown: "item_unknown";
|
|
379
|
+
item_unavailable: "item_unavailable";
|
|
380
|
+
}>;
|
|
381
|
+
}, z.core.$strict>;
|
|
382
|
+
export type RenderRichItemError = z.infer<typeof RenderRichItemErrorSchema>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { TemplateAliasSchema } from "./template.schema.js";
|
|
3
|
+
import { RichTextAttrSchema, RichTextFromUrlSchema, RICH_TEXT_NODE_SHAPES } from "./plugin-rich-text.js";
|
|
4
|
+
import { isItemNameText, RICH_TEXT_ITEM_TEXT_MAX, RICH_TEXT_ITEM_VERSION_MAX } from "./rich-text-shape.js";
|
|
5
|
+
import { EDITOR_SLOT_ID_MAX } from "./plugin-editor-extensions.js";
|
|
6
|
+
import { PLUGIN_ID_MAX } from "./plugin-id-rules.js";
|
|
7
|
+
import { SlotLabelSchema } from "./plugin-labels.js";
|
|
3
8
|
// S197 Task 6: the editor's server side. GET .../text-styles and
|
|
4
9
|
// .../blocks feed the richtext editor's dropdowns
|
|
5
10
|
// (rich-text-view.tsx's useTextStyles, insert-menu.tsx's/block-panel.tsx's
|
|
@@ -48,3 +53,59 @@ export const RenderBlockRequestSchema = z
|
|
|
48
53
|
})
|
|
49
54
|
.strict();
|
|
50
55
|
export const RenderBlockResponseSchema = z.object({ html: z.string() }).strict();
|
|
56
|
+
// M35 C4a (design D8): GET .../render/rich-items lists each attached plugin's rich text declarations, `on` telling a
|
|
57
|
+
// switched-off plugin from a switched-on one (C4a-D5), a bare array like /render/blocks (small and in process); labels
|
|
58
|
+
// as declared, which the admin resolves. POST .../render/rich-item renders one item as the site would.
|
|
59
|
+
export const RichItemNodeListingSchema = z
|
|
60
|
+
.object({
|
|
61
|
+
name: z.string(),
|
|
62
|
+
shape: z.enum(RICH_TEXT_NODE_SHAPES),
|
|
63
|
+
label: SlotLabelSchema,
|
|
64
|
+
icon: z.string().nullable(),
|
|
65
|
+
version: z.number().int(),
|
|
66
|
+
attrs: z.array(RichTextAttrSchema),
|
|
67
|
+
textFrom: z.string().nullable(),
|
|
68
|
+
hasView: z.boolean(),
|
|
69
|
+
// M35 C4b (design D15, D17, D18): defaults, so a listing written before them still parses.
|
|
70
|
+
editorial: z.boolean().default(false),
|
|
71
|
+
textFromView: z.boolean().default(false),
|
|
72
|
+
fromUrl: RichTextFromUrlSchema.nullable().default(null),
|
|
73
|
+
})
|
|
74
|
+
.strict();
|
|
75
|
+
export const RichItemMarkListingSchema = z
|
|
76
|
+
.object({ name: z.string(), label: SlotLabelSchema, icon: z.string().nullable(), attrs: z.array(RichTextAttrSchema), hasView: z.boolean(), editorial: z.boolean().default(false) })
|
|
77
|
+
.strict();
|
|
78
|
+
export const RichItemButtonListingSchema = z
|
|
79
|
+
.object({
|
|
80
|
+
id: z.string(),
|
|
81
|
+
label: SlotLabelSchema,
|
|
82
|
+
icon: z.string().nullable(),
|
|
83
|
+
// M35 C4b (design D16): a button view names its action; the listing never carries the component.
|
|
84
|
+
does: z.union([z.object({ insert: z.string() }).strict(), z.object({ toggle: z.string() }).strict(), z.object({ view: z.literal(true), action: z.string() }).strict()]),
|
|
85
|
+
})
|
|
86
|
+
.strict();
|
|
87
|
+
export const RichItemsListingSchema = z
|
|
88
|
+
.object({ plugin: z.string(), name: z.string(), on: z.boolean(), nodes: z.array(RichItemNodeListingSchema), marks: z.array(RichItemMarkListingSchema), buttons: z.array(RichItemButtonListingSchema) })
|
|
89
|
+
.strict();
|
|
90
|
+
export const RichItemsResponseSchema = z.array(RichItemsListingSchema);
|
|
91
|
+
// The body is read again by the render-time declaration check (readItemData), never trusted for more than its shape.
|
|
92
|
+
export const RenderRichItemRequestSchema = z
|
|
93
|
+
.object({
|
|
94
|
+
plugin: z.string().min(1).max(PLUGIN_ID_MAX),
|
|
95
|
+
name: z
|
|
96
|
+
.string()
|
|
97
|
+
.min(1)
|
|
98
|
+
.max(EDITOR_SLOT_ID_MAX)
|
|
99
|
+
.refine(isItemNameText, "an item name is lower-case letters, digits and \"-\", a letter first")
|
|
100
|
+
.meta({ example: "recipe" }),
|
|
101
|
+
v: z.number().int().min(1).max(RICH_TEXT_ITEM_VERSION_MAX),
|
|
102
|
+
data: z.record(z.string(), z.unknown()),
|
|
103
|
+
text: z.string().max(RICH_TEXT_ITEM_TEXT_MAX),
|
|
104
|
+
})
|
|
105
|
+
.strict();
|
|
106
|
+
export const RenderRichItemResponseSchema = z.object({ html: z.string() }).strict();
|
|
107
|
+
// The two refusals of POST .../render/rich-item carry a code the editor tells apart: item_unknown (404, a plugin that is
|
|
108
|
+
// off or not attached, or a name it does not declare) and item_unavailable (422, a required value missing or the
|
|
109
|
+
// partial's render failed). ApiErrorSchema alone would strip the code from the answer.
|
|
110
|
+
export const RENDER_RICH_ITEM_ERROR_CODES = ["item_unknown", "item_unavailable"];
|
|
111
|
+
export const RenderRichItemErrorSchema = z.object({ message: z.string(), code: z.enum(RENDER_RICH_ITEM_ERROR_CODES) }).strict();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
// S321b (spec 3a, D1 to D4): what the marketplace portal's Revenue page
|
|
3
3
|
// reads. Months are UTC calendar months as "YYYY-MM" (D3); money is whole
|
|
4
|
-
// USD cents after refunds (D4)
|
|
4
|
+
// USD cents after refunds (D4), the net also after payment fees (M32 I6e).
|
|
5
|
+
// No field names a buyer.
|
|
5
6
|
/** "YYYY-MM" with a month from 01 to 12. A linear scan with the length
|
|
6
7
|
* checked first, never a regex (the value comes from a query string). */
|
|
7
8
|
export function isRevenueMonthKey(value) {
|
|
@@ -26,6 +27,9 @@ export const REVENUE_PLUGIN_PARAM_MAX = 214;
|
|
|
26
27
|
export const RevenuePluginParamSchema = z.string().trim().min(1).max(REVENUE_PLUGIN_PARAM_MAX);
|
|
27
28
|
const Cents = z.number().int().nonnegative();
|
|
28
29
|
const Count = z.number().int().nonnegative();
|
|
30
|
+
/** M32 I6e (PF-12): what the author keeps after payment fees. Signed: a
|
|
31
|
+
* month whose only sale was refunded counts that sale's payment fee alone. */
|
|
32
|
+
const SignedCents = z.number().int();
|
|
29
33
|
export const RevenueMonthSchema = z
|
|
30
34
|
.object({
|
|
31
35
|
month: RevenueMonthKeySchema,
|
|
@@ -35,7 +39,7 @@ export const RevenueMonthSchema = z
|
|
|
35
39
|
renewals: Count,
|
|
36
40
|
lostSubscribers: Count,
|
|
37
41
|
planChanges: Count,
|
|
38
|
-
netCents:
|
|
42
|
+
netCents: SignedCents,
|
|
39
43
|
})
|
|
40
44
|
.strict();
|
|
41
45
|
export const RevenuePlanMonthSchema = z
|
|
@@ -51,7 +55,7 @@ export const RevenuePlanMonthSchema = z
|
|
|
51
55
|
renewals: Count,
|
|
52
56
|
lostSubscribers: Count,
|
|
53
57
|
recurringCents: Cents,
|
|
54
|
-
netCents:
|
|
58
|
+
netCents: SignedCents,
|
|
55
59
|
})
|
|
56
60
|
.strict();
|
|
57
61
|
export const RevenueNowSchema = z
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const RICH_TEXT_PASTE_HOSTS_MAX = 20;
|
|
2
|
+
export declare const RICH_TEXT_PASTE_HOST_MAX = 253;
|
|
3
|
+
export declare const RICH_TEXT_PASTE_ADDRESS_MAX = 2048;
|
|
4
|
+
/** Null when `host` is a host a node may list: lower-case ASCII labels of letters, digits and "-", at least two of
|
|
5
|
+
* them, with "*." allowed only as the whole first label; never a bare "*", a wildcard over a single label, an IP
|
|
6
|
+
* literal or localhost. Otherwise the reason, in the validate wording. */
|
|
7
|
+
export declare function pasteHostProblem(host: string): string | null;
|
|
8
|
+
/** The lower-cased host of `text` when it is one http or https address alone (surrounding white space aside), at most
|
|
9
|
+
* RICH_TEXT_PASTE_ADDRESS_MAX characters; else null. */
|
|
10
|
+
export declare function pastedAddressHost(text: string): string | null;
|
|
11
|
+
/** Whether `host` (already lower-cased by the URL parser) is one of `hosts`: equal to an exact host, or a subdomain of
|
|
12
|
+
* a wildcard's remainder ("*.youtube.com" matches "m.youtube.com", never "youtube.com" itself). */
|
|
13
|
+
export declare function hostMatches(host: string, hosts: readonly string[]): boolean;
|
|
14
|
+
export declare function addressMatchesHosts(address: string, hosts: readonly string[]): boolean;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// M35 C4b (W9, design D17): the hosts a node's fromUrl lists and the one pasted address the editor converts. Every
|
|
2
|
+
// rule is a length check and a forward scan; an address is read by the WHATWG URL parser, never by a pattern. Whether
|
|
3
|
+
// a wildcard covers a public suffix needs the public suffix list, which only validate, the door and the server's
|
|
4
|
+
// install read (@kardalum/plugin-package's isPublicSuffix): a browser never loads it.
|
|
5
|
+
export const RICH_TEXT_PASTE_HOSTS_MAX = 20;
|
|
6
|
+
export const RICH_TEXT_PASTE_HOST_MAX = 253;
|
|
7
|
+
export const RICH_TEXT_PASTE_ADDRESS_MAX = 2048;
|
|
8
|
+
const isLetterOrDigit = (code) => (code >= 0x61 && code <= 0x7a) || (code >= 0x30 && code <= 0x39);
|
|
9
|
+
/** Null when `host` is a host a node may list: lower-case ASCII labels of letters, digits and "-", at least two of
|
|
10
|
+
* them, with "*." allowed only as the whole first label; never a bare "*", a wildcard over a single label, an IP
|
|
11
|
+
* literal or localhost. Otherwise the reason, in the validate wording. */
|
|
12
|
+
export function pasteHostProblem(host) {
|
|
13
|
+
if (host.length === 0 || host.length > RICH_TEXT_PASTE_HOST_MAX)
|
|
14
|
+
return `a host is 1 to ${RICH_TEXT_PASTE_HOST_MAX} characters`;
|
|
15
|
+
if (host === "*")
|
|
16
|
+
return "a bare * would match every site";
|
|
17
|
+
const wildcard = host.startsWith("*.");
|
|
18
|
+
const rest = wildcard ? host.slice(2) : host;
|
|
19
|
+
let label = 0;
|
|
20
|
+
let labels = 0;
|
|
21
|
+
let digitsOnly = true;
|
|
22
|
+
let previous = 0x2e;
|
|
23
|
+
for (let at = 0; at < rest.length; at += 1) {
|
|
24
|
+
const code = rest.charCodeAt(at);
|
|
25
|
+
if (code > 0x7f)
|
|
26
|
+
return "a host is written in ASCII: write a name with other letters in its punycode form (xn--)";
|
|
27
|
+
if (code === 0x2a)
|
|
28
|
+
return "* stands only as the whole first label (*.example.com)";
|
|
29
|
+
if (code === 0x2e) {
|
|
30
|
+
if (label === 0)
|
|
31
|
+
return "a host has no empty label";
|
|
32
|
+
if (previous === 0x2d)
|
|
33
|
+
return "a label never ends with -";
|
|
34
|
+
labels += 1;
|
|
35
|
+
label = 0;
|
|
36
|
+
previous = code;
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (!isLetterOrDigit(code) && code !== 0x2d)
|
|
40
|
+
return "a host is lower-case letters, digits, \"-\" and dots";
|
|
41
|
+
if (code === 0x2d && label === 0)
|
|
42
|
+
return "a label never starts with -";
|
|
43
|
+
if (code < 0x30 || code > 0x39)
|
|
44
|
+
digitsOnly = false;
|
|
45
|
+
label += 1;
|
|
46
|
+
if (label > 63)
|
|
47
|
+
return "a label is at most 63 characters";
|
|
48
|
+
previous = code;
|
|
49
|
+
}
|
|
50
|
+
if (label === 0)
|
|
51
|
+
return "a host has no empty label";
|
|
52
|
+
if (previous === 0x2d)
|
|
53
|
+
return "a label never ends with -";
|
|
54
|
+
labels += 1;
|
|
55
|
+
const last = rest.slice(rest.lastIndexOf(".") + 1);
|
|
56
|
+
if (last === "localhost" || rest === "localhost")
|
|
57
|
+
return "localhost is never a paste host";
|
|
58
|
+
if (digitsOnly)
|
|
59
|
+
return "an IP address is never a paste host";
|
|
60
|
+
if (wildcard && labels < 2)
|
|
61
|
+
return "a wildcard over a single label would cover a whole top-level domain";
|
|
62
|
+
if (!wildcard && labels < 2)
|
|
63
|
+
return "a host names a site with at least two labels";
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
/** The lower-cased host of `text` when it is one http or https address alone (surrounding white space aside), at most
|
|
67
|
+
* RICH_TEXT_PASTE_ADDRESS_MAX characters; else null. */
|
|
68
|
+
export function pastedAddressHost(text) {
|
|
69
|
+
const trimmed = text.trim();
|
|
70
|
+
if (trimmed.length === 0 || trimmed.length > RICH_TEXT_PASTE_ADDRESS_MAX)
|
|
71
|
+
return null;
|
|
72
|
+
for (let at = 0; at < trimmed.length; at += 1) {
|
|
73
|
+
const code = trimmed.charCodeAt(at);
|
|
74
|
+
if (code <= 0x20 || code === 0x7f)
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const scheme = trimmed.slice(0, 8).toLowerCase();
|
|
78
|
+
if (!scheme.startsWith("http://") && !scheme.startsWith("https://"))
|
|
79
|
+
return null;
|
|
80
|
+
let url;
|
|
81
|
+
try {
|
|
82
|
+
url = new URL(trimmed);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
if (url.protocol !== "http:" && url.protocol !== "https:")
|
|
88
|
+
return null;
|
|
89
|
+
return url.hostname.toLowerCase();
|
|
90
|
+
}
|
|
91
|
+
/** Whether `host` (already lower-cased by the URL parser) is one of `hosts`: equal to an exact host, or a subdomain of
|
|
92
|
+
* a wildcard's remainder ("*.youtube.com" matches "m.youtube.com", never "youtube.com" itself). */
|
|
93
|
+
export function hostMatches(host, hosts) {
|
|
94
|
+
for (const entry of hosts) {
|
|
95
|
+
if (entry.startsWith("*.")) {
|
|
96
|
+
const suffix = entry.slice(1);
|
|
97
|
+
if (host.length > suffix.length && host.endsWith(suffix))
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
else if (host === entry)
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
export function addressMatchesHosts(address, hosts) {
|
|
106
|
+
const host = pastedAddressHost(address);
|
|
107
|
+
return host !== null && hostMatches(host, hosts);
|
|
108
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** How deep the readers walk (plain text, the client, the server converter): 100 node levels. */
|
|
2
|
+
export declare const RICH_TEXT_MAX_DEPTH = 100;
|
|
3
|
+
/** C4a-D1: how deep a saved value may be, in node levels from the document (1). */
|
|
4
|
+
export declare const RICH_TEXT_SAVE_DEPTH_MAX = 36;
|
|
5
|
+
export declare const RICH_TEXT_MAX_NODES = 20000;
|
|
6
|
+
export declare const RICH_TEXT_ITEM_NODE_TYPES: readonly ["pluginBlock", "pluginInline", "pluginWrapper"];
|
|
7
|
+
export type RichTextItemNodeType = (typeof RICH_TEXT_ITEM_NODE_TYPES)[number];
|
|
8
|
+
export declare const RICH_TEXT_PLUGIN_MARK_TYPE = "pluginMark";
|
|
9
|
+
/** Block, inline and wrapper items in one value. */
|
|
10
|
+
export declare const RICH_TEXT_ITEMS_MAX = 500;
|
|
11
|
+
/** Plugin marks in one value. */
|
|
12
|
+
export declare const RICH_TEXT_PLUGIN_MARKS_MAX = 2000;
|
|
13
|
+
/** A wrapper inside a wrapper, at most this deep. */
|
|
14
|
+
export declare const RICH_TEXT_WRAPPER_DEPTH_MAX = 4;
|
|
15
|
+
/** One item's `data` as UTF-8 JSON. */
|
|
16
|
+
export declare const RICH_TEXT_ITEM_DATA_BYTES_MAX = 65536;
|
|
17
|
+
/** One item's `data` nested at most this many levels (the data object itself is 1). */
|
|
18
|
+
export declare const RICH_TEXT_ITEM_DATA_DEPTH_MAX = 16;
|
|
19
|
+
/** The short text, in UTF-16 units. */
|
|
20
|
+
export declare const RICH_TEXT_ITEM_TEXT_MAX = 200;
|
|
21
|
+
export declare const RICH_TEXT_ITEM_ID_MAX = 24;
|
|
22
|
+
export declare const RICH_TEXT_ITEM_VERSION_MAX = 1000;
|
|
23
|
+
export declare const RICH_TEXT_ITEM_DATA_KEY_MAX = 40;
|
|
24
|
+
/** The bounds of a walk over a whole value's JSON (canonicalRichTextJson, richTextWithinBounds). */
|
|
25
|
+
export declare const RICH_TEXT_JSON_DEPTH_MAX = 240;
|
|
26
|
+
export declare const RICH_TEXT_JSON_ELEMENTS_MAX = 1048576;
|
|
27
|
+
export declare const RICH_TEXT_NODE_TYPES: readonly string[];
|
|
28
|
+
export declare const RICH_TEXT_MARK_TYPES: readonly string[];
|
|
29
|
+
export type RichTextShapeProblem = "notDocument" | "unknownNode" | "unknownMark" | "badText" | "badAttrs" | "tooDeep" | "tooLarge" | "badItem" | "tooManyItems";
|
|
30
|
+
export declare function isItemNodeType(value: unknown): value is RichTextItemNodeType;
|
|
31
|
+
/** A plugin id, as isPluginManifestId answers it (a test pins the two), by a linear scan. */
|
|
32
|
+
export declare function isPluginIdText(value: string): boolean;
|
|
33
|
+
/** An item or mark name: isEditorSlotId's rule (1 to 40 lower-case letters, digits and "-", a letter first). */
|
|
34
|
+
export declare function isItemNameText(value: string): boolean;
|
|
35
|
+
/** An attribute key, and so a top-level `data` key: 1 to 40 lower-case letters, digits and "_", a letter first,
|
|
36
|
+
* never `constructor` or `prototype`, so a partial reads `item.data.serves`. */
|
|
37
|
+
export declare function isItemDataKey(value: string): boolean;
|
|
38
|
+
export declare function isItemShortText(value: unknown): value is string;
|
|
39
|
+
/** A short text made from an attribute's value (design D6.3): the refused characters removed, cut at
|
|
40
|
+
* RICH_TEXT_ITEM_TEXT_MAX units, never in half of a surrogate pair. The input is cut to eight times the bound first. */
|
|
41
|
+
export declare function itemShortTextOf(raw: string): string;
|
|
42
|
+
/** UTF-8 bytes of a string, by a character loop (no TextEncoder, no Buffer: this package runs everywhere). */
|
|
43
|
+
export declare function utf8Length(value: string): number;
|
|
44
|
+
export declare function richTextShapeProblem(value: unknown): RichTextShapeProblem | null;
|
|
45
|
+
/** M35 C4a: whether a value's JSON stays within RICH_TEXT_JSON_DEPTH_MAX levels and RICH_TEXT_JSON_ELEMENTS_MAX
|
|
46
|
+
* elements, so a copy (structuredClone) or a canonical form of it cannot recurse past them. */
|
|
47
|
+
export declare function richTextWithinBounds(value: unknown): boolean;
|
|
48
|
+
/** M35 C4a (design D6.2, section 5): a value's JSON with every object's keys sorted and every item node's `urls`
|
|
49
|
+
* left out, so two values equal by value give one string whatever order a database kept their keys in.
|
|
50
|
+
* An explicit stack; null past the bounds of richTextWithinBounds. */
|
|
51
|
+
export declare function canonicalRichTextJson(value: unknown): string | null;
|
|
52
|
+
export interface RichTextItemVisit {
|
|
53
|
+
kind: "block" | "inline" | "wrapper" | "mark";
|
|
54
|
+
/** The item node, or for a mark the mark object in its text node's `marks`. */
|
|
55
|
+
host: Record<string, unknown>;
|
|
56
|
+
attrs: Record<string, unknown>;
|
|
57
|
+
}
|
|
58
|
+
/** M35 C4a: every item and plugin mark of a value, in document order (a wrapper before its children, an inline
|
|
59
|
+
* item's own marks after it), by an explicit stack bounded as richTextShapeProblem is. An item whose attrs are
|
|
60
|
+
* not an object is passed with empty attrs. Answers false when a bound stopped the walk. */
|
|
61
|
+
export declare function forEachRichTextItem(doc: unknown, visit: (item: RichTextItemVisit) => void): boolean;
|
|
62
|
+
export declare function hasEditorialItems(doc: unknown): boolean;
|
|
63
|
+
/** M35 C4b (design D18, C4b-D4): the value every public reader serves. An editorial block or inline item is removed, an
|
|
64
|
+
* editorial wrapper is replaced by its content, and an editorial plugin mark is dropped from its text, which stays. A
|
|
65
|
+
* container of blocks left empty by the strip holds one empty paragraph.
|
|
66
|
+
* The value itself when it holds none; an empty document when it is past the walk's bounds (no stored value is: the
|
|
67
|
+
* save's bounds are tighter). The stored flag decides alone, so a plugin switched off or uninstalled changes nothing. */
|
|
68
|
+
export declare function withoutEditorialItems(doc: unknown): unknown;
|
|
69
|
+
/** M35 C4b (design D16, C4b-D8): the editor handle's `document`: a frozen copy in which another plugin's editorial items
|
|
70
|
+
* and marks keep only their plugin, name and id (a wrapper keeps its content, which is the page's text). */
|
|
71
|
+
export declare function redactForeignEditorial(doc: unknown, ownPlugin: string): unknown;
|