@ggui-ai/ui-gen 0.16.0 → 0.17.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 +6 -3
- package/dist/adapters/generation-dispatch.js +4944 -4239
- package/dist/adapters/generation-dispatch.js.map +1 -1
- package/dist/adapters/index.js +8 -5
- package/dist/adapters/index.js.map +1 -1
- package/dist/advanced/index.d.ts +12 -8
- package/dist/advanced/index.js +4462 -3726
- package/dist/advanced/index.js.map +1 -1
- package/dist/blueprint-validator.js +8 -12
- package/dist/blueprint-validator.js.map +1 -1
- package/dist/boilerplate.d.ts +5 -2
- package/dist/boilerplate.js +95 -12
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.d.ts +2 -2
- package/dist/check/index.js +2 -0
- package/dist/check/index.js.map +1 -1
- package/dist/compose.js +1 -1
- package/dist/compose.js.map +1 -1
- package/dist/{create-ui-generator-CCIeQaEe.d.ts → create-ui-generator-C8Ki9Wz1.d.ts} +18 -2
- package/dist/{design-mode-BHEE7flj.d.ts → design-mode-DLufhrNp.d.ts} +0 -6
- package/dist/{dispatch-BA5dJcg-.d.ts → dispatch-D2htzi9h.d.ts} +2 -2
- package/dist/evaluation/axis-checks/index.d.ts +4 -4
- package/dist/evaluation/axis-checks/index.js +297 -13
- package/dist/evaluation/axis-checks/index.js.map +1 -1
- package/dist/evaluation/axis-checks/registry.d.ts +2 -2
- package/dist/evaluation/axis-checks/registry.js +252 -1
- package/dist/evaluation/axis-checks/registry.js.map +1 -1
- package/dist/evaluation/index.d.ts +160 -8
- package/dist/evaluation/index.js +702 -81
- package/dist/evaluation/index.js.map +1 -1
- package/dist/fragments/index.js +1 -1
- package/dist/fragments/index.js.map +1 -1
- package/dist/{generate-8L_bc2iP.d.ts → generate-9IeNT4ZY.d.ts} +1 -1
- package/dist/harness/check/runtime-render/index.d.ts +3 -2
- package/dist/harness/check/runtime-render/index.js +8 -12
- package/dist/harness/check/runtime-render/index.js.map +1 -1
- package/dist/harness/index.d.ts +3 -2
- package/dist/harness/index.js +385 -254
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/prompts.d.ts +2 -2
- package/dist/harness/prompts.js +3 -3
- package/dist/harness/prompts.js.map +1 -1
- package/dist/harness/result-types.d.ts +3 -3
- package/dist/harness/runtime.d.ts +13 -4
- package/dist/harness/runtime.js +106 -19
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.d.ts +13 -2
- package/dist/harness/types-public.js +385 -254
- package/dist/harness/types-public.js.map +1 -1
- package/dist/harness/validator-trace-sink.d.ts +2 -2
- package/dist/index.d.ts +29 -7
- package/dist/index.js +4465 -3727
- package/dist/index.js.map +1 -1
- package/dist/patch.d.ts +3 -2
- package/dist/{prompts-k6m6reqe.d.ts → prompts-YU9piOgs.d.ts} +12 -46
- package/dist/styling-profile-CxfvV48g.d.ts +35 -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-D24JLJgl.d.ts → types-public-DVSssdc-.d.ts} +39 -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 +3 -2
- package/package.json +12 -12
- package/src/adapters/generation-dispatch.ts +6 -1
- package/src/boilerplate/free-design-prompt.ts +7 -0
- package/src/boilerplate/hard-sections.ts +16 -1
- package/src/boilerplate/styling-profile.ts +166 -0
- package/src/boilerplate/system-prompt.ts +20 -8
- package/src/check/run-tier0.ts +2 -0
- package/src/contract-context.ts +15 -14
- package/src/create-harness.ts +4 -0
- package/src/create-ui-generator.ts +41 -2
- package/src/design-mode.ts +11 -1
- package/src/design-system-docs.ts +7 -4
- package/src/effort.ts +48 -0
- package/src/evaluation/axis-checks/checks/grid.ts +148 -0
- package/src/evaluation/axis-checks/checks/universal.ts +244 -0
- package/src/evaluation/axis-checks/dispatch.ts +78 -13
- package/src/evaluation/axis-checks/helpers.ts +12 -0
- package/src/evaluation/axis-checks/registry.ts +2 -0
- package/src/evaluation/design-identity.ts +96 -0
- package/src/evaluation/index.ts +17 -0
- package/src/evaluation/llm-evaluator.ts +13 -1
- package/src/evaluation/theme-css.ts +14 -0
- package/src/evaluation/types-public.ts +35 -1
- package/src/evaluation/visual-evaluator.ts +478 -45
- package/src/fragments/render.ts +1 -1
- package/src/harness/check/runtime-render/prepare-mockup.ts +18 -11
- package/src/harness/coding/init-session.ts +1 -0
- package/src/harness/coding/run-coding-turn.ts +6 -14
- package/src/harness/coding/run-eval-round.ts +31 -3
- package/src/harness/runtime.ts +10 -0
- package/src/harness/types-public.ts +11 -0
- package/src/index.ts +2 -0
- package/src/pin-fixtures.ts +98 -0
- package/src/run-check.ts +10 -10
- package/src/tools/get-primitives-ts.ts +1 -1
- package/src/tools.ts +2 -1
- package/src/validation/primitives.ts +1 -1
|
@@ -1611,7 +1611,7 @@ function synthesizePropValue(entry, fieldName, warnings) {
|
|
|
1611
1611
|
return synthesizeFromSchema(entry.schema, fieldName, warnings, 0);
|
|
1612
1612
|
}
|
|
1613
1613
|
var MAX_DEPTH = 6;
|
|
1614
|
-
function synthesizeFromSchema(schema, hint, warnings, depth) {
|
|
1614
|
+
function synthesizeFromSchema(schema, hint, warnings, depth, ordinal) {
|
|
1615
1615
|
if (!schema) return { kind: "fail", reason: "no schema" };
|
|
1616
1616
|
if (depth > MAX_DEPTH) return { kind: "fail", reason: "schema too deep" };
|
|
1617
1617
|
if (schema.default !== void 0) {
|
|
@@ -1624,19 +1624,14 @@ function synthesizeFromSchema(schema, hint, warnings, depth) {
|
|
|
1624
1624
|
return { kind: "ok", value: schema.enum[0], source: "schema-enum" };
|
|
1625
1625
|
}
|
|
1626
1626
|
if (schema.oneOf && schema.oneOf.length > 0) {
|
|
1627
|
-
return synthesizeFromSchema(schema.oneOf[0], hint, warnings, depth + 1);
|
|
1627
|
+
return synthesizeFromSchema(schema.oneOf[0], hint, warnings, depth + 1, ordinal);
|
|
1628
1628
|
}
|
|
1629
1629
|
if (schema.anyOf && schema.anyOf.length > 0) {
|
|
1630
|
-
return synthesizeFromSchema(schema.anyOf[0], hint, warnings, depth + 1);
|
|
1630
|
+
return synthesizeFromSchema(schema.anyOf[0], hint, warnings, depth + 1, ordinal);
|
|
1631
1631
|
}
|
|
1632
1632
|
if (Array.isArray(schema.type)) {
|
|
1633
1633
|
const primary = schema.type.find((t) => t !== "null") ?? "null";
|
|
1634
|
-
return synthesizeFromSchema(
|
|
1635
|
-
{ ...schema, type: primary },
|
|
1636
|
-
hint,
|
|
1637
|
-
warnings,
|
|
1638
|
-
depth + 1
|
|
1639
|
-
);
|
|
1634
|
+
return synthesizeFromSchema({ ...schema, type: primary }, hint, warnings, depth + 1, ordinal);
|
|
1640
1635
|
}
|
|
1641
1636
|
switch (schema.type) {
|
|
1642
1637
|
case "string": {
|
|
@@ -1653,7 +1648,8 @@ function synthesizeFromSchema(schema, hint, warnings, depth) {
|
|
|
1653
1648
|
return { kind: "ok", value: "00000000-0000-0000-0000-000000000000", source: "schema-synth" };
|
|
1654
1649
|
default: {
|
|
1655
1650
|
const cap = hint.charAt(0).toUpperCase() + hint.slice(1);
|
|
1656
|
-
|
|
1651
|
+
const value = ordinal === void 0 ? `Sample ${cap}` : `Sample ${cap} ${ordinal}`;
|
|
1652
|
+
return { kind: "ok", value, source: "schema-synth" };
|
|
1657
1653
|
}
|
|
1658
1654
|
}
|
|
1659
1655
|
}
|
|
@@ -1675,7 +1671,7 @@ function synthesizeFromSchema(schema, hint, warnings, depth) {
|
|
|
1675
1671
|
const items = [];
|
|
1676
1672
|
for (let i = 0; i < 2; i++) {
|
|
1677
1673
|
const itemHint = `${hint}Item${i + 1}`;
|
|
1678
|
-
const itemSynth = synthesizeFromSchema(schema.items, itemHint, warnings, depth + 1);
|
|
1674
|
+
const itemSynth = synthesizeFromSchema(schema.items, itemHint, warnings, depth + 1, i + 1);
|
|
1679
1675
|
if (itemSynth.kind === "ok") {
|
|
1680
1676
|
if (itemSynth.value !== null && typeof itemSynth.value === "object" && !Array.isArray(itemSynth.value) && !("id" in itemSynth.value)) {
|
|
1681
1677
|
itemSynth.value.id = `${hint}-${i + 1}`;
|
|
@@ -1690,7 +1686,7 @@ function synthesizeFromSchema(schema, hint, warnings, depth) {
|
|
|
1690
1686
|
const propsMap = schema.properties ?? {};
|
|
1691
1687
|
const required = new Set(schema.required ?? []);
|
|
1692
1688
|
for (const [k, sub] of Object.entries(propsMap)) {
|
|
1693
|
-
const subSynth = synthesizeFromSchema(sub, k, warnings, depth + 1);
|
|
1689
|
+
const subSynth = synthesizeFromSchema(sub, k, warnings, depth + 1, ordinal);
|
|
1694
1690
|
if (subSynth.kind === "ok") {
|
|
1695
1691
|
obj[k] = subSynth.value;
|
|
1696
1692
|
} else if (required.has(k)) {
|