@ni/nimble-components 23.0.0 → 24.0.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/dist/all-components-bundle.js +336 -310
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +3592 -3619
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/menu-button/index.d.ts +2 -2
- package/dist/esm/menu-button/index.js +4 -2
- package/dist/esm/menu-button/index.js.map +1 -1
- package/dist/esm/menu-button/template.js +1 -0
- package/dist/esm/menu-button/template.js.map +1 -1
- package/dist/esm/menu-button/types.d.ts +1 -1
- package/dist/esm/menu-button/types.js +1 -1
- package/dist/esm/menu-button/types.js.map +1 -1
- package/dist/esm/patterns/button/styles.js +42 -42
- package/dist/esm/patterns/button/styles.js.map +1 -1
- package/dist/esm/theme-provider/design-token-comments.js +0 -2
- package/dist/esm/theme-provider/design-token-comments.js.map +1 -1
- package/dist/esm/theme-provider/design-token-names.js +0 -2
- package/dist/esm/theme-provider/design-token-names.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.d.ts +0 -2
- package/dist/esm/theme-provider/design-tokens.js +4 -6
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/dist/esm/toggle-button/index.d.ts +7 -1
- package/dist/esm/toggle-button/index.js +3 -0
- package/dist/esm/toggle-button/index.js.map +1 -1
- package/dist/esm/toggle-button/styles.js +27 -58
- package/dist/esm/toggle-button/styles.js.map +1 -1
- package/dist/esm/toggle-button/types.d.ts +1 -1
- package/dist/esm/toggle-button/types.js +1 -1
- package/dist/esm/toggle-button/types.js.map +1 -1
- package/dist/esm/wafer-map/index.d.ts +13 -6
- package/dist/esm/wafer-map/index.js +33 -16
- package/dist/esm/wafer-map/index.js.map +1 -1
- package/dist/esm/wafer-map/modules/data-manager.js +1 -1
- package/dist/esm/wafer-map/modules/data-manager.js.map +1 -1
- package/dist/esm/wafer-map/modules/experimental/hover-handler.d.ts +23 -0
- package/dist/esm/wafer-map/modules/experimental/hover-handler.js +80 -0
- package/dist/esm/wafer-map/modules/experimental/hover-handler.js.map +1 -0
- package/dist/esm/wafer-map/modules/{worker-renderer.d.ts → experimental/worker-renderer.d.ts} +1 -1
- package/dist/esm/wafer-map/modules/{worker-renderer.js → experimental/worker-renderer.js} +1 -1
- package/dist/esm/wafer-map/modules/experimental/worker-renderer.js.map +1 -0
- package/dist/esm/wafer-map/modules/hover-handler.d.ts +10 -2
- package/dist/esm/wafer-map/modules/hover-handler.js +43 -26
- package/dist/esm/wafer-map/modules/hover-handler.js.map +1 -1
- package/dist/esm/wafer-map/modules/prerendering.d.ts +1 -3
- package/dist/esm/wafer-map/modules/prerendering.js +5 -6
- package/dist/esm/wafer-map/modules/prerendering.js.map +1 -1
- package/dist/esm/wafer-map/modules/wafer-map-validator.js +17 -23
- package/dist/esm/wafer-map/modules/wafer-map-validator.js.map +1 -1
- package/dist/esm/wafer-map/modules/zoom-handler.d.ts +11 -7
- package/dist/esm/wafer-map/modules/zoom-handler.js +27 -37
- package/dist/esm/wafer-map/modules/zoom-handler.js.map +1 -1
- package/dist/esm/wafer-map/template.d.ts +1 -1
- package/dist/esm/wafer-map/types.d.ts +11 -0
- package/dist/esm/wafer-map/types.js.map +1 -1
- package/dist/tokens-internal.scss +0 -12
- package/dist/tokens.scss +0 -6
- package/package.json +3 -3
- package/dist/esm/wafer-map/modules/event-coordinator.d.ts +0 -19
- package/dist/esm/wafer-map/modules/event-coordinator.js +0 -35
- package/dist/esm/wafer-map/modules/event-coordinator.js.map +0 -1
- package/dist/esm/wafer-map/modules/worker-renderer.js.map +0 -1
|
@@ -16301,7 +16301,7 @@
|
|
|
16301
16301
|
|
|
16302
16302
|
/**
|
|
16303
16303
|
* Do not edit directly
|
|
16304
|
-
* Generated on
|
|
16304
|
+
* Generated on Tue, 26 Mar 2024 20:29:30 GMT
|
|
16305
16305
|
*/
|
|
16306
16306
|
|
|
16307
16307
|
const Information100DarkUi = "#a46eff";
|
|
@@ -16324,9 +16324,8 @@
|
|
|
16324
16324
|
const DigitalGreenLight = "#009b65";
|
|
16325
16325
|
const BannerFail100DarkUi = "#d63434";
|
|
16326
16326
|
const Warning100LightUi = "#ff4b00";
|
|
16327
|
-
const DigitalGreenDark = "#
|
|
16327
|
+
const DigitalGreenDark = "#008557";
|
|
16328
16328
|
const DigitalGreenDark105 = "#00734b";
|
|
16329
|
-
const DigitalGreenDark110 = "#00613f";
|
|
16330
16329
|
const PowerGreen = "#32eb96";
|
|
16331
16330
|
const Title2Family = "Source Sans Pro";
|
|
16332
16331
|
const Title2Weight = "400";
|
|
@@ -16447,12 +16446,10 @@
|
|
|
16447
16446
|
sectionBackgroundColor: 'section-background-color',
|
|
16448
16447
|
buttonFillPrimaryColor: 'button-fill-primary-color',
|
|
16449
16448
|
buttonPrimaryFontColor: 'button-primary-font-color',
|
|
16450
|
-
buttonFillActivePrimaryColor: 'button-fill-active-primary-color',
|
|
16451
16449
|
buttonFillAccentColor: 'button-fill-accent-color',
|
|
16452
16450
|
buttonAccentBlockFontColor: 'button-accent-block-font-color',
|
|
16453
16451
|
buttonAccentOutlineFontColor: 'button-accent-outline-font-color',
|
|
16454
16452
|
buttonBorderAccentOutlineColor: 'button-border-accent-outline-color',
|
|
16455
|
-
buttonFillAccentActiveColor: 'button-fill-accent-active-color',
|
|
16456
16453
|
fillSelectedColor: 'fill-selected-color',
|
|
16457
16454
|
fillSelectedRgbPartialColor: 'fill-selected-rgb-partial-color',
|
|
16458
16455
|
fillHoverSelectedColor: 'fill-hover-selected-color',
|
|
@@ -16905,12 +16902,10 @@
|
|
|
16905
16902
|
const tableRowBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.tableRowBorderColor)).withDefault((element) => getColorForTheme(element, Black15, Black80, ForestGreen));
|
|
16906
16903
|
const buttonFillPrimaryColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillPrimaryColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(Black91, 0.75), hexToRgbaCssColor(Black15, 0.3), hexToRgbaCssColor(White, 0.3)));
|
|
16907
16904
|
const buttonPrimaryFontColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonPrimaryFontColor)).withDefault((element) => getColorForTheme(element, Black15, Black15, White));
|
|
16908
|
-
const buttonFillActivePrimaryColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillActivePrimaryColor)).withDefault((element) => getColorForTheme(element, hexToRgbaCssColor(Black91, 0.85), hexToRgbaCssColor(Black15, 0.2), hexToRgbaCssColor(White, 0.2)));
|
|
16909
16905
|
const buttonFillAccentColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillAccentColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark, DigitalGreenLight, hexToRgbaCssColor(White, 0.1)));
|
|
16910
16906
|
const buttonAccentBlockFontColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonAccentBlockFontColor)).withDefault((element) => getColorForTheme(element, White, Black15, White));
|
|
16911
16907
|
const buttonAccentOutlineFontColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonAccentOutlineFontColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark105, PowerGreen, White));
|
|
16912
16908
|
const buttonBorderAccentOutlineColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonBorderAccentOutlineColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, PowerGreen, hexToRgbaCssColor(White, 0.3)));
|
|
16913
|
-
const buttonFillAccentActiveColor = DesignToken.create(styleNameFromTokenName(tokenNames.buttonFillAccentActiveColor)).withDefault((element) => getColorForTheme(element, DigitalGreenDark110, DigitalGreenDark, hexToRgbaCssColor(White, 0.2)));
|
|
16914
16909
|
// Component Sizing Tokens
|
|
16915
16910
|
const controlHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlHeight)).withDefault('32px');
|
|
16916
16911
|
const controlSlimHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlSlimHeight)).withDefault('24px');
|
|
@@ -16946,9 +16941,9 @@
|
|
|
16946
16941
|
const [subtitlePlus1Font, subtitlePlus1FontColor, subtitlePlus1DisabledFontColor, subtitlePlus1FontFamily, subtitlePlus1FontWeight, subtitlePlus1FontSize, subtitlePlus1FontLineHeight, subtitlePlus1FallbackFontFamily] = createFontTokens(tokenNames.subtitlePlus1Font, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Subtitle2Family, Subtitle2Weight, Subtitle2Size, Subtitle2LineHeight, Subtitle2FallbackFontFamily);
|
|
16947
16942
|
const [subtitleFont, subtitleFontColor, subtitleDisabledFontColor, subtitleFontFamily, subtitleFontWeight, subtitleFontSize, subtitleFontLineHeight, subtitleFallbackFontFamily] = createFontTokens(tokenNames.subtitleFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Subtitle1Family, Subtitle1Weight, Subtitle1Size, Subtitle1LineHeight, Subtitle1FallbackFontFamily);
|
|
16948
16943
|
const [linkFont, linkFontColor, linkDisabledFontColor, linkFontFamily, linkFontWeight, linkFontSize, linkFontLineHeight, linkFallbackFontFamily] = createFontTokens(tokenNames.linkFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight, LinkFallbackFontFamily);
|
|
16949
|
-
const [linkActiveFont, linkActiveFontColor, linkActiveDisabledFontColor, linkActiveFontFamily, linkActiveFontWeight, linkActiveFontSize, linkActiveFontLineHeight, linkActiveFallbackFontFamily] = createFontTokens(tokenNames.linkActiveFont, (element) => getColorForTheme(element,
|
|
16950
|
-
const [linkProminentFont, linkProminentFontColor, linkProminentDisabledFontColor, linkProminentFontFamily, linkProminentFontWeight, linkProminentFontSize, linkProminentFontLineHeight, linkProminentFallbackFontFamily] = createFontTokens(tokenNames.linkProminentFont, (element) => getColorForTheme(element,
|
|
16951
|
-
const [linkActiveProminentFont, linkActiveProminentFontColor, linkActiveProminentDisabledFontColor, linkActiveProminentFontFamily, linkActiveProminentFontWeight, linkActiveProminentFontSize, linkActiveProminentFontLineHeight, linkActiveProminentFallbackFontFamily] = createFontTokens(tokenNames.linkActiveProminentFont, (element) =>
|
|
16944
|
+
const [linkActiveFont, linkActiveFontColor, linkActiveDisabledFontColor, linkActiveFontFamily, linkActiveFontWeight, linkActiveFontSize, linkActiveFontLineHeight, linkActiveFallbackFontFamily] = createFontTokens(tokenNames.linkActiveFont, (element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, hexToRgbaCssColor(White, 0.6)), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight, LinkFallbackFontFamily);
|
|
16945
|
+
const [linkProminentFont, linkProminentFontColor, linkProminentDisabledFontColor, linkProminentFontFamily, linkProminentFontWeight, linkProminentFontSize, linkProminentFontLineHeight, linkProminentFallbackFontFamily] = createFontTokens(tokenNames.linkProminentFont, (element) => getColorForTheme(element, DigitalGreenDark105, PowerGreen, PowerGreen), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight, LinkFallbackFontFamily);
|
|
16946
|
+
const [linkActiveProminentFont, linkActiveProminentFontColor, linkActiveProminentDisabledFontColor, linkActiveProminentFontFamily, linkActiveProminentFontWeight, linkActiveProminentFontSize, linkActiveProminentFontLineHeight, linkActiveProminentFallbackFontFamily] = createFontTokens(tokenNames.linkActiveProminentFont, (element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, PowerGreen), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight, LinkFallbackFontFamily);
|
|
16952
16947
|
const [placeholderFont, placeholderFontColor, placeholderDisabledFontColor, placeholderFontFamily, placeholderFontWeight, placeholderFontSize, placeholderFontLineHeight, placeholderFallbackFontFamily] = createFontTokens(tokenNames.placeholderFont, (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.6), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), PlaceholderFamily, PlaceholderWeight, PlaceholderSize, PlaceholderLineHeight, PlaceholderFallbackFontFamily);
|
|
16953
16948
|
const [bodyFont, bodyFontColor, bodyDisabledFontColor, bodyFontFamily, bodyFontWeight, bodyFontSize, bodyFontLineHeight, bodyFallbackFontFamily] = createFontTokens(tokenNames.bodyFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyFamily, BodyWeight, BodySize, BodyLineHeight, BodyFallbackFontFamily);
|
|
16954
16949
|
const [bodyEmphasizedFont, bodyEmphasizedFontColor, bodyEmphasizedDisabledFontColor, bodyEmphasizedFontFamily, bodyEmphasizedFontWeight, bodyEmphasizedFontSize, bodyEmphasizedFontLineHeight, bodyEmphasizedFallbackFontFamily] = createFontTokens(tokenNames.bodyEmphasizedFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyEmphasizedFamily, BodyEmphasizedWeight, BodyEmphasizedSize, BodyEmphasizedLineHeight, BodyEmphasizedFallbackFontFamily);
|
|
@@ -17352,7 +17347,7 @@
|
|
|
17352
17347
|
`;
|
|
17353
17348
|
|
|
17354
17349
|
const styles$V = css `
|
|
17355
|
-
@layer base, hover, focusVisible, active, disabled, top;
|
|
17350
|
+
@layer base, checked, hover, focusVisible, active, disabled, top;
|
|
17356
17351
|
|
|
17357
17352
|
@layer base {
|
|
17358
17353
|
${display('inline-flex')}
|
|
@@ -17425,15 +17420,15 @@
|
|
|
17425
17420
|
display: contents;
|
|
17426
17421
|
}
|
|
17427
17422
|
|
|
17428
|
-
:host([content-hidden]) .content {
|
|
17429
|
-
${accessiblyHidden}
|
|
17430
|
-
}
|
|
17431
|
-
|
|
17432
17423
|
[part='start'] {
|
|
17433
17424
|
display: contents;
|
|
17434
17425
|
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
17435
17426
|
}
|
|
17436
17427
|
|
|
17428
|
+
:host([content-hidden]) .content {
|
|
17429
|
+
${accessiblyHidden}
|
|
17430
|
+
}
|
|
17431
|
+
|
|
17437
17432
|
[part='end'] {
|
|
17438
17433
|
display: contents;
|
|
17439
17434
|
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
@@ -17462,6 +17457,8 @@
|
|
|
17462
17457
|
@layer active {
|
|
17463
17458
|
.control:active {
|
|
17464
17459
|
box-shadow: none;
|
|
17460
|
+
color: ${buttonLabelFontColor};
|
|
17461
|
+
border-color: ${borderHoverColor};
|
|
17465
17462
|
background-image: linear-gradient(
|
|
17466
17463
|
${fillSelectedColor},
|
|
17467
17464
|
${fillSelectedColor}
|
|
@@ -17472,29 +17469,30 @@
|
|
|
17472
17469
|
.control:active::before {
|
|
17473
17470
|
outline: none;
|
|
17474
17471
|
}
|
|
17472
|
+
|
|
17473
|
+
.control:active [part='start'],
|
|
17474
|
+
.control:active [part='end'] {
|
|
17475
|
+
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
17476
|
+
}
|
|
17475
17477
|
}
|
|
17476
17478
|
|
|
17477
17479
|
@layer disabled {
|
|
17478
17480
|
:host([disabled]) {
|
|
17479
|
-
color: ${buttonLabelDisabledFontColor};
|
|
17480
17481
|
cursor: default;
|
|
17481
17482
|
}
|
|
17482
17483
|
|
|
17483
17484
|
:host([disabled]) .control {
|
|
17485
|
+
color: ${buttonLabelDisabledFontColor};
|
|
17484
17486
|
box-shadow: none;
|
|
17485
17487
|
background-image: none;
|
|
17486
|
-
|
|
17488
|
+
background-size: 100% 100%;
|
|
17487
17489
|
}
|
|
17488
17490
|
|
|
17489
17491
|
:host([disabled]) .control::before {
|
|
17490
17492
|
box-shadow: none;
|
|
17491
17493
|
}
|
|
17492
17494
|
|
|
17493
|
-
:host([disabled]) slot[name='start']::slotted(*)
|
|
17494
|
-
opacity: 0.3;
|
|
17495
|
-
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
17496
|
-
}
|
|
17497
|
-
|
|
17495
|
+
:host([disabled]) slot[name='start']::slotted(*),
|
|
17498
17496
|
:host([disabled]) slot[name='end']::slotted(*) {
|
|
17499
17497
|
opacity: 0.3;
|
|
17500
17498
|
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
@@ -17559,7 +17557,6 @@
|
|
|
17559
17557
|
rgba(${borderRgbPartialColor}, 0.1),
|
|
17560
17558
|
rgba(${borderRgbPartialColor}, 0.1)
|
|
17561
17559
|
);
|
|
17562
|
-
background-size: 100% 100%;
|
|
17563
17560
|
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
17564
17561
|
}
|
|
17565
17562
|
}
|
|
@@ -17574,13 +17571,29 @@
|
|
|
17574
17571
|
border-color: ${buttonBorderAccentOutlineColor};
|
|
17575
17572
|
color: ${buttonAccentOutlineFontColor};
|
|
17576
17573
|
}
|
|
17574
|
+
|
|
17575
|
+
:host([appearance-variant='accent']) [part='start'],
|
|
17576
|
+
:host([appearance-variant='accent']) [part='end'] {
|
|
17577
|
+
${iconColor.cssCustomProperty}: ${buttonAccentOutlineFontColor};
|
|
17578
|
+
}
|
|
17577
17579
|
}
|
|
17578
|
-
|
|
17579
|
-
@layer
|
|
17580
|
-
:host([appearance-variant='
|
|
17581
|
-
${
|
|
17580
|
+
|
|
17581
|
+
@layer active {
|
|
17582
|
+
:host([appearance-variant='accent']) .control:active {
|
|
17583
|
+
color: ${buttonAccentOutlineFontColor};
|
|
17582
17584
|
}
|
|
17583
17585
|
|
|
17586
|
+
:host([appearance-variant='accent'])
|
|
17587
|
+
.control:active
|
|
17588
|
+
[part='start'],
|
|
17589
|
+
:host([appearance-variant='accent'])
|
|
17590
|
+
.control:active
|
|
17591
|
+
[part='end'] {
|
|
17592
|
+
${iconColor.cssCustomProperty}: ${buttonAccentOutlineFontColor};
|
|
17593
|
+
}
|
|
17594
|
+
}
|
|
17595
|
+
`), appearanceBehavior(ButtonAppearance.block, css `
|
|
17596
|
+
@layer base {
|
|
17584
17597
|
:host([appearance-variant='primary']) .control {
|
|
17585
17598
|
background-image: linear-gradient(
|
|
17586
17599
|
${buttonFillPrimaryColor},
|
|
@@ -17590,14 +17603,6 @@
|
|
|
17590
17603
|
border-color: ${buttonFillPrimaryColor};
|
|
17591
17604
|
}
|
|
17592
17605
|
|
|
17593
|
-
:host([appearance-variant='primary']) [part='end'] {
|
|
17594
|
-
${iconColor.cssCustomProperty}: white;
|
|
17595
|
-
}
|
|
17596
|
-
|
|
17597
|
-
:host([appearance-variant='accent']) [part='start'] {
|
|
17598
|
-
${iconColor.cssCustomProperty}: white;
|
|
17599
|
-
}
|
|
17600
|
-
|
|
17601
17606
|
:host([appearance-variant='accent']) .control {
|
|
17602
17607
|
background-image: linear-gradient(
|
|
17603
17608
|
${buttonFillAccentColor},
|
|
@@ -17607,24 +17612,14 @@
|
|
|
17607
17612
|
border-color: ${buttonFillAccentColor};
|
|
17608
17613
|
}
|
|
17609
17614
|
|
|
17610
|
-
:host([appearance-variant='
|
|
17611
|
-
|
|
17612
|
-
|
|
17613
|
-
}
|
|
17614
|
-
|
|
17615
|
-
@layer active {
|
|
17616
|
-
:host([appearance-variant='primary']) .control:active {
|
|
17617
|
-
background-image: linear-gradient(
|
|
17618
|
-
${buttonFillActivePrimaryColor},
|
|
17619
|
-
${buttonFillActivePrimaryColor}
|
|
17620
|
-
);
|
|
17615
|
+
:host([appearance-variant='primary']) [part='start'],
|
|
17616
|
+
:host([appearance-variant='primary']) [part='end'] {
|
|
17617
|
+
${iconColor.cssCustomProperty}: ${buttonPrimaryFontColor};
|
|
17621
17618
|
}
|
|
17622
17619
|
|
|
17623
|
-
:host([appearance-variant='accent'])
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
${buttonFillAccentActiveColor}
|
|
17627
|
-
);
|
|
17620
|
+
:host([appearance-variant='accent']) [part='start'],
|
|
17621
|
+
:host([appearance-variant='accent']) [part='end'] {
|
|
17622
|
+
${iconColor.cssCustomProperty}: ${buttonPrimaryFontColor};
|
|
17628
17623
|
}
|
|
17629
17624
|
}
|
|
17630
17625
|
`));
|
|
@@ -20442,60 +20437,22 @@
|
|
|
20442
20437
|
|
|
20443
20438
|
const styles$G = css `
|
|
20444
20439
|
${styles$V}
|
|
20440
|
+
${buttonAppearanceVariantStyles}
|
|
20445
20441
|
|
|
20446
|
-
@layer
|
|
20442
|
+
@layer checked {
|
|
20447
20443
|
.control[aria-pressed='true'] {
|
|
20448
20444
|
background-color: transparent;
|
|
20445
|
+
color: ${buttonLabelFontColor};
|
|
20449
20446
|
background-image: linear-gradient(
|
|
20450
20447
|
${fillSelectedColor},
|
|
20451
20448
|
${fillSelectedColor}
|
|
20452
20449
|
);
|
|
20453
20450
|
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
20454
20451
|
}
|
|
20455
|
-
}
|
|
20456
20452
|
|
|
20457
|
-
|
|
20458
|
-
.control[aria-pressed='true']
|
|
20459
|
-
|
|
20460
|
-
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
20461
|
-
background-image: linear-gradient(
|
|
20462
|
-
${fillSelectedColor},
|
|
20463
|
-
${fillSelectedColor}
|
|
20464
|
-
);
|
|
20465
|
-
background-size: calc(100% - 4px) calc(100% - 4px);
|
|
20466
|
-
}
|
|
20467
|
-
}
|
|
20468
|
-
|
|
20469
|
-
@layer focusVisible {
|
|
20470
|
-
.control[aria-pressed='true']${focusVisible} {
|
|
20471
|
-
border-color: ${borderHoverColor};
|
|
20472
|
-
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
20473
|
-
background-image: linear-gradient(
|
|
20474
|
-
${fillSelectedColor},
|
|
20475
|
-
${fillSelectedColor}
|
|
20476
|
-
);
|
|
20477
|
-
background-size: calc(100% - 4px) calc(100% - 4px);
|
|
20478
|
-
}
|
|
20479
|
-
|
|
20480
|
-
.control[aria-pressed='true']${focusVisible}::before {
|
|
20481
|
-
outline: ${borderWidth} solid ${borderHoverColor};
|
|
20482
|
-
outline-offset: -3px;
|
|
20483
|
-
color: transparent;
|
|
20484
|
-
}
|
|
20485
|
-
}
|
|
20486
|
-
|
|
20487
|
-
@layer active {
|
|
20488
|
-
.control[aria-pressed='true']:active {
|
|
20489
|
-
box-shadow: none;
|
|
20490
|
-
background-image: linear-gradient(
|
|
20491
|
-
${fillSelectedColor},
|
|
20492
|
-
${fillSelectedColor}
|
|
20493
|
-
);
|
|
20494
|
-
background-size: calc(100% - 2px) calc(100% - 2px);
|
|
20495
|
-
}
|
|
20496
|
-
|
|
20497
|
-
.control[aria-pressed='true']:active::before {
|
|
20498
|
-
outline: none;
|
|
20453
|
+
.control[aria-pressed='true'] [part='start'],
|
|
20454
|
+
.control[aria-pressed='true'] [part='end'] {
|
|
20455
|
+
${iconColor.cssCustomProperty}: ${buttonLabelFontColor};
|
|
20499
20456
|
}
|
|
20500
20457
|
}
|
|
20501
20458
|
|
|
@@ -20507,18 +20464,24 @@
|
|
|
20507
20464
|
);
|
|
20508
20465
|
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
20509
20466
|
}
|
|
20510
|
-
|
|
20511
|
-
:host([disabled]) .control[aria-pressed='true']:hover {
|
|
20512
|
-
background-image: linear-gradient(
|
|
20513
|
-
${fillSelectedColor},
|
|
20514
|
-
${fillSelectedColor}
|
|
20515
|
-
);
|
|
20516
|
-
background-size: 100% 100%;
|
|
20517
|
-
border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
|
|
20518
|
-
box-shadow: none;
|
|
20519
|
-
}
|
|
20520
20467
|
}
|
|
20521
|
-
|
|
20468
|
+
`.withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
|
|
20469
|
+
@layer checked {
|
|
20470
|
+
:host([appearance-variant='accent'])
|
|
20471
|
+
.control[aria-pressed='true'] {
|
|
20472
|
+
color: ${buttonAccentOutlineFontColor};
|
|
20473
|
+
}
|
|
20474
|
+
|
|
20475
|
+
:host([appearance-variant='accent'])
|
|
20476
|
+
.control[aria-pressed='true']
|
|
20477
|
+
[part='start'],
|
|
20478
|
+
:host([appearance-variant='accent'])
|
|
20479
|
+
.control[aria-pressed='true']
|
|
20480
|
+
[part='end'] {
|
|
20481
|
+
${iconColor.cssCustomProperty}: ${buttonAccentOutlineFontColor};
|
|
20482
|
+
}
|
|
20483
|
+
}
|
|
20484
|
+
`));
|
|
20522
20485
|
|
|
20523
20486
|
const template$v = (context, definition) => html `
|
|
20524
20487
|
<div
|
|
@@ -20589,6 +20552,9 @@
|
|
|
20589
20552
|
__decorate$1([
|
|
20590
20553
|
attr
|
|
20591
20554
|
], ToggleButton.prototype, "appearance", void 0);
|
|
20555
|
+
__decorate$1([
|
|
20556
|
+
attr({ attribute: 'appearance-variant' })
|
|
20557
|
+
], ToggleButton.prototype, "appearanceVariant", void 0);
|
|
20592
20558
|
__decorate$1([
|
|
20593
20559
|
attr({ attribute: 'content-hidden', mode: 'boolean' })
|
|
20594
20560
|
], ToggleButton.prototype, "contentHidden", void 0);
|
|
@@ -24706,6 +24672,19 @@
|
|
|
24706
24672
|
});
|
|
24707
24673
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
|
|
24708
24674
|
|
|
24675
|
+
/**
|
|
24676
|
+
* Types of menu button appearance.
|
|
24677
|
+
* @public
|
|
24678
|
+
*/
|
|
24679
|
+
/**
|
|
24680
|
+
* The options of where to position the menu relative to the menu button.
|
|
24681
|
+
*/
|
|
24682
|
+
const MenuButtonPosition = {
|
|
24683
|
+
above: 'above',
|
|
24684
|
+
below: 'below',
|
|
24685
|
+
auto: 'auto'
|
|
24686
|
+
};
|
|
24687
|
+
|
|
24709
24688
|
const styles$y = css `
|
|
24710
24689
|
${display('inline-block')}
|
|
24711
24690
|
|
|
@@ -24733,6 +24712,7 @@
|
|
|
24733
24712
|
<${toggleButtonTag}
|
|
24734
24713
|
part="button"
|
|
24735
24714
|
appearance="${x => x.appearance}"
|
|
24715
|
+
appearance-variant="${x => x.appearanceVariant}"
|
|
24736
24716
|
?content-hidden="${x => x.contentHidden}"
|
|
24737
24717
|
?checked="${x => x.open}"
|
|
24738
24718
|
?disabled="${x => x.disabled}"
|
|
@@ -24768,19 +24748,6 @@
|
|
|
24768
24748
|
</template>
|
|
24769
24749
|
`;
|
|
24770
24750
|
|
|
24771
|
-
/**
|
|
24772
|
-
* Types of menu button appearance.
|
|
24773
|
-
* @public
|
|
24774
|
-
*/
|
|
24775
|
-
/**
|
|
24776
|
-
* The options of where to position the menu relative to the menu button.
|
|
24777
|
-
*/
|
|
24778
|
-
const MenuButtonPosition = {
|
|
24779
|
-
above: 'above',
|
|
24780
|
-
below: 'below',
|
|
24781
|
-
auto: 'auto'
|
|
24782
|
-
};
|
|
24783
|
-
|
|
24784
24751
|
/**
|
|
24785
24752
|
* A nimble-styled menu button control.
|
|
24786
24753
|
*/
|
|
@@ -24957,6 +24924,9 @@
|
|
|
24957
24924
|
__decorate$1([
|
|
24958
24925
|
attr
|
|
24959
24926
|
], MenuButton.prototype, "appearance", void 0);
|
|
24927
|
+
__decorate$1([
|
|
24928
|
+
attr({ attribute: 'appearance-variant' })
|
|
24929
|
+
], MenuButton.prototype, "appearanceVariant", void 0);
|
|
24960
24930
|
__decorate$1([
|
|
24961
24931
|
attr({ mode: 'boolean' })
|
|
24962
24932
|
], MenuButton.prototype, "disabled", void 0);
|
|
@@ -73588,12 +73558,7 @@ img.ProseMirror-separator {
|
|
|
73588
73558
|
|
|
73589
73559
|
var identity$2 = new Transform(1, 0, 0);
|
|
73590
73560
|
|
|
73591
|
-
|
|
73592
|
-
|
|
73593
|
-
function transform(node) {
|
|
73594
|
-
while (!node.__zoom) if (!(node = node.parentNode)) return identity$2;
|
|
73595
|
-
return node.__zoom;
|
|
73596
|
-
}
|
|
73561
|
+
Transform.prototype;
|
|
73597
73562
|
|
|
73598
73563
|
function nopropagation(event) {
|
|
73599
73564
|
event.stopImmediatePropagation();
|
|
@@ -75312,16 +75277,15 @@ img.ProseMirror-separator {
|
|
|
75312
75277
|
get diesRenderInfo() {
|
|
75313
75278
|
return this._diesRenderInfo;
|
|
75314
75279
|
}
|
|
75315
|
-
constructor(wafermap
|
|
75280
|
+
constructor(wafermap) {
|
|
75316
75281
|
this.wafermap = wafermap;
|
|
75317
|
-
this.dataManager = dataManager;
|
|
75318
75282
|
this.fontSizeFactor = 0.8;
|
|
75319
75283
|
this.nonHighlightedOpacity = 0.3;
|
|
75320
75284
|
this.emptyDieColor = 'rgba(218,223,236,1)';
|
|
75321
75285
|
this.nanDieColor = 'rgba(122,122,122,1)';
|
|
75322
75286
|
}
|
|
75323
75287
|
updateLabelsFontSize() {
|
|
75324
|
-
this._labelsFontSize = this.calculateLabelsFontSize(this.dataManager.dieDimensions, this.wafermap.maxCharacters);
|
|
75288
|
+
this._labelsFontSize = this.calculateLabelsFontSize(this.wafermap.dataManager.dieDimensions, this.wafermap.maxCharacters);
|
|
75325
75289
|
this.updateDiesRenderInfo();
|
|
75326
75290
|
}
|
|
75327
75291
|
updateDiesRenderInfo() {
|
|
@@ -75332,9 +75296,9 @@ img.ProseMirror-separator {
|
|
|
75332
75296
|
.filter(isDieRenderInfo);
|
|
75333
75297
|
}
|
|
75334
75298
|
computeDieRenderInfo(die) {
|
|
75335
|
-
const margin = this.dataManager.margin;
|
|
75336
|
-
const scaledX = this.dataManager.horizontalScale(die.x);
|
|
75337
|
-
const scaledY = this.dataManager.verticalScale(die.y);
|
|
75299
|
+
const margin = this.wafermap.dataManager.margin;
|
|
75300
|
+
const scaledX = this.wafermap.dataManager.horizontalScale(die.x);
|
|
75301
|
+
const scaledY = this.wafermap.dataManager.verticalScale(die.y);
|
|
75338
75302
|
if (scaledX === undefined || scaledY === undefined) {
|
|
75339
75303
|
return null;
|
|
75340
75304
|
}
|
|
@@ -75453,7 +75417,7 @@ img.ProseMirror-separator {
|
|
|
75453
75417
|
constructor(wafermap) {
|
|
75454
75418
|
this.wafermap = wafermap;
|
|
75455
75419
|
this.computations = new Computations(wafermap);
|
|
75456
|
-
this.prerendering = new Prerendering(wafermap
|
|
75420
|
+
this.prerendering = new Prerendering(wafermap);
|
|
75457
75421
|
}
|
|
75458
75422
|
updateContainerDimensions() {
|
|
75459
75423
|
this.computations.updateContainerDimensions();
|
|
@@ -75602,147 +75566,6 @@ img.ProseMirror-separator {
|
|
|
75602
75566
|
}
|
|
75603
75567
|
}
|
|
75604
75568
|
|
|
75605
|
-
/**
|
|
75606
|
-
* ZoomHandler deals with user interactions and events like zooming
|
|
75607
|
-
*/
|
|
75608
|
-
class ZoomHandler {
|
|
75609
|
-
constructor(wafermap) {
|
|
75610
|
-
this.wafermap = wafermap;
|
|
75611
|
-
this.zoomTransform = identity$2;
|
|
75612
|
-
this.minScale = 1.1;
|
|
75613
|
-
this.minExtentPoint = [-100, -100];
|
|
75614
|
-
this.extentPadding = 100;
|
|
75615
|
-
}
|
|
75616
|
-
createZoomBehavior() {
|
|
75617
|
-
this.zoomBehavior = zoom()
|
|
75618
|
-
.scaleExtent([
|
|
75619
|
-
1.1,
|
|
75620
|
-
this.getZoomMax(this.wafermap.canvasWidth * this.wafermap.canvasHeight, this.wafermap.dataManager.containerDimensions.width
|
|
75621
|
-
* this.wafermap.dataManager.containerDimensions.height)
|
|
75622
|
-
])
|
|
75623
|
-
.translateExtent([
|
|
75624
|
-
this.minExtentPoint,
|
|
75625
|
-
[
|
|
75626
|
-
this.wafermap.canvasWidth + this.extentPadding,
|
|
75627
|
-
this.wafermap.canvasHeight + this.extentPadding
|
|
75628
|
-
]
|
|
75629
|
-
])
|
|
75630
|
-
.filter((event) => {
|
|
75631
|
-
const transform$1 = transform(this.wafermap.canvas);
|
|
75632
|
-
const filterEval = transform$1.k >= this.minScale || event.type === 'wheel';
|
|
75633
|
-
return filterEval;
|
|
75634
|
-
})
|
|
75635
|
-
.on('zoom', (event) => {
|
|
75636
|
-
// D3 will automatically remove existing handlers when adding new ones
|
|
75637
|
-
// See: https://github.com/d3/d3-zoom/blob/v3.0.0/README.md#zoom_on
|
|
75638
|
-
this.rescale(event);
|
|
75639
|
-
});
|
|
75640
|
-
this.zoomBehavior(select(this.wafermap.canvas));
|
|
75641
|
-
}
|
|
75642
|
-
rescale(event) {
|
|
75643
|
-
const transform = event.transform;
|
|
75644
|
-
if (transform.k === this.minScale) {
|
|
75645
|
-
this.zoomTransform = identity$2;
|
|
75646
|
-
this.zoomBehavior.transform(select(this.wafermap.canvas), identity$2);
|
|
75647
|
-
}
|
|
75648
|
-
else {
|
|
75649
|
-
this.zoomTransform = transform;
|
|
75650
|
-
}
|
|
75651
|
-
this.wafermap.transform = this.zoomTransform;
|
|
75652
|
-
}
|
|
75653
|
-
getZoomMax(canvasArea, dataArea) {
|
|
75654
|
-
return Math.ceil((dataArea / canvasArea) * 100);
|
|
75655
|
-
}
|
|
75656
|
-
}
|
|
75657
|
-
|
|
75658
|
-
/**
|
|
75659
|
-
* HoverHandler deals with user interactions and events like hovering
|
|
75660
|
-
*/
|
|
75661
|
-
class HoverHandler {
|
|
75662
|
-
constructor(wafermap) {
|
|
75663
|
-
this.wafermap = wafermap;
|
|
75664
|
-
}
|
|
75665
|
-
mousemove(event) {
|
|
75666
|
-
const mousePosition = {
|
|
75667
|
-
x: event.offsetX,
|
|
75668
|
-
y: event.offsetY
|
|
75669
|
-
};
|
|
75670
|
-
if (!this.hoversOverDie(this.wafermap, mousePosition)) {
|
|
75671
|
-
this.wafermap.hoverDie = undefined;
|
|
75672
|
-
return;
|
|
75673
|
-
}
|
|
75674
|
-
// get original mouse position in case we are in zoom.
|
|
75675
|
-
const invertedPoint = this.wafermap.transform.invert([
|
|
75676
|
-
mousePosition.x,
|
|
75677
|
-
mousePosition.y
|
|
75678
|
-
]);
|
|
75679
|
-
const dieCoordinates = this.calculateDieCoordinates(this.wafermap, {
|
|
75680
|
-
x: invertedPoint[0],
|
|
75681
|
-
y: invertedPoint[1]
|
|
75682
|
-
});
|
|
75683
|
-
this.wafermap.hoverDie = this.wafermap.dataManager.getWaferMapDie(dieCoordinates);
|
|
75684
|
-
}
|
|
75685
|
-
mouseout() {
|
|
75686
|
-
this.wafermap.hoverDie = undefined;
|
|
75687
|
-
}
|
|
75688
|
-
calculateDieCoordinates(wafermap, mousePosition) {
|
|
75689
|
-
const originLocation = wafermap.originLocation;
|
|
75690
|
-
const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
|
|
75691
|
-
|| originLocation === WaferMapOriginLocation.topLeft
|
|
75692
|
-
? Math.floor
|
|
75693
|
-
: Math.ceil;
|
|
75694
|
-
const yRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
|
|
75695
|
-
|| originLocation === WaferMapOriginLocation.bottomRight
|
|
75696
|
-
? Math.floor
|
|
75697
|
-
: Math.ceil;
|
|
75698
|
-
// go to x and y scale to get the x,y values of the die.
|
|
75699
|
-
const x = xRoundFunction(wafermap.dataManager.invertedHorizontalScale(mousePosition.x - wafermap.dataManager.margin.left));
|
|
75700
|
-
const y = yRoundFunction(wafermap.dataManager.invertedVerticalScale(mousePosition.y - wafermap.dataManager.margin.top));
|
|
75701
|
-
return { x, y };
|
|
75702
|
-
}
|
|
75703
|
-
hoversOverDie(wafermap, mousePosition) {
|
|
75704
|
-
const rgba = wafermap.canvasContext.getImageData(mousePosition.x, mousePosition.y, 1, 1).data;
|
|
75705
|
-
let rgbaSum = 0;
|
|
75706
|
-
for (const color of rgba) {
|
|
75707
|
-
rgbaSum += color;
|
|
75708
|
-
}
|
|
75709
|
-
return rgbaSum > 0;
|
|
75710
|
-
}
|
|
75711
|
-
}
|
|
75712
|
-
|
|
75713
|
-
/**
|
|
75714
|
-
* EventCoordinator deals with user interactions and events
|
|
75715
|
-
*/
|
|
75716
|
-
class EventCoordinator {
|
|
75717
|
-
constructor(wafermap) {
|
|
75718
|
-
this.wafermap = wafermap;
|
|
75719
|
-
this.onWheelMove = (event) => {
|
|
75720
|
-
event.preventDefault();
|
|
75721
|
-
};
|
|
75722
|
-
this.onMouseMove = (event) => {
|
|
75723
|
-
this.hoverHandler.mousemove(event);
|
|
75724
|
-
};
|
|
75725
|
-
this.onMouseOut = () => {
|
|
75726
|
-
this.hoverHandler.mouseout();
|
|
75727
|
-
};
|
|
75728
|
-
this.zoomHandler = new ZoomHandler(wafermap);
|
|
75729
|
-
this.hoverHandler = new HoverHandler(wafermap);
|
|
75730
|
-
}
|
|
75731
|
-
attachEvents() {
|
|
75732
|
-
this.zoomHandler.createZoomBehavior();
|
|
75733
|
-
this.wafermap.addEventListener('mousemove', this.onMouseMove);
|
|
75734
|
-
this.wafermap.addEventListener('mouseout', this.onMouseOut);
|
|
75735
|
-
this.wafermap.canvas.addEventListener('wheel', this.onWheelMove, {
|
|
75736
|
-
passive: false
|
|
75737
|
-
});
|
|
75738
|
-
}
|
|
75739
|
-
detachEvents() {
|
|
75740
|
-
this.wafermap.removeEventListener('mousemove', this.onMouseMove);
|
|
75741
|
-
this.wafermap.removeEventListener('mouseout', this.onMouseOut);
|
|
75742
|
-
this.wafermap.canvas.removeEventListener('wheel', this.onWheelMove);
|
|
75743
|
-
}
|
|
75744
|
-
}
|
|
75745
|
-
|
|
75746
75569
|
const trackedItems = [
|
|
75747
75570
|
'highlightedTags',
|
|
75748
75571
|
'canvasWidth',
|
|
@@ -76448,10 +76271,10 @@ img.ProseMirror-separator {
|
|
|
76448
76271
|
}
|
|
76449
76272
|
validateGridDimensions() {
|
|
76450
76273
|
this.invalidGridDimensions = false;
|
|
76451
|
-
if (
|
|
76452
|
-
&&
|
|
76453
|
-
&&
|
|
76454
|
-
&&
|
|
76274
|
+
if (this.wafermap.gridMinX === undefined
|
|
76275
|
+
&& this.wafermap.gridMaxX === undefined
|
|
76276
|
+
&& this.wafermap.gridMinY === undefined
|
|
76277
|
+
&& this.wafermap.gridMaxY === undefined) {
|
|
76455
76278
|
this.invalidGridDimensions = false;
|
|
76456
76279
|
}
|
|
76457
76280
|
else if (typeof this.wafermap.gridMinX !== 'number'
|
|
@@ -76470,25 +76293,19 @@ img.ProseMirror-separator {
|
|
|
76470
76293
|
this.invalidDiesTableSchema = false;
|
|
76471
76294
|
}
|
|
76472
76295
|
else {
|
|
76473
|
-
const
|
|
76474
|
-
const
|
|
76475
|
-
const
|
|
76476
|
-
|
|
76477
|
-
|
|
76478
|
-
||
|
|
76479
|
-
|| valueField
|
|
76480
|
-
|| !DataType.isInt(
|
|
76481
|
-
|
|
76482
|
-
||
|
|
76483
|
-
|
|
76484
|
-
|| !DataType.
|
|
76485
|
-
|
|
76486
|
-
|| this.wafermap.diesTable.schema.fields[rowIndexField].type
|
|
76487
|
-
.bitWidth !== 32
|
|
76488
|
-
|| !DataType.isFloat(this.wafermap.diesTable.schema.fields[valueField].type)
|
|
76489
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
76490
|
-
|| this.wafermap.diesTable.schema.fields[valueField].type
|
|
76491
|
-
.precision !== Precision.DOUBLE) {
|
|
76296
|
+
const fields = this.wafermap.diesTable.schema.fields;
|
|
76297
|
+
const colField = fields.find(field => field.name === 'colIndex');
|
|
76298
|
+
const rowField = fields.find(field => field.name === 'rowIndex');
|
|
76299
|
+
const valueField = fields.find(field => field.name === 'value');
|
|
76300
|
+
if (!colField
|
|
76301
|
+
|| !rowField
|
|
76302
|
+
|| !valueField
|
|
76303
|
+
|| !DataType.isInt(colField.type)
|
|
76304
|
+
|| colField.type.bitWidth !== 32
|
|
76305
|
+
|| !DataType.isInt(rowField.type)
|
|
76306
|
+
|| rowField.type.bitWidth !== 32
|
|
76307
|
+
|| !DataType.isFloat(valueField.type)
|
|
76308
|
+
|| valueField.type.precision !== Precision.DOUBLE) {
|
|
76492
76309
|
this.invalidDiesTableSchema = true;
|
|
76493
76310
|
}
|
|
76494
76311
|
}
|
|
@@ -76541,6 +76358,200 @@ img.ProseMirror-separator {
|
|
|
76541
76358
|
}
|
|
76542
76359
|
}
|
|
76543
76360
|
|
|
76361
|
+
/**
|
|
76362
|
+
* HoverHandler deals with user interactions and events like hovering
|
|
76363
|
+
*/
|
|
76364
|
+
let HoverHandler$1 = class HoverHandler {
|
|
76365
|
+
constructor(wafermap) {
|
|
76366
|
+
this.wafermap = wafermap;
|
|
76367
|
+
this.onMouseMove = (event) => {
|
|
76368
|
+
if (this.wafermap.isExperimentalRenderer()) {
|
|
76369
|
+
return;
|
|
76370
|
+
}
|
|
76371
|
+
const mousePosition = {
|
|
76372
|
+
x: event.offsetX,
|
|
76373
|
+
y: event.offsetY
|
|
76374
|
+
};
|
|
76375
|
+
if (!this.hoversOverDie(mousePosition)) {
|
|
76376
|
+
this.wafermap.hoverDie = undefined;
|
|
76377
|
+
return;
|
|
76378
|
+
}
|
|
76379
|
+
// get original mouse position in case we are in zoom.
|
|
76380
|
+
const invertedPoint = this.wafermap.transform.invert([
|
|
76381
|
+
mousePosition.x,
|
|
76382
|
+
mousePosition.y
|
|
76383
|
+
]);
|
|
76384
|
+
const dieCoordinates = this.calculateDieCoordinates({
|
|
76385
|
+
x: invertedPoint[0],
|
|
76386
|
+
y: invertedPoint[1]
|
|
76387
|
+
});
|
|
76388
|
+
this.wafermap.hoverDie = this.wafermap.dataManager.getWaferMapDie(dieCoordinates);
|
|
76389
|
+
};
|
|
76390
|
+
this.onMouseOut = (_event) => {
|
|
76391
|
+
this.wafermap.hoverDie = undefined;
|
|
76392
|
+
};
|
|
76393
|
+
}
|
|
76394
|
+
/**
|
|
76395
|
+
* @internal
|
|
76396
|
+
*/
|
|
76397
|
+
connect() {
|
|
76398
|
+
this.wafermap.addEventListener('mousemove', this.onMouseMove);
|
|
76399
|
+
this.wafermap.addEventListener('mouseout', this.onMouseOut);
|
|
76400
|
+
}
|
|
76401
|
+
/**
|
|
76402
|
+
* @internal
|
|
76403
|
+
*/
|
|
76404
|
+
disconnect() {
|
|
76405
|
+
this.wafermap.removeEventListener('mousemove', this.onMouseMove);
|
|
76406
|
+
this.wafermap.removeEventListener('mouseout', this.onMouseOut);
|
|
76407
|
+
}
|
|
76408
|
+
calculateDieCoordinates(mousePosition) {
|
|
76409
|
+
const originLocation = this.wafermap.originLocation;
|
|
76410
|
+
const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
|
|
76411
|
+
|| originLocation === WaferMapOriginLocation.topLeft
|
|
76412
|
+
? Math.floor
|
|
76413
|
+
: Math.ceil;
|
|
76414
|
+
const yRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
|
|
76415
|
+
|| originLocation === WaferMapOriginLocation.bottomRight
|
|
76416
|
+
? Math.floor
|
|
76417
|
+
: Math.ceil;
|
|
76418
|
+
// go to x and y scale to get the x,y values of the die.
|
|
76419
|
+
const x = xRoundFunction(this.wafermap.dataManager.invertedHorizontalScale(mousePosition.x - this.wafermap.dataManager.margin.left));
|
|
76420
|
+
const y = yRoundFunction(this.wafermap.dataManager.invertedVerticalScale(mousePosition.y - this.wafermap.dataManager.margin.top));
|
|
76421
|
+
return { x, y };
|
|
76422
|
+
}
|
|
76423
|
+
hoversOverDie(mousePosition) {
|
|
76424
|
+
const rgba = this.wafermap.canvasContext.getImageData(mousePosition.x, mousePosition.y, 1, 1).data;
|
|
76425
|
+
let rgbaSum = 0;
|
|
76426
|
+
for (const color of rgba) {
|
|
76427
|
+
rgbaSum += color;
|
|
76428
|
+
}
|
|
76429
|
+
return rgbaSum > 0;
|
|
76430
|
+
}
|
|
76431
|
+
};
|
|
76432
|
+
|
|
76433
|
+
/**
|
|
76434
|
+
* HoverHandler deals with user interactions and events like hovering
|
|
76435
|
+
*/
|
|
76436
|
+
class HoverHandler {
|
|
76437
|
+
constructor(wafermap) {
|
|
76438
|
+
this.wafermap = wafermap;
|
|
76439
|
+
/**
|
|
76440
|
+
* @internal
|
|
76441
|
+
* keep public for testing until data manager refactor
|
|
76442
|
+
*/
|
|
76443
|
+
this.onMouseMove = (event) => {
|
|
76444
|
+
if (!this.wafermap.isExperimentalRenderer()) {
|
|
76445
|
+
return;
|
|
76446
|
+
}
|
|
76447
|
+
// get original mouse position in case we are in zoom.
|
|
76448
|
+
const invertedPoint = this.wafermap.transform.invert([
|
|
76449
|
+
event.offsetX,
|
|
76450
|
+
event.offsetY
|
|
76451
|
+
]);
|
|
76452
|
+
// does not work yet until data manager will parse diesTable
|
|
76453
|
+
const dieCoordinates = this.calculateDieCoordinates({
|
|
76454
|
+
x: invertedPoint[0],
|
|
76455
|
+
y: invertedPoint[1]
|
|
76456
|
+
});
|
|
76457
|
+
const colIndex = this.wafermap
|
|
76458
|
+
.diesTable.getChild('colIndex')
|
|
76459
|
+
.toArray();
|
|
76460
|
+
const rowIndex = this.wafermap
|
|
76461
|
+
.diesTable.getChild('rowIndex')
|
|
76462
|
+
.toArray();
|
|
76463
|
+
// will replace iterating with arquero filtering after fixing errors
|
|
76464
|
+
for (let i = 0; i < colIndex.length; i++) {
|
|
76465
|
+
if (colIndex[i] === dieCoordinates.x
|
|
76466
|
+
&& rowIndex[i] === dieCoordinates.y) {
|
|
76467
|
+
this.wafermap.hoverDie = {
|
|
76468
|
+
index: i,
|
|
76469
|
+
x: dieCoordinates.x,
|
|
76470
|
+
y: dieCoordinates.y
|
|
76471
|
+
};
|
|
76472
|
+
return;
|
|
76473
|
+
}
|
|
76474
|
+
}
|
|
76475
|
+
this.wafermap.hoverDie = undefined;
|
|
76476
|
+
};
|
|
76477
|
+
this.onMouseOut = (_event) => {
|
|
76478
|
+
this.wafermap.hoverDie = undefined;
|
|
76479
|
+
};
|
|
76480
|
+
}
|
|
76481
|
+
/**
|
|
76482
|
+
* @internal
|
|
76483
|
+
*/
|
|
76484
|
+
connect() {
|
|
76485
|
+
this.wafermap.addEventListener('mousemove', this.onMouseMove);
|
|
76486
|
+
this.wafermap.addEventListener('mouseout', this.onMouseOut);
|
|
76487
|
+
}
|
|
76488
|
+
/**
|
|
76489
|
+
* @internal
|
|
76490
|
+
*/
|
|
76491
|
+
disconnect() {
|
|
76492
|
+
this.wafermap.removeEventListener('mousemove', this.onMouseMove);
|
|
76493
|
+
this.wafermap.removeEventListener('mouseout', this.onMouseOut);
|
|
76494
|
+
}
|
|
76495
|
+
calculateDieCoordinates(mousePosition) {
|
|
76496
|
+
const originLocation = this.wafermap.originLocation;
|
|
76497
|
+
const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
|
|
76498
|
+
|| originLocation === WaferMapOriginLocation.topLeft
|
|
76499
|
+
? Math.floor
|
|
76500
|
+
: Math.ceil;
|
|
76501
|
+
const yRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
|
|
76502
|
+
|| originLocation === WaferMapOriginLocation.bottomRight
|
|
76503
|
+
? Math.floor
|
|
76504
|
+
: Math.ceil;
|
|
76505
|
+
// go to x and y scale to get the x,y values of the die.
|
|
76506
|
+
const x = xRoundFunction(this.wafermap.dataManager.invertedHorizontalScale(mousePosition.x - this.wafermap.dataManager.margin.left));
|
|
76507
|
+
const y = yRoundFunction(this.wafermap.dataManager.invertedVerticalScale(mousePosition.y - this.wafermap.dataManager.margin.top));
|
|
76508
|
+
return { x, y };
|
|
76509
|
+
}
|
|
76510
|
+
}
|
|
76511
|
+
|
|
76512
|
+
/**
|
|
76513
|
+
* ZoomHandler deals with user interactions and events like zooming
|
|
76514
|
+
*/
|
|
76515
|
+
class ZoomHandler {
|
|
76516
|
+
constructor(wafermap) {
|
|
76517
|
+
this.wafermap = wafermap;
|
|
76518
|
+
this.scaleExtent = [1, 100];
|
|
76519
|
+
this.minExtentPoint = [0, 0];
|
|
76520
|
+
this.onWheelMove = (event) => {
|
|
76521
|
+
event.preventDefault();
|
|
76522
|
+
};
|
|
76523
|
+
}
|
|
76524
|
+
/**
|
|
76525
|
+
* @internal
|
|
76526
|
+
*/
|
|
76527
|
+
connect() {
|
|
76528
|
+
this.createZoomBehavior();
|
|
76529
|
+
this.wafermap.addEventListener('wheel', this.onWheelMove, {
|
|
76530
|
+
passive: false
|
|
76531
|
+
});
|
|
76532
|
+
}
|
|
76533
|
+
/**
|
|
76534
|
+
* @internal
|
|
76535
|
+
*/
|
|
76536
|
+
disconnect() {
|
|
76537
|
+
zoom().on('zoom', null)(select(this.wafermap));
|
|
76538
|
+
this.wafermap.removeEventListener('wheel', this.onWheelMove);
|
|
76539
|
+
}
|
|
76540
|
+
createZoomBehavior() {
|
|
76541
|
+
zoom()
|
|
76542
|
+
.scaleExtent(this.scaleExtent)
|
|
76543
|
+
.translateExtent([
|
|
76544
|
+
this.minExtentPoint,
|
|
76545
|
+
[this.wafermap.canvasWidth, this.wafermap.canvasHeight]
|
|
76546
|
+
])
|
|
76547
|
+
.on('zoom', (event) => {
|
|
76548
|
+
// D3 will automatically remove existing handlers when adding new ones
|
|
76549
|
+
// See: https://github.com/d3/d3-zoom/blob/v3.0.0/README.md#zoom_on
|
|
76550
|
+
this.wafermap.transform = event.transform;
|
|
76551
|
+
})(select(this.wafermap));
|
|
76552
|
+
}
|
|
76553
|
+
}
|
|
76554
|
+
|
|
76544
76555
|
/**
|
|
76545
76556
|
* A nimble-styled WaferMap
|
|
76546
76557
|
*/
|
|
@@ -76551,7 +76562,7 @@ img.ProseMirror-separator {
|
|
|
76551
76562
|
* @internal
|
|
76552
76563
|
* needs to be initialized before the properties trigger changes
|
|
76553
76564
|
*/
|
|
76554
|
-
this.waferMapUpdateTracker = new WaferMapUpdateTracker(this);
|
|
76565
|
+
this.waferMapUpdateTracker = new WaferMapUpdateTracker(this.asRequiredFieldsWaferMap);
|
|
76555
76566
|
this.originLocation = WaferMapOriginLocation.bottomLeft;
|
|
76556
76567
|
this.gridMinX = undefined;
|
|
76557
76568
|
this.gridMaxX = undefined;
|
|
@@ -76565,15 +76576,15 @@ img.ProseMirror-separator {
|
|
|
76565
76576
|
/**
|
|
76566
76577
|
* @internal
|
|
76567
76578
|
*/
|
|
76568
|
-
this.dataManager = new DataManager(this);
|
|
76579
|
+
this.dataManager = new DataManager(this.asRequiredFieldsWaferMap);
|
|
76569
76580
|
/**
|
|
76570
76581
|
* @internal
|
|
76571
76582
|
*/
|
|
76572
|
-
this.mainRenderer = new RenderingModule(this);
|
|
76583
|
+
this.mainRenderer = new RenderingModule(this.asRequiredFieldsWaferMap);
|
|
76573
76584
|
/**
|
|
76574
76585
|
* @internal
|
|
76575
76586
|
*/
|
|
76576
|
-
this.workerRenderer = new WorkerRenderer(this);
|
|
76587
|
+
this.workerRenderer = new WorkerRenderer(this.asRequiredFieldsWaferMap);
|
|
76577
76588
|
this.renderer = this.mainRenderer;
|
|
76578
76589
|
/**
|
|
76579
76590
|
* @internal
|
|
@@ -76605,9 +76616,11 @@ img.ProseMirror-separator {
|
|
|
76605
76616
|
colors: [],
|
|
76606
76617
|
values: []
|
|
76607
76618
|
};
|
|
76608
|
-
this.
|
|
76619
|
+
this.hoverHandler = new HoverHandler$1(this.asRequiredFieldsWaferMap);
|
|
76620
|
+
this.experimentalHoverHandler = new HoverHandler(this.asRequiredFieldsWaferMap);
|
|
76621
|
+
this.zoomHandler = new ZoomHandler(this.asRequiredFieldsWaferMap);
|
|
76609
76622
|
this.resizeObserver = this.createResizeObserver();
|
|
76610
|
-
this.waferMapValidator = new WaferMapValidator(this);
|
|
76623
|
+
this.waferMapValidator = new WaferMapValidator(this.asRequiredFieldsWaferMap);
|
|
76611
76624
|
}
|
|
76612
76625
|
get validity() {
|
|
76613
76626
|
return this.waferMapValidator.getValidity();
|
|
@@ -76617,11 +76630,17 @@ img.ProseMirror-separator {
|
|
|
76617
76630
|
this.canvasContext = this.canvas.getContext('2d', {
|
|
76618
76631
|
willReadFrequently: true
|
|
76619
76632
|
});
|
|
76633
|
+
this.hoverHandler.connect();
|
|
76634
|
+
this.experimentalHoverHandler.connect();
|
|
76635
|
+
this.zoomHandler.connect();
|
|
76620
76636
|
this.resizeObserver.observe(this);
|
|
76621
76637
|
this.waferMapUpdateTracker.trackAll();
|
|
76622
76638
|
}
|
|
76623
76639
|
disconnectedCallback() {
|
|
76624
76640
|
super.disconnectedCallback();
|
|
76641
|
+
this.hoverHandler.disconnect();
|
|
76642
|
+
this.experimentalHoverHandler.disconnect();
|
|
76643
|
+
this.zoomHandler.disconnect();
|
|
76625
76644
|
this.resizeObserver.unobserve(this);
|
|
76626
76645
|
}
|
|
76627
76646
|
/**
|
|
@@ -76637,8 +76656,12 @@ img.ProseMirror-separator {
|
|
|
76637
76656
|
if (this.validity.invalidDiesTableSchema) {
|
|
76638
76657
|
return;
|
|
76639
76658
|
}
|
|
76659
|
+
this.renderer = this.isExperimentalRenderer()
|
|
76660
|
+
? this.workerRenderer
|
|
76661
|
+
: this.mainRenderer;
|
|
76640
76662
|
if (this.waferMapUpdateTracker.requiresEventsUpdate) {
|
|
76641
|
-
|
|
76663
|
+
// zoom translateExtent needs to be recalculated when canvas size changes
|
|
76664
|
+
this.zoomHandler.disconnect();
|
|
76642
76665
|
if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) {
|
|
76643
76666
|
this.dataManager.updateContainerDimensions();
|
|
76644
76667
|
this.renderer.updateSortedDiesAndDrawWafer();
|
|
@@ -76658,12 +76681,18 @@ img.ProseMirror-separator {
|
|
|
76658
76681
|
else if (this.waferMapUpdateTracker.requiresDrawnWaferUpdate) {
|
|
76659
76682
|
this.renderer.drawWafer();
|
|
76660
76683
|
}
|
|
76661
|
-
this.
|
|
76684
|
+
this.zoomHandler.connect();
|
|
76662
76685
|
}
|
|
76663
76686
|
else if (this.waferMapUpdateTracker.requiresRenderHoverUpdate) {
|
|
76664
76687
|
this.renderer.renderHover();
|
|
76665
76688
|
}
|
|
76666
76689
|
}
|
|
76690
|
+
/**
|
|
76691
|
+
* @internal
|
|
76692
|
+
*/
|
|
76693
|
+
isExperimentalRenderer() {
|
|
76694
|
+
return this.diesTable !== undefined;
|
|
76695
|
+
}
|
|
76667
76696
|
validate() {
|
|
76668
76697
|
this.waferMapValidator.validateGridDimensions();
|
|
76669
76698
|
this.waferMapValidator.validateDiesTableSchema();
|
|
@@ -76726,16 +76755,10 @@ img.ProseMirror-separator {
|
|
|
76726
76755
|
}
|
|
76727
76756
|
diesChanged() {
|
|
76728
76757
|
this.waferMapUpdateTracker.track('dies');
|
|
76729
|
-
this.renderer = this.diesTable === undefined
|
|
76730
|
-
? this.mainRenderer
|
|
76731
|
-
: this.workerRenderer;
|
|
76732
76758
|
this.waferMapUpdateTracker.queueUpdate();
|
|
76733
76759
|
}
|
|
76734
76760
|
diesTableChanged() {
|
|
76735
76761
|
this.waferMapUpdateTracker.track('dies');
|
|
76736
|
-
this.renderer = this.diesTable === undefined
|
|
76737
|
-
? this.mainRenderer
|
|
76738
|
-
: this.workerRenderer;
|
|
76739
76762
|
this.waferMapUpdateTracker.queueUpdate();
|
|
76740
76763
|
}
|
|
76741
76764
|
colorScaleChanged() {
|
|
@@ -76759,6 +76782,9 @@ img.ProseMirror-separator {
|
|
|
76759
76782
|
this.waferMapUpdateTracker.track('hoverDie');
|
|
76760
76783
|
this.waferMapUpdateTracker.queueUpdate();
|
|
76761
76784
|
}
|
|
76785
|
+
get asRequiredFieldsWaferMap() {
|
|
76786
|
+
return this;
|
|
76787
|
+
}
|
|
76762
76788
|
}
|
|
76763
76789
|
__decorate$1([
|
|
76764
76790
|
attr({ attribute: 'origin-location' })
|