@vectoriox/iox-ui 5.90.1 → 5.90.2

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.
@@ -423,6 +423,7 @@ declare const SPEC_SITE_PATTERNS: {
423
423
  readonly prop: "opacity";
424
424
  readonly keys: readonly [readonly [0.5, 0], readonly [0.65, 1]];
425
425
  }];
426
+ readonly textHe: "צרו קשר";
426
427
  }];
427
428
  }];
428
429
  }];
@@ -521,6 +522,7 @@ declare const SPEC_SITE_PATTERNS: {
521
522
  readonly prop: "opacity";
522
523
  readonly keys: readonly [readonly [0.35, 0], readonly [0.5, 1]];
523
524
  }];
525
+ readonly textHe: "צרו קשר";
524
526
  }];
525
527
  }];
526
528
  }];
@@ -837,6 +839,7 @@ declare const SPEC_SITE_PATTERNS: {
837
839
  readonly max: 24;
838
840
  readonly text: "Get in touch";
839
841
  readonly role: "nav.cta";
842
+ readonly textHe: "צרו קשר";
840
843
  }];
841
844
  }];
842
845
  };
@@ -908,6 +911,7 @@ declare const SPEC_SITE_PATTERNS: {
908
911
  readonly max: 24;
909
912
  readonly text: "Get in touch";
910
913
  readonly role: "nav.cta";
914
+ readonly textHe: "צרו קשר";
911
915
  }];
912
916
  }];
913
917
  };
@@ -972,6 +976,7 @@ declare const SPEC_SITE_PATTERNS: {
972
976
  readonly slot: "pagesLabel";
973
977
  readonly max: 40;
974
978
  readonly text: "Pages";
979
+ readonly textHe: "עמודים";
975
980
  }, {
976
981
  readonly t: "Link";
977
982
  readonly es: "link";
@@ -994,6 +999,7 @@ declare const SPEC_SITE_PATTERNS: {
994
999
  readonly slot: "contactLabel";
995
1000
  readonly max: 40;
996
1001
  readonly text: "Contact";
1002
+ readonly textHe: "יצירת קשר";
997
1003
  }, {
998
1004
  readonly t: "Text";
999
1005
  readonly es: "small";
@@ -1088,6 +1094,7 @@ declare const SPEC_SITE_PATTERNS: {
1088
1094
  readonly slot: "pagesLabel";
1089
1095
  readonly max: 40;
1090
1096
  readonly text: "Pages";
1097
+ readonly textHe: "עמודים";
1091
1098
  }, {
1092
1099
  readonly t: "Link";
1093
1100
  readonly es: "link";
@@ -1110,6 +1117,7 @@ declare const SPEC_SITE_PATTERNS: {
1110
1117
  readonly slot: "visitLabel";
1111
1118
  readonly max: 40;
1112
1119
  readonly text: "Visit";
1120
+ readonly textHe: "ביקור";
1113
1121
  }, {
1114
1122
  readonly t: "Text";
1115
1123
  readonly es: "small";
@@ -1134,6 +1142,7 @@ declare const SPEC_SITE_PATTERNS: {
1134
1142
  readonly slot: "contactLabel";
1135
1143
  readonly max: 40;
1136
1144
  readonly text: "Contact";
1145
+ readonly textHe: "יצירת קשר";
1137
1146
  }, {
1138
1147
  readonly t: "Text";
1139
1148
  readonly es: "small";
@@ -1292,6 +1301,7 @@ declare const SPEC_SITE_PATTERNS: {
1292
1301
  readonly slot: "secondary";
1293
1302
  readonly max: 24;
1294
1303
  readonly text: "Get in touch";
1304
+ readonly textHe: "צרו קשר";
1295
1305
  }];
1296
1306
  }];
1297
1307
  }, {
@@ -1371,6 +1381,7 @@ declare const SPEC_SITE_PATTERNS: {
1371
1381
  readonly slot: "primary";
1372
1382
  readonly max: 24;
1373
1383
  readonly text: "Get in touch";
1384
+ readonly textHe: "צרו קשר";
1374
1385
  }, {
1375
1386
  readonly t: "ButtonBlock";
1376
1387
  readonly es: "button-secondary";
@@ -2187,6 +2198,7 @@ declare const SPEC_SITE_PATTERNS: {
2187
2198
  readonly slot: "action";
2188
2199
  readonly max: 24;
2189
2200
  readonly text: "Get in touch";
2201
+ readonly textHe: "צרו קשר";
2190
2202
  }];
2191
2203
  }];
2192
2204
  };
@@ -2837,6 +2849,7 @@ declare const SPEC_SITE_PATTERNS: {
2837
2849
  readonly max: 44;
2838
2850
  readonly text: "Get in touch";
2839
2851
  readonly enter: "heading";
2852
+ readonly textHe: "צרו קשר";
2840
2853
  }, {
2841
2854
  readonly t: "Text";
2842
2855
  readonly es: "lead";
@@ -3717,6 +3730,7 @@ declare const SPEC_SITE_PATTERNS: {
3717
3730
  readonly slot: "cta";
3718
3731
  readonly max: 24;
3719
3732
  readonly text: "Get in touch";
3733
+ readonly textHe: "צרו קשר";
3720
3734
  }];
3721
3735
  }];
3722
3736
  };
