@nodii/dev 0.6.183 → 0.6.184
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 +1 -1
- package/dist/surface.js +6 -0
- package/package.json +1 -1
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.
|
|
7
|
+
export const VERSION = "0.6.184";
|
|
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
|
@@ -1210,7 +1210,13 @@ function liftRecordData(code, node, ctx, path, scope = scopeName(node)) {
|
|
|
1210
1210
|
if (value) next = next.replace(value[0], `${attr}={${TONE_ATTR.has(attr) ? (lifted.push(attr), optionalMark(ctx, at, attr)) : lift(at, attr)}}`);
|
|
1211
1211
|
}
|
|
1212
1212
|
if (tag !== "MetricFilterCard") return next;
|
|
1213
|
+
// A card already lifted (content two slots deep passes through here twice) keeps its
|
|
1214
|
+
// one selected: a second would fail jsx-no-duplicate-props (tic-page-queues-c, 19 Nov).
|
|
1215
|
+
const drawn = /\bselected=\{(?!(?:true|false)\})/.test(next);
|
|
1216
|
+
if (drawn) return next;
|
|
1213
1217
|
const selected = `selected={${lift(at, "selected")}}`;
|
|
1218
|
+
const literal = /\bselected=\{(?:true|false)\}/.exec(next);
|
|
1219
|
+
if (literal) return next.replace(literal[0], selected);
|
|
1214
1220
|
const bare = bareAttr(next, "selected");
|
|
1215
1221
|
if (bare !== null) return `${next.slice(0, bare)}${selected}${next.slice(bare + "selected".length)}`;
|
|
1216
1222
|
const handler = /(\n[ \t]*)onSelect=\{/.exec(next);
|