@dooc-dev/dooc 0.0.10 → 0.0.11

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/README.md CHANGED
@@ -14,6 +14,27 @@ dooc turns a folder of Markdown, data files, and schema-backed records into one
14
14
  | mise | `mise use -g github:dooc-dev/dooc@latest` |
15
15
  | Homebrew | `brew tap dooc-dev/dooc https://github.com/dooc-dev/dooc && brew install dooc-dev/dooc/dooc` |
16
16
 
17
+ npm requires Node.js 22 or later. Standalone executables support Linux (glibc) and macOS on x64 and arm64. The curl installer writes to `~/.local/bin`; add it to `PATH` if needed.
18
+
19
+ ## Start a project
20
+
21
+ ```sh
22
+ mkdir my-docs && cd my-docs
23
+ dooc init
24
+ dooc edit
25
+ ```
26
+
27
+ Open the URL printed in the terminal and add your first page in the editor. Keep the command running while editing. `dooc view` opens the same workspace read-only.
28
+
29
+ After saving your pages, stop the editor with **Ctrl+C**, then check and build:
30
+
31
+ ```sh
32
+ dooc check
33
+ dooc build html
34
+ ```
35
+
36
+ Share `dist/bundle.html` as a single file. `dooc check` validates local content; it does not fetch remote URLs.
37
+
17
38
  ## Documentation
18
39
 
19
40
  ```sh
@@ -21,7 +42,11 @@ dooc view dooc-docs --repo https://github.com/dooc-dev/dooc.git
21
42
  dooc edit dooc-docs --repo https://github.com/dooc-dev/dooc.git
22
43
  ```
23
44
 
24
- Requires Git. `view` opens a temporary read-only copy; `edit` keeps a local clone and preserves your changes.
45
+ Requires Git and a network connection for the initial clone. Documentation is downloaded at runtime, separately from the npm package and standalone executable.
46
+
47
+ `view` downloads a fresh temporary read-only copy each time and removes it on exit. `edit` keeps a local clone and reopens your saved changes without fetching updates automatically; use the editor's Git tools to fetch and pull. Keep the command running while using either mode.
48
+
49
+ See [Commands](dooc-docs/contents/md/cli.md) for CLI options and Git workspace limitations, [Editor](dooc-docs/contents/md/editor.md) for editing and branch controls, and [Install](dooc-docs/contents/md/install.md) for updates.
25
50
 
26
51
  ## License
27
52
 
@@ -518,6 +518,7 @@ main { --doc-mono: var(--viewer-font, ${MONO_FONT}); }
518
518
  .page-actions, .pane-actions { position: sticky; display: flex; align-items: center; justify-content: flex-end;
519
519
  gap: 2px; height: 36px; padding: 0 24px; pointer-events: none; z-index: 5; }
520
520
  :is(.page-actions, .pane-actions) > .pbtn { pointer-events: auto; background: var(--c-bg0); }
521
+ .pane-actions > .pbtn { background: inherit; }
521
522
  .page-actions { top: 0; margin: -20px -24px -36px; }