@@ -6179,6 +6193,8 @@ interface PatternNode {
6179
6193
  readonly slot?: string;
6180
6194
  readonly fromBusiness?: string;
6181
6195
  readonly text?: string;
6196
+ /** The pattern's own words on a Hebrew site (the contract's COPY_HE); `text` everywhere else. */
6197
+ readonly textHe?: string;
6182
6198
  readonly ph?: string;
6183
6199
  readonly bind?: string;
6184
6200
  readonly alt?: string;
@@ -6870,6 +6886,8 @@ interface NavHeaderInput {
6870
6886
  readonly business: SiteBusiness;
6871
6887
  /** Every page of the studio, in the order the navigation should list them. */
6872
6888
  readonly pages: ReadonlyArray<SitePageRef>;
6889
+ /** The site's language (`SiteLocale`): the header's own words (its call to action) in it. English when not given. */
6890
+ readonly locale?: string;
6873
6891
  }
6874
6892
  interface NavHeaderOptions {
6875
6893
  /** The header's id; its parts' ids derive from it (`<id>-0-1-…`), so a fresh id gives fresh parts. */
@@ -8792,8 +8810,11 @@ interface ComposedLayout {
8792
8810
  * colour the ground's words take; otherwise null (M8 gate 2, fix first part 3).
8793
8811
  */
8794
8812
  declare function phoneWordsColour(l: LayoutLayer, li: number, s: Pick<LayoutSection, 'layers' | 'ground'>): string | null;
8795
- /** The scheme a form or a gallery on this section ground wears, or null on the page's own ground. */
8813
+ /** The scheme a form, a gallery, a button or a ready-made section's content on this section ground wears, or null on the page's own ground. */
8796
8814
  declare function layoutBandScheme(ground: string | undefined): ColorScheme | null;
8815
+ /** The column a ready-made section's words start on: where its neighbour's words start (their first column), so the two
8816
+ * share an edge; at most READY_MADE_MAX_COLUMN; 1 (the gutter) when the neighbour has no words. */
8817
+ declare function readyMadeColumn(neighbour: LayoutSection | null): number;
8797
8818
  /**
8798
8819
  * A layout-language page → its layout and header. Deterministic: the same layout composes to byte-identical nodes.
8799
8820
  * Refuses (ComposeError) a link to a section the layout does not have; everything the product cannot say comes back in
@@ -9417,5 +9438,5 @@ declare function applyLayoutEdits(page: LayoutPage, edits: ReadonlyArray<LayoutE
9417
9438
  /** The strict format a repair is asked in: `{ edits: [{ op, path, value }] }`, every key required. */
9418
9439
  declare function layoutRepairJsonSchema(): JsonSchema;
9419
9440
 
9420
- export { ACTION_START_SCALE, ACTIVE_BUILD_STATUSES, AI_REFUSAL_NEXT, AI_REFUSAL_STATUS, AI_STEPS, AI_STEP_LABELS, AI_STEP_NEEDS, AI_STEP_PART_TOKENS, AI_STEP_TYPICAL_TOKENS, ART_DIRECTION_PARTS, AiCallStatus, AiCapability, AiFeature, AiGenerationStage, AiKeyMode, AiLimit, AiNextKind, AiProviderId, AiRefusalCode, AiStep, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CONTENT_ROLE_MEANINGS, CREDITS_PER_USD, CardBindTarget, CheckSeverity, ComposeError, ComposeIssueCode, ContentFieldControl, ContentFieldType, ContentRole, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, DEFAULT_SITE_LOCALE, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, EntranceSide, FACT_KEYS, FIELD_TYPE_OF_CONTROL, FILL_ASPECT, FILM_PATTERN, FINAL_GENERATION_STAGES, FINDING_SEVERITY, FilmUnplaced, GRAMMAR_TOO_LARGE_MESSAGE, GlobalSlot, HEBREW_PREFIXES, JSON_SCHEMA_BANNED_KEYWORDS, JsonSchemaShapeError, KeptReason, LAYOUT_ACCENT_TEXT, LAYOUT_BEAT_DELAY, LAYOUT_CHECK_VIEWPORT, LAYOUT_COLOUR_TOKEN, LAYOUT_COLUMN_GAP, LAYOUT_DEPTH_ON_PHONE, LAYOUT_EASING, LAYOUT_ENTRANCE_MAX_MS, LAYOUT_FONT_SIZE, LAYOUT_GUTTER, LAYOUT_HIDDEN_OPACITY, LAYOUT_OPERATED, LAYOUT_PACE, LAYOUT_PHONE_BREAKPOINT, LAYOUT_PHONE_PADDING, LAYOUT_PHOTO_ASPECT, LAYOUT_READY_MADE_TOKEN, LAYOUT_RISE, LAYOUT_SCREEN_PX, LAYOUT_TEXT_KINDS, LAYOUT_TOOLTIP_TRAIT, LAYOUT_VIEWPORTS, LAYOUT_WIRE_AUTOPLAY_MS, LayoutAlign, LayoutBleed, LayoutButtonVariant, LayoutColour, LayoutColourMode, LayoutDepth, LayoutDial, LayoutEase, LayoutEditOp, LayoutEnter, LayoutGalleryEffect, LayoutGapCode, LayoutIssueCode, LayoutLayerKind, LayoutMendKind, LayoutNavKind, LayoutPace, LayoutPhotoShape, LayoutPhotoSource, LayoutRole, LayoutSectionKind, LayoutSequenceToken, LayoutSide, LayoutSignatureId, LayoutSize, LayoutSourceChoice, LayoutTrackProp, LayoutTransition, LayoutViewport, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, PHOTO_ANALYSIS_WIDTH, PHOTO_CALM_DETAIL, PHOTO_GRID, PHOTO_LIGHT_LUMINANCE, PICTURE_ASPECTS, PICTURE_NEVER, PICTURE_REAL_PLACE_FAMILIES, PICTURE_REROLL_EVERY, PICTURE_REVIEW_FORMAT, PICTURE_REVIEW_SHAPE, PICTURE_TEXT_CONTRAST, PICTURE_WORLDS, PICTURE_WORLD_IDS, PLAN_EDITS_ANSWER_SHAPES, PLAN_EDITS_PART_SCHEMA_NAMES, PLAN_EDIT_OP_PART, PLAN_EDIT_SHAPE, PLAN_EDIT_WIRE_KEYS, PLAN_PARTS, PLAN_PART_KEYS, PLAN_WIRE_DERIVED, PLAN_WIRE_PART_SCHEMA_NAMES, PLAN_WIRE_SHAPE, PRICING_PATTERN, PROOF_FINGERPRINTS, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PhotoTone, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PublishRefusalCode, RENDER_CHECK, REQUIRED_CONTENT_ROLES, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SHOWCASE_FILM, SITE_CHECKS, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_LIBRARY, SITE_LOCALES, SITE_NEED_IDS, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_ARCHETYPES, SPEC_SITE_COPY_LENGTHS, SPEC_SITE_DENSITY_COPY, SPEC_SITE_FACTS, SPEC_SITE_LAYOUT, SPEC_SITE_LIBRARY, SPEC_SITE_LOCALES, SPEC_SITE_NEED_IDS, SPEC_SITE_PATTERNS, SPEC_SITE_PICTURE_NEVER, SPEC_SITE_PICTURE_WORLDS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_REQUIRED_ROLES, SPEC_SITE_ROLES, SPEC_SITE_TEMPLATES, STOCK_FAMILIES, STOCK_FAMILY_INTENTS, STOCK_INTENT_ORDER, STOCK_INTENT_SUBJECTS, STOCK_ITEM_ASPECT, STOCK_MIN_KEPT, STOCK_PROVIDER_TERMS, STOCK_SEED_MARGIN, STOCK_SUBJECT_WORDS, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, ScrimLevel, SectionFallbackLastResort, SectionSwapAction, SectionSwapRule, SiteBuildKind, SiteBuildStatus, SiteCheckId, SiteFindingCode, SiteLocale, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, StockIntent, StockOrientation, StockProviderId, StockReviewFlag, StockReviewVerdict, StockSlotKind, StockSubject, WORDS_AREA_DEFAULT_SHARE, WordsEdge, addBarItem, addStockCredits, aiStepParts, applyLayoutEdits, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditLayoutMotion, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, builtHomePageId, calmParts, calmUnder, checkLayout, chooseScrim, composeContextOf, composeLayout, composeNavHeader, composePresetForm, composeSection, composeSite, contentTypeOfSource, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, coverCrop, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedBeats, derivedDataSources, describeInventoryForPrompt, describePlanData, describeShapeKey, driftAt, driftOverlap, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandLayoutWire, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, failedBuildStep, fallBackBySection, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, fingerprintOf, frameWords, isActiveBuild, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, judgeLayoutRender, layerShownSpans, layoutBandScheme, layoutColumnsVw, layoutDesignOf, layoutDialOf, layoutElementStyle, layoutGalleryLists, layoutGallerySources, layoutGlideDepth, layoutLookChanges, layoutLookOf, layoutMotionOf, layoutNodeClass, layoutPathSteps, layoutPhotoIds, layoutPresetColours, layoutPresetOf, layoutRepairJsonSchema, layoutRoomPx, layoutTextWidthEm, layoutToWire, layoutWireJsonSchema, luminanceOf, measureLayout, mendLayout, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, pageToWire, parseLayoutPhotoId, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneGapBefore, phoneMenuPages, phoneWordsColour, photoInventory, photoShapeOf, pictureAspect, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTryFits, pixelsUnder, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planLayoutPhotos, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, publishRefusal, publishVerdict, recipeListBinds, recomposeAsks, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, samenessIssues, sampleImageRef, scoreStockPhoto, screenFontSize, screenWordColumns, screenWordMisfit, screenWordOverflowPx, sectionEntrances, sectionPatternIds, sectionToWire, sectionsNamed, sequenceShare, sequenceTokenOf, setStyleProps, shapeKeys, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, shownTogether, signatureOf, siteNavPages, slotBudget, splitSide, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, toneOf, typicalStepTokens, validatePlanEdits, validateSitePlan, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, withDerivedSources, wordPattern, wordsOverPhotos, wordsOverPicture, writtenTexts };
9441
+ export { ACTION_START_SCALE, ACTIVE_BUILD_STATUSES, AI_REFUSAL_NEXT, AI_REFUSAL_STATUS, AI_STEPS, AI_STEP_LABELS, AI_STEP_NEEDS, AI_STEP_PART_TOKENS, AI_STEP_TYPICAL_TOKENS, ART_DIRECTION_PARTS, AiCallStatus, AiCapability, AiFeature, AiGenerationStage, AiKeyMode, AiLimit, AiNextKind, AiProviderId, AiRefusalCode, AiStep, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CONTENT_ROLE_MEANINGS, CREDITS_PER_USD, CardBindTarget, CheckSeverity, ComposeError, ComposeIssueCode, ContentFieldControl, ContentFieldType, ContentRole, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, DEFAULT_SITE_LOCALE, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, EntranceSide, FACT_KEYS, FIELD_TYPE_OF_CONTROL, FILL_ASPECT, FILM_PATTERN, FINAL_GENERATION_STAGES, FINDING_SEVERITY, FilmUnplaced, GRAMMAR_TOO_LARGE_MESSAGE, GlobalSlot, HEBREW_PREFIXES, JSON_SCHEMA_BANNED_KEYWORDS, JsonSchemaShapeError, KeptReason, LAYOUT_ACCENT_TEXT, LAYOUT_BEAT_DELAY, LAYOUT_CHECK_VIEWPORT, LAYOUT_COLOUR_TOKEN, LAYOUT_COLUMN_GAP, LAYOUT_DEPTH_ON_PHONE, LAYOUT_EASING, LAYOUT_ENTRANCE_MAX_MS, LAYOUT_FONT_SIZE, LAYOUT_GUTTER, LAYOUT_HIDDEN_OPACITY, LAYOUT_OPERATED, LAYOUT_PACE, LAYOUT_PHONE_BREAKPOINT, LAYOUT_PHONE_PADDING, LAYOUT_PHOTO_ASPECT, LAYOUT_READY_MADE_TOKEN, LAYOUT_RISE, LAYOUT_SCREEN_PX, LAYOUT_TEXT_KINDS, LAYOUT_TOOLTIP_TRAIT, LAYOUT_VIEWPORTS, LAYOUT_WIRE_AUTOPLAY_MS, LayoutAlign, LayoutBleed, LayoutButtonVariant, LayoutColour, LayoutColourMode, LayoutDepth, LayoutDial, LayoutEase, LayoutEditOp, LayoutEnter, LayoutGalleryEffect, LayoutGapCode, LayoutIssueCode, LayoutLayerKind, LayoutMendKind, LayoutNavKind, LayoutPace, LayoutPhotoShape, LayoutPhotoSource, LayoutRole, LayoutSectionKind, LayoutSequenceToken, LayoutSide, LayoutSignatureId, LayoutSize, LayoutSourceChoice, LayoutTrackProp, LayoutTransition, LayoutViewport, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, PHOTO_ANALYSIS_WIDTH, PHOTO_CALM_DETAIL, PHOTO_GRID, PHOTO_LIGHT_LUMINANCE, PICTURE_ASPECTS, PICTURE_NEVER, PICTURE_REAL_PLACE_FAMILIES, PICTURE_REROLL_EVERY, PICTURE_REVIEW_FORMAT, PICTURE_REVIEW_SHAPE, PICTURE_TEXT_CONTRAST, PICTURE_WORLDS, PICTURE_WORLD_IDS, PLAN_EDITS_ANSWER_SHAPES, PLAN_EDITS_PART_SCHEMA_NAMES, PLAN_EDIT_OP_PART, PLAN_EDIT_SHAPE, PLAN_EDIT_WIRE_KEYS, PLAN_PARTS, PLAN_PART_KEYS, PLAN_WIRE_DERIVED, PLAN_WIRE_PART_SCHEMA_NAMES, PLAN_WIRE_SHAPE, PRICING_PATTERN, PROOF_FINGERPRINTS, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PhotoTone, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PublishRefusalCode, RENDER_CHECK, REQUIRED_CONTENT_ROLES, RelativeOp, SAMPLE_IMAGE_REF, SCENE_LEVEL, SCENE_OTHER_PAGES, SCRIM_BACKGROUND, SCRIM_COVER, SCRIM_LEVELS, SHOWCASE_FILM, SITE_CHECKS, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_LIBRARY, SITE_LOCALES, SITE_NEED_IDS, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_ARCHETYPES, SPEC_SITE_COPY_LENGTHS, SPEC_SITE_DENSITY_COPY, SPEC_SITE_FACTS, SPEC_SITE_LAYOUT, SPEC_SITE_LIBRARY, SPEC_SITE_LOCALES, SPEC_SITE_NEED_IDS, SPEC_SITE_PATTERNS, SPEC_SITE_PICTURE_NEVER, SPEC_SITE_PICTURE_WORLDS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_REQUIRED_ROLES, SPEC_SITE_ROLES, SPEC_SITE_TEMPLATES, STOCK_FAMILIES, STOCK_FAMILY_INTENTS, STOCK_INTENT_ORDER, STOCK_INTENT_SUBJECTS, STOCK_ITEM_ASPECT, STOCK_MIN_KEPT, STOCK_PROVIDER_TERMS, STOCK_SEED_MARGIN, STOCK_SUBJECT_WORDS, STRICT_SCHEMA_BUDGET, STRICT_SCHEMA_LIMITS, STUDIO_TEMPLATE, ScrimLevel, SectionFallbackLastResort, SectionSwapAction, SectionSwapRule, SiteBuildKind, SiteBuildStatus, SiteCheckId, SiteFindingCode, SiteLocale, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, StockIntent, StockOrientation, StockProviderId, StockReviewFlag, StockReviewVerdict, StockSlotKind, StockSubject, WORDS_AREA_DEFAULT_SHARE, WordsEdge, addBarItem, addStockCredits, aiStepParts, applyLayoutEdits, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditLayoutMotion, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, builtHomePageId, calmParts, calmUnder, checkLayout, chooseScrim, composeContextOf, composeLayout, composeNavHeader, composePresetForm, composeSection, composeSite, contentTypeOfSource, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, coverCrop, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedBeats, derivedDataSources, describeInventoryForPrompt, describePlanData, describeShapeKey, driftAt, driftOverlap, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandLayoutWire, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, failedBuildStep, fallBackBySection, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, fingerprintOf, frameWords, isActiveBuild, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, judgeLayoutRender, layerShownSpans, layoutBandScheme, layoutColumnsVw, layoutDesignOf, layoutDialOf, layoutElementStyle, layoutGalleryLists, layoutGallerySources, layoutGlideDepth, layoutLookChanges, layoutLookOf, layoutMotionOf, layoutNodeClass, layoutPathSteps, layoutPhotoIds, layoutPresetColours, layoutPresetOf, layoutRepairJsonSchema, layoutRoomPx, layoutTextWidthEm, layoutToWire, layoutWireJsonSchema, luminanceOf, measureLayout, mendLayout, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, pageToWire, parseLayoutPhotoId, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneGapBefore, phoneMenuPages, phoneWordsColour, photoInventory, photoShapeOf, pictureAspect, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTryFits, pixelsUnder, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planLayoutPhotos, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, publishRefusal, publishVerdict, readyMadeColumn, recipeListBinds, recomposeAsks, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, samenessIssues, sampleImageRef, scoreStockPhoto, screenFontSize, screenWordColumns, screenWordMisfit, screenWordOverflowPx, sectionEntrances, sectionPatternIds, sectionToWire, sectionsNamed, sequenceShare, sequenceTokenOf, setStyleProps, shapeKeys, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, shownTogether, signatureOf, siteNavPages, slotBudget, splitSide, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, toneOf, typicalStepTokens, validatePlanEdits, validateSitePlan, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, withDerivedSources, wordPattern, wordsOverPhotos, wordsOverPicture, writtenTexts };
9421
9442
  export type { AddBarItemResult, AiEntitlementsView, AiMeter, AiModelEntry, AiRefusal, AiTokenCounts, AiTokenPrice, AreaLuminance, ArtDirection, AuditPage, AuditPlaceholder, BarItemsEditResult, BuildNotice, BuildStepError, BuildStepFacts, BuildStepRecord, CalmReading, CheckLayoutContext, CmsDataSourcePlan, ComposeContext, ComposeIssue, ComposeLayoutOptions, ComposedDataSource, ComposedItem, ComposedLayout, ComposedNavHeader, ComposedPage, ComposedPlaceholder, ComposedRoute, ComposedSection, ComposedSite, ContentFieldPlan, ContentRoles, ContentSeedPlan, ContentTypePlan, CreateNodeOptions, CreatedRecord, DataSourcePlan, DriftBox, DriftLayer, DriftMeeting, DynamicKeysAsList, EntranceAction, EntranceActionOptions, EntranceInteraction, EntranceMark, EntranceSpec, EntranceStamp, FactKey, FilmPlacement, FilmTarget, FingerprintedPage, FrameRegion, JsonSchema, LayoutBandMove, LayoutColours, LayoutEdit, LayoutFingerprint, LayoutForm, LayoutGallery, LayoutGalleryList, LayoutGap, LayoutGivenAway, LayoutIssue, LayoutLayer, LayoutLook, LayoutMend, LayoutPage, LayoutPhotoAddress, LayoutReadyMade, LayoutRect, LayoutSection, LayoutSite, LayoutTrack, LayoutWire, LayoutWireLayer, LayoutWireSection, LayoutWireSlot, LayoutWireTrack, MeasuredLayer, MeasuredLayout, NavHeaderInput, NavHeaderOptions, NavPage, NavShapeOptions, NavShapeResult, NodeBaseline, OwnPhotoPlacement, PageArchetype, PageArchetypeId, PageArchetypeSlot, PageData, PageDataLine, PagePlan, PageSectionPlan, PageSeoPlan, PathIssue, PatternManifestEntry, PatternManifestOptions, PatternNode, PatternPath, PatternRoleNeed, PatternTrack, PhotoInventory, PhotoWordsArea, PicturePlan, PicturePlanOptions, PicturePromptContext, PictureReview, PictureSlot, PictureTryBudget, PictureWorldSpec, PicturesEstimate, PixelReading, PlacedFilm, PlainObject, PlanChange, PlanDirection, PlanEdit, PlanEditIssue, PlanEditResult, PlanEditsAnswer, PlanEntrancesInput, PlanFilm, PlanWireContext, PlanWireParts, PlanWordContext, PlanWordIssue, PreflightRefusal, PublishRefusal, RecipeListBinds, RelativeDataSourcePlan, ScrimChoice, SectionEntrances, SectionFallback, SectionInput, SectionJudge, SectionOptions, SectionSwap, SerializedBinding, SerializedNode, SerializedResponsive, ShapeEntry, ShapeIssueCodes, ShowcaseInput, SiteAudit, SiteAuditOptions, SiteAuditSnapshot, SiteBuildRun, SiteBusiness, SiteCheck, SiteFinding, SiteNeedId, SitePageRef, SitePattern, SitePlan, SitePlanIssue, SitePlanSource, SitePlanValidation, SiteTemplate, StockCredit, StockItemSlot, StockLink, StockNeed, StockPhoto, StockPhotoTraits, StockPlacement, StockPlanOptions, StockProviderTerms, StockReview, StockSlot, StockTarget, StrictSchemaComplexity, StrictSchemaRefusal, TemplatePlanInput, UndoKept, UndoPreview, UndoRecord, WireOptions, WordsArea, WrittenText };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.90.1",
3
+ "version": "5.90.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -3397,6 +3397,33 @@ export const SPEC_SCHEMES = {
3397
3397
  "warning": "{{accent-ink}}",
3398
3398
  "warning-bg": "{{accent-hover}}"
3399
3399
  }
3400
+ },
3401
+ "muted": {
3402
+ "label": "Muted",
3403
+ "set": {
3404
+ "section-bg": "{{text-muted}}",
3405
+ "bg": "{{text-muted}}",
3406
+ "nav-bg": "{{text-muted}}",
3407
+ "surface": "{{text-muted}}",
3408
+ "surface-2": "{{text-muted}}",
3409
+ "surface-glass": "{{text-muted}}",
3410
+ "surface-glass-strong": "{{text-muted}}",
3411
+ "text": "{{bg}}",
3412
+ "text-muted": "{{bg}}",
3413
+ "line": "color-mix(in srgb, {{bg}} 28%, transparent)",
3414
+ "line-strong": "{{bg}}",
3415
+ "glass-border": "color-mix(in srgb, {{bg}} 28%, transparent)",
3416
+ "accent": "{{bg}}",
3417
+ "accent-ink": "{{text-muted}}",
3418
+ "accent-text": "{{bg}}",
3419
+ "accent-hover": "{{bg}}",
3420
+ "danger": "{{bg}}",
3421
+ "danger-bg": "{{text-muted}}",
3422
+ "success": "{{bg}}",
3423
+ "success-bg": "{{text-muted}}",
3424
+ "warning": "{{bg}}",
3425
+ "warning-bg": "{{text-muted}}"
3426
+ }
3400
3427
  }
3401
3428
  } as const;
