@wafertools/wafermap 0.35.1 → 0.37.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.
- package/AGENTS.md +13 -10
- package/CHANGELOG.md +474 -0
- package/README.md +7 -7
- package/dist/packages/canvas-adapter/chartPrefs.d.ts +16 -0
- package/dist/packages/canvas-adapter/chartPrefs.js +1 -0
- package/dist/packages/canvas-adapter/charts/capability.js +1 -1
- package/dist/packages/canvas-adapter/charts/cardAbout.d.ts +21 -0
- package/dist/packages/canvas-adapter/charts/cardAbout.js +1 -0
- package/dist/packages/canvas-adapter/charts/chartShell.d.ts +65 -12
- package/dist/packages/canvas-adapter/charts/chartShell.js +1 -1
- package/dist/packages/canvas-adapter/charts/commonality.d.ts +18 -0
- package/dist/packages/canvas-adapter/charts/commonality.js +1 -0
- package/dist/packages/canvas-adapter/charts/correlation.js +1 -1
- package/dist/packages/canvas-adapter/charts/groupComparison.d.ts +31 -0
- package/dist/packages/canvas-adapter/charts/groupComparison.js +1 -0
- package/dist/packages/canvas-adapter/charts/index.d.ts +0 -10
- package/dist/packages/canvas-adapter/charts/index.js +1 -1
- package/dist/packages/canvas-adapter/charts/patCard.d.ts +21 -0
- package/dist/packages/canvas-adapter/charts/patCard.js +1 -0
- package/dist/packages/canvas-adapter/charts/plotChart.d.ts +56 -2
- package/dist/packages/canvas-adapter/charts/plotChart.js +1 -1
- package/dist/packages/canvas-adapter/charts/pointInteractions.d.ts +2 -0
- package/dist/packages/canvas-adapter/charts/pointInteractions.js +1 -1
- package/dist/packages/canvas-adapter/charts/regionYieldDiagram.js +1 -1
- package/dist/packages/canvas-adapter/charts/sweep.js +1 -1
- package/dist/packages/canvas-adapter/dataTab.d.ts +3 -0
- package/dist/packages/canvas-adapter/dataTab.js +1 -1
- package/dist/packages/canvas-adapter/dieList.d.ts +12 -0
- package/dist/packages/canvas-adapter/dieList.js +2 -2
- package/dist/packages/canvas-adapter/differenceMapPanel.d.ts +26 -0
- package/dist/packages/canvas-adapter/differenceMapPanel.js +1 -0
- package/dist/packages/canvas-adapter/drilldown.d.ts +3 -0
- package/dist/packages/canvas-adapter/drilldown.js +1 -1
- package/dist/packages/canvas-adapter/filterButton.d.ts +3 -0
- package/dist/packages/canvas-adapter/filterButton.js +1 -0
- package/dist/packages/canvas-adapter/filterEditor.d.ts +53 -0
- package/dist/packages/canvas-adapter/filterEditor.js +1 -0
- package/dist/packages/canvas-adapter/guideWindow.d.ts +9 -1
- package/dist/packages/canvas-adapter/guideWindow.js +1 -1
- package/dist/packages/canvas-adapter/icons.js +1 -1
- package/dist/packages/canvas-adapter/index.d.ts +1 -0
- package/dist/packages/canvas-adapter/index.js +1 -1
- package/dist/packages/canvas-adapter/insightsTab.d.ts +57 -2
- package/dist/packages/canvas-adapter/insightsTab.js +1 -1
- package/dist/packages/canvas-adapter/pageFilter.d.ts +84 -0
- package/dist/packages/canvas-adapter/pageFilter.js +2 -0
- package/dist/packages/canvas-adapter/patMaps.d.ts +26 -0
- package/dist/packages/canvas-adapter/patMaps.js +1 -0
- package/dist/packages/canvas-adapter/plotCard.d.ts +67 -0
- package/dist/packages/canvas-adapter/plotCard.js +1 -0
- package/dist/packages/canvas-adapter/plotEditor.d.ts +13 -2
- package/dist/packages/canvas-adapter/plotEditor.js +1 -1
- package/dist/packages/canvas-adapter/plotModal.js +1 -1
- package/dist/packages/canvas-adapter/plotStore.js +1 -1
- package/dist/packages/canvas-adapter/plotTab.d.ts +6 -0
- package/dist/packages/canvas-adapter/plotTab.js +1 -1
- package/dist/packages/canvas-adapter/renderWaferGallery.d.ts +20 -5
- package/dist/packages/canvas-adapter/renderWaferGallery.js +1 -1
- package/dist/packages/canvas-adapter/renderWaferMap.d.ts +71 -37
- package/dist/packages/canvas-adapter/renderWaferMap.js +1 -1
- package/dist/packages/canvas-adapter/summaryPanel.d.ts +22 -9
- package/dist/packages/canvas-adapter/summaryPanel.js +4 -4
- package/dist/packages/canvas-adapter/testValueOffer.d.ts +14 -0
- package/dist/packages/canvas-adapter/testValueOffer.js +1 -0
- package/dist/packages/canvas-adapter/toCanvas.js +1 -1
- package/dist/packages/canvas-adapter/toolbar.d.ts +12 -6
- package/dist/packages/canvas-adapter/toolbar.js +2 -2
- package/dist/packages/canvas-adapter/userGuideHtml.d.ts +1 -1
- package/dist/packages/canvas-adapter/userGuideHtml.js +607 -117
- package/dist/packages/canvas-adapter/version.d.ts +2 -2
- package/dist/packages/canvas-adapter/version.js +1 -1
- package/dist/packages/canvas-adapter/warnings.js +1 -1
- package/dist/packages/core/aggregates.d.ts +10 -0
- package/dist/packages/core/aggregates.js +1 -1
- package/dist/packages/core/classify.d.ts +11 -0
- package/dist/packages/core/classify.js +1 -1
- package/dist/packages/core/dieTable.d.ts +5 -0
- package/dist/packages/core/dieTable.js +1 -1
- package/dist/packages/core/dies.d.ts +2 -0
- package/dist/packages/core/dies.js +1 -1
- package/dist/packages/core/wafer.d.ts +10 -1
- package/dist/packages/core/wafer.js +1 -1
- package/dist/packages/renderer/buildView.d.ts +5 -0
- package/dist/packages/renderer/buildView.js +1 -1
- package/dist/packages/renderer/buildWaferMap.d.ts +21 -4
- package/dist/packages/renderer/buildWaferMap.js +1 -1
- package/dist/packages/renderer/deprecate.d.ts +2 -8
- package/dist/packages/renderer/deprecate.js +1 -1
- package/dist/packages/renderer/derivedTests/parser.js +1 -1
- package/dist/packages/renderer/fmt.d.ts +10 -0
- package/dist/packages/renderer/fmt.js +1 -1
- package/dist/packages/renderer/index.d.ts +1 -0
- package/dist/packages/renderer/index.js +1 -1
- package/dist/packages/renderer/testLabel.d.ts +0 -11
- package/dist/packages/renderer/testLabel.js +1 -1
- package/dist/packages/renderer/valueFilter.d.ts +1 -1
- package/dist/packages/renderer/valueFilter.js +1 -1
- package/dist/packages/stats/analyzeWaferLot.d.ts +22 -0
- package/dist/packages/stats/analyzeWaferLot.js +1 -1
- package/dist/packages/stats/analyzeWaferMap.d.ts +26 -1
- package/dist/packages/stats/analyzeWaferMap.js +1 -1
- package/dist/packages/stats/binPareto.d.ts +2 -54
- package/dist/packages/stats/binPareto.js +1 -1
- package/dist/packages/stats/binRows.js +1 -1
- package/dist/packages/stats/capability.d.ts +10 -0
- package/dist/packages/stats/capability.js +1 -1
- package/dist/packages/stats/cardSpec.d.ts +53 -0
- package/dist/packages/stats/cardSpec.js +1 -0
- package/dist/packages/stats/chartCatalogue.d.ts +37 -0
- package/dist/packages/stats/chartCatalogue.js +1 -0
- package/dist/packages/stats/clusterDetection.d.ts +9 -0
- package/dist/packages/stats/clusterDetection.js +1 -1
- package/dist/packages/stats/commonality.d.ts +62 -0
- package/dist/packages/stats/commonality.js +1 -0
- package/dist/packages/stats/connectedComponents.js +1 -1
- package/dist/packages/stats/control.d.ts +21 -0
- package/dist/packages/stats/control.js +1 -0
- package/dist/packages/stats/correlation.d.ts +42 -4
- package/dist/packages/stats/correlation.js +1 -1
- package/dist/packages/stats/dieRegions.d.ts +4 -1
- package/dist/packages/stats/dieRegions.js +1 -1
- package/dist/packages/stats/differenceMap.d.ts +22 -0
- package/dist/packages/stats/differenceMap.js +1 -0
- package/dist/packages/stats/examplePicks.d.ts +22 -0
- package/dist/packages/stats/examplePicks.js +1 -0
- package/dist/packages/stats/filterFile.d.ts +41 -0
- package/dist/packages/stats/filterFile.js +2 -0
- package/dist/packages/stats/filterFindings.d.ts +21 -6
- package/dist/packages/stats/filterFindings.js +1 -1
- package/dist/packages/stats/findingText.d.ts +8 -0
- package/dist/packages/stats/findingText.js +2 -2
- package/dist/packages/stats/groupCompare.d.ts +87 -0
- package/dist/packages/stats/groupCompare.js +1 -0
- package/dist/packages/stats/guideSections.d.ts +55 -0
- package/dist/packages/stats/guideSections.js +1 -0
- package/dist/packages/stats/index.d.ts +5 -2
- package/dist/packages/stats/index.js +1 -1
- package/dist/packages/stats/lotDrift.js +1 -1
- package/dist/packages/stats/math.d.ts +29 -4
- package/dist/packages/stats/math.js +1 -1
- package/dist/packages/stats/mergeTestDefs.js +1 -1
- package/dist/packages/stats/metadataColumns.d.ts +3 -0
- package/dist/packages/stats/metadataColumns.js +1 -1
- package/dist/packages/stats/pat.d.ts +58 -0
- package/dist/packages/stats/pat.js +1 -0
- package/dist/packages/stats/patSummary.d.ts +45 -0
- package/dist/packages/stats/patSummary.js +1 -0
- package/dist/packages/stats/patternClassification.d.ts +3 -3
- package/dist/packages/stats/patternClassification.js +1 -1
- package/dist/packages/stats/plotData.d.ts +294 -17
- package/dist/packages/stats/plotData.js +1 -1
- package/dist/packages/stats/plotId.d.ts +2 -0
- package/dist/packages/stats/plotId.js +1 -1
- package/dist/packages/stats/plotReferences.d.ts +17 -0
- package/dist/packages/stats/plotReferences.js +1 -0
- package/dist/packages/stats/plotSpec.d.ts +239 -3
- package/dist/packages/stats/plotSpec.js +4 -4
- package/dist/packages/stats/regions.js +1 -1
- package/dist/packages/stats/renderSummaryReport.js +33 -33
- package/dist/packages/stats/reportHtml.d.ts +5 -12
- package/dist/packages/stats/reportHtml.js +98 -40
- package/dist/packages/stats/synthesis.d.ts +48 -16
- package/dist/packages/stats/synthesis.js +1 -1
- package/dist/packages/stats/testPassRate.d.ts +7 -0
- package/dist/packages/stats/testPassRate.js +1 -1
- package/dist/packages/stats/testValueBudget.d.ts +15 -0
- package/dist/packages/stats/testValueBudget.js +1 -0
- package/dist/packages/stats/types.d.ts +90 -30
- package/dist/packages/stats/yield.d.ts +3 -11
- package/dist/packages/stats/yield.js +1 -1
- package/llms.txt +1 -1
- package/package.json +2 -1
- package/dist/packages/canvas-adapter/charts/barPanel.d.ts +0 -83
- package/dist/packages/canvas-adapter/charts/barPanel.js +0 -1
- package/dist/packages/canvas-adapter/charts/binCluster.d.ts +0 -27
- package/dist/packages/canvas-adapter/charts/binCluster.js +0 -1
- package/dist/packages/canvas-adapter/charts/boxplot.d.ts +0 -72
- package/dist/packages/canvas-adapter/charts/boxplot.js +0 -1
- package/dist/packages/canvas-adapter/charts/groupedBarPlot.d.ts +0 -53
- package/dist/packages/canvas-adapter/charts/groupedBarPlot.js +0 -1
- package/dist/packages/canvas-adapter/charts/histogram.d.ts +0 -61
- package/dist/packages/canvas-adapter/charts/histogram.js +0 -1
- package/dist/packages/canvas-adapter/charts/scatter.d.ts +0 -80
- package/dist/packages/canvas-adapter/charts/scatter.js +0 -1
- package/dist/packages/canvas-adapter/charts/testPassRate.d.ts +0 -27
- package/dist/packages/canvas-adapter/charts/testPassRate.js +0 -1
- package/dist/packages/canvas-adapter/charts/trend.d.ts +0 -50
- package/dist/packages/canvas-adapter/charts/trend.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{requireRingCount as K}from"../core/ringCount.js";import{hasPosition as
|
|
1
|
+
import{requireRingCount as K}from"../core/ringCount.js";import{hasPosition as P,isPositionedDie as M}from"../core/dies.js";import{testsPresent as G,testValue as R}from"../core/dieTable.js";import{DIE_REGIONS as D,DIE_REGION_KEYS as O}from"../stats/dieRegions.js";import{isParametricTest as _,getTestPassStatus as E}from"../renderer/buildWaferMap.js";import{resolveMetadataColumns as z}from"../stats/metadataColumns.js";import{LEADING as N,TRACKING as B,wireControlHover as W,controlStyle as j,SPACE as V,RADIUS as k,FONT as w,CLR as f}from"./toolbar.js";import{exportCsv as Y}from"./tableExport.js";import{fmt as U}from"../renderer/fmt.js";import{testLabel as A,markedTestLabel as H,derivedFields as X,derivedKeyText as q,derivedTestSource as J,isDerivedTest as Q,DERIVED_KEY as Z}from"../renderer/testLabel.js";const L=(n,r)=>r?`${n} (${r})`:n,ee=5e4,F=new WeakSet;export function ensureStylesInjected(n){if(F.has(n))return;F.add(n);const r=n.createElement("style");r.textContent=`
|
|
2
2
|
.wmap-dielist-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
|
|
3
3
|
.wmap-dielist-th {
|
|
4
4
|
text-align: left; padding: 4px 8px; position: sticky; top: 0;
|
|
@@ -9,4 +9,4 @@ import{requireRingCount as K}from"../core/ringCount.js";import{hasPosition as D,
|
|
|
9
9
|
padding: 4px 8px; color: ${f.text};
|
|
10
10
|
border-bottom: 1px solid ${f.menuBorder}; white-space: nowrap;
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
12
|
+
`,n.head.appendChild(r)}function c(n,r,t,l){const s=n.createElement(r);return t&&Object.assign(s.style,t),l!==void 0&&(s.textContent=l),s}function te(n){return P(n)?String(n.x):""}function ne(n){return P(n)?String(n.y):""}function le(n,r){return r!==void 0?r.filter(t=>t.testNumber!==void 0):G(n,"values").map(t=>({testNumber:t,name:A(void 0,t)}))}function re(n,r,t){if(!r)return[];const l=K(t,"the die list"),s=[];for(const v of O){const p=D[v],u=o=>({wafer:r(o),ringCount:l});if(!n.some(o=>M(o)&&p.valueOf(o,u(o))!==void 0))continue;const h=new Map,a=o=>{let e=h.get(o);return e===void 0&&(e=p.valueOf(o,u(o))??"",h.set(o,e)),e};s.push({label:p.label,get:a,...p.rawOf?{csvGet:o=>p.rawOf(o,u(o))??""}:{}})}return s}export function resolveDieColumns(n,r,t={}){const l=le(n,r),s=re(n,t.getWafer,t),v=n.some(e=>e.edgeExcluded===!0),p=[...t.extraColumn?[t.extraColumn.label]:[],"X","Y",...O.map(e=>D[e].label),"Edge excluded","Site","Hard bin","Soft bin","PAT","PAT tests",...l.map(e=>L(A(e,e.testNumber),e.unit))],{columns:u,truncatedKeys:h}=z({dies:n,waferMetadata:t.waferMetadata,metadataFields:t.metadataFields,dieKeys:t.metadataColumns,waferKeys:t.waferMetadataColumns==="none"?"none":void 0,waferPlacement:t.waferMetadataColumns??"csv",reservedLabels:p,curation:t.attributes}),a=[...t.extraColumn?[{label:t.extraColumn.label,get:e=>t.extraColumn.get(e)??""}]:[],{label:"X",get:te},{label:"Y",get:ne},...s,...v?[{label:"Edge excluded",get:e=>e.edgeExcluded?"Yes":"No"}]:[],{label:"Site",get:e=>e.siteNum!==void 0?String(e.siteNum):""},{label:"Hard bin",get:e=>e.hbin!==void 0?String(e.hbin):""},{label:"Soft bin",get:e=>e.sbin!==void 0?String(e.sbin):""},...t.patColumns?[{label:"PAT",get:e=>t.patColumns.verdict(e)??""},...t.patColumns.anyOutlier?[{label:"PAT tests",get:e=>t.patColumns.tests(e)}]:[]]:[],...l.map(e=>{const y=!_(e);return{test:e,label:L(H(e,e.testNumber),e.unit),...Q(e)?{csvLabel:`${L(A(e,e.testNumber),e.unit)} [derived from ${J(e)??Z}]`}:{},get:d=>{if(y){const m=E(d,e.testNumber,e);return m===void 0?"":m?"PASS":"FAIL"}const x=R(d,e.testNumber);if(x!==void 0)return U(x,e.unit);const C=E(d,e.testNumber,e);return C===void 0?"":C?"PASS":"FAIL"},csvGet:d=>{if(y){const m=E(d,e.testNumber,e);return m===void 0?"":m?"PASS":"FAIL"}const x=R(d,e.testNumber);if(x!==void 0)return x;const C=E(d,e.testNumber,e);return C===void 0?"":C?"PASS":"FAIL"}}}),...u.map(e=>({label:e.label,get:e.get,csvOnly:e.csvOnly}))],o=a.filter(e=>!e.csvOnly);return{columns:a,visibleColumns:o,testColumns:l,truncatedKeys:h}}export function buildDieListSection(n,r,t={}){if(!n.length)return null;const l=t.ownerDocument??document;ensureStylesInjected(l);const s=t.maxRows??ee,v=Math.max(0,n.length-s),p=v>0?n.slice(0,s):n,u=c(l,"div",{display:"flex",flexDirection:"column",gap:V.md,flex:"1",minHeight:"0",minWidth:"0"}),h=c(l,"div",{display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:"0"});h.appendChild(c(l,"div",{fontSize:w.meta,fontWeight:"700",letterSpacing:B,textTransform:"uppercase",color:f.label},t.title??`Die list (${n.length})`));const a=c(l,"button",{fontSize:w.body,padding:"3px 8px",borderRadius:k.control,...j("outlined"),background:f.menuBg},"Export CSV");a.type="button",W(a),h.appendChild(a),u.appendChild(h),t.note&&u.appendChild(c(l,"div",{fontSize:w.body,color:f.label,lineHeight:N.base,flexShrink:"0"},t.note));const{columns:o,visibleColumns:e,testColumns:y,truncatedKeys:d}=resolveDieColumns(n,r,t),x=q(y.map(i=>({label:H(i,i.testNumber),...X(i)})));x&&u.appendChild(c(l,"div",{fontSize:w.body,color:f.label,lineHeight:N.base,flexShrink:"0"},x));const C=c(l,"div",{overflow:"auto",flex:"1",minHeight:"0",minWidth:"0",border:`1px solid ${f.menuBorder}`,borderRadius:k.control,...t.maxHeight?{maxHeight:t.maxHeight}:{}}),m=l.createElement("table");m.className="wmap-dielist-table",m.setAttribute("aria-label",t.title??`Die list (${n.length} dies)`);const $=c(l,"thead"),T=c(l,"tr");for(const i of e){const b=l.createElement("th");b.className="wmap-dielist-th",b.scope="col",b.textContent=i.label,T.appendChild(b)}$.appendChild(T),m.appendChild($);const I=c(l,"tbody");for(const i of p){const b=c(l,"tr");for(const g of e){const S=l.createElement("td");S.className="wmap-dielist-td",S.textContent=g.get(i),b.appendChild(S)}I.appendChild(b)}if(m.appendChild(I),C.appendChild(m),u.appendChild(C),v>0||d.length>0){const i=[];v>0&&i.push(`Showing the first ${s.toLocaleString()} of ${n.length.toLocaleString()} dies. The CSV export contains all ${n.length.toLocaleString()}.`),d.length>0&&i.push(`${d.length} further metadata field${d.length===1?"":"s"} not shown.`),u.appendChild(c(l,"div",{fontSize:w.body,color:f.label,lineHeight:N.base,flexShrink:"0"},i.join(" ")))}return a.addEventListener("click",()=>{if(a.disabled)return;const i=a.textContent,b=Y(o.map(g=>({header:g.csvLabel??g.label,get:g.csvGet??g.get})),n,"die-list.csv",t.onSaveText,{onProgress:(g,S)=>{a.textContent=S?`Exporting ${Math.floor(100*g/S)}%`:`Exporting ${g.toLocaleString()} rows`}});b&&(a.disabled=!0,a.setAttribute("aria-busy","true"),b.catch(()=>{}).finally(()=>{a.disabled=!1,a.removeAttribute("aria-busy"),a.textContent=i}))}),u}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type TestDef } from '../renderer/buildWaferMap.js';
|
|
2
|
+
import type { Die } from '../core/dies.js';
|
|
3
|
+
import { type SaveImageHandler } from './charts/chartShell.js';
|
|
4
|
+
import { type RenderableWaferMap } from './renderWaferMap.js';
|
|
5
|
+
export interface DifferenceMapPanelOptions {
|
|
6
|
+
groups: ReadonlyArray<{
|
|
7
|
+
key: string;
|
|
8
|
+
items: ReadonlyArray<{
|
|
9
|
+
dies: readonly Die[];
|
|
10
|
+
passBins: readonly number[];
|
|
11
|
+
source?: RenderableWaferMap;
|
|
12
|
+
}>;
|
|
13
|
+
}>;
|
|
14
|
+
testDefs: readonly TestDef[];
|
|
15
|
+
groupLabelText?: string;
|
|
16
|
+
/** The test the other panels show: the map starts on it, and follows it until the reader picks a measure here. */
|
|
17
|
+
selectedTestNumber?: number;
|
|
18
|
+
onSaveImage?: SaveImageHandler;
|
|
19
|
+
ownerDocument?: Document;
|
|
20
|
+
}
|
|
21
|
+
export declare function renderDifferenceMapPanel(o: DifferenceMapPanelOptions): {
|
|
22
|
+
card: HTMLElement;
|
|
23
|
+
setTest: (n: number) => void;
|
|
24
|
+
destroy: () => void;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=differenceMapPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{differenceMap as z}from"../stats/differenceMap.js";import{isParametricTest as F}from"../renderer/buildWaferMap.js";import{testLabel as E}from"../renderer/testLabel.js";import{fmt as A}from"../renderer/fmt.js";import{CLR as I,FONT as M,SPACE as R}from"./toolbar.js";import{cardShell as Y,guideCite as W,makeListSelect as k,renderEmptyState as _}from"./charts/chartShell.js";import{GUIDE_SECTIONS as U}from"../stats/guideSections.js";import{renderWaferMap as q}from"./renderWaferMap.js";import{cardAbout as H}from"./charts/cardAbout.js";const c="\0yield";export function renderDifferenceMapPanel(s){const n=s.ownerDocument??document,{card:y,body:x,controlsRow:O,setAbout:B}=Y("Difference map",s.onSaveImage,n,{png:!1});B(H("difference-map")),y.dataset.wmapDifferenceMap="1";const p=s.groups.map(e=>e.key),l=s.testDefs.filter(F);let a=p[0],i=p[1],t=s.selectedTestNumber!==void 0&&l.some(e=>e.testNumber===s.selectedTestNumber)?String(s.selectedTestNumber):l[0]?String(l[0].testNumber):c,C=!0,b;if(p.length<2)return _(x,"Needs two groups to subtract."),{card:y,setTest:()=>{},destroy:()=>{}};const D=(s.groupLabelText??"Group").toLowerCase(),T=(e,m,u,S)=>k(p.map(o=>({value:o,label:o})),e,o=>{S(o),h()},{ownerDocument:n,ariaLabel:m,hook:u}),w=n.createElement("span");w.textContent="minus",Object.assign(w.style,{color:I.label,fontSize:M.body});const L=()=>k([{value:c,label:"Yield"},...l.map(e=>({value:String(e.testNumber),label:E(e,e.testNumber)}))],t,e=>{t=e,C=!1,h()},{ownerDocument:n,ariaLabel:"Measure",hook:"difference-measure",searchPlaceholder:"Filter tests\u2026"});let $=L();O.append(T(a,`First ${D}`,"difference-a",e=>{a=e}),w,T(i,`Second ${D}`,"difference-b",e=>{i=e}),$);const d=n.createElement("div");Object.assign(d.style,{color:I.label,fontSize:M.body,marginBottom:R.sm});const g=n.createElement("div");Object.assign(g.style,{position:"relative",height:"380px"}),x.append(d,g);function h(){if(b?.destroy(),b=void 0,g.replaceChildren(),a===i){d.textContent="Choose two different groups.";return}const e=s.groups.find(f=>f.key===a),m=s.groups.find(f=>f.key===i),u=t===c?{yield:!0}:{test:Number(t)},S=t===c?void 0:l.find(f=>f.testNumber===Number(t)),o=t===c?"Yield":E(S,Number(t)),v=t===c?"%":S?.unit,r=z(e.items,m.items,u);d.textContent=r.compared?`${o}: ${a} (${e.items.length} wafer${e.items.length===1?"":"s"}) minus ${i} (${m.items.length}), each the mean over its wafers at the position${t===c?" of the share passing":""}. ${r.compared.toLocaleString("en-GB")} positions compared; the colours run from \u2212${A(r.maxAbs,v)} to +${A(r.maxAbs,v)}, zero in the middle. Grey: a position one group has no value at.`:`${a} and ${i} have no position with a value of ${o} in common.`,r.compared&&d.append(W(n,U.heatmap),".");const N=e.items[0]?.source;if(!N||!r.compared)return;const{metadata:J,...G}=N.wafer,P={...N,wafer:G,dies:r.dies,passBins:[...e.items[0].passBins],testDefs:[{testNumber:0,name:`${o}: ${a} \u2212 ${i}`,unit:v}]},j=[-(r.maxAbs||1),r.maxAbs||1];b=q(g,P,{viewOptions:{plotMode:"value",activeTest:0,valueRange:j},showIdentity:!1,insights:{enabled:!1},onSaveImage:s.onSaveImage})}return h(),{card:y,setTest:e=>{if(!C||!l.some(u=>u.testNumber===e)||String(e)===t)return;t=String(e);const m=L();$.replaceWith(m),$=m,h()},destroy:()=>{b?.destroy()}}}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Die } from '../core/dies.js';
|
|
2
|
+
import type { BinColors } from '../renderer/binColors.js';
|
|
2
3
|
import type { FacetCuration } from '../stats/facets.js';
|
|
3
4
|
import { type SaveImageHandler, type SaveTextHandler } from './toolbar.js';
|
|
4
5
|
import type { DrilldownSource, DrilldownItem } from './chartPopulation.js';
|
|
@@ -10,6 +11,8 @@ export interface DrilldownContext {
|
|
|
10
11
|
attributes?: Record<string, FacetCuration>;
|
|
11
12
|
/** The reader's saved plots: each is a row in the menu, opened on the selection. */
|
|
12
13
|
plots?: PlotStore;
|
|
14
|
+
/** The maps' bin colours, read when a plot is drawn: a plot coloured by bin draws each bin in its map colour. */
|
|
15
|
+
getBinColors?: () => BinColors;
|
|
13
16
|
onSaveImage?: SaveImageHandler;
|
|
14
17
|
/** The host's CSV save hook, for the tables' Export CSV. */
|
|
15
18
|
onSaveText?: SaveTextHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isYieldEligibleDie as
|
|
1
|
+
import{isYieldEligibleDie as T}from"../core/dies.js";import{testValue as R}from"../core/dieTable.js";import{isParametricTest as C}from"../renderer/buildWaferMap.js";import{buildSweepData as k}from"../stats/sweep.js";import{plotToSweep as E}from"../stats/plotSpec.js";import{renderPlotCard as F}from"./plotCard.js";import{renderCapabilityPanel as L}from"./charts/capability.js";import{makeTestSelect as O,openChartExpandModal as V,populationPhrase as v}from"./charts/chartShell.js";import{openCommandMenu as W,CLR as A,FONT as B,SPACE as q,openReparentedModal as z}from"./toolbar.js";import{requireRingCount as _}from"../core/ringCount.js";import{defaultPlot as j,defaultSweep as H,fieldCatalogue as K,plotTitle as U,resolvePlot as Y}from"../stats/plotData.js";import{newPlotId as M}from"../stats/plotSpec.js";import{sourceFromPoints as G,toPlotItems as S}from"./plotItems.js";const N=30,b=e=>e.items.flatMap(t=>t.dies);function J(e){return e.items.map(t=>({...t,dies:t.dies.filter(n=>T(n))}))}function y(e,t,n){return(e.testDefs??[]).filter(C).map(s=>s.testNumber).filter(s=>{let l=0;for(const o of t){const r=R(o,s);if(r!==void 0&&Number.isFinite(r)&&++l>=n)return!0}return!1})}function $(e,t,n,s,l){const o=e.ownerDocument.createElement("div");o.textContent=n,o.dataset.wmapPopulation="1",Object.assign(o.style,{color:A.label,fontSize:B.body,marginBottom:q.sm});const r=e.querySelector("[data-wmap-card-menu]")?.parentElement;r?.parentElement===e?r.after(o):e.prepend(o);const p=V(e,t,{anchor:s,onClosed:l});return()=>p?.close()}function Q(e,t){const n=b(t);return t.notMeasuredReason?t.notMeasuredReason:n.some(l=>T(l))?k(n,t.testDefs,e).series.some(l=>l.points.some(o=>o.count>0))?null:"These dies have no values for this sweep\u2019s tests":"These dies are all partial or edge-excluded, which charts leave out"}function X(e,t,n){const s=J(e),l=b(e).length,o=s.flatMap(a=>a.dies),r=v(o.length,l,e.population),p=(e.testDefs??[]).filter(C),c=n.ownerDocument,u=(a,i)=>e.notMeasuredReason?e.notMeasuredReason:o.length===0?"These dies are all partial or edge-excluded, which charts leave out":y(e,o,a).length>0?null:i,d={section:"Distributions",label:"Value histogram",unavailable:u(1,"These dies have no parametric test values"),open:()=>{let a=e.activeTest??p[0]?.testNumber;const i=p.filter(D=>D.testNumber!==void 0),f=O(i,a??null,D=>{a=D,w.refresh()},{ownerDocument:c}),h=S(s),g=I(e,t,n);let P;const w=F({doc:c,items:h,ctx:{testDefs:p,curation:t.attributes},extras:[f],spec:{choices:[],build:()=>({id:"drill-histogram",title:"Value histogram",chart:"histogram",fields:{y:{slot:"test"},color:{none:!0}}})},slots:()=>({test:a}),chart:{onSaveImage:t.onSaveImage,binColors:t.getBinColors?.()},editAsPlot:g?D=>{P?.(),g(D,!0)()}:void 0});P=$(w.card,`Value histogram \u2014 ${r}`,`Population: ${r}`,n,()=>w.destroy())}},m={section:"Distributions",label:"Process capability",unavailable:u(2,"Needs at least 2 of these dies with values for one test"),open:()=>{const a=L({title:"Process capability",items:s,testDefs:p,selectedTestNumber:e.activeTest,onSaveImage:t.onSaveImage,ownerDocument:c}),i=o.length<N?` \xB7 fewer than ${N} dies, so each Ppk is a rough estimate`:"";$(a.card,`Process capability \u2014 ${r}`,`Population: ${r}${i}`,n,()=>a.destroy())}};return[d,m]}function I(e,t,n){const s=t.plots;if(!s)return null;const l=n.ownerDocument,o=S(e.items),r={testDefs:e.testDefs,curation:t.attributes},p=b(e),c=v(p.length,p.length,e.population),u=v(p.filter(d=>T(d)).length,p.length,e.population);return(d,m)=>()=>{const a=d.chart==="sweep",i=a?u:c;import("./plotModal.js").then(({openPlotEditor:f})=>f({doc:l,anchor:n,store:s,plot:d,draft:m,items:o,ctx:r,population:i,rawPopulation:e.population,title:`${m?a?"New sweep":"New plot":a?"Sweep":"Plot"} \u2014 ${i}`,chart:{onSaveImage:t.onSaveImage,binColors:t.getBinColors?.(),onSelectPoints:(h,g,P)=>{const w=G(h,o,e.testDefs);w&&openDrilldownMenu(g,P,w,t)}}}))}}function Z(e,t,n){const s=t.plots,l=I(e,t,n);if(!s||!l)return[];const o=S(e.items),r={testDefs:e.testDefs,curation:t.attributes},p=b(e),c=e.notMeasuredReason??(p.length===0?"Nothing is selected":null),u=s.get().map(i=>{const f=E(i);if(f)return{section:"Plots",label:f.title,unavailable:Q(f,e),open:l(i,!1)};const h=Y(i,o,r);return{section:"Plots",label:U(h)||"Plot",unavailable:c??h.issues[0]??(h.plotted===0?"No die here has the values this plot needs":null),open:l(i,!1)}}),d=K(o,r),m=d.some(i=>i.group==="Tests");u.push({section:"Plots",label:"New plot\u2026",unavailable:c??(m?null:"These dies have no parametric test values"),open:l(j(d,M()),!0)});const a=(e.testDefs??[]).filter(i=>C(i));return u.push({section:"Plots",label:"New sweep\u2026",unavailable:c??(a.length>0?null:"These dies have no parametric test values"),open:l(H(e.testDefs??[],M()),!0)}),u}function x(e,t,n){const s=b(e),l=e.notMeasuredReason??(s.length===0?"Nothing is selected":null),o=s.length,r=v(o,o,e.population),p=(c,u)=>()=>{import("./dataTab.js").then(({renderSelectionTables:d})=>{const m=n.ownerDocument;let a;const i=d({doc:m,ringCount:_(e.items[0],"the drilldown tables"),items:e.items,testDefs:e.testDefs,population:e.population,view:c,onSaveText:t.onSaveText,onLocateDie:t.onLocateDie?(h,g)=>{a?.(),t.onLocateDie(h,g)}:void 0}),f=z([i.el],{title:`${u} \u2014 ${r}`,anchor:n,ownerDocument:m,boxSize:{width:"min(96vw, 1200px)",height:"min(92vh, 780px)"},onClosed:i.destroy});f?a=()=>f.close():i.destroy()})};return[{section:"Tables",label:"Test statistics",unavailable:l??(y(e,s,1).length>0?null:"These dies have no parametric test values"),open:p("statistics","Test statistics")},...e.items.length>1?[{section:"Tables",label:"Wafers",unavailable:l,open:p("wafers","Wafers")}]:[],{section:"Tables",label:"Dies",unavailable:l,open:p("dies","Dies")}]}function ee(e,t,n){return[...X(e,t,n),...Z(e,t,n),...x(e,t,n)]}export function openDrilldownMenu(e,t,n,s){const l=ee(n,s,t),o=[];if(s.narrower){const{label:u,source:d,ctx:m}=s.narrower,a={label:`${s.narrower.backLabel??"All selected"} \u2014 ${v(b(n).length,b(n).length,n.population)}`,source:n,ctx:s};o.push({section:"Dies"}),o.push({label:u,active:!1,action:!0,enabled:!0,onClick:()=>{c(),openDrilldownMenu(e,t,d,{...m??s,narrower:a})}})}let r;for(const u of l)u.section!==r&&(o.push({section:u.section}),r=u.section),o.push({label:u.label,active:!1,action:!0,enabled:u.unavailable===null,disabledHint:u.unavailable??void 0,onClick:()=>{c(),u.open()}});const p=b(n).length,c=W(new DOMRect(e.x,e.y-4,0,0),t,o,`Open a chart or table of ${v(p,p,n.population)}`,{hook:"wmapDrilldownMenu"});return c}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FONT as d,SPACE as l,controlStyle as a,wireControlHover as c,wireTooltip as b}from"./toolbar.js";export function bandButton(e,n,o,r,i){const t=e.createElement("button");return t.type="button",t.textContent=n,t.dataset[o]="1",Object.assign(t.style,{...a("outlined"),fontSize:d.body,padding:`0 ${l.md}`}),c(t),b(t,r),t.addEventListener("click",i),t}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type FieldOption } from '../stats/plotData.js';
|
|
2
|
+
import { type PlotField, type PlotFilter } from '../stats/plotSpec.js';
|
|
3
|
+
import type { TestDef } from '../renderer/buildWaferMap.js';
|
|
4
|
+
import type { FacetCuration } from '../stats/facets.js';
|
|
5
|
+
export interface FilterEditorOptions {
|
|
6
|
+
doc: Document;
|
|
7
|
+
/** The population's fields; those a condition can be on are taken from it (`filterFields`). */
|
|
8
|
+
catalogue: readonly FieldOption[];
|
|
9
|
+
filter: PlotFilter | undefined;
|
|
10
|
+
/** Called with the filter after every change; `undefined` once the last condition is removed. */
|
|
11
|
+
onChange: (next: PlotFilter | undefined) => void;
|
|
12
|
+
/** The values a category field takes on the population, in order. */
|
|
13
|
+
valuesOf: (field: PlotField) => string[];
|
|
14
|
+
/** The range a number field spans on the population. */
|
|
15
|
+
extentOf: (field: PlotField) => [number, number] | undefined;
|
|
16
|
+
testDefs?: readonly TestDef[];
|
|
17
|
+
/** The host's names for wafer attributes, so a condition names a field as Group by and the plots do. */
|
|
18
|
+
attributes?: Record<string, FacetCuration>;
|
|
19
|
+
/** The switch's text: what is filtered ("Filter this plot", "Filter Insights"). */
|
|
20
|
+
switchLabel: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FilterEditorHandle {
|
|
23
|
+
el: HTMLElement;
|
|
24
|
+
/** The filter changed elsewhere (the card's switch, Clear): show it. */
|
|
25
|
+
set(filter: PlotFilter | undefined): void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The fields a condition can be on: every category and number in the catalogue except Test, which divides a set of
|
|
29
|
+
* tests rather than the dies, and the pass-rate columns, which are 100 or 0 per die (a verdict is under Verdicts).
|
|
30
|
+
*/
|
|
31
|
+
export declare function filterFields(catalogue: readonly FieldOption[]): FieldOption[];
|
|
32
|
+
export declare function buildFilterEditor(o: FilterEditorOptions): FilterEditorHandle;
|
|
33
|
+
export interface FilterStripOptions {
|
|
34
|
+
doc: Document;
|
|
35
|
+
filter: PlotFilter;
|
|
36
|
+
testDefs?: readonly TestDef[];
|
|
37
|
+
attributes?: Record<string, FacetCuration>;
|
|
38
|
+
/** What the switch names ("Filter", "Insights filter"). */
|
|
39
|
+
label: string;
|
|
40
|
+
/** The switch was flipped: `on` true applies the conditions again. */
|
|
41
|
+
onToggle: (on: boolean) => void;
|
|
42
|
+
/** Said after the conditions while the filter is on: what it kept ("18 of 25 wafers"). */
|
|
43
|
+
kept?: string;
|
|
44
|
+
/** Buttons at the end of the line (Edit, Clear). */
|
|
45
|
+
actions?: HTMLElement[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A filter as one line wherever its result is shown: a switch, each condition in words, and while on what it kept.
|
|
49
|
+
* Filtering is never hidden, so the line stays while the filter is off, muted and saying so, until the filter is
|
|
50
|
+
* removed. The same line on a plot card and above every Insights tab.
|
|
51
|
+
*/
|
|
52
|
+
export declare function buildFilterStrip(o: FilterStripOptions): HTMLElement;
|
|
53
|
+
//# sourceMappingURL=filterEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{conditionText as E,conditionUnit as J,fieldKey as T}from"../stats/plotData.js";import{sameField as M}from"../stats/plotSpec.js";import{CLR as C,FONT as F,RADIUS as I,SPACE as r,controlStyle as P,wireControlHover as H,wireTooltip as K}from"./toolbar.js";import{inputStyle as U,makeListSelect as V,makeSegmented as Y,makeToggle as D}from"./charts/chartShell.js";export function filterFields(n){return n.filter(o=>o.group!=="Pass rates"&&!("builtin"in o.field&&o.field.builtin==="test"))}const G=n=>!n.categorical,L=n=>String(Number(n.toPrecision(6)));export function buildFilterEditor(n){const{doc:o}=n,S=filterFields(n.catalogue),u=e=>S.find(s=>M(s.field,e)),m=e=>e?JSON.parse(JSON.stringify(e)):void 0;let i=m(n.filter),y=!1;const h=o.createElement("div");h.dataset.wmapFilterEditor="1",Object.assign(h.style,{display:"flex",flexDirection:"column",gap:r.md});const d=e=>{i&&i.conditions.length===0&&(i=void 0),n.onChange(m(i)),e&&k()};function B(e){if(G(e)){const t=n.extentOf(e.field);return t?{field:e.field,min:t[0],max:t[1]}:void 0}const s=n.valuesOf(e.field);return s.length?{field:e.field,values:s}:void 0}function N(e,s){const t=S.map(l=>({value:T(l.field),label:l.label,group:l.group})),f=V(t,e?T(e):"",l=>{const b=S.find(p=>T(p.field)===l);b&&s(b)},{maxWidth:"100%",ownerDocument:o,ariaLabel:"Condition field",searchPlaceholder:"Filter fields\u2026",hook:"filter-field",emptyText:"Choose a field\u2026"});return Object.assign(f.style,{flex:"1 1 auto",minWidth:"0"}),f}function W(e,s){const t=o.createElement("button");return t.type="button",t.textContent="\u2715",t.setAttribute("aria-label",e),t.dataset.wmapFilterRemove="1",Object.assign(t.style,{...P("bare"),fontSize:F.body,padding:`0 ${r.sm}`,flexShrink:"0"}),H(t,"bare"),K(t,e),t.addEventListener("click",s),t}function z(e,s,t,f){const l=o.createElement("input");return l.type="text",l.inputMode="decimal",l.value=e===void 0?"":L(e),l.placeholder=s,l.setAttribute("aria-label",t),Object.assign(l.style,U(),{width:"9em"}),l.addEventListener("change",()=>{const b=l.value.trim(),p=b===""?void 0:Number(b);if(p!==void 0&&!Number.isFinite(p)){l.setAttribute("aria-invalid","true"),l.style.borderColor=C.errBorder;return}l.removeAttribute("aria-invalid"),l.style.borderColor="",f(p)}),l}function q(e,s){const t=o.createElement("div");t.dataset.wmapFilterCondition=String(s),t.setAttribute("role","group"),t.setAttribute("aria-label",`Condition ${s+1}`),Object.assign(t.style,{display:"flex",flexDirection:"column",gap:r.sm,padding:r.md,border:`1px solid ${C.menuBorder}`,borderRadius:I.control});const f=u(e.field),l=e.values===void 0,b=o.createElement("div");if(Object.assign(b.style,{display:"flex",alignItems:"center",gap:r.sm,flexWrap:"wrap"}),b.appendChild(N(e.field,c=>{const g=B(c);!g||!i||(i.conditions[s]=g,d(!0))})),b.appendChild(Y(l?[["in","from\u2013to"],["not","outside"]]:[["in","is"],["not","is not"]],e.not?"not":"in",c=>{i&&(c==="not"?i.conditions[s].not=!0:delete i.conditions[s].not,d(!1),p.textContent=E(i.conditions[s],n.testDefs,n.attributes))},o,!0)),b.appendChild(W(`Remove the condition: ${E(e,n.testDefs,n.attributes)}`,()=>{i&&(i.conditions.splice(s,1),d(!0))})),t.appendChild(b),f)if(l){const c=o.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",gap:r.sm,flexWrap:"wrap",fontSize:F.body,color:C.label});const g=w=>O=>{if(!i)return;const a=i.conditions[s];if(O===void 0?delete a[w]:a[w]=O,a.min===void 0&&a.max===void 0){const A=n.extentOf(a.field);A&&(a[w]=w==="min"?A[0]:A[1])}const j=a.min!==void 0&&a.max!==void 0&&a.min>a.max;j&&([a.min,a.max]=[a.max,a.min]);const R=a[w]===O&&!j;d(!R),R&&(p.textContent=E(a,n.testDefs,n.attributes))},x=J(e.field,n.testDefs),v=x?` ${x}`:"";c.append(z(e.min,"no minimum",`${f.name}: lowest value kept${x?`, in ${x}`:""}`,g("min")),o.createTextNode("to"),z(e.max,"no maximum",`${f.name}: highest value kept${x?`, in ${x}`:""}`,g("max"))),x&&c.appendChild(o.createTextNode(x));const $=n.extentOf(e.field);if($){const w=o.createElement("span");w.textContent=`(values here: ${L($[0])} to ${L($[1])}${v})`,c.appendChild(w)}t.appendChild(c)}else{const c=n.valuesOf(e.field),g=o.createElement("div");g.setAttribute("role","group"),g.setAttribute("aria-label",`${f.name}: values`),Object.assign(g.style,{display:"flex",flexWrap:"wrap",gap:`${r.xs} ${r.md}`,maxHeight:"120px",overflowY:"auto"});const x=[...c,...(e.values??[]).filter(v=>!c.includes(v))];for(const v of x){const $=D(v,(e.values??[]).includes(v),w=>{if(!i)return;const O=i.conditions[s],a=new Set(O.values??[]);if(w?a.add(v):a.delete(v),a.size===0){$.querySelector("input").checked=!0;return}O.values=x.filter(j=>a.has(j)),d(!1),p.textContent=E(O,n.testDefs,n.attributes)},o);$.dataset.wmapFilterValue=v,g.appendChild($)}t.appendChild(g)}else{const c=o.createElement("div");c.textContent="This field is not in the wafers in view: the condition keeps nothing until it is changed or removed.",Object.assign(c.style,{color:C.warnText,fontSize:F.body}),t.appendChild(c)}const p=o.createElement("div");return p.dataset.wmapFilterSummary="1",p.textContent=E(e,n.testDefs,n.attributes),Object.assign(p.style,{color:C.label,fontSize:F.meta}),t.appendChild(p),t}function k(){if(h.innerHTML="",i&&i.conditions.length){const t=D(n.switchLabel,!i.off,f=>{i&&(f?delete i.off:i.off=!0,d(!1),e.style.opacity=i.off?"0.6":"1")},o,"Off keeps the conditions and applies none, so the filter can be switched back on as it was");t.dataset.wmapFilterSwitch="1",h.appendChild(t)}const e=o.createElement("div");if(Object.assign(e.style,{display:"flex",flexDirection:"column",gap:r.sm,opacity:i?.off?"0.6":"1"}),i?.conditions.forEach((t,f)=>e.appendChild(q(t,f))),y){const t=o.createElement("div");t.dataset.wmapFilterPending="1",Object.assign(t.style,{display:"flex",alignItems:"center",gap:r.sm}),t.appendChild(N(void 0,f=>{const l=B(f);l&&(y=!1,i??={conditions:[]},i.conditions.push(l),d(!0))})),t.appendChild(W("Cancel the new condition",()=>{y=!1,k()})),e.appendChild(t)}h.appendChild(e);const s=o.createElement("button");s.type="button",s.textContent=i?.conditions.length?"+ Add condition":"+ Add a condition",s.dataset.wmapFilterAdd="1",s.disabled=y||S.length===0,Object.assign(s.style,{...P("outlined"),fontSize:F.body,padding:`${r.xs} ${r.md}`,alignSelf:"flex-start"}),H(s),K(s,"Keep only what meets this condition as well as the others"),s.addEventListener("click",()=>{y=!0,k(),h.querySelector("[data-wmap-filter-pending] button")?.focus()}),h.appendChild(s)}return k(),{el:h,set:e=>{i=m(e),y=!1,k()}}}export function buildFilterStrip(n){const{doc:o,filter:S}=n,u=!S.off,m=o.createElement("div");m.dataset.wmapFilterStrip=u?"on":"off",m.setAttribute("role","status"),Object.assign(m.style,{display:"flex",flexWrap:"wrap",alignItems:"center",gap:`${r.xs} ${r.md}`,flexBasis:"100%",padding:`${r.xs} ${r.md}`,borderRadius:I.control,fontSize:F.body,background:u?C.infoBg:"transparent",color:u?C.infoText:C.label,border:`1px ${u?"solid":"dashed"} ${u?C.iconActive:C.menuBorder}`});const i=D(u?`${n.label} on:`:`${n.label} off`,u,n.onToggle,o,u?"Switch the filter off: its conditions are kept, and nothing is filtered until it is switched back on":"Switch the filter back on, with the conditions below");i.dataset.wmapFilterStripSwitch="1",i.style.fontWeight="600",i.style.color="inherit",m.appendChild(i);const y=o.createElement("span");y.dataset.wmapFilterStripText="1";const h=S.conditions.map(d=>E(d,n.testDefs,n.attributes)).join(" \xB7 ");if(y.textContent=u?h:`(would keep only: ${h})`,m.appendChild(y),u&&n.kept){const d=o.createElement("span");d.dataset.wmapFilterStripKept="1",d.textContent=`\u2014 ${n.kept}`,d.style.fontWeight="600",m.appendChild(d)}if(n.actions?.length){const d=o.createElement("span");Object.assign(d.style,{display:"inline-flex",gap:r.sm,marginLeft:"auto"}),d.append(...n.actions),m.appendChild(d)}return m}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type OverlayHandle } from './toolbar.js';
|
|
2
|
+
type GuideOpener = (section?: string) => void;
|
|
3
|
+
/** A renderer's guide opener, used by links while it is mounted. Returns the unregister function (call on destroy). */
|
|
4
|
+
export declare function registerGuideOpener(open: GuideOpener): () => void;
|
|
5
|
+
/** Opens the user guide at a section (a heading id, `GUIDE_SECTIONS`), or moves an open guide to it. */
|
|
6
|
+
export declare function openGuideAt(section: string, anchor?: Element): void;
|
|
2
7
|
type GuideApi = {
|
|
3
8
|
buildWaferMap: unknown;
|
|
4
9
|
renderWaferMap: unknown;
|
|
@@ -46,7 +51,10 @@ export interface UserGuideExtension {
|
|
|
46
51
|
* content, and reusing it silently for the guide would broaden it without
|
|
47
52
|
* documentation.
|
|
48
53
|
*/
|
|
49
|
-
export declare function openUserGuideWindow(api: GuideApi, html: string, extension?: UserGuideExtension, anchor?: Element
|
|
54
|
+
export declare function openUserGuideWindow(api: GuideApi, html: string, extension?: UserGuideExtension, anchor?: Element,
|
|
55
|
+
/** A heading id to open at (`GUIDE_SECTIONS`). An open guide is brought forward and moved there, not reopened, so
|
|
56
|
+
* the reader keeps the window where they put it, beside the app. */
|
|
57
|
+
section?: string): void;
|
|
50
58
|
/**
|
|
51
59
|
* Opens wmap's own guide window with no live `WaferMapController`/
|
|
52
60
|
* `GalleryController` required — `WaferMapController.openUserGuide()`/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{openHtmlReport as N}from"../stats/renderFindingsReport.js";import{buildWaferMap as G}from"../renderer/buildWaferMap.js";import{analyzeWaferMap as M}from"../stats/analyzeWaferMap.js";import{CLR as f,FONT as $,RADIUS as k,MOTION as O,wireControlHover as H,copyWmapThemeTokens as B,syncWmapPopupTheme as F,openModal as R,openFloatingWindow as z,wireExpandToggle as P}from"./toolbar.js";let y=null;const S=40,j=S+8;function U(e,i){const s=e.createElement("div");s.classList.add("wmap-guide-search"),s.style.cssText="display:flex;align-items:center;gap:2px;margin-left:10px;flex:1;min-width:80px;max-width:260px;";const t=e.createElement("input");t.type="text",t.placeholder="Search guide\u2026",t.setAttribute("aria-label","Search guide"),t.style.cssText=`flex:1;min-width:0;padding:4px 8px;font-size:12px;background:${f.menuBg};color:${f.text};border:1px solid ${f.menuBorder};border-radius:${k.control};outline:none;`,t.addEventListener("focus",()=>{t.style.borderColor=f.iconActive}),t.addEventListener("blur",()=>{t.style.borderColor=f.menuBorder});const n=e.createElement("span");n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.style.cssText=`font-size:12px;color:${f.label};min-width:44px;text-align:center;flex-shrink:0;white-space:nowrap;`;function r(u,m){const d=e.createElement("button");return d.type="button",d.textContent=u,d.setAttribute("aria-label",m),d.disabled=!0,d.style.cssText=`border:none;background:none;cursor:pointer;padding:4px 6px;border-radius:${k.control};font-size:12px;color:${f.label};flex-shrink:0;opacity:0.4;`,d.addEventListener("mouseenter",()=>{d.disabled||(d.style.background=f.bgHover)}),d.addEventListener("mouseleave",()=>{d.style.background="none"}),d}const a=r("\u25B2","Previous match"),o=r("\u25BC","Next match");let l=[],c=-1;function p(){const u=l.length===0;a.disabled=u,o.disabled=u,a.style.opacity=u?"0.4":"",o.style.opacity=u?"0.4":""}function g(){for(const u of l)u.parentNode?.replaceChild(e.createTextNode(u.textContent??""),u);i.normalize(),l=[],c=-1}function h(u){if(l.length===0)return;c>=0&&(l[c].style.outline="none"),c=(u%l.length+l.length)%l.length;const m=l[c];m.style.outline=`2px solid ${f.iconActive}`,m.style.outlineOffset="1px",m.scrollIntoView({behavior:"smooth",block:"center"}),n.textContent=`${c+1}/${l.length}`}function w(u){g();const m=u.trim();if(!m){n.textContent="",p();return}const d=m.toLowerCase(),x=e.createTreeWalker(i,NodeFilter.SHOW_TEXT,{acceptNode(C){const b=C.parentElement;return!b||b.closest("script,style,.wmap-guide-toc")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),T=[];let _;for(;_=x.nextNode();)T.push(_);for(const C of T){const b=C.textContent??"",A=b.toLowerCase();if(!A.includes(d))continue;const L=e.createDocumentFragment();let E=0,v=A.indexOf(d);for(;v!==-1;){v>E&&L.appendChild(e.createTextNode(b.slice(E,v)));const D=e.createElement("mark");D.textContent=b.slice(v,v+m.length),L.appendChild(D),l.push(D),E=v+m.length,v=A.indexOf(d,E)}E<b.length&&L.appendChild(e.createTextNode(b.slice(E))),C.parentNode?.replaceChild(L,C)}p(),l.length===0?n.textContent="No matches":h(0)}return t.addEventListener("input",()=>w(t.value)),t.addEventListener("keydown",u=>{u.key==="Enter"?(u.preventDefault(),h(c+(u.shiftKey?-1:1))):u.key==="Escape"&&(t.value?(t.value="",w("")):t.blur())}),a.addEventListener("click",()=>h(c-1)),o.addEventListener("click",()=>h(c+1)),s.append(t,n,a,o),s}function q(e,i,s){const t=[...i.querySelectorAll("h2[id]")];if(t.length<2)return;for(const m of i.querySelectorAll("h1[id],h2[id],h3[id],h4[id]"))m.style.scrollMarginTop=`${j}px`;const n=e.createElement("div");n.classList.add("wmap-guide-toc"),n.style.cssText=`position:sticky;top:0;z-index:2;background:${f.menuBg};border-bottom:1px solid ${f.menuBorder};font-family:system-ui,-apple-system,"Segoe UI",sans-serif;`;const r=e.createElement("div");r.style.cssText=`display:flex;align-items:center;gap:4px;height:${S}px;padding:0 12px;box-sizing:border-box;`;const a=e.createElement("span");a.innerHTML='<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>',a.style.cssText=`display:inline-flex;transition:transform ${O.base};flex-shrink:0;`;const o=e.createElement("button");o.type="button";const l="wmap-guide-toc-panel";o.setAttribute("aria-expanded","false"),o.setAttribute("aria-controls",l),o.style.cssText=`display:flex;align-items:center;gap:6px;border:none;background:none;cursor:pointer;padding:6px 8px;margin:0 -8px 0 -8px;border-radius:${k.control};font-size:13px;font-weight:600;color:${f.text};`;const c=e.createElement("span");c.textContent=`Contents (${t.length})`,o.append(a,c),o.addEventListener("mouseenter",()=>{o.style.background=f.bgHover}),o.addEventListener("mouseleave",()=>{o.style.background="none"});const p=e.createElement("button");p.type="button",p.textContent="\u2191 Top",p.style.cssText=`margin-left:auto;border:none;background:none;cursor:pointer;padding:6px 8px;border-radius:${k.control};font-size:12px;color:${f.label};`,p.addEventListener("mouseenter",()=>{p.style.background=f.bgHover}),p.addEventListener("mouseleave",()=>{p.style.background="none"}),p.addEventListener("click",()=>{u.close(),i.scrollTo({top:0,behavior:"smooth"})}),s?r.append(o,U(e,i),p):r.append(o,p);const g=e.createElement("div");g.id=l,g.hidden=!0,g.style.cssText="padding:2px 12px 12px;max-height:min(60vh,440px);overflow-y:auto;";const h=/^\s*\d+(?:\.\d+)*\.\s+/;for(const m of i.querySelectorAll("h2[id],h3[id],h4[id]")){const d=m.firstChild;d?.nodeType===Node.TEXT_NODE&&(d.textContent=(d.textContent??"").replace(h,""))}const w=e.createElement("ul");w.setAttribute("role","list"),w.style.cssText="list-style:none;margin:0;padding:0;columns:200px;column-gap:24px;";for(const m of t){const d=e.createElement("li");d.style.cssText="break-inside:avoid;";const x=e.createElement("a");x.href=`#${m.id}`,x.textContent=m.textContent??"",x.style.cssText=`display:block;padding:4px 6px;margin:0 -6px;border-radius:${k.control};font-size:12.5px;color:${f.iconActive};text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;`,x.addEventListener("mouseenter",()=>{x.style.background=f.bgHover}),x.addEventListener("mouseleave",()=>{x.style.background="none"}),x.addEventListener("click",T=>{T.preventDefault(),u.close(),m.scrollIntoView({behavior:"smooth",block:"start"})}),d.appendChild(x),w.appendChild(d)}g.appendChild(w);const u=P(o,m=>{g.hidden=!m,o.setAttribute("aria-expanded",String(m)),a.style.transform=m?"rotate(180deg)":"none"});n.append(r,g),i.prepend(n)}function W(e,i,s,t,n){const r=i,a=r.__wmapDemoApi;r.__wmapDemoApi=t;const o=e.createElement("div");return o.classList.add("wmap-guide-content"),o.innerHTML=s,q(e,o,n),{content:o,restoreApi:()=>{r.__wmapDemoApi===t&&(r.__wmapDemoApi=a)}}}function I(e,i){const s=i,t=e.querySelector("script");if(t){const n=e.ownerDocument.createElement("script");n.textContent=t.textContent,e.appendChild(n);const r=e.querySelector(".wmap-guide");return r&&s.__wmapPopulateGuideDemos?.(r),s.__wmapDestroyGuideDemos}}function V(e,i,s,t){const n=t?.ownerDocument??document,r=n.defaultView??window,{content:a,restoreApi:o}=W(n,r,i,s,!0);Object.assign(a.style,{flex:"1",overflow:"auto",minHeight:"0",minWidth:"0"});let l;const c=z({title:e,anchor:t,ownerDocument:n,printable:!0,onMaximizeChange:p=>{a.style.setProperty("--wmap-guide-reading-width",p?"1000px":"720px")},onClose:()=>{y===c&&(y=null),l?.(),o()}});return c.contentWrap.appendChild(a),l=I(a,r),c}function X(e,i,s,t){const n=e.document;n.title=i,Object.assign(n.documentElement.style,{height:"100%"}),Object.assign(n.body.style,{margin:"0",height:"100vh",overflow:"hidden",display:"flex",flexDirection:"column",fontFamily:$.family}),B(document.documentElement,n.documentElement);const r=F(document.documentElement,n.documentElement),{content:a,restoreApi:o}=W(n,e,s,t,!1);Object.assign(a.style,{flex:"1",overflow:"auto",minHeight:"0",minWidth:"0"}),n.body.appendChild(a);const l=I(a,e);let c=!1;const p=()=>{if(!c){c=!0,clearInterval(g),r();try{l?.()}catch{}o(),y===h&&(y=null)}},g=setInterval(()=>{e.closed&&p()},400);e.addEventListener("pagehide",p);const h={close:()=>{e.closed||e.close(),p()}};return h}export function openUserGuideWindow(e,i,s,t){y&&(y.close(),y=null);const n=s?.title??"Wafer Map \u2014 User Guide",r=(s?.html??"")+i,o=(t?.ownerDocument.defaultView??window).open("","_blank","width=800,height=820");y=o?X(o,n,r,e):V(n,r,e,t)}export function openWaferMapGuide(e,i){Promise.all([import("./userGuideHtml.js"),import("./renderWaferMap.js"),import("./renderWaferGallery.js")]).then(([s,t,n])=>{openUserGuideWindow({buildWaferMap:G,renderWaferMap:t.renderWaferMap,renderWaferGallery:n.renderWaferGallery,analyzeWaferMap:M},s.USER_GUIDE_HTML,e,i)})}export function openReportModal(e,i){const s=i?.ownerDocument??document,t=s.createElement("iframe");t.srcdoc=e,t.title="Summary report",Object.assign(t.style,{border:"0",width:"100%",flex:"1",minHeight:"0",background:"#fff"});const n=s.createElement("div");Object.assign(n.style,{display:"flex",justifyContent:"flex-end",padding:"6px 14px",borderBottom:`1px solid ${f.menuBorder}`,flexShrink:"0"});const r=s.createElement("button");r.type="button",H(r,"bare"),r.textContent="Open as full page \u2197",Object.assign(r.style,{border:"none",background:"none",color:f.iconActive,cursor:"pointer",fontSize:$.body,textDecoration:"underline",padding:"0"}),r.addEventListener("click",()=>N(e)),n.appendChild(r);const a=s.defaultView??window,o=c=>{if(c.source!==t.contentWindow)return;const p=c.data?.wmapFinding;typeof p=="string"&&i?.onFinding?.(p,l)};i?.onFinding&&a.addEventListener("message",o);const l=R({title:"Summary report",anchor:i?.anchor,ownerDocument:s,printable:()=>t.contentWindow?.print(),onClose:()=>a.removeEventListener("message",o)});return l.contentWrap.style.flexDirection="column",l.contentWrap.appendChild(n),l.contentWrap.appendChild(t),l}
|
|
1
|
+
import{openHtmlReport as W}from"../stats/renderFindingsReport.js";import{buildWaferMap as F}from"../renderer/buildWaferMap.js";import{analyzeWaferMap as H}from"../stats/analyzeWaferMap.js";import{CLR as f,FONT as S,RADIUS as k,MOTION as B,wireControlHover as R,copyWmapThemeTokens as z,syncWmapPopupTheme as q,openModal as P,openFloatingWindow as j,wireExpandToggle as U}from"./toolbar.js";let y=null;function D(e,r,s=!1){if(!r)return;const t=e.querySelector(`[id="${r}"]`);if(!t)return;const i=e.ownerDocument.defaultView,n=()=>t.scrollIntoView({block:"start"});s||!i?.requestAnimationFrame?n():i.requestAnimationFrame(()=>i.requestAnimationFrame(n))}const T=[];export function registerGuideOpener(e){return T.push(e),()=>{const r=T.lastIndexOf(e);r>=0&&T.splice(r,1)}}export function openGuideAt(e,r){const s=T[T.length-1];s?s(e):N(void 0,r,e)}const I=40,V=I+8;function X(e,r){const s=e.createElement("div");s.classList.add("wmap-guide-search"),s.style.cssText="display:flex;align-items:center;gap:2px;margin-left:10px;flex:1;min-width:80px;max-width:260px;";const t=e.createElement("input");t.type="text",t.placeholder="Search guide\u2026",t.setAttribute("aria-label","Search guide"),t.style.cssText=`flex:1;min-width:0;padding:4px 8px;font-size:12px;background:${f.menuBg};color:${f.text};border:1px solid ${f.menuBorder};border-radius:${k.control};outline:none;`,t.addEventListener("focus",()=>{t.style.borderColor=f.iconActive}),t.addEventListener("blur",()=>{t.style.borderColor=f.menuBorder});const i=e.createElement("span");i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.style.cssText=`font-size:12px;color:${f.label};min-width:44px;text-align:center;flex-shrink:0;white-space:nowrap;`;function n(a,u){const d=e.createElement("button");return d.type="button",d.textContent=a,d.setAttribute("aria-label",u),d.disabled=!0,d.style.cssText=`border:none;background:none;cursor:pointer;padding:4px 6px;border-radius:${k.control};font-size:12px;color:${f.label};flex-shrink:0;opacity:0.4;`,d.addEventListener("mouseenter",()=>{d.disabled||(d.style.background=f.bgHover)}),d.addEventListener("mouseleave",()=>{d.style.background="none"}),d}const c=n("\u25B2","Previous match"),o=n("\u25BC","Next match");let l=[],m=-1;function p(){const a=l.length===0;c.disabled=a,o.disabled=a,c.style.opacity=a?"0.4":"",o.style.opacity=a?"0.4":""}function x(){for(const a of l)a.parentNode?.replaceChild(e.createTextNode(a.textContent??""),a);r.normalize(),l=[],m=-1}function g(a){if(l.length===0)return;m>=0&&(l[m].style.outline="none"),m=(a%l.length+l.length)%l.length;const u=l[m];u.style.outline=`2px solid ${f.iconActive}`,u.style.outlineOffset="1px",u.scrollIntoView({behavior:"smooth",block:"center"}),i.textContent=`${m+1}/${l.length}`}function b(a){x();const u=a.trim();if(!u){i.textContent="",p();return}const d=u.toLowerCase(),h=e.createTreeWalker(r,NodeFilter.SHOW_TEXT,{acceptNode(C){const w=C.parentElement;return!w||w.closest("script,style,.wmap-guide-toc")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),L=[];let G;for(;G=h.nextNode();)L.push(G);for(const C of L){const w=C.textContent??"",_=w.toLowerCase();if(!_.includes(d))continue;const A=e.createDocumentFragment();let E=0,v=_.indexOf(d);for(;v!==-1;){v>E&&A.appendChild(e.createTextNode(w.slice(E,v)));const $=e.createElement("mark");$.textContent=w.slice(v,v+u.length),A.appendChild($),l.push($),E=v+u.length,v=_.indexOf(d,E)}E<w.length&&A.appendChild(e.createTextNode(w.slice(E))),C.parentNode?.replaceChild(A,C)}p(),l.length===0?i.textContent="No matches":g(0)}return t.addEventListener("input",()=>b(t.value)),t.addEventListener("keydown",a=>{a.key==="Enter"?(a.preventDefault(),g(m+(a.shiftKey?-1:1))):a.key==="Escape"&&(t.value?(t.value="",b("")):t.blur())}),c.addEventListener("click",()=>g(m-1)),o.addEventListener("click",()=>g(m+1)),s.append(t,i,c,o),s}function J(e,r,s){const t=[...r.querySelectorAll("h2[id]")];if(t.length<2)return;for(const u of r.querySelectorAll("h1[id],h2[id],h3[id],h4[id]"))u.style.scrollMarginTop=`${V}px`;const i=e.createElement("div");i.classList.add("wmap-guide-toc"),i.style.cssText=`position:sticky;top:0;z-index:2;background:${f.menuBg};border-bottom:1px solid ${f.menuBorder};font-family:system-ui,-apple-system,"Segoe UI",sans-serif;`;const n=e.createElement("div");n.style.cssText=`display:flex;align-items:center;gap:4px;height:${I}px;padding:0 12px;box-sizing:border-box;`;const c=e.createElement("span");c.innerHTML='<svg viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>',c.style.cssText=`display:inline-flex;transition:transform ${B.base};flex-shrink:0;`;const o=e.createElement("button");o.type="button";const l="wmap-guide-toc-panel";o.setAttribute("aria-expanded","false"),o.setAttribute("aria-controls",l),o.style.cssText=`display:flex;align-items:center;gap:6px;border:none;background:none;cursor:pointer;padding:6px 8px;margin:0 -8px 0 -8px;border-radius:${k.control};font-size:13px;font-weight:600;color:${f.text};`;const m=e.createElement("span");m.textContent=`Contents (${t.length})`,o.append(c,m),o.addEventListener("mouseenter",()=>{o.style.background=f.bgHover}),o.addEventListener("mouseleave",()=>{o.style.background="none"});const p=e.createElement("button");p.type="button",p.textContent="\u2191 Top",p.style.cssText=`margin-left:auto;border:none;background:none;cursor:pointer;padding:6px 8px;border-radius:${k.control};font-size:12px;color:${f.label};`,p.addEventListener("mouseenter",()=>{p.style.background=f.bgHover}),p.addEventListener("mouseleave",()=>{p.style.background="none"}),p.addEventListener("click",()=>{a.close(),r.scrollTo({top:0,behavior:"smooth"})}),s?n.append(o,X(e,r),p):n.append(o,p);const x=e.createElement("div");x.id=l,x.hidden=!0,x.style.cssText="padding:2px 12px 12px;max-height:min(60vh,440px);overflow-y:auto;";const g=/^\s*\d+(?:\.\d+)*\.?\s+/;for(const u of r.querySelectorAll("h2[id],h3[id],h4[id]")){const d=u.firstChild;d?.nodeType===Node.TEXT_NODE&&(d.textContent=(d.textContent??"").replace(g,""))}const b=e.createElement("ul");b.setAttribute("role","list"),b.style.cssText="list-style:none;margin:0;padding:0;columns:200px;column-gap:24px;";for(const u of t){const d=e.createElement("li");d.style.cssText="break-inside:avoid;";const h=e.createElement("a");h.href=`#${u.id}`,h.textContent=u.textContent??"",h.style.cssText=`display:block;padding:4px 6px;margin:0 -6px;border-radius:${k.control};font-size:12.5px;color:${f.iconActive};text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;`,h.addEventListener("mouseenter",()=>{h.style.background=f.bgHover}),h.addEventListener("mouseleave",()=>{h.style.background="none"}),h.addEventListener("click",L=>{L.preventDefault(),a.close(),u.scrollIntoView({behavior:"smooth",block:"start"})}),d.appendChild(h),b.appendChild(d)}x.appendChild(b);const a=U(o,u=>{x.hidden=!u,o.setAttribute("aria-expanded",String(u)),c.style.transform=u?"rotate(180deg)":"none"});i.append(n,x),r.prepend(i)}function O(e,r,s,t,i){const n=r,c=n.__wmapDemoApi;n.__wmapDemoApi=t;const o=e.createElement("div");return o.classList.add("wmap-guide-content"),o.innerHTML=s,J(e,o,i),{content:o,restoreApi:()=>{n.__wmapDemoApi===t&&(n.__wmapDemoApi=c)}}}function M(e,r){const s=r,t=e.querySelector("script");if(t){const i=e.ownerDocument.createElement("script");i.textContent=t.textContent,e.appendChild(i);const n=e.querySelector(".wmap-guide");return n&&s.__wmapPopulateGuideDemos?.(n),s.__wmapDestroyGuideDemos}}function K(e,r,s,t,i){const n=t?.ownerDocument??document,c=n.defaultView??window,{content:o,restoreApi:l}=O(n,c,r,s,!0);Object.assign(o.style,{flex:"1",overflow:"auto",minHeight:"0",minWidth:"0"});let m,p;const x=j({title:e,anchor:t,ownerDocument:n,printable:!0,onMaximizeChange:g=>{o.style.setProperty("--wmap-guide-reading-width",g?"1000px":"720px")},onClose:()=>{y===p&&(y=null),m?.(),l()}});return x.contentWrap.appendChild(o),m=M(o,c),D(o,i),p={close:x.close,show:g=>x.box.isConnected?(x.bringToFront(),D(o,g,!0),!0):!1}}function Q(e,r,s,t,i){const n=e.document;n.title=r,Object.assign(n.documentElement.style,{height:"100%"}),Object.assign(n.body.style,{margin:"0",height:"100vh",overflow:"hidden",display:"flex",flexDirection:"column",fontFamily:S.family}),z(document.documentElement,n.documentElement);const c=q(document.documentElement,n.documentElement),{content:o,restoreApi:l}=O(n,e,s,t,!1);Object.assign(o.style,{flex:"1",overflow:"auto",minHeight:"0",minWidth:"0"}),n.body.appendChild(o);const m=M(o,e);D(o,i);let p=!1;const x=()=>{if(!p){p=!0,clearInterval(g),c();try{m?.()}catch{}l(),y===b&&(y=null)}},g=setInterval(()=>{e.closed&&x()},400);e.addEventListener("pagehide",x);const b={close:()=>{e.closed||e.close(),x()},show:a=>e.closed?(x(),!1):(e.focus(),D(o,a,!0),!0)};return b}export function openUserGuideWindow(e,r,s,t,i){if(y&&i&&y.show(i))return;y&&(y.close(),y=null);const n=s?.title??"Wafer Map \u2014 User Guide",c=(s?.html??"")+r,l=(t?.ownerDocument.defaultView??window).open("","_blank","width=800,height=820");y=l?Q(l,n,c,e,i):K(n,c,e,t,i)}export function openWaferMapGuide(e,r){N(e,r)}function N(e,r,s){Promise.all([import("./userGuideHtml.js"),import("./renderWaferMap.js"),import("./renderWaferGallery.js")]).then(([t,i,n])=>{openUserGuideWindow({buildWaferMap:F,renderWaferMap:i.renderWaferMap,renderWaferGallery:n.renderWaferGallery,analyzeWaferMap:H},t.USER_GUIDE_HTML,e,r,s)})}export function openReportModal(e,r){const s=r?.ownerDocument??document,t=s.createElement("iframe");t.srcdoc=e,t.title="Summary report",Object.assign(t.style,{border:"0",width:"100%",flex:"1",minHeight:"0",background:"#fff"});const i=s.createElement("div");Object.assign(i.style,{display:"flex",justifyContent:"flex-end",padding:"6px 14px",borderBottom:`1px solid ${f.menuBorder}`,flexShrink:"0"});const n=s.createElement("button");n.type="button",R(n,"bare"),n.textContent="Open as full page \u2197",Object.assign(n.style,{border:"none",background:"none",color:f.iconActive,cursor:"pointer",fontSize:S.body,textDecoration:"underline",padding:"0"}),n.addEventListener("click",()=>W(e)),i.appendChild(n);const c=s.defaultView??window,o=m=>{if(m.source!==t.contentWindow)return;const p=m.data?.wmapFinding;typeof p=="string"&&r?.onFinding?.(p,l)};r?.onFinding&&c.addEventListener("message",o);const l=P({title:"Summary report",anchor:r?.anchor,ownerDocument:s,printable:()=>t.contentWindow?.print(),onClose:()=>c.removeEventListener("message",o)});return l.contentWrap.style.flexDirection="column",l.contentWrap.appendChild(i),l.contentWrap.appendChild(t),l}
|
|
@@ -13,7 +13,7 @@ export const ICONS={aggr:'<svg viewBox="0 0 24 24" width="16" height="16" fill="
|
|
|
13
13
|
<path d="M3 12 c0 2.5 4 4 9 4 s9-1.5 9-4" />
|
|
14
14
|
|
|
15
15
|
<path d="M3 17 c0 2.5 4 4 9 4 s9-1.5 9-4" />
|
|
16
|
-
</svg>`,orient:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76" fill="currentColor" stroke="none"/></svg>',overlays:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7z"/><circle cx="12" cy="12" r="3"/></svg>',palette:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m14.622 17.897-10.68-2.913"/><path d="M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z"/><path d="M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15"/></svg>',pan:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20"/><path d="m15 19-3 3-3-3"/><path d="m19 9 3 3-3 3"/><path d="M2 12h20"/><path d="m5 9-3 3 3 3"/><path d="m9 5 3-3 3 3"/></svg>',print:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><path d="M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"/><rect x="6" y="14" width="12" height="8" rx="1"/></svg>',quadrants:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><circle cx="12" cy="12" r="9"/><line x1="12" y1="3" x2="12" y2="21"/><line x1="3" y1="12" x2="21" y2="12"/></svg>',reset:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>',reticle:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="8" height="6" rx="0.5"/><rect x="13" y="3" width="8" height="6" rx="0.5"/><rect x="3" y="11" width="8" height="6" rx="0.5"/><rect x="13" y="11" width="8" height="6" rx="0.5"/><rect x="3" y="19" width="8" height="2" rx="0.5" stroke-dasharray="2 1"/><rect x="13" y="19" width="8" height="2" rx="0.5" stroke-dasharray="2 1"/></svg>',rings:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5.5"/><circle cx="12" cy="12" r="2" fill="currentColor" stroke="none"/></svg>',rotateCW:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></svg>',specRange:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 4 L5 20"/><path d="M5 4 L8 4"/><path d="M5 20 L8 20"/><path d="M19 4 L19 20"/><path d="M19 4 L16 4"/><path d="M19 20 L16 20"/><path d="M5 12 L19 12" stroke-dasharray="3 2"/></svg>',uncollapse:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/></svg>',wafer:`<svg
|
|
16
|
+
</svg>`,more:'<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" stroke="none"><circle cx="5" cy="12" r="1.9"/><circle cx="12" cy="12" r="1.9"/><circle cx="19" cy="12" r="1.9"/></svg>',orient:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76" fill="currentColor" stroke="none"/></svg>',overlays:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7z"/><circle cx="12" cy="12" r="3"/></svg>',palette:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m14.622 17.897-10.68-2.913"/><path d="M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z"/><path d="M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15"/></svg>',pan:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20"/><path d="m15 19-3 3-3-3"/><path d="m19 9 3 3-3 3"/><path d="M2 12h20"/><path d="m5 9-3 3 3 3"/><path d="m9 5 3-3 3 3"/></svg>',print:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><path d="M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"/><rect x="6" y="14" width="12" height="8" rx="1"/></svg>',quadrants:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><circle cx="12" cy="12" r="9"/><line x1="12" y1="3" x2="12" y2="21"/><line x1="3" y1="12" x2="21" y2="12"/></svg>',reset:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>',reticle:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="8" height="6" rx="0.5"/><rect x="13" y="3" width="8" height="6" rx="0.5"/><rect x="3" y="11" width="8" height="6" rx="0.5"/><rect x="13" y="11" width="8" height="6" rx="0.5"/><rect x="3" y="19" width="8" height="2" rx="0.5" stroke-dasharray="2 1"/><rect x="13" y="19" width="8" height="2" rx="0.5" stroke-dasharray="2 1"/></svg>',rings:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5.5"/><circle cx="12" cy="12" r="2" fill="currentColor" stroke="none"/></svg>',rotateCW:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></svg>',specRange:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M5 4 L5 20"/><path d="M5 4 L8 4"/><path d="M5 20 L8 20"/><path d="M19 4 L19 20"/><path d="M19 4 L16 4"/><path d="M19 20 L16 20"/><path d="M5 12 L19 12" stroke-dasharray="3 2"/></svg>',uncollapse:'<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/></svg>',wafer:`<svg
|
|
17
17
|
viewBox="0 0 24 24"
|
|
18
18
|
width="16"
|
|
19
19
|
height="16"
|
|
@@ -2,6 +2,7 @@ export { WMAP_VERSION, WMAP_BUILD_TIME } from './version.js';
|
|
|
2
2
|
export type { ToCanvasOptions, ViewportTransform } from './toCanvas.js';
|
|
3
3
|
export { renderWaferMap } from './renderWaferMap.js';
|
|
4
4
|
export type { RenderOptions, WaferMapController, WaferViewOptions, WaferPreferences, WaferDisplayState } from './renderWaferMap.js';
|
|
5
|
+
export { WAFER_PREFERENCE_KEYS } from './renderWaferMap.js';
|
|
5
6
|
export { renderWaferGallery } from './renderWaferGallery.js';
|
|
6
7
|
export type { WaferMapDisplayItem, WaferMapDisplayItemFactory, GalleryOptions, GalleryController } from './renderWaferGallery.js';
|
|
7
8
|
export type { SummaryPanelOptions, FindingsNotice } from './summaryPanel.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{WMAP_VERSION,WMAP_BUILD_TIME}from"./version.js";export{renderWaferMap}from"./renderWaferMap.js";export{renderWaferGallery}from"./renderWaferGallery.js";export{collectWarnings,severityOf}from"./warnings.js";export{setDetachWindowOpener}from"./toolbar.js";export{openWaferMapGuide}from"./guideWindow.js";export{ICONS}from"./icons.js";export{openReportModal}from"./guideWindow.js";
|
|
1
|
+
export{WMAP_VERSION,WMAP_BUILD_TIME}from"./version.js";export{renderWaferMap}from"./renderWaferMap.js";export{WAFER_PREFERENCE_KEYS}from"./renderWaferMap.js";export{renderWaferGallery}from"./renderWaferGallery.js";export{collectWarnings,severityOf}from"./warnings.js";export{setDetachWindowOpener}from"./toolbar.js";export{openWaferMapGuide}from"./guideWindow.js";export{ICONS}from"./icons.js";export{openReportModal}from"./guideWindow.js";
|
|
@@ -5,10 +5,15 @@ import { type FacetCuration, type FacetItem } from '../stats/facets.js';
|
|
|
5
5
|
import { type TestDef } from '../renderer/buildWaferMap.js';
|
|
6
6
|
import type { WaferMapDisplayItem } from './renderWaferGallery.js';
|
|
7
7
|
import { type PlotStore } from './plotStore.js';
|
|
8
|
-
import type { PlotSpec } from '../stats/plotSpec.js';
|
|
8
|
+
import type { PlotFilter, PlotSpec } from '../stats/plotSpec.js';
|
|
9
|
+
import type { SavedFilter } from '../stats/filterFile.js';
|
|
10
|
+
import { type PageFilterController } from './pageFilter.js';
|
|
9
11
|
import type { BinColors } from '../renderer/binColors.js';
|
|
10
12
|
import { type SaveImageHandler, type SaveTextHandler } from './toolbar.js';
|
|
13
|
+
import type { RenderableWaferMap } from './renderWaferMap.js';
|
|
11
14
|
import type { SweepSpec } from '../stats/sweep.js';
|
|
15
|
+
import { type AxisPrefs } from './charts/chartShell.js';
|
|
16
|
+
import { type SynthesisTarget } from '../stats/synthesis.js';
|
|
12
17
|
export type InsightsView = 'overview' | 'distributions' | 'correlation' | 'sweeps' | 'data' | 'plot';
|
|
13
18
|
/** Public option shape for `RenderOptions.insights`/`GalleryOptions.insights`. */
|
|
14
19
|
export interface InsightsOptions {
|
|
@@ -22,7 +27,7 @@ export interface InsightsOptions {
|
|
|
22
27
|
* (a gallery always has one); `false` opts out.
|
|
23
28
|
*/
|
|
24
29
|
enabled?: boolean;
|
|
25
|
-
/** Which sub-tab is shown first. Default 'overview'. `'sweeps'` opens the
|
|
30
|
+
/** Which sub-tab is shown first. Default 'overview'. `'sweeps'` opens the My plots tab, where sweeps are drawn. */
|
|
26
31
|
defaultView?: InsightsView;
|
|
27
32
|
/**
|
|
28
33
|
* @deprecated Sweeps are plots now: give them in `plots` as sweep plots, or read a sweeps file with
|
|
@@ -70,6 +75,30 @@ export interface InsightsOptions {
|
|
|
70
75
|
* the browser's own file input; a desktop host passes its native dialog.
|
|
71
76
|
*/
|
|
72
77
|
onPickPlotsFile?: () => Promise<string | null>;
|
|
78
|
+
/**
|
|
79
|
+
* The page filter to start with: conditions the wafers and dies of the gallery, the map and every Insights tab must
|
|
80
|
+
* meet (one split, the edge ring, a range of a test), with `off` to keep them unapplied. It is one filter for all of
|
|
81
|
+
* them: a wafer condition removes a wafer's card, a die condition draws the dies it drops dimmed on a map. It is view
|
|
82
|
+
* state, like Group by: the reader edits it from the Filter button, it is shown above the view whenever it exists, and
|
|
83
|
+
* it is never written into a plots file. Keep it from `onFilterChange` to restore it.
|
|
84
|
+
*/
|
|
85
|
+
filter?: PlotFilter;
|
|
86
|
+
/** Called with the filter after the reader applies, switches, or removes it (`undefined` once removed). */
|
|
87
|
+
onFilterChange?: (filter: PlotFilter | undefined) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Filters the reader has saved under a name, to start with (`SavedFilter`: `id`, `name`, `conditions`). The Filter
|
|
90
|
+
* window lists them to load into the editor, and Export… / Import… move them as a `wafermap-filters` file
|
|
91
|
+
* (`readFiltersFile` / `writeFiltersFile`). Read leniently, like a plots file: one that cannot be read is left out and
|
|
92
|
+
* logged. Keep them from `onSavedFiltersChange`.
|
|
93
|
+
*/
|
|
94
|
+
savedFilters?: SavedFilter[];
|
|
95
|
+
/** Called with the whole list after the reader saves, deletes or imports a filter. */
|
|
96
|
+
onSavedFiltersChange?: (filters: SavedFilter[]) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Choose a filters file to import, resolving to its text, or `null` when cancelled. Without it the browser's own file
|
|
99
|
+
* input is used; a desktop host passes its native dialog, as with `onPickPlotsFile`.
|
|
100
|
+
*/
|
|
101
|
+
onPickFiltersFile?: () => Promise<string | null>;
|
|
73
102
|
/**
|
|
74
103
|
* Open the Insights view on mount instead of starting on the map/grid.
|
|
75
104
|
* Default false — the tab is offered, the map is what you see first.
|
|
@@ -83,6 +112,10 @@ export interface InsightsOptions {
|
|
|
83
112
|
defaultOpen?: boolean;
|
|
84
113
|
}
|
|
85
114
|
export interface InsightsTabDeps {
|
|
115
|
+
/** The charts' axis settings to start from: the host's `chart*` preferences (see `axisPrefsFromOptions`). */
|
|
116
|
+
initialAxisPrefs?: AxisPrefs;
|
|
117
|
+
/** Called when the reader changes an axis setting, so the renderer can report it as a preference. */
|
|
118
|
+
onAxisPrefsChange?: (prefs: AxisPrefs) => void;
|
|
86
119
|
/** The host's own wafer attributes (`attributes` on the render options): what Group by offers and calls each, the plot fields, the Wafers table's columns and the strip. Over the defaults. */
|
|
87
120
|
attributes?: Record<string, FacetCuration>;
|
|
88
121
|
/** Current gallery/single-wafer items — read fresh each render (a gallery's list can still be building). `null` entries (not-yet-built cards) are skipped. */
|
|
@@ -145,6 +178,18 @@ export interface InsightsTabDeps {
|
|
|
145
178
|
plots?: PlotSpec[];
|
|
146
179
|
onPlotsChange?: (plots: PlotSpec[]) => void;
|
|
147
180
|
onPickPlotsFile?: () => Promise<string | null>;
|
|
181
|
+
/**
|
|
182
|
+
* Leaves Insights and shows a "What stands out" item on the map, as its row in the Summary panel does: a finding's dies,
|
|
183
|
+
* or a test's value map with the dies it fails. Omitted ⇒ the Worth a look cards offer no Show on map.
|
|
184
|
+
*/
|
|
185
|
+
showOnMap?: (target: SynthesisTarget) => void;
|
|
186
|
+
/** See `InsightsOptions.filter` and `onFilterChange`. */
|
|
187
|
+
filter?: PlotFilter;
|
|
188
|
+
onFilterChange?: (filter: PlotFilter | undefined) => void;
|
|
189
|
+
/** Whether the tab row carries its own Filter button. A host whose chrome already has one (the gallery, the map) turns it off, so the button keeps one place. Default true. */
|
|
190
|
+
showFilterButton?: boolean;
|
|
191
|
+
/** The page filter the maps and the gallery share; created from `filter` and `onFilterChange` when omitted. */
|
|
192
|
+
pageFilter?: PageFilterController;
|
|
148
193
|
/** Opens the user guide. Rendered as an icon at the end of the tab row —
|
|
149
194
|
* while Insights is showing, the map toolbar is hidden (it held only a
|
|
150
195
|
* back-to-gallery button, which the back tab already provides, and this
|
|
@@ -185,6 +230,13 @@ export interface InsightsTabHandle {
|
|
|
185
230
|
render: () => void;
|
|
186
231
|
/** Tears down every live panel's observers and removes `el`. */
|
|
187
232
|
destroy: () => void;
|
|
233
|
+
/** Adopt axis settings set from outside (the host's `setOptions`), in every chart. */
|
|
234
|
+
setAxisPrefs: (prefs: AxisPrefs) => void;
|
|
235
|
+
/**
|
|
236
|
+
* Opens the Overview at the Worth a look card of the item `key` names (`synthesisKey`), scrolled into view: the Summary
|
|
237
|
+
* panel's Chart link. False when there is no such card (the item has none, or the list is hidden while narrowed).
|
|
238
|
+
*/
|
|
239
|
+
showWorthCard: (key: string) => boolean;
|
|
188
240
|
}
|
|
189
241
|
type Item = FacetItem & {
|
|
190
242
|
dies: Die[];
|
|
@@ -201,6 +253,9 @@ type Item = FacetItem & {
|
|
|
201
253
|
* "Wafer N (no ID)" that `label` falls back to, which in a chart title would
|
|
202
254
|
* read as an ID. */
|
|
203
255
|
identity?: string;
|
|
256
|
+
/** The wafer's own result as the host handed it in: what a map drawn from this wafer's dies (a difference map) is
|
|
257
|
+
* rendered on, so it keeps the wafer's geometry and orientation. */
|
|
258
|
+
source?: RenderableWaferMap;
|
|
204
259
|
};
|
|
205
260
|
/** One wafer (or the lot's single stand-in) as the Insights views see it. */
|
|
206
261
|
export type InsightsItem = Item;
|