@duet3d/monacotokens 3.7.0-alpha.2 → 3.7.0-alpha.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/expressions/expressions.json +277 -0
- package/dist/expressions/index.d.ts +24 -0
- package/dist/expressions/index.js +8 -0
- package/dist/gcodes/gcodes.json +5821 -0
- package/dist/gcodes/index.d.ts +60 -0
- package/dist/gcodes/index.js +24 -0
- package/dist/gcodes/local-variables.d.ts +26 -0
- package/dist/gcodes/local-variables.js +66 -0
- package/dist/gcodes/search.d.ts +17 -0
- package/dist/gcodes/search.js +594 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/monaco-gcode.js +42 -16
- package/dist/objectmodel/deprecations.d.ts +12 -0
- package/dist/objectmodel/deprecations.js +49 -0
- package/dist/objectmodel/enums.d.ts +4 -0
- package/dist/objectmodel/enums.js +23 -0
- package/dist/objectmodel/machine-context.d.ts +33 -0
- package/dist/objectmodel/machine-context.js +35 -0
- package/dist/objectmodel/paths.d.ts +3 -0
- package/dist/objectmodel/paths.js +8 -0
- package/dist/providers.d.ts +55 -0
- package/dist/providers.js +1593 -0
- package/dist/register.d.ts +10 -3
- package/dist/register.js +58 -5
- package/package.json +3 -2
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": [
|
|
3
|
+
{
|
|
4
|
+
"name": "abs",
|
|
5
|
+
"syntax": "abs(x)",
|
|
6
|
+
"description": "Absolute value of x"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "acos",
|
|
10
|
+
"syntax": "acos(x)",
|
|
11
|
+
"description": "Arc cosine of x (radians)"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "asin",
|
|
15
|
+
"syntax": "asin(x)",
|
|
16
|
+
"description": "Arc sine of x (radians)"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "atan",
|
|
20
|
+
"syntax": "atan(x)",
|
|
21
|
+
"description": "Arc tangent of x (radians)"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "atan2",
|
|
25
|
+
"syntax": "atan2(y, x)",
|
|
26
|
+
"description": "Arc tangent of y/x taking the sign of both into account (radians)"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "ceil",
|
|
30
|
+
"syntax": "ceil(x)",
|
|
31
|
+
"description": "Smallest integer not less than x (returns int if it fits in 32 bits, else float)"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "cos",
|
|
35
|
+
"syntax": "cos(x)",
|
|
36
|
+
"description": "Cosine of x (radians)"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "datetime",
|
|
40
|
+
"syntax": "datetime(s)",
|
|
41
|
+
"description": "Convert seconds-since-epoch to DateTime, or a \"yyyy-mm-ddThh:mm:ss\" string to DateTime"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "degrees",
|
|
45
|
+
"syntax": "degrees(x)",
|
|
46
|
+
"description": "Convert radians to degrees"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "drop",
|
|
50
|
+
"syntax": "drop(array, n)",
|
|
51
|
+
"description": "Return array or string without its first n elements"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "exists",
|
|
55
|
+
"syntax": "exists(name)",
|
|
56
|
+
"description": "True if the object-model variable exists and is not null"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "exp",
|
|
60
|
+
"syntax": "exp(x)",
|
|
61
|
+
"description": "Natural exponent e^x"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "fileexists",
|
|
65
|
+
"syntax": "fileexists(path)",
|
|
66
|
+
"description": "True if the given file exists on the SD card"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "fileread",
|
|
70
|
+
"syntax": "fileread(path, skip, count, sep)",
|
|
71
|
+
"description": "Read count elements from a CSV-like file, skipping the first skip elements, using sep as separator"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "find",
|
|
75
|
+
"syntax": "find(haystack, needle)",
|
|
76
|
+
"description": "Index of the first occurrence of needle (char or string) in haystack, -1 if not found"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "floor",
|
|
80
|
+
"syntax": "floor(x)",
|
|
81
|
+
"description": "Largest integer not greater than x (returns int if it fits in 32 bits, else float)"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "isnan",
|
|
85
|
+
"syntax": "isnan(x)",
|
|
86
|
+
"description": "True if x is Not-a-Number"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "log",
|
|
90
|
+
"syntax": "log(x)",
|
|
91
|
+
"description": "Natural logarithm of x"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "max",
|
|
95
|
+
"syntax": "max(a, b, ...)",
|
|
96
|
+
"description": "Largest of the given values (NaN if any argument is NaN)"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "min",
|
|
100
|
+
"syntax": "min(a, b, ...)",
|
|
101
|
+
"description": "Smallest of the given values (NaN if any argument is NaN)"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "mod",
|
|
105
|
+
"syntax": "mod(a, b)",
|
|
106
|
+
"description": "Remainder of a divided by b"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "pow",
|
|
110
|
+
"syntax": "pow(base, exp)",
|
|
111
|
+
"description": "base raised to the power exp"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "radians",
|
|
115
|
+
"syntax": "radians(x)",
|
|
116
|
+
"description": "Convert degrees to radians"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "random",
|
|
120
|
+
"syntax": "random(max)",
|
|
121
|
+
"description": "Random integer in [0, max-1]; max must be >= 1"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "round",
|
|
125
|
+
"syntax": "round(x)",
|
|
126
|
+
"description": "Round x to nearest integer (rounds to even when exactly halfway); returns int if it fits in 32 bits"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "sin",
|
|
130
|
+
"syntax": "sin(x)",
|
|
131
|
+
"description": "Sine of x (radians)"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "sqrt",
|
|
135
|
+
"syntax": "sqrt(x)",
|
|
136
|
+
"description": "Square root of x"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "square",
|
|
140
|
+
"syntax": "square(x)",
|
|
141
|
+
"description": "x * x"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "take",
|
|
145
|
+
"syntax": "take(array, n)",
|
|
146
|
+
"description": "Return the first n elements of array or string"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "tan",
|
|
150
|
+
"syntax": "tan(x)",
|
|
151
|
+
"description": "Tangent of x (radians)"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "vector",
|
|
155
|
+
"syntax": "vector(n, value)",
|
|
156
|
+
"description": "Build an array of n elements each initialised to value"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"constants": [
|
|
160
|
+
{
|
|
161
|
+
"name": "true",
|
|
162
|
+
"description": "Boolean true"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "false",
|
|
166
|
+
"description": "Boolean false"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "null",
|
|
170
|
+
"description": "Null reference"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "pi",
|
|
174
|
+
"description": "Mathematical constant pi (3.14159265...)"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "iterations",
|
|
178
|
+
"description": "Number of completed iterations of the innermost while loop (0 during first iteration)"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "line",
|
|
182
|
+
"description": "Line number of the currently executing command"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "result",
|
|
186
|
+
"description": "0 if the last G-/M-/T-code succeeded, 1 = warning, >= 2 = error"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "input",
|
|
190
|
+
"description": "Numeric value returned by the last M291 input dialog (mode 4-7)"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"scopes": [
|
|
194
|
+
{
|
|
195
|
+
"name": "global",
|
|
196
|
+
"description": "Global variables persisted for the current DCS/DSF session"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "var",
|
|
200
|
+
"description": "Local variables of the current macro / job / trigger"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "param",
|
|
204
|
+
"description": "Parameters passed to the current macro"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"objectModel": [
|
|
208
|
+
{
|
|
209
|
+
"name": "boards",
|
|
210
|
+
"description": "List of connected boards"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "directories",
|
|
214
|
+
"description": "Information about the individual directories"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "fans",
|
|
218
|
+
"description": "List of configured fans"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "heat",
|
|
222
|
+
"description": "Information about the heat subsystem"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "inputs",
|
|
226
|
+
"description": "Information about every available G/M/T-code channel"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "job",
|
|
230
|
+
"description": "Information about the current job"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "ledstrips",
|
|
234
|
+
"description": "List of configured LED strips"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "limits",
|
|
238
|
+
"description": "Machine configuration limits"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "move",
|
|
242
|
+
"description": "Information about the move subsystem"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"name": "network",
|
|
246
|
+
"description": "Information about connected network adapters"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "plugins",
|
|
250
|
+
"description": "Dictionary of loaded plugins where each key is the plugin identifier"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"name": "sbc",
|
|
254
|
+
"description": "Information about the SBC which Duet Software Framework is running on. This is null if the system is operating in standalone mode"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"name": "sensors",
|
|
258
|
+
"description": "Information about connected sensors including Z-probes and endstops"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "spindles",
|
|
262
|
+
"description": "List of configured CNC spindles"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "state",
|
|
266
|
+
"description": "Information about the machine state"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"name": "tools",
|
|
270
|
+
"description": "List of configured tools"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"name": "volumes",
|
|
274
|
+
"description": "List of available mass storages"
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ExpressionFunction {
|
|
2
|
+
name: string;
|
|
3
|
+
syntax: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ExpressionConstant {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ExpressionScope {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ObjectModelNamespace {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ExpressionData {
|
|
19
|
+
functions: ExpressionFunction[];
|
|
20
|
+
constants: ExpressionConstant[];
|
|
21
|
+
scopes: ExpressionScope[];
|
|
22
|
+
objectModel: ObjectModelNamespace[];
|
|
23
|
+
}
|
|
24
|
+
export declare const expressionData: ExpressionData;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.expressionData = void 0;
|
|
7
|
+
const expressions_json_1 = __importDefault(require("./expressions.json"));
|
|
8
|
+
exports.expressionData = expressions_json_1.default;
|