@tenphi/docs 0.17.1 → 0.18.1
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 +962 -75
- 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-CrWnRfN7.js → content-DQluL5Ox.js} +129 -27
- package/dist/content-DQluL5Ox.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-CY8WfBmM.d.ts → types-CoFJUBNa.d.ts} +128 -21
- package/dist/types-CoFJUBNa.d.ts.map +1 -0
- package/package.json +3 -2
- package/dist/config-CW0iIYp8.js +0 -942
- package/dist/config-CW0iIYp8.js.map +0 -1
- package/dist/content-CrWnRfN7.js.map +0 -1
- package/dist/types-CY8WfBmM.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;
|
|
@@ -1277,38 +1339,56 @@ interface ThemePaletteConfig {
|
|
|
1277
1339
|
textSoft?: ThemePaletteColor;
|
|
1278
1340
|
}
|
|
1279
1341
|
/** Cookbook UI surfaces whose default Tasty styles can be customized. */
|
|
1280
|
-
declare const COOKBOOK_COMPONENT_NAMES: readonly ["Card", "Callout", "CodeGroup", "Tab", "Footer", "Hero", "PageFrame", "HeaderFrame", "HeaderLinks", "Heading", "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"];
|
|
1281
1343
|
type CookbookComponentName = (typeof COOKBOOK_COMPONENT_NAMES)[number];
|
|
1282
1344
|
/** Named Tasty sub-elements available on each configurable Cookbook surface. */
|
|
1283
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"];
|
|
1284
1362
|
readonly PageFrame: readonly ["MainFrame", "SidebarFrame", "Columns"];
|
|
1285
1363
|
readonly HeaderFrame: readonly [];
|
|
1286
1364
|
readonly Heading: readonly ["Level1", "Level2", "Level3", "Level4", "Level5", "Level6", "PageTitle"];
|
|
1287
|
-
readonly HeaderLinks: readonly ["Desktop", "Link", "HoverLink", "PrimaryLink", "HoverPrimaryLink", "Trigger", "HoverTrigger", "Panel", "PanelNavigation", "PanelLink", "FirstPanelLink", "Close", "HoverClose"];
|
|
1288
|
-
readonly Layout: readonly ["LockedPage"];
|
|
1289
|
-
readonly SearchButton: readonly ["Label", "Shortcut", "Hover", "Active", "NativeIcon", "Icon"];
|
|
1290
|
-
readonly TableOfContentsLayout: readonly ["Content"];
|
|
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"];
|
|
1291
1369
|
readonly Card: readonly ["Heading2", "Heading3", "Paragraph"];
|
|
1292
1370
|
readonly Callout: readonly ["Title", "Body", "Tip", "Caution", "Danger"];
|
|
1293
1371
|
readonly CodeGroup: readonly ["Caption", "Pre", "Code"];
|
|
1294
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"];
|
|
1295
1375
|
readonly Footer: readonly ["Meta", "LoneMetaItem", "MetaLink", "HoverMetaLink", "Credit", "CreditLink", "HoverCreditLink"];
|
|
1296
1376
|
readonly Hero: readonly ["Visual", "Stack", "Copy", "Title", "Tagline", "Actions", "Action", "HoverAction", "PrimaryAction", "SecondaryAction", "MinimalAction", "ActionIcon"];
|
|
1297
1377
|
readonly LanguageSelect: readonly ["Label", "HoverLabel", "LabelIcon", "Select", "Caret", "Option"];
|
|
1298
1378
|
readonly Logo: readonly ["Svg", "Mark"];
|
|
1299
|
-
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"];
|
|
1300
1381
|
readonly MarkdownHeading: readonly ["Heading", "Heading1", "Heading2", "Heading3", "Heading4", "Heading5", "Heading6", "Link", "RevealedLink", "HoverLink", "LinkIcon", "CopiedLink", "CopiedLinkIcon", "CopiedIcon"];
|
|
1301
|
-
readonly MarkdownTable: readonly ["Table", "Cell", "LastBodyRowCell", "HeaderCell"];
|
|
1382
|
+
readonly MarkdownTable: readonly ["Table", "Cell", "LastBodyRowCell", "HeaderCell", "Scroll"];
|
|
1302
1383
|
readonly MarkdownInlineCode: readonly [];
|
|
1303
1384
|
readonly Mermaid: readonly ["Diagram", "Text", "MonoText"];
|
|
1304
1385
|
readonly MobileMenuFooter: readonly ["Social"];
|
|
1305
1386
|
readonly MobileMenuToggle: readonly ["Control", "Icon", "Section", "Page", "HoverControl", "ActiveControl"];
|
|
1306
1387
|
readonly MobileNavigationTabs: readonly ["Trigger", "Marker", "Caret", "ExpandedCaret", "Label", "List", "Item", "Link", "HoverLink", "CurrentLink"];
|
|
1307
|
-
readonly MobileTableOfContents: readonly ["Item", "Link", "LinkLabel", "HoverLink", "CurrentLink", "CurrentIndicator"];
|
|
1308
1388
|
readonly PackageVersion: readonly [];
|
|
1309
1389
|
readonly VersionSwitcher: readonly ["Trigger", "Panel", "OpenPanel", "Link", "CurrentLink"];
|
|
1310
1390
|
readonly Preview: readonly ["Caption", "Stage", "Frame", "Code", "Summary", "Pre"];
|
|
1311
|
-
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"];
|
|
1312
1392
|
readonly Steps: readonly ["Item", "Marker"];
|
|
1313
1393
|
readonly SocialIcons: readonly ["Link", "HoverLink", "Icon"];
|
|
1314
1394
|
readonly Tabs: readonly ["List", "Button", "SelectedButton", "FocusedButton"];
|
|
@@ -1335,7 +1415,14 @@ type ComponentStylesConfig = { [Name in CookbookComponentName]?: CookbookCompone
|
|
|
1335
1415
|
interface ThemeConfig {
|
|
1336
1416
|
brand?: BrandConfig;
|
|
1337
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>;
|
|
1338
1424
|
fonts?: ThemeFonts;
|
|
1425
|
+
fontLoading?: FontLoadingConfig;
|
|
1339
1426
|
states?: Record<string, string>;
|
|
1340
1427
|
tokens?: ThemeTokens;
|
|
1341
1428
|
presets?: TypographyPresets;
|
|
@@ -1367,7 +1454,13 @@ interface BuildConfig {
|
|
|
1367
1454
|
maxPathDepth?: number;
|
|
1368
1455
|
maxAssetBytes?: number;
|
|
1369
1456
|
}
|
|
1457
|
+
interface TableOfContentsConfig {
|
|
1458
|
+
minHeadingLevel?: number;
|
|
1459
|
+
maxHeadingLevel?: number;
|
|
1460
|
+
mobile?: boolean;
|
|
1461
|
+
}
|
|
1370
1462
|
interface DocsConfig {
|
|
1463
|
+
tableOfContents?: false | TableOfContentsConfig;
|
|
1371
1464
|
/** Content and lock directory, relative to docs.config.ts (or the inline root). */
|
|
1372
1465
|
root?: string;
|
|
1373
1466
|
/** Old public routes mapped to current document routes. */
|
|
@@ -1380,6 +1473,8 @@ interface DocsConfig {
|
|
|
1380
1473
|
lastUpdated?: boolean;
|
|
1381
1474
|
/** Languages keyed by their URL segment, or `root` for `/`. */
|
|
1382
1475
|
locales?: Record<string, LocaleConfig>;
|
|
1476
|
+
/** Cookbook interface messages, keyed by language code. Missing keys use English. */
|
|
1477
|
+
translations?: Record<string, Record<string, string>>;
|
|
1383
1478
|
/** Locale key used for fallback content. */
|
|
1384
1479
|
defaultLocale?: string;
|
|
1385
1480
|
content?: ContentConfig;
|
|
@@ -1391,12 +1486,15 @@ interface DocsConfig {
|
|
|
1391
1486
|
build?: BuildConfig;
|
|
1392
1487
|
}
|
|
1393
1488
|
interface NormalizedDocsConfig {
|
|
1489
|
+
tableOfContents?: false | TableOfContentsConfig;
|
|
1394
1490
|
redirects: Record<string, string>;
|
|
1395
1491
|
site: SiteConfig;
|
|
1396
1492
|
head: HeadConfig[];
|
|
1397
1493
|
editLink?: EditLinkConfig;
|
|
1398
1494
|
lastUpdated: boolean;
|
|
1399
1495
|
locales?: Record<string, LocaleConfig>;
|
|
1496
|
+
/** Cookbook interface messages, keyed by language code. Missing keys use English. */
|
|
1497
|
+
translations?: Record<string, Record<string, string>>;
|
|
1400
1498
|
defaultLocale?: string;
|
|
1401
1499
|
content: Required<Pick<ContentConfig, "allowOutsideRoot" | "localizeRepositoryLinks">> & ContentConfig;
|
|
1402
1500
|
navigation: NavigationConfig;
|
|
@@ -1411,6 +1509,7 @@ interface NormalizedDocsConfig {
|
|
|
1411
1509
|
};
|
|
1412
1510
|
}
|
|
1413
1511
|
interface DocsFrontmatter {
|
|
1512
|
+
seo?: PageSeoConfig;
|
|
1414
1513
|
aliases?: string[];
|
|
1415
1514
|
title?: string;
|
|
1416
1515
|
description?: string;
|
|
@@ -1421,10 +1520,7 @@ interface DocsFrontmatter {
|
|
|
1421
1520
|
order?: number;
|
|
1422
1521
|
group?: string;
|
|
1423
1522
|
};
|
|
1424
|
-
tableOfContents?: false |
|
|
1425
|
-
minHeadingLevel?: number;
|
|
1426
|
-
maxHeadingLevel?: number;
|
|
1427
|
-
};
|
|
1523
|
+
tableOfContents?: false | TableOfContentsConfig;
|
|
1428
1524
|
editUrl?: false | string;
|
|
1429
1525
|
/** Starlight page layout. */
|
|
1430
1526
|
template?: "doc" | "splash";
|
|
@@ -1436,10 +1532,14 @@ interface DocsFrontmatter {
|
|
|
1436
1532
|
} | {
|
|
1437
1533
|
file: string;
|
|
1438
1534
|
alt?: string;
|
|
1535
|
+
width?: number;
|
|
1536
|
+
height?: number;
|
|
1439
1537
|
} | {
|
|
1440
1538
|
dark: string;
|
|
1441
1539
|
light: string;
|
|
1442
1540
|
alt?: string;
|
|
1541
|
+
width?: number;
|
|
1542
|
+
height?: number;
|
|
1443
1543
|
};
|
|
1444
1544
|
actions?: Array<{
|
|
1445
1545
|
text: string;
|
|
@@ -1510,6 +1610,13 @@ interface DocsRoute {
|
|
|
1510
1610
|
entryId: string;
|
|
1511
1611
|
sourcePath: string;
|
|
1512
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;
|
|
1513
1620
|
sidebar?: false | NavigationPlacement;
|
|
1514
1621
|
}
|
|
1515
1622
|
interface DocsGraph {
|
|
@@ -1570,5 +1677,5 @@ interface CreateDocsGraphOptions {
|
|
|
1570
1677
|
base?: string;
|
|
1571
1678
|
}
|
|
1572
1679
|
//#endregion
|
|
1573
|
-
export {
|
|
1574
|
-
//# 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;;;;EAI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EACV;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.1",
|
|
4
4
|
"description": "Repository-native content and configuration engine for Cookbook",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"micromark-extension-mdxjs": "^3.0.0",
|
|
66
66
|
"npm-package-arg": "^13.0.2",
|
|
67
67
|
"pacote": "^21.5.1",
|
|
68
|
+
"react": "^18.3.1 || ^19.0.0",
|
|
68
69
|
"tinyglobby": "^0.2.15",
|
|
69
70
|
"unist-util-visit": "^5.0.0",
|
|
70
71
|
"yaml": "^2.9.1"
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
"vitest": "^4.1.11"
|
|
81
82
|
},
|
|
82
83
|
"scripts": {
|
|
83
|
-
"build": "tsdown --config tsdown.config.ts &&
|
|
84
|
+
"build": "tsdown --config tsdown.config.ts && node ../../scripts/copy-build-file.mjs src/config/schema.json dist/config/schema.json",
|
|
84
85
|
"clean": "rm -rf dist",
|
|
85
86
|
"typecheck": "tsc --noEmit",
|
|
86
87
|
"test": "vitest run"
|