@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,305 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-collection delivery-type codegen (EC-142, vision AD-4). Emits TypeScript
|
|
3
|
+
* source describing the *delivery shape* of each collection — the shape
|
|
4
|
+
* `resolveDocument` produces — so `article.author.name` just typechecks.
|
|
5
|
+
*
|
|
6
|
+
* Deterministic by construction: collections are emitted sorted by id, fields
|
|
7
|
+
* in declared order, with no timestamps or environment data — the same schema
|
|
8
|
+
* input yields byte-identical output. Consumed by EC-143/EC-145/EC-148.
|
|
9
|
+
*
|
|
10
|
+
* Typing stance: the generated types describe the *valid* delivery shape.
|
|
11
|
+
* Degraded states are always accompanied by structured issues at runtime —
|
|
12
|
+
* a missing relation target yields a `{ id, collection }` stub plus an
|
|
13
|
+
* `unknown-relation-target` issue; a missing asset yields `null` plus an
|
|
14
|
+
* `unknown-asset` issue (which is why asset fields carry `| null`).
|
|
15
|
+
*/
|
|
16
|
+
/** The generated TypeScript type name for a collection's delivery shape. */
|
|
17
|
+
export function deliveryTypeName(collectionId) {
|
|
18
|
+
const name = collectionId
|
|
19
|
+
.split(/[^A-Za-z0-9]+/u)
|
|
20
|
+
.filter((part) => part.length > 0)
|
|
21
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
22
|
+
.join('');
|
|
23
|
+
const safe = name.length > 0 ? name : 'Collection';
|
|
24
|
+
return /^[0-9]/u.test(safe) ? `_${safe}` : safe;
|
|
25
|
+
}
|
|
26
|
+
/** The generated type name for a collection's depth-1 populated reference. */
|
|
27
|
+
export function deliveryRefTypeName(collectionId) {
|
|
28
|
+
return `${deliveryTypeName(collectionId)}Ref`;
|
|
29
|
+
}
|
|
30
|
+
/** The generated `where` type name for a collection's list accessor (EC-143). */
|
|
31
|
+
export function whereTypeName(collectionId) {
|
|
32
|
+
return `${deliveryTypeName(collectionId)}Where`;
|
|
33
|
+
}
|
|
34
|
+
/** The generated sort-field union type name for a collection (EC-143). */
|
|
35
|
+
export function sortFieldTypeName(collectionId) {
|
|
36
|
+
return `${deliveryTypeName(collectionId)}SortField`;
|
|
37
|
+
}
|
|
38
|
+
/** The generated list-query type name for a collection (EC-143). */
|
|
39
|
+
export function listQueryTypeName(collectionId) {
|
|
40
|
+
return `${deliveryTypeName(collectionId)}ListQuery`;
|
|
41
|
+
}
|
|
42
|
+
const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/u;
|
|
43
|
+
function propertyKey(name) {
|
|
44
|
+
return IDENTIFIER.test(name) ? name : singleQuoted(name);
|
|
45
|
+
}
|
|
46
|
+
function singleQuoted(value) {
|
|
47
|
+
return `'${value.replace(/\\/gu, '\\\\').replace(/'/gu, "\\'")}'`;
|
|
48
|
+
}
|
|
49
|
+
function selectUnion(field) {
|
|
50
|
+
const union = field.options.map((option) => singleQuoted(option.value)).join(' | ');
|
|
51
|
+
return field.multiple ? `(${union})[]` : union;
|
|
52
|
+
}
|
|
53
|
+
function relationType(field, nested, knownCollections) {
|
|
54
|
+
const known = knownCollections.has(field.target);
|
|
55
|
+
const stub = known ? `DocumentStub<${singleQuoted(field.target)}>` : 'DocumentStub';
|
|
56
|
+
const populated = !nested && field.populate !== false && known;
|
|
57
|
+
const one = populated ? deliveryRefTypeName(field.target) : stub;
|
|
58
|
+
return field.cardinality === 'many' ? `${one}[]` : one;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The delivery-shape TS type expression for one field. `nested` marks fields
|
|
62
|
+
* inside a depth-1 populated reference, where relations stay stubs (population
|
|
63
|
+
* never recurses) while assets still resolve to objects.
|
|
64
|
+
*/
|
|
65
|
+
function deliveryFieldType(field, nested, knownCollections) {
|
|
66
|
+
switch (field.type) {
|
|
67
|
+
case 'text':
|
|
68
|
+
case 'richText':
|
|
69
|
+
return 'string';
|
|
70
|
+
case 'number':
|
|
71
|
+
return 'number';
|
|
72
|
+
case 'boolean':
|
|
73
|
+
return 'boolean';
|
|
74
|
+
case 'date':
|
|
75
|
+
return 'string | number';
|
|
76
|
+
case 'select':
|
|
77
|
+
return selectUnion(field);
|
|
78
|
+
case 'relation':
|
|
79
|
+
return relationType(field, nested, knownCollections);
|
|
80
|
+
case 'asset':
|
|
81
|
+
return field.cardinality === 'many' ? 'ResolvedAsset[]' : 'ResolvedAsset | null';
|
|
82
|
+
case 'blocks':
|
|
83
|
+
// EC-188: a composition (block) field's value is a ComponentNode tree,
|
|
84
|
+
// delivered verbatim. Typed as the self-contained `CompositionBlock`.
|
|
85
|
+
return field.cardinality === 'one' ? 'CompositionBlock' : 'CompositionBlock[]';
|
|
86
|
+
case 'object': {
|
|
87
|
+
// EC-253: a nested object of the subfields' delivery types, `Array<...>` for
|
|
88
|
+
// a repeater. Subfields follow the same `nested` rule — a relation inside a
|
|
89
|
+
// top-level object populates to depth-1; inside a populated ref it stays a
|
|
90
|
+
// stub. Recurses for nested objects.
|
|
91
|
+
const shape = field.fields
|
|
92
|
+
.map((sub) => {
|
|
93
|
+
const optional = sub.validation?.required === true ? '' : '?';
|
|
94
|
+
return `${propertyKey(sub.name)}${optional}: ${deliveryFieldType(sub, nested, knownCollections)}`;
|
|
95
|
+
})
|
|
96
|
+
.join('; ');
|
|
97
|
+
const objectType = field.fields.length > 0 ? `{ ${shape} }` : 'Record<string, unknown>';
|
|
98
|
+
return field.cardinality === 'many' ? `Array<${objectType}>` : objectType;
|
|
99
|
+
}
|
|
100
|
+
default: {
|
|
101
|
+
// Exhaustiveness: a new field type must add a case above (EC-253).
|
|
102
|
+
const _exhaustive = field;
|
|
103
|
+
void _exhaustive;
|
|
104
|
+
return 'unknown';
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function interfaceLines(name, doc, collection, nested, knownCollections) {
|
|
109
|
+
const lines = [];
|
|
110
|
+
lines.push(`/** ${doc} */`);
|
|
111
|
+
lines.push(`export interface ${name} {`);
|
|
112
|
+
lines.push(' id: string');
|
|
113
|
+
lines.push(` collection: ${singleQuoted(collection.id)}`);
|
|
114
|
+
for (const field of collection.fields) {
|
|
115
|
+
const optional = field.validation?.required === true ? '' : '?';
|
|
116
|
+
const type = deliveryFieldType(field, nested, knownCollections);
|
|
117
|
+
lines.push(` ${propertyKey(field.name)}${optional}: ${type}`);
|
|
118
|
+
}
|
|
119
|
+
lines.push('}');
|
|
120
|
+
return lines;
|
|
121
|
+
}
|
|
122
|
+
const HEADER = [
|
|
123
|
+
'// Generated by @elytracms/content delivery-type codegen (EC-142).',
|
|
124
|
+
'// Do not edit by hand — regenerate from the collection schemas.',
|
|
125
|
+
'// Deterministic: identical schema input yields byte-identical output.',
|
|
126
|
+
];
|
|
127
|
+
const PRELUDE = [
|
|
128
|
+
'/**',
|
|
129
|
+
' * Reference stub for an unpopulated relation: `populate: false` opt-outs,',
|
|
130
|
+
' * unknown/missing targets, and relations nested inside a populated document',
|
|
131
|
+
' * (population never recurses past depth-1). Never a bare id string.',
|
|
132
|
+
' */',
|
|
133
|
+
'export interface DocumentStub<TCollection extends string = string> {',
|
|
134
|
+
' id: string',
|
|
135
|
+
' collection: TCollection',
|
|
136
|
+
'}',
|
|
137
|
+
'',
|
|
138
|
+
'/** Delivery shape of a resolved asset; absent metadata is `null`. */',
|
|
139
|
+
'export interface ResolvedAsset {',
|
|
140
|
+
' id: string',
|
|
141
|
+
' url: string',
|
|
142
|
+
' width: number | null',
|
|
143
|
+
' height: number | null',
|
|
144
|
+
' alt: string | null',
|
|
145
|
+
' mimeType: string',
|
|
146
|
+
' focalPoint: { x: number; y: number } | null',
|
|
147
|
+
'}',
|
|
148
|
+
];
|
|
149
|
+
/**
|
|
150
|
+
* EC-188: emitted only when a schema declares a `blocks` (composition) field. A
|
|
151
|
+
* self-contained, recursive ComponentNode shape — render it with
|
|
152
|
+
* `renderComposition`, don't read into it. Conditional so schemas without
|
|
153
|
+
* composition fields keep byte-identical output.
|
|
154
|
+
*/
|
|
155
|
+
const COMPOSITION_PRELUDE = [
|
|
156
|
+
'/**',
|
|
157
|
+
' * One node of a composition (`blocks`) field tree (EC-188), delivered verbatim.',
|
|
158
|
+
' * Opaque and recursive — render it with `renderComposition` rather than reading',
|
|
159
|
+
' * into it; `props`/`slots` are intentionally loose.',
|
|
160
|
+
' */',
|
|
161
|
+
'export interface CompositionBlock {',
|
|
162
|
+
' id: string',
|
|
163
|
+
' componentId: string',
|
|
164
|
+
' props?: Record<string, unknown>',
|
|
165
|
+
' slots?: Record<string, CompositionBlock[]>',
|
|
166
|
+
' condition?: unknown',
|
|
167
|
+
'}',
|
|
168
|
+
];
|
|
169
|
+
/**
|
|
170
|
+
* Generate the per-collection delivery types as a TypeScript module source
|
|
171
|
+
* string. For each collection two interfaces are emitted:
|
|
172
|
+
*
|
|
173
|
+
* - `Name` — the top-level delivery shape (relations populated to depth-1
|
|
174
|
+
* unless declared `populate: false`),
|
|
175
|
+
* - `NameRef` — the depth-1 populated reference shape used by relation fields
|
|
176
|
+
* on *other* collections (its own relations are stubs).
|
|
177
|
+
*
|
|
178
|
+
* Output is deterministic: collections sorted by id, fields in declared
|
|
179
|
+
* order, fixed banner, no timestamps.
|
|
180
|
+
*/
|
|
181
|
+
export function generateDeliveryTypes(collections) {
|
|
182
|
+
const sorted = [...collections].sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
|
|
183
|
+
const knownCollections = new Set(sorted.map((c) => c.id));
|
|
184
|
+
const sections = [HEADER.join('\n'), PRELUDE.join('\n')];
|
|
185
|
+
// Composition types ride along only when a `blocks` field exists (EC-188), so
|
|
186
|
+
// schemas without one keep byte-identical output.
|
|
187
|
+
const hasComposition = sorted.some((c) => c.fields.some((f) => f.type === 'blocks'));
|
|
188
|
+
if (hasComposition)
|
|
189
|
+
sections.push(COMPOSITION_PRELUDE.join('\n'));
|
|
190
|
+
for (const collection of sorted) {
|
|
191
|
+
sections.push(interfaceLines(deliveryTypeName(collection.id), `Delivery shape for documents in the "${collection.id}" collection.`, collection, false, knownCollections).join('\n'));
|
|
192
|
+
sections.push(interfaceLines(deliveryRefTypeName(collection.id), `Depth-1 populated reference to the "${collection.id}" collection.`, collection, true, knownCollections).join('\n'));
|
|
193
|
+
}
|
|
194
|
+
return `${sections.join('\n\n')}\n`;
|
|
195
|
+
}
|
|
196
|
+
// ---------------------------------------------------------------------------
|
|
197
|
+
// Accessor-type codegen (EC-143)
|
|
198
|
+
// ---------------------------------------------------------------------------
|
|
199
|
+
/**
|
|
200
|
+
* The TS type a filter compares against for one field — the scalar side of
|
|
201
|
+
* the value (relations and assets filter by target/asset id).
|
|
202
|
+
*/
|
|
203
|
+
function filterValueType(field) {
|
|
204
|
+
switch (field.type) {
|
|
205
|
+
case 'text':
|
|
206
|
+
case 'richText':
|
|
207
|
+
return 'string';
|
|
208
|
+
case 'number':
|
|
209
|
+
return 'number';
|
|
210
|
+
case 'boolean':
|
|
211
|
+
return 'boolean';
|
|
212
|
+
case 'date':
|
|
213
|
+
return 'string | number';
|
|
214
|
+
case 'select':
|
|
215
|
+
return field.options.map((option) => singleQuoted(option.value)).join(' | ');
|
|
216
|
+
case 'relation':
|
|
217
|
+
case 'asset':
|
|
218
|
+
return 'string';
|
|
219
|
+
case 'blocks':
|
|
220
|
+
case 'object':
|
|
221
|
+
// Composition (EC-188) and object / repeater (EC-253) are not filter
|
|
222
|
+
// primitives — they can never be declared `filterable`, so no `where` clause
|
|
223
|
+
// is ever generated for them.
|
|
224
|
+
return 'never';
|
|
225
|
+
default: {
|
|
226
|
+
// Exhaustiveness: a new field type must add a case above (EC-253).
|
|
227
|
+
const _exhaustive = field;
|
|
228
|
+
void _exhaustive;
|
|
229
|
+
return 'never';
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const ACCESSOR_HEADER = [
|
|
234
|
+
'// Generated by @elytracms/content accessor-type codegen (EC-143).',
|
|
235
|
+
'// Do not edit by hand — regenerate from the collection schemas.',
|
|
236
|
+
'// Deterministic: identical schema input yields byte-identical output.',
|
|
237
|
+
];
|
|
238
|
+
const ACCESSOR_PRELUDE = [
|
|
239
|
+
'/**',
|
|
240
|
+
' * The closed filter vocabulary (vision AD-3): equality, `in`, comparisons,',
|
|
241
|
+
' * AND-only — multiple fields and multiple operators all AND together.',
|
|
242
|
+
' * A bare scalar is shorthand for `{ eq: value }`.',
|
|
243
|
+
' */',
|
|
244
|
+
'export interface WhereCondition<T> {',
|
|
245
|
+
' eq?: T',
|
|
246
|
+
' gt?: T',
|
|
247
|
+
' gte?: T',
|
|
248
|
+
' in?: readonly T[]',
|
|
249
|
+
' lt?: T',
|
|
250
|
+
' lte?: T',
|
|
251
|
+
'}',
|
|
252
|
+
'',
|
|
253
|
+
'/** The list-query envelope every generated per-collection query reuses. */',
|
|
254
|
+
'export interface GeneratedListQuery<TWhere, TSortField extends string> {',
|
|
255
|
+
' where?: TWhere',
|
|
256
|
+
" sort?: { field: TSortField; direction?: 'asc' | 'desc' }",
|
|
257
|
+
' limit?: number',
|
|
258
|
+
' cursor?: string',
|
|
259
|
+
'}',
|
|
260
|
+
];
|
|
261
|
+
/**
|
|
262
|
+
* Generate the per-collection accessor types as a TypeScript module source
|
|
263
|
+
* string (EC-143). For each collection three aliases are emitted:
|
|
264
|
+
*
|
|
265
|
+
* - `NameWhere` — `where` keys narrowed to the fields declared `filterable`
|
|
266
|
+
* in the schema; filtering on anything else is a compile error,
|
|
267
|
+
* - `NameSortField` — the sortable field union (the same filterable set),
|
|
268
|
+
* - `NameListQuery` — the full `listDocuments` query for the collection.
|
|
269
|
+
*
|
|
270
|
+
* Collections with no filterable fields get `Record<string, never>` / `never`,
|
|
271
|
+
* so no filter or sort can be expressed at all. Output is deterministic:
|
|
272
|
+
* collections sorted by id, fields in declared order, fixed banner, no
|
|
273
|
+
* timestamps — same schema input, byte-identical output.
|
|
274
|
+
*/
|
|
275
|
+
export function generateAccessorTypes(collections) {
|
|
276
|
+
const sorted = [...collections].sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
|
|
277
|
+
const sections = [ACCESSOR_HEADER.join('\n'), ACCESSOR_PRELUDE.join('\n')];
|
|
278
|
+
for (const collection of sorted) {
|
|
279
|
+
const filterable = collection.fields.filter((field) => field.filterable === true);
|
|
280
|
+
const lines = [];
|
|
281
|
+
lines.push(`/** Filter input for "${collection.id}" — only fields declared \`filterable\`. */`);
|
|
282
|
+
if (filterable.length === 0) {
|
|
283
|
+
lines.push(`export type ${whereTypeName(collection.id)} = Record<string, never>`);
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
lines.push(`export type ${whereTypeName(collection.id)} = {`);
|
|
287
|
+
for (const field of filterable) {
|
|
288
|
+
const value = filterValueType(field);
|
|
289
|
+
lines.push(` ${propertyKey(field.name)}?: ${value} | WhereCondition<${value}>`);
|
|
290
|
+
}
|
|
291
|
+
lines.push('}');
|
|
292
|
+
}
|
|
293
|
+
lines.push('');
|
|
294
|
+
lines.push(`/** Sortable fields of "${collection.id}" (the filterable set). */`);
|
|
295
|
+
lines.push(`export type ${sortFieldTypeName(collection.id)} = ${filterable.length === 0
|
|
296
|
+
? 'never'
|
|
297
|
+
: filterable.map((field) => singleQuoted(field.name)).join(' | ')}`);
|
|
298
|
+
lines.push('');
|
|
299
|
+
lines.push(`/** \`listDocuments\` query for "${collection.id}". */`);
|
|
300
|
+
lines.push(`export type ${listQueryTypeName(collection.id)} = GeneratedListQuery<${whereTypeName(collection.id)}, ${sortFieldTypeName(collection.id)}>`);
|
|
301
|
+
sections.push(lines.join('\n'));
|
|
302
|
+
}
|
|
303
|
+
return `${sections.join('\n\n')}\n`;
|
|
304
|
+
}
|
|
305
|
+
//# sourceMappingURL=codegen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen.js","sourceRoot":"","sources":["../../src/content/codegen.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAEH,4EAA4E;AAC5E,MAAM,UAAU,gBAAgB,CAAC,YAAoB;IACnD,MAAM,IAAI,GAAG,YAAY;SACtB,KAAK,CAAC,gBAAgB,CAAC;SACvB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACjC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC3D,IAAI,CAAC,EAAE,CAAC,CAAA;IACX,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,CAA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AC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACjC,CAAC;IACD,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAA;AACrC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Locale, LocaleConfig } from '@elytracms/core/cms-core';
|
|
3
|
+
/**
|
|
4
|
+
* Which side of the draft/published split a delivery request reads from
|
|
5
|
+
* (EC-021, vision AD-4). `published` never exposes draft content; `draft` is
|
|
6
|
+
* the editor/preview view.
|
|
7
|
+
*/
|
|
8
|
+
export declare const perspectiveSchema: z.ZodEnum<{
|
|
9
|
+
draft: "draft";
|
|
10
|
+
published: "published";
|
|
11
|
+
}>;
|
|
12
|
+
export type Perspective = z.infer<typeof perspectiveSchema>;
|
|
13
|
+
/**
|
|
14
|
+
* Ambient request context (vision AD-4): locale and perspective are set once
|
|
15
|
+
* per request and threaded through every resolution function — never per-call
|
|
16
|
+
* ceremony. The locale config travels along so EC-018 fallback needs no extra
|
|
17
|
+
* arguments either.
|
|
18
|
+
*/
|
|
19
|
+
export interface ContentContext {
|
|
20
|
+
/** The locale requested for this delivery (EC-018 fallback applies). */
|
|
21
|
+
readonly locale: Locale;
|
|
22
|
+
/** Draft or published perspective (EC-021). */
|
|
23
|
+
readonly perspective: Perspective;
|
|
24
|
+
/** The project's locale configuration (default + supported set). */
|
|
25
|
+
readonly locales: LocaleConfig;
|
|
26
|
+
}
|
|
27
|
+
export interface ContentContextInit {
|
|
28
|
+
locale: Locale;
|
|
29
|
+
perspective: Perspective;
|
|
30
|
+
locales: LocaleConfig;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create the ambient `{ locale, perspective }` context for a delivery request.
|
|
34
|
+
* Construction never throws — an unknown locale is surfaced as a structured
|
|
35
|
+
* `unknown-locale` issue by `resolveDocument`, while resolution still proceeds
|
|
36
|
+
* with default-locale fallback.
|
|
37
|
+
*/
|
|
38
|
+
export declare function createContentContext(init: ContentContextInit): ContentContext;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Which side of the draft/published split a delivery request reads from
|
|
4
|
+
* (EC-021, vision AD-4). `published` never exposes draft content; `draft` is
|
|
5
|
+
* the editor/preview view.
|
|
6
|
+
*/
|
|
7
|
+
export const perspectiveSchema = z.enum(['draft', 'published']);
|
|
8
|
+
/**
|
|
9
|
+
* Create the ambient `{ locale, perspective }` context for a delivery request.
|
|
10
|
+
* Construction never throws — an unknown locale is surfaced as a structured
|
|
11
|
+
* `unknown-locale` issue by `resolveDocument`, while resolution still proceeds
|
|
12
|
+
* with default-locale fallback.
|
|
13
|
+
*/
|
|
14
|
+
export function createContentContext(init) {
|
|
15
|
+
return {
|
|
16
|
+
locale: init.locale,
|
|
17
|
+
perspective: init.perspective,
|
|
18
|
+
locales: init.locales,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/content/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAA;AAwB/D;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAwB;IAC3D,OAAO;QACL,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;KACtB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FilterScalar, SortDirection } from './query';
|
|
2
|
+
/**
|
|
3
|
+
* Deterministic cursor pagination for `listDocuments` (EC-143).
|
|
4
|
+
*
|
|
5
|
+
* Format: `ec1.<base64url(JSON payload)>` where the payload is
|
|
6
|
+
* `{"v":1,"f":<sort field|null>,"d":"asc"|"desc","s":<sort value|null>,"i":<doc id>}`
|
|
7
|
+
* — the sort position (`f`/`d`/`s`) plus the id (`i`) of the last document
|
|
8
|
+
* returned, with keys always written in that order. The next page is every
|
|
9
|
+
* entry strictly after that position in the canonical list order
|
|
10
|
+
* (`compareListEntries`). Encoding the sort spec into the cursor lets decode
|
|
11
|
+
* reject a cursor reused with a different sort as `invalid-cursor` instead of
|
|
12
|
+
* silently misordering.
|
|
13
|
+
*
|
|
14
|
+
* Encoding is byte-stable: same position in, same cursor string out.
|
|
15
|
+
*/
|
|
16
|
+
export declare const LIST_CURSOR_PREFIX = "ec1.";
|
|
17
|
+
export interface ListCursor {
|
|
18
|
+
/** Sort field the cursor was minted under (`null` = id order). */
|
|
19
|
+
sortField: string | null;
|
|
20
|
+
direction: SortDirection;
|
|
21
|
+
/** Sort value of the last returned document (`null` when missing). */
|
|
22
|
+
sortValue: FilterScalar | null;
|
|
23
|
+
/** Id of the last returned document (the unconditional tiebreak). */
|
|
24
|
+
id: string;
|
|
25
|
+
}
|
|
26
|
+
/** Encode a list position into an opaque, URL-safe cursor string. */
|
|
27
|
+
export declare function encodeListCursor(cursor: ListCursor): string;
|
|
28
|
+
/**
|
|
29
|
+
* Decode a cursor string. Returns `null` for anything malformed — wrong
|
|
30
|
+
* prefix, bad base64, bad JSON, wrong shape. Never throws; the caller maps
|
|
31
|
+
* `null` to a structured `invalid-cursor` error.
|
|
32
|
+
*/
|
|
33
|
+
export declare function decodeListCursor(text: string): ListCursor | null;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Deterministic cursor pagination for `listDocuments` (EC-143).
|
|
4
|
+
*
|
|
5
|
+
* Format: `ec1.<base64url(JSON payload)>` where the payload is
|
|
6
|
+
* `{"v":1,"f":<sort field|null>,"d":"asc"|"desc","s":<sort value|null>,"i":<doc id>}`
|
|
7
|
+
* — the sort position (`f`/`d`/`s`) plus the id (`i`) of the last document
|
|
8
|
+
* returned, with keys always written in that order. The next page is every
|
|
9
|
+
* entry strictly after that position in the canonical list order
|
|
10
|
+
* (`compareListEntries`). Encoding the sort spec into the cursor lets decode
|
|
11
|
+
* reject a cursor reused with a different sort as `invalid-cursor` instead of
|
|
12
|
+
* silently misordering.
|
|
13
|
+
*
|
|
14
|
+
* Encoding is byte-stable: same position in, same cursor string out.
|
|
15
|
+
*/
|
|
16
|
+
export const LIST_CURSOR_PREFIX = 'ec1.';
|
|
17
|
+
const cursorPayloadSchema = z.object({
|
|
18
|
+
v: z.literal(1),
|
|
19
|
+
f: z.string().nullable(),
|
|
20
|
+
d: z.enum(['asc', 'desc']),
|
|
21
|
+
s: z.union([z.string(), z.number(), z.boolean(), z.null()]),
|
|
22
|
+
i: z.string().min(1),
|
|
23
|
+
});
|
|
24
|
+
const BASE64URL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
|
|
25
|
+
/** Unpadded base64url over raw bytes — environment-independent (no Buffer). */
|
|
26
|
+
function toBase64Url(bytes) {
|
|
27
|
+
let out = '';
|
|
28
|
+
for (let i = 0; i < bytes.length; i += 3) {
|
|
29
|
+
const a = bytes[i] ?? 0;
|
|
30
|
+
const b = bytes[i + 1];
|
|
31
|
+
const c = bytes[i + 2];
|
|
32
|
+
out += BASE64URL[a >> 2];
|
|
33
|
+
out += BASE64URL[((a & 0b11) << 4) | ((b ?? 0) >> 4)];
|
|
34
|
+
if (b !== undefined)
|
|
35
|
+
out += BASE64URL[((b & 0b1111) << 2) | ((c ?? 0) >> 6)];
|
|
36
|
+
if (c !== undefined)
|
|
37
|
+
out += BASE64URL[c & 0b111111];
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
function fromBase64Url(text) {
|
|
42
|
+
const values = [];
|
|
43
|
+
for (const char of text) {
|
|
44
|
+
const value = BASE64URL.indexOf(char);
|
|
45
|
+
if (value === -1)
|
|
46
|
+
return null;
|
|
47
|
+
values.push(value);
|
|
48
|
+
}
|
|
49
|
+
if (values.length % 4 === 1)
|
|
50
|
+
return null;
|
|
51
|
+
const bytes = [];
|
|
52
|
+
for (let i = 0; i < values.length; i += 4) {
|
|
53
|
+
const [a, b, c, d] = [values[i], values[i + 1], values[i + 2], values[i + 3]];
|
|
54
|
+
if (a === undefined || b === undefined)
|
|
55
|
+
break;
|
|
56
|
+
bytes.push((a << 2) | (b >> 4));
|
|
57
|
+
if (c !== undefined)
|
|
58
|
+
bytes.push(((b & 0b1111) << 4) | (c >> 2));
|
|
59
|
+
if (d !== undefined)
|
|
60
|
+
bytes.push((((c ?? 0) & 0b11) << 6) | d);
|
|
61
|
+
}
|
|
62
|
+
return new Uint8Array(bytes);
|
|
63
|
+
}
|
|
64
|
+
/** Encode a list position into an opaque, URL-safe cursor string. */
|
|
65
|
+
export function encodeListCursor(cursor) {
|
|
66
|
+
// Key order is fixed by construction (v, f, d, s, i) — byte-stable output.
|
|
67
|
+
const payload = JSON.stringify({
|
|
68
|
+
v: 1,
|
|
69
|
+
f: cursor.sortField,
|
|
70
|
+
d: cursor.direction,
|
|
71
|
+
s: cursor.sortValue,
|
|
72
|
+
i: cursor.id,
|
|
73
|
+
});
|
|
74
|
+
return LIST_CURSOR_PREFIX + toBase64Url(new TextEncoder().encode(payload));
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Decode a cursor string. Returns `null` for anything malformed — wrong
|
|
78
|
+
* prefix, bad base64, bad JSON, wrong shape. Never throws; the caller maps
|
|
79
|
+
* `null` to a structured `invalid-cursor` error.
|
|
80
|
+
*/
|
|
81
|
+
export function decodeListCursor(text) {
|
|
82
|
+
if (!text.startsWith(LIST_CURSOR_PREFIX))
|
|
83
|
+
return null;
|
|
84
|
+
const bytes = fromBase64Url(text.slice(LIST_CURSOR_PREFIX.length));
|
|
85
|
+
if (!bytes)
|
|
86
|
+
return null;
|
|
87
|
+
let parsed;
|
|
88
|
+
try {
|
|
89
|
+
parsed = JSON.parse(new TextDecoder().decode(bytes));
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
const payload = cursorPayloadSchema.safeParse(parsed);
|
|
95
|
+
if (!payload.success)
|
|
96
|
+
return null;
|
|
97
|
+
return {
|
|
98
|
+
sortField: payload.data.f,
|
|
99
|
+
direction: payload.data.d,
|
|
100
|
+
sortValue: payload.data.s,
|
|
101
|
+
id: payload.data.i,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=cursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/content/cursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAA;AAExC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACf,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxB,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1B,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACrB,CAAC,CAAA;AAYF,MAAM,SAAS,GAAG,k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AAS;QACnB,CAAC,EAAE,MAAM,CAAC,SAAS;QACnB,CAAC,EAAE,MAAM,CAAC,SAAS;QACnB,CAAC,EAAE,MAAM,CAAC,EAAE;KACb,CAAC,CAAA;IACF,OAAO,kBAAkB,GAAG,WAAW,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;AAC5E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;QAAE,OAAO,IAAI,CAAA;IACrD,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAA;IAClE,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IACvB,IAAI,MAAe,CAAA;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;IACD,MAAM,OAAO,GAAG,mBAAmB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IACrD,IAAI,CAAC,OAAO,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IACjC,OAAO;QACL,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACzB,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;KACnB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @elytracms/content — delivery-shape resolution, the closed-form typed accessor
|
|
3
|
+
* surface, & per-collection type codegen (EC-142/EC-143, vision AD-3/AD-4).
|
|
4
|
+
*
|
|
5
|
+
* The unit of delivery is the resolved document, not the stored row: locale
|
|
6
|
+
* fallback applied (EC-018), draft/published perspective applied (EC-021),
|
|
7
|
+
* relations populated to depth-1 as declared in schema, assets resolved to
|
|
8
|
+
* usable objects. The entire v1 query surface is the accessor ladder —
|
|
9
|
+
* `resolvePage`, `getDocument`, `listDocuments` — no query language; every
|
|
10
|
+
* result carries deterministic cache-tag metadata (EC-146). Everything here is
|
|
11
|
+
* pure functions over `@elytracms/core/cms-core` models — no fetching, no Convex, no
|
|
12
|
+
* React — and invalid states surface as structured issues, never crashes.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PACKAGE = "@elytracms/core/content";
|
|
15
|
+
export * from './context';
|
|
16
|
+
export * from './perspective';
|
|
17
|
+
export * from './locale';
|
|
18
|
+
export * from './populate';
|
|
19
|
+
export * from './assets';
|
|
20
|
+
export * from './resolve';
|
|
21
|
+
export * from './raw';
|
|
22
|
+
export * from './codegen';
|
|
23
|
+
export * from './query';
|
|
24
|
+
export * from './serialize';
|
|
25
|
+
export * from './cursor';
|
|
26
|
+
export * from './tags';
|
|
27
|
+
export * from './client';
|
|
28
|
+
export * from './binding-sources';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @elytracms/content — delivery-shape resolution, the closed-form typed accessor
|
|
3
|
+
* surface, & per-collection type codegen (EC-142/EC-143, vision AD-3/AD-4).
|
|
4
|
+
*
|
|
5
|
+
* The unit of delivery is the resolved document, not the stored row: locale
|
|
6
|
+
* fallback applied (EC-018), draft/published perspective applied (EC-021),
|
|
7
|
+
* relations populated to depth-1 as declared in schema, assets resolved to
|
|
8
|
+
* usable objects. The entire v1 query surface is the accessor ladder —
|
|
9
|
+
* `resolvePage`, `getDocument`, `listDocuments` — no query language; every
|
|
10
|
+
* result carries deterministic cache-tag metadata (EC-146). Everything here is
|
|
11
|
+
* pure functions over `@elytracms/core/cms-core` models — no fetching, no Convex, no
|
|
12
|
+
* React — and invalid states surface as structured issues, never crashes.
|
|
13
|
+
*/
|
|
14
|
+
export const PACKAGE = '@elytracms/core/content';
|
|
15
|
+
export * from './context';
|
|
16
|
+
export * from './perspective';
|
|
17
|
+
export * from './locale';
|
|
18
|
+
export * from './populate';
|
|
19
|
+
export * from './assets';
|
|
20
|
+
export * from './resolve';
|
|
21
|
+
export * from './raw';
|
|
22
|
+
export * from './codegen';
|
|
23
|
+
export * from './query';
|
|
24
|
+
export * from './serialize';
|
|
25
|
+
export * from './cursor';
|
|
26
|
+
export * from './tags';
|
|
27
|
+
export * from './client';
|
|
28
|
+
export * from './binding-sources';
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,yBAAyB,CAAA;AAEhD,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CmsDocument, CmsPath, CollectionDef, FieldValues, Locale } from '@elytracms/core/cms-core';
|
|
2
|
+
import type { ContentContext } from './context';
|
|
3
|
+
/**
|
|
4
|
+
* A report entry for one field whose value was served from a different locale
|
|
5
|
+
* than the one requested (EC-018 default-locale fallback). Paths are rooted at
|
|
6
|
+
* the resolved document, e.g. `['title']` or `['author', 'bio']` for a field
|
|
7
|
+
* inside a populated relation.
|
|
8
|
+
*/
|
|
9
|
+
export interface FieldLocaleFallback {
|
|
10
|
+
path: CmsPath;
|
|
11
|
+
/** The field name (last path segment, repeated for convenience). */
|
|
12
|
+
field: string;
|
|
13
|
+
/** The locale the request asked for. */
|
|
14
|
+
requestedLocale: Locale;
|
|
15
|
+
/** The locale the value was actually read from. */
|
|
16
|
+
sourceLocale: Locale;
|
|
17
|
+
}
|
|
18
|
+
export interface LocaleResolution {
|
|
19
|
+
/** Flat field values for the requested locale, fallback applied. Fields with
|
|
20
|
+
* no value anywhere are omitted (never `undefined` entries). */
|
|
21
|
+
values: FieldValues;
|
|
22
|
+
/** Which fields used fallback, and from where (EC-018 reporting). */
|
|
23
|
+
fallbacks: FieldLocaleFallback[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Resolve a stored row's field values for the context locale with EC-018
|
|
27
|
+
* default-locale fallback, reporting every field that actually fell back.
|
|
28
|
+
* Pure: reads only the given document; never throws.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveLocaleValues(context: ContentContext, collection: CollectionDef, doc: CmsDocument, basePath?: CmsPath): LocaleResolution;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { resolveField } from '@elytracms/core/cms-core';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve a stored row's field values for the context locale with EC-018
|
|
4
|
+
* default-locale fallback, reporting every field that actually fell back.
|
|
5
|
+
* Pure: reads only the given document; never throws.
|
|
6
|
+
*/
|
|
7
|
+
export function resolveLocaleValues(context, collection, doc, basePath = []) {
|
|
8
|
+
const values = {};
|
|
9
|
+
const fallbacks = [];
|
|
10
|
+
for (const field of collection.fields) {
|
|
11
|
+
const resolved = resolveField(collection, doc, field.name, context.locale, context.locales);
|
|
12
|
+
if (resolved.value === undefined)
|
|
13
|
+
continue;
|
|
14
|
+
values[field.name] = resolved.value;
|
|
15
|
+
if (resolved.fellBack) {
|
|
16
|
+
fallbacks.push({
|
|
17
|
+
path: [...basePath, field.name],
|
|
18
|
+
field: field.name,
|
|
19
|
+
requestedLocale: context.locale,
|
|
20
|
+
sourceLocale: resolved.sourceLocale,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return { values, fallbacks };
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=locale.js.map
|