aurochs 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/@aurochs-builder/xlsx/src/exporter.d.ts +5 -5
  2. package/dist/@aurochs-builder/xlsx/src/index.d.ts +1 -0
  3. package/dist/@aurochs-builder/xlsx/src/workbook.d.ts +4 -3
  4. package/dist/@aurochs-builder/xlsx/src/worksheet.d.ts +4 -3
  5. package/dist/@aurochs-office/pptx/src/parser/graphics/color-resolver.d.ts +44 -0
  6. package/dist/@aurochs-office/pptx/src/parser/graphics/fill-resolver.d.ts +120 -0
  7. package/dist/@aurochs-office/pptx/src/parser/slide/background-parser.d.ts +96 -0
  8. package/dist/@aurochs-office/pptx/src/parser/theme/theme-parser.d.ts +2 -0
  9. package/dist/@aurochs-office/xlsx/src/domain/index.d.ts +2 -2
  10. package/dist/@aurochs-office/xlsx/src/domain/types.d.ts +12 -0
  11. package/dist/@aurochs-office/xlsx/src/parser/context.d.ts +5 -2
  12. package/dist/@aurochs-office/xlsx/src/parser/worksheet.d.ts +2 -1
  13. package/dist/@aurochs-renderer/xlsx/src/svg/color-resolver.d.ts +8 -16
  14. package/dist/@aurochs-renderer/xlsx/src/svg/drawing/chart-renderer.d.ts +3 -0
  15. package/dist/@aurochs-renderer/xlsx/src/svg/drawing/shape-renderer.d.ts +3 -9
  16. package/dist/@aurochs-renderer/xlsx/src/svg/style-resolver.d.ts +3 -1
  17. package/dist/@aurochs-renderer/xlsx/src/svg/types.d.ts +10 -1
  18. package/dist/@aurochs-ui/ooxml-components/src/drawing-ml/EditorResourceContext.d.ts +2 -1
  19. package/dist/_shared/FillEditor-DYGWS75m.js.map +1 -1
  20. package/dist/_shared/{SlideRenderer-CfCs5Gca.js → SlideRenderer-B1hXsmza.js} +2 -2
  21. package/dist/_shared/{SlideRenderer-CfCs5Gca.js.map → SlideRenderer-B1hXsmza.js.map} +1 -1
  22. package/dist/_shared/{document-izKtv7pl.js → document-D8AbKS4A.js} +2 -2
  23. package/dist/_shared/{document-izKtv7pl.js.map → document-D8AbKS4A.js.map} +1 -1
  24. package/dist/_shared/exporter-CQWUIOTW.js.map +1 -1
  25. package/dist/_shared/{external-content-loader-Az6zXEW6.js → external-content-loader-Cco5j8Vl.js} +49 -78
  26. package/dist/_shared/external-content-loader-Cco5j8Vl.js.map +1 -0
  27. package/dist/_shared/{font-scheme-nr_KIdOM.js → font-scheme-DGm0SXNZ.js} +16 -2
  28. package/dist/_shared/font-scheme-DGm0SXNZ.js.map +1 -0
  29. package/dist/_shared/{format-value-BJYKOAD1.js → format-value-CH_aCd2i.js} +181 -4
  30. package/dist/_shared/format-value-CH_aCd2i.js.map +1 -0
  31. package/dist/_shared/{line-BsQyZa8h.js → line-DYJU94VD.js} +2 -2
  32. package/dist/_shared/line-DYJU94VD.js.map +1 -0
  33. package/dist/_shared/{parse-chart-tHvbJ5oL.js → parse-chart-Cysii5e9.js} +43 -5
  34. package/dist/_shared/parse-chart-Cysii5e9.js.map +1 -0
  35. package/dist/_shared/{pptx-loader-xrChTlv2.js → pptx-loader-BTTgDzhm.js} +4 -4
  36. package/dist/_shared/{pptx-loader-xrChTlv2.js.map → pptx-loader-BTTgDzhm.js.map} +1 -1
  37. package/dist/_shared/{primitive-LlwttFZZ.js → primitive-BgiqQ7kU.js} +3 -3
  38. package/dist/_shared/{primitive-LlwttFZZ.js.map → primitive-BgiqQ7kU.js.map} +1 -1
  39. package/dist/_shared/render-page-svg-Cefra4Y2.js +3335 -0
  40. package/dist/_shared/render-page-svg-Cefra4Y2.js.map +1 -0
  41. package/dist/_shared/{slide-parser-BigBs4FL.js → slide-parser-CpvtNpBQ.js} +3 -3
  42. package/dist/_shared/{slide-parser-BigBs4FL.js.map → slide-parser-CpvtNpBQ.js.map} +1 -1
  43. package/dist/_shared/{table-DoeZLDnC.js → table-CCstmUe6.js} +2 -2
  44. package/dist/_shared/{table-DoeZLDnC.js.map → table-CCstmUe6.js.map} +1 -1
  45. package/dist/_shared/{text-utils-BI7wkMv4.js → text-utils-D0bPdEIZ.js} +5 -5
  46. package/dist/_shared/{text-utils-BI7wkMv4.js.map → text-utils-D0bPdEIZ.js.map} +1 -1
  47. package/dist/_shared/{theme-parser-DUddFSF4.js → theme-parser-C1CdMvY2.js} +7 -22
  48. package/dist/_shared/theme-parser-C1CdMvY2.js.map +1 -0
  49. package/dist/_shared/{worksheet-5siIcV-x.js → worksheet-DrVL6723.js} +49 -2
  50. package/dist/_shared/worksheet-DrVL6723.js.map +1 -0
  51. package/dist/cli.js +30486 -29236
  52. package/dist/docx/builder/index.js +1 -1
  53. package/dist/docx/parser/index.js +2 -2
  54. package/dist/pdf/renderer/react/index.js +1 -1
  55. package/dist/pdf/renderer/svg/index.js +2 -2
  56. package/dist/pptx/builder/index.js +3 -3
  57. package/dist/pptx/extract/index.js +2 -2
  58. package/dist/pptx/parser/index.js +19 -40
  59. package/dist/pptx/parser/index.js.map +1 -1
  60. package/dist/pptx/renderer/react/index.js +3 -3
  61. package/dist/pptx/renderer/svg/index.js +30 -4
  62. package/dist/pptx/renderer/svg/index.js.map +1 -1
  63. package/dist/pptx/slide-canvas/index.js +2 -2
  64. package/dist/xlsx/builder/index.js +3 -3
  65. package/dist/xlsx/builder/index.js.map +1 -1
  66. package/dist/xlsx/domain/index.js +9 -0
  67. package/dist/xlsx/domain/index.js.map +1 -1
  68. package/dist/xlsx/parser/full/index.js +26 -28
  69. package/dist/xlsx/parser/full/index.js.map +1 -1
  70. package/dist/xlsx/renderer/svg/index.js +231 -237
  71. package/dist/xlsx/renderer/svg/index.js.map +1 -1
  72. package/dist/xlsx/viewer/index.js +17 -292
  73. package/dist/xlsx/viewer/index.js.map +1 -1
  74. package/package.json +2 -1
  75. package/dist/_shared/external-content-loader-Az6zXEW6.js.map +0 -1
  76. package/dist/_shared/font-scheme-nr_KIdOM.js.map +0 -1
  77. package/dist/_shared/format-value-BJYKOAD1.js.map +0 -1
  78. package/dist/_shared/line-BsQyZa8h.js.map +0 -1
  79. package/dist/_shared/parse-chart-tHvbJ5oL.js.map +0 -1
  80. package/dist/_shared/render-page-svg-xUVC74Rj.js +0 -727
  81. package/dist/_shared/render-page-svg-xUVC74Rj.js.map +0 -1
  82. package/dist/_shared/theme-parser-DUddFSF4.js.map +0 -1
  83. package/dist/_shared/worksheet-5siIcV-x.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { XmlElement } from '@aurochs/xml';
