@dogsbay/format-dogsbay-md 0.2.0-beta.12 → 0.2.0-beta.121

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.
Files changed (98) hide show
  1. package/dist/attributes.d.ts +16 -1
  2. package/dist/attributes.d.ts.map +1 -1
  3. package/dist/attributes.js +14 -2
  4. package/dist/attributes.js.map +1 -1
  5. package/dist/browser.d.ts +23 -0
  6. package/dist/browser.d.ts.map +1 -0
  7. package/dist/browser.js +22 -0
  8. package/dist/browser.js.map +1 -0
  9. package/dist/cli.d.ts +18 -0
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +267 -29
  12. package/dist/cli.js.map +1 -1
  13. package/dist/code-regions.d.ts +89 -0
  14. package/dist/code-regions.d.ts.map +1 -0
  15. package/dist/code-regions.js +215 -0
  16. package/dist/code-regions.js.map +1 -0
  17. package/dist/directive-guard.d.ts +11 -0
  18. package/dist/directive-guard.d.ts.map +1 -0
  19. package/dist/directive-guard.js +16 -0
  20. package/dist/directive-guard.js.map +1 -0
  21. package/dist/directive-preserve.d.ts +66 -0
  22. package/dist/directive-preserve.d.ts.map +1 -0
  23. package/dist/directive-preserve.js +410 -0
  24. package/dist/directive-preserve.js.map +1 -0
  25. package/dist/directives.js +23 -1
  26. package/dist/directives.js.map +1 -1
  27. package/dist/escape.d.ts +26 -7
  28. package/dist/escape.d.ts.map +1 -1
  29. package/dist/escape.js +101 -30
  30. package/dist/escape.js.map +1 -1
  31. package/dist/frontmatter.d.ts +12 -0
  32. package/dist/frontmatter.d.ts.map +1 -0
  33. package/dist/frontmatter.js +67 -0
  34. package/dist/frontmatter.js.map +1 -0
  35. package/dist/headings.d.ts +50 -0
  36. package/dist/headings.d.ts.map +1 -0
  37. package/dist/headings.js +116 -0
  38. package/dist/headings.js.map +1 -0
  39. package/dist/index.d.ts +8 -1
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +7 -1
  42. package/dist/index.js.map +1 -1
  43. package/dist/inline.d.ts +0 -3
  44. package/dist/inline.d.ts.map +1 -1
  45. package/dist/inline.js +242 -9
  46. package/dist/inline.js.map +1 -1
  47. package/dist/minja-mask.d.ts +64 -0
  48. package/dist/minja-mask.d.ts.map +1 -0
  49. package/dist/minja-mask.js +128 -0
  50. package/dist/minja-mask.js.map +1 -0
  51. package/dist/nav-file.d.ts +26 -3
  52. package/dist/nav-file.d.ts.map +1 -1
  53. package/dist/nav-file.js +91 -14
  54. package/dist/nav-file.js.map +1 -1
  55. package/dist/nav.d.ts +7 -0
  56. package/dist/nav.d.ts.map +1 -1
  57. package/dist/nav.js +23 -4
  58. package/dist/nav.js.map +1 -1
  59. package/dist/parse.d.ts +12 -1
  60. package/dist/parse.d.ts.map +1 -1
  61. package/dist/parse.js +606 -29
  62. package/dist/parse.js.map +1 -1
  63. package/dist/plugin-containers.d.ts +6 -1
  64. package/dist/plugin-containers.d.ts.map +1 -1
  65. package/dist/plugin-containers.js +49 -1
  66. package/dist/plugin-containers.js.map +1 -1
  67. package/dist/plugin-mark.d.ts +13 -0
  68. package/dist/plugin-mark.d.ts.map +1 -0
  69. package/dist/plugin-mark.js +75 -0
  70. package/dist/plugin-mark.js.map +1 -0
  71. package/dist/plugin-math.d.ts +23 -0
  72. package/dist/plugin-math.d.ts.map +1 -0
  73. package/dist/plugin-math.js +91 -0
  74. package/dist/plugin-math.js.map +1 -0
  75. package/dist/renderers/diagrams.d.ts +25 -0
  76. package/dist/renderers/diagrams.d.ts.map +1 -0
  77. package/dist/renderers/diagrams.js +71 -0
  78. package/dist/renderers/diagrams.js.map +1 -0
  79. package/dist/renderers/mermaid.d.ts +24 -0
  80. package/dist/renderers/mermaid.d.ts.map +1 -0
  81. package/dist/renderers/mermaid.js +152 -0
  82. package/dist/renderers/mermaid.js.map +1 -0
  83. package/dist/serialize.d.ts +1 -1
  84. package/dist/serialize.d.ts.map +1 -1
  85. package/dist/serialize.js +466 -65
  86. package/dist/serialize.js.map +1 -1
  87. package/dist/template-pages.d.ts +69 -0
  88. package/dist/template-pages.d.ts.map +1 -0
  89. package/dist/template-pages.js +249 -0
  90. package/dist/template-pages.js.map +1 -0
  91. package/dist/types.d.ts.map +1 -1
  92. package/dist/types.js +18 -1
  93. package/dist/types.js.map +1 -1
  94. package/dist/yaml.d.ts +1 -1
  95. package/dist/yaml.d.ts.map +1 -1
  96. package/dist/yaml.js +78 -2
  97. package/dist/yaml.js.map +1 -1
  98. package/package.json +26 -11
