@wafertools/wafermap 0.40.0 → 0.41.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.
Files changed (220) hide show
  1. package/AGENTS.md +20 -21
  2. package/CHANGELOG.md +154 -0
  3. package/README.md +6 -6
  4. package/dist/packages/canvas-adapter/canvasTheme.d.ts +12 -0
  5. package/dist/packages/canvas-adapter/canvasTheme.js +1 -1
  6. package/dist/packages/canvas-adapter/cellShade.d.ts +2 -2
  7. package/dist/packages/canvas-adapter/cellShade.js +1 -1
  8. package/dist/packages/canvas-adapter/chartPopulation.d.ts +3 -0
  9. package/dist/packages/canvas-adapter/chartPopulation.js +1 -1
  10. package/dist/packages/canvas-adapter/charts/capability.d.ts +3 -0
  11. package/dist/packages/canvas-adapter/charts/capability.js +1 -1
  12. package/dist/packages/canvas-adapter/charts/cardAbout.d.ts +2 -1
  13. package/dist/packages/canvas-adapter/charts/cardAbout.js +1 -1
  14. package/dist/packages/canvas-adapter/charts/chartShell.d.ts +47 -27
  15. package/dist/packages/canvas-adapter/charts/chartShell.js +1 -1
  16. package/dist/packages/canvas-adapter/charts/commonality.js +4 -4
  17. package/dist/packages/canvas-adapter/charts/correlation.d.ts +6 -12
  18. package/dist/packages/canvas-adapter/charts/correlation.js +1 -1
  19. package/dist/packages/canvas-adapter/charts/divergingScale.d.ts +45 -15
  20. package/dist/packages/canvas-adapter/charts/divergingScale.js +1 -1
  21. package/dist/packages/canvas-adapter/charts/groupComparison.js +1 -1
  22. package/dist/packages/canvas-adapter/charts/palette.d.ts +16 -30
  23. package/dist/packages/canvas-adapter/charts/palette.js +1 -1
  24. package/dist/packages/canvas-adapter/charts/patCard.js +1 -1
  25. package/dist/packages/canvas-adapter/charts/plotChart.d.ts +29 -3
  26. package/dist/packages/canvas-adapter/charts/plotChart.js +1 -1
  27. package/dist/packages/canvas-adapter/charts/regionYieldDiagram.d.ts +3 -0
  28. package/dist/packages/canvas-adapter/charts/regionYieldDiagram.js +1 -1
  29. package/dist/packages/canvas-adapter/charts/sweep.d.ts +3 -0
  30. package/dist/packages/canvas-adapter/charts/sweep.js +1 -1
  31. package/dist/packages/canvas-adapter/chromeRow.d.ts +68 -0
  32. package/dist/packages/canvas-adapter/chromeRow.js +1 -0
  33. package/dist/packages/canvas-adapter/chunked.d.ts +6 -0
  34. package/dist/packages/canvas-adapter/chunked.js +1 -1
  35. package/dist/packages/canvas-adapter/columnFilterPopup.d.ts +25 -0
  36. package/dist/packages/canvas-adapter/columnFilterPopup.js +1 -0
  37. package/dist/packages/canvas-adapter/composePng.d.ts +37 -0
  38. package/dist/packages/canvas-adapter/composePng.js +1 -0
  39. package/dist/packages/canvas-adapter/dataTab.d.ts +39 -6
  40. package/dist/packages/canvas-adapter/dataTab.js +1 -1
  41. package/dist/packages/canvas-adapter/dieList.js +1 -1
  42. package/dist/packages/canvas-adapter/differenceMapPanel.d.ts +3 -1
  43. package/dist/packages/canvas-adapter/differenceMapPanel.js +1 -1
  44. package/dist/packages/canvas-adapter/drilldown.d.ts +20 -1
  45. package/dist/packages/canvas-adapter/drilldown.js +1 -1
  46. package/dist/packages/canvas-adapter/filterButton.d.ts +2 -0
  47. package/dist/packages/canvas-adapter/filterButton.js +1 -1
  48. package/dist/packages/canvas-adapter/filterEditor.d.ts +5 -0
  49. package/dist/packages/canvas-adapter/filterEditor.js +1 -1
  50. package/dist/packages/canvas-adapter/guideWindow.js +1 -1
  51. package/dist/packages/canvas-adapter/icons.js +1 -1
  52. package/dist/packages/canvas-adapter/identityHeader.d.ts +5 -0
  53. package/dist/packages/canvas-adapter/identityHeader.js +1 -1
  54. package/dist/packages/canvas-adapter/index.d.ts +7 -0
  55. package/dist/packages/canvas-adapter/index.js +1 -1
  56. package/dist/packages/canvas-adapter/insightsTab.d.ts +32 -9
  57. package/dist/packages/canvas-adapter/insightsTab.js +1 -1
  58. package/dist/packages/canvas-adapter/maplessSummary.d.ts +4 -2
  59. package/dist/packages/canvas-adapter/maplessSummary.js +1 -1
  60. package/dist/packages/canvas-adapter/openWaferMode.d.ts +7 -0
  61. package/dist/packages/canvas-adapter/openWaferMode.js +1 -0
  62. package/dist/packages/canvas-adapter/panelChart.d.ts +7 -0
  63. package/dist/packages/canvas-adapter/panelChart.js +1 -0
  64. package/dist/packages/canvas-adapter/panelTable.d.ts +50 -0
  65. package/dist/packages/canvas-adapter/panelTable.js +1 -0
  66. package/dist/packages/canvas-adapter/plotCard.js +1 -1
  67. package/dist/packages/canvas-adapter/plotEditor.d.ts +12 -0
  68. package/dist/packages/canvas-adapter/plotEditor.js +10 -10
  69. package/dist/packages/canvas-adapter/plotItems.d.ts +9 -4
  70. package/dist/packages/canvas-adapter/plotItems.js +1 -1
  71. package/dist/packages/canvas-adapter/plotJsonComplete.js +1 -1
  72. package/dist/packages/canvas-adapter/plotModal.d.ts +7 -0
  73. package/dist/packages/canvas-adapter/plotModal.js +1 -1
  74. package/dist/packages/canvas-adapter/plotStore.js +1 -1
  75. package/dist/packages/canvas-adapter/plotTab.d.ts +60 -2
  76. package/dist/packages/canvas-adapter/plotTab.js +1 -1
  77. package/dist/packages/canvas-adapter/renderWaferGallery.d.ts +7 -0
  78. package/dist/packages/canvas-adapter/renderWaferGallery.js +1 -1
  79. package/dist/packages/canvas-adapter/renderWaferMap.d.ts +41 -9
  80. package/dist/packages/canvas-adapter/renderWaferMap.js +1 -1
  81. package/dist/packages/canvas-adapter/reportCharts.d.ts +41 -0
  82. package/dist/packages/canvas-adapter/reportCharts.js +1 -0
  83. package/dist/packages/canvas-adapter/reportExport.d.ts +91 -0
  84. package/dist/packages/canvas-adapter/reportExport.js +1 -0
  85. package/dist/packages/canvas-adapter/reportFigures.d.ts +29 -0
  86. package/dist/packages/canvas-adapter/reportFigures.js +1 -0
  87. package/dist/packages/canvas-adapter/reportRun.d.ts +9 -0
  88. package/dist/packages/canvas-adapter/reportRun.js +1 -0
  89. package/dist/packages/canvas-adapter/selectionOverlay.d.ts +12 -0
  90. package/dist/packages/canvas-adapter/selectionOverlay.js +1 -0
  91. package/dist/packages/canvas-adapter/summaryPanel.d.ts +152 -111
  92. package/dist/packages/canvas-adapter/summaryPanel.js +7 -4
  93. package/dist/packages/canvas-adapter/summaryToggle.js +1 -1
  94. package/dist/packages/canvas-adapter/tableDrilldown.d.ts +48 -0
  95. package/dist/packages/canvas-adapter/tableDrilldown.js +1 -0
  96. package/dist/packages/canvas-adapter/tableFilter.d.ts +42 -0
  97. package/dist/packages/canvas-adapter/tableFilter.js +1 -0
  98. package/dist/packages/canvas-adapter/tablePlots.d.ts +85 -0
  99. package/dist/packages/canvas-adapter/tablePlots.js +1 -0
  100. package/dist/packages/canvas-adapter/themeWatch.d.ts +7 -0
  101. package/dist/packages/canvas-adapter/themeWatch.js +1 -0
  102. package/dist/packages/canvas-adapter/toCanvas.d.ts +3 -0
  103. package/dist/packages/canvas-adapter/toCanvas.js +1 -1
  104. package/dist/packages/canvas-adapter/toolbar.d.ts +125 -36
  105. package/dist/packages/canvas-adapter/toolbar.js +2 -2
  106. package/dist/packages/canvas-adapter/userGuideHtml.d.ts +1 -1
  107. package/dist/packages/canvas-adapter/userGuideHtml.js +530 -414
  108. package/dist/packages/canvas-adapter/version.d.ts +2 -2
  109. package/dist/packages/canvas-adapter/version.js +1 -1
  110. package/dist/packages/canvas-adapter/viewSwitch.js +1 -1
  111. package/dist/packages/canvas-adapter/virtualTable.d.ts +37 -7
  112. package/dist/packages/canvas-adapter/virtualTable.js +1 -1
  113. package/dist/packages/core/aggregates.d.ts +14 -0
  114. package/dist/packages/core/aggregates.js +1 -1
  115. package/dist/packages/core/dies.d.ts +7 -0
  116. package/dist/packages/core/dies.js +1 -1
  117. package/dist/packages/core/utils.d.ts +2 -0
  118. package/dist/packages/core/utils.js +1 -1
  119. package/dist/packages/experimental/charts.d.ts +4 -0
  120. package/dist/packages/experimental/charts.js +1 -0
  121. package/dist/packages/renderer/binColors.d.ts +6 -2
  122. package/dist/packages/renderer/binColors.js +1 -1
  123. package/dist/packages/renderer/buildView.d.ts +36 -14
  124. package/dist/packages/renderer/buildView.js +1 -1
  125. package/dist/packages/renderer/buildWaferMap.d.ts +8 -0
  126. package/dist/packages/renderer/buildWaferMap.js +1 -1
  127. package/dist/packages/renderer/categoryColors.d.ts +3 -0
  128. package/dist/packages/renderer/categoryColors.js +1 -0
  129. package/dist/packages/renderer/colorMap.d.ts +15 -16
  130. package/dist/packages/renderer/colorMap.js +1 -1
  131. package/dist/packages/renderer/colorSchemes.d.ts +34 -30
  132. package/dist/packages/renderer/colorSchemes.js +1 -1
  133. package/dist/packages/renderer/dataColors.d.ts +126 -0
  134. package/dist/packages/renderer/dataColors.js +1 -0
  135. package/dist/packages/renderer/deprecate.js +1 -1
  136. package/dist/packages/renderer/fmt.d.ts +16 -0
  137. package/dist/packages/renderer/fmt.js +1 -1
  138. package/dist/packages/renderer/index.d.ts +2 -0
  139. package/dist/packages/renderer/index.js +1 -1
  140. package/dist/packages/renderer/spec.d.ts +5 -0
  141. package/dist/packages/renderer/spec.js +1 -1
  142. package/dist/packages/renderer/stacks.d.ts +21 -0
  143. package/dist/packages/renderer/stacks.js +1 -0
  144. package/dist/packages/renderer/timeAxis.d.ts +19 -0
  145. package/dist/packages/renderer/timeAxis.js +1 -0
  146. package/dist/packages/stats/analyzeWaferLot.js +1 -1
  147. package/dist/packages/stats/analyzeWaferMap.d.ts +2 -4
  148. package/dist/packages/stats/analyzeWaferMap.js +1 -1
  149. package/dist/packages/stats/binRows.js +1 -1
  150. package/dist/packages/stats/binShifts.d.ts +59 -0
  151. package/dist/packages/stats/binShifts.js +1 -0
  152. package/dist/packages/stats/capability.d.ts +6 -1
  153. package/dist/packages/stats/capability.js +1 -1
  154. package/dist/packages/stats/chartCatalogue.d.ts +3 -0
  155. package/dist/packages/stats/chartCatalogue.js +1 -1
  156. package/dist/packages/stats/clusterDetection.js +1 -1
  157. package/dist/packages/stats/columnPlot.d.ts +38 -0
  158. package/dist/packages/stats/columnPlot.js +1 -0
  159. package/dist/packages/stats/commonality.d.ts +8 -1
  160. package/dist/packages/stats/commonality.js +1 -1
  161. package/dist/packages/stats/correlation.d.ts +7 -2
  162. package/dist/packages/stats/correlation.js +1 -1
  163. package/dist/packages/stats/dataTable.d.ts +44 -0
  164. package/dist/packages/stats/dataTable.js +1 -0
  165. package/dist/packages/stats/dieRegions.js +1 -1
  166. package/dist/packages/stats/examplePicks.js +1 -1
  167. package/dist/packages/stats/facets.d.ts +11 -0
  168. package/dist/packages/stats/facets.js +1 -1
  169. package/dist/packages/stats/filterFindings.d.ts +21 -0
  170. package/dist/packages/stats/filterFindings.js +1 -1
  171. package/dist/packages/stats/groupEffects.d.ts +8 -0
  172. package/dist/packages/stats/groupEffects.js +1 -1
  173. package/dist/packages/stats/math.d.ts +2 -0
  174. package/dist/packages/stats/math.js +1 -1
  175. package/dist/packages/stats/overview.d.ts +114 -0
  176. package/dist/packages/stats/overview.js +1 -0
  177. package/dist/packages/stats/pat.d.ts +0 -2
  178. package/dist/packages/stats/pat.js +1 -1
  179. package/dist/packages/stats/patternClassification.d.ts +20 -3
  180. package/dist/packages/stats/patternClassification.js +1 -1
  181. package/dist/packages/stats/permutationNull.d.ts +16 -0
  182. package/dist/packages/stats/permutationNull.js +1 -0
  183. package/dist/packages/stats/plotData.d.ts +138 -12
  184. package/dist/packages/stats/plotData.js +1 -1
  185. package/dist/packages/stats/plotSpec.d.ts +10 -1
  186. package/dist/packages/stats/plotSpec.js +3 -3
  187. package/dist/packages/stats/plotTable.js +1 -1
  188. package/dist/packages/stats/plotWords.d.ts +52 -0
  189. package/dist/packages/stats/plotWords.js +1 -0
  190. package/dist/packages/stats/presentation.d.ts +63 -14
  191. package/dist/packages/stats/presentation.js +1 -1
  192. package/dist/packages/stats/presentationPresets.d.ts +35 -0
  193. package/dist/packages/stats/presentationPresets.js +1 -0
  194. package/dist/packages/stats/presentationSections.d.ts +83 -0
  195. package/dist/packages/stats/presentationSections.js +1 -0
  196. package/dist/packages/stats/renderSummaryReport.d.ts +80 -2
  197. package/dist/packages/stats/renderSummaryReport.js +1 -67
  198. package/dist/packages/stats/reportBlocks.d.ts +249 -0
  199. package/dist/packages/stats/reportBlocks.js +1 -0
  200. package/dist/packages/stats/reportContents.d.ts +22 -0
  201. package/dist/packages/stats/reportContents.js +1 -0
  202. package/dist/packages/stats/reportDeck.d.ts +245 -0
  203. package/dist/packages/stats/reportDeck.js +212 -0
  204. package/dist/packages/stats/reportHtml.d.ts +44 -43
  205. package/dist/packages/stats/reportHtml.js +82 -46
  206. package/dist/packages/stats/reportMaps.d.ts +67 -0
  207. package/dist/packages/stats/reportMaps.js +1 -0
  208. package/dist/packages/stats/reportSections.d.ts +55 -0
  209. package/dist/packages/stats/reportSections.js +1 -0
  210. package/dist/packages/stats/sweep.d.ts +14 -6
  211. package/dist/packages/stats/sweep.js +1 -1
  212. package/dist/packages/stats/synthesis.d.ts +87 -10
  213. package/dist/packages/stats/synthesis.js +1 -1
  214. package/dist/packages/stats/types.d.ts +22 -0
  215. package/dist/packages/stats/worthItems.d.ts +15 -0
  216. package/dist/packages/stats/worthItems.js +1 -0
  217. package/dist/packages/stats/yield.d.ts +13 -0
  218. package/dist/packages/stats/yield.js +1 -1
  219. package/llms.txt +1 -1
  220. package/package.json +6 -1