522
523
  .pbtn { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
523
524
  padding: 0; color: var(--c-fg-faint); background: none; border: none; border-radius: 5px; cursor: pointer;
@@ -1197,7 +1198,7 @@ body.extensions-over #nav-extensions, body.extensions-over .extensions-dropzone
1197
1198
  .resource-results:has([data-subformat-board]:not([hidden])) .resource-search { flex: 1 1 160px; max-width: 260px; height: 30px; box-sizing: border-box; gap: 8px; padding: 0 8px; border: 1px solid var(--c-line); border-radius: 4px; background: var(--c-bg0); }
1198
1199
  .resource-results:has([data-subformat-board]:not([hidden])) .resource-search:focus-within { border-color: var(--c-accent); }
1199
1200
  .resource-results:has([data-subformat-board]:not([hidden])) .resource-count { display: none; }
1200
- .resources-pane:has([data-subformat-board]:not([hidden])) :is(.preview-content, .resource-library, .resource-results, [data-subformat-board]) { display: flex; flex-direction: column; flex: 1; }
1201
+ .resources-pane:has([data-subformat-board]:not([hidden])) :is(.preview-content, .resource-library, .resource-results, [data-subformat-board]):not([hidden]) { display: flex; flex-direction: column; flex: 1; }
1201
1202
  .resources-pane:has([data-subformat-board]:not([hidden])) .preview-content { min-height: 100%; }
1202
1203
  .resource-results:has(> .resource-empty:not([hidden])) [data-subformat-board] { flex: none; }
1203
1204
  .resource-results:has(> .resource-empty:not([hidden])) .subformat-columns { display: none; }
@@ -1713,7 +1714,7 @@ body.edit #nav-groups { --nav-rail: 22px; --nav-icon-half: 9px; }
1713
1714
 
1714
1715
  main.editor-workspace { padding: 0; height: 100vh; display: flex; flex-direction: column; position: sticky; top: 0; }
1715
1716
  #split-preview[aria-pressed="true"] { color: var(--c-accent); background: var(--c-raised); }
1716
- .pane-actions { flex-wrap: wrap; top: -20px; margin: -20px -24px 16px; padding: 4px 12px; min-height: 38px; height: auto; background: var(--c-bg0); }
1717
+ .pane-actions { flex-wrap: wrap; top: -20px; margin: -20px -24px 16px; padding: 4px 12px; min-height: 38px; height: auto; background: inherit; }
1717
1718
  .pane-resource { min-width: 0; }
1718
1719
  #preview-panes { display: flex; flex: 1; min-height: 0; }
1719
1720
  #preview-panes[hidden] { display: none; }
@@ -55,7 +55,7 @@ commands:
55
55
  --git-origin <module> inject gitOrigin from an external viewer plugin module
56
56
  help, --help, -h show this help
57
57
 
58
- Details: dooc <command> --help (init, edit, view, build, check, plugin, font, self, mcp).
58
+ Details: dooc <command> --help (init, edit, view, server, client, build, export, check, plugin, font, self, mcp).
59
59
  Default manifest: ./dooc.yaml. Named manifests (<name>.dooc.yaml) are also accepted.
60
60
  Paths use the current directory, or the repository root when --repo is given.
61
61
  Example: dooc view dooc-docs --repo https://github.com/dooc-dev/dooc.git
@@ -296,9 +296,11 @@ options:
296
296
  --help, -h show this help
297
297
 
298
298
  dooc.yaml example:
299
- defaultLang: jpn
300
- languages: [jpn, eng]
301
- themes: [light, dark]
299
+ system:
300
+ default_lang: jpn
301
+ languages: [jpn, eng]
302
+ themes: [light, dark]
303
+ center_contents: []
302
304
 
303
305
  Checks:
304
306
  render uses the viewer compiler
@@ -496,10 +498,27 @@ Example: dooc ${command} dooc-docs --repo https://github.com/dooc-dev/dooc.git`)
496
498
  }
