@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,81 @@
|
|
|
1
|
+
import { z, type ZodTypeAny } from 'zod';
|
|
2
|
+
export declare const CONTENT_FIELD_METADATA_KEY: unique symbol;
|
|
3
|
+
export type ContentFieldMetadata = {
|
|
4
|
+
type: 'text' | 'textarea' | 'richtext' | 'slug' | 'email' | 'url' | 'number' | 'boolean' | 'date' | 'datetime' | 'select' | 'json' | 'object' | 'array' | 'relation' | 'relations' | 'image' | 'asset' | 'file' | 'icon';
|
|
5
|
+
label?: string | Record<string, string> | null;
|
|
6
|
+
description?: string | null;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
localized?: boolean;
|
|
9
|
+
options?: string[] | null;
|
|
10
|
+
relation?: {
|
|
11
|
+
collectionId: string;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
} | null;
|
|
14
|
+
slugFrom?: string | null;
|
|
15
|
+
image?: {
|
|
16
|
+
aspectRatio?: string;
|
|
17
|
+
accept?: string[];
|
|
18
|
+
} | null;
|
|
19
|
+
asset?: {
|
|
20
|
+
kind?: 'asset' | 'file';
|
|
21
|
+
accept?: string[];
|
|
22
|
+
} | null;
|
|
23
|
+
};
|
|
24
|
+
export type ContentFieldSchema<T extends ZodTypeAny = ZodTypeAny, TRequired extends ZodTypeAny = T> = T & {
|
|
25
|
+
[CONTENT_FIELD_METADATA_KEY]?: ContentFieldMetadata;
|
|
26
|
+
required(): ContentFieldSchema<TRequired, TRequired>;
|
|
27
|
+
label(value: string | Record<string, string> | null): ContentFieldSchema<T, TRequired>;
|
|
28
|
+
help(value: string | null): ContentFieldSchema<T, TRequired>;
|
|
29
|
+
localized(value?: boolean): ContentFieldSchema<T, TRequired>;
|
|
30
|
+
shared(): ContentFieldSchema<T, TRequired>;
|
|
31
|
+
};
|
|
32
|
+
export declare function getContentFieldMetadata(schema: unknown): ContentFieldMetadata | null;
|
|
33
|
+
export declare function isContentFieldSchema(schema: unknown): schema is ContentFieldSchema;
|
|
34
|
+
export declare const fields: {
|
|
35
|
+
object<const Shape extends z.ZodRawShape>(shape: Shape): ContentFieldSchema<z.ZodObject<{ -readonly [P in keyof Shape]: Shape[P]; }, z.core.$strip>, z.ZodObject<{ -readonly [P in keyof Shape]: Shape[P]; }, z.core.$strip>>;
|
|
36
|
+
array<Item extends ZodTypeAny>(item: Item): ContentFieldSchema<z.ZodOptional<z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>, z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
37
|
+
text: () => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
38
|
+
textarea: () => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
39
|
+
richtext: () => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
40
|
+
markdown: () => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
41
|
+
slug: (options?: {
|
|
42
|
+
from?: string;
|
|
43
|
+
}) => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
44
|
+
email: () => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
45
|
+
url: () => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
46
|
+
number: () => ContentFieldSchema<z.ZodOptional<z.ZodNumber>, z.ZodNumber>;
|
|
47
|
+
boolean: () => ContentFieldSchema<z.ZodOptional<z.ZodBoolean>, z.ZodBoolean>;
|
|
48
|
+
toggle: () => ContentFieldSchema<z.ZodOptional<z.ZodBoolean>, z.ZodBoolean>;
|
|
49
|
+
date: () => ContentFieldSchema<z.ZodOptional<z.ZodCoercedDate<unknown>>, z.ZodCoercedDate<unknown>>;
|
|
50
|
+
datetime: () => ContentFieldSchema<z.ZodOptional<z.ZodCoercedDate<unknown>>, z.ZodCoercedDate<unknown>>;
|
|
51
|
+
select<const Values extends readonly [string, ...string[]]>(values: Values): ContentFieldSchema<z.ZodOptional<z.ZodEnum<{ [k_1 in Values[number]]: k_1; } extends infer T ? { [k in keyof T]: T[k]; } : never>>, z.ZodEnum<{ [k_1 in Values[number]]: k_1; } extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never>>;
|
|
52
|
+
enum<const Values extends readonly [string, ...string[]]>(values: Values): ContentFieldSchema<z.ZodOptional<z.ZodEnum<{ [k_1 in Values[number]]: k_1; } extends infer T ? { [k in keyof T]: T[k]; } : never>>, z.ZodEnum<{ [k_1 in Values[number]]: k_1; } extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never>>;
|
|
53
|
+
json: () => ContentFieldSchema<z.ZodOptional<z.ZodUnknown>, z.ZodUnknown>;
|
|
54
|
+
icon: () => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
55
|
+
image(options?: {
|
|
56
|
+
aspectRatio?: string;
|
|
57
|
+
accept?: string[];
|
|
58
|
+
}): ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
59
|
+
asset(options?: {
|
|
60
|
+
accept?: string[];
|
|
61
|
+
}): ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
62
|
+
file(options?: {
|
|
63
|
+
accept?: string[];
|
|
64
|
+
}): ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
65
|
+
relation(collection: string): ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
66
|
+
relations(collection: string): ContentFieldSchema<z.ZodOptional<z.ZodArray<z.ZodString>>, z.ZodArray<z.ZodString>>;
|
|
67
|
+
};
|
|
68
|
+
export declare const image: (options?: {
|
|
69
|
+
aspectRatio?: string;
|
|
70
|
+
accept?: string[];
|
|
71
|
+
}) => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
72
|
+
export declare const asset: (options?: {
|
|
73
|
+
accept?: string[];
|
|
74
|
+
}) => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
75
|
+
export declare const file: (options?: {
|
|
76
|
+
accept?: string[];
|
|
77
|
+
}) => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
78
|
+
export declare const relation: (collection: string) => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
79
|
+
export declare const relations: (collection: string) => ContentFieldSchema<z.ZodOptional<z.ZodArray<z.ZodString>>, z.ZodArray<z.ZodString>>;
|
|
80
|
+
export declare const richtext: () => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
81
|
+
export declare const text: () => ContentFieldSchema<z.ZodOptional<z.ZodString>, z.ZodString>;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CONTENT_REFERENCE_PREFIX } from "./reference.js";
|
|
3
|
+
export const CONTENT_FIELD_METADATA_KEY = Symbol.for("lupinum.ginko-content.field-metadata");
|
|
4
|
+
function readFieldMetadata(schema) {
|
|
5
|
+
const value = schema?.[CONTENT_FIELD_METADATA_KEY];
|
|
6
|
+
return value ? { ...value } : null;
|
|
7
|
+
}
|
|
8
|
+
function writeFieldMetadata(schema, metadata) {
|
|
9
|
+
Object.defineProperty(schema, CONTENT_FIELD_METADATA_KEY, {
|
|
10
|
+
configurable: true,
|
|
11
|
+
enumerable: false,
|
|
12
|
+
value: metadata,
|
|
13
|
+
writable: true
|
|
14
|
+
});
|
|
15
|
+
return schema;
|
|
16
|
+
}
|
|
17
|
+
function cloneMetadata(metadata, patch) {
|
|
18
|
+
return { ...metadata, ...patch };
|
|
19
|
+
}
|
|
20
|
+
function decorate(schema, metadata, requiredSchema = schema) {
|
|
21
|
+
const decorated = writeFieldMetadata(schema, metadata);
|
|
22
|
+
decorated.required = () => decorate(requiredSchema, cloneMetadata(metadata, { required: true }));
|
|
23
|
+
decorated.label = (value) => decorate(schema, cloneMetadata(metadata, { label: value }), requiredSchema);
|
|
24
|
+
decorated.help = (value) => decorate(schema, cloneMetadata(metadata, { description: value }), requiredSchema);
|
|
25
|
+
decorated.localized = (value = true) => decorate(schema, cloneMetadata(metadata, { localized: value }), requiredSchema);
|
|
26
|
+
decorated.shared = () => decorate(schema, cloneMetadata(metadata, { localized: false }), requiredSchema);
|
|
27
|
+
return decorated;
|
|
28
|
+
}
|
|
29
|
+
function optionalField(requiredSchema, metadata) {
|
|
30
|
+
const optionalSchema = requiredSchema.optional();
|
|
31
|
+
writeFieldMetadata(requiredSchema, cloneMetadata(metadata, { required: true }));
|
|
32
|
+
return decorate(optionalSchema, cloneMetadata(metadata, { required: false }), requiredSchema);
|
|
33
|
+
}
|
|
34
|
+
function textLike(type) {
|
|
35
|
+
return optionalField(z.string(), { type });
|
|
36
|
+
}
|
|
37
|
+
function getZodType(schema) {
|
|
38
|
+
const definition = schema?._def;
|
|
39
|
+
return typeof definition?.type === "string" ? definition.type : typeof definition?.typeName === "string" ? definition.typeName.replace(/^Zod/, "").toLowerCase() : void 0;
|
|
40
|
+
}
|
|
41
|
+
function requiredArrayItem(item) {
|
|
42
|
+
if (!readFieldMetadata(item)) return item;
|
|
43
|
+
let current = item;
|
|
44
|
+
while (current) {
|
|
45
|
+
const type = getZodType(current);
|
|
46
|
+
if (type !== "optional" && type !== "nullable" && type !== "default" && type !== "catch") {
|
|
47
|
+
return current;
|
|
48
|
+
}
|
|
49
|
+
const innerType = current._def.innerType;
|
|
50
|
+
if (!innerType) return current;
|
|
51
|
+
current = innerType;
|
|
52
|
+
}
|
|
53
|
+
return item;
|
|
54
|
+
}
|
|
55
|
+
export function getContentFieldMetadata(schema) {
|
|
56
|
+
return readFieldMetadata(schema);
|
|
57
|
+
}
|
|
58
|
+
export function isContentFieldSchema(schema) {
|
|
59
|
+
return getContentFieldMetadata(schema) !== null;
|
|
60
|
+
}
|
|
61
|
+
export const fields = {
|
|
62
|
+
object(shape) {
|
|
63
|
+
return decorate(z.object(shape), { type: "object", required: true });
|
|
64
|
+
},
|
|
65
|
+
array(item) {
|
|
66
|
+
const metadata = readFieldMetadata(item);
|
|
67
|
+
const itemSchema = requiredArrayItem(item);
|
|
68
|
+
const type = metadata?.type === "relation" ? "relations" : "array";
|
|
69
|
+
const relation2 = metadata?.type === "relation" && metadata.relation ? { ...metadata.relation, multiple: true } : metadata?.type === "relations" ? metadata.relation : null;
|
|
70
|
+
return optionalField(z.array(itemSchema), {
|
|
71
|
+
type,
|
|
72
|
+
...relation2 ? { relation: relation2 } : {}
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
text: () => textLike("text"),
|
|
76
|
+
textarea: () => textLike("textarea"),
|
|
77
|
+
richtext: () => textLike("richtext"),
|
|
78
|
+
markdown: () => textLike("richtext"),
|
|
79
|
+
slug: (options = {}) => optionalField(z.string(), { type: "slug", slugFrom: options.from ?? null }),
|
|
80
|
+
email: () => optionalField(z.string().email(), { type: "email" }),
|
|
81
|
+
url: () => optionalField(z.string().url(), { type: "url" }),
|
|
82
|
+
number: () => optionalField(z.number(), { type: "number", localized: false }),
|
|
83
|
+
boolean: () => optionalField(z.boolean(), { type: "boolean", localized: false }),
|
|
84
|
+
toggle: () => optionalField(z.boolean(), { type: "boolean", localized: false }),
|
|
85
|
+
date: () => optionalField(z.coerce.date(), { type: "date", localized: false }),
|
|
86
|
+
datetime: () => optionalField(z.coerce.date(), { type: "datetime", localized: false }),
|
|
87
|
+
select(values) {
|
|
88
|
+
return optionalField(z.enum(values), { type: "select", options: [...values] });
|
|
89
|
+
},
|
|
90
|
+
enum(values) {
|
|
91
|
+
return fields.select(values);
|
|
92
|
+
},
|
|
93
|
+
json: () => optionalField(z.unknown(), { type: "json" }),
|
|
94
|
+
icon: () => optionalField(z.string(), { type: "icon" }),
|
|
95
|
+
image(options = {}) {
|
|
96
|
+
return optionalField(z.string(), {
|
|
97
|
+
type: "image",
|
|
98
|
+
localized: false,
|
|
99
|
+
image: {
|
|
100
|
+
...options.aspectRatio ? { aspectRatio: options.aspectRatio } : {},
|
|
101
|
+
...options.accept ? { accept: options.accept } : {}
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
asset(options = {}) {
|
|
106
|
+
return optionalField(z.string(), {
|
|
107
|
+
type: "asset",
|
|
108
|
+
localized: false,
|
|
109
|
+
asset: {
|
|
110
|
+
kind: "asset",
|
|
111
|
+
...options.accept ? { accept: options.accept } : {}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
file(options = {}) {
|
|
116
|
+
return optionalField(z.string(), {
|
|
117
|
+
type: "file",
|
|
118
|
+
localized: false,
|
|
119
|
+
asset: {
|
|
120
|
+
kind: "file",
|
|
121
|
+
...options.accept ? { accept: options.accept } : {}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
relation(collection) {
|
|
126
|
+
return optionalField(z.string().describe(`${CONTENT_REFERENCE_PREFIX}${collection}`), {
|
|
127
|
+
type: "relation",
|
|
128
|
+
localized: false,
|
|
129
|
+
relation: { collectionId: collection, multiple: false }
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
relations(collection) {
|
|
133
|
+
return optionalField(z.array(z.string().describe(`${CONTENT_REFERENCE_PREFIX}${collection}`)), {
|
|
134
|
+
type: "relations",
|
|
135
|
+
localized: false,
|
|
136
|
+
relation: { collectionId: collection, multiple: true }
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
export const image = fields.image;
|
|
141
|
+
export const asset = fields.asset;
|
|
142
|
+
export const file = fields.file;
|
|
143
|
+
export const relation = fields.relation;
|
|
144
|
+
export const relations = fields.relations;
|
|
145
|
+
export const richtext = fields.richtext;
|
|
146
|
+
export const text = fields.text;
|
package/dist/types/index
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './module.js'
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import type { ListenOptions } from 'listhen';
|
|
2
|
+
import type { MarkdownPluginDescriptor } from './content';
|
|
3
|
+
import type { ContentCollectionConfig, ContentProviderName } from './config';
|
|
4
|
+
import type { ContentQueryBuilderWhere } from './query';
|
|
5
|
+
import type { ContentMiniSearchOptions, ContentSearchEngine } from './search';
|
|
6
|
+
export type MountOptions = {
|
|
7
|
+
driver: 'fs' | 'http' | string;
|
|
8
|
+
name?: string;
|
|
9
|
+
prefix?: string;
|
|
10
|
+
[options: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
export interface ContentI18nOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Enable locale-aware content behavior.
|
|
15
|
+
*
|
|
16
|
+
* `true` means "detect from Nuxt I18n and/or content.config".
|
|
17
|
+
*
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* List of locale codes used by content.
|
|
23
|
+
*
|
|
24
|
+
* @default []
|
|
25
|
+
*/
|
|
26
|
+
locales?: string[];
|
|
27
|
+
/**
|
|
28
|
+
* Default locale for top level contents.
|
|
29
|
+
*
|
|
30
|
+
* @default undefined
|
|
31
|
+
*/
|
|
32
|
+
defaultLocale?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Ordered locale fallback chains keyed by locale code.
|
|
35
|
+
*
|
|
36
|
+
* @default {}
|
|
37
|
+
*/
|
|
38
|
+
fallback?: Record<string, string[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Use numeric prefixes as the canonical cross-locale identity source.
|
|
41
|
+
*
|
|
42
|
+
* Example:
|
|
43
|
+
* `en/1.guide/1.getting-started.md` and `de/1.leitfaden/1.erste-schritte.md`
|
|
44
|
+
* share the same canonical key `1/1`.
|
|
45
|
+
*
|
|
46
|
+
* This is intentionally opt-in.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
translatedSlugs?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Treat translated-slug warnings as build/runtime validation errors.
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
strictTranslatedSlugs?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface ContentSitemapOptions {
|
|
59
|
+
/**
|
|
60
|
+
* Route suffix appended to `content.api.baseURL`.
|
|
61
|
+
*
|
|
62
|
+
* @default '/sitemap'
|
|
63
|
+
*/
|
|
64
|
+
path?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Collections to include in the generated content sitemap source.
|
|
67
|
+
*
|
|
68
|
+
* When omitted, all configured collections are considered.
|
|
69
|
+
*
|
|
70
|
+
* @default undefined
|
|
71
|
+
*/
|
|
72
|
+
include?: string[];
|
|
73
|
+
/**
|
|
74
|
+
* Collections to exclude from the generated content sitemap source.
|
|
75
|
+
*
|
|
76
|
+
* @default []
|
|
77
|
+
*/
|
|
78
|
+
exclude?: string[];
|
|
79
|
+
/**
|
|
80
|
+
* Include draft content in sitemap entries.
|
|
81
|
+
*
|
|
82
|
+
* Production default is `false`.
|
|
83
|
+
* Development remains permissive for easier debugging.
|
|
84
|
+
*
|
|
85
|
+
* @default undefined
|
|
86
|
+
*/
|
|
87
|
+
includeDrafts?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Optional build-time validation for generated sitemap output.
|
|
90
|
+
*
|
|
91
|
+
* This is intended as a release-safety check for content-heavy sites where
|
|
92
|
+
* shipping an empty docs/blog sitemap is a production failure.
|
|
93
|
+
*
|
|
94
|
+
* @default disabled
|
|
95
|
+
*/
|
|
96
|
+
assert?: ContentSitemapAssertOptions;
|
|
97
|
+
}
|
|
98
|
+
export interface ContentSitemapAssertSitemapOptions {
|
|
99
|
+
/**
|
|
100
|
+
* Allow this sitemap to contain zero URLs.
|
|
101
|
+
*
|
|
102
|
+
* When `true`, URL count assertions are skipped for this sitemap.
|
|
103
|
+
*
|
|
104
|
+
* @default inherits global `allowEmpty`
|
|
105
|
+
*/
|
|
106
|
+
allowEmpty?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Minimum number of URLs required for this sitemap.
|
|
109
|
+
*
|
|
110
|
+
* @default inherits global `minUrlsPerSitemap`
|
|
111
|
+
*/
|
|
112
|
+
minUrls?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Require at least one image entry in this sitemap.
|
|
115
|
+
*
|
|
116
|
+
* @default inherits global `requireImages`
|
|
117
|
+
*/
|
|
118
|
+
requireImages?: boolean;
|
|
119
|
+
}
|
|
120
|
+
export interface ContentSitemapAssertOptions {
|
|
121
|
+
/**
|
|
122
|
+
* Enable sitemap artifact assertions.
|
|
123
|
+
*
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
enabled?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Which build path should enforce assertions.
|
|
129
|
+
*
|
|
130
|
+
* `generate` maps to static generation, `build` maps to non-static builds,
|
|
131
|
+
* and `both` enables both paths.
|
|
132
|
+
*
|
|
133
|
+
* @default 'generate'
|
|
134
|
+
*/
|
|
135
|
+
mode?: 'generate' | 'build' | 'both';
|
|
136
|
+
/**
|
|
137
|
+
* Allow discovered sitemap files to contain zero URLs.
|
|
138
|
+
*
|
|
139
|
+
* @default false
|
|
140
|
+
*/
|
|
141
|
+
allowEmpty?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Minimum number of URLs required in each discovered sitemap.
|
|
144
|
+
*
|
|
145
|
+
* @default 1
|
|
146
|
+
*/
|
|
147
|
+
minUrlsPerSitemap?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Require at least one image entry in each discovered sitemap.
|
|
150
|
+
*
|
|
151
|
+
* @default false
|
|
152
|
+
*/
|
|
153
|
+
requireImages?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Collections that must contribute at least one route to the content sitemap.
|
|
156
|
+
*
|
|
157
|
+
* This is preferred over hardcoded URL checks because it asserts the real
|
|
158
|
+
* content invariant rather than a single route sample.
|
|
159
|
+
*
|
|
160
|
+
* @default []
|
|
161
|
+
*/
|
|
162
|
+
requiredCollections?: string[];
|
|
163
|
+
/**
|
|
164
|
+
* Optional per-sitemap overrides keyed by sitemap name, for example `en-US`.
|
|
165
|
+
*
|
|
166
|
+
* @default {}
|
|
167
|
+
*/
|
|
168
|
+
sitemaps?: Record<string, ContentSitemapAssertSitemapOptions>;
|
|
169
|
+
}
|
|
170
|
+
export interface ContentSearchOptions {
|
|
171
|
+
/**
|
|
172
|
+
* Base route used for the built-in search api.
|
|
173
|
+
*
|
|
174
|
+
* Defaults to `${content.api.baseURL}/search`.
|
|
175
|
+
*/
|
|
176
|
+
apiBaseURL?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Search engine used by `useContentSearchResults`.
|
|
179
|
+
*
|
|
180
|
+
* @default 'minisearch'
|
|
181
|
+
*/
|
|
182
|
+
engine?: ContentSearchEngine;
|
|
183
|
+
/**
|
|
184
|
+
* HTML tags ignored when flattening rich content into search text.
|
|
185
|
+
*
|
|
186
|
+
* @default ['script', 'style', 'pre']
|
|
187
|
+
*/
|
|
188
|
+
ignoredTags?: string[];
|
|
189
|
+
/**
|
|
190
|
+
* Query predicate applied before records are indexed.
|
|
191
|
+
*
|
|
192
|
+
* @default { _draft: false, _partial: false }
|
|
193
|
+
*/
|
|
194
|
+
filterQuery?: ContentQueryBuilderWhere;
|
|
195
|
+
/**
|
|
196
|
+
* Collections included in the built-in index.
|
|
197
|
+
*
|
|
198
|
+
* When omitted, all configured collections are indexed.
|
|
199
|
+
*/
|
|
200
|
+
collections?: string[];
|
|
201
|
+
/**
|
|
202
|
+
* Extra top-level document fields copied into each generated search record.
|
|
203
|
+
*
|
|
204
|
+
* Use this when `minisearch.fields`, `minisearch.storeFields`, or
|
|
205
|
+
* `minisearch.boost` refer to frontmatter fields such as `tags`.
|
|
206
|
+
*
|
|
207
|
+
* @default []
|
|
208
|
+
*/
|
|
209
|
+
extraFields?: string[];
|
|
210
|
+
/**
|
|
211
|
+
* MiniSearch index and ranking options.
|
|
212
|
+
*/
|
|
213
|
+
minisearch?: Partial<ContentMiniSearchOptions>;
|
|
214
|
+
}
|
|
215
|
+
export interface ContentPreviewOptions {
|
|
216
|
+
/**
|
|
217
|
+
* Server-side token required before preview storage can be read.
|
|
218
|
+
*/
|
|
219
|
+
token?: string;
|
|
220
|
+
}
|
|
221
|
+
export interface ContentRevalidateOptions {
|
|
222
|
+
/**
|
|
223
|
+
* Server-side token required before the built-in revalidation endpoint accepts
|
|
224
|
+
* tag/path invalidation requests.
|
|
225
|
+
*/
|
|
226
|
+
token: string;
|
|
227
|
+
/**
|
|
228
|
+
* Allow token-only revalidation requests without HMAC headers.
|
|
229
|
+
*
|
|
230
|
+
* This is intended for local/dev compatibility only. Production CMS delivery
|
|
231
|
+
* should leave this disabled so requests are timestamped and signed.
|
|
232
|
+
*
|
|
233
|
+
* @default false
|
|
234
|
+
*/
|
|
235
|
+
allowUnsigned?: boolean;
|
|
236
|
+
}
|
|
237
|
+
export interface ModuleOptions {
|
|
238
|
+
api: {
|
|
239
|
+
/**
|
|
240
|
+
* Base route that will be used for content api
|
|
241
|
+
*
|
|
242
|
+
* @default '/api/_content'
|
|
243
|
+
*/
|
|
244
|
+
baseURL: string;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Locale-aware content behavior.
|
|
248
|
+
*/
|
|
249
|
+
i18n: boolean | ContentI18nOptions;
|
|
250
|
+
/**
|
|
251
|
+
* Content-owned sitemap source configuration for Nuxt SEO.
|
|
252
|
+
*
|
|
253
|
+
* When enabled, Ginko exposes a JSON endpoint that can be consumed by
|
|
254
|
+
* `@nuxtjs/sitemap` through `sitemap.sources`.
|
|
255
|
+
*/
|
|
256
|
+
sitemap: boolean | ContentSitemapOptions;
|
|
257
|
+
/**
|
|
258
|
+
* Built-in full-text search configuration.
|
|
259
|
+
*
|
|
260
|
+
* When enabled, Ginko exposes JSON/Pagefind search endpoints under
|
|
261
|
+
* the content api base route. Import `useContentSearchResults()` from
|
|
262
|
+
* `@lupinum/ginko-content/client` to consume them from app components.
|
|
263
|
+
*/
|
|
264
|
+
search: false | ContentSearchOptions;
|
|
265
|
+
/**
|
|
266
|
+
* Preview storage access configuration.
|
|
267
|
+
*
|
|
268
|
+
* Preview mode is disabled unless a token is configured and the incoming
|
|
269
|
+
* preview token matches it.
|
|
270
|
+
*/
|
|
271
|
+
preview?: false | ContentPreviewOptions;
|
|
272
|
+
/**
|
|
273
|
+
* Built-in cache revalidation endpoint configuration.
|
|
274
|
+
*
|
|
275
|
+
* When a token is configured, callers must send it as
|
|
276
|
+
* `x-ginko-revalidate-token` or `authorization: Bearer <token>`.
|
|
277
|
+
*/
|
|
278
|
+
revalidate?: false | ContentRevalidateOptions;
|
|
279
|
+
/**
|
|
280
|
+
* Optional server-side cache adapter module.
|
|
281
|
+
*
|
|
282
|
+
* The module must default-export a `ContentCacheAdapter`, or export one as
|
|
283
|
+
* `contentCacheAdapter` or `cacheAdapter`.
|
|
284
|
+
*/
|
|
285
|
+
cache?: false | string;
|
|
286
|
+
/**
|
|
287
|
+
* Disable content watcher and hot content reload.
|
|
288
|
+
* Note: Watcher is a development feature and will not includes in the production.
|
|
289
|
+
*
|
|
290
|
+
* @default true
|
|
291
|
+
*/
|
|
292
|
+
watch: false | {
|
|
293
|
+
ws: Partial<ListenOptions>;
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* Contents can be located in multiple places, in multiple directories or even in remote git repositories.
|
|
297
|
+
* Using sources option you can tell Content module where to look for contents.
|
|
298
|
+
*
|
|
299
|
+
* @default ['content']
|
|
300
|
+
*/
|
|
301
|
+
sources: Record<string, MountOptions>;
|
|
302
|
+
/**
|
|
303
|
+
* List of ignore patterns that will be used to exclude content from parsing, rendering and watching.
|
|
304
|
+
*
|
|
305
|
+
* Note that files with a leading . or - are ignored by default
|
|
306
|
+
*
|
|
307
|
+
* @default []
|
|
308
|
+
*/
|
|
309
|
+
ignores: Array<string>;
|
|
310
|
+
/**
|
|
311
|
+
* Content module uses Comark under the hood to parse markdown files.
|
|
312
|
+
*/
|
|
313
|
+
markdown: {
|
|
314
|
+
/**
|
|
315
|
+
* Tags will be used to replace markdown components and render custom components instead of default ones.
|
|
316
|
+
*
|
|
317
|
+
* @default {}
|
|
318
|
+
*/
|
|
319
|
+
tags?: Record<string, string>;
|
|
320
|
+
/**
|
|
321
|
+
* Ordered list of Comark plugin descriptors.
|
|
322
|
+
*
|
|
323
|
+
* @default []
|
|
324
|
+
*/
|
|
325
|
+
plugins?: MarkdownPluginDescriptor[];
|
|
326
|
+
/**
|
|
327
|
+
* Anchor link generation config
|
|
328
|
+
*
|
|
329
|
+
* @default {}
|
|
330
|
+
*/
|
|
331
|
+
anchorLinks?: boolean | {
|
|
332
|
+
/**
|
|
333
|
+
* Sets the maximal depth for anchor link generation
|
|
334
|
+
*
|
|
335
|
+
* @default 4
|
|
336
|
+
*/
|
|
337
|
+
depth?: number;
|
|
338
|
+
/**
|
|
339
|
+
* Excludes headings from link generation when they are in the depth range.
|
|
340
|
+
*
|
|
341
|
+
* @default [1]
|
|
342
|
+
*/
|
|
343
|
+
exclude?: number[];
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Markdown image renderer.
|
|
347
|
+
*
|
|
348
|
+
* `auto` uses Nuxt Image when `<NuxtImg>` is available and otherwise
|
|
349
|
+
* falls back to a native `<img>`.
|
|
350
|
+
*
|
|
351
|
+
* @default 'auto'
|
|
352
|
+
*/
|
|
353
|
+
image?: 'auto' | 'img' | 'nuxt-image';
|
|
354
|
+
};
|
|
355
|
+
/**
|
|
356
|
+
* Options for yaml parser.
|
|
357
|
+
*
|
|
358
|
+
* @default {}
|
|
359
|
+
*/
|
|
360
|
+
yaml: false | Record<string, unknown>;
|
|
361
|
+
/**
|
|
362
|
+
* Options for yaml parser.
|
|
363
|
+
*
|
|
364
|
+
* @default {}
|
|
365
|
+
*/
|
|
366
|
+
csv: false | {
|
|
367
|
+
json?: boolean;
|
|
368
|
+
delimiter?: string;
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* Enable/Disable navigation.
|
|
372
|
+
*
|
|
373
|
+
* @default {}
|
|
374
|
+
*/
|
|
375
|
+
navigation: false | {
|
|
376
|
+
fields: Array<string>;
|
|
377
|
+
};
|
|
378
|
+
/**
|
|
379
|
+
* Typed collection definitions loaded from `content.config.*`.
|
|
380
|
+
*
|
|
381
|
+
* Globs are relative to the content source root.
|
|
382
|
+
*
|
|
383
|
+
* @default {}
|
|
384
|
+
*/
|
|
385
|
+
collections?: Record<string, ContentCollectionConfig>;
|
|
386
|
+
/**
|
|
387
|
+
* Backing implementation for public content reads.
|
|
388
|
+
*
|
|
389
|
+
* `filesystem` is the default. `cms`, `ginko-cms`, and `ginko` resolve to the
|
|
390
|
+
* official Ginko CMS provider when `@lupinum/ginko-cms` is installed.
|
|
391
|
+
*/
|
|
392
|
+
provider?: ContentProviderName;
|
|
393
|
+
/**
|
|
394
|
+
* External provider modules keyed by provider name.
|
|
395
|
+
*/
|
|
396
|
+
providers?: Record<string, string>;
|
|
397
|
+
/**
|
|
398
|
+
* Enable automatic usage of `useContentHead`
|
|
399
|
+
*
|
|
400
|
+
* @default true
|
|
401
|
+
*/
|
|
402
|
+
contentHead?: boolean;
|
|
403
|
+
/**
|
|
404
|
+
* Enable to keep uppercase characters in the generated routes.
|
|
405
|
+
*
|
|
406
|
+
* @default false
|
|
407
|
+
*/
|
|
408
|
+
respectPathCase: boolean;
|
|
409
|
+
experimental: {
|
|
410
|
+
stripQueryParameters?: boolean;
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
export interface ResolvedContentI18nOptions {
|
|
414
|
+
locales: string[];
|
|
415
|
+
defaultLocale?: string;
|
|
416
|
+
fallback: Record<string, string[]>;
|
|
417
|
+
translatedSlugs: boolean;
|
|
418
|
+
strictTranslatedSlugs: boolean;
|
|
419
|
+
}
|
|
420
|
+
export interface ContentContext extends ModuleOptions {
|
|
421
|
+
transformers: Array<string>;
|
|
422
|
+
sitemap: false | ContentSitemapOptions;
|
|
423
|
+
locales: string[];
|
|
424
|
+
defaultLocale?: string;
|
|
425
|
+
localeFallback: Record<string, string[]>;
|
|
426
|
+
translatedSlugs: boolean;
|
|
427
|
+
strictTranslatedSlugs: boolean;
|
|
428
|
+
}
|
|
File without changes
|
package/dist/types/query
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './query.js'
|