@@ -1,17 +1,18 @@
1
1
  import type { Wafer } from '../core/wafer.js';
2
- import type { Die } from '../core/dies.js';
2
+ import { type Die } from '../core/dies.js';
3
3
  import { type BinDef, type TestDef, type YieldSummary, type MetadataFieldDef } from '../renderer/buildWaferMap.js';
4
4
  import type { StatsFinding, StatsSummary, LotStatsSummary } from '../stats/types.js';
5
5
  import type { ReportMap } from '../stats/renderSummaryReport.js';
6
- import { type FindingsFilter } from '../stats/filterFindings.js';
6
+ import { type Synthesis, type SynthesisItem } from '../stats/synthesis.js';
7
7
  import { type FacetCuration } from '../stats/facets.js';
8
8
  import { type BinColors } from '../renderer/binColors.js';
9
9
  import { buildWarningsBanner, type WaferWarning } from './warnings.js';
10
10
  export { buildWarningsBanner };
11
11
  import type { PlotMode } from '../renderer/buildView.js';
12
12
  import { type CapabilityItem } from '../stats/capability.js';
13
- import { type SaveTextHandler } from './toolbar.js';
13
+ import { type ExportAction, type SaveTextHandler } from './toolbar.js';
14
14
  import type { DieListDisplayOptions } from './dieList.js';
