numbl 0.4.19 → 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 (314) 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/helpers/sparse-direct.d.ts +107 -0
  32. package/dist-browser/numbl-core/helpers/warn.d.ts +9 -0
  33. package/dist-browser/numbl-core/interpreter/builtins/index.d.ts +4 -1
  34. package/dist-browser/numbl-core/interpreter/builtins/sparse-solvers.d.ts +16 -0
  35. package/dist-browser/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
  36. package/dist-browser/numbl-core/interpreter/builtins/types.d.ts +7 -7
  37. package/dist-browser/numbl-core/interpreter/interpreter.d.ts +6 -6
  38. package/dist-browser/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
  39. package/dist-browser/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
  40. package/dist-browser/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
  41. package/dist-browser/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
  42. package/dist-browser/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
  43. package/dist-browser/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
  44. package/dist-browser/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
  45. package/dist-browser/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
  46. package/dist-browser/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
  47. package/dist-browser/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
  48. package/dist-browser/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
  49. package/dist-browser/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
  50. package/dist-browser/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
  51. package/dist-browser/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
  52. package/dist-browser/numbl-core/jit/builtins/registry.d.ts +15 -30
  53. package/dist-browser/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
  54. package/dist-browser/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
  55. package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
  56. package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
  57. package/dist-browser/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
  58. package/dist-browser/numbl-core/jit/codegen/emit.d.ts +9 -30
  59. package/dist-browser/numbl-core/jit/codegen/emitJs.d.ts +9 -27
  60. package/dist-browser/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
  61. package/dist-browser/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
  62. package/dist-browser/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
  63. package/dist-browser/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
  64. package/dist-browser/numbl-core/jit/codegen/runtime.d.ts +7 -28
  65. package/dist-browser/numbl-core/jit/compileSpec.d.ts +3 -6
  66. package/dist-browser/numbl-core/jit/compileSpecC.d.ts +5 -0
  67. package/dist-browser/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
  68. package/dist-browser/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
  69. package/dist-browser/numbl-core/jit/lowering/errors.d.ts +3 -15
  70. package/dist-browser/numbl-core/jit/lowering/ir.d.ts +0 -2
  71. package/dist-browser/numbl-core/jit/lowering/lower.d.ts +4 -12
  72. package/dist-browser/numbl-core/jit/lowering/types.d.ts +2 -7
  73. package/dist-browser/numbl-core/jit/numbl/index.d.ts +5 -14
  74. package/dist-browser/numbl-core/jit/parser/index.d.ts +4 -9
  75. package/dist-browser/numbl-core/jit/workspace/workspace.d.ts +32 -136
  76. package/dist-browser/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
  77. package/dist-browser/numbl-core/jsUserFunctions.d.ts +10 -12
  78. package/dist-browser/numbl-core/lowering/classInfo.d.ts +4 -1
  79. package/dist-browser/numbl-core/lowering/loweringContext.d.ts +15 -23
  80. package/dist-browser/numbl-core/native/lapack-bridge.d.ts +137 -128
  81. package/dist-browser/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
  82. package/dist-browser/numbl-core/native/ts-lapack-complex.d.ts +23 -0
  83. package/dist-browser/numbl-core/native/ts-lapack-eig-hermitian.d.ts +33 -0
  84. package/dist-browser/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
  85. package/dist-browser/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
  86. package/dist-browser/numbl-core/ops/dispatch.d.ts +4 -5
  87. package/dist-browser/numbl-core/parser/types.d.ts +1 -21
  88. package/{dist-lib/numbl-core/runtime → dist-browser/numbl-core/plotting}/axisCommand.d.ts +2 -2
  89. package/dist-browser/{graphics → numbl-core/plotting}/axisLimits.d.ts +14 -2
  90. package/dist-browser/numbl-core/plotting/builtins.d.ts +8 -0
  91. package/dist-browser/numbl-core/plotting/colormaps.d.ts +10 -0
  92. package/dist-browser/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
  93. package/dist-browser/numbl-core/plotting/imagescExtent.d.ts +19 -0
  94. package/dist-browser/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
  95. package/dist-browser/numbl-core/plotting/parseArgsChart.d.ts +94 -0
  96. package/dist-browser/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
  97. package/dist-browser/numbl-core/plotting/parseArgsLine.d.ts +103 -0
  98. package/dist-browser/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
  99. package/dist-browser/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
  100. package/dist-browser/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
  101. package/dist-browser/numbl-core/plotting/streamline.d.ts +16 -0
  102. package/{dist-graphics/graphics → dist-browser/numbl-core/plotting}/types.d.ts +9 -7
  103. package/dist-browser/numbl-core/runtime/cow.d.ts +0 -8
  104. package/dist-browser/numbl-core/runtime/refcount.d.ts +0 -3
  105. package/dist-browser/numbl-core/runtime/registerSpecial.d.ts +15 -0
  106. package/dist-browser/numbl-core/runtime/runtime.d.ts +11 -35
  107. package/dist-browser/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
  108. package/dist-browser/numbl-core/runtime/specialBuiltins.d.ts +3 -9
  109. package/dist-browser/numbl-core/runtime/types.d.ts +12 -0
  110. package/dist-browser/numbl-core/runtime/uihtmlSession.d.ts +5 -13
  111. package/dist-browser/numbl-core/runtime/utils.d.ts +4 -1
  112. package/dist-browser/numbl-core/version.d.ts +1 -1
  113. package/dist-browser/numbl-core/workspace/workspace.d.ts +64 -0
  114. package/dist-browser/ts-lapack/src/BLAS/dsymv.d.ts +1 -0
  115. package/dist-browser/ts-lapack/src/BLAS/dsyr2.d.ts +1 -0
  116. package/dist-browser/ts-lapack/src/SRC/dlae2.d.ts +4 -0
  117. package/dist-browser/ts-lapack/src/SRC/dlaev2.d.ts +6 -0
  118. package/dist-browser/ts-lapack/src/SRC/dlanst.d.ts +1 -0
  119. package/dist-browser/ts-lapack/src/SRC/dlansy.d.ts +1 -0
  120. package/dist-browser/ts-lapack/src/SRC/dlasrt.d.ts +1 -0
  121. package/dist-browser/ts-lapack/src/SRC/dorgtr.d.ts +1 -0
  122. package/dist-browser/ts-lapack/src/SRC/dsteqr.d.ts +4 -0
  123. package/dist-browser/ts-lapack/src/SRC/dsyev.d.ts +1 -0
  124. package/dist-browser/ts-lapack/src/SRC/dsytd2.d.ts +1 -0
  125. package/dist-browser/vfs/syncVfsChanges.d.ts +2 -2
  126. package/dist-cli/cli.js +74241 -77271
  127. package/dist-graphics/graphics/FigureView.d.ts +1 -1
  128. package/dist-graphics/graphics/SurfView.d.ts +3 -2
  129. package/dist-graphics/graphics/drawPlot.d.ts +1 -1
  130. package/dist-graphics/graphics/exportFigureHdf5.d.ts +1 -1
  131. package/dist-graphics/graphics/figureHashTransport.d.ts +1 -1
  132. package/dist-graphics/graphics/figureUpload.d.ts +1 -1
  133. package/dist-graphics/graphics/importFigureHdf5.d.ts +1 -1
  134. package/dist-graphics/graphics/openInFigureViewer.d.ts +1 -1
  135. package/dist-graphics/graphics/plotHelpers.d.ts +1 -1
  136. package/dist-graphics/graphics/plotLegend.d.ts +1 -1
  137. package/dist-graphics/graphics/plotMarkers.d.ts +1 -1
  138. package/dist-graphics/graphics/restoreNaNs.d.ts +1 -1
  139. package/dist-graphics/graphics/uihtmlRelay.d.ts +16 -0
  140. package/dist-graphics/graphics-lib.d.ts +3 -3
  141. package/dist-graphics/index.js +294 -328
  142. package/{dist-lib/graphics → dist-graphics/numbl-core/plotting}/axisLimits.d.ts +14 -2
  143. package/dist-graphics/numbl-core/plotting/colormaps.d.ts +10 -0
  144. package/dist-graphics/numbl-core/plotting/imagescExtent.d.ts +19 -0
  145. package/{dist-browser/graphics → dist-graphics/numbl-core/plotting}/types.d.ts +9 -7
  146. package/dist-lib/browser/mip.d.ts +17 -0
  147. package/dist-lib/cli-scan.d.ts +8 -1
  148. package/dist-lib/lib.d.ts +1 -1
  149. package/dist-lib/lib.js +37081 -39889
  150. package/dist-lib/node.js +22 -14
  151. package/dist-lib/numbl-core/execSession.d.ts +39 -0
  152. package/dist-lib/numbl-core/executeCode.d.ts +10 -1
  153. package/dist-lib/numbl-core/executors/classification.d.ts +2 -10
  154. package/dist-lib/numbl-core/executors/jit/backend.d.ts +65 -0
  155. package/dist-lib/numbl-core/executors/jit/cBackend.d.ts +22 -0
  156. package/dist-lib/numbl-core/executors/jit/callExecutor.d.ts +13 -44
  157. package/dist-lib/numbl-core/executors/jit/hostHelpers.d.ts +24 -0
  158. package/dist-lib/numbl-core/executors/jit/jsBackend.d.ts +15 -0
  159. package/dist-lib/numbl-core/executors/jit/loopExecutor.d.ts +13 -40
  160. package/dist-lib/numbl-core/executors/jit/session.d.ts +1 -1
  161. package/dist-lib/numbl-core/executors/jit/topLevelExecutor.d.ts +13 -33
  162. package/dist-lib/numbl-core/executors/jit/valueAdapterC.d.ts +32 -48
  163. package/dist-lib/numbl-core/executors/lowering.d.ts +38 -96
  164. package/dist-lib/numbl-core/executors/plugins.d.ts +14 -28
  165. package/dist-lib/numbl-core/executors/registry.d.ts +32 -133
  166. package/dist-lib/numbl-core/executors/types.d.ts +30 -92
  167. package/dist-lib/numbl-core/functionResolve.d.ts +3 -13
  168. package/dist-lib/numbl-core/helpers/check-helpers.d.ts +0 -5
  169. package/dist-lib/numbl-core/helpers/glob.d.ts +14 -0
  170. package/dist-lib/numbl-core/helpers/linsolve.d.ts +3 -13
  171. package/dist-lib/numbl-core/helpers/reduction-helpers.d.ts +2 -4
  172. package/dist-lib/numbl-core/helpers/shape-utils.d.ts +10 -0
  173. package/dist-lib/numbl-core/helpers/sparse-direct.d.ts +107 -0
  174. package/dist-lib/numbl-core/helpers/warn.d.ts +9 -0
  175. package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +4 -1
  176. package/dist-lib/numbl-core/interpreter/builtins/sparse-solvers.d.ts +16 -0
  177. package/dist-lib/numbl-core/interpreter/builtins/time-system.d.ts +0 -1
  178. package/dist-lib/numbl-core/interpreter/builtins/types.d.ts +7 -7
  179. package/dist-lib/numbl-core/interpreter/interpreter.d.ts +6 -6
  180. package/dist-lib/numbl-core/interpreter/interpreterFunctions.d.ts +9 -1
  181. package/dist-lib/numbl-core/interpreter/interpreterSpecialBuiltins.d.ts +6 -3
  182. package/dist-lib/numbl-core/jit/builtins/defs/_shared.d.ts +1 -5
  183. package/dist-lib/numbl-core/jit/builtins/defs/arithmetic/_elemwise.d.ts +1 -2
  184. package/dist-lib/numbl-core/jit/builtins/defs/logical/_unary_pred.d.ts +3 -3
  185. package/dist-lib/numbl-core/jit/builtins/defs/logical/fieldnames.d.ts +1 -1
  186. package/dist-lib/numbl-core/jit/builtins/defs/logical/strcmp.d.ts +1 -1
  187. package/dist-lib/numbl-core/jit/builtins/defs/math/_unary_real.d.ts +5 -2
  188. package/dist-lib/numbl-core/jit/builtins/defs/math/realsqrt.d.ts +6 -0
  189. package/dist-lib/numbl-core/jit/builtins/defs/reduction/_shape.d.ts +0 -5
  190. package/dist-lib/numbl-core/jit/builtins/defs/shape/_construct.d.ts +0 -4
  191. package/dist-lib/numbl-core/jit/builtins/defs/shape/_triangular.d.ts +2 -8
  192. package/dist-lib/numbl-core/jit/builtins/defs/system/deal.d.ts +4 -5
  193. package/dist-lib/numbl-core/jit/builtins/defs/system/feval.d.ts +7 -29
  194. package/dist-lib/numbl-core/jit/builtins/registry.d.ts +15 -30
  195. package/dist-lib/numbl-core/jit/builtins/runtime/system/cdiv.d.ts +4 -0
  196. package/dist-lib/numbl-core/jit/builtins/runtime/system/cscalar.d.ts +4 -0
  197. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_elemwise_real_fn.d.ts +45 -15
  198. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_reduce_real.d.ts +5 -5
  199. package/dist-lib/numbl-core/jit/builtins/runtime/tensor_ops/tensor_unary_real_math.d.ts +6 -0
  200. package/dist-lib/numbl-core/jit/codegen/emit.d.ts +9 -30
  201. package/dist-lib/numbl-core/jit/codegen/emitJs.d.ts +9 -27
  202. package/dist-lib/numbl-core/jit/codegen/emitStmt.d.ts +8 -31
  203. package/dist-lib/numbl-core/jit/codegen/emitTensorFused.d.ts +10 -9
  204. package/dist-lib/numbl-core/jit/codegen/inlinePass.d.ts +39 -48
  205. package/dist-lib/numbl-core/jit/codegen/prettyIR.d.ts +1 -6
  206. package/dist-lib/numbl-core/jit/codegen/runtime.d.ts +7 -28
  207. package/dist-lib/numbl-core/jit/compileSpec.d.ts +3 -6
  208. package/dist-lib/numbl-core/jit/compileSpecC.d.ts +5 -0
  209. package/dist-lib/numbl-core/jit/lowering/assignedFlags.d.ts +24 -0
  210. package/dist-lib/numbl-core/jit/lowering/definiteAssign.d.ts +3 -1
  211. package/dist-lib/numbl-core/jit/lowering/errors.d.ts +3 -15
  212. package/dist-lib/numbl-core/jit/lowering/ir.d.ts +0 -2
  213. package/dist-lib/numbl-core/jit/lowering/lower.d.ts +4 -12
  214. package/dist-lib/numbl-core/jit/lowering/types.d.ts +2 -7
  215. package/dist-lib/numbl-core/jit/numbl/index.d.ts +5 -14
  216. package/dist-lib/numbl-core/jit/parser/index.d.ts +4 -9
  217. package/dist-lib/numbl-core/jit/workspace/workspace.d.ts +32 -136
  218. package/dist-lib/numbl-core/jitDeclineDiagnostics.d.ts +1 -1
  219. package/dist-lib/numbl-core/jsUserFunctions.d.ts +10 -12
  220. package/dist-lib/numbl-core/lowering/classInfo.d.ts +4 -1
  221. package/dist-lib/numbl-core/lowering/loweringContext.d.ts +15 -23
  222. package/dist-lib/numbl-core/native/lapack-bridge.d.ts +137 -128
  223. package/dist-lib/numbl-core/native/ts-lapack-bridge.d.ts +4 -5
  224. package/dist-lib/numbl-core/native/ts-lapack-complex.d.ts +23 -0
  225. package/dist-lib/numbl-core/native/ts-lapack-eig-hermitian.d.ts +33 -0
  226. package/dist-lib/numbl-core/native/ts-lapack-qr-lu.d.ts +37 -0
  227. package/dist-lib/numbl-core/native/wasm-lapack-bridge.d.ts +4 -5
  228. package/dist-lib/numbl-core/ops/dispatch.d.ts +4 -5
  229. package/dist-lib/numbl-core/parser/types.d.ts +1 -21
  230. package/{dist-browser/numbl-core/runtime → dist-lib/numbl-core/plotting}/axisCommand.d.ts +2 -2
  231. package/{dist-graphics/graphics → dist-lib/numbl-core/plotting}/axisLimits.d.ts +14 -2
  232. package/dist-lib/numbl-core/plotting/builtins.d.ts +8 -0
  233. package/dist-lib/numbl-core/plotting/colormaps.d.ts +10 -0
  234. package/dist-lib/numbl-core/{runtime/plotBuiltinDispatch.d.ts → plotting/dispatch.d.ts} +14 -25
  235. package/dist-lib/numbl-core/plotting/imagescExtent.d.ts +19 -0
  236. package/dist-lib/numbl-core/{runtime/runtimePlot.d.ts → plotting/instructions.d.ts} +5 -17
  237. package/dist-lib/numbl-core/plotting/parseArgsChart.d.ts +94 -0
  238. package/dist-lib/numbl-core/plotting/parseArgsCommon.d.ts +64 -0
  239. package/dist-lib/numbl-core/plotting/parseArgsLine.d.ts +103 -0
  240. package/dist-lib/numbl-core/plotting/parseArgsPatch.d.ts +38 -0
  241. package/dist-lib/numbl-core/plotting/parseArgsQuiver.d.ts +32 -0
  242. package/dist-lib/numbl-core/plotting/parseArgsSurface.d.ts +75 -0
  243. package/dist-lib/numbl-core/plotting/streamline.d.ts +16 -0
  244. package/dist-lib/{graphics → numbl-core/plotting}/types.d.ts +9 -7
  245. package/dist-lib/numbl-core/runtime/cow.d.ts +0 -8
  246. package/dist-lib/numbl-core/runtime/refcount.d.ts +0 -3
  247. package/dist-lib/numbl-core/runtime/registerSpecial.d.ts +15 -0
  248. package/dist-lib/numbl-core/runtime/runtime.d.ts +11 -35
  249. package/dist-lib/numbl-core/runtime/runtimeDispatch.d.ts +6 -0
  250. package/dist-lib/numbl-core/runtime/specialBuiltins.d.ts +3 -9
  251. package/dist-lib/numbl-core/runtime/types.d.ts +12 -0
  252. package/dist-lib/numbl-core/runtime/uihtmlSession.d.ts +5 -13
  253. package/dist-lib/numbl-core/runtime/utils.d.ts +4 -1
  254. package/dist-lib/numbl-core/version.d.ts +1 -1
  255. package/dist-lib/numbl-core/workspace/workspace.d.ts +64 -0
  256. package/dist-lib/ts-lapack/src/BLAS/dsymv.d.ts +1 -0
  257. package/dist-lib/ts-lapack/src/BLAS/dsyr2.d.ts +1 -0
  258. package/dist-lib/ts-lapack/src/SRC/dlae2.d.ts +4 -0
  259. package/dist-lib/ts-lapack/src/SRC/dlaev2.d.ts +6 -0
  260. package/dist-lib/ts-lapack/src/SRC/dlanst.d.ts +1 -0
  261. package/dist-lib/ts-lapack/src/SRC/dlansy.d.ts +1 -0
  262. package/dist-lib/ts-lapack/src/SRC/dlasrt.d.ts +1 -0
  263. package/dist-lib/ts-lapack/src/SRC/dorgtr.d.ts +1 -0
  264. package/dist-lib/ts-lapack/src/SRC/dsteqr.d.ts +4 -0
  265. package/dist-lib/ts-lapack/src/SRC/dsyev.d.ts +1 -0
  266. package/dist-lib/ts-lapack/src/SRC/dsytd2.d.ts +1 -0
  267. package/dist-lib/vfs/unzipToFiles.d.ts +7 -0
  268. package/dist-plot-viewer/assets/index-C0fIevlp.js +4504 -0
  269. package/dist-plot-viewer/index.html +1 -1
  270. package/dist-site-viewer/assets/index-BDaviCH6.js +4832 -0
  271. package/dist-site-viewer/assets/numbl-worker-D6m4K2PP.js +5691 -0
  272. package/dist-site-viewer/index.html +2 -2
  273. package/native/lapack_eig.cpp +156 -0
  274. package/native/numbl_addon.cpp +8 -12
  275. package/native/numbl_addon_common.h +14 -5
  276. package/package.json +6 -5
  277. package/dist-browser/hooks/useProjectFiles.d.ts +0 -45
  278. package/dist-browser/numbl-core/executors/context.d.ts +0 -76
  279. package/dist-browser/numbl-core/executors/index.d.ts +0 -14
  280. package/dist-browser/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
  281. package/dist-browser/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
  282. package/dist-browser/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
  283. package/dist-browser/numbl-core/helpers/dummy.d.ts +0 -5
  284. package/dist-browser/numbl-core/jit/runtime/context.d.ts +0 -23
  285. package/dist-browser/numbl-core/jit/runtime/inferType.d.ts +0 -10
  286. package/dist-browser/numbl-core/jit/runtime/value.d.ts +0 -101
  287. package/dist-browser/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
  288. package/dist-browser/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
  289. package/dist-browser/numbl-core/native/bridge-resolve.d.ts +0 -14
  290. package/dist-browser/numbl-core/runtime/plotUtils.d.ts +0 -336
  291. package/dist-browser/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
  292. package/dist-graphics/graphics/surfColormap.d.ts +0 -2
  293. package/dist-lib/numbl-core/executors/context.d.ts +0 -76
  294. package/dist-lib/numbl-core/executors/index.d.ts +0 -14
  295. package/dist-lib/numbl-core/executors/jit/cJitCallExecutor.d.ts +0 -35
  296. package/dist-lib/numbl-core/executors/jit/cJitLoopExecutor.d.ts +0 -31
  297. package/dist-lib/numbl-core/executors/jit/cJitTopLevelExecutor.d.ts +0 -29
  298. package/dist-lib/numbl-core/helpers/dummy.d.ts +0 -5
  299. package/dist-lib/numbl-core/jit/runtime/context.d.ts +0 -23
  300. package/dist-lib/numbl-core/jit/runtime/inferType.d.ts +0 -10
  301. package/dist-lib/numbl-core/jit/runtime/value.d.ts +0 -101
  302. package/dist-lib/numbl-core/jit/workspace/driverPrologue.d.ts +0 -59
  303. package/dist-lib/numbl-core/jit/workspace/mtoc2UserFunctionLoader.d.ts +0 -62
  304. package/dist-lib/numbl-core/native/bridge-resolve.d.ts +0 -14
  305. package/dist-lib/numbl-core/runtime/plotUtils.d.ts +0 -336
  306. package/dist-lib/numbl-core/runtime/specialBuiltinNames.d.ts +0 -2
  307. package/dist-plot-viewer/assets/index-YeXWXIxH.js +0 -4504
  308. package/dist-site-viewer/assets/index-B5Y5557F.js +0 -4831
  309. package/dist-site-viewer/assets/numbl-worker-CtoT7C0f.js +0 -5355
  310. package/native/elemwise.cpp +0 -360
  311. package/native/unary_elemwise.cpp +0 -67
  312. /package/dist-browser/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
  313. /package/dist-graphics/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
  314. /package/dist-lib/{graphics → numbl-core/plotting}/figuresReducer.d.ts +0 -0
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Argument parsers for gridded data: surf, mesh, pcolor, imagesc, contour
3
+ * (including the MATLAB contour matrix), and heatmap.
4
+ */
5
+ import { type RuntimeValue } from "../runtime/types.js";
6
+ import type { SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, HeatmapTrace } from "./types.js";
7
+ /**
8
+ * Parse surf() arguments.
9
+ *
10
+ * Supported forms:
11
+ * surf(Z) — Z is m×n, X = 1:n, Y = 1:m
12
+ * surf(Z, C) — Z is m×n, C is m×n color data
13
+ * surf(X, Y, Z) — X, Y, Z are m×n matrices (or X is 1×n / Y is m×1)
14
+ * surf(X, Y, Z, C) — with explicit color data
15
+ * surf(..., Name, Value) — name-value pairs
16
+ */
17
+ export declare function parseSurfArgs(args: RuntimeValue[]): SurfTrace;
18
+ /**
19
+ * Parse pcolor() arguments.
20
+ *
21
+ * Supported forms:
22
+ * pcolor(C) — C is m×n, X = 1:n, Y = 1:m
23
+ * pcolor(X, Y, C) — X, Y, C are m×n matrices (or X is 1×n / Y is m×1)
24
+ * pcolor(..., Name, Value) — name-value pairs (EdgeColor, FaceAlpha)
25
+ */
26
+ export declare function parsePcolorArgs(args: RuntimeValue[]): PcolorTrace;
27
+ /**
28
+ * Parse imagesc() arguments.
29
+ *
30
+ * Supported forms:
31
+ * imagesc(C) — C is m×n matrix
32
+ * imagesc(x, y, C) — x and y are vectors defining axis limits
33
+ * imagesc(..., clims) — clims = [low high] sets the axes' color limits
34
+ */
35
+ export declare function parseImagescArgs(args: RuntimeValue[]): {
36
+ trace: ImagescTrace;
37
+ clims?: [number, number];
38
+ };
39
+ /**
40
+ * Parse contour()/contourf() arguments.
41
+ *
42
+ * Supported forms:
43
+ * contour(Z)
44
+ * contour(Z, N)
45
+ * contour(X, Y, Z)
46
+ * contour(X, Y, Z, N)
47
+ * contour(..., Name, Value)
48
+ */
49
+ export declare function parseContourArgs(args: RuntimeValue[], filled: boolean): ContourTrace;
50
+ /** Result of computing contour geometry: the MATLAB contour matrix `C`
51
+ * (column-major `2 × n` data) plus the level list actually used. */
52
+ export interface ContourMatrix {
53
+ /** Column-major `2 × n` data for a `RTV.tensor(data, [2, n])`. */
54
+ data: number[];
55
+ n: number;
56
+ levelList: number[];
57
+ }
58
+ /** Compute the MATLAB contour matrix for a parsed contour trace via marching
59
+ * squares. Each marching-squares segment is emitted as its own two-vertex
60
+ * contour line (header `[level; 2]` followed by the two `[x; y]` vertices) —
61
+ * a valid contour matrix whose geometry matches MATLAB's connected polylines
62
+ * segment-for-segment. */
63
+ export declare function computeContourMatrix(trace: ContourTrace): ContourMatrix;
64
+ /**
65
+ * Parse mesh() arguments — same as surf but with different default rendering.
66
+ */
67
+ export declare function parseMeshArgs(args: RuntimeValue[]): SurfTrace;
68
+ /**
69
+ * Parse heatmap() arguments.
70
+ *
71
+ * Supported forms:
72
+ * heatmap(cdata) — matrix of values
73
+ * heatmap(xvalues, yvalues, cdata) — with axis labels
74
+ */
75
+ export declare function parseHeatmapArgs(args: RuntimeValue[]): HeatmapTrace;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * streamline / stream2: trace 2-D streamlines through a gridded vector field.
3
+ */
4
+ import type { RuntimeValue } from "../runtime/index.js";
5
+ import type { PlotInstruction } from "./types.js";
6
+ /**
7
+ * streamline(X,Y,U,V,startX,startY) — compute and plot 2D streamlines.
8
+ * streamline(verts) — plot from pre-computed cell array of vertex matrices.
9
+ * Returns a dummy graphics handle.
10
+ */
11
+ export declare function streamlineCall(plotInstructions: PlotInstruction[], args: RuntimeValue[]): RuntimeValue;
12
+ /**
13
+ * stream2(X,Y,U,V,startX,startY) — compute 2D streamline vertices.
14
+ * Returns a cell array of Nx2 vertex matrices.
15
+ */
16
+ export declare function stream2Call(args: RuntimeValue[]): RuntimeValue;
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Shared graphics types used by both numbl-core and the rendering layer.
2
+ * Plot data types: the trace interfaces and `PlotInstruction`, the
3
+ * serializable contract between numbl-core (which emits instructions) and the
4
+ * renderer in src/graphics/ (which consumes them). The renderer imports these
5
+ * from here; numbl-core does not depend on src/graphics/.
3
6
  *
