numbl 0.4.3 → 0.4.4
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.
- package/dist-cli/cli.js +10233 -8490
- package/dist-lib/graphics/figuresReducer.d.ts +5 -1
- package/dist-lib/graphics/types.d.ts +49 -0
- package/dist-lib/lib.js +24255 -22512
- package/dist-lib/numbl-core/executors/handleInline.d.ts +18 -2
- package/dist-lib/numbl-core/executors/jit/valueAdapter.d.ts +16 -9
- package/dist-lib/numbl-core/jit/compileSpecC.d.ts +7 -0
- package/dist-lib/numbl-core/jit/lowering/definiteAssign.d.ts +42 -0
- package/dist-lib/numbl-core/lexer/types.d.ts +62 -61
- package/dist-lib/numbl-core/native/ts-lapack-eig-complex.d.ts +32 -0
- package/dist-lib/numbl-core/runtime/plotUtils.d.ts +55 -2
- package/dist-lib/numbl-core/runtime/runtime.d.ts +3 -0
- package/dist-lib/numbl-core/runtime/runtimePlot.d.ts +6 -0
- package/dist-lib/numbl-core/runtime/struct-access.d.ts +4 -0
- package/dist-lib/numbl-core/version.d.ts +1 -1
- package/dist-plot-viewer/assets/index-Ct51ZiF1.js +4426 -0
- package/dist-plot-viewer/index.html +1 -1
- package/dist-site-viewer/assets/index-USrK1-DZ.js +4748 -0
- package/dist-site-viewer/assets/numbl-worker-s3tsbJJ2.js +12003 -0
- package/dist-site-viewer/index.html +1 -1
- package/dist-site-viewer/numbl-embed.js +76 -5
- package/package.json +1 -1
- package/dist-plot-viewer/assets/index-ClpZQuMR.js +0 -4426
- package/dist-site-viewer/assets/index-CgKjTQT7.js +0 -4748
- package/dist-site-viewer/assets/numbl-worker-DarsHbBe.js +0 -11993
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PlotTrace, Plot3Trace, SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, BarTrace, Bar3Trace, ErrorBarTrace, BoxTrace, PieTrace, HeatmapTrace, QuiverTrace, Quiver3Trace, PlotInstruction } from "./types.js";
|
|
1
|
+
import type { PlotTrace, Plot3Trace, PatchTrace, SurfTrace, ImagescTrace, PcolorTrace, ContourTrace, BarTrace, Bar3Trace, ErrorBarTrace, BoxTrace, PieTrace, HeatmapTrace, QuiverTrace, Quiver3Trace, PlotInstruction } from "./types.js";
|
|
2
2
|
export type AxesState = {
|
|
3
3
|
holdOn: boolean;
|
|
4
4
|
traces: PlotTrace[];
|
|
@@ -19,6 +19,7 @@ export type AxesState = {
|
|
|
19
19
|
quiver3Traces: Quiver3Trace[];
|
|
20
20
|
areaTraces: PlotTrace[];
|
|
21
21
|
areaBaseValue: number;
|
|
22
|
+
patchTraces: PatchTrace[];
|
|
22
23
|
title?: string;
|
|
23
24
|
xlabel?: string;
|
|
24
25
|
ylabel?: string;
|
|
@@ -26,6 +27,9 @@ export type AxesState = {
|
|
|
26
27
|
shading?: "faceted" | "flat" | "interp";
|
|
27
28
|
legend?: string[];
|
|
28
29
|
gridOn?: boolean;
|
|
30
|
+
/** Axes border. Undefined/true → full rectangle (numbl's default, matching
|
|
31
|
+
* MATLAB `box on`); false → only the left and bottom axis lines (`box off`). */
|
|
32
|
+
boxOn?: boolean;
|
|
29
33
|
colorbar?: boolean;
|
|
30
34
|
colorbarLocation?: string;
|
|
31
35
|
colormap?: string;
|
|
@@ -19,6 +19,10 @@ export interface PlotTrace {
|
|
|
19
19
|
markerEdgeColor?: [number, number, number];
|
|
20
20
|
markerFaceColor?: [number, number, number];
|
|
21
21
|
markerIndices?: number[];
|
|
22
|
+
/** Stable identity for a trace returned as a graphics handle (e.g. from
|
|
23
|
+
* `line`). Lets `set(h,'XData',...)` / `update_trace` find and mutate this
|
|
24
|
+
* exact trace in the renderer's accumulated state across `drawnow`. */
|
|
25
|
+
id?: number;
|
|
22
26
|
}
|
|
23
27
|
export interface Plot3Trace {
|
|
24
28
|
x: number[];
|
|
@@ -32,6 +36,35 @@ export interface Plot3Trace {
|
|
|
32
36
|
markerEdgeColor?: [number, number, number];
|
|
33
37
|
markerFaceColor?: [number, number, number];
|
|
34
38
|
markerIndices?: number[];
|
|
39
|
+
/** See PlotTrace.id. */
|
|
40
|
+
id?: number;
|
|
41
|
+
}
|
|
42
|
+
/** A patch object: one or more colored polygons sharing a single set of
|
|
43
|
+
* vertices. Mirrors MATLAB's Faces/Vertices model — `patch(X,Y,C)` and the
|
|
44
|
+
* name-value forms are all canonicalized to this shape at parse time. */
|
|
45
|
+
export interface PatchTrace {
|
|
46
|
+
/** Unique vertices: `vertices[k] = [x, y]` (2-D) or `[x, y, z]` (3-D). */
|
|
47
|
+
vertices: number[][];
|
|
48
|
+
/** Faces as 0-based vertex-index arrays — one polygon per face. */
|
|
49
|
+
faces: number[][];
|
|
50
|
+
/** Single RGB for all faces, a colormap keyword, or 'none'. */
|
|
51
|
+
faceColor?: [number, number, number] | "flat" | "interp" | "none";
|
|
52
|
+
/** Edge color (default black [0,0,0]). */
|
|
53
|
+
edgeColor?: [number, number, number] | "flat" | "interp" | "none";
|
|
54
|
+
/** Face transparency in [0,1]. */
|
|
55
|
+
faceAlpha?: number;
|
|
56
|
+
lineWidth?: number;
|
|
57
|
+
lineStyle?: string;
|
|
58
|
+
marker?: string;
|
|
59
|
+
markerFaceColor?: [number, number, number] | "flat" | "none";
|
|
60
|
+
/** Color data driving 'flat'/'interp': one entry per face (flat) or per
|
|
61
|
+
* vertex (interp). Each entry is a scalar (mapped through the colormap) or
|
|
62
|
+
* an RGB triplet. */
|
|
63
|
+
faceVertexCData?: (number | [number, number, number])[];
|
|
64
|
+
/** True when vertices carry a z-coordinate (3-D patch). */
|
|
65
|
+
is3D?: boolean;
|
|
66
|
+
/** See PlotTrace.id — lets `set(p,...)` live-update this patch. */
|
|
67
|
+
id?: number;
|
|
35
68
|
}
|
|
36
69
|
export interface SurfTrace {
|
|
37
70
|
/** X coordinates: flat array of length rows*cols (column-major) */
|
|
@@ -234,6 +267,19 @@ export type PlotInstruction = {
|
|
|
234
267
|
} | {
|
|
235
268
|
type: "plot3";
|
|
236
269
|
traces: Plot3Trace[];
|
|
270
|
+
} | {
|
|
271
|
+
type: "line";
|
|
272
|
+
traces: PlotTrace[];
|
|
273
|
+
} | {
|
|
274
|
+
type: "line3";
|
|
275
|
+
traces: Plot3Trace[];
|
|
276
|
+
} | {
|
|
277
|
+
type: "patch";
|
|
278
|
+
trace: PatchTrace;
|
|
279
|
+
} | {
|
|
280
|
+
type: "update_trace";
|
|
281
|
+
id: number;
|
|
282
|
+
props: Record<string, unknown>;
|
|
237
283
|
} | {
|
|
238
284
|
type: "surf";
|
|
239
285
|
trace: SurfTrace;
|
|
@@ -327,6 +373,9 @@ export type PlotInstruction = {
|
|
|
327
373
|
} | {
|
|
328
374
|
type: "set_grid";
|
|
329
375
|
value: boolean;
|
|
376
|
+
} | {
|
|
377
|
+
type: "set_box";
|
|
378
|
+
value: boolean;
|
|
330
379
|
} | {
|
|
331
380
|
type: "set_colorbar";
|
|
332
381
|
value: string;
|