15
+ import { type CsvColumn } from './tableExport.js';
15
16
  export { csvField } from '../core/utils.js';
16
17
  import { type Chunked } from '../core/utils.js';
17
18
  import type { WaferMetadata } from '../core/metadata.js';
@@ -21,12 +22,58 @@ export interface SummaryPanelOptions {
21
22
  /** Open the panel immediately on render without requiring the user to click the toolbar button. Default false. */
22
23
  defaultOpen?: boolean;
23
24
  }
25
+ /**
26
+ * A statistics table's export, for a host's one Copy / Export CSV row (the Data tab's Statistics view): its title, the
27
+ * file name, and the columns and rows at full precision. Set on the table's element by the builders when the table is
28
+ * not the docked panel's own.
29
+ */
30
+ export interface TableCsv {
31
+ title: string;
32
+ fileName: string;
33
+ build: () => {
34
+ columns: CsvColumn<any>[];
35
+ rows: readonly unknown[];
36
+ };
37
+ /** Saves the CSV through the save hook the table was built with. */
38
+ save: () => void | Promise<void>;
39
+ }
40
+ export declare const TABLE_CSV: WeakMap<HTMLElement, TableCsv>;
41
+ /** Label immediately followed by its value, left-aligned — unlike `kvRow`
42
+ * (label/value pinned to opposite ends of the row via `space-between`),
43
+ * which reads fine in a narrow sidebar column but pushes the value far
44
+ * from its label once the row spans a full-width card, as the metadata
45
+ * card does. */
46
+ /**
47
+ * A list of fields, one per line: the labels in a column of their own, the values aligned in the next. The one layout for
48
+ * a wafer's fields wherever they are listed in full (the strip's "more fields" card, a card's wafer info), so they read
49
+ * the same.
50
+ */
51
+ export declare function buildFieldList(pairs: ReadonlyArray<readonly [string, string]>): HTMLDivElement;
52
+ /**
53
+ * Opens a card listing fields one per line (`buildFieldList`) under `anchor`, the one card a strip's "N more fields" and the
54
+ * Data tab's "fields the same on every wafer" open. It scrolls when long and closes on Escape (focus back to `trigger`), a
55
+ * click outside, or the returned function. `trigger` is marked expanded while it is open.
56
+ */
57
+ export declare function openFieldListCard(o: {
58
+ anchor: HTMLElement;
59
+ trigger: HTMLElement;
60
+ pairs: ReadonlyArray<readonly [string, string]>;
61
+ label?: string;
62
+ onClose?: () => void;
63
+ }): () => void;
24
64
  /** Order-preserving [key, value] pairs from a metadata-like record, with
25
65
  * null/undefined/empty-string entries dropped. The single source of truth
26
66
  * for "what counts as a displayable metadata field" — shared by the map
27
67
  * metadata badge and `buildMetadataStripRow`/`buildFacetSummaryChips` so
28
68
  * they can't drift on what they consider "no metadata". */
