@trebco/treb 36.1.4 → 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 (552) hide show
  1. package/api-config.json +1 -1
  2. package/build/package.json +119 -0
  3. package/build/treb-base-types/src/api_types.d.ts +11 -0
  4. package/build/treb-base-types/src/api_types.js +22 -0
  5. package/build/treb-base-types/src/api_types.js.map +1 -0
  6. package/build/treb-base-types/src/area-utils.d.ts +9 -0
  7. package/build/treb-base-types/src/area-utils.js +50 -0
  8. package/build/treb-base-types/src/area-utils.js.map +1 -0
  9. package/build/treb-base-types/src/area.d.ts +182 -0
  10. package/build/treb-base-types/src/area.js +715 -0
  11. package/build/treb-base-types/src/area.js.map +1 -0
  12. package/build/treb-base-types/src/basic_types.d.ts +20 -0
  13. package/build/treb-base-types/src/basic_types.js +22 -0
  14. package/build/treb-base-types/src/basic_types.js.map +1 -0
  15. package/build/treb-base-types/src/cell.d.ts +167 -0
  16. package/build/treb-base-types/src/cell.js +432 -0
  17. package/build/treb-base-types/src/cell.js.map +1 -0
  18. package/build/treb-base-types/src/cells.d.ts +251 -0
  19. package/build/treb-base-types/src/cells.js +1136 -0
  20. package/build/treb-base-types/src/cells.js.map +1 -0
  21. package/build/treb-base-types/src/color.d.ts +35 -0
  22. package/build/treb-base-types/src/color.js +162 -0
  23. package/build/treb-base-types/src/color.js.map +1 -0
  24. package/build/treb-base-types/src/dom-utilities.d.ts +70 -0
  25. package/build/treb-base-types/src/dom-utilities.js +144 -0
  26. package/build/treb-base-types/src/dom-utilities.js.map +1 -0
  27. package/build/treb-base-types/src/evaluate-options.d.ts +35 -0
  28. package/build/treb-base-types/src/evaluate-options.js +22 -0
  29. package/build/treb-base-types/src/evaluate-options.js.map +1 -0
  30. package/build/treb-base-types/src/font-stack.d.ts +37 -0
  31. package/build/treb-base-types/src/font-stack.js +93 -0
  32. package/build/treb-base-types/src/font-stack.js.map +1 -0
  33. package/build/treb-base-types/src/gradient.d.ts +18 -0
  34. package/build/treb-base-types/src/gradient.js +86 -0
  35. package/build/treb-base-types/src/gradient.js.map +1 -0
  36. package/build/treb-base-types/src/import.d.ts +48 -0
  37. package/build/treb-base-types/src/import.js +22 -0
  38. package/build/treb-base-types/src/import.js.map +1 -0
  39. package/build/treb-base-types/src/index-standalone.d.ts +6 -0
  40. package/build/treb-base-types/src/index-standalone.js +27 -0
  41. package/build/treb-base-types/src/index-standalone.js.map +1 -0
  42. package/build/treb-base-types/src/index.d.ts +22 -0
  43. package/build/treb-base-types/src/index.js +45 -0
  44. package/build/treb-base-types/src/index.js.map +1 -0
  45. package/build/treb-base-types/src/layout.d.ts +22 -0
  46. package/build/treb-base-types/src/layout.js +22 -0
  47. package/build/treb-base-types/src/layout.js.map +1 -0
  48. package/build/treb-base-types/src/localization.d.ts +37 -0
  49. package/build/treb-base-types/src/localization.js +157 -0
  50. package/build/treb-base-types/src/localization.js.map +1 -0
  51. package/build/treb-base-types/src/rectangle.d.ts +51 -0
  52. package/build/treb-base-types/src/rectangle.js +123 -0
  53. package/build/treb-base-types/src/rectangle.js.map +1 -0
  54. package/build/treb-base-types/src/render_text.d.ts +34 -0
  55. package/build/treb-base-types/src/render_text.js +22 -0
  56. package/build/treb-base-types/src/render_text.js.map +1 -0
  57. package/build/treb-base-types/src/style.d.ts +214 -0
  58. package/build/treb-base-types/src/style.js +373 -0
  59. package/build/treb-base-types/src/style.js.map +1 -0
  60. package/build/treb-base-types/src/table.d.ts +58 -0
  61. package/build/treb-base-types/src/table.js +27 -0
  62. package/build/treb-base-types/src/table.js.map +1 -0
  63. package/build/treb-base-types/src/text_part.d.ts +26 -0
  64. package/build/treb-base-types/src/text_part.js +47 -0
  65. package/build/treb-base-types/src/text_part.js.map +1 -0
  66. package/build/treb-base-types/src/theme.d.ts +120 -0
  67. package/build/treb-base-types/src/theme.js +460 -0
  68. package/build/treb-base-types/src/theme.js.map +1 -0
  69. package/build/treb-base-types/src/union.d.ts +73 -0
  70. package/build/treb-base-types/src/union.js +61 -0
  71. package/build/treb-base-types/src/union.js.map +1 -0
  72. package/build/treb-base-types/src/value-type.d.ts +86 -0
  73. package/build/treb-base-types/src/value-type.js +168 -0
  74. package/build/treb-base-types/src/value-type.js.map +1 -0
  75. package/build/treb-base-types/src/worker-proxy.d.ts +95 -0
  76. package/build/treb-base-types/src/worker-proxy.js +221 -0
  77. package/build/treb-base-types/src/worker-proxy.js.map +1 -0
  78. package/build/treb-calculator/src/calculator.d.ts +249 -0
  79. package/build/treb-calculator/src/calculator.js +2755 -0
  80. package/build/treb-calculator/src/calculator.js.map +1 -0
  81. package/build/treb-calculator/src/complex-math.d.ts +75 -0
  82. package/build/treb-calculator/src/complex-math.js +559 -0
  83. package/build/treb-calculator/src/complex-math.js.map +1 -0
  84. package/build/treb-calculator/src/dag/array-vertex.d.ts +71 -0
  85. package/build/treb-calculator/src/dag/array-vertex.js +156 -0
  86. package/build/treb-calculator/src/dag/array-vertex.js.map +1 -0
  87. package/build/treb-calculator/src/dag/calculation_leaf_vertex.d.ts +48 -0
  88. package/build/treb-calculator/src/dag/calculation_leaf_vertex.js +84 -0
  89. package/build/treb-calculator/src/dag/calculation_leaf_vertex.js.map +1 -0
  90. package/build/treb-calculator/src/dag/graph.d.ts +134 -0
  91. package/build/treb-calculator/src/dag/graph.js +842 -0
  92. package/build/treb-calculator/src/dag/graph.js.map +1 -0
  93. package/build/treb-calculator/src/dag/spreadsheet_vertex.d.ts +58 -0
  94. package/build/treb-calculator/src/dag/spreadsheet_vertex.js +232 -0
  95. package/build/treb-calculator/src/dag/spreadsheet_vertex.js.map +1 -0
  96. package/build/treb-calculator/src/dag/spreadsheet_vertex_base.d.ts +20 -0
  97. package/build/treb-calculator/src/dag/spreadsheet_vertex_base.js +25 -0
  98. package/build/treb-calculator/src/dag/spreadsheet_vertex_base.js.map +1 -0
  99. package/build/treb-calculator/src/dag/state_leaf_vertex.d.ts +43 -0
  100. package/build/treb-calculator/src/dag/state_leaf_vertex.js +81 -0
  101. package/build/treb-calculator/src/dag/state_leaf_vertex.js.map +1 -0
  102. package/build/treb-calculator/src/dag/vertex.d.ts +71 -0
  103. package/build/treb-calculator/src/dag/vertex.js +274 -0
  104. package/build/treb-calculator/src/dag/vertex.js.map +1 -0
  105. package/build/treb-calculator/src/descriptors.d.ts +189 -0
  106. package/build/treb-calculator/src/descriptors.js +22 -0
  107. package/build/treb-calculator/src/descriptors.js.map +1 -0
  108. package/build/treb-calculator/src/expression-calculator.d.ts +127 -0
  109. package/build/treb-calculator/src/expression-calculator.js +1033 -0
  110. package/build/treb-calculator/src/expression-calculator.js.map +1 -0
  111. package/build/treb-calculator/src/function-error.d.ts +35 -0
  112. package/build/treb-calculator/src/function-error.js +85 -0
  113. package/build/treb-calculator/src/function-error.js.map +1 -0
  114. package/build/treb-calculator/src/function-library.d.ts +22 -0
  115. package/build/treb-calculator/src/function-library.js +96 -0
  116. package/build/treb-calculator/src/function-library.js.map +1 -0
  117. package/build/treb-calculator/src/functions/base-functions.d.ts +7 -0
  118. package/build/treb-calculator/src/functions/base-functions.js +2611 -0
  119. package/build/treb-calculator/src/functions/base-functions.js.map +1 -0
  120. package/build/treb-calculator/src/functions/beta.d.ts +17 -0
  121. package/build/treb-calculator/src/functions/beta.js +201 -0
  122. package/build/treb-calculator/src/functions/beta.js.map +1 -0
  123. package/build/treb-calculator/src/functions/checkbox.d.ts +3 -0
  124. package/build/treb-calculator/src/functions/checkbox.js +128 -0
  125. package/build/treb-calculator/src/functions/checkbox.js.map +1 -0
  126. package/build/treb-calculator/src/functions/complex-functions.d.ts +2 -0
  127. package/build/treb-calculator/src/functions/complex-functions.js +217 -0
  128. package/build/treb-calculator/src/functions/complex-functions.js.map +1 -0
  129. package/build/treb-calculator/src/functions/date-utils.d.ts +3 -0
  130. package/build/treb-calculator/src/functions/date-utils.js +59 -0
  131. package/build/treb-calculator/src/functions/date-utils.js.map +1 -0
  132. package/build/treb-calculator/src/functions/finance-functions.d.ts +2 -0
  133. package/build/treb-calculator/src/functions/finance-functions.js +547 -0
  134. package/build/treb-calculator/src/functions/finance-functions.js.map +1 -0
  135. package/build/treb-calculator/src/functions/fp.d.ts +2 -0
  136. package/build/treb-calculator/src/functions/fp.js +463 -0
  137. package/build/treb-calculator/src/functions/fp.js.map +1 -0
  138. package/build/treb-calculator/src/functions/function-utilities.d.ts +2 -0
  139. package/build/treb-calculator/src/functions/function-utilities.js +36 -0
  140. package/build/treb-calculator/src/functions/function-utilities.js.map +1 -0
  141. package/build/treb-calculator/src/functions/gamma.d.ts +20 -0
  142. package/build/treb-calculator/src/functions/gamma.js +142 -0
  143. package/build/treb-calculator/src/functions/gamma.js.map +1 -0
  144. package/build/treb-calculator/src/functions/information-functions.d.ts +2 -0
  145. package/build/treb-calculator/src/functions/information-functions.js +71 -0
  146. package/build/treb-calculator/src/functions/information-functions.js.map +1 -0
  147. package/build/treb-calculator/src/functions/lambda-functions.d.ts +2 -0
  148. package/build/treb-calculator/src/functions/lambda-functions.js +85 -0
  149. package/build/treb-calculator/src/functions/lambda-functions.js.map +1 -0
  150. package/build/treb-calculator/src/functions/matrix-functions.d.ts +2 -0
  151. package/build/treb-calculator/src/functions/matrix-functions.js +144 -0
  152. package/build/treb-calculator/src/functions/matrix-functions.js.map +1 -0
  153. package/build/treb-calculator/src/functions/normal.d.ts +2 -0
  154. package/build/treb-calculator/src/functions/normal.js +32 -0
  155. package/build/treb-calculator/src/functions/normal.js.map +1 -0
  156. package/build/treb-calculator/src/functions/regex-functions.d.ts +2 -0
  157. package/build/treb-calculator/src/functions/regex-functions.js +188 -0
  158. package/build/treb-calculator/src/functions/regex-functions.js.map +1 -0
  159. package/build/treb-calculator/src/functions/sparkline.d.ts +37 -0
  160. package/build/treb-calculator/src/functions/sparkline.js +264 -0
  161. package/build/treb-calculator/src/functions/sparkline.js.map +1 -0
  162. package/build/treb-calculator/src/functions/statistics-functions.d.ts +6 -0
  163. package/build/treb-calculator/src/functions/statistics-functions.js +989 -0
  164. package/build/treb-calculator/src/functions/statistics-functions.js.map +1 -0
  165. package/build/treb-calculator/src/functions/students-t.d.ts +3 -0
  166. package/build/treb-calculator/src/functions/students-t.js +64 -0
  167. package/build/treb-calculator/src/functions/students-t.js.map +1 -0
  168. package/build/treb-calculator/src/functions/text-functions.d.ts +3 -0
  169. package/build/treb-calculator/src/functions/text-functions.js +320 -0
  170. package/build/treb-calculator/src/functions/text-functions.js.map +1 -0
  171. package/build/treb-calculator/src/index.d.ts +2 -0
  172. package/build/treb-calculator/src/index.js +22 -0
  173. package/build/treb-calculator/src/index.js.map +1 -0
  174. package/build/treb-calculator/src/notifier-types.d.ts +26 -0
  175. package/build/treb-calculator/src/notifier-types.js +22 -0
  176. package/build/treb-calculator/src/notifier-types.js.map +1 -0
  177. package/build/treb-calculator/src/primitives.d.ts +15 -0
  178. package/build/treb-calculator/src/primitives.js +398 -0
  179. package/build/treb-calculator/src/primitives.js.map +1 -0
  180. package/build/treb-calculator/src/utilities.d.ts +68 -0
  181. package/build/treb-calculator/src/utilities.js +324 -0
  182. package/build/treb-calculator/src/utilities.js.map +1 -0
  183. package/build/treb-charts/src/chart-functions.d.ts +8 -0
  184. package/build/treb-charts/src/chart-functions.js +209 -0
  185. package/build/treb-charts/src/chart-functions.js.map +1 -0
  186. package/build/treb-charts/src/chart-types.d.ts +233 -0
  187. package/build/treb-charts/src/chart-types.js +57 -0
  188. package/build/treb-charts/src/chart-types.js.map +1 -0
  189. package/build/treb-charts/src/chart-utils.d.ts +106 -0
  190. package/build/treb-charts/src/chart-utils.js +1060 -0
  191. package/build/treb-charts/src/chart-utils.js.map +1 -0
  192. package/build/treb-charts/src/chart.d.ts +23 -0
  193. package/build/treb-charts/src/chart.js +94 -0
  194. package/build/treb-charts/src/chart.js.map +1 -0
  195. package/build/treb-charts/src/default-chart-renderer.d.ts +16 -0
  196. package/build/treb-charts/src/default-chart-renderer.js +533 -0
  197. package/build/treb-charts/src/default-chart-renderer.js.map +1 -0
  198. package/build/treb-charts/src/index.d.ts +5 -0
  199. package/build/treb-charts/src/index.js +24 -0
  200. package/build/treb-charts/src/index.js.map +1 -0
  201. package/build/treb-charts/src/main.d.ts +1 -0
  202. package/build/treb-charts/src/main.js +34 -0
  203. package/build/treb-charts/src/main.js.map +1 -0
  204. package/build/treb-charts/src/quicksort.d.ts +1 -0
  205. package/build/treb-charts/src/quicksort.js +49 -0
  206. package/build/treb-charts/src/quicksort.js.map +1 -0
  207. package/build/treb-charts/src/rectangle.d.ts +18 -0
  208. package/build/treb-charts/src/rectangle.js +41 -0
  209. package/build/treb-charts/src/rectangle.js.map +1 -0
  210. package/build/treb-charts/src/renderer-type.d.ts +24 -0
  211. package/build/treb-charts/src/renderer-type.js +22 -0
  212. package/build/treb-charts/src/renderer-type.js.map +1 -0
  213. package/build/treb-charts/src/renderer.d.ts +127 -0
  214. package/build/treb-charts/src/renderer.js +1518 -0
  215. package/build/treb-charts/src/renderer.js.map +1 -0
  216. package/build/treb-charts/src/util.d.ts +18 -0
  217. package/build/treb-charts/src/util.js +71 -0
  218. package/build/treb-charts/src/util.js.map +1 -0
  219. package/build/treb-data-model/src/annotation.d.ts +167 -0
  220. package/build/treb-data-model/src/annotation.js +120 -0
  221. package/build/treb-data-model/src/annotation.js.map +1 -0
  222. package/build/treb-data-model/src/conditional_format.d.ts +155 -0
  223. package/build/treb-data-model/src/conditional_format.js +62 -0
  224. package/build/treb-data-model/src/conditional_format.js.map +1 -0
  225. package/build/treb-data-model/src/data-validation.d.ts +28 -0
  226. package/build/treb-data-model/src/data-validation.js +22 -0
  227. package/build/treb-data-model/src/data-validation.js.map +1 -0
  228. package/build/treb-data-model/src/data_model.d.ts +173 -0
  229. package/build/treb-data-model/src/data_model.js +637 -0
  230. package/build/treb-data-model/src/data_model.js.map +1 -0
  231. package/build/treb-data-model/src/index.d.ts +13 -0
  232. package/build/treb-data-model/src/index.js +28 -0
  233. package/build/treb-data-model/src/index.js.map +1 -0
  234. package/build/treb-data-model/src/language-model.d.ts +22 -0
  235. package/build/treb-data-model/src/language-model.js +22 -0
  236. package/build/treb-data-model/src/language-model.js.map +1 -0
  237. package/build/treb-data-model/src/named.d.ts +124 -0
  238. package/build/treb-data-model/src/named.js +372 -0
  239. package/build/treb-data-model/src/named.js.map +1 -0
  240. package/build/treb-data-model/src/serialize_options.d.ts +49 -0
  241. package/build/treb-data-model/src/serialize_options.js +22 -0
  242. package/build/treb-data-model/src/serialize_options.js.map +1 -0
  243. package/build/treb-data-model/src/sheet.d.ts +499 -0
  244. package/build/treb-data-model/src/sheet.js +2904 -0
  245. package/build/treb-data-model/src/sheet.js.map +1 -0
  246. package/build/treb-data-model/src/sheet_collection.d.ts +58 -0
  247. package/build/treb-data-model/src/sheet_collection.js +112 -0
  248. package/build/treb-data-model/src/sheet_collection.js.map +1 -0
  249. package/build/treb-data-model/src/sheet_selection.d.ts +42 -0
  250. package/build/treb-data-model/src/sheet_selection.js +39 -0
  251. package/build/treb-data-model/src/sheet_selection.js.map +1 -0
  252. package/build/treb-data-model/src/sheet_types.d.ts +104 -0
  253. package/build/treb-data-model/src/sheet_types.js +22 -0
  254. package/build/treb-data-model/src/sheet_types.js.map +1 -0
  255. package/build/treb-data-model/src/types.d.ts +59 -0
  256. package/build/treb-data-model/src/types.js +22 -0
  257. package/build/treb-data-model/src/types.js.map +1 -0
  258. package/build/treb-embed/src/custom-element/spreadsheet-constructor.d.ts +75 -0
  259. package/build/treb-embed/src/custom-element/spreadsheet-constructor.js +1144 -0
  260. package/build/treb-embed/src/custom-element/spreadsheet-constructor.js.map +1 -0
  261. package/build/treb-embed/src/custom-element/treb-global.d.ts +36 -0
  262. package/build/treb-embed/src/custom-element/treb-global.js +64 -0
  263. package/build/treb-embed/src/custom-element/treb-global.js.map +1 -0
  264. package/build/treb-embed/src/custom-element/treb-spreadsheet-element.d.ts +1 -0
  265. package/build/treb-embed/src/custom-element/treb-spreadsheet-element.js +61 -0
  266. package/build/treb-embed/src/custom-element/treb-spreadsheet-element.js.map +1 -0
  267. package/build/treb-embed/src/embedded-spreadsheet.d.ts +1358 -0
  268. package/build/treb-embed/src/embedded-spreadsheet.js +5205 -0
  269. package/build/treb-embed/src/embedded-spreadsheet.js.map +1 -0
  270. package/build/treb-embed/src/index.d.ts +12 -0
  271. package/build/treb-embed/src/index.js +34 -0
  272. package/build/treb-embed/src/index.js.map +1 -0
  273. package/build/treb-embed/src/options.d.ts +266 -0
  274. package/build/treb-embed/src/options.js +56 -0
  275. package/build/treb-embed/src/options.js.map +1 -0
  276. package/build/treb-embed/src/plugin.d.ts +9 -0
  277. package/build/treb-embed/src/plugin.js +22 -0
  278. package/build/treb-embed/src/plugin.js.map +1 -0
  279. package/build/treb-embed/src/progress-dialog.d.ts +49 -0
  280. package/build/treb-embed/src/progress-dialog.js +178 -0
  281. package/build/treb-embed/src/progress-dialog.js.map +1 -0
  282. package/build/treb-embed/src/selection-state.d.ts +15 -0
  283. package/build/treb-embed/src/selection-state.js +22 -0
  284. package/build/treb-embed/src/selection-state.js.map +1 -0
  285. package/build/treb-embed/src/spinner.d.ts +8 -0
  286. package/build/treb-embed/src/spinner.js +40 -0
  287. package/build/treb-embed/src/spinner.js.map +1 -0
  288. package/build/treb-embed/src/toolbar-message.d.ts +72 -0
  289. package/build/treb-embed/src/toolbar-message.js +22 -0
  290. package/build/treb-embed/src/toolbar-message.js.map +1 -0
  291. package/build/treb-embed/src/types.d.ts +185 -0
  292. package/build/treb-embed/src/types.js +45 -0
  293. package/build/treb-embed/src/types.js.map +1 -0
  294. package/build/treb-embed/tsconfig.tsbuildinfo +1 -0
  295. package/build/treb-export/src/address-type.d.ts +34 -0
  296. package/build/treb-export/src/address-type.js +53 -0
  297. package/build/treb-export/src/address-type.js.map +1 -0
  298. package/build/treb-export/src/base-template.d.ts +1 -0
  299. package/build/treb-export/src/base-template.js +22 -0
  300. package/build/treb-export/src/base-template.js.map +1 -0
  301. package/build/treb-export/src/column-width.d.ts +2 -0
  302. package/build/treb-export/src/column-width.js +80 -0
  303. package/build/treb-export/src/column-width.js.map +1 -0
  304. package/build/treb-export/src/drawing/bubble-chart-template.d.ts +514 -0
  305. package/build/treb-export/src/drawing/bubble-chart-template.js +544 -0
  306. package/build/treb-export/src/drawing/bubble-chart-template.js.map +1 -0
  307. package/build/treb-export/src/drawing/chart-template-components2.d.ts +365 -0
  308. package/build/treb-export/src/drawing/chart-template-components2.js +386 -0
  309. package/build/treb-export/src/drawing/chart-template-components2.js.map +1 -0
  310. package/build/treb-export/src/drawing/chart.d.ts +26 -0
  311. package/build/treb-export/src/drawing/chart.js +247 -0
  312. package/build/treb-export/src/drawing/chart.js.map +1 -0
  313. package/build/treb-export/src/drawing/column-chart-template2.d.ts +490 -0
  314. package/build/treb-export/src/drawing/column-chart-template2.js +518 -0
  315. package/build/treb-export/src/drawing/column-chart-template2.js.map +1 -0
  316. package/build/treb-export/src/drawing/donut-chart-template2.d.ts +272 -0
  317. package/build/treb-export/src/drawing/donut-chart-template2.js +293 -0
  318. package/build/treb-export/src/drawing/donut-chart-template2.js.map +1 -0
  319. package/build/treb-export/src/drawing/drawing.d.ts +49 -0
  320. package/build/treb-export/src/drawing/drawing.js +193 -0
  321. package/build/treb-export/src/drawing/drawing.js.map +1 -0
  322. package/build/treb-export/src/drawing/embedded-image.d.ts +12 -0
  323. package/build/treb-export/src/drawing/embedded-image.js +54 -0
  324. package/build/treb-export/src/drawing/embedded-image.js.map +1 -0
  325. package/build/treb-export/src/drawing/scatter-chart-template2.d.ts +520 -0
  326. package/build/treb-export/src/drawing/scatter-chart-template2.js +551 -0
  327. package/build/treb-export/src/drawing/scatter-chart-template2.js.map +1 -0
  328. package/build/treb-export/src/export.d.ts +72 -0
  329. package/build/treb-export/src/export.js +2039 -0
  330. package/build/treb-export/src/export.js.map +1 -0
  331. package/build/treb-export/src/import-export-messages.d.ts +31 -0
  332. package/build/treb-export/src/import-export-messages.js +22 -0
  333. package/build/treb-export/src/import-export-messages.js.map +1 -0
  334. package/build/treb-export/src/import.d.ts +33 -0
  335. package/build/treb-export/src/import.js +1258 -0
  336. package/build/treb-export/src/import.js.map +1 -0
  337. package/build/treb-export/src/index.worker.d.ts +1 -0
  338. package/build/treb-export/src/index.worker.js +93 -0
  339. package/build/treb-export/src/index.worker.js.map +1 -0
  340. package/build/treb-export/src/metadata.d.ts +51 -0
  341. package/build/treb-export/src/metadata.js +153 -0
  342. package/build/treb-export/src/metadata.js.map +1 -0
  343. package/build/treb-export/src/ooxml.d.ts +7 -0
  344. package/build/treb-export/src/ooxml.js +41 -0
  345. package/build/treb-export/src/ooxml.js.map +1 -0
  346. package/build/treb-export/src/relationship.d.ts +8 -0
  347. package/build/treb-export/src/relationship.js +27 -0
  348. package/build/treb-export/src/relationship.js.map +1 -0
  349. package/build/treb-export/src/shared-strings.d.ts +11 -0
  350. package/build/treb-export/src/shared-strings.js +105 -0
  351. package/build/treb-export/src/shared-strings.js.map +1 -0
  352. package/build/treb-export/src/template-2.d.ts +1 -0
  353. package/build/treb-export/src/template-2.js +22 -0
  354. package/build/treb-export/src/template-2.js.map +1 -0
  355. package/build/treb-export/src/unescape_xml.d.ts +1 -0
  356. package/build/treb-export/src/unescape_xml.js +61 -0
  357. package/build/treb-export/src/unescape_xml.js.map +1 -0
  358. package/build/treb-export/src/workbook-sheet.d.ts +75 -0
  359. package/build/treb-export/src/workbook-sheet.js +128 -0
  360. package/build/treb-export/src/workbook-sheet.js.map +1 -0
  361. package/build/treb-export/src/workbook-style.d.ts +110 -0
  362. package/build/treb-export/src/workbook-style.js +1134 -0
  363. package/build/treb-export/src/workbook-style.js.map +1 -0
  364. package/build/treb-export/src/workbook-theme.d.ts +13 -0
  365. package/build/treb-export/src/workbook-theme.js +85 -0
  366. package/build/treb-export/src/workbook-theme.js.map +1 -0
  367. package/build/treb-export/src/workbook.d.ts +123 -0
  368. package/build/treb-export/src/workbook.js +644 -0
  369. package/build/treb-export/src/workbook.js.map +1 -0
  370. package/build/treb-export/src/xml-test.d.ts +9 -0
  371. package/build/treb-export/src/xml-test.js +52 -0
  372. package/build/treb-export/src/xml-test.js.map +1 -0
  373. package/build/treb-export/src/xml-utils.d.ts +76 -0
  374. package/build/treb-export/src/xml-utils.js +223 -0
  375. package/build/treb-export/src/xml-utils.js.map +1 -0
  376. package/build/treb-export/src/zip-wrapper.d.ts +22 -0
  377. package/build/treb-export/src/zip-wrapper.js +93 -0
  378. package/build/treb-export/src/zip-wrapper.js.map +1 -0
  379. package/build/treb-format/src/format.d.ts +130 -0
  380. package/build/treb-format/src/format.js +805 -0
  381. package/build/treb-format/src/format.js.map +1 -0
  382. package/build/treb-format/src/format_cache.d.ts +55 -0
  383. package/build/treb-format/src/format_cache.js +166 -0
  384. package/build/treb-format/src/format_cache.js.map +1 -0
  385. package/build/treb-format/src/format_parser.d.ts +70 -0
  386. package/build/treb-format/src/format_parser.js +618 -0
  387. package/build/treb-format/src/format_parser.js.map +1 -0
  388. package/build/treb-format/src/index.d.ts +4 -0
  389. package/build/treb-format/src/index.js +25 -0
  390. package/build/treb-format/src/index.js.map +1 -0
  391. package/build/treb-format/src/number_format_section.d.ts +58 -0
  392. package/build/treb-format/src/number_format_section.js +78 -0
  393. package/build/treb-format/src/number_format_section.js.map +1 -0
  394. package/build/treb-format/src/value_parser.d.ts +48 -0
  395. package/build/treb-format/src/value_parser.js +244 -0
  396. package/build/treb-format/src/value_parser.js.map +1 -0
  397. package/build/treb-grid/src/editors/autocomplete.d.ts +39 -0
  398. package/build/treb-grid/src/editors/autocomplete.js +316 -0
  399. package/build/treb-grid/src/editors/autocomplete.js.map +1 -0
  400. package/build/treb-grid/src/editors/autocomplete_matcher.d.ts +74 -0
  401. package/build/treb-grid/src/editors/autocomplete_matcher.js +212 -0
  402. package/build/treb-grid/src/editors/autocomplete_matcher.js.map +1 -0
  403. package/build/treb-grid/src/editors/editor.d.ts +214 -0
  404. package/build/treb-grid/src/editors/editor.js +879 -0
  405. package/build/treb-grid/src/editors/editor.js.map +1 -0
  406. package/build/treb-grid/src/editors/external_editor.d.ts +11 -0
  407. package/build/treb-grid/src/editors/external_editor.js +118 -0
  408. package/build/treb-grid/src/editors/external_editor.js.map +1 -0
  409. package/build/treb-grid/src/editors/formula_bar.d.ts +85 -0
  410. package/build/treb-grid/src/editors/formula_bar.js +444 -0
  411. package/build/treb-grid/src/editors/formula_bar.js.map +1 -0
  412. package/build/treb-grid/src/editors/overlay_editor.d.ts +85 -0
  413. package/build/treb-grid/src/editors/overlay_editor.js +353 -0
  414. package/build/treb-grid/src/editors/overlay_editor.js.map +1 -0
  415. package/build/treb-grid/src/index.d.ts +12 -0
  416. package/build/treb-grid/src/index.js +28 -0
  417. package/build/treb-grid/src/index.js.map +1 -0
  418. package/build/treb-grid/src/layout/base_layout.d.ts +346 -0
  419. package/build/treb-grid/src/layout/base_layout.js +2050 -0
  420. package/build/treb-grid/src/layout/base_layout.js.map +1 -0
  421. package/build/treb-grid/src/layout/grid_layout.d.ts +19 -0
  422. package/build/treb-grid/src/layout/grid_layout.js +235 -0
  423. package/build/treb-grid/src/layout/grid_layout.js.map +1 -0
  424. package/build/treb-grid/src/layout/mock-layout.d.ts +10 -0
  425. package/build/treb-grid/src/layout/mock-layout.js +37 -0
  426. package/build/treb-grid/src/layout/mock-layout.js.map +1 -0
  427. package/build/treb-grid/src/render/selection-renderer.d.ts +97 -0
  428. package/build/treb-grid/src/render/selection-renderer.js +315 -0
  429. package/build/treb-grid/src/render/selection-renderer.js.map +1 -0
  430. package/build/treb-grid/src/render/svg_header_overlay.d.ts +20 -0
  431. package/build/treb-grid/src/render/svg_header_overlay.js +76 -0
  432. package/build/treb-grid/src/render/svg_header_overlay.js.map +1 -0
  433. package/build/treb-grid/src/render/svg_selection_block.d.ts +27 -0
  434. package/build/treb-grid/src/render/svg_selection_block.js +106 -0
  435. package/build/treb-grid/src/render/svg_selection_block.js.map +1 -0
  436. package/build/treb-grid/src/render/tile_renderer.d.ts +121 -0
  437. package/build/treb-grid/src/render/tile_renderer.js +1609 -0
  438. package/build/treb-grid/src/render/tile_renderer.js.map +1 -0
  439. package/build/treb-grid/src/types/border_constants.d.ts +9 -0
  440. package/build/treb-grid/src/types/border_constants.js +34 -0
  441. package/build/treb-grid/src/types/border_constants.js.map +1 -0
  442. package/build/treb-grid/src/types/clipboard_data.d.ts +11 -0
  443. package/build/treb-grid/src/types/clipboard_data.js +22 -0
  444. package/build/treb-grid/src/types/clipboard_data.js.map +1 -0
  445. package/build/treb-grid/src/types/clipboard_data2.d.ts +46 -0
  446. package/build/treb-grid/src/types/clipboard_data2.js +22 -0
  447. package/build/treb-grid/src/types/clipboard_data2.js.map +1 -0
  448. package/build/treb-grid/src/types/drag_mask.d.ts +10 -0
  449. package/build/treb-grid/src/types/drag_mask.js +78 -0
  450. package/build/treb-grid/src/types/drag_mask.js.map +1 -0
  451. package/build/treb-grid/src/types/external_editor_config.d.ts +33 -0
  452. package/build/treb-grid/src/types/external_editor_config.js +22 -0
  453. package/build/treb-grid/src/types/external_editor_config.js.map +1 -0
  454. package/build/treb-grid/src/types/grid.d.ts +806 -0
  455. package/build/treb-grid/src/types/grid.js +6410 -0
  456. package/build/treb-grid/src/types/grid.js.map +1 -0
  457. package/build/treb-grid/src/types/grid_base.d.ts +442 -0
  458. package/build/treb-grid/src/types/grid_base.js +3523 -0
  459. package/build/treb-grid/src/types/grid_base.js.map +1 -0
  460. package/build/treb-grid/src/types/grid_command.d.ts +408 -0
  461. package/build/treb-grid/src/types/grid_command.js +75 -0
  462. package/build/treb-grid/src/types/grid_command.js.map +1 -0
  463. package/build/treb-grid/src/types/grid_events.d.ts +93 -0
  464. package/build/treb-grid/src/types/grid_events.js +36 -0
  465. package/build/treb-grid/src/types/grid_events.js.map +1 -0
  466. package/build/treb-grid/src/types/grid_options.d.ts +50 -0
  467. package/build/treb-grid/src/types/grid_options.js +34 -0
  468. package/build/treb-grid/src/types/grid_options.js.map +1 -0
  469. package/build/treb-grid/src/types/scale-control.d.ts +21 -0
  470. package/build/treb-grid/src/types/scale-control.js +148 -0
  471. package/build/treb-grid/src/types/scale-control.js.map +1 -0
  472. package/build/treb-grid/src/types/set_range_options.d.ts +24 -0
  473. package/build/treb-grid/src/types/set_range_options.js +22 -0
  474. package/build/treb-grid/src/types/set_range_options.js.map +1 -0
  475. package/build/treb-grid/src/types/tab_bar.d.ts +84 -0
  476. package/build/treb-grid/src/types/tab_bar.js +426 -0
  477. package/build/treb-grid/src/types/tab_bar.js.map +1 -0
  478. package/build/treb-grid/src/types/tile.d.ts +29 -0
  479. package/build/treb-grid/src/types/tile.js +22 -0
  480. package/build/treb-grid/src/types/tile.js.map +1 -0
  481. package/build/treb-grid/src/types/update_flags.d.ts +48 -0
  482. package/build/treb-grid/src/types/update_flags.js +22 -0
  483. package/build/treb-grid/src/types/update_flags.js.map +1 -0
  484. package/build/treb-grid/src/util/fontmetrics.d.ts +21 -0
  485. package/build/treb-grid/src/util/fontmetrics.js +82 -0
  486. package/build/treb-grid/src/util/fontmetrics.js.map +1 -0
  487. package/build/treb-grid/src/util/ua.d.ts +33 -0
  488. package/build/treb-grid/src/util/ua.js +86 -0
  489. package/build/treb-grid/src/util/ua.js.map +1 -0
  490. package/build/treb-parser/src/csv-parser.d.ts +13 -0
  491. package/build/treb-parser/src/csv-parser.js +107 -0
  492. package/build/treb-parser/src/csv-parser.js.map +1 -0
  493. package/build/treb-parser/src/index.d.ts +4 -0
  494. package/build/treb-parser/src/index.js +25 -0
  495. package/build/treb-parser/src/index.js.map +1 -0
  496. package/build/treb-parser/src/md-parser.d.ts +97 -0
  497. package/build/treb-parser/src/md-parser.js +403 -0
  498. package/build/treb-parser/src/md-parser.js.map +1 -0
  499. package/build/treb-parser/src/parser-types.d.ts +345 -0
  500. package/build/treb-parser/src/parser-types.js +53 -0
  501. package/build/treb-parser/src/parser-types.js.map +1 -0
  502. package/build/treb-parser/src/parser.d.ts +422 -0
  503. package/build/treb-parser/src/parser.js +2418 -0
  504. package/build/treb-parser/src/parser.js.map +1 -0
  505. package/build/treb-utils/src/event_source.d.ts +34 -0
  506. package/build/treb-utils/src/event_source.js +110 -0
  507. package/build/treb-utils/src/event_source.js.map +1 -0
  508. package/build/treb-utils/src/ievent_source.d.ts +9 -0
  509. package/build/treb-utils/src/ievent_source.js +22 -0
  510. package/build/treb-utils/src/ievent_source.js.map +1 -0
  511. package/build/treb-utils/src/index.d.ts +6 -0
  512. package/build/treb-utils/src/index.js +30 -0
  513. package/build/treb-utils/src/index.js.map +1 -0
  514. package/build/treb-utils/src/measurement.d.ts +42 -0
  515. package/build/treb-utils/src/measurement.js +145 -0
  516. package/build/treb-utils/src/measurement.js.map +1 -0
  517. package/build/treb-utils/src/scale.d.ts +16 -0
  518. package/build/treb-utils/src/scale.js +106 -0
  519. package/build/treb-utils/src/scale.js.map +1 -0
  520. package/build/treb-utils/src/serialize_html.d.ts +5 -0
  521. package/build/treb-utils/src/serialize_html.js +128 -0
  522. package/build/treb-utils/src/serialize_html.js.map +1 -0
  523. package/build/treb-utils/src/validate_uri.d.ts +20 -0
  524. package/build/treb-utils/src/validate_uri.js +55 -0
  525. package/build/treb-utils/src/validate_uri.js.map +1 -0
  526. package/dist/{chunk-Z4XFMZ2X.mjs → chunk-E35ONJUS.mjs} +1 -1
  527. package/dist/treb-export-worker.mjs +2 -2
  528. package/dist/treb-spreadsheet.mjs +4 -4
  529. package/dist/treb.d.ts +1 -1
  530. package/esbuild-composite.mjs +5 -1
  531. package/package.json +67 -3
  532. package/treb-embed/src/custom-element/spreadsheet-constructor.ts +7 -3
  533. package/treb-embed/src/embedded-spreadsheet.ts +1 -1
  534. package/treb-grid/src/types/grid_options.ts +1 -1
  535. package/tsproject.json +1 -2
  536. package/dist/chunk-43DLP2OX.mjs +0 -11
  537. package/dist/chunk-4CKS56PE.mjs +0 -11
  538. package/dist/chunk-75PARUQE.mjs +0 -11
  539. package/dist/chunk-7QD63AZS.mjs +0 -24601
  540. package/dist/chunk-A55ARVRD.mjs +0 -11
  541. package/dist/chunk-DESAKYW4.mjs +0 -11
  542. package/dist/chunk-EQ2R5W6P.mjs +0 -24565
  543. package/dist/chunk-IYJU2J6D.mjs +0 -24601
  544. package/dist/chunk-KSJFPGXT.mjs +0 -11
  545. package/dist/chunk-MQK4DNXI.mjs +0 -11
  546. package/dist/chunk-ORQFKLXM.mjs +0 -24601
  547. package/dist/chunk-SFDNNDHY.mjs +0 -11
  548. package/dist/chunk-T47DX5MI.mjs +0 -11
  549. package/dist/chunk-T6ILBVEX.mjs +0 -11
  550. package/dist/chunk-TPRCDYYG.mjs +0 -11
  551. package/dist/chunk-YAHNOOHO.mjs +0 -11
  552. package/dist/chunk-YLCFKX2G.mjs +0 -24601
