@project-ava-supernova/core 0.2.71 → 0.2.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/agent/agent.d.ts.map +1 -1
  2. package/dist/agent/agent.js +138 -38
  3. package/dist/agent/agent.js.map +1 -1
  4. package/dist/agent/mode-tags.d.ts +72 -0
  5. package/dist/agent/mode-tags.d.ts.map +1 -0
  6. package/dist/agent/mode-tags.js +84 -0
  7. package/dist/agent/mode-tags.js.map +1 -0
  8. package/dist/agent/system-prompt.d.ts +16 -2
  9. package/dist/agent/system-prompt.d.ts.map +1 -1
  10. package/dist/agent/system-prompt.js +133 -24
  11. package/dist/agent/system-prompt.js.map +1 -1
  12. package/dist/brainstorm/brainstorm-store.d.ts +42 -0
  13. package/dist/brainstorm/brainstorm-store.d.ts.map +1 -0
  14. package/dist/brainstorm/brainstorm-store.js +164 -0
  15. package/dist/brainstorm/brainstorm-store.js.map +1 -0
  16. package/dist/brainstorm/types.d.ts +64 -0
  17. package/dist/brainstorm/types.d.ts.map +1 -0
  18. package/dist/brainstorm/types.js +20 -0
  19. package/dist/brainstorm/types.js.map +1 -0
  20. package/dist/config/project.d.ts.map +1 -1
  21. package/dist/config/project.js +3 -1
  22. package/dist/config/project.js.map +1 -1
  23. package/dist/config/schema.d.ts +13 -0
  24. package/dist/config/schema.d.ts.map +1 -1
  25. package/dist/config/schema.js.map +1 -1
  26. package/dist/dataset/capture.d.ts.map +1 -1
  27. package/dist/dataset/capture.js +6 -14
  28. package/dist/dataset/capture.js.map +1 -1
  29. package/dist/history/conversation-title.d.ts +5 -4
  30. package/dist/history/conversation-title.d.ts.map +1 -1
  31. package/dist/history/conversation-title.js +6 -19
  32. package/dist/history/conversation-title.js.map +1 -1
  33. package/dist/i18n/locales/ar.d.ts.map +1 -1
  34. package/dist/i18n/locales/ar.js +41 -13
  35. package/dist/i18n/locales/ar.js.map +1 -1
  36. package/dist/i18n/locales/de.d.ts.map +1 -1
  37. package/dist/i18n/locales/de.js +41 -13
  38. package/dist/i18n/locales/de.js.map +1 -1
  39. package/dist/i18n/locales/en.d.ts +38 -10
  40. package/dist/i18n/locales/en.d.ts.map +1 -1
  41. package/dist/i18n/locales/en.js +41 -13
  42. package/dist/i18n/locales/en.js.map +1 -1
  43. package/dist/i18n/locales/es.d.ts.map +1 -1
  44. package/dist/i18n/locales/es.js +41 -13
  45. package/dist/i18n/locales/es.js.map +1 -1
  46. package/dist/i18n/locales/fr.d.ts.map +1 -1
  47. package/dist/i18n/locales/fr.js +41 -13
  48. package/dist/i18n/locales/fr.js.map +1 -1
  49. package/dist/i18n/locales/hi.d.ts.map +1 -1
  50. package/dist/i18n/locales/hi.js +41 -13
  51. package/dist/i18n/locales/hi.js.map +1 -1
  52. package/dist/i18n/locales/id.d.ts.map +1 -1
  53. package/dist/i18n/locales/id.js +41 -13
  54. package/dist/i18n/locales/id.js.map +1 -1
  55. package/dist/i18n/locales/it.d.ts.map +1 -1
  56. package/dist/i18n/locales/it.js +41 -13
  57. package/dist/i18n/locales/it.js.map +1 -1
  58. package/dist/i18n/locales/ja.d.ts.map +1 -1
  59. package/dist/i18n/locales/ja.js +41 -13
  60. package/dist/i18n/locales/ja.js.map +1 -1
  61. package/dist/i18n/locales/ko.d.ts.map +1 -1
  62. package/dist/i18n/locales/ko.js +41 -13
  63. package/dist/i18n/locales/ko.js.map +1 -1
  64. package/dist/i18n/locales/nl.d.ts.map +1 -1
  65. package/dist/i18n/locales/nl.js +41 -13
  66. package/dist/i18n/locales/nl.js.map +1 -1
  67. package/dist/i18n/locales/pl.d.ts.map +1 -1
  68. package/dist/i18n/locales/pl.js +41 -13
  69. package/dist/i18n/locales/pl.js.map +1 -1
  70. package/dist/i18n/locales/pt.d.ts.map +1 -1
  71. package/dist/i18n/locales/pt.js +41 -13
  72. package/dist/i18n/locales/pt.js.map +1 -1
  73. package/dist/i18n/locales/ru.d.ts.map +1 -1
  74. package/dist/i18n/locales/ru.js +41 -13
  75. package/dist/i18n/locales/ru.js.map +1 -1
  76. package/dist/i18n/locales/th.d.ts.map +1 -1
  77. package/dist/i18n/locales/th.js +41 -13
  78. package/dist/i18n/locales/th.js.map +1 -1
  79. package/dist/i18n/locales/tr.d.ts.map +1 -1
  80. package/dist/i18n/locales/tr.js +41 -13
  81. package/dist/i18n/locales/tr.js.map +1 -1
  82. package/dist/i18n/locales/uk.d.ts.map +1 -1
  83. package/dist/i18n/locales/uk.js +41 -13
  84. package/dist/i18n/locales/uk.js.map +1 -1
  85. package/dist/i18n/locales/vi.d.ts.map +1 -1
  86. package/dist/i18n/locales/vi.js +41 -13
  87. package/dist/i18n/locales/vi.js.map +1 -1
  88. package/dist/i18n/locales/zh-CN.d.ts.map +1 -1
  89. package/dist/i18n/locales/zh-CN.js +41 -13
  90. package/dist/i18n/locales/zh-CN.js.map +1 -1
  91. package/dist/i18n/locales/zh-TW.d.ts.map +1 -1
  92. package/dist/i18n/locales/zh-TW.js +41 -13
  93. package/dist/i18n/locales/zh-TW.js.map +1 -1
  94. package/dist/index.d.ts +5 -1
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/index.js +7 -1
  97. package/dist/index.js.map +1 -1
  98. package/dist/journal/journal-manager.d.ts +22 -1
  99. package/dist/journal/journal-manager.d.ts.map +1 -1
  100. package/dist/journal/journal-manager.js +47 -2
  101. package/dist/journal/journal-manager.js.map +1 -1
  102. package/dist/personas/conductor.d.ts +11 -0
  103. package/dist/personas/conductor.d.ts.map +1 -1
  104. package/dist/personas/conductor.js +56 -12
  105. package/dist/personas/conductor.js.map +1 -1
  106. package/dist/personas/definitions.d.ts +15 -4
  107. package/dist/personas/definitions.d.ts.map +1 -1
  108. package/dist/personas/definitions.js +184 -19
  109. package/dist/personas/definitions.js.map +1 -1
  110. package/dist/personas/types.d.ts +1 -1
  111. package/dist/personas/types.d.ts.map +1 -1
  112. package/dist/projects/project-data.d.ts +73 -0
  113. package/dist/projects/project-data.d.ts.map +1 -0
  114. package/dist/projects/project-data.js +126 -0
  115. package/dist/projects/project-data.js.map +1 -0
  116. package/dist/projects/projects-home.d.ts +33 -0
  117. package/dist/projects/projects-home.d.ts.map +1 -0
  118. package/dist/projects/projects-home.js +43 -0
  119. package/dist/projects/projects-home.js.map +1 -0
  120. package/dist/projects/storage-categories.d.ts +45 -0
  121. package/dist/projects/storage-categories.d.ts.map +1 -0
  122. package/dist/projects/storage-categories.js +86 -0
  123. package/dist/projects/storage-categories.js.map +1 -0
  124. package/dist/tools/authoring/export-document.d.ts +45 -0
  125. package/dist/tools/authoring/export-document.d.ts.map +1 -0
  126. package/dist/tools/authoring/export-document.js +132 -0
  127. package/dist/tools/authoring/export-document.js.map +1 -0
  128. package/dist/tools/authoring/export-formats.d.ts +37 -0
  129. package/dist/tools/authoring/export-formats.d.ts.map +1 -0
  130. package/dist/tools/authoring/export-formats.js +50 -0
  131. package/dist/tools/authoring/export-formats.js.map +1 -0
  132. package/dist/tools/authoring/index.d.ts +6 -1
  133. package/dist/tools/authoring/index.d.ts.map +1 -1
  134. package/dist/tools/authoring/index.js +9 -0
  135. package/dist/tools/authoring/index.js.map +1 -1
  136. package/dist/tools/authoring/render-odf.d.ts +22 -0
  137. package/dist/tools/authoring/render-odf.d.ts.map +1 -0
  138. package/dist/tools/authoring/render-odf.js +604 -0
  139. package/dist/tools/authoring/render-odf.js.map +1 -0
  140. package/dist/tools/authoring/zip.d.ts +33 -0
  141. package/dist/tools/authoring/zip.d.ts.map +1 -0
  142. package/dist/tools/authoring/zip.js +125 -0
  143. package/dist/tools/authoring/zip.js.map +1 -0
  144. package/dist/tools/brainstorm-session.d.ts +29 -0
  145. package/dist/tools/brainstorm-session.d.ts.map +1 -0
  146. package/dist/tools/brainstorm-session.js +184 -0
  147. package/dist/tools/brainstorm-session.js.map +1 -0
  148. package/dist/tools/document-author.d.ts +1 -1
  149. package/dist/tools/document-author.d.ts.map +1 -1
  150. package/dist/tools/document-author.js +22 -5
  151. package/dist/tools/document-author.js.map +1 -1
  152. package/dist/tools/security.d.ts +25 -0
  153. package/dist/tools/security.d.ts.map +1 -1
  154. package/dist/tools/security.js +35 -0
  155. package/dist/tools/security.js.map +1 -1
  156. package/dist/tools/tool-registry.d.ts.map +1 -1
  157. package/dist/tools/tool-registry.js +4 -0
  158. package/dist/tools/tool-registry.js.map +1 -1
  159. package/dist/tools/verification-trust.d.ts +2 -2
  160. package/dist/tools/verification-trust.d.ts.map +1 -1
  161. package/dist/tools/verification-trust.js +11 -13
  162. package/dist/tools/verification-trust.js.map +1 -1
  163. package/dist/tools/write-video-post.d.ts.map +1 -1
  164. package/dist/tools/write-video-post.js +89 -13
  165. package/dist/tools/write-video-post.js.map +1 -1
  166. package/package.json +26 -1
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Which formats a document can be exported to — and nothing else.
3
+ *
4
+ * Dependency-free on purpose, the same reason routing-modes.ts is: the answer
5
+ * to "can this be exported, and as what?" is needed by the renderer (Node), the
6
+ * extension host (Node) and two webview bundles (no Node at all). A file that
7
+ * imports nothing can be reached from all four, so the list lives in one place
8
+ * instead of being copied into the surfaces that could not cheaply import it.
9
+ *
10
+ * Reachability shapes what people write. Keep this leaf a leaf.
11
+ */
12
+ export type RenderTarget = 'docx' | 'pdf' | 'md' | 'odt' | 'ods';
13
+ /** What a user can export TO. Markdown is the source format, not a
14
+ * destination — exporting a .md as .md is a no-op nobody asked for. */
15
+ export type ExportFormat = Exclude<RenderTarget, 'md'>;
16
+ /** Targets needing no optional peer, so they always work. */
17
+ export declare const ALWAYS_AVAILABLE_TARGETS: readonly RenderTarget[];
18
+ /**
19
+ * Sources that can be re-rendered into another format.
20
+ *
21
+ * Deliberately excludes built documents (.docx, .xlsx, .pdf): turning one of
22
+ * those into another is a lossy conversion wearing an export's clothes. For
23
+ * those the honest actions are Open and Reveal.
24
+ */
25
+ export declare const EXPORTABLE_SOURCE_EXTENSIONS: readonly string[];
26
+ /** What prose exports as. `.docx` first: it opens everywhere, including in
27
+ * LibreOffice and the ODF suites. */
28
+ export declare const DOCUMENT_TARGETS: readonly ExportFormat[];
29
+ /** What tabular data exports as. */
30
+ export declare const SPREADSHEET_TARGETS: readonly ExportFormat[];
31
+ /** Human labels for the buttons, so the surfaces agree on wording too. */
32
+ export declare const TARGET_LABELS: Readonly<Record<RenderTarget, string>>;
33
+ export declare function canExport(path: string): boolean;
34
+ /** The formats offered for this particular source; empty when it is not a
35
+ * source we can render. */
36
+ export declare function targetsFor(path: string): readonly ExportFormat[];
37
+ //# sourceMappingURL=export-formats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-formats.d.ts","sourceRoot":"","sources":["../../../src/tools/authoring/export-formats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAC;AAEjE;wEACwE;AACxE,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAEvD,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,EAAE,SAAS,YAAY,EAAyB,CAAC;AAEtF;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAAyC,CAAC;AAEpG;sCACsC;AACtC,eAAO,MAAM,gBAAgB,EAAE,SAAS,YAAY,EAA2B,CAAC;AAEhF,oCAAoC;AACpC,eAAO,MAAM,mBAAmB,EAAE,SAAS,YAAY,EAA2B,CAAC;AAEnF,0EAA0E;AAC1E,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAMhE,CAAC;AAQF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;4BAC4B;AAC5B,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,YAAY,EAAE,CAGhE"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Which formats a document can be exported to — and nothing else.
3
+ *
4
+ * Dependency-free on purpose, the same reason routing-modes.ts is: the answer
5
+ * to "can this be exported, and as what?" is needed by the renderer (Node), the
6
+ * extension host (Node) and two webview bundles (no Node at all). A file that
7
+ * imports nothing can be reached from all four, so the list lives in one place
8
+ * instead of being copied into the surfaces that could not cheaply import it.
9
+ *
10
+ * Reachability shapes what people write. Keep this leaf a leaf.
11
+ */
12
+ /** Targets needing no optional peer, so they always work. */
13
+ export const ALWAYS_AVAILABLE_TARGETS = ['md', 'odt', 'ods'];
14
+ /**
15
+ * Sources that can be re-rendered into another format.
16
+ *
17
+ * Deliberately excludes built documents (.docx, .xlsx, .pdf): turning one of
18
+ * those into another is a lossy conversion wearing an export's clothes. For
19
+ * those the honest actions are Open and Reveal.
20
+ */
21
+ export const EXPORTABLE_SOURCE_EXTENSIONS = ['.md', '.markdown', '.txt', '.csv'];
22
+ /** What prose exports as. `.docx` first: it opens everywhere, including in
23
+ * LibreOffice and the ODF suites. */
24
+ export const DOCUMENT_TARGETS = ['docx', 'odt', 'pdf'];
25
+ /** What tabular data exports as. */
26
+ export const SPREADSHEET_TARGETS = ['ods', 'docx', 'pdf'];
27
+ /** Human labels for the buttons, so the surfaces agree on wording too. */
28
+ export const TARGET_LABELS = {
29
+ docx: 'Word (.docx)',
30
+ odt: 'OpenDocument (.odt)',
31
+ ods: 'OpenDocument (.ods)',
32
+ pdf: 'PDF',
33
+ md: 'Markdown',
34
+ };
35
+ function extensionOf(path) {
36
+ const dot = path.lastIndexOf('.');
37
+ const slash = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\'));
38
+ return dot > slash ? path.slice(dot).toLowerCase() : '';
39
+ }
40
+ export function canExport(path) {
41
+ return EXPORTABLE_SOURCE_EXTENSIONS.includes(extensionOf(path));
42
+ }
43
+ /** The formats offered for this particular source; empty when it is not a
44
+ * source we can render. */
45
+ export function targetsFor(path) {
46
+ if (!canExport(path))
47
+ return [];
48
+ return extensionOf(path) === '.csv' ? SPREADSHEET_TARGETS : DOCUMENT_TARGETS;
49
+ }
50
+ //# sourceMappingURL=export-formats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-formats.js","sourceRoot":"","sources":["../../../src/tools/authoring/export-formats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAA4B,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAsB,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpG;sCACsC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAA4B,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAEhF,oCAAoC;AACpC,MAAM,CAAC,MAAM,mBAAmB,GAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAEnF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,aAAa,GAA2C;IACnE,IAAI,EAAE,cAAc;IACpB,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,KAAK;IACV,EAAE,EAAE,UAAU;CACf,CAAC;AAEF,SAAS,WAAW,CAAC,IAAY;IAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,OAAO,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,4BAA4B,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AAClE,CAAC;AAED;4BAC4B;AAC5B,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAChC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,gBAAgB,CAAC;AAC/E,CAAC"}
@@ -8,7 +8,9 @@
8
8
  * `build` step needs the peer for that format.
9
9
  */
10
10
  import type { DocModel } from './doc-model.js';
11
- export type RenderTarget = 'docx' | 'pdf' | 'md';
11
+ import type { RenderTarget } from './export-formats.js';
12
+ export type { RenderTarget, ExportFormat } from './export-formats.js';
13
+ export { ALWAYS_AVAILABLE_TARGETS, EXPORTABLE_SOURCE_EXTENSIONS, DOCUMENT_TARGETS, SPREADSHEET_TARGETS, TARGET_LABELS, canExport, targetsFor, } from './export-formats.js';
12
14
  export interface RenderOptions {
13
15
  /** Loads the `docx` peer (required for target 'docx'). */
14
16
  loadDocx?: () => Promise<unknown>;
@@ -29,6 +31,9 @@ export { parseMarkdown } from './md-parse.js';
29
31
  export { renderMarkdown } from './render-md.js';
30
32
  export { renderDocx } from './render-docx.js';
31
33
  export { renderPdf } from './render-pdf.js';
34
+ export { renderOdt, renderOds, ODT_MIMETYPE, ODS_MIMETYPE } from './render-odf.js';
35
+ export { exportDocument, deriveExportPath, parseCsv } from './export-document.js';
36
+ export type { ExportRequest, ExportResult } from './export-document.js';
32
37
  export { legacyToDocModel } from './doc-model.js';
33
38
  export type { DocModel, DocMeta, Block, Inline, ListItem, Align, CalloutVariant, BrandTokens, } from './doc-model.js';
34
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/authoring/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG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AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EACV,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,GAC/E,MAAM,gBAAgB,CAAC"}
@@ -11,6 +11,8 @@ import { parseMarkdown } from './md-parse.js';
11
11
  import { renderMarkdown } from './render-md.js';
12
12
  import { renderDocx } from './render-docx.js';
13
13
  import { renderPdf } from './render-pdf.js';
14
+ import { renderOdt, renderOds } from './render-odf.js';
15
+ export { ALWAYS_AVAILABLE_TARGETS, EXPORTABLE_SOURCE_EXTENSIONS, DOCUMENT_TARGETS, SPREADSHEET_TARGETS, TARGET_LABELS, canExport, targetsFor, } from './export-formats.js';
14
16
  /**
15
17
  * Render a parsed model to one of the supported targets. Returns a Buffer for
16
18
  * docx/pdf and a string for md. Throws a clear, actionable error when the peer
@@ -30,6 +32,11 @@ export async function renderDocument(model, target, opts = {}) {
30
32
  throw new Error('pdf rendering requires the pdfkit package. Install it with: npm install pdfkit');
31
33
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
34
  return renderPdf(model, { loadPdf: opts.loadPdf, baseDir: opts.baseDir });
35
+ // OpenDocument needs no peer — XML in a zip, both from Node's stdlib.
36
+ case 'odt':
37
+ return renderOdt(model, { baseDir: opts.baseDir });
38
+ case 'ods':
39
+ return renderOds(model, { baseDir: opts.baseDir });
33
40
  }
34
41
  }
35
42
  /** Parse extended Markdown straight to a rendered target in one call. */
@@ -40,5 +47,7 @@ export { parseMarkdown } from './md-parse.js';
40
47
  export { renderMarkdown } from './render-md.js';
41
48
  export { renderDocx } from './render-docx.js';
42
49
  export { renderPdf } from './render-pdf.js';
50
+ export { renderOdt, renderOds, ODT_MIMETYPE, ODS_MIMETYPE } from './render-odf.js';
51
+ export { exportDocument, deriveExportPath, parseCsv } from './export-document.js';
43
52
  export { legacyToDocModel } from './doc-model.js';
44
53
  //# sourceMappingUR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,MAAM,IAAI,KAAK,CAAC,gFAAgF,CAAC,CAAC;YACrH,8DAA8D;YAC9D,OAAO,SAAS,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAA6B,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAClG,sEAAsE;QACtE,KAAK,KAAK;YACR,OAAO,SAAS,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QACrD,KAAK,KAAK;YACR,OAAO,SAAS,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IACvD,CAAC;AACH,CAAC;AAED,yEAAyE;AACzE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAAc,EAAE,MAAoB,EAAE,OAAsB,EAAE;IACvG,OAAO,cAAc,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAC7D,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAElF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * DocModel → OpenDocument (.odt text, .ods spreadsheet).
3
+ *
4
+ * Walks the same rich model the docx and pdf renderers walk, honouring the
5
+ * same brand tokens, so the three formats are one document in three coats
6
+ * rather than three separate documents. Unlike those two this needs no peer
7
+ * dependency: an ODF file is XML in a zip, and both halves are in Node's
8
+ * standard library (see ./zip.ts). The open format is the one that always
9
+ * works, which is the point of offering it.
10
+ */
11
+ import type { DocModel } from './doc-model.js';
12
+ export interface RenderOdfOptions {
13
+ /** Base directory for resolving relative image paths. */
14
+ baseDir?: string;
15
+ /** Fixed modification time — pass one for byte-reproducible output. */
16
+ modified?: Date;
17
+ }
18
+ export declare const ODT_MIMETYPE = "application/vnd.oasis.opendocument.text";
19
+ export declare function renderOdt(model: DocModel, opts?: RenderOdfOptions): Promise<Buffer>;
20
+ export declare const ODS_MIMETYPE = "application/vnd.oasis.opendocument.spreadsheet";
21
+ export declare function renderOds(model: DocModel, opts?: RenderOdfOptions): Promise<Buffer>;
22
+ //# sourceMappingURL=render-odf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-odf.d.ts","sourceRoot":"","sources":["../../../src/tools/authoring/render-odf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAiB,QAAQ,EAAmB,MAAM,gBAAgB,CAAC;AAU/E,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,IAAI,CAAC;CACjB;AA0gBD,eAAO,MAAM,YAAY,4CAA4C,CAAC;AAEtE,wBAAsB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB7F;AAID,eAAO,MAAM,YAAY,mDAAmD,CAAC;AAqC7E,wBAAsB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,CA6D7F"}