@trebco/treb 37.0.0 → 37.0.1

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 (528) hide show
  1. package/build/package.json +119 -0
  2. package/build/treb-base-types/src/api_types.d.ts +11 -0
  3. package/build/treb-base-types/src/api_types.js +22 -0
  4. package/build/treb-base-types/src/api_types.js.map +1 -0
  5. package/build/treb-base-types/src/area-utils.d.ts +9 -0
  6. package/build/treb-base-types/src/area-utils.js +50 -0
  7. package/build/treb-base-types/src/area-utils.js.map +1 -0
  8. package/build/treb-base-types/src/area.d.ts +182 -0
  9. package/build/treb-base-types/src/area.js +715 -0
  10. package/build/treb-base-types/src/area.js.map +1 -0
  11. package/build/treb-base-types/src/basic_types.d.ts +20 -0
  12. package/build/treb-base-types/src/basic_types.js +22 -0
  13. package/build/treb-base-types/src/basic_types.js.map +1 -0
  14. package/build/treb-base-types/src/cell.d.ts +167 -0
  15. package/build/treb-base-types/src/cell.js +432 -0
  16. package/build/treb-base-types/src/cell.js.map +1 -0
  17. package/build/treb-base-types/src/cells.d.ts +251 -0
  18. package/build/treb-base-types/src/cells.js +1136 -0
  19. package/build/treb-base-types/src/cells.js.map +1 -0
  20. package/build/treb-base-types/src/color.d.ts +35 -0
  21. package/build/treb-base-types/src/color.js +162 -0
  22. package/build/treb-base-types/src/color.js.map +1 -0
  23. package/build/treb-base-types/src/dom-utilities.d.ts +70 -0
  24. package/build/treb-base-types/src/dom-utilities.js +144 -0
  25. package/build/treb-base-types/src/dom-utilities.js.map +1 -0
  26. package/build/treb-base-types/src/evaluate-options.d.ts +35 -0
  27. package/build/treb-base-types/src/evaluate-options.js +22 -0
  28. package/build/treb-base-types/src/evaluate-options.js.map +1 -0
  29. package/build/treb-base-types/src/font-stack.d.ts +37 -0
  30. package/build/treb-base-types/src/font-stack.js +93 -0
  31. package/build/treb-base-types/src/font-stack.js.map +1 -0
  32. package/build/treb-base-types/src/gradient.d.ts +18 -0
  33. package/build/treb-base-types/src/gradient.js +86 -0
  34. package/build/treb-base-types/src/gradient.js.map +1 -0
  35. package/build/treb-base-types/src/import.d.ts +48 -0
  36. package/build/treb-base-types/src/import.js +22 -0
  37. package/build/treb-base-types/src/import.js.map +1 -0
  38. package/build/treb-base-types/src/index-standalone.d.ts +6 -0
  39. package/build/treb-base-types/src/index-standalone.js +27 -0
  40. package/build/treb-base-types/src/index-standalone.js.map +1 -0
  41. package/build/treb-base-types/src/index.d.ts +22 -0
  42. package/build/treb-base-types/src/index.js +45 -0
  43. package/build/treb-base-types/src/index.js.map +1 -0
  44. package/build/treb-base-types/src/layout.d.ts +22 -0
  45. package/build/treb-base-types/src/layout.js +22 -0
  46. package/build/treb-base-types/src/layout.js.map +1 -0
  47. package/build/treb-base-types/src/localization.d.ts +37 -0
  48. package/build/treb-base-types/src/localization.js +157 -0
  49. package/build/treb-base-types/src/localization.js.map +1 -0
  50. package/build/treb-base-types/src/rectangle.d.ts +51 -0
  51. package/build/treb-base-types/src/rectangle.js +123 -0
  52. package/build/treb-base-types/src/rectangle.js.map +1 -0
  53. package/build/treb-base-types/src/render_text.d.ts +34 -0
  54. package/build/treb-base-types/src/render_text.js +22 -0
  55. package/build/treb-base-types/src/render_text.js.map +1 -0
  56. package/build/treb-base-types/src/style.d.ts +214 -0
  57. package/build/treb-base-types/src/style.js +373 -0
  58. package/build/treb-base-types/src/style.js.map +1 -0
  59. package/build/treb-base-types/src/table.d.ts +58 -0
  60. package/build/treb-base-types/src/table.js +27 -0
  61. package/build/treb-base-types/src/table.js.map +1 -0
  62. package/build/treb-base-types/src/text_part.d.ts +26 -0
  63. package/build/treb-base-types/src/text_part.js +47 -0
  64. package/build/treb-base-types/src/text_part.js.map +1 -0
  65. package/build/treb-base-types/src/theme.d.ts +120 -0
  66. package/build/treb-base-types/src/theme.js +460 -0
  67. package/build/treb-base-types/src/theme.js.map +1 -0
  68. package/build/treb-base-types/src/union.d.ts +73 -0
  69. package/build/treb-base-types/src/union.js +61 -0
  70. package/build/treb-base-types/src/union.js.map +1 -0
  71. package/build/treb-base-types/src/value-type.d.ts +86 -0
  72. package/build/treb-base-types/src/value-type.js +168 -0
  73. package/build/treb-base-types/src/value-type.js.map +1 -0
  74. package/build/treb-base-types/src/worker-proxy.d.ts +95 -0
  75. package/build/treb-base-types/src/worker-proxy.js +221 -0
  76. package/build/treb-base-types/src/worker-proxy.js.map +1 -0
  77. package/build/treb-calculator/src/calculator.d.ts +249 -0
  78. package/build/treb-calculator/src/calculator.js +2755 -0
  79. package/build/treb-calculator/src/calculator.js.map +1 -0
  80. package/build/treb-calculator/src/complex-math.d.ts +75 -0
  81. package/build/treb-calculator/src/complex-math.js +559 -0
  82. package/build/treb-calculator/src/complex-math.js.map +1 -0
  83. package/build/treb-calculator/src/dag/array-vertex.d.ts +71 -0
  84. package/build/treb-calculator/src/dag/array-vertex.js +156 -0
  85. package/build/treb-calculator/src/dag/array-vertex.js.map +1 -0
  86. package/build/treb-calculator/src/dag/calculation_leaf_vertex.d.ts +48 -0
  87. package/build/treb-calculator/src/dag/calculation_leaf_vertex.js +84 -0
  88. package/build/treb-calculator/src/dag/calculation_leaf_vertex.js.map +1 -0
  89. package/build/treb-calculator/src/dag/graph.d.ts +134 -0
  90. package/build/treb-calculator/src/dag/graph.js +842 -0
  91. package/build/treb-calculator/src/dag/graph.js.map +1 -0
  92. package/build/treb-calculator/src/dag/spreadsheet_vertex.d.ts +58 -0
  93. package/build/treb-calculator/src/dag/spreadsheet_vertex.js +232 -0
  94. package/build/treb-calculator/src/dag/spreadsheet_vertex.js.map +1 -0
  95. package/build/treb-calculator/src/dag/spreadsheet_vertex_base.d.ts +20 -0
  96. package/build/treb-calculator/src/dag/spreadsheet_vertex_base.js +25 -0
  97. package/build/treb-calculator/src/dag/spreadsheet_vertex_base.js.map +1 -0
  98. package/build/treb-calculator/src/dag/state_leaf_vertex.d.ts +43 -0
  99. package/build/treb-calculator/src/dag/state_leaf_vertex.js +81 -0
  100. package/build/treb-calculator/src/dag/state_leaf_vertex.js.map +1 -0
  101. package/build/treb-calculator/src/dag/vertex.d.ts +71 -0
  102. package/build/treb-calculator/src/dag/vertex.js +274 -0
  103. package/build/treb-calculator/src/dag/vertex.js.map +1 -0
  104. package/build/treb-calculator/src/descriptors.d.ts +189 -0
  105. package/build/treb-calculator/src/descriptors.js +22 -0
  106. package/build/treb-calculator/src/descriptors.js.map +1 -0
  107. package/build/treb-calculator/src/expression-calculator.d.ts +127 -0
  108. package/build/treb-calculator/src/expression-calculator.js +1033 -0
  109. package/build/treb-calculator/src/expression-calculator.js.map +1 -0
  110. package/build/treb-calculator/src/function-error.d.ts +35 -0
  111. package/build/treb-calculator/src/function-error.js +85 -0
  112. package/build/treb-calculator/src/function-error.js.map +1 -0
  113. package/build/treb-calculator/src/function-library.d.ts +22 -0
  114. package/build/treb-calculator/src/function-library.js +96 -0
  115. package/build/treb-calculator/src/function-library.js.map +1 -0
  116. package/build/treb-calculator/src/functions/base-functions.d.ts +7 -0
  117. package/build/treb-calculator/src/functions/base-functions.js +2611 -0
  118. package/build/treb-calculator/src/functions/base-functions.js.map +1 -0
  119. package/build/treb-calculator/src/functions/beta.d.ts +17 -0
  120. package/build/treb-calculator/src/functions/beta.js +201 -0
  121. package/build/treb-calculator/src/functions/beta.js.map +1 -0
  122. package/build/treb-calculator/src/functions/checkbox.d.ts +3 -0
  123. package/build/treb-calculator/src/functions/checkbox.js +128 -0
  124. package/build/treb-calculator/src/functions/checkbox.js.map +1 -0
  125. package/build/treb-calculator/src/functions/complex-functions.d.ts +2 -0
  126. package/build/treb-calculator/src/functions/complex-functions.js +217 -0
  127. package/build/treb-calculator/src/functions/complex-functions.js.map +1 -0
  128. package/build/treb-calculator/src/functions/date-utils.d.ts +3 -0
  129. package/build/treb-calculator/src/functions/date-utils.js +59 -0
  130. package/build/treb-calculator/src/functions/date-utils.js.map +1 -0
  131. package/build/treb-calculator/src/functions/finance-functions.d.ts +2 -0
  132. package/build/treb-calculator/src/functions/finance-functions.js +547 -0
  133. package/build/treb-calculator/src/functions/finance-functions.js.map +1 -0
  134. package/build/treb-calculator/src/functions/fp.d.ts +2 -0
  135. package/build/treb-calculator/src/functions/fp.js +463 -0
  136. package/build/treb-calculator/src/functions/fp.js.map +1 -0
  137. package/build/treb-calculator/src/functions/function-utilities.d.ts +2 -0
  138. package/build/treb-calculator/src/functions/function-utilities.js +36 -0
  139. package/build/treb-calculator/src/functions/function-utilities.js.map +1 -0
  140. package/build/treb-calculator/src/functions/gamma.d.ts +20 -0
  141. package/build/treb-calculator/src/functions/gamma.js +142 -0
  142. package/build/treb-calculator/src/functions/gamma.js.map +1 -0
  143. package/build/treb-calculator/src/functions/information-functions.d.ts +2 -0
  144. package/build/treb-calculator/src/functions/information-functions.js +71 -0
  145. package/build/treb-calculator/src/functions/information-functions.js.map +1 -0
  146. package/build/treb-calculator/src/functions/lambda-functions.d.ts +2 -0
  147. package/build/treb-calculator/src/functions/lambda-functions.js +85 -0
  148. package/build/treb-calculator/src/functions/lambda-functions.js.map +1 -0
  149. package/build/treb-calculator/src/functions/matrix-functions.d.ts +2 -0
  150. package/build/treb-calculator/src/functions/matrix-functions.js +144 -0
  151. package/build/treb-calculator/src/functions/matrix-functions.js.map +1 -0
  152. package/build/treb-calculator/src/functions/normal.d.ts +2 -0
  153. package/build/treb-calculator/src/functions/normal.js +32 -0
  154. package/build/treb-calculator/src/functions/normal.js.map +1 -0
  155. package/build/treb-calculator/src/functions/regex-functions.d.ts +2 -0
  156. package/build/treb-calculator/src/functions/regex-functions.js +188 -0
  157. package/build/treb-calculator/src/functions/regex-functions.js.map +1 -0
  158. package/build/treb-calculator/src/functions/sparkline.d.ts +37 -0
  159. package/build/treb-calculator/src/functions/sparkline.js +264 -0
  160. package/build/treb-calculator/src/functions/sparkline.js.map +1 -0
  161. package/build/treb-calculator/src/functions/statistics-functions.d.ts +6 -0
  162. package/build/treb-calculator/src/functions/statistics-functions.js +989 -0
  163. package/build/treb-calculator/src/functions/statistics-functions.js.map +1 -0
  164. package/build/treb-calculator/src/functions/students-t.d.ts +3 -0
  165. package/build/treb-calculator/src/functions/students-t.js +64 -0
  166. package/build/treb-calculator/src/functions/students-t.js.map +1 -0
  167. package/build/treb-calculator/src/functions/text-functions.d.ts +3 -0
  168. package/build/treb-calculator/src/functions/text-functions.js +320 -0
  169. package/build/treb-calculator/src/functions/text-functions.js.map +1 -0
  170. package/build/treb-calculator/src/index.d.ts +2 -0
  171. package/build/treb-calculator/src/index.js +22 -0
  172. package/build/treb-calculator/src/index.js.map +1 -0
  173. package/build/treb-calculator/src/notifier-types.d.ts +26 -0
  174. package/build/treb-calculator/src/notifier-types.js +22 -0
  175. package/build/treb-calculator/src/notifier-types.js.map +1 -0
  176. package/build/treb-calculator/src/primitives.d.ts +15 -0
  177. package/build/treb-calculator/src/primitives.js +398 -0
  178. package/build/treb-calculator/src/primitives.js.map +1 -0
  179. package/build/treb-calculator/src/utilities.d.ts +68 -0
  180. package/build/treb-calculator/src/utilities.js +324 -0
  181. package/build/treb-calculator/src/utilities.js.map +1 -0
  182. package/build/treb-charts/src/chart-functions.d.ts +8 -0
  183. package/build/treb-charts/src/chart-functions.js +209 -0
  184. package/build/treb-charts/src/chart-functions.js.map +1 -0
  185. package/build/treb-charts/src/chart-types.d.ts +233 -0
  186. package/build/treb-charts/src/chart-types.js +57 -0
  187. package/build/treb-charts/src/chart-types.js.map +1 -0
  188. package/build/treb-charts/src/chart-utils.d.ts +106 -0
  189. package/build/treb-charts/src/chart-utils.js +1060 -0
  190. package/build/treb-charts/src/chart-utils.js.map +1 -0
  191. package/build/treb-charts/src/chart.d.ts +23 -0
  192. package/build/treb-charts/src/chart.js +94 -0
  193. package/build/treb-charts/src/chart.js.map +1 -0
  194. package/build/treb-charts/src/default-chart-renderer.d.ts +16 -0
  195. package/build/treb-charts/src/default-chart-renderer.js +533 -0
  196. package/build/treb-charts/src/default-chart-renderer.js.map +1 -0
  197. package/build/treb-charts/src/index.d.ts +5 -0
  198. package/build/treb-charts/src/index.js +24 -0
  199. package/build/treb-charts/src/index.js.map +1 -0
  200. package/build/treb-charts/src/main.d.ts +1 -0
  201. package/build/treb-charts/src/main.js +34 -0
  202. package/build/treb-charts/src/main.js.map +1 -0
  203. package/build/treb-charts/src/quicksort.d.ts +1 -0
  204. package/build/treb-charts/src/quicksort.js +49 -0
  205. package/build/treb-charts/src/quicksort.js.map +1 -0
  206. package/build/treb-charts/src/rectangle.d.ts +18 -0
  207. package/build/treb-charts/src/rectangle.js +41 -0
  208. package/build/treb-charts/src/rectangle.js.map +1 -0
  209. package/build/treb-charts/src/renderer-type.d.ts +24 -0
  210. package/build/treb-charts/src/renderer-type.js +22 -0
  211. package/build/treb-charts/src/renderer-type.js.map +1 -0
  212. package/build/treb-charts/src/renderer.d.ts +127 -0
  213. package/build/treb-charts/src/renderer.js +1518 -0
  214. package/build/treb-charts/src/renderer.js.map +1 -0
  215. package/build/treb-charts/src/util.d.ts +18 -0
  216. package/build/treb-charts/src/util.js +71 -0
  217. package/build/treb-charts/src/util.js.map +1 -0
  218. package/build/treb-data-model/src/annotation.d.ts +167 -0
  219. package/build/treb-data-model/src/annotation.js +120 -0
  220. package/build/treb-data-model/src/annotation.js.map +1 -0
  221. package/build/treb-data-model/src/conditional_format.d.ts +155 -0
  222. package/build/treb-data-model/src/conditional_format.js +62 -0
  223. package/build/treb-data-model/src/conditional_format.js.map +1 -0
  224. package/build/treb-data-model/src/data-validation.d.ts +28 -0
  225. package/build/treb-data-model/src/data-validation.js +22 -0
  226. package/build/treb-data-model/src/data-validation.js.map +1 -0
  227. package/build/treb-data-model/src/data_model.d.ts +173 -0
  228. package/build/treb-data-model/src/data_model.js +637 -0
  229. package/build/treb-data-model/src/data_model.js.map +1 -0
  230. package/build/treb-data-model/src/index.d.ts +13 -0
  231. package/build/treb-data-model/src/index.js +28 -0
  232. package/build/treb-data-model/src/index.js.map +1 -0
  233. package/build/treb-data-model/src/language-model.d.ts +22 -0
  234. package/build/treb-data-model/src/language-model.js +22 -0
  235. package/build/treb-data-model/src/language-model.js.map +1 -0
  236. package/build/treb-data-model/src/named.d.ts +124 -0
  237. package/build/treb-data-model/src/named.js +372 -0
  238. package/build/treb-data-model/src/named.js.map +1 -0
  239. package/build/treb-data-model/src/serialize_options.d.ts +49 -0
  240. package/build/treb-data-model/src/serialize_options.js +22 -0
  241. package/build/treb-data-model/src/serialize_options.js.map +1 -0
  242. package/build/treb-data-model/src/sheet.d.ts +499 -0
  243. package/build/treb-data-model/src/sheet.js +2904 -0
  244. package/build/treb-data-model/src/sheet.js.map +1 -0
  245. package/build/treb-data-model/src/sheet_collection.d.ts +58 -0
  246. package/build/treb-data-model/src/sheet_collection.js +112 -0
  247. package/build/treb-data-model/src/sheet_collection.js.map +1 -0
  248. package/build/treb-data-model/src/sheet_selection.d.ts +42 -0
  249. package/build/treb-data-model/src/sheet_selection.js +39 -0
  250. package/build/treb-data-model/src/sheet_selection.js.map +1 -0
  251. package/build/treb-data-model/src/sheet_types.d.ts +104 -0
  252. package/build/treb-data-model/src/sheet_types.js +22 -0
  253. package/build/treb-data-model/src/sheet_types.js.map +1 -0
  254. package/build/treb-data-model/src/types.d.ts +59 -0
  255. package/build/treb-data-model/src/types.js +22 -0
  256. package/build/treb-data-model/src/types.js.map +1 -0
  257. package/build/treb-embed/src/custom-element/spreadsheet-constructor.d.ts +75 -0
  258. package/build/treb-embed/src/custom-element/spreadsheet-constructor.js +1144 -0
  259. package/build/treb-embed/src/custom-element/spreadsheet-constructor.js.map +1 -0
  260. package/build/treb-embed/src/custom-element/treb-global.d.ts +36 -0
  261. package/build/treb-embed/src/custom-element/treb-global.js +64 -0
  262. package/build/treb-embed/src/custom-element/treb-global.js.map +1 -0
  263. package/build/treb-embed/src/custom-element/treb-spreadsheet-element.d.ts +1 -0
  264. package/build/treb-embed/src/custom-element/treb-spreadsheet-element.js +61 -0
  265. package/build/treb-embed/src/custom-element/treb-spreadsheet-element.js.map +1 -0
  266. package/build/treb-embed/src/embedded-spreadsheet.d.ts +1358 -0
  267. package/build/treb-embed/src/embedded-spreadsheet.js +5205 -0
  268. package/build/treb-embed/src/embedded-spreadsheet.js.map +1 -0
  269. package/build/treb-embed/src/index.d.ts +12 -0
  270. package/build/treb-embed/src/index.js +34 -0
  271. package/build/treb-embed/src/index.js.map +1 -0
  272. package/build/treb-embed/src/options.d.ts +266 -0
  273. package/build/treb-embed/src/options.js +56 -0
  274. package/build/treb-embed/src/options.js.map +1 -0
  275. package/build/treb-embed/src/plugin.d.ts +9 -0
  276. package/build/treb-embed/src/plugin.js +22 -0
  277. package/build/treb-embed/src/plugin.js.map +1 -0
  278. package/build/treb-embed/src/progress-dialog.d.ts +49 -0
  279. package/build/treb-embed/src/progress-dialog.js +178 -0
  280. package/build/treb-embed/src/progress-dialog.js.map +1 -0
  281. package/build/treb-embed/src/selection-state.d.ts +15 -0
  282. package/build/treb-embed/src/selection-state.js +22 -0
  283. package/build/treb-embed/src/selection-state.js.map +1 -0
  284. package/build/treb-embed/src/spinner.d.ts +8 -0
  285. package/build/treb-embed/src/spinner.js +40 -0
  286. package/build/treb-embed/src/spinner.js.map +1 -0
  287. package/build/treb-embed/src/toolbar-message.d.ts +72 -0
  288. package/build/treb-embed/src/toolbar-message.js +22 -0
  289. package/build/treb-embed/src/toolbar-message.js.map +1 -0
  290. package/build/treb-embed/src/types.d.ts +185 -0
  291. package/build/treb-embed/src/types.js +45 -0
  292. package/build/treb-embed/src/types.js.map +1 -0
  293. package/build/treb-embed/tsconfig.tsbuildinfo +1 -0
  294. package/build/treb-export/src/address-type.d.ts +34 -0
  295. package/build/treb-export/src/address-type.js +53 -0
  296. package/build/treb-export/src/address-type.js.map +1 -0
  297. package/build/treb-export/src/base-template.d.ts +1 -0
  298. package/build/treb-export/src/base-template.js +22 -0
  299. package/build/treb-export/src/base-template.js.map +1 -0
  300. package/build/treb-export/src/column-width.d.ts +2 -0
  301. package/build/treb-export/src/column-width.js +80 -0
  302. package/build/treb-export/src/column-width.js.map +1 -0
  303. package/build/treb-export/src/drawing/bubble-chart-template.d.ts +514 -0
  304. package/build/treb-export/src/drawing/bubble-chart-template.js +544 -0
  305. package/build/treb-export/src/drawing/bubble-chart-template.js.map +1 -0
  306. package/build/treb-export/src/drawing/chart-template-components2.d.ts +365 -0
  307. package/build/treb-export/src/drawing/chart-template-components2.js +386 -0
  308. package/build/treb-export/src/drawing/chart-template-components2.js.map +1 -0
  309. package/build/treb-export/src/drawing/chart.d.ts +26 -0
  310. package/build/treb-export/src/drawing/chart.js +247 -0
  311. package/build/treb-export/src/drawing/chart.js.map +1 -0
  312. package/build/treb-export/src/drawing/column-chart-template2.d.ts +490 -0
  313. package/build/treb-export/src/drawing/column-chart-template2.js +518 -0
  314. package/build/treb-export/src/drawing/column-chart-template2.js.map +1 -0
  315. package/build/treb-export/src/drawing/donut-chart-template2.d.ts +272 -0
  316. package/build/treb-export/src/drawing/donut-chart-template2.js +293 -0
  317. package/build/treb-export/src/drawing/donut-chart-template2.js.map +1 -0
  318. package/build/treb-export/src/drawing/drawing.d.ts +49 -0
  319. package/build/treb-export/src/drawing/drawing.js +193 -0
  320. package/build/treb-export/src/drawing/drawing.js.map +1 -0
  321. package/build/treb-export/src/drawing/embedded-image.d.ts +12 -0
  322. package/build/treb-export/src/drawing/embedded-image.js +54 -0
  323. package/build/treb-export/src/drawing/embedded-image.js.map +1 -0
  324. package/build/treb-export/src/drawing/scatter-chart-template2.d.ts +520 -0
  325. package/build/treb-export/src/drawing/scatter-chart-template2.js +551 -0
  326. package/build/treb-export/src/drawing/scatter-chart-template2.js.map +1 -0
  327. package/build/treb-export/src/export.d.ts +72 -0
  328. package/build/treb-export/src/export.js +2039 -0
  329. package/build/treb-export/src/export.js.map +1 -0
  330. package/build/treb-export/src/import-export-messages.d.ts +31 -0
  331. package/build/treb-export/src/import-export-messages.js +22 -0
  332. package/build/treb-export/src/import-export-messages.js.map +1 -0
  333. package/build/treb-export/src/import.d.ts +33 -0
  334. package/build/treb-export/src/import.js +1258 -0
  335. package/build/treb-export/src/import.js.map +1 -0
  336. package/build/treb-export/src/index.worker.d.ts +1 -0
  337. package/build/treb-export/src/index.worker.js +93 -0
  338. package/build/treb-export/src/index.worker.js.map +1 -0
  339. package/build/treb-export/src/metadata.d.ts +51 -0
  340. package/build/treb-export/src/metadata.js +153 -0
  341. package/build/treb-export/src/metadata.js.map +1 -0
  342. package/build/treb-export/src/ooxml.d.ts +7 -0
  343. package/build/treb-export/src/ooxml.js +41 -0
  344. package/build/treb-export/src/ooxml.js.map +1 -0
  345. package/build/treb-export/src/relationship.d.ts +8 -0
  346. package/build/treb-export/src/relationship.js +27 -0
  347. package/build/treb-export/src/relationship.js.map +1 -0
  348. package/build/treb-export/src/shared-strings.d.ts +11 -0
  349. package/build/treb-export/src/shared-strings.js +105 -0
  350. package/build/treb-export/src/shared-strings.js.map +1 -0
  351. package/build/treb-export/src/template-2.d.ts +1 -0
  352. package/build/treb-export/src/template-2.js +22 -0
  353. package/build/treb-export/src/template-2.js.map +1 -0
  354. package/build/treb-export/src/unescape_xml.d.ts +1 -0
  355. package/build/treb-export/src/unescape_xml.js +61 -0
  356. package/build/treb-export/src/unescape_xml.js.map +1 -0
  357. package/build/treb-export/src/workbook-sheet.d.ts +75 -0
  358. package/build/treb-export/src/workbook-sheet.js +128 -0
  359. package/build/treb-export/src/workbook-sheet.js.map +1 -0
  360. package/build/treb-export/src/workbook-style.d.ts +110 -0
  361. package/build/treb-export/src/workbook-style.js +1134 -0
  362. package/build/treb-export/src/workbook-style.js.map +1 -0
  363. package/build/treb-export/src/workbook-theme.d.ts +13 -0
  364. package/build/treb-export/src/workbook-theme.js +85 -0
  365. package/build/treb-export/src/workbook-theme.js.map +1 -0
  366. package/build/treb-export/src/workbook.d.ts +123 -0
  367. package/build/treb-export/src/workbook.js +644 -0
  368. package/build/treb-export/src/workbook.js.map +1 -0
  369. package/build/treb-export/src/xml-test.d.ts +9 -0
  370. package/build/treb-export/src/xml-test.js +52 -0
  371. package/build/treb-export/src/xml-test.js.map +1 -0
  372. package/build/treb-export/src/xml-utils.d.ts +76 -0
  373. package/build/treb-export/src/xml-utils.js +223 -0
  374. package/build/treb-export/src/xml-utils.js.map +1 -0
  375. package/build/treb-export/src/zip-wrapper.d.ts +22 -0
  376. package/build/treb-export/src/zip-wrapper.js +93 -0
  377. package/build/treb-export/src/zip-wrapper.js.map +1 -0
  378. package/build/treb-format/src/format.d.ts +130 -0
  379. package/build/treb-format/src/format.js +805 -0
  380. package/build/treb-format/src/format.js.map +1 -0
  381. package/build/treb-format/src/format_cache.d.ts +55 -0
  382. package/build/treb-format/src/format_cache.js +166 -0
  383. package/build/treb-format/src/format_cache.js.map +1 -0
  384. package/build/treb-format/src/format_parser.d.ts +70 -0
  385. package/build/treb-format/src/format_parser.js +618 -0
  386. package/build/treb-format/src/format_parser.js.map +1 -0
  387. package/build/treb-format/src/index.d.ts +4 -0
  388. package/build/treb-format/src/index.js +25 -0
  389. package/build/treb-format/src/index.js.map +1 -0
  390. package/build/treb-format/src/number_format_section.d.ts +58 -0
  391. package/build/treb-format/src/number_format_section.js +78 -0
  392. package/build/treb-format/src/number_format_section.js.map +1 -0
  393. package/build/treb-format/src/value_parser.d.ts +48 -0
  394. package/build/treb-format/src/value_parser.js +244 -0
  395. package/build/treb-format/src/value_parser.js.map +1 -0
  396. package/build/treb-grid/src/editors/autocomplete.d.ts +39 -0
  397. package/build/treb-grid/src/editors/autocomplete.js +316 -0
  398. package/build/treb-grid/src/editors/autocomplete.js.map +1 -0
  399. package/build/treb-grid/src/editors/autocomplete_matcher.d.ts +74 -0
  400. package/build/treb-grid/src/editors/autocomplete_matcher.js +212 -0
  401. package/build/treb-grid/src/editors/autocomplete_matcher.js.map +1 -0
  402. package/build/treb-grid/src/editors/editor.d.ts +214 -0
  403. package/build/treb-grid/src/editors/editor.js +879 -0
  404. package/build/treb-grid/src/editors/editor.js.map +1 -0
  405. package/build/treb-grid/src/editors/external_editor.d.ts +11 -0
  406. package/build/treb-grid/src/editors/external_editor.js +118 -0
  407. package/build/treb-grid/src/editors/external_editor.js.map +1 -0
  408. package/build/treb-grid/src/editors/formula_bar.d.ts +85 -0
  409. package/build/treb-grid/src/editors/formula_bar.js +444 -0
  410. package/build/treb-grid/src/editors/formula_bar.js.map +1 -0
  411. package/build/treb-grid/src/editors/overlay_editor.d.ts +85 -0
  412. package/build/treb-grid/src/editors/overlay_editor.js +353 -0
  413. package/build/treb-grid/src/editors/overlay_editor.js.map +1 -0
  414. package/build/treb-grid/src/index.d.ts +12 -0
  415. package/build/treb-grid/src/index.js +28 -0
  416. package/build/treb-grid/src/index.js.map +1 -0
  417. package/build/treb-grid/src/layout/base_layout.d.ts +346 -0
  418. package/build/treb-grid/src/layout/base_layout.js +2050 -0
  419. package/build/treb-grid/src/layout/base_layout.js.map +1 -0
  420. package/build/treb-grid/src/layout/grid_layout.d.ts +19 -0
  421. package/build/treb-grid/src/layout/grid_layout.js +235 -0
  422. package/build/treb-grid/src/layout/grid_layout.js.map +1 -0
  423. package/build/treb-grid/src/layout/mock-layout.d.ts +10 -0
  424. package/build/treb-grid/src/layout/mock-layout.js +37 -0
  425. package/build/treb-grid/src/layout/mock-layout.js.map +1 -0
  426. package/build/treb-grid/src/render/selection-renderer.d.ts +97 -0
  427. package/build/treb-grid/src/render/selection-renderer.js +315 -0
  428. package/build/treb-grid/src/render/selection-renderer.js.map +1 -0
  429. package/build/treb-grid/src/render/svg_header_overlay.d.ts +20 -0
  430. package/build/treb-grid/src/render/svg_header_overlay.js +76 -0
  431. package/build/treb-grid/src/render/svg_header_overlay.js.map +1 -0
  432. package/build/treb-grid/src/render/svg_selection_block.d.ts +27 -0
  433. package/build/treb-grid/src/render/svg_selection_block.js +106 -0
  434. package/build/treb-grid/src/render/svg_selection_block.js.map +1 -0
  435. package/build/treb-grid/src/render/tile_renderer.d.ts +121 -0
  436. package/build/treb-grid/src/render/tile_renderer.js +1609 -0
  437. package/build/treb-grid/src/render/tile_renderer.js.map +1 -0
  438. package/build/treb-grid/src/types/border_constants.d.ts +9 -0
  439. package/build/treb-grid/src/types/border_constants.js +34 -0
  440. package/build/treb-grid/src/types/border_constants.js.map +1 -0
  441. package/build/treb-grid/src/types/clipboard_data.d.ts +11 -0
  442. package/build/treb-grid/src/types/clipboard_data.js +22 -0
  443. package/build/treb-grid/src/types/clipboard_data.js.map +1 -0
  444. package/build/treb-grid/src/types/clipboard_data2.d.ts +46 -0
  445. package/build/treb-grid/src/types/clipboard_data2.js +22 -0
  446. package/build/treb-grid/src/types/clipboard_data2.js.map +1 -0
  447. package/build/treb-grid/src/types/drag_mask.d.ts +10 -0
  448. package/build/treb-grid/src/types/drag_mask.js +78 -0
  449. package/build/treb-grid/src/types/drag_mask.js.map +1 -0
  450. package/build/treb-grid/src/types/external_editor_config.d.ts +33 -0
  451. package/build/treb-grid/src/types/external_editor_config.js +22 -0
  452. package/build/treb-grid/src/types/external_editor_config.js.map +1 -0
  453. package/build/treb-grid/src/types/grid.d.ts +806 -0
  454. package/build/treb-grid/src/types/grid.js +6410 -0
  455. package/build/treb-grid/src/types/grid.js.map +1 -0
  456. package/build/treb-grid/src/types/grid_base.d.ts +442 -0
  457. package/build/treb-grid/src/types/grid_base.js +3523 -0
  458. package/build/treb-grid/src/types/grid_base.js.map +1 -0
  459. package/build/treb-grid/src/types/grid_command.d.ts +408 -0
  460. package/build/treb-grid/src/types/grid_command.js +75 -0
  461. package/build/treb-grid/src/types/grid_command.js.map +1 -0
  462. package/build/treb-grid/src/types/grid_events.d.ts +93 -0
  463. package/build/treb-grid/src/types/grid_events.js +36 -0
  464. package/build/treb-grid/src/types/grid_events.js.map +1 -0
  465. package/build/treb-grid/src/types/grid_options.d.ts +50 -0
  466. package/build/treb-grid/src/types/grid_options.js +34 -0
  467. package/build/treb-grid/src/types/grid_options.js.map +1 -0
  468. package/build/treb-grid/src/types/scale-control.d.ts +21 -0
  469. package/build/treb-grid/src/types/scale-control.js +148 -0
  470. package/build/treb-grid/src/types/scale-control.js.map +1 -0
  471. package/build/treb-grid/src/types/set_range_options.d.ts +24 -0
  472. package/build/treb-grid/src/types/set_range_options.js +22 -0
  473. package/build/treb-grid/src/types/set_range_options.js.map +1 -0
  474. package/build/treb-grid/src/types/tab_bar.d.ts +84 -0
  475. package/build/treb-grid/src/types/tab_bar.js +426 -0
  476. package/build/treb-grid/src/types/tab_bar.js.map +1 -0
  477. package/build/treb-grid/src/types/tile.d.ts +29 -0
  478. package/build/treb-grid/src/types/tile.js +22 -0
  479. package/build/treb-grid/src/types/tile.js.map +1 -0
  480. package/build/treb-grid/src/types/update_flags.d.ts +48 -0
  481. package/build/treb-grid/src/types/update_flags.js +22 -0
  482. package/build/treb-grid/src/types/update_flags.js.map +1 -0
  483. package/build/treb-grid/src/util/fontmetrics.d.ts +21 -0
  484. package/build/treb-grid/src/util/fontmetrics.js +82 -0
  485. package/build/treb-grid/src/util/fontmetrics.js.map +1 -0
  486. package/build/treb-grid/src/util/ua.d.ts +33 -0
  487. package/build/treb-grid/src/util/ua.js +86 -0
  488. package/build/treb-grid/src/util/ua.js.map +1 -0
  489. package/build/treb-parser/src/csv-parser.d.ts +13 -0
  490. package/build/treb-parser/src/csv-parser.js +107 -0
  491. package/build/treb-parser/src/csv-parser.js.map +1 -0
  492. package/build/treb-parser/src/index.d.ts +4 -0
  493. package/build/treb-parser/src/index.js +25 -0
  494. package/build/treb-parser/src/index.js.map +1 -0
  495. package/build/treb-parser/src/md-parser.d.ts +97 -0
  496. package/build/treb-parser/src/md-parser.js +403 -0
  497. package/build/treb-parser/src/md-parser.js.map +1 -0
  498. package/build/treb-parser/src/parser-types.d.ts +345 -0
  499. package/build/treb-parser/src/parser-types.js +53 -0
  500. package/build/treb-parser/src/parser-types.js.map +1 -0
  501. package/build/treb-parser/src/parser.d.ts +422 -0
  502. package/build/treb-parser/src/parser.js +2418 -0
  503. package/build/treb-parser/src/parser.js.map +1 -0
  504. package/build/treb-utils/src/event_source.d.ts +34 -0
  505. package/build/treb-utils/src/event_source.js +110 -0
  506. package/build/treb-utils/src/event_source.js.map +1 -0
  507. package/build/treb-utils/src/ievent_source.d.ts +9 -0
  508. package/build/treb-utils/src/ievent_source.js +22 -0
  509. package/build/treb-utils/src/ievent_source.js.map +1 -0
  510. package/build/treb-utils/src/index.d.ts +6 -0
  511. package/build/treb-utils/src/index.js +30 -0
  512. package/build/treb-utils/src/index.js.map +1 -0
  513. package/build/treb-utils/src/measurement.d.ts +42 -0
  514. package/build/treb-utils/src/measurement.js +145 -0
  515. package/build/treb-utils/src/measurement.js.map +1 -0
  516. package/build/treb-utils/src/scale.d.ts +16 -0
  517. package/build/treb-utils/src/scale.js +106 -0
  518. package/build/treb-utils/src/scale.js.map +1 -0
  519. package/build/treb-utils/src/serialize_html.d.ts +5 -0
  520. package/build/treb-utils/src/serialize_html.js +128 -0
  521. package/build/treb-utils/src/serialize_html.js.map +1 -0
  522. package/build/treb-utils/src/validate_uri.d.ts +20 -0
  523. package/build/treb-utils/src/validate_uri.js +55 -0
  524. package/build/treb-utils/src/validate_uri.js.map +1 -0
  525. package/dist/{chunk-XD5PEZBZ.mjs → chunk-E35ONJUS.mjs} +1 -1
  526. package/dist/treb-export-worker.mjs +2 -2
  527. package/dist/treb-spreadsheet.mjs +4 -4
  528. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ /*
2
+ * This file is part of TREB.
3
+ *
4
+ * TREB is free software: you can redistribute it and/or modify it under the
5
+ * terms of the GNU General Public License as published by the Free Software
6
+ * Foundation, either version 3 of the License, or (at your option) any
7
+ * later version.
8
+ *
9
+ * TREB is distributed in the hope that it will be useful, but WITHOUT ANY
10
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
+ * details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License along
15
+ * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
+ *
17
+ * Copyright 2022-2026 trebco, llc.
18
+ * info@treb.app
19
+ *
20
+ */
21
+ export { DataModel } from './data_model';
22
+ export { Sheet } from './sheet';
23
+ export * from './conditional_format';
24
+ export { Annotation } from './annotation';
25
+ export * from './data-validation';
26
+ export * from './types';
27
+ export * from './language-model';
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../treb-data-model/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,cAAc,sBAAsB,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * this is similar to a function descriptor, but we need a lot less
3
+ * information. not sure if we should composite them.
4
+ */
5
+ export interface TranslatedFunctionDescriptor {
6
+ /** original name (name in english), so we know what to replace. */
7
+ base: string;
8
+ /** name (localized) */
9
+ name: string;
10
+ /** description, if we have it. if not, show the english description? or nothing? dunno */
11
+ description?: string;
12
+ /** argument names only */
13
+ arguments?: string[];
14
+ }
15
+ export interface LanguageModel {
16
+ name: string;
17
+ version?: string;
18
+ locale?: string;
19
+ functions?: TranslatedFunctionDescriptor[];
20
+ boolean_true?: string;
21
+ boolean_false?: string;
22
+ }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * This file is part of TREB.
3
+ *
4
+ * TREB is free software: you can redistribute it and/or modify it under the
5
+ * terms of the GNU General Public License as published by the Free Software
6
+ * Foundation, either version 3 of the License, or (at your option) any
7
+ * later version.
8
+ *
9
+ * TREB is distributed in the hope that it will be useful, but WITHOUT ANY
10
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
+ * details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License along
15
+ * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
+ *
17
+ * Copyright 2022-2026 trebco, llc.
18
+ * info@treb.app
19
+ *
20
+ */
21
+ export {};
22
+ //# sourceMappingURL=language-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-model.js","sourceRoot":"","sources":["../../../treb-data-model/src/language-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
@@ -0,0 +1,124 @@
1
+ import { Area } from 'treb-base-types';
2
+ import type { IArea } from 'treb-base-types';
3
+ import type { ExpressionUnit, Parser } from 'treb-parser';
4
+ interface NamedExpression {
5
+ type: 'expression';
6
+ expression: ExpressionUnit;
7
+ }
8
+ interface NamedRange {
9
+ type: 'range';
10
+ area: Area;
11
+ }
12
+ /** @internal */
13
+ export type Named = (NamedExpression | NamedRange) & {
14
+ name: string;
15
+ scope?: number;
16
+ };
17
+ /**
18
+ * serialized type is a composite of expression/range. we determine
19
+ * what it is when parsing the expression. this simplifies passing these
20
+ * things around.
21
+ *
22
+ * (named expressions and ranges they have slightly different behavior,
23
+ * which is why we have a distinction at all).
24
+ *
25
+ */
26
+ export interface SerializedNamed {
27
+ name: string;
28
+ /** expression or address/area */
29
+ expression: string;
30
+ /** scope is a sheet name (not ID) */
31
+ scope?: string;
32
+ /**
33
+ * adding type. this is optional, it's not used by tooling. it's
34
+ * just for informational purpopses for clients.
35
+ */
36
+ type?: 'range' | 'expression';
37
+ }
38
+ /**
39
+ * this is a replacement for the name manager, which handles
40
+ * operations relating to named ranges.
41
+ */
42
+ export declare class NamedRangeManager {
43
+ parser: Parser;
44
+ /**
45
+ * this map is stored with normalized names. normalized names
46
+ * here means we call `toLowerCase`. the objects themselves
47
+ * contain canonical names.
48
+ *
49
+ * ...we've always had a map for this, for fast lookups. but
50
+ * with scoping, we can't necessarily look up by name. let's try
51
+ * using scope:name keys. that way we can search for scope:name
52
+ * and then name and return the first match, if any.
53
+ *
54
+ */
55
+ protected named: Map<string, Named>;
56
+ get list(): MapIterator<Named>;
57
+ constructor(parser: Parser);
58
+ /** shorthand for setting named expression */
59
+ SetNamedExpression(name: string, expression: ExpressionUnit, scope?: number): boolean;
60
+ /** shorthand for setting named range */
61
+ SetNamedRange(name: string, area: IArea, scope?: number): boolean;
62
+ /**
63
+ * add name. names are case-insensitive. if the name already
64
+ * exists, it will be overwritten.
65
+ *
66
+ * update: returns success (FIXME: proper errors)
67
+ */
68
+ private SetName;
69
+ private ScopedName;
70
+ ClearName(name: string, scope?: number): void;
71
+ /**
72
+ * if we delete a sheet, remove ranges in that sheet. also remove
73
+ * anything that's scoped to the sheet.
74
+ */
75
+ RemoveRangesForSheet(sheet_id: number): void;
76
+ Reset(): void;
77
+ /**
78
+ * requiring scope to help propgogate changes. we check the scoped
79
+ * version first; if that's not found, we default to the global version.
80
+ * that implies that if there are both, we'll prefer the scoped name.
81
+ *
82
+ * now possible to require scope, for qualified scoped names
83
+ *
84
+ * Q: why require scope? what's the benefit of that? (...)
85
+ *
86
+ */
87
+ Get_(name: string, scope: number, require_scope?: boolean): Named | undefined;
88
+ /**
89
+ * named range rules:
90
+ *
91
+ * - legal characters are alphanumeric, underscore and dot.
92
+ *
93
+ * - must start with letter or underscore (not a number or dot).
94
+ * UPDATE: also possibly a backslash? not sure if that's escaping or not.
95
+ *
96
+ * - cannot look like a spreadsheet address, which is 1-3 letters followed by numbers.
97
+ * UPDATE: actually this is legal if the number is "0". that's the only
98
+ * number. I don't think our parser will process this correctly, so until
99
+ * then keep it illegal.
100
+ *
101
+ * - apparently questuon marks are legal, but not in first position. atm
102
+ * our parser will reject.
103
+ *
104
+ * - FIXME: we should block R1C1-looking notation as well
105
+ *
106
+ * returns a normalized name (just caps, atm)
107
+ */
108
+ ValidateNamed(name: string): string | false;
109
+ /**
110
+ * match an area, optionally a target within a larger area (for selections).
111
+ * we don't use the selection directly, as we may need to adjust target for
112
+ * merge area. returns the name only if the area is an exact match.
113
+ */
114
+ MatchSelection(area: Area, target?: Area): string | undefined;
115
+ /**
116
+ * fix named range references after row/column insert/delete
117
+ *
118
+ * surely there's overlap between this function and what we do in
119
+ * grid when columns are added/removed. can we consolidate? (FIXME/TODO)
120
+ *
121
+ */
122
+ PatchNamedRanges(sheet_id: number, before_column: number, column_count: number, before_row: number, row_count: number): void;
123
+ }
124
+ export {};
@@ -0,0 +1,372 @@
1
+ /*
2
+ * This file is part of TREB.
3
+ *
4
+ * TREB is free software: you can redistribute it and/or modify it under the
5
+ * terms of the GNU General Public License as published by the Free Software
6
+ * Foundation, either version 3 of the License, or (at your option) any
7
+ * later version.
8
+ *
9
+ * TREB is distributed in the hope that it will be useful, but WITHOUT ANY
10
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
+ * details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License along
15
+ * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
+ *
17
+ * Copyright 2022-2026 trebco, llc.
18
+ * info@treb.app
19
+ *
20
+ */
21
+ import { Area } from 'treb-base-types';
22
+ /**
23
+ * this is a replacement for the name manager, which handles
24
+ * operations relating to named ranges.
25
+ */
26
+ export class NamedRangeManager {
27
+ parser;
28
+ /**
29
+ * this map is stored with normalized names. normalized names
30
+ * here means we call `toLowerCase`. the objects themselves
31
+ * contain canonical names.
32
+ *
33
+ * ...we've always had a map for this, for fast lookups. but
34
+ * with scoping, we can't necessarily look up by name. let's try
35
+ * using scope:name keys. that way we can search for scope:name
36
+ * and then name and return the first match, if any.
37
+ *
38
+ */
39
+ named = new Map();
40
+ get list() {
41
+ return this.named.values();
42
+ }
43
+ constructor(parser) {
44
+ this.parser = parser;
45
+ }
46
+ /** shorthand for setting named expression */
47
+ SetNamedExpression(name, expression, scope) {
48
+ return this.SetName({
49
+ type: 'expression',
50
+ name,
51
+ expression,
52
+ scope,
53
+ });
54
+ }
55
+ /** shorthand for setting named range */
56
+ SetNamedRange(name, area, scope) {
57
+ return this.SetName({
58
+ type: 'range',
59
+ name,
60
+ area: new Area(area.start, area.end),
61
+ scope,
62
+ });
63
+ }
64
+ /**
65
+ * add name. names are case-insensitive. if the name already
66
+ * exists, it will be overwritten.
67
+ *
68
+ * update: returns success (FIXME: proper errors)
69
+ */
70
+ SetName(named) {
71
+ const name = named.name;
72
+ // console.info('set name', named.name, {named});
73
+ const validated = this.ValidateNamed(name);
74
+ if (!validated) {
75
+ console.warn('invalid name', { name });
76
+ return false;
77
+ }
78
+ /*
79
+
80
+ if (named.type === 'range') {
81
+
82
+ // why is this considered invalid here? I've seen it done.
83
+ // maybe something we're doing with these ranges doesn't
84
+ // collapse them? (...)
85
+
86
+ if (named.area.entire_column || named.area.entire_row) {
87
+ console.info({named});
88
+ console.warn('invalid range');
89
+ return false;
90
+ }
91
+
92
+ }
93
+
94
+ */
95
+ // this.named.set(name.toLowerCase(), named);
96
+ this.named.set(this.ScopedName(name, named.scope), named);
97
+ return true;
98
+ }
99
+ ScopedName(name, scope) {
100
+ if (typeof scope === 'number') {
101
+ return scope + ':' + name.toLowerCase();
102
+ }
103
+ return name.toLowerCase();
104
+ }
105
+ ClearName(name, scope) {
106
+ if (typeof scope === 'number') {
107
+ this.named.delete(this.ScopedName(name, scope));
108
+ }
109
+ else {
110
+ this.named.delete(name.toLowerCase());
111
+ }
112
+ }
113
+ /**
114
+ * if we delete a sheet, remove ranges in that sheet. also remove
115
+ * anything that's scoped to the sheet.
116
+ */
117
+ RemoveRangesForSheet(sheet_id) {
118
+ const remove = [];
119
+ for (const [name, entry] of this.named) {
120
+ if (entry.type === 'range' && entry.area.start.sheet_id === sheet_id) {
121
+ remove.push(name);
122
+ }
123
+ else if (entry.scope === sheet_id) {
124
+ remove.push(name);
125
+ }
126
+ }
127
+ for (const name of remove) {
128
+ this.named.delete(name);
129
+ }
130
+ }
131
+ Reset() {
132
+ this.named.clear();
133
+ }
134
+ /**
135
+ * requiring scope to help propgogate changes. we check the scoped
136
+ * version first; if that's not found, we default to the global version.
137
+ * that implies that if there are both, we'll prefer the scoped name.
138
+ *
139
+ * now possible to require scope, for qualified scoped names
140
+ *
141
+ * Q: why require scope? what's the benefit of that? (...)
142
+ *
143
+ */
144
+ Get_(name, scope, require_scope = false) {
145
+ if (require_scope) {
146
+ return this.named.get(this.ScopedName(name, scope));
147
+ }
148
+ return this.named.get(this.ScopedName(name, scope)) ?? this.named.get(name.toLowerCase());
149
+ }
150
+ /**
151
+ * named range rules:
152
+ *
153
+ * - legal characters are alphanumeric, underscore and dot.
154
+ *
155
+ * - must start with letter or underscore (not a number or dot).
156
+ * UPDATE: also possibly a backslash? not sure if that's escaping or not.
157
+ *
158
+ * - cannot look like a spreadsheet address, which is 1-3 letters followed by numbers.
159
+ * UPDATE: actually this is legal if the number is "0". that's the only
160
+ * number. I don't think our parser will process this correctly, so until
161
+ * then keep it illegal.
162
+ *
163
+ * - apparently questuon marks are legal, but not in first position. atm
164
+ * our parser will reject.
165
+ *
166
+ * - FIXME: we should block R1C1-looking notation as well
167
+ *
168
+ * returns a normalized name (just caps, atm)
169
+ */
170
+ ValidateNamed(name) {
171
+ // normalize
172
+ name = name.trim().toUpperCase();
173
+ // can't be empty
174
+ if (!name.length)
175
+ return false;
176
+ // can only contain legal characters [FIXME: backslash is legal?]
177
+ if (/[^A-Z\d_.?]/.test(name))
178
+ return false;
179
+ // must start with ascii letter or underscore
180
+ if (/^[^A-Z_]/.test(name))
181
+ return false;
182
+ // these are not legal for some reason -- they look like R1C1?
183
+ if (name === 'R' || name === 'C') {
184
+ return false;
185
+ }
186
+ // FIXME: should we just use a parser? we're adding more and more regexes.
187
+ // can't look like a spreadsheet address, unless the row is === 0
188
+ if (/^[A-Z]{1,3}[1-9]\d*$/.test(name))
189
+ return false;
190
+ // can't look like R1C1 either (we already checked for R and C)
191
+ if (/^R[[\]\d]+C/.test(name)) {
192
+ return false;
193
+ }
194
+ return name;
195
+ }
196
+ /**
197
+ * match an area, optionally a target within a larger area (for selections).
198
+ * we don't use the selection directly, as we may need to adjust target for
199
+ * merge area. returns the name only if the area is an exact match.
200
+ */
201
+ MatchSelection(area, target) {
202
+ if (!area.start.sheet_id) {
203
+ throw new Error('match selection without sheet id');
204
+ }
205
+ let label;
206
+ for (const entry of this.named.values()) {
207
+ if (entry.type === 'range') {
208
+ if (entry.area.start.sheet_id === area.start.sheet_id) {
209
+ if (area.Equals(entry.area)) {
210
+ label = entry.name; // don't break, in case there's a match for target which takes precendence.
211
+ }
212
+ if (target?.Equals(entry.area)) {
213
+ return entry.name;
214
+ }
215
+ }
216
+ }
217
+ }
218
+ return label;
219
+ }
220
+ /**
221
+ * fix named range references after row/column insert/delete
222
+ *
223
+ * surely there's overlap between this function and what we do in
224
+ * grid when columns are added/removed. can we consolidate? (FIXME/TODO)
225
+ *
226
+ */
227
+ PatchNamedRanges(sheet_id, before_column, column_count, before_row, row_count) {
228
+ const copy = [...this.list];
229
+ for (const entry of copy) {
230
+ if (entry.type === 'expression') {
231
+ continue;
232
+ }
233
+ const key = entry.name;
234
+ const range = entry.area;
235
+ if (range.start.sheet_id !== sheet_id) {
236
+ console.info('skipping name', key);
237
+ continue;
238
+ }
239
+ if (column_count && before_column <= range.end.column) {
240
+ /*
241
+ // (1) we are before the insert point, not affected
242
+
243
+ if (before_column > range.end.column) {
244
+ continue;
245
+ }
246
+ */
247
+ if (column_count > 0) {
248
+ // (2) it's an insert and we are past the insert point:
249
+ // increment [start] and [end] by [count]
250
+ if (before_column <= range.start.column) {
251
+ range.Shift(0, column_count);
252
+ }
253
+ // (3) it's an insert and we contain the insert point:
254
+ // increment [end] by [count]
255
+ else if (before_column > range.start.column && before_column <= range.end.column) {
256
+ range.ConsumeAddress({ row: range.end.row, column: range.end.column + column_count });
257
+ }
258
+ else {
259
+ console.warn(`PNR X case 1`, before_column, column_count, JSON.stringify(range));
260
+ }
261
+ }
262
+ else if (column_count < 0) {
263
+ // (4) it's a delete and we are past the delete point (before+count):
264
+ // decrement [start] and [end] by [count]
265
+ if (before_column - column_count <= range.start.column) {
266
+ range.Shift(0, column_count);
267
+ }
268
+ // (5) it's a delete and contains the entire range
269
+ else if (before_column <= range.start.column && before_column - column_count > range.end.column) {
270
+ this.ClearName(key);
271
+ }
272
+ // (6) it's a delete and contains part of the range. clip the range.
273
+ else if (before_column <= range.start.column) {
274
+ const last_column = before_column - column_count - 1;
275
+ this.SetName({
276
+ type: 'range', area: new Area({
277
+ row: range.start.row, column: last_column + 1 + column_count, sheet_id
278
+ }, {
279
+ row: range.end.row, column: range.end.column + column_count
280
+ }), name: key,
281
+ });
282
+ }
283
+ else if (before_column <= range.end.column) {
284
+ const last_column = before_column - column_count - 1;
285
+ if (last_column >= range.end.column) {
286
+ this.SetName({ type: 'range', area: new Area({
287
+ row: range.start.row, column: range.start.column, sheet_id
288
+ }, {
289
+ row: range.end.row, column: before_column - 1
290
+ }), name: key });
291
+ }
292
+ else {
293
+ this.SetName({ type: 'range', name: key, area: new Area({
294
+ row: range.start.row, column: range.start.column, sheet_id
295
+ }, {
296
+ row: range.end.row, column: range.start.column + range.columns + column_count - 1
297
+ }) });
298
+ }
299
+ }
300
+ else {
301
+ console.warn(`PNR X case 2`, before_column, column_count, JSON.stringify(range));
302
+ }
303
+ }
304
+ }
305
+ if (row_count && before_row <= range.end.row) {
306
+ /*
307
+ // (1) we are before the insert point, not affected
308
+
309
+ if (before_row > range.end.row) {
310
+ continue;
311
+ }
312
+ */
313
+ if (row_count > 0) {
314
+ // (2) it's an insert and we are past the insert point:
315
+ // increment [start] and [end] by [count]
316
+ if (before_row <= range.start.row) {
317
+ range.Shift(row_count, 0);
318
+ }
319
+ // (3) it's an insert and we contain the insert point:
320
+ // increment [end] by [count]
321
+ else if (before_row > range.start.row && before_row <= range.end.row) {
322
+ range.ConsumeAddress({ row: range.end.row + row_count, column: range.end.column });
323
+ }
324
+ else {
325
+ console.warn(`PNR X case 3`, before_row, row_count, JSON.stringify(range));
326
+ }
327
+ }
328
+ else if (row_count < 0) {
329
+ // (4) it's a delete and we are past the delete point (before+count):
330
+ // decrement [start] and [end] by [count]
331
+ if (before_row - row_count <= range.start.row) {
332
+ range.Shift(row_count, 0);
333
+ }
334
+ // (5) it's a delete and contains the entire range
335
+ else if (before_row <= range.start.row && before_row - row_count > range.end.row) {
336
+ this.ClearName(key);
337
+ }
338
+ // (6) it's a delete and contains part of the range. clip the range.
339
+ else if (before_row <= range.start.row) {
340
+ const last_row = before_row - row_count - 1;
341
+ this.SetNamedRange(key, new Area({
342
+ column: range.start.column, row: last_row + 1 + row_count, sheet_id
343
+ }, {
344
+ column: range.end.column, row: range.end.row + row_count
345
+ }));
346
+ }
347
+ else if (before_row <= range.end.row) {
348
+ const last_row = before_row - row_count - 1;
349
+ if (last_row >= range.end.row) {
350
+ this.SetNamedRange(key, new Area({
351
+ column: range.start.column, row: range.start.row, sheet_id
352
+ }, {
353
+ column: range.end.column, row: before_row - 1
354
+ }));
355
+ }
356
+ else {
357
+ this.SetNamedRange(key, new Area({
358
+ column: range.start.column, row: range.start.row, sheet_id
359
+ }, {
360
+ column: range.end.column, row: range.start.row + range.rows + row_count - 1
361
+ }));
362
+ }
363
+ }
364
+ else {
365
+ console.warn(`PNR X case 4`, before_row, row_count, JSON.stringify(range));
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ }
372
+ //# sourceMappingURL=named.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"named.js","sourceRoot":"","sources":["../../../treb-data-model/src/named.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AA+CvC;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IAmBT;IAjBnB;;;;;;;;;;OAUG;IACO,KAAK,GAAuB,IAAI,GAAG,EAAE,CAAC;IAEhD,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAC7B,CAAC;IAED,YAAmB,MA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AAG,CAAC;6BAAE,CAAC,CAAC,CAAC;wBACxD,CAAC;6BACI,CAAC;4BACJ,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC;gCAC/B,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,QAAQ;6BAAE,EAAE;gCAC5D,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,GAAG,SAAS,GAAG,CAAC;6BAAE,CAAC,CAAC,CAAC;wBACtF,CAAC;oBAEH,CAAC;yBAEI,CAAC;wBACJ,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;oBAC7E,CAAC;gBAEH,CAAC;YACH,CAAC;QAEH,CAAC;IAEH,CAAC;CAEF"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * options for serializing data
3
+ *
4
+ * @privateRemarks
5
+ * essentially a placeholder for options; we only have one at the moment.
6
+ *
7
+ * note that the underlying cells container has its own set of options. we
8
+ * are explicitly not using that so we can add things that are beyond that
9
+ * scope.
10
+ *
11
+ * still, we might just wrap that object [FIXME/TODO].
12
+ */
13
+ export interface SerializeOptions {
14
+ /** optimize for size */
15
+ optimize?: 'size' | 'speed';
16
+ /** include the rendered/calculated value in export */
17
+ rendered_values?: boolean;
18
+ /**
19
+ * preserve cell type
20
+ * @internal
21
+ */
22
+ preserve_type?: boolean;
23
+ /**
24
+ * expand arrays so cells have individual values
25
+ * @internal
26
+ */
27
+ expand_arrays?: boolean;
28
+ /** translate colors to xlsx-friendly values */
29
+ export_colors?: boolean;
30
+ /** export cells that have no value, but have a border or background color */
31
+ decorated_cells?: boolean;
32
+ /** prune unused rows/columns */
33
+ shrink?: boolean;
34
+ /**
35
+ * include tables. tables will be serialized in the model, so we can
36
+ * drop them from cells. but you can leave them in if that's useful.
37
+ */
38
+ tables?: boolean;
39
+ /** share resources (images, for now) to prevent writing data URIs more than once */
40
+ share_resources?: boolean;
41
+ /**
42
+ * if a function has an export() handler, call that
43
+ */
44
+ export_functions?: boolean;
45
+ /**
46
+ * @internal
47
+ */
48
+ apply_row_pattern?: boolean;
49
+ }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * This file is part of TREB.
3
+ *
4
+ * TREB is free software: you can redistribute it and/or modify it under the
5
+ * terms of the GNU General Public License as published by the Free Software
6
+ * Foundation, either version 3 of the License, or (at your option) any
7
+ * later version.
8
+ *
9
+ * TREB is distributed in the hope that it will be useful, but WITHOUT ANY
10
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
+ * details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License along
15
+ * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
+ *
17
+ * Copyright 2022-2026 trebco, llc.
18
+ * info@treb.app
19
+ *
20
+ */
21
+ export {};
22
+ //# sourceMappingURL=serialize_options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialize_options.js","sourceRoot":"","sources":["../../../treb-data-model/src/serialize_options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}