29
69
  export declare function metadataEntries(meta: Record<string, unknown>): Array<[string, string]>;
70
+ /**
71
+ * Lay a metadata strip out for `px` of room, now, and return the width its fields (and the "N more fields" button) take.
72
+ * For a strip that is only as wide as its content, such as the one in the chrome row: the host measures what the other
73
+ * controls leave, hands it here, and sizes the strip to the answer, so fields are hidden only when there is no room.
74
+ * Returns 0 for an element that is not a strip.
75
+ */
76
+ export declare function fitMetadataStrip(row: HTMLElement, px: number): number;
30
77
  export declare function buildFacetSummaryChips(table: Array<{
31
78
  key: string;
32
79
  values: Array<{
@@ -164,47 +211,12 @@ export declare function buildRegionYieldPanelSection(params: {
164
211
  passBins: readonly number[] | ((waferIndex: number) => readonly number[]);
165
212
  panel?: HTMLElement;
166
213
  }): HTMLDivElement | null;
167
- /** Lot overview — wafer count and mean (unweighted arithmetic mean of each
168
- * wafer's own yield%, not a die-weighted lot yield — see CLAUDE.md on
169
- * correctly labelling aggregation methods) wafer yield. Metadata is a
214
+ /** Lot overview — wafer count and the lot's yield (`stats.yield`). Metadata is a
170
215
  * separate section (`buildMetadataInfoSection`) built from the lot's own
171
216
  * items, not from `lotSummary.lot` — see that function's doc comment. */
172
217
  export declare function buildLotOverviewSection(lotSummary: LotStatsSummary,
173
218
  /** Per-wafer summaries, for the analysed/excluded die tally below. */
174
219
  perWaferSummaries?: StatsSummary[]): HTMLDivElement;
175
- /** Per-wafer yield bars, absolute 0–100% scale, with a visible median marker and
176
- * low outliers named in the row label — lets an engineer spot outlier wafers
177
- * within the lot at a glance.
178
- *
179
- * "Outlier" is the Tukey rule (below `Q1 − 1.5 × IQR`), not "below the median".
180
- * The median splits every lot in half by construction, so half the bars always
181
- * got flagged — including on a lot where every wafer is within a point of every
182
- * other. The Tukey fence flags nothing on a tight lot, which is the correct
183
- * answer, and it is stated in text rather than encoded only in a colour.
184
- *
185
- * Slot order is the default and must stay so: wafer-number order is what makes a
186
- * slot-correlated pattern (a bad cassette position, a chuck issue) visible at all,
187
- * and sorting by yield destroys it. Yield order is opt-in via the header control. */
188
- export declare function buildPerWaferYieldSection(lotSummary: LotStatsSummary, items: Array<{
189
- label?: string;
190
- } | null>, onWaferClick?: (waferIndex: number) => void,
191
- /** Panel element owning the sort/collapse state. Omit for a stateless render (reports). */
192
- panel?: HTMLElement,
193
- /**
194
- * Per-wafer findings tally, badged onto each row.
195
- *
196
- * This is what let the gallery's separate "Findings" tab go away. That tab was
197
- * a second per-wafer list — a SUBSET (only wafers that have findings), with the
198
- * same row idiom as this one but a different click action, and no findings text
199
- * on it at all. Folding the count in here gives one list instead of two, and
200
- * shows the case the subset list structurally could not: a low-yielding wafer
201
- * with no findings, sitting next to the flagged ones.
202
- */
203
- findingsFor?: (waferIndex: number) => {
204
- total: number;
205
- unusual: number;
206
- notable: number;
207
- } | undefined): HTMLDivElement | null;
208
220
  /**
209
221
  * Identity context stamped onto a per-test CSV export, so a file that has
210
222
  * left the app still says which wafer(s) it describes. Die-level metadata is
@@ -221,7 +233,7 @@ export interface CsvExportContext {
221
233
  * "Lot" column.
222
234
  */
223
235
  perWaferMetadata?: WaferMetadata[];
224
- /** Plain-language population size, e.g. "12 wafers pooled". Appended to the
236
+ /** Plain-language population size, e.g. "all dies of 12 wafers". Appended to the
225
237
  * section title and emitted as a `Population` CSV column. */
226
238
  populationLabel?: string;
227
239
  }
@@ -266,6 +278,8 @@ precomputedTestStats?: {
266
278
  testNumber: number;
267
279
  totalDies: number;
268
280
  yieldPercent: number | null;
281
+ failLowDies?: number;
282
+ failHighDies?: number;
269
283
  }>;
270
284
  },
271
285
  /** Optional host hook for the "Export CSV" button — see `saveTextFile` (toolbar.ts). */
@@ -320,69 +334,87 @@ panel?: HTMLElement): HTMLDivElement | null;
320
334
  export declare function buildLotFunctionalSection(allDies: Die[], testDefs: TestDef[] | undefined, perWaferSummaries?: StatsSummary[], onSaveText?: SaveTextHandler,
321
335
  /** Panel element owning the collapsed state. Omit for a stateless render. */
322
336
  panel?: HTMLElement): HTMLDivElement | null;
