@vectoriox/iox-ui 5.189.0 → 5.191.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.
@@ -4,6 +4,7 @@ import type {
4
4
  AiGenerationStage, AiRefusalCode, AiStep, GenerationTier, LayoutFingerprint, LayoutIssue, LayoutPhotoAddress, MeasuredLayout, PictureRefusal, PlanChange, PlanEdit,
5
5
  SitePlan,
6
6
  } from '@vectoriox/iox-ui/generation-core';
7
+ import { pictureSlotPage } from '@vectoriox/iox-ui/generation-core';
7
8
 
8
9
  import type { StyleRead } from './rank';
9
10
  import type { SiteAnalysis } from './site-analysis';
@@ -112,6 +113,32 @@ export interface GenerationPicturesView {
112
113
  failed?: number;
113
114
  /** Credits the pictures have cost so far (the ledger). */
114
115
  spent?: number;
116
+ /** iox-cms#114: made pictures the plan as it is now has no photo place for — their page was laid again with fewer
117
+ * places — by page, in the order they were made (`unplacedPicturesOf`). Only on a made run at the Plan step; absent
118
+ * when every made picture has its place. */
119
+ unplaced?: UnplacedPictures[];
120
+ }
121
+
122
+ /** iox-cms#114: how many made pictures one page of the plan has no photo place for (`page` = the plan page's key). */
123
+ export interface UnplacedPictures {
124
+ page: string;
125
+ count: number;
126
+ }
127
+
128
+ /**
129
+ * iox-cms#114 — the made pictures with no place (their slot keys, iox-cms `madePlacements`' `unplaced`), counted by the page
130
+ * they were made for, pages in the order the keys come (the make order: the opening first). A key with no page (an item's
131
+ * slot — never unplaced today) is left out. Empty: every picture has its place. Pure.
132
+ */
133
+ export function unplacedPicturesOf(slotKeys: ReadonlyArray<string>): UnplacedPictures[] {
134
+ const out: UnplacedPictures[] = [];
135
+ for (const key of slotKeys) {
136
+ const page = pictureSlotPage(key);
137
+ if (!page) continue;
138
+ const row = out.find(r => r.page === page);
139
+ if (row) row.count++; else out.push({ page, count: 1 });
140
+ }
141
+ return out;
115
142
  }
116
143
 
117
144
  /** Where a composed page is (M8 gate 2): the Plan step's planning row and its card read it. */