runmat 0.4.10-dev.6 → 0.4.10-dev.7
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/artifacts/stdlib.snapshot +0 -0
- package/dist/generated/builtin-examples-catalog.d.ts.map +1 -1
- package/dist/generated/builtin-examples-catalog.js +1 -1
- package/dist/generated/builtin-examples-catalog.js.map +1 -1
- package/dist/generated/builtins/print.d.ts +4 -0
- package/dist/generated/builtins/print.d.ts.map +1 -0
- package/dist/generated/builtins/print.js +112 -0
- package/dist/generated/builtins/print.js.map +1 -0
- package/dist/generated/builtins-manifest.d.ts.map +1 -1
- package/dist/generated/builtins-manifest.js +20 -0
- package/dist/generated/builtins-manifest.js.map +1 -1
- package/dist/lsp/runmat_lsp.d.ts +3 -2
- package/dist/lsp/runmat_lsp.js +616 -9
- package/dist/lsp/runmat_lsp_bg.wasm +0 -0
- package/dist/lsp/runmat_lsp_bg.wasm.d.ts +3 -2
- package/dist/pkg-web/runmat_wasm_web.d.ts +37 -37
- package/dist/pkg-web/runmat_wasm_web.js +86 -85
- package/dist/pkg-web/runmat_wasm_web_bg.wasm +0 -0
- package/dist/pkg-web/runmat_wasm_web_bg.wasm.d.ts +30 -30
- package/dist/runtime/stdlib.snapshot +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../../src/generated/builtins/print.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,UA2GjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// @generated by scripts/generate-builtins.cjs
|
|
2
|
+
// Do not edit by hand.
|
|
3
|
+
const builtinDoc = {
|
|
4
|
+
"title": "print",
|
|
5
|
+
"category": "plotting",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"print",
|
|
8
|
+
"figure export",
|
|
9
|
+
"png",
|
|
10
|
+
"plotting",
|
|
11
|
+
"save figure"
|
|
12
|
+
],
|
|
13
|
+
"summary": "Export the active or specified figure to a PNG file.",
|
|
14
|
+
"gpu_support": {
|
|
15
|
+
"elementwise": false,
|
|
16
|
+
"reduction": false,
|
|
17
|
+
"precisions": [],
|
|
18
|
+
"broadcasting": "none",
|
|
19
|
+
"notes": "`print` is a figure export sink. It gathers filename and option arguments when needed, then serializes the figure through the plotting renderer. Existing GPU-backed plot geometry can still use the shared WGPU plotting path during export."
|
|
20
|
+
},
|
|
21
|
+
"fusion": {
|
|
22
|
+
"elementwise": false,
|
|
23
|
+
"reduction": false,
|
|
24
|
+
"max_inputs": 4,
|
|
25
|
+
"constants": "inline"
|
|
26
|
+
},
|
|
27
|
+
"requires_feature": "plot-core",
|
|
28
|
+
"tested": {
|
|
29
|
+
"unit": "builtins::plotting::print::tests",
|
|
30
|
+
"integration": "direct headless Chrome WASM verification of print.json examples"
|
|
31
|
+
},
|
|
32
|
+
"description": "`print` exports a figure to a file. RunMat currently supports PNG output with MATLAB-style device and resolution tokens, including `print('name', '-dpng')`, `print('name', '-dpng', '-r300')`, and `print(fig, 'name', '-dpng')`. In browser and WASM hosts the file is written through RunMat's virtual filesystem provider so the host can persist or download it.",
|
|
33
|
+
"behaviors": [
|
|
34
|
+
"`print(filename, '-dpng')` writes PNG bytes to `filename`. If the name has no `.png` extension, RunMat appends one.",
|
|
35
|
+
"`print(filename, '-dpng', '-rN')` scales the export dimensions from the default 800 by 600 canvas using `N` DPI relative to RunMat's 150 DPI default.",
|
|
36
|
+
"`print(fig, filename, '-dpng')` exports the specified figure handle instead of the active figure.",
|
|
37
|
+
"Command-style argument order is accepted when RunMat parses command calls into string arguments, such as `print -dpng plot.png`.",
|
|
38
|
+
"PDF, EPS, and SVG device tokens are recognized but return a clear unsupported-device error until those exporters are implemented."
|
|
39
|
+
],
|
|
40
|
+
"examples": [
|
|
41
|
+
{
|
|
42
|
+
"description": "Export the active figure to a PNG file",
|
|
43
|
+
"input": "x = 0:0.1:2*pi;\nplot(x, sin(x));\nprint(\"sine_plot\", \"-dpng\");"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"description": "Export at a higher resolution",
|
|
47
|
+
"input": "x = 0:0.1:1;\nplot(x, x.^2, \"LineWidth\", 2);\nprint(\"quadratic_plot\", \"-dpng\", \"-r300\");"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"description": "Export a specific figure handle",
|
|
51
|
+
"input": "fig = figure();\nplot(1:5, [1 4 2 5 3]);\nprint(fig, \"explicit_handle_plot.png\", \"-dpng\");"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"description": "Command-style device order",
|
|
55
|
+
"input": "plot(1:4, [1 3 2 4]);\nprint -dpng command_style_plot.png"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"faqs": [
|
|
59
|
+
{
|
|
60
|
+
"question": "Which formats does `print` support?",
|
|
61
|
+
"answer": "PNG is supported today with `-dpng`. RunMat recognizes PDF, EPS, and SVG device tokens, but they return an unsupported-device error until those exporters are available in the rendering stack."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"question": "Where does the file go in the browser?",
|
|
65
|
+
"answer": "The PNG is written through RunMat's filesystem provider. In the sandbox this is usually the in-memory or IndexedDB-backed virtual filesystem, and the host can expose the file as a download artifact."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"question": "Does `-r300` change the figure data?",
|
|
69
|
+
"answer": "No. It only changes the pixel dimensions used for export. The plot data and graphics handles remain unchanged."
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"links": [
|
|
73
|
+
{
|
|
74
|
+
"label": "figure",
|
|
75
|
+
"url": "./figure"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"label": "gcf",
|
|
79
|
+
"url": "./gcf"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"label": "plot",
|
|
83
|
+
"url": "./plot"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"label": "Plot replay and export",
|
|
87
|
+
"url": "/docs/plotting/plot-replay-and-export"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"label": "Complete plotting guide",
|
|
91
|
+
"url": "/blog/matlab-plotting-guide"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"source": {
|
|
95
|
+
"label": "`crates/runmat-runtime/src/builtins/plotting/ops/print.rs`",
|
|
96
|
+
"url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/plotting/ops/print.rs"
|
|
97
|
+
},
|
|
98
|
+
"gpu_residency": "`print` is an I/O sink and returns a host logical status. Filename and option arguments are gathered before parsing. GPU-resident plot data already captured in figure state may still be consumed by the plotting renderer without forcing user-visible gathers when the shared WGPU export path is available.",
|
|
99
|
+
"gpu_behavior": [
|
|
100
|
+
"No numeric GPU kernels are launched for `print` itself.",
|
|
101
|
+
"The PNG exporter first attempts the interactive GPU render path and falls back to CPU rasterization when headless GPU initialization is unavailable.",
|
|
102
|
+
"The builtin writes PNG bytes through RunMat's filesystem layer, so output storage is host or virtual-filesystem backed."
|
|
103
|
+
],
|
|
104
|
+
"key": "print",
|
|
105
|
+
"slug": "print",
|
|
106
|
+
"aliases": [],
|
|
107
|
+
"categoryPath": [
|
|
108
|
+
"plotting"
|
|
109
|
+
]
|
|
110
|
+
};
|
|
111
|
+
export default builtinDoc;
|
|
112
|
+
//# sourceMappingURL=print.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print.js","sourceRoot":"","sources":["../../../src/generated/builtins/print.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,uBAAuB;AAIvB,MAAM,UAAU,GAAe;IAC7B,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,UAAU;IACtB,UAAU,EAAE;QACV,OAAO;QACP,eAAe;QACf,KAAK;QACL,UAAU;Q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AE,wBAAwB;YACjC,KAAK,EAAE,uCAAuC;SAC/C;QACD;YACE,OAAO,EAAE,yBAAyB;YAClC,KAAK,EAAE,6BAA6B;SACrC;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,4DAA4D;QACrE,KAAK,EAAE,yGAAyG;KACjH;IACD,eAAe,EAAE,iTAAiT;IAClU,cAAc,EAAE;QACd,yDAAyD;QACzD,sJAAsJ;QACtJ,yHAAyH;KAC1H;IACD,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,EAAE;IACb,cAAc,EAAE;QACd,UAAU;KACX;CACF,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/builtins-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,eAAO,MAAM,eAAe,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"builtins-manifest.d.ts","sourceRoot":"","sources":["../../src/generated/builtins-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,eAAO,MAAM,eAAe,EAAE,oBAAoB,EAi0QjD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAsa9D,CAAC;AAEF,eAAO,MAAM,4BAA4B,sEAC0C,CAAC"}
|
|
@@ -5720,6 +5720,25 @@ export const builtinManifest = [
|
|
|
5720
5720
|
"summary": "Evaluate a piecewise-polynomial structure.",
|
|
5721
5721
|
"exampleCount": 1
|
|
5722
5722
|
},
|
|
5723
|
+
{
|
|
5724
|
+
"key": "print",
|
|
5725
|
+
"title": "print",
|
|
5726
|
+
"slug": "print",
|
|
5727
|
+
"aliases": [],
|
|
5728
|
+
"category": "plotting",
|
|
5729
|
+
"categoryPath": [
|
|
5730
|
+
"plotting"
|
|
5731
|
+
],
|
|
5732
|
+
"keywords": [
|
|
5733
|
+
"print",
|
|
5734
|
+
"figure export",
|
|
5735
|
+
"png",
|
|
5736
|
+
"plotting",
|
|
5737
|
+
"save figure"
|
|
5738
|
+
],
|
|
5739
|
+
"summary": "Export the active or specified figure to a PNG file.",
|
|
5740
|
+
"exampleCount": 4
|
|
5741
|
+
},
|
|
5723
5742
|
{
|
|
5724
5743
|
"key": "prod",
|
|
5725
5744
|
"title": "prod",
|
|
@@ -8778,6 +8797,7 @@ export const builtinDocLoaders = {
|
|
|
8778
8797
|
"pow2": () => import("./builtins/pow2.js").then((mod) => mod.default),
|
|
8779
8798
|
"power": () => import("./builtins/power.js").then((mod) => mod.default),
|
|
8780
8799
|
"ppval": () => import("./builtins/ppval.js").then((mod) => mod.default),
|
|
8800
|
+
"print": () => import("./builtins/print.js").then((mod) => mod.default),
|
|
8781
8801
|
"prod": () => import("./builtins/prod.js").then((mod) => mod.default),
|
|
8782
8802
|
"pwd": () => import("./builtins/pwd.js").then((mod) => mod.default),
|
|
8783
8803
|
"qammod": () => import("./builtins/qammod.js").then((mod) => mod.default),
|