3402
3429
 
@@ -3708,6 +3735,7 @@ export const SPEC_ELEMENT_STYLES = [
3708
3735
  "Link"
3709
3736
  ],
3710
3737
  "base": {
3738
+ "fontFamily": "var(--iox-font-body)",
3711
3739
  "color": "var(--iox-link-color)",
3712
3740
  "textDecoration": "var(--iox-link-decoration)",
3713
3741
  "transitionDuration": "var(--iox-dur-fast)",
@@ -23,6 +23,8 @@ export enum ColorScheme {
23
23
  Subtle = 'subtle',
24
24
  Inverse = 'inverse',
25
25
  Accent = 'accent',
26
+ /** A band painted the page's muted ink (iox-ui#70). */
27
+ Muted = 'muted',
26
28
  }
27
29
 
28
30
  /** The content trait (stored in `props`, not a style prop) that picks a node's scheme. */
@@ -31,7 +33,7 @@ export const COLOR_SCHEME_TRAIT = 'colorScheme';
31
33
  /** The node types that offer a scheme (spec §3c: Section/Container; LinkedContainer is a Container that links). */
32
34
  export const COLOR_SCHEME_TYPES: ReadonlyArray<string> = ['Section', 'Container', 'LinkedContainer'];
33
35
 
34
- /** Every scheme in contract order, with the contract's label (Default · Subtle · Inverse · Brand). */
36
+ /** Every scheme in contract order, with the contract's label (Default · Subtle · Inverse · Brand · Muted). */
35
37
  export const COLOR_SCHEMES: ReadonlyArray<{ readonly id: ColorScheme; readonly label: string }> =
36
38
  (Object.keys(SPEC_SCHEMES) as ColorScheme[]).map(id => ({ id, label: (SPEC_SCHEMES as Record<string, { label: string }>)[id].label }));
37
39
 
@@ -589,11 +589,22 @@ function buttonLayer(id: string, l: LayoutLayer, ctx: Ctx): SerializedNode {
589
589
  * scheme re-declares those tokens for that band; on the page's own ground (or the soft one) they wear none. */
590
590
  const BAND_SCHEME_ON: Readonly<Partial<Record<LayoutColour, ColorScheme>>> = {
591
591
  [LayoutColour.Ink]: ColorScheme.Inverse,
592
- [LayoutColour.Muted]: ColorScheme.Inverse,
592
+ [LayoutColour.Muted]: ColorScheme.Muted,
593
593
  [LayoutColour.Accent]: ColorScheme.Accent,
594
594
  };
595
595
 
596
- /** The scheme a form or a gallery on this section ground wears, or null on the page's own ground. */
596
+ /** A wrapper that adds no box (`display: contents` — its children keep their place in the grid) and re-declares the band's
597
+ * tokens for them: a ready-made section's content, a button on a band. */
598
+ function bandColours(id: string, scheme: ColorScheme, children: SerializedNode[]): SerializedNode {
599
+ const band = create(id, T.Container, {}, NO_ELEMENT_STYLE);
600
+ band.label = 'band colours';
601
+ setStyleProps(band, { display: 'contents' });
602
+ setColorScheme(band, scheme);
603
+ band.children = children;
604
+ return band;
605
+ }
606
+
607
+ /** The scheme a form, a gallery, a button or a ready-made section's content on this section ground wears, or null on the page's own ground. */
597
608
  export function layoutBandScheme(ground: string | undefined): ColorScheme | null {
598
609
  return BAND_SCHEME_ON[(ground ?? LayoutColour.Ground) as LayoutColour] ?? null;
599
610
  }
@@ -705,7 +716,10 @@ function composeLayer(l: LayoutLayer, lc: LayerCtx, ctx: Ctx): SerializedNode {
705
716
  gap(ctx, LayoutGapCode.DepthSpeed, lc.path, `${depth} glides at the product's one speed`);
706
717
  }
707
718
  if (interactions.length) outer.interactions = [...outer.interactions, ...interactions];
708
- return outer;
719
+ // A button draws its ink from the page's button tokens: on a band they must be the band's, or a text button on the ink
720
+ // (or the muted) band is the ground's own colour — the bar's "See the whole menu" (M8 gate 2, iox-ui#70).
721
+ const scheme = l.kind === LayoutLayerKind.Button ? layoutBandScheme(lc.section.ground) : null;
722
+ return scheme ? bandColours(`${outer.id}-band`, scheme, [outer]) : outer;
709
723
  }
710
724
 
711
725
  // ── Sections ────────────────────────────────────────────────────────────────────────────────────────────
@@ -835,7 +849,7 @@ function composeHeader(ctx: Ctx): SerializedNode | null {
835
849
  gap(ctx, LayoutGapCode.SectionLink, 'nav', 'section links scroll by an action, with no #address');
836
850
  const pages = [{ name: ctx.site.name, route: NAV_ROUTE, isHome: true }, ...links.map(link => ({ name: link.label, route: `/${link.to}` }))];
837
851
  let n = 0;
838
- const { header } = composeNavHeader({ business: { name: ctx.site.name } as never, pages }, { id: `${ctx.p}-nav`, newId: suffix => `${ctx.p}-nav-${++n}-${suffix}` });
852
+ const { header } = composeNavHeader({ business: { name: ctx.site.name } as never, pages, locale: ctx.site.locale }, { id: `${ctx.p}-nav`, newId: suffix => `${ctx.p}-nav-${++n}-${suffix}` });
839
853
  if (ctx.rtl) setStyleProps(header, { textDirection: 'rtl' });
840
854
  let drawer: string | undefined;
841
855
  walkSerialized([header], node => { if (node.role === 'nav.drawer') drawer = node.id; });
@@ -864,6 +878,68 @@ function wireLinks(ctx: Ctx): void {
864
878
  }
865
879
  }
866
880
 
881
+ // ── A ready-made section among composed ones (vectoriox/iox-ui#69) ───────────────────────────────────────
882
+
883
+ /** The pattern's own section padding: its ground's rhythm above and below, the pattern's gutter at the sides. */
884
+ const PATTERN_SECTION_PAD = 'var(--iox-section-pad)';
885
+ const PATTERN_SECTION_SPACE = 'var(--iox-space-section)';
886
+ /** The furthest in a ready-made section's words start: the column grid keeps at least eight columns for them. */
887
+ const READY_MADE_MAX_COLUMN = 3;
888
+
889
+ /** The ground a section paints, by name (a photo ground reads as the ink: its words are light). */
890
+ function groundOf(s: LayoutSection): string {
891
+ const ground = String(s.ground ?? LayoutColour.Ground);
892
+ return ground.startsWith('photo:') ? LayoutColour.Ink : ground;
893
+ }
894
+
895
+ /** The composed section a ready-made place stands beside: the one it follows, or for an opening the one after it; null
896
+ * when the page has no composed section. */
897
+ function readyMadeNeighbour(sections: ReadonlyArray<LayoutSection>, si: number): LayoutSection | null {
898
+ for (let i = si - 1; i >= 0; i--) if (!sections[i].readyMade) return sections[i];
899
+ for (let i = si + 1; i < sections.length; i++) if (!sections[i].readyMade) return sections[i];
900
+ return null;
901
+ }
902
+
903
+ /** The column a ready-made section's words start on: where its neighbour's words start (their first column), so the two
904
+ * share an edge; at most READY_MADE_MAX_COLUMN; 1 (the gutter) when the neighbour has no words. */
905
+ export function readyMadeColumn(neighbour: LayoutSection | null): number {
906
+ const starts = (neighbour?.layers ?? []).filter(l => LAYOUT_TEXT_KINDS.has(l.kind) && Array.isArray(l.col)).map(l => l.col[0]);
907
+ return Math.min(READY_MADE_MAX_COLUMN, Math.max(1, starts.length ? Math.min(...starts) : 1));
908
+ }
909
+
910
+ /** Where column `n` starts from the page's edge, on the composed sections' own grid (`gridLayout`): the gutter, then
911
+ * n - 1 columns and their gaps. */
912
+ function columnInset(n: number): string {
913
+ if (n <= 1) return LAYOUT_GUTTER;
914
+ const column = `((100% - 2 * ${LAYOUT_GUTTER} - ${GRID_COLUMNS - 1} * ${LAYOUT_COLUMN_GAP}) / ${GRID_COLUMNS} + ${LAYOUT_COLUMN_GAP})`;
915
+ return `calc(${LAYOUT_GUTTER} + ${n - 1} * ${column})`;
916
+ }
917
+
918
+ /** A pattern that paints its own ground — a Scene, or a picture behind its words — keeps its colours. */
919
+ function paintsItsOwnGround(root: SerializedNode): boolean {
920
+ return root.role === SceneRole.Scene || (root.children ?? []).some(c => c.styleProps?.['position'] === 'absolute');
921
+ }
922
+
923
+ /**
924
+ * iox-ui#69: a ready-made section reads as the same hand as the composed sections around it. It paints the ground it
925
+ * follows with the composed sections' own paint (the page's tokens on the section), its content wears that band's
926
+ * colour scheme in a wrapper that adds no box (`display: contents` — the pattern's layout is untouched, its tokens
927
+ * re-resolve), and its words start on the layout's column instead of the pattern's gutter; on a phone, the composed
928
+ * sections' gutter. A pattern that paints its own ground keeps its colours.
929
+ */
930
+ function dressReadyMade(root: SerializedNode, ground: string | null, column: number): void {
931
+ if (root.styleProps?.['padding'] === PATTERN_SECTION_PAD) {
932
+ setStyleProps(root, { padding: `${PATTERN_SECTION_SPACE} ${columnInset(column)}` });
933
+ phone(root, { padding: `${PATTERN_SECTION_SPACE} ${LAYOUT_GUTTER}` });
934
+ }
935
+ if (ground === null || paintsItsOwnGround(root)) return;
936
+ setColorScheme(root, ColorScheme.Default);
937
+ setStyleProps(root, { backgroundColor: groundPaint(ground) });
938
+ const scheme = layoutBandScheme(ground);
939
+ if (!scheme || !root.children?.length) return;
940
+ root.children = [bandColours(`${root.id}-band`, scheme, root.children)];
941
+ }
942
+
867
943
  /**
868
944
  * A layout-language page → its layout and header. Deterministic: the same layout composes to byte-identical nodes.
869
945
  * Refuses (ComposeError) a link to a section the layout does not have; everything the product cannot say comes back in
@@ -894,13 +970,15 @@ export function composeLayout(site: LayoutSite, options: ComposeLayoutOptions):
894
970
  if (s.readyMade) {
895
971
  if (!options.readyMade) throw new ComposeError(`sections[${si}]: a ready-made place needs its plan section stamped (options.readyMade)`);
896
972
  const node = options.readyMade(s, `${ctx.p}-s${si}`);
973
+ const neighbour = readyMadeNeighbour(site.sections, si);
974
+ const ground = neighbour ? groundOf(neighbour) : null;
975
+ dressReadyMade(node, ground, readyMadeColumn(neighbour));
897
976
  ctx.sections[s.id] = node.id;
898
- prev = LayoutColour.Ground;
977
+ prev = paintsItsOwnGround(node) || ground === null ? LayoutColour.Ground : ground;
899
978
  return node;
900
979
  }
901
980
  const node = composeSection(s, si, prev, ctx);
902
- const ground = String(s.ground ?? LayoutColour.Ground);
903
- prev = ground.startsWith('photo:') ? LayoutColour.Ink : ground;
981
+ prev = groundOf(s);
904
982
  return node;
905
983
  });
906
984
  const header = composeHeader(ctx);
@@ -335,6 +335,11 @@ interface TextChoice {
335
335
  placeholder?: { kind: PlaceholderKind; fact?: FactKey };
336
336
  }
337
337
 
338
+ /** A pattern node's own words in the site's language: its Hebrew on a Hebrew site when the contract gives one. */
339
+ function ownWords(pn: PatternNode, locale: string | undefined): string {
340
+ return locale === SiteLocale.He && pn.textHe ? pn.textHe : pn.text!;
341
+ }
342
+
338
343
  /** Where a node's words come from: the plan's slot → the business → the customer's fact → the pattern's
339
344
  * own text. A missing fact shows its label and is a placeholder; nothing is ever made up. */
340
345
  function chooseText(pn: PatternNode, ctx: Ctx): TextChoice {
@@ -349,7 +354,7 @@ function chooseText(pn: PatternNode, ctx: Ctx): TextChoice {
349
354
  const given = ctx.plan.business.facts?.[fact];
350
355
  return nonEmpty(given) ? { value: given } : { value: SITE_FACT_LABELS[fact], placeholder: { kind: PlaceholderKind.Fact, fact } };
351
356
  }
352
- const own = pn.text === undefined ? undefined : fillVariables(pn.text, ctx);
357
+ const own = pn.text === undefined ? undefined : fillVariables(ownWords(pn, ctx.plan.locale), ctx);
353
358
  if (pn.ph === PatternPlaceholder.Copy) return { value: own, placeholder: { kind: PlaceholderKind.Copy } };
354
359
  if (pn.ph === PatternPlaceholder.Price) return { value: own, placeholder: { kind: PlaceholderKind.Price } };
355
360
  if (pn.ph === PatternPlaceholder.Stat) return { value: own, placeholder: { kind: PlaceholderKind.Stat } };
@@ -1381,6 +1386,8 @@ export interface NavHeaderInput {
1381
1386
  readonly business: SiteBusiness;
1382
1387
  /** Every page of the studio, in the order the navigation should list them. */
1383
1388
  readonly pages: ReadonlyArray<SitePageRef>;
1389
+ /** The site's language (`SiteLocale`): the header's own words (its call to action) in it. English when not given. */
1390
+ readonly locale?: string;
1384
1391
  }
1385
1392
 
1386
1393
  export interface NavHeaderOptions {
@@ -1428,7 +1435,7 @@ export function composeNavHeader(input: NavHeaderInput, options: NavHeaderOption
1428
1435
  const all = navPagePlans(input.pages);
1429
1436
  const navRoutes = new Set(siteNavPages(input.pages).map(p => p.route));
1430
1437
  const pages = all.map(p => ({ ...p, inNav: navRoutes.has(p.route) }));
1431
- const plan = { business: input.business, pages, dataSources: [], contentTypes: [] } as unknown as SitePlan;
1438
+ const plan = { business: input.business, pages, dataSources: [], contentTypes: [], locale: input.locale } as unknown as SitePlan;
1432
1439
  const email = nonEmpty(input.business.facts?.email) ? input.business.facts!.email!.trim() : null;
1433
1440
  const issues: ComposeIssue[] = [];
1434
1441
  const ctx: Ctx = {
@@ -101,15 +101,29 @@ const phraseOf = (text: string): { phrase: string; words: number } => {
101
101
  };
102
102
  /** The fewest words a text needs to count as said twice — a two-word label ("The room") may well appear twice. */
103
103
  const REPEAT_MIN_WORDS = 3;
104
+ /** The share of the shorter text's words the longer one holds for the two to be the same sentence said twice: one word
105
+ * changed is still a repeat (the café's quote, "…וחברים צריכים שולחן" and "…וחברים טובים צריכים שולחן"). */
106
+ const REPEAT_SHARED = 0.8;
107
+
108
+ /** Whether two texts say the same thing: one inside the other, or the shorter's words (function words aside) nearly all
109
+ * in the longer. */
110
+ function sameSaying(a: { phrase: string; text: string }, b: { phrase: string; text: string }): boolean {
111
+ if (a.phrase.includes(b.phrase) || b.phrase.includes(a.phrase)) return true;
112
+ const [short, long] = [new Set(wordsOf(a.text)), new Set(wordsOf(b.text))].sort((x, y) => x.size - y.size);
113
+ if (short.size < REPEAT_MIN_WORDS) return false;
114
+ return [...short].filter(w => long.has(w)).length / short.size >= REPEAT_SHARED;
115
+ }
104
116
 
105
117
  /**
106
118
  * Whether the plan section would say again what the sections the model kept already say (iox-ui#68): a title or a text of
107
- * its slots found inside a kept layer's words, or a kept layer's words found inside it — each of three words or more.
119
+ * its slots found inside a kept layer's words, or a kept layer's words found inside it, or the two the same sentence
120
+ * with a word changed — each of three words or more.
108
121
  */
109
122
  function repeatsKept(plan: PageSectionPlan, kept: ReadonlyArray<LayoutSection>): boolean {
110
- const said = kept.flatMap(s => (s.layers ?? []).flatMap(layerTexts)).map(phraseOf).filter(p => p.words >= REPEAT_MIN_WORDS);
111
- return Object.values(plan.slots ?? {}).map(phraseOf).filter(p => p.words >= REPEAT_MIN_WORDS)
112
- .some(slot => said.some(k => k.phrase.includes(slot.phrase) || slot.phrase.includes(k.phrase)));
123
+ const long = (text: string) => ({ ...phraseOf(text), text });
124
+ const said = kept.flatMap(s => (s.layers ?? []).flatMap(layerTexts)).map(long).filter(p => p.words >= REPEAT_MIN_WORDS);
125
+ return Object.values(plan.slots ?? {}).map(long).filter(p => p.words >= REPEAT_MIN_WORDS)
126
+ .some(slot => said.some(k => sameSaying(slot, k)));
113
127
  }
114
128
 
115
129
  /** How well a ready-made section stands for a model's section: the same list, the form, the words they share. */
@@ -47,6 +47,8 @@ export interface PatternNode {
47
47
  readonly slot?: string;
48
48
  readonly fromBusiness?: string;
49
49
  readonly text?: string;
50
+ /** The pattern's own words on a Hebrew site (the contract's COPY_HE); `text` everywhere else. */
51
+ readonly textHe?: string;
50
52
  readonly ph?: string;
51
53
  readonly bind?: string;
52
54
  readonly alt?: string;
@@ -600,7 +600,8 @@ export const SPEC_SITE_PATTERNS = {
600
600
  ]
601
601
  ]
602
602
  }
603
- ]
603
+ ],
604
+ "textHe": "צרו קשר"
604
605
  }
605
606
  ]
