@open-document/core 0.2.0 → 0.4.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 (54) hide show
  1. package/README.md +1 -0
  2. package/README.zh-TW.md +1 -0
  3. package/dist/{build-U81g9Hnk.js → build-BzhYQKev.js} +1 -1
  4. package/dist/check-CCAaXofH.js +42 -0
  5. package/dist/cli/bin.js +45 -12
  6. package/dist/config-CNr8hd5X.js +2461 -0
  7. package/dist/{config-CSC5lHsR.d.ts → config-P61niZMf.d.ts} +6 -0
  8. package/dist/context-CJpdjYfU.js +15 -0
  9. package/dist/{dev-DwwFT6uX.js → dev-BhXgunme.js} +1 -1
  10. package/dist/diagram-xlVDekYk.js +763 -0
  11. package/dist/export-B69kDkyp.js +36 -0
  12. package/dist/import-DBhCpUsl.js +26 -0
  13. package/dist/index.d.ts +236 -91
  14. package/dist/index.js +516 -88
  15. package/dist/ops/index.d.ts +96 -1
  16. package/dist/ops/index.js +4 -199
  17. package/dist/ops-BCBmRMCS.js +1275 -0
  18. package/dist/{preview-C_jbySle.js → preview-Da4Aq9yF.js} +1 -1
  19. package/dist/sdk-C9nl30dW.d.ts +129 -0
  20. package/dist/sdk-DhcqZdAw.js +50 -0
  21. package/dist/vite/index.d.ts +7 -1
  22. package/dist/vite/index.js +1 -2
  23. package/env.d.ts +33 -1
  24. package/package.json +10 -1
  25. package/skills/create-doc/SKILL.md +7 -3
  26. package/skills/create-theme/SKILL.md +1 -1
  27. package/skills/doc-authoring/SKILL.md +86 -6
  28. package/skills/doc-authoring/references/long-form.md +131 -0
  29. package/skills/doc-authoring/references/pagination.md +2 -1
  30. package/src/app/components/data-table.tsx +196 -0
  31. package/src/app/components/diagram.tsx +76 -0
  32. package/src/app/components/flow-page.tsx +20 -3
  33. package/src/app/components/footnote.tsx +196 -0
  34. package/src/app/components/numbering.tsx +208 -0
  35. package/src/app/components/themes/theme-preview.tsx +2 -2
  36. package/src/app/lib/agent-bridge.ts +128 -0
  37. package/src/app/lib/diagnostics.ts +282 -0
  38. package/src/app/lib/export-html.ts +35 -11
  39. package/src/app/lib/export-pdf.ts +54 -19
  40. package/src/app/lib/flow-measure.ts +100 -31
  41. package/src/app/lib/flow.test.ts +46 -0
  42. package/src/app/lib/flow.ts +28 -3
  43. package/src/app/lib/footnotes.test.tsx +102 -0
  44. package/src/app/lib/footnotes.ts +94 -0
  45. package/src/app/lib/labels.ts +175 -0
  46. package/src/app/lib/page-context.tsx +6 -1
  47. package/src/app/lib/scan.ts +26 -0
  48. package/src/app/lib/sdk.test.ts +15 -9
  49. package/src/app/lib/sdk.ts +37 -11
  50. package/src/app/lib/use-doc-pages.ts +50 -15
  51. package/src/app/routes/doc.tsx +158 -115
  52. package/dist/config-8zkUElGq.js +0 -1169
  53. package/dist/design-IyRSwCtK.js +0 -52
  54. package/dist/edit-ops-D2W2plpc.js +0 -1190
@@ -7,6 +7,12 @@ type OpenDocBuildConfig = {
7
7
  };
8
8
  type OpenDocConfig = {
9
9
  base?: string;
10
+ /**
11
+ * Where the viewer's back affordance goes. Unset it points at this app's own
12
+ * document browser; set it to escape the app entirely — a viewer mounted
13
+ * under a larger site needs to return to that site, not to its own index.
14
+ */
15
+ home?: string;
10
16
  docsDir?: string;
11
17
  themesDir?: string;
12
18
  assetsDir?: string;
@@ -0,0 +1,15 @@
1
+ import { t as readCoreVersion } from "./cli/bin.js";
2
+ import { D as makeContext, k as loadUserConfig } from "./config-CNr8hd5X.js";
3
+ //#region src/cli/context.ts
4
+ /** The same context the dev API and the MCP server run on, for commands that call `ops/`. */
5
+ async function cliContext(userCwd = process.cwd()) {
6
+ const config = await loadUserConfig(userCwd);
7
+ return makeContext({
8
+ userCwd,
9
+ docsDir: config.docsDir ?? "docs",
10
+ assetsDir: config.assetsDir ?? "assets",
11
+ coreVersion: await readCoreVersion()
12
+ });
13
+ }
14
+ //#endregion
15
+ export { cliContext as t };
@@ -1,4 +1,4 @@
1
- import { t as createViteConfig } from "./config-8zkUElGq.js";
1
+ import { t as createViteConfig } from "./config-CNr8hd5X.js";
2
2
  import { createServer, mergeConfig } from "vite";
3
3
  //#region src/cli/dev.ts
4
4
  async function dev(opts = {}) {