323
- export declare function buildFindingsSection(findings: StatsFinding[], statsSummary: StatsSummary | LotStatsSummary, onFindingClick: (finding: StatsFinding, row: HTMLButtonElement) => void, activeFindingId: string | null,
324
- /**
325
- * When true, skips the collapsible "Findings" header/badge and renders
326
- * content directly — used by `buildFindingsSectionWithFilter`, which
327
- * builds its own collapsible wrapper (header + filter row) around this.
328
- * Default false (collapsible-section behavior, used when this is one
329
- * section among several, e.g. inside the Insights Overview tab's legacy
330
- * embedding).
331
- *
332
- * NOTE — the `false` path has no in-repo caller today, and it is the only
333
- * collapsible section in this panel that does NOT persist its collapsed
334
- * state: `collapsibleSection` needs both a `stateKey` and the owning `panel`
335
- * to do that, and this function is not given a `panel`. Every section that
336
- * actually renders (bins, regionYield, waferYield, testValues,
337
- * functionalTests, findings) does persist, so the panel is consistent as
338
- * shipped. If you revive this path — or call it from outside the library —
339
- * thread a `panel` through and give it a `stateKey`, or it will be the one
340
- * section that forgets whether the reader collapsed it.
341
- */
342
- standalone?: boolean): HTMLDivElement | null;
343
- /** What the "What stands out" rows act on, and what is selected now. */
337
+ /** What the result rows act on, and what is selected now. */
344
338
  export interface SynthesisSectionActions {
345
- /** Selects a finding, exactly as its row in the Findings list does. */
339
+ /** Selects a finding: its dies on the map. */
346
340
  onFindingClick?: (finding: StatsFinding, row: HTMLButtonElement) => void;
347
341
  activeFindingId?: string | null;
348
342
  /** Shows a test on the map with the dies it fails. Omitted ⇒ test rows are shown but do not act. */
349
343
  onTestClick?: (testNumber: number) => void;
350
344
  /** The test `onTestClick` last showed, while it is still shown. */
351
345
  activeTest?: number | null;
352
- /** The map's bin colours, so a bin chip carries the swatch the legend shows. */
346
+ /** The map's bin colours, so a bin carries the swatch the legend shows. */
353
347
  binColors?: BinColors;
354
- /**
355
- * Opens an item's Worth a look card in Insights (by `synthesisKey`): the one way from a row to its chart. Offered on the
356
- * items that have a card (the top ones), never on the "also" list. Omitted ⇒ no Chart links (no Insights).
357
- */
348
+ /** Opens an item's card in Insights (by `synthesisKey`), from its chart view. Omitted ⇒ no such link. */
358
349
  onShowChart?: (key: string) => void;
359
350
  /** The host's wafer attributes: which fields groups are compared in, and what they are called. */
360
351
  attributes?: Record<string, FacetCuration>;
352
+ /** Opens one wafer of a lot, for an item found on that wafer alone. Omitted ⇒ inert. */
353
+ onOpenWafer?: (waferIndex: number) => void;
354
+ /** A host's notice about the analysis (`findingsNotice`), shown under the verdict. */
355
+ notice?: FindingsNotice;
356
+ /** Shows a set of dies or wafers on the map (a group's wafers, a bin, a ring, a wafer). Omitted ⇒ those rows do not act. */
357
+ onShowDies?: (selection: DieSelection) => void;
358
+ /** The selection `onShowDies` last showed (its key), while it is still shown. */
359
+ activeSelection?: string | null;
360
+ }
361
+ /** Dies or wafers to show on the map, from a row that is not a finding or a test. */
362
+ export interface DieSelection {
363
+ /** Stable key: the row it came from, so a second click on it clears it. */
364
+ key: string;
365
+ /** What is shown, in the reader's words ("Split TT wafers", "Hard bin 2"). */
366
+ label: string;
367
+ /** Wafers to outline (lot `waferIndex`). */
368
+ waferIndices?: number[];
369
+ /** Die keys (`getDieKey`) per wafer, lot `waferIndex` → keys. On a single map, index 0. */
370
+ dieKeysByWafer?: Record<number, string[]>;
371
+ /** A bin to pick out in the legend. */
372
+ bin?: {
373
+ kind: 'hardBin' | 'softBin';
374
+ bin: number;
375
+ };
376
+ /** A test to plot on the cards (a test that differs between groups: its values, with the group's wafers outlined). */
377
+ test?: number;
378
+ }
379
+ /** A row under the finding categories that opens a detail view: wafers, regions, bins, tests, details. */
380
+ export interface ReferenceView {
381
+ id: string;
382
+ title: string;
383
+ /** One line under the title: the figure worth seeing without opening it. */
384
+ headline: string;
385
+ /** A line under the detail view's title: the population it counts. */
386
+ note?: string;
387
+ /** Fills the detail view; `rerender` draws it again (a sort). */
388
+ build: (content: HTMLElement, rerender: () => void) => void;
389
+ /** A link under the table to the full one (the Data tables dialog). */
390
+ fullTable?: () => void;
391
+ }
392
+ /** What the panel adds around the categories: its reference rows, the report buttons, an item's chart. */
393
+ export interface ResultsExtras {
394
+ references?: ReferenceView[];
395
+ /** The Summary report / Data tables buttons, placed under the list. */
396
+ reportRow?: HTMLElement | null;
397
+ /** Draws an item's chart into its chart view; returns its teardown. Omitted ⇒ the view has the item's sentence only. */
398
+ drawChart?: (item: SynthesisItem, into: HTMLElement) => (() => void) | void;
399
+ /** The glance sections under the yield ({@link glanceSections}); `openView` opens a reference view by id. */
400
+ glance?: (openView: (id: string) => void, synthesis: Synthesis) => HTMLElement[];
361
401
  }