@@ -8,12 +8,27 @@
8
8
  export interface RenderedAttrs {
9
9
  id?: string;
10
10
  classes?: string[];
11
- props?: Record<string, string | number | boolean | undefined>;
11
+ /**
12
+ * Props captured from `TreeNode.props`. Primitive values (string,
13
+ * number, boolean) round-trip through inline `{key="value"}` form.
14
+ * Arrays / plain objects are preserved here too — `renderAttrs`
15
+ * skips them (inline form can't represent them) but the
16
+ * directive renderer's `shouldUseYaml` branch picks them up and
17
+ * routes the directive to YAML body form, where complex values
18
+ * survive intact.
19
+ */
20
+ props?: Record<string, unknown>;
12
21
  }
13
22
  /**
14
23
  * Render an attribute block.
15
24
  * Returns `{ #id .a .b key="value" }` or "" if no attrs.
16
25
  * Leading space included so callers can append directly to content.
26
+ *
27
+ * Inline form can only carry primitive values. Arrays / objects in
28
+ * `props` are silently skipped here — the caller is expected to have
29
+ * already routed those to YAML body form (see `shouldUseYaml` in
30
+ * directives.ts). If a non-primitive does reach this point, dropping
31
+ * it is the safest fallback (there's no inline syntax for it).
17
32
  */
18
33
  export declare function renderAttrs(attrs: RenderedAttrs): string;
19
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../src/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;CAC/D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CA0BxD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC1C,WAAW,GAAE,MAAM,EAAO,GACzB,aAAa,CA8Bf"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../src/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CA6BxD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC1C,WAAW,GAAE,MAAM,EAAO,GACzB,aAAa,CAiCf"}
@@ -9,6 +9,12 @@
9
9
  * Render an attribute block.
10
10
  * Returns `{ #id .a .b key="value" }` or "" if no attrs.
11
11
  * Leading space included so callers can append directly to content.
12
+ *
13
+ * Inline form can only carry primitive values. Arrays / objects in
14
+ * `props` are silently skipped here — the caller is expected to have
15
+ * already routed those to YAML body form (see `shouldUseYaml` in
16
+ * directives.ts). If a non-primitive does reach this point, dropping
17
+ * it is the safest fallback (there's no inline syntax for it).
12
18
  */
13
19
  export function renderAttrs(attrs) {
14
20
  const parts = [];
@@ -29,6 +35,10 @@ export function renderAttrs(attrs) {
29
35
  parts.push(key);
30
36
  continue;
31
37
  }
38
+ // Skip arrays / plain objects — inline form can't represent
39
+ // them. They survive via the YAML body branch upstream.
40
+ if (typeof value === "object")
41
+ continue;
32
42
  parts.push(`${key}=${escapeAttrValue(String(value))}`);
33
43
  }
34
44
  }
@@ -71,8 +81,10 @@ export function splitProps(props, excludeKeys = []) {
71
81
  }
72
82
  if (value === null || value === undefined)
73
83
  continue;
