@vectoriox/iox-ui 5.65.0 → 5.66.1

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.
@@ -1,4 +1,4 @@
1
- import { MOOD_IDS, MOOD_LABELS, STYLE_PRESETS, flavorPackById, parseFontFamilies, SPEC_AXES, parseHexColor, rgbToOklab, presetChoices, toHexColor, stylePresetById, resolveTokenValues, designTokenRows, wcagContrastRatio, auditDesignContrast } from '@vectoriox/iox-ui/design-core';
1
+ import { MOOD_IDS, MOOD_LABELS, STYLE_PRESETS, SPEC_FLAVORS, flavorPackById, parseFontFamilies, SPEC_AXES, parseHexColor, rgbToOklab, presetChoices, toHexColor, stylePresetById, resolveTokenValues, designTokenRows, wcagContrastRatio, auditDesignContrast } from '@vectoriox/iox-ui/design-core';
2
2
  import { shapeKeys, requiredShapeKeys, PathIssueCollector, isPlainObject, pathAt, FACT_KEYS, jsonText, jsonOneOf, jsonListOf, jsonShapedObject, describeShapeKey, SPEC_SITE_LIBRARY, patternById, SITE_FACT_LABELS, HEBREW_PREFIXES, SITE_TEMPLATES, STUDIO_TEMPLATE, jsonInteger } from '@vectoriox/iox-ui/generation-core';
3
3
 
4
4
  // GENERATED from iox-ai-guidance flavor-spec.v1.json — do not edit; re-run scripts/gen-flavor-spec.mjs
@@ -4060,6 +4060,23 @@ function presetReason(ranked, preset, locale) {
4060
4060
  return ranked.reason;
4061
4061
  return (hebrew ? preset?.blurbHe : preset?.blurb) ?? '';
4062
4062
  }
4063
+ /**
4064
+ * Design ▸ Look's grid (decided 2026-10-28, Doron: "All 24, grouped by flavor" — reverses Q7 and the wizard's best 6):
4065
+ * every ranked style under its flavor, the flavors in catalogue order (Crisp · Linen · Midnight · Glass · Bloom · Pop),
4066
+ * each flavor's styles best-ranked first. A ranking with no basis (no business, no moods) is catalogue order, so the
4067
+ * groups are too. One rule for both hosts.
4068
+ */
4069
+ function presetsByFlavor(ranked, presets = STYLE_PRESETS, flavors = SPEC_FLAVORS) {
4070
+ const flavorOf = new Map(presets.map(p => [p.id, p.flavorId]));
4071
+ return flavors
4072
+ .map(f => ({ flavorId: f.id, presets: ranked.filter(r => flavorOf.get(r.id) === f.id) }))
4073
+ .filter(g => g.presets.length > 0);
4074
+ }
4075
+ /** The style the ranking puts first — only when it had something to rank by (a positive score); else none is "best". */
4076
+ function bestRankedPreset(ranked) {
4077
+ const top = ranked[0];
4078
+ return top && top.score > 0 ? top.id : null;
4079
+ }
4063
4080
  // ── References: a reading of pictures or a site, as style (plan §3k, R4) ─────────────────────────────────
4064
4081
  var StyleReadSourceKind;
