@trebco/treb 37.0.0 → 37.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (529) 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-A2NJA5VB.mjs} +1 -1
  526. package/dist/treb-export-worker.mjs +2 -2
  527. package/dist/treb-spreadsheet.mjs +4 -4
  528. package/dist/treb.d.ts +1 -1
  529. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../../treb-calculator/src/dag/graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAG,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAG,MAAM,gBAAgB,CAAC;AAI9C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAA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,CAAC;QAEjD,6CAA6C;QAE7C,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,oCAAoC;YAEpC,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QAEnC,CAAC;QAGD,uCAAuC;QAEvC,4DAA4D;QAC5D,2DAA2D;QAE3D,2CAA2C;QAC3C,2BAA2B;QAC3B,GAAG;QAEH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtD,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;IAE7B,CAAC;CAOF"}
@@ -0,0 +1,58 @@
1
+ import type { GraphCallbacks } from './spreadsheet_vertex_base';
2
+ import { SpreadsheetVertexBase } from './spreadsheet_vertex_base';
3
+ import type { Cell, ICellAddress, UnionValue } from 'treb-base-types';
4
+ import type { ExpressionUnit } from 'treb-parser';
5
+ export declare enum SpreadsheetError {
6
+ None = 0,
7
+ CalculationError = 1
8
+ }
9
+ /**
10
+ * specialization of vertex with attached data and calculation metadata
11
+ */
12
+ export declare class SpreadsheetVertex extends SpreadsheetVertexBase {
13
+ static type: string;
14
+ reference?: Cell;
15
+ error: SpreadsheetError;
16
+ address?: ICellAddress;
17
+ result: UnionValue;
18
+ expression: ExpressionUnit;
19
+ expression_error: boolean;
20
+ short_circuit: boolean;
21
+ type: string;
22
+ /**
23
+ * it seems like this could be cached, if it gets checked a lot
24
+ * also what's with the crazy return signature? [fixed]
25
+ */
26
+ get array_head(): boolean;
27
+ /**
28
+ * to support restoring cached values (from file), we need a way to get
29
+ * the value from the reference (cell). normally this is done during
30
+ * calculation, and in reverse (we set the value).
31
+ *
32
+ * some additional implications of this:
33
+ *
34
+ * - does not set volatile/nonvolatile, which is usually managed as a
35
+ * side-effect of the calculation.
36
+ *
37
+ * - does not remove the entry from the dirty list
38
+ *
39
+ * - does not clear the internal dirty flag. it used to do that, but we
40
+ * took it out because we are now managing multple vertex types, and
41
+ * we don't want to attach that behavior to a type-specific method.
42
+ *
43
+ * so the caller needs to explicitly address the dirty and volatile lists
44
+ * for this vertex.
45
+ */
46
+ TakeReferenceValue(): void;
47
+ /**
48
+ * calculates the function, but only if all dependencies are clean.
49
+ * if one or more dependencies are dirty, just exit. this should work out
50
+ * so that when the last dependency is satisfied, the propagation will
51
+ * succeed. FIXME: optimize order.
52
+ *
53
+ * FIXME: why is this in vertex, instead of graph? [a: dirty check?]
54
+ * A: for overloading. leaf extends this class, and has a separate
55
+ * calculation routine.
56
+ */
57
+ Calculate(graph: GraphCallbacks): void;
58
+ }
@@ -0,0 +1,232 @@
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 { SpreadsheetVertexBase } from './spreadsheet_vertex_base';
22
+ import { Box, ValueType } from 'treb-base-types';
23
+ import { Color } from './vertex';
24
+ import { ErrorType } from '../function-error';
25
+ export var SpreadsheetError;
26
+ (function (SpreadsheetError) {
27
+ SpreadsheetError[SpreadsheetError["None"] = 0] = "None";
28
+ SpreadsheetError[SpreadsheetError["CalculationError"] = 1] = "CalculationError";
29
+ })(SpreadsheetError || (SpreadsheetError = {}));
30
+ /**
31
+ * specialization of vertex with attached data and calculation metadata
32
+ */
33
+ export class SpreadsheetVertex extends SpreadsheetVertexBase {
34
+ static type = 'spreadsheet-vertex';
35
+ // I wonder if we should drop this and look up on demand -- might
36
+ // help in large blocks...
37
+ reference;
38
+ error = SpreadsheetError.None;
39
+ // why is this (?)? can't we use a default junk address?
40
+ address;
41
+ //public result: UnionOrArray = UndefinedUnion();
42
+ result = { type: ValueType.undefined };
43
+ expression = { type: 'missing', id: -1 };
44
+ expression_error = false;
45
+ short_circuit = false;
46
+ type = SpreadsheetVertex.type; // for type guard
47
+ /**
48
+ * it seems like this could be cached, if it gets checked a lot
49
+ * also what's with the crazy return signature? [fixed]
50
+ */
51
+ get array_head() {
52
+ if (!this.address)
53
+ return false;
54
+ return (!!this.reference)
55
+ && (!!this.reference.area)
56
+ && (this.reference.area.start.column === this.address.column)
57
+ && (this.reference.area.start.row === this.address.row);
58
+ }
59
+ /**
60
+ * to support restoring cached values (from file), we need a way to get
61
+ * the value from the reference (cell). normally this is done during
62
+ * calculation, and in reverse (we set the value).
63
+ *
64
+ * some additional implications of this:
65
+ *
66
+ * - does not set volatile/nonvolatile, which is usually managed as a
67
+ * side-effect of the calculation.
68
+ *
69
+ * - does not remove the entry from the dirty list
70
+ *
71
+ * - does not clear the internal dirty flag. it used to do that, but we
72
+ * took it out because we are now managing multple vertex types, and
73
+ * we don't want to attach that behavior to a type-specific method.
74
+ *
75
+ * so the caller needs to explicitly address the dirty and volatile lists
76
+ * for this vertex.
77
+ */
78
+ TakeReferenceValue() {
79
+ if (this.reference) {
80
+ this.result = Box(this.reference.GetValue());
81
+ }
82
+ }
83
+ /**
84
+ * calculates the function, but only if all dependencies are clean.
85
+ * if one or more dependencies are dirty, just exit. this should work out
86
+ * so that when the last dependency is satisfied, the propagation will
87
+ * succeed. FIXME: optimize order.
88
+ *
89
+ * FIXME: why is this in vertex, instead of graph? [a: dirty check?]
90
+ * A: for overloading. leaf extends this class, and has a separate
91
+ * calculation routine.
92
+ */
93
+ Calculate(graph) {
94
+ if (!this.dirty)
95
+ return;
96
+ // it would be nice if we could get this out of the calculate routine,
97
+ // but that's a problem because we can't calculate in the right order.
98
+ // one solution might be to have two methods, one which includes it
99
+ // and one which doesn't, and call the checked method only when necessary.
100
+ // OTOH that means maintaining the internal calculation part twice (or
101
+ // adding a method call).
102
+ if (this.color === Color.white && this.LoopCheck()) {
103
+ // console.info('LCB', `R${this.address?.row} C${this.address?.column}`, this);
104
+ // if (this.LoopCheck()) {
105
+ // throw new Error('loop loop 2')
106
+ this.dirty = false;
107
+ if (this.edges_in.size) {
108
+ // console.info('set loop err', `R${this.address?.row} C${this.address?.column}`, this);
109
+ // this should alwys be true, because it has edges so
110
+ // it must be a formula (right?)
111
+ // we don't have to do that test because now we only set
112
+ // vertices -> white if they match
113
+ if (this.reference && (this.array_head || this.reference.type === ValueType.formula)) {
114
+ this.reference.SetCalculationError(ErrorType.Loop);
115
+ }
116
+ //this.reference?.SetCalculationError('LOOP');
117
+ // intuitively this seems like a good idea but I'm not sure
118
+ // that it is actually necessary (TODO: check)
119
+ for (const edge of this.edges_out) {
120
+ edge.Calculate(graph);
121
+ }
122
+ return;
123
+ }
124
+ /*
125
+ else {
126
+ console.info('SKIP loop err', `R${this.address?.row} C${this.address?.column}`, this);
127
+ }
128
+ */
129
+ // }
130
+ }
131
+ // this is done before checking if it's a formula for the case of
132
+ // arrays: arrays are not formulae but they are dependent on the
133
+ // array head. if the head is dirty we need to calculate that before
134
+ // any dependents of _this_ cell are calculated.
135
+ // the head calculation should take care of setting this value, that is,
136
+ // we don't need to do the actual lookup.
137
+ // this prevents a runaway if there's a loop (and we are not catching it),
138
+ // but there's a side-effect: the dirty flag never gets cleared. if we want
139
+ // to fix this we need to clean the dirty flag on vertices before a full
140
+ // recalc, I guess...
141
+ // that's also why page reload "fixes" the issue: because there's a global
142
+ // cleaning of dirty flags. or maybe they don't survive serialization, I don't know.
143
+ for (const edge of this.edges_in) {
144
+ if (edge.dirty) {
145
+ // console.info('exiting on dirty deps', `R${this.address?.row} C${this.address?.column}`, this);
146
+ return;
147
+ }
148
+ }
149
+ // console.info('OK calc', `R${this.address?.row} C${this.address?.column}`, this);
150
+ // we won't have a reference if the reference is to an empty cell,
151
+ // so check that. [Q: what?]
152
+ if (this.reference) {
153
+ if (this.reference.type === ValueType.formula) {
154
+ this.short_circuit = false;
155
+ const result = graph.CalculationCallback.call(graph, this);
156
+ // console.info("RX", result);
157
+ this.result = result.value;
158
+ // this test is a waste for 99% of calls
159
+ //
160
+ // [FYI it has to do with dynamic dependencies, needs to be documented]
161
+ //
162
+ if (this.short_circuit) {
163
+ return;
164
+ } // what about setting dirty flag? (...)
165
+ // and this one for ~75%?
166
+ if (result.volatile)
167
+ graph.volatile_list.push(this);
168
+ }
169
+ else
170
+ this.result = this.reference.GetValue4();
171
+ // is this going to work properly if it's an error? (...)
172
+ if (this.array_head) {
173
+ graph.SpreadCallback.call(graph, this, this.result);
174
+ }
175
+ else if (this.reference.type === ValueType.formula) {
176
+ // adding check for spill, not withstanding the below
177
+ if (this.result.type === ValueType.array) {
178
+ // note array of length 1 should not trigger spill behavior
179
+ // (moved to callback method)
180
+ const recalc = graph.SpillCallback.call(graph, this, this.result);
181
+ if (recalc) {
182
+ // console.info("RC", recalc);
183
+ for (const entry of recalc) {
184
+ // will this work properly with loops? (...)
185
+ for (const edge of entry.edges_out) {
186
+ edge.dirty = true;
187
+ edge.Calculate(graph);
188
+ }
189
+ }
190
+ }
191
+ }
192
+ else {
193
+ // ---
194
+ // data should now be clean when it gets here (famous last words)
195
+ // we're now sometimes getting 0-length arrays here. that's a
196
+ // function of our new polynomial methods, BUT, we should probably
197
+ // handle it properly regardless.
198
+ // neven // const single = (this.result.type === ValueType.array) ? this.result.value[0][0] : this.result;
199
+ // we are using object type in the returned value for sparklines...
200
+ // so we can't drop it here. we could change rendering though. or
201
+ // whitelist types. or blacklist types. or something.
202
+ this.reference.SetCalculatedValue(this.result.value, this.result.type);
203
+ }
204
+ }
205
+ }
206
+ else {
207
+ console.info('skip dirty constant? [or dangling...]');
208
+ }
209
+ this.dirty = false;
210
+ // so this is causing problems in long chains. we need
211
+ // to do this !recursively. there's a slight problem in
212
+ // that we do it in the loop check as well... not sure
213
+ // how this will play out.
214
+ // some options:
215
+ // (1) push (dirty) edges onto a global list (or list contained in graph)
216
+ // (2) return boolean, with one state indicating our dependencies need calculating
217
+ // (3) return a list of dirty dependencies, caller can push onto their list
218
+ //
219
+ // (4) because dirty vertices are on the list, you could just loop until
220
+ // the list is clean (i.e. restart and exit if there are no dirty
221
+ // vertices left)... that's kind of the same as pushing onto the back of
222
+ // the list but it avoids extending the list (not sure if that that is
223
+ // a useful optimization or not)
224
+ //
225
+ for (const edge of this.edges_out) {
226
+ if (edge.dirty) {
227
+ graph.calculation_list.push(edge);
228
+ }
229
+ }
230
+ }
231
+ }
232
+ //# sourceMappingURL=spreadsheet_vertex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spreadsheet_vertex.js","sourceRoot":"","sources":["../../../../treb-calculator/src/dag/spreadsheet_vertex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,uDAAI,CAAA;IACJ,+EAAgB,CAAA;AAClB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,qBAA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AAM,KAAK,IAAK,MAA8B,EAAE,CAAC;4BAEpD,4CAA4C;4BAE5C,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;gCAClC,IAA0B,CAAC,KAAK,GAAG,IAAI,CAAC;gCACxC,IAA0B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;4BAC/C,CAAC;wBAEH,CAAC;oBACH,CAAC;gBAEH,CAAC;qBACI,CAAC;oBAEJ,MAAM;oBAGN,iEAAiE;oBAEjE,8DAA8D;oBAC9D,kEAAkE;oBAClE,iCAAiC;oBAEjC,0GAA0G;oBAE1G,mEAAmE;oBACnE,iEAAiE;oBACjE,qDAAqD;oBAErD,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAkB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAEtF,CAAC;YACH,CAAC;QAEH,CAAC;aACI,CAAC;YACJ,OAAO,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QACxD,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,sDAAsD;QACtD,wDAAwD;QACxD,sDAAsD;QACtD,0BAA0B;QAE1B,gBAAgB;QAChB,yEAAyE;QACzE,kFAAkF;QAClF,2EAA2E;QAC3E,EAAE;QACF,wEAAwE;QACxE,sEAAsE;QACtE,6EAA6E;QAC7E,2EAA2E;QAC3E,oCAAoC;QACpC,GAAG;QAEH,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,SAAuC,EAAC,CAAC;YAC/D,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpC,CAAC;QACH,CAAC;IAEH,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Vertex } from './vertex';
2
+ import type { UnionValue } from 'treb-base-types';
3
+ export interface CalculationResult {
4
+ value: UnionValue;
5
+ volatile?: boolean;
6
+ }
7
+ /**
8
+ * this is a subset of Graph so we can avoid the circular dependency.
9
+ */
10
+ export interface GraphCallbacks {
11
+ CalculationCallback: (vertex: SpreadsheetVertexBase) => CalculationResult;
12
+ SpreadCallback: (vertex: SpreadsheetVertexBase, value: UnionValue) => void;
13
+ SpillCallback: (vertex: SpreadsheetVertexBase, value: UnionValue) => Vertex[] | void;
14
+ volatile_list: SpreadsheetVertexBase[];
15
+ calculation_list: SpreadsheetVertexBase[];
16
+ }
17
+ export declare abstract class SpreadsheetVertexBase extends Vertex {
18
+ dirty: boolean;
19
+ abstract Calculate(graph: GraphCallbacks): void;
20
+ }
@@ -0,0 +1,25 @@
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 { Vertex } from './vertex';
22
+ export class SpreadsheetVertexBase extends Vertex {
23
+ dirty = false;
24
+ }
25
+ //# sourceMappingURL=spreadsheet_vertex_base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spreadsheet_vertex_base.js","sourceRoot":"","sources":["../../../../treb-calculator/src/dag/spreadsheet_vertex_base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAoBlC,MAAM,OAAgB,qBAAsB,SAAQ,MAAM;IACjD,KAAK,GAAG,KAAK,CAAC;CAEtB"}
@@ -0,0 +1,43 @@
1
+ import { SpreadsheetVertex } from './spreadsheet_vertex';
2
+ import { Color } from './vertex';
3
+ /**
4
+ * second specialization of vertex: this class is for non-cell elements
5
+ * that are dependent on cells: specifically, charts.
6
+ *
7
+ * we want leaf vertices to participate in the normal dirty/calculate
8
+ * cycle, but they don't need to do any calculation other than checking
9
+ * if the underlying data has changed. we should maintain some state so
10
+ * this is a simple check for observers.
11
+ *
12
+ * leaves specifically do not have addresses. we can represent the chart
13
+ * as a calculation, however. (...)
14
+ *
15
+ * FIXME: it might be better to have an intermediate class/interface and
16
+ * have both leaf- and spreadsheet-vertex extend that.
17
+ *
18
+ * UPDATE: we're removing the internal "state" representation because (1)
19
+ * it should be unnecessary, if we are only updating when dependencies
20
+ * change, and (2) it was broken anyway.
21
+ *
22
+ * Now we rely on the calculation graph to indicate when the leaf is
23
+ * dirty and needs to update. This will result in extra calculation when
24
+ * you do a hard recalc, but that seems reasonable (and we could possibly
25
+ * work around that).
26
+ *
27
+ */
28
+ export declare class StateLeafVertex extends SpreadsheetVertex {
29
+ static type: string;
30
+ state_id: number;
31
+ type: string;
32
+ /**
33
+ * leaf vertex defaults to black (i.e. tested) because leaf nodes cannot have
34
+ * outbound edges. it is still possible to change this, because it's a property
35
+ * and we can't override the set accessor, but making it an accessor in the
36
+ * superclass just for this purpose is not worthwhile since regular vertices
37
+ * should vastly outnumber leaves.
38
+ */
39
+ color: Color;
40
+ /** overrides calculate function */
41
+ Calculate(): void;
42
+ AddDependent(): void;
43
+ }
@@ -0,0 +1,81 @@
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 { SpreadsheetVertex } from './spreadsheet_vertex';
22
+ import { Color } from './vertex';
23
+ /**
24
+ * second specialization of vertex: this class is for non-cell elements
25
+ * that are dependent on cells: specifically, charts.
26
+ *
27
+ * we want leaf vertices to participate in the normal dirty/calculate
28
+ * cycle, but they don't need to do any calculation other than checking
29
+ * if the underlying data has changed. we should maintain some state so
30
+ * this is a simple check for observers.
31
+ *
32
+ * leaves specifically do not have addresses. we can represent the chart
33
+ * as a calculation, however. (...)
34
+ *
35
+ * FIXME: it might be better to have an intermediate class/interface and
36
+ * have both leaf- and spreadsheet-vertex extend that.
37
+ *
38
+ * UPDATE: we're removing the internal "state" representation because (1)
39
+ * it should be unnecessary, if we are only updating when dependencies
40
+ * change, and (2) it was broken anyway.
41
+ *
42
+ * Now we rely on the calculation graph to indicate when the leaf is
43
+ * dirty and needs to update. This will result in extra calculation when
44
+ * you do a hard recalc, but that seems reasonable (and we could possibly
45
+ * work around that).
46
+ *
47
+ */
48
+ export class StateLeafVertex extends SpreadsheetVertex {
49
+ static type = 'state-leaf-vertex';
50
+ state_id = 0;
51
+ type = StateLeafVertex.type; // for type guard
52
+ /**
53
+ * leaf vertex defaults to black (i.e. tested) because leaf nodes cannot have
54
+ * outbound edges. it is still possible to change this, because it's a property
55
+ * and we can't override the set accessor, but making it an accessor in the
56
+ * superclass just for this purpose is not worthwhile since regular vertices
57
+ * should vastly outnumber leaves.
58
+ */
59
+ color = Color.black;
60
+ /** overrides calculate function */
61
+ Calculate() {
62
+ // if we are not dirty, nothing to do
63
+ if (!this.dirty)
64
+ return;
65
+ // check deps
66
+ for (const edge of this.edges_in) {
67
+ if (edge.dirty) {
68
+ return;
69
+ }
70
+ }
71
+ // ok update state so clients know they need to refresh
72
+ // (see note above re: internal state)
73
+ this.state_id++;
74
+ // and we're clean
75
+ this.dirty = false;
76
+ }
77
+ AddDependent() {
78
+ throw (new Error('leaf vertex cannot have dependents'));
79
+ }
80
+ }
81
+ //# sourceMappingURL=state_leaf_vertex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state_leaf_vertex.js","sourceRoot":"","sources":["../../../../treb-calculator/src/dag/state_leaf_vertex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAO,eAAgB,SAAQ,iBAAiB;IAE7C,MAAM,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAElC,QAAQ,GAAG,CAAC,CAAC;IACb,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,iBAAiB;IAErD;;;;;;OAMG;IACI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAE3B,mCAAmC;IAC5B,SAAS;QAEd,qCAAqC;QACrC,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO;QAExB,aAAa;QACb,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACjC,IAAK,IAA0B,CAAC,KAAK,EAAE,CAAC;gBACtC,OAAO;YACT,CAAC;QACH,CAAC;QAED,uDAAuD;QACvD,sCAAsC;QAEtC,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEhB,kBAAkB;QAElB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAErB,CAAC;IAEM,YAAY;QACjB,MAAK,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC;IACzD,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * colors for the CLRS color algorithm.
3
+ *
4
+ * these colors are useful because gray is "in between" white and black, but
5
+ * (outside of the general move away from using white/black as identifiers) it
6
+ * might be easier to conceptualize with descriptive labels like "untested"
7
+ * (white), "being tested", (gray) and "testing complete" (black).
8
+ */
9
+ export declare enum Color {
10
+ white = 0,
11
+ gray = 1,
12
+ black = 2
13
+ }
14
+ export declare class Vertex {
15
+ /**
16
+ * vertex and its subclasses have a type parameter for type
17
+ * guards/reflection; each instance has a type that is set
18
+ * to the static class type.
19
+ */
20
+ static type: string;
21
+ type: string;
22
+ color: Color;
23
+ /** dependencies */
24
+ edges_in: Set<Vertex>;
25
+ /** dependents */
26
+ edges_out: Set<Vertex>;
27
+ get has_inbound_edges(): boolean;
28
+ get has_outbound_edges(): boolean;
29
+ /** reset this node */
30
+ Reset(): void;
31
+ /** removes all inbound edges (dependencies) */
32
+ ClearDependencies(): void;
33
+ /** add a dependent. doesn't add if already in the list */
34
+ AddDependent(edge: Vertex): void;
35
+ /** remove a dependent */
36
+ RemoveDependent(edge: Vertex): void;
37
+ /** add a dependency. doesn't add if already in the list */
38
+ AddDependency(edge: Vertex): void;
39
+ /** remove a dependency */
40
+ RemoveDependency(edge: Vertex): void;
41
+ /**
42
+ * this is a composite operation, because the operations are always called
43
+ * in pairs. this means create a pair of links such that _edge_ depends on
44
+ * _this_.
45
+ */
46
+ LinkTo(edge: Vertex): void;
47
+ /**
48
+ * this is an alteranate formulation that may make more intuitive sense.
49
+ * it creates a pair of forward/backward links, such that _this_ depends
50
+ * on _edge_.
51
+ */
52
+ DependsOn(edge: Vertex): void;
53
+ /**
54
+ * this is called during calculation (if necessary). on a hit (loop), we
55
+ * reset the color of this, the test node, to white. there are two reasons
56
+ * for this:
57
+ *
58
+ * one, we want subsequent tests to also find the hit. in some cases we may
59
+ * not be marking the node as a loop (if it precedes the backref in the graph),
60
+ * so we want subsequent nodes to also hit the loop. [Q: this makes no sense,
61
+ * because this would still hit if the node were marked grey, assuming you
62
+ * test for that].
63
+ *
64
+ * two, if you fix the loop, on a subsequent call we want to force a re-check,
65
+ * which we can do if the vertex is marked white. [Q: could also be done on
66
+ * gray?]
67
+ *
68
+ * [A: logically you are correct, but this works, and matching grey does not].
69
+ */
70
+ LoopCheck(): boolean;
71
+ }