numbl 0.4.4 → 0.4.6

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 (38) hide show
  1. package/README.md +5 -1
  2. package/dist-cli/cli.js +16094 -13802
  3. package/dist-lib/graphics/figuresReducer.d.ts +9 -0
  4. package/dist-lib/graphics/types.d.ts +12 -0
  5. package/dist-lib/lib.d.ts +2 -0
  6. package/dist-lib/lib.js +2330 -5207
  7. package/dist-lib/numbl-core/executeCode.d.ts +10 -0
  8. package/dist-lib/numbl-core/executors/plugins.d.ts +9 -0
  9. package/dist-lib/numbl-core/helpers/marching-cubes-tables.d.ts +10 -0
  10. package/dist-lib/numbl-core/helpers/marching-cubes.d.ts +46 -0
  11. package/dist-lib/numbl-core/interpreter/builtins/array-construction.d.ts +7 -1
  12. package/dist-lib/numbl-core/interpreter/builtins/geometry.d.ts +10 -0
  13. package/dist-lib/numbl-core/interpreter/builtins/index.d.ts +1 -0
  14. package/dist-lib/numbl-core/interpreter/interpreter.d.ts +1 -0
  15. package/dist-lib/numbl-core/interpreter/interpreterExec.d.ts +11 -0
  16. package/dist-lib/numbl-core/jit/builtins/runtime/snippets.c.gen.d.ts +4 -0
  17. package/dist-lib/numbl-core/jit/builtins/runtime/snippets.gen.d.ts +0 -2
  18. package/dist-lib/numbl-core/jit/codegen/runtime.d.ts +2 -0
  19. package/dist-lib/numbl-core/native/geometry-bridge.d.ts +29 -0
  20. package/dist-lib/numbl-core/native/qhull-browser.d.ts +15 -0
  21. package/dist-lib/numbl-core/native/qhull-node.d.ts +13 -0
  22. package/dist-lib/numbl-core/runtime/plotBuiltinDispatch.d.ts +6 -0
  23. package/dist-lib/numbl-core/runtime/plotUtils.d.ts +18 -0
  24. package/dist-lib/numbl-core/runtime/runtime.d.ts +22 -0
  25. package/dist-lib/numbl-core/runtime/runtimePlot.d.ts +1 -0
  26. package/dist-lib/numbl-core/runtime/uihtmlSession.d.ts +40 -0
  27. package/dist-lib/numbl-core/version.d.ts +1 -1
  28. package/dist-plot-viewer/assets/index-D4grNz8m.js +4504 -0
  29. package/dist-plot-viewer/index.html +1 -1
  30. package/dist-site-viewer/assets/index-B2mCFC55.js +4826 -0
  31. package/dist-site-viewer/assets/numbl-worker-DWZE29ck.js +5116 -0
  32. package/dist-site-viewer/assets/qhull-DM50poqF.wasm +0 -0
  33. package/dist-site-viewer/index.html +1 -1
  34. package/dist-site-viewer/numbl-embed.js +55 -13
  35. package/package.json +2 -1
  36. package/dist-plot-viewer/assets/index-Ct51ZiF1.js +0 -4426
  37. package/dist-site-viewer/assets/index-USrK1-DZ.js +0 -4748
  38. package/dist-site-viewer/assets/numbl-worker-s3tsbJJ2.js +0 -12003
@@ -62,6 +62,15 @@ export type FigureState = {
62
62
  axes: {
63
63
  [index: number]: AxesState;
64
64
  };
65
+ /** When set, this figure is an HTML UI component (MATLAB `uihtml`): the
66
+ * `html` string is rendered in an iframe instead of the axes/trace canvas.
67
+ * Takes precedence over `axes`. `data` is the JSON-encoded `Data` property
68
+ * (from `jsonencode`), pushed into the page's `htmlComponent`. */
69
+ uihtml?: {
70
+ id: string;
71
+ html: string;
72
+ data?: string;
73
+ };
65
74
  };
66
75
  export type FiguresState = {
67
76
  currentHandle: number;
@@ -261,6 +261,17 @@ export type AxisLimitSpec = [number | null, number | null] | "auto";
261
261
  export type PlotInstruction = {
262
262
  type: "set_figure_handle";
263
263
  handle: number;
264
+ } | {
265
+ /** An HTML UI component (MATLAB `uihtml`): renders self-contained HTML
266
+ * markup in an iframe, bypassing the axes/trace model. `html` is the
267
+ * full HTMLSource string; `id` is a stable per-component key. `data`, when
268
+ * present, is the `Data` property JSON-encoded (via `jsonencode`); the
269
+ * renderer parses it and pushes it to the page's `htmlComponent` so the
270
+ * `setup`/`"DataChanged"` bridge fires (MATLAB `h.Data` → JavaScript). */
271
+ type: "uihtml";
272
+ id: string;
273
+ html: string;
274
+ data?: string;
264
275
  } | {
265
276
  type: "plot";
266
277
  traces: PlotTrace[];
@@ -276,6 +287,7 @@ export type PlotInstruction = {
276
287
  } | {
277
288
  type: "patch";
278
289
  trace: PatchTrace;
290
+ newplot?: boolean;
279
291
  } | {
280
292
  type: "update_trace";
281
293
  id: number;
package/dist-lib/lib.d.ts CHANGED
@@ -7,6 +7,8 @@
7
7
  * console.log(result.output); // ["hello"]
8
8
  */
9
9
  export { executeCode } from "./numbl-core/executeCode.js";
10
+ export { loadQhullNodeBackend as loadDelaunayBackend } from "./numbl-core/native/qhull-node.js";
11
+ export { setDelaunayBackend } from "./numbl-core/native/geometry-bridge.js";
10
12
  export type { ExecOptions, ExecResult, ProfileData, BuiltinProfileEntry, BuiltinProfileBreakdown, } from "./numbl-core/executeCode.js";
11
13
  export type { FileIOAdapter } from "./numbl-core/fileIOAdapter.js";
12
14
  export type { SystemAdapter } from "./numbl-core/systemAdapter.js";