@trebco/treb 32.13.2 → 36.1.2

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 (266) hide show
  1. package/api-generator/api-generator-types.ts +3 -0
  2. package/api-generator/api-generator.ts +15 -1
  3. package/bun.lock +145 -99
  4. package/dist/chunk-43DLP2OX.mjs +11 -0
  5. package/dist/chunk-4CKS56PE.mjs +11 -0
  6. package/dist/chunk-75PARUQE.mjs +11 -0
  7. package/dist/chunk-7QD63AZS.mjs +24601 -0
  8. package/dist/chunk-A55ARVRD.mjs +11 -0
  9. package/dist/chunk-DESAKYW4.mjs +11 -0
  10. package/dist/chunk-EQ2R5W6P.mjs +24565 -0
  11. package/dist/chunk-IYJU2J6D.mjs +24601 -0
  12. package/dist/chunk-KSJFPGXT.mjs +11 -0
  13. package/dist/chunk-ORQFKLXM.mjs +24601 -0
  14. package/dist/chunk-SFDNNDHY.mjs +11 -0
  15. package/dist/chunk-T47DX5MI.mjs +11 -0
  16. package/dist/chunk-T6ILBVEX.mjs +11 -0
  17. package/dist/chunk-TPRCDYYG.mjs +11 -0
  18. package/dist/chunk-YAHNOOHO.mjs +11 -0
  19. package/dist/treb-export-worker.mjs +9 -2
  20. package/dist/treb-spreadsheet.mjs +7 -19
  21. package/dist/treb.d.ts +20 -4
  22. package/esbuild-composite.mjs +18 -6
  23. package/esbuild-utils.mjs +62 -3
  24. package/i18n/languages/treb-i18n-da.mjs +1 -1
  25. package/i18n/languages/treb-i18n-de.mjs +1 -1
  26. package/i18n/languages/treb-i18n-es.mjs +1 -1
  27. package/i18n/languages/treb-i18n-fr.mjs +1 -1
  28. package/i18n/languages/treb-i18n-it.mjs +1 -1
  29. package/i18n/languages/treb-i18n-nl.mjs +1 -1
  30. package/i18n/languages/treb-i18n-no.mjs +1 -1
  31. package/i18n/languages/treb-i18n-pl.mjs +1 -1
  32. package/i18n/languages/treb-i18n-pt.mjs +1 -1
  33. package/i18n/languages/treb-i18n-sv.mjs +1 -1
  34. package/ooxml-types/README.md +141 -0
  35. package/ooxml-types/package.json +5 -0
  36. package/ooxml-types/src/types/drawingml/chart.ts +327 -0
  37. package/ooxml-types/src/types/drawingml/index.ts +63 -0
  38. package/ooxml-types/src/types/drawingml/spreadsheetDrawing.ts +105 -0
  39. package/ooxml-types/src/types/drawingml/theme.ts +104 -0
  40. package/ooxml-types/src/types/index.ts +3 -0
  41. package/ooxml-types/src/types/package/contentTypes.ts +49 -0
  42. package/ooxml-types/src/types/package/docProps.ts +46 -0
  43. package/ooxml-types/src/types/package/index.ts +17 -0
  44. package/ooxml-types/src/types/package/relationships.ts +37 -0
  45. package/ooxml-types/src/types/spreadsheetml/columns.ts +20 -0
  46. package/ooxml-types/src/types/spreadsheetml/comments.ts +30 -0
  47. package/ooxml-types/src/types/spreadsheetml/dataFeatures.ts +261 -0
  48. package/ooxml-types/src/types/spreadsheetml/enums.ts +175 -0
  49. package/ooxml-types/src/types/spreadsheetml/index.ts +186 -0
  50. package/ooxml-types/src/types/spreadsheetml/metadata.ts +90 -0
  51. package/ooxml-types/src/types/spreadsheetml/misc.ts +35 -0
  52. package/ooxml-types/src/types/spreadsheetml/pageLayout.ts +83 -0
  53. package/ooxml-types/src/types/spreadsheetml/sharedStrings.ts +33 -0
  54. package/ooxml-types/src/types/spreadsheetml/sheetData.ts +70 -0
  55. package/ooxml-types/src/types/spreadsheetml/sheetProperties.ts +86 -0
  56. package/ooxml-types/src/types/spreadsheetml/sheetViews.ts +51 -0
  57. package/ooxml-types/src/types/spreadsheetml/sparkline.ts +46 -0
  58. package/ooxml-types/src/types/spreadsheetml/styles.ts +274 -0
  59. package/ooxml-types/src/types/spreadsheetml/table.ts +106 -0
  60. package/ooxml-types/src/types/spreadsheetml/util.ts +15 -0
  61. package/ooxml-types/src/types/spreadsheetml/workbook.ts +165 -0
  62. package/ooxml-types/src/types/spreadsheetml/worksheet.ts +60 -0
  63. package/package.json +13 -11
  64. package/treb-base-types/src/api_types.ts +1 -1
  65. package/treb-base-types/src/area-utils.ts +1 -1
  66. package/treb-base-types/src/area.ts +1 -1
  67. package/treb-base-types/src/basic_types.ts +1 -1
  68. package/treb-base-types/src/cell.ts +1 -1
  69. package/treb-base-types/src/cells.ts +1 -1
  70. package/treb-base-types/src/color.ts +1 -1
  71. package/treb-base-types/src/dom-utilities.ts +1 -1
  72. package/treb-base-types/src/evaluate-options.ts +1 -1
  73. package/treb-base-types/src/font-stack.ts +1 -1
  74. package/treb-base-types/src/gradient.ts +1 -1
  75. package/treb-base-types/src/import.ts +1 -1
  76. package/treb-base-types/src/index-standalone.ts +1 -1
  77. package/treb-base-types/src/index.ts +2 -1
  78. package/treb-base-types/src/layout.ts +1 -1
  79. package/treb-base-types/src/localization.ts +1 -1
  80. package/treb-base-types/src/rectangle.ts +1 -1
  81. package/treb-base-types/src/render_text.ts +7 -1
  82. package/treb-base-types/src/style.ts +1 -1
  83. package/treb-base-types/src/table.ts +1 -1
  84. package/treb-base-types/src/text_part.ts +1 -1
  85. package/treb-base-types/src/theme.ts +1 -1
  86. package/treb-base-types/src/union.ts +4 -1
  87. package/treb-base-types/src/value-type.ts +1 -1
  88. package/treb-base-types/src/worker-proxy.ts +294 -0
  89. package/treb-base-types/style/resizable.css +1 -1
  90. package/treb-calculator/src/calculator.ts +133 -14
  91. package/treb-calculator/src/complex-math.ts +1 -1
  92. package/treb-calculator/src/dag/array-vertex.ts +1 -1
  93. package/treb-calculator/src/dag/calculation_leaf_vertex.ts +1 -1
  94. package/treb-calculator/src/dag/graph.ts +1 -1
  95. package/treb-calculator/src/dag/spreadsheet_vertex.ts +1 -1
  96. package/treb-calculator/src/dag/spreadsheet_vertex_base.ts +1 -1
  97. package/treb-calculator/src/dag/state_leaf_vertex.ts +1 -1
  98. package/treb-calculator/src/dag/vertex.ts +1 -1
  99. package/treb-calculator/src/descriptors.ts +9 -1
  100. package/treb-calculator/src/expression-calculator.ts +1 -1
  101. package/treb-calculator/src/function-error.ts +1 -1
  102. package/treb-calculator/src/function-library.ts +1 -1
  103. package/treb-calculator/src/functions/base-functions.ts +10 -4
  104. package/treb-calculator/src/functions/beta.ts +1 -1
  105. package/treb-calculator/src/functions/checkbox.ts +1 -1
  106. package/treb-calculator/src/functions/complex-functions.ts +1 -1
  107. package/treb-calculator/src/functions/date-utils.ts +1 -1
  108. package/treb-calculator/src/functions/finance-functions.ts +2 -4
  109. package/treb-calculator/src/functions/fp.ts +1 -1
  110. package/treb-calculator/src/functions/function-utilities.ts +1 -1
  111. package/treb-calculator/src/functions/gamma.ts +1 -1
  112. package/treb-calculator/src/functions/information-functions.ts +1 -1
  113. package/treb-calculator/src/functions/lambda-functions.ts +4 -1
  114. package/treb-calculator/src/functions/matrix-functions.ts +1 -1
  115. package/treb-calculator/src/functions/normal.ts +1 -1
  116. package/treb-calculator/src/functions/regex-functions.ts +13 -4
  117. package/treb-calculator/src/functions/sparkline.ts +1 -1
  118. package/treb-calculator/src/functions/statistics-functions.ts +1 -1
  119. package/treb-calculator/src/functions/students-t.ts +1 -1
  120. package/treb-calculator/src/functions/text-functions.ts +5 -1
  121. package/treb-calculator/src/index.ts +1 -1
  122. package/treb-calculator/src/notifier-types.ts +1 -1
  123. package/treb-calculator/src/primitives.ts +1 -1
  124. package/treb-calculator/src/utilities.ts +1 -1
  125. package/treb-charts/src/chart-functions.ts +1 -1
  126. package/treb-charts/src/chart-types.ts +1 -1
  127. package/treb-charts/src/chart-utils.ts +1 -1
  128. package/treb-charts/src/chart.ts +1 -1
  129. package/treb-charts/src/default-chart-renderer.ts +1 -1
  130. package/treb-charts/src/index.ts +1 -1
  131. package/treb-charts/src/main.ts +1 -1
  132. package/treb-charts/src/quicksort.ts +1 -1
  133. package/treb-charts/src/rectangle.ts +1 -1
  134. package/treb-charts/src/renderer-type.ts +1 -1
  135. package/treb-charts/src/renderer.ts +1 -1
  136. package/treb-charts/src/util.ts +1 -1
  137. package/treb-charts/style/charts.scss +1 -1
  138. package/treb-data-model/src/annotation.ts +1 -1
  139. package/treb-data-model/src/conditional_format.ts +1 -1
  140. package/treb-data-model/src/data-validation.ts +1 -1
  141. package/treb-data-model/src/data_model.ts +32 -5
  142. package/treb-data-model/src/index.ts +1 -1
  143. package/treb-data-model/src/language-model.ts +1 -1
  144. package/treb-data-model/src/named.ts +1 -1
  145. package/treb-data-model/src/serialize_options.ts +1 -1
  146. package/treb-data-model/src/sheet.ts +1 -1
  147. package/treb-data-model/src/sheet_collection.ts +1 -1
  148. package/treb-data-model/src/sheet_selection.ts +1 -1
  149. package/treb-data-model/src/sheet_types.ts +1 -1
  150. package/treb-data-model/src/types.ts +1 -1
  151. package/treb-embed/src/content-types.d.ts +1 -1
  152. package/treb-embed/src/custom-element/global.d.ts +1 -1
  153. package/treb-embed/src/custom-element/spreadsheet-constructor.ts +1 -1
  154. package/treb-embed/src/custom-element/treb-global.ts +1 -1
  155. package/treb-embed/src/custom-element/treb-spreadsheet-element.ts +1 -1
  156. package/treb-embed/src/embedded-spreadsheet.ts +342 -149
  157. package/treb-embed/src/index.ts +1 -1
  158. package/treb-embed/src/options.ts +4 -2
  159. package/treb-embed/src/plugin.ts +1 -1
  160. package/treb-embed/src/progress-dialog.ts +1 -1
  161. package/treb-embed/src/selection-state.ts +1 -1
  162. package/treb-embed/src/spinner.ts +1 -1
  163. package/treb-embed/src/toolbar-message.ts +6 -1
  164. package/treb-embed/src/types.ts +13 -1
  165. package/treb-embed/style/autocomplete.scss +1 -1
  166. package/treb-embed/style/dark-theme.scss +1 -1
  167. package/treb-embed/style/defaults.scss +1 -1
  168. package/treb-embed/style/dialog.scss +1 -1
  169. package/treb-embed/style/dropdown-select.scss +1 -1
  170. package/treb-embed/style/font-stacks.scss +1 -1
  171. package/treb-embed/style/formula-bar.scss +1 -1
  172. package/treb-embed/style/grid.scss +1 -1
  173. package/treb-embed/style/layout.scss +1 -1
  174. package/treb-embed/style/mouse-mask.scss +1 -1
  175. package/treb-embed/style/note.scss +1 -1
  176. package/treb-embed/style/overlay-editor.scss +1 -1
  177. package/treb-embed/style/spinner.scss +1 -1
  178. package/treb-embed/style/tab-bar.scss +1 -1
  179. package/treb-embed/style/table.scss +1 -1
  180. package/treb-embed/style/theme-defaults.scss +1 -1
  181. package/treb-embed/style/toolbar.scss +1 -1
  182. package/treb-embed/style/tooltip.scss +1 -1
  183. package/treb-embed/style/treb-icons.scss +1 -1
  184. package/treb-embed/style/treb-spreadsheet-element.scss +1 -1
  185. package/treb-embed/style/z-index.scss +1 -1
  186. package/treb-export/src/address-type.ts +1 -1
  187. package/treb-export/src/base-template.ts +1 -1
  188. package/treb-export/src/column-width.ts +1 -1
  189. package/treb-export/src/drawing/bubble-chart-template.ts +1 -1
  190. package/treb-export/src/drawing/chart-template-components2.ts +1 -1
  191. package/treb-export/src/drawing/chart.ts +1 -1
  192. package/treb-export/src/drawing/column-chart-template2.ts +1 -1
  193. package/treb-export/src/drawing/donut-chart-template2.ts +1 -1
  194. package/treb-export/src/drawing/drawing.ts +1 -1
  195. package/treb-export/src/drawing/embedded-image.ts +1 -1
  196. package/treb-export/src/drawing/scatter-chart-template2.ts +1 -1
  197. package/treb-export/src/export.ts +121 -8
  198. package/treb-export/src/import-export-messages.ts +61 -0
  199. package/treb-export/src/import.ts +318 -301
  200. package/treb-export/src/index.worker.ts +85 -53
  201. package/treb-export/src/metadata.ts +71 -3
  202. package/treb-export/src/ooxml.ts +47 -0
  203. package/treb-export/src/relationship.ts +1 -1
  204. package/treb-export/src/shared-strings.ts +19 -15
  205. package/treb-export/src/template-2.ts +1 -1
  206. package/treb-export/src/unescape_xml.ts +1 -1
  207. package/treb-export/src/workbook-sheet.ts +11 -6
  208. package/treb-export/src/workbook-style.ts +137 -25
  209. package/treb-export/src/workbook-theme.ts +20 -4
  210. package/treb-export/src/workbook.ts +85 -88
  211. package/treb-export/src/xml-test.ts +1 -1
  212. package/treb-export/src/xml-utils.ts +1 -1
  213. package/treb-export/src/zip-wrapper.ts +1 -1
  214. package/treb-export/tsconfig.json +2 -1
  215. package/treb-format/src/format.test.ts +1 -1
  216. package/treb-format/src/format.ts +12 -5
  217. package/treb-format/src/format_cache.ts +3 -3
  218. package/treb-format/src/format_parser.ts +1 -1
  219. package/treb-format/src/index.ts +1 -1
  220. package/treb-format/src/number_format_section.ts +1 -1
  221. package/treb-format/src/value_parser.ts +1 -1
  222. package/treb-grid/src/editors/autocomplete.ts +1 -1
  223. package/treb-grid/src/editors/autocomplete_matcher.ts +1 -1
  224. package/treb-grid/src/editors/editor.ts +15 -6
  225. package/treb-grid/src/editors/external_editor.ts +33 -8
  226. package/treb-grid/src/editors/formula_bar.ts +12 -1
  227. package/treb-grid/src/editors/overlay_editor.ts +4 -1
  228. package/treb-grid/src/index.ts +1 -1
  229. package/treb-grid/src/layout/base_layout.ts +1 -1
  230. package/treb-grid/src/layout/grid_layout.ts +1 -1
  231. package/treb-grid/src/layout/mock-layout.ts +1 -1
  232. package/treb-grid/src/render/selection-renderer.ts +1 -1
  233. package/treb-grid/src/render/svg_header_overlay.ts +1 -1
  234. package/treb-grid/src/render/svg_selection_block.ts +1 -1
  235. package/treb-grid/src/render/tile_renderer.ts +36 -7
  236. package/treb-grid/src/types/border_constants.ts +1 -1
  237. package/treb-grid/src/types/clipboard_data.ts +1 -1
  238. package/treb-grid/src/types/clipboard_data2.ts +1 -1
  239. package/treb-grid/src/types/drag_mask.ts +1 -1
  240. package/treb-grid/src/types/external_editor_config.ts +1 -1
  241. package/treb-grid/src/types/grid.ts +181 -40
  242. package/treb-grid/src/types/grid_base.ts +7 -4
  243. package/treb-grid/src/types/grid_command.ts +7 -1
  244. package/treb-grid/src/types/grid_events.ts +2 -1
  245. package/treb-grid/src/types/grid_options.ts +1 -1
  246. package/treb-grid/src/types/scale-control.ts +1 -1
  247. package/treb-grid/src/types/set_range_options.ts +1 -1
  248. package/treb-grid/src/types/tab_bar.ts +1 -1
  249. package/treb-grid/src/types/tile.ts +1 -1
  250. package/treb-grid/src/types/update_flags.ts +1 -1
  251. package/treb-grid/src/util/fontmetrics.ts +1 -1
  252. package/treb-grid/src/util/ua.ts +1 -1
  253. package/treb-parser/src/csv-parser.ts +1 -1
  254. package/treb-parser/src/index.ts +1 -1
  255. package/treb-parser/src/md-parser.ts +1 -1
  256. package/treb-parser/src/parser-types.ts +1 -1
  257. package/treb-parser/src/parser.ts +1 -1
  258. package/treb-utils/src/event_source.ts +1 -1
  259. package/treb-utils/src/ievent_source.ts +1 -1
  260. package/treb-utils/src/index.ts +1 -1
  261. package/treb-utils/src/measurement.ts +1 -1
  262. package/treb-utils/src/scale.ts +1 -1
  263. package/treb-utils/src/serialize_html.ts +1 -1
  264. package/treb-utils/src/validate_uri.ts +1 -1
  265. package/tsproject.json +2 -3
  266. package/treb-embed/src/export-worker.ts +0 -44
