@tenphi/docs 0.31.4 → 0.33.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 +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/schema.json +83 -2
- package/dist/{config-Rk58xKVe.js → config-CD6uBrzU.js} +35 -25
- package/dist/config-CD6uBrzU.js.map +1 -0
- package/dist/content/index.d.ts +1 -1
- package/dist/content/index.js +1 -1
- package/dist/{content-BLYIGzTc.js → content-DKZAzwC7.js} +2 -2
- package/dist/{content-BLYIGzTc.js.map → content-DKZAzwC7.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/markdown/index.d.ts +1 -1
- package/dist/{types-Hl9VekAv.d.ts → types-B9dD3gLN.d.ts} +12 -8
- package/dist/{types-Hl9VekAv.d.ts.map → types-B9dD3gLN.d.ts.map} +1 -1
- package/package.json +2 -2
- package/dist/config-Rk58xKVe.js.map +0 -1
package/dist/config/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SocialImage, B as NavigationPlacement, C as DocsConfig, F as HeaderLink, H as NormalizedDocsConfig, I as LocaleConfig, J as SiteConfig, K as PageSeoConfig, L as MarkdownConfig, M as EditLinkConfig, N as FontLoadingConfig, P as HeadConfig, R as NavigationConfig, V as NavigationTab, X as SiteLogoConfig, Y as SiteIconConfig, Z as SiteSeoConfig, a as COOKBOOK_COMPONENT_NAMES, at as ThemePaletteColor, ct as ThemeTokens, d as ComponentStylesConfig, dt as TypographyPresets, et as TableOfContentsConfig, f as ComponentsConfig, i as BuildConfig, it as ThemeFonts, j as DocsSource, l as ComponentStyleConfig, m as CookbookComponentName, n as BrandDeclaration, nt as ThemeFont, ot as ThemePaletteConfig, p as ContentConfig, q as SearchConfig, r as BreadcrumbItem, rt as ThemeFontFile, s as COOKBOOK_COMPONENT_SUB_ELEMENTS, st as ThemeTokenValue, t as BrandConfig, tt as ThemeConfig, u as ComponentStyles, ut as TypographyPreset, w as DocsDiagnostic, z as NavigationItem } from "../types-
|
|
1
|
+
import { $ as SocialImage, B as NavigationPlacement, C as DocsConfig, F as HeaderLink, H as NormalizedDocsConfig, I as LocaleConfig, J as SiteConfig, K as PageSeoConfig, L as MarkdownConfig, M as EditLinkConfig, N as FontLoadingConfig, P as HeadConfig, R as NavigationConfig, V as NavigationTab, X as SiteLogoConfig, Y as SiteIconConfig, Z as SiteSeoConfig, a as COOKBOOK_COMPONENT_NAMES, at as ThemePaletteColor, ct as ThemeTokens, d as ComponentStylesConfig, dt as TypographyPresets, et as TableOfContentsConfig, f as ComponentsConfig, i as BuildConfig, it as ThemeFonts, j as DocsSource, l as ComponentStyleConfig, m as CookbookComponentName, n as BrandDeclaration, nt as ThemeFont, ot as ThemePaletteConfig, p as ContentConfig, q as SearchConfig, r as BreadcrumbItem, rt as ThemeFontFile, s as COOKBOOK_COMPONENT_SUB_ELEMENTS, st as ThemeTokenValue, t as BrandConfig, tt as ThemeConfig, u as ComponentStyles, ut as TypographyPreset, w as DocsDiagnostic, z as NavigationItem } from "../types-B9dD3gLN.js";
|
|
2
2
|
//#region src/config/index.d.ts
|
|
3
3
|
declare class DocsConfigError extends Error {
|
|
4
4
|
readonly diagnostics: DocsDiagnostic[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/config/index.ts"],"mappings":";;cA8Ga,wBAAwB;WAC1B,aAAa;EAEtB,YAAY,aAAa;;iBAOX,eAAe,QAAQ,aAAa;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/config/index.ts"],"mappings":";;cA8Ga,wBAAwB;WAC1B,aAAa;EAEtB,YAAY,aAAa;;iBAOX,eAAe,QAAQ,aAAa;iBAkqCpC,oBACd,SAAQ,aACP;iBAiDa,iBAAiB,QAAQ,aAAa;;iBAOtC,mBAAmB,SAAS,eAAe"}
|
package/dist/config/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as validateConfig, i as normalizeDocsConfig, n as defineDocsConfig, o as COOKBOOK_COMPONENT_NAMES, r as mergeDocsConfig, s as COOKBOOK_COMPONENT_SUB_ELEMENTS, t as DocsConfigError } from "../config-
|
|
1
|
+
import { a as validateConfig, i as normalizeDocsConfig, n as defineDocsConfig, o as COOKBOOK_COMPONENT_NAMES, r as mergeDocsConfig, s as COOKBOOK_COMPONENT_SUB_ELEMENTS, t as DocsConfigError } from "../config-CD6uBrzU.js";
|
|
2
2
|
export { COOKBOOK_COMPONENT_NAMES, COOKBOOK_COMPONENT_SUB_ELEMENTS, DocsConfigError, defineDocsConfig, mergeDocsConfig, normalizeDocsConfig, validateConfig };
|
package/dist/config/schema.json
CHANGED
|
@@ -586,7 +586,7 @@
|
|
|
586
586
|
"type": "boolean"
|
|
587
587
|
},
|
|
588
588
|
"shadowTuning": {
|
|
589
|
-
"
|
|
589
|
+
"$ref": "#/$defs/lightingTuning"
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
},
|
|
@@ -749,6 +749,14 @@
|
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
751
|
},
|
|
752
|
+
"CardGrid": {
|
|
753
|
+
"type": "object",
|
|
754
|
+
"propertyNames": {
|
|
755
|
+
"not": {
|
|
756
|
+
"const": "mode"
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
},
|
|
752
760
|
"Callout": {
|
|
753
761
|
"type": "object",
|
|
754
762
|
"propertyNames": {
|
|
@@ -1374,6 +1382,9 @@
|
|
|
1374
1382
|
},
|
|
1375
1383
|
{
|
|
1376
1384
|
"$ref": "#/$defs/glazeShadow"
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"$ref": "#/$defs/glazeGlow"
|
|
1377
1388
|
}
|
|
1378
1389
|
]
|
|
1379
1390
|
},
|
|
@@ -1464,7 +1475,7 @@
|
|
|
1464
1475
|
]
|
|
1465
1476
|
},
|
|
1466
1477
|
"tuning": {
|
|
1467
|
-
"
|
|
1478
|
+
"$ref": "#/$defs/lightingTuning"
|
|
1468
1479
|
},
|
|
1469
1480
|
"pastel": {
|
|
1470
1481
|
"type": "boolean"
|
|
@@ -1474,6 +1485,76 @@
|
|
|
1474
1485
|
}
|
|
1475
1486
|
}
|
|
1476
1487
|
},
|
|
1488
|
+
"glazeGlow": {
|
|
1489
|
+
"type": "object",
|
|
1490
|
+
"required": ["type", "bg", "intensity"],
|
|
1491
|
+
"additionalProperties": false,
|
|
1492
|
+
"properties": {
|
|
1493
|
+
"type": {
|
|
1494
|
+
"const": "glow"
|
|
1495
|
+
},
|
|
1496
|
+
"bg": {
|
|
1497
|
+
"type": "string"
|
|
1498
|
+
},
|
|
1499
|
+
"fg": {
|
|
1500
|
+
"type": "string"
|
|
1501
|
+
},
|
|
1502
|
+
"intensity": {
|
|
1503
|
+
"oneOf": [
|
|
1504
|
+
{
|
|
1505
|
+
"type": "number",
|
|
1506
|
+
"minimum": 0,
|
|
1507
|
+
"maximum": 100
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"type": "array",
|
|
1511
|
+
"items": {
|
|
1512
|
+
"type": "number",
|
|
1513
|
+
"minimum": 0,
|
|
1514
|
+
"maximum": 100
|
|
1515
|
+
},
|
|
1516
|
+
"minItems": 2,
|
|
1517
|
+
"maxItems": 2
|
|
1518
|
+
}
|
|
1519
|
+
]
|
|
1520
|
+
},
|
|
1521
|
+
"tuning": {
|
|
1522
|
+
"$ref": "#/$defs/lightingTuning"
|
|
1523
|
+
},
|
|
1524
|
+
"pastel": {
|
|
1525
|
+
"type": "boolean"
|
|
1526
|
+
},
|
|
1527
|
+
"inherit": {
|
|
1528
|
+
"type": "boolean"
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
},
|
|
1532
|
+
"lightingTuning": {
|
|
1533
|
+
"description": "Glaze shadow and glow tuning: how much the object (fg) scales the step, and the pigment's tint, reach, and hue bleed.",
|
|
1534
|
+
"type": "object",
|
|
1535
|
+
"additionalProperties": false,
|
|
1536
|
+
"properties": {
|
|
1537
|
+
"objectInfluence": {
|
|
1538
|
+
"type": "number",
|
|
1539
|
+
"minimum": 0
|
|
1540
|
+
},
|
|
1541
|
+
"tint": {
|
|
1542
|
+
"type": "number",
|
|
1543
|
+
"minimum": 0,
|
|
1544
|
+
"maximum": 1
|
|
1545
|
+
},
|
|
1546
|
+
"reach": {
|
|
1547
|
+
"type": "number",
|
|
1548
|
+
"minimum": 0,
|
|
1549
|
+
"maximum": 1
|
|
1550
|
+
},
|
|
1551
|
+
"hueBleed": {
|
|
1552
|
+
"type": "number",
|
|
1553
|
+
"minimum": 0,
|
|
1554
|
+
"maximum": 1
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
},
|
|
1477
1558
|
"glazeColorValue": {
|
|
1478
1559
|
"oneOf": [
|
|
1479
1560
|
{
|
|
@@ -267,7 +267,7 @@ function resolveColorTheme(theme = {}) {
|
|
|
267
267
|
saturation: lightThemeSeed.s * 100,
|
|
268
268
|
darkHue: darkThemeSeed.h,
|
|
269
269
|
darkSaturation: darkThemeSaturation
|
|
270
|
-
},
|
|
270
|
+
}, glazeOptions);
|
|
271
271
|
const surfaceSaturation = declaredSurface ? surfaceInput.saturation ?? .05 : 1;
|
|
272
272
|
const darkSurfaceSaturation = declaredSurface ? surfaceInput.darkSaturation ?? surfaceSaturation * .7 : .35;
|
|
273
273
|
const darkSurfaceRampSaturation = (factor) => declaredSurface ? darkSurfaceSaturation * factor : saturationFactor(resolvedSurfaceSeed.dark.s * factor / .35, darkThemeSaturation / 100);
|
|
@@ -394,9 +394,7 @@ function resolveColorTheme(theme = {}) {
|
|
|
394
394
|
shadow: {
|
|
395
395
|
type: "shadow",
|
|
396
396
|
bg: "surface",
|
|
397
|
-
|
|
398
|
-
intensity: [12, 20],
|
|
399
|
-
tuning: { alphaMax: theme.glaze?.shadowTuning?.alphaMax ?? .28 }
|
|
397
|
+
intensity: [8, 0]
|
|
400
398
|
},
|
|
401
399
|
...statusColors("info", theme.palette?.info, "#2563eb"),
|
|
402
400
|
...statusColors("success", theme.palette?.success, "#16a34a"),
|
|
@@ -600,7 +598,7 @@ function statusColors(name, input, fallback) {
|
|
|
600
598
|
contrast: { apca: [75, 90] },
|
|
601
599
|
mode: "auto"
|
|
602
600
|
},
|
|
603
|
-
[`${name}-surface`]: "type" in declaration && declaration.type === "shadow" ? {
|
|
601
|
+
[`${name}-surface`]: "type" in declaration && (declaration.type === "shadow" || declaration.type === "glow") ? {
|
|
604
602
|
base: "surface",
|
|
605
603
|
tone: "-2",
|
|
606
604
|
saturation: 0,
|
|
@@ -747,6 +745,7 @@ const COOKBOOK_PALETTE_NAMES = [
|
|
|
747
745
|
const COOKBOOK_COMPONENT_NAMES = [
|
|
748
746
|
"Button",
|
|
749
747
|
"Card",
|
|
748
|
+
"CardGrid",
|
|
750
749
|
"Callout",
|
|
751
750
|
"CodeGroup",
|
|
752
751
|
"Tab",
|
|
@@ -961,15 +960,22 @@ const COOKBOOK_COMPONENT_SUB_ELEMENTS = {
|
|
|
961
960
|
Card: [
|
|
962
961
|
"Heading2",
|
|
963
962
|
"Heading3",
|
|
964
|
-
"Paragraph"
|
|
963
|
+
"Paragraph",
|
|
964
|
+
"Body"
|
|
965
965
|
],
|
|
966
|
+
CardGrid: ["Card"],
|
|
966
967
|
Callout: ["Title", "Body"],
|
|
967
968
|
CodeGroup: [
|
|
968
969
|
"Caption",
|
|
970
|
+
"MarkdownCodeBlock",
|
|
969
971
|
"Pre",
|
|
970
972
|
"Code"
|
|
971
973
|
],
|
|
972
|
-
Tab: [
|
|
974
|
+
Tab: [
|
|
975
|
+
"Heading",
|
|
976
|
+
"HiddenHeading",
|
|
977
|
+
"Body"
|
|
978
|
+
],
|
|
973
979
|
MobileTableOfContents: [
|
|
974
980
|
"Summary",
|
|
975
981
|
"List",
|
|
@@ -1179,6 +1185,7 @@ const COOKBOOK_COMPONENT_SUB_ELEMENTS = {
|
|
|
1179
1185
|
],
|
|
1180
1186
|
Tabs: [
|
|
1181
1187
|
"List",
|
|
1188
|
+
"Tab",
|
|
1182
1189
|
"Button",
|
|
1183
1190
|
"SelectedButton",
|
|
1184
1191
|
"FocusedButton"
|
|
@@ -1682,22 +1689,7 @@ function validateConfig(config) {
|
|
|
1682
1689
|
"eps"
|
|
1683
1690
|
].includes(key)) || typeof window.eps !== "number" || !Number.isFinite(window.eps) || window.eps <= 0)) invalid(diagnostics, `theme.glaze.${key} must be false, [lo, hi], or {lo, hi, eps} with an ascending 0–100 range.`);
|
|
1684
1691
|
}
|
|
1685
|
-
|
|
1686
|
-
if (tuning !== void 0) {
|
|
1687
|
-
if (!isRecord(tuning)) invalid(diagnostics, "theme.glaze.shadowTuning must be an object.");
|
|
1688
|
-
else for (const [key, value] of Object.entries(tuning)) {
|
|
1689
|
-
if (![
|
|
1690
|
-
"saturationFactor",
|
|
1691
|
-
"maxSaturation",
|
|
1692
|
-
"lightnessFactor",
|
|
1693
|
-
"lightnessBounds",
|
|
1694
|
-
"minGapTarget",
|
|
1695
|
-
"alphaMax",
|
|
1696
|
-
"bgHueBlend"
|
|
1697
|
-
].includes(key)) unknown(diagnostics, `theme.glaze.shadowTuning.${key}`);
|
|
1698
|
-
if ((Array.isArray(value) ? value : [value]).some((item) => typeof item !== "number" || !Number.isFinite(item) || item < 0 || item > 1) || key === "lightnessBounds" && (!Array.isArray(value) || value.length !== 2 || value[0] > value[1])) invalid(diagnostics, `theme.glaze.shadowTuning.${key} must use values from 0 to 1.`);
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1692
|
+
if (settings.shadowTuning !== void 0) validateLightingTuning("theme.glaze.shadowTuning", settings.shadowTuning, diagnostics);
|
|
1701
1693
|
}
|
|
1702
1694
|
if (isRecord(config.theme?.fontLoading)) {
|
|
1703
1695
|
const choices = {
|
|
@@ -1839,7 +1831,7 @@ function validatePaletteColor(name, value, diagnostics) {
|
|
|
1839
1831
|
"pastel",
|
|
1840
1832
|
"role",
|
|
1841
1833
|
"inherit"
|
|
1842
|
-
] : value.type === "shadow" ? [
|
|
1834
|
+
] : value.type === "shadow" || value.type === "glow" ? [
|
|
1843
1835
|
"type",
|
|
1844
1836
|
"bg",
|
|
1845
1837
|
"fg",
|
|
@@ -1849,10 +1841,28 @@ function validatePaletteColor(name, value, diagnostics) {
|
|
|
1849
1841
|
"inherit"
|
|
1850
1842
|
] : []) : COLOR_DECLARATION_KEYS;
|
|
1851
1843
|
for (const key of Object.keys(value)) if (!keys.has(key)) unknown(diagnostics, `theme.palette.${name}.${key}`);
|
|
1844
|
+
if ("type" in value && (value.type === "shadow" || value.type === "glow") && value.tuning !== void 0) validateLightingTuning(`theme.palette.${name}.tuning`, value.tuning, diagnostics);
|
|
1852
1845
|
} catch (error) {
|
|
1853
1846
|
invalid(diagnostics, `theme.palette.${name}: ${error instanceof Error ? error.message : String(error)}`);
|
|
1854
1847
|
}
|
|
1855
1848
|
}
|
|
1849
|
+
/**
|
|
1850
|
+
* Glaze 3 shadow and glow tuning. Cookbook never emits Glaze's HDR tier, so a
|
|
1851
|
+
* glow's `headroom` is rejected with the removed 2.x fields.
|
|
1852
|
+
*/
|
|
1853
|
+
function validateLightingTuning(path, tuning, diagnostics) {
|
|
1854
|
+
if (!isRecord(tuning)) {
|
|
1855
|
+
invalid(diagnostics, `${path} must be an object.`);
|
|
1856
|
+
return;
|
|
1857
|
+
}
|
|
1858
|
+
for (const [key, value] of Object.entries(tuning)) if (![
|
|
1859
|
+
"objectInfluence",
|
|
1860
|
+
"tint",
|
|
1861
|
+
"reach",
|
|
1862
|
+
"hueBleed"
|
|
1863
|
+
].includes(key)) unknown(diagnostics, `${path}.${key}`);
|
|
1864
|
+
else if (value !== void 0 && (typeof value !== "number" || !Number.isFinite(value) || value < 0 || key !== "objectInfluence" && value > 1)) invalid(diagnostics, key === "objectInfluence" ? `${path}.objectInfluence must be a number of 0 or more.` : `${path}.${key} must be a number from 0 to 1.`);
|
|
1865
|
+
}
|
|
1856
1866
|
function isPaletteDeclaration(value) {
|
|
1857
1867
|
return typeof value === "object" && value !== null && !("h" in value || "r" in value || "c" in value);
|
|
1858
1868
|
}
|
|
@@ -2010,4 +2020,4 @@ function validFontWeight(weight) {
|
|
|
2010
2020
|
//#endregion
|
|
2011
2021
|
export { validateConfig as a, COOKBOOK_PALETTE_NAMES as c, routePath as d, routeUrl as f, validateTableOfContents as h, normalizeDocsConfig as i, resolveColorTheme as l, validateSeo as m, defineDocsConfig as n, COOKBOOK_COMPONENT_NAMES as o, routeVersion as p, mergeDocsConfig as r, COOKBOOK_COMPONENT_SUB_ELEMENTS as s, DocsConfigError as t, pagePublishing as u };
|
|
2012
2022
|
|
|
2013
|
-
//# sourceMappingURL=config-
|
|
2023
|
+
//# sourceMappingURL=config-CD6uBrzU.js.map
|