@vectoriox/iox-ui 5.90.0 → 5.90.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.
@@ -28,6 +28,7 @@ declare const SPEC_SITE_PLAN_SHAPE: {
28
28
  readonly layoutPage: {
29
29
  readonly dial: "'distinct' | 'daring' — how far the page breaks the usual layout (site.layout.vocab.dials; follows How animated, never the model's)";
30
30
  readonly sections: "layoutSection[] — the page in the layout language (site.layout): 4–8 sections of layers on a 12-column grid, checked by generation-core checkLayout, stamped by composeLayout";
31
+ readonly "givenAway?": "{ at, section }[] — the model's sections silent section fallback gave away (replaced by a ready-made section or dropped), at their places in the model's page; the page's minimums forgive what they carried (iox-ui#67). Set by the server, never by a model";
31
32
  };
32
33
  readonly film: {
33
34
  readonly sequence: "object — a media-core FrameSequence: where the numbered pictures live, how many, their size";
@@ -5578,6 +5579,15 @@ declare enum LayoutDial {
5578
5579
  interface LayoutPage {
5579
5580
  dial: `${LayoutDial}`;
5580
5581
  sections: LayoutSection[];
5582
+ /** Silent section fallback (iox-ui#67): the model's sections given away — replaced by a ready-made one or dropped — each
5583
+ * at its place in the model's page. The page's MINIMUMS forgive what these carried; set only by `fallBackBySection`. */
5584
+ givenAway?: LayoutGivenAway[];
5585
+ }
5586
+ /** One of the model's sections that silent section fallback gave away, kept with the page it left. */
5587
+ interface LayoutGivenAway {
5588
+ /** Its place in the model's page. */
5589
+ at: number;
5590
+ section: LayoutSection;
5581
5591
  }
5582
5592
  /** Where a layout's photo comes from (M8-G2-D10): `own:<assetId>` · `stock:<libraryKey>` · `box:<shape>`. */
5583
5593
  declare enum LayoutPhotoSource {
@@ -8782,8 +8792,8 @@ interface ComposedLayout {
8782
8792
  * colour the ground's words take; otherwise null (M8 gate 2, fix first part 3).
8783
8793
  */
8784
8794
  declare function phoneWordsColour(l: LayoutLayer, li: number, s: Pick<LayoutSection, 'layers' | 'ground'>): string | null;
8785
- /** The scheme a form on this section ground wears, or null on the page's own ground. */
8786
- declare function layoutFormScheme(ground: string | undefined): ColorScheme | null;
8795
+ /** The scheme a form or a gallery on this section ground wears, or null on the page's own ground. */
8796
+ declare function layoutBandScheme(ground: string | undefined): ColorScheme | null;
8787
8797
  /**
8788
8798
  * A layout-language page → its layout and header. Deterministic: the same layout composes to byte-identical nodes.
8789
8799
  * Refuses (ComposeError) a link to a section the layout does not have; everything the product cannot say comes back in
@@ -9073,9 +9083,12 @@ declare function screenWordMisfit(l: LayoutLayer, design: DesignChoices): {
9073
9083
  * A composed page that still fails after the mends and its one repair — or after the browser's check — no longer falls
9074
9084
  * back whole: each section an issue names is given to the plan's READY-MADE section for the same place (the pattern the
9075
9085
  * whole-page fallback would have stamped there, worn in the same look), or dropped where none fits and the page keeps its
9076
- * opening and its close. Then the page is judged again, once, exactly like any composed page. Only a page that still
9077
- * fails — an issue that names no section, a place with nothing to give it, a swap that breaks a section kept or a count
9078
- * of the page — falls back whole: the last resort, counted. A swap never leads to another swap. The owner sees a composed page; the swaps are recorded for us, the model's sections kept.
9086
+ * opening and its close. Then the page is judged again, once, exactly like any composed page — its MINIMUMS on the model's
9087
+ * own remaining sections (the given-away ones ride on `page.givenAway`; iox-ui#67, Doron 2026-11-09), its maximums on the
9088
+ * whole page. A ready-made section that would say again what a section the model kept already says (its title, its text —
9089
+ * iox-ui#68) is never given a place: a page that repeats a paragraph is worse than the last resort. Only a page that still
9090
+ * fails — an issue that names no section, a place with nothing to give it, a swap that
9091
+ * breaks a section kept or a maximum of the page — falls back whole: the last resort, counted. A swap never leads to another swap. The owner sees a composed page; the swaps are recorded for us, the model's sections kept.
9079
9092
  * Pure: the service and `ai:replay` run this one function.
9080
9093
  */
9081
9094
  /** What became of one place of the model's page. */
@@ -9093,7 +9106,7 @@ declare enum SectionSwapRule {
9093
9106
  Close = "close",
9094
9107
  /** A middle section: the ready-made section that shows the same list, holds the form, or says most of its words. */
9095
9108
  Fit = "fit",
9096
- /** A middle section no ready-made section fits: dropped. */
9109
+ /** A middle section no ready-made section fits (or every one that does would repeat a kept section, iox-ui#68): dropped. */
9097
9110
  NoFit = "no-fit"
9098
9111
  }
9099
9112
  /** One place swapped, kept for us on the composed record — never shown to the owner. */
@@ -9118,7 +9131,8 @@ interface SectionSwap {
9118
9131
  declare enum SectionFallbackLastResort {
9119
9132
  /** Nothing left names a section (a count, a share, the order of sections), or after the swaps only such an issue is. */
9120
9133
  PageWide = "page-wide",
9121
- /** The place named is the opening or the close, and the plan has no ready-made section left for it. */
9134
+ /** The place named is the opening or the close, and the plan has no ready-made section left for it — or only one that
9135
+ * would repeat what a kept section says (iox-ui#68). */
9122
9136
  NoReadyMade = "no-ready-made",
9123
9137
  /** It names a section already given to a ready-made one. */
9124
9138
  ReadyMadeNamed = "ready-made-named",
@@ -9268,7 +9282,15 @@ declare const LAYOUT_CHECK_VIEWPORT: {
9268
9282
  declare function splitSide(s: LayoutSection): 'start' | 'end' | null;
9269
9283
  /** Every photo id a page names: photo layers, gallery slides, photo grounds. */
9270
9284
  declare function layoutPhotoIds(page: LayoutPage): string[];
9271
- /** Every rule a composed page keeps, each refused with a path. Empty means it passes. */
9285
+ /**
9286
+ * Every rule a composed page keeps, each refused with a path. Empty means it passes.
9287
+ *
9288
+ * A page silent section fallback gave sections away (`page.givenAway`, iox-ui#67 — Doron, 2026-11-09): its MINIMUMS — the
9289
+ * one signature and the inhale before it, the glide floor, galleries, the daring minimums, the number of sections — are
9290
+ * judged on the model's own remaining sections, so what a removed section carried no longer fails the page. Its
9291
+ * MAXIMUMS are judged on the whole page, ready-made places included (a ready-made section that enters counts toward the
9292
+ * entrances), and reading, contrast and sameness are untouched.
9293
+ */
9272
9294
  declare function checkLayout(page: LayoutPage, ctx: CheckLayoutContext): LayoutIssue[];
9273
9295
  /**
9274
9296
  * M8-G2-D12 — what a look switch costs a composed page: the issues the check finds in the new look (`ctx`) at a place
@@ -9395,5 +9417,5 @@ declare function applyLayoutEdits(page: LayoutPage, edits: ReadonlyArray<LayoutE
9395
9417
  /** The strict format a repair is asked in: `{ edits: [{ op, path, value }] }`, every key required. */
9396
9418
  declare function layoutRepairJsonSchema(): JsonSchema;
9397
9419
 
9398
- 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, layoutColumnsVw, layoutDesignOf, layoutDialOf, layoutElementStyle, layoutFormScheme, 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 };
9399
- 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, 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 };
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 };
9421
+ 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.0",
3
+ "version": "5.90.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -3,13 +3,14 @@ import { ParallaxDepth } from '@vectoriox/iox-ui/scene-core';
3
3
 
4
4
  import {
5
5
  LAYOUT_HIDDEN_OPACITY, LAYOUT_OPERATED, LAYOUT_TEXT_KINDS, LayoutBandMove, LayoutColour, LayoutDepth, LayoutDial, LayoutEnter, LayoutGalleryList, LayoutIssue, LayoutIssueCode, LayoutLayer, LayoutLayerKind, LayoutMend, LayoutMendKind,
6
- LayoutPage, LayoutPhotoSource,
6
+ LayoutGivenAway, LayoutPage, LayoutPhotoSource,
7
7
  LayoutRole, LayoutSection, LayoutSectionKind, LayoutSourceChoice, LayoutTrackProp, parseLayoutPhotoId,
8
8
  } from './layout-language';
9
9
  import { DriftBox, driftOverlap, layoutGlideDepth } from './layout-drift';
10
10
  import { layoutLookOf } from './layout-look';
11
11
  import { patternById } from './patterns';
12
12
  import { layoutDesignOf, screenWordMisfit } from './layout-type';
13
+ import { sectionEntrances } from './entrances';
13
14
  import { calmParts, calmUnder, FrameRegion, PhotoInventory, PHOTO_LIGHT_LUMINANCE } from './photo-inventory';
14
15
  import { SerializedNode, walkSerialized } from './serialized-node';
15
16
  import { SPEC_SITE_FACTS, SPEC_SITE_LAYOUT } from './site-spec.generated';
@@ -143,6 +144,8 @@ const FACT_TOKEN = /\{fact:([^}]*)\}/g;
143
144
  const PHOTO_GROUND = 'photo:';
144
145
  /** An accent ground counts as this many accent uses (a band of colour weighs more than a word). */
145
146
  const ACCENT_GROUND_USES = 2;
147
+ /** The entrance type that only fades (`entrances` levels): it does not count as a section entering. */
148
+ const FADE_ENTRANCE = 'fadeIn';
146
149
 
147
150
  const inList = (list: ReadonlyArray<string>, v: unknown): boolean => typeof v === 'string' && list.includes(v);
148
151
  const wordsOf = (t: string | undefined) => String(t ?? '').trim().split(/\s+/).filter(Boolean).length;
@@ -241,15 +244,52 @@ function wordsOfLayer(l: LayoutLayer): string[] {
241
244
  ].filter(Boolean);
242
245
  }
243
246
 
244
- /** Every rule a composed page keeps, each refused with a path. Empty means it passes. */
247
+ /** What a page's own sections hold toward its minimums — counted by the check's one walk. */
248
+ interface LayoutTally {
249
+ signatures: number;
250
+ galleries: number;
251
+ swappable: number;
252
+ layered: number;
253
+ bleeds: number;
254
+ screenWords: number;
255
+ wordsOnPhoto: number;
256
+ holds: number;
257
+ }
258
+
259
+ const NOTHING_CARRIED: LayoutTally = { signatures: 0, galleries: 0, swappable: 0, layered: 0, bleeds: 0, screenWords: 0, wordsOnPhoto: 0, holds: 0 };
260
+
261
+ /** The model's page in its own order: the sections as they stand, the dropped ones back at their places. */
262
+ function originalOrder(sections: ReadonlyArray<LayoutSection>, given: ReadonlyArray<LayoutGivenAway>): LayoutSection[] {
263
+ const kept = new Set(sections.map(s => s.id));
264
+ const dropped = given.filter(g => !kept.has(g.section.id)).sort((a, b) => a.at - b.at);
265
+ const order = [...sections];
266
+ for (const g of dropped) order.splice(Math.min(g.at, order.length), 0, g.section);
267
+ return order;
268
+ }
269
+
270
+ /**
271
+ * Every rule a composed page keeps, each refused with a path. Empty means it passes.
272
+ *
273
+ * A page silent section fallback gave sections away (`page.givenAway`, iox-ui#67 — Doron, 2026-11-09): its MINIMUMS — the
274
+ * one signature and the inhale before it, the glide floor, galleries, the daring minimums, the number of sections — are
275
+ * judged on the model's own remaining sections, so what a removed section carried no longer fails the page. Its
276
+ * MAXIMUMS are judged on the whole page, ready-made places included (a ready-made section that enters counts toward the
277
+ * entrances), and reading, contrast and sameness are untouched.
278
+ */
245
279
  export function checkLayout(page: LayoutPage, ctx: CheckLayoutContext): LayoutIssue[] {
280
+ const given = Array.isArray(page?.givenAway) ? page.givenAway : [];
281
+ const carried = given.length ? examineLayout({ dial: page.dial, sections: given.map(g => g.section) }, ctx, NOTHING_CARRIED, []).tally : NOTHING_CARRIED;
282
+ return examineLayout(page, ctx, carried, given).issues;
283
+ }
284
+
285
+ function examineLayout(page: LayoutPage, ctx: CheckLayoutContext, carried: LayoutTally, given: ReadonlyArray<LayoutGivenAway>): { issues: LayoutIssue[]; tally: LayoutTally } {
246
286
  const issues: LayoutIssue[] = [];
247
287
  const add = (code: LayoutIssueCode, path: string, message: string, mend?: LayoutMend): void => {
248
288
  issues.push({ code, path, message, ...(mend ? { mend } : {}) });
249
289
  };
250
290
  if (!page || !Array.isArray(page.sections)) {
251
291
  add(LayoutIssueCode.Shape, 'sections', 'the page has no sections');
252
- return issues;
292
+ return { issues, tally: NOTHING_CARRIED };
253
293
  }
254
294
  const look: LookNotes | null = L.presetLook[ctx.presetId as keyof typeof L.presetLook] ? layoutLookOf(ctx.presetId) : null;
255
295
  const paint = presetPaint(ctx.presetId, ctx.mode);
@@ -276,13 +316,17 @@ export function checkLayout(page: LayoutPage, ctx: CheckLayoutContext): LayoutIs
276
316
  // ── the sections ──
277
317
  const sections = page.sections;
278
318
  const [minSections, maxSections] = LIM.sections;
279
- if (sections.length < minSections || sections.length > maxSections) add(LayoutIssueCode.Structure, 'sections', `${sections.length} sections — ${minSections} to ${maxSections}`);
319
+ const dropped = given.filter(g => !sections.some(s => s.id === g.section.id)).length;
320
+ if (sections.length + dropped < minSections || sections.length > maxSections) add(LayoutIssueCode.Structure, 'sections', `${sections.length} sections — ${minSections} to ${maxSections}`);
280
321
  const ids = new Set(sections.map(s => s.id));
281
322
  if (ids.size !== sections.length) add(LayoutIssueCode.Structure, 'sections', 'every section id is different');
282
323
  const signatures = sections.map((s, i) => (s.signature ? i : -1)).filter(i => i >= 0);
283
- if (signatures.length !== 1) add(LayoutIssueCode.Structure, 'sections', `${signatures.length} signature sections — exactly one`);
324
+ if (signatures.length > 1 || (!signatures.length && !carried.signatures)) add(LayoutIssueCode.Structure, 'sections', `${signatures.length} signature sections — exactly one`);
284
325
  if (daring && signatures.length === 1 && sections[signatures[0] - 1]?.kind !== LayoutSectionKind.Inhale) {
285
- add(LayoutIssueCode.Daring, `sections[${signatures[0]}]`, 'on daring the section right before the signature is an inhale');
326
+ const order = originalOrder(sections, given);
327
+ const before = order[order.indexOf(sections[signatures[0]]) - 1];
328
+ const givenInhale = !!before && given.some(g => g.section.id === before.id && g.section.kind === LayoutSectionKind.Inhale);
329
+ if (!givenInhale) add(LayoutIssueCode.Daring, `sections[${signatures[0]}]`, 'on daring the section right before the signature is an inhale');
286
330
  }
287
331
  const formSections = new Set(sections.filter(s => s.layers?.some(l => l.kind === LayoutLayerKind.Form)).map(s => s.id));
288
332
 
@@ -312,6 +356,7 @@ export function checkLayout(page: LayoutPage, ctx: CheckLayoutContext): LayoutIs
312
356
  // reach the business when its pattern is a call to act or a contact.
313
357
  const composedCount = sections.filter(s => !s.readyMade).length;
314
358
  if (sections.some(s => s.readyMade && READY_MADE_REACH.has(patternById(s.readyMade.pattern)?.family ?? ''))) reachable = true;
359
+ const readyMadeEntering = sections.filter(s => s.readyMade && readyMadeEnters(s.readyMade.pattern, ctx.design?.animate)).length;
315
360
  sections.forEach((s, i) => {
316
361
  if (s.readyMade) return;
317
362
  const at = `sections[${i}]`;
@@ -634,10 +679,10 @@ export function checkLayout(page: LayoutPage, ctx: CheckLayoutContext): LayoutIs
634
679
  }
635
680
  });
636
681
  if (ctx.first && !reachable) add(LayoutIssueCode.Content, 'sections', 'nothing lets people reach the business — a form, or a button to one');
637
- if (galleries < LIM.galleriesMin) add(LayoutIssueCode.Structure, 'sections', `${galleries} galleries — at least ${LIM.galleriesMin}`);
638
- if (LIM.galleriesMin > 0 && galleries && !swappable) add(LayoutIssueCode.Structure, 'sections', 'no gallery can be dragged or swiped — at least one without "scroll"');
682
+ if (galleries < LIM.galleriesMin - carried.galleries) add(LayoutIssueCode.Structure, 'sections', `${galleries} galleries — at least ${LIM.galleriesMin}`);
683
+ if (LIM.galleriesMin > 0 && galleries && !swappable && !carried.swappable) add(LayoutIssueCode.Structure, 'sections', 'no gallery can be dragged or swiped — at least one without "scroll"');
639
684
  if (marquees > LIM.marquees) add(LayoutIssueCode.Structure, 'sections', `${marquees} marquees — at most ${LIM.marquees}`);
640
- const minDepth = look && inList(LIM.calmLooks, look.id) ? LIM.depthLayersCalm : LIM.depthLayers;
685
+ const minDepth = Math.max(0, (look && inList(LIM.calmLooks, look.id) ? LIM.depthLayersCalm : LIM.depthLayers) - carried.layered);
641
686
  if (layered < minDepth) {
642
687
  const glide = glideChoice(sections, minDepth - layered);
643
688
  add(LayoutIssueCode.Motion, 'sections', `${layered} layers glide by depth or drift — at least ${minDepth}`,
@@ -645,16 +690,17 @@ export function checkLayout(page: LayoutPage, ctx: CheckLayoutContext): LayoutIs
645
690
  }
646
691
  if (daring) {
647
692
  const d = LIM.daring;
648
- if (bleeds < d.bleeds) add(LayoutIssueCode.Daring, 'sections', `${bleeds} layer(s) bleed off an edge — a daring page lets at least ${d.bleeds} run off the screen`);
649
- if (screenWords < d.screenWords) add(LayoutIssueCode.Daring, 'sections', 'no word at "screen" size — a daring page lets one thing be enormous');
650
- if (wordsOnPhoto < d.wordsOnPhoto && !limits.noTextOnPhoto) add(LayoutIssueCode.Daring, 'sections', 'words never sit over a photo — a daring page sets words over a calm part of a picture at least once');
651
- if (holds < d.holds) add(LayoutIssueCode.Daring, 'sections', `${holds} section(s) hold the page — a daring page holds at least ${d.holds} (held 2+ screens, or sideways)`);
693
+ if (bleeds < d.bleeds - carried.bleeds) add(LayoutIssueCode.Daring, 'sections', `${bleeds} layer(s) bleed off an edge — a daring page lets at least ${d.bleeds} run off the screen`);
694
+ if (screenWords < d.screenWords - carried.screenWords) add(LayoutIssueCode.Daring, 'sections', 'no word at "screen" size — a daring page lets one thing be enormous');
695
+ if (wordsOnPhoto < d.wordsOnPhoto - carried.wordsOnPhoto && !limits.noTextOnPhoto) add(LayoutIssueCode.Daring, 'sections', 'words never sit over a photo — a daring page sets words over a calm part of a picture at least once');
696
+ if (holds < d.holds - carried.holds) add(LayoutIssueCode.Daring, 'sections', `${holds} section(s) hold the page — a daring page holds at least ${d.holds} (held 2+ screens, or sideways)`);
652
697
  } else if (pinned > LIM.distinct.holdsMax) {
653
698
  add(LayoutIssueCode.Structure, 'sections', `${pinned} held sections — a distinct page holds at most ${LIM.distinct.holdsMax}`);
654
699
  }
655
700
  if (photos.size + boxes > LIM.maxPhotos) add(LayoutIssueCode.Content, 'sections', `${photos.size + boxes} photos — at most ${LIM.maxPhotos}`);
656
- const enteringMax = Math.floor(composedCount * LIM.enteringSections) + 1;
657
- if (sectionsWithEnters > enteringMax) add(LayoutIssueCode.Motion, 'sections', `${sectionsWithEnters} sections have entrances — at most ${enteringMax}; let the others glide`);
701
+ const enteringMax = Math.floor(sections.length * LIM.enteringSections) + 1;
702
+ const entering = sectionsWithEnters + readyMadeEntering;
703
+ if (entering > enteringMax) add(LayoutIssueCode.Motion, 'sections', `${entering} sections have entrances — at most ${enteringMax}; let the others glide`);
658
704
  if (eyebrows > composedCount * EYEBROW_SHARE) add(LayoutIssueCode.Look, 'sections', `${eyebrows} headings carry a small label right above them — the AI-site cliché; keep it to a few`);
659
705
  if (look) {
660
706
  if (accentUses > look.accentMax) {
@@ -668,7 +714,15 @@ export function checkLayout(page: LayoutPage, ctx: CheckLayoutContext): LayoutIs
668
714
  }
669
715
  if (limits.lightGroundsMax !== undefined && lightGrounds > limits.lightGroundsMax) add(LayoutIssueCode.Look, 'sections', `${lightGrounds} sections on a light ground — the ${look.id} look allows ${limits.lightGroundsMax}`);
670
716
  }
671
- return uniqueIssues(issues);
717
+ return { issues: uniqueIssues(issues), tally: { signatures: signatures.length, galleries, swappable, layered, bleeds, screenWords, wordsOnPhoto, holds } };
718
+ }
719
+
720
+ /** A ready-made section enters when the look's entrance level moves something of its family (a fade alone is not an entrance). */
721
+ function readyMadeEnters(pattern: string, level: string | null | undefined): boolean {
722
+ const family = patternById(pattern)?.family;
723
+ if (!family) return false;
724
+ const plan = sectionEntrances(level, family);
725
+ return [plan.content, ...Object.values(plan.parts)].some(spec => !!spec && spec.type !== FADE_ENTRANCE);
672
726
  }
673
727
 
674
728
  /**
@@ -493,6 +493,8 @@ function galleryLayer(id: string, l: LayoutLayer, lc: LayerCtx, ctx: Ctx): Seria
493
493
  const frame = create(id, T.Container, {}, NO_ELEMENT_STYLE);
494
494
  setStyleProps(frame, { position: 'relative' });
495
495
  phone(frame, { height: 'auto' });
496
+ const scheme = layoutBandScheme(lc.section.ground);
497
+ if (scheme) setColorScheme(frame, scheme);
496
498
  const effect = g.effect ?? 'slide';
497
499
  const stacked = STACKED_EFFECTS.has(effect);
498
500
  const per = stacked ? 1 : g.perView === 'auto' ? 'auto' : Number(g.perView ?? 1);
@@ -581,25 +583,26 @@ function buttonLayer(id: string, l: LayoutLayer, ctx: Ctx): SerializedNode {
581
583
  return button;
582
584
  }
583
585
 
584
- /** The colour scheme a form wears on each band (iox-ui#58): its labels, fields and button are drawn by element styles that
585
- * read the page's tokens, so on a band painted with the ink (or the accent) they would vanish into it. The scheme
586
- * re-declares those tokens for that band; on the page's own ground (or the soft one) the form wears none. */
587
- const FORM_SCHEME_ON: Readonly<Partial<Record<LayoutColour, ColorScheme>>> = {
586
+ /** The colour scheme a form or a gallery wears on each band (iox-ui#58; the gallery's bar since M8 gate 2): its labels,
587
+ * fields, buttons, caption, count and arrows are drawn by element styles that read the page's tokens, so on a band
588
+ * painted with the ink (or the accent) they would vanish into it — a gallery's arrows were empty circles on the ink. The
589
+ * scheme re-declares those tokens for that band; on the page's own ground (or the soft one) they wear none. */
590
+ const BAND_SCHEME_ON: Readonly<Partial<Record<LayoutColour, ColorScheme>>> = {
588
591
  [LayoutColour.Ink]: ColorScheme.Inverse,
589
592
  [LayoutColour.Muted]: ColorScheme.Inverse,
590
593
  [LayoutColour.Accent]: ColorScheme.Accent,
591
594
  };
592
595
 
593
- /** The scheme a form on this section ground wears, or null on the page's own ground. */
594
- export function layoutFormScheme(ground: string | undefined): ColorScheme | null {
595
- return FORM_SCHEME_ON[(ground ?? LayoutColour.Ground) as LayoutColour] ?? null;
596
+ /** The scheme a form or a gallery on this section ground wears, or null on the page's own ground. */
597
+ export function layoutBandScheme(ground: string | undefined): ColorScheme | null {
598
+ return BAND_SCHEME_ON[(ground ?? LayoutColour.Ground) as LayoutColour] ?? null;
596
599
  }
597
600
 
598
601
  /** A form layer: its title and intro, and the product's preset form — the layout's options become the preset's choices. */
599
602
  function formLayer(id: string, l: LayoutLayer, lc: LayerCtx, ctx: Ctx, path: string): SerializedNode {
600
603
  const f: LayoutForm = l.form ?? { preset: 'contact' };
601
604
  const frame = create(id, T.Container, {}, NO_ELEMENT_STYLE);
602
- const scheme = layoutFormScheme(lc.section.ground);
605
+ const scheme = layoutBandScheme(lc.section.ground);
603
606
  if (scheme) setColorScheme(frame, scheme);
604
607
  setStyleProps(frame, { display: 'flex', flexDirection: 'column', gap: '12px', color: 'var(--iox-text)' });
605
608
  const parts: SerializedNode[] = [];
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The words that carry no subject in the languages a site is written in (English, Hebrew): "the", "with", "our", "כמו",
3
+ * "שלנו"… Shared by every comparison of meaning by words — a stock photo against a slot (`stockWords`), a model's section
4
+ * against a ready-made one (silent section fallback). Lower case; only words of three letters or more (shorter ones never
5
+ * count anywhere).
6
+ */
7
+ export const FUNCTION_WORDS: ReadonlySet<string> = new Set([
8
+ 'the', 'and', 'with', 'for', 'your', 'our', 'you', 'from', 'into', 'this', 'that', 'here', 'there', 'about', 'how', 'what',
9
+ 'who', 'are', 'all', 'but', 'not', 'was', 'were', 'has', 'have', 'had', 'its', 'they', 'them', 'their', 'then', 'than',
10
+ 'when', 'where', 'which', 'will', 'can', 'just', 'out', 'over', 'under', 'onto', 'each', 'every', 'some', 'any', 'one', 'also',
11
+ 'too', 'very', 'more', 'most', 'less', 'only', 'own', 'yours', 'ours', 'these', 'those',
12
+ 'אנחנו', 'אני', 'הוא', 'היא', 'אתם', 'אתן', 'שלנו', 'שלכם', 'שלך', 'שלו', 'שלה', 'אצלנו', 'כמו', 'אבל', 'זאת', 'כאן', 'יותר',
13
+ 'מאוד', 'כבר', 'עוד', 'אחרי', 'לפני', 'בין', 'כדי', 'איך',
14
+ ]);
@@ -270,6 +270,16 @@ export enum LayoutDial {
270
270
  export interface LayoutPage {
271
271
  dial: `${LayoutDial}`;
272
272
  sections: LayoutSection[];
273
+ /** Silent section fallback (iox-ui#67): the model's sections given away — replaced by a ready-made one or dropped — each
274
+ * at its place in the model's page. The page's MINIMUMS forgive what these carried; set only by `fallBackBySection`. */
275
+ givenAway?: LayoutGivenAway[];
276
+ }
277
+
278
+ /** One of the model's sections that silent section fallback gave away, kept with the page it left. */
279
+ export interface LayoutGivenAway {
280
+ /** Its place in the model's page. */
281
+ at: number;
282
+ section: LayoutSection;
273
283
  }
274
284
 
275
285
  /** Where a layout's photo comes from (M8-G2-D10): `own:<assetId>` · `stock:<libraryKey>` · `box:<shape>`. */
@@ -1,3 +1,4 @@
1
+ import { FUNCTION_WORDS } from './function-words';
1
2
  import { LayoutIssue, LayoutLayer, LayoutPage, LayoutSection } from './layout-language';
2
3
  import { PageSectionPlan } from './site-plan.model';
3
4
 
@@ -6,9 +7,12 @@ import { PageSectionPlan } from './site-plan.model';
6
7
  * A composed page that still fails after the mends and its one repair — or after the browser's check — no longer falls
7
8
  * back whole: each section an issue names is given to the plan's READY-MADE section for the same place (the pattern the
8
9
  * whole-page fallback would have stamped there, worn in the same look), or dropped where none fits and the page keeps its
9
- * opening and its close. Then the page is judged again, once, exactly like any composed page. Only a page that still
10
- * fails — an issue that names no section, a place with nothing to give it, a swap that breaks a section kept or a count
11
- * of the page — falls back whole: the last resort, counted. A swap never leads to another swap. The owner sees a composed page; the swaps are recorded for us, the model's sections kept.
10
+ * opening and its close. Then the page is judged again, once, exactly like any composed page — its MINIMUMS on the model's
11
+ * own remaining sections (the given-away ones ride on `page.givenAway`; iox-ui#67, Doron 2026-11-09), its maximums on the
12
+ * whole page. A ready-made section that would say again what a section the model kept already says (its title, its text —
13
+ * iox-ui#68) is never given a place: a page that repeats a paragraph is worse than the last resort. Only a page that still
14
+ * fails — an issue that names no section, a place with nothing to give it, a swap that
15
+ * breaks a section kept or a maximum of the page — falls back whole: the last resort, counted. A swap never leads to another swap. The owner sees a composed page; the swaps are recorded for us, the model's sections kept.
12
16
  * Pure: the service and `ai:replay` run this one function.
13
17
  */
14
18
 
@@ -28,7 +32,7 @@ export enum SectionSwapRule {
28
32
  Close = 'close',
29
33
  /** A middle section: the ready-made section that shows the same list, holds the form, or says most of its words. */
30
34
  Fit = 'fit',
31
- /** A middle section no ready-made section fits: dropped. */
35
+ /** A middle section no ready-made section fits (or every one that does would repeat a kept section, iox-ui#68): dropped. */
32
36
  NoFit = 'no-fit',
33
37
  }
34
38
 
@@ -52,7 +56,8 @@ export interface SectionSwap {
52
56
  export enum SectionFallbackLastResort {
53
57
  /** Nothing left names a section (a count, a share, the order of sections), or after the swaps only such an issue is. */
54
58
  PageWide = 'page-wide',
55
- /** The place named is the opening or the close, and the plan has no ready-made section left for it. */
59
+ /** The place named is the opening or the close, and the plan has no ready-made section left for it — or only one that
60
+ * would repeat what a kept section says (iox-ui#68). */
56
61
  NoReadyMade = 'no-ready-made',
57
62
  /** It names a section already given to a ready-made one. */
58
63
  ReadyMadeNamed = 'ready-made-named',
@@ -83,8 +88,29 @@ export function sectionsNamed(issue: Pick<LayoutIssue, 'path' | 'message'>): num
83
88
  }
84
89
 
85
90
  const WORD = /[\p{L}\p{N}]{3,}/gu;
86
- const wordsOf = (text: string): string[] => (String(text ?? '').toLowerCase().match(WORD) ?? []);
87
- const layerWords = (l: LayoutLayer): string[] => [l.text ?? '', ...(l.items ?? []), ...(l.gallery?.slides ?? []).map(s => s.caption ?? ''), l.form?.title ?? '', l.form?.intro ?? ''].flatMap(wordsOf);
91
+ /** The words that can make a fit: three letters or more, never a function word (iox-ui#68: "the" made one). */
92
+ const wordsOf = (text: string): string[] => (String(text ?? '').toLowerCase().match(WORD) ?? []).filter(w => !FUNCTION_WORDS.has(w));
93
+ const layerTexts = (l: LayoutLayer): string[] => [l.text ?? '', ...(l.items ?? []), ...(l.gallery?.slides ?? []).map(s => s.caption ?? ''), l.form?.title ?? '', l.form?.intro ?? ''];
94
+ const layerWords = (l: LayoutLayer): string[] => layerTexts(l).flatMap(wordsOf);
95
+
96
+ /** Every word of a text, in order, as a phrase that can be found inside another (` a small room kept slow `). */
97
+ const PHRASE_WORD = /[\p{L}\p{N}]+/gu;
98
+ const phraseOf = (text: string): { phrase: string; words: number } => {
99
+ const words = String(text ?? '').toLowerCase().match(PHRASE_WORD) ?? [];
100
+ return { phrase: ` ${words.join(' ')} `, words: words.length };
101
+ };
102
+ /** The fewest words a text needs to count as said twice — a two-word label ("The room") may well appear twice. */
103
+ const REPEAT_MIN_WORDS = 3;
104
+
105
+ /**
106
+ * 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.
108
+ */
109
+ 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)));
113
+ }
88
114
 
89
115
  /** How well a ready-made section stands for a model's section: the same list, the form, the words they share. */
90
116
  function fitScore(section: LayoutSection, plan: PageSectionPlan): number {
@@ -119,6 +145,8 @@ export function fallBackBySection(page: LayoutPage, plan: ReadonlyArray<PageSect
119
145
  if (!named.size) return last(SectionFallbackLastResort.PageWide, [...issues]);
120
146
  if ([...named.keys()].some(i => current.sections[i].readyMade)) return last(SectionFallbackLastResort.ReadyMadeNamed, [...issues]);
121
147
  const used = new Set(current.sections.map(s => s.readyMade?.at).filter((n): n is number => n !== undefined));
148
+ // The sections the model composed and keeps: a ready-made section must not say again what they say.
149
+ const keptSections = current.sections.filter((s, i) => !s.readyMade && !named.has(i));
122
150
  const lastAt = current.sections.length - 1;
123
151
  const next = [...current.sections];
124
152
  const drop = new Set<number>();
@@ -128,14 +156,14 @@ export function fallBackBySection(page: LayoutPage, plan: ReadonlyArray<PageSect
128
156
  swaps.push({ id: s.id, at: i, action, rule, ...(readyMade ? { readyMade } : {}), why, original: structuredClone(s) });
129
157
  if (i === 0 || i === lastAt) {
130
158
  const at = i === 0 ? 0 : plan.length - 1;
131
- if (!plan[at] || used.has(at)) return last(SectionFallbackLastResort.NoReadyMade, [...issues]);
159
+ if (!plan[at] || used.has(at) || repeatsKept(plan[at], keptSections)) return last(SectionFallbackLastResort.NoReadyMade, [...issues]);
132
160
  used.add(at);
133
161
  next[i] = readyMadeSection(s, at, plan[at]);
134
162
  record(SectionSwapAction.Replaced, i === 0 ? SectionSwapRule.Opening : SectionSwapRule.Close, { at, pattern: plan[at].pattern });
135
163
  continue;
136
164
  }
137
165
  const best = plan
138
- .map((p, at) => ({ at, score: at > 0 && at < plan.length - 1 && !used.has(at) ? fitScore(s, p) : -1 }))
166
+ .map((p, at) => ({ at, score: at > 0 && at < plan.length - 1 && !used.has(at) && !repeatsKept(p, keptSections) ? fitScore(s, p) : -1 }))
139
167
  .filter(c => c.score >= FIT_MIN)
140
168
  .sort((a, b) => b.score - a.score || a.at - b.at)[0];
141
169
  if (best) {
@@ -147,7 +175,10 @@ export function fallBackBySection(page: LayoutPage, plan: ReadonlyArray<PageSect
147
175
  record(SectionSwapAction.Dropped, SectionSwapRule.NoFit);
148
176
  }
149
177
  }
150
- const judged = judge({ ...current, sections: next.filter((_, i) => !drop.has(i)) });
178
+ // What the given-away sections carried toward the page's minimums goes with the page (checkLayout forgives exactly
179
+ // that, iox-ui#67); its maximums stay the whole page's.
180
+ const givenAway = [...(current.givenAway ?? []), ...swaps.map(w => ({ at: w.at, section: w.original }))];
181
+ const judged = judge({ ...current, sections: next.filter((_, i) => !drop.has(i)), givenAway });
151
182
  if (!judged.issues.length) return { page: judged.page, swaps, left: [] };
152
183
  const kept = judged.issues.flatMap(sectionsNamed).filter(i => !judged.page.sections[i]?.readyMade);
153
184
  const reason = kept.length ? SectionFallbackLastResort.Neighbour
@@ -25,7 +25,8 @@ export const SPEC_SITE_PLAN_SHAPE = {
25
25
  },
26
26
  "layoutPage": {
27
27
  "dial": "'distinct' | 'daring' — how far the page breaks the usual layout (site.layout.vocab.dials; follows How animated, never the model's)",
28
- "sections": "layoutSection[] — the page in the layout language (site.layout): 4–8 sections of layers on a 12-column grid, checked by generation-core checkLayout, stamped by composeLayout"
28
+ "sections": "layoutSection[] — the page in the layout language (site.layout): 4–8 sections of layers on a 12-column grid, checked by generation-core checkLayout, stamped by composeLayout",
29
+ "givenAway?": "{ at, section }[] — the model's sections silent section fallback gave away (replaced by a ready-made section or dropped), at their places in the model's page; the page's minimums forgive what they carried (iox-ui#67). Set by the server, never by a model"
29
30
  },
30
31
  "film": {
31
32
  "sequence": "object — a media-core FrameSequence: where the numbered pictures live, how many, their size"
@@ -5,6 +5,8 @@
5
5
  * its INTENT (what kind of picture its section wants), its aspect ratio and the plan's words around it.
6
6
  */
7
7
 
8
+ import { FUNCTION_WORDS } from './function-words';
9
+
8
10
  export enum StockOrientation {
9
11
  Horizontal = 'horizontal',
10
12
  Vertical = 'vertical',
@@ -95,9 +97,8 @@ export const STOCK_SUBJECT_WORDS: Readonly<Record<StockSubject, ReadonlyArray<st
95
97
 
96
98
  /** Words that say nothing about what a picture shows (the plan's sample and placeholder words among them). */
97
99
  const STOP_WORDS: ReadonlySet<string> = new Set([
98
- 'the', 'and', 'with', 'for', 'your', 'our', 'you', 'from', 'into', 'this', 'that', 'here', 'there', 'about', 'page', 'section',
99
- 'sample', 'replace', 'image', 'photo', 'picture', 'sentence', 'words', 'own', 'how', 'what', 'who', 'are', 'all', 'one', 'two',
100
- 'three', 'more', 'less', 'very', 'tell', 'story', 'item', 'service', 'project',
100
+ ...FUNCTION_WORDS, 'page', 'section', 'sample', 'replace', 'image', 'photo', 'picture', 'sentence', 'words', 'two', 'three',
101
+ 'tell', 'story', 'item', 'service', 'project',
101
102
  ]);
102
103
  const MIN_WORD = 3;
103
104
  const HTML_TAG = /<[^>]*>/g;