@dogsbay/ssg 0.2.0-beta.142 → 0.2.0-beta.144
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.
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
Third-party software in @dogsbay/ssg (dist/package/)
|
|
2
2
|
|
|
3
3
|
========================================================================
|
|
4
|
-
@dogsbay/elements@0.2.0-beta.
|
|
4
|
+
@dogsbay/elements@0.2.0-beta.144 (MIT)
|
|
5
5
|
https://github.com/dogsbay/dogsbay.git
|
|
6
6
|
|
|
7
7
|
Licensed under MIT; the package ships no licence file.
|
|
8
8
|
|
|
9
9
|
========================================================================
|
|
10
|
-
@dogsbay/primitives@0.2.0-beta.
|
|
10
|
+
@dogsbay/primitives@0.2.0-beta.144 (MIT)
|
|
11
11
|
https://github.com/dogsbay/dogsbay.git
|
|
12
12
|
|
|
13
13
|
Licensed under MIT; the package ships no licence file.
|
|
14
14
|
|
|
15
15
|
========================================================================
|
|
16
|
-
@dogsbay/render-html@0.2.0-beta.
|
|
16
|
+
@dogsbay/render-html@0.2.0-beta.144 (MIT)
|
|
17
17
|
https://github.com/dogsbay/dogsbay.git
|
|
18
18
|
|
|
19
19
|
Licensed under MIT; the package ships no licence file.
|
|
20
20
|
|
|
21
21
|
========================================================================
|
|
22
|
-
@dogsbay/search@0.2.0-beta.
|
|
22
|
+
@dogsbay/search@0.2.0-beta.144 (MIT)
|
|
23
23
|
https://github.com/dogsbay/dogsbay.git
|
|
24
24
|
|
|
25
25
|
Licensed under MIT; the package ships no licence file.
|
|
26
26
|
|
|
27
27
|
========================================================================
|
|
28
|
-
@dogsbay/ui@0.2.0-beta.
|
|
28
|
+
@dogsbay/ui@0.2.0-beta.144 (MIT)
|
|
29
29
|
https://github.com/dogsbay/dogsbay.git
|
|
30
30
|
|
|
31
31
|
Licensed under MIT; the package ships no licence file.
|
package/dist/package/browser.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
|
|
19
19
|
// src/core/build.ts
|
|
20
20
|
import { dogsbayMdToTree, splitFrontmatter as splitFrontmatter2, treeToDogsbayMd } from "@dogsbay/format-dogsbay-md/browser";
|
|
21
|
-
import { buildHreflangLinks, isMountRoot, missingTranslations, mountRefs, mountRootNote, namespaceNavGroup, placeMountedNav, prefixSlug as prefixSlug2, rewriteContentRefs } from "@dogsbay/site-files";
|
|
21
|
+
import { buildHreflangLinks, isMountRoot, missingTranslations, mountRefs, mountRootNote, namespaceNavGroup, namespacePrefixes, placeMountedNav, prefixSlug as prefixSlug2, rewriteContentRefs } from "@dogsbay/site-files";
|
|
22
22
|
|
|
23
23
|
// src/core/canonical.ts
|
|
24
24
|
import { decideCanonical } from "@dogsbay/site-files";
|
|
@@ -1312,31 +1312,31 @@ var CLIENT_CANDIDATES = ['""', '"&"', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '
|
|
|
1312
1312
|
var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
|
|
1313
1313
|
|
|
1314
1314
|
========================================================================
|
|
1315
|
-
@dogsbay/elements@0.2.0-beta.
|
|
1315
|
+
@dogsbay/elements@0.2.0-beta.144 (MIT)
|
|
1316
1316
|
https://github.com/dogsbay/dogsbay.git
|
|
1317
1317
|
|
|
1318
1318
|
Licensed under MIT; the package ships no licence file.
|
|
1319
1319
|
|
|
1320
1320
|
========================================================================
|
|
1321
|
-
@dogsbay/primitives@0.2.0-beta.
|
|
1321
|
+
@dogsbay/primitives@0.2.0-beta.144 (MIT)
|
|
1322
1322
|
https://github.com/dogsbay/dogsbay.git
|
|
1323
1323
|
|
|
1324
1324
|
Licensed under MIT; the package ships no licence file.
|
|
1325
1325
|
|
|
1326
1326
|
========================================================================
|
|
1327
|
-
@dogsbay/render-html@0.2.0-beta.
|
|
1327
|
+
@dogsbay/render-html@0.2.0-beta.144 (MIT)
|
|
1328
1328
|
https://github.com/dogsbay/dogsbay.git
|
|
1329
1329
|
|
|
1330
1330
|
Licensed under MIT; the package ships no licence file.
|
|
1331
1331
|
|
|
1332
1332
|
========================================================================
|
|
1333
|
-
@dogsbay/search@0.2.0-beta.
|
|
1333
|
+
@dogsbay/search@0.2.0-beta.144 (MIT)
|
|
1334
1334
|
https://github.com/dogsbay/dogsbay.git
|
|
1335
1335
|
|
|
1336
1336
|
Licensed under MIT; the package ships no licence file.
|
|
1337
1337
|
|
|
1338
1338
|
========================================================================
|
|
1339
|
-
@dogsbay/ui@0.2.0-beta.
|
|
1339
|
+
@dogsbay/ui@0.2.0-beta.144 (MIT)
|
|
1340
1340
|
https://github.com/dogsbay/dogsbay.git
|
|
1341
1341
|
|
|
1342
1342
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -3079,7 +3079,8 @@ function linedDiagnostics(found, raw, body, parsed, after = "of the page after t
|
|
|
3079
3079
|
const LINE = /\bline (\d+)/g;
|
|
3080
3080
|
const shifted = (m) => m.replace(LINE, (_, n) => `line ${Number(n) + offset}`);
|
|
3081
3081
|
const named = (d) => d.name === void 0 ? {} : { name: detach(d.name) };
|
|
3082
|
-
const
|
|
3082
|
+
const columns = (d) => ({ ...d.column === void 0 ? {} : { column: d.column }, ...d.endColumn === void 0 ? {} : { endColumn: d.endColumn } });
|
|
3083
|
+
const lined = (d) => ({ code: d.code, message: detach(shifted(d.message)), line: d.line + offset, ...named(d), ...columns(d) });
|
|
3083
3084
|
if (parsed === body) return found.map(lined);
|
|
3084
3085
|
let asWritten;
|
|
3085
3086
|
try {
|
|
@@ -3094,6 +3095,36 @@ function linedDiagnostics(found, raw, body, parsed, after = "of the page after t
|
|
|
3094
3095
|
return { code: d.code, message: detach(d.message.replace(LINE, `line $1 ${after}`)), ...named(d) };
|
|
3095
3096
|
});
|
|
3096
3097
|
}
|
|
3098
|
+
function sourceLinesOf(tree, raw, body, parsed) {
|
|
3099
|
+
const offset = raw.slice(0, raw.length - body.length).split("\n").length - 1;
|
|
3100
|
+
let map = (line) => line + offset;
|
|
3101
|
+
if (parsed !== body) {
|
|
3102
|
+
const a = body.split("\n");
|
|
3103
|
+
const b = parsed.split("\n");
|
|
3104
|
+
if (a.length !== b.length || /\{[%#]/.test(body)) {
|
|
3105
|
+
let head = 0;
|
|
3106
|
+
while (head < a.length && head < b.length && a[head] === b[head]) head++;
|
|
3107
|
+
let tail = 0;
|
|
3108
|
+
while (tail < a.length - head && tail < b.length - head && a[a.length - 1 - tail] === b[b.length - 1 - tail]) tail++;
|
|
3109
|
+
map = (line) => line <= head ? line + offset : line > b.length - tail ? line - (b.length - a.length) + offset : void 0;
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3112
|
+
const walk = (node) => {
|
|
3113
|
+
if (Array.isArray(node)) {
|
|
3114
|
+
for (const n of node) walk(n);
|
|
3115
|
+
return;
|
|
3116
|
+
}
|
|
3117
|
+
if (!node || typeof node !== "object") return;
|
|
3118
|
+
const meta = node.meta;
|
|
3119
|
+
if (meta && typeof meta.line === "number") {
|
|
3120
|
+
const to = map(meta.line);
|
|
3121
|
+
if (to === void 0) delete meta.line;
|
|
3122
|
+
else meta.line = to;
|
|
3123
|
+
}
|
|
3124
|
+
for (const v of Object.values(node)) if (v && typeof v === "object" && v !== meta) walk(v);
|
|
3125
|
+
};
|
|
3126
|
+
walk(tree);
|
|
3127
|
+
}
|
|
3097
3128
|
var decoder = new TextDecoder();
|
|
3098
3129
|
var DATA_DIRECTIVE_NODES = new Set(DATA_DIRECTIVES);
|
|
3099
3130
|
var DEFAULT_DATA_CACHE_BYTES = 32 * 1024 * 1024;
|
|
@@ -3167,7 +3198,7 @@ function frontMatterCopy(fm) {
|
|
|
3167
3198
|
}
|
|
3168
3199
|
}
|
|
3169
3200
|
function rebuildUnitLazy(ctx, unit) {
|
|
3170
|
-
return buildUnit(unit, ctx.allUnits, ctx.cfg, ctx.input, ctx.highlighter, ctx.emit, ctx.report, ctx.phase, ctx.theme.templates, ctx.state, { lazy: true, diagnostics: ctx.diagnostics });
|
|
3201
|
+
return buildUnit(unit, ctx.allUnits, ctx.cfg, ctx.input, ctx.highlighter, ctx.emit, ctx.report, ctx.phase, ctx.theme.templates, ctx.state, { lazy: true, diagnostics: ctx.diagnostics, dataLines: ctx.dataLines });
|
|
3171
3202
|
}
|
|
3172
3203
|
async function build(input, hooks = {}) {
|
|
3173
3204
|
const t0 = now();
|
|
@@ -3228,10 +3259,10 @@ async function build(input, hooks = {}) {
|
|
|
3228
3259
|
if (siteBase(cfg)) state.languages = await languageTables(cfg, allUnits, units, input.files, readText, frontMatterOf);
|
|
3229
3260
|
const translations = await translationTables(cfg, allUnits, input.files, readText, input.includeDrafts === true, frontMatterOf);
|
|
3230
3261
|
frontMatterOf = void 0;
|
|
3231
|
-
hooks.context?.({ cfg, allUnits, input, highlighter, emit, warnings, problems, report, phase, theme, state, diagnostics: hooks.diagnostics });
|
|
3262
|
+
hooks.context?.({ cfg, allUnits, input, highlighter, emit, warnings, problems, report, phase, theme, state, diagnostics: hooks.diagnostics, dataLines: hooks.dataLines });
|
|
3232
3263
|
for (const unit of units) {
|
|
3233
3264
|
classes = new Set(CLIENT_CANDIDATES);
|
|
3234
|
-
const r = await buildUnit(unit, allUnits, cfg, input, highlighter, emit, report, phase, theme.templates, state, { keep: hooks.keep, lazy: hooks.lazy, diagnostics: hooks.diagnostics });
|
|
3265
|
+
const r = await buildUnit(unit, allUnits, cfg, input, highlighter, emit, report, phase, theme.templates, state, { keep: hooks.keep, lazy: hooks.lazy, diagnostics: hooks.diagnostics, dataLines: hooks.dataLines });
|
|
3235
3266
|
hooks.unitBuilt?.(unit, r, classes);
|
|
3236
3267
|
pages += r.pages;
|
|
3237
3268
|
assets += r.assets;
|
|
@@ -3284,7 +3315,7 @@ async function build(input, hooks = {}) {
|
|
|
3284
3315
|
files: out,
|
|
3285
3316
|
warnings,
|
|
3286
3317
|
problems,
|
|
3287
|
-
notes: [...state.notes.values()].flat(),
|
|
3318
|
+
notes: [...state.notes.values()].flat().map((n) => n.message),
|
|
3288
3319
|
config: cfg,
|
|
3289
3320
|
stats: { pages, assets, units: units.length, ms: Math.round(now() - t0), msByPhase: roundAll(phase), highlightCache: highlighter.cacheStats(), ...state.parseCache ? { parseCache: state.parseCache.stats() } : {} }
|
|
3290
3321
|
};
|
|
@@ -3394,7 +3425,7 @@ async function buildUnit(unit, allUnits, cfg, input, highlighter, emit, report,
|
|
|
3394
3425
|
};
|
|
3395
3426
|
};
|
|
3396
3427
|
const namespaceOf = (p) => named.find((m) => p === m.namespace || p.startsWith(m.namespace + "/"))?.namespace ?? "";
|
|
3397
|
-
const globalPrefixes = new Set(cfg.taxonomies.map((t2) => t2.path.split("/")[0]).filter(Boolean));
|
|
3428
|
+
const globalPrefixes = /* @__PURE__ */ new Set([...cfg.taxonomies.map((t2) => t2.path.split("/")[0]).filter(Boolean), ...namespacePrefixes(cfg.sources.filter((s) => !s.mount))]);
|
|
3398
3429
|
const mounts = [cfg.basePath, ...cfg.linkPrefixes ?? []].filter(Boolean);
|
|
3399
3430
|
const prefix = unit.prefix ? unit.prefix + "/" : "";
|
|
3400
3431
|
const label = unit.prefix || "/";
|
|
@@ -3695,7 +3726,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
3695
3726
|
if (mount) {
|
|
3696
3727
|
const there = infos.get(slug);
|
|
3697
3728
|
if (there && isMountRoot(page.slug) && !there.virtual) {
|
|
3698
|
-
|
|
3729
|
+
const page2 = prefixSlug2(unit.prefix ? unit.prefix.split("/") : [], slug);
|
|
3730
|
+
notes.push({ message: mountRootNote(m.mount, page2), file: srcOf(there), page: page2 });
|
|
3699
3731
|
label2 = there.title;
|
|
3700
3732
|
continue;
|
|
3701
3733
|
}
|
|
@@ -3964,8 +3996,9 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
3964
3996
|
t2 = now();
|
|
3965
3997
|
let tree;
|
|
3966
3998
|
try {
|
|
3967
|
-
const parsed = dogsbayMdToTree(pre.text, mode.diagnostics ? { diagnostics: true } : void 0);
|
|
3999
|
+
const parsed = dogsbayMdToTree(pre.text, mode.diagnostics || mode.dataLines ? { ...mode.diagnostics ? { diagnostics: true } : {}, ...mode.dataLines ? { sourceLines: true } : {} } : void 0);
|
|
3968
4000
|
tree = parsed.tree;
|
|
4001
|
+
if (mode.dataLines) sourceLinesOf(tree, raw, bodySrc, pre.text);
|
|
3969
4002
|
if (mode.diagnostics) (diagnostics ??= []).push(...linedDiagnostics(parsed.diagnostics ?? [], raw, bodySrc, pre.text, templated === bodySrc ? "of the page with its data directives drawn" : void 0));
|
|
3970
4003
|
} catch (e) {
|
|
3971
4004
|
warn2("parse", `parse error: ${e.message}`);
|
|
@@ -4146,7 +4179,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4146
4179
|
imageZoom: cfg.imageZoom ? cfg.imageZoom.excludeInsideLinks ? "outside-links" : "all" : void 0,
|
|
4147
4180
|
imageCaptions: cfg.imageCaptions,
|
|
4148
4181
|
rawHtml: sanitizing ? (h) => sanitizeHtml(h, noteRemoved) : void 0,
|
|
4149
|
-
embeddedEndpoints: apiLayout.wide ? apiLayout.embeddedEndpoints : void 0
|
|
4182
|
+
embeddedEndpoints: apiLayout.wide ? apiLayout.embeddedEndpoints : void 0,
|
|
4183
|
+
dataLines: mode.dataLines
|
|
4150
4184
|
});
|
|
4151
4185
|
let hasH1 = tree[0]?.type === "heading" && Number(tree[0].props?.level) === 1;
|
|
4152
4186
|
const post = postNeighbours.has(info.slug) ? blog.get(info.slug) : void 0;
|
|
@@ -5014,7 +5048,7 @@ async function openDevSession(input, o = {}) {
|
|
|
5014
5048
|
} catch (e) {
|
|
5015
5049
|
throw inConfig(e, name);
|
|
5016
5050
|
}
|
|
5017
|
-
const nextConfig = { ...parsed, llmsTxt: o.llms === true && parsed.llmsTxt, search: o.search === false ? false : parsed.search };
|
|
5051
|
+
const nextConfig = { ...parsed, llmsTxt: o.llms === true && parsed.llmsTxt, search: o.search === false ? false : parsed.search, math: o.math === false ? false : parsed.math };
|
|
5018
5052
|
try {
|
|
5019
5053
|
await build(
|
|
5020
5054
|
// Drafts are shown while writing, as `dogsbay site dev` shows them.
|
|
@@ -5027,6 +5061,7 @@ async function openDevSession(input, o = {}) {
|
|
|
5027
5061
|
watchScan(c, nextScan);
|
|
5028
5062
|
},
|
|
5029
5063
|
diagnostics: (f, list) => nextDiagnosed.set(f, list),
|
|
5064
|
+
dataLines: o.dataLines,
|
|
5030
5065
|
// A copy: the build keeps adding the classes of pages it renders later to its own set.
|
|
5031
5066
|
unitBuilt: (unit, handle, classes) => nextUnits.set(unit.prefix, { unit, handle, classes: new Set(classes) })
|
|
5032
5067
|
}
|
|
@@ -5046,6 +5081,7 @@ async function openDevSession(input, o = {}) {
|
|
|
5046
5081
|
stale = /* @__PURE__ */ new Set();
|
|
5047
5082
|
if (o.lazy) for (const u of units.values()) for (const p of u.handle.pageOuts) stale.add(p);
|
|
5048
5083
|
};
|
|
5084
|
+
const noteItems = () => [...ctx?.state.notes.values() ?? []].flat().map((n) => ({ ...n }));
|
|
5049
5085
|
const unitOf = (path) => {
|
|
5050
5086
|
let best;
|
|
5051
5087
|
let bestLen = -1;
|
|
@@ -5147,8 +5183,9 @@ async function openDevSession(input, o = {}) {
|
|
|
5147
5183
|
return unitForSitePath(path)?.handle.sourceForPage(path);
|
|
5148
5184
|
},
|
|
5149
5185
|
notes() {
|
|
5150
|
-
return
|
|
5186
|
+
return noteItems().map((n) => n.message);
|
|
5151
5187
|
},
|
|
5188
|
+
noteItems,
|
|
5152
5189
|
takeWarnings() {
|
|
5153
5190
|
const all = ctx?.warnings ?? [];
|
|
5154
5191
|
const fresh = all.slice(taken);
|
|
@@ -201,11 +201,19 @@ export interface BuiltPage {
|
|
|
201
201
|
/** The parsed body, after templating. */
|
|
202
202
|
tree: TreeNode[];
|
|
203
203
|
}
|
|
204
|
+
/** A note (BuildResult.notes) as data: its text, and the page it is about when there is one. */
|
|
205
|
+
export interface BuildNote {
|
|
206
|
+
message: string;
|
|
207
|
+
/** The page's source file, a project path (the content page standing as a mounted API's root). */
|
|
208
|
+
file?: string;
|
|
209
|
+
/** The page's path in the site (`3.32/reference/rest-api`), as the message names it. */
|
|
210
|
+
page?: string;
|
|
211
|
+
}
|
|
204
212
|
/** What the site-level files need from every unit. Small: a few strings per page. */
|
|
205
213
|
export interface SiteState {
|
|
206
214
|
redirects: RedirectInput[];
|
|
207
215
|
/** What the build says about the content, not a problem, by unit prefix (replaced when a unit is built again). */
|
|
208
|
-
notes: Map<string,
|
|
216
|
+
notes: Map<string, BuildNote[]>;
|
|
209
217
|
/** The sidebar items kept between pages (src/theme/regions.ts). */
|
|
210
218
|
navCache: NavCache;
|
|
211
219
|
/** Site path ("en/latest/guide/x") → output file relative to the site root. */
|
|
@@ -309,6 +317,9 @@ export interface PageDiagnostic {
|
|
|
309
317
|
line?: number;
|
|
310
318
|
/** The directive's name, without colons, on `unknown-container` and `unknown-inline`. */
|
|
311
319
|
name?: string;
|
|
320
|
+
/** The part of `line` meant, when the parser knows it: 1-based UTF-16 code units, `endColumn` exclusive. Only with `line`. */
|
|
321
|
+
column?: number;
|
|
322
|
+
endColumn?: number;
|
|
312
323
|
}
|
|
313
324
|
/**
|
|
314
325
|
* The parser's diagnostics on `parsed` (the body after templating) with lines in the file: `line`,
|
|
@@ -318,6 +329,15 @@ export interface PageDiagnostic {
|
|
|
318
329
|
* it names are the templated page's. Messages are detached (a session keeps them; some quote a line).
|
|
319
330
|
*/
|
|
320
331
|
export declare function linedDiagnostics(found: ParseDiagnostic[], raw: string, body: string, parsed: string, after?: string): PageDiagnostic[];
|
|
332
|
+
/**
|
|
333
|
+
* A page's block lines (`meta.line`, from the parser's `sourceLines`) as lines of its file: `parsed`
|
|
334
|
+
* is the body after templating, `body` as written, `raw` the file. The front matter moves every line
|
|
335
|
+
* by its length. Templating that keeps the line count (variables, one-line includes) keeps each
|
|
336
|
+
* line where it was. One that changes it (an include, a condition) keeps the lines before and after
|
|
337
|
+
* the change, and a block in between loses its line: a wrong line would scroll the editor elsewhere.
|
|
338
|
+
* Changes the tree in place.
|
|
339
|
+
*/
|
|
340
|
+
export declare function sourceLinesOf(tree: unknown, raw: string, body: string, parsed: string): void;
|
|
321
341
|
/** A file's text, read now if it is lazy. */
|
|
322
342
|
export declare function readText(c: FileContent): Promise<string>;
|
|
323
343
|
/**
|
|
@@ -379,6 +399,7 @@ export interface BuildContext {
|
|
|
379
399
|
theme: LoadedTheme;
|
|
380
400
|
state: SiteState;
|
|
381
401
|
diagnostics?: BuildHooks["diagnostics"];
|
|
402
|
+
dataLines?: boolean;
|
|
382
403
|
}
|
|
383
404
|
/** Internal: a dev session's view of a build (see src/core/dev.ts). */
|
|
384
405
|
export interface BuildHooks {
|
|
@@ -392,6 +413,11 @@ export interface BuildHooks {
|
|
|
392
413
|
* path, and the list (empty when it has none, so a fixed page clears).
|
|
393
414
|
*/
|
|
394
415
|
diagnostics?: (file: string, list: PageDiagnostic[]) => void;
|
|
416
|
+
/**
|
|
417
|
+
* Mark each block with its line in the page's file (`data-line`, render-html's `dataLines`), for
|
|
418
|
+
* an editor's scroll sync. Lines templating moved are left out (`sourceLinesOf`).
|
|
419
|
+
*/
|
|
420
|
+
dataLines?: boolean;
|
|
395
421
|
unitBuilt?: (unit: BuildUnit, handle: UnitHandle, classes: Set<string>) => void;
|
|
396
422
|
}
|
|
397
423
|
/** Build one unit again without rendering its pages (they are rendered on request). */
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* Node-free: the dev server (src/node/dev.ts) owns the file map and the
|
|
30
30
|
* watcher, and updates `input.files` before calling `change`.
|
|
31
31
|
*/
|
|
32
|
-
import { type BuildProblem, type PageDiagnostic, type BuildInput, type OutputContent } from "./build.js";
|
|
32
|
+
import { type BuildNote, type BuildProblem, type PageDiagnostic, type BuildInput, type OutputContent } from "./build.js";
|
|
33
33
|
import { type SiteConfig } from "./config.js";
|
|
34
34
|
export interface DevSession {
|
|
35
35
|
config: SiteConfig;
|
|
@@ -45,6 +45,8 @@ export interface DevSession {
|
|
|
45
45
|
takeWarnings(): string[];
|
|
46
46
|
/** What the site's build says that is not a problem (BuildResult.notes: a content page standing as a mounted API's root), as it stands now. */
|
|
47
47
|
notes(): string[];
|
|
48
|
+
/** The same notes as data: each with the page it is about, its source file (a project path) and its path in the site. */
|
|
49
|
+
noteItems(): BuildNote[];
|
|
48
50
|
/**
|
|
49
51
|
* The same warnings as data, not handed out yet (its own count: taking one kind leaves the other):
|
|
50
52
|
* the file each is about as a project path, with its line when known, and a code.
|
|
@@ -101,6 +103,13 @@ export interface DevOptions {
|
|
|
101
103
|
search?: boolean;
|
|
102
104
|
/** Build llms.txt, its section files and llms-full.txt at the start (default: no). */
|
|
103
105
|
llms?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Mark each block with its line in the page's file (`data-line`), for an editor's scroll sync.
|
|
108
|
+
* Lines templating moved are left out (`sourceLinesOf` in build.ts). Default: no.
|
|
109
|
+
*/
|
|
110
|
+
dataLines?: boolean;
|
|
111
|
+
/** `false`: leave math as LaTeX (`<code class="math-display">` and inline), for a host that renders it itself. Default: as the config says. */
|
|
112
|
+
math?: boolean;
|
|
104
113
|
}
|
|
105
114
|
export declare function openDevSession(input: BuildInput & {
|
|
106
115
|
configText?: string;
|
|
@@ -19,7 +19,7 @@ export declare function openDevSession(input: BuildInput & {
|
|
|
19
19
|
configText?: string;
|
|
20
20
|
}, o?: DevOptions): Promise<DevSession>;
|
|
21
21
|
export { prebuiltSiteCss };
|
|
22
|
-
export type { BuildInput, BuildResult, FileContent, OutputContent, SinkContent, SiteCssBuilder, BuiltPage, HighlightPool, BuildProblem, PageDiagnostic } from "../core/build.js";
|
|
22
|
+
export type { BuildInput, BuildResult, FileContent, OutputContent, SinkContent, SiteCssBuilder, BuiltPage, HighlightPool, BuildProblem, BuildNote, PageDiagnostic } from "../core/build.js";
|
|
23
23
|
export { PageClashError } from "../core/build.js";
|
|
24
24
|
export type { ChangeResult, DevOptions, DevSession } from "../core/dev.js";
|
|
25
25
|
export { parseConfig, projectRoots, ConfigError, type SiteConfig, type DiagramEngine } from "../core/config.js";
|
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.144",
|
|
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.144",
|
|
53
|
+
"@dogsbay/format-dogsbay-md": "0.2.0-beta.144",
|
|
54
|
+
"@dogsbay/format-openapi": "0.2.0-beta.144",
|
|
55
|
+
"@dogsbay/format-topicmap": "0.2.0-beta.144",
|
|
56
|
+
"@dogsbay/highlight": "0.2.0-beta.144",
|
|
57
|
+
"@dogsbay/minja": "0.2.0-beta.144",
|
|
58
|
+
"@dogsbay/primitives": "0.2.0-beta.144",
|
|
59
|
+
"@dogsbay/render-html": "0.2.0-beta.144",
|
|
60
|
+
"@dogsbay/search": "0.2.0-beta.144",
|
|
61
|
+
"@dogsbay/serialize-core": "0.2.0-beta.144",
|
|
62
|
+
"@dogsbay/site-check": "0.2.0-beta.144",
|
|
63
|
+
"@dogsbay/site-files": "0.2.0-beta.144",
|
|
64
|
+
"@dogsbay/types": "0.2.0-beta.144"
|
|
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.144",
|
|
70
|
+
"@dogsbay/format-dogsbay-md": "0.2.0-beta.144",
|
|
71
|
+
"@dogsbay/format-openapi": "0.2.0-beta.144",
|
|
72
|
+
"@dogsbay/format-topicmap": "0.2.0-beta.144",
|
|
73
|
+
"@dogsbay/highlight": "0.2.0-beta.144",
|
|
74
|
+
"@dogsbay/icons": "0.2.0-beta.144",
|
|
75
|
+
"@dogsbay/minja": "0.2.0-beta.144",
|
|
76
|
+
"@dogsbay/primitives": "0.2.0-beta.144",
|
|
77
|
+
"@dogsbay/render-html": "0.2.0-beta.144",
|
|
78
|
+
"@dogsbay/search": "0.2.0-beta.144",
|
|
79
|
+
"@dogsbay/serialize-core": "0.2.0-beta.144",
|
|
80
|
+
"@dogsbay/site-check": "0.2.0-beta.144",
|
|
81
|
+
"@dogsbay/site-files": "0.2.0-beta.144",
|
|
82
|
+
"@dogsbay/types": "0.2.0-beta.144",
|
|
83
|
+
"@dogsbay/ui": "0.2.0-beta.144",
|
|
84
84
|
"@mermanjs/web": "0.7.0",
|
|
85
85
|
"@playwright/test": "1.61.1",
|
|
86
86
|
"@types/node": "^22.10.0",
|