@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,250 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Provider-neutral field type catalogue (brief §7.4). Relation and asset are
|
|
4
|
+
* first-class field types but carry extra config (target collection, cardinality),
|
|
5
|
+
* so they're modelled as discriminated variants below rather than bare strings.
|
|
6
|
+
*/
|
|
7
|
+
export const fieldTypeSchema = z.enum([
|
|
8
|
+
'text',
|
|
9
|
+
'number',
|
|
10
|
+
'boolean',
|
|
11
|
+
'date',
|
|
12
|
+
'select',
|
|
13
|
+
'richText',
|
|
14
|
+
'relation',
|
|
15
|
+
'asset',
|
|
16
|
+
// Composition field (EC-186, AD-12): the value is a constrained tree of
|
|
17
|
+
// registry components (a canvas), not a scalar. The vocabulary is code.
|
|
18
|
+
'blocks',
|
|
19
|
+
// Object / repeater field (EC-253): a nested group of field-defs — a single
|
|
20
|
+
// object (`cardinality: 'one'`) or an ordered array of them (`'many'`). The
|
|
21
|
+
// missing array-of-objects primitive real sites lean on (menus, forms, galleries).
|
|
22
|
+
'object',
|
|
23
|
+
]);
|
|
24
|
+
/** How many related documents a relation field points at. */
|
|
25
|
+
export const cardinalitySchema = z.enum(['one', 'many']);
|
|
26
|
+
/**
|
|
27
|
+
* Where a field-def is valid (EC-190 "props as fields"): a CMS document field, a
|
|
28
|
+
* component prop, or both. The same field-def vocabulary drives documents AND
|
|
29
|
+
* component props through one inspector/form engine — `context` only gates which
|
|
30
|
+
* document-only attributes apply, never the stored value or emitted JSON Schema.
|
|
31
|
+
*/
|
|
32
|
+
export const fieldContextSchema = z.enum(['document', 'prop', 'both']);
|
|
33
|
+
/**
|
|
34
|
+
* Preferred input control when a field type maps to several presentation forms
|
|
35
|
+
* (e.g. a `text` field rendered as a single input, a textarea, a colour picker, or
|
|
36
|
+
* a JSON editor). Presentation only — never affects validation or stored values.
|
|
37
|
+
*/
|
|
38
|
+
export const fieldControlSchema = z.enum(['input', 'textarea', 'color', 'json']);
|
|
39
|
+
/**
|
|
40
|
+
* Form/authoring metadata for a field (brief §7.4: groups/tabs/labels/order).
|
|
41
|
+
* Pure presentation hints — never affects validation or stored values.
|
|
42
|
+
*/
|
|
43
|
+
export const fieldFormMetaSchema = z.object({
|
|
44
|
+
/** Human label shown in the editor; falls back to the field name when omitted. */
|
|
45
|
+
label: z.string().optional(),
|
|
46
|
+
/** Helper/description text shown under the field. */
|
|
47
|
+
description: z.string().optional(),
|
|
48
|
+
/** Placeholder for text-like inputs. */
|
|
49
|
+
placeholder: z.string().optional(),
|
|
50
|
+
/** Grouping section the field belongs to (a fieldset). */
|
|
51
|
+
group: z.string().optional(),
|
|
52
|
+
/** Tab the field belongs to (for tabbed editors). */
|
|
53
|
+
tab: z.string().optional(),
|
|
54
|
+
/** Sort order within its group/tab; lower comes first. */
|
|
55
|
+
order: z.number().optional(),
|
|
56
|
+
/** When true the editor renders the field read-only. */
|
|
57
|
+
readOnly: z.boolean().optional(),
|
|
58
|
+
/** When true the editor hides the field (still validated/stored). */
|
|
59
|
+
hidden: z.boolean().optional(),
|
|
60
|
+
/** Preferred input control when the field type maps to several (EC-190). */
|
|
61
|
+
control: fieldControlSchema.optional(),
|
|
62
|
+
/**
|
|
63
|
+
* When true the editor edits this value inline on the canvas (EC-158) rather
|
|
64
|
+
* than as a form row — used for text-like component props rendered as visible
|
|
65
|
+
* content. The single home for inline-editing across documents and props.
|
|
66
|
+
*/
|
|
67
|
+
inlineEditable: z.boolean().optional(),
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* Declarative validation metadata for a field (brief §7.4). These constraints
|
|
71
|
+
* are provider-neutral and drive both runtime validation (`validateDocument`)
|
|
72
|
+
* and JSON Schema output. They never throw — violations surface as structured
|
|
73
|
+
* issues.
|
|
74
|
+
*/
|
|
75
|
+
export const fieldValidationSchema = z.object({
|
|
76
|
+
/** When true a value must be present (and non-empty for strings/arrays). */
|
|
77
|
+
required: z.boolean().optional(),
|
|
78
|
+
/** Minimum string length / array length / numeric value (type-dependent). */
|
|
79
|
+
min: z.number().optional(),
|
|
80
|
+
/** Maximum string length / array length / numeric value (type-dependent). */
|
|
81
|
+
max: z.number().optional(),
|
|
82
|
+
/** RegExp source string a text value must match. */
|
|
83
|
+
pattern: z.string().optional(),
|
|
84
|
+
/** Value must be unique across the collection's documents. */
|
|
85
|
+
unique: z.boolean().optional(),
|
|
86
|
+
});
|
|
87
|
+
/** A single allowed option for a `select` field. */
|
|
88
|
+
export const selectOptionSchema = z.object({
|
|
89
|
+
value: z.string(),
|
|
90
|
+
label: z.string().optional(),
|
|
91
|
+
});
|
|
92
|
+
const baseFieldShape = {
|
|
93
|
+
/** Stable field name (the key in a document's values; survives label changes). */
|
|
94
|
+
name: z.string().min(1),
|
|
95
|
+
/** When true the field stores a separate value per locale (EC-018). */
|
|
96
|
+
localized: z.boolean().optional(),
|
|
97
|
+
/**
|
|
98
|
+
* Marks the field as filterable/sortable for the closed-form list accessors
|
|
99
|
+
* (EC-143, vision AD-3). `listDocuments` filters and sorts are permitted only
|
|
100
|
+
* on declared fields — this keeps backend indexes honest and stops filter
|
|
101
|
+
* vocabulary creep. Never affects stored values or validation.
|
|
102
|
+
*/
|
|
103
|
+
filterable: z.boolean().optional(),
|
|
104
|
+
/**
|
|
105
|
+
* Where this field-def is valid (EC-190): a CMS document field, a component
|
|
106
|
+
* prop, or both. Defaults to `document` when omitted (back-compat — every
|
|
107
|
+
* existing collection field-def stays a document field). Document-only
|
|
108
|
+
* attributes (`filterable`, `validation.unique`) declared on a `context:'prop'`
|
|
109
|
+
* field are a structured issue (`assertPropFieldDef`), never silent.
|
|
110
|
+
*/
|
|
111
|
+
context: fieldContextSchema.optional(),
|
|
112
|
+
/**
|
|
113
|
+
* Default value applied when none is set (EC-190). On a component prop this is
|
|
114
|
+
* the renderer's static fallback (EC-015); on a document field it seeds new
|
|
115
|
+
* documents — the per-field starter-content mechanism (no template entity
|
|
116
|
+
* needed). Never affects whether a value is *stored*, only what fills a gap.
|
|
117
|
+
*/
|
|
118
|
+
default: z.unknown().optional(),
|
|
119
|
+
form: fieldFormMetaSchema.optional(),
|
|
120
|
+
validation: fieldValidationSchema.optional(),
|
|
121
|
+
};
|
|
122
|
+
/** A schema of just the shared base attributes — the source for {@link BaseFieldDef}. */
|
|
123
|
+
const baseFieldObjectSchema = z.object(baseFieldShape);
|
|
124
|
+
/**
|
|
125
|
+
* The Zod schema mirroring {@link FieldDef}. The `object` member's `fields` is
|
|
126
|
+
* wrapped in `z.lazy` so the schema can reference itself, while the discriminator
|
|
127
|
+
* stays a static `z.literal('object')` so `discriminatedUnion` can still read it
|
|
128
|
+
* at construction time. The explicit `z.ZodType<FieldDef>` annotation breaks the
|
|
129
|
+
* self-referential inference cycle; the cast reconciles the parsed output (where
|
|
130
|
+
* defaulted `cardinality` is always present) with the union's optional-input type.
|
|
131
|
+
*/
|
|
132
|
+
export const fieldDefSchema = z.discriminatedUnion('type', [
|
|
133
|
+
z.object({ ...baseFieldShape, type: z.literal('text') }),
|
|
134
|
+
z.object({ ...baseFieldShape, type: z.literal('number') }),
|
|
135
|
+
z.object({ ...baseFieldShape, type: z.literal('boolean') }),
|
|
136
|
+
z.object({ ...baseFieldShape, type: z.literal('date') }),
|
|
137
|
+
z.object({
|
|
138
|
+
...baseFieldShape,
|
|
139
|
+
type: z.literal('select'),
|
|
140
|
+
options: z.array(selectOptionSchema).min(1),
|
|
141
|
+
/** Allow selecting multiple options (stored as an array). */
|
|
142
|
+
multiple: z.boolean().optional(),
|
|
143
|
+
}),
|
|
144
|
+
z.object({
|
|
145
|
+
...baseFieldShape,
|
|
146
|
+
type: z.literal('richText'),
|
|
147
|
+
/**
|
|
148
|
+
* Embeddable composition vocabulary (EC-189, AD-12): component ids editors
|
|
149
|
+
* may embed as `componentEmbed` blocks inside the prose — the SAME `allow`
|
|
150
|
+
* mechanism a `blocks` field uses, applied to rich-text embeds. Each embed
|
|
151
|
+
* holds a single `ComponentNode` validated against this list by
|
|
152
|
+
* `validateCompositionValue` (`@elytracms/core/project-graph`). Omit to allow any
|
|
153
|
+
* registered component; deeper nesting is governed by each component's slot
|
|
154
|
+
* `allow`. The leash is code.
|
|
155
|
+
*/
|
|
156
|
+
allow: z.array(z.string().min(1)).optional(),
|
|
157
|
+
}),
|
|
158
|
+
z.object({
|
|
159
|
+
...baseFieldShape,
|
|
160
|
+
type: z.literal('relation'),
|
|
161
|
+
/** Id of the collection this relation points at. */
|
|
162
|
+
target: z.string().min(1),
|
|
163
|
+
cardinality: cardinalitySchema,
|
|
164
|
+
/**
|
|
165
|
+
* Delivery-shape population declaration (EC-142). Defaults to populated:
|
|
166
|
+
* delivery resolution expands the relation to a depth-1 populated reference.
|
|
167
|
+
* Set to `false` to opt out and receive reference stubs
|
|
168
|
+
* (`{ id, collection }`) instead. Never affects stored values.
|
|
169
|
+
*/
|
|
170
|
+
populate: z.boolean().optional(),
|
|
171
|
+
/**
|
|
172
|
+
* Strict referential integrity (EC-173). References are **weak by
|
|
173
|
+
* default**: unpublishing/deleting a referenced target is allowed and the
|
|
174
|
+
* reference degrades to an explicit validation issue plus a delivery
|
|
175
|
+
* fallback. `strict: true` is the deliberate opt-in that inverts this for
|
|
176
|
+
* one field: while any document references a target through this field,
|
|
177
|
+
* deleting the target is blocked — and while a *published* document does,
|
|
178
|
+
* unpublishing it is blocked too (enforced in `@elytracms/core/operations`).
|
|
179
|
+
*/
|
|
180
|
+
strict: z.boolean().optional(),
|
|
181
|
+
}),
|
|
182
|
+
z.object({
|
|
183
|
+
...baseFieldShape,
|
|
184
|
+
type: z.literal('asset'),
|
|
185
|
+
cardinality: cardinalitySchema.default('one'),
|
|
186
|
+
/** Restrict to specific asset kinds (e.g. 'image', 'file'); empty = any. */
|
|
187
|
+
accept: z.array(z.string()).optional(),
|
|
188
|
+
}),
|
|
189
|
+
z.object({
|
|
190
|
+
...baseFieldShape,
|
|
191
|
+
type: z.literal('blocks'),
|
|
192
|
+
/**
|
|
193
|
+
* The composition vocabulary (EC-186, AD-12): allowed component ids editors
|
|
194
|
+
* may place as TOP-LEVEL blocks. Omit to allow any registered component;
|
|
195
|
+
* deeper nesting is governed by each component's slot `allow`. The value
|
|
196
|
+
* (a `ComponentNode` tree) is validated against this by
|
|
197
|
+
* `validateCompositionValue` (`@elytracms/core/project-graph`). The leash is code.
|
|
198
|
+
*/
|
|
199
|
+
allow: z.array(z.string().min(1)).optional(),
|
|
200
|
+
/** `one` = a single root component; `many` = an ordered list (default). */
|
|
201
|
+
cardinality: cardinalitySchema.default('many'),
|
|
202
|
+
}),
|
|
203
|
+
z.object({
|
|
204
|
+
...baseFieldShape,
|
|
205
|
+
type: z.literal('object'),
|
|
206
|
+
/**
|
|
207
|
+
* The nested field-defs. Recursive via `z.lazy` (a subfield may itself be an
|
|
208
|
+
* `object`), so Konditorei's nested menu, the form builder's groups→fields,
|
|
209
|
+
* and multi-entry settings model faithfully. Subfields carry their own `name`
|
|
210
|
+
* (they are object keys), so this is the full `FieldDef`, not the prop shape.
|
|
211
|
+
*/
|
|
212
|
+
fields: z.lazy(() => z.array(fieldDefSchema)),
|
|
213
|
+
/** `one` = a single nested object; `many` = an ordered array (the repeater). */
|
|
214
|
+
cardinality: cardinalitySchema.default('one'),
|
|
215
|
+
}),
|
|
216
|
+
]);
|
|
217
|
+
/** Narrowing helpers. */
|
|
218
|
+
export function isRelationField(field) {
|
|
219
|
+
return field.type === 'relation';
|
|
220
|
+
}
|
|
221
|
+
export function isAssetField(field) {
|
|
222
|
+
return field.type === 'asset';
|
|
223
|
+
}
|
|
224
|
+
export function isSelectField(field) {
|
|
225
|
+
return field.type === 'select';
|
|
226
|
+
}
|
|
227
|
+
export function isBlocksField(field) {
|
|
228
|
+
return field.type === 'blocks';
|
|
229
|
+
}
|
|
230
|
+
export function isRichTextField(field) {
|
|
231
|
+
return field.type === 'richText';
|
|
232
|
+
}
|
|
233
|
+
export function isObjectField(field) {
|
|
234
|
+
return field.type === 'object';
|
|
235
|
+
}
|
|
236
|
+
/** Resolve a field-def's context, defaulting to `document` (EC-190). */
|
|
237
|
+
export function fieldContext(field) {
|
|
238
|
+
return field.context ?? 'document';
|
|
239
|
+
}
|
|
240
|
+
/** True if the field-def may be used as a component prop (EC-190). */
|
|
241
|
+
export function isPropContext(field) {
|
|
242
|
+
const c = fieldContext(field);
|
|
243
|
+
return c === 'prop' || c === 'both';
|
|
244
|
+
}
|
|
245
|
+
/** True if the field-def may be used as a CMS document field (EC-190). */
|
|
246
|
+
export function isDocumentContext(field) {
|
|
247
|
+
const c = fieldContext(field);
|
|
248
|
+
return c === 'document' || c === 'both';
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../src/cms-core/fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,MAAM;IACN,QAAQ;IACR,SAAS;IACT,MAAM;IACN,QAAQ;IACR,UAAU;IACV,UAAU;IACV,OAAO;IACP,wEAAwE;IACxE,wEAAwE;IACxE,QAAQ;IACR,4EAA4E;IAC5E,4EAA4E;IAC5E,mFAAmF;IACnF,QAAQ;CACT,CAAC,CAAA;AAGF,6DAA6D;AAC7D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;AAGxD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAGtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;AAGhF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,kFAAkF;IAClF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,qDAAqD;IACrD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,wCAAwC;IACxC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,0DAA0D;IAC1D,KA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E,MAAM,UAAU,aAAa,CAAC,KAAe;IAC3C,MAAM,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;IAC7B,OAAO,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,MAAM,CAAA;AACrC,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,iBAAiB,CAAC,KAAe;IAC/C,MAAM,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;IAC7B,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,MAAM,CAAA;AACzC,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { CollectionDef } from './collections';
|
|
2
|
+
import type { CmsDocument } from './documents';
|
|
3
|
+
import type { LocaleConfig } from './localization';
|
|
4
|
+
import type { RedirectRecord, RouteRecord } from './routes';
|
|
5
|
+
/**
|
|
6
|
+
* Sample CMS model used across tests and as a worked example (mirrors the role of
|
|
7
|
+
* `validSampleGraph` in `@elytracms/core/project-graph`). Provider-neutral, deterministic.
|
|
8
|
+
*/
|
|
9
|
+
export declare const sampleLocaleConfig: LocaleConfig;
|
|
10
|
+
/** An asset collection (EC-017). */
|
|
11
|
+
export declare const assetCollection: CollectionDef;
|
|
12
|
+
/** An author collection used as a relation target. */
|
|
13
|
+
export declare const authorCollection: CollectionDef;
|
|
14
|
+
/** A localized blog-post collection exercising every field type. */
|
|
15
|
+
export declare const postCollection: CollectionDef;
|
|
16
|
+
/**
|
|
17
|
+
* EC-187: the `page` collection — a document collection whose body IS a
|
|
18
|
+
* composition (`blocks`) field, surfaced on its own "Canvas" fieldset tab
|
|
19
|
+
* (EC-188). This is the config-owned model a routed page document is authored
|
|
20
|
+
* against: `name` (title), the `body` canvas, structured SEO, and a `layoutId`
|
|
21
|
+
* selecting which graph layout wraps the rendered composition at delivery.
|
|
22
|
+
*
|
|
23
|
+
* ADDITIVE + INERT (EC-187 slices 1–3): the collection exists in config so the
|
|
24
|
+
* studio can author page documents and the reference index walks their `body`
|
|
25
|
+
* tree, but NOTHING routes to it yet — the OLD `graph.pages` delivery path stays
|
|
26
|
+
* canonical until the breaking cutover wires routes/host/seed to `page`.
|
|
27
|
+
*
|
|
28
|
+
* The `body` field mirrors the post `content` blocks field EXACTLY (same `allow`
|
|
29
|
+
* code-leashed vocabulary, same `cardinality: 'many'`) so both composition
|
|
30
|
+
* surfaces deliver and index through one identical code path.
|
|
31
|
+
*/
|
|
32
|
+
export declare const pageCollection: CollectionDef;
|
|
33
|
+
export declare const sampleCollections: CollectionDef[];
|
|
34
|
+
/**
|
|
35
|
+
* The canonical EC-143 `filterable` declarations for the sample model — the
|
|
36
|
+
* single set the seeded schema (`@elytracms/core/persistence`), the accessor
|
|
37
|
+
* fixtures (`@elytracms/core/content`), and the studio sessions share, so the
|
|
38
|
+
* filter/sort pickers and the delivery engine agree on exactly one
|
|
39
|
+
* declaration set (EC-169 fix-pack).
|
|
40
|
+
*
|
|
41
|
+
* Deliberately *not* filterable: `title` (tests prove that filtering a
|
|
42
|
+
* real-but-undeclared field fails as a structured error) and the whole
|
|
43
|
+
* `asset` collection (a collection with no filterable fields).
|
|
44
|
+
*/
|
|
45
|
+
export declare const sampleFilterableFields: Record<string, readonly string[]>;
|
|
46
|
+
/**
|
|
47
|
+
* `sampleCollections` with the canonical `filterable` declarations applied —
|
|
48
|
+
* same ids, same field shapes. `sampleCollections` itself stays undeclared on
|
|
49
|
+
* purpose (fixtures proving "no declarations → nothing offered" rely on it);
|
|
50
|
+
* schema-bearing surfaces (the persistence seed, accessor fixtures) use this
|
|
51
|
+
* variant.
|
|
52
|
+
*/
|
|
53
|
+
export declare const sampleFilterableCollections: CollectionDef[];
|
|
54
|
+
export declare const coverAsset: CmsDocument;
|
|
55
|
+
/**
|
|
56
|
+
* The CMS counterpart of the seeded asset-library record (`@elytracms/core/persistence`
|
|
57
|
+
* `SEED_ASSET`, id `asset_cover` — the EC-152 library). Sharing the library's
|
|
58
|
+
* id means picking that real library asset validates clean against the asset
|
|
59
|
+
* collection (EC-168/EC-172 fix-pack: the seeded post's `cover` previously had
|
|
60
|
+
* no library-matching asset document, so a re-pick failed validation).
|
|
61
|
+
* `coverAsset` above ('asset-cover') intentionally has NO library record — it
|
|
62
|
+
* remains the "missing asset record" delivery demo.
|
|
63
|
+
*/
|
|
64
|
+
export declare const libraryCoverAsset: CmsDocument;
|
|
65
|
+
export declare const authorAda: CmsDocument;
|
|
66
|
+
/** A valid, localized post that resolves all of its relations/assets. */
|
|
67
|
+
export declare const validPost: CmsDocument;
|
|
68
|
+
/** A post localized only in the default locale (exercises fallback, EC-018). */
|
|
69
|
+
export declare const partiallyLocalizedPost: CmsDocument;
|
|
70
|
+
/**
|
|
71
|
+
* The home page as a `page`-collection document (EC-187): `name`, a static
|
|
72
|
+
* `body` composition (no bindings — v1 static props), a `layoutId` selecting the
|
|
73
|
+
* graph layout, and flat `seo*` fields. This is what a routed page resolves to;
|
|
74
|
+
* the catch-all renders `body` into `layoutId` via `renderCompositionInLayout`.
|
|
75
|
+
*/
|
|
76
|
+
export declare const samplePageHome: CmsDocument;
|
|
77
|
+
export declare const samplePageDocuments: CmsDocument[];
|
|
78
|
+
export declare const sampleDocuments: CmsDocument[];
|
|
79
|
+
/**
|
|
80
|
+
* The sample documents that are PUBLISHED (EC-224), as an explicit
|
|
81
|
+
* version-POINTER set — computed from each doc's identity, never a flat `state`
|
|
82
|
+
* flag, so it survives the field's removal (B-3c-4). Seeds pin exactly these;
|
|
83
|
+
* the playground/preview treat exactly these as live. (Every current sample doc
|
|
84
|
+
* is published; a future draft sample would be omitted here.)
|
|
85
|
+
*/
|
|
86
|
+
export declare const samplePublishedKeys: readonly string[];
|
|
87
|
+
export declare const sampleRoutes: RouteRecord[];
|
|
88
|
+
export declare const sampleRedirects: RedirectRecord[];
|
|
89
|
+
/** Two routes that match the exact same concrete URLs (EC-020 conflict). */
|
|
90
|
+
export declare const conflictingRoutes: RouteRecord[];
|
|
91
|
+
/** A redirect loop (EC-020). */
|
|
92
|
+
export declare const loopingRedirects: RedirectRecord[];
|