@dooc-dev/dooc 0.0.5 → 0.0.6

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 (176) hide show
  1. package/dist/cli.js +128 -67
  2. package/dist/code-worker.global.js +152 -0
  3. package/dist/code.global.js +101 -101
  4. package/dist/compiler/bundle-urls.js +2 -0
  5. package/dist/compiler/check.js +2 -0
  6. package/dist/compiler/compile.js +13 -3
  7. package/dist/compiler/dxf.d.ts +1 -0
  8. package/dist/compiler/dxf.js +81 -0
  9. package/dist/compiler/export.js +22 -15
  10. package/dist/compiler/figures.js +39 -10
  11. package/dist/compiler/files.js +2 -0
  12. package/dist/compiler/ignored-files.d.ts +2 -0
  13. package/dist/compiler/ignored-files.js +30 -0
  14. package/dist/compiler/ops.js +1 -1
  15. package/dist/compiler/subformat-schema.d.ts +14 -0
  16. package/dist/compiler/subformat-schema.js +92 -0
  17. package/dist/compiler/subformats.d.ts +5 -7
  18. package/dist/compiler/subformats.js +115 -75
  19. package/dist/core/code-file.js +7 -5
  20. package/dist/core/code-grammars.d.ts +5 -0
  21. package/dist/core/code-grammars.js +34 -0
  22. package/dist/core/content-metadata.d.ts +2 -1
  23. package/dist/core/content-metadata.js +7 -2
  24. package/dist/core/content-types.d.ts +1 -1
  25. package/dist/core/escape-html.d.ts +1 -0
  26. package/dist/core/escape-html.js +1 -0
  27. package/dist/core/figure-frame.js +1 -1
  28. package/dist/core/file-embed.js +7 -3
  29. package/dist/core/html.d.ts +4 -1
  30. package/dist/core/html.js +8 -7
  31. package/dist/core/language.js +5 -2
  32. package/dist/core/markdown.js +3 -1
  33. package/dist/core/previewers.d.ts +8 -0
  34. package/dist/core/previewers.js +2 -0
  35. package/dist/core/schema-fields.d.ts +13 -0
  36. package/dist/core/schema-fields.js +175 -0
  37. package/dist/core/schema-graph-mount.js +26 -3
  38. package/dist/core/schema-refs.d.ts +8 -0
  39. package/dist/core/schema-refs.js +82 -0
  40. package/dist/core/toc-ui.js +1 -1
  41. package/dist/edit.global.js +266 -285
  42. package/dist/flow.global.js +3 -3
  43. package/dist/graph/abnfDiagram-S7VZAUFO-ASBULSKE.js +1 -0
  44. package/dist/graph/architecture-WOLXFQ4H-V57EDXXY.js +1 -0
  45. package/dist/graph/architectureDiagram-YGSQEFNW-GIMP347N.js +36 -0
  46. package/dist/graph/blockDiagram-APKKGZFW-RDL2T4JW.js +140 -0
  47. package/dist/graph/bpmnIcons-APHXDYXF-TWOSQNUQ.js +1 -0
  48. package/dist/graph/c4Diagram-KJ2TOQU5-75LIUC4F.js +38 -0
  49. package/dist/graph/chunk-26TUJSYJ.js +1 -0
  50. package/dist/graph/chunk-3LU66YMI.js +1 -0
  51. package/dist/graph/chunk-3RNHDNP5.js +1 -0
  52. package/dist/graph/chunk-3Y2PDVDE.js +1 -0
  53. package/dist/graph/chunk-3YJHMOOA.js +3 -0
  54. package/dist/graph/chunk-4KILFWYV.js +339 -0
  55. package/dist/graph/chunk-4QDE4SUK.js +1 -0
  56. package/dist/graph/chunk-5OO6DATX.js +1 -0
  57. package/dist/graph/chunk-5UUEAHTN.js +1 -0
  58. package/dist/graph/chunk-6T55RVVR.js +1 -0
  59. package/dist/graph/chunk-ARAJTKOH.js +2 -0
  60. package/dist/graph/chunk-BBD5CEDC.js +72 -0
  61. package/dist/graph/chunk-BVXT562I.js +1 -0
  62. package/dist/graph/chunk-BZAMCJ6B.js +32 -0
  63. package/dist/graph/chunk-C6J4A356.js +15 -0
  64. package/dist/graph/chunk-EG5UVNOC.js +213 -0
  65. package/dist/graph/chunk-GF4TOPUK.js +1 -0
  66. package/dist/graph/chunk-GYT4IYBZ.js +1 -0
  67. package/dist/graph/chunk-HJG2HUYJ.js +88 -0
  68. package/dist/graph/chunk-HOPPTA6H.js +62 -0
  69. package/dist/graph/chunk-I3DMZIHV.js +1 -0
  70. package/dist/graph/chunk-IC23EEF6.js +1 -0
  71. package/dist/graph/chunk-ISO77HML.js +1 -0
  72. package/dist/graph/chunk-JD7ZBJD2.js +1 -0
  73. package/dist/graph/chunk-JRSH5GNS.js +1 -0
  74. package/dist/graph/chunk-JSHWCPFJ.js +1 -0
  75. package/dist/graph/chunk-K2KLZU7M.js +10 -0
  76. package/dist/graph/chunk-K4I76XBX.js +14 -0
  77. package/dist/graph/chunk-KT4VPQD5.js +135 -0
  78. package/dist/graph/chunk-KU6GTEMS.js +1 -0
  79. package/dist/graph/chunk-LT6LXKCR.js +136 -0
  80. package/dist/graph/chunk-MPR575IN.js +1 -0
  81. package/dist/graph/chunk-N3OHKGRZ.js +1 -0
  82. package/dist/graph/chunk-O656ZI37.js +1 -0
  83. package/dist/graph/chunk-OFZLK5G4.js +1 -0
  84. package/dist/graph/chunk-PDH25ALM.js +2 -0
  85. package/dist/graph/chunk-PW2RGZ3O.js +1 -0
  86. package/dist/graph/chunk-QCJUF4YA.js +1 -0
  87. package/dist/graph/chunk-QEEA3KYY.js +2 -0
  88. package/dist/graph/chunk-QYAXYFNI.js +1 -0
  89. package/dist/graph/chunk-QYTM6GY3.js +1 -0
  90. package/dist/graph/chunk-R63JUMUK.js +1 -0
  91. package/dist/graph/chunk-SCEY3ZPT.js +1 -0
  92. package/dist/graph/chunk-VM2H7G2R.js +1 -0
  93. package/dist/graph/chunk-XQS73SBQ.js +1 -0
  94. package/dist/graph/chunk-YCRLJT2S.js +1 -0
  95. package/dist/graph/chunk-Z4FIZ7CR.js +1 -0
  96. package/dist/graph/chunk-ZMCB7VP2.js +1 -0
  97. package/dist/graph/chunk-ZSZXN4BT.js +2 -0
  98. package/dist/graph/classDiagram-v2-L25IHNXF-JL7LVDZH.js +217 -0
  99. package/dist/graph/cose-bilkent-JH36ORCC-PNM3EYPB.js +1 -0
  100. package/dist/graph/cynefin-EF2NZ3EQ-PSXP3DXL.js +1 -0
  101. package/dist/graph/cynefinDiagram-L36ESFBY-QVY54CXO.js +62 -0
  102. package/dist/graph/dagre-SPEB5RXH-HPGQXBZJ.js +4 -0
  103. package/dist/graph/diagram-3B7GL73J-DWH5WS2P.js +200 -0
  104. package/dist/graph/diagram-DNEMPZML-TEGH2U5I.js +24 -0
  105. package/dist/graph/diagram-L3MUGCDN-X4MREUWR.js +41 -0
  106. package/dist/graph/diagram-LA4NIPWU-NXT746HG.js +24 -0
  107. package/dist/graph/diagram-MHCOC4E2-JGHXSAGS.js +3 -0
  108. package/dist/graph/diagram-XPFHEONP-ZHZPBLT4.js +30 -0
  109. package/dist/graph/ebnfDiagram-UZSYDL2S-SMF6KJ43.js +1 -0
  110. package/dist/graph/elk-XV6XMXQE-AZ4HLCWI.js +27 -0
  111. package/dist/graph/erDiagram-EYBAPDEH-B3JNJ357.js +99 -0
  112. package/dist/graph/eventmodeling-K75KTNOO-WG6DDYMC.js +1 -0
  113. package/dist/graph/flowDiagram-MALGAFMO-2R7EYAQI.js +1 -0
  114. package/dist/graph/ganttDiagram-23REXITY-YXBYWFOJ.js +292 -0
  115. package/dist/graph/gitGraph-VSP46ZUC-VBFWJBBT.js +1 -0
  116. package/dist/graph/gitGraphDiagram-STJD7YCW-4FZDCFGV.js +106 -0
  117. package/dist/graph/info-OHQRW6UA-ALVDUVYV.js +1 -0
  118. package/dist/graph/infoDiagram-KBXO4MBG-7EHX2GQG.js +2 -0
  119. package/dist/graph/ishikawaDiagram-M35NCXHK-FRZD2PWQ.js +70 -0
  120. package/dist/graph/journeyDiagram-OPLOXDXO-7Z66JCPR.js +139 -0
  121. package/dist/graph/kanban-definition-BZKZHSQY-NN5AIKTE.js +89 -0
  122. package/dist/graph/katex-DXDNVO6V.js +257 -0
  123. package/dist/graph/mindmap-definition-I2QAS2VK-HDPCABN2.js +98 -0
  124. package/dist/graph/packet-JDAUHWVQ-5MQIBWAH.js +1 -0
  125. package/dist/graph/pegDiagram-FD4XPPHP-H2BFNCKT.js +1 -0
  126. package/dist/graph/pie-XZMESJXO-T5VRKHVT.js +1 -0
  127. package/dist/graph/pieDiagram-J4AKIIQI-O3NJSVD3.js +39 -0
  128. package/dist/graph/quadrantDiagram-XTYBLID2-TMTZJI3P.js +7 -0
  129. package/dist/graph/radar-ABXABTNO-C6FXIBYW.js +1 -0
  130. package/dist/graph/railroad-I3PHUGI6-ZSO5JXB3.js +1 -0
  131. package/dist/graph/railroad-abnf-LNEFI6M7-CI4GQRHB.js +1 -0
  132. package/dist/graph/railroad-ebnf-DWYD2UWJ-MUENNCGK.js +1 -0
  133. package/dist/graph/railroad-peg-JR7BVNR7-N3X5GGIX.js +1 -0
  134. package/dist/graph/railroadDiagram-MRQ6NCDL-JHWS23UO.js +1 -0
  135. package/dist/graph/requirementDiagram-Y7LWUY3S-7DVLPO4B.js +84 -0
  136. package/dist/graph/sankeyDiagram-WGJFYUXA-Z5L4R5TR.js +40 -0
  137. package/dist/graph/schema-graph-global.js +639 -0
  138. package/dist/graph/sequenceDiagram-5NDRBG5M-RCTU25NT.js +169 -0
  139. package/dist/graph/sizeCapture-INFHLROL-RROY32P5.js +1 -0
  140. package/dist/graph/stateDiagram-v2-FJ4FJNEA-BXUSPWDK.js +291 -0
  141. package/dist/graph/swimlanes-UMQ2AFYF-LDD74Q2S.js +1 -0
  142. package/dist/graph/swimlanesDiagram-OMPLPG4O-ZYULLJSU.js +8 -0
  143. package/dist/graph/timeline-definition-SEUHKTQE-ZQSMIVAS.js +120 -0
  144. package/dist/graph/treeView-D4JQ5SDB-42S7U73N.js +1 -0
  145. package/dist/graph/treemap-SAJKECNS-RUBYQ7XF.js +1 -0
  146. package/dist/graph/usecaseDiagram-AFA6YXN4-57RDRYXF.js +370 -0
  147. package/dist/graph/vennDiagram-NNMJR3RB-5C3LVAV6.js +34 -0
  148. package/dist/graph/wardley-7MLQ67FV-NV5HXTTC.js +1 -0
  149. package/dist/graph/wardleyDiagram-S7YFUSEH-6D5BKXHM.js +78 -0
  150. package/dist/graph/xychartDiagram-GGNKY7IX-6ET3ZM67.js +7 -0
  151. package/dist/mcp.js +5 -4
  152. package/dist/plugins.global.js +71 -104
  153. package/dist/subformats.global.js +6 -112
  154. package/dist/ui.global.js +75 -108
  155. package/dist/viewer/build.d.ts +2 -0
  156. package/dist/viewer/build.js +22 -8
  157. package/dist/viewer/code-file.js +7 -2
  158. package/dist/viewer/figure-preview.d.ts +4 -0
  159. package/dist/viewer/figure-preview.js +54 -0
  160. package/dist/viewer/hmr.js +4 -3
  161. package/dist/viewer/lazy-preview.d.ts +2 -0
  162. package/dist/viewer/lazy-preview.js +43 -0
  163. package/dist/viewer/locales/eng.json +26 -3
  164. package/dist/viewer/locales/jpn.json +26 -3
  165. package/dist/viewer/locales/zho.json +26 -3
  166. package/dist/viewer/plugin-blocks.js +1 -1
  167. package/dist/viewer/plugins.js +1 -1
  168. package/dist/viewer/resource-library.d.ts +1 -1
  169. package/dist/viewer/resource-library.js +5 -4
  170. package/dist/viewer/serve.d.ts +2 -1
  171. package/dist/viewer/serve.js +148 -41
  172. package/dist/viewer/textfile.d.ts +2 -0
  173. package/dist/viewer/textfile.js +20 -5
  174. package/package.json +5 -3
  175. package/dist/viewer/lazy-graph.d.ts +0 -2
  176. package/dist/viewer/lazy-graph.js +0 -30