4065
4082
  (function (StyleReadSourceKind) {
@@ -4880,5 +4897,5 @@ function startingDesign(input, read = null) {
4880
4897
  * Generated bundle index. Do not edit.
4881
4898
  */
4882
4899
 
4883
- export { ANIMATE_ADVICE_STEPS, AnalysisIssueCode, AnalysisLocale, AvoidCheck, BUSINESS_TYPES, BUSINESS_TYPE_IDS, BookingNeed, COPY_LENGTH_ORDER, CopyLength, GENERATION_LIMITS, HARNESS_SOURCE, LITTLE_MOVEMENT_AVOID, LITTLE_MOVEMENT_CAP, LintKind, MAX_ANALYSIS_MOODS, MAX_PIXEL_SAMPLES, MAX_READ_PICTURES, NEEDS, NEED_IDS, NeedSource, PALETTE_SIZE, PALETTE_THRESHOLDS, PictureRole, PlanChangeOutcome, PresetFit, RANK_WEIGHTS, READING_SHAPE, READ_ANIMATE, READ_WEIGHTS, RankReason, ReaderState, ReadingIssueCode, SITE_ANALYSIS_SCHEMA_NAME, SITE_READING_SCHEMA_NAME, SPEC_ANALYSIS_SHAPE, SPEC_BUSINESS_TYPES, SPEC_HARNESS_EXAMPLES, SPEC_HARNESS_SOURCE, SPEC_NEEDS, SPEC_STRUCTURES, SPEC_USER_AVOIDS, STRUCTURES, SiteReadRefusal, StyleReadGround, StyleReadHeadings, StyleReadMotion, StyleReadSourceKind, USER_AVOID_IDS, VoiceFormality, VoicePerson, addressesIn, analysisFromWire, analysisPromptContext, analysisToWire, businessTypeById, calmerChoice, decodeSiteReading, inferNeeds, isLookRule, lintDesign, lookMatches, mapStyleRead, matchBusinessType, matchBusinessTypes, measurePalette, mergeStyleReads, motionAdvice, motionFor, normalizeAddress, oklchHue, paletteBrand, paletteGround, paletteSamples, pictureStyleRead, pixelSamples, presetDesign, presetHasSerifHeadings, presetLook, presetReason, rankStylePresets, rankWithReferences, readPalette, referenceSeed, seedPassesPreset, siteAnalysisJsonSchema, siteReadingJsonSchema, startingDesign, structureFor, userAvoidRule, validateSiteAnalysis, validateSiteReading, withoutAddress };
4900
+ export { ANIMATE_ADVICE_STEPS, AnalysisIssueCode, AnalysisLocale, AvoidCheck, BUSINESS_TYPES, BUSINESS_TYPE_IDS, BookingNeed, COPY_LENGTH_ORDER, CopyLength, GENERATION_LIMITS, HARNESS_SOURCE, LITTLE_MOVEMENT_AVOID, LITTLE_MOVEMENT_CAP, LintKind, MAX_ANALYSIS_MOODS, MAX_PIXEL_SAMPLES, MAX_READ_PICTURES, NEEDS, NEED_IDS, NeedSource, PALETTE_SIZE, PALETTE_THRESHOLDS, PictureRole, PlanChangeOutcome, PresetFit, RANK_WEIGHTS, READING_SHAPE, READ_ANIMATE, READ_WEIGHTS, RankReason, ReaderState, ReadingIssueCode, SITE_ANALYSIS_SCHEMA_NAME, SITE_READING_SCHEMA_NAME, SPEC_ANALYSIS_SHAPE, SPEC_BUSINESS_TYPES, SPEC_HARNESS_EXAMPLES, SPEC_HARNESS_SOURCE, SPEC_NEEDS, SPEC_STRUCTURES, SPEC_USER_AVOIDS, STRUCTURES, SiteReadRefusal, StyleReadGround, StyleReadHeadings, StyleReadMotion, StyleReadSourceKind, USER_AVOID_IDS, VoiceFormality, VoicePerson, addressesIn, analysisFromWire, analysisPromptContext, analysisToWire, bestRankedPreset, businessTypeById, calmerChoice, decodeSiteReading, inferNeeds, isLookRule, lintDesign, lookMatches, mapStyleRead, matchBusinessType, matchBusinessTypes, measurePalette, mergeStyleReads, motionAdvice, motionFor, normalizeAddress, oklchHue, paletteBrand, paletteGround, paletteSamples, pictureStyleRead, pixelSamples, presetDesign, presetHasSerifHeadings, presetLook, presetReason, presetsByFlavor, rankStylePresets, rankWithReferences, readPalette, referenceSeed, seedPassesPreset, siteAnalysisJsonSchema, siteReadingJsonSchema, startingDesign, structureFor, userAvoidRule, validateSiteAnalysis, validateSiteReading, withoutAddress };
4884
4901
  //# sourceMappingURL=vectoriox-iox-ui-harness-core.mjs.map