numbl 0.4.21 → 0.4.22

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 (281) hide show
  1. package/binding.gyp +12 -6
  2. package/dist-browser/browser/index.d.ts +1 -1
  3. package/dist-browser/browser/mip.d.ts +7 -0
  4. package/dist-browser/browser/protocol.d.ts +1 -1
  5. package/dist-browser/browser.js +1 -1
  6. package/dist-browser/db/operations.d.ts +0 -1
  7. package/dist-browser/gpuHelper.d.ts +29 -0
  8. package/dist-browser/hooks/projectFilesState.d.ts +37 -0
  9. package/dist-browser/numbl-core/execSession.d.ts +39 -0
  10. package/dist-browser/numbl-core/executeCode.d.ts +10 -1
  11. package/dist-browser/numbl-core/executors/classification.d.ts +2 -10
  12. package/dist-browser/numbl-core/executors/jit/backend.d.ts +65 -0
  13. package/dist-browser/numbl-core/executors/jit/cBackend.d.ts +22 -0
  14. package/dist-browser/numbl-core/executors/jit/callExecutor.d.ts +13 -44
  15. package/dist-browser/numbl-core/executors/jit/hostHelpers.d.ts +24 -0
  16. package/dist-browser/numbl-core/executors/jit/jsBackend.d.ts +15 -0
  17. package/dist-browser/numbl-core/executors/jit/loopExecutor.d.ts +13 -40
  18. package/dist-browser/numbl-core/executors/jit/session.d.ts +1 -1
  19. package/dist-browser/numbl-core/executors/jit/topLevelExecutor.d.ts +13 -33
  20. package/dist-browser/numbl-core/executors/jit/valueAdapterC.d.ts +32 -48
  21. package/dist-browser/numbl-core/executors/lowering.d.ts +38 -96
  22. package/dist-browser/numbl-core/executors/plugins.d.ts +14 -28
  23. package/dist-browser/numbl-core/executors/registry.d.ts +32 -133
  24. package/dist-browser/numbl-core/executors/types.d.ts +30 -92
  25. package/dist-browser/numbl-core/functionResolve.d.ts +3 -13
  26. package/dist-browser/numbl-core/helpers/check-helpers.d.ts +0 -5
  27. package/dist-browser/numbl-core/helpers/glob.d.ts +14 -0
  28. package/dist-browser/numbl-core/helpers/linsolve.d.ts +3 -13
  29. package/dist-browser/numbl-core/helpers/reduction-helpers.d.ts +2 -4
  30. package/dist-browser/numbl-core/helpers/shape-utils.d.ts +10 -0
  31. package/dist-browser/numbl-core/interpreter/builtins/index.d.ts +3 -1
  32. package/dist-browser/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
  33. package/dist-browser/numbl-core/interpreter/builtins/types.d.ts +7 -7
  34. package/dist-browser/numbl-core/interpreter/interpreter.d.ts +6 -6
  35. package/dist-browser/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
  36. package/dist-browser/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
  37. package/dist-browser/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
  38. package/dist-browser/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
  39. package/dist-browser/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
  40. package/dist-browser/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
  41. package/dist-browser/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
  42. package/dist-browser/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
  43. package/dist-browser/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
  44. package/dist-browser/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
  45. package/dist-browser/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
  46. package/dist-browser/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
  47. package/dist-browser/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
  48. package/dist-browser/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
  49. package/dist-browser/numbl-core/jit/builtins/registry.d.ts +15 -30
  50. package/dist-browser/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
  51. package/dist-browser/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
  52. package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
  53. package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
  54. package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
  55. package/dist-browser/numbl-core/jit/codegen/emit.d.ts +9 -30
  56. package/dist-browser/numbl-core/jit/codegen/emitJs.d.ts +9 -27
  57. package/dist-browser/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
  58. package/dist-browser/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
  59. package/dist-browser/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
  60. package/dist-browser/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
  61. package/dist-browser/numbl-core/jit/codegen/runtime.d.ts +7 -28
  62. package/dist-browser/numbl-core/jit/compileSpec.d.ts +3 -6
  63. package/dist-browser/numbl-core/jit/compileSpecC.d.ts +5 -0
  64. package/dist-browser/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
  65. package/dist-browser/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
  66. package/dist-browser/numbl-core/jit/lowering/errors.d.ts +3 -15
  67. package/dist-browser/numbl-core/jit/lowering/ir.d.ts +0 -2
  68. package/dist-browser/numbl-core/jit/lowering/lower.d.ts +4 -12
  69. package/dist-browser/numbl-core/jit/lowering/types.d.ts +2 -7
  70. package/dist-browser/numbl-core/jit/numbl/index.d.ts +5 -14
  71. package/dist-browser/numbl-core/jit/parser/index.d.ts +4 -9
  72. package/dist-browser/numbl-core/jit/workspace/workspace.d.ts +32 -136
  73. package/dist-browser/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
  74. package/dist-browser/numbl-core/jsUserFunctions.d.ts +10 -12
  75. package/dist-browser/numbl-core/lowering/classInfo.d.ts +4 -1
  76. package/dist-browser/numbl-core/lowering/loweringContext.d.ts +15 -23
  77. package/dist-browser/numbl-core/native/lapack-bridge.d.ts +111 -130
  78. package/dist-browser/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
  79. package/dist-browser/numbl-core/native/ts-lapack-complex.d.ts +23 -0
  80. package/dist-browser/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
  81. package/dist-browser/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
  82. package/dist-browser/numbl-core/ops/dispatch.d.ts +4 -5
  83. package/dist-browser/numbl-core/parser/types.d.ts +1 -21
  84. package/{dist-lib/numbl-core/runtime → dist-browser/numbl-core/plotting}/axisCommand.d.ts +2 -2
  85. package/dist-browser/{graphics → numbl-core/plotting}/axisLimits.d.ts +14 -2
  86. package/dist-browser/numbl-core/plotting/builtins.d.ts +8 -0
  87. package/dist-browser/numbl-core/plotting/colormaps.d.ts +10 -0
  88. package/dist-browser/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
  89. package/dist-browser/numbl-core/plotting/imagescExtent.d.ts +19 -0
  90. package/dist-browser/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
  91. package/dist-browser/numbl-core/plotting/parseArgsChart.d.ts +94 -0
  92. package/dist-browser/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
  93. package/dist-browser/numbl-core/plotting/parseArgsLine.d.ts +103 -0
  94. package/dist-browser/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
  95. package/dist-browser/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
  96. package/dist-browser/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
  97. package/dist-browser/numbl-core/plotting/streamline.d.ts +16 -0
  98. package/{dist-graphics/graphics → dist-browser/numbl-core/plotting}/types.d.ts +9 -7
  99. package/dist-browser/numbl-core/runtime/cow.d.ts +0 -8
  100. package/dist-browser/numbl-core/runtime/refcount.d.ts +0 -3
  101. package/dist-browser/numbl-core/runtime/registerSpecial.d.ts +15 -0
  102. package/dist-browser/numbl-core/runtime/runtime.d.ts +11 -35
  103. package/dist-browser/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
  104. package/dist-browser/numbl-core/runtime/specialBuiltins.d.ts +3 -9
  105. package/dist-browser/numbl-core/runtime/uihtmlSession.d.ts +5 -13
  106. package/dist-browser/numbl-core/runtime/utils.d.ts +4 -1
  107. package/dist-browser/numbl-core/version.d.ts +1 -1
  108. package/dist-browser/numbl-core/workspace/workspace.d.ts +64 -0
  109. package/dist-browser/vfs/syncVfsChanges.d.ts +2 -2
  110. package/dist-cli/cli.js +74244 -80566
  111. package/dist-graphics/graphics/FigureView.d.ts +1 -1
  112. package/dist-graphics/graphics/SurfView.d.ts +3 -2
  113. package/dist-graphics/graphics/drawPlot.d.ts +1 -1
  114. package/dist-graphics/graphics/exportFigureHdf5.d.ts +1 -1
  115. package/dist-graphics/graphics/figureHashTransport.d.ts +1 -1
  116. package/dist-graphics/graphics/figureUpload.d.ts +1 -1
  117. package/dist-graphics/graphics/importFigureHdf5.d.ts +1 -1
  118. package/dist-graphics/graphics/openInFigureViewer.d.ts +1 -1
  119. package/dist-graphics/graphics/plotHelpers.d.ts +1 -1
  120. package/dist-graphics/graphics/plotLegend.d.ts +1 -1
  121. package/dist-graphics/graphics/plotMarkers.d.ts +1 -1
  122. package/dist-graphics/graphics/restoreNaNs.d.ts +1 -1
  123. package/dist-graphics/graphics/uihtmlRelay.d.ts +16 -0
  124. package/dist-graphics/graphics-lib.d.ts +3 -3
  125. package/dist-graphics/index.js +294 -328
  126. package/{dist-lib/graphics → dist-graphics/numbl-core/plotting}/axisLimits.d.ts +14 -2
  127. package/dist-graphics/numbl-core/plotting/colormaps.d.ts +10 -0
  128. package/dist-graphics/numbl-core/plotting/imagescExtent.d.ts +19 -0
  129. package/{dist-browser/graphics → dist-graphics/numbl-core/plotting}/types.d.ts +9 -7
  130. package/dist-lib/browser/mip.d.ts +17 -0
  131. package/dist-lib/cli-scan.d.ts +8 -1
  132. package/dist-lib/lib.d.ts +1 -1
  133. package/dist-lib/lib.js +29201 -35301
  134. package/dist-lib/node.js +22 -14
  135. package/dist-lib/numbl-core/execSession.d.ts +39 -0
  136. package/dist-lib/numbl-core/executeCode.d.ts +10 -1
  137. package/dist-lib/numbl-core/executors/classification.d.ts +2 -10
  138. package/dist-lib/numbl-core/executors/jit/backend.d.ts +65 -0
  139. package/dist-lib/numbl-core/executors/jit/cBackend.d.ts +22 -0
  140. package/dist-lib/numbl-core/executors/jit/callExecutor.d.ts +13 -44
  141. package/dist-lib/numbl-core/executors/jit/hostHelpers.d.ts +24 -0
  142. package/dist-lib/numbl-core/executors/jit/jsBackend.d.ts +15 -0
  143. package/dist-lib/numbl-core/executors/jit/loopExecutor.d.ts +13 -40
  144. package/dist-lib/numbl-core/executors/jit/session.d.ts +1 -1
  145. package/dist-lib/numbl-core/executors/jit/topLevelExecutor.d.ts +13 -33
  146. package/dist-lib/numbl-core/executors/jit/valueAdapterC.d.ts +32 -48
  147. package/dist-lib/numbl-core/executors/lowering.d.ts +38 -96
  148. package/dist-lib/numbl-core/executors/plugins.d.ts +14 -28
  149. package/dist-lib/numbl-core/executors/registry.d.ts +32 -133
  150. package/dist-lib/numbl-core/executors/types.d.ts +30 -92
  151. package/dist-lib/numbl-core/functionResolve.d.ts +3 -13
  152. package/dist-lib/numbl-core/helpers/check-helpers.d.ts +0 -5
  153. package/dist-lib/numbl-core/helpers/glob.d.ts +14 -0
  154. package/dist-lib/numbl-core/helpers/linsolve.d.ts +3 -13
  155. package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +2 -4
  156. package/dist-lib/numbl-core/helpers/shape-utils.d.ts +10 -0
  157. package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +3 -1
  158. package/dist-lib/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
  159. package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +7 -7
  160. package/dist-lib/numbl-core/interpreter/interpreter.d.ts +6 -6
  161. package/dist-lib/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
  162. package/dist-lib/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
  163. package/dist-lib/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
  164. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
  165. package/dist-lib/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
  166. package/dist-lib/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
  167. package/dist-lib/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
  168. package/dist-lib/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
  169. package/dist-lib/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
  170. package/dist-lib/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
  171. package/dist-lib/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
  172. package/dist-lib/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
  173. package/dist-lib/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
  174. package/dist-lib/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
  175. package/dist-lib/numbl-core/jit/builtins/registry.d.ts +15 -30
  176. package/dist-lib/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
  177. package/dist-lib/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
  178. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
  179. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
  180. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
  181. package/dist-lib/numbl-core/jit/codegen/emit.d.ts +9 -30
  182. package/dist-lib/numbl-core/jit/codegen/emitJs.d.ts +9 -27
  183. package/dist-lib/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
  184. package/dist-lib/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
  185. package/dist-lib/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
  186. package/dist-lib/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
  187. package/dist-lib/numbl-core/jit/codegen/runtime.d.ts +7 -28
  188. package/dist-lib/numbl-core/jit/compileSpec.d.ts +3 -6
  189. package/dist-lib/numbl-core/jit/compileSpecC.d.ts +5 -0
  190. package/dist-lib/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
  191. package/dist-lib/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
  192. package/dist-lib/numbl-core/jit/lowering/errors.d.ts +3 -15
  193. package/dist-lib/numbl-core/jit/lowering/ir.d.ts +0 -2
  194. package/dist-lib/numbl-core/jit/lowering/lower.d.ts +4 -12
  195. package/dist-lib/numbl-core/jit/lowering/types.d.ts +2 -7
  196. package/dist-lib/numbl-core/jit/numbl/index.d.ts +5 -14
  197. package/dist-lib/numbl-core/jit/parser/index.d.ts +4 -9
  198. package/dist-lib/numbl-core/jit/workspace/workspace.d.ts +32 -136
  199. package/dist-lib/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
  200. package/dist-lib/numbl-core/jsUserFunctions.d.ts +10 -12
  201. package/dist-lib/numbl-core/lowering/classInfo.d.ts +4 -1
  202. package/dist-lib/numbl-core/lowering/loweringContext.d.ts +15 -23
  203. package/dist-lib/numbl-core/native/lapack-bridge.d.ts +111 -130
  204. package/dist-lib/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
  205. package/dist-lib/numbl-core/native/ts-lapack-complex.d.ts +23 -0
  206. package/dist-lib/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
  207. package/dist-lib/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
  208. package/dist-lib/numbl-core/ops/dispatch.d.ts +4 -5
  209. package/dist-lib/numbl-core/parser/types.d.ts +1 -21
  210. package/{dist-browser/numbl-core/runtime → dist-lib/numbl-core/plotting}/axisCommand.d.ts +2 -2
  211. package/{dist-graphics/graphics → dist-lib/numbl-core/plotting}/axisLimits.d.ts +14 -2
  212. package/dist-lib/numbl-core/plotting/builtins.d.ts +8 -0
  213. package/dist-lib/numbl-core/plotting/colormaps.d.ts +10 -0
  214. package/dist-lib/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
  215. package/dist-lib/numbl-core/plotting/imagescExtent.d.ts +19 -0
  216. package/dist-lib/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
  217. package/dist-lib/numbl-core/plotting/parseArgsChart.d.ts +94 -0
  218. package/dist-lib/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
  219. package/dist-lib/numbl-core/plotting/parseArgsLine.d.ts +103 -0
  220. package/dist-lib/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
  221. package/dist-lib/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
  222. package/dist-lib/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
  223. package/dist-lib/numbl-core/plotting/streamline.d.ts +16 -0
  224. package/dist-lib/{graphics → numbl-core/plotting}/types.d.ts +9 -7
  225. package/dist-lib/numbl-core/runtime/cow.d.ts +0 -8
  226. package/dist-lib/numbl-core/runtime/refcount.d.ts +0 -3
  227. package/dist-lib/numbl-core/runtime/registerSpecial.d.ts +15 -0
  228. package/dist-lib/numbl-core/runtime/runtime.d.ts +11 -35
  229. package/dist-lib/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
  230. package/dist-lib/numbl-core/runtime/specialBuiltins.d.ts +3 -9
  231. package/dist-lib/numbl-core/runtime/uihtmlSession.d.ts +5 -13
  232. package/dist-lib/numbl-core/runtime/utils.d.ts +4 -1
  233. package/dist-lib/numbl-core/version.d.ts +1 -1
  234. package/dist-lib/numbl-core/workspace/workspace.d.ts +64 -0
  235. package/dist-lib/vfs/unzipToFiles.d.ts +7 -0
  236. package/dist-plot-viewer/assets/index-C0fIevlp.js +4504 -0
  237. package/dist-plot-viewer/index.html +1 -1
  238. package/dist-site-viewer/assets/index-BDaviCH6.js +4832 -0
  239. package/dist-site-viewer/assets/numbl-worker-D6m4K2PP.js +5691 -0
  240. package/dist-site-viewer/index.html +2 -2
  241. package/native/numbl_addon.cpp +2 -12
  242. package/native/numbl_addon_common.h +0 -5
  243. package/package.json +6 -5
  244. package/dist-browser/hooks/useProjectFiles.d.ts +0 -45
  245. package/dist-browser/numbl-core/executors/context.d.ts +0 -76
  246. package/dist-browser/numbl-core/executors/index.d.ts +0 -14
  247. package/dist-browser/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
  248. package/dist-browser/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
  249. package/dist-browser/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
  250. package/dist-browser/numbl-core/helpers/dummy.d.ts +0 -5
  251. package/dist-browser/numbl-core/jit/runtime/context.d.ts +0 -23
  252. package/dist-browser/numbl-core/jit/runtime/inferType.d.ts +0 -10
  253. package/dist-browser/numbl-core/jit/runtime/value.d.ts +0 -101
  254. package/dist-browser/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
  255. package/dist-browser/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
  256. package/dist-browser/numbl-core/native/bridge-resolve.d.ts +0 -14
  257. package/dist-browser/numbl-core/runtime/plotUtils.d.ts +0 -336
  258. package/dist-browser/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
  259. package/dist-graphics/graphics/surfColormap.d.ts +0 -2
  260. package/dist-lib/numbl-core/executors/context.d.ts +0 -76
  261. package/dist-lib/numbl-core/executors/index.d.ts +0 -14
  262. package/dist-lib/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
  263. package/dist-lib/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
  264. package/dist-lib/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
  265. package/dist-lib/numbl-core/helpers/dummy.d.ts +0 -5
  266. package/dist-lib/numbl-core/jit/runtime/context.d.ts +0 -23
  267. package/dist-lib/numbl-core/jit/runtime/inferType.d.ts +0 -10
  268. package/dist-lib/numbl-core/jit/runtime/value.d.ts +0 -101
  269. package/dist-lib/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
  270. package/dist-lib/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
  271. package/dist-lib/numbl-core/native/bridge-resolve.d.ts +0 -14
  272. package/dist-lib/numbl-core/runtime/plotUtils.d.ts +0 -336
  273. package/dist-lib/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
  274. package/dist-plot-viewer/assets/index-YeXWXIxH.js +0 -4504
  275. package/dist-site-viewer/assets/index-DrtkDG_M.js +0 -4832
  276. package/dist-site-viewer/assets/numbl-worker-Dz_Z8B9u.js +0 -5327
  277. package/native/elemwise.cpp +0 -360
  278. package/native/unary_elemwise.cpp +0 -67
  279. /package/dist-browser/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
  280. /package/dist-graphics/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
  281. /package/dist-lib/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
