@ni/nimble-components 24.1.5 → 24.1.6
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/dist/all-components-bundle.js +121 -79
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +6091 -6088
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/src/wafer-map/index.d.ts +8 -17
- package/dist/esm/src/wafer-map/modules/experimental/computations.d.ts +1 -2
- package/dist/esm/src/wafer-map/modules/experimental/data-manager.d.ts +4 -10
- package/dist/esm/src/wafer-map/modules/experimental/hover-handler.d.ts +1 -5
- package/dist/esm/src/wafer-map/modules/experimental/prerendering.d.ts +18 -0
- package/dist/esm/src/wafer-map/modules/experimental/worker-renderer.d.ts +0 -1
- package/dist/esm/src/wafer-map/types.d.ts +6 -0
- package/dist/esm/wafer-map/index.d.ts +8 -17
- package/dist/esm/wafer-map/index.js +35 -24
- package/dist/esm/wafer-map/index.js.map +1 -1
- package/dist/esm/wafer-map/modules/experimental/computations.d.ts +1 -2
- package/dist/esm/wafer-map/modules/experimental/computations.js +1 -4
- package/dist/esm/wafer-map/modules/experimental/computations.js.map +1 -1
- package/dist/esm/wafer-map/modules/experimental/data-manager.d.ts +4 -10
- package/dist/esm/wafer-map/modules/experimental/data-manager.js +8 -26
- package/dist/esm/wafer-map/modules/experimental/data-manager.js.map +1 -1
- package/dist/esm/wafer-map/modules/experimental/hover-handler.d.ts +1 -5
- package/dist/esm/wafer-map/modules/experimental/hover-handler.js +6 -10
- package/dist/esm/wafer-map/modules/experimental/hover-handler.js.map +1 -1
- package/dist/esm/wafer-map/modules/experimental/prerendering.d.ts +18 -0
- package/dist/esm/wafer-map/modules/experimental/prerendering.js +63 -0
- package/dist/esm/wafer-map/modules/experimental/prerendering.js.map +1 -0
- package/dist/esm/wafer-map/modules/experimental/worker-renderer.d.ts +0 -1
- package/dist/esm/wafer-map/modules/experimental/worker-renderer.js +6 -10
- package/dist/esm/wafer-map/modules/experimental/worker-renderer.js.map +1 -1
- package/dist/esm/wafer-map/modules/hover-handler.js +2 -4
- package/dist/esm/wafer-map/modules/hover-handler.js.map +1 -1
- package/dist/esm/wafer-map/types.d.ts +6 -0
- package/dist/esm/wafer-map/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -16301,7 +16301,7 @@
|
|
|
16301
16301
|
|
|
16302
16302
|
/**
|
|
16303
16303
|
* Do not edit directly
|
|
16304
|
-
* Generated on
|
|
16304
|
+
* Generated on Thu, 04 Apr 2024 14:40:58 GMT
|
|
16305
16305
|
*/
|
|
16306
16306
|
|
|
16307
16307
|
const Information100DarkUi = "#a46eff";
|
|
@@ -75345,7 +75345,7 @@ img.ProseMirror-separator {
|
|
|
75345
75345
|
/**
|
|
75346
75346
|
* Prerendering prepares render-ready dies data to be used by the rendering module
|
|
75347
75347
|
*/
|
|
75348
|
-
class Prerendering {
|
|
75348
|
+
let Prerendering$1 = class Prerendering {
|
|
75349
75349
|
get labelsFontSize() {
|
|
75350
75350
|
return this._labelsFontSize;
|
|
75351
75351
|
}
|
|
@@ -75450,7 +75450,7 @@ img.ProseMirror-separator {
|
|
|
75450
75450
|
rgbColor = new ColorRGBA64(rgbColor.r, rgbColor.g, rgbColor.b, this.calculateOpacity(dieTags, highlightedTags));
|
|
75451
75451
|
return rgbColor.toStringWebRGBA();
|
|
75452
75452
|
}
|
|
75453
|
-
}
|
|
75453
|
+
};
|
|
75454
75454
|
|
|
75455
75455
|
/**
|
|
75456
75456
|
* Data Manager uses Computations and Prerendering modules in order and exposes the results
|
|
@@ -75492,7 +75492,7 @@ img.ProseMirror-separator {
|
|
|
75492
75492
|
constructor(wafermap) {
|
|
75493
75493
|
this.wafermap = wafermap;
|
|
75494
75494
|
this.computations = new Computations$1(wafermap);
|
|
75495
|
-
this.prerendering = new Prerendering(wafermap);
|
|
75495
|
+
this.prerendering = new Prerendering$1(wafermap);
|
|
75496
75496
|
}
|
|
75497
75497
|
updateContainerDimensions() {
|
|
75498
75498
|
this.computations.updateContainerDimensions();
|
|
@@ -75542,7 +75542,7 @@ img.ProseMirror-separator {
|
|
|
75542
75542
|
this.defaultPadding = 0;
|
|
75543
75543
|
this.baseMarginPercentage = 0.04;
|
|
75544
75544
|
}
|
|
75545
|
-
|
|
75545
|
+
update() {
|
|
75546
75546
|
const canvasDimensions = {
|
|
75547
75547
|
width: this.wafermap.canvasWidth,
|
|
75548
75548
|
height: this.wafermap.canvasHeight
|
|
@@ -75562,9 +75562,6 @@ img.ProseMirror-separator {
|
|
|
75562
75562
|
};
|
|
75563
75563
|
this._margin = this.calculateMarginAddition(baseMargin, canvasMargin);
|
|
75564
75564
|
this._containerDimensions = this.calculateContainerDimensions(canvasDimensions, this._margin);
|
|
75565
|
-
this.updateScales();
|
|
75566
|
-
}
|
|
75567
|
-
updateScales() {
|
|
75568
75565
|
const containerDiameter = Math.min(this._containerDimensions.width, this._containerDimensions.height);
|
|
75569
75566
|
const gridDimensions = this.gridDimensionsValidAndDefined()
|
|
75570
75567
|
? this.calculateGridDimensionsFromBoundingBox()
|
|
@@ -75674,6 +75671,66 @@ img.ProseMirror-separator {
|
|
|
75674
75671
|
}
|
|
75675
75672
|
}
|
|
75676
75673
|
|
|
75674
|
+
/**
|
|
75675
|
+
* Prerendering prepares render-ready dies data to be used by the rendering module
|
|
75676
|
+
*/
|
|
75677
|
+
class Prerendering {
|
|
75678
|
+
get labelsFontSize() {
|
|
75679
|
+
return this._labelsFontSize;
|
|
75680
|
+
}
|
|
75681
|
+
get colorScale() {
|
|
75682
|
+
return this._colorScale;
|
|
75683
|
+
}
|
|
75684
|
+
constructor(wafermap) {
|
|
75685
|
+
this.wafermap = wafermap;
|
|
75686
|
+
this.fontSizeFactor = 0.8;
|
|
75687
|
+
this.colorScaleResolution = 10;
|
|
75688
|
+
}
|
|
75689
|
+
update() {
|
|
75690
|
+
this._labelsFontSize = this.calculateLabelsFontSize(this.wafermap.experimentalDataManager.dieDimensions, this.wafermap.maxCharacters);
|
|
75691
|
+
this._colorScale = this.calculateColorScale();
|
|
75692
|
+
}
|
|
75693
|
+
calculateColorScale() {
|
|
75694
|
+
if (this.wafermap.colorScaleMode === WaferMapColorScaleMode.linear) {
|
|
75695
|
+
const values = this.wafermap.colorScale.values.map(item => +item);
|
|
75696
|
+
const d3ColorScale = linear()
|
|
75697
|
+
.domain(values)
|
|
75698
|
+
.range(this.wafermap.colorScale.colors);
|
|
75699
|
+
let min = values[0];
|
|
75700
|
+
let max = values[0];
|
|
75701
|
+
values.forEach(value => {
|
|
75702
|
+
if (value < min) {
|
|
75703
|
+
min = value;
|
|
75704
|
+
}
|
|
75705
|
+
if (value > max) {
|
|
75706
|
+
max = value;
|
|
75707
|
+
}
|
|
75708
|
+
});
|
|
75709
|
+
// the linear color scale will not be infinite but will be limited by the color scale resolution
|
|
75710
|
+
const valueSamples = ticks(min, max, values.length * this.colorScaleResolution);
|
|
75711
|
+
return valueSamples.map(value => {
|
|
75712
|
+
return {
|
|
75713
|
+
color: d3ColorScale(value),
|
|
75714
|
+
value
|
|
75715
|
+
};
|
|
75716
|
+
});
|
|
75717
|
+
}
|
|
75718
|
+
// ordinal color categories have to be sorted by value
|
|
75719
|
+
return this.wafermap.colorScale.colors
|
|
75720
|
+
.map((color, index) => {
|
|
75721
|
+
return {
|
|
75722
|
+
color,
|
|
75723
|
+
value: +this.wafermap.colorScale.values[index]
|
|
75724
|
+
};
|
|
75725
|
+
})
|
|
75726
|
+
.sort((a, b) => a.value - b.value);
|
|
75727
|
+
}
|
|
75728
|
+
calculateLabelsFontSize(dieDimensions, maxCharacters) {
|
|
75729
|
+
return Math.min(dieDimensions.height, (dieDimensions.width / (Math.max(2, maxCharacters) * 0.5))
|
|
75730
|
+
* this.fontSizeFactor);
|
|
75731
|
+
}
|
|
75732
|
+
}
|
|
75733
|
+
|
|
75677
75734
|
/**
|
|
75678
75735
|
* Data Manager uses Computations and Prerendering modules in order and exposes the results
|
|
75679
75736
|
*/
|
|
@@ -75696,38 +75753,20 @@ img.ProseMirror-separator {
|
|
|
75696
75753
|
get labelsFontSize() {
|
|
75697
75754
|
return this.prerendering.labelsFontSize;
|
|
75698
75755
|
}
|
|
75699
|
-
get
|
|
75700
|
-
return this.prerendering.
|
|
75701
|
-
}
|
|
75702
|
-
get data() {
|
|
75703
|
-
return this.dataMap;
|
|
75756
|
+
get colorScale() {
|
|
75757
|
+
return this.prerendering.colorScale;
|
|
75704
75758
|
}
|
|
75705
75759
|
constructor(wafermap) {
|
|
75706
75760
|
this.wafermap = wafermap;
|
|
75707
75761
|
this.computations = new Computations(wafermap);
|
|
75708
75762
|
this.prerendering = new Prerendering(wafermap);
|
|
75709
75763
|
}
|
|
75710
|
-
|
|
75711
|
-
this.computations.
|
|
75712
|
-
this.
|
|
75713
|
-
this.updateLabelsFontSize();
|
|
75764
|
+
updateComputations() {
|
|
75765
|
+
this.computations.update();
|
|
75766
|
+
this.prerendering.update();
|
|
75714
75767
|
}
|
|
75715
|
-
|
|
75716
|
-
this.
|
|
75717
|
-
this.updateDataMap();
|
|
75718
|
-
this.updateLabelsFontSize();
|
|
75719
|
-
}
|
|
75720
|
-
updateLabelsFontSize() {
|
|
75721
|
-
this.prerendering.updateLabelsFontSize();
|
|
75722
|
-
}
|
|
75723
|
-
updateDiesRenderInfo() {
|
|
75724
|
-
this.prerendering.updateDiesRenderInfo();
|
|
75725
|
-
}
|
|
75726
|
-
getWaferMapDie(point) {
|
|
75727
|
-
return this.dataMap.get(`${point.x}_${point.y}`);
|
|
75728
|
-
}
|
|
75729
|
-
updateDataMap() {
|
|
75730
|
-
this.dataMap = new Map(this.wafermap.dies.map(die => [`${die.x}_${die.y}`, die]));
|
|
75768
|
+
updatePrerendering() {
|
|
75769
|
+
this.prerendering.update();
|
|
75731
75770
|
}
|
|
75732
75771
|
}
|
|
75733
75772
|
|
|
@@ -76608,18 +76647,14 @@ img.ProseMirror-separator {
|
|
|
76608
76647
|
constructor(wafermap) {
|
|
76609
76648
|
this.wafermap = wafermap;
|
|
76610
76649
|
}
|
|
76611
|
-
updateSortedDiesAndDrawWafer() {
|
|
76612
|
-
// redundant function for backwards compatibility
|
|
76613
|
-
this.drawWafer();
|
|
76614
|
-
}
|
|
76615
76650
|
drawWafer() {
|
|
76616
76651
|
// rendering will be implemented in a future PR
|
|
76617
76652
|
this.renderHover();
|
|
76618
76653
|
}
|
|
76619
76654
|
renderHover() {
|
|
76620
|
-
this.wafermap.hoverWidth = this.wafermap.
|
|
76655
|
+
this.wafermap.hoverWidth = this.wafermap.experimentalDataManager.dieDimensions.width
|
|
76621
76656
|
* this.wafermap.transform.k;
|
|
76622
|
-
this.wafermap.hoverHeight = this.wafermap.
|
|
76657
|
+
this.wafermap.hoverHeight = this.wafermap.experimentalDataManager.dieDimensions.height
|
|
76623
76658
|
* this.wafermap.transform.k;
|
|
76624
76659
|
this.wafermap.hoverOpacity = this.wafermap.hoverDie === undefined
|
|
76625
76660
|
? HoverDieOpacity.hide
|
|
@@ -76628,17 +76663,17 @@ img.ProseMirror-separator {
|
|
|
76628
76663
|
}
|
|
76629
76664
|
calculateHoverTransform() {
|
|
76630
76665
|
if (this.wafermap.hoverDie !== undefined) {
|
|
76631
|
-
const scaledX = this.wafermap.
|
|
76666
|
+
const scaledX = this.wafermap.experimentalDataManager.horizontalScale(this.wafermap.hoverDie.x);
|
|
76632
76667
|
if (scaledX === undefined) {
|
|
76633
76668
|
return '';
|
|
76634
76669
|
}
|
|
76635
|
-
const scaledY = this.wafermap.
|
|
76670
|
+
const scaledY = this.wafermap.experimentalDataManager.verticalScale(this.wafermap.hoverDie.y);
|
|
76636
76671
|
if (scaledY === undefined) {
|
|
76637
76672
|
return '';
|
|
76638
76673
|
}
|
|
76639
76674
|
const transformedPoint = this.wafermap.transform.apply([
|
|
76640
|
-
scaledX + this.wafermap.
|
|
76641
|
-
scaledY + this.wafermap.
|
|
76675
|
+
scaledX + this.wafermap.experimentalDataManager.margin.left,
|
|
76676
|
+
scaledY + this.wafermap.experimentalDataManager.margin.top
|
|
76642
76677
|
]);
|
|
76643
76678
|
return `translate(${transformedPoint[0]}, ${transformedPoint[1]})`;
|
|
76644
76679
|
}
|
|
@@ -76653,7 +76688,7 @@ img.ProseMirror-separator {
|
|
|
76653
76688
|
constructor(wafermap) {
|
|
76654
76689
|
this.wafermap = wafermap;
|
|
76655
76690
|
this.onMouseMove = (event) => {
|
|
76656
|
-
if (this.wafermap.
|
|
76691
|
+
if (this.wafermap.isExperimentalUpdate()) {
|
|
76657
76692
|
return;
|
|
76658
76693
|
}
|
|
76659
76694
|
const mousePosition = {
|
|
@@ -76698,8 +76733,7 @@ img.ProseMirror-separator {
|
|
|
76698
76733
|
this.wafermap.removeEventListener('mouseout', this.onMouseOut);
|
|
76699
76734
|
}
|
|
76700
76735
|
calculateDieCoordinates(mousePosition) {
|
|
76701
|
-
if (!this.wafermap.
|
|
76702
|
-
&& this.wafermap.dataManager instanceof DataManager$1) {
|
|
76736
|
+
if (!this.wafermap.isExperimentalUpdate()) {
|
|
76703
76737
|
const originLocation = this.wafermap.originLocation;
|
|
76704
76738
|
const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
|
|
76705
76739
|
|| originLocation === WaferMapOriginLocation.topLeft
|
|
@@ -76732,12 +76766,8 @@ img.ProseMirror-separator {
|
|
|
76732
76766
|
class HoverHandler {
|
|
76733
76767
|
constructor(wafermap) {
|
|
76734
76768
|
this.wafermap = wafermap;
|
|
76735
|
-
/**
|
|
76736
|
-
* @internal
|
|
76737
|
-
* keep public for testing until data manager refactor
|
|
76738
|
-
*/
|
|
76739
76769
|
this.onMouseMove = (event) => {
|
|
76740
|
-
if (!this.wafermap.
|
|
76770
|
+
if (!this.wafermap.isExperimentalUpdate()) {
|
|
76741
76771
|
return;
|
|
76742
76772
|
}
|
|
76743
76773
|
// get original mouse position in case we are in zoom.
|
|
@@ -76792,8 +76822,7 @@ img.ProseMirror-separator {
|
|
|
76792
76822
|
this.wafermap.removeEventListener('mouseout', this.onMouseOut);
|
|
76793
76823
|
}
|
|
76794
76824
|
calculateDieCoordinates(mousePosition) {
|
|
76795
|
-
if (this.wafermap.
|
|
76796
|
-
&& this.wafermap.dataManager instanceof DataManager) {
|
|
76825
|
+
if (this.wafermap.isExperimentalUpdate()) {
|
|
76797
76826
|
const originLocation = this.wafermap.originLocation;
|
|
76798
76827
|
const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
|
|
76799
76828
|
|| originLocation === WaferMapOriginLocation.topLeft
|
|
@@ -76804,8 +76833,10 @@ img.ProseMirror-separator {
|
|
|
76804
76833
|
? Math.ceil
|
|
76805
76834
|
: Math.floor;
|
|
76806
76835
|
// go to x and y scale to get the x,y values of the die.
|
|
76807
|
-
const x = xRoundFunction(this.wafermap.
|
|
76808
|
-
|
|
76836
|
+
const x = xRoundFunction(this.wafermap.experimentalDataManager.horizontalScale.invert(mousePosition.x
|
|
76837
|
+
- this.wafermap.experimentalDataManager.margin.left));
|
|
76838
|
+
const y = yRoundFunction(this.wafermap.experimentalDataManager.verticalScale.invert(mousePosition.y
|
|
76839
|
+
- this.wafermap.experimentalDataManager.margin.top));
|
|
76809
76840
|
return { x, y };
|
|
76810
76841
|
}
|
|
76811
76842
|
return undefined;
|
|
@@ -76876,24 +76907,10 @@ img.ProseMirror-separator {
|
|
|
76876
76907
|
this.dieLabelsHidden = false;
|
|
76877
76908
|
this.dieLabelsSuffix = '';
|
|
76878
76909
|
this.colorScaleMode = WaferMapColorScaleMode.linear;
|
|
76879
|
-
/**
|
|
76880
|
-
* @internal
|
|
76881
|
-
*/
|
|
76882
|
-
this.stableDataManager = new DataManager$1(this.asRequiredFieldsWaferMap);
|
|
76883
|
-
/**
|
|
76884
|
-
* @internal
|
|
76885
|
-
*/
|
|
76886
76910
|
this.experimentalDataManager = new DataManager(this.asRequiredFieldsWaferMap);
|
|
76887
|
-
this.dataManager = this.
|
|
76888
|
-
/**
|
|
76889
|
-
* @internal
|
|
76890
|
-
*/
|
|
76891
|
-
this.mainRenderer = new RenderingModule(this.asRequiredFieldsWaferMap);
|
|
76892
|
-
/**
|
|
76893
|
-
* @internal
|
|
76894
|
-
*/
|
|
76911
|
+
this.dataManager = new DataManager$1(this.asRequiredFieldsWaferMap);
|
|
76895
76912
|
this.workerRenderer = new WorkerRenderer(this.asRequiredFieldsWaferMap);
|
|
76896
|
-
this.renderer = this.
|
|
76913
|
+
this.renderer = new RenderingModule(this.asRequiredFieldsWaferMap);
|
|
76897
76914
|
/**
|
|
76898
76915
|
* @internal
|
|
76899
76916
|
*/
|
|
@@ -76951,6 +76968,36 @@ img.ProseMirror-separator {
|
|
|
76951
76968
|
this.zoomHandler.disconnect();
|
|
76952
76969
|
this.resizeObserver.unobserve(this);
|
|
76953
76970
|
}
|
|
76971
|
+
/**
|
|
76972
|
+
* @internal
|
|
76973
|
+
* Experimental update function called when an update is queued.
|
|
76974
|
+
*/
|
|
76975
|
+
experimentalUpdate() {
|
|
76976
|
+
if (this.validity.invalidDiesTableSchema) {
|
|
76977
|
+
return;
|
|
76978
|
+
}
|
|
76979
|
+
if (this.waferMapUpdateTracker.requiresEventsUpdate) {
|
|
76980
|
+
// zoom translateExtent needs to be recalculated when canvas size changes
|
|
76981
|
+
this.zoomHandler.disconnect();
|
|
76982
|
+
if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate
|
|
76983
|
+
|| this.waferMapUpdateTracker.requiresScalesUpdate) {
|
|
76984
|
+
this.experimentalDataManager.updateComputations();
|
|
76985
|
+
this.workerRenderer.drawWafer();
|
|
76986
|
+
}
|
|
76987
|
+
else if (this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate
|
|
76988
|
+
|| this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate) {
|
|
76989
|
+
this.experimentalDataManager.updatePrerendering();
|
|
76990
|
+
this.workerRenderer.drawWafer();
|
|
76991
|
+
}
|
|
76992
|
+
else if (this.waferMapUpdateTracker.requiresDrawnWaferUpdate) {
|
|
76993
|
+
this.workerRenderer.drawWafer();
|
|
76994
|
+
}
|
|
76995
|
+
this.zoomHandler.connect();
|
|
76996
|
+
}
|
|
76997
|
+
else if (this.waferMapUpdateTracker.requiresRenderHoverUpdate) {
|
|
76998
|
+
this.workerRenderer.renderHover();
|
|
76999
|
+
}
|
|
77000
|
+
}
|
|
76954
77001
|
/**
|
|
76955
77002
|
* @internal
|
|
76956
77003
|
* Update function called when an update is queued.
|
|
@@ -76961,18 +77008,13 @@ img.ProseMirror-separator {
|
|
|
76961
77008
|
*/
|
|
76962
77009
|
update() {
|
|
76963
77010
|
this.validate();
|
|
76964
|
-
if (this.
|
|
77011
|
+
if (this.isExperimentalUpdate()) {
|
|
77012
|
+
this.experimentalUpdate();
|
|
76965
77013
|
return;
|
|
76966
77014
|
}
|
|
76967
|
-
this.renderer = this.isExperimentalRenderer()
|
|
76968
|
-
? this.workerRenderer
|
|
76969
|
-
: this.mainRenderer;
|
|
76970
77015
|
if (this.waferMapUpdateTracker.requiresEventsUpdate) {
|
|
76971
77016
|
// zoom translateExtent needs to be recalculated when canvas size changes
|
|
76972
77017
|
this.zoomHandler.disconnect();
|
|
76973
|
-
this.dataManager = this.isExperimentalRenderer()
|
|
76974
|
-
? this.experimentalDataManager
|
|
76975
|
-
: this.stableDataManager;
|
|
76976
77018
|
if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) {
|
|
76977
77019
|
this.dataManager.updateContainerDimensions();
|
|
76978
77020
|
this.renderer.updateSortedDiesAndDrawWafer();
|
|
@@ -77001,7 +77043,7 @@ img.ProseMirror-separator {
|
|
|
77001
77043
|
/**
|
|
77002
77044
|
* @internal
|
|
77003
77045
|
*/
|
|
77004
|
-
|
|
77046
|
+
isExperimentalUpdate() {
|
|
77005
77047
|
return this.diesTable !== undefined;
|
|
77006
77048
|
}
|
|
77007
77049
|
validate() {
|