@open-document/core 0.2.0 → 0.3.0

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 (46) hide show
  1. package/dist/{build-U81g9Hnk.js → build-C3pMGxJN.js} +1 -1
  2. package/dist/check-Dtwb1wvU.js +42 -0
  3. package/dist/cli/bin.js +24 -3
  4. package/dist/config-Dg1AMP0r.js +2461 -0
  5. package/dist/context-FoX0afRf.js +26 -0
  6. package/dist/{dev-DwwFT6uX.js → dev-Cdd7NZRQ.js} +1 -1
  7. package/dist/diagram-xlVDekYk.js +763 -0
  8. package/dist/export-ClJ4T1uU.js +36 -0
  9. package/dist/import-D7Psi8WK.js +25 -0
  10. package/dist/index.d.ts +235 -90
  11. package/dist/index.js +515 -49
  12. package/dist/ops/index.d.ts +96 -1
  13. package/dist/ops/index.js +3 -199
  14. package/dist/ops-Ci5Xw6QG.js +1270 -0
  15. package/dist/{preview-C_jbySle.js → preview-BhbCiAKC.js} +1 -1
  16. package/dist/sdk-CWMsH9Ms.d.ts +123 -0
  17. package/dist/vite/index.d.ts +6 -0
  18. package/dist/vite/index.js +1 -2
  19. package/env.d.ts +33 -1
  20. package/package.json +10 -1
  21. package/skills/create-doc/SKILL.md +6 -2
  22. package/skills/doc-authoring/SKILL.md +79 -0
  23. package/skills/doc-authoring/references/long-form.md +131 -0
  24. package/src/app/components/data-table.tsx +196 -0
  25. package/src/app/components/diagram.tsx +76 -0
  26. package/src/app/components/flow-page.tsx +20 -3
  27. package/src/app/components/footnote.tsx +196 -0
  28. package/src/app/components/numbering.tsx +208 -0
  29. package/src/app/lib/agent-bridge.ts +128 -0
  30. package/src/app/lib/diagnostics.ts +282 -0
  31. package/src/app/lib/export-html.ts +35 -11
  32. package/src/app/lib/export-pdf.ts +54 -19
  33. package/src/app/lib/flow-measure.ts +100 -31
  34. package/src/app/lib/flow.test.ts +46 -0
  35. package/src/app/lib/flow.ts +28 -3
  36. package/src/app/lib/footnotes.test.tsx +102 -0
  37. package/src/app/lib/footnotes.ts +94 -0
  38. package/src/app/lib/labels.ts +175 -0
  39. package/src/app/lib/page-context.tsx +6 -1
  40. package/src/app/lib/scan.ts +26 -0
  41. package/src/app/lib/sdk.ts +3 -0
  42. package/src/app/lib/use-doc-pages.ts +50 -15
  43. package/src/app/routes/doc.tsx +7 -4
  44. package/dist/config-8zkUElGq.js +0 -1169
  45. package/dist/design-IyRSwCtK.js +0 -52
  46. package/dist/edit-ops-D2W2plpc.js +0 -1190
@@ -0,0 +1,26 @@
1
+ import { D as makeContext, k as loadUserConfig } from "./config-Dg1AMP0r.js";
2
+ import { readFile } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ //#region src/cli/context.ts
6
+ async function coreVersion() {
7
+ try {
8
+ const here = path.dirname(fileURLToPath(import.meta.url));
9
+ const raw = await readFile(path.resolve(here, "..", "..", "package.json"), "utf8");
10
+ return JSON.parse(raw).version ?? "0.0.0";
11
+ } catch {
12
+ return "0.0.0";
13
+ }
14
+ }
15
+ /** The same context the dev API and the MCP server run on, for commands that call `ops/`. */
16
+ async function cliContext(userCwd = process.cwd()) {
17
+ const config = await loadUserConfig(userCwd);
18
+ return makeContext({
19
+ userCwd,
20
+ docsDir: config.docsDir ?? "docs",
21
+ assetsDir: config.assetsDir ?? "assets",
22
+ coreVersion: await coreVersion()
23
+ });
24
+ }
25
+ //#endregion
26
+ export { cliContext as t };
@@ -1,4 +1,4 @@
1
- import { t as createViteConfig } from "./config-8zkUElGq.js";
1
+ import { t as createViteConfig } from "./config-Dg1AMP0r.js";
2
2
  import { createServer, mergeConfig } from "vite";
3
3
  //#region src/cli/dev.ts
4
4
  async function dev(opts = {}) {