2
2
  import { ZipPackage } from '@aurochs/zip';
3
3
  import { ContentTypeEntry, ParsedContentTypes } from '@aurochs-office/opc';
4
- import { XlsxWorkbook } from '@aurochs-office/xlsx/domain/workbook';
5
4
  import { SharedStringTable } from './index';
5
+ import { XlsxWorkbookInput } from './builder-types';
6
6
  /**
7
7
  * OPC media part. Referenced via relationships in drawings.
8
8
  *
@@ -48,7 +48,7 @@ export declare function createSharedStringTableBuilder(): SharedStringTable & {
48
48
  * @param workbook - The workbook to collect strings from
49
49
  * @returns SharedStringTable builder with all strings indexed
50
50
  */
51
- export declare function collectSharedStrings(workbook: XlsxWorkbook): SharedStringTable & {
51
+ export declare function collectSharedStrings(workbook: XlsxWorkbookInput): SharedStringTable & {
52
52
  getStrings(): readonly string[];
53
53
  };
54
54
  /**
@@ -78,7 +78,7 @@ type GenerateContentTypesOptions = {
78
78
  * @see ECMA-376 Part 2, Section 10.1.2.1 (Content Types)
79
79
  * @see MS-OFFMACRO2 Section 2.2.1.3 (macroEnabled content types)
80
80
  */
81
- export declare function generateContentTypes(workbook: XlsxWorkbook, options?: GenerateContentTypesOptions): XmlElement;
81
+ export declare function generateContentTypes(workbook: XlsxWorkbookInput, options?: GenerateContentTypesOptions): XmlElement;
82
82
  /**
83
83
  * Generate _rels/.rels element (root relationships).
84
84
  *
@@ -111,7 +111,7 @@ type GenerateWorkbookRelsOptions = {
111
111
  * @see MS-OFFMACRO2 Section 2.2.1.4 (vbaProject relationship)
112
112
  * @see MS-OFFMACRO2 Section 2.2.1.5 (xlMacrosheet relationship)
113
113
  */
114
- export declare function generateWorkbookRels(workbook: XlsxWorkbook, options?: GenerateWorkbookRelsOptions): XmlElement;
114
+ export declare function generateWorkbookRels(workbook: XlsxWorkbookInput, options?: GenerateWorkbookRelsOptions): XmlElement;
115
115
  /**
116
116
  * Generate xl/sharedStrings.xml element.
117
117
  *
@@ -160,5 +160,5 @@ export declare function generateSharedStrings(sharedStrings: readonly string[]):
160
160
  * const xlsmData = await exportXlsx(workbook, { sourcePackage });
161
161
  * ```
162
162
  */
163
- export declare function exportXlsx(workbook: XlsxWorkbook, options?: ExportXlsxOptions): Promise<Uint8Array>;
163
+ export declare function exportXlsx(workbook: XlsxWorkbookInput, options?: ExportXlsxOptions): Promise<Uint8Array>;
164
164
  export {};
@@ -19,5 +19,6 @@ export { serializeFill, serializePatternFill, serializeGradientFill } from './fi
19
19
  export { serializeBorder, serializeBorderEdge } from './border';
20
20
  export { serializeNumFmt, serializeNumFmts } from './number-format';
21
21
  export { exportXlsx, createSharedStringTableBuilder, collectSharedStrings, generateContentTypes, generateRootRels, generateWorkbookRels, generateSharedStrings, type ExportXlsxOptions, type MediaPart, } from './exporter';
22
+ export type { XlsxWorkbookInput, XlsxWorksheetInput } from './builder-types';
22
23
  export { serializeDrawing } from './drawing';
23
24
  export { patchWorkbook, updateChartDataInWorkbook, type CellUpdate, type RowUpdate, type ColUpdate, type ImagePlacement, type SheetUpdate, type WorkbookPatchResult, } from './patcher';
@@ -1,5 +1,6 @@
1
1
  import { XmlElement } from '@aurochs/xml';
2
- import { XlsxWorkbook, XlsxWorksheet, XlsxDefinedName } from '@aurochs-office/xlsx/domain/workbook';
2
+ import { XlsxDefinedName } from '@aurochs-office/xlsx/domain/workbook';
3
+ import { XlsxWorkbookInput, XlsxWorksheetInput } from './builder-types';
3
4
  /**
4
5
  * Serialize sheets collection.
5
6
  *
@@ -15,7 +16,7 @@ import { XlsxWorkbook, XlsxWorksheet, XlsxDefinedName } from '@aurochs-office/xl
15
16
  * <sheet name="Sheet2" sheetId="2" r:id="rId2"/>
16
17
  * </sheets>
17
18
  */
18
- export declare function serializeSheets(sheets: readonly XlsxWorksheet[], sheetRelationships: ReadonlyMap<number, string>): XmlElement;
19
+ export declare function serializeSheets(sheets: readonly XlsxWorksheetInput[], sheetRelationships: ReadonlyMap<number, string>): XmlElement;
19
20
  /**
20
21
  * Serialize definedNames collection.
21
22
  *
@@ -61,4 +62,4 @@ export declare function serializeDefinedNames(definedNames: readonly XlsxDefined
61
62
  * // => <workbook xmlns="..." xmlns:r="...">...</workbook>
62
63
  * ```
63
64
  */
64
- export declare function serializeWorkbook(workbook: XlsxWorkbook, sheetRelationships: ReadonlyMap<number, string>): XmlElement;
65
+ export declare function serializeWorkbook(workbook: XlsxWorkbookInput, sheetRelationships: ReadonlyMap<number, string>): XmlElement;
@@ -1,5 +1,6 @@
1
1
  import { XmlElement } from '@aurochs/xml';
2
- import { XlsxWorksheet, XlsxRow, XlsxColumnDef, XlsxSheetView } from '@aurochs-office/xlsx/domain/workbook';
2
+ import { XlsxRow, XlsxColumnDef, XlsxSheetView } from '@aurochs-office/xlsx/domain/workbook';
3
+ import { XlsxWorksheetInput } from './builder-types';
3
4
  import { CellRange } from '@aurochs-office/xlsx/domain/cell/address';
4
5
  import { XlsxSheetProtection } from '@aurochs-office/xlsx/domain/protection';
5
6
  import { XlsxAutoFilter } from '@aurochs-office/xlsx/domain/auto-filter';
@@ -93,7 +94,7 @@ export declare function serializeMergeCells(mergeCells: readonly CellRange[]): X
93
94
  *
94
95
  * @see ECMA-376 Part 4, Section 18.3.1.82 (sheetPr)
95
96
  */
96
- export declare function serializeSheetPr(worksheet: XlsxWorksheet): XmlElement | undefined;
97
+ export declare function serializeSheetPr(worksheet: XlsxWorksheetInput): XmlElement | undefined;
97
98
  /**
98
99
  * Serialize the sheetViews element.
99
100
  *
@@ -194,4 +195,4 @@ export declare function serializeColBreaks(breaks: readonly XlsxPageBreak[]): Xm
194
195
  *
195
196
  * @see ECMA-376 Part 4, Section 18.3.1.99 (worksheet)
196
197
  */
197
- export declare function serializeWorksheet(worksheet: XlsxWorksheet, sharedStrings: SharedStringTable, drawingRelId?: string): XmlElement;
198
+ export declare function serializeWorksheet(worksheet: XlsxWorksheetInput, sharedStrings: SharedStringTable, drawingRelId?: string): XmlElement;
@@ -0,0 +1,44 @@
1
+ import { XmlElement } from '@aurochs/xml';
2
+ import { ColorResolveContext } from '@aurochs-office/drawing-ml/domain/color-context';
3
+ /**
4
+ * All color element keys per ECMA-376 Part 1, Section 20.1.2.3
5
+ */
6
+ export declare const COLOR_ELEMENT_KEYS: readonly ["a:srgbClr", "a:schemeClr", "a:scrgbClr", "a:prstClr", "a:hslClr", "a:sysClr"];
7
+ export type ColorElementKey = (typeof COLOR_ELEMENT_KEYS)[number];
8
+ /**
9
+ * Get scheme color from theme using ColorResolveContext.
10
+ *
11
+ * Maps scheme color references (tx1, bg1, etc.) to actual color values.
12
+ *
13
+ * @param schemeClr - Scheme color reference (e.g., "a:tx1", "a:accent1")
14
+ * @param phClr - Placeholder color for phClr scheme references
15
+ * @param colorCtx - Color resolution context
16
+ * @returns Hex color string (without #) or undefined
17
+ *
18
+ * @see ECMA-376 Part 1, Section 20.1.2.3.32 (a:schemeClr)
19
+ */
20
+ export declare function getSchemeColor(schemeClr: string, phClr: string | undefined, colorCtx: ColorResolveContext): string | undefined;
21
+ /**
22
+ * Extract solid fill color from a node.
23
+ *
24
+ * Supports various color formats: srgbClr, schemeClr, scrgbClr, prstClr, hslClr, sysClr.
25
+ * Also applies color transformations: alpha, shade, tint, lumMod, lumOff, hueMod, satMod.
26
+ *
27
+ * The node can be:
28
+ * - A color element directly (a:srgbClr, a:schemeClr, etc.)
29
+ * - A node containing a:solidFill (e.g., a:rPr, a:defRPr)
30
+ * - A solidFill element containing a color element
31
+ *
32
+ * @param node - The XmlElement to extract color from
33
+ * @param phClr - Placeholder color for phClr scheme references
34
+ * @param colorCtx - Color resolution context
35
+ * @returns Hex color string (without #) or undefined if no color found
36
+ */
37
+ export declare function getSolidFill(node: unknown, phClr: string | undefined, colorCtx: ColorResolveContext): string | undefined;
38
+ /**
39
+ * Find color element in XmlElement
40
+ */
41
+ export declare function findColorElement(node: XmlElement): {
42
+ key: ColorElementKey;
43
+ element: XmlElement;
44
+ } | undefined;
@@ -0,0 +1,120 @@
1
+ import { XmlElement } from '@aurochs/xml';
2
+ import { ColorResolveContext } from '@aurochs-office/drawing-ml/domain/color-context';
3
+ import { ResourceContext } from '../slide/context';
4
+ /**
5
+ * Fill type enumeration (parser layer)
6
+ *
7
+ * Note: This is a parser-specific representation, not the domain Fill type.
8
+ *
9
+ * @see ECMA-376 Part 1, Section 20.1.8 (Fill Types)
10
+ */
11
+ export type FillType = "SOLID_FILL" | "GRADIENT_FILL" | "PIC_FILL" | "PATTERN_FILL" | "GROUP_FILL" | "NO_FILL" | "";
12
+ /**
13
+ * Gradient fill data (parser layer)
14
+ *
15
+ * Note: This is a parser-specific representation for legacy rendering.
16
+ * Domain code should use GradientFill from domain/color.
17
+ *
18
+ * @see ECMA-376 Part 1, Section 20.1.8.33 (a:gradFill)
19
+ */
20
+ export type GradientFill = {
21
+ /** Color stops with position (in 1/100000 units) and hex color */
22
+ readonly color: ReadonlyArray<{
23
+ readonly pos: string;
24
+ readonly color: string;
25
+ }>;
26
+ /** Rotation angle in degrees */
27
+ readonly rot: number;
28
+ /** Gradient type: 'linear' (default) or 'path' (radial/shape) */
29
+ readonly type?: "linear" | "path";
30
+ /**
31
+ * Path gradient shade type (for type='path')
32
+ * @see ECMA-376 Part 1, Section 20.1.8.46 (a:path)
33
+ */
34
+ readonly pathShadeType?: "circle" | "rect" | "shape";
35
+ /**
36
+ * Fill-to-rect for path gradients (in 1/100000 units)
37
+ * @see ECMA-376 Part 1, Section 20.1.8.30 (a:fillToRect)
38
+ */
39
+ readonly fillToRect?: {
40
+ readonly l: number;
41
+ readonly t: number;
42
+ readonly r: number;
43
+ readonly b: number;
44
+ };
45
+ };
46
+ /**
47
+ * Fill result from parsing (parser layer)
48
+ *
49
+ * Can be:
50
+ * - string: CSS color value (e.g., "#FF0000")
51
+ * - GradientFill: Gradient data
52
+ * - null: No fill / transparent
53
+ */
54
+ export type FillResult = string | GradientFill | null;
55
+ /**
56
+ * All fill element keys per ECMA-376 Part 1, Section 20.1.8
57
+ */
58
+ export declare const FILL_ELEMENT_KEYS: readonly ["a:noFill", "a:solidFill", "a:gradFill", "a:pattFill", "a:blipFill", "a:grpFill"];
59
+ export type FillElementKey = (typeof FILL_ELEMENT_KEYS)[number];
60
+ /**
61
+ * Unified handler for each fill type.
62
+ * Provides XML key identification and formatting logic.
63
+ */
64
+ type FillHandler = {
65
+ /** XML element key (e.g., "a:solidFill") */
66
+ readonly xmlKey: string;
67
+ /** Fill type identifier */
68
+ readonly type: FillType;
69
+ /** Format fill data for CSS or SVG output */
70
+ format: (fillColor: unknown, isSvgMode: boolean) => FillResult;
71
+ };
72
+ /**
73
+ * Determine the fill type of a node
74
+ */
75
+ export declare function getFillType(node: unknown): FillType;
76
+ /**
77
+ * Find fill element in XmlElement
78
+ */
79
+ export declare function findFillElement(node: XmlElement): {
80
+ key: FillElementKey;
81
+ element: XmlElement;
82
+ } | undefined;
83
+ /**
84
+ * Get gradient fill colors and rotation
85
+ *
86
+ * @param node - Gradient fill element (a:gradFill)
87
+ * @param colorCtx - Color resolution context
88
+ * @param phClr - Placeholder color to substitute for phClr in gradient stops
89
+ *
90
+ * @see ECMA-376 Part 1, Section 20.1.8.33 (a:gradFill)
91
+ */
92
+ export declare function getGradientFill(node: unknown, colorCtx: ColorResolveContext, phClr?: string): GradientFill;
93
+ /**
94
+ * Get picture fill using ResourceContext
95
+ */
96
+ export declare function getPicFillFromContext(node: unknown, resourceCtx: ResourceContext): string | undefined;
97
+ /**
98
+ * Get pattern fill (CSS gradient patterns)
99
+ */
100
+ export declare function getPatternFill(node: unknown, colorCtx: ColorResolveContext): [string, string?, string?];
101
+ /**
102
+ * Detect image fill mode from blipFill element
103
+ * - a:stretch → "stretch" (fill without preserving aspect ratio)
104
+ * - a:tile → "tile" (tile the image)
105
+ * - default → "cover" (scale to cover)
106
+ */
107
+ export declare function detectImageFillMode(node: unknown): "stretch" | "tile" | "cover";
108
+ /**
109
+ * Get linear gradient CSS for pattern fills
110
+ */
111
+ export declare function getLinearGradient(prst: string, bgColor: string, fgColor: string): [string, string?, string?];
112
+ /**
113
+ * Get the handler for a specific fill type
114
+ */
115
+ export declare function getFillHandler(fillType: FillType): FillHandler | undefined;
116
+ /**
117
+ * Format fill result using the appropriate handler
118
+ */
119
+ export declare function formatFillResult(fillType: FillType, fillColor: unknown, isSvgMode: boolean): FillResult;
120
+ export {};
@@ -0,0 +1,96 @@
1
+ import { XmlElement } from '@aurochs/xml';
2
+ import { BackgroundFill } from '../../domain/slide/background';
3
+ import { BaseFill } from '@aurochs-office/drawing-ml/domain/fill';
4
+ import { ResolvedBackgroundFill } from '@aurochs-office/drawing-ml/domain/background-fill';
5
+ import { SlideContext } from './context';
6
+ /**
7
+ * Background element result from p:bg
8
+ *
9
+ * Represents the parsed background element containing either
10
+ * background properties (bgPr) or background reference (bgRef).
11
+ */
12
+ export type BackgroundElement = {
13
+ /** Background properties element (p:bgPr) */
14
+ readonly bgPr?: XmlElement;
15
+ /** Background reference element (p:bgRef) */
16
+ readonly bgRef?: XmlElement;
17
+ };
18
+ /**
19
+ * Result of parsing background properties
20
+ *
21
+ * Contains the fill element and optional placeholder color
22
+ * for theme-based backgrounds.
23
+ */
24
+ export type BackgroundParseResult = {
25
+ /**
26
+ * Fill element (XmlElement containing a:solidFill, a:gradFill, a:blipFill, etc.)
27
+ */
28
+ readonly fill: XmlElement;
29
+ /**
30
+ * Placeholder color resolved from p:bgRef child element.
31
+ * This is the hex color (without #) to substitute for phClr in theme styles.
32
+ *
33
+ * @see ECMA-376 Part 1, Section 19.3.1.4 (p:bgRef)
34
+ */
35
+ readonly phClr?: string;
36
+ /**
37
+ * Whether the fill came from a theme style (via bgRef).
38
+ * When true, blipFill rIds should be resolved from theme resources.
39
+ *
40
+ * @see ECMA-376 Part 1, Section 20.1.4.1.7 (a:bgFillStyleLst)
41
+ */
42
+ readonly fromTheme?: boolean;
43
+ };
44
+ /**
45
+ * Get background element (p:bg) from an XmlElement
46
+ */
47
+ export declare function getBackgroundElement(element: XmlElement | undefined): BackgroundElement | undefined;
48
+ /**
49
+ * Get background properties from an XmlElement using the standard path.
50
+ * Returns the p:bgPr element directly as XmlElement.
51
+ */
52
+ export declare function getBgPrFromElement(element: XmlElement | undefined): XmlElement | undefined;
53
+ /**
54
+ * Get background reference element from an XmlElement
55
+ */
56
+ export declare function getBgRefFromElement(element: XmlElement | undefined): XmlElement | undefined;
57
+ /**
58
+ * Resolve p:bgRef to fill element from theme.
59
+ *
60
+ * Per ECMA-376 Part 1, Section 19.3.1.4 (p:bgRef):
61
+ * - idx 1-999: use a:fillStyleLst[idx-1]
62
+ * - idx 1001+: use a:bgFillStyleLst[idx-1001]
63
+ *
64
+ * Returns the fill element directly as XmlElement.
65
+ *
66
+ * @see ECMA-376 Part 1, Section 19.3.1.4 (p:bgRef)
67
+ * @see ECMA-376 Part 1, Section 20.1.4.1.7 (a:bgFillStyleLst)
68
+ */
69
+ export declare function resolveBgRefToFill(bgRef: XmlElement, ctx: SlideContext): BaseFill | undefined;
70
+ /**
71
+ * Extract placeholder color from p:bgRef element.
72
+ *
73
+ * @see ECMA-376 Part 1, Section 19.3.1.4 (p:bgRef)
74
+ */
75
+ export declare function extractPhClrFromBgRef(bgRef: XmlElement, ctx: SlideContext): string | undefined;
76
+ /** Parse background properties from slide context, returning XML-based result if available */
77
+ export declare function parseBackgroundProperties(ctx: SlideContext): BackgroundParseResult | undefined;
78
+ /**
79
+ * Get background reference element from content hierarchy.
80
+ */
81
+ export declare function findBackgroundRef(ctx: SlideContext): XmlElement | undefined;
82
+ /**
83
+ * Check if slide has its own background (not inherited)
84
+ */
85
+ export declare function hasOwnBackground(ctx: SlideContext): boolean;
86
+ /** Resolve background fill data from slide/layout/master hierarchy */
87
+ export declare function getBackgroundFillData(ctx: SlideContext): BackgroundFill;
88
+ /**
89
+ * Convert BackgroundFill to ResolvedBackgroundFill.
90
+ *
91
+ * Pure type conversion from parser domain to rendering domain.
92
+ *
93
+ * @see ECMA-376 Part 1, Section 20.1.8.33 (a:gradFill)
94
+ * @see ECMA-376 Part 1, Section 20.1.8.46 (a:path) for radial/path gradients
95
+ */
96
+ export declare function toResolvedBackgroundFill(bgFillData: BackgroundFill): ResolvedBackgroundFill | undefined;
@@ -5,6 +5,8 @@ import { CustomColor, ExtraColorScheme, ExtractedTheme, FormatScheme, ObjectDefa
5
5
  /**
6
6
  * Parse FontScheme from theme content.
7
7
  *
8
+ * Delegates font spec extraction to the shared OOXML parser.
9
+ *
8
10
  * @see ECMA-376 Part 1, Section 20.1.4.1.18 (a:fontScheme)
9
11
  */
10
12
  export declare function parseFontScheme(themeContent: XmlDocument | null): FontScheme;
@@ -6,8 +6,8 @@
6
6
  *
7
7
  * @see ECMA-376 Part 4 (SpreadsheetML)
8
8
  */
9
- export type { RowIndex, ColIndex, StyleId, FontId, FillId, BorderId, NumFmtId } from './types';
10
- export { rowIdx, colIdx, styleId, fontId, fillId, borderId, numFmtId } from './types';
9
+ export type { RowIndex, ColIndex, StyleId, FontId, FillId, BorderId, NumFmtId, SheetId } from './types';
10
+ export { rowIdx, colIdx, styleId, fontId, fillId, borderId, numFmtId, sheetId } from './types';
11
11
  export type { XlsxDateSystem } from './date-system';
12
12
  export type { CellAddress, CellRange } from './cell/address';
13
13
  export type { Cell, CellValue, StringCellValue, NumberCellValue, BooleanCellValue, ErrorCellValue, DateCellValue, EmptyCellValue } from './cell/types';
@@ -48,6 +48,12 @@ export type BorderId = Brand<number, "BorderId">;
48
48
  * @see ECMA-376 Part 4, Section 18.8.31 (numFmts)
49
49
  */
50
50
  export type NumFmtId = Brand<number, "NumFmtId">;
51
+ /**
52
+ * Sheet identifier (positive integer, unique within a workbook)
53
+ *
54
+ * @see ECMA-376 Part 4, Section 18.2.19 (sheet)
55
+ */
56
+ export type SheetId = Brand<number, "SheetId">;
51
57
  /**
52
58
  * Index into the shared strings table (sharedStrings.xml)
53
59
  *
@@ -86,6 +92,12 @@ export declare const borderId: (v: number) => BorderId;
86
92
  * Create a NumFmtId from a number.
87
93
  */
88
94
  export declare const numFmtId: (v: number) => NumFmtId;
95
+ /**
96
+ * Create a SheetId from a number.
97
+ *
98
+ * @throws Error if value is not a positive integer
99
+ */
100
+ export declare function sheetId(v: number): SheetId;
89
101
  /**
90
102
  * Create a SharedStringIndex from a number.
91
103
  */
@@ -1,6 +1,7 @@
1
1
  import { XlsxStyleSheet } from '../domain/style/types';
2
- import { XlsxDefinedName } from '../domain/workbook';
2
+ import { XlsxDefinedName, XlsxCalcProperties } from '../domain/workbook';
3
3
  import { XlsxDateSystem } from '../domain/date-system';
4
+ import { SheetId } from '../domain/types';
4
5
  /**
5
6
  * Basic sheet information from workbook.xml
6
7
  *
@@ -8,7 +9,7 @@ import { XlsxDateSystem } from '../domain/date-system';
8
9
  */
9
10
  export type XlsxSheetInfo = {
10
11
  readonly name: string;
11
- readonly sheetId: number;
12
+ readonly sheetId: SheetId;
12
13
  readonly rId: string;
13
14
  readonly state: "visible" | "hidden" | "veryHidden";
14
15
  };
@@ -21,6 +22,8 @@ export type XlsxWorkbookInfo = {
21
22
  readonly sheets: readonly XlsxSheetInfo[];
22
23
  readonly definedNames?: readonly XlsxDefinedName[];
23
24
  readonly dateSystem: XlsxDateSystem;
25
+ /** Calculation properties from `<calcPr>` */
26
+ readonly calcProperties?: XlsxCalcProperties;
24
27
  };
25
28
  /**
26
29
  * Shared context for XLSX parsing operations
@@ -3,6 +3,7 @@ import { XlsxConditionalFormatting } from '../domain/conditional-formatting';
3
3
  import { XlsxHyperlink } from '../domain/hyperlink';
4
4
  import { CellRange } from '../domain/cell/address';
5
5
  import { XlsxDataValidation } from '../domain/data-validation';
6
+ import { SheetId } from '../domain/types';
6
7
  import { XlsxParseContext } from './context';
7
8
  import { XlsxParseOptions } from './options';
8
9
  import { XmlElement } from '@aurochs/xml';
@@ -143,7 +144,7 @@ export declare function parseWorksheet(params: {
143
144
  readonly options: XlsxParseOptions | undefined;
144
145
  readonly sheetInfo: {
145
146
  readonly name: string;
146
- readonly sheetId: number;
147
+ readonly sheetId: SheetId;
147
148
  readonly state: "visible" | "hidden" | "veryHidden";
148
149
  readonly xmlPath: string;
149
150
  };
@@ -1,18 +1,10 @@
1
- import { XlsxColor } from '@aurochs-office/xlsx/domain/style/color';
2
- import { ColorScheme } from '@aurochs-office/drawing-ml/domain/color-context';
3
1
  /**
4
- * Resolve an XlsxColor to a CSS hex color.
2
+ * @file Color resolution re-export
3
+ *
4
+ * Re-exports the canonical XLSX color resolver from the domain layer.
5
+ * All color resolution logic lives in @aurochs-office/xlsx/domain/style/color-resolver
6
+ * as the single source of truth.
7
+ *
8
+ * @see ECMA-376 Part 4, Section 18.8.9 (color)
5
9
  */
6
- export declare function resolveXlsxColor(color: XlsxColor | undefined, colorScheme?: ColorScheme, indexedColors?: readonly string[]): string | undefined;
7
- /**
8
- * Get the default font color (black).
9
- */
10
- export declare function getDefaultFontColor(): string;
11
- /**
12
- * Get the default background color (white).
13
- */
14
- export declare function getDefaultBackgroundColor(): string;
15
- /**
16
- * Get the default border color (black).
17
- */
18
- export declare function getDefaultBorderColor(): string;
10
+ export { resolveXlsxColor, getDefaultFontColor, getDefaultBackgroundColor, getDefaultBorderColor, } from '@aurochs-office/xlsx/domain/style/color-resolver';
@@ -1,5 +1,6 @@
1
1
  import { XlsxChartFrame } from '@aurochs-office/xlsx/domain/drawing/types';
2
2
  import { Chart } from '@aurochs-office/chart/domain';
3
+ import { ColorScheme } from '@aurochs-office/drawing-ml/domain/color-context';
3
4
  import { DrawingBounds } from '../drawing-layout';
4
5
  import { WarningsCollector } from '../types';
5
6
  /**
@@ -19,6 +20,8 @@ export type RenderChartFrameOptions = {
19
20
  readonly resolveChart?: ChartResolver;
20
21
  /** Warnings collector */
21
22
  readonly warnings?: WarningsCollector;
23
+ /** Color scheme from workbook theme for resolving scheme colors */
24
+ readonly colorScheme?: ColorScheme;
22
25
  };
23
26
  /** Render a chart frame to SVG */
24
27
  export declare function renderChartFrame(options: RenderChartFrameOptions): string;
@@ -1,4 +1,5 @@
1
1
  import { XlsxShape } from '@aurochs-office/xlsx/domain/drawing/types';
2
+ import { ColorScheme } from '@aurochs-office/drawing-ml/domain/color-context';
2
3
  import { DrawingBounds } from '../drawing-layout';
3
4
  import { WarningsCollector } from '../types';
4
5
  /**
@@ -11,14 +12,7 @@ export type RenderShapeOptions = {
11
12
  readonly bounds: DrawingBounds;
12
13
  /** Warnings collector */
13
14
  readonly warnings?: WarningsCollector;
15
+ /** Color scheme from workbook theme */
16
+ readonly colorScheme?: ColorScheme;
14
17
  };
