@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,86 @@
1
+ /**
2
+ * Complex number type
3
+ */
4
+ export interface Complex {
5
+ real: number;
6
+ imaginary: number;
7
+ }
8
+ /**
9
+ * typeguard
10
+ *
11
+ * @internal
12
+ */
13
+ export declare const IsComplex: (value: unknown) => value is Complex;
14
+ /**
15
+ * @internal
16
+ */
17
+ export declare const ComplexToString: (value: Complex) => string;
18
+ /**
19
+ * dimensioned quantity: 3.2 m/s, 2kg, 5m, &c.
20
+ */
21
+ export interface DimensionedQuantity {
22
+ value: number;
23
+ unit: string;
24
+ }
25
+ /**
26
+ * typeguard
27
+ *
28
+ * @internal
29
+ */
30
+ export declare const IsDimensionedQuantity: (value: unknown) => value is DimensionedQuantity;
31
+ /** temp until we have a solid type */
32
+ export declare const IsFunctionType: (value: unknown) => boolean;
33
+ /**
34
+ * this is the list of value types. internally, we use an enum. I don't
35
+ * want to change that, at least not at the moment, but that presents a
36
+ * problem for exporting types.
37
+ *
38
+ * we'll switch to string types for import/export, although we still support
39
+ * importing the old numeric enum types for backwards compatibility.
40
+ *
41
+ * @internal
42
+ *
43
+ */
44
+ export declare const ValueTypeList: readonly ["undefined", "formula", "string", "number", "boolean", "object", "function", "error", "complex", "array", "dimensioned_quantity"];
45
+ /**
46
+ * string types for import/export
47
+ *
48
+ * @internalRemarks
49
+ *
50
+ * temporarily switching to literal, see what happens to API
51
+ *
52
+ */
53
+ export type SerializedValueType = // typeof ValueTypeList[number];
54
+ 'undefined' | 'formula' | 'string' | 'number' | 'boolean' | 'object' | 'function' | 'error' | 'complex' | 'array' | 'dimensioned_quantity';
55
+ /**
56
+ * this enum goes back a long way and is pretty ingrained, so I don't
57
+ * want to change it (at least not right now). but if we're exporting types,
58
+ * using enums is a problem.
59
+ *
60
+ * what we will do is keep the enum internally but switch the exported type
61
+ * to a string. the problem then becomes keeping the types matched up
62
+ * properly. I can't arrive at a good way of doing that automatically.
63
+ *
64
+ * old comments:
65
+ *
66
+ * undefined is 0 so we can test it as falsy.
67
+ *
68
+ * we're passing this type information out to calculators, so it needs
69
+ * to have known values. DO NOT MODIFY EXISTING INDEXES, or at least be
70
+ * aware of the implications. definitely do not change undefined => 0.
71
+ */
72
+ export declare enum ValueType {
73
+ undefined = 0,
74
+ formula = 1,
75
+ string = 2,
76
+ number = 3,
77
+ boolean = 4,
78
+ object = 5,
79
+ function = 6,// why was this inserted in the middle?
80
+ error = 7,
81
+ complex = 8,
82
+ array = 9,
83
+ dimensioned_quantity = 10
84
+ }
85
+ /** @internal */
86
+ export declare const GetValueType: (value: unknown) => ValueType;
@@ -0,0 +1,168 @@
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
+ /**
22
+ * typeguard
23
+ *
24
+ * @internal
25
+ */
26
+ export const IsComplex = (value) => {
27
+ return (typeof value === 'object')
28
+ && (!!value)
29
+ && (typeof value.real === 'number')
30
+ && (typeof value.imaginary === 'number');
31
+ };
32
+ /**
33
+ * @internal
34
+ */
35
+ export const ComplexToString = (value) => {
36
+ if (value.real) {
37
+ if (value.imaginary) {
38
+ if (value.imaginary > 0) {
39
+ return `${value.real} + ${value.imaginary}i`;
40
+ }
41
+ else {
42
+ return `${value.real} - ${Math.abs(value.imaginary)}i`;
43
+ }
44
+ }
45
+ else {
46
+ return value.real.toString();
47
+ }
48
+ }
49
+ else if (value.imaginary) {
50
+ return value.imaginary + 'i';
51
+ }
52
+ else {
53
+ return '0';
54
+ }
55
+ };
56
+ /**
57
+ * typeguard
58
+ *
59
+ * @internal
60
+ */
61
+ export const IsDimensionedQuantity = (value) => {
62
+ return (typeof value === 'object')
63
+ && (!!value)
64
+ && (typeof value.value === 'number')
65
+ && (typeof value.unit === 'string');
66
+ };
67
+ /** temp until we have a solid type */
68
+ export const IsFunctionType = (value) => {
69
+ return (typeof value === 'object' && value.type === 'function');
70
+ };
71
+ /**
72
+ * this is the list of value types. internally, we use an enum. I don't
73
+ * want to change that, at least not at the moment, but that presents a
74
+ * problem for exporting types.
75
+ *
76
+ * we'll switch to string types for import/export, although we still support
77
+ * importing the old numeric enum types for backwards compatibility.
78
+ *
79
+ * @internal
80
+ *
81
+ */
82
+ export const ValueTypeList = [
83
+ 'undefined',
84
+ 'formula',
85
+ 'string',
86
+ 'number',
87
+ 'boolean',
88
+ 'object',
89
+ 'function',
90
+ 'error',
91
+ 'complex',
92
+ 'array',
93
+ 'dimensioned_quantity',
94
+ ];
95
+ /**
96
+ * this enum goes back a long way and is pretty ingrained, so I don't
97
+ * want to change it (at least not right now). but if we're exporting types,
98
+ * using enums is a problem.
99
+ *
100
+ * what we will do is keep the enum internally but switch the exported type
101
+ * to a string. the problem then becomes keeping the types matched up
102
+ * properly. I can't arrive at a good way of doing that automatically.
103
+ *
104
+ * old comments:
105
+ *
106
+ * undefined is 0 so we can test it as falsy.
107
+ *
108
+ * we're passing this type information out to calculators, so it needs
109
+ * to have known values. DO NOT MODIFY EXISTING INDEXES, or at least be
110
+ * aware of the implications. definitely do not change undefined => 0.
111
+ */
112
+ export var ValueType;
113
+ (function (ValueType) {
114
+ ValueType[ValueType["undefined"] = 0] = "undefined";
115
+ // formula is a string; we usually test the first character === '='
116
+ ValueType[ValueType["formula"] = 1] = "formula";
117
+ ValueType[ValueType["string"] = 2] = "string";
118
+ ValueType[ValueType["number"] = 3] = "number";
119
+ ValueType[ValueType["boolean"] = 4] = "boolean";
120
+ // we don't actually use this type, it's here for matching only
121
+ // OK we use it all the time now
122
+ ValueType[ValueType["object"] = 5] = "object";
123
+ ValueType[ValueType["function"] = 6] = "function";
124
+ // error is a STRING VALUE... object errors are layered on top? is that
125
+ // correct? (...) it sort of makes sense... since we have separate typing
126
+ ValueType[ValueType["error"] = 7] = "error";
127
+ // complex is pretty stable by now
128
+ ValueType[ValueType["complex"] = 8] = "complex";
129
+ // this is new though. this is not a cell value, it's
130
+ // only for union types. perhaps we should move or rename
131
+ // this array, and then cells could have a subset?
132
+ ValueType[ValueType["array"] = 9] = "array";
133
+ // adding DQ to union
134
+ ValueType[ValueType["dimensioned_quantity"] = 10] = "dimensioned_quantity";
135
+ })(ValueType || (ValueType = {}));
136
+ /** @internal */
137
+ export const GetValueType = (value) => {
138
+ switch (typeof value) {
139
+ case 'undefined':
140
+ return ValueType.undefined;
141
+ case 'number':
142
+ return ValueType.number;
143
+ case 'boolean':
144
+ return ValueType.boolean;
145
+ case 'object':
146
+ if (value === null) {
147
+ return ValueType.undefined;
148
+ }
149
+ else if (IsFunctionType(value)) {
150
+ return ValueType.function;
151
+ }
152
+ else if (IsComplex(value)) {
153
+ return ValueType.complex;
154
+ }
155
+ else if (IsDimensionedQuantity(value)) {
156
+ return ValueType.dimensioned_quantity;
157
+ }
158
+ return ValueType.object;
159
+ case 'string':
160
+ if (value[0] === '=') {
161
+ return ValueType.formula;
162
+ }
163
+ return ValueType.string;
164
+ default: // function or symbol
165
+ return ValueType.error;
166
+ }
167
+ };
168
+ //# sourceMappingURL=value-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-type.js","sourceRoot":"","sources":["../../../treb-base-types/src/value-type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAUH;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAc,EAAoB,EAAE;IAC5D,OAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;WACvB,CAAC,CAAC,CAAC,KAAK,CAAC;WACT,CAAC,OAAQ,KAAiB,CAAC,IAAI,KAAK,QAAQ,CAAC;WAC7C,CAAC,OAAQ,KAAiB,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAc,EAAU,EAAE;IACxD,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACf,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YACpB,IAAI,KAAK,CAAC,SAAS,GAAG,CAAC,EAAE,CAAC;gBACxB,OAAO,GAAG,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,SAAS,GAAG,CAAC;YAC/C,CAAC;iBACI,CAAC;gBACJ,OAAO,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AAS,CAAC,KAAK,CAAC;IAE3B,CAAC;AACH,CAAC,CAAA"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * this is a wrapper for workers. we want to support node in addition to the
3
+ * browser. bun seems to support web APIs with no modification, but node needs
4
+ * special attention. not sure about deno.
5
+ *
6
+ * switching to specific classes for different environments. also the plan is
7
+ * to add a main-thread (i.e. no-worker, inline calc) version.
8
+ *
9
+ */
10
+ export interface WorkerProxy<TX, RX = TX> {
11
+ /** terminate worker */
12
+ Terminate: () => void;
13
+ /** initialize, possibly loading code */
14
+ Init: (url: string, browser_init_method: () => Worker) => Promise<void>;
15
+ /** wrapper for postMessage */
16
+ PostMessage: (message: TX) => void;
17
+ /** wrapper for addEventListener */
18
+ OnMessage: (fn: (message: MessageEvent<RX>) => void | Promise<void>) => void;
19
+ /** wrapper for addEventListener */
20
+ OnError: (fn: (message: ErrorEvent) => void | Promise<void>) => void;
21
+ }
22
+ export declare class WorkerProxyBrowser<TX, RX = TX> implements WorkerProxy<TX, RX> {
23
+ worker?: Worker;
24
+ Terminate(): void;
25
+ /**
26
+ * OK this changed to support svelte/vite/I guess it's all rollup under
27
+ * the hood. whatever the tool is, it does static analysis and it has
28
+ * to see the pattern loaded in order to bundle the worker module. so
29
+ * we play ball. this is not a good situation.
30
+ *
31
+ * the browser init method should look something like this:
32
+ *
33
+ * () => {
34
+ * return new Worker(new URL(url, import.meta.url), {
35
+ * type: 'module'
36
+ * }) as Worker;
37
+ * }
38
+ *
39
+ * so that the code analyzer will see it.
40
+ *
41
+ * @param url
42
+ * @param browser_init_method
43
+ */
44
+ Init(url: string, browser_init_method: () => Worker): Promise<void>;
45
+ PostMessage(message: TX): void;
46
+ OnMessage(fn: (message: MessageEvent<RX>) => (void | Promise<void>)): void;
47
+ OnError(fn: (message: ErrorEvent) => (void | Promise<void>)): void;
48
+ }
49
+ export declare class WorkerProxyNode<TX, RX = TX> implements WorkerProxy<TX, RX> {
50
+ worker?: {
51
+ postMessage: (message: TX) => void | Promise<void>;
52
+ terminate: () => void;
53
+ on: (type: 'message' | 'error', handler: (data: RX) => void | Promise<void>) => void;
54
+ };
55
+ Terminate(): void;
56
+ Init(url: string): Promise<void>;
57
+ PostMessage(message: TX): void;
58
+ OnMessage(fn: (message: MessageEvent<RX>) => (void | Promise<void>)): void;
59
+ OnError(fn: (message: ErrorEvent) => (void | Promise<void>)): void;
60
+ }
61
+ interface InProcessContext<TX, RX> {
62
+ addEventListener: (type: 'message', handler: (event: MessageEvent<TX>) => void | Promise<void>) => void;
63
+ postMessage: (data: RX) => void;
64
+ }
65
+ type composite<TX, RX> = WorkerProxy<TX, RX> & InProcessContext<TX, RX>;
66
+ export declare class WorkerProxyInProcess<TX, RX = TX> implements composite<TX, RX> {
67
+ protected tx_cache: TX[];
68
+ protected main_thread_to_worker_message_handler?: (event: MessageEvent<TX>) => void | Promise<void>;
69
+ protected rx_cache: RX[];
70
+ protected worker_to_main_thread_message_handler?: (message: MessageEvent<RX>) => void | Promise<void>;
71
+ Terminate(): void;
72
+ Init(url: string): Promise<void>;
73
+ /** post message from "worker" to "main thread" */
74
+ PostMessage(message: TX): void;
75
+ /** callback when "main thread" sends message to "worker" */
76
+ OnMessage(fn: (message: MessageEvent<RX>) => (void | Promise<void>)): void;
77
+ OnError(fn: (message: ErrorEvent) => (void | Promise<void>)): void;
78
+ FlushCache<T>(cache: T[], fn: (message: MessageEvent<T>) => void | Promise<void>): void;
79
+ addEventListener(type: 'message', handler: (event: MessageEvent<TX>) => void | Promise<void>): void;
80
+ postMessage(data: RX): void;
81
+ }
82
+ /**
83
+ * factory method for workers. supports web workers (also bun), node workers
84
+ * and (via parameter) in-process workers. we're still figuring out how to
85
+ * signal that we're in process, currently somewhat clumsy
86
+ *
87
+ * @param in_process
88
+ * @returns
89
+ */
90
+ export declare function CreateWorker<TX, RX = TX>(in_process?: boolean): WorkerProxy<TX, RX>;
91
+ /**
92
+ * this is for the worker side, to normalize postMessage/onmessage
93
+ */
94
+ export declare const GetWorkerContext: () => Promise<Worker>;
95
+ export {};
@@ -0,0 +1,221 @@
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
+ function CheckNodeSemantics() {
22
+ return typeof Worker === 'undefined';
23
+ }
24
+ export class WorkerProxyBrowser {
25
+ worker;
26
+ Terminate() {
27
+ this.worker?.terminate();
28
+ }
29
+ /**
30
+ * OK this changed to support svelte/vite/I guess it's all rollup under
31
+ * the hood. whatever the tool is, it does static analysis and it has
32
+ * to see the pattern loaded in order to bundle the worker module. so
33
+ * we play ball. this is not a good situation.
34
+ *
35
+ * the browser init method should look something like this:
36
+ *
37
+ * () => {
38
+ * return new Worker(new URL(url, import.meta.url), {
39
+ * type: 'module'
40
+ * }) as Worker;
41
+ * }
42
+ *
43
+ * so that the code analyzer will see it.
44
+ *
45
+ * @param url
46
+ * @param browser_init_method
47
+ */
48
+ async Init(url, browser_init_method) {
49
+ this.worker = browser_init_method();
50
+ }
51
+ PostMessage(message) {
52
+ this.worker?.postMessage(message);
53
+ }
54
+ OnMessage(fn) {
55
+ if (this.worker) {
56
+ this.worker.onmessage = fn;
57
+ }
58
+ }
59
+ OnError(fn) {
60
+ if (this.worker) {
61
+ this.worker.onerror = fn;
62
+ }
63
+ }
64
+ }
65
+ export class WorkerProxyNode {
66
+ worker;
67
+ Terminate() {
68
+ this.worker?.terminate();
69
+ }
70
+ async Init(url) {
71
+ const { Worker: NodeWorker } = await import('node:worker_threads');
72
+ this.worker = new NodeWorker(new URL(url, import.meta.url));
73
+ }
74
+ PostMessage(message) {
75
+ // apparently postMessage works on node workers as well?
76
+ this.worker?.postMessage(message);
77
+ }
78
+ OnMessage(fn) {
79
+ if (this.worker) {
80
+ this.worker.on('message', (data) => fn({ data }));
81
+ }
82
+ }
83
+ OnError(fn) {
84
+ if (this.worker) {
85
+ this.worker.on('error', (err) => fn({ error: err }));
86
+ }
87
+ }
88
+ }
89
+ let in_process_worker_context = undefined;
90
+ export class WorkerProxyInProcess {
91
+ tx_cache = [];
92
+ main_thread_to_worker_message_handler;
93
+ rx_cache = [];
94
+ worker_to_main_thread_message_handler;
95
+ Terminate() {
96
+ this.tx_cache = [];
97
+ this.rx_cache = [];
98
+ this.main_thread_to_worker_message_handler = undefined;
99
+ this.worker_to_main_thread_message_handler = undefined;
100
+ }
101
+ async Init(url) {
102
+ in_process_worker_context = this;
103
+ /* @vite-ignore */
104
+ await import(new URL(url, import.meta.url).toString());
105
+ }
106
+ /** post message from "worker" to "main thread" */
107
+ PostMessage(message) {
108
+ if (this.main_thread_to_worker_message_handler) {
109
+ // console.info('calling handler', message);
110
+ const handler = this.main_thread_to_worker_message_handler;
111
+ Promise.resolve().then(() => handler({ data: message }));
112
+ }
113
+ else {
114
+ // console.info("no handler, caching message");
115
+ this.tx_cache.push(message);
116
+ }
117
+ }
118
+ /** callback when "main thread" sends message to "worker" */
119
+ OnMessage(fn) {
120
+ this.worker_to_main_thread_message_handler = fn;
121
+ if (this.rx_cache.length) {
122
+ const copy = [...this.rx_cache];
123
+ this.rx_cache = [];
124
+ this.FlushCache(copy, fn);
125
+ }
126
+ }
127
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
128
+ OnError(fn) {
129
+ // ??
130
+ }
131
+ FlushCache(cache, fn) {
132
+ // console.info(`flush cache ${cache.length}`);
133
+ Promise.resolve().then(async () => {
134
+ for (const message of cache) {
135
+ const result = fn({ data: message });
136
+ if (result instanceof Promise) {
137
+ await result; // serial?
138
+ }
139
+ }
140
+ });
141
+ }
142
+ addEventListener(type, handler) {
143
+ this.main_thread_to_worker_message_handler = handler;
144
+ if (this.tx_cache.length) {
145
+ const copy = [...this.tx_cache];
146
+ this.tx_cache = [];
147
+ this.FlushCache(copy, handler);
148
+ }
149
+ }
150
+ postMessage(data) {
151
+ if (this.worker_to_main_thread_message_handler) {
152
+ this.worker_to_main_thread_message_handler({ data });
153
+ }
154
+ else {
155
+ this.rx_cache.push(data);
156
+ }
157
+ }
158
+ }
159
+ /**
160
+ * factory method for workers. supports web workers (also bun), node workers
161
+ * and (via parameter) in-process workers. we're still figuring out how to
162
+ * signal that we're in process, currently somewhat clumsy
163
+ *
164
+ * @param in_process
165
+ * @returns
166
+ */
167
+ export function CreateWorker(in_process = false) {
168
+ if (in_process) {
169
+ if (process.env.NODE_ENV !== 'production') {
170
+ if (!globalThis.worker_console_message) {
171
+ console.info('using in-process worker');
172
+ globalThis.worker_console_message = true;
173
+ }
174
+ }
175
+ return new WorkerProxyInProcess();
176
+ }
177
+ if (CheckNodeSemantics()) {
178
+ if (process.env.NODE_ENV !== 'production') {
179
+ if (!globalThis.worker_console_message) {
180
+ console.info('using node worker');
181
+ globalThis.worker_console_message = true;
182
+ }
183
+ }
184
+ return new WorkerProxyNode();
185
+ }
186
+ if (process.env.NODE_ENV !== 'production') {
187
+ if (!globalThis.worker_console_message) {
188
+ console.info('using standard web worker');
189
+ globalThis.worker_console_message = true;
190
+ }
191
+ }
192
+ return new WorkerProxyBrowser();
193
+ }
194
+ ;
195
+ /**
196
+ * this is for the worker side, to normalize postMessage/onmessage
197
+ */
198
+ export const GetWorkerContext = async () => {
199
+ let ctx;
200
+ if (in_process_worker_context) {
201
+ ctx = in_process_worker_context;
202
+ }
203
+ else if (typeof self === 'undefined') {
204
+ const { parentPort } = await import('node:worker_threads');
205
+ ctx = {
206
+ postMessage: (data) => {
207
+ parentPort?.postMessage(data);
208
+ },
209
+ addEventListener: (type, handler) => {
210
+ parentPort?.on('message', (data) => {
211
+ handler({ data });
212
+ });
213
+ },
214
+ };
215
+ }
216
+ else {
217
+ ctx = self;
218
+ }
219
+ return ctx;
220
+ };
221
+ //# sourceMappingURL=worker-proxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-proxy.js","sourceRoot":"","sources":["../../../treb-base-types/src/worker-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA8BH,SAAS,kBAAkB;IACzB,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC;AACvC,CAAC;AAED,MAAM,OAAO,kBAAkB;IAEtB,MAAM,CAAU;IAEhB,SAAS;QACd,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC;IAC3B,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACI,KAAK,CAAC,IAAI,CAAC,GAAW,EAAE,mBAAiC;QAC9D,IAAI,CAAC,MAAM,GAAG,mBAAmB,EAAE,CAAC;IACtC,CAAC;IAEM,WAAW,CAAC,OAAW;QAC5B,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAEM,SAAS,CAAC,EAAuD;QACtE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;IAEM,OAAO,CAAC,EAAiD;QAC9D,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;CAEF;AAED,MAAM,OAAO,eAAe;IAEnB,MAAM,CAIX;IAEK,SAAS;QACd,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,GAAW;QAC3B,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAA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