@imenam/mcp-documentor 1.0.40 → 1.0.42
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/shared/schemas/doc.schema.d.ts +19 -0
- package/dist/shared/schemas/doc.schema.js +18 -0
- package/dist/src/core/storage-engine.d.ts +3 -1
- package/dist/src/core/storage-engine.js +15 -0
- package/dist/src/gui-worker.js +85 -3
- package/dist/src/index.js +55 -1
- package/dist/src/tools/delete-export-bundle.d.ts +14 -0
- package/dist/src/tools/delete-export-bundle.js +24 -0
- package/dist/src/tools/prepare-export-bundle.d.ts +14 -0
- package/dist/src/tools/prepare-export-bundle.js +40 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/gui/dist/assets/_baseUniq-CAC7UtIV.js +1 -0
- package/gui/dist/assets/arc-CWPLoMKh.js +1 -0
- package/gui/dist/assets/architectureDiagram-Q4EWVU46-BWFAS_jb.js +36 -0
- package/gui/dist/assets/blockDiagram-DXYQGD6D-CT_9uxA4.js +132 -0
- package/gui/dist/assets/c4Diagram-AHTNJAMY-D-DmwGiz.js +10 -0
- package/gui/dist/assets/channel-BPqVwb1D.js +1 -0
- package/gui/dist/assets/chunk-4BX2VUAB-C0xLQwJ7.js +1 -0
- package/gui/dist/assets/chunk-4TB4RGXK-bMsBCqYj.js +206 -0
- package/gui/dist/assets/chunk-55IACEB6-BY1WMvcH.js +1 -0
- package/gui/dist/assets/chunk-EDXVE4YY-BQC7TacF.js +1 -0
- package/gui/dist/assets/chunk-FMBD7UC4-bP7fPFzd.js +15 -0
- package/gui/dist/assets/chunk-OYMX7WX6-C4IwYIda.js +231 -0
- package/gui/dist/assets/chunk-QZHKN3VN-Cf4Xcz9l.js +1 -0
- package/gui/dist/assets/chunk-YZCP3GAM-CigQkEAZ.js +1 -0
- package/gui/dist/assets/classDiagram-6PBFFD2Q-C4UDSQAO.js +1 -0
- package/gui/dist/assets/classDiagram-v2-HSJHXN6E-C4UDSQAO.js +1 -0
- package/gui/dist/assets/clone-Bqy5nShd.js +1 -0
- package/gui/dist/assets/cose-bilkent-S5V4N54A-CrIJv9Xh.js +1 -0
- package/gui/dist/assets/cytoscape.esm-DkOyvmE4.js +321 -0
- package/gui/dist/assets/dagre-KV5264BT-DTbmoEVc.js +4 -0
- package/gui/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/gui/dist/assets/diagram-5BDNPKRD-Cnjq8sNy.js +10 -0
- package/gui/dist/assets/diagram-G4DWMVQ6-Cc0sWbzZ.js +24 -0
- package/gui/dist/assets/diagram-MMDJMWI5-D34S9PpQ.js +43 -0
- package/gui/dist/assets/diagram-TYMM5635-BsPe6ShI.js +24 -0
- package/gui/dist/assets/erDiagram-SMLLAGMA-BeFJ1foo.js +85 -0
- package/gui/dist/assets/flowDiagram-DWJPFMVM-CjMFd88O.js +162 -0
- package/gui/dist/assets/ganttDiagram-T4ZO3ILL-CugMb9XL.js +292 -0
- package/gui/dist/assets/gitGraphDiagram-UUTBAWPF-BMDVmwo4.js +106 -0
- package/gui/dist/assets/graph-IE3vzU1d.js +1 -0
- package/gui/dist/assets/index-BEJDvqRE.css +1 -0
- package/gui/dist/assets/index-Tfvmw2iu.js +355 -0
- package/gui/dist/assets/infoDiagram-42DDH7IO-dFksHKzL.js +2 -0
- package/gui/dist/assets/init-Gi6I4Gst.js +1 -0
- package/gui/dist/assets/ishikawaDiagram-UXIWVN3A-Dn5JS3n-.js +70 -0
- package/gui/dist/assets/journeyDiagram-VCZTEJTY-flNLUjGA.js +139 -0
- package/gui/dist/assets/kanban-definition-6JOO6SKY-BHMQ95I3.js +89 -0
- package/gui/dist/assets/katex-DHMw6HUq.js +257 -0
- package/gui/dist/assets/layout-DILumY9_.js +1 -0
- package/gui/dist/assets/linear-CEWdQMoX.js +1 -0
- package/gui/dist/assets/min-BSijUdNS.js +1 -0
- package/gui/dist/assets/mindmap-definition-QFDTVHPH-CbIdCT18.js +96 -0
- package/gui/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/gui/dist/assets/pieDiagram-DEJITSTG-BIeSpZ8o.js +30 -0
- package/gui/dist/assets/quadrantDiagram-34T5L4WZ-C2_VeK0y.js +7 -0
- package/gui/dist/assets/requirementDiagram-MS252O5E-BobeMyYU.js +84 -0
- package/gui/dist/assets/sankeyDiagram-XADWPNL6-_0K0w8mh.js +10 -0
- package/gui/dist/assets/sequenceDiagram-FGHM5R23-CxWseivu.js +157 -0
- package/gui/dist/assets/stateDiagram-FHFEXIEX-xAnXnHUU.js +1 -0
- package/gui/dist/assets/stateDiagram-v2-QKLJ7IA2-BAi3xiyL.js +1 -0
- package/gui/dist/assets/timeline-definition-GMOUNBTQ-CPuPjJg7.js +120 -0
- package/gui/dist/assets/vennDiagram-DHZGUBPP-oTLkRNDM.js +34 -0
- package/gui/dist/assets/wardley-RL74JXVD-AP7N9VGj.js +162 -0
- package/gui/dist/assets/wardleyDiagram-NUSXRM2D-t_vBEbYh.js +20 -0
- package/gui/dist/assets/xychartDiagram-5P7HB3ND-DrSm-1-s.js +7 -0
- package/gui/dist/index.html +3 -3
- package/package.json +2 -1
- package/gui/dist/assets/index-DoIhSuif.css +0 -1
- package/gui/dist/assets/index-Dwlj9iqX.js +0 -53
|
@@ -164,6 +164,25 @@ export declare const RestoreDocVersionArgsSchema: z.ZodObject<{
|
|
|
164
164
|
version: z.ZodNumber;
|
|
165
165
|
project: z.ZodOptional<z.ZodString>;
|
|
166
166
|
}, z.core.$strip>;
|
|
167
|
+
export declare const ExportBundleSchema: z.ZodObject<{
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
zipFilename: z.ZodString;
|
|
171
|
+
docs: z.ZodArray<z.ZodString>;
|
|
172
|
+
description: z.ZodOptional<z.ZodString>;
|
|
173
|
+
createdAt: z.ZodString;
|
|
174
|
+
updatedAt: z.ZodString;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export type ExportBundle = z.infer<typeof ExportBundleSchema>;
|
|
177
|
+
export declare const PrepareExportBundleArgsSchema: z.ZodObject<{
|
|
178
|
+
name: z.ZodString;
|
|
179
|
+
zip_filename: z.ZodString;
|
|
180
|
+
docs: z.ZodArray<z.ZodString>;
|
|
181
|
+
description: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
export declare const DeleteExportBundleArgsSchema: z.ZodObject<{
|
|
184
|
+
id: z.ZodString;
|
|
185
|
+
}, z.core.$strip>;
|
|
167
186
|
export declare const IPCMessageSchema: z.ZodObject<{
|
|
168
187
|
type: z.ZodString;
|
|
169
188
|
correlationId: z.ZodOptional<z.ZodString>;
|
|
@@ -109,6 +109,24 @@ export const RestoreDocVersionArgsSchema = z.object({
|
|
|
109
109
|
version: z.number().int().positive(),
|
|
110
110
|
project: z.string().optional(),
|
|
111
111
|
});
|
|
112
|
+
export const ExportBundleSchema = z.object({
|
|
113
|
+
id: z.string(),
|
|
114
|
+
name: z.string(),
|
|
115
|
+
zipFilename: z.string(),
|
|
116
|
+
docs: z.array(z.string()),
|
|
117
|
+
description: z.string().optional(),
|
|
118
|
+
createdAt: z.string(),
|
|
119
|
+
updatedAt: z.string(),
|
|
120
|
+
});
|
|
121
|
+
export const PrepareExportBundleArgsSchema = z.object({
|
|
122
|
+
name: z.string().describe("Bundle name (becomes the identifier via slugify)"),
|
|
123
|
+
zip_filename: z.string().describe("ZIP filename to download, e.g. 'my-bundle.zip'"),
|
|
124
|
+
docs: z.array(z.string()).min(1).describe("Doc references: 'project:doc-id' or 'doc-id' for current project"),
|
|
125
|
+
description: z.string().optional().describe("Short description of the bundle"),
|
|
126
|
+
});
|
|
127
|
+
export const DeleteExportBundleArgsSchema = z.object({
|
|
128
|
+
id: z.string().describe("Bundle identifier to delete (slug)"),
|
|
129
|
+
});
|
|
112
130
|
export const IPCMessageSchema = z.object({
|
|
113
131
|
type: z.string(),
|
|
114
132
|
correlationId: z.string().optional(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DocEntry, DocSummary } from "../../shared/schemas/doc.schema.js";
|
|
1
|
+
import type { DocEntry, DocSummary, ExportBundle } from "../../shared/schemas/doc.schema.js";
|
|
2
2
|
import type { HistoryStore } from "./history-store.js";
|
|
3
3
|
interface GlobalConfig {
|
|
4
4
|
currentProject: string;
|
|
@@ -28,6 +28,8 @@ export declare class StorageEngine {
|
|
|
28
28
|
} | null>;
|
|
29
29
|
deleteDoc(id: string, project?: string): Promise<boolean>;
|
|
30
30
|
moveDoc(oldId: string, newId: string, project?: string): Promise<boolean>;
|
|
31
|
+
getBundles(): ExportBundle[];
|
|
32
|
+
saveBundles(bundles: ExportBundle[]): void;
|
|
31
33
|
rewriteLinks(oldId: string, newId: string, project?: string): Promise<string[]>;
|
|
32
34
|
}
|
|
33
35
|
export {};
|
|
@@ -206,6 +206,21 @@ export class StorageEngine {
|
|
|
206
206
|
logger.info(`Doc moved: ${oldFilePath} → ${newFilePath}`);
|
|
207
207
|
return true;
|
|
208
208
|
}
|
|
209
|
+
getBundles() {
|
|
210
|
+
const p = path.join(this.getDataDir(), "export-bundles.json");
|
|
211
|
+
if (!fs.existsSync(p))
|
|
212
|
+
return [];
|
|
213
|
+
try {
|
|
214
|
+
return JSON.parse(fs.readFileSync(p, "utf-8"));
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
return [];
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
saveBundles(bundles) {
|
|
221
|
+
const p = path.join(this.getDataDir(), "export-bundles.json");
|
|
222
|
+
fs.writeFileSync(p, JSON.stringify(bundles, null, 2), "utf-8");
|
|
223
|
+
}
|
|
209
224
|
async rewriteLinks(oldId, newId, project) {
|
|
210
225
|
const config = this.getConfig();
|
|
211
226
|
const proj = project ?? config.currentProject;
|
package/dist/src/gui-worker.js
CHANGED
|
@@ -8,6 +8,8 @@ import path from "path";
|
|
|
8
8
|
import fs from "fs";
|
|
9
9
|
import { fileURLToPath } from "url";
|
|
10
10
|
import { createLogger, setupLogging } from "@imenam/mcp-gui-interface";
|
|
11
|
+
import matter from "gray-matter";
|
|
12
|
+
import JSZip from "jszip";
|
|
11
13
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
14
|
function findProjectRoot(startDir) {
|
|
13
15
|
let current = startDir;
|
|
@@ -20,8 +22,10 @@ function findProjectRoot(startDir) {
|
|
|
20
22
|
return startDir;
|
|
21
23
|
}
|
|
22
24
|
const rootDir = findProjectRoot(__dirname);
|
|
25
|
+
const dataDir = process.env.MCP_DATA_DIR?.trim() || path.join(rootDir, ".docs-data");
|
|
23
26
|
const staticRoot = path.join(rootDir, "gui/dist");
|
|
24
27
|
const absoluteStaticRoot = path.resolve(staticRoot);
|
|
28
|
+
const configuredAppPath = process.env.APP_PATH || "/documentor-gui";
|
|
25
29
|
setupLogging({ processLabel: "mcp-documentor:GUI", logDir: path.join(rootDir, ".docs-data", "logs") });
|
|
26
30
|
const logger = createLogger("mcp-documentor:GUI");
|
|
27
31
|
process.on("uncaughtException", (err) => {
|
|
@@ -116,7 +120,7 @@ function setupIpcErrorHandlers() {
|
|
|
116
120
|
});
|
|
117
121
|
return;
|
|
118
122
|
}
|
|
119
|
-
if (msg && (msg.type === "INITIAL_STATE" || msg.type === "CONFIG_UPDATED")) {
|
|
123
|
+
if (msg && (msg.type === "INITIAL_STATE" || msg.type === "CONFIG_UPDATED" || msg.type === "BUNDLES_UPDATED")) {
|
|
120
124
|
for (const controller of sseControllers) {
|
|
121
125
|
try {
|
|
122
126
|
controller.writeSSE({ data: JSON.stringify(msg), event: "message" });
|
|
@@ -352,8 +356,83 @@ app.post("/api/search", async (c) => {
|
|
|
352
356
|
return c.json({ error: result.error }, 500);
|
|
353
357
|
return c.json(result.data);
|
|
354
358
|
});
|
|
359
|
+
// Export bundles
|
|
360
|
+
app.get("/api/export-bundles", (c) => {
|
|
361
|
+
const bundlesPath = path.join(dataDir, "export-bundles.json");
|
|
362
|
+
if (!fs.existsSync(bundlesPath))
|
|
363
|
+
return c.json([]);
|
|
364
|
+
try {
|
|
365
|
+
return c.json(JSON.parse(fs.readFileSync(bundlesPath, "utf-8")));
|
|
366
|
+
}
|
|
367
|
+
catch {
|
|
368
|
+
return c.json([]);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
app.get("/api/export-zip/:id", async (c) => {
|
|
372
|
+
const id = c.req.param("id");
|
|
373
|
+
const bundlesPath = path.join(dataDir, "export-bundles.json");
|
|
374
|
+
let bundles = [];
|
|
375
|
+
try {
|
|
376
|
+
if (fs.existsSync(bundlesPath))
|
|
377
|
+
bundles = JSON.parse(fs.readFileSync(bundlesPath, "utf-8"));
|
|
378
|
+
}
|
|
379
|
+
catch {
|
|
380
|
+
return c.json({ error: "Failed to read bundles" }, 500);
|
|
381
|
+
}
|
|
382
|
+
const bundle = bundles.find((b) => b.id === id);
|
|
383
|
+
if (!bundle)
|
|
384
|
+
return c.json({ error: "Bundle not found" }, 404);
|
|
385
|
+
let currentProject = "default";
|
|
386
|
+
try {
|
|
387
|
+
const configPath = path.join(dataDir, "config.json");
|
|
388
|
+
if (fs.existsSync(configPath)) {
|
|
389
|
+
currentProject = JSON.parse(fs.readFileSync(configPath, "utf-8")).currentProject ?? "default";
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
catch { /* use default */ }
|
|
393
|
+
const zip = new JSZip();
|
|
394
|
+
for (const ref of bundle.docs) {
|
|
395
|
+
let project;
|
|
396
|
+
let docId;
|
|
397
|
+
if (ref.includes(":")) {
|
|
398
|
+
const colonIdx = ref.indexOf(":");
|
|
399
|
+
project = ref.slice(0, colonIdx);
|
|
400
|
+
docId = ref.slice(colonIdx + 1);
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
project = currentProject;
|
|
404
|
+
docId = ref;
|
|
405
|
+
}
|
|
406
|
+
const docFilePath = path.join(dataDir, "projects", project, ...docId.split("/")) + ".md";
|
|
407
|
+
let content;
|
|
408
|
+
if (!fs.existsSync(docFilePath)) {
|
|
409
|
+
content = `# [Doc not found: ${ref}]\n`;
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
try {
|
|
413
|
+
content = matter(fs.readFileSync(docFilePath, "utf-8")).content.trim();
|
|
414
|
+
}
|
|
415
|
+
catch {
|
|
416
|
+
content = `# [Read error: ${ref}]\n`;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
zip.file(`${project}/${docId}.md`, content);
|
|
420
|
+
}
|
|
421
|
+
const zipBuffer = await zip.generateAsync({ type: "nodebuffer" });
|
|
422
|
+
return new Response(new Uint8Array(zipBuffer), {
|
|
423
|
+
status: 200,
|
|
424
|
+
headers: {
|
|
425
|
+
"Content-Type": "application/zip",
|
|
426
|
+
"Content-Disposition": `attachment; filename="${bundle.zipFilename}"`,
|
|
427
|
+
},
|
|
428
|
+
});
|
|
429
|
+
});
|
|
355
430
|
// Static files
|
|
356
431
|
app.use("/assets/*", serveStatic({ root: path.relative(process.cwd(), absoluteStaticRoot) }));
|
|
432
|
+
function getHtmlBaseHref(appPath) {
|
|
433
|
+
const normalized = appPath.startsWith("/") ? appPath : `/${appPath}`;
|
|
434
|
+
return normalized.endsWith("/") ? normalized : `${normalized}/`;
|
|
435
|
+
}
|
|
357
436
|
// SPA Fallback
|
|
358
437
|
app.get("/*", (c, next) => {
|
|
359
438
|
const urlPath = c.req.path;
|
|
@@ -363,7 +442,10 @@ app.get("/*", (c, next) => {
|
|
|
363
442
|
try {
|
|
364
443
|
const indexPath = path.join(absoluteStaticRoot, "index.html");
|
|
365
444
|
if (fs.existsSync(indexPath)) {
|
|
366
|
-
const
|
|
445
|
+
const baseHref = getHtmlBaseHref(configuredAppPath);
|
|
446
|
+
const html = fs
|
|
447
|
+
.readFileSync(indexPath, "utf8")
|
|
448
|
+
.replace("<head>", `<head>\n <base href="${baseHref}" />`);
|
|
367
449
|
return c.html(html);
|
|
368
450
|
}
|
|
369
451
|
return c.text("GUI Build not found at " + absoluteStaticRoot, 404);
|
|
@@ -378,7 +460,7 @@ async function startServer() {
|
|
|
378
460
|
process.exit(0);
|
|
379
461
|
}
|
|
380
462
|
const proxyUrl = process.env.PROXY_URL;
|
|
381
|
-
const appPath =
|
|
463
|
+
const appPath = configuredAppPath;
|
|
382
464
|
const appName = process.env.APP_NAME || "MCP Documentor GUI";
|
|
383
465
|
logger.info(`Starting server with proxyUrl=${proxyUrl}`);
|
|
384
466
|
proxyClient = new ProxyClient(proxyUrl);
|
package/dist/src/index.js
CHANGED
|
@@ -34,6 +34,8 @@ import { listDocVersions } from "./tools/list-doc-versions.js";
|
|
|
34
34
|
import { getDocVersion } from "./tools/get-doc-version.js";
|
|
35
35
|
import { restoreDocVersion } from "./tools/restore-doc-version.js";
|
|
36
36
|
import { reindexEmbeddings } from "./tools/reindex-embeddings.js";
|
|
37
|
+
import { prepareExportBundle } from "./tools/prepare-export-bundle.js";
|
|
38
|
+
import { deleteExportBundle } from "./tools/delete-export-bundle.js";
|
|
37
39
|
const __filename = fileURLToPath(import.meta.url);
|
|
38
40
|
const __dirname = path.dirname(__filename);
|
|
39
41
|
function findProjectRoot(startDir) {
|
|
@@ -150,10 +152,11 @@ async function handleGetInitialState(msg) {
|
|
|
150
152
|
doc.isStale = report.status === "stale";
|
|
151
153
|
}
|
|
152
154
|
}
|
|
155
|
+
const bundles = storageEngine.getBundles();
|
|
153
156
|
broadcastToGUI({
|
|
154
157
|
type: "INITIAL_STATE",
|
|
155
158
|
correlationId: msg.correlationId,
|
|
156
|
-
data: { config, docs, projects: config.projects },
|
|
159
|
+
data: { config, docs, projects: config.projects, bundles },
|
|
157
160
|
timestamp: new Date().toISOString(),
|
|
158
161
|
});
|
|
159
162
|
}
|
|
@@ -898,6 +901,35 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
898
901
|
required: [],
|
|
899
902
|
},
|
|
900
903
|
},
|
|
904
|
+
{
|
|
905
|
+
name: "prepare_export_bundle",
|
|
906
|
+
description: "Create or update a named export bundle: a set of documentation references that the user can download as a ZIP from the GUI. The ZIP contains clean markdown content (no frontmatter). Existing bundle with the same name is replaced.",
|
|
907
|
+
inputSchema: {
|
|
908
|
+
type: "object",
|
|
909
|
+
properties: {
|
|
910
|
+
name: { type: "string", description: "Bundle display name (becomes the identifier via slugify)" },
|
|
911
|
+
zip_filename: { type: "string", description: "ZIP filename to download, e.g. 'my-bundle.zip'" },
|
|
912
|
+
docs: {
|
|
913
|
+
type: "array",
|
|
914
|
+
items: { type: "string" },
|
|
915
|
+
description: "Doc references to include: 'project:doc-id' for cross-project, or 'doc-id' for current project",
|
|
916
|
+
},
|
|
917
|
+
description: { type: "string", description: "Short description of the bundle (optional)" },
|
|
918
|
+
},
|
|
919
|
+
required: ["name", "zip_filename", "docs"],
|
|
920
|
+
},
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
name: "delete_export_bundle",
|
|
924
|
+
description: "Delete an export bundle by its identifier (slug).",
|
|
925
|
+
inputSchema: {
|
|
926
|
+
type: "object",
|
|
927
|
+
properties: {
|
|
928
|
+
id: { type: "string", description: "Bundle identifier to delete (slug, e.g. 'my-bundle')" },
|
|
929
|
+
},
|
|
930
|
+
required: ["id"],
|
|
931
|
+
},
|
|
932
|
+
},
|
|
901
933
|
],
|
|
902
934
|
};
|
|
903
935
|
});
|
|
@@ -945,6 +977,28 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
945
977
|
return await restoreDocVersion(historyStore, storageEngine, embeddingEngine, args);
|
|
946
978
|
case "reindex_embeddings":
|
|
947
979
|
return await reindexEmbeddings(storageEngine, embeddingEngine, embeddingStore, args);
|
|
980
|
+
case "prepare_export_bundle": {
|
|
981
|
+
const result = await prepareExportBundle(storageEngine, args);
|
|
982
|
+
if (!result.isError) {
|
|
983
|
+
broadcastToGUI({
|
|
984
|
+
type: "BUNDLES_UPDATED",
|
|
985
|
+
data: { bundles: storageEngine.getBundles() },
|
|
986
|
+
timestamp: new Date().toISOString(),
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
return result;
|
|
990
|
+
}
|
|
991
|
+
case "delete_export_bundle": {
|
|
992
|
+
const result = await deleteExportBundle(storageEngine, args);
|
|
993
|
+
if (!result.isError) {
|
|
994
|
+
broadcastToGUI({
|
|
995
|
+
type: "BUNDLES_UPDATED",
|
|
996
|
+
data: { bundles: storageEngine.getBundles() },
|
|
997
|
+
timestamp: new Date().toISOString(),
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
return result;
|
|
1001
|
+
}
|
|
948
1002
|
default:
|
|
949
1003
|
throw new Error(`Tool not found: ${name}`);
|
|
950
1004
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StorageEngine } from "../core/storage-engine.js";
|
|
2
|
+
export declare function deleteExportBundle(storageEngine: StorageEngine, args: unknown): Promise<{
|
|
3
|
+
isError: boolean;
|
|
4
|
+
content: {
|
|
5
|
+
type: string;
|
|
6
|
+
text: string;
|
|
7
|
+
}[];
|
|
8
|
+
} | {
|
|
9
|
+
content: {
|
|
10
|
+
type: string;
|
|
11
|
+
text: string;
|
|
12
|
+
}[];
|
|
13
|
+
isError?: undefined;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DeleteExportBundleArgsSchema } from "../../shared/schemas/doc.schema.js";
|
|
2
|
+
export async function deleteExportBundle(storageEngine, args) {
|
|
3
|
+
try {
|
|
4
|
+
const validated = DeleteExportBundleArgsSchema.parse(args);
|
|
5
|
+
const bundles = storageEngine.getBundles();
|
|
6
|
+
const index = bundles.findIndex((b) => b.id === validated.id);
|
|
7
|
+
if (index < 0) {
|
|
8
|
+
return {
|
|
9
|
+
isError: true,
|
|
10
|
+
content: [{ type: "text", text: `Bundle with id "${validated.id}" not found.` }],
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const removed = bundles[index];
|
|
14
|
+
bundles.splice(index, 1);
|
|
15
|
+
storageEngine.saveBundles(bundles);
|
|
16
|
+
return {
|
|
17
|
+
content: [{ type: "text", text: `Export bundle "${removed.name}" (id: "${removed.id}") deleted.` }],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
22
|
+
return { isError: true, content: [{ type: "text", text: `Error deleting export bundle: ${message}` }] };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StorageEngine } from "../core/storage-engine.js";
|
|
2
|
+
export declare function prepareExportBundle(storageEngine: StorageEngine, args: unknown): Promise<{
|
|
3
|
+
content: {
|
|
4
|
+
type: string;
|
|
5
|
+
text: string;
|
|
6
|
+
}[];
|
|
7
|
+
isError?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
isError: boolean;
|
|
10
|
+
content: {
|
|
11
|
+
type: string;
|
|
12
|
+
text: string;
|
|
13
|
+
}[];
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PrepareExportBundleArgsSchema } from "../../shared/schemas/doc.schema.js";
|
|
2
|
+
import { slugify } from "./create-doc.js";
|
|
3
|
+
export async function prepareExportBundle(storageEngine, args) {
|
|
4
|
+
try {
|
|
5
|
+
const validated = PrepareExportBundleArgsSchema.parse(args);
|
|
6
|
+
const id = slugify(validated.name);
|
|
7
|
+
const now = new Date().toISOString();
|
|
8
|
+
const bundles = storageEngine.getBundles();
|
|
9
|
+
const existingIndex = bundles.findIndex((b) => b.id === id);
|
|
10
|
+
const bundle = {
|
|
11
|
+
id,
|
|
12
|
+
name: validated.name,
|
|
13
|
+
zipFilename: validated.zip_filename.endsWith(".zip")
|
|
14
|
+
? validated.zip_filename
|
|
15
|
+
: `${validated.zip_filename}.zip`,
|
|
16
|
+
docs: validated.docs,
|
|
17
|
+
...(validated.description && { description: validated.description }),
|
|
18
|
+
createdAt: existingIndex >= 0 ? bundles[existingIndex].createdAt : now,
|
|
19
|
+
updatedAt: now,
|
|
20
|
+
};
|
|
21
|
+
if (existingIndex >= 0) {
|
|
22
|
+
bundles[existingIndex] = bundle;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
bundles.push(bundle);
|
|
26
|
+
}
|
|
27
|
+
storageEngine.saveBundles(bundles);
|
|
28
|
+
const action = existingIndex >= 0 ? "updated" : "created";
|
|
29
|
+
return {
|
|
30
|
+
content: [{
|
|
31
|
+
type: "text",
|
|
32
|
+
text: `Export bundle "${validated.name}" (id: "${id}") ${action} with ${validated.docs.length} doc(s). ZIP filename: "${bundle.zipFilename}".`,
|
|
33
|
+
}],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
38
|
+
return { isError: true, content: [{ type: "text", text: `Error preparing export bundle: ${message}` }] };
|
|
39
|
+
}
|
|
40
|
+
}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const APP_VERSION = "1.0.
|
|
1
|
+
export declare const APP_VERSION = "1.0.42";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Auto-generated version file - do not edit manually
|
|
2
|
-
export const APP_VERSION = '1.0.
|
|
2
|
+
export const APP_VERSION = '1.0.42';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aY as L,bu as ln,aH as A,aW as P,aG as W,bv as gn,bw as dn,bx as hn,by as z,bz as pn,bp as An,bA as m,aZ as N,b2 as B,b5 as T,bB as _n,b0 as on,bC as wn,bs as On,aI as V,bq as vn,bD as R}from"./index-Tfvmw2iu.js";var Pn="[object Symbol]";function x(n){return typeof n=="symbol"||L(n)&&ln(n)==Pn}function bn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var U=P?P.prototype:void 0,H=U?U.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return bn(n,k)+"";if(x(n))return H?H.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(){}function En(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function cn(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function Tn(n){return n!==n}function In(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function Rn(n,r,e){return r===r?In(n,r,e):cn(n,Tn,e)}function Sn(n,r){var e=n==null?0:n.length;return!!e&&Rn(n,r,0)>-1}function M(n){return W(n)?gn(n):dn(n)}var Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function C(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Ln.test(n)||r!=null&&n in Object(r)}var Mn=500;function Cn(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var $n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dn=/\\(\\)?/g,Gn=Cn(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace($n,function(e,i,f,t){r.push(f?t.replace(Dn,"$1"):i||e)}),r});function Fn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:C(n,r)?[n]:Gn(Fn(n))}function I(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[I(r[e++])];return e&&e==i?n:void 0}function mn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var K=P?P.isConcatSpreadable:void 0;function Nn(n){return A(n)||z(n)||!!(K&&n&&n[K])}function Kr(n,r,e,i,f){var t=-1,s=n.length;for(e||(e=Nn),f||(f=[]);++t<s;){var u=n[t];e(u)?rn(f,u):i||(f[f.length]=u)}return f}function Bn(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var s=n[e];r(s,e,n)&&(t[f++]=s)}return t}function Un(){return[]}var Hn=Object.prototype,Kn=Hn.propertyIsEnumerable,q=Object.getOwnPropertySymbols,qn=q?function(n){return n==null?[]:(n=Object(n),en(q(n),function(r){return Kn.call(n,r)}))}:Un;function Zn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function Z(n){return Zn(n,M,qn)}var Yn="__lodash_hash_undefined__";function Xn(n){return this.__data__.set(n,Yn),this}function Jn(n){return this.__data__.has(n)}function b(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new pn;++r<e;)this.add(n[r])}b.prototype.add=b.prototype.push=Xn;b.prototype.has=Jn;function Qn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Wn=1,zn=2;function fn(n,r,e,i,f,t){var s=e&Wn,u=n.length,a=r.length;if(u!=a&&!(s&&a>u))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&zn?new b:void 0;for(t.set(n,r),t.set(r,n);++l<u;){var p=n[l],_=r[l];if(i)var w=s?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(w!==void 0){if(w)continue;d=!1;break}if(o){if(!Qn(r,function(O,v){if(!tn(o,v)&&(p===O||f(p,O,e,i,t)))return o.push(v)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Vn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function $(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var kn=1,jn=2,nr="[object Boolean]",rr="[object Date]",er="[object Error]",ir="[object Map]",tr="[object Number]",fr="[object RegExp]",sr="[object Set]",ur="[object String]",ar="[object Symbol]",lr="[object ArrayBuffer]",gr="[object DataView]",Y=P?P.prototype:void 0,S=Y?Y.valueOf:void 0;function dr(n,r,e,i,f,t,s){switch(e){case gr:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case lr:return!(n.byteLength!=r.byteLength||!t(new m(n),new m(r)));case nr:case rr:case tr:return An(+n,+r);case er:return n.name==r.name&&n.message==r.message;case fr:case ur:return n==r+"";case ir:var u=Vn;case sr:var a=i&kn;if(u||(u=$),n.size!=r.size&&!a)return!1;var h=s.get(n);if(h)return h==r;i|=jn,s.set(n,r);var g=fn(u(n),u(r),i,f,t,s);return s.delete(n),g;case ar:if(S)return S.call(n)==S.call(r)}return!1}var hr=1,pr=Object.prototype,Ar=pr.hasOwnProperty;function _r(n,r,e,i,f,t){var s=e&hr,u=Z(n),a=u.length,h=Z(r),g=h.length;if(a!=g&&!s)return!1;for(var l=a;l--;){var d=u[l];if(!(s?d in r:Ar.call(r,d)))return!1}var o=t.get(n),p=t.get(r);if(o&&p)return o==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var w=s;++l<a;){d=u[l];var O=n[d],v=r[d];if(i)var F=s?i(v,O,d,r,n,t):i(O,v,d,n,r,t);if(!(F===void 0?O===v||f(O,v,e,i,t):F)){_=!1;break}w||(w=d=="constructor")}if(_&&!w){var y=n.constructor,E=r.constructor;y!=E&&"constructor"in n&&"constructor"in r&&!(typeof y=="function"&&y instanceof y&&typeof E=="function"&&E instanceof E)&&(_=!1)}return t.delete(n),t.delete(r),_}var or=1,X="[object Arguments]",J="[object Array]",c="[object Object]",wr=Object.prototype,Q=wr.hasOwnProperty;function Or(n,r,e,i,f,t){var s=A(n),u=A(r),a=s?J:N(n),h=u?J:N(r);a=a==X?c:a,h=h==X?c:h;var g=a==c,l=h==c,d=a==h;if(d&&B(n)){if(!B(r))return!1;s=!0,g=!1}if(d&&!g)return t||(t=new T),s||_n(n)?fn(n,r,e,i,f,t):dr(n,r,a,e,i,f,t);if(!(e&or)){var o=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(o||p){var _=o?n.value():n,w=p?r.value():r;return t||(t=new T),f(_,w,e,i,t)}}return d?(t||(t=new T),_r(n,r,e,i,f,t)):!1}function D(n,r,e,i,f){return n===r?!0:n==null||r==null||!L(n)&&!L(r)?n!==n&&r!==r:Or(n,r,e,i,D,f)}var vr=1,Pr=2;function br(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var s=e[f];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<t;){s=e[f];var u=s[0],a=n[u],h=s[1];if(s[2]){if(a===void 0&&!(u in n))return!1}else{var g=new T,l;if(!(l===void 0?D(h,a,vr|Pr,i,g):l))return!1}}return!0}function sn(n){return n===n&&!on(n)}function yr(n){for(var r=M(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,sn(f)]}return r}function un(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function Er(n){var r=yr(n);return r.length==1&&r[0][2]?un(r[0][0],r[0][1]):function(e){return e===n||br(e,n,r)}}function cr(n,r){return n!=null&&r in Object(n)}function Tr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var s=I(r[i]);if(!(t=n!=null&&e(n,s)))break;n=n[s]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&On(s,f)&&(A(n)||z(n)))}function Ir(n,r){return n!=null&&Tr(n,r,cr)}var Rr=1,Sr=2;function Lr(n,r){return C(n)&&sn(r)?un(I(n),r):function(e){var i=mn(e,n);return i===void 0&&i===r?Ir(e,n):D(r,i,Rr|Sr)}}function xr(n){return function(r){return r?.[n]}}function Mr(n){return function(r){return nn(r,n)}}function Cr(n){return C(n)?xr(I(n)):Mr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Lr(n[0],n[1]):Er(n):Cr(n)}function $r(n,r){return n&&vn(n,r,M)}function Dr(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,s=Object(e);++t<f&&i(s[t],t,s)!==!1;);return e}}var G=Dr($r);function Gr(n){return typeof n=="function"?n:V}function qr(n,r){var e=A(n)?En:G;return e(n,Gr(r))}function Fr(n,r){var e=[];return G(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Zr(n,r){var e=A(n)?en:Fr;return e(n,an(r))}function mr(n,r,e,i,f){return f(n,function(t,s,u){e=i?(i=!1,t):r(e,t,s,u)}),e}function Yr(n,r,e){var i=A(n)?Bn:mr,f=arguments.length<3;return i(n,an(r),e,f,G)}var Nr=1/0,Br=R&&1/$(new R([,-0]))[1]==Nr?function(n){return new R(n)}:yn,Ur=200;function Xr(n,r,e){var i=-1,f=Sn,t=n.length,s=!0,u=[],a=u;if(t>=Ur){var h=r?null:Br(n);if(h)return $(h);s=!1,f=tn,a=new b}else a=r?[]:u;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,s&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),u.push(g)}else f(a,l,e)||(a!==u&&a.push(l),u.push(g))}return u}export{G as a,Kr as b,an as c,bn as d,rn as e,Zn as f,qn as g,En as h,x as i,Z as j,M as k,Xr as l,Zr as m,qr as n,cn as o,Gr as p,$r as q,Yr as r,Un as s,Tr as t,j as u,I as v,nn as w,Ir as x,Fn as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a0 as ln,a1 as an,a2 as y,a3 as tn,a4 as H,a5 as q,a6 as _,a7 as un,a8 as rn,a9 as L,aa as o,ab as B,ac as sn,ad as on,ae as fn}from"./index-Tfvmw2iu.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,C,a){var O=I-l,i=D-h,n=C-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function W(l,h,I,D,v,A,C){var a=l-I,O=h-D,i=(C?A:-A)/L(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,F=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*L(fn(0,T*T*R-P*P)),j=(P*g-m*S)/R,z=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=j-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=yn,I=B(0),D=null,v=gn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=A.apply(this,arguments)-an,F=un(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(F>tn-y)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>y&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(un(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>y){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>y?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>y?(M*=t?1:-1,m+=M,g-=M):(S=0,m=g=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>y){var U=s*H(g),V=s*q(g),X=u*H(R),Y=u*q(R),E;if(F<rn)if(E=pn(J,K,X,Y,U,V,N,Q)){var Z=J-E[0],$=K-E[1],b=U-E[0],k=V-E[1],nn=1/q(on((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(J,K),a.arc(0,0,s,m,g,!t)):a.moveTo(J,K),!(u>y)||!(P>y)?a.lineTo(N,Q):p>y?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-rn/2;return[H(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:B(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:B(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|