74
- if (typeof value === "object")
75
- continue; // skip nested structures
84
+ // Pass arrays / objects through. Inline-form rendering will skip
85
+ // them (`renderAttrs`); YAML-body rendering preserves them
86
+ // (`attrsToYaml`). The `shouldUseYaml` heuristic in directives.ts
87
+ // detects their presence and routes the directive accordingly.
76
88
  cleanProps[key] = value;
77
89
  }
78
90
  if (Object.keys(cleanProps).length > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.js","sourceRoot":"","sources":["../src/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAAoB;IAC9C,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC;QACb,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7B,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAChC,IAAI,GAAG;gBAAE,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAChB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,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GAAG,CAAC,WAAW,CAAC,CAAC;IACrC,MAAM,UAAU,GAA4B,EAAE,CAAC;IAE/C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QAE/B,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9C,MAAM,CAAC,EAAE,GAAG,KAAK,CAAC;YAClB,SAAS;QACX,CAAC;QAED,IAAI,CAAC,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,WAAW,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC1E,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACpD,SAAS;QACX,CAAC;QAED,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QACpD,iEAAiE;QACjE,2DAA2D;QAC3D,kEAAkE;QAClE,+DAA+D;QAC/D,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,KAAK,GAAG,UAAU,CAAC;IAC5B,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Browser-safe entry point — the pure TreeNode round-trip and text
3
+ * helpers, with NO `node:fs` in the module graph.
4
+ *
5
+ * The main barrel (`.`) re-exports nav / nav-file / mermaid, which
6
+ * import `node:fs` at module load and so break browser/extension
7
+ * bundling. Consumers that only need parse/serialize (the editing
8
+ * engine, extension contexts) import from `@dogsbay/format-dogsbay-md/browser`
9
+ * instead. `parse.ts` and `serialize.ts` transit only browser-safe deps
10
+ * (markdown-it, js-yaml). Frontmatter is split by the local `frontmatter.ts`
11
+ * (js-yaml only) rather than gray-matter, whose entry `require('fs')`s at
12
+ * module load and would drag `node:fs` back into this graph.
13
+ */
14
+ export { dogsbayMdToTree, parseInline, type ParseResult, type ParseOptions } from "./parse.js";
15
+ export { treeToDogsbayMd, nodeToDogsbayMd } from "./serialize.js";
16
+ export type { SerializeOptions } from "./types.js";
17
+ export { inlineToDogsbayMd } from "./inline.js";
18
+ export { transformCodeRegions, transformProseLines, transformProseSegments, fenceOpenBefore, createFenceTracker, } from "./code-regions.js";
19
+ export { maskMinjaInCode, unmaskMinjaInCode, maskAllMinjaOpeners, isMinjaProcessedFence, stripInlineMinjaMarkers, stripFenceMinjaMarkers } from "./minja-mask.js";
20
+ export { extractHeadings, slugifyHeadingText, type HeadingInfo } from "./headings.js";
21
+ export { splitFrontmatter, type Frontmatter } from "./frontmatter.js";
22
+ export { TemplatePages, TemplatePageError, declaresParams, ATTRIBUTE_BLOCK_OPEN, type TemplatePagesOptions } from "./template-pages.js";
23
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAClK,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,oBAAoB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Browser-safe entry point — the pure TreeNode round-trip and text
3
+ * helpers, with NO `node:fs` in the module graph.
4
+ *
5
+ * The main barrel (`.`) re-exports nav / nav-file / mermaid, which
6
+ * import `node:fs` at module load and so break browser/extension
7
+ * bundling. Consumers that only need parse/serialize (the editing
8
+ * engine, extension contexts) import from `@dogsbay/format-dogsbay-md/browser`
9
+ * instead. `parse.ts` and `serialize.ts` transit only browser-safe deps
10
+ * (markdown-it, js-yaml). Frontmatter is split by the local `frontmatter.ts`
11
+ * (js-yaml only) rather than gray-matter, whose entry `require('fs')`s at
12
+ * module load and would drag `node:fs` back into this graph.
13
+ */
14
+ export { dogsbayMdToTree, parseInline } from "./parse.js";
15
+ export { treeToDogsbayMd, nodeToDogsbayMd } from "./serialize.js";
16
+ export { inlineToDogsbayMd } from "./inline.js";
17
+ export { transformCodeRegions, transformProseLines, transformProseSegments, fenceOpenBefore, createFenceTracker, } from "./code-regions.js";
18
+ export { maskMinjaInCode, unmaskMinjaInCode, maskAllMinjaOpeners, isMinjaProcessedFence, stripInlineMinjaMarkers, stripFenceMinjaMarkers } from "./minja-mask.js";
19
+ export { extractHeadings, slugifyHeadingText } from "./headings.js";
20
+ export { splitFrontmatter } from "./frontmatter.js";
21
+ export { TemplatePages, TemplatePageError, declaresParams, ATTRIBUTE_BLOCK_OPEN } from "./template-pages.js";
22
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,eAAe,EAAE,WAAW,EAAuC,MAAM,YAAY,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAClK,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAoB,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAoB,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,oBAAoB,EAA6B,MAAM,qBAAqB,CAAC"}
package/dist/cli.d.ts CHANGED
@@ -1,3 +1,21 @@
1
1
  import type { FormatPlugin } from "@dogsbay/types";
2
+ /**
3
+ * The source page's front matter, carried into the Dogsbay MD it becomes.
4
+ * It used to be DROPPED (only title and redirect were written), so a
5
+ * converted corpus lost `description`, `tags` and custom fields, and a
6
+ * query listing (`::child-links{match=…}`) over it found nothing.
7
+ *
8
+ * Keys Dogsbay MD gives meaning to keep their value only when the value
9
+ * MEANS that here; otherwise the key moves under `imported:` — kept, never
10
+ * misread. Starlight's `template: splash` (a page template) must not turn a
11
+ * page into a Jinja template page. A Dogsbay MD source round-trips unchanged:
12
+ * its values are valid by construction.
13
+ *
14
+ * `title`, `redirect` and the template keys are written by the caller.
15
+ * `layout` is free-form (a theme layout name) and passes as it is.
16
+ * `imported:`, not `source:` — Cloudflare pages carry their own `source:`
17
+ * (an origin URL, 91 pages), which the moved keys would have overwritten.
18
+ */
19
+ export declare function carriedFrontmatter(fm: Record<string, unknown> | undefined): Record<string, unknown>;
2
20
  export declare const plugin: FormatPlugin;
3
21
  //# sourceMappingURL=cli.d.ts.map
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAgC,MAAM,gBAAgB,CAAC;AA2HjF,eAAO,MAAM,MAAM,EAAE,YAcpB,CAAC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAA8C,MAAM,gBAAgB,CAAC;AA+P/F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4BnG;AAsFD,eAAO,MAAM,MAAM,EAAE,YAiBpB,CAAC"}
package/dist/cli.js CHANGED
@@ -4,11 +4,14 @@
4
4
  * Reads a directory of .md files, parses each via dogsbayMdToTree, builds nav
5
5
  * from directory structure + frontmatter, returns ExportPage[] + NavItem[].
6
6
  */
7
- import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
8
- import { join, relative, basename } from "node:path";
7
+ import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
8
+ import { join, relative, basename, dirname } from "node:path";
9
+ import { extractHeadings } from "./headings.js";
9
10
  import { parseMeta } from "@dogsbay/types";
10
11
  import { dogsbayMdToTree } from "./parse.js";
12
+ import { treeToDogsbayMd } from "./serialize.js";
11
13
  import { buildNavFromDirectory } from "./nav.js";
14
+ import { renderDiagrams } from "./renderers/diagrams.js";
12
15
  /**
13
16
  * Detect whether a directory contains a Dogsbay MD source tree.
14
17
  *
@@ -30,16 +33,76 @@ function detectDogsbayMdSource(path) {
30
33
  return false;
31
34
  }
32
35
  }
36
+ /**
37
+ * Conventional content-asset roots, in probe order. Mounted under their own
38
+ * name so an author's `/images/logo.png` resolves, and excluded from the page
39
+ * walk so their contents are assets rather than also being pages.
40
+ */
41
+ const ASSET_ROOTS = ["images", "assets", "_assets"];
42
+ /**
43
+ * Does this directory hold any markdown, at any depth?
44
+ *
45
+ * Distinguishes a media-only asset root (skip it: its files are assets, and a
46
+ * stray .md would become both a page and a raw copy in public/) from a docs
47
+ * SECTION that merely shares the name (walk it: those are pages).
48
+ */
49
+ function containsMarkdown(dir) {
50
+ let entries;
51
+ try {
52
+ entries = readdirSync(dir, { withFileTypes: true });
53
+ }
54
+ catch {
55
+ return false;
56
+ }
57
+ for (const e of entries) {
58
+ if (e.isDirectory()) {
59
+ if (containsMarkdown(join(dir, e.name)))
60
+ return true;
61
+ }
62
+ else if (e.name.endsWith(".md")) {
63
+ return true;
64
+ }
65
+ }
66
+ return false;
67
+ }
33
68
  function walkMdFiles(dir, root, out = []) {
34
69
  for (const entry of readdirSync(dir, { withFileTypes: true })) {
70
+ // `_`-prefixed files/dirs are include targets (fragments), not routable
71
+ // pages — the standard Jekyll/Docusaurus convention. The build-time Minja
72
+ // preprocessor `{% include %}`s them into pages; they get no route of their
73
+ // own. (e.g. structural Docusaurus import writes `_includes/**` fragments.)
74
+ if (entry.name.startsWith("_"))
75
+ continue;
76
+ // A conventional asset root carrying only media is not a page tree, and
77
+ // leaving it in the walk would make a stray .md there BOTH a routable
78
+ // page and a file copied verbatim into public/.
79
+ //
80
+ // But `images/` is also a perfectly ordinary section name. Skipping it
81
+ // unconditionally silently dropped every page under it — "Imported 1
82
+ // pages" where there were 2, no warning. So skip only a root that
83
+ // carries NO markdown at all, and only at the content root.
84
+ if (dir === root &&
85
+ ASSET_ROOTS.includes(entry.name) &&
86
+ !containsMarkdown(join(dir, entry.name))) {
87
+ continue;
88
+ }
35
89
  const full = join(dir, entry.name);
36
90
  if (entry.isDirectory()) {
37
91
  walkMdFiles(full, root, out);
38
92
  }
39
93
  else if (entry.name.endsWith(".md")) {
40
94
  const rel = relative(root, full).replace(/\\/g, "/");
41
- const slug = rel.replace(/\.md$/, "");
42
- out.push({ filePath: full, slug });
95
+ let slug = rel.replace(/\.md$/, "");
96
+ // A `<dir>/index.md` page is the directory's landing page: its slug
97
+ // is the directory, not `<dir>/index`. This MUST match how the nav
98
+ // layer normalizes the same file (nav-file.ts `fileToHref` strips
99
+ // `/index`), or `routablesFrom: nav`'s `filterPagesToNav` drops the
100
+ // page and the section landing 404s. The bare root `index.md` keeps
101
+ // slug `index` — format-astro's root-home + `.md`-mirror special-case
102
+ // keys off `slug === "index"`. See plans/dir-index-slug-nav-drop.md.
103
+ if (slug.endsWith("/index"))
104
+ slug = slug.slice(0, -"/index".length);
105
+ out.push({ filePath: full, slug, sourcePath: rel });
43
106
  }
44
107
  }
45
108
  return out;
@@ -61,30 +124,36 @@ async function importDogsbayMd(source, opts) {
61
124
  const taxonomyNames = Array.isArray(opts.taxonomyNames)
62
125
  ? opts.taxonomyNames
63
126
  : undefined;
64
- for (const { filePath, slug } of files) {
127
+ // Pre-parse pass — opt-out via `diagrams: false`. When enabled
128
+ // (default), `code` fences with `lang: mermaid` get transformed
129
+ // to `diagram` nodes with pre-rendered SVG. Fail-open: if mmdc
130
+ // (mermaid-cli) isn't installed the code block is left as-is and
131
+ // a one-line warning is printed. See plans/mermaid-dogsbay-md.md.
132
+ const diagramsOn = opts.diagrams !== false;
133
+ for (const { filePath, slug, sourcePath } of files) {
65
134
  const content = readFileSync(filePath, "utf-8");
66
135
  const { tree, frontmatter } = dogsbayMdToTree(content);
136
+ if (diagramsOn) {
137
+ await renderDiagrams(tree);
138
+ }
67
139
  const title = String(frontmatter.title
68
140
  ?? prettifyName(basename(slug)));
69
- // Extract heading metadata for TOC
70
- const headings = [];
71
- for (const node of tree) {
72
- if (node.type === "heading" && node.inline) {
73
- const text = node.inline
74
- .map((n) => (n.type === "text" ? n.text : ""))
75
- .join("")
76
- .trim();
77
- headings.push({
78
- depth: node.props?.level ?? 1,
79
- slug: node.props?.slug ?? slugify(text),
80
- text,
81
- });
82
- }
83
- }
141
+ // Extract heading metadata for TOC AND backfill `node.props.slug`
142
+ // so format-astro's headingToAstro emits a matching `id` on the
143
+ // rendered `<h2>` / `<h3>`. Without this, the TOC's
144
+ // `<a href="#quick-start">` had nothing to scroll to — the
145
+ // heading was emitted without an id because the tree didn't
146
+ // carry the slug. Mirrors format-mkdocs/src/loader.ts:312.
147
+ //
148
+ // Duplicate slugs get `-1`, `-2` suffixes so two `## Foo`
149
+ // headings on the same page produce distinct anchors. Same
150
+ // collision-handling shape as MkDocs.
151
+ const headings = extractHeadings(tree);
84
152
  const redirect = frontmatter.redirect;
85
153
  const meta = parseMeta(frontmatter, { slug, taxonomyNames });
86
154
  pages.push({
87
155
  slug,
156
+ sourcePath,
88
157
  title,
89
158
  tree,
90
159
  headings,
@@ -95,8 +164,42 @@ async function importDogsbayMd(source, opts) {
95
164
  }
96
165
  const navFilePath = opts.nav || undefined;
97
166
  const hrefPrefix = typeof opts.hrefPrefix === "string" ? opts.hrefPrefix : undefined;
98
- const nav = buildNavFromDirectory(source, { navFilePath, hrefPrefix });
99
- return { pages, nav };
167
+ // `--strict` at the CLI layer maps to "fail" here. `loadNavFile`
168
+ // already throws on the first miss in fail mode; the build
169
+ // surfaces the throw as a fatal error and exits non-zero.
170
+ // See plans/site-build-strict.md.
171
+ const missingNavTargets = opts.missingNavTargets === "fail"
172
+ ? "fail"
173
+ : undefined;
174
+ const nav = buildNavFromDirectory(source, {
175
+ navFilePath,
176
+ hrefPrefix,
177
+ missingFile: missingNavTargets,
178
+ });
179
+ // Declare where this corpus's media lives, so an exporter copies the FILES
180
+ // that the `_assets/…` references in the pages point at.
181
+ //
182
+ // Without this the reference survives the conversion and the file does not,
183
+ // which looks exactly like success: the page count, the retention score and
184
+ // a clean exit are all unaffected while every image 404s. `dogsbay site
185
+ // build` has its own asset pass, so this was invisible there and only bit
186
+ // `convert` — an OpenShift vault shipped with 294 dead image references.
187
+ // Conventional asset roots, in probe order. `_assets` is what every
188
+ // importer rewrites its refs to and stays the documented convention
189
+ // (docs/images.md). Hand-authored content is not written by an
190
+ // importer, though: someone starting a site types `/images/logo.png`,
191
+ // which silently resolved nowhere because only `_assets` was probed.
192
+ //
193
+ // Each root that exists mounts under its OWN name, so the reference the
194
+ // author wrote is the path the file lands at. Recognising several costs
195
+ // nothing: an absent directory is simply not mounted.
196
+ const assetMounts = [];
197
+ for (const root of ASSET_ROOTS) {
198
+ const dir = join(source, root);
199
+ if (existsSync(dir))
200
+ assetMounts.push({ dir, root });
201
+ }
202
+ return assetMounts.length ? { pages, nav, assetMounts } : { pages, nav };
100
203
  }
101
204
  function prettifyName(slug) {
102
205
  return slug
@@ -104,17 +207,149 @@ function prettifyName(slug) {
104
207
  .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
105
208
  .join(" ");
106
209
  }
107
- function slugify(text) {
108
- return text
109
- .toLowerCase()
110
- .replace(/[^\w\s-]/g, "")
111
- .trim()
112
- .replace(/\s+/g, "-");
210
+ /**
211
+ * Export ExportPage[] + nav to a directory of Dogsbay-MD files.
212
+ *
213
+ * Each page's tree is serialized via `treeToDogsbayMd` (which preserves any
214
+ * Minja directives via `escapePreservingMinja`) and written to `<output>/<slug>.md`.
215
+ *
216
+ * Fragment pages (`page.fragment`) are include targets, not routable pages:
217
+ * written with NO frontmatter, NO title, and excluded from nav — their identity
218
+ * is the include path. Mirrors migrate-asciidoc's fragment convention so the
219
+ * build-time Minja preprocessor can `{% include %}` them.
220
+ */
221
+ /** Media files worth carrying into `_assets` from a media-only mount. */
222
+ const MEDIA_EXTS = new Set([
223
+ ".png", ".jpg", ".jpeg", ".gif", ".webp", ".avif",
224
+ ".svg", ".ico", ".pdf", ".mp4", ".webm",
225
+ ]);
226
+ /** Recursively copy only media files, preserving relative structure. */
227
+ function copyMediaTree(srcDir, destDir) {
228
+ for (const entry of readdirSync(srcDir, { withFileTypes: true })) {
229
+ const full = join(srcDir, entry.name);
230
+ if (entry.isDirectory()) {
231
+ copyMediaTree(full, join(destDir, entry.name));
232
+ continue;
233
+ }
234
+ const dot = entry.name.lastIndexOf(".");
235
+ if (dot === -1 || !MEDIA_EXTS.has(entry.name.slice(dot).toLowerCase()))
236
+ continue;
237
+ mkdirSync(destDir, { recursive: true });
238
+ cpSync(full, join(destDir, entry.name));
239
+ }
240
+ }
241
+ /**
242
+ * The source page's front matter, carried into the Dogsbay MD it becomes.
243
+ * It used to be DROPPED (only title and redirect were written), so a
244
+ * converted corpus lost `description`, `tags` and custom fields, and a
245
+ * query listing (`::child-links{match=…}`) over it found nothing.
246
+ *
247
+ * Keys Dogsbay MD gives meaning to keep their value only when the value
248
+ * MEANS that here; otherwise the key moves under `imported:` — kept, never
249
+ * misread. Starlight's `template: splash` (a page template) must not turn a
250
+ * page into a Jinja template page. A Dogsbay MD source round-trips unchanged:
251
+ * its values are valid by construction.
252
+ *
253
+ * `title`, `redirect` and the template keys are written by the caller.
254
+ * `layout` is free-form (a theme layout name) and passes as it is.
255
+ * `imported:`, not `source:` — Cloudflare pages carry their own `source:`
256
+ * (an origin URL, 91 pages), which the moved keys would have overwritten.
257
+ */
258
+ export function carriedFrontmatter(fm) {
259
+ if (!fm)
260
+ return {};
261
+ const out = {};
262
+ const source = {};
263
+ const valid = {
264
+ // `false` is the documented per-page opt-out of a source's `templates: jinja`.
265
+ template: (v) => v === "jinja" || v === false,
266
+ weight: (v) => typeof v === "number" && Number.isFinite(v),
267
+ order: (v) => typeof v === "number" && Number.isFinite(v),
268
+ draft: (v) => typeof v === "boolean",
269
+ status: (v) => typeof v === "string" && ["draft", "preview", "stable", "deprecated"].includes(v),
270
+ // `params:` declares a template PARTIAL's parameters: only with `template: jinja`.
271
+ params: (v) => Array.isArray(v) && fm.template === "jinja",
272
+ };
273
+ for (const [key, value] of Object.entries(fm)) {
274
+ if (key === "title" || key === "redirect" || value === undefined)
275
+ continue;
276
+ // A source that already has `imported:` keeps it: merged if a mapping,
277
+ // else nested under its own name.
278
+ if (key === "imported") {
279
+ if (value && typeof value === "object" && !Array.isArray(value))
280
+ Object.assign(source, value);
281
+ else
282
+ source.imported = value;
283
+ continue;
284
+ }
285
+ if (valid[key] && !valid[key](value))
286
+ source[key] = value;
287
+ else
288
+ out[key] = value;
289
+ }
290
+ if (Object.keys(source).length)
291
+ out.imported = source;
292
+ return out;
293
+ }
294
+ async function exportDogsbayMd(pages, nav, output, opts) {
295
+ mkdirSync(output, { recursive: true });
296
+ // Copy mounted asset dirs (e.g. Docusaurus `static/`) into `content/_assets/`,
297
+ // the Dogsbay standard (docs/images.md). Preserves internal structure
298
+ // (static/img/x → <output>/_assets/img/x) so the parser's rewritten
299
+ // `/_assets/img/x` refs resolve, and a later `site build`'s asset pass copies
300
+ // `content/_assets/**` through to `/_assets/**`. A mount may target an
301
+ // `_assets` subdir (`into`) and restrict itself to media files (`mediaOnly`) —
302
+ // used for docs-co-located images where the mount dir IS the docs tree.
303
+ if (Array.isArray(opts.assetMounts)) {
304
+ for (const mount of opts.assetMounts) {
305
+ if (!existsSync(mount.dir))
306
+ continue;
307
+ // Per-mount root: `_assets` for an imported corpus, `images`/`assets`
308
+ // for hand-authored content. A hardcoded root would copy the file
309
+ // where the reference does not point.
310
+ const assetsRoot = join(output, mount.root ?? "_assets");
311
+ const dest = mount.into ? join(assetsRoot, mount.into) : assetsRoot;
312
+ if (mount.mediaOnly) {
313
+ copyMediaTree(mount.dir, dest);
314
+ continue;
315
+ }
316
+ const skip = new Set(mount.exclude ?? []);
317
+ cpSync(mount.dir, dest, {
318
+ recursive: true,
319
+ ...(skip.size === 0 ? {} : {
320
+ // Relative to the mount, so an exclusion cannot be accidentally
321
+ // satisfied by a directory name somewhere above it on disk.
322
+ filter: (src) => {
323
+ const rel = relative(mount.dir, src);
324
+ return rel === "" || !rel.split(/[\\/]/).some((seg) => skip.has(seg));
325
+ },
326
+ }),
327
+ });
328
+ }
329
+ }
330
+ for (const page of pages) {
331
+ const slug = page.slug || "index";
332
+ const outPath = join(output, `${slug}.md`);
333
+ mkdirSync(dirname(outPath), { recursive: true });
334
+ // A template partial keeps its `params:` and the template flag, so the
335
+ // build treats it as a partial and checks every include against it.
336
+ const templateFm = page.template ? { template: "jinja", ...(page.templateParams ? { params: page.templateParams } : {}) } : {};
337
+ // A title-less template page still needs `template: jinja`, or the build
338
+ // renders it in content mode and shows the directives as text.
339
+ const frontmatter = page.fragment || !page.title
340
+ ? (page.template ? templateFm : undefined)
341
+ : { title: page.title, ...carriedFrontmatter(page.frontmatter), ...(page.redirect ? { redirect: page.redirect } : {}), ...templateFm };
342
+ const md = treeToDogsbayMd(page.tree, frontmatter ? { frontmatter } : undefined);
343
+ writeFileSync(outPath, md.endsWith("\n") ? md : md + "\n", "utf-8");
344
+ }
345
+ // Nav as nav.json at the content root (the dogsbay-md importer + runtime
346
+ // loader both prefer nav.json). Fragments never appear here.
347
+ writeFileSync(join(output, "nav.json"), JSON.stringify(nav, null, 2) + "\n", "utf-8");
113
348
  }
114
349
  export const plugin = {
115
350
  name: "dogsbay-md",
116
351
  canImport: true,
117
- canExport: false,
352
+ canExport: true,
118
353
  detectSource: detectDogsbayMdSource,
119
354
  importOptions: [
120
355
  {
@@ -125,5 +360,8 @@ export const plugin = {
125
360
  async import(source, opts) {
126
361
  return importDogsbayMd(source, opts);
127
362
  },
363
+ async export(pages, nav, output, opts) {
364
+ return exportDogsbayMd(pages, nav, output, opts);
365
+ },
128
366
  };
129
367
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,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