@lupinum/ginko-content 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/compatibility.json +27 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +690 -0
- package/dist/cms-contract/build +1 -0
- package/dist/cms-contract/build.d.ts +44 -0
- package/dist/cms-contract/build.js +513 -0
- package/dist/cms-contract/index +1 -0
- package/dist/cms-contract/index.d.ts +25 -0
- package/dist/cms-contract/index.js +37 -0
- package/dist/cms-contract/mdc +1 -0
- package/dist/cms-contract/mdc.d.ts +32 -0
- package/dist/cms-contract/mdc.js +52 -0
- package/dist/cms-contract/path +1 -0
- package/dist/cms-contract/path.d.ts +12 -0
- package/dist/cms-contract/path.js +18 -0
- package/dist/cms-contract/schema +1 -0
- package/dist/cms-contract/schema.d.ts +18 -0
- package/dist/cms-contract/schema.js +13 -0
- package/dist/cms-contract/types +1 -0
- package/dist/cms-contract/types.d.ts +177 -0
- package/dist/cms-contract/types.js +0 -0
- package/dist/cms-import/index +1 -0
- package/dist/cms-import/index.d.ts +21 -0
- package/dist/cms-import/index.js +57 -0
- package/dist/config.d.mts +3 -0
- package/dist/config.mjs +3 -0
- package/dist/core/cache +1 -0
- package/dist/core/cache-hints +1 -0
- package/dist/core/cache-hints.d.ts +3 -0
- package/dist/core/cache-hints.js +55 -0
- package/dist/core/cache.d.ts +29 -0
- package/dist/core/cache.js +0 -0
- package/dist/core/content/collection +1 -0
- package/dist/core/content/collection.d.ts +3 -0
- package/dist/core/content/collection.js +52 -0
- package/dist/core/content/graph +1 -0
- package/dist/core/content/graph.d.ts +147 -0
- package/dist/core/content/graph.js +189 -0
- package/dist/core/content/ignore +1 -0
- package/dist/core/content/ignore.d.ts +5 -0
- package/dist/core/content/ignore.js +10 -0
- package/dist/core/content/locale +1 -0
- package/dist/core/content/locale.d.ts +61 -0
- package/dist/core/content/locale.js +77 -0
- package/dist/core/content/path +1 -0
- package/dist/core/content/path.d.ts +36 -0
- package/dist/core/content/path.js +143 -0
- package/dist/core/content/slug +1 -0
- package/dist/core/content/slug.d.ts +4 -0
- package/dist/core/content/slug.js +41 -0
- package/dist/core/content/sources +1 -0
- package/dist/core/content/sources.d.ts +2 -0
- package/dist/core/content/sources.js +6 -0
- package/dist/core/errors +1 -0
- package/dist/core/errors.d.ts +15 -0
- package/dist/core/errors.js +10 -0
- package/dist/core/markdown/tree +1 -0
- package/dist/core/markdown/tree.d.ts +9 -0
- package/dist/core/markdown/tree.js +47 -0
- package/dist/core/query/builder +1 -0
- package/dist/core/query/builder.d.ts +18 -0
- package/dist/core/query/builder.js +186 -0
- package/dist/core/query/execute +1 -0
- package/dist/core/query/execute.d.ts +52 -0
- package/dist/core/query/execute.js +304 -0
- package/dist/core/query/filter +1 -0
- package/dist/core/query/filter.d.ts +42 -0
- package/dist/core/query/filter.js +118 -0
- package/dist/core/query/json +1 -0
- package/dist/core/query/json.d.ts +2 -0
- package/dist/core/query/json.js +20 -0
- package/dist/core/query/lower +1 -0
- package/dist/core/query/lower.d.ts +14 -0
- package/dist/core/query/lower.js +121 -0
- package/dist/core/query/operators +1 -0
- package/dist/core/query/operators.d.ts +23 -0
- package/dist/core/query/operators.js +126 -0
- package/dist/core/query/params +1 -0
- package/dist/core/query/params.d.ts +15 -0
- package/dist/core/query/params.js +83 -0
- package/dist/core/query/plan +1 -0
- package/dist/core/query/plan.d.ts +110 -0
- package/dist/core/query/plan.js +0 -0
- package/dist/core/references/resolve +1 -0
- package/dist/core/references/resolve.d.ts +31 -0
- package/dist/core/references/resolve.js +121 -0
- package/dist/core/references/schema +1 -0
- package/dist/core/references/schema.d.ts +8 -0
- package/dist/core/references/schema.js +70 -0
- package/dist/core/result +1 -0
- package/dist/core/result.d.ts +27 -0
- package/dist/core/result.js +2 -0
- package/dist/features/collections/resolve +1 -0
- package/dist/features/collections/resolve.d.ts +63 -0
- package/dist/features/collections/resolve.js +76 -0
- package/dist/features/localization/config +1 -0
- package/dist/features/localization/config.d.ts +18 -0
- package/dist/features/localization/config.js +25 -0
- package/dist/features/localization/links +1 -0
- package/dist/features/localization/links.d.ts +1 -0
- package/dist/features/localization/links.js +69 -0
- package/dist/features/localization/path +1 -0
- package/dist/features/localization/path.d.ts +32 -0
- package/dist/features/localization/path.js +80 -0
- package/dist/features/localization/results +1 -0
- package/dist/features/localization/results.d.ts +42 -0
- package/dist/features/localization/results.js +149 -0
- package/dist/features/localization/translated-slugs +1 -0
- package/dist/features/localization/translated-slugs.d.ts +11 -0
- package/dist/features/localization/translated-slugs.js +80 -0
- package/dist/features/navigation/build +1 -0
- package/dist/features/navigation/build.d.ts +28 -0
- package/dist/features/navigation/build.js +104 -0
- package/dist/features/navigation/canonical +1 -0
- package/dist/features/navigation/canonical.d.ts +33 -0
- package/dist/features/navigation/canonical.js +149 -0
- package/dist/features/navigation/query +1 -0
- package/dist/features/navigation/query.d.ts +19 -0
- package/dist/features/navigation/query.js +51 -0
- package/dist/features/navigation/resolve +1 -0
- package/dist/features/navigation/resolve.d.ts +20 -0
- package/dist/features/navigation/resolve.js +79 -0
- package/dist/features/navigation/tree +1 -0
- package/dist/features/navigation/tree.d.ts +6 -0
- package/dist/features/navigation/tree.js +32 -0
- package/dist/features/search/navigation +1 -0
- package/dist/features/search/navigation.d.ts +6 -0
- package/dist/features/search/navigation.js +21 -0
- package/dist/features/search/sections +1 -0
- package/dist/features/search/sections.d.ts +21 -0
- package/dist/features/search/sections.js +98 -0
- package/dist/features/sitemap/query +1 -0
- package/dist/features/sitemap/query.d.ts +68 -0
- package/dist/features/sitemap/query.js +171 -0
- package/dist/integrations/nitro/context +1 -0
- package/dist/integrations/nitro/context.d.ts +63 -0
- package/dist/integrations/nitro/context.js +28 -0
- package/dist/integrations/nitro/ingest +1 -0
- package/dist/integrations/nitro/ingest.d.ts +18 -0
- package/dist/integrations/nitro/ingest.js +120 -0
- package/dist/integrations/nitro/preview +1 -0
- package/dist/integrations/nitro/preview.d.ts +5 -0
- package/dist/integrations/nitro/preview.js +21 -0
- package/dist/integrations/nitro/runtime-config +1 -0
- package/dist/integrations/nitro/runtime-config.d.ts +1 -0
- package/dist/integrations/nitro/runtime-config.js +4 -0
- package/dist/integrations/nitro/storage +1 -0
- package/dist/integrations/nitro/storage.d.ts +9 -0
- package/dist/integrations/nitro/storage.js +113 -0
- package/dist/integrations/vue/content-components +1 -0
- package/dist/integrations/vue/content-components.d.ts +24 -0
- package/dist/integrations/vue/content-components.js +67 -0
- package/dist/integrations/vue/html-tags +1 -0
- package/dist/integrations/vue/html-tags.d.ts +2 -0
- package/dist/integrations/vue/html-tags.js +119 -0
- package/dist/integrations/vue/markdown-refs +1 -0
- package/dist/integrations/vue/markdown-refs.d.ts +1 -0
- package/dist/integrations/vue/markdown-refs.js +1 -0
- package/dist/module.d.mts +2044 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +1381 -0
- package/dist/parsers/csv +1 -0
- package/dist/parsers/csv.d.ts +2 -0
- package/dist/parsers/csv.js +38 -0
- package/dist/parsers/from-csv +1 -0
- package/dist/parsers/from-csv.d.ts +20 -0
- package/dist/parsers/from-csv.js +85 -0
- package/dist/parsers/index +1 -0
- package/dist/parsers/index.d.ts +10 -0
- package/dist/parsers/index.js +50 -0
- package/dist/parsers/json +1 -0
- package/dist/parsers/json.d.ts +2 -0
- package/dist/parsers/json.js +29 -0
- package/dist/parsers/markdown +1 -0
- package/dist/parsers/markdown-plugins +1 -0
- package/dist/parsers/markdown-plugins.d.ts +3 -0
- package/dist/parsers/markdown-plugins.js +58 -0
- package/dist/parsers/markdown.d.ts +2 -0
- package/dist/parsers/markdown.js +64 -0
- package/dist/parsers/path-meta +1 -0
- package/dist/parsers/path-meta.d.ts +4 -0
- package/dist/parsers/path-meta.js +37 -0
- package/dist/parsers/utils +1 -0
- package/dist/parsers/utils.d.ts +2 -0
- package/dist/parsers/utils.js +3 -0
- package/dist/parsers/yaml +1 -0
- package/dist/parsers/yaml.d.ts +2 -0
- package/dist/parsers/yaml.js +19 -0
- package/dist/public/client +1 -0
- package/dist/public/client.d.ts +19 -0
- package/dist/public/client.js +26 -0
- package/dist/public/provider +1 -0
- package/dist/public/provider-errors +1 -0
- package/dist/public/provider-errors.d.ts +4 -0
- package/dist/public/provider-errors.js +28 -0
- package/dist/public/provider.d.ts +74 -0
- package/dist/public/provider.js +6 -0
- package/dist/public/server +1 -0
- package/dist/public/server.d.ts +19 -0
- package/dist/public/server.js +28 -0
- package/dist/runtime/app/components/ContentRenderer.d.vue.ts +62 -0
- package/dist/runtime/app/components/ContentRenderer.vue +84 -0
- package/dist/runtime/app/components/ContentRenderer.vue.d.ts +62 -0
- package/dist/runtime/app/components/ContentRendererInline.d.vue.ts +50 -0
- package/dist/runtime/app/components/ContentRendererInline.vue +97 -0
- package/dist/runtime/app/components/ContentRendererInline.vue.d.ts +50 -0
- package/dist/runtime/app/components/Prose/ProseCode.d.vue.ts +61 -0
- package/dist/runtime/app/components/Prose/ProseCode.vue +32 -0
- package/dist/runtime/app/components/Prose/ProseCode.vue.d.ts +61 -0
- package/dist/runtime/app/components/Prose/ProseCodeInline.d.vue.ts +13 -0
- package/dist/runtime/app/components/Prose/ProseCodeInline.vue +3 -0
- package/dist/runtime/app/components/Prose/ProseCodeInline.vue.d.ts +13 -0
- package/dist/runtime/app/components/Prose/ProseImg.d.vue.ts +59 -0
- package/dist/runtime/app/components/Prose/ProseImg.vue +59 -0
- package/dist/runtime/app/components/Prose/ProseImg.vue.d.ts +59 -0
- package/dist/runtime/app/components/Prose/ProsePre.d.vue.ts +79 -0
- package/dist/runtime/app/components/Prose/ProsePre.vue +42 -0
- package/dist/runtime/app/components/Prose/ProsePre.vue.d.ts +79 -0
- package/dist/runtime/app/components/internal/ContentRendererMarkdown.d.vue.ts +68 -0
- package/dist/runtime/app/components/internal/ContentRendererMarkdown.vue +99 -0
- package/dist/runtime/app/components/internal/ContentRendererMarkdown.vue.d.ts +68 -0
- package/dist/runtime/app/components/internal/MarkdownRenderer +1 -0
- package/dist/runtime/app/components/internal/MarkdownRenderer.d.ts +90 -0
- package/dist/runtime/app/components/internal/MarkdownRenderer.js +191 -0
- package/dist/runtime/app/composables/async-data +1 -0
- package/dist/runtime/app/composables/async-data.d.ts +2 -0
- package/dist/runtime/app/composables/async-data.js +4 -0
- package/dist/runtime/app/composables/content-i18n +1 -0
- package/dist/runtime/app/composables/content-i18n.d.ts +5 -0
- package/dist/runtime/app/composables/content-i18n.js +1 -0
- package/dist/runtime/app/composables/head +1 -0
- package/dist/runtime/app/composables/head.d.ts +11 -0
- package/dist/runtime/app/composables/head.js +98 -0
- package/dist/runtime/app/composables/locale +1 -0
- package/dist/runtime/app/composables/locale-context +1 -0
- package/dist/runtime/app/composables/locale-context.d.ts +5 -0
- package/dist/runtime/app/composables/locale-context.js +8 -0
- package/dist/runtime/app/composables/locale.d.ts +8 -0
- package/dist/runtime/app/composables/locale.js +15 -0
- package/dist/runtime/app/composables/navigation +1 -0
- package/dist/runtime/app/composables/navigation.d.ts +3 -0
- package/dist/runtime/app/composables/navigation.js +7 -0
- package/dist/runtime/app/composables/preview +1 -0
- package/dist/runtime/app/composables/preview.d.ts +5 -0
- package/dist/runtime/app/composables/preview.js +52 -0
- package/dist/runtime/app/composables/query-api +1 -0
- package/dist/runtime/app/composables/query-api.d.ts +27 -0
- package/dist/runtime/app/composables/query-api.js +46 -0
- package/dist/runtime/app/composables/route +1 -0
- package/dist/runtime/app/composables/route.d.ts +11 -0
- package/dist/runtime/app/composables/route.js +150 -0
- package/dist/runtime/app/composables/runtime +1 -0
- package/dist/runtime/app/composables/runtime.d.ts +2 -0
- package/dist/runtime/app/composables/runtime.js +7 -0
- package/dist/runtime/app/composables/search +1 -0
- package/dist/runtime/app/composables/search.d.ts +58 -0
- package/dist/runtime/app/composables/search.js +321 -0
- package/dist/runtime/app/composables/site-data +1 -0
- package/dist/runtime/app/composables/site-data.d.ts +12 -0
- package/dist/runtime/app/composables/site-data.js +12 -0
- package/dist/runtime/app/composables/toc +1 -0
- package/dist/runtime/app/composables/toc.d.ts +10 -0
- package/dist/runtime/app/composables/toc.js +31 -0
- package/dist/runtime/app/composables/use-content +1 -0
- package/dist/runtime/app/composables/use-content.d.ts +188 -0
- package/dist/runtime/app/composables/use-content.js +307 -0
- package/dist/runtime/app/composables/useUnwrap +1 -0
- package/dist/runtime/app/composables/useUnwrap.d.ts +8 -0
- package/dist/runtime/app/composables/useUnwrap.js +35 -0
- package/dist/runtime/app/composables/utils +1 -0
- package/dist/runtime/app/composables/utils.d.ts +22 -0
- package/dist/runtime/app/composables/utils.js +76 -0
- package/dist/runtime/app/composables/web-socket +1 -0
- package/dist/runtime/app/composables/web-socket.d.ts +3 -0
- package/dist/runtime/app/composables/web-socket.js +65 -0
- package/dist/runtime/app/pages/content.d.vue.ts +3 -0
- package/dist/runtime/app/pages/content.vue +14 -0
- package/dist/runtime/app/pages/content.vue.d.ts +3 -0
- package/dist/runtime/app/plugins/markdown-components +1 -0
- package/dist/runtime/app/plugins/markdown-components.d.ts +2 -0
- package/dist/runtime/app/plugins/markdown-components.js +19 -0
- package/dist/runtime/app/plugins/ws +1 -0
- package/dist/runtime/app/plugins/ws.d.ts +2 -0
- package/dist/runtime/app/plugins/ws.js +7 -0
- package/dist/runtime/app.d.vue.ts +3 -0
- package/dist/runtime/app.vue +3 -0
- package/dist/runtime/app.vue.d.ts +3 -0
- package/dist/runtime/markdown/plugins +1 -0
- package/dist/runtime/markdown/plugins.d.ts +3 -0
- package/dist/runtime/markdown/plugins.js +39 -0
- package/dist/runtime/query/public-limits +1 -0
- package/dist/runtime/query/public-limits.d.ts +2 -0
- package/dist/runtime/query/public-limits.js +2 -0
- package/dist/runtime/query/resolve +1 -0
- package/dist/runtime/query/resolve.d.ts +5 -0
- package/dist/runtime/query/resolve.js +9 -0
- package/dist/runtime/query/routes +1 -0
- package/dist/runtime/query/routes.d.ts +33 -0
- package/dist/runtime/query/routes.js +21 -0
- package/dist/runtime/query/unified +1 -0
- package/dist/runtime/query/unified.d.ts +94 -0
- package/dist/runtime/query/unified.js +473 -0
- package/dist/runtime/server/api/cache +1 -0
- package/dist/runtime/server/api/cache.d.ts +8 -0
- package/dist/runtime/server/api/cache.js +26 -0
- package/dist/runtime/server/api/locales +1 -0
- package/dist/runtime/server/api/locales.d.ts +6 -0
- package/dist/runtime/server/api/locales.js +28 -0
- package/dist/runtime/server/api/navigation +1 -0
- package/dist/runtime/server/api/navigation.d.ts +2 -0
- package/dist/runtime/server/api/navigation.js +21 -0
- package/dist/runtime/server/api/query +1 -0
- package/dist/runtime/server/api/query.d.ts +2 -0
- package/dist/runtime/server/api/query.js +6 -0
- package/dist/runtime/server/api/revalidate +1 -0
- package/dist/runtime/server/api/revalidate.d.ts +6 -0
- package/dist/runtime/server/api/revalidate.js +156 -0
- package/dist/runtime/server/api/search +1 -0
- package/dist/runtime/server/api/search-index +1 -0
- package/dist/runtime/server/api/search-index.d.ts +2 -0
- package/dist/runtime/server/api/search-index.js +20 -0
- package/dist/runtime/server/api/search.d.ts +2 -0
- package/dist/runtime/server/api/search.js +40 -0
- package/dist/runtime/server/api/site-data +1 -0
- package/dist/runtime/server/api/site-data.d.ts +2 -0
- package/dist/runtime/server/api/site-data.js +22 -0
- package/dist/runtime/server/api/sitemap +1 -0
- package/dist/runtime/server/api/sitemap.d.ts +2 -0
- package/dist/runtime/server/api/sitemap.js +11 -0
- package/dist/runtime/server/cache-adapter +1 -0
- package/dist/runtime/server/cache-adapter.d.ts +2 -0
- package/dist/runtime/server/cache-adapter.js +11 -0
- package/dist/runtime/server/cache-adapters +1 -0
- package/dist/runtime/server/cache-adapters.d.ts +9 -0
- package/dist/runtime/server/cache-adapters.js +50 -0
- package/dist/runtime/server/cache-hints +1 -0
- package/dist/runtime/server/cache-hints.d.ts +5 -0
- package/dist/runtime/server/cache-hints.js +17 -0
- package/dist/runtime/server/collection-helpers +1 -0
- package/dist/runtime/server/collection-helpers.d.ts +13 -0
- package/dist/runtime/server/collection-helpers.js +99 -0
- package/dist/runtime/server/index +1 -0
- package/dist/runtime/server/index.d.ts +9 -0
- package/dist/runtime/server/index.js +15 -0
- package/dist/runtime/server/manifest +1 -0
- package/dist/runtime/server/manifest.d.ts +1 -0
- package/dist/runtime/server/manifest.js +1 -0
- package/dist/runtime/server/navigation +1 -0
- package/dist/runtime/server/navigation-query +1 -0
- package/dist/runtime/server/navigation-query.d.ts +4 -0
- package/dist/runtime/server/navigation-query.js +80 -0
- package/dist/runtime/server/navigation.d.ts +2 -0
- package/dist/runtime/server/navigation.js +9 -0
- package/dist/runtime/server/pagefind +1 -0
- package/dist/runtime/server/pagefind.d.ts +2 -0
- package/dist/runtime/server/pagefind.js +30 -0
- package/dist/runtime/server/plugins/cache +1 -0
- package/dist/runtime/server/plugins/cache.d.ts +2 -0
- package/dist/runtime/server/plugins/cache.js +17 -0
- package/dist/runtime/server/plugins/sitemap +1 -0
- package/dist/runtime/server/plugins/sitemap.d.ts +2 -0
- package/dist/runtime/server/plugins/sitemap.js +25 -0
- package/dist/runtime/server/preview +1 -0
- package/dist/runtime/server/preview.d.ts +1 -0
- package/dist/runtime/server/preview.js +1 -0
- package/dist/runtime/server/provider-query +1 -0
- package/dist/runtime/server/provider-query.d.ts +27 -0
- package/dist/runtime/server/provider-query.js +131 -0
- package/dist/runtime/server/provider-result +1 -0
- package/dist/runtime/server/provider-result.d.ts +10 -0
- package/dist/runtime/server/provider-result.js +30 -0
- package/dist/runtime/server/providers/filesystem +1 -0
- package/dist/runtime/server/providers/filesystem.d.ts +2 -0
- package/dist/runtime/server/providers/filesystem.js +47 -0
- package/dist/runtime/server/providers/index +1 -0
- package/dist/runtime/server/providers/index.d.ts +3 -0
- package/dist/runtime/server/providers/index.js +190 -0
- package/dist/runtime/server/query-api +1 -0
- package/dist/runtime/server/query-api.d.ts +28 -0
- package/dist/runtime/server/query-api.js +54 -0
- package/dist/runtime/server/query-executor +1 -0
- package/dist/runtime/server/query-executor.d.ts +4 -0
- package/dist/runtime/server/query-executor.js +121 -0
- package/dist/runtime/server/runtime-config +1 -0
- package/dist/runtime/server/runtime-config.d.ts +1 -0
- package/dist/runtime/server/runtime-config.js +1 -0
- package/dist/runtime/server/search +1 -0
- package/dist/runtime/server/search.d.ts +18 -0
- package/dist/runtime/server/search.js +134 -0
- package/dist/runtime/server/sitemap +1 -0
- package/dist/runtime/server/sitemap-provider +1 -0
- package/dist/runtime/server/sitemap-provider.d.ts +10 -0
- package/dist/runtime/server/sitemap-provider.js +11 -0
- package/dist/runtime/server/sitemap.d.ts +6 -0
- package/dist/runtime/server/sitemap.js +45 -0
- package/dist/runtime/server/storage +1 -0
- package/dist/runtime/server/storage-access +1 -0
- package/dist/runtime/server/storage-access.d.ts +1 -0
- package/dist/runtime/server/storage-access.js +9 -0
- package/dist/runtime/server/storage.d.ts +2 -0
- package/dist/runtime/server/storage.js +2 -0
- package/dist/runtime/server/validation +1 -0
- package/dist/runtime/server/validation.d.ts +1 -0
- package/dist/runtime/server/validation.js +6 -0
- package/dist/runtime/shared/search +1 -0
- package/dist/runtime/shared/search.d.ts +2 -0
- package/dist/runtime/shared/search.js +89 -0
- package/dist/runtime/transformers/component-resolver +1 -0
- package/dist/runtime/transformers/component-resolver.d.ts +10 -0
- package/dist/runtime/transformers/component-resolver.js +30 -0
- package/dist/runtime/transformers/csv/from-csv +1 -0
- package/dist/runtime/transformers/csv/from-csv.d.ts +1 -0
- package/dist/runtime/transformers/csv/from-csv.js +1 -0
- package/dist/runtime/transformers/csv/index +1 -0
- package/dist/runtime/transformers/csv/index.d.ts +1 -0
- package/dist/runtime/transformers/csv/index.js +1 -0
- package/dist/runtime/transformers/define +1 -0
- package/dist/runtime/transformers/define.d.ts +1 -0
- package/dist/runtime/transformers/define.js +1 -0
- package/dist/runtime/transformers/index +1 -0
- package/dist/runtime/transformers/index.d.ts +1 -0
- package/dist/runtime/transformers/index.js +1 -0
- package/dist/runtime/transformers/json +1 -0
- package/dist/runtime/transformers/json.d.ts +1 -0
- package/dist/runtime/transformers/json.js +1 -0
- package/dist/runtime/transformers/markdown +1 -0
- package/dist/runtime/transformers/markdown.d.ts +1 -0
- package/dist/runtime/transformers/markdown.js +1 -0
- package/dist/runtime/transformers/path-meta +1 -0
- package/dist/runtime/transformers/path-meta.d.ts +2 -0
- package/dist/runtime/transformers/path-meta.js +2 -0
- package/dist/runtime/transformers/utils +1 -0
- package/dist/runtime/transformers/utils.d.ts +1 -0
- package/dist/runtime/transformers/utils.js +1 -0
- package/dist/runtime/transformers/yaml +1 -0
- package/dist/runtime/transformers/yaml.d.ts +1 -0
- package/dist/runtime/transformers/yaml.js +1 -0
- package/dist/runtime/utils/content-components +1 -0
- package/dist/runtime/utils/content-components.d.ts +9 -0
- package/dist/runtime/utils/content-components.js +16 -0
- package/dist/runtime/utils/query +1 -0
- package/dist/runtime/utils/query.d.ts +5 -0
- package/dist/runtime/utils/query.js +18 -0
- package/dist/runtime/virtual/transformers.d.ts +4 -0
- package/dist/runtime/virtual.d.ts +7 -0
- package/dist/storage/cache +1 -0
- package/dist/storage/cache.d.ts +32 -0
- package/dist/storage/cache.js +42 -0
- package/dist/storage/content +1 -0
- package/dist/storage/content.d.ts +41 -0
- package/dist/storage/content.js +86 -0
- package/dist/storage/contents +1 -0
- package/dist/storage/contents.d.ts +5 -0
- package/dist/storage/contents.js +116 -0
- package/dist/storage/driver +1 -0
- package/dist/storage/driver.d.ts +28 -0
- package/dist/storage/driver.js +22 -0
- package/dist/storage/graph +1 -0
- package/dist/storage/graph.d.ts +3 -0
- package/dist/storage/graph.js +14 -0
- package/dist/storage/manifest +1 -0
- package/dist/storage/manifest.d.ts +18 -0
- package/dist/storage/manifest.js +68 -0
- package/dist/storage/references +1 -0
- package/dist/storage/references.d.ts +13 -0
- package/dist/storage/references.js +78 -0
- package/dist/storage/validation +1 -0
- package/dist/storage/validation.d.ts +46 -0
- package/dist/storage/validation.js +341 -0
- package/dist/testing/provider-contract +1 -0
- package/dist/testing/provider-contract.d.ts +31 -0
- package/dist/testing/provider-contract.js +237 -0
- package/dist/testing/provider-fixture +1 -0
- package/dist/testing/provider-fixture.d.ts +65 -0
- package/dist/testing/provider-fixture.js +606 -0
- package/dist/types/api +1 -0
- package/dist/types/api.d.ts +47 -0
- package/dist/types/api.js +1 -0
- package/dist/types/config +1 -0
- package/dist/types/config.d.ts +281 -0
- package/dist/types/config.js +28 -0
- package/dist/types/content +1 -0
- package/dist/types/content.d.ts +311 -0
- package/dist/types/content.js +1 -0
- package/dist/types/fields +1 -0
- package/dist/types/fields.d.ts +81 -0
- package/dist/types/fields.js +146 -0
- package/dist/types/index +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +6 -0
- package/dist/types/module +1 -0
- package/dist/types/module.d.ts +428 -0
- package/dist/types/module.js +0 -0
- package/dist/types/picomatch.d.ts +8 -0
- package/dist/types/query +1 -0
- package/dist/types/query.d.ts +862 -0
- package/dist/types/query.js +1 -0
- package/dist/types/reference +1 -0
- package/dist/types/reference.d.ts +1 -0
- package/dist/types/reference.js +1 -0
- package/dist/types/runtime +1 -0
- package/dist/types/runtime.d.ts +45 -0
- package/dist/types/runtime.js +1 -0
- package/dist/types/search +1 -0
- package/dist/types/search.d.ts +64 -0
- package/dist/types/search.js +0 -0
- package/dist/types/virtual.d.ts +19 -0
- package/dist/types.d.mts +11 -0
- package/dist/web-types.json +466 -0
- package/package.json +135 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { z, type ZodType } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Locale settings for a collection that ships translated variants.
|
|
4
|
+
*/
|
|
5
|
+
export interface ContentCollectionI18nConfig {
|
|
6
|
+
/**
|
|
7
|
+
* Locale treated as the canonical variant when no locale is specified.
|
|
8
|
+
*/
|
|
9
|
+
defaultLocale: string;
|
|
10
|
+
/**
|
|
11
|
+
* Every locale code that can produce a concrete variant for the collection.
|
|
12
|
+
*/
|
|
13
|
+
locales: string[];
|
|
14
|
+
}
|
|
15
|
+
export type ContentCollectionSource = string | string[];
|
|
16
|
+
/**
|
|
17
|
+
* Public route mount for route-backed collections.
|
|
18
|
+
*
|
|
19
|
+
* A single string applies to every locale. A locale map lets translated apps
|
|
20
|
+
* express roots such as `{ en: '/docs', de: '/dokumentation' }`.
|
|
21
|
+
*/
|
|
22
|
+
export type ContentCollectionRouteConfig = string | Record<string, string>;
|
|
23
|
+
export type ContentCmsFieldType = 'text' | 'textarea' | 'richtext' | 'slug' | 'email' | 'url' | 'number' | 'range' | 'select' | 'multiselect' | 'radio' | 'checkbox' | 'toggle' | 'date' | 'datetime' | 'time' | 'json' | 'object' | 'array' | 'blocks' | 'relation' | 'relations' | 'image' | 'images' | 'file' | 'icon' | 'code' | 'color' | 'divider' | 'section';
|
|
24
|
+
export interface ContentCmsRelationConfig {
|
|
25
|
+
collectionId: string;
|
|
26
|
+
multiple?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface ContentCmsFieldConfig {
|
|
29
|
+
type?: ContentCmsFieldType;
|
|
30
|
+
label?: string | Record<string, string> | null;
|
|
31
|
+
description?: string | null;
|
|
32
|
+
required?: boolean;
|
|
33
|
+
localized?: boolean;
|
|
34
|
+
hidden?: boolean;
|
|
35
|
+
searchable?: boolean;
|
|
36
|
+
sortable?: boolean;
|
|
37
|
+
order?: number;
|
|
38
|
+
width?: 'full' | 'half';
|
|
39
|
+
defaultValue?: unknown;
|
|
40
|
+
validation?: Record<string, unknown> | null;
|
|
41
|
+
condition?: Record<string, unknown> | null;
|
|
42
|
+
options?: string[] | null;
|
|
43
|
+
relation?: ContentCmsRelationConfig | null;
|
|
44
|
+
fields?: Record<string, ContentCmsFieldConfig> | ContentCmsFieldConfig[] | null;
|
|
45
|
+
min?: number | null;
|
|
46
|
+
max?: number | null;
|
|
47
|
+
step?: number | null;
|
|
48
|
+
slugFrom?: string | null;
|
|
49
|
+
language?: string | null;
|
|
50
|
+
}
|
|
51
|
+
export interface ContentCmsCollectionConfig {
|
|
52
|
+
label?: string | Record<string, string>;
|
|
53
|
+
type?: 'flat' | 'tree';
|
|
54
|
+
icon?: string;
|
|
55
|
+
route?: {
|
|
56
|
+
mode?: 'route' | 'none';
|
|
57
|
+
pathPrefix?: string;
|
|
58
|
+
slugMode?: 'shared' | 'localized' | 'stable' | 'localizedStable';
|
|
59
|
+
rootSlug?: string | null;
|
|
60
|
+
singleton?: boolean;
|
|
61
|
+
};
|
|
62
|
+
fields?: Record<string, ContentCmsFieldConfig>;
|
|
63
|
+
settings?: unknown;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Object source shape accepted for Nuxt Content v3 migration.
|
|
67
|
+
*/
|
|
68
|
+
export interface ContentCollectionSourceObject {
|
|
69
|
+
/**
|
|
70
|
+
* Source glob or globs included in the collection.
|
|
71
|
+
*/
|
|
72
|
+
include: ContentCollectionSource;
|
|
73
|
+
/**
|
|
74
|
+
* Source glob or globs excluded from the collection.
|
|
75
|
+
*/
|
|
76
|
+
exclude?: ContentCollectionSource;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Declarative collection definition used by `content.config.ts`.
|
|
80
|
+
*/
|
|
81
|
+
export interface ContentCollectionConfig<TSchema extends ZodType | undefined = ZodType | undefined> {
|
|
82
|
+
/**
|
|
83
|
+
* Source glob or source descriptor understood by the filesystem ingestion
|
|
84
|
+
* layer. CMS-backed projects do not need a runtime source; filesystem
|
|
85
|
+
* imports/seeding should be modeled by provider-owned import tooling.
|
|
86
|
+
*/
|
|
87
|
+
source?: ContentCollectionSource;
|
|
88
|
+
/**
|
|
89
|
+
* Source glob or globs excluded from this collection.
|
|
90
|
+
*/
|
|
91
|
+
exclude?: ContentCollectionSource;
|
|
92
|
+
/**
|
|
93
|
+
* Optional Zod schema applied to every parsed entry in the collection.
|
|
94
|
+
*/
|
|
95
|
+
schema?: TSchema;
|
|
96
|
+
/**
|
|
97
|
+
* When `true`, reject documents with frontmatter fields not declared in `schema`.
|
|
98
|
+
*/
|
|
99
|
+
strict?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Per-collection locale settings. Use `true` to inherit the module-level i18n config.
|
|
102
|
+
*/
|
|
103
|
+
i18n?: true | ContentCollectionI18nConfig;
|
|
104
|
+
/**
|
|
105
|
+
* Public route mount for this collection. Used to resolve `by.route`
|
|
106
|
+
* selectors and to emit requested-locale URLs for fallback content.
|
|
107
|
+
*/
|
|
108
|
+
route?: ContentCollectionRouteConfig;
|
|
109
|
+
/**
|
|
110
|
+
* Opt-in to fully translated path segments per locale (ADR-0008). When `true`,
|
|
111
|
+
* the content graph pairs locale variants by numeric prefix on filenames so
|
|
112
|
+
* each locale can carry its own slug text, e.g. `1.guide/` ↔ `1.documentation/`.
|
|
113
|
+
*
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
translatedSlugs?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Include this collection in content-owned sitemap output and prerender route
|
|
119
|
+
* discovery. Route-backed collections are included by default; data-only or
|
|
120
|
+
* app-internal collections should opt out with `false`.
|
|
121
|
+
*
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
sitemap?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Optional CMS editor metadata for providers such as `@lupinum/ginko-cms`.
|
|
127
|
+
*
|
|
128
|
+
* The content collection remains the source of truth; this metadata only
|
|
129
|
+
* fills editor-specific gaps that cannot be inferred safely from route,
|
|
130
|
+
* source, i18n, and schema information.
|
|
131
|
+
*/
|
|
132
|
+
cms?: ContentCmsCollectionConfig;
|
|
133
|
+
}
|
|
134
|
+
export type ContentCollectionKind = 'page' | 'data';
|
|
135
|
+
export type BuiltinContentProviderName = 'filesystem' | 'cms' | 'ginko-cms' | 'ginko';
|
|
136
|
+
export type ContentProviderName = BuiltinContentProviderName | (string & {});
|
|
137
|
+
export type DefineCollectionOptions<TSchema extends ZodType | undefined = ZodType | undefined> = Omit<ContentCollectionConfig<TSchema>, 'source' | 'exclude'>;
|
|
138
|
+
export interface DefineCollectionObject<TSchema extends ZodType | undefined = ZodType | undefined> extends DefineCollectionOptions<TSchema> {
|
|
139
|
+
/**
|
|
140
|
+
* Nuxt Content v3-compatible collection kind. Ginko does not keep separate
|
|
141
|
+
* page/data collection runtimes; `data` collections default to `sitemap: false`.
|
|
142
|
+
*/
|
|
143
|
+
type: ContentCollectionKind;
|
|
144
|
+
/**
|
|
145
|
+
* Source glob, globs, or v3-compatible `{ include, exclude }` object.
|
|
146
|
+
* Required for filesystem-backed collections; optional for CMS-backed
|
|
147
|
+
* collections.
|
|
148
|
+
*/
|
|
149
|
+
source?: ContentCollectionSource | ContentCollectionSourceObject;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Root object returned from `defineContentConfig`.
|
|
153
|
+
*/
|
|
154
|
+
export interface ContentConfig<TCollections extends Record<string, ContentCollectionConfig> = Record<string, ContentCollectionConfig>> {
|
|
155
|
+
/**
|
|
156
|
+
* Content backing implementation. `filesystem` is the default. `cms`,
|
|
157
|
+
* `ginko-cms`, and `ginko` resolve to the official Ginko CMS provider when
|
|
158
|
+
* `@lupinum/ginko-cms` is installed.
|
|
159
|
+
*/
|
|
160
|
+
provider?: ContentProviderName;
|
|
161
|
+
/**
|
|
162
|
+
* External provider modules keyed by provider name. Built-in providers do not
|
|
163
|
+
* need to be registered here.
|
|
164
|
+
*/
|
|
165
|
+
providers?: Record<string, string>;
|
|
166
|
+
/**
|
|
167
|
+
* Named content collections keyed by the identifier used at query time.
|
|
168
|
+
*/
|
|
169
|
+
collections?: TCollections;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Infer the runtime data shape for a collection from its Zod schema.
|
|
173
|
+
*/
|
|
174
|
+
export type CollectionSchema<TCollection> = TCollection extends {
|
|
175
|
+
schema?: infer TSchema;
|
|
176
|
+
} ? TSchema extends ZodType ? z.infer<TSchema> : Record<string, unknown> : Record<string, unknown>;
|
|
177
|
+
/**
|
|
178
|
+
* Zod string schema tagged as a Nuxt Content reference field.
|
|
179
|
+
*/
|
|
180
|
+
export interface ContentReferenceSchema extends z.ZodString {
|
|
181
|
+
/**
|
|
182
|
+
* Serialized descriptor in the form `__nuxt_content_ref__:<collection>`.
|
|
183
|
+
*/
|
|
184
|
+
description: string;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Typed handle returned by `defineCollection`. Carries the collection's name
|
|
188
|
+
* and i18n discriminator at the type level so the unified query API
|
|
189
|
+
* (`one`, `many`, `useContentOne`, ...) can require `locale` only when the
|
|
190
|
+
* collection is internationalized.
|
|
191
|
+
*
|
|
192
|
+
* The handle extends `ContentCollectionConfig` so it can be stored directly
|
|
193
|
+
* in `defineContentConfig({ collections: ... })`.
|
|
194
|
+
*/
|
|
195
|
+
export interface ContentCollectionHandle<Name extends string = string, TSchema extends ZodType | undefined = ZodType | undefined, TI18n extends boolean = boolean> extends ContentCollectionConfig<TSchema> {
|
|
196
|
+
/**
|
|
197
|
+
* Stable identifier used at query time, e.g. `'docs'` or `'blog'`.
|
|
198
|
+
*/
|
|
199
|
+
readonly name: Name;
|
|
200
|
+
/**
|
|
201
|
+
* Phantom flag — `true` when the collection ships translated variants.
|
|
202
|
+
* Used by the type system to make `locale` required on i18n queries.
|
|
203
|
+
*
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
206
|
+
readonly __i18n: TI18n;
|
|
207
|
+
/**
|
|
208
|
+
* Phantom marker — Zod schema bound at definition time. Used to infer the
|
|
209
|
+
* returned document shape at query time.
|
|
210
|
+
*
|
|
211
|
+
* @internal
|
|
212
|
+
*/
|
|
213
|
+
readonly __schema: TSchema;
|
|
214
|
+
}
|
|
215
|
+
type IsI18nConfig<TConfig> = TConfig extends {
|
|
216
|
+
i18n: true | ContentCollectionI18nConfig;
|
|
217
|
+
} ? TConfig['i18n'] extends false ? false : true : false;
|
|
218
|
+
/**
|
|
219
|
+
* Define a content collection in `content.config.ts`.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* import { z } from 'zod'
|
|
224
|
+
* import { defineCollection } from '@lupinum/ginko-content/config'
|
|
225
|
+
*
|
|
226
|
+
* export const docs = defineCollection('docs', {
|
|
227
|
+
* type: 'page',
|
|
228
|
+
* source: 'docs/**\/*.md',
|
|
229
|
+
* i18n: { locales: ['en', 'fr', 'de'], defaultLocale: 'en' },
|
|
230
|
+
* schema: z.object({
|
|
231
|
+
* title: z.string(),
|
|
232
|
+
* published: z.boolean().default(true)
|
|
233
|
+
* })
|
|
234
|
+
* })
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
type SchemaOf<TConfig> = TConfig extends {
|
|
238
|
+
schema?: infer S;
|
|
239
|
+
} ? S extends ZodType ? S : undefined : undefined;
|
|
240
|
+
export declare function defineCollection<const Name extends string, const TConfig extends DefineCollectionObject<ZodType | undefined>>(name: Name, config: TConfig): ContentCollectionHandle<Name, SchemaOf<TConfig>, IsI18nConfig<TConfig>>;
|
|
241
|
+
/**
|
|
242
|
+
* Wrap the root content configuration with full type inference.
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* ```ts
|
|
246
|
+
* import { defineCollection, defineContentConfig } from '@lupinum/ginko-content/config'
|
|
247
|
+
*
|
|
248
|
+
* export default defineContentConfig({
|
|
249
|
+
* collections: {
|
|
250
|
+
* docs: defineCollection({
|
|
251
|
+
* type: 'page',
|
|
252
|
+
* source: 'docs/*.md'
|
|
253
|
+
* })
|
|
254
|
+
* }
|
|
255
|
+
* })
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
export declare function defineContentConfig<TCollections extends Record<string, ContentCollectionConfig>>(config: ContentConfig<TCollections>): ContentConfig<TCollections>;
|
|
259
|
+
/**
|
|
260
|
+
* Declare a schema field that stores a reference to another content entry.
|
|
261
|
+
*
|
|
262
|
+
* Use the optional `collection` argument when the field must target a single
|
|
263
|
+
* collection. Omit it to allow references across collections.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```ts
|
|
267
|
+
* import { z } from 'zod'
|
|
268
|
+
* import { defineCollection, reference } from '@lupinum/ginko-content/config'
|
|
269
|
+
*
|
|
270
|
+
* export default defineCollection({
|
|
271
|
+
* type: 'page',
|
|
272
|
+
* source: 'blog/*.md',
|
|
273
|
+
* schema: z.object({
|
|
274
|
+
* author: reference('authors'),
|
|
275
|
+
* related: z.array(reference('blog')).default([])
|
|
276
|
+
* })
|
|
277
|
+
* })
|
|
278
|
+
* ```
|
|
279
|
+
*/
|
|
280
|
+
export declare function reference(collection?: string): ContentReferenceSchema;
|
|
281
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CONTENT_REFERENCE_PREFIX } from "./reference.js";
|
|
3
|
+
export function defineCollection(name, config) {
|
|
4
|
+
const { type, source, sitemap, ...rest } = config;
|
|
5
|
+
const normalized = normalizeCollectionSource(source);
|
|
6
|
+
return {
|
|
7
|
+
name,
|
|
8
|
+
...normalized,
|
|
9
|
+
sitemap: sitemap ?? (type === "data" ? false : void 0),
|
|
10
|
+
...rest
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function normalizeCollectionSource(source) {
|
|
14
|
+
if (source === void 0) return {};
|
|
15
|
+
if (typeof source === "object" && !Array.isArray(source)) {
|
|
16
|
+
return {
|
|
17
|
+
source: source.include,
|
|
18
|
+
...source.exclude ? { exclude: source.exclude } : {}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return { source };
|
|
22
|
+
}
|
|
23
|
+
export function defineContentConfig(config) {
|
|
24
|
+
return config;
|
|
25
|
+
}
|
|
26
|
+
export function reference(collection) {
|
|
27
|
+
return z.string().describe(`${CONTENT_REFERENCE_PREFIX}${collection || ""}`);
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './content.js'
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import type { StorageValue } from 'unstorage';
|
|
2
|
+
type LayoutKey = string;
|
|
3
|
+
export interface ContentSeoImage {
|
|
4
|
+
src: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ContentSeoMeta {
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
image?: string | ContentSeoImage;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Internal metadata attached to every parsed content record.
|
|
16
|
+
*/
|
|
17
|
+
export interface ParsedContentInternalMeta {
|
|
18
|
+
/**
|
|
19
|
+
* Stable unique id for the parsed source record.
|
|
20
|
+
*/
|
|
21
|
+
_id: string;
|
|
22
|
+
/**
|
|
23
|
+
* Backing source name when multiple content sources are configured.
|
|
24
|
+
*/
|
|
25
|
+
_source?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Canonical content path. This is source-agnostic, so the same route can be
|
|
28
|
+
* backed by local files, remote storage, or generated data.
|
|
29
|
+
*/
|
|
30
|
+
_path?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Human-readable title resolved from frontmatter or generated metadata.
|
|
33
|
+
*/
|
|
34
|
+
title?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Human-readable summary used in listings, search, and SEO helpers.
|
|
37
|
+
*/
|
|
38
|
+
description?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Conventional SEO frontmatter shared by pages and app templates.
|
|
41
|
+
*/
|
|
42
|
+
seo?: ContentSeoMeta;
|
|
43
|
+
/**
|
|
44
|
+
* Stable authored alias for internal content links.
|
|
45
|
+
*/
|
|
46
|
+
ref?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Marks the document as a draft.
|
|
49
|
+
*/
|
|
50
|
+
_draft?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Marks the document as a partial that should not become a page by default.
|
|
53
|
+
*/
|
|
54
|
+
_partial?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Locale code for the concrete variant.
|
|
57
|
+
*/
|
|
58
|
+
_locale?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Locale-agnostic content identity used to resolve variants.
|
|
61
|
+
*/
|
|
62
|
+
_canonicalKey?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Requested route path before locale fallback.
|
|
65
|
+
*/
|
|
66
|
+
_requestedPath?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Requested public route before locale fallback.
|
|
69
|
+
*/
|
|
70
|
+
_requestedRoute?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Requested authored reference before locale fallback.
|
|
73
|
+
*/
|
|
74
|
+
_requestedRef?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Requested locale before locale fallback.
|
|
77
|
+
*/
|
|
78
|
+
_requestedLocale?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Resolved locale after locale fallback.
|
|
81
|
+
*/
|
|
82
|
+
_resolvedLocale?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the returned content was resolved through fallback.
|
|
85
|
+
*/
|
|
86
|
+
_fallback?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Locales that have a concrete variant for this document.
|
|
89
|
+
*/
|
|
90
|
+
_availableLocales?: string[];
|
|
91
|
+
/**
|
|
92
|
+
* Map of available locale code to its locale-specific path.
|
|
93
|
+
*/
|
|
94
|
+
_variantPaths?: Record<string, string>;
|
|
95
|
+
/**
|
|
96
|
+
* Resolved markdown `$ref` links for the current runtime locale.
|
|
97
|
+
*/
|
|
98
|
+
_resolvedRefs?: Record<string, string>;
|
|
99
|
+
/**
|
|
100
|
+
* Collection name, when matched by a configured collection glob.
|
|
101
|
+
*/
|
|
102
|
+
_collection?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Marks folder-scoped navigation metadata documents.
|
|
105
|
+
*/
|
|
106
|
+
_navigation?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Parsed document kind.
|
|
109
|
+
*/
|
|
110
|
+
_type?: 'markdown' | 'yaml' | 'json' | 'csv';
|
|
111
|
+
/**
|
|
112
|
+
* Source file path relative to the content root.
|
|
113
|
+
*/
|
|
114
|
+
_file?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Source file extension.
|
|
117
|
+
*/
|
|
118
|
+
_extension?: 'md' | 'yaml' | 'yml' | 'json' | 'json5' | 'csv';
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* One entry in a generated table of contents.
|
|
122
|
+
*/
|
|
123
|
+
export interface TocLink {
|
|
124
|
+
id: string;
|
|
125
|
+
text: string;
|
|
126
|
+
depth: number;
|
|
127
|
+
children?: TocLink[];
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Parsed table of contents generated from markdown headings.
|
|
131
|
+
*/
|
|
132
|
+
export interface Toc {
|
|
133
|
+
title: string;
|
|
134
|
+
depth: number;
|
|
135
|
+
searchDepth: number;
|
|
136
|
+
links: TocLink[];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Options object passed to a markdown plugin.
|
|
140
|
+
*/
|
|
141
|
+
export type MarkdownPluginOptions = Record<string, unknown>;
|
|
142
|
+
/**
|
|
143
|
+
* User-authored plugin declaration in module options.
|
|
144
|
+
*/
|
|
145
|
+
export type MarkdownPluginDescriptor = string | [string, MarkdownPluginOptions];
|
|
146
|
+
/**
|
|
147
|
+
* Normalized plugin declaration after resolution.
|
|
148
|
+
*/
|
|
149
|
+
export type ResolvedMarkdownPlugin = {
|
|
150
|
+
name: string;
|
|
151
|
+
options: MarkdownPluginOptions;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Object-shaped markdown AST node.
|
|
155
|
+
*/
|
|
156
|
+
export interface MarkdownNode {
|
|
157
|
+
type: string;
|
|
158
|
+
tag?: string;
|
|
159
|
+
value?: string;
|
|
160
|
+
props?: Record<string, unknown>;
|
|
161
|
+
content?: unknown;
|
|
162
|
+
children?: MarkdownNode[];
|
|
163
|
+
attributes?: Record<string, unknown>;
|
|
164
|
+
fmAttributes?: Record<string, unknown>;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Root node for the object-based markdown AST.
|
|
168
|
+
*/
|
|
169
|
+
export interface MarkdownRoot {
|
|
170
|
+
type: 'root';
|
|
171
|
+
children: MarkdownNode[];
|
|
172
|
+
props?: Record<string, any>;
|
|
173
|
+
toc?: Toc;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Resolved markdown runtime options.
|
|
177
|
+
*/
|
|
178
|
+
export interface MarkdownOptions {
|
|
179
|
+
plugins: ResolvedMarkdownPlugin[];
|
|
180
|
+
tags: Record<string, string>;
|
|
181
|
+
anchorLinks: {
|
|
182
|
+
depth: number;
|
|
183
|
+
exclude: number[];
|
|
184
|
+
};
|
|
185
|
+
image?: 'auto' | 'img' | 'nuxt-image';
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Flexible parsed content shape that allows user-defined frontmatter fields.
|
|
189
|
+
*/
|
|
190
|
+
export interface ParsedContentMeta extends ParsedContentInternalMeta {
|
|
191
|
+
/**
|
|
192
|
+
* Preferred layout key for page rendering.
|
|
193
|
+
*/
|
|
194
|
+
layout?: LayoutKey;
|
|
195
|
+
[key: string]: unknown;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Strict parsed content shape with no open-ended index signature.
|
|
199
|
+
*/
|
|
200
|
+
export interface StrictParsedContentMeta extends ParsedContentInternalMeta {
|
|
201
|
+
/**
|
|
202
|
+
* Preferred layout key for page rendering.
|
|
203
|
+
*/
|
|
204
|
+
layout?: LayoutKey;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Parsed content document including the rendered body payload.
|
|
208
|
+
*/
|
|
209
|
+
export interface ParsedContent extends ParsedContentMeta {
|
|
210
|
+
/**
|
|
211
|
+
* Optional excerpt payload.
|
|
212
|
+
*/
|
|
213
|
+
excerpt?: MarkdownRoot;
|
|
214
|
+
/**
|
|
215
|
+
* Parsed body payload. `null` means the source had no renderable body.
|
|
216
|
+
*/
|
|
217
|
+
body: MarkdownRoot | null;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Strict parsed content document including the rendered body payload.
|
|
221
|
+
*/
|
|
222
|
+
export interface StrictParsedContent extends StrictParsedContentMeta {
|
|
223
|
+
/**
|
|
224
|
+
* Optional excerpt payload.
|
|
225
|
+
*/
|
|
226
|
+
excerpt?: MarkdownRoot;
|
|
227
|
+
/**
|
|
228
|
+
* Parsed body payload. `null` means the source had no renderable body.
|
|
229
|
+
*/
|
|
230
|
+
body: MarkdownRoot | null;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Specialized parsed content shape for markdown sources.
|
|
234
|
+
*/
|
|
235
|
+
export interface MarkdownParsedContent extends ParsedContent {
|
|
236
|
+
_type: 'markdown';
|
|
237
|
+
/**
|
|
238
|
+
* Whether the markdown source rendered no meaningful body content.
|
|
239
|
+
*/
|
|
240
|
+
_empty: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Description resolved from frontmatter or excerpt generation.
|
|
243
|
+
*/
|
|
244
|
+
description: string;
|
|
245
|
+
/**
|
|
246
|
+
* Object AST excerpt generated from the markdown body.
|
|
247
|
+
*/
|
|
248
|
+
excerpt?: MarkdownRoot;
|
|
249
|
+
/**
|
|
250
|
+
* Parsed Markdown body with included table of contents.
|
|
251
|
+
*/
|
|
252
|
+
body: MarkdownRoot & {
|
|
253
|
+
toc?: Toc;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Transformer hook used during ingestion.
|
|
258
|
+
*/
|
|
259
|
+
export interface ContentTransformer {
|
|
260
|
+
/**
|
|
261
|
+
* Stable transformer name used in logs and generated manifests.
|
|
262
|
+
*/
|
|
263
|
+
name: string;
|
|
264
|
+
/**
|
|
265
|
+
* File extensions handled by the transformer.
|
|
266
|
+
*/
|
|
267
|
+
extensions: string[];
|
|
268
|
+
/**
|
|
269
|
+
* Optional parse hook that turns raw source content into a parsed document.
|
|
270
|
+
*/
|
|
271
|
+
parse?(id: string, content: StorageValue, options: unknown): Promise<ParsedContent> | ParsedContent;
|
|
272
|
+
/**
|
|
273
|
+
* Optional post-parse hook that mutates or enriches a parsed document.
|
|
274
|
+
*/
|
|
275
|
+
transform?(content: ParsedContent, options: unknown): Promise<ParsedContent> | ParsedContent;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Ingestion options passed to the transform pipeline.
|
|
279
|
+
*/
|
|
280
|
+
export interface TransformContentOptions {
|
|
281
|
+
transformers?: ContentTransformer[];
|
|
282
|
+
[key: string]: unknown;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Navigation node returned by content navigation helpers.
|
|
286
|
+
*/
|
|
287
|
+
export interface NavItem {
|
|
288
|
+
title: string;
|
|
289
|
+
/**
|
|
290
|
+
* Nuxt Content compatible route path used by Nuxt UI content components.
|
|
291
|
+
*/
|
|
292
|
+
path: string;
|
|
293
|
+
/**
|
|
294
|
+
* Canonical content route without locale prefix.
|
|
295
|
+
*/
|
|
296
|
+
_path: string;
|
|
297
|
+
stem?: string;
|
|
298
|
+
page?: false;
|
|
299
|
+
_id?: string;
|
|
300
|
+
_canonicalKey?: string;
|
|
301
|
+
_locale?: string;
|
|
302
|
+
_fallback?: boolean;
|
|
303
|
+
_draft?: boolean;
|
|
304
|
+
children?: NavItem[];
|
|
305
|
+
[key: string]: unknown;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Public alias for navigation items returned by query helpers.
|
|
309
|
+
*/
|
|
310
|
+
export type ContentNavigationItem = NavItem;
|
|
311
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fields.js'
|