606
607
  }
@@ -751,7 +752,8 @@ export const SPEC_SITE_PATTERNS = {
751
752
  ]
752
753
  ]
753
754
  }
754
- ]
755
+ ],
756
+ "textHe": "צרו קשר"
755
757
  }
756
758
  ]
757
759
  }
@@ -1223,7 +1225,8 @@ export const SPEC_SITE_PATTERNS = {
1223
1225
  "slot": "cta",
1224
1226
  "max": 24,
1225
1227
  "text": "Get in touch",
1226
- "role": "nav.cta"
1228
+ "role": "nav.cta",
1229
+ "textHe": "צרו קשר"
1227
1230
  }
1228
1231
  ]
1229
1232
  }
@@ -1302,7 +1305,8 @@ export const SPEC_SITE_PATTERNS = {
1302
1305
  "slot": "cta",
1303
1306
  "max": 24,
1304
1307
  "text": "Get in touch",
1305
- "role": "nav.cta"
1308
+ "role": "nav.cta",
1309
+ "textHe": "צרו קשר"
1306
1310
  }
1307
1311
  ]
1308
1312
  }
@@ -1375,7 +1379,8 @@ export const SPEC_SITE_PATTERNS = {
1375
1379
  "level": "h4",
1376
1380
  "slot": "pagesLabel",
1377
1381
  "max": 40,
1378
- "text": "Pages"
1382
+ "text": "Pages",
1383
+ "textHe": "עמודים"
1379
1384
  },
