@open-document/core 0.9.0 → 0.10.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 (88) hide show
  1. package/dist/{build-CFL7nhz0.js → build-DJMLK50m.js} +1 -1
  2. package/dist/{check-CL0-0eB8.js → check-CUKuufBm.js} +3 -3
  3. package/dist/cli/bin.js +10 -6
  4. package/dist/{config-4nz5NnxW.js → config-CvzpyAUA.js} +558 -546
  5. package/dist/{context-BH8C-dSW.js → context-B4ip7SoI.js} +1 -1
  6. package/dist/{dev-BCSUczXW.js → dev-dnH7DTlD.js} +1 -1
  7. package/dist/{diagram-xlVDekYk.js → diagram-BK4jTZr4.js} +231 -158
  8. package/dist/diff-QTo0A5Rx.js +44 -0
  9. package/dist/{export-CmVJdl9a.js → export-BrRFrexj.js} +3 -3
  10. package/dist/{import-E6vRo7xm.js → import-C14Vn9ER.js} +2 -2
  11. package/dist/index.d.ts +54 -3
  12. package/dist/index.js +457 -18
  13. package/dist/ops/index.d.ts +72 -17
  14. package/dist/ops/index.js +3 -3
  15. package/dist/{ops-OZZVBgsM.js → ops-DKidjLXP.js} +642 -124
  16. package/dist/{preview-CwCrw-i3.js → preview-wKM4C6Uk.js} +1 -1
  17. package/dist/{sdk-BqU6mwD_.d.ts → sdk-CpDEGRIo.d.ts} +2 -0
  18. package/dist/vite/index.js +1 -1
  19. package/package.json +2 -2
  20. package/skills/doc-authoring/SKILL.md +13 -6
  21. package/skills/doc-authoring/references/pagination.md +1 -1
  22. package/skills/doc-authoring/references/tables-and-charts.md +18 -1
  23. package/src/app/components/browser/browser-ui.tsx +105 -0
  24. package/src/app/components/chart.tsx +239 -0
  25. package/src/app/components/command-palette.tsx +284 -0
  26. package/src/app/components/design-panel/design-panel.tsx +22 -20
  27. package/src/app/components/design-panel/design-provider.tsx +4 -2
  28. package/src/app/components/diagram.tsx +11 -1
  29. package/src/app/components/doc-assets.tsx +6 -5
  30. package/src/app/components/doc-search.tsx +12 -10
  31. package/src/app/components/doc-sidebar.tsx +24 -18
  32. package/src/app/components/flow-page.tsx +2 -0
  33. package/src/app/components/inspector/inspector.tsx +75 -48
  34. package/src/app/components/language-toggle.tsx +38 -0
  35. package/src/app/components/palette-items.ts +128 -0
  36. package/src/app/components/panel/edit-save-card.tsx +4 -2
  37. package/src/app/components/panel/fields.tsx +5 -2
  38. package/src/app/components/panel/save-card.tsx +18 -10
  39. package/src/app/components/sidebar/folder-item.tsx +10 -8
  40. package/src/app/components/sidebar/icon-picker.tsx +3 -1
  41. package/src/app/components/sidebar/sidebar.tsx +44 -13
  42. package/src/app/components/theme-toggle.tsx +5 -3
  43. package/src/app/components/ui/menu.tsx +5 -0
  44. package/src/app/lib/agent-bridge.ts +8 -2
  45. package/src/app/lib/chart.test.ts +108 -0
  46. package/src/app/lib/chart.ts +343 -0
  47. package/src/app/lib/doc-preview.tsx +0 -10
  48. package/src/app/lib/docs.ts +3 -0
  49. package/src/app/lib/docx/from-dom.ts +11 -11
  50. package/src/app/lib/docx/ooxml.test.ts +25 -9
  51. package/src/app/lib/docx/ooxml.ts +58 -37
  52. package/src/app/lib/export-docx.ts +13 -8
  53. package/src/app/lib/export-dom.ts +4 -0
  54. package/src/app/lib/export-image.ts +2 -0
  55. package/src/app/lib/export-pdf.ts +6 -0
  56. package/src/app/lib/flow-measure.ts +3 -0
  57. package/src/app/lib/flow.ts +1 -1
  58. package/src/app/lib/i18n-ja/browser.ts +88 -0
  59. package/src/app/lib/i18n-ja/doc.ts +65 -0
  60. package/src/app/lib/i18n-ja/index.ts +5 -0
  61. package/src/app/lib/i18n-ja/panels.ts +104 -0
  62. package/src/app/lib/i18n-ko/browser.ts +87 -0
  63. package/src/app/lib/i18n-ko/doc.ts +65 -0
  64. package/src/app/lib/i18n-ko/index.ts +5 -0
  65. package/src/app/lib/i18n-ko/panels.ts +102 -0
  66. package/src/app/lib/i18n-zh-cn/browser.ts +84 -0
  67. package/src/app/lib/i18n-zh-cn/doc.ts +64 -0
  68. package/src/app/lib/i18n-zh-cn/index.ts +5 -0
  69. package/src/app/lib/i18n-zh-cn/panels.ts +98 -0
  70. package/src/app/lib/i18n-zh-tw/browser.ts +84 -0
  71. package/src/app/lib/i18n-zh-tw/doc.ts +64 -0
  72. package/src/app/lib/i18n-zh-tw/index.ts +5 -0
  73. package/src/app/lib/i18n-zh-tw/panels.ts +99 -0
  74. package/src/app/lib/i18n.test.ts +24 -0
  75. package/src/app/lib/i18n.tsx +109 -0
  76. package/src/app/lib/outline.ts +23 -0
  77. package/src/app/lib/page-range.test.ts +10 -1
  78. package/src/app/lib/page-range.ts +26 -0
  79. package/src/app/lib/sdk.ts +2 -0
  80. package/src/app/lib/svg-ids.ts +37 -0
  81. package/src/app/main.tsx +4 -1
  82. package/src/app/routes/assets.tsx +193 -132
  83. package/src/app/routes/doc.tsx +666 -310
  84. package/src/app/routes/home-shell.tsx +115 -88
  85. package/src/app/routes/home.tsx +200 -67
  86. package/src/app/routes/themes.tsx +42 -35
  87. package/src/app/styles.css +99 -0
  88. package/src/app/virtual.d.ts +1 -0
