openmates 0.9.3 → 0.10.0-alpha.1
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/{chunk-IZYE5MAJ.js → chunk-ZJKUUM2P.js} +13 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1337,7 +1337,11 @@ async function generateEmbedShareBlob(embedId, embedKeyBytes, durationSeconds =
|
|
|
1337
1337
|
function deriveWebOrigin(apiUrl) {
|
|
1338
1338
|
try {
|
|
1339
1339
|
const url = new URL(apiUrl);
|
|
1340
|
-
url.hostname
|
|
1340
|
+
if (url.hostname === "api.dev.openmates.org") {
|
|
1341
|
+
url.hostname = "app.dev.openmates.org";
|
|
1342
|
+
} else {
|
|
1343
|
+
url.hostname = url.hostname.replace(/^api\./, "");
|
|
1344
|
+
}
|
|
1341
1345
|
url.port = "";
|
|
1342
1346
|
return url.origin;
|
|
1343
1347
|
} catch {
|
|
@@ -5424,6 +5428,8 @@ function renderWebReadFullscreen(c) {
|
|
|
5424
5428
|
}
|
|
5425
5429
|
function renderMathCalculatePreview(c, ln) {
|
|
5426
5430
|
const results = c.results;
|
|
5431
|
+
const title = str(c.title);
|
|
5432
|
+
if (title) ln(trunc(title, 80));
|
|
5427
5433
|
if (Array.isArray(results) && results.length > 0) {
|
|
5428
5434
|
const first = results[0];
|
|
5429
5435
|
const expr = str(first.expression) ?? str(first.input) ?? "";
|
|
@@ -5434,13 +5440,19 @@ function renderMathCalculatePreview(c, ln) {
|
|
|
5434
5440
|
}
|
|
5435
5441
|
function renderMathCalculateFullscreen(c) {
|
|
5436
5442
|
const results = c.results;
|
|
5443
|
+
const title = str(c.title);
|
|
5444
|
+
if (title) process.stdout.write(` \x1B[2mTitle:\x1B[0m ${title}
|
|
5445
|
+
`);
|
|
5437
5446
|
if (!Array.isArray(results) || results.length === 0) {
|
|
5438
5447
|
console.log("No calculation results.");
|
|
5439
5448
|
return;
|
|
5440
5449
|
}
|
|
5441
5450
|
for (const r of results) {
|
|
5451
|
+
const resultTitle = str(r.title);
|
|
5442
5452
|
const expr = str(r.expression) ?? str(r.input) ?? "";
|
|
5443
5453
|
const result = str(r.result) ?? str(r.output) ?? "";
|
|
5454
|
+
if (resultTitle && resultTitle !== title) process.stdout.write(` \x1B[2mTitle:\x1B[0m ${resultTitle}
|
|
5455
|
+
`);
|
|
5444
5456
|
if (expr) process.stdout.write(` \x1B[2mExpression:\x1B[0m ${expr}
|
|
5445
5457
|
`);
|
|
5446
5458
|
if (result) process.stdout.write(` \x1B[1mResult:\x1B[0m ${result}
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED