@kardalum/plugin-sdk 0.0.0-stage → 0.15.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 +108 -0
- package/LICENSE +202 -0
- package/README.md +70 -2
- package/dist/admin-section-registry.d.ts +34 -0
- package/dist/admin-section-registry.js +49 -0
- package/dist/built-in-serializers.d.ts +3 -0
- package/dist/built-in-serializers.js +18 -0
- package/dist/built-in-settings-schemas.d.ts +14 -0
- package/dist/built-in-settings-schemas.js +225 -0
- package/dist/built-in-value-schemas.d.ts +4 -0
- package/dist/built-in-value-schemas.js +47 -0
- package/dist/built-ins.d.ts +1 -0
- package/dist/built-ins.js +257 -0
- package/dist/capabilities.d.ts +99 -0
- package/dist/capabilities.js +363 -0
- package/dist/data-type-plugin.d.ts +28 -0
- package/dist/data-type-plugin.js +1 -0
- package/dist/datatype-validation.d.ts +26 -0
- package/dist/datatype-validation.js +110 -0
- package/dist/datatypes-entry.d.ts +4 -0
- package/dist/datatypes-entry.js +18 -0
- package/dist/define-plugin.d.ts +25 -0
- package/dist/define-plugin.js +51 -0
- package/dist/entitlement-entry.d.ts +5 -0
- package/dist/entitlement-entry.js +24 -0
- package/dist/entitlement-gate.d.ts +36 -0
- package/dist/entitlement-gate.js +201 -0
- package/dist/entitlement-types.d.ts +39 -0
- package/dist/entitlement-types.js +1 -0
- package/dist/entitlement.d.ts +57 -0
- package/dist/entitlement.js +170 -0
- package/dist/host-entry.d.ts +1 -0
- package/dist/host-entry.js +11 -0
- package/dist/icon-name.d.ts +1 -0
- package/dist/icon-name.js +1 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +10 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +93 -0
- package/dist/license-verdict-keys.d.ts +18 -0
- package/dist/license-verdict-keys.js +22 -0
- package/dist/local-host.d.ts +3 -0
- package/dist/local-host.js +38 -0
- package/dist/manifest-entry.d.ts +8 -0
- package/dist/manifest-entry.js +13 -0
- package/dist/manifest-schema.d.ts +408 -0
- package/dist/manifest-schema.js +774 -0
- package/dist/manifest.d.ts +546 -0
- package/dist/manifest.js +86 -0
- package/dist/media/media-picker.d.ts +39 -0
- package/dist/media/media-picker.js +438 -0
- package/dist/media/upload-error.d.ts +12 -0
- package/dist/media/upload-error.js +30 -0
- package/dist/plugin-context.d.ts +75 -0
- package/dist/plugin-context.js +70 -0
- package/dist/plugin-screen-context.d.ts +40 -0
- package/dist/plugin-screen-context.js +16 -0
- package/dist/register-built-ins.d.ts +1 -0
- package/dist/register-built-ins.js +41 -0
- package/dist/registry.d.ts +4 -0
- package/dist/registry.js +17 -0
- package/dist/rendition-eligibility.d.ts +24 -0
- package/dist/rendition-eligibility.js +40 -0
- package/dist/richtext/block-panel.d.ts +27 -0
- package/dist/richtext/block-panel.js +232 -0
- package/dist/richtext/extensions.d.ts +19 -0
- package/dist/richtext/extensions.js +56 -0
- package/dist/richtext/insert-menu.d.ts +24 -0
- package/dist/richtext/insert-menu.js +142 -0
- package/dist/richtext/kardalum-block.d.ts +33 -0
- package/dist/richtext/kardalum-block.js +282 -0
- package/dist/richtext/style-listbox.d.ts +10 -0
- package/dist/richtext/style-listbox.js +69 -0
- package/dist/richtext/text-style-class.d.ts +18 -0
- package/dist/richtext/text-style-class.js +36 -0
- package/dist/simple-storage-value-provider.d.ts +9 -0
- package/dist/simple-storage-value-provider.js +96 -0
- package/dist/structured-storage-types.d.ts +61 -0
- package/dist/structured-storage-types.js +11 -0
- package/dist/tailwind.d.ts +1 -0
- package/dist/tailwind.js +5 -0
- package/dist/tokens/system-dark.css +75 -0
- package/dist/tokens/tokens.css +239 -0
- package/dist/tokens/tokens.json +212 -0
- package/dist/tokens.d.ts +1 -0
- package/dist/tokens.js +11 -0
- package/dist/ui-entry.d.ts +5 -0
- package/dist/ui-entry.js +42 -0
- package/dist/views/content-list-preview.d.ts +1 -0
- package/dist/views/content-list-preview.js +14 -0
- package/dist/views/content-list-settings-view.d.ts +1 -0
- package/dist/views/content-list-settings-view.js +97 -0
- package/dist/views/content-list-view.d.ts +19 -0
- package/dist/views/content-list-view.js +248 -0
- package/dist/views/crop-view.d.ts +55 -0
- package/dist/views/crop-view.js +161 -0
- package/dist/views/date-range-view.d.ts +6 -0
- package/dist/views/date-range-view.js +55 -0
- package/dist/views/file-upload-view.d.ts +43 -0
- package/dist/views/file-upload-view.js +104 -0
- package/dist/views/html-code-editor.d.ts +10 -0
- package/dist/views/html-code-editor.js +101 -0
- package/dist/views/html-view.d.ts +3 -0
- package/dist/views/html-view.js +53 -0
- package/dist/views/image-view.d.ts +3 -0
- package/dist/views/image-view.js +387 -0
- package/dist/views/rich-text-view.d.ts +2 -0
- package/dist/views/rich-text-view.js +429 -0
- package/node_modules/@kardalum/api-schemas/LICENSE +202 -0
- package/node_modules/@kardalum/api-schemas/README.md +56 -0
- package/node_modules/@kardalum/api-schemas/dist/action.schema.d.ts +30 -0
- package/node_modules/@kardalum/api-schemas/dist/action.schema.js +88 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +36 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.d.ts +89 -0
- package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.d.ts +24 -0
- package/node_modules/@kardalum/api-schemas/dist/asset.schema.js +47 -0
- package/node_modules/@kardalum/api-schemas/dist/auth.schema.d.ts +38 -0
- package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +537 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +353 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +158 -0
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +125 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +256 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.d.ts +151 -0
- package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +82 -0
- package/node_modules/@kardalum/api-schemas/dist/content-version.schema.d.ts +18 -0
- package/node_modules/@kardalum/api-schemas/dist/content-version.schema.js +22 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +20 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +302 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +97 -0
- package/node_modules/@kardalum/api-schemas/dist/culture-direction.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/culture-direction.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +36 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +32 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +296 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +121 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +147 -0
- package/node_modules/@kardalum/api-schemas/dist/health.schema.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/health.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/html-entities.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/html-entities.js +250 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +102 -0
- package/node_modules/@kardalum/api-schemas/dist/index.js +58 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +381 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +167 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +214 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +77 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-use.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-use.js +117 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +27 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +279 -0
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.d.ts +74 -0
- package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.js +157 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +80 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +156 -0
- package/node_modules/@kardalum/api-schemas/dist/nav.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/nav.schema.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +846 -0
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +356 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +169 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.js +80 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +889 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +89 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +134 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +38 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +369 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +393 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +87 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +24 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +306 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +328 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +79 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.js +50 -0
- package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +90 -0
- package/node_modules/@kardalum/api-schemas/dist/role.schema.js +69 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.d.ts +17 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +108 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +93 -0
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +243 -0
- package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +296 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +43 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +25 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +30 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +112 -0
- package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +74 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +39 -0
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +21 -0
- package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +89 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +68 -0
- package/node_modules/@kardalum/api-schemas/package.json +35 -0
- package/node_modules/@kardalum/design-tokens/LICENSE +202 -0
- package/node_modules/@kardalum/design-tokens/README.md +29 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +32 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +88 -0
- package/node_modules/@kardalum/design-tokens/dist/generate.d.ts +1 -0
- package/node_modules/@kardalum/design-tokens/dist/generate.js +18 -0
- package/node_modules/@kardalum/design-tokens/dist/index.d.ts +6 -0
- package/node_modules/@kardalum/design-tokens/dist/index.js +4 -0
- package/node_modules/@kardalum/design-tokens/dist/system-dark.css +75 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +33 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +54 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +12 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-css.js +42 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +43 -0
- package/node_modules/@kardalum/design-tokens/dist/theme-types.js +1 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +13 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +120 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/index.d.ts +5 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/index.js +4 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +9 -0
- package/node_modules/@kardalum/design-tokens/dist/themes/light.js +13 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +239 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +25 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +276 -0
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +212 -0
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +91 -0
- package/node_modules/@kardalum/design-tokens/dist/types.js +5 -0
- package/node_modules/@kardalum/design-tokens/package.json +42 -0
- package/node_modules/@kardalum/plugin-package/LICENSE +202 -0
- package/node_modules/@kardalum/plugin-package/README.md +71 -0
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.d.ts +50 -0
- package/node_modules/@kardalum/plugin-package/dist/docs-contract.js +659 -0
- package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +19 -0
- package/node_modules/@kardalum/plugin-package/dist/envelope.js +104 -0
- package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +37 -0
- package/node_modules/@kardalum/plugin-package/dist/extract.js +199 -0
- package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/hash.js +69 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +11 -0
- package/node_modules/@kardalum/plugin-package/dist/index.js +7 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +185 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +236 -0
- package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +50 -0
- package/node_modules/@kardalum/plugin-package/dist/package-contract.js +115 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/sample-content.js +17 -0
- package/node_modules/@kardalum/plugin-package/dist/types.d.ts +45 -0
- package/node_modules/@kardalum/plugin-package/dist/types.js +1 -0
- package/node_modules/@kardalum/plugin-package/package.json +49 -0
- package/node_modules/@kardalum/ui/LICENSE +202 -0
- package/node_modules/@kardalum/ui/README.md +35 -0
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +14 -0
- package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +38 -0
- package/node_modules/@kardalum/ui/dist/components/badge.d.ts +9 -0
- package/node_modules/@kardalum/ui/dist/components/badge.js +30 -0
- package/node_modules/@kardalum/ui/dist/components/button.d.ts +11 -0
- package/node_modules/@kardalum/ui/dist/components/button.js +37 -0
- package/node_modules/@kardalum/ui/dist/components/checkbox.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/components/checkbox.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +17 -0
- package/node_modules/@kardalum/ui/dist/components/dialog.js +48 -0
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +18 -0
- package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +53 -0
- package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +30 -0
- package/node_modules/@kardalum/ui/dist/components/empty-state.js +9 -0
- package/node_modules/@kardalum/ui/dist/components/input.d.ts +4 -0
- package/node_modules/@kardalum/ui/dist/components/input.js +6 -0
- package/node_modules/@kardalum/ui/dist/components/panel.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/components/panel.js +6 -0
- package/node_modules/@kardalum/ui/dist/components/property-field.d.ts +19 -0
- package/node_modules/@kardalum/ui/dist/components/property-field.js +86 -0
- package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +17 -0
- package/node_modules/@kardalum/ui/dist/components/sheet.js +55 -0
- package/node_modules/@kardalum/ui/dist/components/skeleton.d.ts +3 -0
- package/node_modules/@kardalum/ui/dist/components/skeleton.js +9 -0
- package/node_modules/@kardalum/ui/dist/components/switch.d.ts +5 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +7 -0
- package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +34 -0
- package/node_modules/@kardalum/ui/dist/components/tab-strip.js +72 -0
- package/node_modules/@kardalum/ui/dist/components/toast.d.ts +18 -0
- package/node_modules/@kardalum/ui/dist/components/toast.js +42 -0
- package/node_modules/@kardalum/ui/dist/components/toaster.d.ts +12 -0
- package/node_modules/@kardalum/ui/dist/components/toaster.js +11 -0
- package/node_modules/@kardalum/ui/dist/components/use-toast.d.ts +17 -0
- package/node_modules/@kardalum/ui/dist/components/use-toast.js +62 -0
- package/node_modules/@kardalum/ui/dist/index.d.ts +18 -0
- package/node_modules/@kardalum/ui/dist/index.js +18 -0
- package/node_modules/@kardalum/ui/dist/lib/cn.d.ts +2 -0
- package/node_modules/@kardalum/ui/dist/lib/cn.js +5 -0
- package/node_modules/@kardalum/ui/package.json +63 -0
- package/package.json +146 -4
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { PluginValueProvider, usePluginApi } from "./plugin-context.js";
|
|
4
|
+
// S278b (D5): the node refusal a refused write answers (403): the refused
|
|
5
|
+
// action, and the entry that decided, labelled. Its page is named only when
|
|
6
|
+
// the server sent its name, which is only when the person may view it.
|
|
7
|
+
const ACTION_NOUNS = {
|
|
8
|
+
"content.read": "Viewing",
|
|
9
|
+
"content.create": "Creating pages",
|
|
10
|
+
"content.update": "Editing",
|
|
11
|
+
"content.publish": "Publishing",
|
|
12
|
+
"content.delete": "Deleting",
|
|
13
|
+
};
|
|
14
|
+
const ACTION_VERBS = {
|
|
15
|
+
"content.read": "view",
|
|
16
|
+
"content.create": "create",
|
|
17
|
+
"content.update": "edit",
|
|
18
|
+
"content.publish": "publish",
|
|
19
|
+
"content.delete": "delete",
|
|
20
|
+
};
|
|
21
|
+
function refusalSentence(body) {
|
|
22
|
+
if (!body || typeof body !== "object")
|
|
23
|
+
return null;
|
|
24
|
+
const { action, access } = body;
|
|
25
|
+
if (typeof action !== "string" || !(action in ACTION_NOUNS) || !access || typeof access !== "object")
|
|
26
|
+
return null;
|
|
27
|
+
const entry = access.decidedAt ?? null;
|
|
28
|
+
if (access.reason === "role-lacks-action" || entry === null) {
|
|
29
|
+
return `Could not save this field. Your role cannot ${ACTION_VERBS[action]} pages.`;
|
|
30
|
+
}
|
|
31
|
+
const place = entry.name ?? entry.path?.split("/").filter(Boolean).pop() ?? "a page you cannot view";
|
|
32
|
+
// A user the server does not name (no display name; the email is never
|
|
33
|
+
// sent) is "a user"; a role keeps its id when its label is missing.
|
|
34
|
+
const labels = (entry.grants ?? [])
|
|
35
|
+
.map((grant) => grant.label || (grant.subjectKind === "user" ? "a user" : grant.subjectId))
|
|
36
|
+
.filter(Boolean);
|
|
37
|
+
return `Could not save this field. ${ACTION_NOUNS[action]} is restricted at ${place} to: ${labels.length > 0 ? labels.join(", ") : "admins only"}.`;
|
|
38
|
+
}
|
|
39
|
+
// The only SDK code path that ever hits /api/plugins/:pluginId/storage/...
|
|
40
|
+
// (SimpleStorageAPI, Session 68) — a plugin's view code (and usePluginValue()
|
|
41
|
+
// itself) never touches the storage API directly, matching plugin-sdk.md's
|
|
42
|
+
// "SDK handles all host communication" rule. Fetches the current value on
|
|
43
|
+
// mount and feeds it into the SAME PluginValueContext usePluginValue()
|
|
44
|
+
// already reads, so a view wrapped in this provider is indistinguishable
|
|
45
|
+
// from one wrapped in a plain PluginValueProvider — swap this in wherever a
|
|
46
|
+
// field's value should live in content_field_values instead of the local
|
|
47
|
+
// content blob (see document-type-form.tsx for the blob-backed default).
|
|
48
|
+
//
|
|
49
|
+
// Shape mirrors views/image-view.tsx's useMediaPreview(): usePluginApi(),
|
|
50
|
+
// a cancelled-guarded effect, local value/error state. A GET returning
|
|
51
|
+
// {value: null} is the normal "never set" state, not an error.
|
|
52
|
+
export function SimpleStorageValueProvider({ contentId, fieldId, pluginId, children, }) {
|
|
53
|
+
const fetchApi = usePluginApi();
|
|
54
|
+
const [value, setValue] = useState(null);
|
|
55
|
+
const [error, setError] = useState(null);
|
|
56
|
+
const path = `/api/plugins/${pluginId}/storage/${contentId}/${fieldId}`;
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
let cancelled = false;
|
|
59
|
+
setError(null);
|
|
60
|
+
fetchApi(path)
|
|
61
|
+
.then(async (response) => {
|
|
62
|
+
if (!response.ok)
|
|
63
|
+
throw new Error(`Failed to load plugin value (${response.status})`);
|
|
64
|
+
const body = (await response.json());
|
|
65
|
+
if (!cancelled)
|
|
66
|
+
setValue(body.value);
|
|
67
|
+
})
|
|
68
|
+
.catch((err) => {
|
|
69
|
+
if (!cancelled)
|
|
70
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
71
|
+
});
|
|
72
|
+
return () => {
|
|
73
|
+
cancelled = true;
|
|
74
|
+
};
|
|
75
|
+
}, [fetchApi, path]);
|
|
76
|
+
function onChange(next) {
|
|
77
|
+
setValue(next); // optimistic — the view should feel instant
|
|
78
|
+
fetchApi(path, {
|
|
79
|
+
method: "PUT",
|
|
80
|
+
headers: { "Content-Type": "application/json" },
|
|
81
|
+
body: JSON.stringify({ value: next }),
|
|
82
|
+
})
|
|
83
|
+
.then(async (response) => {
|
|
84
|
+
if (!response.ok) {
|
|
85
|
+
// S278b (D5): a restriction's refusal says why, from its body.
|
|
86
|
+
const refusal = response.status === 403 ? refusalSentence(await response.json().catch(() => null)) : null;
|
|
87
|
+
throw new Error(refusal ?? `Failed to save plugin value (${response.status})`);
|
|
88
|
+
}
|
|
89
|
+
setError(null);
|
|
90
|
+
})
|
|
91
|
+
.catch((err) => {
|
|
92
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return (_jsxs(_Fragment, { children: [error && (_jsx("p", { role: "alert", className: "text-xs text-danger-600", children: error })), _jsx(PluginValueProvider, { value: value, onChange: onChange, children: children })] }));
|
|
96
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export type PluginColumnType = "text" | "integer" | "boolean" | "json" | "timestamp";
|
|
2
|
+
export interface PluginColumnSchema {
|
|
3
|
+
name: string;
|
|
4
|
+
type: PluginColumnType;
|
|
5
|
+
primaryKey?: boolean;
|
|
6
|
+
notNull?: boolean;
|
|
7
|
+
unique?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface PluginIndexSchema {
|
|
10
|
+
columns: string[];
|
|
11
|
+
unique?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface PluginTableSchema {
|
|
14
|
+
tableName: string;
|
|
15
|
+
columns: PluginColumnSchema[];
|
|
16
|
+
indexes?: PluginIndexSchema[];
|
|
17
|
+
}
|
|
18
|
+
export interface StructuredQueryBuilder<T = Record<string, unknown>> extends PromiseLike<T[]> {
|
|
19
|
+
where(conditions: Record<string, unknown>): this;
|
|
20
|
+
orderBy(column: string, direction?: "asc" | "desc"): this;
|
|
21
|
+
limit(n: number): this;
|
|
22
|
+
paginate(options: {
|
|
23
|
+
cursor?: string;
|
|
24
|
+
limit: number;
|
|
25
|
+
}): this;
|
|
26
|
+
}
|
|
27
|
+
export interface StructuredStorageTransaction {
|
|
28
|
+
insert(tableName: string, data: Record<string, unknown>): Promise<void>;
|
|
29
|
+
update(tableName: string, where: Record<string, unknown>, data: Record<string, unknown>): Promise<number>;
|
|
30
|
+
delete(tableName: string, where: Record<string, unknown>): Promise<number>;
|
|
31
|
+
query<T = Record<string, unknown>>(tableName: string): StructuredQueryBuilder<T>;
|
|
32
|
+
}
|
|
33
|
+
export interface ScopedStructuredStorage {
|
|
34
|
+
defineTable(schema: PluginTableSchema): Promise<void>;
|
|
35
|
+
insert(tableName: string, data: Record<string, unknown>): Promise<void>;
|
|
36
|
+
update(tableName: string, where: Record<string, unknown>, data: Record<string, unknown>): Promise<number>;
|
|
37
|
+
delete(tableName: string, where: Record<string, unknown>): Promise<number>;
|
|
38
|
+
query<T = Record<string, unknown>>(tableName: string): StructuredQueryBuilder<T>;
|
|
39
|
+
transaction(fn: (tx: StructuredStorageTransaction) => Promise<void>): Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
import type { Entitlement } from "./entitlement-types.js";
|
|
42
|
+
export interface PublishedContent {
|
|
43
|
+
id: string;
|
|
44
|
+
documentTypeId: string;
|
|
45
|
+
data: Record<string, unknown>;
|
|
46
|
+
}
|
|
47
|
+
export interface PluginApiRouteContext {
|
|
48
|
+
structuredStorage: ScopedStructuredStorage;
|
|
49
|
+
/** Null if the content id doesn't exist OR isn't published (a
|
|
50
|
+
* draft-only save never satisfies this) — deliberately conflates
|
|
51
|
+
* "missing" and "not yet purchasable," since callers treat both the
|
|
52
|
+
* same way. */
|
|
53
|
+
getPublishedContent(contentId: string): Promise<PublishedContent | null>;
|
|
54
|
+
/** S284b: the host's latest licence verdict for this plugin, exactly as
|
|
55
|
+
* the marketplace signed it (`kind: "verdict"`), `kind: "exempt"` on a
|
|
56
|
+
* non-production install, `kind: "none"` when the host holds no verdict.
|
|
57
|
+
* Check it with `requireEntitlement` from
|
|
58
|
+
* `@kardalum/plugin-sdk/entitlement`; a thrown EntitlementError
|
|
59
|
+
* answers 403 `{ code: "entitlement", reason }`. */
|
|
60
|
+
entitlement: Entitlement;
|
|
61
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Local, SDK-owned duplicates of packages/db-adapter's structured-storage
|
|
2
|
+
// shapes and apps/server's StructuredStorageAPI/StructuredQueryBuilder/
|
|
3
|
+
// StructuredStorageTransaction classes — never imported directly, since
|
|
4
|
+
// @kardalum/plugin-sdk is a published package that must not depend on
|
|
5
|
+
// unpublished adapter/server internals (same reasoning manifest.ts's
|
|
6
|
+
// DatabaseDialect duplication already uses). TypeScript's structural
|
|
7
|
+
// typing means the real apps/server classes satisfy these interfaces
|
|
8
|
+
// without any cast, as long as their member shapes match (they do —
|
|
9
|
+
// this is exactly the public contract apps/docs/src/content/docs/v1/reference/storage.md
|
|
10
|
+
// already documents).
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { tailwindTheme } from "@kardalum/design-tokens";
|
package/dist/tailwind.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// The `@kardalum/plugin-sdk/tailwind` subpath: the Tailwind theme preset
|
|
2
|
+
// generated from the design tokens, for a plugin whose UI is styled with
|
|
3
|
+
// Tailwind. Use it as `theme` in the plugin's tailwind.config, the way the
|
|
4
|
+
// admin does, so the plugin's classes map to the same CSS variables.
|
|
5
|
+
export { tailwindTheme } from "@kardalum/design-tokens";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* Generated by @kardalum/design-tokens: do not edit by hand. */
|
|
2
|
+
|
|
3
|
+
/* Colour only. Typography, spacing and shadow are identical in both
|
|
4
|
+
themes, which is what keeps a theme from being a second layout. */
|
|
5
|
+
@media (prefers-color-scheme: dark) {
|
|
6
|
+
:root:not([data-theme="light"]) {
|
|
7
|
+
--color-background-base: #1A1C1B;
|
|
8
|
+
--color-background-elevated: #232625;
|
|
9
|
+
--color-background-subtle: #1F2221;
|
|
10
|
+
--color-background-overlay: rgba(0, 0, 0, 0.6);
|
|
11
|
+
--color-background-hover: #2C302E;
|
|
12
|
+
--color-text-primary: #ECEAE3;
|
|
13
|
+
--color-text-secondary: #A3A8A6;
|
|
14
|
+
--color-text-tertiary: #969C99;
|
|
15
|
+
--color-text-disabled: #6F7573;
|
|
16
|
+
--color-text-inverse: #14181B;
|
|
17
|
+
--color-border-default: #33373A;
|
|
18
|
+
--color-border-subtle: #2C302E;
|
|
19
|
+
--color-border-strong: #444A4D;
|
|
20
|
+
--color-primary-50: #1D2A34;
|
|
21
|
+
--color-primary-100: #22364A;
|
|
22
|
+
--color-primary-200: #2A4A66;
|
|
23
|
+
--color-primary-300: #7CC0E8;
|
|
24
|
+
--color-primary-600: #7CC0E8;
|
|
25
|
+
--color-primary-700: #9AD0EE;
|
|
26
|
+
--color-primary-800: #BFE1F5;
|
|
27
|
+
--color-primary-900: #2A4A66;
|
|
28
|
+
--color-primary-950: #22364A;
|
|
29
|
+
--color-secondary-100: #2A2C46;
|
|
30
|
+
--color-secondary-500: #9A9DE3;
|
|
31
|
+
--color-secondary-600: #9A9DE3;
|
|
32
|
+
--color-success-100: #223A1E;
|
|
33
|
+
--color-success-600: #7FC46E;
|
|
34
|
+
--color-success-700: #8FD07F;
|
|
35
|
+
--color-warning-100: #3D3016;
|
|
36
|
+
--color-warning-600: #E0AA4B;
|
|
37
|
+
--color-warning-800: #EABB6A;
|
|
38
|
+
--color-danger-100: #45201D;
|
|
39
|
+
--color-danger-600: #E8776E;
|
|
40
|
+
--color-danger-700: #F0918A;
|
|
41
|
+
--color-code-keyword: #7CC0E8;
|
|
42
|
+
--color-code-tag: #9A9DE3;
|
|
43
|
+
--color-code-string: #7FC46E;
|
|
44
|
+
--color-code-attr: #E0AA4B;
|
|
45
|
+
--color-code-comment: #A3A8A6;
|
|
46
|
+
--color-code-punctuation: #C5C9C6;
|
|
47
|
+
--color-artifact-base: #14181B;
|
|
48
|
+
--color-artifact-raised: #1F2221;
|
|
49
|
+
--color-artifact-border: #33373A;
|
|
50
|
+
--color-artifact-text: #C9CFCD;
|
|
51
|
+
--color-artifact-muted: #848A87;
|
|
52
|
+
--color-artifact-strong: #ECEAE3;
|
|
53
|
+
--color-artifact-keyword: #7CC0E8;
|
|
54
|
+
--color-artifact-string: #9FD8A8;
|
|
55
|
+
--color-artifact-highlight: #E7B96B;
|
|
56
|
+
--color-footer-base: #14181B;
|
|
57
|
+
--color-footer-border: #2C302E;
|
|
58
|
+
--color-footer-text: #969C99;
|
|
59
|
+
--color-footer-muted: #848A87;
|
|
60
|
+
--color-footer-strong: #ECEAE3;
|
|
61
|
+
--color-brand-tile: #7CC0E8;
|
|
62
|
+
--color-brand-keep: #113D5C;
|
|
63
|
+
--color-neutral-50: #1F2221;
|
|
64
|
+
--color-neutral-100: #232625;
|
|
65
|
+
--color-neutral-200: #2C302E;
|
|
66
|
+
--color-neutral-300: #33373A;
|
|
67
|
+
--color-neutral-400: #444A4D;
|
|
68
|
+
--color-neutral-500: #6F7573;
|
|
69
|
+
--color-neutral-600: #A3A8A6;
|
|
70
|
+
--color-neutral-700: #C5C9C6;
|
|
71
|
+
--color-neutral-800: #DAD9D3;
|
|
72
|
+
--color-neutral-900: #ECEAE3;
|
|
73
|
+
--color-neutral-950: #F5F4F0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/* Generated by @kardalum/design-tokens: do not edit by hand. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--color-primary-50: #EAF4FB;
|
|
5
|
+
--color-primary-100: #CFE6F6;
|
|
6
|
+
--color-primary-200: #A9D5F0;
|
|
7
|
+
--color-primary-300: #7CC0E8;
|
|
8
|
+
--color-primary-400: #4E9CCB;
|
|
9
|
+
--color-primary-500: #2A82BC;
|
|
10
|
+
--color-primary-600: #1F6FA8;
|
|
11
|
+
--color-primary-700: #1A5E8F;
|
|
12
|
+
--color-primary-800: #154D75;
|
|
13
|
+
--color-primary-900: #113D5C;
|
|
14
|
+
--color-primary-950: #0B2A40;
|
|
15
|
+
--color-secondary-50: #F0F0FA;
|
|
16
|
+
--color-secondary-100: #E9E9F8;
|
|
17
|
+
--color-secondary-200: #D3D4F1;
|
|
18
|
+
--color-secondary-300: #B4B6E6;
|
|
19
|
+
--color-secondary-400: #8F92D8;
|
|
20
|
+
--color-secondary-500: #5B5FC7;
|
|
21
|
+
--color-secondary-600: #4B4FB0;
|
|
22
|
+
--color-secondary-700: #3E4194;
|
|
23
|
+
--color-secondary-800: #333676;
|
|
24
|
+
--color-secondary-900: #282A5C;
|
|
25
|
+
--color-secondary-950: #181A3A;
|
|
26
|
+
--color-success-50: #EEF5EB;
|
|
27
|
+
--color-success-100: #E4F0DF;
|
|
28
|
+
--color-success-200: #C6E0BD;
|
|
29
|
+
--color-success-300: #9CC78E;
|
|
30
|
+
--color-success-400: #6CA85C;
|
|
31
|
+
--color-success-500: #4E9340;
|
|
32
|
+
--color-success-600: #3B7D2E;
|
|
33
|
+
--color-success-700: #306626;
|
|
34
|
+
--color-success-800: #27521F;
|
|
35
|
+
--color-success-900: #1F4119;
|
|
36
|
+
--color-success-950: #122A0E;
|
|
37
|
+
--color-warning-50: #FBF5E8;
|
|
38
|
+
--color-warning-100: #F7EBD2;
|
|
39
|
+
--color-warning-200: #EFD8A6;
|
|
40
|
+
--color-warning-300: #E4BF72;
|
|
41
|
+
--color-warning-400: #D6A245;
|
|
42
|
+
--color-warning-500: #C98E2D;
|
|
43
|
+
--color-warning-600: #B7791F;
|
|
44
|
+
--color-warning-700: #96631A;
|
|
45
|
+
--color-warning-800: #764E15;
|
|
46
|
+
--color-warning-900: #5B3C11;
|
|
47
|
+
--color-warning-950: #3B260A;
|
|
48
|
+
--color-danger-50: #FBEFEE;
|
|
49
|
+
--color-danger-100: #F6E0DE;
|
|
50
|
+
--color-danger-200: #EEC3BF;
|
|
51
|
+
--color-danger-300: #E39B95;
|
|
52
|
+
--color-danger-400: #D66E66;
|
|
53
|
+
--color-danger-500: #C94F46;
|
|
54
|
+
--color-danger-600: #B93A32;
|
|
55
|
+
--color-danger-700: #9A2F29;
|
|
56
|
+
--color-danger-800: #7B2621;
|
|
57
|
+
--color-danger-900: #611E1A;
|
|
58
|
+
--color-danger-950: #3F120F;
|
|
59
|
+
--color-neutral-50: #FAF9F5;
|
|
60
|
+
--color-neutral-100: #F3F1EB;
|
|
61
|
+
--color-neutral-200: #ECEAE3;
|
|
62
|
+
--color-neutral-300: #E1DED5;
|
|
63
|
+
--color-neutral-400: #CFCBC0;
|
|
64
|
+
--color-neutral-500: #8C9490;
|
|
65
|
+
--color-neutral-600: #5C6663;
|
|
66
|
+
--color-neutral-700: #3E4644;
|
|
67
|
+
--color-neutral-800: #2A3230;
|
|
68
|
+
--color-neutral-900: #1B2321;
|
|
69
|
+
--color-neutral-950: #111614;
|
|
70
|
+
--color-background-base: #F3F1EB;
|
|
71
|
+
--color-background-elevated: #FFFFFF;
|
|
72
|
+
--color-background-subtle: #FAF9F5;
|
|
73
|
+
--color-background-overlay: rgba(27, 35, 33, 0.5);
|
|
74
|
+
--color-background-hover: #F0EEE7;
|
|
75
|
+
--color-text-primary: #1B2321;
|
|
76
|
+
--color-text-secondary: #5C6663;
|
|
77
|
+
--color-text-tertiary: #616966;
|
|
78
|
+
--color-text-disabled: #8C9490;
|
|
79
|
+
--color-text-inverse: #FFFFFF;
|
|
80
|
+
--color-border-default: #E1DED5;
|
|
81
|
+
--color-border-subtle: #ECEAE3;
|
|
82
|
+
--color-border-strong: #CFCBC0;
|
|
83
|
+
--color-code-keyword: #1A5E8F;
|
|
84
|
+
--color-code-tag: #4B4FB0;
|
|
85
|
+
--color-code-string: #306626;
|
|
86
|
+
--color-code-attr: #96631A;
|
|
87
|
+
--color-code-comment: #6B6659;
|
|
88
|
+
--color-code-punctuation: #4A463C;
|
|
89
|
+
--color-artifact-base: #0B2A40;
|
|
90
|
+
--color-artifact-raised: #113D5C;
|
|
91
|
+
--color-artifact-border: #1A5E8F;
|
|
92
|
+
--color-artifact-text: #CFE6F6;
|
|
93
|
+
--color-artifact-muted: #8FA9BC;
|
|
94
|
+
--color-artifact-strong: #FFFFFF;
|
|
95
|
+
--color-artifact-keyword: #7CC0E8;
|
|
96
|
+
--color-artifact-string: #9FD8A8;
|
|
97
|
+
--color-artifact-highlight: #E7B96B;
|
|
98
|
+
--color-footer-base: #1B2321;
|
|
99
|
+
--color-footer-border: #2A3230;
|
|
100
|
+
--color-footer-text: #CFCBC0;
|
|
101
|
+
--color-footer-muted: #8C9490;
|
|
102
|
+
--color-footer-strong: #FFFFFF;
|
|
103
|
+
--color-brand-tile: #113D5C;
|
|
104
|
+
--color-brand-keep: #7CC0E8;
|
|
105
|
+
--spacing-0: 0;
|
|
106
|
+
--spacing-1: 0.25rem;
|
|
107
|
+
--spacing-2: 0.5rem;
|
|
108
|
+
--spacing-3: 0.75rem;
|
|
109
|
+
--spacing-4: 1rem;
|
|
110
|
+
--spacing-5: 1.25rem;
|
|
111
|
+
--spacing-6: 1.5rem;
|
|
112
|
+
--spacing-7: 1.75rem;
|
|
113
|
+
--spacing-8: 2rem;
|
|
114
|
+
--spacing-9: 2.25rem;
|
|
115
|
+
--spacing-10: 2.5rem;
|
|
116
|
+
--spacing-11: 2.75rem;
|
|
117
|
+
--spacing-12: 3rem;
|
|
118
|
+
--spacing-14: 3.5rem;
|
|
119
|
+
--spacing-16: 4rem;
|
|
120
|
+
--spacing-20: 5rem;
|
|
121
|
+
--spacing-24: 6rem;
|
|
122
|
+
--spacing-28: 7rem;
|
|
123
|
+
--spacing-32: 8rem;
|
|
124
|
+
--spacing-44: 11rem;
|
|
125
|
+
--spacing-64: 16rem;
|
|
126
|
+
--spacing-72: 18rem;
|
|
127
|
+
--spacing-px: 1px;
|
|
128
|
+
--radius-none: 0;
|
|
129
|
+
--radius-sm: 0.375rem;
|
|
130
|
+
--radius-md: 0.5rem;
|
|
131
|
+
--radius-lg: 0.75rem;
|
|
132
|
+
--radius-xl: 1rem;
|
|
133
|
+
--radius-full: 9999px;
|
|
134
|
+
--shadow-sm: 0 1px 2px 0 rgba(43, 38, 24, 0.06);
|
|
135
|
+
--shadow-md: 0 1px 2px 0 rgba(43, 38, 24, 0.05), 0 6px 18px 0 rgba(43, 38, 24, 0.07);
|
|
136
|
+
--shadow-lg: 0 2px 4px 0 rgba(43, 38, 24, 0.06), 0 16px 40px 0 rgba(43, 38, 24, 0.12);
|
|
137
|
+
--shadow-xl: 0 4px 8px 0 rgba(43, 38, 24, 0.08), 0 24px 56px 0 rgba(43, 38, 24, 0.16);
|
|
138
|
+
--motion-duration-fast: 150ms;
|
|
139
|
+
--motion-duration-normal: 250ms;
|
|
140
|
+
--motion-duration-slow: 400ms;
|
|
141
|
+
--motion-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
142
|
+
--motion-easing-enter: cubic-bezier(0, 0, 0.2, 1);
|
|
143
|
+
--motion-easing-exit: cubic-bezier(0.4, 0, 1, 1);
|
|
144
|
+
--direction: ltr;
|
|
145
|
+
--font-family-sans: 'IBM Plex Sans', 'IBM Plex Sans Arabic', ui-sans-serif, system-ui, sans-serif;
|
|
146
|
+
--font-family-serif: 'Literata', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
|
|
147
|
+
--font-family-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
|
|
148
|
+
--font-size-xs: 0.75rem;
|
|
149
|
+
--font-size-sm: 0.8125rem;
|
|
150
|
+
--font-size-base: 0.875rem;
|
|
151
|
+
--font-size-lg: 1rem;
|
|
152
|
+
--font-size-xl: 1.25rem;
|
|
153
|
+
--font-size-2xl: 1.5rem;
|
|
154
|
+
--font-size-3xl: 1.875rem;
|
|
155
|
+
--font-size-4xl: clamp(1.9rem, 3.4vw, 2.6rem);
|
|
156
|
+
--font-size-5xl: clamp(2.6rem, 4.6vw, 3.4rem);
|
|
157
|
+
--font-weight-normal: 400;
|
|
158
|
+
--font-weight-medium: 500;
|
|
159
|
+
--font-weight-semibold: 600;
|
|
160
|
+
--font-weight-bold: 700;
|
|
161
|
+
--line-height-tight: 1.25;
|
|
162
|
+
--line-height-normal: 1.5;
|
|
163
|
+
--line-height-relaxed: 1.75;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
[data-theme="dark"] {
|
|
167
|
+
--color-background-base: #1A1C1B;
|
|
168
|
+
--color-background-elevated: #232625;
|
|
169
|
+
--color-background-subtle: #1F2221;
|
|
170
|
+
--color-background-overlay: rgba(0, 0, 0, 0.6);
|
|
171
|
+
--color-background-hover: #2C302E;
|
|
172
|
+
--color-text-primary: #ECEAE3;
|
|
173
|
+
--color-text-secondary: #A3A8A6;
|
|
174
|
+
--color-text-tertiary: #969C99;
|
|
175
|
+
--color-text-disabled: #6F7573;
|
|
176
|
+
--color-text-inverse: #14181B;
|
|
177
|
+
--color-border-default: #33373A;
|
|
178
|
+
--color-border-subtle: #2C302E;
|
|
179
|
+
--color-border-strong: #444A4D;
|
|
180
|
+
--color-primary-50: #1D2A34;
|
|
181
|
+
--color-primary-100: #22364A;
|
|
182
|
+
--color-primary-200: #2A4A66;
|
|
183
|
+
--color-primary-300: #7CC0E8;
|
|
184
|
+
--color-primary-600: #7CC0E8;
|
|
185
|
+
--color-primary-700: #9AD0EE;
|
|
186
|
+
--color-primary-800: #BFE1F5;
|
|
187
|
+
--color-primary-900: #2A4A66;
|
|
188
|
+
--color-primary-950: #22364A;
|
|
189
|
+
--color-secondary-100: #2A2C46;
|
|
190
|
+
--color-secondary-500: #9A9DE3;
|
|
191
|
+
--color-secondary-600: #9A9DE3;
|
|
192
|
+
--color-success-100: #223A1E;
|
|
193
|
+
--color-success-600: #7FC46E;
|
|
194
|
+
--color-success-700: #8FD07F;
|
|
195
|
+
--color-warning-100: #3D3016;
|
|
196
|
+
--color-warning-600: #E0AA4B;
|
|
197
|
+
--color-warning-800: #EABB6A;
|
|
198
|
+
--color-danger-100: #45201D;
|
|
199
|
+
--color-danger-600: #E8776E;
|
|
200
|
+
--color-danger-700: #F0918A;
|
|
201
|
+
--color-code-keyword: #7CC0E8;
|
|
202
|
+
--color-code-tag: #9A9DE3;
|
|
203
|
+
--color-code-string: #7FC46E;
|
|
204
|
+
--color-code-attr: #E0AA4B;
|
|
205
|
+
--color-code-comment: #A3A8A6;
|
|
206
|
+
--color-code-punctuation: #C5C9C6;
|
|
207
|
+
--color-artifact-base: #14181B;
|
|
208
|
+
--color-artifact-raised: #1F2221;
|
|
209
|
+
--color-artifact-border: #33373A;
|
|
210
|
+
--color-artifact-text: #C9CFCD;
|
|
211
|
+
--color-artifact-muted: #848A87;
|
|
212
|
+
--color-artifact-strong: #ECEAE3;
|
|
213
|
+
--color-artifact-keyword: #7CC0E8;
|
|
214
|
+
--color-artifact-string: #9FD8A8;
|
|
215
|
+
--color-artifact-highlight: #E7B96B;
|
|
216
|
+
--color-footer-base: #14181B;
|
|
217
|
+
--color-footer-border: #2C302E;
|
|
218
|
+
--color-footer-text: #969C99;
|
|
219
|
+
--color-footer-muted: #848A87;
|
|
220
|
+
--color-footer-strong: #ECEAE3;
|
|
221
|
+
--color-brand-tile: #7CC0E8;
|
|
222
|
+
--color-brand-keep: #113D5C;
|
|
223
|
+
--color-neutral-50: #1F2221;
|
|
224
|
+
--color-neutral-100: #232625;
|
|
225
|
+
--color-neutral-200: #2C302E;
|
|
226
|
+
--color-neutral-300: #33373A;
|
|
227
|
+
--color-neutral-400: #444A4D;
|
|
228
|
+
--color-neutral-500: #6F7573;
|
|
229
|
+
--color-neutral-600: #A3A8A6;
|
|
230
|
+
--color-neutral-700: #C5C9C6;
|
|
231
|
+
--color-neutral-800: #DAD9D3;
|
|
232
|
+
--color-neutral-900: #ECEAE3;
|
|
233
|
+
--color-neutral-950: #F5F4F0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Arabic locales lead with Plex Sans Arabic: same token, language-conditional value. */
|
|
237
|
+
[lang="ar"], [lang^="ar-"] {
|
|
238
|
+
--font-family-sans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
|
|
239
|
+
}
|