package/dist/cli.js CHANGED
@@ -8,27 +8,34 @@ import { prebuilt } from "./viewer/assets.js";
8
8
  process.env.NODE_ENV = prebuilt ? "production" : "development";
9
9
  const USAGE = `usage: dooc <command>
10
10
 
11
- edit [dooc.yaml] [port] open dooc in edit mode
12
- view [dooc.yaml] [port] open dooc in view mode
13
- --viewer-plugins <module> inject an external viewer plugin module
14
- build html [dooc.yaml] [out-dir] build bundle.html (default <project>/dist)
15
- export [dooc.yaml] [out-dir] collect source dependencies into bundle.zip
16
- build zip [dooc.yaml] [out-dir] build bundle.zip (default <project>/dist)
17
- --url_preview embed|network URL handling for either format (default: embed)
18
- --mode static|live HTML snapshot or runtime plugin API
19
- --auth external host supplies live HTML authentication and transport
20
- --source-url <url> source directory URL for card copy links in HTML
21
- check [dooc.yaml] [options] JSON consistency report (check --help for options)
22
- plugin pack <built-dir> [zip] package bundled JS and assets as a plugin ZIP
23
- plugin add <zip> [dooc.yaml] [port] install a local plugin and print login links
24
- plugin login <id> [dooc.yaml] [port] open a local login flow for an installed plugin
25
- font add <file> [dooc.yaml] register a font in the project (.dooc/fonts/)
26
- font list [dooc.yaml] list registered project fonts
27
- font remove <name> [dooc.yaml] remove a registered project font
28
- mcp [dooc.yaml] stdio MCP server (all read / write operations)
29
- --git-origin <module> inject gitOrigin from an external viewer plugin module
30
- help, --help, -h show this help
11
+ commands:
12
+ ├─ edit [dooc.yaml] [port] open dooc in edit mode
13
+ │ └─ --viewer-plugins <module> inject an external viewer plugin module
14
+ ├─ view [dooc.yaml] [port] open dooc in view mode
15
+ │ └─ --viewer-plugins <module> inject an external viewer plugin module
16
+ ├─ build build the selected bundle (default <project>/dist)
17
+ │ ├─ html [dooc.yaml] [out-dir] build bundle.html
18
+ │ │ ├─ --mode static|live HTML snapshot or runtime plugin API
19
+ │ │ ├─ --auth external host supplies live HTML authentication and transport
20
+ │ │ └─ --source-url <url> source directory URL for card copy links
21
+ │ ├─ zip [dooc.yaml] [out-dir] build bundle.zip
22
+ │ ├─ --url_preview embed|network URL handling for either format (default: embed)
23
+ │ └─ --viewer-plugins <module> inject an external build plugin module
24
+ ├─ export [dooc.yaml] [out-dir] collect source dependencies into bundle.zip
25
+ ├─ check [dooc.yaml] [options] JSON consistency report (check --help for options)
26
+ ├─ plugin manage local plugins
27
+ │ ├─ pack <built-dir> [zip] package bundled JS and assets as a plugin ZIP
28
+ │ ├─ add <zip> [dooc.yaml] [port] install a local plugin and print login links
29
+ │ └─ login <id> [dooc.yaml] [port] open a local login flow for an installed plugin
30
+ ├─ font manage project fonts (.dooc/fonts/)
31
+ │ ├─ add <file> [dooc.yaml] register a font in the project
32
+ │ ├─ list [dooc.yaml] list registered project fonts
33
+ │ └─ remove <name> [dooc.yaml] remove a registered project font
34
+ ├─ mcp [dooc.yaml] stdio MCP server (all read / write operations)
35
+ │ └─ --git-origin <module> inject gitOrigin from an external viewer plugin module
36
+ └─ help, --help, -h show this help
31
37
 
38
+ Details: dooc <command> --help (build, check, plugin, font, mcp).
32
39
  Default manifest: ./dooc.yaml. Paths and .dooc/ are relative to its directory.`;
