@dogsbay/ssg 0.2.0-beta.151.1 → 0.2.0-beta.153
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/package/THIRD-PARTY-NOTICES.txt +6 -6
- package/dist/package/browser.mjs +390 -118
- package/dist/package/chunks/{prebuilt-css-default-65IKPMHZ.mjs → prebuilt-css-default-ZJXSHZYU.mjs} +214 -81
- package/dist/package/chunks/{prebuilt-css-mintlify-PIEJO5KN.mjs → prebuilt-css-mintlify-42UHBQ4I.mjs} +214 -81
- package/dist/package/client.mjs +507 -44
- package/dist/package/css.mjs +56 -43
- package/dist/package/types/client/pagefind.d.ts +1 -0
- package/dist/package/types/client/search-facets.d.ts +35 -0
- package/dist/package/types/client/search-scope.d.ts +61 -0
- package/dist/package/types/client/search.d.ts +19 -8
- package/dist/package/types/core/build.d.ts +29 -0
- package/dist/package/types/core/canonical.d.ts +5 -0
- package/dist/package/types/core/links.d.ts +9 -0
- package/dist/package/types/core/taxonomy.d.ts +27 -0
- package/dist/package/types/core/unit-manifest.d.ts +2 -0
- package/dist/package/types/theme/compose.d.ts +2 -0
- package/dist/package/types/theme/docs-layout/site-chrome.d.ts +12 -0
- package/dist/package/types/theme/docs-layout/tag-list-data.d.ts +4 -18
- package/dist/package/types/theme/regions.d.ts +27 -2
- package/package.json +29 -29
|
@@ -50,3 +50,15 @@ export declare const isMenu: (l: SiteChromeLink | SiteChromeMenu) => l is SiteCh
|
|
|
50
50
|
export declare const isExternal: (href: string) => boolean;
|
|
51
51
|
/** The announcement's colours by tone: the callout tokens, so the theme and dark mode apply. */
|
|
52
52
|
export declare const ANNOUNCEMENT_TONE_CLASS: Record<string, string>;
|
|
53
|
+
/** The width the header's links show in the bar from (in the sidebar's list below it); `never`: the list only. */
|
|
54
|
+
export type LinksFrom = "lg" | "xl" | "2xl" | "never";
|
|
55
|
+
/**
|
|
56
|
+
* Where the header's links fit: the first width at which their estimated width fits beside what
|
|
57
|
+
* else the header holds, or `never`. Estimated from the labels (about 6.2 px a character at the
|
|
58
|
+
* header's text size, 28 px padding a link, 14 px a dropdown's chevron) against the header beside
|
|
59
|
+
* the 256 px sidebar, less the trigger and padding (80 px) and the menus: about 520 px for a
|
|
60
|
+
* crowded header (product, version, page actions, icons), 210 px otherwise (search with its
|
|
61
|
+
* text, the icons). A crowded header starts at xl. Measured on Tigera's (47 characters, 4 links:
|
|
62
|
+
* xl) and the products fixture; a long navbar stays in the sidebar rather than push the page wide.
|
|
63
|
+
*/
|
|
64
|
+
export declare function headerLinksFrom(links: Array<SiteChromeLink | SiteChromeMenu>, crowded: boolean): LinksFrom;
|
|
@@ -88,25 +88,11 @@ export declare function resolveTagDisplayLabel(tag: string, labels?: Record<stri
|
|
|
88
88
|
*/
|
|
89
89
|
export declare function resolveTagKeywords(tags: readonly unknown[] | undefined, labels?: Record<string, string>): string[];
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* Used by `<TaxonomyIndex>` term-cloud chips, `<TaxonomyTerm>`
|
|
95
|
-
* page headings and breadcrumbs, and sub-tag pills — anywhere a
|
|
96
|
-
* structural slug needs to render as a human label.
|
|
97
|
-
*
|
|
98
|
-
* Resolution order:
|
|
99
|
-
* 1. `labels[fullSlug]` (joined fullPath) — explicit override
|
|
100
|
-
* wins, regardless of depth.
|
|
101
|
-
* 2. For top-level terms (`fullPath.length === 1`):
|
|
102
|
-
* `prefixes[segment].label` — lets a top-level segment
|
|
103
|
-
* (`concept`, `difficulty`) render as "Concept", "Difficulty".
|
|
104
|
-
* 3. The leaf segment of the path — the rendered fallback for
|
|
105
|
-
* deeper terms with no override.
|
|
106
|
-
*
|
|
107
|
-
* URLs continue to use the slug-form `fullPath`. Display only.
|
|
91
|
+
* Display label of a term path (`labels` override, then a top-level
|
|
92
|
+
* `prefixes` label, then the leaf). One implementation, shared with the
|
|
93
|
+
* search facet column: `@dogsbay/search/facets`.
|
|
108
94
|
*/
|
|
109
|
-
export
|
|
95
|
+
export { resolveTermLabel } from "@dogsbay/search/facets";
|
|
110
96
|
/**
|
|
111
97
|
* Map raw tag slugs to render-ready chip models, applying prefix
|
|
112
98
|
* + label config rules.
|
|
@@ -14,6 +14,7 @@ export declare function sidebar(opts: {
|
|
|
14
14
|
nav: string;
|
|
15
15
|
label: string;
|
|
16
16
|
links?: string;
|
|
17
|
+
linksClass?: string;
|
|
17
18
|
}): string;
|
|
18
19
|
export declare function sidebarTrigger(label: string): string;
|
|
19
20
|
export interface NavOptions {
|
|
@@ -54,7 +55,8 @@ export declare function navTree(nodes: NavNode[], o: NavOptions): string;
|
|
|
54
55
|
export type CompactNav = [string, string | null, CompactNav[]?, 1?];
|
|
55
56
|
export declare function compactNav(nodes: NavNode[], href: (slug: string) => string | undefined): CompactNav[];
|
|
56
57
|
export declare function navSize(nodes: NavNode[]): number;
|
|
57
|
-
|
|
58
|
+
/** `compact`: a crowded header (SearchDialog's `compact`), the label and key only from 2xl. */
|
|
59
|
+
export declare function searchButton(label: string, compact?: boolean): string;
|
|
58
60
|
export declare function themeToggle(label: string): string;
|
|
59
61
|
export interface SwitchOption {
|
|
60
62
|
label: string;
|
|
@@ -67,6 +69,7 @@ export interface SwitchOption {
|
|
|
67
69
|
/** A versionMenu link after the versions: the client goes straight to it. */
|
|
68
70
|
link?: boolean;
|
|
69
71
|
}
|
|
72
|
+
/** `compact`: a crowded header, the button an icon below 2xl (PageActions.astro `compact`; its aria-label names it). */
|
|
70
73
|
export declare function pageActions(o: {
|
|
71
74
|
mdHref: string;
|
|
72
75
|
label: string;
|
|
@@ -77,11 +80,32 @@ export declare function pageActions(o: {
|
|
|
77
80
|
href: string;
|
|
78
81
|
}[];
|
|
79
82
|
copy: boolean;
|
|
83
|
+
compact?: boolean;
|
|
80
84
|
}): string;
|
|
81
85
|
export declare function h1(title: string): string;
|
|
82
86
|
export declare function lede(text: string): string;
|
|
83
87
|
export declare function banner(html: string): string;
|
|
84
|
-
|
|
88
|
+
/** The strings the search UI reads from its result list (src/client/search.ts), shared by the dialog and the page. */
|
|
89
|
+
/**
|
|
90
|
+
* The facet column's display (`data-facets`, src/client/search-facets.ts FacetDisplay): each
|
|
91
|
+
* taxonomy a query can filter on, with its title and labels. Undefined without taxonomies.
|
|
92
|
+
*/
|
|
93
|
+
type FacetDef = {
|
|
94
|
+
name: string;
|
|
95
|
+
hierarchical: boolean;
|
|
96
|
+
prefixes?: Record<string, {
|
|
97
|
+
label?: string;
|
|
98
|
+
}>;
|
|
99
|
+
labels?: Record<string, string>;
|
|
100
|
+
};
|
|
101
|
+
export declare function facetDisplay(defs: ReadonlyArray<FacetDef>): string | undefined;
|
|
102
|
+
/** `searchPage`: the unit's search page from this page, for the dialog's "See all N results". */
|
|
103
|
+
export declare function searchDialog(t: (k: string) => string, searchPage?: string, facets?: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* The search page's body (`search.html`, src/client/search.ts initSearchPage): a form whose input
|
|
106
|
+
* carries the query (`?q=`, so it also works as a plain GET form), the status, and the results.
|
|
107
|
+
*/
|
|
108
|
+
export declare function searchPageBody(t: (k: string) => string, facets?: string): string;
|
|
85
109
|
export declare function skipLink(label: string): string;
|
|
86
110
|
/** A section page with no body lists its child topics (LinkCard look). */
|
|
87
111
|
export declare function childLinks(items: {
|
|
@@ -89,3 +113,4 @@ export declare function childLinks(items: {
|
|
|
89
113
|
href: string;
|
|
90
114
|
description?: string;
|
|
91
115
|
}[]): string;
|
|
116
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/ssg",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.153",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Documentation static site generator for Dogsbay-MD that builds inside Cloudflare Workers and publishes sites that work offline",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,38 +49,38 @@
|
|
|
49
49
|
"tailwindcss": "^4.3.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@dogsbay/elements": "0.2.0-beta.
|
|
53
|
-
"@dogsbay/format-dogsbay-md": "0.2.0-beta.
|
|
54
|
-
"@dogsbay/format-openapi": "0.2.0-beta.
|
|
55
|
-
"@dogsbay/format-topicmap": "0.2.0-beta.
|
|
56
|
-
"@dogsbay/highlight": "0.2.0-beta.
|
|
57
|
-
"@dogsbay/minja": "0.2.0-beta.
|
|
58
|
-
"@dogsbay/primitives": "0.2.0-beta.
|
|
59
|
-
"@dogsbay/render-html": "0.2.0-beta.
|
|
60
|
-
"@dogsbay/search": "0.2.0-beta.
|
|
61
|
-
"@dogsbay/serialize-core": "0.2.0-beta.
|
|
62
|
-
"@dogsbay/site-check": "0.2.0-beta.
|
|
63
|
-
"@dogsbay/site-files": "0.2.0-beta.
|
|
64
|
-
"@dogsbay/types": "0.2.0-beta.
|
|
52
|
+
"@dogsbay/elements": "0.2.0-beta.153",
|
|
53
|
+
"@dogsbay/format-dogsbay-md": "0.2.0-beta.153",
|
|
54
|
+
"@dogsbay/format-openapi": "0.2.0-beta.153",
|
|
55
|
+
"@dogsbay/format-topicmap": "0.2.0-beta.153",
|
|
56
|
+
"@dogsbay/highlight": "0.2.0-beta.153",
|
|
57
|
+
"@dogsbay/minja": "0.2.0-beta.153",
|
|
58
|
+
"@dogsbay/primitives": "0.2.0-beta.153",
|
|
59
|
+
"@dogsbay/render-html": "0.2.0-beta.153",
|
|
60
|
+
"@dogsbay/search": "0.2.0-beta.153",
|
|
61
|
+
"@dogsbay/serialize-core": "0.2.0-beta.153",
|
|
62
|
+
"@dogsbay/site-check": "0.2.0-beta.153",
|
|
63
|
+
"@dogsbay/site-files": "0.2.0-beta.153",
|
|
64
|
+
"@dogsbay/types": "0.2.0-beta.153"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@axe-core/playwright": "^4.12.1",
|
|
68
68
|
"@cloudflare/workers-types": "^5.20260921.1",
|
|
69
|
-
"@dogsbay/elements": "0.2.0-beta.
|
|
70
|
-
"@dogsbay/format-dogsbay-md": "0.2.0-beta.
|
|
71
|
-
"@dogsbay/format-openapi": "0.2.0-beta.
|
|
72
|
-
"@dogsbay/format-topicmap": "0.2.0-beta.
|
|
73
|
-
"@dogsbay/highlight": "0.2.0-beta.
|
|
74
|
-
"@dogsbay/icons": "0.2.0-beta.
|
|
75
|
-
"@dogsbay/minja": "0.2.0-beta.
|
|
76
|
-
"@dogsbay/primitives": "0.2.0-beta.
|
|
77
|
-
"@dogsbay/render-html": "0.2.0-beta.
|
|
78
|
-
"@dogsbay/search": "0.2.0-beta.
|
|
79
|
-
"@dogsbay/serialize-core": "0.2.0-beta.
|
|
80
|
-
"@dogsbay/site-check": "0.2.0-beta.
|
|
81
|
-
"@dogsbay/site-files": "0.2.0-beta.
|
|
82
|
-
"@dogsbay/types": "0.2.0-beta.
|
|
83
|
-
"@dogsbay/ui": "0.2.0-beta.
|
|
69
|
+
"@dogsbay/elements": "0.2.0-beta.153",
|
|
70
|
+
"@dogsbay/format-dogsbay-md": "0.2.0-beta.153",
|
|
71
|
+
"@dogsbay/format-openapi": "0.2.0-beta.153",
|
|
72
|
+
"@dogsbay/format-topicmap": "0.2.0-beta.153",
|
|
73
|
+
"@dogsbay/highlight": "0.2.0-beta.153",
|
|
74
|
+
"@dogsbay/icons": "0.2.0-beta.153",
|
|
75
|
+
"@dogsbay/minja": "0.2.0-beta.153",
|
|
76
|
+
"@dogsbay/primitives": "0.2.0-beta.153",
|
|
77
|
+
"@dogsbay/render-html": "0.2.0-beta.153",
|
|
78
|
+
"@dogsbay/search": "0.2.0-beta.153",
|
|
79
|
+
"@dogsbay/serialize-core": "0.2.0-beta.153",
|
|
80
|
+
"@dogsbay/site-check": "0.2.0-beta.153",
|
|
81
|
+
"@dogsbay/site-files": "0.2.0-beta.153",
|
|
82
|
+
"@dogsbay/types": "0.2.0-beta.153",
|
|
83
|
+
"@dogsbay/ui": "0.2.0-beta.153",
|
|
84
84
|
"@mermanjs/web": "0.7.0",
|
|
85
85
|
"@playwright/test": "1.61.1",
|
|
86
86
|
"@types/node": "^22.10.0",
|