@vectoriox/iox-ui 5.97.0 → 5.98.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/fesm2022/vectoriox-iox-ui-generation-core.mjs +1114 -223
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs +115 -42
- package/fesm2022/vectoriox-iox-ui-harness-core.mjs.map +1 -1
- package/generation-core/index.d.ts +515 -17
- package/harness-core/index.d.ts +66 -6
- package/package.json +1 -1
- package/src/generation-core/audit-site.ts +8 -0
- package/src/generation-core/compose-site.ts +130 -4
- package/src/generation-core/nav-shape.ts +4 -2
- package/src/generation-core/patterns.ts +25 -1
- package/src/generation-core/pictures.ts +1 -1
- package/src/generation-core/plan-derived.ts +10 -5
- package/src/generation-core/plan-edits.ts +8 -7
- package/src/generation-core/plan-wire.ts +59 -10
- package/src/generation-core/plan-words.ts +18 -1
- package/src/generation-core/public-api.ts +1 -0
- package/src/generation-core/shop-plan.ts +165 -0
- package/src/generation-core/showcase.ts +29 -4
- package/src/generation-core/site-build-run.ts +25 -0
- package/src/generation-core/site-plan.model.ts +49 -1
- package/src/generation-core/site-spec.generated.ts +330 -2
- package/src/generation-core/stock-photos.ts +19 -2
- package/src/generation-core/validate-site-plan.ts +146 -8
- package/src/harness-core/business-types.ts +13 -0
- package/src/harness-core/harness-spec.generated.ts +69 -39
- package/src/harness-core/needs.ts +30 -1
- package/src/harness-core/site-reading.ts +8 -2
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
shapeKeys, requiredShapeKeys,
|
|
5
5
|
} from '@vectoriox/iox-ui/generation-core';
|
|
6
6
|
|
|
7
|
+
import { withSellingNeed } from './needs';
|
|
7
8
|
import { paletteSamples, readPalette } from './palette';
|
|
8
9
|
import { StyleRead, StyleReadGround, StyleReadHeadings, StyleReadSourceKind } from './rank';
|
|
9
10
|
import { AnalysisIssue, analysisFromWire, MAX_ANALYSIS_MOODS, SiteAnalysis, siteAnalysisJsonSchema, validateSiteAnalysis } from './site-analysis';
|
|
@@ -152,9 +153,14 @@ export function validateSiteReading(value: unknown, ctx: { prompt: string; pictu
|
|
|
152
153
|
|
|
153
154
|
/** A valid reading's answer → `SiteReading` (the analysis alone answers `{ analysis }`; the facts made a map again). */
|
|
154
155
|
export function decodeSiteReading(value: unknown, pictureCount: number): SiteReading {
|
|
155
|
-
if (pictureCount <= 0) return { analysis: analysisFromWire(value).analysis as SiteAnalysis };
|
|
156
|
+
if (pictureCount <= 0) return { analysis: settled(analysisFromWire(value).analysis as SiteAnalysis) };
|
|
156
157
|
const reading = value as SiteReading;
|
|
157
|
-
return { ...reading, analysis: analysisFromWire(reading.analysis).analysis as SiteAnalysis };
|
|
158
|
+
return { ...reading, analysis: settled(analysisFromWire(reading.analysis).analysis as SiteAnalysis) };
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** What a reading's kind of business settles whatever the model wrote: whether it sells (`withSellingNeed`). */
|
|
162
|
+
function settled(analysis: SiteAnalysis): SiteAnalysis {
|
|
163
|
+
return Array.isArray(analysis?.needs) ? { ...analysis, needs: withSellingNeed(analysis.businessType, analysis.needs) } : analysis;
|
|
158
164
|
}
|
|
159
165
|
|
|
160
166
|
// ── Readings → ONE StyleRead ───────────────────────────────────────────────────────────────────────────
|