33
40
  const fail = (message) => {
34
41
  console.error(message);
@@ -49,17 +56,27 @@ switch (command) {
49
56
  });
50
57
  const [action, value, rootArg, portArg] = positionals;
51
58
  if (values.help) {
52
- console.log(`usage: dooc plugin pack <built-dir> [output.zip]
53
- dooc plugin add <zip> [dooc.yaml] [port]
54
- dooc plugin login <plugin-id> [dooc.yaml] [port]
59
+ console.log(`usage: dooc plugin <command>
55
60
 
56
- ZIP root: package.json with name, version, type: module and main pointing to bundled .js/.mjs.
57
- Optional icon: path to a bundled SVG asset up to 64 KiB.
58
- Include relative assets (SVG, JSON, etc.); dependencies must already be bundled. Limit: 16 MiB / 256 files.
59
- Default output: <built-dir>.zip. Installed ZIPs: <project>/.dooc/plugins/.
60
- Personal logins and plugin approvals: ~/.dooc/plugins/ (override with DOOC_USER_DIR).
61
- Add/login starts a local editor and prints browser login links. Keep it running while signing in.
62
- Tokens stay on this computer and never enter exported documents.`);
61
+ commands:
62
+ ├─ pack <built-dir> [output.zip] package bundled JS and assets as a plugin ZIP
63
+ ├─ add <zip> [dooc.yaml] [port] install a local plugin and print login links
64
+ └─ login <plugin-id> [dooc.yaml] [port] open a local login flow for an installed plugin
65
+
66
+ options:
67
+ --help, -h show this help
68
+
69
+ Package:
70
+ ZIP root: package.json with name, version, type: module and main pointing to bundled .js/.mjs.
71
+ Optional icon: path to a bundled SVG asset up to 64 KiB.
72
+ Include relative assets (SVG, JSON, etc.); dependencies must already be bundled.
73
+ Limit: 16 MiB / 256 files. Default output: <built-dir>.zip.
74
+
75
+ Storage and login:
76
+ Installed ZIPs: <project>/.dooc/plugins/.
77
+ Personal logins and plugin approvals: ~/.dooc/plugins/ (override with DOOC_USER_DIR).
78
+ Add/login starts a local editor and prints browser login links. Keep it running while signing in.
79
+ Tokens stay on this computer and never enter exported documents.`);
63
80
  break;
64
81
  }
