jamdesk 1.1.216 → 1.1.217
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/package.json +1 -1
- package/vendored/app/api/og/route.tsx +60 -55
- package/vendored/lib/docs-types.ts +17 -0
- package/vendored/lib/og-card.ts +119 -0
- package/vendored/lib/seo.ts +197 -60
- package/vendored/schema/docs-schema.json +40 -0
- package/vendored/themes/index.ts +5 -0
- package/vendored/themes/types.ts +7 -0
- package/vendored/workspace-package-lock.json +61 -61
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamdesk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.217",
|
|
4
4
|
"description": "CLI for Jamdesk — build, preview, and deploy documentation sites from MDX. Dev server with hot reload, 50+ components, OpenAPI support, AI search, and Mintlify migration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jamdesk",
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { ImageResponse } from '@vercel/og';
|
|
2
2
|
import { NextRequest } from 'next/server';
|
|
3
3
|
import { sanitizeLogoUrl } from '@/lib/sanitize-url';
|
|
4
|
+
import { parseCardOptions } from '@/lib/og-card';
|
|
4
5
|
|
|
5
6
|
export const runtime = 'edge';
|
|
6
7
|
|
|
7
|
-
//
|
|
8
|
-
const ACCENT_COLOR = '#ff3621';
|
|
9
|
-
const ACCENT_GRADIENT = `linear-gradient(90deg, ${ACCENT_COLOR} 0%, #e02e1a 50%, #c4200f 100%)`;
|
|
10
|
-
const BG_GRADIENT = 'linear-gradient(135deg, #faf8f5 0%, #f3f0eb 100%)';
|
|
11
|
-
const TEXT_COLOR = '#1b3139';
|
|
12
|
-
const MUTED_COLOR = '#5a6b73';
|
|
13
|
-
const BADGE_BG = `rgba(255, 54, 33, 0.08)`; // ACCENT_COLOR at 8% opacity
|
|
8
|
+
// Colors live in lib/og-card.ts; with no theme/accent params it reproduces the original warm cream/red-orange card.
|
|
14
9
|
const MAX_DESCRIPTION_LENGTH = 120;
|
|
15
10
|
const LONG_TITLE_THRESHOLD = 40;
|
|
16
11
|
const FONT_STACK =
|
|
@@ -54,7 +49,10 @@ async function fetchDataUri(url: string): Promise<string> {
|
|
|
54
49
|
* - siteName: Site name (optional, defaults to "Documentation")
|
|
55
50
|
* - logo: URL to the project's logo (optional)
|
|
56
51
|
* - bg: URL to a custom background image rendered behind the text (optional)
|
|
57
|
-
* - theme:
|
|
52
|
+
* - theme: 'light' (default, warm cream) or 'dark'
|
|
53
|
+
* - accent: hex color (3 or 6 digits, '#' optional) for the badge and bottom bar; low-contrast values fall back to a readable color
|
|
54
|
+
* - hideBar: '1' hides the bottom accent bar
|
|
55
|
+
* - hideName: '1' hides the site name (the logo, if any, still renders)
|
|
58
56
|
*
|
|
59
57
|
* Example:
|
|
60
58
|
* /api/og?title=Introduction§ion=Get%20Started&siteName=Acme%20Docs&logo=https://...
|
|
@@ -66,6 +64,7 @@ export async function GET(request: NextRequest) {
|
|
|
66
64
|
const description = searchParams.get('description') || '';
|
|
67
65
|
const section = searchParams.get('section') || '';
|
|
68
66
|
const siteName = searchParams.get('siteName') || 'Documentation';
|
|
67
|
+
const card = parseCardOptions(searchParams);
|
|
69
68
|
// SSRF guard: HTTPS-only, blocks private/loopback/metadata IPs (incl. encoded forms).
|
|
70
69
|
const logoUrl = sanitizeLogoUrl(searchParams.get('logo') || '');
|
|
71
70
|
const bgUrl = sanitizeLogoUrl(searchParams.get('bg') || '');
|
|
@@ -85,7 +84,7 @@ export async function GET(request: NextRequest) {
|
|
|
85
84
|
height: '100%',
|
|
86
85
|
width: '100%',
|
|
87
86
|
display: 'flex',
|
|
88
|
-
background:
|
|
87
|
+
background: card.palette.background,
|
|
89
88
|
fontFamily: FONT_STACK,
|
|
90
89
|
}}
|
|
91
90
|
>
|
|
@@ -116,42 +115,46 @@ export async function GET(request: NextRequest) {
|
|
|
116
115
|
padding: '60px',
|
|
117
116
|
}}
|
|
118
117
|
>
|
|
119
|
-
{/* Logo and site name */}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
display: 'flex',
|
|
123
|
-
flexDirection: 'column',
|
|
124
|
-
alignItems: 'flex-start',
|
|
125
|
-
marginBottom: '40px',
|
|
126
|
-
}}
|
|
127
|
-
>
|
|
128
|
-
{logo && (
|
|
129
|
-
<img
|
|
130
|
-
src={logo}
|
|
131
|
-
alt=""
|
|
132
|
-
width={360}
|
|
133
|
-
height={48}
|
|
134
|
-
style={{
|
|
135
|
-
height: '48px',
|
|
136
|
-
maxWidth: '360px',
|
|
137
|
-
objectFit: 'contain',
|
|
138
|
-
marginBottom: '16px',
|
|
139
|
-
borderRadius: '8px',
|
|
140
|
-
}}
|
|
141
|
-
/>
|
|
142
|
-
)}
|
|
143
|
-
<span
|
|
118
|
+
{/* Logo and site name. Skipped when both are hidden so its 40px margin doesn't push the title down. */}
|
|
119
|
+
{(logo || card.showSiteName) && (
|
|
120
|
+
<div
|
|
144
121
|
style={{
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
letterSpacing: '0.05em',
|
|
122
|
+
display: 'flex',
|
|
123
|
+
flexDirection: 'column',
|
|
124
|
+
alignItems: 'flex-start',
|
|
125
|
+
marginBottom: '40px',
|
|
150
126
|
}}
|
|
151
127
|
>
|
|
152
|
-
{
|
|
153
|
-
|
|
154
|
-
|
|
128
|
+
{logo && (
|
|
129
|
+
<img
|
|
130
|
+
src={logo}
|
|
131
|
+
alt=""
|
|
132
|
+
width={360}
|
|
133
|
+
height={48}
|
|
134
|
+
style={{
|
|
135
|
+
height: '48px',
|
|
136
|
+
maxWidth: '360px',
|
|
137
|
+
objectFit: 'contain',
|
|
138
|
+
marginBottom: card.showSiteName ? '16px' : 0,
|
|
139
|
+
borderRadius: '8px',
|
|
140
|
+
}}
|
|
141
|
+
/>
|
|
142
|
+
)}
|
|
143
|
+
{card.showSiteName && (
|
|
144
|
+
<span
|
|
145
|
+
style={{
|
|
146
|
+
fontSize: '24px',
|
|
147
|
+
fontWeight: 600,
|
|
148
|
+
color: card.palette.muted,
|
|
149
|
+
textTransform: 'uppercase',
|
|
150
|
+
letterSpacing: '0.05em',
|
|
151
|
+
}}
|
|
152
|
+
>
|
|
153
|
+
{siteName}
|
|
154
|
+
</span>
|
|
155
|
+
)}
|
|
156
|
+
</div>
|
|
157
|
+
)}
|
|
155
158
|
|
|
156
159
|
{/* Section badge */}
|
|
157
160
|
{section && (
|
|
@@ -165,9 +168,9 @@ export async function GET(request: NextRequest) {
|
|
|
165
168
|
style={{
|
|
166
169
|
fontSize: '18px',
|
|
167
170
|
fontWeight: 500,
|
|
168
|
-
color:
|
|
171
|
+
color: card.palette.badgeText,
|
|
169
172
|
padding: '8px 16px',
|
|
170
|
-
background:
|
|
173
|
+
background: card.palette.badgeBg,
|
|
171
174
|
borderRadius: '20px',
|
|
172
175
|
}}
|
|
173
176
|
>
|
|
@@ -189,7 +192,7 @@ export async function GET(request: NextRequest) {
|
|
|
189
192
|
style={{
|
|
190
193
|
fontSize: titleFontSize,
|
|
191
194
|
fontWeight: 700,
|
|
192
|
-
color:
|
|
195
|
+
color: card.palette.title,
|
|
193
196
|
lineHeight: 1.2,
|
|
194
197
|
margin: 0,
|
|
195
198
|
maxWidth: '900px',
|
|
@@ -202,7 +205,7 @@ export async function GET(request: NextRequest) {
|
|
|
202
205
|
<p
|
|
203
206
|
style={{
|
|
204
207
|
fontSize: '28px',
|
|
205
|
-
color:
|
|
208
|
+
color: card.palette.muted,
|
|
206
209
|
marginTop: '24px',
|
|
207
210
|
lineHeight: 1.4,
|
|
208
211
|
maxWidth: '800px',
|
|
@@ -214,15 +217,17 @@ export async function GET(request: NextRequest) {
|
|
|
214
217
|
</div>
|
|
215
218
|
|
|
216
219
|
{/* Bottom accent bar */}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
220
|
+
{card.showAccentBar && (
|
|
221
|
+
<div
|
|
222
|
+
style={{
|
|
223
|
+
display: 'flex',
|
|
224
|
+
height: '6px',
|
|
225
|
+
background: card.palette.bar,
|
|
226
|
+
borderRadius: '3px',
|
|
227
|
+
marginTop: '40px',
|
|
228
|
+
}}
|
|
229
|
+
/>
|
|
230
|
+
)}
|
|
226
231
|
</div>
|
|
227
232
|
</div>
|
|
228
233
|
),
|
|
@@ -723,6 +723,22 @@ export interface ChatConfig {
|
|
|
723
723
|
starterQuestions?: string[];
|
|
724
724
|
}
|
|
725
725
|
|
|
726
|
+
/**
|
|
727
|
+
* Options for the generated social sharing card (og:image).
|
|
728
|
+
*/
|
|
729
|
+
export interface SocialCardConfig {
|
|
730
|
+
/** Card text/background style (default: 'light') */
|
|
731
|
+
theme?: 'light' | 'dark';
|
|
732
|
+
/** Use colors.primary for the accent bar and section badge (default: false) */
|
|
733
|
+
brandColor?: boolean;
|
|
734
|
+
/** Show the colored bar along the bottom (default: true) */
|
|
735
|
+
accentBar?: boolean;
|
|
736
|
+
/** Show the site name under the logo (default: true) */
|
|
737
|
+
siteName?: boolean;
|
|
738
|
+
/** 'background' draws the title over a custom og:image; 'replace' uses it as-is (default: 'background') */
|
|
739
|
+
customImage?: 'background' | 'replace';
|
|
740
|
+
}
|
|
741
|
+
|
|
726
742
|
/**
|
|
727
743
|
* SEO configuration
|
|
728
744
|
*/
|
|
@@ -732,6 +748,7 @@ export interface SeoConfig {
|
|
|
732
748
|
/** Include hidden pages in sitemap (default: false) */
|
|
733
749
|
indexHiddenPages?: boolean;
|
|
734
750
|
ai?: { llmsTxt?: boolean }; // default true; false suppresses llms.txt + llms-full.txt
|
|
751
|
+
socialCard?: SocialCardConfig;
|
|
735
752
|
}
|
|
736
753
|
|
|
737
754
|
/**
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers for the social card (app/api/og). No imports: the route runs on
|
|
3
|
+
* the edge runtime and this must stay dependency-free.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export type CardTheme = 'light' | 'dark';
|
|
7
|
+
|
|
8
|
+
export const DEFAULT_ACCENT = '#ff3621';
|
|
9
|
+
|
|
10
|
+
/** Today's bar, kept verbatim so a card with no new params renders exactly as before. */
|
|
11
|
+
export const LEGACY_ACCENT_GRADIENT = 'linear-gradient(90deg, #ff3621 0%, #e02e1a 50%, #c4200f 100%)';
|
|
12
|
+
|
|
13
|
+
export interface CardPalette {
|
|
14
|
+
background: string; // CSS background (gradient) used when there is no bg image
|
|
15
|
+
surface: string; // solid hex the gradient starts from; used for contrast checks
|
|
16
|
+
title: string;
|
|
17
|
+
muted: string;
|
|
18
|
+
accent: string; // resolved accent hex
|
|
19
|
+
bar: string; // CSS background for the bar
|
|
20
|
+
badgeText: string;
|
|
21
|
+
badgeBg: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface CardOptions {
|
|
25
|
+
theme: CardTheme;
|
|
26
|
+
palette: CardPalette;
|
|
27
|
+
showAccentBar: boolean;
|
|
28
|
+
showSiteName: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const THEMES = {
|
|
32
|
+
light: {
|
|
33
|
+
surface: '#faf8f5',
|
|
34
|
+
background: 'linear-gradient(135deg, #faf8f5 0%, #f3f0eb 100%)',
|
|
35
|
+
title: '#1b3139',
|
|
36
|
+
muted: '#5a6b73',
|
|
37
|
+
badgeAlpha: 0.08,
|
|
38
|
+
},
|
|
39
|
+
dark: {
|
|
40
|
+
surface: '#12161a',
|
|
41
|
+
background: 'linear-gradient(135deg, #12161a 0%, #1c2228 100%)',
|
|
42
|
+
title: '#f5f3ef',
|
|
43
|
+
muted: '#a3b1b8',
|
|
44
|
+
badgeAlpha: 0.16,
|
|
45
|
+
},
|
|
46
|
+
} as const;
|
|
47
|
+
|
|
48
|
+
// Accent text under 3:1 is hard to read at badge size; a bar under 1.5:1 all but vanishes.
|
|
49
|
+
const MIN_TEXT_CONTRAST = 3;
|
|
50
|
+
const MIN_BAR_CONTRAST = 1.5;
|
|
51
|
+
|
|
52
|
+
/** Accepts 3- or 6-digit hex with or without '#'. Anything else is null, so the value is safe to inline in CSS. */
|
|
53
|
+
export function normalizeHex(input: string | null | undefined): string | null {
|
|
54
|
+
if (!input) return null;
|
|
55
|
+
const m = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(input);
|
|
56
|
+
if (!m) return null;
|
|
57
|
+
const h = m[1].toLowerCase();
|
|
58
|
+
const full = h.length === 3 ? h.split('').map((c) => c + c).join('') : h;
|
|
59
|
+
return `#${full}`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function channels(hex: string): [number, number, number] {
|
|
63
|
+
const n = parseInt(hex.slice(1), 16);
|
|
64
|
+
return [(n >> 16) & 255, (n >> 8) & 255, n & 255];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function hexToRgba(hex: string, alpha: number): string {
|
|
68
|
+
const [r, g, b] = channels(hex);
|
|
69
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function luminance(hex: string): number {
|
|
73
|
+
const [r, g, b] = channels(hex).map((v) => {
|
|
74
|
+
const c = v / 255;
|
|
75
|
+
return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
|
|
76
|
+
});
|
|
77
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function contrastRatio(a: string, b: string): number {
|
|
81
|
+
const la = luminance(a);
|
|
82
|
+
const lb = luminance(b);
|
|
83
|
+
return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function resolveCardPalette(theme: CardTheme, accent: string | null): CardPalette {
|
|
87
|
+
const t = THEMES[theme];
|
|
88
|
+
const base = { background: t.background, surface: t.surface, title: t.title, muted: t.muted };
|
|
89
|
+
|
|
90
|
+
// No accent means every pre-existing card URL: reproduce today's colors with no contrast logic.
|
|
91
|
+
if (accent === null) {
|
|
92
|
+
return {
|
|
93
|
+
...base,
|
|
94
|
+
accent: DEFAULT_ACCENT,
|
|
95
|
+
bar: LEGACY_ACCENT_GRADIENT,
|
|
96
|
+
badgeText: DEFAULT_ACCENT,
|
|
97
|
+
badgeBg: hexToRgba(DEFAULT_ACCENT, t.badgeAlpha),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const contrast = contrastRatio(accent, t.surface);
|
|
102
|
+
return {
|
|
103
|
+
...base,
|
|
104
|
+
accent,
|
|
105
|
+
bar: contrast >= MIN_BAR_CONTRAST ? accent : t.muted,
|
|
106
|
+
badgeText: contrast >= MIN_TEXT_CONTRAST ? accent : t.title,
|
|
107
|
+
badgeBg: hexToRgba(accent, t.badgeAlpha),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function parseCardOptions(params: URLSearchParams): CardOptions {
|
|
112
|
+
const theme: CardTheme = params.get('theme') === 'dark' ? 'dark' : 'light';
|
|
113
|
+
return {
|
|
114
|
+
theme,
|
|
115
|
+
palette: resolveCardPalette(theme, normalizeHex(params.get('accent'))),
|
|
116
|
+
showAccentBar: params.get('hideBar') !== '1',
|
|
117
|
+
showSiteName: params.get('hideName') !== '1',
|
|
118
|
+
};
|
|
119
|
+
}
|
package/vendored/lib/seo.ts
CHANGED
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
import type { Metadata } from 'next';
|
|
12
12
|
import { stripMarkdownForMeta } from './openapi/operation-description';
|
|
13
|
-
import type { DocsConfig, Logo, LogoConfig, Favicon, LanguageConfig, LanguageCode } from './docs-types';
|
|
14
|
-
import { normalizeLogo } from './docs-types';
|
|
13
|
+
import type { DocsConfig, Logo, LogoConfig, Favicon, LanguageConfig, LanguageCode, SocialCardConfig, ColorsConfig } from './docs-types';
|
|
14
|
+
import { normalizeLogo, transformConfigImagePath } from './docs-types';
|
|
15
|
+
import { normalizeHex } from './og-card';
|
|
16
|
+
import { getTheme } from '../themes';
|
|
15
17
|
import { findHreflangAliasCollisions, transformLanguagePath, toHreflang, resolveLocaleFromPath } from './language-utils';
|
|
16
18
|
import { fallbackSeo } from './locale-fallback';
|
|
17
19
|
import { logger } from '../shared/logger';
|
|
@@ -59,11 +61,39 @@ export const FALLBACK_METADATA: Metadata = {
|
|
|
59
61
|
description: 'Documentation',
|
|
60
62
|
};
|
|
61
63
|
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Resolve a Logo or Favicon config to a path string. Light prefers the light
|
|
66
|
+
* variant, dark prefers the dark one; each falls back to the other so a
|
|
67
|
+
* single-variant config still yields an image.
|
|
68
|
+
*/
|
|
69
|
+
function resolveImagePath(image?: Logo | Favicon, variant: 'light' | 'dark' = 'light'): string {
|
|
64
70
|
if (!image) return '';
|
|
65
71
|
if (typeof image === 'string') return image;
|
|
66
|
-
|
|
72
|
+
const { light, dark } = image as LogoConfig;
|
|
73
|
+
return (variant === 'dark' ? dark || light : light || dark) || '';
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Make a config-supplied image reference fetchable by the OG route, which loads
|
|
78
|
+
* it server-side. Local paths go through the /_jd asset prefix (where the
|
|
79
|
+
* pipeline serves them); an existing /_jd path is not doubled. Returns '' for
|
|
80
|
+
* data: URIs: the route drops them and base64 would bloat the og:image URL.
|
|
81
|
+
*/
|
|
82
|
+
export function toAbsoluteAssetUrl(pathOrUrl: string, rootUrl: string): string {
|
|
83
|
+
if (pathOrUrl.startsWith('data:')) return '';
|
|
84
|
+
if (pathOrUrl.startsWith('http://') || pathOrUrl.startsWith('https://')) return pathOrUrl;
|
|
85
|
+
// transformConfigImagePath passes '//host' through untouched, which would
|
|
86
|
+
// then be glued onto rootUrl as a path.
|
|
87
|
+
if (pathOrUrl.startsWith('//')) return `https:${pathOrUrl}`;
|
|
88
|
+
return `${rootUrl}${transformConfigImagePath(pathOrUrl) ?? ''}`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* True for a WebP or AVIF image path/URL. Satori in the OG route cannot decode
|
|
93
|
+
* either and answers with an empty PNG instead of an error.
|
|
94
|
+
*/
|
|
95
|
+
function isUndecodableImage(pathOrUrl: string): boolean {
|
|
96
|
+
return /\.(?:webp|avif)$/i.test(pathOrUrl.split(/[?#]/)[0]);
|
|
67
97
|
}
|
|
68
98
|
|
|
69
99
|
/**
|
|
@@ -102,6 +132,9 @@ function buildOgImageUrl(
|
|
|
102
132
|
logo?: Logo;
|
|
103
133
|
favicon?: Favicon;
|
|
104
134
|
bg?: string;
|
|
135
|
+
card?: SocialCardConfig;
|
|
136
|
+
colors?: ColorsConfig;
|
|
137
|
+
theme?: string;
|
|
105
138
|
}
|
|
106
139
|
): string {
|
|
107
140
|
const params = new URLSearchParams();
|
|
@@ -122,32 +155,73 @@ function buildOgImageUrl(
|
|
|
122
155
|
const { prefix: resolvedPrefix, rootUrl } = resolveRootUrl(baseUrl, docsPrefix);
|
|
123
156
|
const isHostAtDocs = resolvedPrefix !== '';
|
|
124
157
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
//
|
|
130
|
-
|
|
131
|
-
|
|
158
|
+
const card = options?.card;
|
|
159
|
+
if (!card) {
|
|
160
|
+
// Tenants without seo.socialCard keep today's URLs byte for byte, including
|
|
161
|
+
// the non-prefixed asset paths: cached cards and shared links must not change.
|
|
162
|
+
// Handle logo - prefer light variant for OG images (cream background)
|
|
163
|
+
// Satori (@vercel/og) can't render webp, so fall back to favicon if logo is webp
|
|
164
|
+
if (options?.logo || options?.favicon) {
|
|
165
|
+
let logoPath = resolveImagePath(options?.logo);
|
|
166
|
+
// Fall back to favicon when logo is webp (Satori can't decode webp)
|
|
167
|
+
if ((!logoPath || logoPath.endsWith('.webp')) && options?.favicon) {
|
|
168
|
+
logoPath = resolveImagePath(options.favicon);
|
|
169
|
+
}
|
|
170
|
+
// Make logo URL absolute (use root URL since assets are at domain root)
|
|
171
|
+
if (logoPath && !logoPath.startsWith('http')) {
|
|
172
|
+
logoPath = `${rootUrl}${logoPath.startsWith('/') ? '' : '/'}${logoPath}`;
|
|
173
|
+
}
|
|
174
|
+
if (logoPath) {
|
|
175
|
+
params.set('logo', logoPath);
|
|
176
|
+
}
|
|
132
177
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
178
|
+
|
|
179
|
+
// Custom background image: composite the card text over it instead of using it
|
|
180
|
+
// as a bare static image. The OG route fetches it server-side, so it must be
|
|
181
|
+
// absolute — assets live at the domain root, so resolve against rootUrl.
|
|
182
|
+
if (options?.bg) {
|
|
183
|
+
let bgPath = options.bg;
|
|
184
|
+
if (!bgPath.startsWith('http')) {
|
|
185
|
+
bgPath = `${rootUrl}${bgPath.startsWith('/') ? '' : '/'}${bgPath}`;
|
|
186
|
+
}
|
|
187
|
+
params.set('bg', bgPath);
|
|
136
188
|
}
|
|
137
|
-
|
|
138
|
-
|
|
189
|
+
} else {
|
|
190
|
+
const variant = card.theme === 'dark' ? 'dark' : 'light';
|
|
191
|
+
|
|
192
|
+
// Resolved before any param is set so the param order stays as it was.
|
|
193
|
+
let logoUrl = '';
|
|
194
|
+
let logoIsFavicon = false;
|
|
195
|
+
if (options?.logo || options?.favicon) {
|
|
196
|
+
let logoPath = resolveImagePath(options?.logo, variant);
|
|
197
|
+
if ((!logoPath || isUndecodableImage(logoPath)) && options?.favicon) {
|
|
198
|
+
logoPath = resolveImagePath(options.favicon, variant);
|
|
199
|
+
logoIsFavicon = true;
|
|
200
|
+
}
|
|
201
|
+
// A webp/avif logo makes the route return a 0-byte PNG that the CDN then
|
|
202
|
+
// caches, so a card with no logo is the better outcome.
|
|
203
|
+
if (logoPath && !isUndecodableImage(logoPath)) logoUrl = toAbsoluteAssetUrl(logoPath, rootUrl);
|
|
139
204
|
}
|
|
140
|
-
}
|
|
141
205
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
206
|
+
if (variant === 'dark') params.set('theme', 'dark');
|
|
207
|
+
if (card.accentBar === false) params.set('hideBar', '1');
|
|
208
|
+
// Hiding the name is only safe when the tenant's own logo is drawn: with the
|
|
209
|
+
// favicon (or nothing) in its place the card would carry no brand at all.
|
|
210
|
+
if (card.siteName === false && logoUrl && !logoIsFavicon) params.set('hideName', '1');
|
|
211
|
+
|
|
212
|
+
if (card.brandColor === true) {
|
|
213
|
+
const colors = options?.colors;
|
|
214
|
+
const configured = variant === 'dark' ? colors?.light ?? colors?.primary : colors?.primary;
|
|
215
|
+
const accent = normalizeHex(configured ?? getTheme(options?.theme).defaultAccent);
|
|
216
|
+
if (accent) params.set('accent', accent.slice(1));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (logoUrl) params.set('logo', logoUrl);
|
|
220
|
+
|
|
221
|
+
if (options?.bg && !isUndecodableImage(options.bg)) {
|
|
222
|
+
const bgUrl = toAbsoluteAssetUrl(options.bg, rootUrl);
|
|
223
|
+
if (bgUrl) params.set('bg', bgUrl);
|
|
149
224
|
}
|
|
150
|
-
params.set('bg', bgPath);
|
|
151
225
|
}
|
|
152
226
|
|
|
153
227
|
// hostAtDocs: use /_jd/og (proxied to ISR app's /api/og) for same-domain OG images
|
|
@@ -157,37 +231,79 @@ function buildOgImageUrl(
|
|
|
157
231
|
}
|
|
158
232
|
|
|
159
233
|
/**
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
234
|
+
* Resolve the social image a page advertises, plus whether it is the generated
|
|
235
|
+
* card. Mirrors the global+page metatag merge that buildSeoMetadata performs, so
|
|
236
|
+
* callers outside the metadata path (the JSON-LD layer) get the exact image the
|
|
237
|
+
* og:image points at.
|
|
238
|
+
*
|
|
239
|
+
* Default: always the generated /api/og card, with a custom og:image composited
|
|
240
|
+
* in as its background. With `seo.socialCard.customImage: 'replace'` and an
|
|
241
|
+
* og:image set, that image is served untouched instead (`generated: false`).
|
|
242
|
+
*
|
|
243
|
+
* Declared dimensions come from the SAME layer that supplied the winning
|
|
244
|
+
* og:image: a page image must not inherit the site default's width/height, which
|
|
245
|
+
* describe a different file.
|
|
163
246
|
*
|
|
164
247
|
* @param docsPrefix - This tenant's external docs URL prefix ('' | '/docs' |
|
|
165
248
|
* a custom subpath like '/help'). Falls back to the legacy baseUrl-suffix
|
|
166
249
|
* sniff when omitted — see buildOgImageUrl.
|
|
167
250
|
*/
|
|
168
|
-
export function
|
|
251
|
+
export function resolvePageSocialImage(
|
|
169
252
|
config: DocsConfig,
|
|
170
253
|
frontmatter: PageFrontmatter,
|
|
171
254
|
baseUrl: string,
|
|
172
255
|
docsPrefix?: string,
|
|
173
|
-
): string {
|
|
256
|
+
): { url: string; generated: boolean; width?: number; height?: number } {
|
|
174
257
|
const globalMeta = config.seo?.metatags || {};
|
|
175
258
|
const pageMeta = normalizePageMetatags(frontmatter as Record<string, unknown>);
|
|
176
259
|
const metatags: Record<string, string> = { ...globalMeta, ...pageMeta };
|
|
177
260
|
const customImage = metatags['og:image']?.trim();
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
261
|
+
|
|
262
|
+
if (config.seo?.socialCard?.customImage === 'replace' && customImage) {
|
|
263
|
+
const { rootUrl } = resolveRootUrl(baseUrl, docsPrefix);
|
|
264
|
+
const url = toAbsoluteAssetUrl(customImage, rootUrl);
|
|
265
|
+
// A data: URI resolves to '' (it would bloat the tag and crawlers drop it),
|
|
266
|
+
// so fall through to the generated card rather than emit an empty og:image.
|
|
267
|
+
if (url) {
|
|
268
|
+
const dims = pageMeta['og:image']?.trim() ? pageMeta : globalMeta;
|
|
269
|
+
return {
|
|
270
|
+
url,
|
|
271
|
+
generated: false,
|
|
272
|
+
width: positiveIntMeta(dims, 'og:image:width'),
|
|
273
|
+
height: positiveIntMeta(dims, 'og:image:height'),
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
return {
|
|
279
|
+
generated: true,
|
|
280
|
+
url: buildOgImageUrl(
|
|
281
|
+
baseUrl,
|
|
282
|
+
metatags['og:title'] || frontmatter.title || 'Documentation',
|
|
283
|
+
config.name,
|
|
284
|
+
docsPrefix,
|
|
285
|
+
{
|
|
286
|
+
description: metaDescriptionText(metatags['og:description'] || frontmatter.description),
|
|
287
|
+
section: frontmatter.section,
|
|
288
|
+
logo: config.logo,
|
|
289
|
+
favicon: config.favicon,
|
|
290
|
+
bg: customImage || undefined,
|
|
291
|
+
card: config.seo?.socialCard,
|
|
292
|
+
colors: config.colors,
|
|
293
|
+
theme: config.theme,
|
|
294
|
+
},
|
|
295
|
+
),
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** The social image URL only; see resolvePageSocialImage. */
|
|
300
|
+
export function buildPageOgImageUrl(
|
|
301
|
+
config: DocsConfig,
|
|
302
|
+
frontmatter: PageFrontmatter,
|
|
303
|
+
baseUrl: string,
|
|
304
|
+
docsPrefix?: string,
|
|
305
|
+
): string {
|
|
306
|
+
return resolvePageSocialImage(config, frontmatter, baseUrl, docsPrefix).url;
|
|
191
307
|
}
|
|
192
308
|
|
|
193
309
|
/**
|
|
@@ -297,9 +413,21 @@ function numericMeta(metatags: Record<string, string>, key: string): number | un
|
|
|
297
413
|
return Number.isNaN(n) ? undefined : n;
|
|
298
414
|
}
|
|
299
415
|
|
|
416
|
+
// numericMeta lets 0, negatives, fractions and whitespace-only strings
|
|
417
|
+
// (Number(' ') === 0) through; a crawler can't use any of those as a pixel size.
|
|
418
|
+
function positiveIntMeta(metatags: Record<string, string>, key: string): number | undefined {
|
|
419
|
+
const n = numericMeta(metatags, key);
|
|
420
|
+
return n !== undefined && Number.isInteger(n) && n > 0 ? n : undefined;
|
|
421
|
+
}
|
|
422
|
+
|
|
300
423
|
type FallbackOg = {
|
|
301
424
|
title?: string; description?: string; url: string; siteName: string; ogImageUrl: string;
|
|
302
425
|
locale?: string;
|
|
426
|
+
/** False when ogImageUrl is the author's own image (customImage: 'replace'). */
|
|
427
|
+
ogImageGenerated?: boolean;
|
|
428
|
+
/** Declared size of an author-supplied image; ignored for the generated card. */
|
|
429
|
+
ogImageWidth?: number;
|
|
430
|
+
ogImageHeight?: number;
|
|
303
431
|
};
|
|
304
432
|
|
|
305
433
|
/**
|
|
@@ -344,16 +472,21 @@ export function buildOpenGraphMetadata(
|
|
|
344
472
|
const ttl = numericMeta(metatags, 'og:ttl');
|
|
345
473
|
if (ttl !== undefined) og.ttl = ttl;
|
|
346
474
|
|
|
347
|
-
// Image:
|
|
348
|
-
//
|
|
349
|
-
//
|
|
350
|
-
// user
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
475
|
+
// Image: the generated card (1200x630 PNG) unless the caller resolved the
|
|
476
|
+
// author's own image (customImage: 'replace'). In the default mode a custom
|
|
477
|
+
// og:image is composited as the card BACKGROUND upstream (via /api/og's `bg`
|
|
478
|
+
// param), so the emitted image is never the raw user file. For a raw image we
|
|
479
|
+
// can't know the format or size, so emit only the dimensions the author
|
|
480
|
+
// declared and no `type`. og:image:alt describes either.
|
|
481
|
+
const image: Record<string, unknown> = { url: fb.ogImageUrl };
|
|
482
|
+
if (fb.ogImageGenerated === false) {
|
|
483
|
+
if (fb.ogImageWidth !== undefined) image.width = fb.ogImageWidth;
|
|
484
|
+
if (fb.ogImageHeight !== undefined) image.height = fb.ogImageHeight;
|
|
485
|
+
} else {
|
|
486
|
+
image.width = 1200;
|
|
487
|
+
image.height = 630;
|
|
488
|
+
image.type = 'image/png';
|
|
489
|
+
}
|
|
357
490
|
if (metatags['og:image:alt']) image.alt = metatags['og:image:alt'];
|
|
358
491
|
og.images = [image];
|
|
359
492
|
|
|
@@ -827,17 +960,21 @@ export function buildSeoMetadata(
|
|
|
827
960
|
(k) => k.startsWith('og:') || k.startsWith('article:') || k.startsWith('book:') || k.startsWith('profile:'),
|
|
828
961
|
);
|
|
829
962
|
if (hasOgFamily || frontmatter.title) {
|
|
830
|
-
//
|
|
831
|
-
//
|
|
832
|
-
//
|
|
833
|
-
//
|
|
834
|
-
|
|
963
|
+
// By default a custom og:image becomes the card BACKGROUND (text renders on
|
|
964
|
+
// top) and the emitted image is the generated card. With
|
|
965
|
+
// seo.socialCard.customImage: 'replace' the author's image is emitted as-is.
|
|
966
|
+
// The generated card's text follows og:title/og:description overrides so the
|
|
967
|
+
// image matches the link-card text built in buildOpenGraphMetadata.
|
|
968
|
+
const socialImage = resolvePageSocialImage(config, frontmatter, baseUrl, docsPrefix);
|
|
835
969
|
metadata.openGraph = buildOpenGraphMetadata(metatags, {
|
|
836
970
|
title: frontmatter.title,
|
|
837
971
|
description: metaDescriptionText(frontmatter.description),
|
|
838
972
|
url: pageUrl,
|
|
839
973
|
siteName: config.name,
|
|
840
|
-
ogImageUrl,
|
|
974
|
+
ogImageUrl: socialImage.url,
|
|
975
|
+
ogImageGenerated: socialImage.generated,
|
|
976
|
+
ogImageWidth: socialImage.width,
|
|
977
|
+
ogImageHeight: socialImage.height,
|
|
841
978
|
// og:locale describes the language of the CONTENT, so on the fallback it
|
|
842
979
|
// must follow the English body, not the locale URL. (og:url deliberately
|
|
843
980
|
// still points at the locale URL — that is the page's real address, and
|
|
@@ -609,6 +609,46 @@
|
|
|
609
609
|
"description": "Generate llms.txt and llms-full.txt for AI crawlers. Default true. Set false to stop publishing AI-context files (independent of search noindex)."
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
+
},
|
|
613
|
+
"socialCard": {
|
|
614
|
+
"type": "object",
|
|
615
|
+
"additionalProperties": false,
|
|
616
|
+
"properties": {
|
|
617
|
+
"theme": {
|
|
618
|
+
"type": "string",
|
|
619
|
+
"enum": [
|
|
620
|
+
"light",
|
|
621
|
+
"dark"
|
|
622
|
+
],
|
|
623
|
+
"default": "light",
|
|
624
|
+
"description": "Text and background style of the card. `dark` uses light text on a dark background and your `logo.dark` image. Defaults to `light`."
|
|
625
|
+
},
|
|
626
|
+
"brandColor": {
|
|
627
|
+
"type": "boolean",
|
|
628
|
+
"default": false,
|
|
629
|
+
"description": "Use your `colors.primary` for the card's accent bar and section badge (`colors.light` on a dark card). Defaults to `false`, which keeps the default red."
|
|
630
|
+
},
|
|
631
|
+
"accentBar": {
|
|
632
|
+
"type": "boolean",
|
|
633
|
+
"default": true,
|
|
634
|
+
"description": "Show the colored bar along the bottom of the card. Defaults to `true`."
|
|
635
|
+
},
|
|
636
|
+
"siteName": {
|
|
637
|
+
"type": "boolean",
|
|
638
|
+
"default": true,
|
|
639
|
+
"description": "Show the site name under the logo. Set `false` when your logo already contains the name. Defaults to `true`."
|
|
640
|
+
},
|
|
641
|
+
"customImage": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"enum": [
|
|
644
|
+
"background",
|
|
645
|
+
"replace"
|
|
646
|
+
],
|
|
647
|
+
"default": "background",
|
|
648
|
+
"description": "How a custom `og:image` is used. `background` draws the page title on top of it. `replace` uses the image as-is, with no text. Defaults to `background`."
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
"description": "Customize the generated social sharing card (og:image) for every page."
|
|
612
652
|
}
|
|
613
653
|
},
|
|
614
654
|
"additionalProperties": false,
|
package/vendored/themes/index.ts
CHANGED
|
@@ -31,6 +31,7 @@ const jamTheme: ThemeConfig = {
|
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
cssPath: 'jam/variables.css',
|
|
34
|
+
defaultAccent: '#3b82f6',
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
const nebulaTheme: ThemeConfig = {
|
|
@@ -52,6 +53,7 @@ const nebulaTheme: ThemeConfig = {
|
|
|
52
53
|
},
|
|
53
54
|
},
|
|
54
55
|
cssPath: 'nebula/variables.css',
|
|
56
|
+
defaultAccent: '#f97316',
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
const pulsarTheme: ThemeConfig = {
|
|
@@ -73,6 +75,7 @@ const pulsarTheme: ThemeConfig = {
|
|
|
73
75
|
},
|
|
74
76
|
},
|
|
75
77
|
cssPath: 'pulsar/variables.css',
|
|
78
|
+
defaultAccent: '#3b82f6',
|
|
76
79
|
};
|
|
77
80
|
|
|
78
81
|
const haloTheme: ThemeConfig = {
|
|
@@ -98,6 +101,7 @@ const haloTheme: ThemeConfig = {
|
|
|
98
101
|
},
|
|
99
102
|
},
|
|
100
103
|
cssPath: 'halo/variables.css',
|
|
104
|
+
defaultAccent: '#C0873F',
|
|
101
105
|
};
|
|
102
106
|
|
|
103
107
|
const duskTheme: ThemeConfig = {
|
|
@@ -125,6 +129,7 @@ const duskTheme: ThemeConfig = {
|
|
|
125
129
|
},
|
|
126
130
|
},
|
|
127
131
|
cssPath: 'dusk/variables.css',
|
|
132
|
+
defaultAccent: '#2158A1',
|
|
128
133
|
};
|
|
129
134
|
|
|
130
135
|
// Theme registry
|
package/vendored/themes/types.ts
CHANGED
|
@@ -78,6 +78,13 @@ export interface ThemeConfig {
|
|
|
78
78
|
|
|
79
79
|
/** CSS file path relative to themes directory */
|
|
80
80
|
cssPath: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The theme's light-mode `--color-accent`. The OG social card uses it as the
|
|
84
|
+
* accent when a tenant opts into brandColor but sets no colors.primary.
|
|
85
|
+
* Pinned to variables.css by __tests__/theme-default-accent.test.ts.
|
|
86
|
+
*/
|
|
87
|
+
defaultAccent: string;
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
/**
|
|
@@ -380,42 +380,40 @@
|
|
|
380
380
|
"license": "MIT"
|
|
381
381
|
},
|
|
382
382
|
"node_modules/@chevrotain/cst-dts-gen": {
|
|
383
|
-
"version": "
|
|
384
|
-
"resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-
|
|
385
|
-
"integrity": "sha512-
|
|
383
|
+
"version": "13.2.0",
|
|
384
|
+
"resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-13.2.0.tgz",
|
|
385
|
+
"integrity": "sha512-bA9dvWlhAUcHkNwU+8w9yiUxJPlj/Lm3VqS7MD+NbIR/7LmpNLuK/AWNFdCo/T3SK5ND0/UHf3IJvl/Jn/i6yg==",
|
|
386
386
|
"license": "Apache-2.0",
|
|
387
387
|
"dependencies": {
|
|
388
|
-
"@chevrotain/gast": "
|
|
389
|
-
"@chevrotain/types": "
|
|
390
|
-
"lodash-es": "4.17.23"
|
|
388
|
+
"@chevrotain/gast": "13.2.0",
|
|
389
|
+
"@chevrotain/types": "13.2.0"
|
|
391
390
|
}
|
|
392
391
|
},
|
|
393
392
|
"node_modules/@chevrotain/gast": {
|
|
394
|
-
"version": "
|
|
395
|
-
"resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-
|
|
396
|
-
"integrity": "sha512-
|
|
393
|
+
"version": "13.2.0",
|
|
394
|
+
"resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-13.2.0.tgz",
|
|
395
|
+
"integrity": "sha512-bCARdAsG+eEbOveSXcOAC7pVxA04I1ionzeMOwIYf5NX7SaS7zgn4Dgug2BSqoL+iyKeMNSorQjsFSHJHsCNwg==",
|
|
397
396
|
"license": "Apache-2.0",
|
|
398
397
|
"dependencies": {
|
|
399
|
-
"@chevrotain/types": "
|
|
400
|
-
"lodash-es": "4.17.23"
|
|
398
|
+
"@chevrotain/types": "13.2.0"
|
|
401
399
|
}
|
|
402
400
|
},
|
|
403
401
|
"node_modules/@chevrotain/regexp-to-ast": {
|
|
404
|
-
"version": "
|
|
405
|
-
"resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-
|
|
406
|
-
"integrity": "sha512-
|
|
402
|
+
"version": "13.2.0",
|
|
403
|
+
"resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-13.2.0.tgz",
|
|
404
|
+
"integrity": "sha512-kxpUkLtiaK09ph+dib+Yvm+3sWSnuwlo25gqfKRgTPNmF6H7uW4gVkMjaRdtnN783S9sM6vUNWh9CsxYX4QwKw==",
|
|
407
405
|
"license": "Apache-2.0"
|
|
408
406
|
},
|
|
409
407
|
"node_modules/@chevrotain/types": {
|
|
410
|
-
"version": "
|
|
411
|
-
"resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-
|
|
412
|
-
"integrity": "sha512-
|
|
408
|
+
"version": "13.2.0",
|
|
409
|
+
"resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-13.2.0.tgz",
|
|
410
|
+
"integrity": "sha512-7qrYHRlKfWf2AvBfJi5eVOrKAkbxvMFsy/iIHTGIiApNcEecCaVIdR+mIQhyCBsTDJxBz4JWXHMo6krbhR9hVg==",
|
|
413
411
|
"license": "Apache-2.0"
|
|
414
412
|
},
|
|
415
413
|
"node_modules/@chevrotain/utils": {
|
|
416
|
-
"version": "
|
|
417
|
-
"resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-
|
|
418
|
-
"integrity": "sha512-
|
|
414
|
+
"version": "13.2.0",
|
|
415
|
+
"resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-13.2.0.tgz",
|
|
416
|
+
"integrity": "sha512-SzKYY68rseOrb9KILVzPsl6SjkQtdWw01SRGB5aCVI5kFcHltQsOYV3JB0Ffst72DgkvHCyDQ0NLwxtmCCf97Q==",
|
|
419
417
|
"license": "Apache-2.0"
|
|
420
418
|
},
|
|
421
419
|
"node_modules/@emnapi/runtime": {
|
|
@@ -1126,12 +1124,12 @@
|
|
|
1126
1124
|
}
|
|
1127
1125
|
},
|
|
1128
1126
|
"node_modules/@mermaid-js/parser": {
|
|
1129
|
-
"version": "2.0.
|
|
1130
|
-
"resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-2.0.
|
|
1131
|
-
"integrity": "sha512-
|
|
1127
|
+
"version": "2.0.1",
|
|
1128
|
+
"resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-2.0.1.tgz",
|
|
1129
|
+
"integrity": "sha512-j37dj/h6p6pots1L7pLPPNuABEEu9WP4OYg9pW1g+nYG331j0+3canE9OagtYdytYvdSAMG+2fKU5cxep6LgjA==",
|
|
1132
1130
|
"license": "MIT",
|
|
1133
1131
|
"dependencies": {
|
|
1134
|
-
"@chevrotain/types": "~
|
|
1132
|
+
"@chevrotain/types": "~13.2.0"
|
|
1135
1133
|
},
|
|
1136
1134
|
"engines": {
|
|
1137
1135
|
"node": ">=22.12.0"
|
|
@@ -2155,9 +2153,9 @@
|
|
|
2155
2153
|
}
|
|
2156
2154
|
},
|
|
2157
2155
|
"node_modules/@types/node": {
|
|
2158
|
-
"version": "26.6.
|
|
2159
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.
|
|
2160
|
-
"integrity": "sha512-
|
|
2156
|
+
"version": "26.6.4",
|
|
2157
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.4.tgz",
|
|
2158
|
+
"integrity": "sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg==",
|
|
2161
2159
|
"license": "MIT",
|
|
2162
2160
|
"dependencies": {
|
|
2163
2161
|
"undici-types": "~8.9.0"
|
|
@@ -2234,9 +2232,9 @@
|
|
|
2234
2232
|
}
|
|
2235
2233
|
},
|
|
2236
2234
|
"node_modules/@vercel/cli-config": {
|
|
2237
|
-
"version": "0.3.
|
|
2238
|
-
"resolved": "https://registry.npmjs.org/@vercel/cli-config/-/cli-config-0.3.
|
|
2239
|
-
"integrity": "sha512-
|
|
2235
|
+
"version": "0.3.1",
|
|
2236
|
+
"resolved": "https://registry.npmjs.org/@vercel/cli-config/-/cli-config-0.3.1.tgz",
|
|
2237
|
+
"integrity": "sha512-sISbygqlFXYb8qfPu/+2Cf/A8IjrlAuZePdag3EDQr2PRA455s7UZtl9Ro674CWsB/saBRmz3jEkw0YsQs8OoQ==",
|
|
2240
2238
|
"license": "Apache-2.0",
|
|
2241
2239
|
"dependencies": {
|
|
2242
2240
|
"xdg-app-paths": "5",
|
|
@@ -2256,12 +2254,12 @@
|
|
|
2256
2254
|
}
|
|
2257
2255
|
},
|
|
2258
2256
|
"node_modules/@vercel/functions": {
|
|
2259
|
-
"version": "3.9.
|
|
2260
|
-
"resolved": "https://registry.npmjs.org/@vercel/functions/-/functions-3.9.
|
|
2261
|
-
"integrity": "sha512-
|
|
2257
|
+
"version": "3.9.10",
|
|
2258
|
+
"resolved": "https://registry.npmjs.org/@vercel/functions/-/functions-3.9.10.tgz",
|
|
2259
|
+
"integrity": "sha512-s/Hbm2e/9YDGqAgjsAuhdnSc07psq0AVuELkImVfzoT52CbHLT3DTVoN6N4wtVeel9Tv1G4xB7S2cEkPH4j0og==",
|
|
2262
2260
|
"license": "Apache-2.0",
|
|
2263
2261
|
"dependencies": {
|
|
2264
|
-
"@vercel/oidc": "3.8.
|
|
2262
|
+
"@vercel/oidc": "3.8.10"
|
|
2265
2263
|
},
|
|
2266
2264
|
"engines": {
|
|
2267
2265
|
"node": ">= 20"
|
|
@@ -2280,12 +2278,12 @@
|
|
|
2280
2278
|
}
|
|
2281
2279
|
},
|
|
2282
2280
|
"node_modules/@vercel/oidc": {
|
|
2283
|
-
"version": "3.8.
|
|
2284
|
-
"resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.8.
|
|
2285
|
-
"integrity": "sha512-
|
|
2281
|
+
"version": "3.8.10",
|
|
2282
|
+
"resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.8.10.tgz",
|
|
2283
|
+
"integrity": "sha512-sPw1kIfQEA6/2dB+zlAJHnhhNBRJ8t/t4HfFvKO+g0EPBA7NbCKyGovuhgAV6Mnl865ka7HqCEguIy596czdAw==",
|
|
2286
2284
|
"license": "Apache-2.0",
|
|
2287
2285
|
"dependencies": {
|
|
2288
|
-
"@vercel/cli-config": "0.3.
|
|
2286
|
+
"@vercel/cli-config": "0.3.1",
|
|
2289
2287
|
"@vercel/cli-exec": "1.0.1",
|
|
2290
2288
|
"jose": "^5.9.6"
|
|
2291
2289
|
},
|
|
@@ -2451,9 +2449,9 @@
|
|
|
2451
2449
|
}
|
|
2452
2450
|
},
|
|
2453
2451
|
"node_modules/baseline-browser-mapping": {
|
|
2454
|
-
"version": "2.11.
|
|
2455
|
-
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.
|
|
2456
|
-
"integrity": "sha512-
|
|
2452
|
+
"version": "2.11.27",
|
|
2453
|
+
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.27.tgz",
|
|
2454
|
+
"integrity": "sha512-ElY12DaROGuan+lMmZ8Cvo/ZUbXPe7Enc/9VU/b1T3Kp4dwytRcNdR8DoSJN5SNJT/CuvcCA0DHDVmMOCePdRQ==",
|
|
2457
2455
|
"license": "Apache-2.0",
|
|
2458
2456
|
"bin": {
|
|
2459
2457
|
"baseline-browser-mapping": "dist/cli.cjs"
|
|
@@ -2584,17 +2582,19 @@
|
|
|
2584
2582
|
}
|
|
2585
2583
|
},
|
|
2586
2584
|
"node_modules/chevrotain": {
|
|
2587
|
-
"version": "
|
|
2588
|
-
"resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-
|
|
2589
|
-
"integrity": "sha512-
|
|
2585
|
+
"version": "13.2.0",
|
|
2586
|
+
"resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-13.2.0.tgz",
|
|
2587
|
+
"integrity": "sha512-GTouk5YzgBxlTPCaDn5q0q2EJKkrYmnPF+HmF8v0Qo4r3iyPG7HJivkN1wthCXZcm3sIcZFpGTRovLPNdJNRCA==",
|
|
2590
2588
|
"license": "Apache-2.0",
|
|
2591
2589
|
"dependencies": {
|
|
2592
|
-
"@chevrotain/cst-dts-gen": "
|
|
2593
|
-
"@chevrotain/gast": "
|
|
2594
|
-
"@chevrotain/regexp-to-ast": "
|
|
2595
|
-
"@chevrotain/types": "
|
|
2596
|
-
"@chevrotain/utils": "
|
|
2597
|
-
|
|
2590
|
+
"@chevrotain/cst-dts-gen": "13.2.0",
|
|
2591
|
+
"@chevrotain/gast": "13.2.0",
|
|
2592
|
+
"@chevrotain/regexp-to-ast": "13.2.0",
|
|
2593
|
+
"@chevrotain/types": "13.2.0",
|
|
2594
|
+
"@chevrotain/utils": "13.2.0"
|
|
2595
|
+
},
|
|
2596
|
+
"engines": {
|
|
2597
|
+
"node": ">=22.0.0"
|
|
2598
2598
|
}
|
|
2599
2599
|
},
|
|
2600
2600
|
"node_modules/client-only": {
|
|
@@ -3279,9 +3279,9 @@
|
|
|
3279
3279
|
"license": "MIT"
|
|
3280
3280
|
},
|
|
3281
3281
|
"node_modules/electron-to-chromium": {
|
|
3282
|
-
"version": "1.5.
|
|
3283
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
3284
|
-
"integrity": "sha512-
|
|
3282
|
+
"version": "1.5.444",
|
|
3283
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.444.tgz",
|
|
3284
|
+
"integrity": "sha512-5ss/uJfoDYDHT0lfJzT6FbcskIzROIOPf0BbbFkGcvDzoJU7i//9GDrwwIHQVmIsrAGiF3ihpADBRIsrEFt1rQ==",
|
|
3285
3285
|
"license": "ISC"
|
|
3286
3286
|
},
|
|
3287
3287
|
"node_modules/elkjs": {
|
|
@@ -4509,9 +4509,9 @@
|
|
|
4509
4509
|
}
|
|
4510
4510
|
},
|
|
4511
4511
|
"node_modules/lodash-es": {
|
|
4512
|
-
"version": "4.
|
|
4513
|
-
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.
|
|
4514
|
-
"integrity": "sha512-
|
|
4512
|
+
"version": "4.18.1",
|
|
4513
|
+
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",
|
|
4514
|
+
"integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
|
|
4515
4515
|
"license": "MIT"
|
|
4516
4516
|
},
|
|
4517
4517
|
"node_modules/longest-streak": {
|
|
@@ -4915,17 +4915,17 @@
|
|
|
4915
4915
|
"license": "MIT"
|
|
4916
4916
|
},
|
|
4917
4917
|
"node_modules/mermaid": {
|
|
4918
|
-
"version": "12.
|
|
4919
|
-
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-12.
|
|
4920
|
-
"integrity": "sha512
|
|
4918
|
+
"version": "12.1.0",
|
|
4919
|
+
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-12.1.0.tgz",
|
|
4920
|
+
"integrity": "sha512-wlVCp+8eTupfCeeFvoZNNiTuHrvag0P2jz/ILgb/f/6jkVokUefOcujefi8qUe/j2asHiSePncVsz/xzzA80LQ==",
|
|
4921
4921
|
"license": "MIT",
|
|
4922
4922
|
"dependencies": {
|
|
4923
4923
|
"@braintree/sanitize-url": "^7.1.2",
|
|
4924
4924
|
"@iconify/utils": "^3.0.2",
|
|
4925
|
-
"@mermaid-js/parser": "^2.0.
|
|
4925
|
+
"@mermaid-js/parser": "^2.0.1",
|
|
4926
4926
|
"@types/d3": "^7.4.3",
|
|
4927
4927
|
"@upsetjs/venn.js": "^2.0.0",
|
|
4928
|
-
"chevrotain": "~
|
|
4928
|
+
"chevrotain": "~13.2.0",
|
|
4929
4929
|
"cytoscape": "^3.34.0",
|
|
4930
4930
|
"cytoscape-cose-bilkent": "^4.1.0",
|
|
4931
4931
|
"cytoscape-fcose": "^2.2.0",
|