497
499
  case "export": {
498
500
  try {
499
- if (args.length > 2)
501
+ const { positionals, values } = parseArgs({
502
+ args,
503
+ allowPositionals: true,
504
+ options: { help: { type: "boolean", short: "h" } },
505
+ });
506
+ if (values.help) {
507
+ console.log(`usage: dooc export [dooc.yaml] [out-dir]
508
+
509
+ Collect the workspace's source dependencies into bundle.zip.
510
+ Default manifest: ./dooc.yaml; named manifests are also accepted.
511
+ Default output directory: <project>/dist.
512
+ Configuration and plugins are not executed. Remote URLs stay unchanged; nothing is downloaded.
513
+
514
+ options:
515
+ --help, -h show this help`);
516
+ break;
517
+ }
518
+ if (positionals.length > 2)
500
519
  throw new Error("export accepts a dooc.yaml path and an output directory");
501
- const root = projectRoot(args[0]);
502
- const out = join(resolve(args[1] ?? join(root, "dist")), "bundle.zip");
520
+ const root = projectRoot(positionals[0]);
521
+ const out = join(resolve(positionals[1] ?? join(root, "dist")), "bundle.zip");
503
522
  const { exportBundle } = await import("../engine/compiler/export.js");
504
523
  writeOut(out, exportBundle(root));
505
524
  console.log(out);
@@ -675,6 +675,7 @@ main { --doc-mono: var(--viewer-font, ${MONO_FONT}); }
675
675
  .page-actions, .pane-actions { position: sticky; display: flex; align-items: center; justify-content: flex-end;
676
676
  gap: 2px; height: 36px; padding: 0 24px; pointer-events: none; z-index: 5; }
677
677
  :is(.page-actions, .pane-actions) > .pbtn { pointer-events: auto; background: var(--c-bg0); }
678
+ .pane-actions > .pbtn { background: inherit; }
678
679
  .page-actions { top: 0; margin: -20px -24px -36px; }
679
680
  .pbtn { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
680
681
  padding: 0; color: var(--c-fg-faint); background: none; border: none; border-radius: 5px; cursor: pointer;
@@ -1354,7 +1355,7 @@ body.extensions-over #nav-extensions, body.extensions-over .extensions-dropzone
1354
1355
  .resource-results:has([data-subformat-board]:not([hidden])) .resource-search { flex: 1 1 160px; max-width: 260px; height: 30px; box-sizing: border-box; gap: 8px; padding: 0 8px; border: 1px solid var(--c-line); border-radius: 4px; background: var(--c-bg0); }
1355
1356
  .resource-results:has([data-subformat-board]:not([hidden])) .resource-search:focus-within { border-color: var(--c-accent); }
1356
1357
  .resource-results:has([data-subformat-board]:not([hidden])) .resource-count { display: none; }
1357
- .resources-pane:has([data-subformat-board]:not([hidden])) :is(.preview-content, .resource-library, .resource-results, [data-subformat-board]) { display: flex; flex-direction: column; flex: 1; }
1358
+ .resources-pane:has([data-subformat-board]:not([hidden])) :is(.preview-content, .resource-library, .resource-results, [data-subformat-board]):not([hidden]) { display: flex; flex-direction: column; flex: 1; }
1358
1359
  .resources-pane:has([data-subformat-board]:not([hidden])) .preview-content { min-height: 100%; }
1359
1360
  .resource-results:has(> .resource-empty:not([hidden])) [data-subformat-board] { flex: none; }
1360
1361
  .resource-results:has(> .resource-empty:not([hidden])) .subformat-columns { display: none; }
@@ -1865,7 +1866,7 @@ body.edit #nav-groups { --nav-rail: 22px; --nav-icon-half: 9px; }
1865
1866
 
1866
1867
  main.editor-workspace { padding: 0; height: 100vh; display: flex; flex-direction: column; position: sticky; top: 0; }
1867
1868
  #split-preview[aria-pressed="true"] { color: var(--c-accent); background: var(--c-raised); }
1868
- .pane-actions { flex-wrap: wrap; top: -20px; margin: -20px -24px 16px; padding: 4px 12px; min-height: 38px; height: auto; background: var(--c-bg0); }
1869
+ .pane-actions { flex-wrap: wrap; top: -20px; margin: -20px -24px 16px; padding: 4px 12px; min-height: 38px; height: auto; background: inherit; }
1869
1870
  .pane-resource { min-width: 0; }
1870
1871
  #preview-panes { display: flex; flex: 1; min-height: 0; }
1871
1872
  #preview-panes[hidden] { display: none; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dooc-dev/dooc",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "View and edit source files with dooc.yaml configuration, and share them as source ZIPs or standalone HTML.",
5
5
  "license": "MIT",
6
6
  "type": "module",