65
82
  if (action === "pack" && value && positionals.length <= 3) {
@@ -113,7 +130,20 @@ Tokens stay on this computer and never enter exported documents.`);
113
130
  options: { help: { type: "boolean", short: "h" } },
114
131
  });
115
132
  if (values.help) {
116
- console.log("usage: dooc font add <file> [dooc.yaml] | list [dooc.yaml] | remove <name> [dooc.yaml]\n\nFonts are copied to <project>/.dooc/fonts/ and included in ZIP and HTML bundles.\nSupported formats: TTF, OTF, WOFF, WOFF2. Existing names are never overwritten.\nReload the viewer after changing registered fonts. Default manifest: ./dooc.yaml.");
133
+ console.log(`usage: dooc font <command>
134
+
135
+ commands:
136
+ ├─ add <file> [dooc.yaml] register a font in the project
137
+ ├─ list [dooc.yaml] list registered project fonts
138
+ └─ remove <name> [dooc.yaml] remove a registered project font
139
+
140
+ options:
141
+ --help, -h show this help
142
+
143
+ Fonts:
144
+ Fonts are copied to <project>/.dooc/fonts/ and included in ZIP and HTML bundles.
145
+ Supported formats: TTF, OTF, WOFF, WOFF2. Existing names are never overwritten.
146
+ Reload the viewer after changing registered fonts. Default manifest: ./dooc.yaml.`);
117
147
  break;
118
148
  }
119
149
  const [action, value, rootArg] = positionals;
@@ -152,27 +182,31 @@ Tokens stay on this computer and never enter exported documents.`);
152
182
  if (values.help) {
153
183
  console.log(`usage: dooc check [dooc.yaml] [options]
154
184
 
185
+ options:
155
186
  --only render,languages,themes select checks (default: all three)
156
187
  manifest validity is always checked
157
- --allow-shared-svg allow identical SVG bytes across themes (missing variants still fail)
158
- --warnings-as-errors fail on warnings as well as errors
159
- --help, -h show this help
188
+ --allow-shared-svg allow identical SVG bytes across themes (missing variants still fail)
189
+ --warnings-as-errors fail on warnings as well as errors
190
+ --help, -h show this help
160
191
 
161
192
  dooc.yaml example:
162
193
  defaultLang: jpn
163
194
  languages: [jpn, eng]
164
195
  themes: [light, dark]
165
196
 
166
- Translations: locales/<ISO 639-3>/<source path>.
167
- Theme variants: themes/<theme>/<asset path>.
168
- stdout: one JSON CheckReport with schemaVersion=1, checks, diagnostics, summary and exitCode.
169
- render uses the viewer compiler; languages checks availability and prose; themes checks variants.
170
- Site declarations determine the expected languages and themes, never CLI overrides.
171
- Diagnostic codes, relative file paths, sourceFile, language, theme and one-based lines are
172
- machine-readable; message text is for humans. Prose detection is heuristic and offline.
173
- Short text, unsupported formats and remote content are reported as unchecked/inconclusive.
174
- Exit codes: 0 passed; 1 errors (or warnings with --warnings-as-errors); 2 invocation/execution failure.
175
- Node API: import { checkSite } from "@dooc-dev/dooc/check".`);
197
+ Checks:
198
+ render uses the viewer compiler
199
+ languages checks availability and prose; translations: locales/<ISO 639-3>/<source path>
200
+ themes checks variants: themes/<theme>/<asset path>
201
+ Site declarations determine the expected languages and themes, never CLI overrides.
202
+
203
+ Report:
204
+ stdout: one JSON CheckReport with schemaVersion=1, checks, diagnostics, summary and exitCode.
205
+ Diagnostic codes, relative file paths, sourceFile, language, theme and one-based lines are
206
+ machine-readable; message text is for humans. Prose detection is heuristic and offline.
207
+ Short text, unsupported formats and remote content are reported as unchecked/inconclusive.
208
+ Exit codes: 0 passed; 1 errors (or warnings with --warnings-as-errors); 2 invocation/execution failure.
209
+ Node API: import { checkSite } from "@dooc-dev/dooc/check".`);
176
210
  break;
177
211
  }
178
212
  if (positionals.length > 1)
@@ -260,31 +294,45 @@ Node API: import { checkSite } from "@dooc-dev/dooc/check".`);
260
294
  },
