@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 @@
|
|
|
1
|
+
export * from './server.js'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side public API surface (Nitro / H3 contexts).
|
|
3
|
+
*
|
|
4
|
+
* The unified query API (ADR-0016) is the same on the server as on the client
|
|
5
|
+
* — same option shapes, same handle objects, same types. Pure functions are
|
|
6
|
+
* re-exported here for ergonomic discoverability from `@lupinum/ginko-content/server`.
|
|
7
|
+
*/
|
|
8
|
+
export { one, many, paginate, backlinks, resolveOne, variants, tree, neighbors, createServerContentQueryContext } from '../runtime/server/query-api.js';
|
|
9
|
+
export { getCollectionPath } from '../runtime/query/routes.js';
|
|
10
|
+
export type { CollectionPathOptions } from '../runtime/query/routes.js';
|
|
11
|
+
export type { QueryWhere, QueryOperators, ContentSelector, ContentPageResult, ContentQueryBuilderParams, ContentRouteMeta, ContentSearchSection, ContentResolvedMeta, ContentSitemapEntry, BacklinkFields, BacklinkSource, BacklinksOptions, BacklinksResult, LocaleFallback, DocumentFromHandle, OneOptions, ManyOptions, PaginationOptions, PaginationResult, PopulateSpec, PopulatedDocument, ResolveOneOptions, ResolveOneResult, LocalizedDoc, LocalePathEntry, NeighborsOptions, NeighborsResult, SortSpec, TreeOptions, VariantsOptions, ContentVariant } from '../types/query.js';
|
|
12
|
+
export type { ContentQueryResponse } from '../types/api.js';
|
|
13
|
+
export declare const queryCollectionsSitemapEntries: typeof import('../runtime/server/sitemap-provider.js').queryCollectionsSitemapEntries;
|
|
14
|
+
export { createContentProviderError } from './provider-errors.js';
|
|
15
|
+
export { contentCacheHeaders, noopContentCache, vercelContentCache, type VercelContentCacheOptions } from '../runtime/server/cache-adapters.js';
|
|
16
|
+
export { clearContentCacheHint, collectContentCacheHint, getContentCacheHint } from '../runtime/server/cache-hints.js';
|
|
17
|
+
export type { ContentCacheAdapter, ContentCacheHint, ContentCacheHintInput, ContentCacheInvalidateInput, ContentProvider, ContentProviderCapabilities, ContentProviderResult, MaybeContentProviderResult } from './provider.js';
|
|
18
|
+
export { withContentCache } from './provider.js';
|
|
19
|
+
export type { ContentProviderErrorCode } from './provider-errors.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export {
|
|
2
|
+
one,
|
|
3
|
+
many,
|
|
4
|
+
paginate,
|
|
5
|
+
backlinks,
|
|
6
|
+
resolveOne,
|
|
7
|
+
variants,
|
|
8
|
+
tree,
|
|
9
|
+
neighbors,
|
|
10
|
+
createServerContentQueryContext
|
|
11
|
+
} from "../runtime/server/query-api.js";
|
|
12
|
+
export { getCollectionPath } from "../runtime/query/routes.js";
|
|
13
|
+
export const queryCollectionsSitemapEntries = async (...args) => {
|
|
14
|
+
const { queryCollectionsSitemapEntries: queryCollectionsSitemapEntries2 } = await import("../runtime/server/sitemap-provider.js");
|
|
15
|
+
return await queryCollectionsSitemapEntries2(...args);
|
|
16
|
+
};
|
|
17
|
+
export { createContentProviderError } from "./provider-errors.js";
|
|
18
|
+
export {
|
|
19
|
+
contentCacheHeaders,
|
|
20
|
+
noopContentCache,
|
|
21
|
+
vercelContentCache
|
|
22
|
+
} from "../runtime/server/cache-adapters.js";
|
|
23
|
+
export {
|
|
24
|
+
clearContentCacheHint,
|
|
25
|
+
collectContentCacheHint,
|
|
26
|
+
getContentCacheHint
|
|
27
|
+
} from "../runtime/server/cache-hints.js";
|
|
28
|
+
export { withContentCache } from "./provider.js";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
value: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
required: false;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
excerpt: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
tag: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
prose: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: undefined;
|
|
20
|
+
};
|
|
21
|
+
class: {
|
|
22
|
+
type: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
unwrap: {
|
|
26
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
}>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
value: {
|
|
31
|
+
type: ObjectConstructor;
|
|
32
|
+
required: false;
|
|
33
|
+
default: () => {};
|
|
34
|
+
};
|
|
35
|
+
excerpt: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
tag: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
prose: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: undefined;
|
|
46
|
+
};
|
|
47
|
+
class: {
|
|
48
|
+
type: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
|
|
49
|
+
default: undefined;
|
|
50
|
+
};
|
|
51
|
+
unwrap: {
|
|
52
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
}>> & Readonly<{}>, {
|
|
56
|
+
excerpt: boolean;
|
|
57
|
+
value: Record<string, any>;
|
|
58
|
+
class: string | unknown[] | Record<string, any>;
|
|
59
|
+
prose: boolean;
|
|
60
|
+
tag: string;
|
|
61
|
+
unwrap: string | boolean;
|
|
62
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { defineComponent, watch, h, useSlots } from "vue";
|
|
3
|
+
import ContentRendererMarkdown from "./internal/ContentRendererMarkdown.vue";
|
|
4
|
+
function normalizeBody(value, excerpt) {
|
|
5
|
+
let body = excerpt ? value?.excerpt : value?.body;
|
|
6
|
+
if (!body && value?.type) {
|
|
7
|
+
body = value;
|
|
8
|
+
}
|
|
9
|
+
if (body?.type === "root" && Array.isArray(body.children)) {
|
|
10
|
+
return body;
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
export default defineComponent({
|
|
15
|
+
name: "ContentRenderer",
|
|
16
|
+
props: {
|
|
17
|
+
value: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: false,
|
|
20
|
+
default: () => ({})
|
|
21
|
+
},
|
|
22
|
+
excerpt: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
tag: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "div"
|
|
29
|
+
},
|
|
30
|
+
prose: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: void 0
|
|
33
|
+
},
|
|
34
|
+
class: {
|
|
35
|
+
type: [String, Array, Object],
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
38
|
+
unwrap: {
|
|
39
|
+
type: [Boolean, String],
|
|
40
|
+
default: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
setup(props) {
|
|
44
|
+
watch(
|
|
45
|
+
() => props.excerpt,
|
|
46
|
+
(newExcerpt) => {
|
|
47
|
+
if (newExcerpt && !props.value?.excerpt) {
|
|
48
|
+
console.warn(`No excerpt found for document content/${props?.value?._path}.${props?.value?._extension}!`);
|
|
49
|
+
console.warn("Make sure to use <!--more--> in your content if you want to use excerpt feature.");
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
immediate: true
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
render() {
|
|
58
|
+
const slots = useSlots();
|
|
59
|
+
const { value, excerpt, tag, prose, unwrap } = this;
|
|
60
|
+
const markdownBody = normalizeBody(value, excerpt);
|
|
61
|
+
if (!markdownBody?.children?.length && slots?.empty) {
|
|
62
|
+
return slots.empty({ value, excerpt, tag, prose, unwrap, ...this.$attrs });
|
|
63
|
+
}
|
|
64
|
+
if (slots?.default) {
|
|
65
|
+
return slots.default({ value, excerpt, tag, prose, unwrap, ...this.$attrs });
|
|
66
|
+
}
|
|
67
|
+
if (markdownBody?.children?.length) {
|
|
68
|
+
return h(ContentRendererMarkdown, {
|
|
69
|
+
value,
|
|
70
|
+
excerpt,
|
|
71
|
+
tag,
|
|
72
|
+
prose,
|
|
73
|
+
unwrap,
|
|
74
|
+
...this.$attrs
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return h(
|
|
78
|
+
"pre",
|
|
79
|
+
null,
|
|
80
|
+
JSON.stringify({ message: "You should use slots with <ContentRenderer>", value, excerpt, tag, prose, unwrap }, null, 2)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
</script>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
value: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
required: false;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
excerpt: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
tag: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
prose: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: undefined;
|
|
20
|
+
};
|
|
21
|
+
class: {
|
|
22
|
+
type: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
unwrap: {
|
|
26
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
}>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
value: {
|
|
31
|
+
type: ObjectConstructor;
|
|
32
|
+
required: false;
|
|
33
|
+
default: () => {};
|
|
34
|
+
};
|
|
35
|
+
excerpt: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
tag: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
prose: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: undefined;
|
|
46
|
+
};
|
|
47
|
+
class: {
|
|
48
|
+
type: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
|
|
49
|
+
default: undefined;
|
|
50
|
+
};
|
|
51
|
+
unwrap: {
|
|
52
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
}>> & Readonly<{}>, {
|
|
56
|
+
excerpt: boolean;
|
|
57
|
+
value: Record<string, any>;
|
|
58
|
+
class: string | unknown[] | Record<string, any>;
|
|
59
|
+
prose: boolean;
|
|
60
|
+
tag: string;
|
|
61
|
+
unwrap: string | boolean;
|
|
62
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
value: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
tag: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
unwrap: {
|
|
11
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
prose: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
18
|
+
components: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
value: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
tag: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
unwrap: {
|
|
32
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
prose: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: undefined;
|
|
38
|
+
};
|
|
39
|
+
components: {
|
|
40
|
+
type: ObjectConstructor;
|
|
41
|
+
default: () => {};
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{}>, {
|
|
44
|
+
components: Record<string, any>;
|
|
45
|
+
prose: boolean;
|
|
46
|
+
tag: string;
|
|
47
|
+
unwrap: string | boolean;
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { hash } from "ohash";
|
|
3
|
+
import { parse } from "comark";
|
|
4
|
+
import { computed, onServerPrefetch, shallowRef, useAttrs, watch } from "vue";
|
|
5
|
+
import { useRuntimeConfig, useState } from "#imports";
|
|
6
|
+
import MarkdownRenderer from "./internal/MarkdownRenderer.js";
|
|
7
|
+
import { useUnwrap } from "../composables/useUnwrap";
|
|
8
|
+
import { resolveMarkdownPlugins, resolveMarkdownRendererComponents } from "../../markdown/plugins";
|
|
9
|
+
import { toMarkdownRoot } from "../../../core/markdown/tree";
|
|
10
|
+
import { loadContentComponentEntries } from "../../../integrations/vue/content-components";
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
value: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
tag: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "span"
|
|
19
|
+
},
|
|
20
|
+
unwrap: {
|
|
21
|
+
type: [Boolean, String],
|
|
22
|
+
default: "p"
|
|
23
|
+
},
|
|
24
|
+
prose: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
components: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: () => ({})
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const runtimeContent = useRuntimeConfig().public.content;
|
|
34
|
+
const attrs = useAttrs();
|
|
35
|
+
const { unwrap: unwrapRoot } = useUnwrap();
|
|
36
|
+
const stateKey = `content:inline:${hash({
|
|
37
|
+
value: props.value,
|
|
38
|
+
unwrap: props.unwrap,
|
|
39
|
+
prose: props.prose,
|
|
40
|
+
plugins: runtimeContent.markdown?.plugins || [],
|
|
41
|
+
tags: runtimeContent.markdown?.tags || {}
|
|
42
|
+
})}`;
|
|
43
|
+
const initialState = useState(stateKey, () => ({
|
|
44
|
+
tree: null
|
|
45
|
+
}));
|
|
46
|
+
const tree = shallowRef(initialState.value.tree);
|
|
47
|
+
const resolvedComponents = computed(() => ({
|
|
48
|
+
...Object.fromEntries(loadContentComponentEntries({
|
|
49
|
+
type: "root",
|
|
50
|
+
children: tree.value?.children || []
|
|
51
|
+
}, runtimeContent.markdown?.tags || {})),
|
|
52
|
+
...resolveMarkdownRendererComponents(runtimeContent.markdown.plugins),
|
|
53
|
+
...props.components
|
|
54
|
+
}));
|
|
55
|
+
const rendererAttrs = computed(() => {
|
|
56
|
+
const { class: className, ...rest } = attrs;
|
|
57
|
+
return className == null ? rest : {
|
|
58
|
+
...rest,
|
|
59
|
+
class: className
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
const refresh = async () => {
|
|
63
|
+
const plugins = await resolveMarkdownPlugins(runtimeContent.markdown.plugins);
|
|
64
|
+
const parsed = await parse(props.value || "", { plugins });
|
|
65
|
+
const body = unwrapRoot({
|
|
66
|
+
...toMarkdownRoot(parsed.nodes)
|
|
67
|
+
}, props.unwrap);
|
|
68
|
+
tree.value = body;
|
|
69
|
+
};
|
|
70
|
+
onServerPrefetch(async () => {
|
|
71
|
+
await refresh();
|
|
72
|
+
initialState.value = {
|
|
73
|
+
tree: tree.value
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
if (import.meta.client && !tree.value) {
|
|
77
|
+
void refresh();
|
|
78
|
+
}
|
|
79
|
+
watch(
|
|
80
|
+
[() => props.value, () => props.unwrap, () => props.components, () => runtimeContent.markdown?.plugins, () => runtimeContent.markdown?.tags],
|
|
81
|
+
() => {
|
|
82
|
+
void refresh();
|
|
83
|
+
},
|
|
84
|
+
{ deep: true }
|
|
85
|
+
);
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<template>
|
|
89
|
+
<MarkdownRenderer
|
|
90
|
+
v-if="tree"
|
|
91
|
+
:tree="tree"
|
|
92
|
+
:tag="tag"
|
|
93
|
+
:prose="prose"
|
|
94
|
+
:components="resolvedComponents"
|
|
95
|
+
v-bind="rendererAttrs"
|
|
96
|
+
/>
|
|
97
|
+
</template>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
value: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
tag: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
unwrap: {
|
|
11
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
prose: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
18
|
+
components: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
value: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
tag: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
unwrap: {
|
|
32
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
prose: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: undefined;
|
|
38
|
+
};
|
|
39
|
+
components: {
|
|
40
|
+
type: ObjectConstructor;
|
|
41
|
+
default: () => {};
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{}>, {
|
|
44
|
+
components: Record<string, any>;
|
|
45
|
+
prose: boolean;
|
|
46
|
+
tag: string;
|
|
47
|
+
unwrap: string | boolean;
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
code: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
language: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: null;
|
|
13
|
+
};
|
|
14
|
+
filename: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: null;
|
|
17
|
+
};
|
|
18
|
+
highlights: {
|
|
19
|
+
type: () => number[];
|
|
20
|
+
default: () => never[];
|
|
21
|
+
};
|
|
22
|
+
meta: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: null;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
code: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
language: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: null;
|
|
34
|
+
};
|
|
35
|
+
filename: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: null;
|
|
38
|
+
};
|
|
39
|
+
highlights: {
|
|
40
|
+
type: () => number[];
|
|
41
|
+
default: () => never[];
|
|
42
|
+
};
|
|
43
|
+
meta: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: null;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{}>, {
|
|
48
|
+
code: string;
|
|
49
|
+
meta: string;
|
|
50
|
+
language: string;
|
|
51
|
+
filename: string;
|
|
52
|
+
highlights: number[];
|
|
53
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
55
|
+
declare const _default: typeof __VLS_export;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<slot />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
defineProps({
|
|
7
|
+
code: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
language: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: null
|
|
14
|
+
},
|
|
15
|
+
filename: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: null
|
|
18
|
+
},
|
|
19
|
+
highlights: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: () => []
|
|
22
|
+
},
|
|
23
|
+
meta: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: null
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
pre code .line{display:block;min-height:1rem}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
code: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
language: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: null;
|
|
13
|
+
};
|
|
14
|
+
filename: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: null;
|
|
17
|
+
};
|
|
18
|
+
highlights: {
|
|
19
|
+
type: () => number[];
|
|
20
|
+
default: () => never[];
|
|
21
|
+
};
|
|
22
|
+
meta: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: null;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
code: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
language: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: null;
|
|
34
|
+
};
|
|
35
|
+
filename: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: null;
|
|
38
|
+
};
|
|
39
|
+
highlights: {
|
|
40
|
+
type: () => number[];
|
|
41
|
+
default: () => never[];
|
|
42
|
+
};
|
|
43
|
+
meta: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: null;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{}>, {
|
|
48
|
+
code: string;
|
|
49
|
+
meta: string;
|
|
50
|
+
language: string;
|
|
51
|
+
filename: string;
|
|
52
|
+
highlights: number[];
|
|
53
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
54
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
55
|
+
declare const _default: typeof __VLS_export;
|
|
56
|
+
export default _default;
|
|
57
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|