362
402
  /**
363
- * The first section of both panels: what the wafer or lot did and what stands out, from the same
364
- * `buildSynthesis` the HTML reports open with. A clean one says so ("Nothing stands out"), which a
365
- * list of findings cannot, so this is its own section and not a part of the Findings one — that
366
- * section is absent when there are no findings.
403
+ * The panel's results, wafer and lot alike: the verdict, then what was found in fixed categories (Groups of wafers, Tests
404
+ * outside limits, Patterns on the wafer, Test sites, Wafers), each one row that opens to its items, tinted by how much it
405
+ * matters; then the reference rows (wafers, regions, bins, tests, details), each opening a detail view in the panel's
406
+ * place, so the map is never covered.
367
407
  *
368
- * One rule for what acts: every item is a row, and every row shows its dies on the map (a finding's
369
- * dies, or a test with the dies it fails), marked by the same wafer icon at its end. The sentences
370
- * themselves never link. An item's parts — its fail bins, the pattern, a test failing on the same dies —
371
- * are chips under its sentence, each showing that part alone.
408
+ * One rule for what acts: every item, finding, wafer, region, bin and test row shows its dies on the map. Chart and Full
409
+ * table are separate small links.
372
410
  */
373
411
  export declare function buildSynthesisSection(source: StatsSummary | LotStatsSummary,
374
412
  /** The pass bins every wafer was judged by; omitted when they differ, and the items then rest on yield alone. */
375
413
  passBins: readonly number[] | undefined, actions: SynthesisSectionActions,
376
- /** Panel element owning the collapsed state. Omit for a stateless render. */
414
+ /** Panel element owning the open categories, the detail view and the sorts. Omit for a stateless render. */
377
415
  panel?: HTMLElement,
378
- /** Opens the full report, which begins with this same section. Omitted ⇒ no link. */
379
- onOpenReport?: () => void): HTMLDivElement;
380
- /**
381
- * Findings section with severity/kind/region filter controls — the
382
- * panel-level entry point (wraps `buildFindingsSection(..., standalone:
383
- * true)` in its own collapsible "Findings" header + filter row). Returns
384
- * `null` when the source has no findings at all (nothing to filter).
385
- */
416
+ /** Opens the full report, which lists every finding. Omitted ⇒ no link. */
417
+ onOpenReport?: () => void, extras?: ResultsExtras): HTMLDivElement;
386
418
  /**
387
419
  * A host-supplied row at the top of the Findings section, for stating that a
388
420
  * category of finding is NOT present and offering to compute it.
@@ -410,11 +442,6 @@ export interface FindingsNotice {
410
442
  actionLabel?: string;
411
443
  onAction?: () => void;
412
444
  }
413
- export declare function buildFindingsSectionWithFilter(source: StatsSummary | LotStatsSummary, onFindingClick: (finding: StatsFinding, row: HTMLButtonElement) => void, activeFindingId: string | null, filter: FindingsFilter, onFilterChange: () => void,
414
- /** Panel element owning the collapsed state. Omit for a stateless render. */
415
- panel?: HTMLElement,
416
- /** See {@link FindingsNotice}. Rendered above the filter row. */
417
- notice?: FindingsNotice): HTMLDivElement | null;
418
445
  /**
419
446
  * Aggregate test value stats across all wafers in the lot. When every
420
447
  * wafer's `StatsSummary.stats.perTestStats`/`.testSpecYield` is available
@@ -472,6 +499,23 @@ onFindingMenu?: (findingId: string, row: HTMLElement, at: {
472
499
  }) => void): HTMLDivElement;
473
500
  /** Wrap the canvas + panel in a flex container according to placement. */
