synthesisui 0.16.98 → 0.16.99
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/anatomy-read.js +18 -1
- package/dist/commands/mcp.js +19 -0
- package/dist/doctor/sketch.js +17 -1
- package/dist/skill-import.js +11 -0
- package/package.json +1 -1
package/dist/anatomy-read.js
CHANGED
|
@@ -305,7 +305,24 @@ sketch) {
|
|
|
305
305
|
"")
|
|
306
306
|
: "";
|
|
307
307
|
const paints = rootPainted ? { classes: rootPainted } : {};
|
|
308
|
-
|
|
308
|
+
/**
|
|
309
|
+
* A LIBRARY ROOT WHOSE NAME IS NOT DOTTED.
|
|
310
|
+
*
|
|
311
|
+
* Three components return a Base UI primitive imported under a single word -
|
|
312
|
+
* `Pill` and `SelectionCard` return `Toggle`, `RadioCardGroup` returns
|
|
313
|
+
* `RadioGroup` - and `"root": "Toggle"` would point at THEIR own Toggle (a
|
|
314
|
+
* switch), inventing a relation that does not exist. There was no way to say
|
|
315
|
+
* "a library component with a bare name", so `root` was left out on all three
|
|
316
|
+
* (not-expressed.md, dono, 01/08).
|
|
317
|
+
*
|
|
318
|
+
* `from` says it: the PACKAGE disambiguates what the name cannot. It wins over
|
|
319
|
+
* the name, because a caller that sends both is telling us where it came from.
|
|
320
|
+
*/
|
|
321
|
+
const rootFrom = String(rootObj?.from ?? "").trim();
|
|
322
|
+
if (rootFrom) {
|
|
323
|
+
rootOut = { from: rootFrom, ...paints };
|
|
324
|
+
}
|
|
325
|
+
else if (rootRaw && /^[A-Z]/.test(rootRaw)) {
|
|
309
326
|
if (rootRaw.includes(".")) {
|
|
310
327
|
rootOut = { from: rootRaw, ...paints };
|
|
311
328
|
}
|
package/dist/commands/mcp.js
CHANGED
|
@@ -437,6 +437,25 @@ async function resolveAtNodes(root, entries) {
|
|
|
437
437
|
],
|
|
438
438
|
}
|
|
439
439
|
: {}),
|
|
440
|
+
/**
|
|
441
|
+
* THE PARTS, which is where a provider-rooted component keeps
|
|
442
|
+
* EVERYTHING.
|
|
443
|
+
*
|
|
444
|
+
* `Tooltip` returns `<BaseTooltip.Provider>` - a context provider that
|
|
445
|
+
* renders no element and carries no style - and its whole look (fill,
|
|
446
|
+
* radius, padding, shadow) is on the popup PART. The merge carried
|
|
447
|
+
* `base` and `layers` and stopped there, so the validator judged a
|
|
448
|
+
* component with no declarations anywhere and said BELOW THE FLOOR
|
|
449
|
+
* about one that draws fine (not-expressed.md, dono, 01/08).
|
|
450
|
+
*/
|
|
451
|
+
...(look?.parts && Object.keys(look.parts).length > 0
|
|
452
|
+
? {
|
|
453
|
+
parts: {
|
|
454
|
+
...look.parts,
|
|
455
|
+
...(recipe0.parts ?? {}),
|
|
456
|
+
},
|
|
457
|
+
}
|
|
458
|
+
: {}),
|
|
440
459
|
/**
|
|
441
460
|
* THE ROOT TAG TRAVELS, so the validator can name the KIND.
|
|
442
461
|
*
|
package/dist/doctor/sketch.js
CHANGED
|
@@ -82,8 +82,24 @@ function staticCallClasses(body) {
|
|
|
82
82
|
argStart = i + 1;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* A COMMENT BEFORE THE STRING IS STILL THE STRING.
|
|
87
|
+
*
|
|
88
|
+
* Real code annotates these lists - `// Light mode`, `// Shadow with subtle
|
|
89
|
+
* brand tint` - and the argument then reads as `// Light mode\n"bg-darkgray-800
|
|
90
|
+
* …"`, which is not a bare literal, so it was dropped. The Tooltip kept only
|
|
91
|
+
* its last two arguments (the two with no comment above them) and lost its
|
|
92
|
+
* fill, radius, padding and shadow - and it only came to light because the
|
|
93
|
+
* floor check flagged it (not-expressed.md, dono, 01/08). Measured: SIX of 36
|
|
94
|
+
* components in that library annotate a `cn()` this way.
|
|
95
|
+
*/
|
|
85
96
|
const classes = args
|
|
86
|
-
.map((a) => a
|
|
97
|
+
.map((a) => a
|
|
98
|
+
// block comments first, so a `/* … */` spanning the line cannot leave
|
|
99
|
+
// a stray `*/` behind for the line rule to keep
|
|
100
|
+
.replace(/\/\*[\s\S]*?\*\//g, "")
|
|
101
|
+
.replace(/(^|\n)\s*\/\/[^\n]*/g, "$1")
|
|
102
|
+
.trim())
|
|
87
103
|
.filter((a) => /^(["'`]).*\1$/.test(a) && !a.includes("${"))
|
|
88
104
|
.map((a) => a.slice(1, -1).trim())
|
|
89
105
|
.filter(Boolean);
|
package/dist/skill-import.js
CHANGED
|
@@ -622,6 +622,17 @@ depth appears anyway.
|
|
|
622
622
|
}
|
|
623
623
|
\`\`\`
|
|
624
624
|
|
|
625
|
+
**A library root whose name is not dotted needs its PACKAGE.** \`Pill\` returns Base UI's
|
|
626
|
+
\`Toggle\`, and \`"root": "Toggle"\` would point at THEIR own Toggle - a switch - inventing a
|
|
627
|
+
relation that does not exist. Send where it came from instead:
|
|
628
|
+
|
|
629
|
+
\`\`\`json
|
|
630
|
+
"Pill": { "root": { "from": "@base-ui/react/toggle" }, "anatomy": [ … ] }
|
|
631
|
+
\`\`\`
|
|
632
|
+
|
|
633
|
+
\`Radio.Root\` needs none of this: the dot already says it is somebody's namespace. Leaving the
|
|
634
|
+
root out was the old workaround and it cost the surface its name (not-expressed.md, dono, 01/08).
|
|
635
|
+
|
|
625
636
|
**The root takes what the PARENT paints on it.** When the returned root carries an override at
|
|
626
637
|
the call site - \`MetricCard\` returns \`<Card className="flex-1 dark:bg-darkgray-300">\` - send the
|
|
627
638
|
object form and point \`at\` the sketch node: \`{ "name": "Card", "at": 1 }\`. The string form still
|
package/package.json
CHANGED