@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,87 @@
|
|
|
1
|
+
import { defineComponent } from '@elytracms/core/component-registry';
|
|
2
|
+
import { sampleCollections, sampleLocaleConfig } from '@elytracms/core/cms-core';
|
|
3
|
+
import { sampleSources } from '@elytracms/core/data-binding';
|
|
4
|
+
import { emitTokensCss } from '@elytracms/core/design-tokens';
|
|
5
|
+
import { validSampleGraph } from '@elytracms/core/project-graph';
|
|
6
|
+
/**
|
|
7
|
+
* A deterministic reference export input (EC-113), assembled from the canonical sample fixtures.
|
|
8
|
+
* Used to test generation determinism and as a worked example — NOT a production seed.
|
|
9
|
+
*
|
|
10
|
+
* The component manifests are defined inline (rather than imported from the React renderer) so
|
|
11
|
+
* this logic package stays free of UI/React deps; they mirror the base primitives the sample
|
|
12
|
+
* graph uses, with prop/slot shapes the graph validator checks against. Props are field-defs
|
|
13
|
+
* (EC-190 "props as fields"): the record key is the prop name; each value is a `FieldDef` minus
|
|
14
|
+
* `name`, with `context: 'prop'`.
|
|
15
|
+
*/
|
|
16
|
+
/** The base primitives the reference graph (validSampleGraph) actually uses. */
|
|
17
|
+
export const referenceManifests = [
|
|
18
|
+
defineComponent({
|
|
19
|
+
id: 'base.primitives.Container',
|
|
20
|
+
namespace: 'base.primitives',
|
|
21
|
+
title: 'Container',
|
|
22
|
+
props: {},
|
|
23
|
+
slots: [{ name: 'children' }, { name: 'outlet' }],
|
|
24
|
+
}),
|
|
25
|
+
defineComponent({
|
|
26
|
+
id: 'base.primitives.Stack',
|
|
27
|
+
namespace: 'base.primitives',
|
|
28
|
+
title: 'Stack',
|
|
29
|
+
props: { gap: { type: 'number', context: 'prop', default: 4, form: { label: 'Gap' } } },
|
|
30
|
+
slots: [{ name: 'children' }],
|
|
31
|
+
}),
|
|
32
|
+
defineComponent({
|
|
33
|
+
id: 'base.primitives.Heading',
|
|
34
|
+
namespace: 'base.primitives',
|
|
35
|
+
title: 'Heading',
|
|
36
|
+
props: {
|
|
37
|
+
text: { type: 'text', context: 'prop', default: '', form: { label: 'Text' } },
|
|
38
|
+
level: { type: 'number', context: 'prop', default: 2, form: { label: 'Level' } },
|
|
39
|
+
},
|
|
40
|
+
slots: [],
|
|
41
|
+
}),
|
|
42
|
+
defineComponent({
|
|
43
|
+
id: 'base.primitives.Text',
|
|
44
|
+
namespace: 'base.primitives',
|
|
45
|
+
title: 'Text',
|
|
46
|
+
props: { value: { type: 'text', context: 'prop', default: '', form: { label: 'Text' } } },
|
|
47
|
+
slots: [],
|
|
48
|
+
}),
|
|
49
|
+
defineComponent({
|
|
50
|
+
id: 'base.primitives.Repeater',
|
|
51
|
+
namespace: 'base.primitives',
|
|
52
|
+
title: 'Repeater',
|
|
53
|
+
// EC-190 DD7: the iterated `items` value (an array) has no static field-def type;
|
|
54
|
+
// it rides node.props undeclared. No editable static prop is exposed — keep `iterate`.
|
|
55
|
+
props: {},
|
|
56
|
+
slots: [{ name: 'item', required: true }],
|
|
57
|
+
iterate: { itemsProp: 'items', itemSlot: 'item' },
|
|
58
|
+
}),
|
|
59
|
+
];
|
|
60
|
+
/**
|
|
61
|
+
* Routes that all bind to a renderable document (EC-187): `/` → the `page/home`
|
|
62
|
+
* document (composition), `/blog/:slug` → a `post` document by slug. So the
|
|
63
|
+
* export validates and every route renders. `r-post` carries a dynamic `:slug`
|
|
64
|
+
* param to exercise param routing.
|
|
65
|
+
*/
|
|
66
|
+
export const referenceRoutes = [
|
|
67
|
+
{ id: 'r-home', pattern: '/', locale: 'en', document: { collection: 'page', id: 'home' } },
|
|
68
|
+
{ id: 'r-home-de', pattern: '/', locale: 'de', document: { collection: 'page', id: 'home' } },
|
|
69
|
+
{ id: 'r-post', pattern: '/blog/:slug', locale: 'en', document: { collection: 'post', id: ':slug' } },
|
|
70
|
+
];
|
|
71
|
+
export const referenceRedirects = [
|
|
72
|
+
{ id: 'rd-old-home', from: '/home', to: '/', permanent: true },
|
|
73
|
+
];
|
|
74
|
+
/** The full reference export input — deterministic. */
|
|
75
|
+
export const referenceInput = {
|
|
76
|
+
projectName: 'Sample Project',
|
|
77
|
+
slug: 'sample-project',
|
|
78
|
+
graph: validSampleGraph,
|
|
79
|
+
routes: referenceRoutes,
|
|
80
|
+
redirects: referenceRedirects,
|
|
81
|
+
collections: [...sampleCollections],
|
|
82
|
+
manifests: referenceManifests,
|
|
83
|
+
sources: sampleSources,
|
|
84
|
+
localeConfig: sampleLocaleConfig,
|
|
85
|
+
tokensCss: emitTokensCss(),
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=fixtures.js.map
|
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C7F,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;CACtG,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAqB;IAClD,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE;CAC/D,CAAA;AAED,uDAAuD;AACvD,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,WAAW,EAAE,gBAAgB;IAC7B,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE,eAAe;IACvB,SAAS,EAAE,kBAAkB;IAC7B,WAAW,EAAE,CAAC,GAAG,iBAAiB,CAAC;IACnC,SAAS,EAAE,kBAAkB;IAC7B,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,kBAAkB;IAChC,SAAS,EAAE,aAAa,EAAE;CAC3B,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExportInput, GeneratedFile } from './core';
|
|
2
|
+
/**
|
|
3
|
+
* Generate the full standalone Next.js App Router app for a project (EC-101–109, eject shape
|
|
4
|
+
* per EC-149). Deterministic: the same input always yields the same sorted file set. No
|
|
5
|
+
* component stubs are generated — project components are imported from the host repo.
|
|
6
|
+
*/
|
|
7
|
+
export declare function generateExport(input: ExportInput): GeneratedFile[];
|
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
import { namespaceOf } from '@elytracms/core/component-registry';
|
|
2
|
+
import { serializeProjectGraph } from '@elytracms/core/project-graph';
|
|
3
|
+
import { DEFAULT_COMPONENTS_IMPORT, generatedBanner, sortFiles, stableJson } from './core';
|
|
4
|
+
/** Canonical graph JSON (validated by the serializer), pretty-printed for review. */
|
|
5
|
+
function graphJson(graph) {
|
|
6
|
+
return JSON.stringify(JSON.parse(serializeProjectGraph(graph)), null, 2);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Next.js App Router code generation (EC-101–109, ejected shape per EC-149). Each function emits
|
|
10
|
+
* one readable file. The output is a standalone app that depends only on the published
|
|
11
|
+
* `@elytracms/*` runtime packages (never builder-only code), reads its content from the JSON
|
|
12
|
+
* snapshot generated alongside it (zero runtime dependency on the builder backend), and renders
|
|
13
|
+
* the canonical graph through the runtime renderer. Project components are NOT generated — they
|
|
14
|
+
* are real code in the host repo (vision AD-2) that the generated registry imports.
|
|
15
|
+
*/
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Content data (EC-101/104) — the canonical model serialized as JSON the app reads.
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
function contentFiles(input) {
|
|
20
|
+
return [
|
|
21
|
+
{ path: 'content/graph.json', contents: graphJson(input.graph) },
|
|
22
|
+
{ path: 'content/routes.json', contents: stableJson(input.routes) },
|
|
23
|
+
{ path: 'content/redirects.json', contents: stableJson(input.redirects) },
|
|
24
|
+
{ path: 'content/collections.json', contents: stableJson(input.collections) },
|
|
25
|
+
{ path: 'content/sources.json', contents: stableJson(input.sources) },
|
|
26
|
+
{ path: 'content/locales.json', contents: stableJson(input.localeConfig) },
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
// Registry (EC-102/149) — wire component ids → implementations, namespace-correct.
|
|
31
|
+
// Project components are real code in the host repo (vision AD-2): the registry IMPORTS them
|
|
32
|
+
// from the configured components module instead of generating stubs.
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
function registryFile(input) {
|
|
35
|
+
const projectIds = input.manifests
|
|
36
|
+
.map((m) => m.id)
|
|
37
|
+
.filter((id) => namespaceOf(id) !== 'base.primitives')
|
|
38
|
+
.sort();
|
|
39
|
+
const componentsImport = input.componentsImport ?? DEFAULT_COMPONENTS_IMPORT;
|
|
40
|
+
const contents = projectIds.length === 0
|
|
41
|
+
? `${generatedBanner('lib/registry.ts')}
|
|
42
|
+
import { ComponentRegistry } from '@elytracms/core/component-registry'
|
|
43
|
+
import { basePrimitives } from '@elytracms/core/runtime-renderer'
|
|
44
|
+
import type { ComponentImplementations } from '@elytracms/core/runtime-renderer'
|
|
45
|
+
|
|
46
|
+
// Platform primitives (base.primitives.*) ship with the runtime renderer.
|
|
47
|
+
// This project uses only base primitives — no host components module is imported.
|
|
48
|
+
const base = basePrimitives()
|
|
49
|
+
|
|
50
|
+
/** The ejected app's component registry. */
|
|
51
|
+
export const registry = new ComponentRegistry(base.manifests)
|
|
52
|
+
|
|
53
|
+
export const implementations: ComponentImplementations = base.implementations
|
|
54
|
+
`
|
|
55
|
+
: `${generatedBanner('lib/registry.ts')}
|
|
56
|
+
import { ComponentRegistry } from '@elytracms/core/component-registry'
|
|
57
|
+
import { basePrimitives } from '@elytracms/core/runtime-renderer'
|
|
58
|
+
import type { ComponentImplementations } from '@elytracms/core/runtime-renderer'
|
|
59
|
+
// Your REAL components, from the host repo (configure with \`builder eject --components <specifier>\`).
|
|
60
|
+
// The module must export \`projectManifests\` (ComponentManifest[]) and
|
|
61
|
+
// \`projectImplementations\` (ComponentImplementations) — see README.md.
|
|
62
|
+
import { projectManifests, projectImplementations } from ${JSON.stringify(componentsImport)}
|
|
63
|
+
|
|
64
|
+
// Platform primitives (base.primitives.*) ship with the runtime renderer.
|
|
65
|
+
const base = basePrimitives()
|
|
66
|
+
|
|
67
|
+
/** The ejected app's component registry — base primitives + this project's components. */
|
|
68
|
+
export const registry = new ComponentRegistry([...base.manifests, ...projectManifests])
|
|
69
|
+
|
|
70
|
+
export const implementations: ComponentImplementations = {
|
|
71
|
+
...base.implementations,
|
|
72
|
+
...projectImplementations,
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Project components this graph references (expected from ${JSON.stringify(componentsImport)}):
|
|
76
|
+
${projectIds.map((id) => `// - ${id}`).join('\n')}
|
|
77
|
+
`;
|
|
78
|
+
return { path: 'lib/registry.ts', contents };
|
|
79
|
+
}
|
|
80
|
+
// ---------------------------------------------------------------------------
|
|
81
|
+
// Renderer (EC-103) — server-safe re-export, no builder-only deps.
|
|
82
|
+
// ---------------------------------------------------------------------------
|
|
83
|
+
function rendererFile() {
|
|
84
|
+
const contents = `${generatedBanner('lib/renderer.ts')}
|
|
85
|
+
import { renderCompositionInLayout } from '@elytracms/core/runtime-renderer'
|
|
86
|
+
import type { ProjectGraph } from '@elytracms/core/project-graph'
|
|
87
|
+
import type { ReactNode } from 'react'
|
|
88
|
+
import { registry, implementations } from './registry'
|
|
89
|
+
import { resolveBinding } from './cms-client'
|
|
90
|
+
import type { RepeaterItem } from './cms-client'
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Render a page-collection document's \`body\` composition into its \`layoutId\`
|
|
94
|
+
* layout (EC-187), server-side. Bindings resolve through the CMS client
|
|
95
|
+
* (published or draft, per request). No builder-only code is imported.
|
|
96
|
+
*/
|
|
97
|
+
export function renderPage(
|
|
98
|
+
graph: ProjectGraph,
|
|
99
|
+
body: unknown,
|
|
100
|
+
layoutId: string | undefined,
|
|
101
|
+
payloads: Record<string, unknown>,
|
|
102
|
+
): ReactNode {
|
|
103
|
+
return renderCompositionInLayout(graph, layoutId, body, {
|
|
104
|
+
registry,
|
|
105
|
+
implementations,
|
|
106
|
+
resolveBinding: (ref, item?: RepeaterItem) => resolveBinding(payloads, ref, item),
|
|
107
|
+
})
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
110
|
+
return { path: 'lib/renderer.ts', contents };
|
|
111
|
+
}
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
// CMS adapter client (EC-104) — provider-neutral content + binding resolution.
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
115
|
+
function cmsClientFile() {
|
|
116
|
+
const contents = `${generatedBanner('lib/cms-client.ts')}
|
|
117
|
+
import { resolveBinding as resolve } from '@elytracms/core/data-binding'
|
|
118
|
+
import type { BindingReference, JsonValue } from '@elytracms/core/project-graph'
|
|
119
|
+
import { SourceRegistry } from '@elytracms/core/data-binding'
|
|
120
|
+
import sources from '../content/sources.json'
|
|
121
|
+
|
|
122
|
+
export interface RepeaterItem {
|
|
123
|
+
item: unknown
|
|
124
|
+
index: number
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The content/data adapter for the ejected app. Provider-neutral: by default it reads the
|
|
129
|
+
* payloads snapshotted into content/sources.json at eject time (no builder backend needed),
|
|
130
|
+
* but you can swap \`fetchPayloads\` to hit your live backend (Convex / REST / CMS) and choose
|
|
131
|
+
* published vs draft via \`mode\`.
|
|
132
|
+
*/
|
|
133
|
+
export type ContentMode = 'published' | 'draft'
|
|
134
|
+
|
|
135
|
+
const registry = SourceRegistry.from(sources as never)
|
|
136
|
+
|
|
137
|
+
/** Build the payload store for a request. Replace with live fetching as needed. */
|
|
138
|
+
export async function fetchPayloads(_mode: ContentMode = 'published'): Promise<Record<string, JsonValue>> {
|
|
139
|
+
const payloads: Record<string, JsonValue> = {}
|
|
140
|
+
for (const source of registry.list()) {
|
|
141
|
+
if (source.sample !== undefined) payloads[source.id] = source.sample
|
|
142
|
+
}
|
|
143
|
+
return payloads
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The shape of a routed page-collection document (EC-187): \`body\` is the canvas
|
|
148
|
+
* composition, \`layoutId\` selects the wrapping layout. Content collections that
|
|
149
|
+
* are not pages are rendered by your own route components.
|
|
150
|
+
*/
|
|
151
|
+
export interface PageDocument {
|
|
152
|
+
body: unknown
|
|
153
|
+
layoutId?: string
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Fetch the routed \`page\`-collection document. STUB: wire this to your content
|
|
158
|
+
* backend (Convex / REST / CMS) — return the page document for the resolved
|
|
159
|
+
* route ref + params, or \`null\` for a 404. The CLI export ships the route table
|
|
160
|
+
* and the layout graph; the page documents live in your CMS.
|
|
161
|
+
*/
|
|
162
|
+
export async function fetchPageDocument(
|
|
163
|
+
_ref: { collection: string; id: string },
|
|
164
|
+
_params: Record<string, string>,
|
|
165
|
+
): Promise<PageDocument | null> {
|
|
166
|
+
return null
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** Resolve a single binding against the request's payloads (used by the renderer). */
|
|
170
|
+
export function resolveBinding(
|
|
171
|
+
payloads: Record<string, unknown>,
|
|
172
|
+
ref: BindingReference,
|
|
173
|
+
item?: RepeaterItem,
|
|
174
|
+
): unknown {
|
|
175
|
+
const resolution = resolve(ref, { payloads: payloads as Record<string, JsonValue>, registry }, item as never)
|
|
176
|
+
switch (resolution.kind) {
|
|
177
|
+
case 'value':
|
|
178
|
+
return resolution.value
|
|
179
|
+
case 'props':
|
|
180
|
+
return resolution.props
|
|
181
|
+
case 'condition':
|
|
182
|
+
return resolution.pass
|
|
183
|
+
default:
|
|
184
|
+
return undefined
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
`;
|
|
188
|
+
return { path: 'lib/cms-client.ts', contents };
|
|
189
|
+
}
|
|
190
|
+
// ---------------------------------------------------------------------------
|
|
191
|
+
// Route resolver integration (EC-105) — App Router wiring with redirects/fallbacks/locale.
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
function routesFile() {
|
|
194
|
+
const contents = `${generatedBanner('lib/routes.ts')}
|
|
195
|
+
import { createRouter } from '@elytracms/core/cms-core'
|
|
196
|
+
import type { ResolveResult } from '@elytracms/core/cms-core'
|
|
197
|
+
import routes from '../content/routes.json'
|
|
198
|
+
import redirects from '../content/redirects.json'
|
|
199
|
+
import locales from '../content/locales.json'
|
|
200
|
+
|
|
201
|
+
const config = locales as { default: string; locales: string[] }
|
|
202
|
+
const router = createRouter(routes as never, redirects as never, { defaultLocale: config.default })
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Derive the request locale from a leading URL segment (the \`/de/about\` strategy) and return the
|
|
206
|
+
* remaining path. Falls back to the default locale when no locale prefix is present (EC-105).
|
|
207
|
+
*/
|
|
208
|
+
export function splitLocale(url: string): { locale: string; path: string } {
|
|
209
|
+
const segments = url.split('/').filter((s) => s.length > 0)
|
|
210
|
+
const first = segments[0]
|
|
211
|
+
if (first && first !== config.default && config.locales.includes(first)) {
|
|
212
|
+
return { locale: first, path: '/' + segments.slice(1).join('/') }
|
|
213
|
+
}
|
|
214
|
+
return { locale: config.default, path: url }
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** Resolve a request URL to a page + params, honoring redirects, fallbacks and locale (EC-105). */
|
|
218
|
+
export function resolveRoute(url: string, locale?: string): ResolveResult {
|
|
219
|
+
return router.resolveUrl(url, locale)
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Follow a redirect chain to its terminus. */
|
|
223
|
+
export function resolveRedirect(from: string) {
|
|
224
|
+
return router.followRedirects(from)
|
|
225
|
+
}
|
|
226
|
+
`;
|
|
227
|
+
return { path: 'lib/routes.ts', contents };
|
|
228
|
+
}
|
|
229
|
+
// ---------------------------------------------------------------------------
|
|
230
|
+
// Image & asset adapter (EC-106).
|
|
231
|
+
// ---------------------------------------------------------------------------
|
|
232
|
+
function assetsFile() {
|
|
233
|
+
const contents = `${generatedBanner('lib/assets.ts')}
|
|
234
|
+
/**
|
|
235
|
+
* Asset URL resolution + image optimization hook points (EC-106). Storage-adapter neutral:
|
|
236
|
+
* point \`ASSET_BASE_URL\` at your CDN/storage, or replace \`assetUrl\` entirely.
|
|
237
|
+
*/
|
|
238
|
+
const ASSET_BASE_URL = process.env.NEXT_PUBLIC_ASSET_BASE_URL ?? ''
|
|
239
|
+
|
|
240
|
+
/** Resolve an asset id/path to a fully-qualified URL. */
|
|
241
|
+
export function assetUrl(idOrPath: string): string {
|
|
242
|
+
if (/^https?:\\/\\//.test(idOrPath)) return idOrPath
|
|
243
|
+
const base = ASSET_BASE_URL.replace(/\\/$/, '')
|
|
244
|
+
const path = idOrPath.replace(/^\\//, '')
|
|
245
|
+
return base ? \`\${base}/\${path}\` : \`/\${path}\`
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** A next/image loader hook — wire your provider's transform params here. */
|
|
249
|
+
export function imageLoader({ src, width, quality }: { src: string; width: number; quality?: number }): string {
|
|
250
|
+
const url = assetUrl(src)
|
|
251
|
+
const sep = url.includes('?') ? '&' : '?'
|
|
252
|
+
return \`\${url}\${sep}w=\${width}&q=\${quality ?? 75}\`
|
|
253
|
+
}
|
|
254
|
+
`;
|
|
255
|
+
return { path: 'lib/assets.ts', contents };
|
|
256
|
+
}
|
|
257
|
+
// ---------------------------------------------------------------------------
|
|
258
|
+
// App Router pages (EC-101/105).
|
|
259
|
+
// ---------------------------------------------------------------------------
|
|
260
|
+
function appFiles(input) {
|
|
261
|
+
const layout = {
|
|
262
|
+
path: 'app/layout.tsx',
|
|
263
|
+
contents: `${generatedBanner('app/layout.tsx')}
|
|
264
|
+
import type { ReactNode } from 'react'
|
|
265
|
+
import './globals.css'
|
|
266
|
+
|
|
267
|
+
export const metadata = { title: ${JSON.stringify(input.projectName)} }
|
|
268
|
+
|
|
269
|
+
export default function RootLayout({ children }: { children: ReactNode }) {
|
|
270
|
+
return (
|
|
271
|
+
<html lang={${JSON.stringify(input.localeConfig.default)}} className="dark">
|
|
272
|
+
<body>{children}</body>
|
|
273
|
+
</html>
|
|
274
|
+
)
|
|
275
|
+
}
|
|
276
|
+
`,
|
|
277
|
+
};
|
|
278
|
+
const catchAll = {
|
|
279
|
+
path: 'app/[[...slug]]/page.tsx',
|
|
280
|
+
contents: `${generatedBanner('app/[[...slug]]/page.tsx')}
|
|
281
|
+
import { notFound, redirect } from 'next/navigation'
|
|
282
|
+
import type { ProjectGraph } from '@elytracms/core/project-graph'
|
|
283
|
+
import graphData from '../../content/graph.json'
|
|
284
|
+
import { resolveRoute, splitLocale } from '../../lib/routes'
|
|
285
|
+
import { renderPage } from '../../lib/renderer'
|
|
286
|
+
import { fetchPayloads, fetchPageDocument } from '../../lib/cms-client'
|
|
287
|
+
|
|
288
|
+
const graph = graphData as unknown as ProjectGraph
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* The single catch-all route (EC-101/105, EC-187): derive the locale, resolve the URL through the
|
|
292
|
+
* canonical route resolver (honoring redirects, fallbacks and locale) to a document ref, fetch the
|
|
293
|
+
* matched \`page\`-collection document, and render its \`body\` composition into its \`layoutId\`
|
|
294
|
+
* layout with the route's dynamic params available to bindings. A miss is a real 404.
|
|
295
|
+
*/
|
|
296
|
+
export default async function Page({ params }: { params: Promise<{ slug?: string[] }> }) {
|
|
297
|
+
const { slug } = await params
|
|
298
|
+
const url = '/' + (slug ?? []).join('/')
|
|
299
|
+
const { locale, path } = splitLocale(url)
|
|
300
|
+
|
|
301
|
+
const result = resolveRoute(path, locale)
|
|
302
|
+
if (result.status === 'redirect' && result.redirectTarget) {
|
|
303
|
+
redirect(result.redirectTarget)
|
|
304
|
+
}
|
|
305
|
+
if (result.status !== 'ok' || !result.documentRef) {
|
|
306
|
+
notFound()
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Fetch the routed page document (its \`body\` is the composition, \`layoutId\` the layout).
|
|
310
|
+
const doc = await fetchPageDocument(result.documentRef, result.dynamicParams)
|
|
311
|
+
if (!doc) {
|
|
312
|
+
notFound()
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// Route params are exposed to bindings under the reserved \`params\` source (e.g. /params/slug).
|
|
316
|
+
const payloads = { ...(await fetchPayloads('published')), params: result.dynamicParams }
|
|
317
|
+
const layoutId = typeof doc.layoutId === 'string' ? doc.layoutId : undefined
|
|
318
|
+
return <>{renderPage(graph, doc.body, layoutId, payloads)}</>
|
|
319
|
+
}
|
|
320
|
+
`,
|
|
321
|
+
};
|
|
322
|
+
const notFoundFile = {
|
|
323
|
+
path: 'app/not-found.tsx',
|
|
324
|
+
contents: `${generatedBanner('app/not-found.tsx')}
|
|
325
|
+
export default function NotFound() {
|
|
326
|
+
return (
|
|
327
|
+
<main style={{ padding: '4rem', fontFamily: 'system-ui' }}>
|
|
328
|
+
<h1>404 — Not found</h1>
|
|
329
|
+
<p>No route matched this URL.</p>
|
|
330
|
+
</main>
|
|
331
|
+
)
|
|
332
|
+
}
|
|
333
|
+
`,
|
|
334
|
+
};
|
|
335
|
+
return [layout, catchAll, notFoundFile];
|
|
336
|
+
}
|
|
337
|
+
function globalsCss(input) {
|
|
338
|
+
return {
|
|
339
|
+
path: 'app/globals.css',
|
|
340
|
+
contents: `/* Generated design tokens — from @elytracms/design-tokens. Edit tokens in the builder. */
|
|
341
|
+
${input.tokensCss}
|
|
342
|
+
:root { color-scheme: dark; }
|
|
343
|
+
body { margin: 0; background: var(--background); color: var(--foreground); }
|
|
344
|
+
`,
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
// ---------------------------------------------------------------------------
|
|
348
|
+
// Scaffold (EC-107/108/109, eject shape per EC-149) — package.json, tsconfig, next.config,
|
|
349
|
+
// vercel, env, README. The ejected app builds from its committed content snapshot: no pull
|
|
350
|
+
// step, no builder credentials, zero runtime dependency on the builder backend.
|
|
351
|
+
// ---------------------------------------------------------------------------
|
|
352
|
+
function scaffoldFiles(input) {
|
|
353
|
+
const componentsImport = input.componentsImport ?? DEFAULT_COMPONENTS_IMPORT;
|
|
354
|
+
const hasProjectComponents = input.manifests.some((m) => namespaceOf(m.id) !== 'base.primitives');
|
|
355
|
+
const pkg = {
|
|
356
|
+
name: input.slug,
|
|
357
|
+
version: '0.0.0',
|
|
358
|
+
private: true,
|
|
359
|
+
type: 'module',
|
|
360
|
+
scripts: {
|
|
361
|
+
// The app builds from its committed content snapshot — no builder access needed (EC-149).
|
|
362
|
+
dev: 'next dev',
|
|
363
|
+
build: 'next build',
|
|
364
|
+
start: 'next start',
|
|
365
|
+
},
|
|
366
|
+
dependencies: {
|
|
367
|
+
// EC-265: the renderer closure is one package now (subpath imports in the
|
|
368
|
+
// generated code resolve through @elytracms/core's exports map).
|
|
369
|
+
'@elytracms/core': 'workspace:*',
|
|
370
|
+
next: '^15.0.0',
|
|
371
|
+
react: '^19.0.0',
|
|
372
|
+
'react-dom': '^19.0.0',
|
|
373
|
+
},
|
|
374
|
+
};
|
|
375
|
+
const envExample = `# Environment for ${input.projectName} (EC-107/149)
|
|
376
|
+
# The ejected app has NO builder backend dependency: content is snapshotted into content/*.json.
|
|
377
|
+
# Only configure what your own infrastructure needs.
|
|
378
|
+
|
|
379
|
+
# Asset storage (EC-106) — base URL for asset/image resolution
|
|
380
|
+
NEXT_PUBLIC_ASSET_BASE_URL=
|
|
381
|
+
`;
|
|
382
|
+
const vercel = {
|
|
383
|
+
$schema: 'https://openapi.vercel.sh/vercel.json',
|
|
384
|
+
framework: 'nextjs',
|
|
385
|
+
installCommand: 'pnpm install',
|
|
386
|
+
};
|
|
387
|
+
const nextConfig = `${generatedBanner('next.config.mjs')}
|
|
388
|
+
/** @type {import('next').NextConfig} */
|
|
389
|
+
const nextConfig = {
|
|
390
|
+
// Allow the components module to live outside the app directory (e.g. elsewhere in your repo).
|
|
391
|
+
experimental: { externalDir: true },
|
|
392
|
+
}
|
|
393
|
+
export default nextConfig
|
|
394
|
+
`;
|
|
395
|
+
const tsconfig = {
|
|
396
|
+
compilerOptions: {
|
|
397
|
+
target: 'ES2022',
|
|
398
|
+
lib: ['dom', 'dom.iterable', 'ES2022'],
|
|
399
|
+
module: 'ESNext',
|
|
400
|
+
moduleResolution: 'Bundler',
|
|
401
|
+
jsx: 'preserve',
|
|
402
|
+
strict: true,
|
|
403
|
+
esModuleInterop: true,
|
|
404
|
+
resolveJsonModule: true,
|
|
405
|
+
noEmit: true,
|
|
406
|
+
plugins: [{ name: 'next' }],
|
|
407
|
+
},
|
|
408
|
+
include: ['app', 'lib', 'content', 'next-env.d.ts'],
|
|
409
|
+
};
|
|
410
|
+
const componentsSection = hasProjectComponents
|
|
411
|
+
? `## Your components (the one thing eject does not generate)
|
|
412
|
+
|
|
413
|
+
Project components are **real code in your repo** — they were never builder-generated. The
|
|
414
|
+
generated \`lib/registry.ts\` imports them from:
|
|
415
|
+
|
|
416
|
+
\`\`\`ts
|
|
417
|
+
import { projectManifests, projectImplementations } from ${JSON.stringify(componentsImport)}
|
|
418
|
+
\`\`\`
|
|
419
|
+
|
|
420
|
+
That module is yours and must export:
|
|
421
|
+
|
|
422
|
+
- \`projectManifests: ComponentManifest[]\` — the same manifests you push with \`builder push\`
|
|
423
|
+
- \`projectImplementations: ComponentImplementations\` — component id → React implementation
|
|
424
|
+
|
|
425
|
+
Relative specifiers resolve from \`lib/registry.ts\` (the default, \`${DEFAULT_COMPONENTS_IMPORT}\`,
|
|
426
|
+
is a \`components/\` module at the app root); a bare specifier must be a dependency of this app.
|
|
427
|
+
Re-run \`builder eject --components <specifier>\` to point the registry somewhere else.
|
|
428
|
+
\`next.config.mjs\` sets \`experimental.externalDir\` so the module may live outside the app
|
|
429
|
+
directory.
|
|
430
|
+
`
|
|
431
|
+
: `## Your components
|
|
432
|
+
|
|
433
|
+
This project uses only platform primitives (\`base.primitives.*\`), which ship with
|
|
434
|
+
\`@elytracms/runtime-renderer\` — no host components module is imported. If you add project
|
|
435
|
+
components later, re-run \`builder eject --components <specifier>\` to wire in the module that
|
|
436
|
+
exports \`projectManifests\` and \`projectImplementations\`.
|
|
437
|
+
`;
|
|
438
|
+
const readme = `# ${input.projectName}
|
|
439
|
+
|
|
440
|
+
Ejected from **Elytra** (\`builder eject\`, \`@elytracms/export-sync\`). A standalone
|
|
441
|
+
Next.js App Router app that renders the project's canonical graph — the exit guarantee: you can
|
|
442
|
+
leave the platform anytime with a working app.
|
|
443
|
+
|
|
444
|
+
**Zero builder dependency:** the canonical model (graph, routes, redirects, collections, sources,
|
|
445
|
+
locales) is snapshotted into \`content/*.json\` at eject time. Building and serving this app needs
|
|
446
|
+
no builder backend and no network access to Elytra.
|
|
447
|
+
|
|
448
|
+
## Structure (EC-109/149)
|
|
449
|
+
|
|
450
|
+
| Path | What it is |
|
|
451
|
+
| --- | --- |
|
|
452
|
+
| \`app/\` | App Router: a single catch-all that resolves URLs via the route resolver |
|
|
453
|
+
| \`app/globals.css\` | Design tokens (generated from \`@elytracms/design-tokens\`) |
|
|
454
|
+
| \`lib/registry.ts\` | Component registry — base primitives + your components, imported from your repo |
|
|
455
|
+
| \`lib/renderer.ts\` | Server-safe page renderer |
|
|
456
|
+
| \`lib/cms-client.ts\` | Content/data adapter (reads the embedded snapshot by default) |
|
|
457
|
+
| \`lib/routes.ts\` | Route resolver (redirects, fallbacks, locale) |
|
|
458
|
+
| \`lib/assets.ts\` | Asset URL + image optimization hooks |
|
|
459
|
+
| \`content/*.json\` | The snapshotted canonical model (graph, routes, schemas, sources) |
|
|
460
|
+
|
|
461
|
+
No builder-only runtime code is included. Every file is readable and yours to edit.
|
|
462
|
+
|
|
463
|
+
${componentsSection}
|
|
464
|
+
## Develop & deploy
|
|
465
|
+
|
|
466
|
+
\`\`\`bash
|
|
467
|
+
pnpm install
|
|
468
|
+
pnpm dev # or: pnpm build && pnpm start
|
|
469
|
+
\`\`\`
|
|
470
|
+
|
|
471
|
+
To refresh the snapshot from the builder before you leave for good, re-run \`builder eject\`:
|
|
472
|
+
it validates first and refuses to write a broken app (missing components, broken bindings,
|
|
473
|
+
route conflicts, redirect loops all fail the eject).
|
|
474
|
+
|
|
475
|
+
To serve live content instead of the snapshot, replace \`fetchPayloads\` in \`lib/cms-client.ts\`
|
|
476
|
+
with your own backend fetch — the renderer and routing are backend-agnostic.
|
|
477
|
+
`;
|
|
478
|
+
return [
|
|
479
|
+
{ path: 'package.json', contents: stableJson(pkg) + '\n' },
|
|
480
|
+
{ path: '.env.example', contents: envExample },
|
|
481
|
+
{ path: 'vercel.json', contents: stableJson(vercel) + '\n' },
|
|
482
|
+
{ path: 'next.config.mjs', contents: nextConfig },
|
|
483
|
+
{ path: 'tsconfig.json', contents: stableJson(tsconfig) + '\n' },
|
|
484
|
+
{ path: 'README.md', contents: readme },
|
|
485
|
+
];
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Generate the full standalone Next.js App Router app for a project (EC-101–109, eject shape
|
|
489
|
+
* per EC-149). Deterministic: the same input always yields the same sorted file set. No
|
|
490
|
+
* component stubs are generated — project components are imported from the host repo.
|
|
491
|
+
*/
|
|
492
|
+
export function generateExport(input) {
|
|
493
|
+
return sortFiles([
|
|
494
|
+
...appFiles(input),
|
|
495
|
+
globalsCss(input),
|
|
496
|
+
registryFile(input),
|
|
497
|
+
rendererFile(),
|
|
498
|
+
cmsClientFile(),
|
|
499
|
+
routesFile(),
|
|
500
|
+
assetsFile(),
|
|
501
|
+
...contentFiles(input),
|
|
502
|
+
...scaffoldFiles(input),
|
|
503
|
+
]);
|
|
504
|
+
}
|
|
505
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/export-sync/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAErE,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAE1F,qFAAqF;AACrF,SAAS,SAAS,CAAC,KAA2B;IAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AAC1E,CAAC;AAED;;;;;;;GAOG;AAEH,8EAA8E;AAC9E,oFAAoF;AACpF,8EAA8E;AAE9E,SAAS,YAAY,CAAC,KAAkB;IACtC,OAAO;QACL,EAAE,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QAChE,EAAE,IAAI,EAAE,qBAAqB,EAAE,QAAQ,EAAE,UA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clB,CAAA;IAEC,OAAO;QACL,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE;QAC1D,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE;QAC9C,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE;QAC5D,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE;QACjD,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE;QAChE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE;KACxC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAkB;IAC/C,OAAO,SAAS,CAAC;QACf,GAAG,QAAQ,CAAC,KAAK,CAAC;QAClB,UAAU,CAAC,KAAK,CAAC;QACjB,YAAY,CAAC,KAAK,CAAC;QACnB,YAAY,EAAE;QACd,aAAa,EAAE;QACf,UAAU,EAAE;QACZ,UAAU,EAAE;QACZ,GAAG,YAAY,CAAC,KAAK,CAAC;QACtB,GAAG,aAAa,CAAC,KAAK,CAAC;KACxB,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @elytracms/export-sync — the `builder` CLI surfaces around the canonical project model.
|
|
3
|
+
*
|
|
4
|
+
* EC-147 (vision AD-2): `builder push` discovers component manifests in the host repo,
|
|
5
|
+
* validates them, and syncs them up into builder registry persistence — with watch mode for
|
|
6
|
+
* local dev and an all-or-nothing CI mode. This is the day-to-day workflow: the embedded
|
|
7
|
+
* runtime renders the graph in the user's own app.
|
|
8
|
+
*
|
|
9
|
+
* EC-148 (vision AD-2/AD-4): `builder typegen` emits the per-collection delivery-shape +
|
|
10
|
+
* accessor types (EC-142/EC-143 codegen) into the host repo as a committed, deterministic
|
|
11
|
+
* module; `builder check` is the CI gate that verifies code and builder state agree —
|
|
12
|
+
* manifest drift both ways, graph↔code component coverage, type drift, and the canonical
|
|
13
|
+
* validation (route conflicts, broken bindings) surfaced through the CLI.
|
|
14
|
+
*
|
|
15
|
+
* EC-149 (vision AD-1): `builder eject` is the exit guarantee — a pure, deterministic
|
|
16
|
+
* generation (brief §4.9, EC-101–113) of a standalone Next.js App Router app with the model
|
|
17
|
+
* snapshotted in and the host repo's real components imported (never stubbed). The export-era
|
|
18
|
+
* `pull`/`validate` surface remains for validation and drift checks; `pull` is deprecated.
|
|
19
|
+
*/
|
|
20
|
+
export declare const PACKAGE = "@elytracms/core/export-sync";
|
|
21
|
+
export * from './core';
|
|
22
|
+
export * from './validate';
|
|
23
|
+
export * from './generate';
|
|
24
|
+
export * from './sync';
|
|
25
|
+
export * from './eject';
|
|
26
|
+
export * from './cli';
|
|
27
|
+
export * from './fixtures';
|
|
28
|
+
export * from './manifest-host';
|
|
29
|
+
export * from './registry-sync-client';
|
|
30
|
+
export * from './builder-source';
|
|
31
|
+
export * from './push';
|
|
32
|
+
export * from './watch';
|
|
33
|
+
export * from './typegen';
|
|
34
|
+
export * from './check';
|
|
35
|
+
export * from './init';
|
|
36
|
+
export { defineElytraConfig, elytraConfigInputSchema, extractWorkspaceConfigExport, resolveWorkspaceConfig, toProjectSettings, WORKSPACE_CONFIG_FILE, WORKSPACE_CONFIG_FILES, } from '@elytracms/core/studio-core';
|
|
37
|
+
export type { ElytraConfigInput, ResolvedWorkspaceProject, WorkspaceConfigIssue, WorkspaceConfigIssueCode, WorkspaceConfigResult, } from '@elytracms/core/studio-core';
|