@nodii/dev 0.6.92 → 0.6.93

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/core.js CHANGED
@@ -4,7 +4,7 @@ import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
4
4
  import { homedir, platform } from "node:os";
5
5
  import { dirname, join } from "node:path";
6
6
 
7
- export const VERSION = "0.6.92";
7
+ export const VERSION = "0.6.93";
8
8
  export const configPath = () =>
9
9
  process.env.NODII_DEV_CONFIG_PATH ??
10
10
  join(homedir(), ".config/nodii-dev/config.json");
package/dist/surface.js CHANGED
@@ -723,7 +723,12 @@ function withWidth(code, w) {
723
723
  return code.replace(m[1], `${m[1]}${widthAttr(w)}`);
724
724
  }
725
725
  function tableOf(node, ctx) {
726
- const rows = (node.children ?? []).filter((c) => c.visible !== false);
726
+ const shown = (node.children ?? []).filter((c) => c.visible !== false);
727
+ // A DS instance after the rows (a table's Empty State) follows the Table: it must not undo it.
728
+ let end = shown.length;
729
+ while (end > 0 && shown[end - 1].instance?.remote) end -= 1;
730
+ const rows = shown.slice(0, end);
731
+ const after = shown.slice(end);
727
732
  if (!rows.length || rows.some((r) => r.instance?.remote || r.type === "TEXT" || r.layout?.mode !== "HORIZONTAL")) return null;
728
733
  const imports = [];
729
734
  const parsed = [];
@@ -793,8 +798,10 @@ function tableOf(node, ctx) {
793
798
  };
794
799
  const sizing = sizeClasses(node, ctx.parent, ctx.root);
795
800
  const table = [indent(fixed ? '<Table layout="fixed">' : "<Table>", depth), ...section("head", "TableHeader"), ...section("body", "TableBody"), indent("</Table>", depth)];
796
- if (!sizing.length) return table.join("\n");
797
- return [indent(`<div className="${cls(["flex", "flex-col", ...sizing])}">`, depth), ...table.map((line) => indent(line, 1)), indent("</div>", depth)].join("\n");
801
+ const following = after.map((c) => emitNode(c, { ...ctx, depth, parent: node, path: `${ctx.path} › ${c.name}`, root: false })).filter((x) => x !== null);
802
+ if (!sizing.length && !following.length) return table.join("\n");
803
+ const lines = [...table, ...following.flatMap((code) => code.split("\n"))];
804
+ return [indent(`<div className="${cls(["flex", "flex-col", ...sizing])}">`, depth), ...lines.map((line) => indent(line, 1)), indent("</div>", depth)].join("\n");
798
805
  }
799
806
 
800
807
  // ---------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodii/dev",
3
- "version": "0.6.92",
3
+ "version": "0.6.93",
4
4
  "description": "Agent CLI for Nodii Dev, reached through the platform edge",
5
5
  "type": "module",
6
6
  "bin": {