@ggui-ai/ui-gen 0.26.0 → 0.27.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/dist/{adapter-BJwn74rx.d.ts → adapter-h4_V69LI.d.ts} +1 -1
- package/dist/adapters/base.d.ts +6 -1
- package/dist/adapters/base.js.map +1 -1
- package/dist/adapters/generation-dispatch.d.ts +2 -2
- package/dist/adapters/generation-dispatch.js +61 -10
- package/dist/adapters/generation-dispatch.js.map +1 -1
- package/dist/adapters/index.js +36 -14
- package/dist/adapters/index.js.map +1 -1
- package/dist/advanced/index.d.ts +4 -4
- package/dist/advanced/index.js +94 -19
- package/dist/advanced/index.js.map +1 -1
- package/dist/boilerplate.js +4 -6
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.d.ts +1 -7
- package/dist/check/index.js +50 -4
- package/dist/check/index.js.map +1 -1
- package/dist/{create-ui-generator-N4gRXpcL.d.ts → create-ui-generator-BrZHF0cf.d.ts} +2 -2
- package/dist/{dispatch-BUoXRj_r.d.ts → dispatch-B07TI30d.d.ts} +1 -1
- package/dist/evaluation/axis-checks/index.d.ts +3 -3
- package/dist/evaluation/axis-checks/index.js.map +1 -1
- package/dist/evaluation/axis-checks/registry.d.ts +1 -1
- package/dist/evaluation/index.d.ts +22 -12
- package/dist/evaluation/index.js +36 -10
- package/dist/evaluation/index.js.map +1 -1
- package/dist/evaluation/types.d.ts +1 -1
- package/dist/harness/check/runtime-render/index.d.ts +3 -3
- package/dist/harness/index.d.ts +1 -1
- package/dist/harness/index.js +4 -6
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/prompts.js +1 -4
- package/dist/harness/prompts.js.map +1 -1
- package/dist/harness/result-types.d.ts +2 -2
- package/dist/harness/runtime.d.ts +1 -1
- package/dist/harness/runtime.js +6 -7
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.d.ts +1 -1
- package/dist/harness/types-public.js +4 -6
- package/dist/harness/types-public.js.map +1 -1
- package/dist/harness/validator-trace-sink.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +94 -19
- package/dist/index.js.map +1 -1
- package/dist/patch.d.ts +1 -1
- package/dist/{types-public-B7wn4ce5.d.ts → types-public-h8IMnYuh.d.ts} +4 -0
- package/dist/{visual-evaluator-C9L-o6ap.d.ts → visual-evaluator-C2strxqD.d.ts} +1 -1
- package/dist/workflows.d.ts +1 -1
- package/package.json +12 -12
- package/src/adapters/base.ts +6 -1
- package/src/adapters/claude/message-parser.ts +5 -6
- package/src/adapters/claude/sdk-tool-pins.ts +44 -0
- package/src/adapters/claude/sdk.ts +3 -3
- package/src/adapters/claude/source-capture.ts +20 -0
- package/src/boilerplate/system-prompt.ts +3 -2
- package/src/check/run-tier0.ts +61 -0
- package/src/design-system-docs.ts +2 -1
- package/src/evaluation/criteria/resolve.ts +19 -1
- package/src/evaluation/loop.ts +25 -4
- package/src/evaluation/message-parsing.ts +11 -12
- package/src/evaluation/types-public.ts +4 -0
- package/src/taught-tokens.ts +5 -6
package/dist/adapters/index.js
CHANGED
|
@@ -327,6 +327,21 @@ var init_raw = __esm({
|
|
|
327
327
|
}
|
|
328
328
|
});
|
|
329
329
|
|
|
330
|
+
// src/adapters/claude/source-capture.ts
|
|
331
|
+
function sourceCodeFromToolUse(name, input) {
|
|
332
|
+
if (typeof name !== "string") return void 0;
|
|
333
|
+
const field = name === "Write" ? "content" : name.endsWith(COMPILE_TOOL_SUFFIX) ? "code" : void 0;
|
|
334
|
+
if (field === void 0 || typeof input !== "object" || input === null) return void 0;
|
|
335
|
+
const value = Reflect.get(input, field);
|
|
336
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
337
|
+
}
|
|
338
|
+
var COMPILE_TOOL_SUFFIX;
|
|
339
|
+
var init_source_capture = __esm({
|
|
340
|
+
"src/adapters/claude/source-capture.ts"() {
|
|
341
|
+
COMPILE_TOOL_SUFFIX = "__compile_component";
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
|
|
330
345
|
// src/adapters/claude/message-parser.ts
|
|
331
346
|
function createArtifacts() {
|
|
332
347
|
return {
|
|
@@ -446,12 +461,9 @@ function extractSourceCode(message, artifacts) {
|
|
|
446
461
|
const content = assistantMsg.message?.content;
|
|
447
462
|
if (!Array.isArray(content)) return;
|
|
448
463
|
for (const block of content) {
|
|
449
|
-
if (block.type
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
artifacts.sourceCode = input.content;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
464
|
+
if (block.type !== "tool_use") continue;
|
|
465
|
+
const value = sourceCodeFromToolUse(block.name, block.input);
|
|
466
|
+
if (value !== void 0) artifacts.sourceCode = value;
|
|
455
467
|
}
|
|
456
468
|
}
|
|
457
469
|
function unescapeJsonString(s) {
|
|
@@ -489,6 +501,7 @@ function extractGeneratorMeta(message, artifacts) {
|
|
|
489
501
|
}
|
|
490
502
|
var init_message_parser = __esm({
|
|
491
503
|
"src/adapters/claude/message-parser.ts"() {
|
|
504
|
+
init_source_capture();
|
|
492
505
|
}
|
|
493
506
|
});
|
|
494
507
|
|
|
@@ -577,6 +590,17 @@ var init_claude_code_login = __esm({
|
|
|
577
590
|
}
|
|
578
591
|
});
|
|
579
592
|
|
|
593
|
+
// src/adapters/claude/sdk-tool-pins.ts
|
|
594
|
+
function sdkToolPins(input) {
|
|
595
|
+
const builtins = [...input.builtinTools ?? []];
|
|
596
|
+
const approved = input.allowedTools !== void 0 ? [...input.allowedTools] : Object.keys(input.mcpServers ?? {}).map((name) => `mcp__${name}`);
|
|
597
|
+
return { tools: builtins, settingSources: [], allowedTools: [...approved, ...builtins] };
|
|
598
|
+
}
|
|
599
|
+
var init_sdk_tool_pins = __esm({
|
|
600
|
+
"src/adapters/claude/sdk-tool-pins.ts"() {
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
|
|
580
604
|
// src/adapters/claude/sdk.ts
|
|
581
605
|
var sdk_exports = {};
|
|
582
606
|
__export(sdk_exports, {
|
|
@@ -603,6 +627,7 @@ var init_sdk = __esm({
|
|
|
603
627
|
init_message_parser();
|
|
604
628
|
init_tool_bridge2();
|
|
605
629
|
init_claude_code_login();
|
|
630
|
+
init_sdk_tool_pins();
|
|
606
631
|
ClaudeSdkAdapter = class extends GeneratorAdapter {
|
|
607
632
|
provider = "claude";
|
|
608
633
|
mode = "sdk";
|
|
@@ -642,9 +667,8 @@ var init_sdk = __esm({
|
|
|
642
667
|
systemPrompt: params.systemPrompt,
|
|
643
668
|
...mcpServers && { mcpServers },
|
|
644
669
|
...cfg.agents && { agents: cfg.agents },
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
allowDangerouslySkipPermissions: true,
|
|
670
|
+
// ggui#1714 — no CLI built-ins unless asked for, no host settings, no permission bypass.
|
|
671
|
+
...sdkToolPins({ mcpServers, allowedTools, builtinTools: cfg.builtinTools }),
|
|
648
672
|
...cfg.cliPath && { pathToClaudeCodeExecutable: cfg.cliPath },
|
|
649
673
|
...cfg.stderr && { stderr: cfg.stderr },
|
|
650
674
|
// ggui#1185 — tool-less, config-less, non-bare; the model is pinned above.
|
|
@@ -1913,6 +1937,7 @@ These tokens adapt automatically to any theme (light, dark, branded). **ALWAYS u
|
|
|
1913
1937
|
| link | var(--ggui-color-link) | Accent TEXT \u2014 eyebrows, taglines, links, labels, inline arrows: the brand's readable ink, derived per mode to clear 4.5:1 on the container and the ground |
|
|
1914
1938
|
| outline | var(--ggui-color-outline) | Borders, dividers |
|
|
1915
1939
|
| outlineVariant | var(--ggui-color-outlineVariant) | Subtle borders |
|
|
1940
|
+
| controlOutline | var(--ggui-color-controlOutline) | A control's edge \u2014 clears 3:1 on its surface; kit controls draw it themselves |
|
|
1916
1941
|
|
|
1917
1942
|
**Usage pattern:**
|
|
1918
1943
|
- Page/section background \u2192 \`var(--ggui-color-ground)\`
|
|
@@ -2037,7 +2062,7 @@ Use \`var(--ggui-spacing-N)\` for all padding, gap, and margin values. **Never u
|
|
|
2037
2062
|
### Color usage guide
|
|
2038
2063
|
- **Layering roles** (ground, container, elevated, sunken + their on* inks; outline): one kind of AREA each \u2014 use them for every background/text/border decision; they adapt to any theme
|
|
2039
2064
|
- **primary-50/100**: Section backgrounds, highlight strips, card headers
|
|
2040
|
-
- **primary-200/300**:
|
|
2065
|
+
- **primary-200/300**: Dividers and section rules \u2014 never a control's border: kit controls draw their own edge (\`controlOutline\` / \`controlAccentOutline\`), so set no inline border on them
|
|
2041
2066
|
- **primary-500/600**: Filled buttons, CTAs, badges, icon fills, active indicators \u2014 fills and borders, NOT a text color
|
|
2042
2067
|
- **link**: Accent TEXT \u2014 eyebrows, taglines, links, labels, inline arrows; the brand's readable ink per mode (a bare \`primary-300\u2026600\` as a text color fails tier-0: \`universal.accent_text_ink\`)
|
|
2043
2068
|
- **primary-700/800/900**: Headings and text on light primary backgrounds
|
|
@@ -2884,10 +2909,7 @@ function generateReactFix(ruleId, message) {
|
|
|
2884
2909
|
}
|
|
2885
2910
|
return "Fix the React violation.";
|
|
2886
2911
|
}
|
|
2887
|
-
var NOT_YET_TAUGHT_TOKENS = /* @__PURE__ */ new Set([
|
|
2888
|
-
"--ggui-color-controlAccentOutline",
|
|
2889
|
-
"--ggui-color-controlOutline"
|
|
2890
|
-
]);
|
|
2912
|
+
var NOT_YET_TAUGHT_TOKENS = /* @__PURE__ */ new Set([]);
|
|
2891
2913
|
consumedTokenManifest.filter(
|
|
2892
2914
|
(token) => !NOT_YET_TAUGHT_TOKENS.has(token)
|
|
2893
2915
|
);
|