15
- /**
16
- * Render a shape element to SVG.
17
- *
18
- * Delegates geometry rendering to the shared DrawingML renderer for consistency
19
- * and to avoid code duplication.
20
- *
21
- * @param options - Render options
22
- * @returns SVG string for the shape
23
- */
24
18
  export declare function renderShape(options: RenderShapeOptions): string;
@@ -1,6 +1,7 @@
1
1
  import { XlsxStyleSheet } from '@aurochs-office/xlsx/domain/style/types';
2
2
  import { StyleId } from '@aurochs-office/xlsx/domain/types';
3
3
  import { ColorScheme } from '@aurochs-office/drawing-ml/domain/color-context';
4
+ import { FontScheme } from '@aurochs-office/ooxml/domain/font-scheme';
4
5
  import { ResolvedCellStyle, ResolvedFont, ResolvedFill, ResolvedBorder, XlsxRenderOptions } from './types';
5
6
  /**
6
7
  * Create default resolved font.
@@ -22,6 +23,7 @@ type ResolveCellStyleParams = {
22
23
  readonly styleId: StyleId | undefined;
23
24
  readonly styles: XlsxStyleSheet;
24
25
  readonly colorScheme: ColorScheme | undefined;
26
+ readonly fontScheme: FontScheme | undefined;
25
27
  readonly options: XlsxRenderOptions;
26
28
  };
27
29
  /**
@@ -33,5 +35,5 @@ export declare function resolveCellStyle(params: ResolveCellStyleParams): Resolv
33
35
  *
34
36
  * Caches resolved styles by styleId to avoid repeated resolution.
35
37
  */