474
501
  export declare function wrapWithSummaryPanel(content: HTMLElement, panel: HTMLDivElement, placement: 'right' | 'left'): HTMLDivElement;
502
+ type WaferPanelParams = Parameters<typeof renderWaferSummaryContentSteps>[1];
503
+ type LotPanelParams = Parameters<typeof renderLotSummaryContentSteps>[1];
504
+ /** What a wafer's Summary can export: its Summary report and its Data tables. The panel's own buttons and a host's Export menu both open these. */
505
+ export declare function waferExportActions(anchor: HTMLElement, params: WaferPanelParams): {
506
+ openReport: (() => void) | null;
507
+ openTables: (() => void) | null;
508
+ };
509
+ /** What a lot's Summary can export: the lot's Summary report and its Data tables. See {@link waferExportActions}. */
510
+ export declare function lotExportActions(anchor: HTMLElement, params: LotPanelParams): {
511
+ openReport: () => void;
512
+ openTables: (() => void) | null;
513
+ };
514
+ /** The two exports as the Export menu lists them. */
515
+ export declare function exportActionList(a: {
516
+ openReport: (() => void) | null;
517
+ openTables: (() => void) | null;
518
+ }): ExportAction[];
475
519
  /**
476
520
  * {@link renderWaferSummaryContentSteps}, run straight through — the entry for a
477
521
  * caller that does not stage its render.
@@ -528,11 +572,9 @@ export declare function renderWaferSummaryContentSteps(panel: HTMLDivElement, pa
528
572
  onTestClick?: (testNumber: number) => void;
529
573
  /** The test `onTestClick` last showed, while it is still shown. */
530
574
  activeTest?: number | null;
531
- /** Opens a "What stands out" item's Worth a look card in Insights (`synthesisKey`). Omitted ⇒ no Chart links. */
575
+ /** Opens a "What stands out" item's card in Insights (`synthesisKey`). Omitted ⇒ no Chart links. */
532
576
  onShowChart?: (key: string) => void;
