@open-document/core 0.1.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 (52) hide show
  1. package/dist/{build-BWZJ1gvL.js → build-C3pMGxJN.js} +2 -6
  2. package/dist/check-Dtwb1wvU.js +42 -0
  3. package/dist/cli/bin.d.ts +1 -1
  4. package/dist/cli/bin.js +124 -13
  5. package/dist/{config-EBFfKtWH.d.ts → config-CSC5lHsR.d.ts} +3 -2
  6. package/dist/config-Dg1AMP0r.js +2461 -0
  7. package/dist/context-FoX0afRf.js +26 -0
  8. package/dist/{dev-CZtw1oqs.js → dev-Cdd7NZRQ.js} +2 -6
  9. package/dist/diagram-xlVDekYk.js +763 -0
  10. package/dist/export-ClJ4T1uU.js +36 -0
  11. package/dist/import-D7Psi8WK.js +25 -0
  12. package/dist/index.d.ts +238 -117
  13. package/dist/index.js +516 -57
  14. package/dist/ops/index.d.ts +98 -8
  15. package/dist/ops/index.js +3 -202
  16. package/dist/ops-Ci5Xw6QG.js +1270 -0
  17. package/dist/{preview-DUfQl7Ij.js → preview-BhbCiAKC.js} +2 -6
  18. package/dist/sdk-CWMsH9Ms.d.ts +123 -0
  19. package/dist/vite/index.d.ts +9 -4
  20. package/dist/vite/index.js +2 -5
  21. package/env.d.ts +33 -1
  22. package/package.json +17 -6
  23. package/skills/create-doc/SKILL.md +6 -2
  24. package/skills/current-doc/SKILL.md +120 -0
  25. package/skills/doc-authoring/SKILL.md +79 -0
  26. package/skills/doc-authoring/references/long-form.md +131 -0
  27. package/src/app/components/data-table.tsx +196 -0
  28. package/src/app/components/diagram.tsx +76 -0
  29. package/src/app/components/flow-page.tsx +20 -3
  30. package/src/app/components/footnote.tsx +196 -0
  31. package/src/app/components/inspector/inspector.tsx +16 -0
  32. package/src/app/components/numbering.tsx +208 -0
  33. package/src/app/lib/agent-bridge.ts +128 -0
  34. package/src/app/lib/diagnostics.ts +282 -0
  35. package/src/app/lib/export-html.ts +35 -11
  36. package/src/app/lib/export-pdf.ts +54 -19
  37. package/src/app/lib/flow-measure.ts +100 -31
  38. package/src/app/lib/flow.test.ts +46 -0
  39. package/src/app/lib/flow.ts +28 -3
  40. package/src/app/lib/footnotes.test.tsx +102 -0
  41. package/src/app/lib/footnotes.ts +94 -0
  42. package/src/app/lib/labels.ts +175 -0
  43. package/src/app/lib/page-context.tsx +6 -1
  44. package/src/app/lib/scan.ts +26 -0
  45. package/src/app/lib/sdk.ts +3 -0
  46. package/src/app/lib/use-doc-pages.ts +50 -15
  47. package/src/app/routes/doc.tsx +25 -5
  48. package/dist/config-DBp4mOOf.js +0 -1121
  49. package/dist/design-BJLvOcCO.js +0 -53
  50. package/dist/edit-ops-DSdUroVO.js +0 -1225
  51. package/dist/sync-6GTPAt2t.js +0 -86
  52. package/dist/sync-C6CsPmyK.js +0 -3
@@ -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,8 +1,5 @@
1
- import "./design-BJLvOcCO.js";
2
- import "./edit-ops-DSdUroVO.js";
3
- import { createViteConfig } from "./config-DBp4mOOf.js";
1
+ import { t as createViteConfig } from "./config-Dg1AMP0r.js";
4
2
  import { createServer, mergeConfig } from "vite";
5
-
6
3
  //#region src/cli/dev.ts
7
4
  async function dev(opts = {}) {
8
5
  const base = await createViteConfig({
@@ -19,6 +16,5 @@ async function dev(opts = {}) {
19
16
  server.printUrls();
20
17
  server.bindCLIShortcuts({ print: true });
21
18
  }
22
-
23
19
  //#endregion
24
- export { dev };
20
+ export { dev };