@open-document/core 0.17.0 → 0.17.1
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/dist/{build-BzNZnIhF.js → build-C7nHUUXO.js} +1 -1
- package/dist/{check-C7kxlAFW.js → check--Cbkdqw3.js} +3 -3
- package/dist/cli/bin.js +12 -12
- package/dist/{context-CFPnmNCR.js → context-DRXgt6Je.js} +2 -2
- package/dist/{deploy-gcp-BUiSuqz7.js → deploy-gcp-bbxQT0gf.js} +1 -1
- package/dist/{dev-BUo7OESU.js → dev-D_j2ykSa.js} +1 -1
- package/dist/{diff-B950T0O6.js → diff-C1RDK_I5.js} +2 -2
- package/dist/{export-CHN1CiGv.js → export-BFxKPa0W.js} +3 -3
- package/dist/{import-CLSnIxvN.js → import-TLuMXkou.js} +3 -3
- package/dist/{open-doc-plugin-DnX5usgI.js → open-doc-plugin-DE1sJXK_.js} +3 -2
- package/dist/ops/index.js +2 -2
- package/dist/{ops-BgbM5Irm.js → ops-BG9hfBwQ.js} +1 -1
- package/dist/{preview-BVwVqS-I.js → preview-rlMPuRZV.js} +1 -1
- package/dist/{proofread-BpR_3GZz.js → proofread-Dtj9OlWX.js} +3 -3
- package/dist/{session-DmbXf3u7.js → session-CPFLe6BT.js} +13 -2
- package/dist/{templates-BsWxs7oo.js → templates-BmSuBmj3.js} +3 -3
- package/dist/{translations-CW5OVM0L.js → translations-BmTXOhx9.js} +2 -2
- package/dist/vite/index.d.ts +2 -0
- package/dist/vite/index.js +2 -2
- package/package.json +1 -1
- package/src/app/components/agent/agent-dock.tsx +1 -1
- package/src/app/components/browser/browser-ui.tsx +8 -2
- package/src/app/components/panel/panel-shell.tsx +3 -1
- package/src/app/components/sidebar/sidebar.tsx +2 -1
- package/src/app/lib/i18n-ja/doc.ts +1 -0
- package/src/app/lib/i18n-ko/doc.ts +1 -0
- package/src/app/lib/i18n-zh-cn/doc.ts +1 -0
- package/src/app/lib/i18n-zh-tw/doc.ts +1 -0
- package/src/app/routes/doc.tsx +164 -52
- package/src/app/routes/home.tsx +11 -7
- package/src/app/virtual.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as listDocIds, S as closeRenderSession, x as checkLayout } from "./session-
|
|
2
|
-
import "./ops-
|
|
3
|
-
import { t as cliContext } from "./context-
|
|
1
|
+
import { B as listDocIds, S as closeRenderSession, x as checkLayout } from "./session-CPFLe6BT.js";
|
|
2
|
+
import "./ops-BG9hfBwQ.js";
|
|
3
|
+
import { t as cliContext } from "./context-DRXgt6Je.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
|
@@ -148,47 +148,47 @@ async function run(argv) {
|
|
|
148
148
|
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)"));
|
|
149
149
|
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) => {
|
|
150
150
|
if (flags.skillsCheck !== false) await runSkillsDriftCheck(resolveBuiltinSkillsDir());
|
|
151
|
-
const { dev } = await import("../dev-
|
|
151
|
+
const { dev } = await import("../dev-D_j2ykSa.js");
|
|
152
152
|
await dev(flags);
|
|
153
153
|
});
|
|
154
154
|
program.command("build").description("Build a static site").option("--out-dir <dir>", "output directory (defaults to `dist`)").action(async (flags) => {
|
|
155
|
-
const { build } = await import("../build-
|
|
155
|
+
const { build } = await import("../build-C7nHUUXO.js");
|
|
156
156
|
await build(flags);
|
|
157
157
|
});
|
|
158
158
|
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) => {
|
|
159
|
-
const { preview } = await import("../preview-
|
|
159
|
+
const { preview } = await import("../preview-rlMPuRZV.js");
|
|
160
160
|
await preview(flags);
|
|
161
161
|
});
|
|
162
162
|
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/").option("--each", "one copy per row of the document's `records`").option("--name <pattern>", "with --each: file name, e.g. \"certificate-{name}\" ({#} is the row number)").action(async (docIds, flags) => {
|
|
163
|
-
const { exportDocs } = await import("../export-
|
|
163
|
+
const { exportDocs } = await import("../export-BFxKPa0W.js");
|
|
164
164
|
await exportDocs(docIds, flags);
|
|
165
165
|
});
|
|
166
166
|
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) => {
|
|
167
|
-
const { diffDoc } = await import("../diff-
|
|
167
|
+
const { diffDoc } = await import("../diff-C1RDK_I5.js");
|
|
168
168
|
await diffDoc(docId, flags);
|
|
169
169
|
});
|
|
170
170
|
program.command("check [docIds...]").description("Report layout faults — clipped content, blank sheets, stranded headings").option("--json", "print the full report as JSON").addOption(new Option("--max-pages <n>", "fail when a document runs past n pages, and say where the length is").argParser(parsePositiveInt)).action(async (docIds, flags) => {
|
|
171
|
-
const { checkDocs } = await import("../check
|
|
171
|
+
const { checkDocs } = await import("../check--Cbkdqw3.js");
|
|
172
172
|
await checkDocs(docIds, flags);
|
|
173
173
|
});
|
|
174
174
|
program.command("translations [docId]").description("List translations (meta.translationOf) and what changed in their source since").option("--diff", "print the source's changes since each translation's translatedAt").option("--mark <docId>", "record that a translation now matches its source").option("--at <rev>", "with --mark: the source commit it matches (defaults to the last one)").option("--json", "print the result as JSON").action(async (docId, flags) => {
|
|
175
|
-
const { translations } = await import("../translations-
|
|
175
|
+
const { translations } = await import("../translations-BmTXOhx9.js");
|
|
176
176
|
await translations(docId, flags);
|
|
177
177
|
});
|
|
178
178
|
program.command("proofread [docIds...]").description("Report text slips — full-width letters, wrong-width punctuation, mixed scripts").option("--json", "print the full report as JSON").action(async (docIds, flags) => {
|
|
179
|
-
const { proofreadDocs } = await import("../proofread-
|
|
179
|
+
const { proofreadDocs } = await import("../proofread-Dtj9OlWX.js");
|
|
180
180
|
await proofreadDocs(docIds, flags);
|
|
181
181
|
});
|
|
182
182
|
program.command("templates").description("List the templates a new document can start from").option("--json", "print them as JSON").action(async (flags) => {
|
|
183
|
-
const { printTemplates } = await import("../templates-
|
|
183
|
+
const { printTemplates } = await import("../templates-BmSuBmj3.js");
|
|
184
184
|
await printTemplates(flags);
|
|
185
185
|
});
|
|
186
186
|
program.command("new [docId]").description("Create a document under docs/ from a template (see `open-doc templates`)").option("-t, --template <name>", "template to start from (defaults to blank)").option("--title <title>", "title of the new document").action(async (docId, flags) => {
|
|
187
|
-
const { newDoc } = await import("../templates-
|
|
187
|
+
const { newDoc } = await import("../templates-BmSuBmj3.js");
|
|
188
188
|
await newDoc(docId, flags);
|
|
189
189
|
});
|
|
190
190
|
program.command("import <file>").description("Turn a Markdown (.md) or Word (.docx) file into a document under docs/ — Word keeps its page look").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("--lang <tag>", "language of the text, e.g. zh-Hant-TW (detected for CJK when omitted)").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 (Markdown, or Word with --plain)").option("--contents", "add a self-filling contents page (Markdown, or Word with --plain)").option("--plain", "Word only: structure in the house style (headings, lists, tables, a cover) instead of Word's own page look").action(async (file, flags) => {
|
|
191
|
-
const { importDoc } = await import("../import-
|
|
191
|
+
const { importDoc } = await import("../import-TLuMXkou.js");
|
|
192
192
|
await importDoc(file, flags);
|
|
193
193
|
});
|
|
194
194
|
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) => {
|
|
@@ -196,7 +196,7 @@ async function run(argv) {
|
|
|
196
196
|
await syncSkills(resolveBuiltinSkillsDir(), flags);
|
|
197
197
|
});
|
|
198
198
|
program.command("deploy").description("Deploy and manage this workspace on a cloud provider (e.g. `open-doc deploy gcp`)").command("gcp").description("Deploy to Google Cloud Run + Cloud Storage, sync files, or stop/delete the service").addArgument(new Argument("[action]", "up (deploy), check (preflight diagnostics), status, pull, push, stop, start, or down").choices([...GCP_DEPLOY_ACTIONS]).default("up")).option("--project <id>", "Google Cloud project ID").option("--region <region>", "Cloud Run and Cloud Storage region (defaults to asia-east1)").option("--service <name>", "Cloud Run service name").option("--bucket <name>", "Cloud Storage bucket name for persistent docs/assets/themes").addOption(new Option("--mode <mode>", "deployment mode: editable (GCS + MCP) or static").choices(["editable", "static"])).option("--memory <size>", "Cloud Run memory limit (defaults to 1Gi)").option("--token <token>", "Bearer token for the remote /mcp endpoint").option("--dry-run", "print the cloud commands without executing them").option("--json", "print output as JSON (for check and status)").option("--delete", "with pull/push: delete destination files missing from source").option("--pull", "with stop: pull latest files from Cloud Storage before locking service").option("--skip-pull", "with down: skip backing up files from Cloud Storage before deleting").option("--purge-storage", "with down: also delete the Cloud Storage bucket").option("-y, --yes", "skip confirmation prompts").action(async (action, flags) => {
|
|
199
|
-
const mod = await import("../deploy-gcp-
|
|
199
|
+
const mod = await import("../deploy-gcp-bbxQT0gf.js");
|
|
200
200
|
switch (action) {
|
|
201
201
|
case "up":
|
|
202
202
|
await mod.runGcpUp(flags);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as readCoreVersion } from "./package-version-C89gtYSk.js";
|
|
2
|
-
import { n as loadUserConfig } from "./open-doc-plugin-
|
|
3
|
-
import { J as makeContext } from "./session-
|
|
2
|
+
import { n as loadUserConfig } from "./open-doc-plugin-DE1sJXK_.js";
|
|
3
|
+
import { J as makeContext } from "./session-CPFLe6BT.js";
|
|
4
4
|
//#region src/cli/context.ts
|
|
5
5
|
/** The same context the dev API and the MCP server run on, for commands that call `ops/`. */
|
|
6
6
|
async function cliContext(userCwd = process.cwd()) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as diffDocument } from "./ops-
|
|
2
|
-
import { t as cliContext } from "./context-
|
|
1
|
+
import { c as diffDocument } from "./ops-BG9hfBwQ.js";
|
|
2
|
+
import { t as cliContext } from "./context-DRXgt6Je.js";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
//#region src/cli/diff.ts
|
|
5
5
|
const MARK = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as EXPORT_FORMATS } from "./sdk-CqNZzbkz.js";
|
|
2
|
-
import { B as listDocIds, C as exportDocument, S as closeRenderSession } from "./session-
|
|
3
|
-
import "./ops-
|
|
4
|
-
import { t as cliContext } from "./context-
|
|
2
|
+
import { B as listDocIds, C as exportDocument, S as closeRenderSession } from "./session-CPFLe6BT.js";
|
|
3
|
+
import "./ops-BG9hfBwQ.js";
|
|
4
|
+
import { t as cliContext } from "./context-DRXgt6Je.js";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
//#region src/cli/export.ts
|
|
7
7
|
const FORMATS = EXPORT_FORMATS;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as importMarkdown, E as importDocx } from "./session-
|
|
2
|
-
import "./ops-
|
|
3
|
-
import { t as cliContext } from "./context-
|
|
1
|
+
import { D as importMarkdown, E as importDocx } from "./session-CPFLe6BT.js";
|
|
2
|
+
import "./ops-BG9hfBwQ.js";
|
|
3
|
+
import { t as cliContext } from "./context-DRXgt6Je.js";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
//#region src/cli/import.ts
|
|
@@ -157,7 +157,7 @@ ${cases}
|
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
function openDocPlugin(opts) {
|
|
160
|
-
const { userCwd, config, coreVersion } = opts;
|
|
160
|
+
const { userCwd, config, coreVersion, coreFromSource = false } = opts;
|
|
161
161
|
const docsDir = config.docsDir ?? "docs";
|
|
162
162
|
const docsRoot = path.resolve(userCwd, docsDir);
|
|
163
163
|
const foldersManifestPath = path.join(docsRoot, ".folders.json");
|
|
@@ -235,7 +235,8 @@ function openDocPlugin(opts) {
|
|
|
235
235
|
return `export default ${JSON.stringify({
|
|
236
236
|
...config,
|
|
237
237
|
build,
|
|
238
|
-
version: coreVersion
|
|
238
|
+
version: coreVersion,
|
|
239
|
+
fromSource: coreFromSource
|
|
239
240
|
})};\n`;
|
|
240
241
|
}
|
|
241
242
|
if (id === resolved(FOLDERS_VMOD)) {
|
package/dist/ops/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as ORIENTATIONS, o as PAGE_SIZE_NAMES, r as EXPORT_FORMATS } from "../sdk-CqNZzbkz.js";
|
|
2
|
-
import { A as readChanges, B as listDocIds, C as exportDocument, D as importMarkdown, E as importDocx, F as OpsError, G as resolveEntry, H as readDocument, I as createDocument, J as makeContext, K as writeDocument, L as deleteDocument, M as assertExpectedSource, N as hashSource, O as slugify, P as withFileLock, R as docDir, S as closeRenderSession, T as renderDocPage, V as listDocuments, W as renameDocument, _ as listFolders, a as readText, b as writeAsset, c as writeTexts, d as suggestDocId, f as createFolder, g as listAssets, h as findAssetUsages, i as addComment, j as revertChange, k as listRevisions, l as createFromTemplate, m as fileDocument, o as writeEdits, p as deleteAsset, s as writeText, u as listTemplates, v as listThemes, w as proofreadDocument, x as checkLayout, y as readTheme, z as duplicateDocument } from "../session-
|
|
3
|
-
import { a as outlineSource, c as diffDocument, i as outlineDocument, n as translationStatus, o as readDocumentLines, r as editDocument, s as searchDocument, t as markTranslated } from "../ops-
|
|
2
|
+
import { A as readChanges, B as listDocIds, C as exportDocument, D as importMarkdown, E as importDocx, F as OpsError, G as resolveEntry, H as readDocument, I as createDocument, J as makeContext, K as writeDocument, L as deleteDocument, M as assertExpectedSource, N as hashSource, O as slugify, P as withFileLock, R as docDir, S as closeRenderSession, T as renderDocPage, V as listDocuments, W as renameDocument, _ as listFolders, a as readText, b as writeAsset, c as writeTexts, d as suggestDocId, f as createFolder, g as listAssets, h as findAssetUsages, i as addComment, j as revertChange, k as listRevisions, l as createFromTemplate, m as fileDocument, o as writeEdits, p as deleteAsset, s as writeText, u as listTemplates, v as listThemes, w as proofreadDocument, x as checkLayout, y as readTheme, z as duplicateDocument } from "../session-CPFLe6BT.js";
|
|
3
|
+
import { a as outlineSource, c as diffDocument, i as outlineDocument, n as translationStatus, o as readDocumentLines, r as editDocument, s as searchDocument, t as markTranslated } from "../ops-BG9hfBwQ.js";
|
|
4
4
|
export { EXPORT_FORMATS, ORIENTATIONS, OpsError, PAGE_SIZE_NAMES, addComment, assertExpectedSource, checkLayout, closeRenderSession, createDocument, createFolder, createFromTemplate, deleteAsset, deleteDocument, diffDocument, docDir, duplicateDocument, editDocument, exportDocument, fileDocument, findAssetUsages, hashSource, importDocx, importMarkdown, listAssets, listDocIds, listDocuments, listFolders, listRevisions, listTemplates, listThemes, makeContext, markTranslated, outlineDocument, outlineSource, proofreadDocument, readChanges, readDocument, readDocumentLines, readText, readTheme, renameDocument, renderDocPage, resolveEntry, revertChange, searchDocument, slugify, suggestDocId, translationStatus, withFileLock, writeAsset, writeDocument, writeEdits, writeText, writeTexts };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as listDocIds, F as OpsError, G as resolveEntry, M as assertExpectedSource, N as hashSource, P as withFileLock, U as readMetaField, n as createRenderSession, q as setMetaString, t as RenderUnavailableError } from "./session-
|
|
1
|
+
import { B as listDocIds, F as OpsError, G as resolveEntry, M as assertExpectedSource, N as hashSource, P as withFileLock, U as readMetaField, n as createRenderSession, q as setMetaString, t as RenderUnavailableError } from "./session-CPFLe6BT.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import { execFile } from "node:child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as listDocIds, S as closeRenderSession, w as proofreadDocument } from "./session-
|
|
2
|
-
import "./ops-
|
|
3
|
-
import { t as cliContext } from "./context-
|
|
1
|
+
import { B as listDocIds, S as closeRenderSession, w as proofreadDocument } from "./session-CPFLe6BT.js";
|
|
2
|
+
import "./ops-BG9hfBwQ.js";
|
|
3
|
+
import { t as cliContext } from "./context-DRXgt6Je.js";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
//#region src/cli/proofread.ts
|
|
6
6
|
function line(finding) {
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
|
2
2
|
import { a as defaultDesign, n as DiagramSyntaxError, r as parseDelimited, t as compileDiagram } from "./diagram-CKf3ptOE.js";
|
|
3
3
|
import { a as PAGE_SIZES, c as isPageSizeName, i as ORIENTATIONS, o as PAGE_SIZE_NAMES, s as isOrientation } from "./sdk-CqNZzbkz.js";
|
|
4
4
|
import { t as corePackageRoot } from "./package-version-C89gtYSk.js";
|
|
5
|
-
import { n as loadUserConfig, r as openDocPlugin, t as DOC_ID_RE } from "./open-doc-plugin-
|
|
5
|
+
import { n as loadUserConfig, r as openDocPlugin, t as DOC_ID_RE } from "./open-doc-plugin-DE1sJXK_.js";
|
|
6
6
|
import chalk from "chalk";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -12983,6 +12983,16 @@ function readCoreVersion() {
|
|
|
12983
12983
|
}
|
|
12984
12984
|
}
|
|
12985
12985
|
const CORE_VERSION = readCoreVersion();
|
|
12986
|
+
/**
|
|
12987
|
+
* Whether this core runs from a source checkout (a `link:`, `file:` or `workspace:`
|
|
12988
|
+
* dependency, or this repo's own demo) rather than a package installed from npm.
|
|
12989
|
+
* An install always lives under a `node_modules` folder, even through pnpm's links,
|
|
12990
|
+
* because the path is the resolved file's; a checkout never does.
|
|
12991
|
+
*/
|
|
12992
|
+
function isSourceCheckout(pkgRoot) {
|
|
12993
|
+
return !pkgRoot.split(/[\\/]/).includes("node_modules");
|
|
12994
|
+
}
|
|
12995
|
+
const CORE_FROM_SOURCE = isSourceCheckout(PKG_ROOT);
|
|
12986
12996
|
function safeRealpath(target) {
|
|
12987
12997
|
try {
|
|
12988
12998
|
return existsSync(target) ? realpathSync(target) : null;
|
|
@@ -13035,7 +13045,8 @@ async function createViteConfig(opts) {
|
|
|
13035
13045
|
openDocPlugin({
|
|
13036
13046
|
userCwd,
|
|
13037
13047
|
config,
|
|
13038
|
-
coreVersion: CORE_VERSION
|
|
13048
|
+
coreVersion: CORE_VERSION,
|
|
13049
|
+
coreFromSource: CORE_FROM_SOURCE
|
|
13039
13050
|
}),
|
|
13040
13051
|
themesPlugin({
|
|
13041
13052
|
userCwd,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as createFromTemplate, u as listTemplates } from "./session-
|
|
2
|
-
import "./ops-
|
|
3
|
-
import { t as cliContext } from "./context-
|
|
1
|
+
import { l as createFromTemplate, u as listTemplates } from "./session-CPFLe6BT.js";
|
|
2
|
+
import "./ops-BG9hfBwQ.js";
|
|
3
|
+
import { t as cliContext } from "./context-DRXgt6Je.js";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
//#region src/cli/templates.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as translationStatus, t as markTranslated } from "./ops-
|
|
2
|
-
import { t as cliContext } from "./context-
|
|
1
|
+
import { n as translationStatus, t as markTranslated } from "./ops-BG9hfBwQ.js";
|
|
2
|
+
import { t as cliContext } from "./context-DRXgt6Je.js";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
//#region src/cli/translations.ts
|
|
5
5
|
const STATE = {
|
package/dist/vite/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ type OpenDocPluginOptions = {
|
|
|
5
5
|
userCwd: string;
|
|
6
6
|
config: OpenDocConfig;
|
|
7
7
|
coreVersion: string;
|
|
8
|
+
/** Core runs from a source checkout; the browser marks its version `dev`. */
|
|
9
|
+
coreFromSource?: boolean;
|
|
8
10
|
};
|
|
9
11
|
declare function openDocPlugin(opts: OpenDocPluginOptions): Plugin;
|
|
10
12
|
//#endregion
|
package/dist/vite/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { r as openDocPlugin } from "../open-doc-plugin-
|
|
2
|
-
import { r as createViteConfig } from "../session-
|
|
1
|
+
import { r as openDocPlugin } from "../open-doc-plugin-DE1sJXK_.js";
|
|
2
|
+
import { r as createViteConfig } from "../session-CPFLe6BT.js";
|
|
3
3
|
export { createViteConfig, openDocPlugin };
|
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@ export function AgentDockFrame({ children }: { children: ReactNode }) {
|
|
|
56
56
|
return (
|
|
57
57
|
<div
|
|
58
58
|
data-agent-dock
|
|
59
|
-
className="relative flex h-full max-w-[60vw] shrink-0 border-border border-l bg-sidebar"
|
|
59
|
+
className="relative flex h-full max-w-[60vw] shrink-0 border-border border-l bg-sidebar max-md:absolute max-md:inset-y-0 max-md:right-0 max-md:z-40 max-md:w-[min(24rem,calc(100%-2.5rem))]! max-md:max-w-none max-md:shadow-2xl"
|
|
60
60
|
style={{ width }}
|
|
61
61
|
>
|
|
62
62
|
<ResizeHandle
|
|
@@ -74,7 +74,9 @@ export function PageHeader({
|
|
|
74
74
|
children?: ReactNode;
|
|
75
75
|
}) {
|
|
76
76
|
return (
|
|
77
|
-
|
|
77
|
+
// A container, so the actions fold by the room the page has, not the window:
|
|
78
|
+
// the sidebar takes part of a wide window and none of a narrow one.
|
|
79
|
+
<header className="@container mb-8">
|
|
78
80
|
<div className="flex flex-wrap items-center justify-between gap-4">
|
|
79
81
|
<div className="min-w-0">
|
|
80
82
|
<h1 className="flex items-center gap-2.5 font-medium text-lg tracking-tight">
|
|
@@ -90,7 +92,11 @@ export function PageHeader({
|
|
|
90
92
|
<p className="mt-1 max-w-2xl text-muted-foreground text-sm">{description}</p>
|
|
91
93
|
)}
|
|
92
94
|
</div>
|
|
93
|
-
{actions &&
|
|
95
|
+
{actions && (
|
|
96
|
+
<div className="flex w-full min-w-0 items-center gap-2 @2xl:w-auto @2xl:flex-none">
|
|
97
|
+
{actions}
|
|
98
|
+
</div>
|
|
99
|
+
)}
|
|
94
100
|
</div>
|
|
95
101
|
{children && <div className="mt-5">{children}</div>}
|
|
96
102
|
</header>
|
|
@@ -26,7 +26,9 @@ export function PanelShell({
|
|
|
26
26
|
<aside
|
|
27
27
|
ref={panelRef}
|
|
28
28
|
aria-label={label}
|
|
29
|
-
|
|
29
|
+
// Below md there is no room beside the pages: the panel floats over them
|
|
30
|
+
// instead of squeezing them to a sliver.
|
|
31
|
+
className="od-panel-in flex w-72 flex-none flex-col border-border border-l bg-background max-md:absolute max-md:inset-y-0 max-md:right-0 max-md:z-40 max-md:w-[min(18rem,calc(100%-2.5rem))] max-md:shadow-2xl"
|
|
30
32
|
>
|
|
31
33
|
<header className="flex h-10 flex-none items-center justify-between gap-2 border-border border-b px-3">
|
|
32
34
|
<div className="flex min-w-0 items-center gap-2">{header}</div>
|
|
@@ -251,7 +251,8 @@ export function Sidebar({
|
|
|
251
251
|
<div className="flex items-center justify-between gap-2 px-4 py-3 text-[11px] text-muted-foreground">
|
|
252
252
|
<span>
|
|
253
253
|
v{config.version}
|
|
254
|
-
|
|
254
|
+
{/* Only a core run from a checkout says so; an npm install shows its version alone. */}
|
|
255
|
+
{config.fromSource && <span className="ml-2 font-mono">dev</span>}
|
|
255
256
|
</span>
|
|
256
257
|
<div className="-mr-1.5 flex items-center gap-0.5">
|
|
257
258
|
<LanguageToggle />
|
package/src/app/routes/doc.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Check,
|
|
7
7
|
ChevronDown,
|
|
8
8
|
Download,
|
|
9
|
+
Ellipsis,
|
|
9
10
|
Eye,
|
|
10
11
|
FileCode2,
|
|
11
12
|
FileImage,
|
|
@@ -846,9 +847,13 @@ export function Doc() {
|
|
|
846
847
|
(page, zoom, layout, fullscreen), and what you do to the document
|
|
847
848
|
(search, edit, design, download). The middle rail is `auto` between
|
|
848
849
|
two equal `1fr` rails, so it sits at the true centre of the bar while
|
|
849
|
-
the title truncates before anything is overlapped.
|
|
850
|
-
|
|
851
|
-
|
|
850
|
+
the title truncates before anything is overlapped. Below xl the bar is
|
|
851
|
+
a plain row: the title takes what is left, the view controls drop out
|
|
852
|
+
by width (zoom and layout below lg, the page counter below sm), labels
|
|
853
|
+
fold to icons, and below sm Changes, Comments and Copy link move into
|
|
854
|
+
a More menu, so nothing is pushed off the edge. */}
|
|
855
|
+
<header className="flex h-12 flex-none items-center gap-2 border-b border-border px-3 xl:grid xl:grid-cols-[1fr_auto_1fr] xl:gap-3">
|
|
856
|
+
<div className="flex min-w-0 flex-1 items-center gap-1">
|
|
852
857
|
<HeaderBackLink />
|
|
853
858
|
<h1 className="truncate font-medium text-sm">{doc.meta?.title ?? docId}</h1>
|
|
854
859
|
{doc.records && doc.records.length > 0 && (
|
|
@@ -856,50 +861,56 @@ export function Doc() {
|
|
|
856
861
|
)}
|
|
857
862
|
</div>
|
|
858
863
|
|
|
859
|
-
<div className="hidden items-center gap-2 sm:flex">
|
|
864
|
+
<div className="hidden flex-none items-center gap-2 sm:flex">
|
|
860
865
|
<PageJump page={currentPage} total={pages.length} onJump={scrollToPage} />
|
|
861
|
-
<
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
<
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
866
|
+
<div className="hidden items-center gap-2 lg:flex">
|
|
867
|
+
<Divider />
|
|
868
|
+
<ZoomControl
|
|
869
|
+
scale={scale}
|
|
870
|
+
fit={manualScale === null ? zoomMode : null}
|
|
871
|
+
onStep={zoom}
|
|
872
|
+
onSet={setZoom}
|
|
873
|
+
onFit={fitTo}
|
|
874
|
+
/>
|
|
875
|
+
<Divider />
|
|
876
|
+
<fieldset className="flex items-center gap-0.5">
|
|
877
|
+
<legend className="sr-only">{t('Page layout')}</legend>
|
|
878
|
+
<IconButton
|
|
879
|
+
label={t('Continuous')}
|
|
880
|
+
active={viewMode === 'continuous'}
|
|
881
|
+
onClick={() => setViewMode('continuous')}
|
|
882
|
+
>
|
|
883
|
+
<Rows3 className="size-3.5" />
|
|
884
|
+
</IconButton>
|
|
885
|
+
<IconButton
|
|
886
|
+
label={t('Two-up')}
|
|
887
|
+
active={viewMode === 'spread'}
|
|
888
|
+
onClick={() => setViewMode('spread')}
|
|
889
|
+
>
|
|
890
|
+
<BookOpen className="size-3.5" />
|
|
891
|
+
</IconButton>
|
|
892
|
+
<IconButton
|
|
893
|
+
label={t('Grid')}
|
|
894
|
+
active={viewMode === 'grid'}
|
|
895
|
+
onClick={() => setViewMode('grid')}
|
|
896
|
+
>
|
|
897
|
+
<LayoutGrid className="size-3.5" />
|
|
898
|
+
</IconButton>
|
|
899
|
+
</fieldset>
|
|
886
900
|
<IconButton
|
|
887
|
-
label={t('
|
|
888
|
-
|
|
889
|
-
onClick={() => setViewMode('grid')}
|
|
901
|
+
label={isFullscreen ? t('Exit fullscreen (F)') : t('Fullscreen (F)')}
|
|
902
|
+
onClick={toggleFullscreen}
|
|
890
903
|
>
|
|
891
|
-
|
|
904
|
+
{isFullscreen ? (
|
|
905
|
+
<Minimize className="size-3.5" />
|
|
906
|
+
) : (
|
|
907
|
+
<Maximize className="size-3.5" />
|
|
908
|
+
)}
|
|
892
909
|
</IconButton>
|
|
893
|
-
</
|
|
894
|
-
<IconButton
|
|
895
|
-
label={isFullscreen ? t('Exit fullscreen (F)') : t('Fullscreen (F)')}
|
|
896
|
-
onClick={toggleFullscreen}
|
|
897
|
-
>
|
|
898
|
-
{isFullscreen ? <Minimize className="size-3.5" /> : <Maximize className="size-3.5" />}
|
|
899
|
-
</IconButton>
|
|
910
|
+
</div>
|
|
900
911
|
</div>
|
|
901
912
|
|
|
902
|
-
<div className="flex items-center justify-end gap-2">
|
|
913
|
+
<div className="flex flex-none items-center justify-end gap-1.5 sm:gap-2">
|
|
903
914
|
<DocSearch scrollRef={scrollRef} pagesRef={pagesRef} onFoundPage={setCurrentPage} />
|
|
904
915
|
|
|
905
916
|
{import.meta.env.DEV && (
|
|
@@ -935,10 +946,10 @@ export function Doc() {
|
|
|
935
946
|
)}
|
|
936
947
|
>
|
|
937
948
|
<Palette className="size-3.5" />
|
|
938
|
-
{t('Design')}
|
|
949
|
+
<span className="hidden lg:inline">{t('Design')}</span>
|
|
939
950
|
<kbd
|
|
940
951
|
aria-hidden
|
|
941
|
-
className="hidden rounded-sm bg-foreground/10 px-1 font-mono text-[9.5px] text-muted-foreground
|
|
952
|
+
className="hidden rounded-sm bg-foreground/10 px-1 font-mono text-[9.5px] text-muted-foreground lg:inline"
|
|
942
953
|
>
|
|
943
954
|
D
|
|
944
955
|
</kbd>
|
|
@@ -957,12 +968,12 @@ export function Doc() {
|
|
|
957
968
|
title={`${t('Changes since the last commit')} (C)`}
|
|
958
969
|
onClick={() => toggleDock('changes')}
|
|
959
970
|
className={cn(
|
|
960
|
-
'
|
|
971
|
+
'hidden flex-none sm:flex items-center gap-1.5 whitespace-nowrap rounded-md border border-border px-2.5 py-1.5 text-xs transition-colors hover:bg-accent',
|
|
961
972
|
changesOpen && 'bg-accent',
|
|
962
973
|
)}
|
|
963
974
|
>
|
|
964
975
|
<GitCompare className="size-3.5" />
|
|
965
|
-
<span className="hidden
|
|
976
|
+
<span className="hidden xl:inline">{t('Changes')}</span>
|
|
966
977
|
{changeItems.length > 0 && (
|
|
967
978
|
<span
|
|
968
979
|
aria-hidden
|
|
@@ -987,12 +998,12 @@ export function Doc() {
|
|
|
987
998
|
title={`${t('Comments')} (M)`}
|
|
988
999
|
onClick={() => toggleDock('comments')}
|
|
989
1000
|
className={cn(
|
|
990
|
-
'
|
|
1001
|
+
'hidden flex-none sm:flex items-center gap-1.5 whitespace-nowrap rounded-md border border-border px-2.5 py-1.5 text-xs transition-colors hover:bg-accent',
|
|
991
1002
|
commentsOpen && 'bg-accent',
|
|
992
1003
|
)}
|
|
993
1004
|
>
|
|
994
1005
|
<MessageSquare className="size-3.5" />
|
|
995
|
-
<span className="hidden
|
|
1006
|
+
<span className="hidden xl:inline">{t('Comments')}</span>
|
|
996
1007
|
{commentList.length > 0 && (
|
|
997
1008
|
<span
|
|
998
1009
|
aria-hidden
|
|
@@ -1023,7 +1034,29 @@ export function Doc() {
|
|
|
1023
1034
|
</button>
|
|
1024
1035
|
)}
|
|
1025
1036
|
|
|
1026
|
-
<
|
|
1037
|
+
<div className="hidden sm:contents">
|
|
1038
|
+
<CopyLink />
|
|
1039
|
+
</div>
|
|
1040
|
+
<MoreMenu
|
|
1041
|
+
changes={
|
|
1042
|
+
import.meta.env.DEV
|
|
1043
|
+
? {
|
|
1044
|
+
open: changesOpen,
|
|
1045
|
+
count: changeItems.length,
|
|
1046
|
+
toggle: () => toggleDock('changes'),
|
|
1047
|
+
}
|
|
1048
|
+
: null
|
|
1049
|
+
}
|
|
1050
|
+
comments={
|
|
1051
|
+
import.meta.env.DEV
|
|
1052
|
+
? {
|
|
1053
|
+
open: commentsOpen,
|
|
1054
|
+
count: commentList.length,
|
|
1055
|
+
toggle: () => toggleDock('comments'),
|
|
1056
|
+
}
|
|
1057
|
+
: null
|
|
1058
|
+
}
|
|
1059
|
+
/>
|
|
1027
1060
|
|
|
1028
1061
|
{/* The document browser normally carries this. A viewer mounted with
|
|
1029
1062
|
`showDocBrowser: false` never shows that shell, and without it a
|
|
@@ -1036,6 +1069,8 @@ export function Doc() {
|
|
|
1036
1069
|
<button
|
|
1037
1070
|
type="button"
|
|
1038
1071
|
disabled={download !== null}
|
|
1072
|
+
aria-label={download ? undefined : t('Download')}
|
|
1073
|
+
title={t('Download')}
|
|
1039
1074
|
className="flex flex-none items-center gap-1.5 whitespace-nowrap rounded-md bg-primary px-2.5 py-1.5 text-primary-foreground text-xs transition-opacity hover:opacity-90 disabled:opacity-70 aria-expanded:opacity-90"
|
|
1040
1075
|
{...props}
|
|
1041
1076
|
>
|
|
@@ -1046,9 +1081,11 @@ export function Doc() {
|
|
|
1046
1081
|
) : (
|
|
1047
1082
|
<Download className="size-3.5" />
|
|
1048
1083
|
)}
|
|
1049
|
-
{download
|
|
1050
|
-
|
|
1051
|
-
|
|
1084
|
+
{download ? (
|
|
1085
|
+
`${t(DOWNLOAD_LABEL[download.format])} ${Math.round(download.percent)}%`
|
|
1086
|
+
) : (
|
|
1087
|
+
<span className="hidden md:inline">{t('Download')}</span>
|
|
1088
|
+
)}
|
|
1052
1089
|
</button>
|
|
1053
1090
|
)}
|
|
1054
1091
|
>
|
|
@@ -1097,7 +1134,8 @@ export function Doc() {
|
|
|
1097
1134
|
</div>
|
|
1098
1135
|
</header>
|
|
1099
1136
|
|
|
1100
|
-
|
|
1137
|
+
{/* Positioned: below md the right dock floats over the pages from here. */}
|
|
1138
|
+
<div className="relative flex min-h-0 flex-1">
|
|
1101
1139
|
<DocSidebar
|
|
1102
1140
|
docId={docId ?? ''}
|
|
1103
1141
|
pages={pages}
|
|
@@ -1585,6 +1623,80 @@ function ZoomControl({
|
|
|
1585
1623
|
}
|
|
1586
1624
|
|
|
1587
1625
|
/** The page as it is — document, and the reader's place in it — on the clipboard. */
|
|
1626
|
+
type DockToggle = { open: boolean; count: number; toggle: () => void } | null;
|
|
1627
|
+
|
|
1628
|
+
/** Below sm the header has no room for Changes, Comments and Copy link; they live here. */
|
|
1629
|
+
function MoreMenu({ changes, comments }: { changes: DockToggle; comments: DockToggle }) {
|
|
1630
|
+
const t = useT();
|
|
1631
|
+
const item = 'size-4 flex-none text-muted-foreground';
|
|
1632
|
+
return (
|
|
1633
|
+
<div className="sm:hidden">
|
|
1634
|
+
<Menu
|
|
1635
|
+
className="w-48 p-1.5"
|
|
1636
|
+
trigger={(props) => (
|
|
1637
|
+
<button
|
|
1638
|
+
type="button"
|
|
1639
|
+
aria-label={t('More')}
|
|
1640
|
+
title={t('More')}
|
|
1641
|
+
className="flex size-8 flex-none items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground aria-expanded:bg-accent aria-expanded:text-foreground"
|
|
1642
|
+
{...props}
|
|
1643
|
+
>
|
|
1644
|
+
<Ellipsis className="size-4" />
|
|
1645
|
+
</button>
|
|
1646
|
+
)}
|
|
1647
|
+
>
|
|
1648
|
+
{(close) => (
|
|
1649
|
+
<>
|
|
1650
|
+
{changes && (
|
|
1651
|
+
<MenuItem
|
|
1652
|
+
active={changes.open}
|
|
1653
|
+
onClick={() => {
|
|
1654
|
+
close();
|
|
1655
|
+
changes.toggle();
|
|
1656
|
+
}}
|
|
1657
|
+
>
|
|
1658
|
+
<GitCompare className={item} />
|
|
1659
|
+
<span className="flex-1">{t('Changes')}</span>
|
|
1660
|
+
{changes.count > 0 && (
|
|
1661
|
+
<span className="font-mono text-[10px] text-muted-foreground tabular-nums">
|
|
1662
|
+
{changes.count}
|
|
1663
|
+
</span>
|
|
1664
|
+
)}
|
|
1665
|
+
</MenuItem>
|
|
1666
|
+
)}
|
|
1667
|
+
{comments && (
|
|
1668
|
+
<MenuItem
|
|
1669
|
+
active={comments.open}
|
|
1670
|
+
onClick={() => {
|
|
1671
|
+
close();
|
|
1672
|
+
comments.toggle();
|
|
1673
|
+
}}
|
|
1674
|
+
>
|
|
1675
|
+
<MessageSquare className={item} />
|
|
1676
|
+
<span className="flex-1">{t('Comments')}</span>
|
|
1677
|
+
{comments.count > 0 && (
|
|
1678
|
+
<span className="font-mono text-[10px] text-muted-foreground tabular-nums">
|
|
1679
|
+
{comments.count}
|
|
1680
|
+
</span>
|
|
1681
|
+
)}
|
|
1682
|
+
</MenuItem>
|
|
1683
|
+
)}
|
|
1684
|
+
<MenuItem
|
|
1685
|
+
onClick={() => {
|
|
1686
|
+
close();
|
|
1687
|
+
navigator.clipboard.writeText(window.location.href).catch(() => {});
|
|
1688
|
+
}}
|
|
1689
|
+
>
|
|
1690
|
+
<Link2 className={item} />
|
|
1691
|
+
<span className="flex-1">{t('Copy link')}</span>
|
|
1692
|
+
</MenuItem>
|
|
1693
|
+
</>
|
|
1694
|
+
)}
|
|
1695
|
+
</Menu>
|
|
1696
|
+
</div>
|
|
1697
|
+
);
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1588
1700
|
function CopyLink() {
|
|
1589
1701
|
const t = useT();
|
|
1590
1702
|
const [copied, setCopied] = useState(false);
|
package/src/app/routes/home.tsx
CHANGED
|
@@ -112,10 +112,12 @@ export function Home() {
|
|
|
112
112
|
<button
|
|
113
113
|
type="button"
|
|
114
114
|
onClick={() => setCreating(true)}
|
|
115
|
-
|
|
115
|
+
aria-label={t('New document')}
|
|
116
|
+
title={t('New document')}
|
|
117
|
+
className="flex h-8 flex-none items-center gap-1.5 rounded-md bg-primary px-2.5 text-primary-foreground text-xs transition-opacity hover:opacity-90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-foreground/60"
|
|
116
118
|
>
|
|
117
119
|
<Plus className="size-3.5" />
|
|
118
|
-
{t('New document')}
|
|
120
|
+
<span className="hidden @md:inline">{t('New document')}</span>
|
|
119
121
|
</button>
|
|
120
122
|
</>
|
|
121
123
|
);
|
|
@@ -178,11 +180,12 @@ export function Home() {
|
|
|
178
180
|
<button
|
|
179
181
|
type="button"
|
|
180
182
|
aria-label={t('Sort: {label}', { label: t(currentSort.label) })}
|
|
181
|
-
|
|
183
|
+
title={t(currentSort.label)}
|
|
184
|
+
className="flex h-8 flex-none items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-xs transition-colors hover:bg-accent aria-expanded:bg-accent"
|
|
182
185
|
{...props}
|
|
183
186
|
>
|
|
184
187
|
<currentSort.icon className="size-3.5 text-muted-foreground" />
|
|
185
|
-
{t(currentSort.label)}
|
|
188
|
+
<span className="hidden @lg:inline">{t(currentSort.label)}</span>
|
|
186
189
|
<ChevronDown className="size-3 text-muted-foreground" />
|
|
187
190
|
</button>
|
|
188
191
|
)}
|
|
@@ -204,7 +207,7 @@ export function Home() {
|
|
|
204
207
|
))
|
|
205
208
|
}
|
|
206
209
|
</Menu>
|
|
207
|
-
<label className="flex h-8 w-
|
|
210
|
+
<label className="flex h-8 min-w-0 flex-1 items-center gap-2 @2xl:w-56 @2xl:flex-none rounded-md border border-border bg-background px-2.5 text-xs focus-within:border-foreground focus-within:ring-2 focus-within:ring-primary/30">
|
|
208
211
|
<Search className="size-3.5 flex-none text-muted-foreground" />
|
|
209
212
|
<input
|
|
210
213
|
type="search"
|
|
@@ -478,19 +481,20 @@ function DraftWithAgentButton() {
|
|
|
478
481
|
<button
|
|
479
482
|
type="button"
|
|
480
483
|
onClick={() => void start()}
|
|
484
|
+
aria-label={t.agent.createDoc}
|
|
481
485
|
title={
|
|
482
486
|
provider
|
|
483
487
|
? format(t.agent.createDocWith, { provider: provider.name })
|
|
484
488
|
: t.agent.quickCreateHint
|
|
485
489
|
}
|
|
486
|
-
className="flex h-8 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs transition-colors hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-foreground/60"
|
|
490
|
+
className="flex h-8 flex-none items-center gap-1.5 rounded-md border border-border px-2.5 text-xs transition-colors hover:bg-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-foreground/60"
|
|
487
491
|
>
|
|
488
492
|
{provider ? (
|
|
489
493
|
<ProviderLogo provider={provider.id} className="size-3.5" />
|
|
490
494
|
) : (
|
|
491
495
|
<Sparkles className="size-3.5" />
|
|
492
496
|
)}
|
|
493
|
-
{t.agent.createDoc}
|
|
497
|
+
<span className="hidden @lg:inline">{t.agent.createDoc}</span>
|
|
494
498
|
</button>
|
|
495
499
|
);
|
|
496
500
|
}
|
package/src/app/virtual.d.ts
CHANGED
|
@@ -26,6 +26,6 @@ declare module 'virtual:open-doc/config' {
|
|
|
26
26
|
import type { OpenDocConfig } from '../config';
|
|
27
27
|
|
|
28
28
|
type ResolvedBuild = { showDocBrowser: boolean; allowHtmlExport: boolean };
|
|
29
|
-
const config: OpenDocConfig & { build: ResolvedBuild; version: string };
|
|
29
|
+
const config: OpenDocConfig & { build: ResolvedBuild; version: string; fromSource: boolean };
|
|
30
30
|
export default config;
|
|
31
31
|
}
|