@ggui-ai/ui-gen 0.14.0 → 0.15.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/ui-gen",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "UI generation harness for ggui — the LLM system prompt, multi-turn coding loop, and evaluation engine that turn a DataContract into a React component. Implements the UiGenerator contract from @ggui-ai/mcp-server-core; consumed by @ggui-ai/mcp-server.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -188,9 +188,9 @@
188
188
  "puppeteer-core": "^24.40.0 || ^25.0.0",
189
189
  "react": "^18.0.0 || ^19.0.0",
190
190
  "react-dom": "^18.0.0 || ^19.0.0",
191
- "@ggui-ai/mcp-server-core": "0.14.0",
192
- "@ggui-ai/protocol": "0.14.0",
193
- "@ggui-ai/project-config": "0.14.0"
191
+ "@ggui-ai/mcp-server-core": "0.15.0",
192
+ "@ggui-ai/protocol": "0.15.0",
193
+ "@ggui-ai/project-config": "0.15.0"
194
194
  },
195
195
  "peerDependenciesMeta": {
196
196
  "@google/adk": {
@@ -229,11 +229,11 @@
229
229
  "openai": "^7.9.0",
230
230
  "typescript": "^5.0.0",
231
231
  "zod": "^4.3.6",
232
- "@ggui-ai/design": "0.14.0",
233
- "@ggui-ai/gadgets": "0.14.0",
234
- "@ggui-ai/ui-visual-tester": "0.14.0",
235
- "@ggui-ai/wire": "0.14.0",
236
- "@ggui-ai/sandbox": "0.14.0"
232
+ "@ggui-ai/gadgets": "0.15.0",
233
+ "@ggui-ai/sandbox": "0.15.0",
234
+ "@ggui-ai/ui-visual-tester": "0.15.0",
235
+ "@ggui-ai/wire": "0.15.0",
236
+ "@ggui-ai/design": "0.15.0"
237
237
  },
238
238
  "devDependencies": {
239
239
  "@google/adk": "^2.0.0",
@@ -248,9 +248,9 @@
248
248
  "react-dom": "^19.0.0",
249
249
  "tsup": "^8.5.0",
250
250
  "vitest": "^3.2.6",
251
- "@ggui-ai/mcp-server-core": "0.14.0",
252
- "@ggui-ai/project-config": "0.14.0",
253
- "@ggui-ai/protocol": "0.14.0"
251
+ "@ggui-ai/mcp-server-core": "0.15.0",
252
+ "@ggui-ai/project-config": "0.15.0",
253
+ "@ggui-ai/protocol": "0.15.0"
254
254
  },
255
255
  "engines": {
256
256
  "node": ">=22.0.0"
@@ -316,10 +316,18 @@ async function loadVfs(): Promise<Map<string, VfsEntry>> {
316
316
  /**
317
317
  * Try to resolve a relative import within the VFS.
318
318
  * Given `containingFile` (e.g. `node_modules/@ggui-ai/design/primitives/index.d.ts`)
319
- * and `importPath` (e.g. `./Card`), try:
319
+ * and `importPath` (e.g. `./Card` or, as every published declaration says
320
+ * since 0.15.0, `./Card.js`), try:
320
321
  * - <resolved>.d.ts
321
322
  * - <resolved>/index.d.ts
322
323
  * - <resolved>.ts
324
+ * A `.js` / `.mjs` / `.cjs` extension on the specifier is the ESM
325
+ * convention for "the module that compiles to this file" — TypeScript's
326
+ * NodeNext maps `./Card.js` to `./Card.d.ts`, and so does this: the
327
+ * extension is stripped before the candidates are tried. Without that, a
328
+ * `.js`-suffixed re-export resolved to nothing, the imported names typed
329
+ * as `any`, and the checker reported zero errors on code it must reject
330
+ * (ggui 0.15.0 publish-gate, type-checker.test.ts).
323
331
  */
324
332
  function resolveRelativeInVfs(
325
333
  vfs: Map<string, VfsEntry>,
@@ -329,7 +337,9 @@ function resolveRelativeInVfs(
329
337
  // Strip leading '/' from containingFile — TS may prepend getCurrentDirectory()
330
338
  const normalized = containingFile.startsWith('/') ? containingFile.slice(1) : containingFile;
331
339
  const dir = path.posix.dirname(normalized);
332
- const resolved = path.posix.normalize(`${dir}/${importPath}`);
340
+ // `./x.js` (`.mjs`, `.cjs`) names the declaration `./x.d.ts` — strip it.
341
+ const specifier = importPath.replace(/\.(?:m|c)?js$/, '');
342
+ const resolved = path.posix.normalize(`${dir}/${specifier}`);
333
343
 
334
344
  // Try .d.ts extension
335
345
  const withDts = `${resolved}.d.ts`;