@dogsbay/format-astro 0.2.0-beta.122 → 0.2.0-beta.124
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/api-markdown.d.ts +0 -1
- package/dist/api-markdown.js +0 -1
- package/dist/base-path.d.ts +0 -1
- package/dist/base-path.js +0 -1
- package/dist/blog.d.ts +0 -1
- package/dist/blog.js +0 -1
- package/dist/browser.d.ts +0 -1
- package/dist/browser.js +0 -1
- package/dist/canonical.d.ts +0 -1
- package/dist/canonical.js +0 -1
- package/dist/capabilities.d.ts +0 -1
- package/dist/capabilities.js +4 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -1
- package/dist/diff-decoration.d.ts +0 -1
- package/dist/diff-decoration.js +0 -1
- package/dist/granularity.d.ts +0 -1
- package/dist/granularity.js +0 -1
- package/dist/head-metadata.d.ts +0 -1
- package/dist/head-metadata.js +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/lead.d.ts +0 -1
- package/dist/lead.js +0 -1
- package/dist/llms-txt.d.ts +0 -1
- package/dist/llms-txt.js +0 -1
- package/dist/plugins.d.ts +0 -1
- package/dist/plugins.js +0 -1
- package/dist/project.d.ts +0 -1
- package/dist/project.js +0 -1
- package/dist/redirects.d.ts +0 -1
- package/dist/redirects.js +0 -1
- package/dist/serialize.d.ts +0 -1
- package/dist/serialize.js +34 -13
- package/dist/sitemap.d.ts +0 -1
- package/dist/sitemap.js +0 -1
- package/dist/taxonomy.d.ts +0 -1
- package/dist/taxonomy.js +0 -1
- package/dist/theme-css.d.ts +8 -1
- package/dist/theme-css.js +28 -4
- package/dist/tone-classes.d.ts +39 -1
- package/dist/tone-classes.js +55 -1
- package/dist/write-if-changed.d.ts +0 -1
- package/dist/write-if-changed.js +0 -1
- package/package.json +7 -7
- package/dist/api-markdown.d.ts.map +0 -1
- package/dist/api-markdown.js.map +0 -1
- package/dist/base-path.d.ts.map +0 -1
- package/dist/base-path.js.map +0 -1
- package/dist/blog.d.ts.map +0 -1
- package/dist/blog.js.map +0 -1
- package/dist/browser.d.ts.map +0 -1
- package/dist/browser.js.map +0 -1
- package/dist/canonical.d.ts.map +0 -1
- package/dist/canonical.js.map +0 -1
- package/dist/capabilities.d.ts.map +0 -1
- package/dist/capabilities.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/diff-decoration.d.ts.map +0 -1
- package/dist/diff-decoration.js.map +0 -1
- package/dist/granularity.d.ts.map +0 -1
- package/dist/granularity.js.map +0 -1
- package/dist/head-metadata.d.ts.map +0 -1
- package/dist/head-metadata.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lead.d.ts.map +0 -1
- package/dist/lead.js.map +0 -1
- package/dist/llms-txt.d.ts.map +0 -1
- package/dist/llms-txt.js.map +0 -1
- package/dist/plugins.d.ts.map +0 -1
- package/dist/plugins.js.map +0 -1
- package/dist/project.d.ts.map +0 -1
- package/dist/project.js.map +0 -1
- package/dist/redirects.d.ts.map +0 -1
- package/dist/redirects.js.map +0 -1
- package/dist/serialize.d.ts.map +0 -1
- package/dist/serialize.js.map +0 -1
- package/dist/sitemap.d.ts.map +0 -1
- package/dist/sitemap.js.map +0 -1
- package/dist/taxonomy.d.ts.map +0 -1
- package/dist/taxonomy.js.map +0 -1
- package/dist/theme-css.d.ts.map +0 -1
- package/dist/theme-css.js.map +0 -1
- package/dist/tone-classes.d.ts.map +0 -1
- package/dist/tone-classes.js.map +0 -1
- package/dist/write-if-changed.d.ts.map +0 -1
- package/dist/write-if-changed.js.map +0 -1
package/dist/api-markdown.d.ts
CHANGED
|
@@ -5,4 +5,3 @@ export declare function apiInlineHtml(text: string): string;
|
|
|
5
5
|
/** A schema property list with every `description` rendered inline,
|
|
6
6
|
* through nested `properties` / `items`. A copy; the node is untouched. */
|
|
7
7
|
export declare function apiPropertiesHtml(list: unknown): unknown;
|
|
8
|
-
//# sourceMappingURL=api-markdown.d.ts.map
|
package/dist/api-markdown.js
CHANGED
package/dist/base-path.d.ts
CHANGED
|
@@ -188,4 +188,3 @@ export declare function resolvePrefixes(siteUrl: string | undefined, basePath: s
|
|
|
188
188
|
* its nav entry (`/base`), so prev/next silently falls back to the first item.
|
|
189
189
|
*/
|
|
190
190
|
export declare function buildCurrentPath(basePath: string, section: string | undefined, slug: string): string;
|
|
191
|
-
//# sourceMappingURL=base-path.d.ts.map
|
package/dist/base-path.js
CHANGED
package/dist/blog.d.ts
CHANGED
package/dist/blog.js
CHANGED
package/dist/browser.d.ts
CHANGED
package/dist/browser.js
CHANGED
package/dist/canonical.d.ts
CHANGED
package/dist/canonical.js
CHANGED
package/dist/capabilities.d.ts
CHANGED
package/dist/capabilities.js
CHANGED
|
@@ -30,6 +30,9 @@ export const ASTRO_CAPABILITIES = [
|
|
|
30
30
|
{ feature: "callout", support: "full", rendersAs: "`<Alert variant>` with the authored type kept as `data-type`" },
|
|
31
31
|
{ feature: "details", support: "full", rendersAs: "`<CollapsibleAlert variant title open icon>` (`title`, or its alias `summary`)" },
|
|
32
32
|
{ feature: "details-sheet", support: "full", rendersAs: "`<DetailsSheet>` around the CollapsibleAlert: `<db-details-sheet>` opens it as a right-hand native `<dialog>`; without the script it stays a collapsible block" },
|
|
33
|
+
{ feature: "theme", support: "full", rendersAs: "a `<div class=\"dark …\" data-theme>`: the theme re-declares its tokens on `.dark`, so the subtree turns dark" },
|
|
34
|
+
{ feature: "tabs-variant", support: "full", rendersAs: "TabsList/TabsTrigger given the variant's classes (TAB_VARIANTS), merged over their base" },
|
|
35
|
+
{ feature: "tone", support: "full", rendersAs: "each card's border and tint from the tone (CARD_TONE_CLASSES); a group tone applies to every card without one" },
|
|
33
36
|
{ feature: "tabs", support: "full", rendersAs: "`<Tabs>` / `<TabsTrigger>` / `<TabsContent>` (`<db-tabs>`), sync keys kept" },
|
|
34
37
|
{
|
|
35
38
|
feature: "steps",
|
|
@@ -55,6 +58,7 @@ export const ASTRO_CAPABILITIES = [
|
|
|
55
58
|
note: "Outside a card group, an icon that is an image PATH is passed to `<Icon name>`, which renders nothing for it — the logo disappears (inside a group it becomes an `<img>`).",
|
|
56
59
|
},
|
|
57
60
|
{ feature: "link-card", support: "full", rendersAs: "`<LinkCard>`; with body content, a linked `<Card>`" },
|
|
61
|
+
{ feature: "files", support: "full", rendersAs: "`<FileTree items>`, folders from nesting or a trailing `/`" },
|
|
58
62
|
{ feature: "grid", support: "full", rendersAs: "`<Grid cols gap rows>` / `<GridItem>`" },
|
|
59
63
|
{ feature: "link-button", support: "full", rendersAs: "`<Button href variant>`" },
|
|
60
64
|
{ feature: "related", support: "full", rendersAs: "`<section class=\"related-resources\">` with a caption title" },
|
|
@@ -99,4 +103,3 @@ export const ASTRO_CAPABILITIES = [
|
|
|
99
103
|
{ feature: "footnote-ref", support: "full", rendersAs: "`<sup><a href=\"#fn-…\">`" },
|
|
100
104
|
{ feature: "html-inline", support: "full", rendersAs: "raw HTML via `<Fragment set:html>`" },
|
|
101
105
|
];
|
|
102
|
-
//# sourceMappingURL=capabilities.js.map
|
package/dist/cli.d.ts
CHANGED
package/dist/cli.js
CHANGED
|
@@ -76,4 +76,3 @@ export declare function decorateDiff(node: TreeNode, rendered: string, renderPee
|
|
|
76
76
|
* both color modes, no hardcoded palette (key-decisions doctrine).
|
|
77
77
|
*/
|
|
78
78
|
export declare const DIFF_CSS = "/* tree-diff decorations \u2014 one DiffTree, rendered by the normal components.\n Mark styling is GUARDED by html:not([data-diff-hidden]) rather than\n force-reset under hidden mode: a reset like \"border-left: none\n !important\" also clobbers a component's OWN border (an added warning\n callout lost its left edge \u2014 user find, adapters/mysql). Guarded\n rules simply stop applying, and component styling survives. */\n[data-diff] { position: relative; }\nhtml:not([data-diff-hidden]) [data-diff=\"added\"] {\n background: color-mix(in oklch, var(--color-success, oklch(0.72 0.19 150)) 12%, transparent);\n border-left: 3px solid var(--color-success, oklch(0.72 0.19 150));\n padding-left: 0.75rem;\n}\nhtml:not([data-diff-hidden]) [data-diff=\"removed\"] {\n background: color-mix(in oklch, var(--color-destructive, oklch(0.64 0.21 25)) 10%, transparent);\n border-left: 3px solid var(--color-destructive, oklch(0.64 0.21 25));\n padding-left: 0.75rem;\n opacity: 0.75;\n}\nhtml:not([data-diff-hidden]) [data-diff=\"removed\"] :is(p, li, code, pre) { text-decoration: line-through; text-decoration-thickness: 1px; }\nhtml:not([data-diff-hidden]) [data-diff=\"changed\"] {\n border-left: 3px solid var(--color-warning, oklch(0.8 0.16 85));\n padding-left: 0.75rem;\n}\nhtml:not([data-diff-hidden]) [data-diff=\"moved\"] {\n border-left: 3px dashed var(--color-info, oklch(0.7 0.14 240));\n padding-left: 0.75rem;\n}\nhtml:not([data-diff-hidden]) [data-diff=\"moved\"][data-diff-from]::after {\n content: \"moved from \" attr(data-diff-from);\n display: block;\n font-size: 0.75rem;\n color: var(--color-muted-foreground, inherit);\n opacity: 0.8;\n}\n\n/* Explicit \"added\"/\"removed\" label pills straddling the block's top\n edge. Components with their own chrome (callouts, code blocks)\n camouflage a tint-only mark \u2014 a green-tinted warning callout reads\n as a callout variant, not as new content (user feedback,\n better-auth adapters/mysql). Table rows are excluded (a pill can't\n straddle a tr); nested marks defer to the outermost label. */\nhtml:not([data-diff-hidden]) [data-diff=\"added\"]:not(tr, th, td)::before,\nhtml:not([data-diff-hidden]) [data-diff=\"removed\"]:not(tr, th, td)::before {\n position: absolute;\n top: 0;\n right: 0.6rem;\n transform: translateY(-55%);\n font-size: 0.65rem;\n font-weight: 600;\n letter-spacing: 0.04em;\n line-height: 1.4;\n padding: 0 0.5rem;\n border-radius: 99px;\n z-index: 1;\n text-decoration: none;\n}\nhtml:not([data-diff-hidden]) [data-diff=\"added\"]:not(tr, th, td)::before {\n content: \"added\";\n background: color-mix(in oklch, var(--color-success, oklch(0.72 0.19 150)) 25%, var(--color-background, Canvas));\n border: 1px solid color-mix(in oklch, var(--color-success, oklch(0.72 0.19 150)) 45%, transparent);\n}\nhtml:not([data-diff-hidden]) [data-diff=\"removed\"]:not(tr, th, td)::before {\n content: \"removed\";\n background: color-mix(in oklch, var(--color-destructive, oklch(0.64 0.21 25)) 20%, var(--color-background, Canvas));\n border: 1px solid color-mix(in oklch, var(--color-destructive, oklch(0.64 0.21 25)) 45%, transparent);\n}\n[data-diff] [data-diff]::before { content: none !important; }\n\n/* Nav change markers (the sidebar is client-rendered from nav.json, so\n the styles ship here rather than with the component). Same contract as\n the tab markers: a GLYPH carries the meaning, colour reinforces it,\n visually-hidden text announces it. */\n.db-nav-mark {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n margin-left: auto;\n border-radius: 99px;\n font-size: 0.75rem;\n font-weight: 700;\n line-height: 1;\n color: var(--color-muted-foreground, currentColor);\n}\n.db-nav-mark[data-nav-mark=\"added\"] { color: var(--color-success, oklch(0.72 0.19 150)); }\n.db-nav-mark[data-nav-mark=\"changed\"] { color: var(--color-warning, oklch(0.8 0.16 85)); }\n.db-nav-mark[data-nav-mark=\"removed\"] { color: var(--color-destructive, oklch(0.64 0.21 25)); }\n.db-nav-mark[data-nav-mark=\"moved\"] { color: var(--color-info, oklch(0.7 0.14 240)); }\n/* a subtree marker is a hint about descendants, not a claim about this row */\n.db-nav-mark[data-nav-mark-subtree] { opacity: 0.55; }\n/* removed pages get a SECOND non-colour signal */\n/* Belt-and-braces: a subtree mark must never strike through its own row. */\n[data-nav-mark-row=\"removed\"]:not([data-nav-mark-subtree]) { text-decoration: line-through; opacity: 0.7; }\n@media (forced-colors: active) {\n .db-nav-mark { color: CanvasText; }\n}\n\n/* Which tab changed? A marked panel is invisible until opened, so its\n trigger carries a marker (the group's bar says \"in here\", the marker\n says \"this one\"). The marker is a GLYPH, not a colored dot: colour\n alone fails WCAG 1.4.1 and background-tinted dots vanish entirely in\n forced-colors mode. Colour reinforces; shape carries the meaning.\n Visually-hidden text rides along (emitted by the serializer). */\n.db-tab-mark {\n display: inline-block;\n margin-left: 0.35rem;\n font-size: 0.75rem;\n font-weight: 700;\n line-height: 1;\n vertical-align: middle;\n color: var(--color-muted-foreground, currentColor);\n}\n[data-diff-hidden] .db-tab-mark { display: none; }\n.db-tab-mark[data-diff-tab=\"changed\"] { color: var(--color-warning, oklch(0.8 0.16 85)); }\n.db-tab-mark[data-diff-tab=\"added\"] { color: var(--color-success, oklch(0.72 0.19 150)); }\n.db-tab-mark[data-diff-tab=\"removed\"] { color: var(--color-destructive, oklch(0.64 0.21 25)); }\n.db-tab-mark[data-diff-tab=\"moved\"] { color: var(--color-info, oklch(0.7 0.14 240)); }\n@media (forced-colors: active) {\n .db-tab-mark { color: CanvasText; }\n}\nins.db-diff-ins {\n text-decoration: none;\n background: color-mix(in oklch, var(--color-success, oklch(0.72 0.19 150)) 22%, transparent);\n border-radius: 2px;\n padding: 0 1px;\n}\ndel.db-diff-del {\n background: color-mix(in oklch, var(--color-destructive, oklch(0.64 0.21 25)) 18%, transparent);\n border-radius: 2px;\n padding: 0 1px;\n}\n.db-diff-pair { display: grid; gap: 0.25rem; margin-block: 1rem; }\n.db-diff-pair-label {\n font-size: 0.7rem;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: var(--color-muted-foreground, inherit);\n opacity: 0.8;\n}\ntr[data-diff] { border-left-width: 3px; }\n\n/* Folded unchanged sections are CHROME, not content callouts:\n dashed, dimmed, compact \u2014 visually \"collapsed context\". */\n.db-diff-fold {\n border: 1px dashed color-mix(in oklch, currentColor 25%, transparent) !important;\n border-left-width: 1px !important;\n background: transparent !important;\n opacity: 0.7;\n margin-block: 0.5rem !important;\n}\n.db-diff-fold:hover, .db-diff-fold[open] { opacity: 1; }\n.db-diff-fold summary, .db-diff-fold [data-slot=\"trigger\"] {\n font-size: 0.85rem;\n}\n\n/* The comparison banner at the top of each reader page. */\n.db-diff-banner-row { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; width: 100%; }\n.db-diff-banner {\n border: 1px solid color-mix(in oklch, currentColor 15%, transparent);\n border-radius: 8px;\n padding: 0.75rem 1rem;\n margin-block-end: 1.5rem;\n font-size: 0.85rem;\n display: flex;\n flex-wrap: wrap;\n gap: 0.4rem 1rem;\n align-items: center;\n}\n.db-diff-banner .db-chip {\n display: inline-block;\n border-radius: 99px;\n padding: 0.05rem 0.6rem;\n font-size: 0.75rem;\n border: 1px solid transparent;\n}\n.db-chip-added { background: color-mix(in oklch, var(--color-success, oklch(0.72 0.19 150)) 15%, transparent); }\n.db-chip-removed { background: color-mix(in oklch, var(--color-destructive, oklch(0.64 0.21 25)) 12%, transparent); }\n.db-chip-changed { background: color-mix(in oklch, var(--color-warning, oklch(0.8 0.16 85)) 15%, transparent); }\n.db-chip-moved { background: color-mix(in oklch, var(--color-info, oklch(0.7 0.14 240)) 12%, transparent); }\n.db-chip-muted { border-color: color-mix(in oklch, currentColor 25%, transparent); opacity: 0.8; }\n\n/* The persistent view-switcher bar (Reader / Docs-ops / Agent):\n perspectives on ONE comparison \u2014 tabs are links, verification\n lives in the chrome, the Monitor CTA sits next to the value. */\n.db-cmp-bar {\n position: sticky;\n /* BELOW the docs header, not under it: both were sticky at top:0 and\n the header's higher z-index simply swallowed this bar on scroll \u2014\n the chrome carrying the trust contract was the chrome that vanished.\n --db-header-height is declared by DocsLayout (the header sizes itself\n from the same variable, so they cannot drift). */\n top: var(--db-header-height, 3.25rem);\n z-index: 30;\n display: flex;\n flex-wrap: wrap;\n gap: 0.4rem 0.9rem;\n align-items: center;\n padding: 0.5rem 0.9rem;\n margin-block-end: 1rem;\n border: 1px solid color-mix(in oklch, currentColor 15%, transparent);\n border-radius: 8px;\n background: var(--color-background, Canvas);\n font-size: 0.8rem;\n}\n.db-cmp-bar .db-chip {\n display: inline-block;\n border-radius: 99px;\n padding: 0.05rem 0.6rem;\n font-size: 0.75rem;\n border: 1px solid transparent;\n}\n.db-cmp-bar button.db-chip { cursor: pointer; background: transparent; font: inherit; font-size: 0.75rem; color: inherit; }\n.db-cmp-tabs {\n display: inline-flex;\n gap: 0.15rem;\n border: 1px solid color-mix(in oklch, currentColor 20%, transparent);\n border-radius: 99px;\n padding: 0.1rem;\n}\n.db-cmp-tab {\n padding: 0.1rem 0.7rem;\n border-radius: 99px;\n text-decoration: none;\n color: inherit;\n}\n.db-cmp-tab[aria-current=\"page\"] {\n background: color-mix(in oklch, currentColor 12%, transparent);\n font-weight: 600;\n}\n.db-cmp-pairs { position: relative; display: inline-block; }\n.db-cmp-pairs summary { cursor: pointer; }\n.db-cmp-pairs ul {\n position: absolute;\n top: 100%;\n left: 0;\n margin: 0.25rem 0 0;\n padding: 0.35rem 0.75rem;\n list-style: none;\n background: var(--color-background, Canvas);\n border: 1px solid color-mix(in oklch, currentColor 20%, transparent);\n border-radius: 8px;\n white-space: nowrap;\n z-index: 40;\n}\n.db-cmp-monitor { text-decoration: none; border-color: color-mix(in oklch, currentColor 30%, transparent) !important; }\n.db-cmp-monitor:hover { background: color-mix(in oklch, currentColor 10%, transparent); }\n\n/* A wholly added/removed PAGE carries one mark around all its content.\n The per-block tint would be overwhelming at page scale, so page level\n gets a stronger edge and a much lighter wash \u2014 legible at a glance,\n still readable as prose. The \"added\"/\"removed\" pill (the ::before on\n [data-diff]) rides on this wrapper, which is exactly right: it labels\n the page, once. */\nhtml:not([data-diff-hidden]) [data-diff].db-diff-page {\n border-left-width: 5px;\n padding-left: 1rem;\n padding-block: 0.5rem;\n border-radius: 0 6px 6px 0;\n}\nhtml:not([data-diff-hidden]) [data-diff=\"added\"].db-diff-page {\n background: color-mix(in oklch, var(--color-success, oklch(0.72 0.19 150)) 5%, transparent);\n}\nhtml:not([data-diff-hidden]) [data-diff=\"removed\"].db-diff-page {\n background: color-mix(in oklch, var(--color-destructive, oklch(0.64 0.21 25)) 5%, transparent);\n opacity: 1; /* the page is READABLE \u2014 the mark says removed, not the dimming */\n}\n/* \u2026and a removed PAGE is not struck through \u2014 that is for a deleted line,\n not for a document the reader still needs to read. */\n[data-diff=\"removed\"].db-diff-page :is(p, li, code, pre) { text-decoration: none; }\n\n/* Changed raw HTML: the faithful new render, plus the previous version\n one click away. Without it a deletion inside opaque markup (a dropped\n table column) is simply invisible \u2014 the reader is told \"something\n changed\" and shown no evidence. */\n.db-diff-html-before {\n margin-block-start: 0.5rem;\n font-size: 0.8rem;\n border: 1px dashed color-mix(in oklch, currentColor 25%, transparent);\n border-radius: 6px;\n padding: 0.25rem 0.6rem;\n}\n/* Full-strength text: the summary is a CONTROL \u2014 dimming it (opacity or\n muted-foreground) drops it below 4.5:1 and axe rightly fails it. */\n.db-diff-html-before summary { cursor: pointer; color: inherit; }\n.db-diff-html-before[open] summary { margin-block-end: 0.5rem; }\n[data-diff-hidden] .db-diff-html-before { display: none; }\n\n/* Merged code diffs carry a hidden clean twin (the post-change\n render); Hide highlights swaps them. */\n.db-diff-code { position: relative; }\n.db-diff-code-clean { display: none; }\n[data-diff-hidden] .db-diff-code-clean { display: block; }\n[data-diff-hidden] .db-diff-code-merged { display: none; }\n\n/* Whitespace-only code edits are still marked (indentation is\n semantic in YAML/Python/markdown) \u2014 but NAMED, so the reader\n is not hunting an invisible 3-space shift. */\nhtml:not([data-diff-hidden]) .db-diff-code-ws .db-diff-code-merged::before {\n content: \"whitespace only\";\n position: absolute;\n top: 0;\n right: 0.6rem;\n transform: translateY(-55%);\n z-index: 1;\n font-size: 0.65rem;\n font-weight: 600;\n letter-spacing: 0.04em;\n line-height: 1.4;\n padding: 0 0.5rem;\n border-radius: 99px;\n background: color-mix(in oklch, var(--color-warning, oklch(0.8 0.16 85)) 22%, var(--color-background, Canvas));\n border: 1px solid color-mix(in oklch, var(--color-warning, oklch(0.8 0.16 85)) 45%, transparent);\n}\n\n/* Hide highlights \u2014 read the target version clean. One attribute on\n <html>: the guarded mark rules above stop applying by themselves;\n only content that does not exist in the target version (removed\n blocks, del runs, the \"before\" code side) needs hiding, plus the\n ins tint. */\n[data-diff-hidden] :is([data-diff=\"removed\"], del.db-diff-del, .db-diff-pair-label) { display: none !important; }\n[data-diff-hidden] ins.db-diff-ins { background: transparent; padding: 0; }\n";
|
|
79
|
-
//# sourceMappingURL=diff-decoration.d.ts.map
|
package/dist/diff-decoration.js
CHANGED
|
@@ -538,4 +538,3 @@ html:not([data-diff-hidden]) .db-diff-code-ws .db-diff-code-merged::before {
|
|
|
538
538
|
[data-diff-hidden] :is([data-diff="removed"], del.db-diff-del, .db-diff-pair-label) { display: none !important; }
|
|
539
539
|
[data-diff-hidden] ins.db-diff-ins { background: transparent; padding: 0; }
|
|
540
540
|
`;
|
|
541
|
-
//# sourceMappingURL=diff-decoration.js.map
|
package/dist/granularity.d.ts
CHANGED
|
@@ -80,4 +80,3 @@ export declare function bookSlugFrom(slugs: string[], fallback: string): string;
|
|
|
80
80
|
/** Strip the route prefix + leading slash + anchor/query from a nav href → slug. */
|
|
81
81
|
export declare function slugFromHref(href: string | undefined, hrefPrefix: string): string;
|
|
82
82
|
export declare function slugify(text: string): string;
|
|
83
|
-
//# sourceMappingURL=granularity.d.ts.map
|
package/dist/granularity.js
CHANGED
package/dist/head-metadata.d.ts
CHANGED
package/dist/head-metadata.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -32,4 +32,4 @@ export type { DiffMarks } from "./diff-decoration.js";
|
|
|
32
32
|
export { BOOK_SEGMENT, assembleBook, bookHeading, bookSlugFrom, estimateTreeBytes, openAsPageNode, rewriteIntraBookLinks, shiftHeadings, slugFromHref, } from "./granularity.js";
|
|
33
33
|
export type { AssembleBookOptions, BookView } from "./granularity.js";
|
|
34
34
|
export { pageUnitPrefix, inPageUnit, normalizeTarget } from "./redirects.js";
|
|
35
|
-
|
|
35
|
+
export { TONES, CARD_TONE_CLASSES, TAB_VARIANTS, THEME_SCOPES } from "./tone-classes.js";
|
package/dist/index.js
CHANGED
|
@@ -60,4 +60,5 @@ export { DIFF_CSS, decorateDiff, diffMarksOf, hasDiffMarks, injectAttrs, inlineS
|
|
|
60
60
|
*/
|
|
61
61
|
export { BOOK_SEGMENT, assembleBook, bookHeading, bookSlugFrom, estimateTreeBytes, openAsPageNode, rewriteIntraBookLinks, shiftHeadings, slugFromHref, } from "./granularity.js";
|
|
62
62
|
export { pageUnitPrefix, inPageUnit, normalizeTarget } from "./redirects.js";
|
|
63
|
-
|
|
63
|
+
// Variants, tones and scoped themes: the class tables both renderers draw from
|
|
64
|
+
export { TONES, CARD_TONE_CLASSES, TAB_VARIANTS, THEME_SCOPES } from "./tone-classes.js";
|
package/dist/lead.d.ts
CHANGED
package/dist/lead.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
// Moved to @dogsbay/serialize-core (src/lead.ts), so @dogsbay/site-check can use
|
|
2
2
|
// these without depending on format-astro, which brings @dogsbay/ui and astro.
|
|
3
3
|
export { detectLeadingNodes, deriveDescription } from "@dogsbay/serialize-core";
|
|
4
|
-
//# sourceMappingURL=lead.js.map
|
package/dist/llms-txt.d.ts
CHANGED
|
@@ -120,4 +120,3 @@ export declare function buildSectionLlmsTxt(siteConfig: Pick<SiteConfig, "siteNa
|
|
|
120
120
|
* line, then either the full body (default) or just a description.
|
|
121
121
|
*/
|
|
122
122
|
export declare function buildLlmsFullTxt(siteConfig: Pick<SiteConfig, "siteName" | "description" | "siteUrl">, nav: NavItem[], pages: ExportPage[], options?: BuildLlmsFullTxtOptions): string;
|
|
123
|
-
//# sourceMappingURL=llms-txt.d.ts.map
|
package/dist/llms-txt.js
CHANGED
package/dist/plugins.d.ts
CHANGED
|
@@ -37,4 +37,3 @@ export interface EmitPluginRuntimeOptions {
|
|
|
37
37
|
export declare function emitPluginRuntime(options: EmitPluginRuntimeOptions): void;
|
|
38
38
|
/** Test-only: clear emitted plugin runtime files. */
|
|
39
39
|
export declare function _clearPluginRuntime(outputDir: string): void;
|
|
40
|
-
//# sourceMappingURL=plugins.d.ts.map
|
package/dist/plugins.js
CHANGED
|
@@ -338,4 +338,3 @@ export function _clearPluginRuntime(outputDir) {
|
|
|
338
338
|
rmSync(join(outputDir, PLUGIN_CONFIG_DIR_REL), { recursive: true, force: true });
|
|
339
339
|
rmSync(join(outputDir, PLUGIN_STYLES_DIR_REL), { recursive: true, force: true });
|
|
340
340
|
}
|
|
341
|
-
//# sourceMappingURL=plugins.js.map
|
package/dist/project.d.ts
CHANGED
|
@@ -682,4 +682,3 @@ export declare function rootVersionOf(options: Pick<AstroProjectOptions, "versio
|
|
|
682
682
|
* introduced in a release (Kbd, FileTree) reaches sites scaffolded earlier.
|
|
683
683
|
*/
|
|
684
684
|
export declare function copyComponents(outputDir: string): string[];
|
|
685
|
-
//# sourceMappingURL=project.d.ts.map
|
package/dist/project.js
CHANGED
package/dist/redirects.d.ts
CHANGED
package/dist/redirects.js
CHANGED
package/dist/serialize.d.ts
CHANGED
|
@@ -41,4 +41,3 @@ export declare function componentAttr(name: string, value: string): string;
|
|
|
41
41
|
/** Escape text for use directly in an Astro template (not inside an expression). */
|
|
42
42
|
export declare function escapeTemplate(s: string): string;
|
|
43
43
|
export declare function treeToAstro(nodes: TreeNode[], options?: AstroGenOptions): AstroGenResult;
|
|
44
|
-
//# sourceMappingURL=serialize.d.ts.map
|
package/dist/serialize.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { walkInline, applyTextFlags, renderLeaf, indent, isSafeHref, apiPageLayout, apiSymbolLevels, renderAroundGroup, isDetailsSheet, } from "@dogsbay/serialize-core";
|
|
2
2
|
import { parseInline } from "@dogsbay/format-dogsbay-md";
|
|
3
3
|
import { decorateDiff, hasDiffMarks } from "./diff-decoration.js";
|
|
4
|
-
import { TONE_CLASSES } from "./tone-classes.js";
|
|
4
|
+
import { TONE_CLASSES, CARD_TONE_CLASSES, TAB_VARIANTS, THEME_SCOPES, lookup } from "./tone-classes.js";
|
|
5
5
|
import { apiBlockHtml, apiPropertiesHtml } from "./api-markdown.js";
|
|
6
6
|
export { TONE_CLASSES };
|
|
7
7
|
const COMPONENT_IMPORTS = {
|
|
@@ -248,6 +248,19 @@ function nodeToAstroBase(node, ctx) {
|
|
|
248
248
|
return genericContainerToAstro(node, ctx);
|
|
249
249
|
case "details":
|
|
250
250
|
return detailsToAstro(node, ctx);
|
|
251
|
+
case "theme": {
|
|
252
|
+
// A scoped theme: `.dark` re-declares the tokens for its subtree, so a
|
|
253
|
+
// plain wrapper is enough (THEME_SCOPES); an unknown name keeps the content
|
|
254
|
+
const name = node.props?.name;
|
|
255
|
+
const scope = lookup(THEME_SCOPES, name);
|
|
256
|
+
const inner = childrenToAstro(node, ctx);
|
|
257
|
+
if (!scope)
|
|
258
|
+
return inner;
|
|
259
|
+
const passthrough = renderPassthroughAttrs(node.props, ["name", "class", "data-theme"]);
|
|
260
|
+
// The default (expression) form: an entity-escaped `[&>…]` is not a
|
|
261
|
+
// class Tailwind's scanner recognises, so the rule was never generated
|
|
262
|
+
return `<div${mergeClassAttr(scope, node.props?.class)} data-theme="${escapeAttr(name)}"${passthrough}>\n${indentStr(inner, 2)}\n</div>`;
|
|
263
|
+
}
|
|
251
264
|
case "tabs":
|
|
252
265
|
return renderAroundGroup(node, "tab", (n) => tabsToAstro(n, ctx), (c) => nodeToAstro(c, ctx), "\n");
|
|
253
266
|
case "ordered-list":
|
|
@@ -417,7 +430,7 @@ ${childrenToAstro(node, ctx)}
|
|
|
417
430
|
// controls the bg/text combo (see TONE_CLASSES). Authors can also pass
|
|
418
431
|
// their own `class` to override.
|
|
419
432
|
if (label !== undefined) {
|
|
420
|
-
const toneClasses = TONE_CLASSES
|
|
433
|
+
const toneClasses = lookup(TONE_CLASSES, tone) ?? TONE_CLASSES["primary-light"];
|
|
421
434
|
return `<GridItem ${attrParts.join(" ")}${classAttr}${passthrough}>
|
|
422
435
|
<div class="flex h-full min-h-16 items-center justify-center rounded-lg font-mono text-sm font-medium ${toneClasses}">${escapeTemplate(label)}</div>
|
|
423
436
|
</GridItem>`;
|
|
@@ -1061,11 +1074,15 @@ function tabsToAstro(node, ctx) {
|
|
|
1061
1074
|
removed: "−",
|
|
1062
1075
|
moved: "→",
|
|
1063
1076
|
};
|
|
1077
|
+
// A variant's class strings are complete (TAB_VARIANTS): TabsList and
|
|
1078
|
+
// TabsTrigger merge a `class` over their base with tailwind-variants
|
|
1079
|
+
const variant = lookup(TAB_VARIANTS, node.props?.variant);
|
|
1080
|
+
const triggerClass = variant ? ` class="${escapeAttr(variant.trigger)}"` : "";
|
|
1064
1081
|
const triggers = tabItems
|
|
1065
1082
|
.map((t) => {
|
|
1066
1083
|
const signal = tabDiffSignal(t.node);
|
|
1067
1084
|
if (!signal) {
|
|
1068
|
-
return ` <TabsTrigger${componentAttr("value", t.value)}>${escapeTemplate(t.label)}</TabsTrigger>`;
|
|
1085
|
+
return ` <TabsTrigger${componentAttr("value", t.value)}${triggerClass}>${escapeTemplate(t.label)}</TabsTrigger>`;
|
|
1069
1086
|
}
|
|
1070
1087
|
const glyph = TAB_GLYPH[signal] ?? "•";
|
|
1071
1088
|
// The glyph and its announced text are ONE element: "Hide
|
|
@@ -1081,7 +1098,7 @@ function tabsToAstro(node, ctx) {
|
|
|
1081
1098
|
// a title containing `&` was emitted `&` here and `&` there, so the
|
|
1082
1099
|
// trigger and its panel no longer paired and the tab rendered empty.
|
|
1083
1100
|
// `data-diff-tab` is a plain data attribute — entity escaping is right.
|
|
1084
|
-
return ` <TabsTrigger${componentAttr("value", t.value)} data-diff-tab="${escapeAttr(signal)}">${escapeTemplate(t.label)}<Fragment set:html={${escapeExpr(marker)}} /></TabsTrigger>`;
|
|
1101
|
+
return ` <TabsTrigger${componentAttr("value", t.value)}${triggerClass} data-diff-tab="${escapeAttr(signal)}">${escapeTemplate(t.label)}<Fragment set:html={${escapeExpr(marker)}} /></TabsTrigger>`;
|
|
1085
1102
|
})
|
|
1086
1103
|
.join("\n");
|
|
1087
1104
|
const contents = tabItems
|
|
@@ -1097,7 +1114,7 @@ function tabsToAstro(node, ctx) {
|
|
|
1097
1114
|
const syncAttr = syncKey ? componentAttr("syncKey", syncKey) : "";
|
|
1098
1115
|
// Same encoding as the trigger/content `value` it selects — see above.
|
|
1099
1116
|
return `<Tabs${componentAttr("defaultValue", defaultValue)}${syncAttr}${classAttr}${passthrough}>
|
|
1100
|
-
<TabsList>
|
|
1117
|
+
<TabsList${variant ? ` class="${escapeAttr(variant.list)}"` : ""}>
|
|
1101
1118
|
${triggers}
|
|
1102
1119
|
</TabsList>
|
|
1103
1120
|
${contents}
|
|
@@ -1364,7 +1381,7 @@ function cardsToAstro(node, ctx) {
|
|
|
1364
1381
|
// Grid-level attributes on the :::cards container
|
|
1365
1382
|
const outerClass = mergeClassAttr("", node.props?.class);
|
|
1366
1383
|
const outerPass = renderPassthroughAttrs(node.props, [
|
|
1367
|
-
"cols", "gap", "rows", "class",
|
|
1384
|
+
"cols", "gap", "rows", "class", "tone",
|
|
1368
1385
|
]);
|
|
1369
1386
|
// MDX pattern: children are card nodes with title/href/icon props
|
|
1370
1387
|
const cardNodes = (node.children ?? []).filter((c) => c.type === "card");
|
|
@@ -1398,12 +1415,15 @@ function cardsToAstro(node, ctx) {
|
|
|
1398
1415
|
const desc = lead + (inner
|
|
1399
1416
|
? `<${descTag} class="text-sm text-muted-foreground mt-1 [text-decoration:none]">${inner}</${descTag}>`
|
|
1400
1417
|
: "");
|
|
1418
|
+
// A tone (TONES; the card's own, else the group's) sets the card's
|
|
1419
|
+
// border and tint: Card's tailwind-variants merge replaces bg-card
|
|
1420
|
+
const toned = lookup(CARD_TONE_CLASSES, card.props?.tone ?? node.props?.tone);
|
|
1401
1421
|
const cardDefaultClass = href
|
|
1402
|
-
? "p-4 hover:border-foreground/20 transition-colors"
|
|
1403
|
-
: "p-4";
|
|
1422
|
+
? toned ? `p-4 ${toned} hover:shadow-md transition-colors` : "p-4 hover:border-foreground/20 transition-colors"
|
|
1423
|
+
: toned ? `p-4 ${toned}` : "p-4";
|
|
1404
1424
|
const cardClassAttr = mergeClassAttr(cardDefaultClass, card.props?.class);
|
|
1405
1425
|
const cardPass = renderPassthroughAttrs(card.props, [
|
|
1406
|
-
"title", "href", "description", "icon", "variant", "class",
|
|
1426
|
+
"title", "href", "description", "icon", "variant", "class", "tone",
|
|
1407
1427
|
]);
|
|
1408
1428
|
if (href) {
|
|
1409
1429
|
return `<Card${cardClassAttr}${cardPass}>\n<CardContent class="p-0">\n<a href="${escapeAttr(href)}" class="[text-decoration:none] text-foreground">\n${iconHtml}\n${titleHtml}\n${desc}\n</a>\n</CardContent>\n</Card>`;
|
|
@@ -1461,12 +1481,14 @@ function standaloneCardToAstro(node, ctx) {
|
|
|
1461
1481
|
const desc = lead + (inner
|
|
1462
1482
|
? `<${descTag} class="text-sm text-muted-foreground mt-1 [text-decoration:none]">${inner}</${descTag}>`
|
|
1463
1483
|
: "");
|
|
1484
|
+
// A tone (TONES), as on a card in a group (cardsToAstro)
|
|
1485
|
+
const toned = lookup(CARD_TONE_CLASSES, node.props?.tone);
|
|
1464
1486
|
const cardDefaultClass = href
|
|
1465
|
-
? "p-4 hover:border-foreground/20 transition-colors"
|
|
1466
|
-
: "p-4";
|
|
1487
|
+
? toned ? `p-4 ${toned} hover:shadow-md transition-colors` : "p-4 hover:border-foreground/20 transition-colors"
|
|
1488
|
+
: toned ? `p-4 ${toned}` : "p-4";
|
|
1467
1489
|
const classAttr = mergeClassAttr(cardDefaultClass, node.props?.class);
|
|
1468
1490
|
const passthrough = renderPassthroughAttrs(node.props, [
|
|
1469
|
-
"title", "href", "description", "icon", "variant", "class",
|
|
1491
|
+
"title", "href", "description", "icon", "variant", "class", "tone",
|
|
1470
1492
|
]);
|
|
1471
1493
|
if (href) {
|
|
1472
1494
|
return `<Card${classAttr}${passthrough}>\n<CardContent class="p-0">\n<a href="${escapeAttr(href)}" class="[text-decoration:none] text-foreground">\n${iconHtml}\n${titleHtml}\n${desc}\n</a>\n</CardContent>\n</Card>`;
|
|
@@ -1722,4 +1744,3 @@ const indentStr = indent;
|
|
|
1722
1744
|
function escapeHtml(s) {
|
|
1723
1745
|
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1724
1746
|
}
|
|
1725
|
-
//# sourceMappingURL=serialize.js.map
|
package/dist/sitemap.d.ts
CHANGED
|
@@ -105,4 +105,3 @@ export declare function buildSitemapIndex(options: BuildSitemapOptions): string;
|
|
|
105
105
|
export declare function pageHref(slug: string | undefined, prefix: string): string;
|
|
106
106
|
export declare function normalizePrefix(basePath: string | undefined): string;
|
|
107
107
|
export declare function originOf(siteUrl: string): string;
|
|
108
|
-
//# sourceMappingURL=sitemap.d.ts.map
|
package/dist/sitemap.js
CHANGED
package/dist/taxonomy.d.ts
CHANGED
package/dist/taxonomy.js
CHANGED
package/dist/theme-css.d.ts
CHANGED
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
* tone added to the palette is automatically safelisted.
|
|
16
16
|
*/
|
|
17
17
|
export declare function buildToneSafelist(): string;
|
|
18
|
+
/**
|
|
19
|
+
* The same pin for the variant, tone and theme-scope tables
|
|
20
|
+
* (plans/dita-variants-themes.md). A line of its own, marked ASTRO-ONLY:
|
|
21
|
+
* render-html copies this stylesheet, and a renderer that compiles from the
|
|
22
|
+
* page's own classes (render-html, dogsbay-ssg) needs no safelist — there it
|
|
23
|
+
* put every variant's classes on every page (scripts/sources.mjs drops it).
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildVariantSafelist(): string;
|
|
18
26
|
export declare function generateGlobalCss(): string;
|
|
19
27
|
/** The theme presets by name. A name not here falls back to "default", as writeThemeFile always did. */
|
|
20
28
|
export declare const THEMES: Record<string, {
|
|
@@ -23,4 +31,3 @@ export declare const THEMES: Record<string, {
|
|
|
23
31
|
}>;
|
|
24
32
|
/** A site's src/styles/theme.css for a preset: the Tailwind theme mapping plus the preset's tokens. */
|
|
25
33
|
export declare function themeCss(themeName?: string): string;
|
|
26
|
-
//# sourceMappingURL=theme-css.d.ts.map
|
package/dist/theme-css.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* css/ (packages/render-html/scripts/sources.mjs), which dogsbay-ssg and the
|
|
9
9
|
* single-page renderer use.
|
|
10
10
|
*/
|
|
11
|
-
import { TONE_CLASSES } from "./tone-classes.js";
|
|
11
|
+
import { TONE_CLASSES, CARD_TONE_CLASSES, TAB_VARIANTS, THEME_SCOPES } from "./tone-classes.js";
|
|
12
12
|
// ── CSS generation (ported from import-mkdocs.ts) ───────
|
|
13
13
|
/**
|
|
14
14
|
* Build the `@source inline("...")` directive that pins the
|
|
@@ -36,6 +36,26 @@ export function buildToneSafelist() {
|
|
|
36
36
|
}
|
|
37
37
|
return [...seen].sort().join(" ");
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* The same pin for the variant, tone and theme-scope tables
|
|
41
|
+
* (plans/dita-variants-themes.md). A line of its own, marked ASTRO-ONLY:
|
|
42
|
+
* render-html copies this stylesheet, and a renderer that compiles from the
|
|
43
|
+
* page's own classes (render-html, dogsbay-ssg) needs no safelist — there it
|
|
44
|
+
* put every variant's classes on every page (scripts/sources.mjs drops it).
|
|
45
|
+
*/
|
|
46
|
+
export function buildVariantSafelist() {
|
|
47
|
+
const seen = new Set();
|
|
48
|
+
const sources = [
|
|
49
|
+
...Object.values(CARD_TONE_CLASSES),
|
|
50
|
+
...Object.values(TAB_VARIANTS).flatMap((v) => [v.list, v.trigger]),
|
|
51
|
+
...Object.values(THEME_SCOPES),
|
|
52
|
+
];
|
|
53
|
+
for (const classes of sources)
|
|
54
|
+
for (const cls of classes.split(/\s+/))
|
|
55
|
+
if (cls)
|
|
56
|
+
seen.add(cls);
|
|
57
|
+
return [...seen].sort().join(" ");
|
|
58
|
+
}
|
|
39
59
|
export function generateGlobalCss() {
|
|
40
60
|
return `@import "tailwindcss";
|
|
41
61
|
@import "./theme.css";
|
|
@@ -67,6 +87,7 @@ export function generateGlobalCss() {
|
|
|
67
87
|
Tailwind doesn't see them in the scanned globs, leaving grid
|
|
68
88
|
demo cells with no visible background. */
|
|
69
89
|
@source inline("${buildToneSafelist()}");
|
|
90
|
+
@source inline("${buildVariantSafelist()}"); /* ASTRO-ONLY: variants, tones, theme scopes */
|
|
70
91
|
|
|
71
92
|
/* Prose typography for rendered content.
|
|
72
93
|
Every element rule is guarded with :not(.dba-api *): API-reference
|
|
@@ -93,8 +114,9 @@ export function generateGlobalCss() {
|
|
|
93
114
|
looked like a colour bug in one button rather than a cascade bug in both.
|
|
94
115
|
(No backticks in this comment: the whole stylesheet is a template
|
|
95
116
|
literal.) */
|
|
96
|
-
|
|
97
|
-
& a:
|
|
117
|
+
/* Not a whole-card link (LinkCard, the video card: \`a.not-prose\`): its underline ran under every line of the card */
|
|
118
|
+
& a:not(.dba-api *):not([data-variant]):not(.not-prose) { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
|
|
119
|
+
& a:hover:not(.dba-api *):not([data-variant]):not(.not-prose) { opacity: 0.8; }
|
|
98
120
|
|
|
99
121
|
& strong:not(.dba-api *) { font-weight: 600; }
|
|
100
122
|
& code:not(.dba-api *) { font-size: 0.875em; padding: 0.15em 0.35em; border-radius: 0.25rem; background: var(--muted); font-family: var(--font-code, ui-monospace, monospace); }
|
|
@@ -108,6 +130,9 @@ export function generateGlobalCss() {
|
|
|
108
130
|
& ol:not(.dba-api *) { list-style: decimal; padding-left: 1.5rem; margin: 0.75rem 0; }
|
|
109
131
|
& li:not(.dba-api *) { margin: 0.25rem 0; }
|
|
110
132
|
& li > ul:not(.dba-api *), & li > ol:not(.dba-api *) { margin: 0.25rem 0; }
|
|
133
|
+
/* A file tree draws its own folder and file icons (files/markup.ts): the list rules above gave it bullets too */
|
|
134
|
+
& [data-component="files"] ul:not(.dba-api *) { list-style: none; padding-left: 0; }
|
|
135
|
+
& [data-component="files"] li > ul:not(.dba-api *) { padding-left: 1rem; }
|
|
111
136
|
|
|
112
137
|
& blockquote:not(.dba-api *) { border-left: 4px solid var(--border); padding-left: 1rem; color: var(--muted-foreground); font-style: italic; margin: 1rem 0; }
|
|
113
138
|
|
|
@@ -652,4 +677,3 @@ ${tokens.dark}
|
|
|
652
677
|
}
|
|
653
678
|
`;
|
|
654
679
|
}
|
|
655
|
-
//# sourceMappingURL=theme-css.js.map
|
package/dist/tone-classes.d.ts
CHANGED
|
@@ -10,5 +10,43 @@
|
|
|
10
10
|
* their content/ outside the scanned globs won't pick them up at
|
|
11
11
|
* all). See generateGlobalCss in theme-css.ts.
|
|
12
12
|
*/
|
|
13
|
+
/**
|
|
14
|
+
* A table entry by author-supplied key, own properties only. A plain
|
|
15
|
+
* `TABLE[key]` with `toString`, `constructor` or `__proto__` returns
|
|
16
|
+
* Object.prototype members: a function's source landed in a class attribute,
|
|
17
|
+
* an unknown theme name passed as valid, and a tab variant crashed the build.
|
|
18
|
+
*/
|
|
19
|
+
export declare function lookup<T>(table: Record<string, T>, key: unknown): T | undefined;
|
|
13
20
|
export declare const TONE_CLASSES: Record<string, string>;
|
|
14
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The shared tone vocabulary for components that take one (`tone` on cards,
|
|
23
|
+
* DITA `tone-*` tokens): the callout palette, which every theme preset
|
|
24
|
+
* defines (`--info`, `--success`, `--warning`, `--danger`).
|
|
25
|
+
*/
|
|
26
|
+
export declare const TONES: readonly ["info", "success", "warning", "danger"];
|
|
27
|
+
export type Tone = (typeof TONES)[number];
|
|
28
|
+
/** A toned card: the callout recipe, a 50% border and a 5% tint. */
|
|
29
|
+
export declare const CARD_TONE_CLASSES: Record<string, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Tab variants (`:::tabs{variant="pills"}`; DITA `db-tabs pills`). COMPLETE
|
|
32
|
+
* class strings for the list and each trigger, not additions: render-html has
|
|
33
|
+
* no tailwind-merge, so a variant replaces its base string there, and Astro
|
|
34
|
+
* passes it as `class` to TabsList/TabsTrigger, whose tailwind-variants merge
|
|
35
|
+
* resolves the conflicts the same way — but only for a class GROUP the variant
|
|
36
|
+
* also sets, so each string resets every base group it replaces (`p-0` before
|
|
37
|
+
* its own padding, `border-b-0`, `rounded-none`, `aria-selected:shadow-none`). packages/ui
|
|
38
|
+
* tests/tabs-variants.test.ts runs the real merge against the base classes.
|
|
39
|
+
* Existing sites therefore get variants without re-copying the components.
|
|
40
|
+
*/
|
|
41
|
+
export declare const TAB_VARIANTS: Record<string, {
|
|
42
|
+
list: string;
|
|
43
|
+
trigger: string;
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Scoped themes (TreeNode `theme`; DITA `db-theme-<name>`). The theme
|
|
47
|
+
* declares its dark tokens on `.dark` and the `dark:` variant is
|
|
48
|
+
* `&:where(.dark, .dark *)`, so a wrapper with class `dark` re-themes its
|
|
49
|
+
* subtree with no new CSS. `light` inside a dark page and brand presets per
|
|
50
|
+
* subtree are phase 2 (plans/dita-variants-themes.md).
|
|
51
|
+
*/
|
|
52
|
+
export declare const THEME_SCOPES: Record<string, string>;
|
package/dist/tone-classes.js
CHANGED
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
* their content/ outside the scanned globs won't pick them up at
|
|
11
11
|
* all). See generateGlobalCss in theme-css.ts.
|
|
12
12
|
*/
|
|
13
|
+
/**
|
|
14
|
+
* A table entry by author-supplied key, own properties only. A plain
|
|
15
|
+
* `TABLE[key]` with `toString`, `constructor` or `__proto__` returns
|
|
16
|
+
* Object.prototype members: a function's source landed in a class attribute,
|
|
17
|
+
* an unknown theme name passed as valid, and a tab variant crashed the build.
|
|
18
|
+
*/
|
|
19
|
+
export function lookup(table, key) {
|
|
20
|
+
return typeof key === "string" && Object.prototype.hasOwnProperty.call(table, key) ? table[key] : undefined;
|
|
21
|
+
}
|
|
13
22
|
export const TONE_CLASSES = {
|
|
14
23
|
// Primary scale (intensity)
|
|
15
24
|
"primary": "bg-primary text-primary-foreground",
|
|
@@ -27,4 +36,49 @@ export const TONE_CLASSES = {
|
|
|
27
36
|
"purple": "bg-purple-500/15 text-purple-700 dark:text-purple-300",
|
|
28
37
|
"red": "bg-red-500/15 text-red-700 dark:text-red-300",
|
|
29
38
|
};
|
|
30
|
-
|
|
39
|
+
/**
|
|
40
|
+
* The shared tone vocabulary for components that take one (`tone` on cards,
|
|
41
|
+
* DITA `tone-*` tokens): the callout palette, which every theme preset
|
|
42
|
+
* defines (`--info`, `--success`, `--warning`, `--danger`).
|
|
43
|
+
*/
|
|
44
|
+
export const TONES = ["info", "success", "warning", "danger"];
|
|
45
|
+
/** A toned card: the callout recipe, a 50% border and a 5% tint. */
|
|
46
|
+
export const CARD_TONE_CLASSES = {
|
|
47
|
+
info: "border-info/50 bg-info/5",
|
|
48
|
+
success: "border-success/50 bg-success/5",
|
|
49
|
+
warning: "border-warning/50 bg-warning/5",
|
|
50
|
+
danger: "border-danger/50 bg-danger/5",
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Tab variants (`:::tabs{variant="pills"}`; DITA `db-tabs pills`). COMPLETE
|
|
54
|
+
* class strings for the list and each trigger, not additions: render-html has
|
|
55
|
+
* no tailwind-merge, so a variant replaces its base string there, and Astro
|
|
56
|
+
* passes it as `class` to TabsList/TabsTrigger, whose tailwind-variants merge
|
|
57
|
+
* resolves the conflicts the same way — but only for a class GROUP the variant
|
|
58
|
+
* also sets, so each string resets every base group it replaces (`p-0` before
|
|
59
|
+
* its own padding, `border-b-0`, `rounded-none`, `aria-selected:shadow-none`). packages/ui
|
|
60
|
+
* tests/tabs-variants.test.ts runs the real merge against the base classes.
|
|
61
|
+
* Existing sites therefore get variants without re-copying the components.
|
|
62
|
+
*/
|
|
63
|
+
export const TAB_VARIANTS = {
|
|
64
|
+
pills: {
|
|
65
|
+
list: "flex flex-wrap items-center gap-2 border-b-0 border-transparent bg-transparent p-0 px-3 pt-3 pb-1 text-muted-foreground",
|
|
66
|
+
trigger: "inline-flex items-center justify-center whitespace-nowrap rounded-full border border-border px-4 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-selected:border-primary aria-selected:bg-primary aria-selected:text-primary-foreground aria-selected:shadow-none",
|
|
67
|
+
},
|
|
68
|
+
underline: {
|
|
69
|
+
list: "flex items-center gap-6 border-b border-border bg-transparent p-0 px-4 text-muted-foreground",
|
|
70
|
+
trigger: "-mb-px inline-flex items-center justify-center whitespace-nowrap rounded-none border-b-2 border-transparent p-0 px-0.5 pt-3 pb-2 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:text-foreground aria-selected:border-primary aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none",
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Scoped themes (TreeNode `theme`; DITA `db-theme-<name>`). The theme
|
|
75
|
+
* declares its dark tokens on `.dark` and the `dark:` variant is
|
|
76
|
+
* `&:where(.dark, .dark *)`, so a wrapper with class `dark` re-themes its
|
|
77
|
+
* subtree with no new CSS. `light` inside a dark page and brand presets per
|
|
78
|
+
* subtree are phase 2 (plans/dita-variants-themes.md).
|
|
79
|
+
*/
|
|
80
|
+
// The first and last child's margins are trimmed with `!`: the prose heading
|
|
81
|
+
// rule (`.docs-prose h3:not(…)`) out-specifies a plain `[&>:first-child]` rule.
|
|
82
|
+
export const THEME_SCOPES = {
|
|
83
|
+
dark: "dark my-6 rounded-xl border border-border bg-background p-6 text-foreground [&>:first-child]:mt-0! [&>:last-child]:mb-0!",
|
|
84
|
+
};
|
|
@@ -18,4 +18,3 @@ export declare function writeFileSync(path: fs.PathOrFileDescriptor, data: Write
|
|
|
18
18
|
/** `fs.copyFileSync`, skipped when the destination already holds the source's bytes. */
|
|
19
19
|
export declare function copyFileSync(src: fs.PathLike, dest: fs.PathLike, mode?: number): void;
|
|
20
20
|
export {};
|
|
21
|
-
//# sourceMappingURL=write-if-changed.d.ts.map
|