261
295
  });
262
296
  if (values.help) {
263
- console.log(`usage: dooc build html [dooc.yaml] [out-dir] [--url_preview embed|network]
264
- dooc build html [dooc.yaml] [out-dir] --mode static
265
- dooc build html [dooc.yaml] [out-dir] --mode live --auth external
266
- dooc build zip [dooc.yaml] [out-dir] [--url_preview embed|network]
297
+ console.log(`usage: dooc build <html|zip> [dooc.yaml] [out-dir] [options]
298
+
299
+ commands:
300
+ ├─ html [dooc.yaml] [out-dir] build bundle.html
301
+ │ ├─ --mode static|live HTML snapshot or runtime plugin API
302
+ │ ├─ --auth external host supplies live HTML authentication and transport
303
+ │ └─ --source-url <url> HTTP(S) directory URL for card copy links
304
+ │ paths are relative to dooc.yaml; overrides GitHub origin/HEAD
305
+ └─ zip [dooc.yaml] [out-dir] build bundle.zip
306
+
307
+ options (html and zip):
308
+ --url_preview embed|network URL handling (default: embed; live HTML: network)
309
+ embed snapshot URL content and assets into the selected artifact
310
+ network preserve URL references without downloading them at build time
311
+ --viewer-plugins <module> inject trusted build plugins
312
+ --help, -h show this help
267
313
 
268
- A bundle is dooc.yaml and its managed content. Builds only the selected format.
269
- Default output directory: <project>/dist. Source files are never rewritten.
270
- Static builds resolve enabled local plugins using build-time credentials and embed their views.
271
- Live HTML exposes window.dooc.setPluginTransport(request), without a login UI or credentials.
272
- Use --viewer-plugins <module> to inject trusted build plugins; installed, enabled packages are discovered automatically.
273
- Use dooc export for source dependencies without plugin execution or remote downloads.
274
- --source-url <url> inject an HTTP(S) directory URL for card copy links (HTML only)
275
- paths are relative to dooc.yaml; overrides GitHub origin/HEAD discovery
276
- --url_preview embed snapshot URL content and assets into the selected artifact (default)
277
- --url_preview network preserve URL references without downloading them at build time
314
+ Output:
315
+ A bundle is dooc.yaml and its managed content. Builds only the selected format.
316
+ Default output directory: <project>/dist. Source files are never rewritten.
317
+ Use dooc export for source dependencies without plugin execution or remote downloads.
278
318
 
279
- HTML embed: no network when opened. HTML network: fetch URLs when opened (text requires CORS).
280
- ZIP embed: save URL content and rewrite references. ZIP network: keep the original URLs.
319
+ HTML modes:
320
+ static resolve enabled local plugins using build-time credentials and embed their views
321
+ installed, enabled packages are discovered automatically
322
+ live expose window.dooc.setPluginTransport(request), without a login UI or credentials
323
+ Examples:
324
+ dooc build html --mode static
325
+ dooc build html --mode live --auth external
281
326
 
282
- Only embedded references such as ![](url) are downloaded; ordinary hyperlinks remain links.
283
- Snapshots use public HTTPS without credentials or redirects. Static HTML captures the server's
284
- HTML and declarative assets; it does not execute the source site's JavaScript or perform login.
285
- Remote files are limited to 2 MiB each and 64 MiB / 256 assets total.
286
- A failed download or invalid source stops the build before replacing the selected artifact.
287
- Use --url_preview network with either format to build without downloading URL content.`);
327
+ URL handling:
328
+ HTML embed: no network when opened. HTML network: fetch URLs when opened (text requires CORS).
329
+ ZIP embed: save URL content and rewrite references. ZIP network: keep the original URLs.
330
+ Only embedded references such as ![](url) are downloaded; ordinary hyperlinks remain links.
331
+ Snapshots use public HTTPS without credentials or redirects. Static HTML captures the server's
332
+ HTML and declarative assets; it does not execute the source site's JavaScript or perform login.
333
+ Remote files are limited to 2 MiB each and 64 MiB / 256 assets total.
334
+ A failed download or invalid source stops the build before replacing the selected artifact.
335
+ Use --url_preview network with either format to build without downloading URL content.`);
288
336
  break;
289
337
  }
