@vectoriox/iox-ui 5.86.3 → 5.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7677,6 +7677,30 @@ declare function picturePrompt(slot: PictureSlot, direction: ArtDirection, conte
7677
7677
  declare const PICTURE_REROLL_EVERY = 6;
7678
7678
  /** How many second tries a set of `count` pictures has, shown and paid for up front. */
7679
7679
  declare function pictureRerolls(count: number): number;
7680
+ /** Where a run stands when it is about to ask one picture (the try's own estimate is `each`: a picture and its review). */
7681
+ interface PictureTryBudget {
7682
+ /** The cost shown — the most the run may spend. */
7683
+ shown: number;
7684
+ /** One try's estimate: a picture and its review. */
7685
+ each: number;
7686
+ /** What the run has spent so far (every try, every review). */
7687
+ spent: number;
7688
+ /** This try is a slot's second (its review said no to the first). */
7689
+ secondTry: boolean;
7690
+ /** First tries still to come after this slot. */
7691
+ waiting: number;
7692
+ /** Second tries paid for up front (`pictureRerolls`). */
7693
+ rerolls: number;
7694
+ /** Second tries already made. */
7695
+ rerollsUsed: number;
7696
+ }
7697
+ /**
7698
+ * May this try be asked? A second try needs one of the second tries paid for up front to be left; and any try must
7699
+ * leave, within the cost shown, room for every first try still to come AND every second try still unused — so a
7700
+ * made picture never eats the second try the owner paid for (the estimate is above what a try is charged, so every
7701
+ * try counted in the cost shown fits).
7702
+ */
7703
+ declare function pictureTryFits(budget: PictureTryBudget): boolean;
7680
7704
  interface PicturesEstimate {
7681
7705
  count: number;
7682
7706
  /** Second tries included in the total. */
@@ -7770,5 +7794,5 @@ declare function applyPictureScrims(trees: ReadonlyArray<SerializedNode>, chosen
7770
7794
  /** The relative luminance of a CSS colour (for a review sheet or a log), or null. */
7771
7795
  declare function luminanceOf(colour: string): number | null;
7772
7796
 
7773
- export { 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, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, 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, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PublishRefusalCode, 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_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, 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, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, builtHomePageId, chooseScrim, composeNavHeader, composeSection, composeSite, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedDataSources, describePlanData, describeShapeKey, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, failedBuildStep, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, frameWords, isActiveBuild, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, luminanceOf, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, pageToWire, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneMenuPages, pictureAspect, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, publishRefusal, publishVerdict, recipeListBinds, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, sampleImageRef, scoreStockPhoto, sectionEntrances, sectionPatternIds, sectionToWire, setStyleProps, shapeKeys, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, siteNavPages, slotBudget, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, typicalStepTokens, validatePlanEdits, validateSitePlan, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, withDerivedSources, wordPattern, wordsOverPicture, writtenTexts };
7774
- export type { AddBarItemResult, AiEntitlementsView, AiMeter, AiModelEntry, AiRefusal, AiTokenCounts, AiTokenPrice, AreaLuminance, ArtDirection, AuditPage, AuditPlaceholder, BarItemsEditResult, BuildNotice, BuildStepError, BuildStepFacts, BuildStepRecord, CmsDataSourcePlan, ComposeContext, ComposeIssue, ComposedDataSource, ComposedItem, ComposedNavHeader, ComposedPage, ComposedPlaceholder, ComposedRoute, ComposedSection, ComposedSite, ContentFieldPlan, ContentRoles, ContentSeedPlan, ContentTypePlan, CreateNodeOptions, CreatedRecord, DataSourcePlan, DynamicKeysAsList, EntranceAction, EntranceActionOptions, EntranceInteraction, EntranceMark, EntranceSpec, EntranceStamp, FactKey, FilmPlacement, FilmTarget, JsonSchema, NavHeaderInput, NavHeaderOptions, NavPage, NavShapeOptions, NavShapeResult, NodeBaseline, OwnPhotoPlacement, PageArchetype, PageArchetypeId, PageArchetypeSlot, PageData, PageDataLine, PagePlan, PageSectionPlan, PageSeoPlan, PathIssue, PatternManifestEntry, PatternManifestOptions, PatternNode, PatternPath, PatternRoleNeed, PatternTrack, PicturePlan, PicturePlanOptions, PicturePromptContext, PictureReview, PictureSlot, PictureWorldSpec, PicturesEstimate, PlacedFilm, PlainObject, PlanChange, PlanEdit, PlanEditIssue, PlanEditResult, PlanEditsAnswer, PlanEntrancesInput, PlanFilm, PlanWireContext, PlanWireParts, PlanWordContext, PlanWordIssue, PreflightRefusal, PublishRefusal, RecipeListBinds, RelativeDataSourcePlan, ScrimChoice, SectionEntrances, SectionInput, SectionOptions, 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 };
7797
+ export { 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, MAX_SITE_PICTURES, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NO_TOKENS, NavPagesSource, NavRole, NavShape, NavShapeError, PAGE_ARCHETYPES, 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, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PictureRefusal, PictureWorld, PlaceholderKind, PlanChangeAction, PlanChangeKind, PlanDataSourceMode, PlanDataSourceType, PlanEditIssueCode, PlanEditOp, PlanEditsOutcome, PlanPart, PlanWireEntry, PlanWireShapeError, PlanWordIssueCode, PreflightRefusalCode, PublishRefusalCode, 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_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, 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, applyOwnPhotoGalleries, applyPictureScrims, applyPlanEdits, applyStockItemPhotos, applyStockPhotos, archetypeIssues, areaLuminance, artDirectionFor, artDirectionIssues, artDirectionPreamble, aspectRatioOf, assertStyleSlots, assertValidSitePlan, auditSite, barIconForRoute, blocksPublish, brandHueWord, buildKeys, buildStepFacts, builtHomePageId, chooseScrim, composeNavHeader, composeSection, composeSite, contentTypePreviewFields, contentTypeToWire, copyLengthOf, costUsd, createSerializedNode, creditsOfUsd, dataSourceToWire, derivedDataSources, describePlanData, describeShapeKey, emptyAreaPhrase, entranceAction, entranceInteraction, estimatePictures, estimateStepCredits, expandPlanWire, expandWireContentType, expandWireDataSource, expandWireEdit, expandWireField, expandWirePage, expandWireSection, failedBuildStep, fieldToWire, filmOfPlan, filmPlacement, findNavRoot, frameWords, isActiveBuild, isNonEmptyString, isPictureWorld, isPlainObject, isRtlLocale, jsonAnyOf, jsonBoolean, jsonClosedObject, jsonInteger, jsonListOf, jsonOneOf, jsonSchemaKeywords, jsonSchemaObjects, jsonShapedObject, jsonText, luminanceOf, modelCanDo, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, orientationOfRatio, pageToWire, parsePatternPath, parseSampleImageRef, pathAt, patternById, patternHasForm, patternLinkSlots, patternListGap, patternManifest, patternNeedsBinding, patternNodes, patternOptionalParts, patternRoleNeeds, patternScopes, patternSlotBudgets, patternSlots, patternTakesBinding, phoneMenuPages, pictureAspect, picturePrompt, pictureRefusalOf, pictureRerolls, pictureReviewIssues, pictureReviewJsonSchema, pictureReviewPasses, pictureSlotKey, pictureTargets, pictureTryFits, placeFilm, planEditOps, planEditToWire, planEditWireGaps, planEditWireKeys, planEditWireOps, planEditWireShape, planEditsFromWire, planEditsJsonSchema, planEditsToWire, planEntrances, planFromTemplate, planNavShape, planOwnPhotos, planPartOfPath, planPartToWire, planPictures, planStockPhotos, planToWire, planWireGaps, planWirePartJsonSchema, planWirePartShape, planWordIssues, publishRefusal, publishVerdict, recipeListBinds, releasedLayoutDefaults, removeBarItem, requiredAcknowledgements, requiredShapeKeys, roleField, routeMatches, routeParams, sampleImageRef, scoreStockPhoto, sectionEntrances, sectionPatternIds, sectionToWire, setStyleProps, shapeKeys, showcaseGlobals, showcasePages, showcasePlans, showcaseScenes, siteNavPages, slotBudget, stockCopyKey, stockCreditLine, stockCreditLines, stockCreditNode, stockCreditNodeId, stockFits, stockGroupOf, stockItemSlots, stockKept, stockPhotoRatio, stockPhotoSubject, stockPhotoUsable, stockPhotoWords, stockSlots, stockWord, stockWords, strictSchemaComplexity, strictSchemaRefusal, typicalStepTokens, validatePlanEdits, validateSitePlan, walkSerialized, wireContentTypeJsonSchema, wireDataSourceJsonSchema, wireFieldJsonSchema, wirePageJsonSchema, wireSectionJsonSchema, withDerivedSources, wordPattern, wordsOverPicture, writtenTexts };
7798
+ export type { AddBarItemResult, AiEntitlementsView, AiMeter, AiModelEntry, AiRefusal, AiTokenCounts, AiTokenPrice, AreaLuminance, ArtDirection, AuditPage, AuditPlaceholder, BarItemsEditResult, BuildNotice, BuildStepError, BuildStepFacts, BuildStepRecord, CmsDataSourcePlan, ComposeContext, ComposeIssue, ComposedDataSource, ComposedItem, ComposedNavHeader, ComposedPage, ComposedPlaceholder, ComposedRoute, ComposedSection, ComposedSite, ContentFieldPlan, ContentRoles, ContentSeedPlan, ContentTypePlan, CreateNodeOptions, CreatedRecord, DataSourcePlan, DynamicKeysAsList, EntranceAction, EntranceActionOptions, EntranceInteraction, EntranceMark, EntranceSpec, EntranceStamp, FactKey, FilmPlacement, FilmTarget, JsonSchema, NavHeaderInput, NavHeaderOptions, NavPage, NavShapeOptions, NavShapeResult, NodeBaseline, OwnPhotoPlacement, PageArchetype, PageArchetypeId, PageArchetypeSlot, PageData, PageDataLine, PagePlan, PageSectionPlan, PageSeoPlan, PathIssue, PatternManifestEntry, PatternManifestOptions, PatternNode, PatternPath, PatternRoleNeed, PatternTrack, PicturePlan, PicturePlanOptions, PicturePromptContext, PictureReview, PictureSlot, PictureTryBudget, PictureWorldSpec, PicturesEstimate, PlacedFilm, PlainObject, PlanChange, PlanEdit, PlanEditIssue, PlanEditResult, PlanEditsAnswer, PlanEntrancesInput, PlanFilm, PlanWireContext, PlanWireParts, PlanWordContext, PlanWordIssue, PreflightRefusal, PublishRefusal, RecipeListBinds, RelativeDataSourcePlan, ScrimChoice, SectionEntrances, SectionInput, SectionOptions, 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.86.3",
3
+ "version": "5.87.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -95,12 +95,15 @@ export const AI_STEP_TYPICAL_TOKENS: Readonly<Record<AiStep, AiTokenCounts>> = {
95
95
  [AiStep.ReadMessage]: { input: 8_800, output: 1_500, cacheWrite: 0, cacheRead: 0 },
96
96
  [AiStep.PlanSite]: partsTotal(AiStep.PlanSite),
97
97
  [AiStep.ChangePlan]: partsTotal(AiStep.ChangePlan),
98
- // a 1 K picture is 1,120 image tokens (Google's figure for Nano Banana 2) — I-D4; the prompt (the art direction's
99
- // preamble, the slot's subject, its frame and empty area) about 400 more in (M7)
100
- [AiStep.MakePictures]: { input: 400, output: 0, cacheWrite: 0, cacheRead: 0, imageOutput: 1_120 },
101
- // M7: one picture downscaled to 512 px (≈ 350 image tokens for Claude, ≈ 260 for Gemini) + the slot's question,
102
- // and a short structured answer
103
- [AiStep.CheckPictures]: { input: 1_200, output: 150, cacheWrite: 0, cacheRead: 0 },
98
+ // A 1 K picture is 1,120 image tokens (Google's figure for Nano Banana 2) — I-D4. In: the prompt, at most 700 tokens
99
+ // (the longest any site asks, its words in Hebrew — pictures.spec holds it). Out: the model's own text and thinking
100
+ // beside the picture — the live run of 2026-11-07 paid $0.0366–$0.0369 a picture at OpenRouter's $1.50 / $7.50 /
101
+ // $30 per million, ≈ 300 tokens of it; 600 are counted so the cost shown stays above what is charged.
102
+ [AiStep.MakePictures]: { input: 700, output: 600, cacheWrite: 0, cacheRead: 0, imageOutput: 1_120 },
103
+ // M7: one picture downscaled to 512 px, the instructions, the slot's whole prompt and the format, and a short
104
+ // structured answer — the live run paid $0.00025–$0.0004 a review on Haiku 5.5 ($0.10 / $0.50): 3,600 in, 300 out
105
+ // keep the estimate above it.
106
+ [AiStep.CheckPictures]: { input: 3_600, output: 300, cacheWrite: 0, cacheRead: 0 },
104
107
  [AiStep.NameStructures]: { input: 80_000, output: 10_000, cacheWrite: 0, cacheRead: 0 },
105
108
  };
106
109
 
@@ -261,6 +261,38 @@ export function pictureRerolls(count: number): number {
261
261
  return count > 0 ? Math.ceil(count / PICTURE_REROLL_EVERY) : 0;
262
262
  }
263
263
 
264
+ const CREDIT_SLACK = 1e-6;
265
+
266
+ /** Where a run stands when it is about to ask one picture (the try's own estimate is `each`: a picture and its review). */
267
+ export interface PictureTryBudget {
268
+ /** The cost shown — the most the run may spend. */
269
+ shown: number;
270
+ /** One try's estimate: a picture and its review. */
271
+ each: number;
272
+ /** What the run has spent so far (every try, every review). */
273
+ spent: number;
274
+ /** This try is a slot's second (its review said no to the first). */
275
+ secondTry: boolean;
276
+ /** First tries still to come after this slot. */
277
+ waiting: number;
278
+ /** Second tries paid for up front (`pictureRerolls`). */
279
+ rerolls: number;
280
+ /** Second tries already made. */
281
+ rerollsUsed: number;
282
+ }
283
+
284
+ /**
285
+ * May this try be asked? A second try needs one of the second tries paid for up front to be left; and any try must
286
+ * leave, within the cost shown, room for every first try still to come AND every second try still unused — so a
287
+ * made picture never eats the second try the owner paid for (the estimate is above what a try is charged, so every
288
+ * try counted in the cost shown fits).
289
+ */
290
+ export function pictureTryFits(budget: PictureTryBudget): boolean {
291
+ if (budget.secondTry && budget.rerollsUsed >= budget.rerolls) return false;
292
+ const unusedAfter = Math.max(0, budget.rerolls - budget.rerollsUsed - (budget.secondTry ? 1 : 0));
293
+ return budget.spent + budget.each * (1 + budget.waiting + unusedAfter) <= budget.shown + CREDIT_SLACK;
294
+ }
295
+
264
296
  export interface PicturesEstimate {
265
297
  count: number;
266
298
  /** Second tries included in the total. */
@@ -160,11 +160,12 @@ iox-gallery.iox-es-media[data-iox-empty] > .iox-gallery {
160
160
  --iox-dur-base: var(--iox-dur-ui, 200ms);
161
161
  }
162
162
  /* The card's BOX wears the raise: the <a> itself, Card v2's root, or — on the canvas — the twin's <a> inside its host
163
- (the host carries the marker, the <a> the node's own look). */
164
- :is(a.iox-es-card, .iox-es-card:has(.iox-card-link), .iox-es-card:has(> a.linked-container-root) > a.linked-container-root) {
163
+ (the host carries the marker, the <a> the node's own look). :where() — the canvas branch is the most specific argument
164
+ and an :is() takes it for every branch, so the resting opacity out-ranked the hover rule below on the live site. */
165
+ :where(a.iox-es-card, .iox-es-card:has(.iox-card-link), .iox-es-card:has(> a.linked-container-root) > a.linked-container-root) {
165
166
  translate: 0px;
166
167
  }
167
- :is(a.iox-es-card, .iox-es-card:has(.iox-card-link), .iox-es-card:has(> a.linked-container-root) > a.linked-container-root)::before {
168
+ :where(a.iox-es-card, .iox-es-card:has(.iox-card-link), .iox-es-card:has(> a.linked-container-root) > a.linked-container-root)::before {
168
169
  content: '';
169
170
  position: absolute;
170
171
  inset: calc(var(--iox-card-border-width, 0px) * -1);