@@ -0,0 +1,75 @@
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
+ * switching to an exec-command based model, so we can serialize
23
+ * data, layout and style changes; the intent is to support recording,
24
+ * replaying, and transmitting modifications.
25
+ *
26
+ * NOTE regarding commands: let's make them as explicit as possible
27
+ * (meaning fewer optional parameters). force callers to populate fields.
28
+ *
29
+ */
30
+ /**
31
+ * commands are symbolic for (hopefully) faster switching. we use a
32
+ * discriminated union for build-time parameter checks. see individual
33
+ * command interfaces for comments.
34
+ */
35
+ export var CommandKey;
36
+ (function (CommandKey) {
37
+ /** use an empty value so all commands are non-zero */
38
+ CommandKey[CommandKey["Null"] = 0] = "Null";
39
+ CommandKey[CommandKey["InsertRows"] = 1] = "InsertRows";
40
+ CommandKey[CommandKey["InsertColumns"] = 2] = "InsertColumns";
41
+ CommandKey[CommandKey["ResizeRows"] = 3] = "ResizeRows";
42
+ CommandKey[CommandKey["ResizeColumns"] = 4] = "ResizeColumns";
43
+ CommandKey[CommandKey["Select"] = 5] = "Select";
44
+ CommandKey[CommandKey["SetRange"] = 6] = "SetRange";
45
+ CommandKey[CommandKey["UpdateStyle"] = 7] = "UpdateStyle";
46
+ CommandKey[CommandKey["UpdateBorders"] = 8] = "UpdateBorders";
47
+ CommandKey[CommandKey["Indent"] = 9] = "Indent";
48
+ CommandKey[CommandKey["MergeCells"] = 10] = "MergeCells";
49
+ CommandKey[CommandKey["UnmergeCells"] = 11] = "UnmergeCells";
50
+ CommandKey[CommandKey["Clear"] = 12] = "Clear";
51
+ CommandKey[CommandKey["UpdateTheme"] = 13] = "UpdateTheme";
52
+ CommandKey[CommandKey["SetNote"] = 14] = "SetNote";
53
+ CommandKey[CommandKey["SetLink"] = 15] = "SetLink";
54
+ CommandKey[CommandKey["Freeze"] = 16] = "Freeze";
55
+ CommandKey[CommandKey["SetName"] = 17] = "SetName";
56
+ CommandKey[CommandKey["ShowHeaders"] = 18] = "ShowHeaders";
57
+ CommandKey[CommandKey["AddSheet"] = 19] = "AddSheet";
58
+ CommandKey[CommandKey["DuplicateSheet"] = 20] = "DuplicateSheet";
59
+ CommandKey[CommandKey["DeleteSheet"] = 21] = "DeleteSheet";
60
+ CommandKey[CommandKey["ActivateSheet"] = 22] = "ActivateSheet";
61
+ CommandKey[CommandKey["RenameSheet"] = 23] = "RenameSheet";
62
+ CommandKey[CommandKey["ReorderSheet"] = 24] = "ReorderSheet";
63
+ CommandKey[CommandKey["ShowSheet"] = 25] = "ShowSheet";
64
+ CommandKey[CommandKey["DataValidation"] = 26] = "DataValidation";
65
+ CommandKey[CommandKey["Reset"] = 27] = "Reset";
66
+ CommandKey[CommandKey["SortTable"] = 28] = "SortTable";
67
+ CommandKey[CommandKey["InsertTable"] = 29] = "InsertTable";
68
+ CommandKey[CommandKey["RemoveTable"] = 30] = "RemoveTable";
69
+ CommandKey[CommandKey["AddConditionalFormat"] = 31] = "AddConditionalFormat";
70
+ CommandKey[CommandKey["RemoveConditionalFormat"] = 32] = "RemoveConditionalFormat";
71
+ CommandKey[CommandKey["TabColor"] = 33] = "TabColor";
72
+ CommandKey[CommandKey["CreateAnnotation"] = 34] = "CreateAnnotation";
73
+ CommandKey[CommandKey["RemoveAnnotation"] = 35] = "RemoveAnnotation";
74
+ })(CommandKey || (CommandKey = {}));
75
+ //# sourceMappingURL=grid_command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid_command.js","sourceRoot":"","sources":["../../../../treb-grid/src/types/grid_command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,MAAM,CAAN,IAAY,UA2CX;AA3CD,WAAY,UAAU;IAEpB,sDAAsD;IACtD,2CAAQ,CAAA;IAER,uDAAU,CAAA;IACV,6DAAa,CAAA;IACb,uDAAU,CAAA;IACV,6DAAa,CAAA;IACb,+CAAM,CAAA;IACN,mDAAQ,CAAA;IACR,yDAAW,CAAA;IACX,6DAAa,CAAA;IACb,+CAAM,CAAA;IACN,wDAAU,CAAA;IACV,4DAAY,CAAA;IACZ,8CAAK,CAAA;IACL,0DAAW,CAAA;IACX,kDAAO,CAAA;IACP,kDAAO,CAAA;IACP,gDAAM,CAAA;IACN,kDAAO,CAAA;IACP,0DAAW,CAAA;IACX,oDAAQ,CAAA;IACR,gEAAc,CAAA;IACd,0DAAW,CAAA;IACX,8DAAa,CAAA;IACb,0DAAW,CAAA;IACX,4DAAY,CAAA;IACZ,sDAAS,CAAA;IACT,gEAAc,CAAA;IACd,8CAAK,CAAA;IACL,sDAAS,CAAA;IACT,0DAAW,CAAA;IACX,0DAAW,CAAA;IAEX,4EAAoB,CAAA;IACpB,kFAAuB,CAAA;IAEvB,oDAAQ,CAAA;IACR,oEAAgB,CAAA;IAChB,oEAAgB,CAAA;AAElB,CAAC,EA3CW,UAAU,KAAV,UAAU,QA2CrB"}
@@ -0,0 +1,93 @@
1
+ import type { Annotation, GridSelection, Sheet } from 'treb-data-model';
2
+ import type { Area } from 'treb-base-types';
3
+ export declare enum ErrorCode {
4
+ /** no error: zero so it's falsy */
5
+ none = 0,
6
+ /** placeholder for new errors */
7
+ unknown = 1,
8
+ /** you can't change part of an array */
9
+ array = 2,
10
+ /** invalid value (data validation) */
11
+ data_validation = 3,
12
+ /** invalid area for insert table: there's a merge, array or existing table within the range */
13
+ invalid_area_for_table = 4,
14
+ /** invalid area for paste, same as invalid area for table */
15
+ invalid_area_for_paste = 5
16
+ }
17
+ export interface SheetChangeEvent {
18
+ type: 'sheet-change';
19
+ activate: Sheet;
20
+ deactivate: Sheet;
21
+ }
22
+ export interface GridSelectionEvent {
23
+ type: 'selection';
24
+ selection: GridSelection;
25
+ reason?: 'sheet-change';
26
+ }
27
+ export interface GridAlternateSelectionEvent {
28
+ type: 'alternate-selection';
29
+ selection: GridSelection;
30
+ }
31
+ /**
32
+ * we used to return strings here, changed to error codes for l10n
33
+ */
34
+ export interface GridErrorEvent {
35
+ type: 'error';
36
+ code: ErrorCode;
37
+ }
38
+ export interface StructureEvent {
39
+ type: 'structure';
40
+ /**
41
+ * this flag should be set if the structure change changes references,
42
+ * insert or delete events. resize events don't need to set it.
43
+ *
44
+ * FIXME: merge/unmerge? (...) I think yes
45
+ */
46
+ rebuild_required?: boolean;
47
+ /**
48
+ * we can use this when conditional formats are modified/added/removed
49
+ */
50
+ conditional_format?: boolean;
51
+ /**
52
+ * this flag should be set if annotations have been added or removed,
53
+ * so parent/child views can update as necessary
54
+ */
55
+ update_annotations?: boolean;
56
+ }
57
+ export interface AnnotationEvent {
58
+ type: 'annotation';
59
+ annotation?: Annotation;
60
+ event?: 'move' | 'resize' | 'create' | 'delete' | 'update' | 'select';
61
+ }
62
+ export interface HyperlinkCellEventData {
63
+ type: 'hyperlink';
64
+ reference: string;
65
+ }
66
+ export interface CellEvent {
67
+ type: 'cell-event';
68
+ data?: HyperlinkCellEventData;
69
+ }
70
+ /**
71
+ * data + style. temporary while I figure out a better solution.
72
+ */
73
+ export interface CompositeEvent {
74
+ type: 'composite';
75
+ data_area?: Area;
76
+ style_area?: Area;
77
+ }
78
+ export interface DataEvent {
79
+ type: 'data';
80
+ area?: Area;
81
+ }
82
+ export interface FlushEvent {
83
+ type: 'flush';
84
+ }
85
+ export interface StyleEvent {
86
+ type: 'style';
87
+ area?: Area;
88
+ }
89
+ export interface ScaleEvent {
90
+ type: 'scale';
91
+ scale: number;
92
+ }
93
+ export type GridEvent = DataEvent | CellEvent | StyleEvent | FlushEvent | ScaleEvent | CompositeEvent | GridErrorEvent | StructureEvent | AnnotationEvent | SheetChangeEvent | GridSelectionEvent | GridAlternateSelectionEvent;
@@ -0,0 +1,36 @@
1
+ /*
2
+ * This file is part of TREB.
3
+ *
4
+ * TREB is free software: you can redistribute it and/or modify it under the
5
+ * terms of the GNU General Public License as published by the Free Software
6
+ * Foundation, either version 3 of the License, or (at your option) any
7
+ * later version.
8
+ *
9
+ * TREB is distributed in the hope that it will be useful, but WITHOUT ANY
10
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
+ * details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License along
15
+ * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
+ *
17
+ * Copyright 2022-2026 trebco, llc.
18
+ * info@treb.app
19
+ *
20
+ */
21
+ export var ErrorCode;
22
+ (function (ErrorCode) {
23
+ /** no error: zero so it's falsy */
24
+ ErrorCode[ErrorCode["none"] = 0] = "none";
25
+ /** placeholder for new errors */
26
+ ErrorCode[ErrorCode["unknown"] = 1] = "unknown";
27
+ /** you can't change part of an array */
28
+ ErrorCode[ErrorCode["array"] = 2] = "array";
29
+ /** invalid value (data validation) */
30
+ ErrorCode[ErrorCode["data_validation"] = 3] = "data_validation";
31
+ /** invalid area for insert table: there's a merge, array or existing table within the range */
32
+ ErrorCode[ErrorCode["invalid_area_for_table"] = 4] = "invalid_area_for_table";
33
+ /** invalid area for paste, same as invalid area for table */
34
+ ErrorCode[ErrorCode["invalid_area_for_paste"] = 5] = "invalid_area_for_paste";
35
+ })(ErrorCode || (ErrorCode = {}));
36
+ //# sourceMappingURL=grid_events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid_events.js","sourceRoot":"","sources":["../../../../treb-grid/src/types/grid_events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,MAAM,CAAN,IAAY,SAoBX;AApBD,WAAY,SAAS;IAEnB,mCAAmC;IACnC,yCAAQ,CAAA;IAER,iCAAiC;IACjC,+CAAO,CAAA;IAEP,wCAAwC;IACxC,2CAAK,CAAA;IAEL,sCAAsC;IACtC,+DAAe,CAAA;IAEf,+FAA+F;IAC/F,6EAAsB,CAAA;IAEtB,6DAA6D;IAC7D,6EAAsB,CAAA;AAExB,CAAC,EApBW,SAAS,KAAT,SAAS,QAoBpB"}
@@ -0,0 +1,50 @@
1
+ import type { CellValue } from 'treb-base-types';
2
+ import type { StatsEntry } from './tab_bar';
3
+ export type StatsFunction = (data: CellValue | CellValue[][] | undefined) => StatsEntry[];
4
+ /**
5
+ * @internalRemarks
6
+ *
7
+ * why are there two levels of options? can we consolidate this with
8
+ * the embedded spreadsheet options? they are never (AFAICT) used
9
+ * independently. maybe that's recent.
10
+ */
11
+ export type GridOptions = {
12
+ /** can expand rows/columns */
13
+ expand?: boolean;
14
+ /**
15
+ * if you are running a calculator, you might not want the grid
16
+ * to repaint any time there's a data change (which is the default
17
+ * behavior).
18
+ */
19
+ repaint_on_cell_change?: boolean;
20
+ /** support in-cell editing */
21
+ in_cell_editor?: boolean;
22
+ /** show the formula bar (and allow editing; TODO: read-only option) */
23
+ formula_bar?: boolean;
24
+ /** show the tab bar */
25
+ tab_bar?: boolean | 'auto';
26
+ /** scale controls. implies tab bar */
27
+ scale_control?: boolean;
28
+ /** stats panel. implies tab bar */
29
+ stats?: boolean | StatsFunction;
30
+ /** save/load scale to storage, with the given key */
31
+ persist_scale_key?: string;
32
+ /** allow add tab */
33
+ add_tab?: boolean;
34
+ /** button to increase/reduce size of formula editor */
35
+ expand_formula_button?: boolean;
36
+ /** scale (wip) */
37
+ /** enable scrolling (default true) */
38
+ scrollbars?: boolean;
39
+ /** always show grid, even if there is background color */
40
+ grid_over_background?: boolean;
41
+ /** initial scale for layout */
42
+ initial_scale?: number;
43
+ /** support MD formatting in text */
44
+ markdown?: boolean;
45
+ /** support MD formatting in comments */
46
+ comment_markdown?: boolean;
47
+ /** support font stacks */
48
+ support_font_stacks?: boolean;
49
+ };
50
+ export declare const DefaultGridOptions: GridOptions;
@@ -0,0 +1,34 @@
1
+ /*
2
+ * This file is part of TREB.
3
+ *
4
+ * TREB is free software: you can redistribute it and/or modify it under the
5
+ * terms of the GNU General Public License as published by the Free Software
6
+ * Foundation, either version 3 of the License, or (at your option) any
7
+ * later version.
8
+ *
9
+ * TREB is distributed in the hope that it will be useful, but WITHOUT ANY
10
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
+ * details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License along
15
+ * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
+ *
17
+ * Copyright 2022-2026 trebco, llc.
18
+ * info@treb.app
19
+ *
20
+ */
21
+ export const DefaultGridOptions = {
22
+ scrollbars: true,
23
+ in_cell_editor: true,
24
+ formula_bar: true,
25
+ add_tab: false,
26
+ tab_bar: 'auto',
27
+ // insert_function_button: false,
28
+ expand_formula_button: false,
29
+ expand: true,
30
+ comment_markdown: true,
31
+ repaint_on_cell_change: true,
32
+ grid_over_background: false, // true,
33
+ };
34
+ //# sourceMappingURL=grid_options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid_options.js","sourceRoot":"","sources":["../../../../treb-grid/src/types/grid_options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAiFH,MAAM,CAAC,MAAM,kBAAkB,GAAgB;IAC7C,UAAU,EAAE,IAAI;IAChB,cAAc,EAAE,IAAI;IACpB,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,MAAM;IACf,iCAAiC;IACjC,qBAAqB,EAAE,KAAK;IAC5B,MAAM,EAAE,IAAI;IACZ,gBAAgB,EAAE,IAAI;IACtB,sBAAsB,EAAE,IAAI;IAC5B,oBAAoB,EAAE,KAAK,EAAE,QAAQ;CACtC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { EventSource } from 'treb-utils';
2
+ export interface ScaleEvent {
3
+ type: 'scale';
4
+ value: number;
5
+ keep_focus?: boolean;
6
+ }
7
+ /**
8
+ * updated scale control, broken out. this is based on what we did for
9
+ * project planning, which worked out rather nicely.
10
+ */
11
+ export declare class ScaleControl extends EventSource<ScaleEvent> {
12
+ container: HTMLElement;
13
+ private input;
14
+ private slider;
15
+ private scale;
16
+ private format;
17
+ private timeout;
18
+ constructor(container: HTMLElement);
19
+ Tick(value: number): void;
20
+ UpdateScale(scale: number, notify?: boolean, keep_focus?: boolean): void;
21
+ }
@@ -0,0 +1,148 @@
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 { DOMContext } from 'treb-base-types';
22
+ import { NumberFormat, NumberFormatCache, ValueParser } from 'treb-format';
23
+ import { ValueType } from 'treb-base-types';
24
+ import { EventSource } from 'treb-utils';
25
+ /**
26
+ * updated scale control, broken out. this is based on what we did for
27
+ * project planning, which worked out rather nicely.
28
+ */
29
+ export class ScaleControl extends EventSource {
30
+ container;
31
+ input;
32
+ slider;
33
+ scale = 0;
34
+ format;
35
+ timeout = 0;
36
+ constructor(container) {
37
+ super();
38
+ this.container = container;
39
+ this.format = NumberFormatCache.Get('0.0');
40
+ const DOM = DOMContext.GetInstance(container.ownerDocument);
41
+ this.input = DOM.Create('input', 'treb-scale-input', container, {
42
+ events: {
43
+ // is this for some x-browser issue? or did we just not
44
+ // know which event to use and this is old junk?
45
+ keypress: (event) => {
46
+ switch (event.key) {
47
+ case 'ArrowUp':
48
+ case 'ArrowDown':
49
+ event.stopPropagation();
50
+ event.preventDefault();
51
+ console.info('mark?');
52
+ break;
53
+ }
54
+ },
55
+ keydown: (event) => {
56
+ switch (event.key) {
57
+ case 'Enter':
58
+ this.input.blur();
59
+ break;
60
+ case 'ArrowUp':
61
+ this.Tick(-1);
62
+ break;
63
+ case 'ArrowDown':
64
+ this.Tick(1);
65
+ break;
66
+ case 'Escape':
67
+ this.input.value = this.format.Format(this.scale) + '%';
68
+ this.input.blur();
69
+ break;
70
+ default:
71
+ return;
72
+ }
73
+ event.stopPropagation();
74
+ event.preventDefault();
75
+ },
76
+ // select text on click
77
+ focusin: () => this.input.select(),
78
+ change: () => {
79
+ // what we're doing here is a little unusual. we always treat
80
+ // the value as a percent, even if there's no percent sign.
81
+ // for that to work, if there is a percent sign, we need to remove
82
+ // it before we continue. then try to parse as a number.
83
+ let text = this.input.value;
84
+ text = text.replace(/%/g, '');
85
+ const value = ValueParser.TryParse(text);
86
+ if (value.type === ValueType.number) {
87
+ this.UpdateScale(Number(value.value), true);
88
+ }
89
+ else {
90
+ this.input.value = this.format.Format(this.scale) + '%';
91
+ }
92
+ },
93
+ }
94
+ });
95
+ const popup = DOM.Div('treb-slider-container', container);
96
+ this.slider = DOM.Create('input', undefined, popup, {
97
+ attrs: {
98
+ type: 'range',
99
+ min: '50',
100
+ max: '200',
101
+ value: '100',
102
+ step: '2.5',
103
+ },
104
+ events: {
105
+ input: () => this.UpdateScale(Number(this.slider.value), true),
106
+ }
107
+ });
108
+ // we're overriding scroll behavior here, but it's a tiny panel.
109
+ // if we explicitly mark passive:false we can avoid the console
110
+ // warning (I think)
111
+ container.addEventListener('wheel', (event) => {
112
+ event.stopPropagation();
113
+ event.preventDefault();
114
+ this.Tick(event.deltaY);
115
+ }, { passive: false });
116
+ }
117
+ Tick(value) {
118
+ // normalize
119
+ const scale = Math.round(this.scale / 2.5) * 2.5;
120
+ if (value > 0) {
121
+ this.UpdateScale(scale - 2.5, true, true);
122
+ }
123
+ else if (value < 0) {
124
+ this.UpdateScale(scale + 2.5, true, true);
125
+ }
126
+ }
127
+ UpdateScale(scale, notify = false, keep_focus = false) {
128
+ scale = Math.max(50, Math.min(200, scale));
129
+ if (scale !== this.scale) {
130
+ this.scale = scale;
131
+ this.input.value = this.format.Format(scale) + '%';
132
+ this.slider.value = scale.toFixed(1);
133
+ if (notify) {
134
+ if (!this.timeout) {
135
+ this.timeout = requestAnimationFrame(() => {
136
+ this.timeout = 0;
137
+ this.Publish({
138
+ type: 'scale',
139
+ value: this.scale / 100,
140
+ keep_focus,
141
+ });
142
+ });
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ //# sourceMappingURL=scale-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scale-control.js","sourceRoot":"","sources":["../../../../treb-grid/src/types/scale-control.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * options for the SetRange method
3
+ */
4
+ export interface SetRangeOptions {
5
+ /** transpose rectangular array before inserting */
6
+ transpose?: boolean;
7
+ /** recycle values (R-style) */
8
+ recycle?: boolean;
9
+ /** apply as an array (as if you pressed ctrl+shift+enter) */
10
+ array?: boolean;
11
+ /** spill over */
12
+ spill?: boolean;
13
+ /**
14
+ * argument separator to use when parsing the input formula. set this
15
+ * option to call SetRange with a consistent argument separator,
16
+ * independent of current locale.
17
+ */
18
+ argument_separator?: ',' | ';';
19
+ /**
20
+ * allow R1C1-style references; these can be either absolute
21
+ * addresses (e.g. R2C4) or relative to the cell (e.g. R[-3]C[0]).
22
+ */
23
+ r1c1?: boolean;
24
+ }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * This file is part of TREB.
3
+ *
4
+ * TREB is free software: you can redistribute it and/or modify it under the
5
+ * terms of the GNU General Public License as published by the Free Software
6
+ * Foundation, either version 3 of the License, or (at your option) any
7
+ * later version.
8
+ *
9
+ * TREB is distributed in the hope that it will be useful, but WITHOUT ANY
10
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12
+ * details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License along
15
+ * with TREB. If not, see <https://www.gnu.org/licenses/>.
16
+ *
17
+ * Copyright 2022-2026 trebco, llc.
18
+ * info@treb.app
19
+ *
20
+ */
21
+ export {};
22
+ //# sourceMappingURL=set_range_options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set_range_options.js","sourceRoot":"","sources":["../../../../treb-grid/src/types/set_range_options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
@@ -0,0 +1,84 @@
1
+ import type { DataModel, ViewModel, Sheet } from 'treb-data-model';
2
+ import { EventSource } from 'treb-utils';
3
+ import type { BaseLayout } from '../layout/base_layout';
4
+ import type { GridOptions } from './grid_options';
5
+ import { type ScaleEvent } from './scale-control';
6
+ import { type Theme } from 'treb-base-types';
7
+ export interface ActivateSheetEvent {
8
+ type: 'activate-sheet';
9
+ sheet: Sheet;
10
+ }
11
+ export interface RenameSheetEvent {
12
+ type: 'rename-sheet';
13
+ sheet: Sheet;
14
+ name: string;
15
+ }
16
+ export interface ReorderSheetEvent {
17
+ type: 'reorder-sheet';
18
+ index: number;
19
+ move_before: number;
20
+ }
21
+ export interface AddSheetEvent {
22
+ type: 'add-sheet';
23
+ }
24
+ export interface DeleteSheetEvent {
25
+ type: 'delete-sheet';
26
+ }
27
+ export interface CancelEvent {
28
+ type: 'cancel';
29
+ }
30
+ export type TabEvent = CancelEvent | ScaleEvent | AddSheetEvent | RenameSheetEvent | DeleteSheetEvent | ReorderSheetEvent | ActivateSheetEvent;
31
+ export interface StatsEntry {
32
+ label: string;
33
+ value: string;
34
+ }
35
+ /**
36
+ * tabs for multiple sheets. at the bottom, atm (FIXME: options?)
37
+ *
38
+ * rename tabs (sheets) by double-clicking. this triggers a global
39
+ * rename over all cells and annotations.
40
+ *
41
+ * reorder tabs by dragging. reorders the array, but order is not
42
+ * material to any other module, so it's basically just housekeeping.
43
+ *
44
+ * add a new tab with a special (+) tab (last).
45
+ *
46
+ * FIXME: delete tabs... add an (x) to each tab? don't really want to
47
+ * do that. right-click is out. ??? [A: toolbar menu]
48
+ *
49
+ */
50
+ export declare class TabBar extends EventSource<TabEvent> {
51
+ private layout;
52
+ private model;
53
+ private view;
54
+ private options;
55
+ private theme;
56
+ private tab_container?;
57
+ private scale_control?;
58
+ private stats_panel?;
59
+ private dragging;
60
+ private double_click_data;
61
+ private tab_color_cache;
62
+ private _visible;
63
+ get visible(): boolean;
64
+ set stats_data(value: StatsEntry[]);
65
+ private container;
66
+ private DOM;
67
+ constructor(layout: BaseLayout, model: DataModel, view: ViewModel, options: GridOptions, theme: Theme, view_node: HTMLElement);
68
+ IsDoubleClick(index: number, timeout?: number): boolean;
69
+ Hide(): void;
70
+ Show(show?: boolean): void;
71
+ SetActive(tab: HTMLElement, active: boolean, user?: boolean): void;
72
+ /** change scale if we have a scale label */
73
+ UpdateScale(scale: number): void;
74
+ DoubleClickTab(event: MouseEvent, tab: HTMLElement, sheet: Sheet): void;
75
+ MouseDownTab(event: MouseEvent, tab: HTMLElement, sheet: Sheet, index: number, tabs: HTMLElement[]): void;
76
+ UpdateTheme(): void;
77
+ /**
78
+ * update tabs from model.
79
+ *
80
+ * @param user - this is a user action, so use smooth scrolling
81
+ * when activating the tab. otherwise it's automatic so jump.
82
+ */
83
+ Update(user?: boolean): void;
84
+ }