@@ -1,4 +1,4 @@
1
- import { t as createViteConfig } from "./config-4nz5NnxW.js";
1
+ import { t as createViteConfig } from "./config-CvzpyAUA.js";
2
2
  import path from "node:path";
3
3
  import { build as build$1, mergeConfig } from "vite";
4
4
  //#region src/cli/build.ts
@@ -1,6 +1,6 @@
1
- import { _ as listDocIds } from "./config-4nz5NnxW.js";
2
- import { d as closeRenderSession, u as checkLayout } from "./ops-OZZVBgsM.js";
3
- import { t as cliContext } from "./context-BH8C-dSW.js";
1
+ import { f as listDocIds } from "./config-CvzpyAUA.js";
2
+ import { d as closeRenderSession, u as checkLayout } from "./ops-DKidjLXP.js";
3
+ import { t as cliContext } from "./context-B4ip7SoI.js";
4
4
  import chalk from "chalk";
5
5
  //#region src/cli/check.ts
6
6
  function line(finding) {
package/dist/cli/bin.js CHANGED
@@ -165,27 +165,31 @@ async function run(argv) {
165
165
  program.name("open-doc").description("Author documents — we handle the Vite/React stack, pagination, and export.").version(version, "-v, --version", "print version").helpOption("-h, --help", "show help").showHelpAfterError(chalk.dim("(run `open-doc --help` for usage)"));
166
166
  program.command("dev").description("Start the dev server").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").option("--no-skills-check", "skip the built-in skills drift check").option("--mcp", "serve an MCP endpoint at /mcp (requires @open-document/mcp)").action(async (flags) => {
167
167
  if (flags.skillsCheck !== false) await runSkillsDriftCheck(resolveBuiltinSkillsDir());
168
- const { dev } = await import("../dev-BCSUczXW.js");
168
+ const { dev } = await import("../dev-dnH7DTlD.js");
169
169
  await dev(flags);
170
170
  });
171
171
  program.command("build").description("Build a static site").option("--out-dir <dir>", "output directory (defaults to `dist`)").action(async (flags) => {
172
- const { build } = await import("../build-CFL7nhz0.js");
172
+ const { build } = await import("../build-DJMLK50m.js");
173
173
  await build(flags);
174
174
  });
175
175
  program.command("preview").description("Preview the production build").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").action(async (flags) => {
176
- const { preview } = await import("../preview-CwCrw-i3.js");
176
+ const { preview } = await import("../preview-wKM4C6Uk.js");
177
177
  await preview(flags);
178
178
  });
179
179
  program.command("export [docIds...]").description("Render documents headlessly to PDF, HTML, PNG, or DOCX").addOption(new Option("-f, --format <format>", "output format").choices([...EXPORT_FORMATS])).option("-o, --out-dir <dir>", "directory to write into (defaults to `out`)").option("--all", "export every document under docs/").action(async (docIds, flags) => {
180
- const { exportDocs } = await import("../export-CmVJdl9a.js");
180
+ const { exportDocs } = await import("../export-BrRFrexj.js");
181
181
  await exportDocs(docIds, flags);
182
182
  });
183
+ program.command("diff <docId>").description("Show what changed in a document since a git revision, page by page").option("-s, --since <rev>", "revision to compare against (defaults to HEAD)").option("-o, --out-dir <dir>", "directory to write the report into (defaults to `out`)").option("--json", "print the result as JSON").action(async (docId, flags) => {
184
+ const { diffDoc } = await import("../diff-QTo0A5Rx.js");
185
+ await diffDoc(docId, flags);
186
+ });
183
187
  program.command("check [docIds...]").description("Report layout faults — clipped content, blank sheets, stranded headings").option("--json", "print the full report as JSON").action(async (docIds, flags) => {
184
- const { checkDocs } = await import("../check-CL0-0eB8.js");
188
+ const { checkDocs } = await import("../check-CUKuufBm.js");
185
189
  await checkDocs(docIds, flags);
186
190
  });
187
191
  program.command("import <file>").description("Turn a Markdown file into a document under docs/").option("--id <id>", "document id (defaults to a slug of the title)").option("--title <title>", "override the title").option("--subtitle <subtitle>", "subtitle, also used as the cover eyebrow").option("--author <author>", "author line on the cover").option("--theme <theme>", "theme id to back-link from meta.theme").addOption(new Option("--page-size <size>", "page size").choices(PAGE_SIZE_NAMES)).addOption(new Option("--orientation <orientation>", "page orientation").choices(ORIENTATIONS)).option("--no-cover", "skip the title page").option("--contents", "add a self-filling contents page").action(async (file, flags) => {
188
- const { importDoc } = await import("../import-E6vRo7xm.js");
192
+ const { importDoc } = await import("../import-C14Vn9ER.js");
189
193
  await importDoc(file, flags);
190
194
  });
191
195
  program.command("sync:skills").description("Sync built-in skills from @open-document/core into this workspace").option("--dry-run", "show what would change without writing").action(async (flags) => {