@lupinum/ginko-content 0.1.3 → 0.1.5
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/compatibility.json +1 -1
- package/dist/core/content/graph.d.ts +1 -1
- package/dist/core/references/resolve.d.ts +19 -0
- package/dist/core/references/resolve.js +72 -20
- package/dist/module.d.mts +26 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +30 -23
- package/dist/runtime/app/components/internal/ContentRendererMarkdown.vue +17 -5
- package/dist/runtime/app/composables/content-i18n.js +1 -1
- package/dist/runtime/server/agent-markdown.js +1 -1
- package/dist/runtime/server/agent-site.js +0 -1
- package/dist/runtime/server/middleware/agent-link-headers.js +2 -3
- package/dist/runtime/virtual.d.ts +1 -0
- package/dist/storage/references.js +20 -9
- package/dist/types/module.d.ts +24 -0
- package/dist/types.d.mts +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
package/compatibility.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* - **`byRoute`**: route path (user-visible URL) → content id. Used by the
|
|
17
17
|
* page resolver when the request arrives as a localized URL.
|
|
18
18
|
* - **`byRef`**: normalized ref string → canonical key. This is how
|
|
19
|
-
* `[
|
|
19
|
+
* markdown links such as `[Ada]($authors.ada)` find their target without a scan.
|
|
20
20
|
* - **`referenceTargets`**: the `buildReferenceTargets` map — every shape
|
|
21
21
|
* the user might plausibly write to point at a document (canonical
|
|
22
22
|
* name, locale-prefixed path, short slug) pre-resolved to a canonical
|
|
@@ -28,4 +28,23 @@ export declare const parseRefLink: (value: string) => {
|
|
|
28
28
|
} | null;
|
|
29
29
|
export declare const collectMarkdownRefLinks: (node: unknown) => string[];
|
|
30
30
|
export declare const rewriteMarkdownRefLinks: <T>(node: T, resolvedRefs?: Record<string, string>) => T;
|
|
31
|
+
export interface MarkdownQuickLinkTarget {
|
|
32
|
+
route: string;
|
|
33
|
+
params?: Record<string, string | number>;
|
|
34
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
35
|
+
}
|
|
36
|
+
export type MarkdownQuickLinks = Record<string, Record<string, MarkdownQuickLinkTarget>>;
|
|
37
|
+
export type ResolveQuickLinkRoute = (route: {
|
|
38
|
+
name: string;
|
|
39
|
+
hash?: string;
|
|
40
|
+
params?: Record<string, string | number>;
|
|
41
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
42
|
+
}) => string;
|
|
43
|
+
export declare const resolveConfiguredQuickLink: (href: string, links: MarkdownQuickLinks | undefined, resolveRoute: ResolveQuickLinkRoute) => string | undefined;
|
|
44
|
+
export declare const resolveConfiguredQuickLinks: (hrefs: string[], links: MarkdownQuickLinks | undefined, resolveRoute: ResolveQuickLinkRoute) => {
|
|
45
|
+
[k: string]: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const resolveMarkdownRenderRefs: (node: unknown, resolvedRefs: Record<string, string> | undefined, links: MarkdownQuickLinks | undefined, resolveRoute: ResolveQuickLinkRoute) => {
|
|
48
|
+
[x: string]: string;
|
|
49
|
+
};
|
|
31
50
|
export declare const buildReferenceTargets: (contents: ParsedContent[], locales?: string[]) => Map<string, string>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isMarkdownRoot, mapMarkdownNode } from "../markdown/tree.js";
|
|
2
2
|
export const CONTENT_REF_LINK_PREFIX = "$";
|
|
3
|
+
const MARKDOWN_LINK_PROP_KEYS = ["href", "to"];
|
|
3
4
|
export const normalizeReferenceValue = (value) => String(value).replace(/^\/+|\/+$/g, "");
|
|
4
5
|
export const parseRefLink = (value) => {
|
|
5
6
|
if (typeof value !== "string" || !value.startsWith(CONTENT_REF_LINK_PREFIX)) {
|
|
@@ -17,6 +18,17 @@ export const parseRefLink = (value) => {
|
|
|
17
18
|
};
|
|
18
19
|
export const collectMarkdownRefLinks = (node) => {
|
|
19
20
|
const refs = /* @__PURE__ */ new Set();
|
|
21
|
+
const collectProps = (props) => {
|
|
22
|
+
if (!props || typeof props !== "object") {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
for (const key of MARKDOWN_LINK_PROP_KEYS) {
|
|
26
|
+
const value = props[key];
|
|
27
|
+
if (typeof value === "string" && parseRefLink(value)) {
|
|
28
|
+
refs.add(value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
20
32
|
const visit = (current) => {
|
|
21
33
|
if (!current || typeof current !== "object") {
|
|
22
34
|
return;
|
|
@@ -27,10 +39,7 @@ export const collectMarkdownRefLinks = (node) => {
|
|
|
27
39
|
}
|
|
28
40
|
if (current.type === "element") {
|
|
29
41
|
const markdownNode = current;
|
|
30
|
-
|
|
31
|
-
if (href2 && parseRefLink(href2)) {
|
|
32
|
-
refs.add(href2);
|
|
33
|
-
}
|
|
42
|
+
collectProps(markdownNode.props);
|
|
34
43
|
markdownNode.children?.forEach(visit);
|
|
35
44
|
return;
|
|
36
45
|
}
|
|
@@ -38,16 +47,27 @@ export const collectMarkdownRefLinks = (node) => {
|
|
|
38
47
|
current.forEach(visit);
|
|
39
48
|
return;
|
|
40
49
|
}
|
|
41
|
-
|
|
42
|
-
if (href && parseRefLink(href)) {
|
|
43
|
-
refs.add(href);
|
|
44
|
-
}
|
|
50
|
+
collectProps(current.props);
|
|
45
51
|
visit(current.children);
|
|
46
52
|
};
|
|
47
53
|
visit(node);
|
|
48
54
|
return Array.from(refs);
|
|
49
55
|
};
|
|
50
56
|
export const rewriteMarkdownRefLinks = (node, resolvedRefs = {}) => {
|
|
57
|
+
const rewriteProps = (props) => {
|
|
58
|
+
if (!props || typeof props !== "object") {
|
|
59
|
+
return void 0;
|
|
60
|
+
}
|
|
61
|
+
let next;
|
|
62
|
+
for (const key of MARKDOWN_LINK_PROP_KEYS) {
|
|
63
|
+
const value = props[key];
|
|
64
|
+
if (typeof value === "string" && resolvedRefs[value]) {
|
|
65
|
+
next ||= { ...props };
|
|
66
|
+
next[key] = resolvedRefs[value];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return next || props;
|
|
70
|
+
};
|
|
51
71
|
const visit = (current) => {
|
|
52
72
|
if (!current || typeof current !== "object") {
|
|
53
73
|
return current;
|
|
@@ -60,16 +80,13 @@ export const rewriteMarkdownRefLinks = (node, resolvedRefs = {}) => {
|
|
|
60
80
|
}
|
|
61
81
|
if (current.type === "element") {
|
|
62
82
|
return mapMarkdownNode(current, (markdownNode) => {
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
83
|
+
const props2 = rewriteProps(markdownNode.props);
|
|
84
|
+
if (props2 === markdownNode.props) {
|
|
65
85
|
return markdownNode;
|
|
66
86
|
}
|
|
67
87
|
return {
|
|
68
88
|
...markdownNode,
|
|
69
|
-
props:
|
|
70
|
-
...markdownNode.props,
|
|
71
|
-
href: resolvedRefs[href2]
|
|
72
|
-
}
|
|
89
|
+
props: props2
|
|
73
90
|
};
|
|
74
91
|
});
|
|
75
92
|
}
|
|
@@ -77,12 +94,9 @@ export const rewriteMarkdownRefLinks = (node, resolvedRefs = {}) => {
|
|
|
77
94
|
return current.map((item) => visit(item));
|
|
78
95
|
}
|
|
79
96
|
const next = { ...current };
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
82
|
-
next.props =
|
|
83
|
-
...next.props,
|
|
84
|
-
href: resolvedRefs[href]
|
|
85
|
-
};
|
|
97
|
+
const props = rewriteProps(next.props);
|
|
98
|
+
if (props !== next.props) {
|
|
99
|
+
next.props = props;
|
|
86
100
|
}
|
|
87
101
|
if (Array.isArray(next.children)) {
|
|
88
102
|
next.children = next.children.map((child) => visit(child));
|
|
@@ -91,6 +105,44 @@ export const rewriteMarkdownRefLinks = (node, resolvedRefs = {}) => {
|
|
|
91
105
|
};
|
|
92
106
|
return visit(node);
|
|
93
107
|
};
|
|
108
|
+
export const resolveConfiguredQuickLink = (href, links, resolveRoute) => {
|
|
109
|
+
const parsed = parseRefLink(href);
|
|
110
|
+
if (!parsed || !links) {
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
const separator = parsed.ref.indexOf(".");
|
|
114
|
+
if (separator <= 0 || separator === parsed.ref.length - 1) {
|
|
115
|
+
return void 0;
|
|
116
|
+
}
|
|
117
|
+
const namespace = parsed.ref.slice(0, separator);
|
|
118
|
+
const key = parsed.ref.slice(separator + 1);
|
|
119
|
+
const target = links[namespace]?.[key];
|
|
120
|
+
if (!target?.route) {
|
|
121
|
+
return void 0;
|
|
122
|
+
}
|
|
123
|
+
return resolveRoute({
|
|
124
|
+
name: target.route,
|
|
125
|
+
...target.params ? { params: target.params } : {},
|
|
126
|
+
...target.query ? { query: target.query } : {},
|
|
127
|
+
...parsed.hash ? { hash: parsed.hash } : {}
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
export const resolveConfiguredQuickLinks = (hrefs, links, resolveRoute) => {
|
|
131
|
+
return Object.fromEntries(hrefs.flatMap((href) => {
|
|
132
|
+
const resolved = resolveConfiguredQuickLink(href, links, resolveRoute);
|
|
133
|
+
return resolved ? [[href, resolved]] : [];
|
|
134
|
+
}));
|
|
135
|
+
};
|
|
136
|
+
export const resolveMarkdownRenderRefs = (node, resolvedRefs, links, resolveRoute) => {
|
|
137
|
+
const quickRefs = resolveConfiguredQuickLinks(collectMarkdownRefLinks(node), links, resolveRoute);
|
|
138
|
+
const concreteContentRefs = Object.fromEntries(
|
|
139
|
+
Object.entries(resolvedRefs || {}).filter(([href, value]) => value && value !== href)
|
|
140
|
+
);
|
|
141
|
+
return {
|
|
142
|
+
...quickRefs,
|
|
143
|
+
...concreteContentRefs
|
|
144
|
+
};
|
|
145
|
+
};
|
|
94
146
|
export const buildReferenceTargets = (contents, locales = []) => {
|
|
95
147
|
const targets = /* @__PURE__ */ new Map();
|
|
96
148
|
for (const document of contents) {
|
package/dist/module.d.mts
CHANGED
|
@@ -1405,6 +1405,21 @@ interface ContentRevalidateOptions {
|
|
|
1405
1405
|
*/
|
|
1406
1406
|
allowUnsigned?: boolean;
|
|
1407
1407
|
}
|
|
1408
|
+
interface ContentLinkRouteTarget {
|
|
1409
|
+
/**
|
|
1410
|
+
* Nuxt route name passed to Nuxt I18n `localePath()`.
|
|
1411
|
+
*/
|
|
1412
|
+
route: string;
|
|
1413
|
+
/**
|
|
1414
|
+
* Static route params forwarded to Nuxt I18n `localePath()`.
|
|
1415
|
+
*/
|
|
1416
|
+
params?: Record<string, string | number>;
|
|
1417
|
+
/**
|
|
1418
|
+
* Static query params forwarded to Nuxt I18n `localePath()`.
|
|
1419
|
+
*/
|
|
1420
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
1421
|
+
}
|
|
1422
|
+
type ContentLinksOptions = Record<string, Record<string, ContentLinkRouteTarget>>;
|
|
1408
1423
|
interface ContentAgentRouteOptions {
|
|
1409
1424
|
routes?: boolean;
|
|
1410
1425
|
linkHeaders?: boolean;
|
|
@@ -1454,6 +1469,15 @@ interface ModuleOptions {
|
|
|
1454
1469
|
* `x-ginko-revalidate-token` or `authorization: Bearer <token>`.
|
|
1455
1470
|
*/
|
|
1456
1471
|
revalidate?: false | ContentRevalidateOptions;
|
|
1472
|
+
/**
|
|
1473
|
+
* Writer-facing markdown quick links. Values point at Nuxt route names;
|
|
1474
|
+
* localized paths stay owned by Nuxt I18n.
|
|
1475
|
+
*
|
|
1476
|
+
* @example
|
|
1477
|
+
* content.links.main.pricing = { route: 'pricing' }
|
|
1478
|
+
* markdown: [Pricing]($main.pricing)
|
|
1479
|
+
*/
|
|
1480
|
+
links?: ContentLinksOptions;
|
|
1457
1481
|
/**
|
|
1458
1482
|
* First-class agent markdown and LLM route features.
|
|
1459
1483
|
*/
|
|
@@ -1673,6 +1697,7 @@ interface ModulePublicRuntimeConfig {
|
|
|
1673
1697
|
locales: ContentContext$1['locales'];
|
|
1674
1698
|
provider: ContentContext$1['provider'];
|
|
1675
1699
|
providers: ContentContext$1['providers'];
|
|
1700
|
+
links: ContentContext$1['links'];
|
|
1676
1701
|
collections: Record<string, {
|
|
1677
1702
|
source: ContentCollectionConfig$1['source'];
|
|
1678
1703
|
exclude?: ContentCollectionConfig$1['exclude'];
|
|
@@ -1726,4 +1751,4 @@ interface ModuleHooks {
|
|
|
1726
1751
|
}
|
|
1727
1752
|
|
|
1728
1753
|
export { _default as default, normalizeContentConfigCollectionNames };
|
|
1729
|
-
export type { AgentMetadataField, AgentMetadataFieldList, BacklinkFields, BacklinkSource, BacklinksOptions, BacklinksResult, CollectionQueryBuilder, CollectionQueryField, CollectionQueryFieldValue, CollectionQueryKey, CollectionQueryOperator, CollectionQueryValue, CollectionSchema, ContentAgentAppPageConfig, ContentAgentAppPageContext, ContentAgentCollectionConfig, ContentAgentConfig, ContentAgentLocalizedValue, ContentAgentMarkdownMetadataConfig, ContentAgentMarkdownOptions, ContentAgentMarkdownPolicyConfig, ContentAgentRouteOptions, ContentAgentSectionConfig, ContentAgentSiteConfig, ContentCacheArtifact, ContentCmsCollectionConfig, ContentCmsFieldConfig, ContentCmsFieldType, ContentCmsRelationConfig, ContentCollectionConfig, ContentCollectionHandle, ContentCollectionI18nConfig, ContentCollectionI18nMap, ContentCollectionItem, ContentCollectionItemSurroundingsOptions, ContentCollectionKind, ContentCollectionMap, ContentCollectionName, ContentCollectionNavigationOptions, ContentCollectionPageOptions, ContentCollectionRouteConfig, ContentCollectionRouteMetaOptions, ContentCollectionSearchSectionsOptions, ContentCollectionSource, ContentCollectionSourceObject, ContentCollectionStringName, ContentCollectionTarget, ContentConfig, ContentContext, ContentI18nOptions, ContentLocaleEntry, ContentLocaleRoute, ContentManifest, ContentMiniSearchOptions, ContentNavigationItem, ContentPageResult, ContentPreviewOptions, ContentProviderName, ContentProviderSearchRequest, ContentQueryBuilder, ContentQueryBuilderParams, ContentQueryBuilderWhere, ContentQueryFetcher, ContentQueryRequest, ContentQuerySortFields, ContentQuerySortOptions, ContentQuerySortParams, ContentReferenceSchema, ContentResolvedMeta, ContentRevalidateOptions, ContentRouteMeta, ContentSearchEngine, ContentSearchIndexRecord, ContentSearchOptions, ContentSearchPublicRuntimeConfig, ContentSearchResult, ContentSearchSection, ContentSelector, ContentSeoImage, ContentSeoMeta, ContentSitemapAlternative, ContentSitemapAssertOptions, ContentSitemapAssertSitemapOptions, ContentSitemapEntry, ContentSitemapImage, ContentSitemapOptions, ContentTransformer, ContentTreeItem, ContentVariant, DefineCollectionObject, DefineCollectionOptions, DocumentFromHandle, LocaleFallback, LocalePathEntry, LocalizedContentDocument, LocalizedDoc, ManifestVariant, ManyOptions, MarkdownNode, MarkdownOptions, MarkdownParsedContent, MarkdownPluginDescriptor, MarkdownPluginOptions, MarkdownRoot, ModuleHooks, ModuleOptions, MountOptions, NavItem, NeighborsOptions, NeighborsResult, OneOptions, PaginationOptions, PaginationResult, ParseContentOptions, ParsedContent, ParsedContentInternalMeta, ParsedContentMeta, PopulateFromOptions, PopulateSpec, PopulatedDocument, QueryGroupBuilder, QueryGroupFunction, QueryMatchOperator, QueryOperators, QueryOrderDirection, QueryOrderOptions, QueryWhere, ResolutionEnvelope, ResolveContentReferenceOptions, ResolveOneOptions, ResolveOneResult, ResolvedContentContext, ResolvedContentI18nOptions, ResolvedMarkdownPlugin, ResolvedVariant, SortDirection, SortSpec, StrictParsedContent, StrictParsedContentMeta, Toc, TocLink, TransformContentOptions, TransformContentSource, TreeOptions, VariantsOptions };
|
|
1754
|
+
export type { AgentMetadataField, AgentMetadataFieldList, BacklinkFields, BacklinkSource, BacklinksOptions, BacklinksResult, CollectionQueryBuilder, CollectionQueryField, CollectionQueryFieldValue, CollectionQueryKey, CollectionQueryOperator, CollectionQueryValue, CollectionSchema, ContentAgentAppPageConfig, ContentAgentAppPageContext, ContentAgentCollectionConfig, ContentAgentConfig, ContentAgentLocalizedValue, ContentAgentMarkdownMetadataConfig, ContentAgentMarkdownOptions, ContentAgentMarkdownPolicyConfig, ContentAgentRouteOptions, ContentAgentSectionConfig, ContentAgentSiteConfig, ContentCacheArtifact, ContentCmsCollectionConfig, ContentCmsFieldConfig, ContentCmsFieldType, ContentCmsRelationConfig, ContentCollectionConfig, ContentCollectionHandle, ContentCollectionI18nConfig, ContentCollectionI18nMap, ContentCollectionItem, ContentCollectionItemSurroundingsOptions, ContentCollectionKind, ContentCollectionMap, ContentCollectionName, ContentCollectionNavigationOptions, ContentCollectionPageOptions, ContentCollectionRouteConfig, ContentCollectionRouteMetaOptions, ContentCollectionSearchSectionsOptions, ContentCollectionSource, ContentCollectionSourceObject, ContentCollectionStringName, ContentCollectionTarget, ContentConfig, ContentContext, ContentI18nOptions, ContentLinkRouteTarget, ContentLinksOptions, ContentLocaleEntry, ContentLocaleRoute, ContentManifest, ContentMiniSearchOptions, ContentNavigationItem, ContentPageResult, ContentPreviewOptions, ContentProviderName, ContentProviderSearchRequest, ContentQueryBuilder, ContentQueryBuilderParams, ContentQueryBuilderWhere, ContentQueryFetcher, ContentQueryRequest, ContentQuerySortFields, ContentQuerySortOptions, ContentQuerySortParams, ContentReferenceSchema, ContentResolvedMeta, ContentRevalidateOptions, ContentRouteMeta, ContentSearchEngine, ContentSearchIndexRecord, ContentSearchOptions, ContentSearchPublicRuntimeConfig, ContentSearchResult, ContentSearchSection, ContentSelector, ContentSeoImage, ContentSeoMeta, ContentSitemapAlternative, ContentSitemapAssertOptions, ContentSitemapAssertSitemapOptions, ContentSitemapEntry, ContentSitemapImage, ContentSitemapOptions, ContentTransformer, ContentTreeItem, ContentVariant, DefineCollectionObject, DefineCollectionOptions, DocumentFromHandle, LocaleFallback, LocalePathEntry, LocalizedContentDocument, LocalizedDoc, ManifestVariant, ManyOptions, MarkdownNode, MarkdownOptions, MarkdownParsedContent, MarkdownPluginDescriptor, MarkdownPluginOptions, MarkdownRoot, ModuleHooks, ModuleOptions, MountOptions, NavItem, NeighborsOptions, NeighborsResult, OneOptions, PaginationOptions, PaginationResult, ParseContentOptions, ParsedContent, ParsedContentInternalMeta, ParsedContentMeta, PopulateFromOptions, PopulateSpec, PopulatedDocument, QueryGroupBuilder, QueryGroupFunction, QueryMatchOperator, QueryOperators, QueryOrderDirection, QueryOrderOptions, QueryWhere, ResolutionEnvelope, ResolveContentReferenceOptions, ResolveOneOptions, ResolveOneResult, ResolvedContentContext, ResolvedContentI18nOptions, ResolvedMarkdownPlugin, ResolvedVariant, SortDirection, SortSpec, StrictParsedContent, StrictParsedContentMeta, Toc, TocLink, TransformContentOptions, TransformContentSource, TreeOptions, VariantsOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,8 +3,6 @@ import { defu } from 'defu';
|
|
|
3
3
|
import fs, { existsSync } from 'fs';
|
|
4
4
|
import { join, relative, resolve, isAbsolute } from 'pathe';
|
|
5
5
|
import jiti from 'jiti';
|
|
6
|
-
import { createRequire } from 'node:module';
|
|
7
|
-
import { pathToFileURL } from 'node:url';
|
|
8
6
|
import { genSafeVariableName, genImport } from 'knitwork';
|
|
9
7
|
import { hash } from 'ohash';
|
|
10
8
|
import 'unstorage/drivers/fs';
|
|
@@ -25,13 +23,14 @@ import { resolveCollectionI18n, prefixPathWithLocale } from '../dist/features/lo
|
|
|
25
23
|
import { resolveContentSitemapSource, GINKO_SITEMAP_SOURCE_NAME } from '../dist/runtime/utils/sitemap-source';
|
|
26
24
|
import { normalizeRouteMounts, normalizeContentPath } from '../dist/core/content/path';
|
|
27
25
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
26
|
+
import { pathToFileURL } from 'node:url';
|
|
28
27
|
import { withTrailingSlash } from 'ufo';
|
|
29
28
|
import { normalizeContentConfigCollectionNames } from '../dist/types/config';
|
|
30
29
|
export { agentMetadataFields, defineAgentAppPage, defineAgentMarkdownPolicy, defineAgentMetadataFields, defineAgentSection, defineCollection, defineContentConfig, reference } from '../dist/types/config';
|
|
31
30
|
import { collectTopLevelReferenceFieldsByTarget } from '../dist/core/references/schema';
|
|
32
31
|
|
|
33
32
|
const name = "@lupinum/ginko-content";
|
|
34
|
-
const version = "0.1.
|
|
33
|
+
const version = "0.1.5";
|
|
35
34
|
|
|
36
35
|
const CONFIG_FILES = [
|
|
37
36
|
"content.config.ts",
|
|
@@ -53,8 +52,6 @@ async function loadContentConfig(nuxt) {
|
|
|
53
52
|
return loaded?.default || loaded || {};
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
const require$1 = createRequire(import.meta.url);
|
|
57
|
-
const jitiImportSpecifier = pathToFileURL(require$1.resolve("jiti")).href;
|
|
58
55
|
const createVirtualContentTemplates = (contentContext, nuxt, contentConfigPath, addTemplateImpl) => {
|
|
59
56
|
const transformersTemplate = addTemplateImpl({
|
|
60
57
|
filename: "content/virtual-transformers.mjs",
|
|
@@ -77,10 +74,8 @@ const createVirtualContentTemplates = (contentContext, nuxt, contentConfigPath,
|
|
|
77
74
|
filename: "content/virtual-config.mjs",
|
|
78
75
|
write: true,
|
|
79
76
|
getContents: () => contentConfigPath ? [
|
|
80
|
-
`import
|
|
81
|
-
|
|
82
|
-
`const config = await importer.import(${JSON.stringify(contentConfigPath)})`,
|
|
83
|
-
"export default config?.default || config || {}"
|
|
77
|
+
`import config from ${JSON.stringify(contentConfigPath)}`,
|
|
78
|
+
"export default config || {}"
|
|
84
79
|
].join("\n") : "export default {}"
|
|
85
80
|
}).dst;
|
|
86
81
|
const virtualProvidersTemplate = addTemplateImpl({
|
|
@@ -307,8 +302,9 @@ const registerContentI18nTemplate = (addTemplateImpl, hasNuxtI18nModule) => {
|
|
|
307
302
|
filename: "content-i18n.mjs",
|
|
308
303
|
write: true,
|
|
309
304
|
getContents: () => hasNuxtI18nModule ? [
|
|
310
|
-
"export { useRouteBaseName, useSetI18nParams, useSwitchLocalePath } from '#i18n'"
|
|
305
|
+
"export { useLocalePath, useRouteBaseName, useSetI18nParams, useSwitchLocalePath } from '#i18n'"
|
|
311
306
|
].join("\n") : [
|
|
307
|
+
"import { useRouter } from '#imports'",
|
|
312
308
|
"const routeNameLocaleRE = /___([^_]+)$/",
|
|
313
309
|
"const resolveName = (value) => {",
|
|
314
310
|
" if (typeof value === 'string') {",
|
|
@@ -319,6 +315,24 @@ const registerContentI18nTemplate = (addTemplateImpl, hasNuxtI18nModule) => {
|
|
|
319
315
|
" }",
|
|
320
316
|
" return undefined",
|
|
321
317
|
"}",
|
|
318
|
+
"const normalizeRoutePath = (value) => value.startsWith('/') ? value : `/${value}`",
|
|
319
|
+
"const definedRecord = value => value && typeof value === 'object'",
|
|
320
|
+
" ? Object.fromEntries(Object.entries(value).filter(([, item]) => item !== undefined))",
|
|
321
|
+
" : undefined",
|
|
322
|
+
"export const useLocalePath = () => {",
|
|
323
|
+
" const router = useRouter()",
|
|
324
|
+
" return (value) => {",
|
|
325
|
+
" if (typeof value === 'string') return normalizeRoutePath(value)",
|
|
326
|
+
" const name = resolveName(value)",
|
|
327
|
+
" if (!name) return ''",
|
|
328
|
+
" return router.resolve({",
|
|
329
|
+
" name,",
|
|
330
|
+
" ...(definedRecord(value.params) ? { params: definedRecord(value.params) } : {}),",
|
|
331
|
+
" ...(definedRecord(value.query) ? { query: definedRecord(value.query) } : {}),",
|
|
332
|
+
" ...(typeof value.hash === 'string' ? { hash: value.hash } : {})",
|
|
333
|
+
" }).href",
|
|
334
|
+
" }",
|
|
335
|
+
"}",
|
|
322
336
|
"export const useRouteBaseName = () => (value) => {",
|
|
323
337
|
" const name = resolveName(value)",
|
|
324
338
|
" return typeof name === 'string' ? name.replace(routeNameLocaleRE, '') : undefined",
|
|
@@ -331,6 +345,7 @@ const registerContentI18nTemplate = (addTemplateImpl, hasNuxtI18nModule) => {
|
|
|
331
345
|
filename: "content-i18n.d.mts",
|
|
332
346
|
write: true,
|
|
333
347
|
getContents: () => [
|
|
348
|
+
"export function useLocalePath(): (route: string | { name?: string, hash?: string, params?: Record<string, unknown>, query?: Record<string, unknown> }, locale?: string) => string",
|
|
334
349
|
"export function useRouteBaseName(): (route: { name?: unknown } | unknown) => string | undefined",
|
|
335
350
|
"export function useSetI18nParams(): (params: Record<string, unknown>) => void",
|
|
336
351
|
"export function useSwitchLocalePath(): (locale: string) => string"
|
|
@@ -340,6 +355,7 @@ const registerContentI18nTemplate = (addTemplateImpl, hasNuxtI18nModule) => {
|
|
|
340
355
|
filename: "types/content-i18n.d.ts",
|
|
341
356
|
getContents: () => [
|
|
342
357
|
"declare module '#build/content-i18n.mjs' {",
|
|
358
|
+
" export function useLocalePath(): (route: string | { name?: string, hash?: string, params?: Record<string, unknown>, query?: Record<string, unknown> }, locale?: string) => string",
|
|
343
359
|
" export function useRouteBaseName(): (route: { name?: unknown } | unknown) => string | undefined",
|
|
344
360
|
" export function useSetI18nParams(): (params: Record<string, unknown>) => void",
|
|
345
361
|
" export function useSwitchLocalePath(): (locale: string) => string",
|
|
@@ -1314,11 +1330,6 @@ const collectRawMarkdownRoutesFromGeneratedFrontmatter = (markdown) => {
|
|
|
1314
1330
|
return Array.from(links);
|
|
1315
1331
|
};
|
|
1316
1332
|
const publicOutputPath = (publicDir, route) => join(publicDir, normalizeStaticRoutePath(route).replace(/^\//, ""));
|
|
1317
|
-
const rawMarkdownIndexRouteForRawRoute = (route) => {
|
|
1318
|
-
if (!route.startsWith("/raw/") || !route.endsWith(".md")) return null;
|
|
1319
|
-
const pageRoute = route.replace(/^\/raw/, "").replace(/\.md$/, "");
|
|
1320
|
-
return pageRoute === "/index" ? "/index.md" : `${pageRoute}/index.md`;
|
|
1321
|
-
};
|
|
1322
1333
|
|
|
1323
1334
|
const hookNuxtBoundary$2 = (nuxt, name, callback) => {
|
|
1324
1335
|
const hook = nuxt.hook;
|
|
@@ -1391,12 +1402,6 @@ const registerStaticOutputGeneration = ({
|
|
|
1391
1402
|
const outputPath = publicOutputPath(publicDir, route);
|
|
1392
1403
|
mkdirSync(dirname(outputPath), { recursive: true });
|
|
1393
1404
|
writeFileSync(outputPath, body, "utf8");
|
|
1394
|
-
const indexRoute = rawMarkdownIndexRouteForRawRoute(route);
|
|
1395
|
-
if (indexRoute) {
|
|
1396
|
-
const indexPath = publicOutputPath(publicDir, indexRoute);
|
|
1397
|
-
mkdirSync(dirname(indexPath), { recursive: true });
|
|
1398
|
-
writeFileSync(indexPath, body, "utf8");
|
|
1399
|
-
}
|
|
1400
1405
|
}
|
|
1401
1406
|
}
|
|
1402
1407
|
});
|
|
@@ -1499,8 +1504,7 @@ const registerContentNitroConfig = ({
|
|
|
1499
1504
|
for (const route of routes) {
|
|
1500
1505
|
const normalized = route === "/" ? "/" : `/${route.replace(/^\/+|\/+$/g, "")}`;
|
|
1501
1506
|
nitroConfig.prerender.routes.push(
|
|
1502
|
-
normalized === "/" ? "/raw/index.md" : `/raw${normalized}.md
|
|
1503
|
-
normalized === "/" ? "/index.md" : `${normalized}/index.md`
|
|
1507
|
+
normalized === "/" ? "/raw/index.md" : `/raw${normalized}.md`
|
|
1504
1508
|
);
|
|
1505
1509
|
}
|
|
1506
1510
|
}
|
|
@@ -1574,6 +1578,7 @@ const contentModuleDefaults = {
|
|
|
1574
1578
|
watch: true,
|
|
1575
1579
|
sources: {},
|
|
1576
1580
|
ignores: [],
|
|
1581
|
+
links: {},
|
|
1577
1582
|
collections: {},
|
|
1578
1583
|
markdown: {
|
|
1579
1584
|
plugins: [],
|
|
@@ -1678,6 +1683,7 @@ const applyContentRuntimeConfig = (nuxt, options, contentContext, runtimeCollect
|
|
|
1678
1683
|
translatedSlugs: contentContext.translatedSlugs ?? false,
|
|
1679
1684
|
strictTranslatedSlugs: contentContext.strictTranslatedSlugs ?? false,
|
|
1680
1685
|
collections: runtimeCollections,
|
|
1686
|
+
links: contentContext.links || {},
|
|
1681
1687
|
integrity: buildIntegrity,
|
|
1682
1688
|
experimental: {
|
|
1683
1689
|
stripQueryParameters: options.experimental.stripQueryParameters
|
|
@@ -1806,6 +1812,7 @@ const module$1 = defineNuxtModule({
|
|
|
1806
1812
|
const resolveRuntimeModule = (path) => resolve("./runtime", path);
|
|
1807
1813
|
const runtimeInlineDependencies = ["comark", "@comark/vue"];
|
|
1808
1814
|
validateRemovedMarkdownOptions(options);
|
|
1815
|
+
nuxt.options.experimental.payloadExtraction ??= false;
|
|
1809
1816
|
nuxt.options.build.transpile ||= [];
|
|
1810
1817
|
for (const dependency of runtimeInlineDependencies) {
|
|
1811
1818
|
if (!nuxt.options.build.transpile.includes(dependency)) {
|
|
@@ -4,7 +4,8 @@ import { useRuntimeConfig } from "#imports";
|
|
|
4
4
|
import { useContentPreview } from "../../composables/preview";
|
|
5
5
|
import { useUnwrap } from "../../composables/useUnwrap";
|
|
6
6
|
import MarkdownRenderer from "./MarkdownRenderer.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useLocalePath } from "../../composables/content-i18n";
|
|
8
|
+
import { resolveMarkdownRenderRefs, rewriteMarkdownRefLinks } from "../../../../core/references/resolve";
|
|
8
9
|
import { loadContentComponentEntries } from "../../../../integrations/vue/content-components";
|
|
9
10
|
import { resolveMarkdownRendererComponents } from "../../../markdown/plugins";
|
|
10
11
|
import { isMarkdownRoot } from "../../../../core/markdown/tree";
|
|
@@ -39,14 +40,19 @@ const props = defineProps({
|
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
42
|
const debug = import.meta.dev || useContentPreview().isEnabled();
|
|
42
|
-
const runtimeContent = useRuntimeConfig().public
|
|
43
|
+
const runtimeContent = useRuntimeConfig().public?.content || {};
|
|
43
44
|
const attrs = useAttrs();
|
|
44
45
|
const { unwrap: unwrapRoot } = useUnwrap();
|
|
46
|
+
const localePath = useLocalePath();
|
|
45
47
|
const locale = computed(() => props.value.locale || props.value._resolvedLocale || props.value._locale);
|
|
48
|
+
const linkLocale = computed(() => props.value._requestedLocale || locale.value);
|
|
46
49
|
const defaultLocale = computed(() => props.value.defaultLocale || runtimeContent.defaultLocale);
|
|
47
50
|
const locales = computed(() => {
|
|
48
51
|
const variantLocales = Array.isArray(props.value.variants) ? props.value.variants.map((variant) => variant.locale).filter((locale2) => Boolean(locale2)) : [];
|
|
49
|
-
return
|
|
52
|
+
return Array.from(/* @__PURE__ */ new Set([
|
|
53
|
+
...runtimeContent.locales || [],
|
|
54
|
+
...variantLocales
|
|
55
|
+
]));
|
|
50
56
|
});
|
|
51
57
|
const body = computed(() => {
|
|
52
58
|
let body2 = props.value.body || props.value;
|
|
@@ -56,7 +62,13 @@ const body = computed(() => {
|
|
|
56
62
|
if (!isMarkdownRoot(body2)) {
|
|
57
63
|
return null;
|
|
58
64
|
}
|
|
59
|
-
|
|
65
|
+
const resolvedRefs = resolveMarkdownRenderRefs(
|
|
66
|
+
body2,
|
|
67
|
+
props.value._resolvedRefs,
|
|
68
|
+
runtimeContent.links,
|
|
69
|
+
(route) => localePath(route, linkLocale.value)
|
|
70
|
+
);
|
|
71
|
+
return Object.keys(resolvedRefs).length ? rewriteMarkdownRefLinks(body2, resolvedRefs) : body2;
|
|
60
72
|
});
|
|
61
73
|
const renderedBody = computed(() => {
|
|
62
74
|
if (!body.value) {
|
|
@@ -70,7 +82,7 @@ const resolvedComponents = computed(() => {
|
|
|
70
82
|
}
|
|
71
83
|
return {
|
|
72
84
|
...Object.fromEntries(loadContentComponentEntries(renderedBody.value, runtimeContent.markdown?.tags || {})),
|
|
73
|
-
...resolveMarkdownRendererComponents(runtimeContent.markdown
|
|
85
|
+
...resolveMarkdownRendererComponents(runtimeContent.markdown?.plugins || []),
|
|
74
86
|
...props.components
|
|
75
87
|
};
|
|
76
88
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useRouteBaseName, useSetI18nParams, useSwitchLocalePath } from "#build/content-i18n.mjs";
|
|
1
|
+
export { useLocalePath, useRouteBaseName, useSetI18nParams, useSwitchLocalePath } from "#build/content-i18n.mjs";
|
|
@@ -24,7 +24,7 @@ const routeMarkdownPathForHref = (href, locale, currentPath = "/") => {
|
|
|
24
24
|
if (isExternalHref(withoutHash)) return href;
|
|
25
25
|
if (withoutHash.endsWith(".md")) return href;
|
|
26
26
|
const target = withoutHash.startsWith("/") ? prefixLocalizedHref(withoutHash, locale) : new URL(withoutHash, `https://agent.local${normalizeAgentRoutePath(currentPath)}`).pathname;
|
|
27
|
-
return `${
|
|
27
|
+
return `${agentRawPathForRoute(target)}${hash}`;
|
|
28
28
|
};
|
|
29
29
|
export const getMarkdownProp = (node, name) => {
|
|
30
30
|
const props = isRecord(node.props) ? node.props : {};
|
|
@@ -263,7 +263,6 @@ export const collectAgentMarkdownPrerenderRoutes = async (event) => {
|
|
|
263
263
|
const pages = await buildAgentPageIndex(event, locale);
|
|
264
264
|
for (const page of pages) {
|
|
265
265
|
routes.add(page.rawPath);
|
|
266
|
-
routes.add(page.markdownPath);
|
|
267
266
|
}
|
|
268
267
|
const prefix = locale === defaultLocale() ? "" : `/${locale}`;
|
|
269
268
|
routes.add(prefix ? `${prefix}/llms.txt` : "/llms.txt");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineEventHandler, getRequestURL, setHeader } from "h3";
|
|
2
2
|
import { getAgentLocales, localeFromAgentPath, resolveMarkdownForPublicRoute } from "../agent-site.js";
|
|
3
|
-
import {
|
|
3
|
+
import { agentRawPathForRoute, normalizeAgentRoutePath } from "../../agent-paths.js";
|
|
4
4
|
import { appendResponseHeader } from "../agent-http.js";
|
|
5
5
|
import { contentConfig } from "../storage-access.js";
|
|
6
6
|
const shouldAdvertise = (pathname) => !pathname.startsWith("/_") && !pathname.startsWith("/api/") && !pathname.endsWith(".css") && !pathname.endsWith(".js") && !pathname.endsWith(".png") && !pathname.endsWith(".jpg") && !pathname.endsWith(".jpeg") && !pathname.endsWith(".webp") && !pathname.endsWith(".svg") && !pathname.endsWith(".ico");
|
|
@@ -26,8 +26,7 @@ export default defineEventHandler(async (event) => {
|
|
|
26
26
|
const page = canAdvertisePageAlternate(pathname) ? await resolveMarkdownForPublicRoute(event, pathname, locale) : null;
|
|
27
27
|
const pagePath = normalizeAgentRoutePath(pathname);
|
|
28
28
|
const pageLinks = page ? [
|
|
29
|
-
`<${agentRawPathForRoute(pagePath)}>; rel="alternate"; type="text/markdown"
|
|
30
|
-
`<${agentMarkdownPathForRoute(pagePath)}>; rel="alternate"; type="text/markdown"`
|
|
29
|
+
`<${agentRawPathForRoute(pagePath)}>; rel="alternate"; type="text/markdown"`
|
|
31
30
|
] : [];
|
|
32
31
|
appendResponseHeader(
|
|
33
32
|
event,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare module '#build/content-i18n.mjs' {
|
|
2
|
+
export function useLocalePath(): (route: string | { name?: string, hash?: string, params?: Record<string, unknown>, query?: Record<string, unknown> }, locale?: string) => string
|
|
2
3
|
export function useRouteBaseName(): (route: { name?: unknown } | unknown) => string | undefined
|
|
3
4
|
export function useSetI18nParams(): (params: Record<string, unknown>) => void
|
|
4
5
|
export function useSwitchLocalePath(): (locale: string) => string
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { collectMarkdownRefLinks, parseRefLink } from "../core/references/resolve";
|
|
2
|
+
import { projectContentPathToLocale } from "../features/localization/path";
|
|
2
3
|
import { contentConfig } from "./driver.js";
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
if (!
|
|
7
|
-
return
|
|
4
|
+
import { resolveCanonicalKey, resolveVariant } from "./manifest.js";
|
|
5
|
+
const isConfiguredQuickLink = (href) => {
|
|
6
|
+
const parsed = parseRefLink(href);
|
|
7
|
+
if (!parsed) {
|
|
8
|
+
return false;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
+
const separator = parsed.ref.indexOf(".");
|
|
11
|
+
if (separator <= 0 || separator === parsed.ref.length - 1) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
const namespace = parsed.ref.slice(0, separator);
|
|
15
|
+
const key = parsed.ref.slice(separator + 1);
|
|
16
|
+
const links = contentConfig().links;
|
|
17
|
+
return Boolean(links?.[namespace]?.[key]);
|
|
10
18
|
};
|
|
11
19
|
const resolveDocumentRefLinks = async (event, content, requestedLocale) => {
|
|
12
20
|
if (!content || content._type !== "markdown" || !content.body) {
|
|
@@ -16,14 +24,16 @@ const resolveDocumentRefLinks = async (event, content, requestedLocale) => {
|
|
|
16
24
|
if (!hrefs.length) {
|
|
17
25
|
return void 0;
|
|
18
26
|
}
|
|
19
|
-
const manifest = await getContentManifest(event);
|
|
20
27
|
const entries = await Promise.all(hrefs.map(async (href) => {
|
|
21
28
|
const parsed = parseRefLink(href);
|
|
22
29
|
if (!parsed) {
|
|
23
30
|
return null;
|
|
24
31
|
}
|
|
25
|
-
const canonicalKey =
|
|
32
|
+
const canonicalKey = await resolveCanonicalKey(event, parsed.ref);
|
|
26
33
|
if (!canonicalKey) {
|
|
34
|
+
if (isConfiguredQuickLink(href)) {
|
|
35
|
+
return [href, href];
|
|
36
|
+
}
|
|
27
37
|
if (import.meta.dev) {
|
|
28
38
|
console.warn(`[content] Could not resolve markdown ref "${href}" in "${content._file || content._id}"`);
|
|
29
39
|
}
|
|
@@ -39,7 +49,8 @@ const resolveDocumentRefLinks = async (event, content, requestedLocale) => {
|
|
|
39
49
|
if (import.meta.dev && requestedLocale && variant.resolvedLocale && variant.resolvedLocale !== requestedLocale) {
|
|
40
50
|
console.warn(`[content] Markdown ref "${href}" in "${content._file || content._id}" fell back from locale "${requestedLocale}" to "${variant.resolvedLocale}"`);
|
|
41
51
|
}
|
|
42
|
-
|
|
52
|
+
const routeLocale = variant.fallback && requestedLocale ? requestedLocale : variant.resolvedLocale;
|
|
53
|
+
return [href, `${projectContentPathToLocale(variant.path, routeLocale, contentConfig().defaultLocale)}${parsed.hash}`];
|
|
43
54
|
}));
|
|
44
55
|
const resolvedRefs = Object.fromEntries(entries.filter((entry) => Boolean(entry)));
|
|
45
56
|
return Object.keys(resolvedRefs).length ? resolvedRefs : void 0;
|
package/dist/types/module.d.ts
CHANGED
|
@@ -264,6 +264,21 @@ export interface ContentRevalidateOptions {
|
|
|
264
264
|
*/
|
|
265
265
|
allowUnsigned?: boolean;
|
|
266
266
|
}
|
|
267
|
+
export interface ContentLinkRouteTarget {
|
|
268
|
+
/**
|
|
269
|
+
* Nuxt route name passed to Nuxt I18n `localePath()`.
|
|
270
|
+
*/
|
|
271
|
+
route: string;
|
|
272
|
+
/**
|
|
273
|
+
* Static route params forwarded to Nuxt I18n `localePath()`.
|
|
274
|
+
*/
|
|
275
|
+
params?: Record<string, string | number>;
|
|
276
|
+
/**
|
|
277
|
+
* Static query params forwarded to Nuxt I18n `localePath()`.
|
|
278
|
+
*/
|
|
279
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
280
|
+
}
|
|
281
|
+
export type ContentLinksOptions = Record<string, Record<string, ContentLinkRouteTarget>>;
|
|
267
282
|
export interface ContentAgentRouteOptions {
|
|
268
283
|
routes?: boolean;
|
|
269
284
|
linkHeaders?: boolean;
|
|
@@ -313,6 +328,15 @@ export interface ModuleOptions {
|
|
|
313
328
|
* `x-ginko-revalidate-token` or `authorization: Bearer <token>`.
|
|
314
329
|
*/
|
|
315
330
|
revalidate?: false | ContentRevalidateOptions;
|
|
331
|
+
/**
|
|
332
|
+
* Writer-facing markdown quick links. Values point at Nuxt route names;
|
|
333
|
+
* localized paths stay owned by Nuxt I18n.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* content.links.main.pricing = { route: 'pricing' }
|
|
337
|
+
* markdown: [Pricing]($main.pricing)
|
|
338
|
+
*/
|
|
339
|
+
links?: ContentLinksOptions;
|
|
316
340
|
/**
|
|
317
341
|
* First-class agent markdown and LLM route features.
|
|
318
342
|
*/
|
package/dist/types.d.mts
CHANGED
|
@@ -8,4 +8,4 @@ export { type agentMetadataFields, type defineAgentAppPage, type defineAgentMark
|
|
|
8
8
|
|
|
9
9
|
export { default, type normalizeContentConfigCollectionNames } from './module.mjs'
|
|
10
10
|
|
|
11
|
-
export { type AgentMetadataField, type AgentMetadataFieldList, type BacklinkFields, type BacklinkSource, type BacklinksOptions, type BacklinksResult, type CollectionQueryBuilder, type CollectionQueryField, type CollectionQueryFieldValue, type CollectionQueryKey, type CollectionQueryOperator, type CollectionQueryValue, type CollectionSchema, type ContentAgentAppPageConfig, type ContentAgentAppPageContext, type ContentAgentCollectionConfig, type ContentAgentConfig, type ContentAgentLocalizedValue, type ContentAgentMarkdownMetadataConfig, type ContentAgentMarkdownOptions, type ContentAgentMarkdownPolicyConfig, type ContentAgentRouteOptions, type ContentAgentSectionConfig, type ContentAgentSiteConfig, type ContentCacheArtifact, type ContentCmsCollectionConfig, type ContentCmsFieldConfig, type ContentCmsFieldType, type ContentCmsRelationConfig, type ContentCollectionConfig, type ContentCollectionHandle, type ContentCollectionI18nConfig, type ContentCollectionI18nMap, type ContentCollectionItem, type ContentCollectionItemSurroundingsOptions, type ContentCollectionKind, type ContentCollectionMap, type ContentCollectionName, type ContentCollectionNavigationOptions, type ContentCollectionPageOptions, type ContentCollectionRouteConfig, type ContentCollectionRouteMetaOptions, type ContentCollectionSearchSectionsOptions, type ContentCollectionSource, type ContentCollectionSourceObject, type ContentCollectionStringName, type ContentCollectionTarget, type ContentConfig, type ContentContext, type ContentI18nOptions, type ContentLocaleEntry, type ContentLocaleRoute, type ContentManifest, type ContentMiniSearchOptions, type ContentNavigationItem, type ContentPageResult, type ContentPreviewOptions, type ContentProviderName, type ContentProviderSearchRequest, type ContentQueryBuilder, type ContentQueryBuilderParams, type ContentQueryBuilderWhere, type ContentQueryFetcher, type ContentQueryRequest, type ContentQuerySortFields, type ContentQuerySortOptions, type ContentQuerySortParams, type ContentReferenceSchema, type ContentResolvedMeta, type ContentRevalidateOptions, type ContentRouteMeta, type ContentSearchEngine, type ContentSearchIndexRecord, type ContentSearchOptions, type ContentSearchPublicRuntimeConfig, type ContentSearchResult, type ContentSearchSection, type ContentSelector, type ContentSeoImage, type ContentSeoMeta, type ContentSitemapAlternative, type ContentSitemapAssertOptions, type ContentSitemapAssertSitemapOptions, type ContentSitemapEntry, type ContentSitemapImage, type ContentSitemapOptions, type ContentTransformer, type ContentTreeItem, type ContentVariant, type DefineCollectionObject, type DefineCollectionOptions, type DocumentFromHandle, type LocaleFallback, type LocalePathEntry, type LocalizedContentDocument, type LocalizedDoc, type ManifestVariant, type ManyOptions, type MarkdownNode, type MarkdownOptions, type MarkdownParsedContent, type MarkdownPluginDescriptor, type MarkdownPluginOptions, type MarkdownRoot, type ModuleHooks, type ModuleOptions, type MountOptions, type NavItem, type NeighborsOptions, type NeighborsResult, type OneOptions, type PaginationOptions, type PaginationResult, type ParseContentOptions, type ParsedContent, type ParsedContentInternalMeta, type ParsedContentMeta, type PopulateFromOptions, type PopulateSpec, type PopulatedDocument, type QueryGroupBuilder, type QueryGroupFunction, type QueryMatchOperator, type QueryOperators, type QueryOrderDirection, type QueryOrderOptions, type QueryWhere, type ResolutionEnvelope, type ResolveContentReferenceOptions, type ResolveOneOptions, type ResolveOneResult, type ResolvedContentContext, type ResolvedContentI18nOptions, type ResolvedMarkdownPlugin, type ResolvedVariant, type SortDirection, type SortSpec, type StrictParsedContent, type StrictParsedContentMeta, type Toc, type TocLink, type TransformContentOptions, type TransformContentSource, type TreeOptions, type VariantsOptions } from './module.mjs'
|
|
11
|
+
export { type AgentMetadataField, type AgentMetadataFieldList, type BacklinkFields, type BacklinkSource, type BacklinksOptions, type BacklinksResult, type CollectionQueryBuilder, type CollectionQueryField, type CollectionQueryFieldValue, type CollectionQueryKey, type CollectionQueryOperator, type CollectionQueryValue, type CollectionSchema, type ContentAgentAppPageConfig, type ContentAgentAppPageContext, type ContentAgentCollectionConfig, type ContentAgentConfig, type ContentAgentLocalizedValue, type ContentAgentMarkdownMetadataConfig, type ContentAgentMarkdownOptions, type ContentAgentMarkdownPolicyConfig, type ContentAgentRouteOptions, type ContentAgentSectionConfig, type ContentAgentSiteConfig, type ContentCacheArtifact, type ContentCmsCollectionConfig, type ContentCmsFieldConfig, type ContentCmsFieldType, type ContentCmsRelationConfig, type ContentCollectionConfig, type ContentCollectionHandle, type ContentCollectionI18nConfig, type ContentCollectionI18nMap, type ContentCollectionItem, type ContentCollectionItemSurroundingsOptions, type ContentCollectionKind, type ContentCollectionMap, type ContentCollectionName, type ContentCollectionNavigationOptions, type ContentCollectionPageOptions, type ContentCollectionRouteConfig, type ContentCollectionRouteMetaOptions, type ContentCollectionSearchSectionsOptions, type ContentCollectionSource, type ContentCollectionSourceObject, type ContentCollectionStringName, type ContentCollectionTarget, type ContentConfig, type ContentContext, type ContentI18nOptions, type ContentLinkRouteTarget, type ContentLinksOptions, type ContentLocaleEntry, type ContentLocaleRoute, type ContentManifest, type ContentMiniSearchOptions, type ContentNavigationItem, type ContentPageResult, type ContentPreviewOptions, type ContentProviderName, type ContentProviderSearchRequest, type ContentQueryBuilder, type ContentQueryBuilderParams, type ContentQueryBuilderWhere, type ContentQueryFetcher, type ContentQueryRequest, type ContentQuerySortFields, type ContentQuerySortOptions, type ContentQuerySortParams, type ContentReferenceSchema, type ContentResolvedMeta, type ContentRevalidateOptions, type ContentRouteMeta, type ContentSearchEngine, type ContentSearchIndexRecord, type ContentSearchOptions, type ContentSearchPublicRuntimeConfig, type ContentSearchResult, type ContentSearchSection, type ContentSelector, type ContentSeoImage, type ContentSeoMeta, type ContentSitemapAlternative, type ContentSitemapAssertOptions, type ContentSitemapAssertSitemapOptions, type ContentSitemapEntry, type ContentSitemapImage, type ContentSitemapOptions, type ContentTransformer, type ContentTreeItem, type ContentVariant, type DefineCollectionObject, type DefineCollectionOptions, type DocumentFromHandle, type LocaleFallback, type LocalePathEntry, type LocalizedContentDocument, type LocalizedDoc, type ManifestVariant, type ManyOptions, type MarkdownNode, type MarkdownOptions, type MarkdownParsedContent, type MarkdownPluginDescriptor, type MarkdownPluginOptions, type MarkdownRoot, type ModuleHooks, type ModuleOptions, type MountOptions, type NavItem, type NeighborsOptions, type NeighborsResult, type OneOptions, type PaginationOptions, type PaginationResult, type ParseContentOptions, type ParsedContent, type ParsedContentInternalMeta, type ParsedContentMeta, type PopulateFromOptions, type PopulateSpec, type PopulatedDocument, type QueryGroupBuilder, type QueryGroupFunction, type QueryMatchOperator, type QueryOperators, type QueryOrderDirection, type QueryOrderOptions, type QueryWhere, type ResolutionEnvelope, type ResolveContentReferenceOptions, type ResolveOneOptions, type ResolveOneResult, type ResolvedContentContext, type ResolvedContentI18nOptions, type ResolvedMarkdownPlugin, type ResolvedVariant, type SortDirection, type SortSpec, type StrictParsedContent, type StrictParsedContentMeta, type Toc, type TocLink, type TransformContentOptions, type TransformContentSource, type TreeOptions, type VariantsOptions } from './module.mjs'
|
package/dist/web-types.json
CHANGED