290
338
  const [format, rootArg, outArg] = positionals;
@@ -325,7 +373,20 @@ Use --url_preview network with either format to build without downloading URL co
325
373
  },
326
374
  });
327
375
  if (values.help) {
328
- console.log("usage: dooc mcp [dooc.yaml] [--git-origin <module>]\n\nExposes docs, files, Statics, fonts, check, build and Git over stdio.\nBuild accepts format=html|zip and url_preview=embed|network (default embed).\nThe external module's default export must contain gitOrigin (the same provider used by edit/view).\nOnly gitOrigin is used; viewer setup and data plugins are not started. Authentication stays in the provider.");
376
+ console.log(`usage: dooc mcp [dooc.yaml] [options]
377
+
378
+ options:
379
+ --git-origin <module> inject gitOrigin from an external viewer plugin module
380
+ --help, -h show this help
381
+
382
+ Server:
383
+ Exposes docs, files, Statics, fonts, check, build and Git over stdio.
384
+ Build accepts format=html|zip and url_preview=embed|network (default embed).
385
+
386
+ Git origin:
387
+ The external module's default export must contain gitOrigin (the same provider used by edit/view).
388
+ Only gitOrigin is used; viewer setup and data plugins are not started.
389
+ Authentication stays in the provider.`);
329
390
  break;
330
391
  }
331
392
  if (positionals.length > 1)