1380
1385
  {
1381
1386
  "t": "Link",
@@ -1401,7 +1406,8 @@ export const SPEC_SITE_PATTERNS = {
1401
1406
  "level": "h4",
1402
1407
  "slot": "contactLabel",
1403
1408
  "max": 40,
1404
- "text": "Contact"
1409
+ "text": "Contact",
1410
+ "textHe": "יצירת קשר"
1405
1411
  },
1406
1412
  {
1407
1413
  "t": "Text",
@@ -1510,7 +1516,8 @@ export const SPEC_SITE_PATTERNS = {
1510
1516
  "level": "h4",
1511
1517
  "slot": "pagesLabel",
1512
1518
  "max": 40,
1513
- "text": "Pages"
1519
+ "text": "Pages",
1520
+ "textHe": "עמודים"
1514
1521
  },
1515
1522
  {
1516
1523
  "t": "Link",
@@ -1536,7 +1543,8 @@ export const SPEC_SITE_PATTERNS = {
1536
1543
  "level": "h4",
1537
1544
  "slot": "visitLabel",
1538
1545
  "max": 40,
1539
- "text": "Visit"
1546
+ "text": "Visit",
1547
+ "textHe": "ביקור"
1540
1548
  },
1541
1549
  {
1542
1550
  "t": "Text",
@@ -1565,7 +1573,8 @@ export const SPEC_SITE_PATTERNS = {
1565
1573
  "level": "h4",
1566
1574
  "slot": "contactLabel",
1567
1575
  "max": 40,
1568
- "text": "Contact"
1576
+ "text": "Contact",
1577
+ "textHe": "יצירת קשר"
1569
1578
  },
1570
1579
  {
1571
1580
  "t": "Text",
@@ -1746,7 +1755,8 @@ export const SPEC_SITE_PATTERNS = {
1746
1755
  "href": "/contact",
1747
1756
  "slot": "secondary",
1748
1757
  "max": 24,
1749
- "text": "Get in touch"
1758
+ "text": "Get in touch",
1759
+ "textHe": "צרו קשר"
1750
1760
  }
1751
1761
  ]
1752
1762
  }
@@ -1836,7 +1846,8 @@ export const SPEC_SITE_PATTERNS = {
1836
1846
  "href": "/contact",
1837
1847
  "slot": "primary",
1838
1848
  "max": 24,
1839
- "text": "Get in touch"
1849
+ "text": "Get in touch",
1850
+ "textHe": "צרו קשר"
1840
1851
  },
1841
1852
  {
1842
1853
  "t": "ButtonBlock",
@@ -2770,7 +2781,8 @@ export const SPEC_SITE_PATTERNS = {
2770
2781
  "href": "/contact",
2771
2782
  "slot": "action",
2772
2783
  "max": 24,
2773
- "text": "Get in touch"
2784
+ "text": "Get in touch",
2785
+ "textHe": "צרו קשר"
2774
2786
  }
2775
2787
  ]
2776
2788
  }
@@ -3516,7 +3528,8 @@ export const SPEC_SITE_PATTERNS = {
3516
3528
  "slot": "title",
3517
3529
  "max": 44,
3518
3530
  "text": "Get in touch",
3519
- "enter": "heading"
3531
+ "enter": "heading",
3532
+ "textHe": "צרו קשר"
3520
3533
  },
3521
3534
  {
3522
3535
  "t": "Text",
@@ -4537,7 +4550,8 @@ export const SPEC_SITE_PATTERNS = {
4537
4550
  "href": "/contact",
4538
4551
  "slot": "cta",
4539
4552
  "max": 24,
4540
- "text": "Get in touch"
4553
+ "text": "Get in touch",
4554
+ "textHe": "צרו קשר"
4541
4555
  }
4542
4556
  ]
4543
4557
  }