@ggui-ai/ui-gen 0.22.0 → 0.23.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/adapters/generation-dispatch.d.ts +1 -1
- package/dist/adapters/generation-dispatch.js +55 -17
- package/dist/adapters/generation-dispatch.js.map +1 -1
- package/dist/adapters/index.js +1 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/advanced/index.d.ts +3 -3
- package/dist/advanced/index.js +66 -18
- package/dist/advanced/index.js.map +1 -1
- package/dist/blueprint-validator.js +37 -7
- package/dist/blueprint-validator.js.map +1 -1
- package/dist/boilerplate.js +1 -0
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.d.ts +1 -1
- package/dist/check/index.js.map +1 -1
- package/dist/{create-ui-generator-BEkzEtNz.d.ts → create-ui-generator-D0kbWwln.d.ts} +1 -1
- package/dist/{dispatch-DJNpQ7DI.d.ts → dispatch-wxaIMwZt.d.ts} +1 -1
- package/dist/evaluation/axis-checks/index.d.ts +3 -3
- package/dist/evaluation/axis-checks/index.js +19 -4
- package/dist/evaluation/axis-checks/index.js.map +1 -1
- package/dist/evaluation/axis-checks/registry.d.ts +1 -1
- package/dist/evaluation/axis-checks/registry.js +19 -4
- package/dist/evaluation/axis-checks/registry.js.map +1 -1
- package/dist/evaluation/index.d.ts +3 -3
- package/dist/evaluation/index.js +21 -6
- package/dist/evaluation/index.js.map +1 -1
- package/dist/harness/check/runtime-render/index.d.ts +4 -4
- package/dist/harness/check/runtime-render/index.js +26 -6
- package/dist/harness/check/runtime-render/index.js.map +1 -1
- package/dist/harness/check/runtime-render/render-check-worker.js.map +1 -1
- package/dist/harness/index.d.ts +1 -1
- package/dist/harness/index.js +3 -2
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/result-types.d.ts +1 -1
- package/dist/harness/runtime.d.ts +1 -1
- package/dist/harness/runtime.js +2 -1
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.d.ts +9 -5
- package/dist/harness/types-public.js +1 -0
- package/dist/harness/types-public.js.map +1 -1
- package/dist/harness/validator-trace-sink.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +55 -17
- package/dist/index.js.map +1 -1
- package/dist/patch.d.ts +1 -1
- package/dist/{render-check-C0CqVceF.d.ts → render-check-Blwj8gB6.d.ts} +18 -0
- package/dist/tools/get-primitives-ts.d.ts +1 -1
- package/dist/tools/get-primitives-ts.js +1 -1
- package/dist/tools/get-primitives-ts.js.map +1 -1
- package/dist/{types-public-mM_-1Yk3.d.ts → types-public-Ow-tNtFE.d.ts} +26 -3
- package/dist/validation/index.d.ts +1 -1
- package/dist/validation/index.js +1 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/workflows.d.ts +1 -1
- package/package.json +12 -12
- package/src/advanced/generator.ts +16 -1
- package/src/blueprint-validator.ts +21 -6
- package/src/boilerplate/hard-sections.ts +1 -0
- package/src/coding-agent/tools.ts +6 -1
- package/src/evaluation/axis-checks/checks/state-payload.ts +29 -4
- package/src/evaluation/types-public.ts +26 -2
- package/src/harness/check/runtime-render/adapter.ts +19 -0
- package/src/harness/check/runtime-render/render-check-host.ts +31 -9
- package/src/harness/check/runtime-render/render-check.ts +19 -0
- package/src/harness/coding/run-eval-round.ts +2 -0
- package/src/harness/llm-router.ts +3 -3
- package/src/harness/types-public.ts +9 -5
- package/src/tools/get-primitives-ts.ts +1 -1
- package/src/validation/primitives.ts +1 -1
|
@@ -4,7 +4,7 @@ import { GadgetCatalogAdapter } from '@ggui-ai/gadgets';
|
|
|
4
4
|
import { GeneratorTier, UiGenerator } from '@ggui-ai/mcp-server-core';
|
|
5
5
|
import { GenerationResult } from './harness/result-types.js';
|
|
6
6
|
import { D as DesignMode } from './design-mode-DLufhrNp.js';
|
|
7
|
-
import { Q as QualityConfig } from './types-public-
|
|
7
|
+
import { Q as QualityConfig } from './types-public-Ow-tNtFE.js';
|
|
8
8
|
import { EvaluationConfig } from './evaluation/types.js';
|
|
9
9
|
import { A as AgentConfig } from './llm-router-DwwUK1bz.js';
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataContract } from '@ggui-ai/protocol';
|
|
2
2
|
import { C as Classification } from './axes-CzLEMDeB.js';
|
|
3
|
-
import { E as EvalIssue } from './types-public-
|
|
3
|
+
import { E as EvalIssue } from './types-public-Ow-tNtFE.js';
|
|
4
4
|
import { D as DesignMode, C as CanvasClass } from './design-mode-DLufhrNp.js';
|
|
5
5
|
|
|
6
6
|
interface RunAxisChecksInput {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { R as RunAxisChecksInput, r as runAxisChecks } from '../../dispatch-
|
|
1
|
+
export { R as RunAxisChecksInput, r as runAxisChecks } from '../../dispatch-wxaIMwZt.js';
|
|
2
2
|
export { REGISTRY } from './registry.js';
|
|
3
|
-
import { A as AxisCheck } from '../../types-public-
|
|
4
|
-
export { a as AxisCheckInput, m as matches } from '../../types-public-
|
|
3
|
+
import { A as AxisCheck } from '../../types-public-Ow-tNtFE.js';
|
|
4
|
+
export { a as AxisCheckInput, m as matches } from '../../types-public-Ow-tNtFE.js';
|
|
5
5
|
import '@ggui-ai/protocol';
|
|
6
6
|
import '../../axes-CzLEMDeB.js';
|
|
7
7
|
import '../../design-mode-DLufhrNp.js';
|
|
@@ -1071,16 +1071,31 @@ function runStateCoversPayload(input) {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
return issues;
|
|
1073
1073
|
}
|
|
1074
|
+
function seedsFromProp(src, name) {
|
|
1075
|
+
const propRef = `props\\??\\.${name}\\b`;
|
|
1076
|
+
const initializerReads = (ref) => new RegExp(`useState(?:<[^>]*>)?\\s*\\([\\s\\S]{0,400}?${ref}`).test(src);
|
|
1077
|
+
if (initializerReads(propRef)) return true;
|
|
1078
|
+
const locals = /* @__PURE__ */ new Set();
|
|
1079
|
+
for (const m of src.matchAll(new RegExp(`(?:const|let|var)\\s+(\\w+)\\s*(?::[^=]{1,80})?=\\s*[^;]{0,300}?${propRef}`, "g"))) {
|
|
1080
|
+
const id = m[1];
|
|
1081
|
+
if (id !== void 0) locals.add(id);
|
|
1082
|
+
}
|
|
1083
|
+
for (const m of src.matchAll(new RegExp(`(?:const|let|var)\\s*\\{([^}]{1,400})\\}\\s*=\\s*[^;]{0,300}?${propRef}`, "g"))) {
|
|
1084
|
+
for (const part of (m[1] ?? "").split(",")) {
|
|
1085
|
+
const id = part.split(":").pop()?.split("=")[0]?.trim();
|
|
1086
|
+
if (id !== void 0 && /^\w+$/.test(id)) locals.add(id);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
for (const id of locals) if (initializerReads(`\\b${id}\\b`)) return true;
|
|
1090
|
+
return false;
|
|
1091
|
+
}
|
|
1074
1092
|
function runInitialValuesSeeded(input) {
|
|
1075
1093
|
if (input.compiledCode === null) return [];
|
|
1076
1094
|
const src = input.sourceCode;
|
|
1077
1095
|
const initialProps = getInitialValuePropNames(input.contract);
|
|
1078
1096
|
const issues = [];
|
|
1079
1097
|
for (const name of initialProps) {
|
|
1080
|
-
|
|
1081
|
-
`useState(?:<[^>]*>)?\\s*\\([\\s\\S]{0,400}?props\\.${name}\\b`
|
|
1082
|
-
);
|
|
1083
|
-
if (re.test(src)) continue;
|
|
1098
|
+
if (seedsFromProp(src, name)) continue;
|
|
1084
1099
|
issues.push(
|
|
1085
1100
|
mkIssue(
|
|
1086
1101
|
"state.payload.initial_values_seeded",
|