@tenphi/docs 0.17.0 → 0.18.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/dist/config/index.d.ts +2 -2
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/schema.json +976 -80
- package/dist/config-CD77r6rT.js +2005 -0
- package/dist/config-CD77r6rT.js.map +1 -0
- package/dist/content/index.d.ts +1 -1
- package/dist/content/index.js +1 -1
- package/dist/{content-XLQlJDnf.js → content-6Xp1J4Jh.js} +128 -26
- package/dist/content-6Xp1J4Jh.js.map +1 -0
- package/dist/index.d.ts +88 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +324 -5
- package/dist/index.js.map +1 -1
- package/dist/markdown/index.d.ts +1 -1
- package/dist/{types-C-AgUcAb.d.ts → types-CoFJUBNa.d.ts} +131 -21
- package/dist/types-CoFJUBNa.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/config-Ci9Nv0wQ.js +0 -927
- package/dist/config-Ci9Nv0wQ.js.map +0 -1
- package/dist/content-XLQlJDnf.js.map +0 -1
- package/dist/types-C-AgUcAb.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GlazeColorInput, GlazeColorValue,
|
|
2
|
-
import { Styles, StylesWithoutSelectors } from "@tenphi/tasty/core";
|
|
1
|
+
import { ColorDef, GlazeColorInput, GlazeColorValue, GlazeConfigOverride } from "@tenphi/glaze";
|
|
2
|
+
import { RecipeStyles, Styles, StylesWithoutSelectors } from "@tenphi/tasty/core";
|
|
3
3
|
//#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
|
|
4
4
|
// ## Interfaces
|
|
5
5
|
/**
|
|
@@ -1055,7 +1055,35 @@ interface DocsDiagnostic {
|
|
|
1055
1055
|
message: string;
|
|
1056
1056
|
}>;
|
|
1057
1057
|
}
|
|
1058
|
+
interface SocialImage {
|
|
1059
|
+
src: string;
|
|
1060
|
+
alt: string;
|
|
1061
|
+
width?: number;
|
|
1062
|
+
height?: number;
|
|
1063
|
+
}
|
|
1064
|
+
interface BreadcrumbItem {
|
|
1065
|
+
name: string;
|
|
1066
|
+
url: string;
|
|
1067
|
+
}
|
|
1068
|
+
interface SiteSeoConfig {
|
|
1069
|
+
titleTemplate?: string;
|
|
1070
|
+
image?: SocialImage | false;
|
|
1071
|
+
/** False on preview deployments; pages cannot override this restriction. */
|
|
1072
|
+
index?: boolean;
|
|
1073
|
+
breadcrumbs?: boolean;
|
|
1074
|
+
/** Offer a clean Markdown download and copy control. Defaults to true. */
|
|
1075
|
+
copyPage?: boolean;
|
|
1076
|
+
}
|
|
1077
|
+
interface PageSeoConfig {
|
|
1078
|
+
/** Complete document title, overriding the site template. */
|
|
1079
|
+
title?: string;
|
|
1080
|
+
canonical?: string;
|
|
1081
|
+
image?: SocialImage | false;
|
|
1082
|
+
index?: boolean;
|
|
1083
|
+
breadcrumbs?: BreadcrumbItem[] | false;
|
|
1084
|
+
}
|
|
1058
1085
|
interface SiteConfig {
|
|
1086
|
+
seo?: SiteSeoConfig;
|
|
1059
1087
|
title?: string;
|
|
1060
1088
|
/** Version of the documented package, rendered beside the site title. */
|
|
1061
1089
|
version?: string;
|
|
@@ -1068,8 +1096,12 @@ interface SiteConfig {
|
|
|
1068
1096
|
headerLinks?: HeaderLink[];
|
|
1069
1097
|
/** Source artwork used to generate browser, touch, and installable-app icons. */
|
|
1070
1098
|
favicon?: string | SiteIconConfig;
|
|
1099
|
+
/** Shared header and mobile drawer artwork. Paths are relative to the project root. */
|
|
1100
|
+
logo?: false | string | SiteLogoConfig;
|
|
1071
1101
|
}
|
|
1072
1102
|
interface SiteVersion {
|
|
1103
|
+
/** Exclude this version from search engines, sitemaps, and agent indexes. */
|
|
1104
|
+
index?: boolean;
|
|
1073
1105
|
label: string;
|
|
1074
1106
|
routeBase: string;
|
|
1075
1107
|
}
|
|
@@ -1081,6 +1113,20 @@ interface HeaderLink {
|
|
|
1081
1113
|
variant?: "default" | "primary";
|
|
1082
1114
|
newTab?: boolean;
|
|
1083
1115
|
}
|
|
1116
|
+
interface SiteLogoConfig {
|
|
1117
|
+
/** Use one image, or supply both light and dark images instead. */
|
|
1118
|
+
src?: string;
|
|
1119
|
+
light?: string;
|
|
1120
|
+
dark?: string;
|
|
1121
|
+
alt?: string;
|
|
1122
|
+
/** Defaults to the localized documentation home. */
|
|
1123
|
+
href?: string;
|
|
1124
|
+
/** Intrinsic dimensions; normally inferred from the image. */
|
|
1125
|
+
width?: number;
|
|
1126
|
+
height?: number;
|
|
1127
|
+
/** True by default because the site title labels the same destination. */
|
|
1128
|
+
decorative?: boolean;
|
|
1129
|
+
}
|
|
1084
1130
|
interface SiteIconConfig {
|
|
1085
1131
|
/** Local SVG, PNG, JPEG, WebP, AVIF, or GIF path, relative to the project root. */
|
|
1086
1132
|
source: string;
|
|
@@ -1146,7 +1192,7 @@ interface ContentConfig {
|
|
|
1146
1192
|
allowOutsideRoot?: boolean;
|
|
1147
1193
|
/** Rewrite absolute links into the current repository to matching Cookbook routes. */
|
|
1148
1194
|
localizeRepositoryLinks?: boolean;
|
|
1149
|
-
/**
|
|
1195
|
+
/** Preserve custom metadata for content queries and renderer middleware, or reject unknown fields. */
|
|
1150
1196
|
frontmatter?: "preserve" | "reject";
|
|
1151
1197
|
}
|
|
1152
1198
|
type NavigationItem = string | {
|
|
@@ -1197,6 +1243,8 @@ type ThemeTokenValue = string | number;
|
|
|
1197
1243
|
interface ThemeTokens {
|
|
1198
1244
|
$gap?: ThemeTokenValue;
|
|
1199
1245
|
$radius?: ThemeTokenValue;
|
|
1246
|
+
/** Independent pill/circle radius for header controls and drawer close buttons. */
|
|
1247
|
+
"$header-control-radius"?: ThemeTokenValue;
|
|
1200
1248
|
"$card-radius"?: ThemeTokenValue;
|
|
1201
1249
|
"$border-width"?: ThemeTokenValue;
|
|
1202
1250
|
"$outline-width"?: ThemeTokenValue;
|
|
@@ -1245,20 +1293,34 @@ interface ThemeFontFile {
|
|
|
1245
1293
|
/** A Google Fonts family or a set of files hosted by the site. */
|
|
1246
1294
|
type ThemeFont = string | {
|
|
1247
1295
|
google: string;
|
|
1248
|
-
weights
|
|
1296
|
+
/** Individual weights or variable ranges, using the same syntax as local files. */
|
|
1297
|
+
weights?: Array<number | `${number} ${number}`>;
|
|
1298
|
+
/** Defaults to normal and italic; omit unavailable styles explicitly. */
|
|
1299
|
+
styles?: Array<"normal" | "italic">;
|
|
1249
1300
|
} | {
|
|
1250
1301
|
family: string;
|
|
1251
1302
|
files: ThemeFontFile[];
|
|
1252
1303
|
};
|
|
1304
|
+
interface FontLoadingConfig {
|
|
1305
|
+
/** Download Google font files into the site by default. */
|
|
1306
|
+
google?: "self-hosted" | "remote";
|
|
1307
|
+
/** Reuse verified cache entries by default. Offline never performs network requests. */
|
|
1308
|
+
cache?: "reuse" | "refresh" | "offline";
|
|
1309
|
+
display?: "auto" | "block" | "swap" | "fallback" | "optional";
|
|
1310
|
+
}
|
|
1253
1311
|
interface ThemeFonts {
|
|
1254
1312
|
body?: ThemeFont;
|
|
1255
1313
|
heading?: ThemeFont;
|
|
1256
1314
|
code?: ThemeFont;
|
|
1257
1315
|
}
|
|
1258
1316
|
/** A Glaze declaration, or a literal color retained as a convenient seed shorthand. */
|
|
1259
|
-
type ThemePaletteColor = GlazeColorValue |
|
|
1317
|
+
type ThemePaletteColor = GlazeColorValue | ColorDef;
|
|
1318
|
+
declare const COOKBOOK_PALETTE_NAMES: readonly ["surface", "header", "surface-2", "surface-3", "text", "heading", "text-soft", "text-muted", "surface-2-hover", "surface-2-pressed", "surface-3-hover", "surface-3-pressed", "accent-text", "focus", "accent-surface", "accent-surface-text", "logo-surface", "logo-mark", "accent-surface-subtle", "accent-surface-2-subtle", "shadow", "clear", "info", "info-text", "info-surface", "success", "success-text", "success-surface", "warning", "warning-text", "warning-surface", "danger", "danger-text", "danger-surface", "orange", "orange-text", "orange-surface", "green", "green-text", "green-surface", "blue", "blue-text", "blue-surface", "purple", "purple-text", "purple-surface", "red", "red-text", "red-surface", "overlay", "border", "border-strong", "syntax-bg", "syntax-text", "syntax-comment", "syntax-punctuation", "syntax-keyword", "syntax-string", "syntax-token", "syntax-property", "syntax-number", "syntax-function", "syntax-value", "syntax-operator"];
|
|
1319
|
+
type CookbookPaletteName = (typeof COOKBOOK_PALETTE_NAMES)[number];
|
|
1260
1320
|
/** Semantic palette declarations resolved for every appearance mode. */
|
|
1261
|
-
interface ThemePaletteConfig {
|
|
1321
|
+
interface ThemePaletteConfig extends Partial<Record<CookbookPaletteName, ThemePaletteColor>> {
|
|
1322
|
+
/** Additional Glaze roles, exposed as Tasty #name tokens. Use lowercase hyphenated names. */
|
|
1323
|
+
[name: string]: ThemePaletteColor | undefined;
|
|
1262
1324
|
info?: ThemePaletteColor;
|
|
1263
1325
|
success?: ThemePaletteColor;
|
|
1264
1326
|
warning?: ThemePaletteColor;
|
|
@@ -1271,41 +1333,62 @@ interface ThemePaletteConfig {
|
|
|
1271
1333
|
overlay?: ThemePaletteColor;
|
|
1272
1334
|
/** Primary reading text, resolved against `surface`. */
|
|
1273
1335
|
text?: ThemePaletteColor;
|
|
1336
|
+
/** Heading text; follows an explicit `text` declaration unless configured. */
|
|
1337
|
+
heading?: ThemePaletteColor;
|
|
1274
1338
|
/** Secondary reading text, resolved against `surface`. */
|
|
1275
1339
|
textSoft?: ThemePaletteColor;
|
|
1276
1340
|
}
|
|
1277
1341
|
/** Cookbook UI surfaces whose default Tasty styles can be customized. */
|
|
1278
|
-
declare const COOKBOOK_COMPONENT_NAMES: readonly ["Card", "Callout", "CodeGroup", "Tab", "Footer", "Hero", "PageFrame", "HeaderFrame", "HeaderLinks", "Layout", "SearchButton", "TableOfContentsLayout", "LanguageSelect", "Logo", "MarkdownCodeBlock", "MarkdownHeading", "MarkdownInlineCode", "MarkdownTable", "Mermaid", "MobileMenuFooter", "MobileMenuToggle", "MobileNavigationTabs", "
|
|
1342
|
+
declare const COOKBOOK_COMPONENT_NAMES: readonly ["Card", "Callout", "CodeGroup", "Tab", "Footer", "PageActions", "MobileTableOfContents", "Hero", "PageFrame", "HeaderFrame", "HeaderLinks", "Heading", "Layout", "SearchButton", "TableOfContentsLayout", "LanguageSelect", "Logo", "SiteLogo", "MarkdownCodeBlock", "MarkdownHeading", "MarkdownInlineCode", "MarkdownTable", "Mermaid", "MobileMenuFooter", "MobileMenuToggle", "MobileNavigationTabs", "PackageVersion", "VersionSwitcher", "Preview", "Sidebar", "SocialIcons", "Steps", "Tabs", "TableOfContents", "ThemeSelect", "TopNavigation", "StarlightHeader", "Document", "MainPane", "MainContent", "Banner", "SkipLink", "Search", "Pagination", "Markdown", "MermaidSource", "StarlightAside", "StarlightCard", "StarlightLinkCard", "StarlightBadge", "StarlightSteps", "SearchResults", "SyntaxHighlight"];
|
|
1279
1343
|
type CookbookComponentName = (typeof COOKBOOK_COMPONENT_NAMES)[number];
|
|
1280
1344
|
/** Named Tasty sub-elements available on each configurable Cookbook surface. */
|
|
1281
1345
|
declare const COOKBOOK_COMPONENT_SUB_ELEMENTS: {
|
|
1346
|
+
readonly SyntaxHighlight: readonly ["Scroll", "Wrap", "Marker", "Comment", "Punctuation", "Keyword", "String", "Token", "Property", "Number", "Function", "Value", "Operator", "Text", "Bg", "Inserted", "Deleted", "Italic", "Strong", "Underline"];
|
|
1347
|
+
readonly SearchResults: readonly ["Form", "Input", "Clear", "Results", "Result", "ResultLink", "SearchIcon", "ClearIcon", "SuppressedClear", "Message", "List", "Title", "Excerpt", "NestedResult", "Match", "More", "HoverMore"];
|
|
1348
|
+
readonly StarlightSteps: readonly ["Item", "Counter", "Connector"];
|
|
1349
|
+
readonly StarlightBadge: readonly [];
|
|
1350
|
+
readonly StarlightLinkCard: readonly ["Hover", "Stack", "Link", "LinkOverlay", "DescriptionAndIcon"];
|
|
1351
|
+
readonly StarlightCard: readonly ["Title"];
|
|
1352
|
+
readonly StarlightAside: readonly ["Note", "Tip", "Caution", "Danger", "Title", "Icon", "FirstContent"];
|
|
1353
|
+
readonly MermaidSource: readonly [];
|
|
1354
|
+
readonly Markdown: readonly ["Block", "BlockSpacing", "HeadingSpacing", "List", "CompactItem", "ListItem", "DefinitionTerm", "DefinitionDescription", "Link", "HoverLink", "Quote", "Rule", "Details", "HoverDetails", "Summary", "OpenSummary", "SummaryMarker", "SummaryIcon", "OpenSummaryIcon", "Code"];
|
|
1355
|
+
readonly Pagination: readonly ["Link", "NextLink", "NextIcon", "NextLabel", "HoverLink", "ActiveLink", "Title", "LoneNextLink", "NativeIcon", "Icon", "PreviousIconRtl", "NextIconRtl"];
|
|
1356
|
+
readonly Search: readonly ["Status", "Dialog", "CloseIcon", "OpenDialog", "Backdrop", "Frame", "Container", "Close", "HoverClose", "ActiveClose"];
|
|
1357
|
+
readonly SkipLink: readonly ["Focus"];
|
|
1358
|
+
readonly Banner: readonly ["Link"];
|
|
1359
|
+
readonly MainContent: readonly ["ContentSpacing", "Container", "Panel", "FirstPanel", "BodyPanel"];
|
|
1360
|
+
readonly MainPane: readonly ["WithSidebars"];
|
|
1361
|
+
readonly Document: readonly ["All", "Body", "Control", "Pointer", "ResponsiveWidth", "ResponsiveHeight", "Hidden", "DesktopBlock", "DesktopFlex", "ScreenReaderOnly", "Strong", "Link", "NarrowBlock", "MobileBlock", "Code", "FocusRing", "CurrentLink", "SearchOpen"];
|
|
1282
1362
|
readonly PageFrame: readonly ["MainFrame", "SidebarFrame", "Columns"];
|
|
1283
1363
|
readonly HeaderFrame: readonly [];
|
|
1284
|
-
readonly
|
|
1285
|
-
readonly
|
|
1286
|
-
readonly
|
|
1287
|
-
readonly
|
|
1364
|
+
readonly Heading: readonly ["Level1", "Level2", "Level3", "Level4", "Level5", "Level6", "PageTitle"];
|
|
1365
|
+
readonly HeaderLinks: readonly ["Desktop", "DesktopLink", "Link", "HoverLink", "PrimaryLink", "HoverPrimaryLink", "Trigger", "HoverTrigger", "Panel", "PanelNavigation", "PanelLink", "FirstPanelLink", "Close", "HoverClose"];
|
|
1366
|
+
readonly Layout: readonly ["Islands", "LockedPage", "Light", "Auto"];
|
|
1367
|
+
readonly SearchButton: readonly ["PendingShortcut", "Label", "Shortcut", "Hover", "Active", "NativeIcon", "Icon"];
|
|
1368
|
+
readonly TableOfContentsLayout: readonly ["WithMobile", "Content"];
|
|
1288
1369
|
readonly Card: readonly ["Heading2", "Heading3", "Paragraph"];
|
|
1289
1370
|
readonly Callout: readonly ["Title", "Body", "Tip", "Caution", "Danger"];
|
|
1290
1371
|
readonly CodeGroup: readonly ["Caption", "Pre", "Code"];
|
|
1291
1372
|
readonly Tab: readonly ["Heading", "Hidden", "HiddenHeading"];
|
|
1373
|
+
readonly MobileTableOfContents: readonly ["Summary", "List", "NestedList", "Item", "Link", "HoverLink", "Focus"];
|
|
1374
|
+
readonly PageActions: readonly ["Control", "Hover", "Focus", "Pending", "Status"];
|
|
1292
1375
|
readonly Footer: readonly ["Meta", "LoneMetaItem", "MetaLink", "HoverMetaLink", "Credit", "CreditLink", "HoverCreditLink"];
|
|
1293
1376
|
readonly Hero: readonly ["Visual", "Stack", "Copy", "Title", "Tagline", "Actions", "Action", "HoverAction", "PrimaryAction", "SecondaryAction", "MinimalAction", "ActionIcon"];
|
|
1294
1377
|
readonly LanguageSelect: readonly ["Label", "HoverLabel", "LabelIcon", "Select", "Caret", "Option"];
|
|
1295
1378
|
readonly Logo: readonly ["Svg", "Mark"];
|
|
1296
|
-
readonly
|
|
1379
|
+
readonly SiteLogo: readonly ["Image", "Light", "Dark"];
|
|
1380
|
+
readonly MarkdownCodeBlock: readonly ["Pre", "CopyButton", "HoverCopyButton", "CopiedButton", "CopyIcon", "CopiedIcon", "Code", "Diff", "DiffCode", "DiffLine", "EmptyDiffLine", "InsertedLine", "DeletedLine"];
|
|
1297
1381
|
readonly MarkdownHeading: readonly ["Heading", "Heading1", "Heading2", "Heading3", "Heading4", "Heading5", "Heading6", "Link", "RevealedLink", "HoverLink", "LinkIcon", "CopiedLink", "CopiedLinkIcon", "CopiedIcon"];
|
|
1298
|
-
readonly MarkdownTable: readonly ["Table", "Cell", "LastBodyRowCell", "HeaderCell"];
|
|
1382
|
+
readonly MarkdownTable: readonly ["Table", "Cell", "LastBodyRowCell", "HeaderCell", "Scroll"];
|
|
1299
1383
|
readonly MarkdownInlineCode: readonly [];
|
|
1300
1384
|
readonly Mermaid: readonly ["Diagram", "Text", "MonoText"];
|
|
1301
1385
|
readonly MobileMenuFooter: readonly ["Social"];
|
|
1302
1386
|
readonly MobileMenuToggle: readonly ["Control", "Icon", "Section", "Page", "HoverControl", "ActiveControl"];
|
|
1303
1387
|
readonly MobileNavigationTabs: readonly ["Trigger", "Marker", "Caret", "ExpandedCaret", "Label", "List", "Item", "Link", "HoverLink", "CurrentLink"];
|
|
1304
|
-
readonly MobileTableOfContents: readonly ["Item", "Link", "LinkLabel", "HoverLink", "CurrentLink", "CurrentIndicator"];
|
|
1305
1388
|
readonly PackageVersion: readonly [];
|
|
1306
1389
|
readonly VersionSwitcher: readonly ["Trigger", "Panel", "OpenPanel", "Link", "CurrentLink"];
|
|
1307
1390
|
readonly Preview: readonly ["Caption", "Stage", "Frame", "Code", "Summary", "Pre"];
|
|
1308
|
-
readonly Sidebar: readonly ["Backdrop", "OpenBackdrop", "MobileHeading", "HomeLink", "HomeLogo", "HomeLabel", "Close", "HoverClose", "CloseIcon", "CurrentLink", "OpenPane", "Content", "Tree", "List", "Item", "TopLevelSpacing", "GroupSpacing", "NestedItem", "SectionHeading", "Control", "Summary", "GroupLabel", "GroupLabelText", "Link", "LinkLabel", "InteractiveControl", "SummaryMarker", "Caret", "ExpandedCaret", "LinkedSummary", "GroupLink", "LinkedSectionHeading", "SectionLink", "Badge", "TopLevelLink"];
|
|
1391
|
+
readonly Sidebar: readonly ["Backdrop", "OpenBackdrop", "MobileHeading", "HomeLink", "HomeLogo", "HomeLabel", "Close", "HoverClose", "CloseIcon", "CurrentLink", "OpenPane", "EnteredPane", "Content", "Tree", "List", "Item", "TopLevelSpacing", "GroupSpacing", "NestedItem", "SectionHeading", "Control", "Summary", "GroupLabel", "GroupLabelText", "Link", "LinkLabel", "InteractiveControl", "SummaryMarker", "Caret", "ExpandedCaret", "LinkedSummary", "GroupLink", "LinkedSectionHeading", "SectionLink", "Badge", "TopLevelLink"];
|
|
1309
1392
|
readonly Steps: readonly ["Item", "Marker"];
|
|
1310
1393
|
readonly SocialIcons: readonly ["Link", "HoverLink", "Icon"];
|
|
1311
1394
|
readonly Tabs: readonly ["List", "Button", "SelectedButton", "FocusedButton"];
|
|
@@ -1332,7 +1415,14 @@ type ComponentStylesConfig = { [Name in CookbookComponentName]?: CookbookCompone
|
|
|
1332
1415
|
interface ThemeConfig {
|
|
1333
1416
|
brand?: BrandConfig;
|
|
1334
1417
|
palette?: ThemePaletteConfig;
|
|
1418
|
+
/** Glaze tone windows and adaptation settings; contrastLevel remains a top-level theme option. */
|
|
1419
|
+
glaze?: Omit<GlazeConfigOverride, "contrastLevel">;
|
|
1420
|
+
/** Named CSS length expressions used as custom Tasty units. */
|
|
1421
|
+
units?: Record<string, string>;
|
|
1422
|
+
/** Flat reusable Tasty style bundles. Recipes cannot reference other recipes. */
|
|
1423
|
+
recipes?: Record<string, RecipeStyles>;
|
|
1335
1424
|
fonts?: ThemeFonts;
|
|
1425
|
+
fontLoading?: FontLoadingConfig;
|
|
1336
1426
|
states?: Record<string, string>;
|
|
1337
1427
|
tokens?: ThemeTokens;
|
|
1338
1428
|
presets?: TypographyPresets;
|
|
@@ -1364,7 +1454,13 @@ interface BuildConfig {
|
|
|
1364
1454
|
maxPathDepth?: number;
|
|
1365
1455
|
maxAssetBytes?: number;
|
|
1366
1456
|
}
|
|
1457
|
+
interface TableOfContentsConfig {
|
|
1458
|
+
minHeadingLevel?: number;
|
|
1459
|
+
maxHeadingLevel?: number;
|
|
1460
|
+
mobile?: boolean;
|
|
1461
|
+
}
|
|
1367
1462
|
interface DocsConfig {
|
|
1463
|
+
tableOfContents?: false | TableOfContentsConfig;
|
|
1368
1464
|
/** Content and lock directory, relative to docs.config.ts (or the inline root). */
|
|
1369
1465
|
root?: string;
|
|
1370
1466
|
/** Old public routes mapped to current document routes. */
|
|
@@ -1377,6 +1473,8 @@ interface DocsConfig {
|
|
|
1377
1473
|
lastUpdated?: boolean;
|
|
1378
1474
|
/** Languages keyed by their URL segment, or `root` for `/`. */
|
|
1379
1475
|
locales?: Record<string, LocaleConfig>;
|
|
1476
|
+
/** Cookbook interface messages, keyed by language code. Missing keys use English. */
|
|
1477
|
+
translations?: Record<string, Record<string, string>>;
|
|
1380
1478
|
/** Locale key used for fallback content. */
|
|
1381
1479
|
defaultLocale?: string;
|
|
1382
1480
|
content?: ContentConfig;
|
|
@@ -1388,12 +1486,15 @@ interface DocsConfig {
|
|
|
1388
1486
|
build?: BuildConfig;
|
|
1389
1487
|
}
|
|
1390
1488
|
interface NormalizedDocsConfig {
|
|
1489
|
+
tableOfContents?: false | TableOfContentsConfig;
|
|
1391
1490
|
redirects: Record<string, string>;
|
|
1392
1491
|
site: SiteConfig;
|
|
1393
1492
|
head: HeadConfig[];
|
|
1394
1493
|
editLink?: EditLinkConfig;
|
|
1395
1494
|
lastUpdated: boolean;
|
|
1396
1495
|
locales?: Record<string, LocaleConfig>;
|
|
1496
|
+
/** Cookbook interface messages, keyed by language code. Missing keys use English. */
|
|
1497
|
+
translations?: Record<string, Record<string, string>>;
|
|
1397
1498
|
defaultLocale?: string;
|
|
1398
1499
|
content: Required<Pick<ContentConfig, "allowOutsideRoot" | "localizeRepositoryLinks">> & ContentConfig;
|
|
1399
1500
|
navigation: NavigationConfig;
|
|
@@ -1408,6 +1509,7 @@ interface NormalizedDocsConfig {
|
|
|
1408
1509
|
};
|
|
1409
1510
|
}
|
|
1410
1511
|
interface DocsFrontmatter {
|
|
1512
|
+
seo?: PageSeoConfig;
|
|
1411
1513
|
aliases?: string[];
|
|
1412
1514
|
title?: string;
|
|
1413
1515
|
description?: string;
|
|
@@ -1418,10 +1520,7 @@ interface DocsFrontmatter {
|
|
|
1418
1520
|
order?: number;
|
|
1419
1521
|
group?: string;
|
|
1420
1522
|
};
|
|
1421
|
-
tableOfContents?: false |
|
|
1422
|
-
minHeadingLevel?: number;
|
|
1423
|
-
maxHeadingLevel?: number;
|
|
1424
|
-
};
|
|
1523
|
+
tableOfContents?: false | TableOfContentsConfig;
|
|
1425
1524
|
editUrl?: false | string;
|
|
1426
1525
|
/** Starlight page layout. */
|
|
1427
1526
|
template?: "doc" | "splash";
|
|
@@ -1433,10 +1532,14 @@ interface DocsFrontmatter {
|
|
|
1433
1532
|
} | {
|
|
1434
1533
|
file: string;
|
|
1435
1534
|
alt?: string;
|
|
1535
|
+
width?: number;
|
|
1536
|
+
height?: number;
|
|
1436
1537
|
} | {
|
|
1437
1538
|
dark: string;
|
|
1438
1539
|
light: string;
|
|
1439
1540
|
alt?: string;
|
|
1541
|
+
width?: number;
|
|
1542
|
+
height?: number;
|
|
1440
1543
|
};
|
|
1441
1544
|
actions?: Array<{
|
|
1442
1545
|
text: string;
|
|
@@ -1507,6 +1610,13 @@ interface DocsRoute {
|
|
|
1507
1610
|
entryId: string;
|
|
1508
1611
|
sourcePath: string;
|
|
1509
1612
|
title: string;
|
|
1613
|
+
/** False for public routes excluded from automatic navigation and indexes. */
|
|
1614
|
+
discoverable?: boolean;
|
|
1615
|
+
/** Search-engine eligibility, independent from navigation visibility. */
|
|
1616
|
+
indexable?: boolean;
|
|
1617
|
+
/** False for a canonical alias or a noindex page. */
|
|
1618
|
+
sitemap?: boolean;
|
|
1619
|
+
canonical?: string;
|
|
1510
1620
|
sidebar?: false | NavigationPlacement;
|
|
1511
1621
|
}
|
|
1512
1622
|
interface DocsGraph {
|
|
@@ -1567,5 +1677,5 @@ interface CreateDocsGraphOptions {
|
|
|
1567
1677
|
base?: string;
|
|
1568
1678
|
}
|
|
1569
1679
|
//#endregion
|
|
1570
|
-
export {
|
|
1571
|
-
//# sourceMappingURL=types-
|
|
1680
|
+
export { ThemeConfig as $, EditLinkConfig as A, NormalizedDocsConfig as B, DocsEntry as C, DocsReference as D, DocsHeading as E, MarkdownConfig as F, SearchConfig as G, PackageLockSource as H, NavigationConfig as I, SiteLogoConfig as J, SiteConfig as K, NavigationItem as L, HeadConfig as M, HeaderLink as N, DocsRoute as O, LocaleConfig as P, TableOfContentsConfig as Q, NavigationPlacement as R, DocsDiagnostic as S, DocsGraph as T, PackageManifest as U, PackageDiscovery as V, PageSeoConfig as W, SiteVersion as X, SiteSeoConfig as Y, SocialImage as Z, CookbookPaletteName as _, COOKBOOK_COMPONENT_NAMES as a, ThemeTokenValue as at, DocsAsset as b, ComponentStyleConfig as c, TypographyPresets as ct, ComponentsConfig as d, Link as dt, ThemeFont as et, ContentConfig as f, Paragraph as ft, CookbookLock as g, CookbookComponentSubElementName as h, BuildConfig as i, ThemePaletteConfig as it, FontLoadingConfig as j, DocsSource as k, ComponentStyles as l, Content as lt, CookbookComponentStyles as m, Root as mt, BrandDeclaration as n, ThemeFonts as nt, COOKBOOK_COMPONENT_SUB_ELEMENTS as o, ThemeTokens as ot, CookbookComponentName as p, PhrasingContent as pt, SiteIconConfig as q, BreadcrumbItem as r, ThemePaletteColor as rt, COOKBOOK_PALETTE_NAMES as s, TypographyPreset as st, BrandConfig as t, ThemeFontFile as tt, ComponentStylesConfig as u, Heading as ut, CreateDocsGraphOptions as v, DocsFrontmatter as w, DocsConfig as x, DiagnosticSeverity as y, NavigationTab as z };
|
|
1681
|
+
//# sourceMappingURL=types-CoFJUBNa.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CoFJUBNa.d.ts","names":[],"sources":["../../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts","../../../node_modules/.pnpm/@types+mdast@4.0.4/node_modules/@types/mdast/index.d.ts","../src/types.ts"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAqBiB;;;;UAKA;;;;EAIb;;;;EAKA;;;;EAIA;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V;EACA;EACA;;UAGe;EACf;EACA,SAAS;EACT,OAAO;;EAEP"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/docs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Repository-native content and configuration engine for Cookbook",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"vitest": "^4.1.11"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
|
-
"build": "tsdown --config tsdown.config.ts &&
|
|
83
|
+
"build": "tsdown --config tsdown.config.ts && node ../../scripts/copy-build-file.mjs src/config/schema.json dist/config/schema.json",
|
|
84
84
|
"clean": "rm -rf dist",
|
|
85
85
|
"typecheck": "tsc --noEmit",
|
|
86
86
|
"test": "vitest run"
|