@@ -0,0 +1,274 @@
1
+ import type { OneOrMany, ValElement, XsdBoolean } from "./util.js";
2
+ import type { Color } from "./sheetProperties.js";
3
+ import type { ExtensionList } from "./misc.js";
4
+ import type {
5
+ ST_BorderStyle,
6
+ ST_HorizontalAlignment,
7
+ ST_VerticalAlignment,
8
+ ST_PatternType,
9
+ ST_UnderlineValues,
10
+ ST_FontScheme,
11
+ ST_GradientType,
12
+ } from "./enums.js";
13
+
14
+ // --- Number Formats ---
15
+
16
+ export interface NumFmt {
17
+ $attributes?: {
18
+ numFmtId: number;
19
+ formatCode: string;
20
+ };
21
+ }
22
+
23
+ export interface NumFmts {
24
+ $attributes?: {
25
+ count?: number;
26
+ };
27
+ numFmt: OneOrMany<NumFmt>;
28
+ }
29
+
30
+ // --- Fonts ---
31
+
32
+ export interface Font {
33
+ name?: ValElement;
34
+ charset?: ValElement<number>;
35
+ family?: ValElement<number>;
36
+ b?: ValElement<boolean> | Record<string, never>;
37
+ i?: ValElement<boolean> | Record<string, never>;
38
+ strike?: ValElement<boolean> | Record<string, never>;
39
+ outline?: ValElement<boolean> | Record<string, never>;
40
+ shadow?: ValElement<boolean> | Record<string, never>;
41
+ condense?: ValElement<boolean> | Record<string, never>;
42
+ extend?: ValElement<boolean> | Record<string, never>;
43
+ color?: Color;
44
+ sz?: ValElement<number>;
45
+ u?: ValElement<ST_UnderlineValues> | Record<string, never>;
46
+ vertAlign?: ValElement<"superscript" | "subscript" | "baseline">;
47
+ scheme?: ValElement<ST_FontScheme>;
48
+ }
49
+
50
+ export interface Fonts {
51
+ $attributes?: {
52
+ count?: number;
53
+ };
54
+ font: OneOrMany<Font>;
55
+ }
56
+
57
+ // --- Fills ---
58
+
59
+ export interface PatternFill {
60
+ $attributes?: {
61
+ patternType?: ST_PatternType;
62
+ };
63
+ fgColor?: Color;
64
+ bgColor?: Color;
65
+ }
66
+
67
+ export interface GradientStop {
68
+ $attributes?: {
69
+ position: number;
70
+ };
71
+ color: Color;
72
+ }
73
+
74
+ export interface GradientFill {
75
+ $attributes?: {
76
+ type?: ST_GradientType;
77
+ degree?: number;
78
+ left?: number;
79
+ right?: number;
80
+ top?: number;
81
+ bottom?: number;
82
+ };
83
+ stop: OneOrMany<GradientStop>;
84
+ }
85
+
86
+ export interface Fill {
87
+ patternFill?: PatternFill;
88
+ gradientFill?: GradientFill;
89
+ }
90
+
91
+ export interface Fills {
92
+ $attributes?: {
93
+ count?: number;
94
+ };
95
+ fill: OneOrMany<Fill>;
96
+ }
97
+
98
+ // --- Borders ---
99
+
100
+ export interface BorderEdge {
101
+ $attributes?: {
102
+ style?: ST_BorderStyle;
103
+ };
104
+ color?: Color;
105
+ }
106
+
107
+ export interface Border {
108
+ $attributes?: {
109
+ diagonalUp?: XsdBoolean;
110
+ diagonalDown?: XsdBoolean;
111
+ outline?: XsdBoolean;
112
+ };
113
+ left?: BorderEdge;
114
+ right?: BorderEdge;
115
+ top?: BorderEdge;
116
+ bottom?: BorderEdge;
117
+ diagonal?: BorderEdge;
118
+ vertical?: BorderEdge;
119
+ horizontal?: BorderEdge;
120
+ }
121
+
122
+ export interface Borders {
123
+ $attributes?: {
124
+ count?: number;
125
+ };
126
+ border: OneOrMany<Border>;
127
+ }
128
+
129
+ // --- Alignment & Protection ---
130
+
131
+ export interface Alignment {
132
+ $attributes?: {
133
+ horizontal?: ST_HorizontalAlignment;
134
+ vertical?: ST_VerticalAlignment;
135
+ textRotation?: number;
136
+ wrapText?: XsdBoolean;
137
+ indent?: number;
138
+ relativeIndent?: number;
139
+ justifyLastLine?: XsdBoolean;
140
+ shrinkToFit?: XsdBoolean;
141
+ readingOrder?: number;
142
+ };
143
+ }
144
+
145
+ export interface CellProtection {
146
+ $attributes?: {
147
+ locked?: XsdBoolean;
148
+ hidden?: XsdBoolean;
149
+ };
150
+ }
151
+
152
+ // --- Cell Formats (xf) ---
153
+
154
+ export interface CellFormat {
155
+ $attributes?: {
156
+ numFmtId?: number;
157
+ fontId?: number;
158
+ fillId?: number;
159
+ borderId?: number;
160
+ xfId?: number;
161
+ quotePrefix?: XsdBoolean;
162
+ pivotButton?: XsdBoolean;
163
+ applyNumberFormat?: XsdBoolean;
164
+ applyFont?: XsdBoolean;
165
+ applyFill?: XsdBoolean;
166
+ applyBorder?: XsdBoolean;
167
+ applyAlignment?: XsdBoolean;
168
+ applyProtection?: XsdBoolean;
169
+ };
170
+ alignment?: Alignment;
171
+ protection?: CellProtection;
172
+ }
173
+
174
+ export interface CellFormats {
175
+ $attributes?: {
176
+ count?: number;
177
+ };
178
+ xf: OneOrMany<CellFormat>;
179
+ }
180
+
181
+ // --- Cell Styles ---
182
+
183
+ export interface CellStyle {
184
+ $attributes?: {
185
+ name: string;
186
+ xfId: number;
187
+ builtinId?: number;
188
+ iLevel?: number;
189
+ hidden?: XsdBoolean;
190
+ customBuiltin?: XsdBoolean;
191
+ };
192
+ }
193
+
194
+ export interface CellStyles {
195
+ $attributes?: {
196
+ count?: number;
197
+ };
198
+ cellStyle: OneOrMany<CellStyle>;
199
+ }
200
+
201
+ // --- Differential Formats (for conditional formatting) ---
202
+
203
+ export interface DifferentialFormat {
204
+ font?: Font;
205
+ numFmt?: NumFmt;
206
+ fill?: Fill;
207
+ alignment?: Alignment;
208
+ border?: Border;
209
+ protection?: CellProtection;
210
+ }
211
+
212
+ export interface DifferentialFormats {
213
+ $attributes?: {
214
+ count?: number;
215
+ };
216
+ dxf?: OneOrMany<DifferentialFormat>;
217
+ }
218
+
219
+ // --- Table Styles ---
220
+
221
+ export interface TableStyle {
222
+ $attributes?: {
223
+ name: string;
224
+ pivot?: XsdBoolean;
225
+ table?: XsdBoolean;
226
+ count?: number;
227
+ };
228
+ }
229
+
230
+ export interface TableStyles {
231
+ $attributes?: {
232
+ count?: number;
233
+ defaultTableStyle?: string;
234
+ defaultPivotStyle?: string;
235
+ };
236
+ tableStyle?: OneOrMany<TableStyle>;
237
+ }
238
+
239
+ // --- Index Color Palette ---
240
+
241
+ export interface RgbColor {
242
+ $attributes?: {
243
+ rgb: string;
244
+ };
245
+ }
246
+
247
+ export interface IndexedColors {
248
+ rgbColor: OneOrMany<RgbColor>;
249
+ }
250
+
251
+ export interface MruColors {
252
+ color: OneOrMany<Color>;
253
+ }
254
+
255
+ export interface Colors {
256
+ indexedColors?: IndexedColors;
257
+ mruColors?: MruColors;
258
+ }
259
+
260
+ // --- StyleSheet (root) ---
261
+
262
+ export interface StyleSheet {
263
+ numFmts?: NumFmts;
264
+ fonts?: Fonts;
265
+ fills?: Fills;
266
+ borders?: Borders;
267
+ cellStyleXfs?: CellFormats;
268
+ cellXfs?: CellFormats;
269
+ cellStyles?: CellStyles;
270
+ dxfs?: DifferentialFormats;
271
+ tableStyles?: TableStyles;
272
+ colors?: Colors;
273
+ extLst?: ExtensionList;
274
+ }
@@ -0,0 +1,106 @@
1
+ import type { OneOrMany, XsdBoolean } from "./util.js";
2
+ import type { AutoFilter } from "./dataFeatures.js";
3
+ import type { ExtensionList } from "./misc.js";
4
+
5
+ // --- Table Columns ---
6
+
7
+ export interface TableColumn {
8
+ $attributes?: {
9
+ id: number;
10
+ uniqueName?: string;
11
+ name: string;
12
+ totalsRowFunction?:
13
+ | "none"
14
+ | "sum"
15
+ | "min"
16
+ | "max"
17
+ | "average"
18
+ | "count"
19
+ | "countNums"
20
+ | "stdDev"
21
+ | "var"
22
+ | "custom";
23
+ totalsRowLabel?: string;
24
+ queryTableFieldId?: number;
25
+ headerRowDxfId?: number;
26
+ dataDxfId?: number;
27
+ totalsRowDxfId?: number;
28
+ headerRowCellStyle?: string;
29
+ dataCellStyle?: string;
30
+ totalsRowCellStyle?: string;
31
+ };
32
+ calculatedColumnFormula?: { $text?: string };
33
+ totalsRowFormula?: { $text?: string };
34
+ extLst?: ExtensionList;
35
+ }
36
+
37
+ export interface TableColumns {
38
+ $attributes?: {
39
+ count?: number;
40
+ };
41
+ tableColumn: OneOrMany<TableColumn>;
42
+ }
43
+
44
+ // --- Table Style Info ---
45
+
46
+ export interface TableStyleInfo {
47
+ $attributes?: {
48
+ name?: string;
49
+ showFirstColumn?: XsdBoolean;
50
+ showLastColumn?: XsdBoolean;
51
+ showRowStripes?: XsdBoolean;
52
+ showColumnStripes?: XsdBoolean;
53
+ };
54
+ }
55
+
56
+ // --- Sort & Filter ---
57
+
58
+ export interface SortCondition {
59
+ $attributes?: {
60
+ descending?: XsdBoolean;
61
+ ref: string;
62
+ };
63
+ }
64
+
65
+ export interface SortState {
66
+ $attributes?: {
67
+ ref: string;
68
+ columnSort?: XsdBoolean;
69
+ caseSensitive?: XsdBoolean;
70
+ };
71
+ sortCondition?: OneOrMany<SortCondition>;
72
+ }
73
+
74
+ // --- Table (root) ---
75
+
76
+ export interface Table {
77
+ $attributes?: {
78
+ id: number;
79
+ name: string;
80
+ displayName: string;
81
+ ref: string;
82
+ tableType?: "worksheet" | "xml" | "queryTable";
83
+ comment?: string;
84
+ headerRowCount?: number;
85
+ insertRow?: XsdBoolean;
86
+ insertRowShift?: XsdBoolean;
87
+ totalsRowCount?: number;
88
+ totalsRowShown?: XsdBoolean;
89
+ published?: XsdBoolean;
90
+ headerRowDxfId?: number;
91
+ dataDxfId?: number;
92
+ totalsRowDxfId?: number;
93
+ headerRowBorderDxfId?: number;
94
+ tableBorderDxfId?: number;
95
+ totalsRowBorderDxfId?: number;
96
+ headerRowCellStyle?: string;
97
+ dataCellStyle?: string;
98
+ totalsRowCellStyle?: string;
99
+ connectionId?: number;
100
+ };
101
+ autoFilter?: AutoFilter;
102
+ sortState?: SortState;
103
+ tableColumns: TableColumns;
104
+ tableStyleInfo?: TableStyleInfo;
105
+ extLst?: ExtensionList;
106
+ }
@@ -0,0 +1,15 @@
1
+ export type OneOrMany<T> = T | T[];
2
+
3
+ /** xsd:boolean allows "true"/"false" and "1"/"0"; the parser produces boolean or number respectively. */
4
+ export type XsdBoolean = boolean | number;
5
+
6
+ export interface TextElement {
7
+ $text?: string;
8
+ }
9
+
10
+ /** Element whose only content is a `val` attribute, e.g. `<sz val="11"/>`. */
11
+ export interface ValElement<T = string> {
12
+ $attributes?: {
13
+ val: T;
14
+ };
15
+ }
@@ -0,0 +1,165 @@
1
+ import type { OneOrMany, TextElement, XsdBoolean } from "./util.js";
2
+ import type { ExtensionList } from "./misc.js";
3
+
4
+ export interface FileVersion {
5
+ $attributes?: {
6
+ appName?: string;
7
+ lastEdited?: string;
8
+ lowestEdited?: string;
9
+ rupBuild?: string;
10
+ codeName?: string;
11
+ };
12
+ }
13
+
14
+ export interface WorkbookPr {
15
+ $attributes?: {
16
+ date1904?: XsdBoolean;
17
+ showObjects?: "all" | "placeholders" | "none";
18
+ showBorderUnselectedTables?: XsdBoolean;
19
+ filterPrivacy?: XsdBoolean;
20
+ promptedSolutions?: XsdBoolean;
21
+ showInkAnnotation?: XsdBoolean;
22
+ backupFile?: XsdBoolean;
23
+ saveExternalLinkValues?: XsdBoolean;
24
+ updateLinks?: "userSet" | "never" | "always";
25
+ codeName?: string;
26
+ hidePivotFieldList?: XsdBoolean;
27
+ showPivotChartFilter?: XsdBoolean;
28
+ allowRefreshQuery?: XsdBoolean;
29
+ publishItems?: XsdBoolean;
30
+ checkCompatibility?: XsdBoolean;
31
+ autoCompressPictures?: XsdBoolean;
32
+ refreshAllConnections?: XsdBoolean;
33
+ defaultThemeVersion?: number;
34
+ };
35
+ }
36
+
37
+ export interface WorkbookProtection {
38
+ $attributes?: {
39
+ workbookAlgorithmName?: string;
40
+ workbookHashValue?: string;
41
+ workbookSaltValue?: string;
42
+ workbookSpinCount?: number;
43
+ workbookPassword?: string;
44
+ revisionsAlgorithmName?: string;
45
+ revisionsHashValue?: string;
46
+ revisionsSaltValue?: string;
47
+ revisionsSpinCount?: number;
48
+ revisionsPassword?: string;
49
+ lockStructure?: XsdBoolean;
50
+ lockWindows?: XsdBoolean;
51
+ lockRevision?: XsdBoolean;
52
+ };
53
+ }
54
+
55
+ export interface WorkbookView {
56
+ $attributes?: {
57
+ visibility?: "visible" | "hidden" | "veryHidden";
58
+ minimized?: XsdBoolean;
59
+ showHorizontalScroll?: XsdBoolean;
60
+ showVerticalScroll?: XsdBoolean;
61
+ showSheetTabs?: XsdBoolean;
62
+ xWindow?: number;
63
+ yWindow?: number;
64
+ windowWidth?: number;
65
+ windowHeight?: number;
66
+ tabRatio?: number;
67
+ firstSheet?: number;
68
+ activeTab?: number;
69
+ autoFilterDateGrouping?: XsdBoolean;
70
+ };
71
+ }
72
+
73
+ export interface BookViews {
74
+ workbookView: OneOrMany<WorkbookView>;
75
+ }
76
+
77
+ export interface Sheet {
78
+ $attributes?: {
79
+ name: string;
80
+ sheetId: number;
81
+ id: string;
82
+ state?: "visible" | "hidden" | "veryHidden";
83
+ };
84
+ }
85
+
86
+ export interface Sheets {
87
+ sheet: OneOrMany<Sheet>;
88
+ }
89
+
90
+ export interface DefinedName extends TextElement {
91
+ $attributes?: {
92
+ name: string;
93
+ comment?: string;
94
+ customMenu?: string;
95
+ description?: string;
96
+ help?: string;
97
+ statusBar?: string;
98
+ localSheetId?: number;
99
+ hidden?: XsdBoolean;
100
+ function?: XsdBoolean;
101
+ vbProcedure?: XsdBoolean;
102
+ xlm?: XsdBoolean;
103
+ functionGroupId?: number;
104
+ shortcutKey?: string;
105
+ publishToServer?: XsdBoolean;
106
+ workbookParameter?: XsdBoolean;
107
+ };
108
+ }
109
+
110
+ export interface DefinedNames {
111
+ definedName: OneOrMany<DefinedName>;
112
+ }
113
+
114
+ export interface CalcPr {
115
+ $attributes?: {
116
+ calcId?: number;
117
+ calcMode?: "manual" | "auto" | "autoNoTable";
118
+ fullCalcOnLoad?: XsdBoolean;
119
+ refMode?: "A1" | "R1C1";
120
+ iterate?: XsdBoolean;
121
+ iterateCount?: number;
122
+ iterateDelta?: number;
123
+ fullPrecision?: XsdBoolean;
124
+ calcCompleted?: XsdBoolean;
125
+ calcOnSave?: XsdBoolean;
126
+ concurrentCalc?: XsdBoolean;
127
+ concurrentManualCount?: number;
128
+ forceFullCalc?: XsdBoolean;
129
+ };
130
+ }
131
+
132
+ export interface PivotCache {
133
+ $attributes?: {
134
+ cacheId: number;
135
+ id: string;
136
+ };
137
+ }
138
+
139
+ export interface PivotCaches {
140
+ pivotCache: OneOrMany<PivotCache>;
141
+ }
142
+
143
+ export interface ExternalReference {
144
+ $attributes?: {
145
+ id: string;
146
+ };
147
+ }
148
+
149
+ export interface ExternalReferences {
150
+ externalReference: OneOrMany<ExternalReference>;
151
+ }
152
+
153
+ export interface Workbook {
154
+ sheets: Sheets;
155
+
156
+ fileVersion?: FileVersion;
157
+ workbookPr?: WorkbookPr;
158
+ workbookProtection?: WorkbookProtection;
159
+ bookViews?: BookViews;
160
+ definedNames?: DefinedNames;
161
+ calcPr?: CalcPr;
162
+ pivotCaches?: PivotCaches;
163
+ externalReferences?: ExternalReferences;
164
+ extLst?: ExtensionList;
165
+ }
@@ -0,0 +1,60 @@
1
+ import type { OneOrMany } from "./util.js";
2
+ import type { SheetData } from "./sheetData.js";
3
+ import type { SheetViews } from "./sheetViews.js";
4
+ import type { Cols } from "./columns.js";
5
+ import type {
6
+ SheetPr,
7
+ SheetDimension,
8
+ SheetFormatPr,
9
+ SheetProtection,
10
+ } from "./sheetProperties.js";
11
+ import type {
12
+ PageMargins,
13
+ PageSetup,
14
+ PrintOptions,
15
+ HeaderFooter,
16
+ PageBreak,
17
+ } from "./pageLayout.js";
18
+ import type {
19
+ MergeCells,
20
+ ConditionalFormatting,
21
+ DataValidations,
22
+ AutoFilter,
23
+ SortState,
24
+ Hyperlinks,
25
+ X14ConditionalFormattings,
26
+ } from "./dataFeatures.js";
27
+ import type { Drawing, TableParts, Extension, ExtensionList } from "./misc.js";
28
+ import type { SparklineGroups } from "./sparkline.js";
29
+
30
+ export interface WorksheetExtension extends Extension {
31
+ sparklineGroups?: SparklineGroups;
32
+ conditionalFormattings?: X14ConditionalFormattings;
33
+ }
34
+
35
+ export interface Worksheet {
36
+ sheetData: SheetData;
37
+
38
+ sheetPr?: SheetPr;
39
+ dimension?: SheetDimension;
40
+ sheetViews?: SheetViews;
41
+ sheetFormatPr?: SheetFormatPr;
42
+ sheetProtection?: SheetProtection;
43
+ autoFilter?: AutoFilter;
44
+ sortState?: SortState;
45
+ mergeCells?: MergeCells;
46
+ dataValidations?: DataValidations;
47
+ hyperlinks?: Hyperlinks;
48
+ printOptions?: PrintOptions;
49
+ pageMargins?: PageMargins;
50
+ pageSetup?: PageSetup;
51
+ headerFooter?: HeaderFooter;
52
+ rowBreaks?: PageBreak;
53
+ colBreaks?: PageBreak;
54
+ drawing?: Drawing;
55
+ tableParts?: TableParts;
56
+ extLst?: ExtensionList<WorksheetExtension>;
57
+
58
+ cols?: OneOrMany<Cols>;
59
+ conditionalFormatting?: OneOrMany<ConditionalFormatting>;
60
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trebco/treb",
3
- "version": "32.13.2",
3
+ "version": "36.1.2",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "homepage": "https://treb.app",
6
6
  "repository": {
@@ -11,16 +11,18 @@
11
11
  "types": "dist/treb.d.ts",
12
12
  "type": "module",
13
13
  "devDependencies": {
14
- "@types/html-minifier": "^4.0.5",
15
- "@types/node": "^24.3.1",
14
+ "@types/html-minifier": "^4.0.6",
15
+ "@types/node": "^25.5.0",
16
16
  "@types/uzip": "^0.20201231.2",
17
17
  "base64-js": "^1.5.1",
18
- "cssnano": "^7.1.1",
19
- "esbuild": "^0.25.9",
20
- "eslint": "^9.35.0",
21
- "fast-xml-parser": "^5.2.5",
18
+ "cssnano": "^7.1.3",
19
+ "esbuild": "^0.27.4",
20
+ "eslint": "^10.1.0",
21
+ "fast-xml-parser": "^5.3.2",
22
22
  "html-minifier-terser": "^7.2.0",
23
- "sass": "^1.92.1",
23
+ "ooxml-types": "file:ooxml-types",
24
+ "postcss": "^8.5.8",
25
+ "sass": "^1.98.0",
24
26
  "treb-base-types": "file:treb-base-types",
25
27
  "treb-calculator": "file:treb-calculator",
26
28
  "treb-charts": "file:treb-charts",
@@ -32,9 +34,9 @@
32
34
  "treb-utils": "file:treb-utils",
33
35
  "ts-node": "^10.9.2",
34
36
  "tslib": "^2.8.1",
35
- "tsx": "^4.20.5",
36
- "typescript": "^5.9.2",
37
- "typescript-eslint": "^8.43.0",
37
+ "tsx": "^4.20.6",
38
+ "typescript": "^6.0.2",
39
+ "typescript-eslint": "^8.57.2",
38
40
  "uzip": "^0.20201231.0"
39
41
  },
40
42
  "scripts": {
@@ -14,7 +14,7 @@
14
14
  * You should have received a copy of the GNU General Public License along
15
15
  * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
16
  *
17
- * Copyright 2022-2025 trebco, llc.
17
+ * Copyright 2022-2026 trebco, llc.
18
18
  * info@treb.app
19
19
  *
20
20
  */
@@ -14,7 +14,7 @@
14
14
  * You should have received a copy of the GNU General Public License along
15
15
  * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
16
  *
17
- * Copyright 2022-2025 trebco, llc.
17
+ * Copyright 2022-2026 trebco, llc.
18
18
  * info@treb.app
19
19
  *
20
20
  */
@@ -14,7 +14,7 @@
14
14
  * You should have received a copy of the GNU General Public License along
15
15
  * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
16
  *
17
- * Copyright 2022-2025 trebco, llc.
17
+ * Copyright 2022-2026 trebco, llc.
18
18
  * info@treb.app
19
19
  *
20
20
  */
@@ -14,7 +14,7 @@
14
14
  * You should have received a copy of the GNU General Public License along
15
15
  * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
16
  *
17
- * Copyright 2022-2025 trebco, llc.
17
+ * Copyright 2022-2026 trebco, llc.
18
18
  * info@treb.app
19
19
  *
20
20
  */