4
- * This file is the single source of truth for plot trace interfaces and
5
- * PlotInstruction. numbl-core re-exports these types so that internal
6
- * runtime code can import them without reaching into src/graphics/.
7
- *
8
- * The numbl-vscode extension syncs this file (and the rest of src/graphics/)
9
- * via devel/sync-graphics.sh.
7
+ * The numbl-vscode extension syncs src/graphics/ via devel/sync-graphics.sh;
8
+ * it also needs the core modules the renderer imports (types, figuresReducer,
9
+ * axisLimits, imagescExtent, colormaps).
10
10
  */
11
11
  export interface PlotTrace {
12
12
  x: number[];
@@ -53,6 +53,8 @@ export interface PatchTrace {
53
53
  edgeColor?: [number, number, number] | "flat" | "interp" | "none";
54
54
  /** Face transparency in [0,1]. */
55
55
  faceAlpha?: number;
56
+ /** Edge transparency in [0,1]. */
57
+ edgeAlpha?: number;
56
58
  lineWidth?: number;
57
59
  lineStyle?: string;
58
60
  marker?: string;
@@ -21,13 +21,5 @@ import { type RefcountRuntime } from "./refcount.js";
21
21
  * be copied (handle-class instances, primitives) — the caller can
22
22
  * `=== v` test if the copy was a no-op. */
23
23
  export declare function cowCopy(v: RuntimeValue): RuntimeValue;
24
- /** If `v` is shared (rc-driven), return a fresh non-shared copy;
25
- * otherwise return `v` unchanged. The new wrapper has refcount 0
26
- * (or 1 if the active scope adopts it via the constructor); the
27
- * caller must bind it into the parent slot to keep it alive.
28
- *
29
- * Returns the original `v` for handle-class instances and primitives —
30
- * callers can `result === v` test to detect a no-op. */
31
- export declare function cowIfShared(v: RuntimeValue): RuntimeValue;
32
24
  export { isShared } from "./refcount.js";
33
25
  export type { RefcountRuntime };
@@ -53,9 +53,6 @@ export declare abstract class Refcounted {
53
53
  * RuntimeDummyHandle, etc.). */
54
54
  protected _destroy(_rt: RefcountRuntime): void;
55
55
  }
56
- /** True if the value is a container that participates in refcounting.
57
- * Primitives (number, boolean, string) return false. */
58
- export declare function isRefcountable(v: unknown): v is Refcounted;
59
56
  /** Increment refcount on a value if it's a container; primitives are noop. */
60
57
  export declare function incref(v: unknown): void;
61
58
  /** Decrement refcount on a value if it's a container; primitives are noop. */
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Registration helpers for builtins that need the active Runtime. They are
3
+ * ordinary IBuiltins; each call gets the runtime from the current-runtime
4
+ * stack.
5
+ */
6
+ import type { Runtime } from "./runtime.js";
7
+ import type { RuntimeValue } from "./types.js";
8
+ /** The runtime executing the current call. */
9
+ export declare function currentRuntime(): Runtime;
10
+ /** Register a builtin that accepts any args and gets the active runtime. */
11
+ export declare function registerSpecial(name: string, fn: (nargout: number, args: RuntimeValue[], rt: Runtime) => unknown): void;
12
+ /** Register a builtin with no outputs. The call site raises "Too many output
13
+ * arguments." when nargout > 0, and `ans` is not set when called as a
14
+ * statement. */
15
+ export declare function registerSpecialVoid(name: string, fn: (args: RuntimeValue[], rt: Runtime) => void): void;
@@ -14,11 +14,13 @@ import { type RuntimeValue, type RuntimeLogical, type RuntimeTensor, type Runtim
14
14
  import { RefScope } from "./refcount.js";
15
15
  import { RuntimeChar, RuntimeCell, RuntimeClassInstanceArray, type RuntimeComplexNumber, type RuntimeClassInstance } from "../runtime/types.js";
16
16
  import { type ItemType } from "../lowering/itemTypes.js";
17
- import type { PlotInstruction } from "../../graphics/types.js";
17
+ import type { PlotInstruction } from "../plotting/types.js";
18
18
  import type { ExecOptions } from "../executeCode.js";
19
19
  import type { FileIOAdapter } from "../fileIOAdapter.js";
20
20
  import type { SystemAdapter } from "../systemAdapter.js";
21
21
  import { type CallSite } from "./runtimeHelpers.js";
22
+ import "./specialBuiltins.js";
23
+ import "../plotting/builtins.js";
22
24
  export declare class Runtime {
23
25
  private options;
24
26
  private initialVariableValues?;
@@ -111,7 +113,7 @@ export declare class Runtime {
111
113
  strictRefcount: boolean;
112
114
  activeAccessors: Set<string>;
113
115
  resolveClassMethod: ((className: string, methodName: string) => ((...args: any[]) => any) | null) | null;
114
- getClassParent: ((className: string) => string | null) | null;
116
+ getClassAncestors: ((className: string) => string[]) | null;
115
117
  classMethodCache: Map<string, ((...args: any[]) => any) | null>;
116
118
  /** Callback for addpath/rmpath — mutates search paths and rebuilds function index. */
117
119
  onPathChange: ((action: "add" | "remove", dir: string, position: "begin" | "end") => void) | null;
@@ -119,27 +121,15 @@ export declare class Runtime {
119
121
  onCwdChange: ((newCwd: string) => void) | null;
120
122
  /** Reference to the active search paths (set by executeCode). */
121
123
  searchPaths: string[];
122
- workspaceAccessors: Map<string, {
123
- get: () => unknown;
124
- set: (v: unknown) => void;
125
- }>;
126
- dynamicWorkspaceVars: Map<string, unknown>;
127
- callerAccessorStack: (Record<string, [
128
- () => unknown,
129
- (v: unknown) => void
130
- ]> | null)[];
131
- private dynamicCallerVarStack;
124
+ /** Warning identifiers turned off with warning('off', id); 'all' covers
125
+ * identifiers without their own entry. */
126
+ warningsOff: Set<string>;
127
+ /** Counter for uihtml component ids. */
128
+ uihtmlSeq: number;
132
129
  fileIO?: FileIOAdapter;
133
130
  system?: SystemAdapter;
134
- builtins: Record<string, (nargout: number, args: unknown[]) => unknown>;
135
131
  customBuiltins: Record<string, (nargout: number, args: unknown[]) => unknown>;
136
132
  compileSpecialized: ((name: string, argTypes: ItemType[], callSite: CallSite) => ((...args: any[]) => any) | null) | null;
137
- evalLocalCallback: ((code: string, initialVars: Record<string, RuntimeValue>, onOutput: (text: string) => void, fileName?: string) => {
138
- returnValue: unknown;
139
- variableValues: Record<string, RuntimeValue>;
140
- searchPaths?: string[];
141
- workspaceFiles?: import("../../numbl-core/workspace/index.js").WorkspaceFile[];
142
- }) | null;
143
133
  jitFunctionCode: Map<string, string>;
144
134
  private dispatchUnknownCache;
145
135
  dispatchUnknownCounts: Map<string, number>;
@@ -166,7 +156,6 @@ export declare class Runtime {
166
156
  * op runs without an explicit `figure`, so a later no-arg `figure` allocates
167
157
  * a new handle instead of reusing 1 (MATLAB semantics). */
168
158
  ensureCurrentFigure(): void;
169
- private initBuiltins;
170
159
  profileEnter(key: string): void;
171
160
  profileLeave(): void;
172
161
  getBuiltinProfile(): Record<string, {
@@ -220,8 +209,6 @@ export declare class Runtime {
220
209
  setVariableValue(name: string, value: RuntimeValue | undefined): void;
221
210
  /** Collect defined variable names from getters and apply argument filters. */
222
211
  private filterVarNames;
223
- /** Get shape of a runtime value as a number array. */
224
- private static varShape;
225
212
  /** Estimate bytes for a runtime value. */
226
213
  private static varBytes;
227
214
  /** Check if a runtime value is complex. */
@@ -233,14 +220,6 @@ export declare class Runtime {
233
220
  private static varInfo;
234
221
  private static whosStruct;
235
222
  whos(nargout: number, getters: Record<string, () => unknown>, args: unknown[]): unknown;
236
- setWorkspaceAccessor(name: string, getter: () => unknown, setter: (v: unknown) => void): void;
237
- getWorkspaceVariable(name: string): unknown | undefined;
238
- setWorkspaceVariable(name: string, value: unknown): void;
239
- pushCallerAccessors(accessors: Record<string, [() => unknown, (v: unknown) => void]> | null): void;
240
- popCallerAccessors(): void;
241
- getCallerVariable(name: string): unknown | undefined;
242
- setCallerVariable(name: string, value: unknown): void;
243
- evalLocal(code: unknown, accessors: Record<string, [() => unknown, (v: unknown) => void]>): unknown;
244
223
  getPersistent(funcId: string, varName: string): RuntimeValue;
245
224
  setPersistent(funcId: string, varName: string, value: RuntimeValue): void;
246
225
  uplus(v: unknown): RuntimeValue;
@@ -276,11 +255,8 @@ export declare class Runtime {
276
255
  * Returns the compiled method function or null if it doesn't exist.
277
256
  */
278
257
  cachedResolveClassMethod(className: string, methodName: string): ((...args: any[]) => any) | null;
279
- /**
280
- * Get the parent class name, using the compiler callback.
281
- * Returns null if no parent or no callback registered.
282
- */
283
- getClassParentName(className: string): string | null;
258
+ /** Ancestor class names of a class, or [] if unknown. */
259
+ classAncestors(className: string): string[];
284
260
  /** Get the class name from a runtime value (for dynamic static method dispatch). */
285
261
  getClassName(value: unknown): string;
286
262
  dispatch(name: string, nargout: number, args: unknown[]): unknown;
@@ -6,6 +6,12 @@
6
6
  */
7
7
  import { type RuntimeValue, type RuntimeLogical, RuntimeFunction } from "../runtime/index.js";
8
8
  import type { Runtime } from "./runtime.js";
9
+ /** Returned by `invokeBuiltin` when `name` is not a builtin. */
10
+ export declare const NOT_A_BUILTIN: unique symbol;
11
+ /** Call the builtin `name`: an execution-specific custom builtin if one is
12
+ * set, else the registered IBuiltin. Returns NOT_A_BUILTIN if neither
13
+ * exists. A builtin with no outputs errors when outputs are requested. */
14
+ export declare function invokeBuiltin(rt: Runtime, name: string, nargout: number, args: unknown[]): unknown;
9
15
  export declare function getFuncHandle(name: string): RuntimeFunction;
10
16
  export declare function makeUserFuncHandle(jsFn: (...args: unknown[]) => unknown, nargin?: number): RuntimeFunction;
11
17
  export declare function isa(rt: Runtime, value: unknown, classNameArg: unknown): RuntimeLogical;
@@ -1,13 +1,7 @@
1
1
  /**
2
2
  * Special builtin functions that require direct runtime access.
3
3
  *
4
- * These builtins are registered as IBuiltins (via registerDynamicIBuiltin)
5
- * that close over the Runtime instance, unifying them with the standard
6
- * IBuiltin dispatch path.
4
+ * They are registered once, at module load, as ordinary IBuiltins; each call
5
+ * gets the active Runtime from the current-runtime stack.
7
6
  */
8
- import type { Runtime } from "./runtime.js";
9
- export { SPECIAL_BUILTIN_NAMES } from "./specialBuiltinNames.js";
10
- /**
11
- * Register all special builtins as IBuiltins closing over the runtime instance.
12
- */
13
- export declare function registerSpecialBuiltins(rt: Runtime): void;
7
+ export {};
@@ -173,6 +173,15 @@ export declare class RuntimeStructArray extends Refcounted {
173
173
  }
174
174
  /** Sparse matrix in CSC (Compressed Sparse Column) format, matching MATLAB's
175
175
  * internal representation. */
176
+ /** Cached structural analysis of a sparse matrix (see helpers/sparse-direct). */
177
+ export interface SparseTriInfo {
178
+ upper: boolean;
179
+ lower: boolean;
180
+ /** Index into ir/pr of the diagonal entry of each column, or -1. */
181
+ diagPos: Int32Array;
182
+ /** Diagonal values (0 where absent). */
183
+ diag: Float64Array;
184
+ }
176
185
  export declare class RuntimeSparseMatrix extends Refcounted {
177
186
  readonly kind: "sparse_matrix";
178
187
  m: number;
@@ -181,6 +190,9 @@ export declare class RuntimeSparseMatrix extends Refcounted {
181
190
  jc: Int32Array;
182
191
  pr: Float64Array;
183
192
  pi: Float64Array | undefined;
193
+ /** Lazily computed by triangularInfo(); valid because sparse matrices are
194
+ * never mutated in place (indexed assignment builds a new matrix). */
195
+ _triInfo: SparseTriInfo | undefined;
184
196
  constructor(m: number, n: number, ir: Int32Array, jc: Int32Array, pr: Float64Array, pi?: Float64Array);
185
197
  }
186
198
  /** Dictionary mapping unique keys to values (MATLAB R2022b+). */
@@ -8,15 +8,11 @@
8
8
  * when an event arrives from the iframe — mirroring MATLAB, where the script
9
9
  * returns but its callbacks keep firing.
10
10
  *
11
- * Dispatch re-activates the run's own special-builtin closures (captured at
12
- * end-of-run, NOT re-registered — re-registering would reset their counters)
13
- * and pushes the runtime so `disp`, plotting, and `sendEventToHTMLSource`
14
- * inside the callback reach this runtime. This mirrors executeCode's own
15
- * save/restore of SPECIAL_BUILTIN_NAMES.
11
+ * Dispatch pushes the runtime so `disp`, plotting, and
12
+ * `sendEventToHTMLSource` inside the callback reach this runtime.
16
13
  */
17
14
  import type { Runtime } from "./runtime.js";
18
- import type { PlotInstruction } from "../../graphics/types.js";
19
- import { type IBuiltin } from "../interpreter/builtins/types.js";
15
+ import type { PlotInstruction } from "../plotting/types.js";
20
16
  export interface UihtmlSession {
21
17
  /** True while at least one component still has a registered callback. */
22
18
  hasCallbacks(): boolean;
@@ -32,9 +28,5 @@ export interface UihtmlSession {
32
28
  /** Release the retained callback handles (and their refs). */
33
29
  dispose(): void;
34
30
  }
35
- /**
36
- * Build a session over a runtime that registered uihtml callbacks.
37
- * `activeSpecials` is a snapshot of this runtime's special-builtin closures,
38
- * captured at end-of-run while they are still installed globally.
39
- */
40
- export declare function createUihtmlSession(rt: Runtime, activeSpecials: Map<string, IBuiltin>, onDrawnow?: (plotInstructions: PlotInstruction[]) => void): UihtmlSession;
31
+ /** Build a session over a runtime that registered uihtml callbacks. */
32
+ export declare function createUihtmlSession(rt: Runtime, onDrawnow?: (plotInstructions: PlotInstruction[]) => void): UihtmlSession;
@@ -1,7 +1,10 @@
1
1
  /**
2
2
  * Tensor shape/indexing utilities.
3
3
  */
4
- import { type RuntimeTensor } from "./types.js";
4
+ import { type RuntimeTensor, type RuntimeValue } from "./types.js";
5
+ /** The MATLAB size of any runtime value, with at least two dimensions.
6
+ * Scalars, strings, structs and objects are 1×1. */
7
+ export declare function valueShape(v: RuntimeValue): number[];
5
8
  /** Get 2D size (rows, cols) from shape, padding with 1s as needed.
6
9
  * For N-D tensors (N>2), trailing dimensions are collapsed into cols,
7
10
  * matching MATLAB's behavior when fewer subscripts than dimensions. */
@@ -1,2 +1,2 @@
1
1
  /** Numbl version, used for JIT disk cache invalidation. */
2
- export declare const NUMBL_VERSION = "0.4.19";
2
+ export declare const NUMBL_VERSION = "0.4.22";
@@ -0,0 +1,64 @@
1
+ /**
2
+ * The files visible to a run: the caller's workspace files, the implicit cwd,
3
+ * the search path and the bundled stdlib. Keeps them in sync with addpath,
4
+ * rmpath and cd, and registers them with the LoweringContext for function
5
+ * resolution.
6
+ */
7
+ import type { LoweringContext, FunctionIndex } from "../lowering/loweringContext.js";
8
+ import type { FileIOAdapter } from "../fileIOAdapter.js";
9
+ import type { SystemAdapter } from "../systemAdapter.js";
10
+ import type { WorkspaceFile, NativeBridge } from "./types.js";
11
+ import { type LoadedJsUserFunction } from "../jsUserFunctions.js";
12
+ /** Search-path entry for bundled shim files; always last. */
13
+ export declare const SHIM_SEARCH_PATH = "__numbl_shims__";
14
+ export declare class Workspace {
15
+ private readonly ctx;
16
+ private readonly fileIO;
17
+ private readonly nativeBridge;
18
+ readonly mFiles: WorkspaceFile[];
19
+ readonly jsFiles: WorkspaceFile[];
20
+ readonly wasmFiles: WorkspaceFile[];
21
+ /** Loaded .numbl.js functions, sorted by search-path priority on rebuild. */
22
+ jsFunctions: LoadedJsUserFunction[];
23
+ /** Names of the bundled stdlib and shim files. */
24
+ readonly bundledFileNames: Set<string>;
25
+ /** The current directory, searched first unless it is an explicit path. */
26
+ implicitCwd: string | null;
27
+ /** True once addpath, rmpath or cd changed the workspace. */
28
+ modified: boolean;
29
+ /** Notified when a .m file enters or leaves the workspace after startup. */
30
+ onFileAdded?: (f: WorkspaceFile) => void;
31
+ onFileRemoved?: (name: string) => void;
32
+ constructor(ctx: LoweringContext, fileIO: FileIOAdapter | undefined, nativeBridge: NativeBridge | undefined);
33
+ get searchPaths(): string[];
34
+ private resolve;
35
+ /** Parse a .m file into the shared AST cache. A file that fails to parse
36
+ * is skipped with a warning rather than aborting the run. */
37
+ private parse;
38
+ /** Initial file set: the caller's files, the implicit cwd, the explicit
39
+ * search paths (files already provided are not re-added) and the bundled
40
+ * stdlib and shims. All .numbl.js files load as one batch so library
41
+ * files (`_name.numbl.js`) are visible across directories. */
42
+ load(files: WorkspaceFile[], searchPaths: string[], implicitCwd: string | null | undefined, system: SystemAdapter | undefined, bundled: WorkspaceFile[]): void;
43
+ /** Register the current files and .numbl.js functions with the context. */
44
+ register(): void;
45
+ /** Re-sort the files by search-path priority, re-register them and return
46
+ * a fresh function index. */
47
+ rebuild(): FunctionIndex;
48
+ /** Scan a directory: parse its .m files not already known, and (re)load
49
+ * its .numbl.js functions. Files are always reloaded because files sent
50
+ * earlier (e.g. by the IDE) may have lacked their wasm/native binaries. */
51
+ private scanDir;
52
+ /** Drop the files under `dir`, except those for which `keep` is true. */
53
+ private removeFilesUnder;
54
+ /** addpath. Returns false if `dir` is already on the path. */
55
+ addPath(dir: string, position: "begin" | "end"): boolean;
56
+ /** rmpath. */
57
+ removePath(dir: string): void;
58
+ /** cd: make `newCwd` the implicit cwd. Returns false if it already is. */
59
+ changeCwd(newCwd: string): boolean;
60
+ /** Search paths to report back to callers (no implicit cwd or shims). */
61
+ explicitSearchPaths(): string[];
62
+ /** Files to report back to callers (no bundled stdlib or shims). */
63
+ userFiles(): WorkspaceFile[];
64
+ }
@@ -0,0 +1 @@
1
+ export declare function dsymv(uplo: number, n: number, alpha: number, a: Float64Array, aOff: number, lda: number, x: Float64Array, xOff: number, incx: number, beta: number, y: Float64Array, yOff: number, incy: number): void;
@@ -0,0 +1 @@
1
+ export declare function dsyr2(uplo: number, n: number, alpha: number, x: Float64Array, xOff: number, incx: number, y: Float64Array, yOff: number, incy: number, a: Float64Array, aOff: number, lda: number): void;
@@ -0,0 +1,4 @@
1
+ export declare function dlae2(a: number, b: number, c: number): {
2
+ rt1: number;
3
+ rt2: number;
4
+ };
@@ -0,0 +1,6 @@
1
+ export declare function dlaev2(a: number, b: number, c: number): {
2
+ rt1: number;
3
+ rt2: number;
4
+ cs1: number;
5
+ sn1: number;
6
+ };
@@ -0,0 +1 @@
1
+ export declare function dlanst(norm: number, n: number, d: Float64Array, dOff: number, e: Float64Array, eOff: number): number;
@@ -0,0 +1 @@
1
+ export declare function dlansy(norm: number, uplo: number, n: number, a: Float64Array, aOff: number, lda: number, work: Float64Array, workOff: number): number;
@@ -0,0 +1 @@
1
+ export declare function dlasrt(id: number, n: number, d: Float64Array, dOff: number): number;
@@ -0,0 +1 @@
1
+ export declare function dorgtr(uplo: number, n: number, a: Float64Array, aOff: number, lda: number, tau: Float64Array, tauOff: number): number;
@@ -0,0 +1,4 @@
1
+ export declare const COMPZ_N = 0;
2
+ export declare const COMPZ_V = 1;
3
+ export declare const COMPZ_I = 2;
4
+ export declare function dsteqr(compz: number, n: number, d: Float64Array, dOff: number, e: Float64Array, eOff: number, z: Float64Array, zOff: number, ldz: number, work: Float64Array, workOff: number): number;
@@ -0,0 +1 @@
1
+ export declare function dsyev(wantz: boolean, uplo: number, n: number, a: Float64Array, aOff: number, lda: number, w: Float64Array, wOff: number): number;
@@ -0,0 +1 @@
1
+ export declare function dsytd2(uplo: number, n: number, a: Float64Array, aOff: number, lda: number, d: Float64Array, dOff: number, e: Float64Array, eOff: number, tau: Float64Array, tauOff: number): number;
@@ -2,9 +2,9 @@
2
2
  * Syncs VFS changes from a worker execution back to IndexedDB.
3
3
  */
4
4
  import type { VfsChanges } from "./VirtualFileSystem.js";
5
- import type { WorkspaceFile } from "../hooks/useProjectFiles.js";
5
+ import type { FileEntry } from "../hooks/projectFilesState.js";
6
6
  export interface VfsSyncResult {
7
- addedFiles: WorkspaceFile[];
7
+ addedFiles: FileEntry[];
8
8
  modifiedFiles: {
9
9
  path: string;
10
10
  data: Uint8Array;