office-open 0.14.5 → 0.14.6

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.
@@ -3,26 +3,26 @@ import { DocumentOptions } from "@office-open/docx";
3
3
  import { PresentationOptions } from "@office-open/pptx";
4
4
  import { WorkbookOptions } from "@office-open/xlsx";
5
5
  //#region src/ai/error.d.ts
6
- declare function formatToolError(type: string, error: unknown): string;
6
+ export declare function formatToolError(type: string, error: unknown): string;
7
7
  //#endregion
8
8
  //#region src/ai/index.d.ts
9
- interface SchemaLookupInput {
9
+ export interface SchemaLookupInput {
10
10
  type: DocumentType;
11
11
  definitions: string[];
12
12
  }
13
- declare const docxTool: import("ai").Tool<DocumentOptions, {
13
+ export declare const docxTool: import("ai").Tool<DocumentOptions, {
14
14
  base64: string;
15
15
  mimeType: string;
16
16
  }>;
17
- declare const pptxTool: import("ai").Tool<PresentationOptions, {
17
+ export declare const pptxTool: import("ai").Tool<PresentationOptions, {
18
18
  base64: string;
19
19
  mimeType: string;
20
20
  }>;
21
- declare const xlsxTool: import("ai").Tool<WorkbookOptions, {
21
+ export declare const xlsxTool: import("ai").Tool<WorkbookOptions, {
22
22
  base64: string;
23
23
  mimeType: string;
24
24
  }>;
25
- declare const schemaLookupTool: import("ai").Tool<SchemaLookupInput, {
25
+ export declare const schemaLookupTool: import("ai").Tool<SchemaLookupInput, {
26
26
  type: DocumentType;
27
27
  requested: string[];
28
28
  typeText: string;
@@ -35,7 +35,7 @@ declare const schemaLookupTool: import("ai").Tool<SchemaLookupInput, {
35
35
  suggestions: readonly string[];
36
36
  typeText?: undefined;
37
37
  }>;
38
- declare const officeOpenTools: {
38
+ export declare const officeOpenTools: {
39
39
  readonly "generate-docx": import("ai").Tool<DocumentOptions, {
40
40
  base64: string;
41
41
  mimeType: string;
@@ -63,5 +63,4 @@ declare const officeOpenTools: {
63
63
  }>;
64
64
  };
65
65
  //#endregion
66
- export { SchemaLookupInput, docxTool, formatToolError, officeOpenTools, pptxTool, schemaLookupTool, xlsxTool };
67
66
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/ai/error.ts","../../src/ai/index.ts"],"mappings":";;;;;iBAWgB,gBAAgB,cAAc;;;UCuB7B;EACf,MAAM;EACN;;cAkBW,uBAAQ,KAAA;;;;cA6BR,uBAAQ,KAAA;;;;cA6BR,uBAAQ,KAAA;;;;cAqCR,+BAAgB,KAAA;;;;;;;;;;;;;cAyDhB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/ai/error.ts","../../src/ai/index.ts"],"mappings":";;;;;wBAWgB,gBAAgB,cAAc;;;iBCuB7B;EACf,MAAM;EACN;;qBAkBW,uBAAQ,KAAA;;;;qBA6BR,uBAAQ,KAAA;;;;qBA6BR,uBAAQ,KAAA;;;;qBAqCR,+BAAgB,KAAA;;;;;;;;;;;;;qBAyDhB"}
package/dist/ai/index.mjs CHANGED
@@ -51,6 +51,7 @@ function generateVerifiedBase64(type, bytes) {
51
51
  }
52
52
  //#endregion
53
53
  //#region src/ai/index.ts
54
+ const SKELETON_GUIDANCE = "This schema is a skeleton — stubs name the definition they stand for. Fetch real fields with the office-open-schema-lookup tool, e.g. { type: 'docx', definitions: ['ParagraphOptions', 'RunOptions'] }. Invalid input is rejected with instance-path errors; fix and retry.";
54
55
  /**
55
56
  * The generate tools return the file as base64 for the client UI, but the
56
57
  * model only needs the outcome — full base64 in the model context would burn
@@ -61,7 +62,7 @@ function documentGeneratedSummary(output) {
61
62
  return `Document generated and all validations passed (${output.mimeType}, ${kb} KB).`;
62
63
  }
63
64
  const docxTool = tool({
64
- description: "Generate a .docx Word document. The input is the document options directly — must include a 'sections' array. Conventions: section children are wrapper-key objects ({ paragraph: {...} }, { table: {...} }, …); run objects require a 'text' key (plain strings also accepted); colors are hex WITHOUT '#': 'FF0000', not '#FF0000'. This schema is a skeleton — stubs name the definition they stand for. Fetch real fields with the office-open-schema-lookup tool, e.g. { type: 'docx', definitions: ['ParagraphOptions', 'RunOptions'] }. Invalid input is rejected with instance-path errors; fix and retry.",
65
+ description: "Generate a .docx Word document. The input is the document options directly — must include a 'sections' array. Conventions: section children are wrapper-key objects ({ paragraph: {...} }, { table: {...} }, …); run objects require a 'text' key (plain strings also accepted); colors are hex WITHOUT '#': 'FF0000', not '#FF0000'. " + SKELETON_GUIDANCE,
65
66
  inputSchema: jsonSchema(getSkeletonSchema("docx")),
66
67
  execute: async (options) => {
67
68
  try {
@@ -84,7 +85,7 @@ const docxTool = tool({
84
85
  })
85
86
  });
86
87
  const pptxTool = tool({
87
- description: "Generate a .pptx PowerPoint presentation. The input is the presentation options directly — must include a 'slides' array. Conventions: shape x/y/width/height take UniversalMeasure strings ('2cm', '1in', '96px') or raw EMU numbers (914400 = 1 inch); fills are hex color strings or fill objects ('4472C4' or { type: 'solidFill', color: '4472C4' }); colors are hex WITHOUT '#': 'FF0000', not '#FF0000'. This schema is a skeleton — stubs name the definition they stand for. Fetch real fields with the office-open-schema-lookup tool, e.g. { type: 'docx', definitions: ['ParagraphOptions', 'RunOptions'] }. Invalid input is rejected with instance-path errors; fix and retry.",
88
+ description: "Generate a .pptx PowerPoint presentation. The input is the presentation options directly — must include a 'slides' array. Conventions: shape x/y/width/height take UniversalMeasure strings ('2cm', '1in', '96px') or raw EMU numbers (914400 = 1 inch); fills are hex color strings or fill objects ('4472C4' or { type: 'solidFill', color: '4472C4' }); colors are hex WITHOUT '#': 'FF0000', not '#FF0000'. " + SKELETON_GUIDANCE,
88
89
  inputSchema: jsonSchema(getSkeletonSchema("pptx")),
89
90
  execute: async (options) => {
90
91
  try {
@@ -107,7 +108,7 @@ const pptxTool = tool({
107
108
  })
108
109
  });
109
110
  const xlsxTool = tool({
110
- description: "Generate a .xlsx Excel spreadsheet. The input is the workbook options directly — must include a 'worksheets' array. Conventions: cells are shorthand values (string, number, boolean, null) or { value, style } objects; column 'width' is in Excel character units. This schema is a skeleton — stubs name the definition they stand for. Fetch real fields with the office-open-schema-lookup tool, e.g. { type: 'docx', definitions: ['ParagraphOptions', 'RunOptions'] }. Invalid input is rejected with instance-path errors; fix and retry.",
111
+ description: "Generate a .xlsx Excel spreadsheet. The input is the workbook options directly — must include a 'worksheets' array. Conventions: cells are shorthand values (string, number, boolean, null) or { value, style } objects; column 'width' is in Excel character units. " + SKELETON_GUIDANCE,
111
112
  inputSchema: jsonSchema(getSkeletonSchema("xlsx")),
112
113
  execute: async (options) => {
113
114
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/ai/error.ts","../../src/ai/verify.ts","../../src/ai/index.ts"],"sourcesContent":["/**\n * Format tool execution errors into LLM-friendly messages.\n *\n * When a tool's `execute` function throws, the AI SDK captures the error as a\n * `tool-error` content part and sends it back to the LLM for self-correction.\n * This module rewrites internal runtime errors into messages the LLM can\n * understand and act on.\n *\n * @module\n */\n\nexport function formatToolError(type: string, error: unknown): string {\n const msg = error instanceof Error ? error.message : String(error);\n\n // ── DOCX: paragraph child errors ──\n\n if (msg.includes(\"Unsupported paragraph child type:\")) {\n const keys = msg.split(\": \").pop() ?? \"\";\n return (\n `Invalid paragraph child \"${keys}\". ` +\n `Paragraph children must use a wrapper key: ` +\n `{ paragraph: { children: [{ text: \"...\", bold?: true }] } }, ` +\n `{ table: { rows: [...] } }, { picture: { ... } }, ` +\n `{ toc: { ... } }, { textbox: { ... } }, ` +\n `{ pageBreak: true }, { columnBreak: true }, etc. ` +\n `Do not use raw property names like { bold: ... } as paragraph children.`\n );\n }\n\n if (msg.includes(\"Unsupported run child type:\")) {\n const keys = msg.split(\": \").pop() ?? \"\";\n return (\n `Invalid run child \"${keys}\". ` +\n `Run children must be text objects: { text: \"...\", bold?: true, italic?: true, size?: number, color?: \"RRGGBB\", ... }. ` +\n `The \"text\" key is required. Plain strings are also accepted as children. ` +\n `Do not use bare property objects like { bold: true } without a \"text\" key.`\n );\n }\n\n if (msg.includes(\"Unknown section child type\")) {\n return (\n `Unknown section child. ` +\n `Section children must use a wrapper key: ` +\n `{ paragraph: { ... } }, { table: { ... } }, ` +\n `{ toc: { ... } }, { textbox: { ... } }, { pageBreak: true }, ` +\n `{ sdt: { ... } }, { altChunk: { ... } }, etc.`\n );\n }\n\n // ── General: iterable errors ──\n\n if (msg.includes(\"not iterable\")) {\n const field = type === \"docx\" ? \"sections\" : type === \"pptx\" ? \"slides\" : \"worksheets\";\n return `\"${field}\" must be an array. Received a non-iterable value.`;\n }\n\n // ── Fallback ──\n\n return `${type.toUpperCase()} generation failed: ${msg}`;\n}\n","/**\n * Post-generation gate for the AI tools: run the OPC package consistency check\n * on freshly generated bytes before handing them to the model.\n *\n * Fresh output is fully under library control, so ANY issue (error or warn) is\n * a library regression, not an options error — fail fast with the diagnosis\n * instead of shipping a file Word/Excel report as corrupt. Mirrors what\n * scripts/validate.ts runs in CI; O7-style duplicate relationship ids are\n * exactly the class of breakage this catches before a user sees it.\n *\n * @module\n */\nimport {\n encodeBase64,\n PART_REGISTRIES,\n unzipSync,\n validateOpcConsistency,\n} from \"@office-open/core\";\n\nimport type { GenerateType } from \"../generate\";\n\n// Binary parts (media, fonts) decode to replacement chars — the check only\n// reads part presence and paths, never their content.\nconst decoder = new TextDecoder(\"utf-8\", { fatal: false });\n\n/** OPC-check a fresh package and return it as base64 for the tool result. */\nexport function generateVerifiedBase64(type: GenerateType, bytes: Uint8Array): string {\n const files = unzipSync(bytes);\n const entries = new Map<string, string>();\n for (const name of Object.keys(files)) {\n entries.set(name, decoder.decode(files[name]));\n }\n const issues = validateOpcConsistency(entries, PART_REGISTRIES[type]!);\n if (issues.length > 0) {\n const lines = issues.map((i) => ` ${i.code} [${i.severity}] ${i.part}: ${i.message}`);\n throw new Error(\n `Generated ${type} failed the OPC package consistency check — your options are valid, ` +\n `this is an office-open bug; please report it:\\n${lines.join(\"\\n\")}`,\n );\n }\n return encodeBase64(bytes);\n}\n","/**\n * Vercel AI SDK tools for generating Office documents.\n *\n * The generate tools use skeleton input schemas (top-level shape + wrapper\n * keys only) instead of the full format schema (~675 KB for docx) — no\n * provider accepts that in a tool definition. Precise field schemas are\n * fetched on demand through the office-open-schema-lookup tool, and the\n * authoritative ajv validation runs inside execute with instancePath-\n * qualified errors the model can iterate on.\n *\n * @module\n */\nimport type { DocumentOptions } from \"@office-open/docx\";\nimport type { PresentationOptions } from \"@office-open/pptx\";\nimport type { WorkbookOptions } from \"@office-open/xlsx\";\nimport { jsonSchema, tool } from \"ai\";\n\nexport { formatToolError } from \"./error\";\n\nimport { lintWorkbookFormulas } from \"@office-open/xlsx\";\n\nimport { generate } from \"../generate\";\nimport {\n getSkeletonSchema,\n renderSliceTypeText,\n sliceDocumentSchema,\n validateDocumentInput,\n} from \"../schemas\";\nimport type { DocumentType } from \"../schemas/schemas\";\nimport { UnknownDefinitionError } from \"../schemas/slice\";\nimport { formatToolError } from \"./error\";\nimport { generateVerifiedBase64 } from \"./verify\";\n\n/** Input accepted by the office-open-schema-lookup tool. */\nexport interface SchemaLookupInput {\n type: DocumentType;\n definitions: string[];\n}\n\nconst SKELETON_GUIDANCE =\n \"This schema is a skeleton — stubs name the definition they stand for. Fetch real fields with the \" +\n \"office-open-schema-lookup tool, e.g. { type: 'docx', definitions: ['ParagraphOptions', 'RunOptions'] }. \" +\n \"Invalid input is rejected with instance-path errors; fix and retry.\";\n\n/**\n * The generate tools return the file as base64 for the client UI, but the\n * model only needs the outcome — full base64 in the model context would burn\n * thousands of tokens per document.\n */\nfunction documentGeneratedSummary(output: { base64: string; mimeType: string }): string {\n const kb = Math.ceil((output.base64.length * 3) / 4 / 1024);\n return `Document generated and all validations passed (${output.mimeType}, ${kb} KB).`;\n}\n\nexport const docxTool = tool({\n description:\n \"Generate a .docx Word document. \" +\n \"The input is the document options directly — must include a 'sections' array. \" +\n \"Conventions: \" +\n \"section children are wrapper-key objects ({ paragraph: {...} }, { table: {...} }, …); \" +\n \"run objects require a 'text' key (plain strings also accepted); \" +\n \"colors are hex WITHOUT '#': 'FF0000', not '#FF0000'. \" +\n SKELETON_GUIDANCE,\n inputSchema: jsonSchema<DocumentOptions>(getSkeletonSchema(\"docx\")),\n execute: async (options) => {\n try {\n const validated = validateDocumentInput(\"docx\", options);\n const bytes = (await generate({\n type: \"docx\",\n options: validated as unknown as DocumentOptions,\n outputType: \"uint8array\",\n })) as Uint8Array;\n return {\n base64: generateVerifiedBase64(\"docx\", bytes),\n mimeType: \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n };\n } catch (error) {\n throw new Error(formatToolError(\"docx\", error));\n }\n },\n toModelOutput: ({ output }) => ({ type: \"text\", value: documentGeneratedSummary(output) }),\n});\n\nexport const pptxTool = tool({\n description:\n \"Generate a .pptx PowerPoint presentation. \" +\n \"The input is the presentation options directly — must include a 'slides' array. \" +\n \"Conventions: \" +\n \"shape x/y/width/height take UniversalMeasure strings ('2cm', '1in', '96px') or raw EMU numbers (914400 = 1 inch); \" +\n \"fills are hex color strings or fill objects ('4472C4' or { type: 'solidFill', color: '4472C4' }); \" +\n \"colors are hex WITHOUT '#': 'FF0000', not '#FF0000'. \" +\n SKELETON_GUIDANCE,\n inputSchema: jsonSchema<PresentationOptions>(getSkeletonSchema(\"pptx\")),\n execute: async (options) => {\n try {\n const validated = validateDocumentInput(\"pptx\", options);\n const bytes = (await generate({\n type: \"pptx\",\n options: validated as unknown as PresentationOptions,\n outputType: \"uint8array\",\n })) as Uint8Array;\n return {\n base64: generateVerifiedBase64(\"pptx\", bytes),\n mimeType: \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n };\n } catch (error) {\n throw new Error(formatToolError(\"pptx\", error));\n }\n },\n toModelOutput: ({ output }) => ({ type: \"text\", value: documentGeneratedSummary(output) }),\n});\n\nexport const xlsxTool = tool({\n description:\n \"Generate a .xlsx Excel spreadsheet. \" +\n \"The input is the workbook options directly — must include a 'worksheets' array. \" +\n \"Conventions: \" +\n \"cells are shorthand values (string, number, boolean, null) or { value, style } objects; \" +\n \"column 'width' is in Excel character units. \" +\n SKELETON_GUIDANCE,\n inputSchema: jsonSchema<WorkbookOptions>(getSkeletonSchema(\"xlsx\")),\n execute: async (options) => {\n try {\n const validated = validateDocumentInput(\"xlsx\", options);\n const formulaIssues = lintWorkbookFormulas(validated as unknown as WorkbookOptions);\n if (formulaIssues.length > 0) {\n const lines = formulaIssues.map(\n (i) => ` ${i.location}: ${i.message} — formula \"${i.formula}\"`,\n );\n throw new Error(\n `Invalid xlsx formulas:\\n${lines.join(\"\\n\")}\\nFix the formula or add the missing worksheet.`,\n );\n }\n const bytes = (await generate({\n type: \"xlsx\",\n options: validated as unknown as WorkbookOptions,\n outputType: \"uint8array\",\n })) as Uint8Array;\n return {\n base64: generateVerifiedBase64(\"xlsx\", bytes),\n mimeType: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n };\n } catch (error) {\n throw new Error(formatToolError(\"xlsx\", error));\n }\n },\n toModelOutput: ({ output }) => ({ type: \"text\", value: documentGeneratedSummary(output) }),\n});\n\nexport const schemaLookupTool = tool({\n description:\n \"Fetch the precise type definitions for office-open option fields on demand. \" +\n \"Use it before filling complex objects into the generate tools: the generate input schemas are \" +\n \"skeletons whose stubs name the definition to look up here. \" +\n \"Valid names come from the skeleton stubs, or list indexed entries with \" +\n \"`npx office-open schema index <type>` (all names with --all). \" +\n \"Returns the requested definitions plus their dependency closure as type-definition text \" +\n '(field types, \"a\" | \"b\" value enums, optional markers, one-line comments); cataloged ' +\n \"domains not requested stay as stubs, so request each domain root you need (e.g. \" +\n \"['ParagraphOptions', 'RunOptions', 'TableOptions']).\",\n inputSchema: jsonSchema<SchemaLookupInput>({\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"definitions\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\"docx\", \"pptx\", \"xlsx\"],\n description: \"Document format whose schema to slice\",\n },\n definitions: {\n type: \"array\",\n items: { type: \"string\" },\n minItems: 1,\n maxItems: 8,\n description:\n \"Definition names (TS type names, e.g. ParagraphOptions, SlideOptions, StyleOptions). \" +\n \"At most 8 per call.\",\n },\n },\n }),\n execute: async ({ type, definitions }) => {\n try {\n const slice = sliceDocumentSchema(type, definitions);\n return {\n type,\n requested: definitions,\n typeText: renderSliceTypeText(type, definitions, slice),\n };\n } catch (error) {\n if (error instanceof UnknownDefinitionError) {\n // Data, not a throw: lets the model self-correct from the suggestions.\n return {\n type,\n requested: definitions,\n error:\n `${error.message}. Closest: ${error.suggestions.join(\", \") || \"none\"}. ` +\n `List indexed entries with: npx office-open schema index ${type}`,\n suggestions: error.suggestions,\n };\n }\n throw error;\n }\n },\n});\n\nexport const officeOpenTools = {\n \"generate-docx\": docxTool,\n \"generate-pptx\": pptxTool,\n \"generate-xlsx\": xlsxTool,\n \"office-open-schema-lookup\": schemaLookupTool,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;AAWA,SAAgB,gBAAgB,MAAc,OAAwB;CACpE,MAAM,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CAIjE,IAAI,IAAI,SAAS,mCAAmC,GAElD,OACE,4BAFW,IAAI,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,GAEH;CAUrC,IAAI,IAAI,SAAS,6BAA6B,GAE5C,OACE,sBAFW,IAAI,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,GAET;CAO/B,IAAI,IAAI,SAAS,4BAA4B,GAC3C,OACE;CAUJ,IAAI,IAAI,SAAS,cAAc,GAE7B,OAAO,IADO,SAAS,SAAS,aAAa,SAAS,SAAS,WAAW,aACzD;CAKnB,OAAO,GAAG,KAAK,YAAY,EAAE,sBAAsB;AACrD;;;;;;;;;;;;;;;ACpCA,MAAM,UAAU,IAAI,YAAY,SAAS,EAAE,OAAO,MAAM,CAAC;;AAGzD,SAAgB,uBAAuB,MAAoB,OAA2B;CACpF,MAAM,QAAQ,UAAU,KAAK;CAC7B,MAAM,0BAAU,IAAI,IAAoB;CACxC,KAAK,MAAM,QAAQ,OAAO,KAAK,KAAK,G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WAAW;IACX,UAAU,oBAAoB,MAAM,aAAa,KAAK;GACxD;EACF,SAAS,OAAO;GACd,IAAI,iBAAiB,wBAEnB,OAAO;IACL;IACA,WAAW;IACX,OACE,GAAG,MAAM,QAAQ,aAAa,MAAM,YAAY,KAAK,IAAI,KAAK,OAAO,4DACV;IAC7D,aAAa,MAAM;GACrB;GAEF,MAAM;EACR;CACF;AACF,CAAC;AAED,MAAa,kBAAkB;CAC7B,iBAAiB;CACjB,iBAAiB;CACjB,iBAAiB;CACjB,6BAA6B;AAC/B"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/ai/error.ts","../../src/ai/verify.ts","../../src/ai/index.ts"],"sourcesContent":["/**\n * Format tool execution errors into LLM-friendly messages.\n *\n * When a tool's `execute` function throws, the AI SDK captures the error as a\n * `tool-error` content part and sends it back to the LLM for self-correction.\n * This module rewrites internal runtime errors into messages the LLM can\n * understand and act on.\n *\n * @module\n */\n\nexport function formatToolError(type: string, error: unknown): string {\n const msg = error instanceof Error ? error.message : String(error);\n\n // ── DOCX: paragraph child errors ──\n\n if (msg.includes(\"Unsupported paragraph child type:\")) {\n const keys = msg.split(\": \").pop() ?? \"\";\n return (\n `Invalid paragraph child \"${keys}\". ` +\n `Paragraph children must use a wrapper key: ` +\n `{ paragraph: { children: [{ text: \"...\", bold?: true }] } }, ` +\n `{ table: { rows: [...] } }, { picture: { ... } }, ` +\n `{ toc: { ... } }, { textbox: { ... } }, ` +\n `{ pageBreak: true }, { columnBreak: true }, etc. ` +\n `Do not use raw property names like { bold: ... } as paragraph children.`\n );\n }\n\n if (msg.includes(\"Unsupported run child type:\")) {\n const keys = msg.split(\": \").pop() ?? \"\";\n return (\n `Invalid run child \"${keys}\". ` +\n `Run children must be text objects: { text: \"...\", bold?: true, italic?: true, size?: number, color?: \"RRGGBB\", ... }. ` +\n `The \"text\" key is required. Plain strings are also accepted as children. ` +\n `Do not use bare property objects like { bold: true } without a \"text\" key.`\n );\n }\n\n if (msg.includes(\"Unknown section child type\")) {\n return (\n `Unknown section child. ` +\n `Section children must use a wrapper key: ` +\n `{ paragraph: { ... } }, { table: { ... } }, ` +\n `{ toc: { ... } }, { textbox: { ... } }, { pageBreak: true }, ` +\n `{ sdt: { ... } }, { altChunk: { ... } }, etc.`\n );\n }\n\n // ── General: iterable errors ──\n\n if (msg.includes(\"not iterable\")) {\n const field = type === \"docx\" ? \"sections\" : type === \"pptx\" ? \"slides\" : \"worksheets\";\n return `\"${field}\" must be an array. Received a non-iterable value.`;\n }\n\n // ── Fallback ──\n\n return `${type.toUpperCase()} generation failed: ${msg}`;\n}\n","/**\n * Post-generation gate for the AI tools: run the OPC package consistency check\n * on freshly generated bytes before handing them to the model.\n *\n * Fresh output is fully under library control, so ANY issue (error or warn) is\n * a library regression, not an options error — fail fast with the diagnosis\n * instead of shipping a file Word/Excel report as corrupt. Mirrors what\n * scripts/validate.ts runs in CI; O7-style duplicate relationship ids are\n * exactly the class of breakage this catches before a user sees it.\n *\n * @module\n */\nimport {\n encodeBase64,\n PART_REGISTRIES,\n unzipSync,\n validateOpcConsistency,\n} from \"@office-open/core\";\n\nimport type { GenerateType } from \"../generate\";\n\n// Binary parts (media, fonts) decode to replacement chars — the check only\n// reads part presence and paths, never their content.\nconst decoder = new TextDecoder(\"utf-8\", { fatal: false });\n\n/** OPC-check a fresh package and return it as base64 for the tool result. */\nexport function generateVerifiedBase64(type: GenerateType, bytes: Uint8Array): string {\n const files = unzipSync(bytes);\n const entries = new Map<string, string>();\n for (const name of Object.keys(files)) {\n entries.set(name, decoder.decode(files[name]));\n }\n const issues = validateOpcConsistency(entries, PART_REGISTRIES[type]!);\n if (issues.length > 0) {\n const lines = issues.map((i) => ` ${i.code} [${i.severity}] ${i.part}: ${i.message}`);\n throw new Error(\n `Generated ${type} failed the OPC package consistency check — your options are valid, ` +\n `this is an office-open bug; please report it:\\n${lines.join(\"\\n\")}`,\n );\n }\n return encodeBase64(bytes);\n}\n","/**\n * Vercel AI SDK tools for generating Office documents.\n *\n * The generate tools use skeleton input schemas (top-level shape + wrapper\n * keys only) instead of the full format schema (~675 KB for docx) — no\n * provider accepts that in a tool definition. Precise field schemas are\n * fetched on demand through the office-open-schema-lookup tool, and the\n * authoritative ajv validation runs inside execute with instancePath-\n * qualified errors the model can iterate on.\n *\n * @module\n */\nimport type { DocumentOptions } from \"@office-open/docx\";\nimport type { PresentationOptions } from \"@office-open/pptx\";\nimport type { WorkbookOptions } from \"@office-open/xlsx\";\nimport { jsonSchema, tool } from \"ai\";\n\nexport { formatToolError } from \"./error\";\n\nimport { lintWorkbookFormulas } from \"@office-open/xlsx\";\n\nimport { generate } from \"../generate\";\nimport {\n getSkeletonSchema,\n renderSliceTypeText,\n sliceDocumentSchema,\n validateDocumentInput,\n} from \"../schemas\";\nimport type { DocumentType } from \"../schemas/schemas\";\nimport { UnknownDefinitionError } from \"../schemas/slice\";\nimport { formatToolError } from \"./error\";\nimport { generateVerifiedBase64 } from \"./verify\";\n\n/** Input accepted by the office-open-schema-lookup tool. */\nexport interface SchemaLookupInput {\n type: DocumentType;\n definitions: string[];\n}\n\nconst SKELETON_GUIDANCE =\n \"This schema is a skeleton — stubs name the definition they stand for. Fetch real fields with the \" +\n \"office-open-schema-lookup tool, e.g. { type: 'docx', definitions: ['ParagraphOptions', 'RunOptions'] }. \" +\n \"Invalid input is rejected with instance-path errors; fix and retry.\";\n\n/**\n * The generate tools return the file as base64 for the client UI, but the\n * model only needs the outcome — full base64 in the model context would burn\n * thousands of tokens per document.\n */\nfunction documentGeneratedSummary(output: { base64: string; mimeType: string }): string {\n const kb = Math.ceil((output.base64.length * 3) / 4 / 1024);\n return `Document generated and all validations passed (${output.mimeType}, ${kb} KB).`;\n}\n\nexport const docxTool = tool({\n description:\n \"Generate a .docx Word document. \" +\n \"The input is the document options directly — must include a 'sections' array. \" +\n \"Conventions: \" +\n \"section children are wrapper-key objects ({ paragraph: {...} }, { table: {...} }, …); \" +\n \"run objects require a 'text' key (plain strings also accepted); \" +\n \"colors are hex WITHOUT '#': 'FF0000', not '#FF0000'. \" +\n SKELETON_GUIDANCE,\n inputSchema: jsonSchema<DocumentOptions>(getSkeletonSchema(\"docx\")),\n execute: async (options) => {\n try {\n const validated = validateDocumentInput(\"docx\", options);\n const bytes = (await generate({\n type: \"docx\",\n options: validated as unknown as DocumentOptions,\n outputType: \"uint8array\",\n })) as Uint8Array;\n return {\n base64: generateVerifiedBase64(\"docx\", bytes),\n mimeType: \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n };\n } catch (error) {\n throw new Error(formatToolError(\"docx\", error));\n }\n },\n toModelOutput: ({ output }) => ({ type: \"text\", value: documentGeneratedSummary(output) }),\n});\n\nexport const pptxTool = tool({\n description:\n \"Generate a .pptx PowerPoint presentation. \" +\n \"The input is the presentation options directly — must include a 'slides' array. \" +\n \"Conventions: \" +\n \"shape x/y/width/height take UniversalMeasure strings ('2cm', '1in', '96px') or raw EMU numbers (914400 = 1 inch); \" +\n \"fills are hex color strings or fill objects ('4472C4' or { type: 'solidFill', color: '4472C4' }); \" +\n \"colors are hex WITHOUT '#': 'FF0000', not '#FF0000'. \" +\n SKELETON_GUIDANCE,\n inputSchema: jsonSchema<PresentationOptions>(getSkeletonSchema(\"pptx\")),\n execute: async (options) => {\n try {\n const validated = validateDocumentInput(\"pptx\", options);\n const bytes = (await generate({\n type: \"pptx\",\n options: validated as unknown as PresentationOptions,\n outputType: \"uint8array\",\n })) as Uint8Array;\n return {\n base64: generateVerifiedBase64(\"pptx\", bytes),\n mimeType: \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n };\n } catch (error) {\n throw new Error(formatToolError(\"pptx\", error));\n }\n },\n toModelOutput: ({ output }) => ({ type: \"text\", value: documentGeneratedSummary(output) }),\n});\n\nexport const xlsxTool = tool({\n description:\n \"Generate a .xlsx Excel spreadsheet. \" +\n \"The input is the workbook options directly — must include a 'worksheets' array. \" +\n \"Conventions: \" +\n \"cells are shorthand values (string, number, boolean, null) or { value, style } objects; \" +\n \"column 'width' is in Excel character units. \" +\n SKELETON_GUIDANCE,\n inputSchema: jsonSchema<WorkbookOptions>(getSkeletonSchema(\"xlsx\")),\n execute: async (options) => {\n try {\n const validated = validateDocumentInput(\"xlsx\", options);\n const formulaIssues = lintWorkbookFormulas(validated as unknown as WorkbookOptions);\n if (formulaIssues.length > 0) {\n const lines = formulaIssues.map(\n (i) => ` ${i.location}: ${i.message} — formula \"${i.formula}\"`,\n );\n throw new Error(\n `Invalid xlsx formulas:\\n${lines.join(\"\\n\")}\\nFix the formula or add the missing worksheet.`,\n );\n }\n const bytes = (await generate({\n type: \"xlsx\",\n options: validated as unknown as WorkbookOptions,\n outputType: \"uint8array\",\n })) as Uint8Array;\n return {\n base64: generateVerifiedBase64(\"xlsx\", bytes),\n mimeType: \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n };\n } catch (error) {\n throw new Error(formatToolError(\"xlsx\", error));\n }\n },\n toModelOutput: ({ output }) => ({ type: \"text\", value: documentGeneratedSummary(output) }),\n});\n\nexport const schemaLookupTool = tool({\n description:\n \"Fetch the precise type definitions for office-open option fields on demand. \" +\n \"Use it before filling complex objects into the generate tools: the generate input schemas are \" +\n \"skeletons whose stubs name the definition to look up here. \" +\n \"Valid names come from the skeleton stubs, or list indexed entries with \" +\n \"`npx office-open schema index <type>` (all names with --all). \" +\n \"Returns the requested definitions plus their dependency closure as type-definition text \" +\n '(field types, \"a\" | \"b\" value enums, optional markers, one-line comments); cataloged ' +\n \"domains not requested stay as stubs, so request each domain root you need (e.g. \" +\n \"['ParagraphOptions', 'RunOptions', 'TableOptions']).\",\n inputSchema: jsonSchema<SchemaLookupInput>({\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"definitions\"],\n properties: {\n type: {\n type: \"string\",\n enum: [\"docx\", \"pptx\", \"xlsx\"],\n description: \"Document format whose schema to slice\",\n },\n definitions: {\n type: \"array\",\n items: { type: \"string\" },\n minItems: 1,\n maxItems: 8,\n description:\n \"Definition names (TS type names, e.g. ParagraphOptions, SlideOptions, StyleOptions). \" +\n \"At most 8 per call.\",\n },\n },\n }),\n execute: async ({ type, definitions }) => {\n try {\n const slice = sliceDocumentSchema(type, definitions);\n return {\n type,\n requested: definitions,\n typeText: renderSliceTypeText(type, definitions, slice),\n };\n } catch (error) {\n if (error instanceof UnknownDefinitionError) {\n // Data, not a throw: lets the model self-correct from the suggestions.\n return {\n type,\n requested: definitions,\n error:\n `${error.message}. Closest: ${error.suggestions.join(\", \") || \"none\"}. ` +\n `List indexed entries with: npx office-open schema index ${type}`,\n suggestions: error.suggestions,\n };\n }\n throw error;\n }\n },\n});\n\nexport const officeOpenTools = {\n \"generate-docx\": docxTool,\n \"generate-pptx\": pptxTool,\n \"generate-xlsx\": xlsxTool,\n \"office-open-schema-lookup\": schemaLookupTool,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;AAWA,SAAgB,gBAAgB,MAAc,OAAwB;CACpE,MAAM,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CAIjE,IAAI,IAAI,SAAS,mCAAmC,GAElD,OACE,4BAFW,IAAI,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,GAEH;CAUrC,IAAI,IAAI,SAAS,6BAA6B,GAE5C,OACE,sBAFW,IAAI,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,GAET;CAO/B,IAAI,IAAI,SAAS,4BAA4B,GAC3C,OACE;CAUJ,IAAI,IAAI,SAAS,cAAc,GAE7B,OAAO,IADO,SAAS,SAAS,aAAa,SAAS,SAAS,WAAW,aACzD;CAKnB,OAAO,GAAG,KAAK,YAAY,EAAE,sBAAsB;AACrD;;;;;;;;;;;;;;;ACpCA,MAAM,UAAU,IAAI,YAAY,SAAS,EAAE,OAAO,MAAM,CAAC;;AAGzD,SAAgB,uBAAuB,MAAoB,OAA2B;CACpF,MAAM,QAAQ,UAAU,KAAK;CAC7B,MAAM,0BAAU,IAAI,IAAoB;CACxC,KAAK,MAAM,QAAQ,OAAO,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QAAQ,oBAAoB,MAAM,WAAW;GACnD,OAAO;IACL;IACA,WAAW;IACX,UAAU,oBAAoB,MAAM,aAAa,KAAK;GACxD;EACF,SAAS,OAAO;GACd,IAAI,iBAAiB,wBAEnB,OAAO;IACL;IACA,WAAW;IACX,OACE,GAAG,MAAM,QAAQ,aAAa,MAAM,YAAY,KAAK,IAAI,KAAK,OAAO,4DACV;IAC7D,aAAa,MAAM;GACrB;GAEF,MAAM;EACR;CACF;AACF,CAAC;AAED,MAAa,kBAAkB;CAC7B,iBAAiB;CACjB,iBAAiB;CACjB,iBAAiB;CACjB,6BAA6B;AAC/B"}
@@ -4,16 +4,16 @@ import { ColumnOptions, ConnectorOptions as ConnectorOptions$1, GroupOptions as
4
4
  import { ParagraphDescriptorOptions, UniversalMeasure } from "@office-open/core";
5
5
  import { EffectDagOptions, EffectListOptions, FillOptions, OutlineOptions, PresetGeometryOptions, Scene3DOptions, Shape3DOptions, ShapeType, TextBodyOptions } from "@office-open/core/drawing";
6
6
  //#region src/convert/picture.d.ts
7
- declare function toDocxPicture(source: PictureOptions$1): PictureOptions;
8
- declare function toDocxPicture(source: PictureOptions$2): PictureOptions;
9
- declare function toPptxPicture(source: PictureOptions): PictureOptions$1;
10
- declare function toPptxPicture(source: PictureOptions$2): PictureOptions$1;
11
- declare function toXlsxPicture(source: PictureOptions): PictureOptions$2;
12
- declare function toXlsxPicture(source: PictureOptions$1): PictureOptions$2;
7
+ export declare function toDocxPicture(source: PictureOptions$1): PictureOptions;
8
+ export declare function toDocxPicture(source: PictureOptions$2): PictureOptions;
9
+ export declare function toPptxPicture(source: PictureOptions): PictureOptions$1;
10
+ export declare function toPptxPicture(source: PictureOptions$2): PictureOptions$1;
11
+ export declare function toXlsxPicture(source: PictureOptions): PictureOptions$2;
12
+ export declare function toXlsxPicture(source: PictureOptions$1): PictureOptions$2;
13
13
  //#endregion
14
14
  //#region src/convert/shape.d.ts
15
- type DocxShapeOptions = ShapeOptions;
16
- interface ShapeContent {
15
+ export type DocxShapeOptions = ShapeOptions;
16
+ export interface ShapeContent {
17
17
  fill?: FillOptions | null;
18
18
  outline?: OutlineOptions;
19
19
  effects?: EffectListOptions;
@@ -24,21 +24,21 @@ interface ShapeContent {
24
24
  type PickedContent = Omit<ShapeContent, "fill"> & {
25
25
  fill?: FillOptions;
26
26
  };
27
- declare function pickContent<T extends ShapeContent>(source: T): PickedContent;
28
- declare function toPresetGeometry(g: ShapeType | PresetGeometryOptions | undefined): PresetGeometryOptions | undefined;
29
- declare function textBodyToDocxChildren(textBody: TextBodyOptions): ParagraphOptions[] | string[];
30
- declare function docxToTextBody(children: ShapeTextBoxChild[] | undefined, bodyProperties: TextBodyOptions["bodyProperties"]): TextBodyOptions | undefined;
31
- interface DocxShapeParts {
27
+ export declare function pickContent<T extends ShapeContent>(source: T): PickedContent;
28
+ export declare function toPresetGeometry(g: ShapeType | PresetGeometryOptions | undefined): PresetGeometryOptions | undefined;
29
+ export declare function textBodyToDocxChildren(textBody: TextBodyOptions): ParagraphOptions[] | string[];
30
+ export declare function docxToTextBody(children: ShapeTextBoxChild[] | undefined, bodyProperties: TextBodyOptions["bodyProperties"]): TextBodyOptions | undefined;
31
+ export interface DocxShapeParts {
32
32
  data: ShapeCoreOptions;
33
33
  transformation: MediaTransformation;
34
34
  }
35
- declare function toDocxShapeParts(source: ShapeOptions$1 | ShapeOptions$2): DocxShapeParts;
36
- declare function toDocxShape(source: ShapeOptions$1): DocxShapeOptions;
37
- declare function toDocxShape(source: ShapeOptions$2): DocxShapeOptions;
38
- declare function toPptxShape(source: DocxShapeOptions): ShapeOptions$1;
39
- declare function toPptxShape(source: ShapeOptions$2): ShapeOptions$1;
40
- declare function toXlsxShape(source: DocxShapeOptions): ShapeOptions$2;
41
- declare function toXlsxShape(source: ShapeOptions$1): ShapeOptions$2;
35
+ export declare function toDocxShapeParts(source: ShapeOptions$1 | ShapeOptions$2): DocxShapeParts;
36
+ export declare function toDocxShape(source: ShapeOptions$1): DocxShapeOptions;
37
+ export declare function toDocxShape(source: ShapeOptions$2): DocxShapeOptions;
38
+ export declare function toPptxShape(source: DocxShapeOptions): ShapeOptions$1;
39
+ export declare function toPptxShape(source: ShapeOptions$2): ShapeOptions$1;
40
+ export declare function toXlsxShape(source: DocxShapeOptions): ShapeOptions$2;
41
+ export declare function toXlsxShape(source: ShapeOptions$1): ShapeOptions$2;
42
42
  //#endregion
43
43
  //#region src/convert/position.d.ts
44
44
  interface AbsoluteBox {
@@ -52,45 +52,44 @@ interface AbsoluteBox {
52
52
  }
53
53
  //#endregion
54
54
  //#region src/convert/connector.d.ts
55
- declare function endpointsToBox(x1: number | UniversalMeasure | undefined, y1: number | UniversalMeasure | undefined, x2: number | UniversalMeasure | undefined, y2: number | UniversalMeasure | undefined): AbsoluteBox;
56
- declare function boxToEndpoints(box: AbsoluteBox): {
55
+ export declare function endpointsToBox(x1: number | UniversalMeasure | undefined, y1: number | UniversalMeasure | undefined, x2: number | UniversalMeasure | undefined, y2: number | UniversalMeasure | undefined): AbsoluteBox;
56
+ export declare function boxToEndpoints(box: AbsoluteBox): {
57
57
  x1: number;
58
58
  y1: number;
59
59
  x2: number;
60
60
  y2: number;
61
61
  };
62
- declare function toDocxConnector(_source: ConnectorOptions | ConnectorOptions$1): undefined;
63
- declare function toPptxConnector(source: ConnectorOptions$1): ConnectorOptions;
64
- declare function toXlsxConnector(source: ConnectorOptions): ConnectorOptions$1;
62
+ export declare function toDocxConnector(_source: ConnectorOptions | ConnectorOptions$1): undefined;
63
+ export declare function toPptxConnector(source: ConnectorOptions$1): ConnectorOptions;
64
+ export declare function toXlsxConnector(source: ConnectorOptions): ConnectorOptions$1;
65
65
  //#endregion
66
66
  //#region src/convert/group.d.ts
67
- declare function toDocxGroup(source: GroupOptions$1): GroupOptions;
68
- declare function toDocxGroup(source: GroupOptions$2): GroupOptions;
69
- declare function toPptxGroup(source: GroupOptions): GroupOptions$1;
70
- declare function toPptxGroup(source: GroupOptions$2): GroupOptions$1;
71
- declare function toXlsxGroup(source: GroupOptions): GroupOptions$2;
72
- declare function toXlsxGroup(source: GroupOptions$1): GroupOptions$2;
67
+ export declare function toDocxGroup(source: GroupOptions$1): GroupOptions;
68
+ export declare function toDocxGroup(source: GroupOptions$2): GroupOptions;
69
+ export declare function toPptxGroup(source: GroupOptions): GroupOptions$1;
70
+ export declare function toPptxGroup(source: GroupOptions$2): GroupOptions$1;
71
+ export declare function toXlsxGroup(source: GroupOptions): GroupOptions$2;
72
+ export declare function toXlsxGroup(source: GroupOptions$1): GroupOptions$2;
73
73
  //#endregion
74
74
  //#region src/convert/table.d.ts
75
- interface XlsxVisualTable {
75
+ export interface XlsxVisualTable {
76
76
  rows: RowOptions[];
77
77
  mergeCells?: MergeCellOptions[];
78
78
  columns?: ColumnOptions[];
79
79
  }
80
- declare function toDocxTable(source: TableOptions$1): TableOptions;
81
- declare function toDocxTable(source: XlsxVisualTable): TableOptions;
82
- declare function toPptxTable(source: TableOptions): TableOptions$1;
83
- declare function toPptxTable(source: XlsxVisualTable): TableOptions$1;
84
- declare function toXlsxTable(source: TableOptions): XlsxVisualTable;
85
- declare function toXlsxTable(source: TableOptions$1): XlsxVisualTable;
80
+ export declare function toDocxTable(source: TableOptions$1): TableOptions;
81
+ export declare function toDocxTable(source: XlsxVisualTable): TableOptions;
82
+ export declare function toPptxTable(source: TableOptions): TableOptions$1;
83
+ export declare function toPptxTable(source: XlsxVisualTable): TableOptions$1;
84
+ export declare function toXlsxTable(source: TableOptions): XlsxVisualTable;
85
+ export declare function toXlsxTable(source: TableOptions$1): XlsxVisualTable;
86
86
  //#endregion
87
87
  //#region src/convert/smartart.d.ts
88
- declare function toDocxSmartArt(source: SmartArtOptions$1): SmartArtOptions;
89
- declare function toPptxSmartArt(source: SmartArtOptions): SmartArtOptions$1;
88
+ export declare function toDocxSmartArt(source: SmartArtOptions$1): SmartArtOptions;
89
+ export declare function toPptxSmartArt(source: SmartArtOptions): SmartArtOptions$1;
90
90
  //#endregion
91
91
  //#region src/convert/text.d.ts
92
- declare function fromDrawingParagraph(drawing: ParagraphDescriptorOptions): ParagraphOptions;
93
- declare function toDrawingParagraph(docx: ParagraphOptions): ParagraphDescriptorOptions;
92
+ export declare function fromDrawingParagraph(drawing: ParagraphDescriptorOptions): ParagraphOptions;
93
+ export declare function toDrawingParagraph(docx: ParagraphOptions): ParagraphDescriptorOptions;
94
94
  //#endregion
95
- export { DocxShapeOptions, DocxShapeParts, ShapeContent, XlsxVisualTable, boxToEndpoints, docxToTextBody, endpointsToBox, fromDrawingParagraph, pickContent, textBodyToDocxChildren, toDocxConnector, toDocxGroup, toDocxPicture, toDocxShape, toDocxShapeParts, toDocxSmartArt, toDocxTable, toDrawingParagraph, toPptxConnector, toPptxGroup, toPptxPicture, toPptxShape, toPptxSmartArt, toPptxTable, toPresetGeometry, toXlsxConnector, toXlsxGroup, toXlsxPicture, toXlsxShape, toXlsxTable };
96
95
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/convert/picture.ts","../../src/convert/shape.ts","../../src/convert/position.ts","../../src/convert/connector.ts","../../src/convert/group.ts","../../src/convert/table.ts","../../src/convert/smartart.ts","../../src/convert/text.ts"],"mappings":";;;;;;iBAuHgB,cAAc,QAAQ,mBAAqB;iBAE3C,cAAc,QAAQ,mBAAqB;iBAuC3C,cAAc,QAAQ,iBAAqB;iBAE3C,cAAc,QAAQ,mBAAqB;iBAmC3C,cAAc,QAAQ,iBAAqB;iBAE3C,cAAc,QAAQ,mBAAqB;;;KClJ/C,mBAAmB;UAGd;EAEf,OAAO;EACP,UAAU;EACV,UAAU;EACV,YAAY;EACZ,UAAU;EACV,UAAU;;KAIP,gBAAgB,KAAK;EAA0B,OAAO;;iBAG3C,YAAY,UAAU,cAAc,QAAQ,IAAI;iBAehD,iBACd,GAAG,YAAY,oCACd;iBAQa,uBAAuB,UAAU,kBAAkB;iBAWnD,eACd,UAAU,iCACV,gBAAgB,oCACf;UAoCc;EACf,MAAM;EACN,gBAAgB;;iBA8BF,iBAAiB,QAAQ,iBAAmB,iBAAmB;iBAgD/D,YAAY,QAAQ,iBAAmB;iBAEvC,YAAY,QAAQ,iBAAmB;iBASvC,YAAY,QAAQ,mBAAmB;iBAEvC,YAAY,QAAQ,iBAAmB;iBA+CvC,YAAY,QAAQ,mBAAmB;iBAEvC,YAAY,QAAQ,iBAAmB;;;UC5PtC;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;;;iBCdc,eACd,aAAa,8BACb,aAAa,8BACb,aAAa,8BACb,aAAa,+BACZ;iBAgBa,eAAe,KAAK;EAClC;EACA;EACA;EACA;;iBAiBc,gBAAgB,SAAS,mBAAuB;iBAQhD,gBAAgB,QAAQ,qBAAuB;iBAyB/C,gBAAgB,QAAQ,mBAAuB;;;iBC6G/C,YAAY,QAAQ,iBAAmB;iBAEvC,YAAY,QAAQ,iBAAmB;iBAsEvC,YAAY,QAAQ,eAAmB;iBAEvC,YAAY,QAAQ,iBAAmB;iBAgEvC,YAAY,QAAQ,eAAmB;iBAEvC,YAAY,QAAQ,iBAAmB;;;UC7RtC;EACf,MAAM;EACN,aAAa;EACb,UAAU;;iBAyMI,YAAY,QAAQ,iBAAmB;iBAEvC,YAAY,QAAQ,kBAAkB;iBA+EtC,YAAY,QAAQ,eAAmB;iBAEvC,YAAY,QAAQ,kBAAkB;iBA6DtC,YAAY,QAAQ,eAAmB;iBAEvC,YAAY,QAAQ,iBAAmB;;;iBClWvC,eAAe,QAAQ,oBAAe;iBAqBtC,eAAe,QAAQ,kBAAe;;;iBC2BtC,qBAAqB,SAAS,6BAA6B;iBA2H3D,mBAAmB,MAAM,mBAAmB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/convert/picture.ts","../../src/convert/shape.ts","../../src/convert/position.ts","../../src/convert/connector.ts","../../src/convert/group.ts","../../src/convert/table.ts","../../src/convert/smartart.ts","../../src/convert/text.ts"],"mappings":";;;;;;wBAuHgB,cAAc,QAAQ,mB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C,YAAY,QAAQ,eAAmB;wBAEvC,YAAY,QAAQ,kBAAkB;wBA6DtC,YAAY,QAAQ,eAAmB;wBAEvC,YAAY,QAAQ,iBAAmB;;;wBClWvC,eAAe,QAAQ,oBAAe;wBAqBtC,eAAe,QAAQ,kBAAe;;;wBC2BtC,qBAAqB,SAAS,6BAA6B;wBA2H3D,mBAAmB,MAAM,mBAAmB"}
@@ -3,20 +3,20 @@ import { PresentationOptions } from "@office-open/pptx";
3
3
  import { WorkbookOptions } from "@office-open/xlsx";
4
4
  import { OutputType, OutputType as OutputType$1 } from "@office-open/core";
5
5
  //#region src/generate.d.ts
6
- type GenerateType = "docx" | "pptx" | "xlsx";
7
- interface GenerateOptionsMap {
6
+ export type GenerateType = "docx" | "pptx" | "xlsx";
7
+ export interface GenerateOptionsMap {
8
8
  docx: DocumentOptions;
9
9
  pptx: PresentationOptions;
10
10
  xlsx: WorkbookOptions;
11
11
  }
12
- interface GenerateOptions<T extends GenerateType = GenerateType> {
12
+ export interface GenerateOptions<T extends GenerateType = GenerateType> {
13
13
  type: T;
14
14
  options: GenerateOptionsMap[T];
15
15
  outputType?: OutputType$1;
16
16
  }
17
- declare function generate<T extends GenerateType>(options: GenerateOptions<T>): Promise<unknown>;
18
- declare function parseInput(input: string): Promise<Record<string, unknown>>;
19
- declare function generateToFile(outputPath: string, options: GenerateOptions): Promise<void>;
17
+ export declare function generate<T extends GenerateType>(options: GenerateOptions<T>): Promise<unknown>;
18
+ export declare function parseInput(input: string): Promise<Record<string, unknown>>;
19
+ export declare function generateToFile(outputPath: string, options: GenerateOptions): Promise<void>;
20
20
  //#endregion
21
- export { GenerateOptions, GenerateOptionsMap, GenerateType, type OutputType, generate, generateToFile, parseInput };
21
+ export type { OutputType };
22
22
  //# sourceMappingURL=generate.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.mts","names":[],"sources":["../src/generate.ts"],"mappings":";;;;;KAYY;UAGK;EACf,MAAM;EACN,MAAM;EACN,MAAM;;UAGS,gBAAgB,UAAU,eAAe;EACxD,MAAM;EACN,SAAS,mBAAmB;EAC5B,aAAa;;iBAGO,SAAS,UAAU,cACvC,SAAS,gBAAgB,KACxB;iBAuBmB,WAAW,gBAAgB,QAAQ;iBASnC,eAAe,oBAAoB,SAAS,kBAAkB"}
1
+ {"version":3,"file":"generate.d.mts","names":[],"sources":["../src/generate.ts"],"mappings":";;;;;YAYY;iBAGK;EACf,MAAM;EACN,MAAM;EACN,MAAM;;iBAGS,gBAAgB,UAAU,eAAe;EACxD,MAAM;EACN,SAAS,mBAAmB;EAC5B,aAAa;;wBAGO,SAAS,UAAU,cACvC,SAAS,gBAAgB,KACxB;wBAuBmB,WAAW,gBAAgB,QAAQ;wBASnC,eAAe,oBAAoB,SAAS,kBAAkB"}
@@ -1,34 +1,34 @@
1
1
  import { a as pptxSchema, i as docxSchema, n as JsonSchema, o as validateDocumentInput, r as SCHEMAS, s as xlsxSchema, t as DocumentType } from "../schemas-Dupoq6xM.mjs";
2
2
  //#region src/schemas/entries.d.ts
3
- interface SchemaEntry {
3
+ export interface SchemaEntry {
4
4
  name: string;
5
5
  domain: string;
6
6
  summary: string;
7
7
  }
8
- declare const SCHEMA_ROOTS: Record<DocumentType, string>;
9
- declare const SCHEMA_ENTRIES: Readonly<Record<DocumentType, readonly SchemaEntry[]>>;
10
- declare function entryNames(type: DocumentType): ReadonlySet<string>;
8
+ export declare const SCHEMA_ROOTS: Record<DocumentType, string>;
9
+ export declare const SCHEMA_ENTRIES: Readonly<Record<DocumentType, readonly SchemaEntry[]>>;
10
+ export declare function entryNames(type: DocumentType): ReadonlySet<string>;
11
11
  //#endregion
12
12
  //#region src/schemas/pointer.d.ts
13
13
  type Node = Record<string, unknown>;
14
- declare function isPropertyPointer(ref: string): boolean;
15
- declare function pointerHost(ref: string): string;
16
- declare function resolvePointer(root: Node, ref: string): Node | undefined;
14
+ export declare function isPropertyPointer(ref: string): boolean;
15
+ export declare function pointerHost(ref: string): string;
16
+ export declare function resolvePointer(root: Node, ref: string): Node | undefined;
17
17
  //#endregion
18
18
  //#region src/schemas/slice.d.ts
19
- declare class UnknownDefinitionError extends Error {
19
+ export declare class UnknownDefinitionError extends Error {
20
20
  readonly suggestions: readonly string[];
21
21
  constructor(names: readonly string[], suggestions: readonly string[]);
22
22
  }
23
- declare function sliceSchema(schema: JsonSchema, definitions: readonly string[], format?: DocumentType): JsonSchema;
24
- declare function sliceDocumentSchema(type: DocumentType, definitions: readonly string[]): JsonSchema;
25
- declare function assertKnownDefinitions(type: DocumentType, definitions: readonly string[]): void;
23
+ export declare function sliceSchema(schema: JsonSchema, definitions: readonly string[], format?: DocumentType): JsonSchema;
24
+ export declare function sliceDocumentSchema(type: DocumentType, definitions: readonly string[]): JsonSchema;
25
+ export declare function assertKnownDefinitions(type: DocumentType, definitions: readonly string[]): void;
26
26
  //#endregion
27
27
  //#region src/schemas/skeleton.d.ts
28
- declare function getSkeletonSchema(type: DocumentType): JsonSchema;
28
+ export declare function getSkeletonSchema(type: DocumentType): JsonSchema;
29
29
  //#endregion
30
30
  //#region src/schemas/type-text.d.ts
31
- declare function renderSliceTypeText(format: DocumentType, requested: readonly string[], slice: JsonSchema): string;
31
+ export declare function renderSliceTypeText(format: DocumentType, requested: readonly string[], slice: JsonSchema): string;
32
32
  //#endregion
33
- export { DocumentType, JsonSchema, SCHEMAS, SCHEMA_ENTRIES, SCHEMA_ROOTS, SchemaEntry, UnknownDefinitionError, assertKnownDefinitions, docxSchema, entryNames, getSkeletonSchema, isPropertyPointer, pointerHost, pptxSchema, renderSliceTypeText, resolvePointer, sliceDocumentSchema, sliceSchema, validateDocumentInput, xlsxSchema };
33
+ export { DocumentType, JsonSchema, SCHEMAS, docxSchema, pptxSchema, validateDocumentInput, xlsxSchema };
34
34
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/schemas/entries.ts","../../src/schemas/pointer.ts","../../src/schemas/slice.ts","../../src/schemas/skeleton.ts","../../src/schemas/type-text.ts"],"mappings":";;UAqBiB;EAEf;EAEA;EAEA;;cAIW,cAAc,OAAO;cA6ZrB,gBAAgB,SAAS,OAAO,uBAAuB;iBAOpD,WAAW,MAAM,eAAe;;;KCvb3C,OAAO;iBAaI,kBAAkB;iBAKlB,YAAY;iBAMZ,eAAe,MAAM,MAAM,cAAc;;;cCZ5C,+BAA+B;WACjC;EACG,YAAA,0BAA0B;;iBAkExB,YACd,QAAQ,YACR,gCACA,SAAS,eACR;iBA+Da,oBACd,MAAM,cACN,iCACC;iBAmCa,uBAAuB,MAAM,cAAc;;;iBCH3C,kBAAkB,MAAM,eAAe;;;iBCjEvC,oBACd,QAAQ,cACR,8BACA,OAAO"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/schemas/entries.ts","../../src/schemas/pointer.ts","../../src/schemas/slice.ts","../../src/schemas/skeleton.ts","../../src/schemas/type-text.ts"],"mappings":";;iBAqBiB;EAEf;EAEA;EAEA;;qBAIW,cAAc,OAAO;qBA6ZrB,gBAAgB,SAAS,OAAO,uBAAuB;wBAOpD,WAAW,MAAM,eAAe;;;KCvb3C,OAAO;wBAaI,kBAAkB;wBAKlB,YAAY;wBAMZ,eAAe,MAAM,MAAM,cAAc;;;qBCZ5C,+BAA+B;WACjC;EACG,YAAA,0BAA0B;;wBAkExB,YACd,QAAQ,YACR,gCACA,SAAS,eACR;wBA+Da,oBACd,MAAM,cACN,iCACC;wBAmCa,uBAAuB,MAAM,cAAc;;;wBCH3C,kBAAkB,MAAM,eAAe;;;wBCjEvC,oBACd,QAAQ,cACR,8BACA,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "office-open",
3
- "version": "0.14.5",
3
+ "version": "0.14.6",
4
4
  "description": "AI-native Office documents in one install — generate, parse, and patch Word, Excel, and PowerPoint from plain JSON, with a CLI, AI SDK tools, and JSON schemas for LLM tool-calling",
5
5
  "keywords": [
6
6
  "ai",
@@ -95,11 +95,11 @@
95
95
  "ajv": "8.20.0",
96
96
  "ajv-formats": "3.0.1",
97
97
  "citty": "0.2.2",
98
- "@office-open/core": "0.14.5",
99
- "@office-open/docx": "0.14.5",
100
- "@office-open/xlsx": "0.14.5",
101
- "@office-open/pptx": "0.14.5",
102
- "@office-open/xml": "0.14.5"
98
+ "@office-open/core": "0.14.6",
99
+ "@office-open/xlsx": "0.14.6",
100
+ "@office-open/docx": "0.14.6",
101
+ "@office-open/pptx": "0.14.6",
102
+ "@office-open/xml": "0.14.6"
103
103
  },
104
104
  "peerDependencies": {
105
105
  "ai": "^6.0.0"