@elytracms/core 0.0.6
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/LICENSE +21 -0
- package/dist/clipboard/build.d.ts +77 -0
- package/dist/clipboard/build.js +128 -0
- package/dist/clipboard/build.js.map +1 -0
- package/dist/clipboard/clipboard.d.ts +33 -0
- package/dist/clipboard/clipboard.js +45 -0
- package/dist/clipboard/clipboard.js.map +1 -0
- package/dist/clipboard/fragment.d.ts +112 -0
- package/dist/clipboard/fragment.js +79 -0
- package/dist/clipboard/fragment.js.map +1 -0
- package/dist/clipboard/html.d.ts +26 -0
- package/dist/clipboard/html.js +82 -0
- package/dist/clipboard/html.js.map +1 -0
- package/dist/clipboard/index.d.ts +15 -0
- package/dist/clipboard/index.js +16 -0
- package/dist/clipboard/index.js.map +1 -0
- package/dist/clipboard/references.d.ts +50 -0
- package/dist/clipboard/references.js +0 -0
- package/dist/clipboard/references.js.map +1 -0
- package/dist/clipboard/serialize.d.ts +69 -0
- package/dist/clipboard/serialize.js +130 -0
- package/dist/clipboard/serialize.js.map +1 -0
- package/dist/cms-core/collections.d.ts +82 -0
- package/dist/cms-core/collections.js +187 -0
- package/dist/cms-core/collections.js.map +1 -0
- package/dist/cms-core/documents.d.ts +71 -0
- package/dist/cms-core/documents.js +67 -0
- package/dist/cms-core/documents.js.map +1 -0
- package/dist/cms-core/envelopes.d.ts +80 -0
- package/dist/cms-core/envelopes.js +124 -0
- package/dist/cms-core/envelopes.js.map +1 -0
- package/dist/cms-core/fields.d.ts +220 -0
- package/dist/cms-core/fields.js +250 -0
- package/dist/cms-core/fields.js.map +1 -0
- package/dist/cms-core/fixtures.d.ts +92 -0
- package/dist/cms-core/fixtures.js +357 -0
- package/dist/cms-core/fixtures.js.map +1 -0
- package/dist/cms-core/hierarchy.d.ts +113 -0
- package/dist/cms-core/hierarchy.js +223 -0
- package/dist/cms-core/hierarchy.js.map +1 -0
- package/dist/cms-core/index.d.ts +25 -0
- package/dist/cms-core/index.js +26 -0
- package/dist/cms-core/index.js.map +1 -0
- package/dist/cms-core/infer.d.ts +103 -0
- package/dist/cms-core/infer.js +57 -0
- package/dist/cms-core/infer.js.map +1 -0
- package/dist/cms-core/issues.d.ts +92 -0
- package/dist/cms-core/issues.js +74 -0
- package/dist/cms-core/issues.js.map +1 -0
- package/dist/cms-core/json-schema.d.ts +25 -0
- package/dist/cms-core/json-schema.js +110 -0
- package/dist/cms-core/json-schema.js.map +1 -0
- package/dist/cms-core/localization.d.ts +51 -0
- package/dist/cms-core/localization.js +89 -0
- package/dist/cms-core/localization.js.map +1 -0
- package/dist/cms-core/routes.d.ts +76 -0
- package/dist/cms-core/routes.js +220 -0
- package/dist/cms-core/routes.js.map +1 -0
- package/dist/cms-core/self-type.d.ts +41 -0
- package/dist/cms-core/self-type.js +191 -0
- package/dist/cms-core/self-type.js.map +1 -0
- package/dist/cms-core/url-for-document.d.ts +39 -0
- package/dist/cms-core/url-for-document.js +138 -0
- package/dist/cms-core/url-for-document.js.map +1 -0
- package/dist/cms-core/validate-document.d.ts +121 -0
- package/dist/cms-core/validate-document.js +871 -0
- package/dist/cms-core/validate-document.js.map +1 -0
- package/dist/cms-core/versions.d.ts +75 -0
- package/dist/cms-core/versions.js +97 -0
- package/dist/cms-core/versions.js.map +1 -0
- package/dist/collaboration/approval.d.ts +68 -0
- package/dist/collaboration/approval.js +104 -0
- package/dist/collaboration/approval.js.map +1 -0
- package/dist/collaboration/collaboration.d.ts +49 -0
- package/dist/collaboration/collaboration.js +56 -0
- package/dist/collaboration/collaboration.js.map +1 -0
- package/dist/collaboration/comments.d.ts +72 -0
- package/dist/collaboration/comments.js +118 -0
- package/dist/collaboration/comments.js.map +1 -0
- package/dist/collaboration/core.d.ts +25 -0
- package/dist/collaboration/core.js +26 -0
- package/dist/collaboration/core.js.map +1 -0
- package/dist/collaboration/index.d.ts +14 -0
- package/dist/collaboration/index.js +15 -0
- package/dist/collaboration/index.js.map +1 -0
- package/dist/collaboration/presence.d.ts +62 -0
- package/dist/collaboration/presence.js +85 -0
- package/dist/collaboration/presence.js.map +1 -0
- package/dist/collaboration/publishing.d.ts +60 -0
- package/dist/collaboration/publishing.js +93 -0
- package/dist/collaboration/publishing.js.map +1 -0
- package/dist/collaboration/versions.d.ts +52 -0
- package/dist/collaboration/versions.js +81 -0
- package/dist/collaboration/versions.js.map +1 -0
- package/dist/component-registry/index.d.ts +3 -0
- package/dist/component-registry/index.js +4 -0
- package/dist/component-registry/index.js.map +1 -0
- package/dist/component-registry/issues.d.ts +6 -0
- package/dist/component-registry/issues.js +2 -0
- package/dist/component-registry/issues.js.map +1 -0
- package/dist/component-registry/manifest.d.ts +164 -0
- package/dist/component-registry/manifest.js +129 -0
- package/dist/component-registry/manifest.js.map +1 -0
- package/dist/component-registry/registry.d.ts +33 -0
- package/dist/component-registry/registry.js +90 -0
- package/dist/component-registry/registry.js.map +1 -0
- package/dist/content/__fixtures__/filterable-collections.d.ts +14 -0
- package/dist/content/__fixtures__/filterable-collections.js +15 -0
- package/dist/content/__fixtures__/filterable-collections.js.map +1 -0
- package/dist/content/__fixtures__/sample-accessor-types.d.ts +56 -0
- package/dist/content/__fixtures__/sample-accessor-types.js +5 -0
- package/dist/content/__fixtures__/sample-accessor-types.js.map +1 -0
- package/dist/content/__fixtures__/sample-delivery-types.d.ts +122 -0
- package/dist/content/__fixtures__/sample-delivery-types.js +5 -0
- package/dist/content/__fixtures__/sample-delivery-types.js.map +1 -0
- package/dist/content/assets.d.ts +53 -0
- package/dist/content/assets.js +38 -0
- package/dist/content/assets.js.map +1 -0
- package/dist/content/binding-sources.d.ts +53 -0
- package/dist/content/binding-sources.js +73 -0
- package/dist/content/binding-sources.js.map +1 -0
- package/dist/content/client.d.ts +90 -0
- package/dist/content/client.js +383 -0
- package/dist/content/client.js.map +1 -0
- package/dist/content/codegen.d.ts +54 -0
- package/dist/content/codegen.js +305 -0
- package/dist/content/codegen.js.map +1 -0
- package/dist/content/context.d.ts +38 -0
- package/dist/content/context.js +21 -0
- package/dist/content/context.js.map +1 -0
- package/dist/content/cursor.d.ts +33 -0
- package/dist/content/cursor.js +104 -0
- package/dist/content/cursor.js.map +1 -0
- package/dist/content/index.d.ts +28 -0
- package/dist/content/index.js +29 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content/locale.d.ts +30 -0
- package/dist/content/locale.js +26 -0
- package/dist/content/locale.js.map +1 -0
- package/dist/content/perspective.d.ts +29 -0
- package/dist/content/perspective.js +31 -0
- package/dist/content/perspective.js.map +1 -0
- package/dist/content/populate.d.ts +25 -0
- package/dist/content/populate.js +22 -0
- package/dist/content/populate.js.map +1 -0
- package/dist/content/query.d.ts +122 -0
- package/dist/content/query.js +257 -0
- package/dist/content/query.js.map +1 -0
- package/dist/content/raw.d.ts +13 -0
- package/dist/content/raw.js +14 -0
- package/dist/content/raw.js.map +1 -0
- package/dist/content/resolve.d.ts +97 -0
- package/dist/content/resolve.js +261 -0
- package/dist/content/resolve.js.map +1 -0
- package/dist/content/serialize.d.ts +30 -0
- package/dist/content/serialize.js +57 -0
- package/dist/content/serialize.js.map +1 -0
- package/dist/content/tags.d.ts +54 -0
- package/dist/content/tags.js +40 -0
- package/dist/content/tags.js.map +1 -0
- package/dist/data-binding/fixtures.d.ts +20 -0
- package/dist/data-binding/fixtures.js +47 -0
- package/dist/data-binding/fixtures.js.map +1 -0
- package/dist/data-binding/index.d.ts +14 -0
- package/dist/data-binding/index.js +15 -0
- package/dist/data-binding/index.js.map +1 -0
- package/dist/data-binding/issues.d.ts +45 -0
- package/dist/data-binding/issues.js +46 -0
- package/dist/data-binding/issues.js.map +1 -0
- package/dist/data-binding/resolve.d.ts +87 -0
- package/dist/data-binding/resolve.js +204 -0
- package/dist/data-binding/resolve.js.map +1 -0
- package/dist/data-binding/sample.d.ts +21 -0
- package/dist/data-binding/sample.js +23 -0
- package/dist/data-binding/sample.js.map +1 -0
- package/dist/data-binding/sources.d.ts +225 -0
- package/dist/data-binding/sources.js +154 -0
- package/dist/data-binding/sources.js.map +1 -0
- package/dist/data-binding/tokens.d.ts +62 -0
- package/dist/data-binding/tokens.js +150 -0
- package/dist/data-binding/tokens.js.map +1 -0
- package/dist/design-tokens/css.d.ts +34 -0
- package/dist/design-tokens/css.js +51 -0
- package/dist/design-tokens/css.js.map +1 -0
- package/dist/design-tokens/index.d.ts +10 -0
- package/dist/design-tokens/index.js +11 -0
- package/dist/design-tokens/index.js.map +1 -0
- package/dist/design-tokens/style-guide.d.ts +30 -0
- package/dist/design-tokens/style-guide.js +31 -0
- package/dist/design-tokens/style-guide.js.map +1 -0
- package/dist/design-tokens/tokens.d.ts +89 -0
- package/dist/design-tokens/tokens.js +112 -0
- package/dist/design-tokens/tokens.js.map +1 -0
- package/dist/export-sync/builder-source.d.ts +85 -0
- package/dist/export-sync/builder-source.js +124 -0
- package/dist/export-sync/builder-source.js.map +1 -0
- package/dist/export-sync/check.d.ts +61 -0
- package/dist/export-sync/check.js +126 -0
- package/dist/export-sync/check.js.map +1 -0
- package/dist/export-sync/cli.d.ts +89 -0
- package/dist/export-sync/cli.js +323 -0
- package/dist/export-sync/cli.js.map +1 -0
- package/dist/export-sync/core.d.ts +58 -0
- package/dist/export-sync/core.js +41 -0
- package/dist/export-sync/core.js.map +1 -0
- package/dist/export-sync/eject.d.ts +28 -0
- package/dist/export-sync/eject.js +21 -0
- package/dist/export-sync/eject.js.map +1 -0
- package/dist/export-sync/fixtures.d.ts +25 -0
- package/dist/export-sync/fixtures.js +87 -0
- package/dist/export-sync/fixtures.js.map +1 -0
- package/dist/export-sync/generate.d.ts +7 -0
- package/dist/export-sync/generate.js +505 -0
- package/dist/export-sync/generate.js.map +1 -0
- package/dist/export-sync/index.d.ts +37 -0
- package/dist/export-sync/index.js +39 -0
- package/dist/export-sync/index.js.map +1 -0
- package/dist/export-sync/init.d.ts +123 -0
- package/dist/export-sync/init.js +234 -0
- package/dist/export-sync/init.js.map +1 -0
- package/dist/export-sync/manifest-host.d.ts +48 -0
- package/dist/export-sync/manifest-host.js +73 -0
- package/dist/export-sync/manifest-host.js.map +1 -0
- package/dist/export-sync/node.d.ts +20 -0
- package/dist/export-sync/node.js +101 -0
- package/dist/export-sync/node.js.map +1 -0
- package/dist/export-sync/push.d.ts +76 -0
- package/dist/export-sync/push.js +197 -0
- package/dist/export-sync/push.js.map +1 -0
- package/dist/export-sync/registry-sync-client.d.ts +59 -0
- package/dist/export-sync/registry-sync-client.js +97 -0
- package/dist/export-sync/registry-sync-client.js.map +1 -0
- package/dist/export-sync/sync.d.ts +47 -0
- package/dist/export-sync/sync.js +47 -0
- package/dist/export-sync/sync.js.map +1 -0
- package/dist/export-sync/typegen.d.ts +40 -0
- package/dist/export-sync/typegen.js +45 -0
- package/dist/export-sync/typegen.js.map +1 -0
- package/dist/export-sync/validate.d.ts +19 -0
- package/dist/export-sync/validate.js +102 -0
- package/dist/export-sync/validate.js.map +1 -0
- package/dist/export-sync/watch.d.ts +66 -0
- package/dist/export-sync/watch.js +70 -0
- package/dist/export-sync/watch.js.map +1 -0
- package/dist/operations/assets.d.ts +198 -0
- package/dist/operations/assets.js +75 -0
- package/dist/operations/assets.js.map +1 -0
- package/dist/operations/authorization.d.ts +49 -0
- package/dist/operations/authorization.js +128 -0
- package/dist/operations/authorization.js.map +1 -0
- package/dist/operations/changesets.d.ts +160 -0
- package/dist/operations/changesets.js +442 -0
- package/dist/operations/changesets.js.map +1 -0
- package/dist/operations/client.d.ts +49 -0
- package/dist/operations/client.js +57 -0
- package/dist/operations/client.js.map +1 -0
- package/dist/operations/core.d.ts +238 -0
- package/dist/operations/core.js +269 -0
- package/dist/operations/core.js.map +1 -0
- package/dist/operations/documents.d.ts +432 -0
- package/dist/operations/documents.js +344 -0
- package/dist/operations/documents.js.map +1 -0
- package/dist/operations/graph.d.ts +138 -0
- package/dist/operations/graph.js +78 -0
- package/dist/operations/graph.js.map +1 -0
- package/dist/operations/index.d.ts +19 -0
- package/dist/operations/index.js +20 -0
- package/dist/operations/index.js.map +1 -0
- package/dist/operations/members.d.ts +87 -0
- package/dist/operations/members.js +56 -0
- package/dist/operations/members.js.map +1 -0
- package/dist/operations/publishing.d.ts +89 -0
- package/dist/operations/publishing.js +57 -0
- package/dist/operations/publishing.js.map +1 -0
- package/dist/operations/references.d.ts +222 -0
- package/dist/operations/references.js +177 -0
- package/dist/operations/references.js.map +1 -0
- package/dist/operations/schema.d.ts +413 -0
- package/dist/operations/schema.js +138 -0
- package/dist/operations/schema.js.map +1 -0
- package/dist/operations/tokens.d.ts +79 -0
- package/dist/operations/tokens.js +102 -0
- package/dist/operations/tokens.js.map +1 -0
- package/dist/persistence/adapter.d.ts +79 -0
- package/dist/persistence/adapter.js +55 -0
- package/dist/persistence/adapter.js.map +1 -0
- package/dist/persistence/assets.d.ts +120 -0
- package/dist/persistence/assets.js +141 -0
- package/dist/persistence/assets.js.map +1 -0
- package/dist/persistence/backend-validation.d.ts +43 -0
- package/dist/persistence/backend-validation.js +57 -0
- package/dist/persistence/backend-validation.js.map +1 -0
- package/dist/persistence/cli-tokens.d.ts +50 -0
- package/dist/persistence/cli-tokens.js +66 -0
- package/dist/persistence/cli-tokens.js.map +1 -0
- package/dist/persistence/cms.d.ts +148 -0
- package/dist/persistence/cms.js +232 -0
- package/dist/persistence/cms.js.map +1 -0
- package/dist/persistence/contract-scenarios.d.ts +73 -0
- package/dist/persistence/contract-scenarios.js +496 -0
- package/dist/persistence/contract-scenarios.js.map +1 -0
- package/dist/persistence/core.d.ts +96 -0
- package/dist/persistence/core.js +110 -0
- package/dist/persistence/core.js.map +1 -0
- package/dist/persistence/graph.d.ts +61 -0
- package/dist/persistence/graph.js +98 -0
- package/dist/persistence/graph.js.map +1 -0
- package/dist/persistence/index.d.ts +22 -0
- package/dist/persistence/index.js +23 -0
- package/dist/persistence/index.js.map +1 -0
- package/dist/persistence/members.d.ts +70 -0
- package/dist/persistence/members.js +0 -0
- package/dist/persistence/members.js.map +1 -0
- package/dist/persistence/publishing.d.ts +59 -0
- package/dist/persistence/publishing.js +95 -0
- package/dist/persistence/publishing.js.map +1 -0
- package/dist/persistence/reference-extraction.d.ts +44 -0
- package/dist/persistence/reference-extraction.js +204 -0
- package/dist/persistence/reference-extraction.js.map +1 -0
- package/dist/persistence/reference-indexing.d.ts +68 -0
- package/dist/persistence/reference-indexing.js +112 -0
- package/dist/persistence/reference-indexing.js.map +1 -0
- package/dist/persistence/references.d.ts +257 -0
- package/dist/persistence/references.js +0 -0
- package/dist/persistence/references.js.map +1 -0
- package/dist/persistence/seed.d.ts +55 -0
- package/dist/persistence/seed.js +102 -0
- package/dist/persistence/seed.js.map +1 -0
- package/dist/persistence/self-maintaining-adapter.d.ts +41 -0
- package/dist/persistence/self-maintaining-adapter.js +79 -0
- package/dist/persistence/self-maintaining-adapter.js.map +1 -0
- package/dist/plugins/asset-storage.d.ts +76 -0
- package/dist/plugins/asset-storage.js +104 -0
- package/dist/plugins/asset-storage.js.map +1 -0
- package/dist/plugins/component-package.d.ts +54 -0
- package/dist/plugins/component-package.js +92 -0
- package/dist/plugins/component-package.js.map +1 -0
- package/dist/plugins/data-sources.d.ts +78 -0
- package/dist/plugins/data-sources.js +99 -0
- package/dist/plugins/data-sources.js.map +1 -0
- package/dist/plugins/examples.d.ts +47 -0
- package/dist/plugins/examples.js +205 -0
- package/dist/plugins/examples.js.map +1 -0
- package/dist/plugins/export-targets.d.ts +47 -0
- package/dist/plugins/export-targets.js +78 -0
- package/dist/plugins/export-targets.js.map +1 -0
- package/dist/plugins/field-types.d.ts +86 -0
- package/dist/plugins/field-types.js +93 -0
- package/dist/plugins/field-types.js.map +1 -0
- package/dist/plugins/hooks.d.ts +60 -0
- package/dist/plugins/hooks.js +94 -0
- package/dist/plugins/hooks.js.map +1 -0
- package/dist/plugins/index.d.ts +27 -0
- package/dist/plugins/index.js +28 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/marketplace.d.ts +90 -0
- package/dist/plugins/marketplace.js +110 -0
- package/dist/plugins/marketplace.js.map +1 -0
- package/dist/plugins/plugin.d.ts +107 -0
- package/dist/plugins/plugin.js +122 -0
- package/dist/plugins/plugin.js.map +1 -0
- package/dist/plugins/templates.d.ts +66 -0
- package/dist/plugins/templates.js +74 -0
- package/dist/plugins/templates.js.map +1 -0
- package/dist/project-graph/binding.d.ts +68 -0
- package/dist/project-graph/binding.js +39 -0
- package/dist/project-graph/binding.js.map +1 -0
- package/dist/project-graph/container.d.ts +126 -0
- package/dist/project-graph/container.js +221 -0
- package/dist/project-graph/container.js.map +1 -0
- package/dist/project-graph/edit.d.ts +66 -0
- package/dist/project-graph/edit.js +201 -0
- package/dist/project-graph/edit.js.map +1 -0
- package/dist/project-graph/fixtures.d.ts +51 -0
- package/dist/project-graph/fixtures.js +224 -0
- package/dist/project-graph/fixtures.js.map +1 -0
- package/dist/project-graph/ids.d.ts +17 -0
- package/dist/project-graph/ids.js +19 -0
- package/dist/project-graph/ids.js.map +1 -0
- package/dist/project-graph/index.d.ts +12 -0
- package/dist/project-graph/index.js +13 -0
- package/dist/project-graph/index.js.map +1 -0
- package/dist/project-graph/issues.d.ts +61 -0
- package/dist/project-graph/issues.js +44 -0
- package/dist/project-graph/issues.js.map +1 -0
- package/dist/project-graph/json.d.ts +6 -0
- package/dist/project-graph/json.js +10 -0
- package/dist/project-graph/json.js.map +1 -0
- package/dist/project-graph/node.d.ts +48 -0
- package/dist/project-graph/node.js +42 -0
- package/dist/project-graph/node.js.map +1 -0
- package/dist/project-graph/normalize.d.ts +17 -0
- package/dist/project-graph/normalize.js +110 -0
- package/dist/project-graph/normalize.js.map +1 -0
- package/dist/project-graph/serialize.d.ts +36 -0
- package/dist/project-graph/serialize.js +51 -0
- package/dist/project-graph/serialize.js.map +1 -0
- package/dist/project-graph/structure.d.ts +40 -0
- package/dist/project-graph/structure.js +36 -0
- package/dist/project-graph/structure.js.map +1 -0
- package/dist/project-graph/validate.d.ts +84 -0
- package/dist/project-graph/validate.js +158 -0
- package/dist/project-graph/validate.js.map +1 -0
- package/dist/rich-text/adapter.d.ts +43 -0
- package/dist/rich-text/adapter.js +24 -0
- package/dist/rich-text/adapter.js.map +1 -0
- package/dist/rich-text/dom-editor.d.ts +101 -0
- package/dist/rich-text/dom-editor.js +482 -0
- package/dist/rich-text/dom-editor.js.map +1 -0
- package/dist/rich-text/embed.d.ts +70 -0
- package/dist/rich-text/embed.js +70 -0
- package/dist/rich-text/embed.js.map +1 -0
- package/dist/rich-text/fixtures.d.ts +25 -0
- package/dist/rich-text/fixtures.js +115 -0
- package/dist/rich-text/fixtures.js.map +1 -0
- package/dist/rich-text/html.d.ts +5 -0
- package/dist/rich-text/html.js +309 -0
- package/dist/rich-text/html.js.map +1 -0
- package/dist/rich-text/index.d.ts +19 -0
- package/dist/rich-text/index.js +20 -0
- package/dist/rich-text/index.js.map +1 -0
- package/dist/rich-text/markdown.d.ts +7 -0
- package/dist/rich-text/markdown.js +235 -0
- package/dist/rich-text/markdown.js.map +1 -0
- package/dist/rich-text/portable-text.d.ts +50 -0
- package/dist/rich-text/portable-text.js +223 -0
- package/dist/rich-text/portable-text.js.map +1 -0
- package/dist/rich-text/registry.d.ts +48 -0
- package/dist/rich-text/registry.js +16 -0
- package/dist/rich-text/registry.js.map +1 -0
- package/dist/rich-text/render.d.ts +69 -0
- package/dist/rich-text/render.js +205 -0
- package/dist/rich-text/render.js.map +1 -0
- package/dist/rich-text/schema.d.ts +86 -0
- package/dist/rich-text/schema.js +80 -0
- package/dist/rich-text/schema.js.map +1 -0
- package/dist/rich-text/test-support.d.ts +7 -0
- package/dist/rich-text/test-support.js +8 -0
- package/dist/rich-text/test-support.js.map +1 -0
- package/dist/runtime-renderer/client.d.ts +14 -0
- package/dist/runtime-renderer/client.js +15 -0
- package/dist/runtime-renderer/client.js.map +1 -0
- package/dist/runtime-renderer/condition.d.ts +8 -0
- package/dist/runtime-renderer/condition.js +48 -0
- package/dist/runtime-renderer/condition.js.map +1 -0
- package/dist/runtime-renderer/content-client.d.ts +62 -0
- package/dist/runtime-renderer/content-client.js +37 -0
- package/dist/runtime-renderer/content-client.js.map +1 -0
- package/dist/runtime-renderer/context.d.ts +185 -0
- package/dist/runtime-renderer/context.js +7 -0
- package/dist/runtime-renderer/context.js.map +1 -0
- package/dist/runtime-renderer/fallback.d.ts +39 -0
- package/dist/runtime-renderer/fallback.js +45 -0
- package/dist/runtime-renderer/fallback.js.map +1 -0
- package/dist/runtime-renderer/index.d.ts +13 -0
- package/dist/runtime-renderer/index.js +13 -0
- package/dist/runtime-renderer/index.js.map +1 -0
- package/dist/runtime-renderer/primitives.d.ts +85 -0
- package/dist/runtime-renderer/primitives.js +442 -0
- package/dist/runtime-renderer/primitives.js.map +1 -0
- package/dist/runtime-renderer/render.d.ts +138 -0
- package/dist/runtime-renderer/render.js +825 -0
- package/dist/runtime-renderer/render.js.map +1 -0
- package/dist/runtime-renderer/rich-text.d.ts +26 -0
- package/dist/runtime-renderer/rich-text.js +113 -0
- package/dist/runtime-renderer/rich-text.js.map +1 -0
- package/dist/starter-kits/index.d.ts +13 -0
- package/dist/starter-kits/index.js +14 -0
- package/dist/starter-kits/index.js.map +1 -0
- package/dist/starter-kits/instantiate.d.ts +29 -0
- package/dist/starter-kits/instantiate.js +24 -0
- package/dist/starter-kits/instantiate.js.map +1 -0
- package/dist/starter-kits/kit.d.ts +61 -0
- package/dist/starter-kits/kit.js +37 -0
- package/dist/starter-kits/kit.js.map +1 -0
- package/dist/starter-kits/kits.d.ts +7 -0
- package/dist/starter-kits/kits.js +201 -0
- package/dist/starter-kits/kits.js.map +1 -0
- package/dist/starter-kits/manifests.d.ts +7 -0
- package/dist/starter-kits/manifests.js +111 -0
- package/dist/starter-kits/manifests.js.map +1 -0
- package/dist/starter-kits/upgrade.d.ts +39 -0
- package/dist/starter-kits/upgrade.js +54 -0
- package/dist/starter-kits/upgrade.js.map +1 -0
- package/dist/starter-kits/validate.d.ts +16 -0
- package/dist/starter-kits/validate.js +77 -0
- package/dist/starter-kits/validate.js.map +1 -0
- package/dist/studio-core/context.d.ts +27 -0
- package/dist/studio-core/context.js +44 -0
- package/dist/studio-core/context.js.map +1 -0
- package/dist/studio-core/errors.d.ts +58 -0
- package/dist/studio-core/errors.js +74 -0
- package/dist/studio-core/errors.js.map +1 -0
- package/dist/studio-core/fixtures.d.ts +18 -0
- package/dist/studio-core/fixtures.js +83 -0
- package/dist/studio-core/fixtures.js.map +1 -0
- package/dist/studio-core/ids.d.ts +22 -0
- package/dist/studio-core/ids.js +33 -0
- package/dist/studio-core/ids.js.map +1 -0
- package/dist/studio-core/index.d.ts +11 -0
- package/dist/studio-core/index.js +12 -0
- package/dist/studio-core/index.js.map +1 -0
- package/dist/studio-core/issues.d.ts +50 -0
- package/dist/studio-core/issues.js +33 -0
- package/dist/studio-core/issues.js.map +1 -0
- package/dist/studio-core/metadata.d.ts +109 -0
- package/dist/studio-core/metadata.js +74 -0
- package/dist/studio-core/metadata.js.map +1 -0
- package/dist/studio-core/repository.d.ts +73 -0
- package/dist/studio-core/repository.js +202 -0
- package/dist/studio-core/repository.js.map +1 -0
- package/dist/studio-core/sections.d.ts +73 -0
- package/dist/studio-core/sections.js +68 -0
- package/dist/studio-core/sections.js.map +1 -0
- package/dist/studio-core/validate.d.ts +15 -0
- package/dist/studio-core/validate.js +119 -0
- package/dist/studio-core/validate.js.map +1 -0
- package/dist/studio-core/workspace-config.d.ts +587 -0
- package/dist/studio-core/workspace-config.js +434 -0
- package/dist/studio-core/workspace-config.js.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset-storage adapters (EC-133). The CMS stores asset *metadata* (filename, size, content type)
|
|
3
|
+
* and points at bytes by an opaque storage key. A storage adapter owns where those bytes live —
|
|
4
|
+
* in-memory, a CDN base URL, S3, Convex file storage, etc. This interface is structurally
|
|
5
|
+
* compatible with `@elytracms/core/persistence`'s `BlobStorageAdapter`, so an adapter registered here can
|
|
6
|
+
* back the asset repository directly. Selection is pluggable and configurable.
|
|
7
|
+
*/
|
|
8
|
+
/** Registry of asset-storage adapters keyed by kind, with a selectable active backend. */
|
|
9
|
+
export class AssetStorageRegistry {
|
|
10
|
+
byKind = new Map();
|
|
11
|
+
activeKind;
|
|
12
|
+
issues = [];
|
|
13
|
+
constructor(adapters = []) {
|
|
14
|
+
for (const adapter of adapters)
|
|
15
|
+
this.register(adapter);
|
|
16
|
+
}
|
|
17
|
+
register(adapter) {
|
|
18
|
+
if (this.byKind.has(adapter.kind)) {
|
|
19
|
+
this.issues.push({ code: 'duplicate', ref: adapter.kind, message: `Duplicate storage adapter "${adapter.kind}" — keeping the first registration.` });
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
this.byKind.set(adapter.kind, adapter);
|
|
23
|
+
if (this.activeKind === undefined)
|
|
24
|
+
this.activeKind = adapter.kind;
|
|
25
|
+
}
|
|
26
|
+
has(kind) {
|
|
27
|
+
return this.byKind.has(kind);
|
|
28
|
+
}
|
|
29
|
+
get(kind) {
|
|
30
|
+
return this.byKind.get(kind);
|
|
31
|
+
}
|
|
32
|
+
list() {
|
|
33
|
+
return [...this.byKind.values()];
|
|
34
|
+
}
|
|
35
|
+
/** Select the active backend (the one the asset repository writes through). */
|
|
36
|
+
use(kind) {
|
|
37
|
+
if (!this.byKind.has(kind))
|
|
38
|
+
return false;
|
|
39
|
+
this.activeKind = kind;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
/** The active adapter (first registered, unless changed via {@link use}). */
|
|
43
|
+
active() {
|
|
44
|
+
return this.activeKind ? this.byKind.get(this.activeKind) : undefined;
|
|
45
|
+
}
|
|
46
|
+
get size() {
|
|
47
|
+
return this.byKind.size;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* In-memory asset storage (the reference adapter for tests and local inspection). Bytes persist
|
|
52
|
+
* for the lifetime of the instance.
|
|
53
|
+
*/
|
|
54
|
+
export class MemoryAssetStorage {
|
|
55
|
+
kind = 'memory';
|
|
56
|
+
title = 'In-memory';
|
|
57
|
+
description = 'Keeps bytes in process memory. For local development and tests.';
|
|
58
|
+
blobs = new Map();
|
|
59
|
+
async put(key, data) {
|
|
60
|
+
this.blobs.set(key, data);
|
|
61
|
+
}
|
|
62
|
+
async get(key) {
|
|
63
|
+
return this.blobs.get(key);
|
|
64
|
+
}
|
|
65
|
+
url(key) {
|
|
66
|
+
return `memory://assets/${key}`;
|
|
67
|
+
}
|
|
68
|
+
async has(key) {
|
|
69
|
+
return this.blobs.has(key);
|
|
70
|
+
}
|
|
71
|
+
async delete(key) {
|
|
72
|
+
this.blobs.delete(key);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A read-through CDN/base-URL adapter (example, EC-133). Bytes are served from an external base
|
|
77
|
+
* URL; this adapter resolves locators but does not own writes (uploads happen out of band). It
|
|
78
|
+
* demonstrates that a "new storage backend" is just another implementation of the interface.
|
|
79
|
+
*/
|
|
80
|
+
export class BaseUrlAssetStorage {
|
|
81
|
+
kind = 'plugin.base-url';
|
|
82
|
+
title = 'CDN base URL';
|
|
83
|
+
description = 'Resolves asset URLs against a configured CDN/base URL. Read-through.';
|
|
84
|
+
base;
|
|
85
|
+
constructor(baseUrl) {
|
|
86
|
+
this.base = baseUrl.replace(/\/$/, '');
|
|
87
|
+
}
|
|
88
|
+
async put() {
|
|
89
|
+
throw new Error('BaseUrlAssetStorage is read-through; upload bytes to the CDN out of band.');
|
|
90
|
+
}
|
|
91
|
+
async get() {
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
url(key) {
|
|
95
|
+
return `${this.base}/${key.replace(/^\//, '')}`;
|
|
96
|
+
}
|
|
97
|
+
async has() {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
async delete() {
|
|
101
|
+
/* no-op: the CDN owns lifecycle */
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=asset-storage.js.map
|
|
@@ -0,0 +1 @@
|
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sEAAsE,CAAA;IAC5E,IAAI,CAAQ;IAE7B,YAAY,OAAe;QACzB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IACxC,CAAC;IAED,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAA;IAC9F,CAAC;IACD,KAAK,CAAC,GAAG;QACP,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,GAAG,CAAC,GAAW;QACb,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAA;IACjD,CAAC;IACD,KAAK,CAAC,GAAG;QACP,OAAO,KAAK,CAAA;IACd,CAAC;IACD,KAAK,CAAC,MAAM;QACV,mCAAmC;IACrC,CAAC;CACF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ComponentRegistry } from '@elytracms/core/component-registry';
|
|
3
|
+
import type { ComponentManifest } from '@elytracms/core/component-registry';
|
|
4
|
+
/**
|
|
5
|
+
* Component package conventions (EC-130). A distributable component package bundles a set of
|
|
6
|
+
* component *manifests* (shape; real React implementations are wired in the consuming app/export —
|
|
7
|
+
* brief §4.2 "project-level components first"). Conventions:
|
|
8
|
+
*
|
|
9
|
+
* - **Name**: npm-style (`@vendor/name` or `name`).
|
|
10
|
+
* - **Version**: semver (`major.minor.patch`).
|
|
11
|
+
* - **Vendor namespace**: a short slug (e.g. `acme`). Every component id MUST be
|
|
12
|
+
* `project.<vendor>.<ComponentName>` — installed third-party components are project-level
|
|
13
|
+
* components, scoped by vendor so they validate cleanly and never collide with platform
|
|
14
|
+
* primitives (`base.primitives.*`) or another vendor.
|
|
15
|
+
*
|
|
16
|
+
* `validateComponentPackage` checks these conventions and the manifests (via the canonical
|
|
17
|
+
* `ComponentRegistry`); `registerComponentPackage` registers a conforming package.
|
|
18
|
+
*/
|
|
19
|
+
/** Reserved id prefixes a vendor package must never use. */
|
|
20
|
+
export declare const RESERVED_VENDORS: readonly ["base", "primitives", "project"];
|
|
21
|
+
export declare const componentPackageMetaSchema: z.ZodObject<{
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
version: z.ZodString;
|
|
24
|
+
vendor: z.ZodString;
|
|
25
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26
|
+
author: z.ZodOptional<z.ZodString>;
|
|
27
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type ComponentPackageMeta = z.infer<typeof componentPackageMetaSchema>;
|
|
30
|
+
/** A distributable component package (EC-130). */
|
|
31
|
+
export interface ComponentPackage extends ComponentPackageMeta {
|
|
32
|
+
manifests: ComponentManifest[];
|
|
33
|
+
}
|
|
34
|
+
/** A structured validation issue for a component package. */
|
|
35
|
+
export interface ComponentPackageIssue {
|
|
36
|
+
code: 'meta' | 'reserved' | 'namespace' | 'invalid-id' | 'duplicate' | 'empty';
|
|
37
|
+
severity: 'error' | 'warning';
|
|
38
|
+
message: string;
|
|
39
|
+
ref?: string;
|
|
40
|
+
}
|
|
41
|
+
/** The required component-id prefix for a vendor's package. */
|
|
42
|
+
export declare function vendorPrefix(vendor: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Validate a component package against the conventions (EC-130). Returns structured issues; never
|
|
45
|
+
* throws. A package with any `error` must not be registered.
|
|
46
|
+
*/
|
|
47
|
+
export declare function validateComponentPackage(pkg: ComponentPackage): ComponentPackageIssue[];
|
|
48
|
+
/** True when a package validates with no errors. */
|
|
49
|
+
export declare function isComponentPackageValid(pkg: ComponentPackage): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Register a conforming component package into a registry (EC-130). Validates first; only registers
|
|
52
|
+
* the manifests when there are no errors. Returns the validation issues either way.
|
|
53
|
+
*/
|
|
54
|
+
export declare function registerComponentPackage(registry: ComponentRegistry, pkg: ComponentPackage): ComponentPackageIssue[];
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ComponentRegistry, isPrimitive } from '@elytracms/core/component-registry';
|
|
3
|
+
import { isValidComponentId } from '@elytracms/core/project-graph';
|
|
4
|
+
/**
|
|
5
|
+
* Component package conventions (EC-130). A distributable component package bundles a set of
|
|
6
|
+
* component *manifests* (shape; real React implementations are wired in the consuming app/export —
|
|
7
|
+
* brief §4.2 "project-level components first"). Conventions:
|
|
8
|
+
*
|
|
9
|
+
* - **Name**: npm-style (`@vendor/name` or `name`).
|
|
10
|
+
* - **Version**: semver (`major.minor.patch`).
|
|
11
|
+
* - **Vendor namespace**: a short slug (e.g. `acme`). Every component id MUST be
|
|
12
|
+
* `project.<vendor>.<ComponentName>` — installed third-party components are project-level
|
|
13
|
+
* components, scoped by vendor so they validate cleanly and never collide with platform
|
|
14
|
+
* primitives (`base.primitives.*`) or another vendor.
|
|
15
|
+
*
|
|
16
|
+
* `validateComponentPackage` checks these conventions and the manifests (via the canonical
|
|
17
|
+
* `ComponentRegistry`); `registerComponentPackage` registers a conforming package.
|
|
18
|
+
*/
|
|
19
|
+
/** Reserved id prefixes a vendor package must never use. */
|
|
20
|
+
export const RESERVED_VENDORS = ['base', 'primitives', 'project'];
|
|
21
|
+
export const componentPackageMetaSchema = z.object({
|
|
22
|
+
/** npm-style package name. */
|
|
23
|
+
name: z.string().regex(/^(@[a-z0-9][a-z0-9-]*\/)?[a-z0-9][a-z0-9-]*$/, 'must be an npm-style package name'),
|
|
24
|
+
/** Semantic version. */
|
|
25
|
+
version: z.string().regex(/^\d+\.\d+\.\d+$/, 'must be semver (major.minor.patch)'),
|
|
26
|
+
/** Vendor namespace slug — the `<vendor>` in `project.<vendor>.<Name>`. */
|
|
27
|
+
vendor: z.string().regex(/^[a-z][a-z0-9]*$/, 'must be a lowercase alphanumeric slug'),
|
|
28
|
+
description: z.string().optional(),
|
|
29
|
+
author: z.string().optional(),
|
|
30
|
+
homepage: z.string().url().optional(),
|
|
31
|
+
});
|
|
32
|
+
/** The required component-id prefix for a vendor's package. */
|
|
33
|
+
export function vendorPrefix(vendor) {
|
|
34
|
+
return `project.${vendor}.`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Validate a component package against the conventions (EC-130). Returns structured issues; never
|
|
38
|
+
* throws. A package with any `error` must not be registered.
|
|
39
|
+
*/
|
|
40
|
+
export function validateComponentPackage(pkg) {
|
|
41
|
+
const issues = [];
|
|
42
|
+
const meta = componentPackageMetaSchema.safeParse(pkg);
|
|
43
|
+
if (!meta.success) {
|
|
44
|
+
for (const i of meta.error.issues) {
|
|
45
|
+
issues.push({ code: 'meta', severity: 'error', message: `${i.path.join('.') || 'meta'}: ${i.message}` });
|
|
46
|
+
}
|
|
47
|
+
// Without valid meta we cannot derive the namespace; stop here.
|
|
48
|
+
return issues;
|
|
49
|
+
}
|
|
50
|
+
if (RESERVED_VENDORS.includes(pkg.vendor)) {
|
|
51
|
+
issues.push({ code: 'reserved', severity: 'error', ref: pkg.vendor, message: `Vendor "${pkg.vendor}" is reserved.` });
|
|
52
|
+
}
|
|
53
|
+
if (pkg.manifests.length === 0) {
|
|
54
|
+
issues.push({ code: 'empty', severity: 'warning', message: 'Component package declares no components.' });
|
|
55
|
+
}
|
|
56
|
+
const prefix = vendorPrefix(pkg.vendor);
|
|
57
|
+
const seen = new Set();
|
|
58
|
+
for (const manifest of pkg.manifests) {
|
|
59
|
+
if (isPrimitive(manifest.id)) {
|
|
60
|
+
issues.push({ code: 'reserved', severity: 'error', ref: manifest.id, message: `"${manifest.id}" uses the reserved base.primitives namespace.` });
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (!manifest.id.startsWith(prefix)) {
|
|
64
|
+
issues.push({ code: 'namespace', severity: 'error', ref: manifest.id, message: `"${manifest.id}" must be namespaced under "${prefix}".` });
|
|
65
|
+
}
|
|
66
|
+
if (!isValidComponentId(manifest.id)) {
|
|
67
|
+
issues.push({ code: 'invalid-id', severity: 'error', ref: manifest.id, message: `"${manifest.id}" is not a valid component id.` });
|
|
68
|
+
}
|
|
69
|
+
if (seen.has(manifest.id)) {
|
|
70
|
+
issues.push({ code: 'duplicate', severity: 'error', ref: manifest.id, message: `Duplicate component id "${manifest.id}".` });
|
|
71
|
+
}
|
|
72
|
+
seen.add(manifest.id);
|
|
73
|
+
}
|
|
74
|
+
return issues;
|
|
75
|
+
}
|
|
76
|
+
/** True when a package validates with no errors. */
|
|
77
|
+
export function isComponentPackageValid(pkg) {
|
|
78
|
+
return !validateComponentPackage(pkg).some((i) => i.severity === 'error');
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Register a conforming component package into a registry (EC-130). Validates first; only registers
|
|
82
|
+
* the manifests when there are no errors. Returns the validation issues either way.
|
|
83
|
+
*/
|
|
84
|
+
export function registerComponentPackage(registry, pkg) {
|
|
85
|
+
const issues = validateComponentPackage(pkg);
|
|
86
|
+
if (!issues.some((i) => i.severity === 'error')) {
|
|
87
|
+
for (const manifest of pkg.manifests)
|
|
88
|
+
registry.register(manifest);
|
|
89
|
+
}
|
|
90
|
+
return issues;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=component-package.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-package.js","sourceRoot":"","sources":["../../src/plugins/component-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAEnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAElE;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,CAAU,CAAA;AAE1E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,8BAA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
|
+
import type { BindingReference, JsonValue } from '@elytracms/core/project-graph';
|
|
3
|
+
import type { BindingResolution, RepeaterItemContext } from '@elytracms/core/data-binding';
|
|
4
|
+
/**
|
|
5
|
+
* Data-source adapters (EC-132). The product ships three built-in source kinds (rest/cms/convex).
|
|
6
|
+
* An adapter adds a *new* kind: a config schema and a `fetch` that returns a payload. Crucially the
|
|
7
|
+
* adapter only produces a payload — resolution still flows through the SAME binding model
|
|
8
|
+
* (`@elytracms/core/data-binding`'s `resolveBinding`), so REST, CMS, Convex, and plugin sources all use
|
|
9
|
+
* identical path tokens, modes, and broken-binding issues (brief §4.6 "data sources are uniform").
|
|
10
|
+
*/
|
|
11
|
+
/** The built-in source kinds an adapter must not shadow. */
|
|
12
|
+
export declare const BUILTIN_SOURCE_KINDS: readonly ["rest", "cms", "convex"];
|
|
13
|
+
/** A data-source adapter for a new source kind (EC-132). */
|
|
14
|
+
export interface DataSourceAdapter<C extends JsonValue = JsonValue> {
|
|
15
|
+
/** Namespaced source kind, e.g. `plugin.graphql`. Must contain a dot; must not shadow a built-in. */
|
|
16
|
+
kind: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
/** Validates a source's per-kind config. */
|
|
20
|
+
configSchema: z.ZodType<C>;
|
|
21
|
+
/** Fetch the payload for a configured source. The result feeds the shared payload store. */
|
|
22
|
+
fetch: (config: C, ctx?: {
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
}) => Promise<JsonValue>;
|
|
25
|
+
/** A short human description of a configured source (for the source list). */
|
|
26
|
+
describe?: (config: C) => string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Define a data-source adapter with full type-checking of its `configSchema`/`fetch`/`describe`
|
|
30
|
+
* against the config type `C`, then widen it to the registry's element type (the standard
|
|
31
|
+
* heterogeneous-registry erasure).
|
|
32
|
+
*/
|
|
33
|
+
export declare function defineDataSourceAdapter<C extends JsonValue>(adapter: DataSourceAdapter<C>): DataSourceAdapter;
|
|
34
|
+
/** A source configured against an adapter kind (parallel to the built-in `DataSource` envelope). */
|
|
35
|
+
export interface PluggableSource {
|
|
36
|
+
kind: string;
|
|
37
|
+
id: string;
|
|
38
|
+
label: string;
|
|
39
|
+
config: JsonValue;
|
|
40
|
+
}
|
|
41
|
+
/** A structured registration issue for the adapter registry. */
|
|
42
|
+
export interface DataSourceRegistryIssue {
|
|
43
|
+
code: 'reserved' | 'namespace' | 'duplicate';
|
|
44
|
+
message: string;
|
|
45
|
+
ref: string;
|
|
46
|
+
}
|
|
47
|
+
/** True when a source kind follows the namespace rules (dotted, not a built-in). */
|
|
48
|
+
export declare function isValidSourceKind(kind: string): boolean;
|
|
49
|
+
/** Registry of data-source adapters keyed by kind. */
|
|
50
|
+
export declare class DataSourceAdapterRegistry {
|
|
51
|
+
private readonly byKind;
|
|
52
|
+
readonly issues: DataSourceRegistryIssue[];
|
|
53
|
+
constructor(adapters?: Iterable<DataSourceAdapter>);
|
|
54
|
+
register(adapter: DataSourceAdapter): void;
|
|
55
|
+
has(kind: string): boolean;
|
|
56
|
+
get(kind: string): DataSourceAdapter | undefined;
|
|
57
|
+
list(): DataSourceAdapter[];
|
|
58
|
+
get size(): number;
|
|
59
|
+
/** Validate a source's config against its adapter. Returns issues; never throws. */
|
|
60
|
+
validateConfig(source: PluggableSource): {
|
|
61
|
+
code: string;
|
|
62
|
+
message: string;
|
|
63
|
+
}[];
|
|
64
|
+
/**
|
|
65
|
+
* Build a payload store by running each adapter source's `fetch` (EC-132). The output is keyed by
|
|
66
|
+
* source id — exactly the shape `resolveBinding` consumes — so plugin sources slot into the
|
|
67
|
+
* shared binding model with no special-casing. Unknown kinds and invalid configs are skipped.
|
|
68
|
+
*/
|
|
69
|
+
buildPayloads(sources: readonly PluggableSource[], ctx?: {
|
|
70
|
+
signal?: AbortSignal;
|
|
71
|
+
}): Promise<Record<string, JsonValue>>;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Resolve a binding against adapter-produced payloads using the shared binding model (EC-132).
|
|
75
|
+
* This is the proof that a new source kind is a first-class citizen: the very same `resolveBinding`
|
|
76
|
+
* that serves rest/cms/convex resolves a plugin source's payload too.
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveViaAdapters(ref: BindingReference, sources: readonly PluggableSource[], registry: DataSourceAdapterRegistry, itemContext?: RepeaterItemContext): Promise<BindingResolution>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { resolveBinding } from '@elytracms/core/data-binding';
|
|
3
|
+
/**
|
|
4
|
+
* Data-source adapters (EC-132). The product ships three built-in source kinds (rest/cms/convex).
|
|
5
|
+
* An adapter adds a *new* kind: a config schema and a `fetch` that returns a payload. Crucially the
|
|
6
|
+
* adapter only produces a payload — resolution still flows through the SAME binding model
|
|
7
|
+
* (`@elytracms/core/data-binding`'s `resolveBinding`), so REST, CMS, Convex, and plugin sources all use
|
|
8
|
+
* identical path tokens, modes, and broken-binding issues (brief §4.6 "data sources are uniform").
|
|
9
|
+
*/
|
|
10
|
+
/** The built-in source kinds an adapter must not shadow. */
|
|
11
|
+
export const BUILTIN_SOURCE_KINDS = ['rest', 'cms', 'convex'];
|
|
12
|
+
/**
|
|
13
|
+
* Define a data-source adapter with full type-checking of its `configSchema`/`fetch`/`describe`
|
|
14
|
+
* against the config type `C`, then widen it to the registry's element type (the standard
|
|
15
|
+
* heterogeneous-registry erasure).
|
|
16
|
+
*/
|
|
17
|
+
export function defineDataSourceAdapter(adapter) {
|
|
18
|
+
return adapter;
|
|
19
|
+
}
|
|
20
|
+
/** True when a source kind follows the namespace rules (dotted, not a built-in). */
|
|
21
|
+
export function isValidSourceKind(kind) {
|
|
22
|
+
if (BUILTIN_SOURCE_KINDS.includes(kind))
|
|
23
|
+
return false;
|
|
24
|
+
return /^[a-z][a-z0-9]*\.[a-z][a-z0-9]*$/i.test(kind);
|
|
25
|
+
}
|
|
26
|
+
/** Registry of data-source adapters keyed by kind. */
|
|
27
|
+
export class DataSourceAdapterRegistry {
|
|
28
|
+
byKind = new Map();
|
|
29
|
+
issues = [];
|
|
30
|
+
constructor(adapters = []) {
|
|
31
|
+
for (const adapter of adapters)
|
|
32
|
+
this.register(adapter);
|
|
33
|
+
}
|
|
34
|
+
register(adapter) {
|
|
35
|
+
if (BUILTIN_SOURCE_KINDS.includes(adapter.kind)) {
|
|
36
|
+
this.issues.push({ code: 'reserved', ref: adapter.kind, message: `Source kind "${adapter.kind}" shadows a built-in kind.` });
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (!isValidSourceKind(adapter.kind)) {
|
|
40
|
+
this.issues.push({ code: 'namespace', ref: adapter.kind, message: `Source kind "${adapter.kind}" must be namespaced (e.g. "plugin.graphql").` });
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (this.byKind.has(adapter.kind)) {
|
|
44
|
+
this.issues.push({ code: 'duplicate', ref: adapter.kind, message: `Duplicate source kind "${adapter.kind}" — keeping the first registration.` });
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.byKind.set(adapter.kind, adapter);
|
|
48
|
+
}
|
|
49
|
+
has(kind) {
|
|
50
|
+
return this.byKind.has(kind);
|
|
51
|
+
}
|
|
52
|
+
get(kind) {
|
|
53
|
+
return this.byKind.get(kind);
|
|
54
|
+
}
|
|
55
|
+
list() {
|
|
56
|
+
return [...this.byKind.values()];
|
|
57
|
+
}
|
|
58
|
+
get size() {
|
|
59
|
+
return this.byKind.size;
|
|
60
|
+
}
|
|
61
|
+
/** Validate a source's config against its adapter. Returns issues; never throws. */
|
|
62
|
+
validateConfig(source) {
|
|
63
|
+
const adapter = this.byKind.get(source.kind);
|
|
64
|
+
if (!adapter)
|
|
65
|
+
return [{ code: 'unknown-source-kind', message: `No adapter registered for source kind "${source.kind}".` }];
|
|
66
|
+
const parsed = adapter.configSchema.safeParse(source.config);
|
|
67
|
+
if (parsed.success)
|
|
68
|
+
return [];
|
|
69
|
+
return parsed.error.issues.map((i) => ({ code: 'invalid-config', message: `${i.path.join('.') || 'config'}: ${i.message}` }));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Build a payload store by running each adapter source's `fetch` (EC-132). The output is keyed by
|
|
73
|
+
* source id — exactly the shape `resolveBinding` consumes — so plugin sources slot into the
|
|
74
|
+
* shared binding model with no special-casing. Unknown kinds and invalid configs are skipped.
|
|
75
|
+
*/
|
|
76
|
+
async buildPayloads(sources, ctx) {
|
|
77
|
+
const payloads = {};
|
|
78
|
+
for (const source of sources) {
|
|
79
|
+
const adapter = this.byKind.get(source.kind);
|
|
80
|
+
if (!adapter)
|
|
81
|
+
continue;
|
|
82
|
+
const parsed = adapter.configSchema.safeParse(source.config);
|
|
83
|
+
if (!parsed.success)
|
|
84
|
+
continue;
|
|
85
|
+
payloads[source.id] = await adapter.fetch(parsed.data, ctx);
|
|
86
|
+
}
|
|
87
|
+
return payloads;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Resolve a binding against adapter-produced payloads using the shared binding model (EC-132).
|
|
92
|
+
* This is the proof that a new source kind is a first-class citizen: the very same `resolveBinding`
|
|
93
|
+
* that serves rest/cms/convex resolves a plugin source's payload too.
|
|
94
|
+
*/
|
|
95
|
+
export async function resolveViaAdapters(ref, sources, registry, itemContext) {
|
|
96
|
+
const payloads = await registry.buildPayloads(sources);
|
|
97
|
+
return resolveBinding(ref, { payloads }, itemContext);
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=data-sources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-sources.js","sourceRoot":"","sources":["../../src/plugins/data-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAG7D;;;;;;GAMG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,oBAAoB,GAAG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C,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;IAC/H,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CACjB,OAAmC,EACnC,GAA8B;QAE9B,MAAM,QAAQ,GAA8B,EAAE,CAAA;QAC9C,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;YAC5C,IAAI,CAAC,OAAO;gBAAE,SAAQ;YACtB,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;YAC5D,IAAI,CAAC,MAAM,CAAC,OAAO;gBAAE,SAAQ;YAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAC7D,CAAC;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,GAAqB,EACrB,OAAmC,EACnC,QAAmC,EACnC,WAAiC;IAEjC,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;IACtD,OAAO,cAAc,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,WAAW,CAAC,CAAA;AACvD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { JsonValue } from '@elytracms/core/project-graph';
|
|
2
|
+
import type { FieldTypePlugin } from './field-types';
|
|
3
|
+
import type { DataSourceAdapter } from './data-sources';
|
|
4
|
+
import type { ComponentPackage } from './component-package';
|
|
5
|
+
import type { ProjectTemplate } from './templates';
|
|
6
|
+
import type { Plugin } from './plugin';
|
|
7
|
+
import { ExtensionRegistry } from './marketplace';
|
|
8
|
+
/** A hex color field type. */
|
|
9
|
+
export declare const colorFieldType: FieldTypePlugin;
|
|
10
|
+
/** An integer star-rating (0–5) field type. */
|
|
11
|
+
export declare const ratingFieldType: FieldTypePlugin;
|
|
12
|
+
/** A URL-safe slug field type, with extra format validation. */
|
|
13
|
+
export declare const slugFieldType: FieldTypePlugin;
|
|
14
|
+
/** A static inline-JSON source — the simplest possible adapter, fully deterministic. */
|
|
15
|
+
export declare const staticDataSourceAdapter: DataSourceAdapter;
|
|
16
|
+
/** A transport function a GraphQL adapter calls (injected so the adapter stays testable). */
|
|
17
|
+
export type GraphqlTransport = (req: {
|
|
18
|
+
endpoint: string;
|
|
19
|
+
query: string;
|
|
20
|
+
variables: Record<string, JsonValue>;
|
|
21
|
+
}) => Promise<JsonValue>;
|
|
22
|
+
/**
|
|
23
|
+
* Build a GraphQL data-source adapter (example, EC-132). The network transport is injected, so the
|
|
24
|
+
* adapter is deterministic in tests and provider-neutral in production. Its payload resolves
|
|
25
|
+
* through the shared binding model like any built-in source.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createGraphqlAdapter(transport: GraphqlTransport): DataSourceAdapter;
|
|
28
|
+
/** A conforming component package under the `acme` vendor namespace (EC-130). */
|
|
29
|
+
export declare const acmeBlocksPackage: ComponentPackage;
|
|
30
|
+
/** A private component package (used by the private-registry example). */
|
|
31
|
+
export declare const labsInternalPackage: ComponentPackage;
|
|
32
|
+
/** A community marketing template wrapping the Aurora starter kit. */
|
|
33
|
+
export declare const auroraTemplate: ProjectTemplate;
|
|
34
|
+
/** A community docs template wrapping the Northwind starter kit. */
|
|
35
|
+
export declare const northwindTemplate: ProjectTemplate;
|
|
36
|
+
/** A sampler plugin touching every extensibility surface. */
|
|
37
|
+
export declare const acmeSuitePlugin: Plugin;
|
|
38
|
+
/** A single-surface plugin: just the color field type. */
|
|
39
|
+
export declare const colorFieldPlugin: Plugin;
|
|
40
|
+
/** A private plugin available only behind the private registry token. */
|
|
41
|
+
export declare const labsInternalPlugin: Plugin;
|
|
42
|
+
/** The public marketplace catalogue. */
|
|
43
|
+
export declare const publicMarketplace: ExtensionRegistry;
|
|
44
|
+
/** The token granting access to the private registry. */
|
|
45
|
+
export declare const PRIVATE_REGISTRY_TOKEN = "acme-internal-token";
|
|
46
|
+
/** A private registry, gated behind {@link PRIVATE_REGISTRY_TOKEN}. */
|
|
47
|
+
export declare const privateMarketplace: ExtensionRegistry;
|