@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.
- package/README.md +1 -0
- package/README.zh-TW.md +1 -0
- package/dist/{build-U81g9Hnk.js → build-BzhYQKev.js} +1 -1
- package/dist/check-CCAaXofH.js +42 -0
- package/dist/cli/bin.js +45 -12
- package/dist/config-CNr8hd5X.js +2461 -0
- package/dist/{config-CSC5lHsR.d.ts → config-P61niZMf.d.ts} +6 -0
- package/dist/context-CJpdjYfU.js +15 -0
- package/dist/{dev-DwwFT6uX.js → dev-BhXgunme.js} +1 -1
- package/dist/diagram-xlVDekYk.js +763 -0
- package/dist/export-B69kDkyp.js +36 -0
- package/dist/import-DBhCpUsl.js +26 -0
- package/dist/index.d.ts +236 -91
- package/dist/index.js +516 -88
- package/dist/ops/index.d.ts +96 -1
- package/dist/ops/index.js +4 -199
- package/dist/ops-BCBmRMCS.js +1275 -0
- package/dist/{preview-C_jbySle.js → preview-Da4Aq9yF.js} +1 -1
- package/dist/sdk-C9nl30dW.d.ts +129 -0
- package/dist/sdk-DhcqZdAw.js +50 -0
- package/dist/vite/index.d.ts +7 -1
- package/dist/vite/index.js +1 -2
- package/env.d.ts +33 -1
- package/package.json +10 -1
- package/skills/create-doc/SKILL.md +7 -3
- package/skills/create-theme/SKILL.md +1 -1
- package/skills/doc-authoring/SKILL.md +86 -6
- package/skills/doc-authoring/references/long-form.md +131 -0
- package/skills/doc-authoring/references/pagination.md +2 -1
- package/src/app/components/data-table.tsx +196 -0
- package/src/app/components/diagram.tsx +76 -0
- package/src/app/components/flow-page.tsx +20 -3
- package/src/app/components/footnote.tsx +196 -0
- package/src/app/components/numbering.tsx +208 -0
- package/src/app/components/themes/theme-preview.tsx +2 -2
- package/src/app/lib/agent-bridge.ts +128 -0
- package/src/app/lib/diagnostics.ts +282 -0
- package/src/app/lib/export-html.ts +35 -11
- package/src/app/lib/export-pdf.ts +54 -19
- package/src/app/lib/flow-measure.ts +100 -31
- package/src/app/lib/flow.test.ts +46 -0
- package/src/app/lib/flow.ts +28 -3
- package/src/app/lib/footnotes.test.tsx +102 -0
- package/src/app/lib/footnotes.ts +94 -0
- package/src/app/lib/labels.ts +175 -0
- package/src/app/lib/page-context.tsx +6 -1
- package/src/app/lib/scan.ts +26 -0
- package/src/app/lib/sdk.test.ts +15 -9
- package/src/app/lib/sdk.ts +37 -11
- package/src/app/lib/use-doc-pages.ts +50 -15
- package/src/app/routes/doc.tsx +158 -115
- package/dist/config-8zkUElGq.js +0 -1169
- package/dist/design-IyRSwCtK.js +0 -52
- 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 };
|