@@ -1,59 +0,0 @@
1
- /**
2
- * Driver-script prologue extractor.
3
- *
4
- * mtoc2 accepts `addpath(<literal>, ...)` only as a leading sequence
5
- * of top-level statements in the driver script. Each call is parsed
6
- * into a list of directory arguments (literal strings only) plus an
7
- * optional trailing `-begin` / `-end` flag.
8
- *
9
- * Two call sites:
10
- * - The CLI invokes the extractor before scanning the filesystem so
11
- * it knows which directories to fold into the workspace search
12
- * path.
13
- * - `translateProject` / the interpreter run path invoke it purely
14
- * to drop the prologue statements from the driver AST before
15
- * lowering / execution begins. The dirs are ignored there.
16
- *
17
- * The two calls are idempotent: same input AST → same dirs and
18
- * remaining body, so it doesn't matter that they parse twice.
19
- *
20
- * Any `addpath` left in the AST (anywhere outside the leading prefix)
21
- * still hits the `addpath` builtin's `transfer`, which errors with a
22
- * span-attributed message. `rmpath` / `savepath` are always rejected
23
- * by their own `transfer` hooks; the extractor never accepts them.
24
- *
25
- * Function-file auto-invoke: a driver whose body (after the prologue)
26
- * contains only function/classdef definitions and no top-level
27
- * statements is a "function file" — running it means calling its
28
- * first function with zero arguments. The extractor appends a
29
- * synthesized 0-arg call so every execution path (interpreter,
30
- * js-aot, c-aot) treats it the same way. Mirrors numbl's
31
- * `Interpreter.run` (interpreter.ts).
32
- */
33
- import type { AbstractSyntaxTree, Stmt, Span } from "../parser/index.js";
34
- export interface AddPathDir {
35
- /** Directory string as the user wrote it. Relative paths are NOT
36
- * resolved here; callers resolve against `process.cwd()`. */
37
- dir: string;
38
- /** Whether the directory inserts at the front of the addpath block
39
- * (default / `-begin`) or after the CLI `--path` dirs at the end
40
- * (`-end`). */
41
- position: "begin" | "end";
42
- /** Span of the originating `addpath(...)` call. */
43
- span: Span;
44
- }
45
- export interface DriverPrologueOpts {
46
- /** Set to `true` when a filesystem is available to resolve dirs
47
- * against (CLI). When `false` or omitted (web IDE, in-memory
48
- * translate, vitest), any leading `addpath` call is itself an
49
- * `UnsupportedConstruct`. */
50
- allowAddpath?: boolean;
51
- }
52
- export interface DriverPrologueResult {
53
- addpaths: AddPathDir[];
54
- /** Top-level statements after the prologue. Suitable for direct
55
- * use with `Lowerer.lowerProgram` (via a shallow AST copy with
56
- * this `body`) or `Interpreter.runProgram`. */
57
- remainingBody: Stmt[];
58
- }
59
- export declare function extractDriverPrologue(ast: AbstractSyntaxTree, opts?: DriverPrologueOpts): DriverPrologueResult;
@@ -1,62 +0,0 @@
1
- /**
2
- * Loader for `.mtoc2.js` user functions.
3
- *
4
- * A `.mtoc2.js` file is plain JavaScript with no mtoc2 dependency.
5
- * The loader evaluates it as a CommonJS-style module (`exports` and
6
- * `module.exports` are the only injected names) and reads four
7
- * exports to assemble a workspace-scoped `Builtin`:
8
- *
9
- * exports.name — string, must match the file's basename.
10
- * exports.transfer — (argTypes, nargout) -> Type[]. Raw mtoc2 Type
11
- * objects in, raw Type objects out. Throws
12
- * `Error` on bad input.
13
- * exports.emit — ({argsC, prefix, ...}) -> string. C expression
14
- * for the call. Use `prefix` to name any private
15
- * C helpers (kept collision-free across files).
16
- * exports.cBody — ({prefix}) -> string. C source (helper
17
- * function definitions) injected once per
18
- * translation unit. Use the same `prefix` as
19
- * `emit`.
20
- * exports.cHeaders? — string[] of additional `#include` lines to
21
- * activate (optional).
22
- *
23
- * Prefix shape: `mtoc2_user_<safe_funcname>__<8hex>__` where the hex
24
- * is the FNV-1a hash of the workspace-relative file path. Including
25
- * the path in the hash makes the prefix unique across all `.mtoc2.js`
26
- * files in the workspace, even if two files happen to define
27
- * functions with overlapping internal names.
28
- */
29
- import type { Builtin } from "../builtins/registry.js";
30
- /** Resolved sibling file: the relative path (used by the build to
31
- * pick a unique on-disk name) plus the file's text. */
32
- export interface ResolvedCSource {
33
- /** Path as written by the user in `exports.cSources` (e.g.
34
- * `"impl.c"` or `"sub/helpers.h"`). */
35
- relPath: string;
36
- /** File text the build will write to disk. */
37
- source: string;
38
- }
39
- /** Loader output: the assembled `Builtin` plus the user-supplied C
40
- * sibling files the framework needs to thread through to the build
41
- * pipeline. */
42
- export interface LoadedUserFunction {
43
- builtin: Builtin;
44
- cSources: ResolvedCSource[];
45
- }
46
- /** Evaluate a `.mtoc2.js` file and return its assembled `Builtin`
47
- * plus the user-supplied sibling C files (`cSources`).
48
- *
49
- * - `fileName` — the .mtoc2.js's full path (used for diagnostics and
50
- * to resolve sibling paths).
51
- * - `expectedName` — what numbl's workspace registered the file
52
- * under (derived from the file's basename / package path); we
53
- * validate the user's `exports.name` matches so a typo / rename
54
- * surfaces here rather than at the first call site.
55
- * - `relPath` — workspace-relative path used for the prefix hash.
56
- * - `readSibling(p)` — given a path-key relative to the .mtoc2.js's
57
- * directory, return the sibling file's source text. Used to pull
58
- * `cSources` entries out of the workspace's file map (which is
59
- * the same regardless of CLI vs web IDE). Returns `undefined` if
60
- * the file is not in the workspace; the loader throws a clear
61
- * error pointing at the missing path. */
62
- export declare function loadMtoc2UserFunction(fileName: string, source: string, expectedName: string, relPath: string, readSibling: (siblingRelPath: string) => string | undefined): LoadedUserFunction;
@@ -1,14 +0,0 @@
1
- /**
2
- * Centralized LAPACK bridge resolution with fallback and one-time logging.
3
- *
4
- * Tries the native bridge first; falls back to ts-lapack (pure TypeScript).
5
- */
6
- import { type LapackBridge } from "./lapack-bridge.js";
7
- /**
8
- * Get the effective LAPACK bridge for a given operation.
9
- *
10
- * @param opName Operation name for logging (e.g. "inv", "qr")
11
- * @param method Optional method to check on native bridge. If native bridge
12
- * lacks this method, falls back to ts-lapack.
13
- */
14
- export declare function getEffectiveBridge(opName: string, method?: keyof LapackBridge): LapackBridge;
@@ -1,336 +0,0 @@
1
- /**
2
- * Utilities for parsing plot() arguments at runtime.
3
- *
4
- * Handles: plot(Y), plot(X,Y), plot(X1,Y1,...,Xn,Yn),
5
- * plot(X1,Y1,LineSpec1,...), and Name-Value pairs like 'Color','r','LineWidth',2.
6
- */
7
- import { type RuntimeValue } from "./types.js";
8
- export type { PlotTrace, Plot3Trace, PatchTrace, SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, BarTrace, Bar3Trace, ErrorBarTrace, BoxTrace, PieTrace, HeatmapTrace, QuiverTrace, Quiver3Trace, } from "../../graphics/types.js";
9
- import type { PlotTrace, Plot3Trace, PatchTrace, SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, BarTrace, Bar3Trace, ErrorBarTrace, BoxTrace, PieTrace, HeatmapTrace, QuiverTrace, Quiver3Trace } from "../../graphics/types.js";
10
- export declare function resolveColor(v: RuntimeValue | string): [number, number, number] | undefined;
11
- export interface ParsedLineSpec {
12
- color?: string;
13
- lineStyle?: string;
14
- marker?: string;
15
- }
16
- export declare function parsePlotArgs(args: RuntimeValue[]): PlotTrace[];
17
- /**
18
- * Parse plot3() arguments.
19
- *
20
- * Supported forms:
21
- * plot3(X, Y, Z)
22
- * plot3(X, Y, Z, LineSpec)
23
- * plot3(X1,Y1,Z1,...,Xn,Yn,Zn)
24
- * plot3(X1,Y1,Z1,LineSpec1,...,Xn,Yn,Zn,LineSpecn)
25
- * plot3(..., Name, Value)
26
- */
27
- export declare function parsePlot3Args(args: RuntimeValue[]): Plot3Trace[];
28
- /** Result of parsing line() arguments: a set of 2-D or 3-D traces. */
29
- export type ParsedLine = {
30
- kind: "2d";
31
- traces: PlotTrace[];
32
- } | {
33
- kind: "3d";
34
- traces: Plot3Trace[];
35
- };
36
- /**
37
- * Parse line() arguments.
38
- *
39
- * Supported forms:
40
- * line — line from (0,0) to (1,1)
41
- * line(x, y) — 2-D line(s)
42
- * line(x, y, z) — 3-D line(s)
43
- * line(___, Name, Value) — Color/LineStyle/LineWidth/Marker/...
44
- * line('XData', x, 'YData', y, ...) — low-level form (black line)
45
- * line(ax, ___) — leading axes handle (ignored)
46
- *
47
- * Like plot/plot3, vector inputs make a single line and matrix inputs make one
48
- * line per column.
49
- */
50
- export declare function parseLineArgs(args: RuntimeValue[]): ParsedLine;
51
- /** Apply a single patch property (lower-cased key) to the trace. Shared by the
52
- * Name-Value, struct, and `set`/handle paths. */
53
- export declare function applyPatchProp(trace: PatchTrace, key: string, val: RuntimeValue): void;
54
- /**
55
- * Parse patch() arguments into a canonical PatchTrace.
56
- *
57
- * Supported forms:
58
- * patch(X, Y, C) — 2-D polygons, color C
59
- * patch(X, Y, Z, C) — 3-D polygons
60
- * patch('XData', X, 'YData', Y[, 'ZData', Z]) — coords as name-value
61
- * patch('Faces', F, 'Vertices', V) — faces/vertices model
62
- * patch(S) — struct of patch properties
63
- * patch(___, Name, Value) — patch properties
64
- * patch(ax, ___) — leading axes handle (ignored)
65
- */
66
- export declare function parsePatchArgs(args: RuntimeValue[]): PatchTrace;
67
- /**
68
- * Parse fill() arguments into one patch trace per (X,Y,C) group. fill is the
69
- * 2-D coordinate form of patch repeated over groups, so it reuses the patch
70
- * vertex/color/property helpers — the only fill-specific logic is splitting
71
- * the argument list into X,Y,C triplets.
72
- *
73
- * Supported forms:
74
- * fill(X, Y, C)
75
- * fill(X1, Y1, C1, ..., Xn, Yn, Cn)
76
- * fill(___, Name, Value)
77
- * fill(ax, ___)
78
- */
79
- export declare function parseFillArgs(args: RuntimeValue[]): PatchTrace[];
80
- /**
81
- * Parse trimesh() arguments into a canonical PatchTrace.
82
- *
83
- * trimesh draws a triangular mesh and (per the MATLAB docs) returns a patch
84
- * object, so it maps onto the PatchTrace model: the connectivity matrix T
85
- * supplies the faces (one triangle per row, 1-based vertex indices) and the
86
- * x/y[/z] vectors supply the vertices.
87
- *
88
- * Supported forms:
89
- * trimesh(T, x, y) — 2-D triangular mesh
90
- * trimesh(T, x, y, z) — 3-D triangular mesh
91
- * trimesh(T, x, y, z, c) — c is per-vertex color data
92
- * trimesh(TO) — triangulation object (struct exposing
93
- * ConnectivityList + Points)
94
- * trimesh(___, Name, Value) — patch properties
95
- * trimesh(ax, ___) — leading axes handle (ignored)
96
- */
97
- export declare function parseTriMeshArgs(args: RuntimeValue[]): PatchTrace;
98
- /**
99
- * Parse surf() arguments.
100
- *
101
- * Supported forms:
102
- * surf(Z) — Z is m×n, X = 1:n, Y = 1:m
103
- * surf(Z, C) — Z is m×n, C is m×n color data
104
- * surf(X, Y, Z) — X, Y, Z are m×n matrices (or X is 1×n / Y is m×1)
105
- * surf(X, Y, Z, C) — with explicit color data
106
- * surf(..., Name, Value) — name-value pairs
107
- */
108
- export declare function parseSurfArgs(args: RuntimeValue[]): SurfTrace;
109
- /**
110
- * Parse pcolor() arguments.
111
- *
112
- * Supported forms:
113
- * pcolor(C) — C is m×n, X = 1:n, Y = 1:m
114
- * pcolor(X, Y, C) — X, Y, C are m×n matrices (or X is 1×n / Y is m×1)
115
- * pcolor(..., Name, Value) — name-value pairs (EdgeColor, FaceAlpha)
116
- */
117
- export declare function parsePcolorArgs(args: RuntimeValue[]): PcolorTrace;
118
- /**
119
- * Parse scatter() arguments.
120
- *
121
- * Supported forms:
122
- * scatter(X, Y)
123
- * scatter(X, Y, sz)
124
- * scatter(X, Y, sz, c)
125
- * scatter(X, Y, ..., 'filled')
126
- * scatter(X, Y, ..., mkr)
127
- * scatter(X, Y, ..., Name, Value)
128
- */
129
- export declare function parseScatterArgs(args: RuntimeValue[]): PlotTrace[];
130
- /**
131
- * Parse imagesc() arguments.
132
- *
133
- * Supported forms:
134
- * imagesc(C) — C is m×n matrix
135
- * imagesc(x, y, C) — x and y are vectors defining axis limits
136
- */
137
- export declare function parseImagescArgs(args: RuntimeValue[]): ImagescTrace;
138
- /**
139
- * Parse contour()/contourf() arguments.
140
- *
141
- * Supported forms:
142
- * contour(Z)
143
- * contour(Z, N)
144
- * contour(X, Y, Z)
145
- * contour(X, Y, Z, N)
146
- * contour(..., Name, Value)
147
- */
148
- export declare function parseContourArgs(args: RuntimeValue[], filled: boolean): ContourTrace;
149
- /** Result of computing contour geometry: the MATLAB contour matrix `C`
150
- * (column-major `2 × n` data) plus the level list actually used. */
151
- export interface ContourMatrix {
152
- /** Column-major `2 × n` data for a `RTV.tensor(data, [2, n])`. */
153
- data: number[];
154
- n: number;
155
- levelList: number[];
156
- }
157
- /** Compute the MATLAB contour matrix for a parsed contour trace via marching
158
- * squares. Each marching-squares segment is emitted as its own two-vertex
159
- * contour line (header `[level; 2]` followed by the two `[x; y]` vertices) —
160
- * a valid contour matrix whose geometry matches MATLAB's connected polylines
161
- * segment-for-segment. */
162
- export declare function computeContourMatrix(trace: ContourTrace): ContourMatrix;
163
- /**
164
- * Parse mesh() arguments — same as surf but with different default rendering.
165
- */
166
- export declare function parseMeshArgs(args: RuntimeValue[]): SurfTrace;
167
- /**
168
- * Parse bar() arguments.
169
- *
170
- * Supported forms:
171
- * bar(Y) — Y values with x = 1:length(Y)
172
- * bar(X, Y) — explicit X positions
173
- * bar(..., width) — relative bar width (scalar 0–1)
174
- * bar(..., color) — single-char color spec
175
- */
176
- export declare function parseBarArgs(args: RuntimeValue[]): BarTrace[];
177
- /**
178
- * Parse barh() arguments — same forms as bar() but rendered horizontally.
179
- *
180
- * Supported forms:
181
- * barh(Y) — Y values (bar lengths) with positions = 1:length(Y)
182
- * barh(X, Y) — explicit positions X, bar lengths Y
183
- * barh(..., width) — relative bar thickness (scalar 0–1)
184
- * barh(..., color) — single-char color spec
185
- */
186
- export declare function parseBarHArgs(args: RuntimeValue[]): BarTrace[];
187
- /**
188
- * Parse bar3() / bar3h() arguments.
189
- *
190
- * Supported forms:
191
- * bar3(Z) — Z values with y = 1:m, x = 1:n
192
- * bar3(Y, Z) — explicit Y positions
193
- * bar3(..., width) — relative bar width (scalar 0–1)
194
- * bar3(..., color) — single-char color spec
195
- */
196
- export declare function parseBar3Args(args: RuntimeValue[]): Bar3Trace;
197
- /**
198
- * Parse stairs() arguments — same forms as plot() but with staircase-transformed coordinates.
199
- *
200
- * Supported forms:
201
- * stairs(Y)
202
- * stairs(X, Y)
203
- * stairs(..., LineSpec)
204
- * stairs(..., Name, Value)
205
- */
206
- export declare function parseStairsArgs(args: RuntimeValue[]): PlotTrace[];
207
- /**
208
- * Parse errorbar() arguments.
209
- *
210
- * Supported forms:
211
- * errorbar(y, err) — symmetric vertical
212
- * errorbar(x, y, err) — symmetric vertical with explicit x
213
- * errorbar(x, y, neg, pos) — asymmetric vertical
214
- * errorbar(x, y, yneg, ypos, xneg, xpos) — both axes
215
- * errorbar(..., LineSpec)
216
- */
217
- export declare function parseErrorBarArgs(args: RuntimeValue[]): ErrorBarTrace[];
218
- /**
219
- * Parse area() arguments.
220
- *
221
- * Supported forms:
222
- * area(Y) — fill under Y with x = 1:length(Y)
223
- * area(X, Y) — explicit X
224
- * area(..., basevalue) — scalar baseline (default 0)
225
- * area(..., Name, Value)
226
- *
227
- * Returns { traces, baseValue }.
228
- */
229
- export declare function parseAreaArgs(args: RuntimeValue[]): {
230
- traces: PlotTrace[];
231
- baseValue: number;
232
- };
233
- /**
234
- * Parse scatter3() arguments.
235
- *
236
- * Supported forms:
237
- * scatter3(X, Y, Z)
238
- * scatter3(X, Y, Z, S)
239
- * scatter3(X, Y, Z, S, C)
240
- * scatter3(..., 'filled')
241
- * scatter3(..., markertype)
242
- */
243
- export declare function parseScatter3Args(args: RuntimeValue[]): Plot3Trace[];
244
- /**
245
- * Parse histogram() arguments.
246
- *
247
- * Supported forms:
248
- * histogram(X)
249
- * histogram(X, nbins)
250
- * histogram(X, edges)
251
- */
252
- export declare function parseHistogramArgs(args: RuntimeValue[]): BarTrace[];
253
- /**
254
- * Parse histogram2() arguments.
255
- *
256
- * Supported forms:
257
- * histogram2(X, Y)
258
- * histogram2(X, Y, nbins) — nbins is scalar or [nx, ny]
259
- * histogram2(X, Y, Xedges, Yedges)
260
- */
261
- export declare function parseHistogram2Args(args: RuntimeValue[]): Bar3Trace;
262
- /**
263
- * Parse boxchart() arguments.
264
- *
265
- * Supported forms:
266
- * boxchart(ydata) — one box per column of ydata
267
- * boxchart(xgroupdata, ydata) — group ydata by unique values in xgroupdata
268
- */
269
- export declare function parseBoxchartArgs(args: RuntimeValue[]): BoxTrace[];
270
- /**
271
- * Parse swarmchart() arguments.
272
- *
273
- * Supported forms:
274
- * swarmchart(x, y)
275
- * swarmchart(x, y, sz)
276
- * swarmchart(x, y, sz, c)
277
- * swarmchart(..., 'filled')
278
- * swarmchart(..., markertype)
279
- */
280
- export declare function parseSwarmchartArgs(args: RuntimeValue[]): PlotTrace[];
281
- /**
282
- * Parse swarmchart3() arguments.
283
- *
284
- * Supported forms:
285
- * swarmchart3(x, y, z)
286
- * swarmchart3(x, y, z, sz)
287
- * swarmchart3(x, y, z, sz, c)
288
- * swarmchart3(..., 'filled')
289
- * swarmchart3(..., markertype)
290
- */
291
- export declare function parseSwarmchart3Args(args: RuntimeValue[]): Plot3Trace[];
292
- /**
293
- * Parse piechart() / donutchart() arguments.
294
- *
295
- * Supported forms:
296
- * piechart(data)
297
- * piechart(data, names)
298
- *
299
- * @param innerRadius 0 for pie, >0 for donut
300
- */
301
- export declare function parsePiechartArgs(args: RuntimeValue[], innerRadius: number): PieTrace;
302
- /**
303
- * Parse heatmap() arguments.
304
- *
305
- * Supported forms:
306
- * heatmap(cdata) — matrix of values
307
- * heatmap(xvalues, yvalues, cdata) — with axis labels
308
- */
309
- export declare function parseHeatmapArgs(args: RuntimeValue[]): HeatmapTrace;
310
- /**
311
- * Parse quiver() arguments.
312
- *
313
- * Supported forms:
314
- * quiver(U, V)
315
- * quiver(X, Y, U, V)
316
- * quiver(..., scale) — scale: nonnegative number or 'off'
317
- * quiver(..., LineSpec)
318
- * quiver(..., LineSpec, 'filled')
319
- * quiver(..., Name, Value) — Color, LineStyle, LineWidth, ShowArrowHead, etc.
320
- *
321
- * X, Y, U, V can be vectors or matrices. If U,V are matrices and X,Y are
322
- * vectors, X and Y are expanded to a meshgrid.
323
- */
324
- export declare function parseQuiverArgs(args: RuntimeValue[]): QuiverTrace[];
325
- /**
326
- * Parse quiver3() arguments.
327
- *
328
- * Supported forms:
329
- * quiver3(Z, U, V, W)
330
- * quiver3(X, Y, Z, U, V, W)
331
- * quiver3(..., scale) — scale: nonnegative number or 'off'
332
- * quiver3(..., LineSpec)
333
- * quiver3(..., LineSpec, 'filled')
334
- * quiver3(..., Name, Value) — Color, LineStyle, LineWidth, ShowArrowHead, …
335
- */
336
- export declare function parseQuiver3Args(args: RuntimeValue[]): Quiver3Trace;
@@ -1,2 +0,0 @@
1
- /** Names of all special builtins. Standalone module to avoid circular imports. */
2
- export declare const SPECIAL_BUILTIN_NAMES: readonly string[];