@dogsbay/ssg 0.2.0-beta.149 → 0.2.0-beta.151

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.
@@ -89,6 +89,11 @@ export interface PageModel {
89
89
  math?: boolean;
90
90
  /** The page's front matter, for templates (`page.meta.*`). */
91
91
  meta?: Record<string, unknown>;
92
+ /** The site logo's files as the build wrote them, from the site root (`_dogsbay/site/logo-light.svg`); none without `site.logo` or when it was left out. */
93
+ logo?: {
94
+ light: string;
95
+ dark?: string;
96
+ };
92
97
  /** Search-engine and social metadata; see seo.ts. */
93
98
  seo?: Omit<SeoInput, "title" | "siteName" | "description" | "headings" | "tags" | "lastUpdated">;
94
99
  t: (k: string) => string;
@@ -100,4 +105,11 @@ export interface PageModel {
100
105
  * template can only read plain data.
101
106
  */
102
107
  export declare function plainData(v: unknown): unknown;
108
+ /**
109
+ * What a reader's close is stored under (`db-announcement-closed:<key>`): the id after the site's
110
+ * URL path and base path, as the Astro pipeline writes it (`/docs#launch-2026`), so sites on one
111
+ * host keep their own. Without either, the site's name: sites published under paths of the Worker,
112
+ * or opened from disk, share an origin too.
113
+ */
114
+ export declare function announcementKey(cfg: SiteConfig): string;
103
115
  export declare function composePage(p: PageModel, cfg: SiteConfig, templates: ThemeTemplates): Promise<string>;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The site's chrome as DocsLayout draws it: the `chrome` object format-astro writes into
3
+ * site.json (its `chromeData`), links already carrying the site's prefix, texts already HTML
4
+ * (@dogsbay/site-files inline Markdown), icons already SVG. dogsbay-ssg draws the same keys with
5
+ * its own markup and these classes. See plans/site-chrome.md.
6
+ */
7
+ export interface SiteChromeLink {
8
+ label: string;
9
+ href: string;
10
+ }
11
+ export interface SiteChromeMenu {
12
+ label: string;
13
+ items: SiteChromeLink[];
14
+ }
15
+ export interface SiteChromeSocial {
16
+ label: string;
17
+ href: string;
18
+ svg: string;
19
+ }
20
+ export interface SiteChromeData {
21
+ colorMode?: "light" | "dark" | "system";
22
+ logo?: {
23
+ light: string;
24
+ dark?: string;
25
+ alt: string;
26
+ replacesName: boolean;
27
+ };
28
+ /** `key` (format-astro): the stored id, with the site's prefix; older site.json files have only `id`. */
29
+ announcement?: {
30
+ id: string;
31
+ key?: string;
32
+ html: string;
33
+ tone: string;
34
+ closeable: boolean;
35
+ };
36
+ header?: {
37
+ links: Array<SiteChromeLink | SiteChromeMenu>;
38
+ social: SiteChromeSocial[];
39
+ };
40
+ footer?: {
41
+ columns: Array<{
42
+ title: string;
43
+ links: SiteChromeLink[];
44
+ }>;
45
+ social: SiteChromeSocial[];
46
+ };
47
+ }
48
+ export declare const isMenu: (l: SiteChromeLink | SiteChromeMenu) => l is SiteChromeMenu;
49
+ /** An http(s) address on another site: opened as the version menu's are, in the same tab, marked external for link icons. */
50
+ export declare const isExternal: (href: string) => boolean;
51
+ /** The announcement's colours by tone: the callout tokens, so the theme and dark mode apply. */
52
+ export declare const ANNOUNCEMENT_TONE_CLASS: Record<string, string>;
@@ -1,15 +1,19 @@
1
1
  import type { NavNode } from "../core/nav.js";
2
- /** Icons the region partials place (pager chevrons, the "Powered by" mark). */
2
+ /** Icons the region partials place (pager chevrons, the "Powered by" mark, the header menus' chevron, the announcement's close). */
3
3
  export declare const ICONS: {
4
+ chevronDown: string;
5
+ close: string;
4
6
  chevronLeft: string;
5
7
  chevronRight: string;
6
8
  layers: string;
7
9
  };
8
10
  export declare const BOOK_ICON: string;
11
+ /** `links`: the header's links as a list, shown here below lg (DocsLayout's SidebarGroup with HeaderLinks layout="list"). */
9
12
  export declare function sidebar(opts: {
10
13
  header: string;
11
14
  nav: string;
12
15
  label: string;
16
+ links?: string;
13
17
  }): string;
14
18
  export declare function sidebarTrigger(label: string): string;
15
19
  export interface NavOptions {
@@ -52,7 +56,6 @@ export declare function compactNav(nodes: NavNode[], href: (slug: string) => str
52
56
  export declare function navSize(nodes: NavNode[]): number;
53
57
  export declare function searchButton(label: string): string;
54
58
  export declare function themeToggle(label: string): string;
55
- export declare function repoLink(url: string, label: string): string;
56
59
  export interface SwitchOption {
57
60
  label: string;
58
61
  href: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/ssg",
3
- "version": "0.2.0-beta.149",
3
+ "version": "0.2.0-beta.151",
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.149",
53
- "@dogsbay/format-dogsbay-md": "0.2.0-beta.149",
54
- "@dogsbay/format-openapi": "0.2.0-beta.149",
55
- "@dogsbay/format-topicmap": "0.2.0-beta.149",
56
- "@dogsbay/highlight": "0.2.0-beta.149",
57
- "@dogsbay/minja": "0.2.0-beta.149",
58
- "@dogsbay/primitives": "0.2.0-beta.149",
59
- "@dogsbay/render-html": "0.2.0-beta.149",
60
- "@dogsbay/search": "0.2.0-beta.149",
61
- "@dogsbay/serialize-core": "0.2.0-beta.149",
62
- "@dogsbay/site-check": "0.2.0-beta.149",
63
- "@dogsbay/site-files": "0.2.0-beta.149",
64
- "@dogsbay/types": "0.2.0-beta.149"
52
+ "@dogsbay/elements": "0.2.0-beta.151",
53
+ "@dogsbay/format-dogsbay-md": "0.2.0-beta.151",
54
+ "@dogsbay/format-openapi": "0.2.0-beta.151",
55
+ "@dogsbay/format-topicmap": "0.2.0-beta.151",
56
+ "@dogsbay/highlight": "0.2.0-beta.151",
57
+ "@dogsbay/minja": "0.2.0-beta.151",
58
+ "@dogsbay/primitives": "0.2.0-beta.151",
59
+ "@dogsbay/render-html": "0.2.0-beta.151",
60
+ "@dogsbay/search": "0.2.0-beta.151",
61
+ "@dogsbay/serialize-core": "0.2.0-beta.151",
62
+ "@dogsbay/site-check": "0.2.0-beta.151",
63
+ "@dogsbay/site-files": "0.2.0-beta.151",
64
+ "@dogsbay/types": "0.2.0-beta.151"
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.149",
70
- "@dogsbay/format-dogsbay-md": "0.2.0-beta.149",
71
- "@dogsbay/format-openapi": "0.2.0-beta.149",
72
- "@dogsbay/format-topicmap": "0.2.0-beta.149",
73
- "@dogsbay/highlight": "0.2.0-beta.149",
74
- "@dogsbay/icons": "0.2.0-beta.149",
75
- "@dogsbay/minja": "0.2.0-beta.149",
76
- "@dogsbay/primitives": "0.2.0-beta.149",
77
- "@dogsbay/render-html": "0.2.0-beta.149",
78
- "@dogsbay/search": "0.2.0-beta.149",
79
- "@dogsbay/serialize-core": "0.2.0-beta.149",
80
- "@dogsbay/site-check": "0.2.0-beta.149",
81
- "@dogsbay/site-files": "0.2.0-beta.149",
82
- "@dogsbay/types": "0.2.0-beta.149",
83
- "@dogsbay/ui": "0.2.0-beta.149",
69
+ "@dogsbay/elements": "0.2.0-beta.151",
70
+ "@dogsbay/format-dogsbay-md": "0.2.0-beta.151",
71
+ "@dogsbay/format-openapi": "0.2.0-beta.151",
72
+ "@dogsbay/format-topicmap": "0.2.0-beta.151",
73
+ "@dogsbay/highlight": "0.2.0-beta.151",
74
+ "@dogsbay/icons": "0.2.0-beta.151",
75
+ "@dogsbay/minja": "0.2.0-beta.151",
76
+ "@dogsbay/primitives": "0.2.0-beta.151",
77
+ "@dogsbay/render-html": "0.2.0-beta.151",
78
+ "@dogsbay/search": "0.2.0-beta.151",
79
+ "@dogsbay/serialize-core": "0.2.0-beta.151",
80
+ "@dogsbay/site-check": "0.2.0-beta.151",
81
+ "@dogsbay/site-files": "0.2.0-beta.151",
82
+ "@dogsbay/types": "0.2.0-beta.151",
83
+ "@dogsbay/ui": "0.2.0-beta.151",
84
84
  "@mermanjs/web": "0.7.0",
85
85
  "@playwright/test": "1.61.1",
86
86
  "@types/node": "^22.10.0",