533
- findingsFilter?: FindingsFilter;
534
- onFindingsFilterChange?: () => void;
535
- /** See {@link FindingsNotice} — a host row at the top of the Findings section. */
577
+ /** See {@link FindingsNotice} — a host row at the top of What stands out. */
536
578
  findingsNotice?: FindingsNotice;
537
579
  onSaveText?: SaveTextHandler;
538
580
  /** Label/order hints for die metadata columns, e.g. `WaferMapResult.metadataFields`. */
@@ -540,11 +582,11 @@ export declare function renderWaferSummaryContentSteps(panel: HTMLDivElement, pa
540
582
  /** See `RenderOptions.dieList` — gates the "View die list" link below. */
541
583
  dieListOptions?: DieListDisplayOptions;
542
584
  /** A die row clicked in the Data tables: show that die on its map. */
543
- onLocateDie?: (die: Die, waferIndex: number | undefined) => void;
585
+ onLocateDie?: (die: Die, waferIndex: number | undefined, testNumber?: number) => void;
544
586
  /** The host's wafer attributes (`attributes` on the render options): what the Data tables call each field. */
545
587
  attributes?: Record<string, FacetCuration>;
546
588
  /**
547
- * Suppress the "Wafer Info" metadata section because the caller already
589
+ * Suppress the "Wafer information" metadata section because the caller already
548
590
  * renders this metadata elsewhere — `renderWaferMap` passes true whenever its
549
591
  * identity header is mounted (`showIdentity`, the default), since that
550
592
  * header's expandable panel is built from the very same
@@ -556,8 +598,12 @@ export declare function renderWaferSummaryContentSteps(panel: HTMLDivElement, pa
556
598
  * authoritative in neither place, is the thing being avoided in both cases.
557
599
  */
558
600
  metadataShownElsewhere?: boolean;
559
- /** Closes the panel; the panel's header shows a close button only when given. See {@link panelHeader}. */
560
- onClose?: () => void;
601
+ /** Receives the panel's Summary report and Data tables for the host's Export menu; the panel then draws no buttons for them. */
602
+ onExportActions?: (actions: ExportAction[]) => void;
603
+ /** Shows a bin's, a region's or a functional test's dies on the map. Omitted ⇒ those rows do not act. */
604
+ onShowDies?: (selection: DieSelection) => void;
605
+ /** The selection `onShowDies` last showed, while it is still shown. */
606
+ activeSelection?: string | null;
561
607
  }): Chunked<void>;
562
608
  /** Render lot-level content into the panel. Clears existing content. */
563
609
  /** A gallery item as the lot report reads it — every field optional, since a slot may not have loaded. */
@@ -617,12 +663,10 @@ export declare function renderLotSummaryContentSteps(panel: HTMLDivElement, para
617
663
  onTestClick?: (testNumber: number) => void;
618
664
  /** The test `onTestClick` last showed, while it is still shown. */
619
665
  activeTest?: number | null;
620
- /** Opens a "What stands out" item's Worth a look card in Insights (`synthesisKey`). Omitted ⇒ no Chart links. */
666
+ /** Opens a "What stands out" item's card in Insights (`synthesisKey`). Omitted ⇒ no Chart links. */
621
667
  onShowChart?: (key: string) => void;
622
668
  onWaferClick?: (waferIndex: number) => void;
623
- findingsFilter?: FindingsFilter;
624
- onFindingsFilterChange?: () => void;
625
- /** See {@link FindingsNotice} — a host row at the top of the Findings section. */
669
+ /** See {@link FindingsNotice} — a host row at the top of What stands out. */
626
670
  findingsNotice?: FindingsNotice;
627
671
  onSaveText?: SaveTextHandler;
628
672
  /** See the wafer panel's `warnings` — collected by the renderer so every surface agrees. */
@@ -630,17 +674,14 @@ export declare function renderLotSummaryContentSteps(panel: HTMLDivElement, para
630
674
  /** See `RenderOptions.dieList` — gates the "View die list" link below. */
631
675
  dieListOptions?: DieListDisplayOptions;
632
676
  /** A die row clicked in the Data tables: show that die on its map. */
633
- onLocateDie?: (die: Die, waferIndex: number | undefined) => void;
677
+ onLocateDie?: (die: Die, waferIndex: number | undefined, testNumber?: number) => void;
634
678
  /** The host's wafer attributes (`attributes` on the render options): what the Data tables call each field. */
635
679
  attributes?: Record<string, FacetCuration>;
636
- /** Per-wafer findings tally badged onto the Wafer Yield rows — see
637
- * `buildPerWaferYieldSection`. */
638
- findingsFor?: (waferIndex: number) => {
639
- total: number;
640
- unusual: number;
641
- notable: number;
642
- } | undefined;
643
- /** Closes the panel; the panel's header shows a close button only when given. See {@link panelHeader}. */
644
- onClose?: () => void;
680
+ /** Receives the panel's Summary report and Data tables for the host's Export menu; the panel then draws no buttons for them. */
681
+ onExportActions?: (actions: ExportAction[]) => void;
682
+ /** Shows a group's wafers, a wafer, a bin's, a region's or a functional test's dies on the cards. Omitted ⇒ those rows do not act. */
683
+ onShowDies?: (selection: DieSelection) => void;
684
+ /** The selection `onShowDies` last showed, while it is still shown. */
685
+ activeSelection?: string | null;
645
686
  }): Chunked<void>;
646
687
  //# sourceMappingURL=summaryPanel.d.ts.map