@wildwinter/expr-editor 0.9.0 → 0.10.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/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css +7 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -443,6 +443,13 @@ function renderNode(node, path, ctx, parentOp, side) {
|
|
|
443
443
|
case "flagdelta":
|
|
444
444
|
return pill(node.sign === "+" ? "flagpos" : "flagneg", `${node.sign}${node.name || "flag"}`, (b) => flagEditor(ctx, path, node, b), { issue, path });
|
|
445
445
|
case "call": {
|
|
446
|
+
if (ctx.compact && ctx.dialect.functions[node.name]?.flagDeltaArgs && node.args.length >= 2 && node.args[0].kind === "scopedvar" && node.args.slice(1).every((a) => a.kind === "flagdelta")) {
|
|
447
|
+
const row2 = el("span", "exed-call exed-call-flags");
|
|
448
|
+
row2.append(renderNode(node.args[0], [...path, "args", 0], ctx));
|
|
449
|
+
row2.append(el("span", "exed-flagsep", [":"]));
|
|
450
|
+
for (let i = 1; i < node.args.length; i++) row2.append(renderNode(node.args[i], [...path, "args", i], ctx));
|
|
451
|
+
return row2;
|
|
452
|
+
}
|
|
446
453
|
const row = el("span", "exed-call");
|
|
447
454
|
row.append(pill("func", node.name, (b) => callEditor(ctx, path, node, b), { issue }));
|
|
448
455
|
row.append(el("span", "exed-paren", ["("]));
|
|
@@ -1656,6 +1663,7 @@ function frozenCtx(src, o) {
|
|
|
1656
1663
|
catalogue: o.catalogue,
|
|
1657
1664
|
scopeOrder: o.scopeOrder ?? [],
|
|
1658
1665
|
functions: [],
|
|
1666
|
+
compact: true,
|
|
1659
1667
|
byPath: v.byPath,
|
|
1660
1668
|
getAst: () => v.ast,
|
|
1661
1669
|
apply: () => {
|