36
- export declare function createStyleCache(styles: XlsxStyleSheet, colorScheme: ColorScheme | undefined, options: XlsxRenderOptions): (styleId: StyleId | undefined) => ResolvedCellStyle;
38
+ export declare function createStyleCache(styles: XlsxStyleSheet, colorScheme: ColorScheme | undefined, fontScheme: FontScheme | undefined, options: XlsxRenderOptions): (styleId: StyleId | undefined) => ResolvedCellStyle;
37
39
  export {};
@@ -6,7 +6,16 @@ import { Chart } from '@aurochs-office/chart/domain';
6
6
  * Resolved font properties with computed color.
7
7
  */
8
8
  export type ResolvedFont = {
9
- readonly name: string;
9
+ /**
10
+ * Font family fallback chain, ordered by priority.
11
+ *
12
+ * Example: `["Yu Gothic", "Calibri"]` → the renderer tries "Yu Gothic" first,
13
+ * then falls back to "Calibri" for characters not covered.
14
+ *
15
+ * When the font's `scheme` attribute references a theme fontScheme, this chain
16
+ * is built from the theme's script-specific and latin typefaces.
17
+ */
18
+ readonly families: readonly string[];
10
19
  readonly size: number;
11
20
  readonly bold?: boolean;
12
21
  readonly italic?: boolean;
@@ -22,8 +22,9 @@ export type EditorResourceContextValue = {
22
22
  *
23
23
  * Provides centralized resource management for uploaded and created resources.
24
24
  */
25
- export declare function EditorResourceProvider({ children }: {
25
+ export declare function EditorResourceProvider({ children, initialStore }: {
26
26
  readonly children: ReactNode;
27
+ readonly initialStore?: ResourceStore;
27
28
  }): import("react/jsx-runtime").JSX.Element;
28
29
  /**
29
30
  * Access editor resource context.