@tenphi/renderer 0.21.1 → 0.21.4
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/client/code-copy.js +1 -1
- package/dist/client/heading-links.js +1 -1
- package/dist/client/page-copy.js +1 -1
- package/dist/component-styles-DstqPFf3.js +21 -0
- package/dist/component-styles-DstqPFf3.js.map +1 -0
- package/dist/components/Banner.styles.js +19 -0
- package/dist/components/Button.styles.d.ts +9 -0
- package/dist/components/Button.styles.js +14 -0
- package/dist/components/Callout.astro +1 -1
- package/dist/components/Callout.styles.js +54 -0
- package/dist/components/Card.astro +4 -4
- package/dist/components/Card.styles.js +64 -0
- package/dist/components/CodeGroup.astro +9 -4
- package/dist/components/CodeGroup.styles.js +27 -0
- package/dist/components/Document.styles.js +230 -0
- package/dist/components/EditLink.astro +1 -1
- package/dist/components/Footer.styles.js +45 -0
- package/dist/components/Header.styles.js +96 -0
- package/dist/components/HeaderFrame.styles.js +20 -0
- package/dist/components/HeaderLinks.astro +2 -2
- package/dist/components/HeaderLinks.styles.js +149 -0
- package/dist/components/Hero.styles.js +129 -0
- package/dist/components/LanguageSelect.styles.js +169 -0
- package/dist/components/LastUpdated.astro +1 -1
- package/dist/components/Logo.astro +4 -8
- package/dist/components/Logo.styles.js +27 -0
- package/dist/components/MainContent.styles.js +38 -0
- package/dist/components/MainPane.styles.js +19 -0
- package/dist/components/MarkdownAlert.styles.js +61 -0
- package/dist/components/MarkdownCodeBlock.styles.js +131 -0
- package/dist/components/MarkdownContent.styles.js +231 -0
- package/dist/components/MarkdownHeading.styles.js +117 -0
- package/dist/components/MarkdownInlineCode.styles.js +19 -0
- package/dist/components/MarkdownTable.styles.js +58 -0
- package/dist/components/Mermaid.styles.js +50 -0
- package/dist/components/MermaidSource.styles.js +21 -0
- package/dist/components/MobileMenuFooter.styles.js +27 -0
- package/dist/components/MobileMenuToggle.styles.js +49 -0
- package/dist/components/MobileNavigationTabs.astro +1 -2
- package/dist/components/MobileNavigationTabs.styles.js +88 -0
- package/dist/components/MobileTableOfContents.styles.js +59 -0
- package/dist/components/PackageVersion.astro +1 -2
- package/dist/components/PackageVersion.styles.js +23 -0
- package/dist/components/PageActions.astro +2 -2
- package/dist/components/PageActions.styles.js +51 -0
- package/dist/components/PageFrame.styles.js +34 -0
- package/dist/components/Pagination.astro +3 -2
- package/dist/components/Pagination.styles.js +126 -0
- package/dist/components/Preview.astro +2 -6
- package/dist/components/Preview.styles.js +78 -0
- package/dist/components/Search.styles.js +132 -0
- package/dist/components/SearchButton.styles.js +68 -0
- package/dist/components/SearchResults.styles.js +200 -0
- package/dist/components/SelectPopover.astro +1 -0
- package/dist/components/Sidebar.styles.js +309 -0
- package/dist/components/SiteLogo.astro +1 -2
- package/dist/components/SiteLogo.styles.js +32 -0
- package/dist/components/SiteTitle.astro +1 -1
- package/dist/components/SkipLink.styles.js +24 -0
- package/dist/components/SocialIcons.styles.js +36 -0
- package/dist/components/Steps.astro +2 -2
- package/dist/components/Steps.styles.js +25 -0
- package/dist/components/SyntaxHighlight.styles.js +87 -0
- package/dist/components/Tab.astro +1 -1
- package/dist/components/Tab.styles.js +30 -0
- package/dist/components/TableOfContents.styles.js +62 -0
- package/dist/components/TableOfContentsLayout.styles.js +38 -0
- package/dist/components/Tabs.astro +1 -1
- package/dist/components/Tabs.styles.js +60 -0
- package/dist/components/ThemeSelect.styles.js +177 -0
- package/dist/components/TopNavigation.styles.js +52 -0
- package/dist/components/VersionSwitcher.astro +2 -2
- package/dist/components/VersionSwitcher.styles.js +45 -0
- package/dist/components/component-styles.test.ts +0 -10
- package/dist/components/component-styles.ts +0 -7
- package/dist/components/inherit-component-parts.d.ts +1 -0
- package/dist/components/inherit-component-parts.js +7 -0
- package/dist/components/select-popover-styles.js +34 -16
- package/dist/components/tasty-states.js +13 -1
- package/dist/define-component-BP4YwMak.js +28 -0
- package/dist/define-component-BP4YwMak.js.map +1 -0
- package/dist/define-component.d.ts +17 -0
- package/dist/define-component.d.ts.map +1 -0
- package/dist/define-component.js +2 -0
- package/dist/eslint-plugin.d.ts +5 -0
- package/dist/eslint-plugin.d.ts.map +1 -1
- package/dist/eslint-plugin.js +26 -3
- package/dist/eslint-plugin.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/localization.d.ts +2 -42
- package/dist/localization.d.ts.map +1 -1
- package/dist/localization.js +1 -87
- package/dist/localization.js.map +1 -1
- package/dist/messages-BqBGDIoP.js +143 -0
- package/dist/messages-BqBGDIoP.js.map +1 -0
- package/dist/messages-ClTf2nFf.d.ts +52 -0
- package/dist/messages-ClTf2nFf.d.ts.map +1 -0
- package/dist/{messages-B_3xUzUb.js → messages-bS8G9Pj8.js} +2 -2
- package/dist/{messages-B_3xUzUb.js.map → messages-bS8G9Pj8.js.map} +1 -1
- package/dist/overrides/Footer.astro +6 -5
- package/dist/overrides/Header.astro +13 -17
- package/dist/overrides/Hero.astro +3 -2
- package/dist/overrides/LanguageSelect.astro +3 -3
- package/dist/overrides/MarkdownContent.astro +7 -1
- package/dist/overrides/MobileMenuFooter.astro +2 -5
- package/dist/overrides/MobileMenuToggle.astro +4 -3
- package/dist/overrides/MobileTableOfContents.astro +2 -2
- package/dist/overrides/PageFrame.astro +9 -11
- package/dist/overrides/Search.astro +13 -9
- package/dist/overrides/Sidebar.astro +4 -1
- package/dist/overrides/SocialIcons.astro +2 -2
- package/dist/overrides/ThemeSelect.astro +9 -3
- package/dist/routes/Page.astro +22 -11
- package/dist/styling.d.ts +5 -10
- package/dist/styling.d.ts.map +1 -1
- package/dist/styling.js +18 -11
- package/dist/styling.js.map +1 -1
- package/dist/tasty-states-_JhxFdK1.js +47 -0
- package/dist/tasty-states-_JhxFdK1.js.map +1 -0
- package/dist/theme/defaults.d.ts.map +1 -1
- package/dist/theme/defaults.js +22 -1
- package/dist/theme/defaults.js.map +1 -1
- package/dist/theme/tasty-config.d.ts +23 -1
- package/dist/theme/tasty-config.d.ts.map +1 -1
- package/dist/theme/tasty-config.js +23 -1
- package/dist/theme/tasty-config.js.map +1 -1
- package/dist/ui.d.ts +2 -6
- package/dist/ui.js +1 -58
- package/package.json +4 -4
- package/dist/components/GlobalStyles.js +0 -1792
- package/dist/components/LayoutComponents.js +0 -872
- package/dist/components/TastyComponents.js +0 -269
- package/dist/components/customize-component.js +0 -8
- package/dist/tasty-states-rTLFy26t.js +0 -57
- package/dist/tasty-states-rTLFy26t.js.map +0 -1
- package/dist/ui.d.ts.map +0 -1
- package/dist/ui.js.map +0 -1
package/dist/eslint-plugin.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import eslint_plugin_tasty_default, { recommended, strict } from "@tenphi/eslint-plugin-tasty";
|
|
2
2
|
//#region src/tasty.config.ts
|
|
3
3
|
var tasty_config_default = {
|
|
4
|
-
importSources: [
|
|
4
|
+
importSources: [
|
|
5
|
+
"@tenphi/cookbook/styling",
|
|
6
|
+
"@tenphi/renderer/styling",
|
|
7
|
+
"./component-styles.js",
|
|
8
|
+
"../define-component.js"
|
|
9
|
+
],
|
|
5
10
|
styleFunctions: {
|
|
6
11
|
defineComponent: {
|
|
7
12
|
argument: 1,
|
|
8
13
|
kind: "options"
|
|
9
14
|
},
|
|
15
|
+
extendComponent: {
|
|
16
|
+
argument: 2,
|
|
17
|
+
kind: "options",
|
|
18
|
+
partial: true
|
|
19
|
+
},
|
|
10
20
|
resolveComponentStyles: {
|
|
11
21
|
argument: 1,
|
|
12
22
|
kind: "styles"
|
|
@@ -19,6 +29,10 @@ var tasty_config_default = {
|
|
|
19
29
|
},
|
|
20
30
|
tokens: [
|
|
21
31
|
"$gap",
|
|
32
|
+
"$margin-block-start",
|
|
33
|
+
"$margin-block-end",
|
|
34
|
+
"$padding-block-start",
|
|
35
|
+
"$padding-block-end",
|
|
22
36
|
"$radius",
|
|
23
37
|
"$header-control-radius",
|
|
24
38
|
"$card-radius",
|
|
@@ -108,6 +122,10 @@ var tasty_config_default = {
|
|
|
108
122
|
"bw"
|
|
109
123
|
],
|
|
110
124
|
states: [
|
|
125
|
+
"@system-light",
|
|
126
|
+
"@system-dark",
|
|
127
|
+
"@light",
|
|
128
|
+
"@dark",
|
|
111
129
|
"@mobile",
|
|
112
130
|
"@desktop",
|
|
113
131
|
"@small",
|
|
@@ -116,7 +134,8 @@ var tasty_config_default = {
|
|
|
116
134
|
"@shell-desktop",
|
|
117
135
|
"@narrow-layout",
|
|
118
136
|
"@medium-layout",
|
|
119
|
-
"@reduced-motion"
|
|
137
|
+
"@reduced-motion",
|
|
138
|
+
"@popover-open"
|
|
120
139
|
],
|
|
121
140
|
presets: [
|
|
122
141
|
"body",
|
|
@@ -129,7 +148,11 @@ var tasty_config_default = {
|
|
|
129
148
|
"h6",
|
|
130
149
|
"navigation",
|
|
131
150
|
"small",
|
|
132
|
-
"code"
|
|
151
|
+
"code",
|
|
152
|
+
"hero-title",
|
|
153
|
+
"hero-tagline",
|
|
154
|
+
"prose",
|
|
155
|
+
"inline-code"
|
|
133
156
|
]
|
|
134
157
|
};
|
|
135
158
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-plugin.js","names":["validationConfig"],"sources":["../src/tasty.config.ts","../src/eslint-plugin.ts"],"sourcesContent":["import type { TastyValidationConfig } from \"@tenphi/eslint-plugin-tasty\";\n\nexport default {\n importSources: [\"@tenphi/cookbook/styling\"
|
|
1
|
+
{"version":3,"file":"eslint-plugin.js","names":["validationConfig"],"sources":["../src/tasty.config.ts","../src/eslint-plugin.ts"],"sourcesContent":["import type { TastyValidationConfig } from \"@tenphi/eslint-plugin-tasty\";\n\nexport default {\n importSources: [\n \"@tenphi/cookbook/styling\",\n \"@tenphi/renderer/styling\",\n \"./component-styles.js\",\n \"../define-component.js\",\n ],\n styleFunctions: {\n defineComponent: { argument: 1, kind: \"options\" },\n extendComponent: { argument: 2, kind: \"options\", partial: true },\n resolveComponentStyles: { argument: 1, kind: \"styles\" },\n mergeStyles: { argument: \"all\", kind: \"styles\", partial: true },\n },\n tokens: [\n \"$gap\",\n \"$margin-block-start\",\n \"$margin-block-end\",\n \"$padding-block-start\",\n \"$padding-block-end\",\n \"$radius\",\n \"$header-control-radius\",\n \"$card-radius\",\n \"$border-width\",\n \"$outline-width\",\n \"$outline-offset\",\n \"$layout-width\",\n \"$content-width\",\n \"$sidebar-width\",\n \"$control-height\",\n \"$transition\",\n \"$sharp-radius\",\n \"$bold-font-weight\",\n \"#white\",\n \"#black\",\n \"#clear\",\n \"#current\",\n \"#surface\",\n \"#header\",\n \"#heading\",\n \"#surface-2\",\n \"#surface-3\",\n \"#surface-2-hover\",\n \"#surface-2-pressed\",\n \"#surface-3-hover\",\n \"#surface-3-pressed\",\n \"#text\",\n \"#text-soft\",\n \"#text-muted\",\n \"#sidebar-text\",\n \"#border\",\n \"#border-strong\",\n \"#accent-text\",\n \"#accent-surface\",\n \"#accent-surface-text\",\n \"#logo-surface\",\n \"#logo-mark\",\n \"#accent-surface-subtle\",\n \"#accent-surface-2-subtle\",\n \"#focus\",\n \"#shadow\",\n \"#overlay\",\n \"#syntax-bg\",\n \"#syntax-text\",\n \"#syntax-comment\",\n \"#syntax-punctuation\",\n \"#syntax-keyword\",\n \"#syntax-string\",\n \"#syntax-token\",\n \"#syntax-property\",\n \"#syntax-number\",\n \"#syntax-function\",\n \"#syntax-value\",\n \"#syntax-operator\",\n \"#info\",\n \"#info-surface\",\n \"#info-text\",\n \"#success\",\n \"#success-surface\",\n \"#success-text\",\n \"#warning\",\n \"#warning-surface\",\n \"#warning-text\",\n \"#danger\",\n \"#danger-surface\",\n \"#danger-text\",\n \"#orange-surface\",\n \"#orange\",\n \"#orange-text\",\n \"#green-surface\",\n \"#green\",\n \"#green-text\",\n \"#blue-surface\",\n \"#blue\",\n \"#blue-text\",\n \"#purple-surface\",\n \"#purple\",\n \"#purple-text\",\n \"#red-surface\",\n \"#red\",\n \"#red-text\",\n ],\n units: [\"x\", \"r\", \"cr\", \"bw\"],\n states: [\n \"@system-light\",\n \"@system-dark\",\n \"@light\",\n \"@dark\",\n \"@mobile\",\n \"@desktop\",\n \"@small\",\n \"@compact\",\n \"@shell-mobile\",\n \"@shell-desktop\",\n \"@narrow-layout\",\n \"@medium-layout\",\n \"@reduced-motion\",\n \"@popover-open\",\n ],\n presets: [\n \"body\",\n \"heading\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"navigation\",\n \"small\",\n \"code\",\n \"hero-title\",\n \"hero-tagline\",\n \"prose\",\n \"inline-code\",\n ],\n} satisfies TastyValidationConfig;\n","export { default, recommended, strict } from \"@tenphi/eslint-plugin-tasty\";\nexport type {\n ResolvedConfig,\n StyleFunctionConfig,\n TastyValidationConfig,\n} from \"@tenphi/eslint-plugin-tasty\";\nexport { default as validationConfig } from \"./tasty.config.js\";\n\nimport type { ThemeConfig } from \"@tenphi/docs\";\nimport type { TastyValidationConfig } from \"@tenphi/eslint-plugin-tasty\";\nimport validationConfig from \"./tasty.config.js\";\n\n/** Keep editor/linter names aligned with a Cookbook theme. */\nexport function createValidationConfig(\n theme: ThemeConfig = {},\n): TastyValidationConfig {\n return {\n ...validationConfig,\n tokens: [\n ...validationConfig.tokens,\n ...Object.keys(theme.tokens ?? {}),\n ...Object.keys(theme.palette ?? {}).map((name) => `#${name}`),\n ],\n units: [...validationConfig.units, ...Object.keys(theme.units ?? {})],\n states: [...validationConfig.states, ...Object.keys(theme.states ?? {})],\n presets: [...validationConfig.presets, ...Object.keys(theme.presets ?? {})],\n recipes: Object.keys(theme.recipes ?? {}),\n };\n}\n"],"mappings":";;AAEA,IAAA,uBAAe;CACb,eAAe;EACb;EACA;EACA;EACA;CACF;CACA,gBAAgB;EACd,iBAAiB;GAAE,UAAU;GAAG,MAAM;EAAU;EAChD,iBAAiB;GAAE,UAAU;GAAG,MAAM;GAAW,SAAS;EAAK;EAC/D,wBAAwB;GAAE,UAAU;GAAG,MAAM;EAAS;EACtD,aAAa;GAAE,UAAU;GAAO,MAAM;GAAU,SAAS;EAAK;CAChE;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,OAAO;EAAC;EAAK;EAAK;EAAM;CAAI;CAC5B,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;;;;AC5HA,SAAgB,uBACd,QAAqB,CAAC,GACC;CACvB,OAAO;EACL,GAAGA;EACH,QAAQ;GACN,GAAGA,qBAAiB;GACpB,GAAG,OAAO,KAAK,MAAM,UAAU,CAAC,CAAC;GACjC,GAAG,OAAO,KAAK,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,MAAM;EAC9D;EACA,OAAO,CAAC,GAAGA,qBAAiB,OAAO,GAAG,OAAO,KAAK,MAAM,SAAS,CAAC,CAAC,CAAC;EACpE,QAAQ,CAAC,GAAGA,qBAAiB,QAAQ,GAAG,OAAO,KAAK,MAAM,UAAU,CAAC,CAAC,CAAC;EACvE,SAAS,CAAC,GAAGA,qBAAiB,SAAS,GAAG,OAAO,KAAK,MAAM,WAAW,CAAC,CAAC,CAAC;EAC1E,SAAS,OAAO,KAAK,MAAM,WAAW,CAAC,CAAC;CAC1C;AACF"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/plugin-contract.ts","../src/integration.ts"],"mappings":";;;;;KAEY;EAEN,WAAW,iBAAiB,QAAQ;;EAGpC,MAAM,iBAAiB;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/plugin-contract.ts","../src/integration.ts"],"mappings":";;;;;KAEY;EAEN,WAAW,iBAAiB,QAAQ;;EAGpC,MAAM,iBAAiB;;;;UCmGZ;EACf,SAAS;EACT;EACA;;EAEA,oBAAoB;;iBAGE,SACtB,UAAS,kBACR"}
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,9 @@ import { navigationPath, resolveNavigationLayout } from "./navigation.js";
|
|
|
2
2
|
import { localeAlternates } from "./localization.js";
|
|
3
3
|
import { DEFAULT_THEME_TOKENS, DEFAULT_TYPOGRAPHY_PRESETS, resolveThemeTokens, resolveTypographyPresets } from "./theme/defaults.js";
|
|
4
4
|
import { configureCodeHighlighting, cookbookShikiConfig } from "./theme/shiki-theme.js";
|
|
5
|
-
import { TASTY_UNITS, tastyTokens } from "./theme/tasty-config.js";
|
|
6
|
-
import {
|
|
5
|
+
import { TASTY_SPACING_PROPERTIES, TASTY_UNITS, tastyTokens } from "./theme/tasty-config.js";
|
|
6
|
+
import { r as unusedCustomStyleNames, t as configureComponentStyles } from "./component-styles-DstqPFf3.js";
|
|
7
|
+
import { n as cookbookStates } from "./tasty-states-_JhxFdK1.js";
|
|
7
8
|
import { agentPagePath } from "./page-metadata.js";
|
|
8
9
|
import { createRequire } from "node:module";
|
|
9
10
|
import { cp, mkdir, readFile, readdir, rename, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -443,13 +444,15 @@ function isOrdinaryCodeBlock(node) {
|
|
|
443
444
|
function codeBlockWithCopy(pre) {
|
|
444
445
|
return element("cookbook-code-block", {
|
|
445
446
|
className: ["td-code-block"],
|
|
446
|
-
|
|
447
|
+
dataElement: "MarkdownCodeBlock"
|
|
447
448
|
}, [pre, element("button", {
|
|
448
449
|
type: "button",
|
|
450
|
+
dataElement: "CopyButton",
|
|
449
451
|
dataCopyCode: "",
|
|
450
452
|
ariaLabel: "Copy code",
|
|
451
453
|
title: "Copy code"
|
|
452
454
|
}, [element("span", {
|
|
455
|
+
dataElement: "CopyIcon",
|
|
453
456
|
dataCopyIcon: "",
|
|
454
457
|
ariaHidden: "true"
|
|
455
458
|
}, [])])]);
|
|
@@ -1162,13 +1165,14 @@ function configuredCookbook(options) {
|
|
|
1162
1165
|
let siteLogo;
|
|
1163
1166
|
async function loadGraph(refresh = false) {
|
|
1164
1167
|
if (!graph || refresh) {
|
|
1165
|
-
|
|
1168
|
+
const candidate = await createDocsGraph({
|
|
1166
1169
|
...projectRoot ? { root: projectRoot } : {},
|
|
1167
1170
|
...graphConfig ? { config: graphConfig } : {},
|
|
1168
1171
|
base: graphBase
|
|
1169
1172
|
});
|
|
1170
|
-
assertValidDocs(
|
|
1171
|
-
await validatePluginFrontmatter(
|
|
1173
|
+
assertValidDocs(candidate);
|
|
1174
|
+
await validatePluginFrontmatter(candidate.entries, options.frontmatterSchema);
|
|
1175
|
+
graph = candidate;
|
|
1172
1176
|
}
|
|
1173
1177
|
return graph;
|
|
1174
1178
|
}
|
|
@@ -1686,6 +1690,7 @@ function configureTastyTheme(theme, resolved) {
|
|
|
1686
1690
|
},
|
|
1687
1691
|
recipes: theme?.recipes ?? {},
|
|
1688
1692
|
tokens,
|
|
1693
|
+
properties: TASTY_SPACING_PROPERTIES,
|
|
1689
1694
|
presets: resolved.presets
|
|
1690
1695
|
});
|
|
1691
1696
|
}
|