@angular/material 19.0.0-next.8 → 19.0.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/_index.scss +1 -2
  2. package/autocomplete/_autocomplete-theme.scss +30 -21
  3. package/badge/_badge-theme.scss +31 -21
  4. package/bottom-sheet/_bottom-sheet-theme.scss +25 -17
  5. package/button/_button-theme.scss +220 -100
  6. package/button/_fab-theme.scss +88 -41
  7. package/button/_icon-button-theme.scss +31 -22
  8. package/button/index.d.ts +2 -2
  9. package/button-toggle/_button-toggle-theme.scss +52 -32
  10. package/card/_card-theme.scss +72 -35
  11. package/checkbox/_checkbox-theme.scss +6 -4
  12. package/chips/_chips-theme.scss +57 -27
  13. package/core/_core-theme.scss +51 -30
  14. package/core/_core.scss +1 -1
  15. package/core/option/_optgroup-theme.scss +22 -15
  16. package/core/option/_option-theme.scss +27 -18
  17. package/core/ripple/_ripple-theme.scss +26 -18
  18. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +40 -18
  19. package/core/tokens/_m3-system.scss +34 -6
  20. package/core/tokens/_token-utils.scss +91 -34
  21. package/core/tokens/m2/mat/_badge.scss +12 -3
  22. package/core/tokens/m2/mdc/_radio.scss +1 -1
  23. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
  24. package/core/tokens/m3/mat/_badge.scss +6 -3
  25. package/datepicker/_datepicker-theme.scss +46 -29
  26. package/datepicker/index.d.ts +1 -1
  27. package/dialog/_dialog-theme.scss +39 -20
  28. package/divider/_divider-theme.scss +21 -14
  29. package/expansion/_expansion-theme.scss +29 -21
  30. package/fesm2022/autocomplete.mjs +14 -16
  31. package/fesm2022/autocomplete.mjs.map +1 -1
  32. package/fesm2022/badge.mjs +11 -12
  33. package/fesm2022/badge.mjs.map +1 -1
  34. package/fesm2022/bottom-sheet.mjs +11 -11
  35. package/fesm2022/bottom-sheet.mjs.map +1 -1
  36. package/fesm2022/button-toggle.mjs +11 -12
  37. package/fesm2022/button-toggle.mjs.map +1 -1
  38. package/fesm2022/button.mjs +42 -42
  39. package/fesm2022/button.mjs.map +1 -1
  40. package/fesm2022/card.mjs +49 -60
  41. package/fesm2022/card.mjs.map +1 -1
  42. package/fesm2022/checkbox.mjs +16 -17
  43. package/fesm2022/checkbox.mjs.map +1 -1
  44. package/fesm2022/chips.mjs +48 -54
  45. package/fesm2022/chips.mjs.map +1 -1
  46. package/fesm2022/core.mjs +71 -73
  47. package/fesm2022/core.mjs.map +1 -1
  48. package/fesm2022/datepicker.mjs +95 -105
  49. package/fesm2022/datepicker.mjs.map +1 -1
  50. package/fesm2022/dialog/testing.mjs +0 -1
  51. package/fesm2022/dialog/testing.mjs.map +1 -1
  52. package/fesm2022/dialog.mjs +28 -33
  53. package/fesm2022/dialog.mjs.map +1 -1
  54. package/fesm2022/divider.mjs +8 -8
  55. package/fesm2022/divider.mjs.map +1 -1
  56. package/fesm2022/expansion.mjs +28 -33
  57. package/fesm2022/expansion.mjs.map +1 -1
  58. package/fesm2022/form-field.mjs +38 -45
  59. package/fesm2022/form-field.mjs.map +1 -1
  60. package/fesm2022/grid-list.mjs +26 -29
  61. package/fesm2022/grid-list.mjs.map +1 -1
  62. package/fesm2022/icon/testing.mjs +7 -7
  63. package/fesm2022/icon/testing.mjs.map +1 -1
  64. package/fesm2022/icon.mjs +11 -11
  65. package/fesm2022/icon.mjs.map +1 -1
  66. package/fesm2022/input.mjs +7 -8
  67. package/fesm2022/input.mjs.map +1 -1
  68. package/fesm2022/list.mjs +57 -66
  69. package/fesm2022/list.mjs.map +1 -1
  70. package/fesm2022/menu.mjs +18 -20
  71. package/fesm2022/menu.mjs.map +1 -1
  72. package/fesm2022/paginator.mjs +11 -11
  73. package/fesm2022/paginator.mjs.map +1 -1
  74. package/fesm2022/progress-bar.mjs +8 -8
  75. package/fesm2022/progress-bar.mjs.map +1 -1
  76. package/fesm2022/progress-spinner.mjs +8 -8
  77. package/fesm2022/progress-spinner.mjs.map +1 -1
  78. package/fesm2022/radio.mjs +11 -12
  79. package/fesm2022/radio.mjs.map +1 -1
  80. package/fesm2022/select.mjs +12 -13
  81. package/fesm2022/select.mjs.map +1 -1
  82. package/fesm2022/sidenav.mjs +28 -30
  83. package/fesm2022/sidenav.mjs.map +1 -1
  84. package/fesm2022/slide-toggle.mjs +16 -17
  85. package/fesm2022/slide-toggle.mjs.map +1 -1
  86. package/fesm2022/slider.mjs +18 -20
  87. package/fesm2022/slider.mjs.map +1 -1
  88. package/fesm2022/snack-bar.mjs +25 -28
  89. package/fesm2022/snack-bar.mjs.map +1 -1
  90. package/fesm2022/sort.mjs +14 -15
  91. package/fesm2022/sort.mjs.map +1 -1
  92. package/fesm2022/stepper.mjs +34 -39
  93. package/fesm2022/stepper.mjs.map +1 -1
  94. package/fesm2022/table.mjs +57 -73
  95. package/fesm2022/table.mjs.map +1 -1
  96. package/fesm2022/tabs.mjs +51 -56
  97. package/fesm2022/tabs.mjs.map +1 -1
  98. package/fesm2022/timepicker.mjs +17 -18
  99. package/fesm2022/timepicker.mjs.map +1 -1
  100. package/fesm2022/toolbar.mjs +11 -12
  101. package/fesm2022/toolbar.mjs.map +1 -1
  102. package/fesm2022/tooltip.mjs +11 -12
  103. package/fesm2022/tooltip.mjs.map +1 -1
  104. package/fesm2022/tree.mjs +26 -32
  105. package/fesm2022/tree.mjs.map +1 -1
  106. package/form-field/_form-field-theme.scss +105 -56
  107. package/form-field/index.d.ts +1 -1
  108. package/grid-list/_grid-list-theme.scss +18 -12
  109. package/icon/_icon-theme.scss +15 -11
  110. package/input/_input-theme.scss +11 -8
  111. package/list/_list-theme.scss +82 -44
  112. package/menu/_menu-theme.scss +26 -18
  113. package/package.json +2 -2
  114. package/paginator/_paginator-theme.scss +32 -20
  115. package/prebuilt-themes/azure-blue.css +1 -1
  116. package/prebuilt-themes/cyan-orange.css +1 -1
  117. package/prebuilt-themes/deeppurple-amber.css +1 -1
  118. package/prebuilt-themes/indigo-pink.css +1 -1
  119. package/prebuilt-themes/magenta-violet.css +1 -1
  120. package/prebuilt-themes/pink-bluegrey.css +1 -1
  121. package/prebuilt-themes/purple-green.css +1 -1
  122. package/prebuilt-themes/rose-red.css +1 -1
  123. package/progress-bar/_progress-bar-theme.scss +13 -11
  124. package/progress-spinner/_progress-spinner-theme.scss +34 -20
  125. package/radio/_radio-theme.scss +50 -26
  126. package/schematics/collection.json +3 -3
  127. package/schematics/ng-add/index.js +1 -1
  128. package/schematics/ng-add/index.mjs +1 -1
  129. package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +454 -288
  130. package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
  131. package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
  132. package/select/_select-theme.scss +31 -22
  133. package/sidenav/_sidenav-theme.scss +21 -14
  134. package/slide-toggle/_slide-toggle-theme.scss +42 -22
  135. package/slider/_slider-theme.scss +55 -35
  136. package/snack-bar/_snack-bar-theme.scss +22 -14
  137. package/sort/_sort-theme.scss +26 -18
  138. package/stepper/_stepper-theme.scss +33 -24
  139. package/table/_table-theme.scss +29 -20
  140. package/tabs/_tabs-theme.scss +89 -46
  141. package/tabs/index.d.ts +2 -2
  142. package/timepicker/_timepicker-theme.scss +30 -21
  143. package/toolbar/_toolbar-theme.scss +28 -19
  144. package/tooltip/_tooltip-theme.scss +11 -12
  145. package/tree/_tree-theme.scss +26 -18
  146. package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
@@ -50,13 +50,13 @@ var __async = (__this, __arguments, generator) => {
50
50
  });
51
51
  };
52
52
 
53
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/m3-theme/index.mjs
54
- var m3_theme_exports = {};
55
- __export(m3_theme_exports, {
56
- default: () => m3_theme_default,
53
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/theme-color/index.mjs
54
+ var theme_color_exports = {};
55
+ __export(theme_color_exports, {
56
+ default: () => theme_color_default,
57
57
  generateSCSSTheme: () => generateSCSSTheme
58
58
  });
59
- module.exports = __toCommonJS(m3_theme_exports);
59
+ module.exports = __toCommonJS(theme_color_exports);
60
60
 
61
61
  // node_modules/@material/material-color-utilities/utils/math_utils.js
62
62
  function signum(num) {
@@ -1217,8 +1217,8 @@ var DynamicColor = class {
1217
1217
  const farther = aIsNearer ? roleB : roleA;
1218
1218
  const amNearer = this.name === nearer.name;
1219
1219
  const expansionDir = scheme.isDark ? 1 : -1;
1220
- const nContrast = nearer.contrastCurve.getContrast(scheme.contrastLevel);
1221
- const fContrast = farther.contrastCurve.getContrast(scheme.contrastLevel);
1220
+ const nContrast = nearer.contrastCurve.get(scheme.contrastLevel);
1221
+ const fContrast = farther.contrastCurve.get(scheme.contrastLevel);
1222
1222
  const nInitialTone = nearer.tone(scheme);
1223
1223
  let nTone = Contrast.ratioOfTones(bgTone, nInitialTone) >= nContrast ? nInitialTone : DynamicColor.foregroundTone(bgTone, nContrast);
1224
1224
  const fInitialTone = farther.tone(scheme);
@@ -1267,7 +1267,7 @@ var DynamicColor = class {
1267
1267
  return answer;
1268
1268
  }
1269
1269
  const bgTone = this.background(scheme).getTone(scheme);
1270
- const desiredRatio = this.contrastCurve.getContrast(scheme.contrastLevel);
1270
+ const desiredRatio = this.contrastCurve.get(scheme.contrastLevel);
1271
1271
  if (Contrast.ratioOfTones(bgTone, answer) >= desiredRatio) {
1272
1272
  } else {
1273
1273
  answer = DynamicColor.foregroundTone(bgTone, desiredRatio);
@@ -1335,19 +1335,82 @@ var DynamicColor = class {
1335
1335
  }
1336
1336
  };
1337
1337
 
1338
- // node_modules/@material/material-color-utilities/scheme/variant.js
1339
- var Variant;
1340
- (function(Variant2) {
1341
- Variant2[Variant2["MONOCHROME"] = 0] = "MONOCHROME";
1342
- Variant2[Variant2["NEUTRAL"] = 1] = "NEUTRAL";
1343
- Variant2[Variant2["TONAL_SPOT"] = 2] = "TONAL_SPOT";
1344
- Variant2[Variant2["VIBRANT"] = 3] = "VIBRANT";
1345
- Variant2[Variant2["EXPRESSIVE"] = 4] = "EXPRESSIVE";
1346
- Variant2[Variant2["FIDELITY"] = 5] = "FIDELITY";
1347
- Variant2[Variant2["CONTENT"] = 6] = "CONTENT";
1348
- Variant2[Variant2["RAINBOW"] = 7] = "RAINBOW";
1349
- Variant2[Variant2["FRUIT_SALAD"] = 8] = "FRUIT_SALAD";
1350
- })(Variant || (Variant = {}));
1338
+ // node_modules/@material/material-color-utilities/palettes/tonal_palette.js
1339
+ var TonalPalette = class {
1340
+ static fromInt(argb) {
1341
+ const hct = Hct.fromInt(argb);
1342
+ return TonalPalette.fromHct(hct);
1343
+ }
1344
+ static fromHct(hct) {
1345
+ return new TonalPalette(hct.hue, hct.chroma, hct);
1346
+ }
1347
+ static fromHueAndChroma(hue, chroma) {
1348
+ const keyColor = new KeyColor(hue, chroma).create();
1349
+ return new TonalPalette(hue, chroma, keyColor);
1350
+ }
1351
+ constructor(hue, chroma, keyColor) {
1352
+ this.hue = hue;
1353
+ this.chroma = chroma;
1354
+ this.keyColor = keyColor;
1355
+ this.cache = /* @__PURE__ */ new Map();
1356
+ }
1357
+ tone(tone) {
1358
+ let argb = this.cache.get(tone);
1359
+ if (argb === void 0) {
1360
+ argb = Hct.from(this.hue, this.chroma, tone).toInt();
1361
+ this.cache.set(tone, argb);
1362
+ }
1363
+ return argb;
1364
+ }
1365
+ getHct(tone) {
1366
+ return Hct.fromInt(this.tone(tone));
1367
+ }
1368
+ };
1369
+ var KeyColor = class {
1370
+ constructor(hue, requestedChroma) {
1371
+ this.hue = hue;
1372
+ this.requestedChroma = requestedChroma;
1373
+ this.chromaCache = /* @__PURE__ */ new Map();
1374
+ this.maxChromaValue = 200;
1375
+ }
1376
+ create() {
1377
+ const pivotTone = 50;
1378
+ const toneStepSize = 1;
1379
+ const epsilon = 0.01;
1380
+ let lowerTone = 0;
1381
+ let upperTone = 100;
1382
+ while (lowerTone < upperTone) {
1383
+ const midTone = Math.floor((lowerTone + upperTone) / 2);
1384
+ const isAscending = this.maxChroma(midTone) < this.maxChroma(midTone + toneStepSize);
1385
+ const sufficientChroma = this.maxChroma(midTone) >= this.requestedChroma - epsilon;
1386
+ if (sufficientChroma) {
1387
+ if (Math.abs(lowerTone - pivotTone) < Math.abs(upperTone - pivotTone)) {
1388
+ upperTone = midTone;
1389
+ } else {
1390
+ if (lowerTone === midTone) {
1391
+ return Hct.from(this.hue, this.requestedChroma, lowerTone);
1392
+ }
1393
+ lowerTone = midTone;
1394
+ }
1395
+ } else {
1396
+ if (isAscending) {
1397
+ lowerTone = midTone + toneStepSize;
1398
+ } else {
1399
+ upperTone = midTone;
1400
+ }
1401
+ }
1402
+ }
1403
+ return Hct.from(this.hue, this.requestedChroma, lowerTone);
1404
+ }
1405
+ maxChroma(tone) {
1406
+ if (this.chromaCache.has(tone)) {
1407
+ return this.chromaCache.get(tone);
1408
+ }
1409
+ const chroma = Hct.from(this.hue, this.maxChromaValue, tone).chroma;
1410
+ this.chromaCache.set(tone, chroma);
1411
+ return chroma;
1412
+ }
1413
+ };
1351
1414
 
1352
1415
  // node_modules/@material/material-color-utilities/dynamiccolor/contrast_curve.js
1353
1416
  var ContrastCurve = class {
@@ -1357,7 +1420,7 @@ var ContrastCurve = class {
1357
1420
  this.medium = medium;
1358
1421
  this.high = high;
1359
1422
  }
1360
- getContrast(contrastLevel) {
1423
+ get(contrastLevel) {
1361
1424
  if (contrastLevel <= -1) {
1362
1425
  return this.low;
1363
1426
  } else if (contrastLevel < 0) {
@@ -1383,6 +1446,20 @@ var ToneDeltaPair = class {
1383
1446
  }
1384
1447
  };
1385
1448
 
1449
+ // node_modules/@material/material-color-utilities/dynamiccolor/variant.js
1450
+ var Variant;
1451
+ (function(Variant2) {
1452
+ Variant2[Variant2["MONOCHROME"] = 0] = "MONOCHROME";
1453
+ Variant2[Variant2["NEUTRAL"] = 1] = "NEUTRAL";
1454
+ Variant2[Variant2["TONAL_SPOT"] = 2] = "TONAL_SPOT";
1455
+ Variant2[Variant2["VIBRANT"] = 3] = "VIBRANT";
1456
+ Variant2[Variant2["EXPRESSIVE"] = 4] = "EXPRESSIVE";
1457
+ Variant2[Variant2["FIDELITY"] = 5] = "FIDELITY";
1458
+ Variant2[Variant2["CONTENT"] = 6] = "CONTENT";
1459
+ Variant2[Variant2["RAINBOW"] = 7] = "RAINBOW";
1460
+ Variant2[Variant2["FRUIT_SALAD"] = 8] = "FRUIT_SALAD";
1461
+ })(Variant || (Variant = {}));
1462
+
1386
1463
  // node_modules/@material/material-color-utilities/dynamiccolor/material_dynamic_colors.js
1387
1464
  function isFidelity(scheme) {
1388
1465
  return scheme.variant === Variant.FIDELITY || scheme.variant === Variant.CONTENT;
@@ -1414,23 +1491,6 @@ function findDesiredChromaByTone(hue, chroma, tone, byDecreasingTone) {
1414
1491
  }
1415
1492
  return answer;
1416
1493
  }
1417
- function viewingConditionsForAlbers(scheme) {
1418
- return ViewingConditions.make(
1419
- void 0,
1420
- void 0,
1421
- scheme.isDark ? 30 : 80,
1422
- void 0,
1423
- void 0
1424
- );
1425
- }
1426
- function performAlbers(prealbers, scheme) {
1427
- const albersd = prealbers.inViewingConditions(viewingConditionsForAlbers(scheme));
1428
- if (DynamicColor.tonePrefersLightForeground(prealbers.tone) && !DynamicColor.toneAllowsLightForeground(albersd.tone)) {
1429
- return DynamicColor.enableLightForeground(prealbers.tone);
1430
- } else {
1431
- return DynamicColor.enableLightForeground(albersd.tone);
1432
- }
1433
- }
1434
1494
  var MaterialDynamicColors = class {
1435
1495
  static highestSurface(s) {
1436
1496
  return s.isDark ? MaterialDynamicColors.surfaceBright : MaterialDynamicColors.surfaceDim;
@@ -1484,43 +1544,43 @@ MaterialDynamicColors.surface = DynamicColor.fromPalette({
1484
1544
  MaterialDynamicColors.surfaceDim = DynamicColor.fromPalette({
1485
1545
  name: "surface_dim",
1486
1546
  palette: (s) => s.neutralPalette,
1487
- tone: (s) => s.isDark ? 6 : 87,
1547
+ tone: (s) => s.isDark ? 6 : new ContrastCurve(87, 87, 80, 75).get(s.contrastLevel),
1488
1548
  isBackground: true
1489
1549
  });
1490
1550
  MaterialDynamicColors.surfaceBright = DynamicColor.fromPalette({
1491
1551
  name: "surface_bright",
1492
1552
  palette: (s) => s.neutralPalette,
1493
- tone: (s) => s.isDark ? 24 : 98,
1553
+ tone: (s) => s.isDark ? new ContrastCurve(24, 24, 29, 34).get(s.contrastLevel) : 98,
1494
1554
  isBackground: true
1495
1555
  });
1496
1556
  MaterialDynamicColors.surfaceContainerLowest = DynamicColor.fromPalette({
1497
1557
  name: "surface_container_lowest",
1498
1558
  palette: (s) => s.neutralPalette,
1499
- tone: (s) => s.isDark ? 4 : 100,
1559
+ tone: (s) => s.isDark ? new ContrastCurve(4, 4, 2, 0).get(s.contrastLevel) : 100,
1500
1560
  isBackground: true
1501
1561
  });
1502
1562
  MaterialDynamicColors.surfaceContainerLow = DynamicColor.fromPalette({
1503
1563
  name: "surface_container_low",
1504
1564
  palette: (s) => s.neutralPalette,
1505
- tone: (s) => s.isDark ? 10 : 96,
1565
+ tone: (s) => s.isDark ? new ContrastCurve(10, 10, 11, 12).get(s.contrastLevel) : new ContrastCurve(96, 96, 96, 95).get(s.contrastLevel),
1506
1566
  isBackground: true
1507
1567
  });
1508
1568
  MaterialDynamicColors.surfaceContainer = DynamicColor.fromPalette({
1509
1569
  name: "surface_container",
1510
1570
  palette: (s) => s.neutralPalette,
1511
- tone: (s) => s.isDark ? 12 : 94,
1571
+ tone: (s) => s.isDark ? new ContrastCurve(12, 12, 16, 20).get(s.contrastLevel) : new ContrastCurve(94, 94, 92, 90).get(s.contrastLevel),
1512
1572
  isBackground: true
1513
1573
  });
1514
1574
  MaterialDynamicColors.surfaceContainerHigh = DynamicColor.fromPalette({
1515
1575
  name: "surface_container_high",
1516
1576
  palette: (s) => s.neutralPalette,
1517
- tone: (s) => s.isDark ? 17 : 92,
1577
+ tone: (s) => s.isDark ? new ContrastCurve(17, 17, 21, 25).get(s.contrastLevel) : new ContrastCurve(92, 92, 88, 85).get(s.contrastLevel),
1518
1578
  isBackground: true
1519
1579
  });
1520
1580
  MaterialDynamicColors.surfaceContainerHighest = DynamicColor.fromPalette({
1521
1581
  name: "surface_container_highest",
1522
1582
  palette: (s) => s.neutralPalette,
1523
- tone: (s) => s.isDark ? 22 : 90,
1583
+ tone: (s) => s.isDark ? new ContrastCurve(22, 22, 26, 30).get(s.contrastLevel) : new ContrastCurve(90, 90, 84, 80).get(s.contrastLevel),
1524
1584
  isBackground: true
1525
1585
  });
1526
1586
  MaterialDynamicColors.onSurface = DynamicColor.fromPalette({
@@ -1567,7 +1627,7 @@ MaterialDynamicColors.outlineVariant = DynamicColor.fromPalette({
1567
1627
  palette: (s) => s.neutralVariantPalette,
1568
1628
  tone: (s) => s.isDark ? 30 : 80,
1569
1629
  background: (s) => MaterialDynamicColors.highestSurface(s),
1570
- contrastCurve: new ContrastCurve(1, 1, 3, 7)
1630
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5)
1571
1631
  });
1572
1632
  MaterialDynamicColors.shadow = DynamicColor.fromPalette({
1573
1633
  name: "shadow",
@@ -1596,8 +1656,8 @@ MaterialDynamicColors.primary = DynamicColor.fromPalette({
1596
1656
  },
1597
1657
  isBackground: true,
1598
1658
  background: (s) => MaterialDynamicColors.highestSurface(s),
1599
- contrastCurve: new ContrastCurve(3, 4.5, 7, 11),
1600
- toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryContainer, MaterialDynamicColors.primary, 15, "nearer", false)
1659
+ contrastCurve: new ContrastCurve(3, 4.5, 7, 7),
1660
+ toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryContainer, MaterialDynamicColors.primary, 10, "nearer", false)
1601
1661
  });
1602
1662
  MaterialDynamicColors.onPrimary = DynamicColor.fromPalette({
1603
1663
  name: "on_primary",
@@ -1616,7 +1676,7 @@ MaterialDynamicColors.primaryContainer = DynamicColor.fromPalette({
1616
1676
  palette: (s) => s.primaryPalette,
1617
1677
  tone: (s) => {
1618
1678
  if (isFidelity(s)) {
1619
- return performAlbers(s.sourceColorHct, s);
1679
+ return s.sourceColorHct.tone;
1620
1680
  }
1621
1681
  if (isMonochrome(s)) {
1622
1682
  return s.isDark ? 85 : 25;
@@ -1625,8 +1685,8 @@ MaterialDynamicColors.primaryContainer = DynamicColor.fromPalette({
1625
1685
  },
1626
1686
  isBackground: true,
1627
1687
  background: (s) => MaterialDynamicColors.highestSurface(s),
1628
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1629
- toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryContainer, MaterialDynamicColors.primary, 15, "nearer", false)
1688
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1689
+ toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryContainer, MaterialDynamicColors.primary, 10, "nearer", false)
1630
1690
  });
1631
1691
  MaterialDynamicColors.onPrimaryContainer = DynamicColor.fromPalette({
1632
1692
  name: "on_primary_container",
@@ -1638,17 +1698,17 @@ MaterialDynamicColors.onPrimaryContainer = DynamicColor.fromPalette({
1638
1698
  if (isMonochrome(s)) {
1639
1699
  return s.isDark ? 0 : 100;
1640
1700
  }
1641
- return s.isDark ? 90 : 10;
1701
+ return s.isDark ? 90 : 30;
1642
1702
  },
1643
1703
  background: (s) => MaterialDynamicColors.primaryContainer,
1644
- contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
1704
+ contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
1645
1705
  });
1646
1706
  MaterialDynamicColors.inversePrimary = DynamicColor.fromPalette({
1647
1707
  name: "inverse_primary",
1648
1708
  palette: (s) => s.primaryPalette,
1649
1709
  tone: (s) => s.isDark ? 40 : 80,
1650
1710
  background: (s) => MaterialDynamicColors.inverseSurface,
1651
- contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
1711
+ contrastCurve: new ContrastCurve(3, 4.5, 7, 7)
1652
1712
  });
1653
1713
  MaterialDynamicColors.secondary = DynamicColor.fromPalette({
1654
1714
  name: "secondary",
@@ -1656,8 +1716,8 @@ MaterialDynamicColors.secondary = DynamicColor.fromPalette({
1656
1716
  tone: (s) => s.isDark ? 80 : 40,
1657
1717
  isBackground: true,
1658
1718
  background: (s) => MaterialDynamicColors.highestSurface(s),
1659
- contrastCurve: new ContrastCurve(3, 4.5, 7, 11),
1660
- toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryContainer, MaterialDynamicColors.secondary, 15, "nearer", false)
1719
+ contrastCurve: new ContrastCurve(3, 4.5, 7, 7),
1720
+ toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryContainer, MaterialDynamicColors.secondary, 10, "nearer", false)
1661
1721
  });
1662
1722
  MaterialDynamicColors.onSecondary = DynamicColor.fromPalette({
1663
1723
  name: "on_secondary",
@@ -1683,26 +1743,27 @@ MaterialDynamicColors.secondaryContainer = DynamicColor.fromPalette({
1683
1743
  if (!isFidelity(s)) {
1684
1744
  return initialTone;
1685
1745
  }
1686
- let answer = findDesiredChromaByTone(s.secondaryPalette.hue, s.secondaryPalette.chroma, initialTone, s.isDark ? false : true);
1687
- answer = performAlbers(s.secondaryPalette.getHct(answer), s);
1688
- return answer;
1746
+ return findDesiredChromaByTone(s.secondaryPalette.hue, s.secondaryPalette.chroma, initialTone, s.isDark ? false : true);
1689
1747
  },
1690
1748
  isBackground: true,
1691
1749
  background: (s) => MaterialDynamicColors.highestSurface(s),
1692
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1693
- toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryContainer, MaterialDynamicColors.secondary, 15, "nearer", false)
1750
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1751
+ toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryContainer, MaterialDynamicColors.secondary, 10, "nearer", false)
1694
1752
  });
1695
1753
  MaterialDynamicColors.onSecondaryContainer = DynamicColor.fromPalette({
1696
1754
  name: "on_secondary_container",
1697
1755
  palette: (s) => s.secondaryPalette,
1698
1756
  tone: (s) => {
1699
- if (!isFidelity(s)) {
1757
+ if (isMonochrome(s)) {
1700
1758
  return s.isDark ? 90 : 10;
1701
1759
  }
1760
+ if (!isFidelity(s)) {
1761
+ return s.isDark ? 90 : 30;
1762
+ }
1702
1763
  return DynamicColor.foregroundTone(MaterialDynamicColors.secondaryContainer.tone(s), 4.5);
1703
1764
  },
1704
1765
  background: (s) => MaterialDynamicColors.secondaryContainer,
1705
- contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
1766
+ contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
1706
1767
  });
1707
1768
  MaterialDynamicColors.tertiary = DynamicColor.fromPalette({
1708
1769
  name: "tertiary",
@@ -1715,8 +1776,8 @@ MaterialDynamicColors.tertiary = DynamicColor.fromPalette({
1715
1776
  },
1716
1777
  isBackground: true,
1717
1778
  background: (s) => MaterialDynamicColors.highestSurface(s),
1718
- contrastCurve: new ContrastCurve(3, 4.5, 7, 11),
1719
- toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryContainer, MaterialDynamicColors.tertiary, 15, "nearer", false)
1779
+ contrastCurve: new ContrastCurve(3, 4.5, 7, 7),
1780
+ toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryContainer, MaterialDynamicColors.tertiary, 10, "nearer", false)
1720
1781
  });
1721
1782
  MaterialDynamicColors.onTertiary = DynamicColor.fromPalette({
1722
1783
  name: "on_tertiary",
@@ -1740,14 +1801,13 @@ MaterialDynamicColors.tertiaryContainer = DynamicColor.fromPalette({
1740
1801
  if (!isFidelity(s)) {
1741
1802
  return s.isDark ? 30 : 90;
1742
1803
  }
1743
- const albersTone = performAlbers(s.tertiaryPalette.getHct(s.sourceColorHct.tone), s);
1744
- const proposedHct = s.tertiaryPalette.getHct(albersTone);
1804
+ const proposedHct = s.tertiaryPalette.getHct(s.sourceColorHct.tone);
1745
1805
  return DislikeAnalyzer.fixIfDisliked(proposedHct).tone;
1746
1806
  },
1747
1807
  isBackground: true,
1748
1808
  background: (s) => MaterialDynamicColors.highestSurface(s),
1749
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1750
- toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryContainer, MaterialDynamicColors.tertiary, 15, "nearer", false)
1809
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1810
+ toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryContainer, MaterialDynamicColors.tertiary, 10, "nearer", false)
1751
1811
  });
1752
1812
  MaterialDynamicColors.onTertiaryContainer = DynamicColor.fromPalette({
1753
1813
  name: "on_tertiary_container",
@@ -1757,12 +1817,12 @@ MaterialDynamicColors.onTertiaryContainer = DynamicColor.fromPalette({
1757
1817
  return s.isDark ? 0 : 100;
1758
1818
  }
1759
1819
  if (!isFidelity(s)) {
1760
- return s.isDark ? 90 : 10;
1820
+ return s.isDark ? 90 : 30;
1761
1821
  }
1762
1822
  return DynamicColor.foregroundTone(MaterialDynamicColors.tertiaryContainer.tone(s), 4.5);
1763
1823
  },
1764
1824
  background: (s) => MaterialDynamicColors.tertiaryContainer,
1765
- contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
1825
+ contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
1766
1826
  });
1767
1827
  MaterialDynamicColors.error = DynamicColor.fromPalette({
1768
1828
  name: "error",
@@ -1770,8 +1830,8 @@ MaterialDynamicColors.error = DynamicColor.fromPalette({
1770
1830
  tone: (s) => s.isDark ? 80 : 40,
1771
1831
  isBackground: true,
1772
1832
  background: (s) => MaterialDynamicColors.highestSurface(s),
1773
- contrastCurve: new ContrastCurve(3, 4.5, 7, 11),
1774
- toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.errorContainer, MaterialDynamicColors.error, 15, "nearer", false)
1833
+ contrastCurve: new ContrastCurve(3, 4.5, 7, 7),
1834
+ toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.errorContainer, MaterialDynamicColors.error, 10, "nearer", false)
1775
1835
  });
1776
1836
  MaterialDynamicColors.onError = DynamicColor.fromPalette({
1777
1837
  name: "on_error",
@@ -1786,15 +1846,20 @@ MaterialDynamicColors.errorContainer = DynamicColor.fromPalette({
1786
1846
  tone: (s) => s.isDark ? 30 : 90,
1787
1847
  isBackground: true,
1788
1848
  background: (s) => MaterialDynamicColors.highestSurface(s),
1789
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1790
- toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.errorContainer, MaterialDynamicColors.error, 15, "nearer", false)
1849
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1850
+ toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.errorContainer, MaterialDynamicColors.error, 10, "nearer", false)
1791
1851
  });
1792
1852
  MaterialDynamicColors.onErrorContainer = DynamicColor.fromPalette({
1793
1853
  name: "on_error_container",
1794
1854
  palette: (s) => s.errorPalette,
1795
- tone: (s) => s.isDark ? 90 : 10,
1855
+ tone: (s) => {
1856
+ if (isMonochrome(s)) {
1857
+ return s.isDark ? 90 : 10;
1858
+ }
1859
+ return s.isDark ? 90 : 30;
1860
+ },
1796
1861
  background: (s) => MaterialDynamicColors.errorContainer,
1797
- contrastCurve: new ContrastCurve(4.5, 7, 11, 21)
1862
+ contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
1798
1863
  });
1799
1864
  MaterialDynamicColors.primaryFixed = DynamicColor.fromPalette({
1800
1865
  name: "primary_fixed",
@@ -1802,7 +1867,7 @@ MaterialDynamicColors.primaryFixed = DynamicColor.fromPalette({
1802
1867
  tone: (s) => isMonochrome(s) ? 40 : 90,
1803
1868
  isBackground: true,
1804
1869
  background: (s) => MaterialDynamicColors.highestSurface(s),
1805
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1870
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1806
1871
  toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryFixed, MaterialDynamicColors.primaryFixedDim, 10, "lighter", true)
1807
1872
  });
1808
1873
  MaterialDynamicColors.primaryFixedDim = DynamicColor.fromPalette({
@@ -1811,7 +1876,7 @@ MaterialDynamicColors.primaryFixedDim = DynamicColor.fromPalette({
1811
1876
  tone: (s) => isMonochrome(s) ? 30 : 80,
1812
1877
  isBackground: true,
1813
1878
  background: (s) => MaterialDynamicColors.highestSurface(s),
1814
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1879
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1815
1880
  toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.primaryFixed, MaterialDynamicColors.primaryFixedDim, 10, "lighter", true)
1816
1881
  });
1817
1882
  MaterialDynamicColors.onPrimaryFixed = DynamicColor.fromPalette({
@@ -1836,7 +1901,7 @@ MaterialDynamicColors.secondaryFixed = DynamicColor.fromPalette({
1836
1901
  tone: (s) => isMonochrome(s) ? 80 : 90,
1837
1902
  isBackground: true,
1838
1903
  background: (s) => MaterialDynamicColors.highestSurface(s),
1839
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1904
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1840
1905
  toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryFixed, MaterialDynamicColors.secondaryFixedDim, 10, "lighter", true)
1841
1906
  });
1842
1907
  MaterialDynamicColors.secondaryFixedDim = DynamicColor.fromPalette({
@@ -1845,7 +1910,7 @@ MaterialDynamicColors.secondaryFixedDim = DynamicColor.fromPalette({
1845
1910
  tone: (s) => isMonochrome(s) ? 70 : 80,
1846
1911
  isBackground: true,
1847
1912
  background: (s) => MaterialDynamicColors.highestSurface(s),
1848
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1913
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1849
1914
  toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.secondaryFixed, MaterialDynamicColors.secondaryFixedDim, 10, "lighter", true)
1850
1915
  });
1851
1916
  MaterialDynamicColors.onSecondaryFixed = DynamicColor.fromPalette({
@@ -1870,7 +1935,7 @@ MaterialDynamicColors.tertiaryFixed = DynamicColor.fromPalette({
1870
1935
  tone: (s) => isMonochrome(s) ? 40 : 90,
1871
1936
  isBackground: true,
1872
1937
  background: (s) => MaterialDynamicColors.highestSurface(s),
1873
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1938
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1874
1939
  toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryFixed, MaterialDynamicColors.tertiaryFixedDim, 10, "lighter", true)
1875
1940
  });
1876
1941
  MaterialDynamicColors.tertiaryFixedDim = DynamicColor.fromPalette({
@@ -1879,7 +1944,7 @@ MaterialDynamicColors.tertiaryFixedDim = DynamicColor.fromPalette({
1879
1944
  tone: (s) => isMonochrome(s) ? 30 : 80,
1880
1945
  isBackground: true,
1881
1946
  background: (s) => MaterialDynamicColors.highestSurface(s),
1882
- contrastCurve: new ContrastCurve(1, 1, 3, 7),
1947
+ contrastCurve: new ContrastCurve(1, 1, 3, 4.5),
1883
1948
  toneDeltaPair: (s) => new ToneDeltaPair(MaterialDynamicColors.tertiaryFixed, MaterialDynamicColors.tertiaryFixedDim, 10, "lighter", true)
1884
1949
  });
1885
1950
  MaterialDynamicColors.onTertiaryFixed = DynamicColor.fromPalette({
@@ -1899,61 +1964,7 @@ MaterialDynamicColors.onTertiaryFixedVariant = DynamicColor.fromPalette({
1899
1964
  contrastCurve: new ContrastCurve(3, 4.5, 7, 11)
1900
1965
  });
1901
1966
 
1902
- // node_modules/@material/material-color-utilities/palettes/tonal_palette.js
1903
- var TonalPalette = class {
1904
- static fromInt(argb) {
1905
- const hct = Hct.fromInt(argb);
1906
- return TonalPalette.fromHct(hct);
1907
- }
1908
- static fromHct(hct) {
1909
- return new TonalPalette(hct.hue, hct.chroma, hct);
1910
- }
1911
- static fromHueAndChroma(hue, chroma) {
1912
- return new TonalPalette(hue, chroma, TonalPalette.createKeyColor(hue, chroma));
1913
- }
1914
- constructor(hue, chroma, keyColor) {
1915
- this.hue = hue;
1916
- this.chroma = chroma;
1917
- this.keyColor = keyColor;
1918
- this.cache = /* @__PURE__ */ new Map();
1919
- }
1920
- static createKeyColor(hue, chroma) {
1921
- const startTone = 50;
1922
- let smallestDeltaHct = Hct.from(hue, chroma, startTone);
1923
- let smallestDelta = Math.abs(smallestDeltaHct.chroma - chroma);
1924
- for (let delta = 1; delta < 50; delta += 1) {
1925
- if (Math.round(chroma) === Math.round(smallestDeltaHct.chroma)) {
1926
- return smallestDeltaHct;
1927
- }
1928
- const hctAdd = Hct.from(hue, chroma, startTone + delta);
1929
- const hctAddDelta = Math.abs(hctAdd.chroma - chroma);
1930
- if (hctAddDelta < smallestDelta) {
1931
- smallestDelta = hctAddDelta;
1932
- smallestDeltaHct = hctAdd;
1933
- }
1934
- const hctSubtract = Hct.from(hue, chroma, startTone - delta);
1935
- const hctSubtractDelta = Math.abs(hctSubtract.chroma - chroma);
1936
- if (hctSubtractDelta < smallestDelta) {
1937
- smallestDelta = hctSubtractDelta;
1938
- smallestDeltaHct = hctSubtract;
1939
- }
1940
- }
1941
- return smallestDeltaHct;
1942
- }
1943
- tone(tone) {
1944
- let argb = this.cache.get(tone);
1945
- if (argb === void 0) {
1946
- argb = Hct.from(this.hue, this.chroma, tone).toInt();
1947
- this.cache.set(tone, argb);
1948
- }
1949
- return argb;
1950
- }
1951
- getHct(tone) {
1952
- return Hct.fromInt(this.tone(tone));
1953
- }
1954
- };
1955
-
1956
- // node_modules/@material/material-color-utilities/scheme/dynamic_scheme.js
1967
+ // node_modules/@material/material-color-utilities/dynamiccolor/dynamic_scheme.js
1957
1968
  var DynamicScheme = class {
1958
1969
  constructor(args) {
1959
1970
  this.sourceColorArgb = args.sourceColorArgb;
@@ -1986,6 +1997,174 @@ var DynamicScheme = class {
1986
1997
  }
1987
1998
  return sourceHue;
1988
1999
  }
2000
+ getArgb(dynamicColor) {
2001
+ return dynamicColor.getArgb(this);
2002
+ }
2003
+ getHct(dynamicColor) {
2004
+ return dynamicColor.getHct(this);
2005
+ }
2006
+ get primaryPaletteKeyColor() {
2007
+ return this.getArgb(MaterialDynamicColors.primaryPaletteKeyColor);
2008
+ }
2009
+ get secondaryPaletteKeyColor() {
2010
+ return this.getArgb(MaterialDynamicColors.secondaryPaletteKeyColor);
2011
+ }
2012
+ get tertiaryPaletteKeyColor() {
2013
+ return this.getArgb(MaterialDynamicColors.tertiaryPaletteKeyColor);
2014
+ }
2015
+ get neutralPaletteKeyColor() {
2016
+ return this.getArgb(MaterialDynamicColors.neutralPaletteKeyColor);
2017
+ }
2018
+ get neutralVariantPaletteKeyColor() {
2019
+ return this.getArgb(MaterialDynamicColors.neutralVariantPaletteKeyColor);
2020
+ }
2021
+ get background() {
2022
+ return this.getArgb(MaterialDynamicColors.background);
2023
+ }
2024
+ get onBackground() {
2025
+ return this.getArgb(MaterialDynamicColors.onBackground);
2026
+ }
2027
+ get surface() {
2028
+ return this.getArgb(MaterialDynamicColors.surface);
2029
+ }
2030
+ get surfaceDim() {
2031
+ return this.getArgb(MaterialDynamicColors.surfaceDim);
2032
+ }
2033
+ get surfaceBright() {
2034
+ return this.getArgb(MaterialDynamicColors.surfaceBright);
2035
+ }
2036
+ get surfaceContainerLowest() {
2037
+ return this.getArgb(MaterialDynamicColors.surfaceContainerLowest);
2038
+ }
2039
+ get surfaceContainerLow() {
2040
+ return this.getArgb(MaterialDynamicColors.surfaceContainerLow);
2041
+ }
2042
+ get surfaceContainer() {
2043
+ return this.getArgb(MaterialDynamicColors.surfaceContainer);
2044
+ }
2045
+ get surfaceContainerHigh() {
2046
+ return this.getArgb(MaterialDynamicColors.surfaceContainerHigh);
2047
+ }
2048
+ get surfaceContainerHighest() {
2049
+ return this.getArgb(MaterialDynamicColors.surfaceContainerHighest);
2050
+ }
2051
+ get onSurface() {
2052
+ return this.getArgb(MaterialDynamicColors.onSurface);
2053
+ }
2054
+ get surfaceVariant() {
2055
+ return this.getArgb(MaterialDynamicColors.surfaceVariant);
2056
+ }
2057
+ get onSurfaceVariant() {
2058
+ return this.getArgb(MaterialDynamicColors.onSurfaceVariant);
2059
+ }
2060
+ get inverseSurface() {
2061
+ return this.getArgb(MaterialDynamicColors.inverseSurface);
2062
+ }
2063
+ get inverseOnSurface() {
2064
+ return this.getArgb(MaterialDynamicColors.inverseOnSurface);
2065
+ }
2066
+ get outline() {
2067
+ return this.getArgb(MaterialDynamicColors.outline);
2068
+ }
2069
+ get outlineVariant() {
2070
+ return this.getArgb(MaterialDynamicColors.outlineVariant);
2071
+ }
2072
+ get shadow() {
2073
+ return this.getArgb(MaterialDynamicColors.shadow);
2074
+ }
2075
+ get scrim() {
2076
+ return this.getArgb(MaterialDynamicColors.scrim);
2077
+ }
2078
+ get surfaceTint() {
2079
+ return this.getArgb(MaterialDynamicColors.surfaceTint);
2080
+ }
2081
+ get primary() {
2082
+ return this.getArgb(MaterialDynamicColors.primary);
2083
+ }
2084
+ get onPrimary() {
2085
+ return this.getArgb(MaterialDynamicColors.onPrimary);
2086
+ }
2087
+ get primaryContainer() {
2088
+ return this.getArgb(MaterialDynamicColors.primaryContainer);
2089
+ }
2090
+ get onPrimaryContainer() {
2091
+ return this.getArgb(MaterialDynamicColors.onPrimaryContainer);
2092
+ }
2093
+ get inversePrimary() {
2094
+ return this.getArgb(MaterialDynamicColors.inversePrimary);
2095
+ }
2096
+ get secondary() {
2097
+ return this.getArgb(MaterialDynamicColors.secondary);
2098
+ }
2099
+ get onSecondary() {
2100
+ return this.getArgb(MaterialDynamicColors.onSecondary);
2101
+ }
2102
+ get secondaryContainer() {
2103
+ return this.getArgb(MaterialDynamicColors.secondaryContainer);
2104
+ }
2105
+ get onSecondaryContainer() {
2106
+ return this.getArgb(MaterialDynamicColors.onSecondaryContainer);
2107
+ }
2108
+ get tertiary() {
2109
+ return this.getArgb(MaterialDynamicColors.tertiary);
2110
+ }
2111
+ get onTertiary() {
2112
+ return this.getArgb(MaterialDynamicColors.onTertiary);
2113
+ }
2114
+ get tertiaryContainer() {
2115
+ return this.getArgb(MaterialDynamicColors.tertiaryContainer);
2116
+ }
2117
+ get onTertiaryContainer() {
2118
+ return this.getArgb(MaterialDynamicColors.onTertiaryContainer);
2119
+ }
2120
+ get error() {
2121
+ return this.getArgb(MaterialDynamicColors.error);
2122
+ }
2123
+ get onError() {
2124
+ return this.getArgb(MaterialDynamicColors.onError);
2125
+ }
2126
+ get errorContainer() {
2127
+ return this.getArgb(MaterialDynamicColors.errorContainer);
2128
+ }
2129
+ get onErrorContainer() {
2130
+ return this.getArgb(MaterialDynamicColors.onErrorContainer);
2131
+ }
2132
+ get primaryFixed() {
2133
+ return this.getArgb(MaterialDynamicColors.primaryFixed);
2134
+ }
2135
+ get primaryFixedDim() {
2136
+ return this.getArgb(MaterialDynamicColors.primaryFixedDim);
2137
+ }
2138
+ get onPrimaryFixed() {
2139
+ return this.getArgb(MaterialDynamicColors.onPrimaryFixed);
2140
+ }
2141
+ get onPrimaryFixedVariant() {
2142
+ return this.getArgb(MaterialDynamicColors.onPrimaryFixedVariant);
2143
+ }
2144
+ get secondaryFixed() {
2145
+ return this.getArgb(MaterialDynamicColors.secondaryFixed);
2146
+ }
2147
+ get secondaryFixedDim() {
2148
+ return this.getArgb(MaterialDynamicColors.secondaryFixedDim);
2149
+ }
2150
+ get onSecondaryFixed() {
2151
+ return this.getArgb(MaterialDynamicColors.onSecondaryFixed);
2152
+ }
2153
+ get onSecondaryFixedVariant() {
2154
+ return this.getArgb(MaterialDynamicColors.onSecondaryFixedVariant);
2155
+ }
2156
+ get tertiaryFixed() {
2157
+ return this.getArgb(MaterialDynamicColors.tertiaryFixed);
2158
+ }
2159
+ get tertiaryFixedDim() {
2160
+ return this.getArgb(MaterialDynamicColors.tertiaryFixedDim);
2161
+ }
2162
+ get onTertiaryFixed() {
2163
+ return this.getArgb(MaterialDynamicColors.onTertiaryFixed);
2164
+ }
2165
+ get onTertiaryFixedVariant() {
2166
+ return this.getArgb(MaterialDynamicColors.onTertiaryFixedVariant);
2167
+ }
1989
2168
  };
1990
2169
 
1991
2170
  // node_modules/@material/material-color-utilities/temperature/temperature_cache.js
@@ -2167,23 +2346,6 @@ var TemperatureCache = class {
2167
2346
  }
2168
2347
  };
2169
2348
 
2170
- // node_modules/@material/material-color-utilities/scheme/scheme_content.js
2171
- var SchemeContent = class extends DynamicScheme {
2172
- constructor(sourceColorHct, isDark, contrastLevel) {
2173
- super({
2174
- sourceColorArgb: sourceColorHct.toInt(),
2175
- variant: Variant.CONTENT,
2176
- contrastLevel,
2177
- isDark,
2178
- primaryPalette: TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma),
2179
- secondaryPalette: TonalPalette.fromHueAndChroma(sourceColorHct.hue, Math.max(sourceColorHct.chroma - 32, sourceColorHct.chroma * 0.5)),
2180
- tertiaryPalette: TonalPalette.fromInt(DislikeAnalyzer.fixIfDisliked(new TemperatureCache(sourceColorHct).analogous(3, 6)[2]).toInt()),
2181
- neutralPalette: TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma / 8),
2182
- neutralVariantPalette: TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma / 8 + 4)
2183
- });
2184
- }
2185
- };
2186
-
2187
2349
  // node_modules/@material/material-color-utilities/scheme/scheme_expressive.js
2188
2350
  var SchemeExpressive = class extends DynamicScheme {
2189
2351
  constructor(sourceColorHct, isDark, contrastLevel) {
@@ -2411,7 +2573,7 @@ function parseIntHex(value) {
2411
2573
  return parseInt(value, 16);
2412
2574
  }
2413
2575
 
2414
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/m3-theme/index.mjs
2576
+ // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-generate/theme-color/index.mjs
2415
2577
  var HUE_TONES = [0, 10, 20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 95, 98, 99, 100];
2416
2578
  var NEUTRAL_HUES = /* @__PURE__ */ new Map([
2417
2579
  [4, { prev: 0, next: 10 }],
@@ -2426,40 +2588,18 @@ var NEUTRAL_HUES = /* @__PURE__ */ new Map([
2426
2588
  [96, { prev: 95, next: 98 }]
2427
2589
  ]);
2428
2590
  var NEUTRAL_HUE_TONES = [...HUE_TONES, ...NEUTRAL_HUES.keys()];
2429
- function getMaterialTonalPalettes(color) {
2430
- try {
2431
- let argbColor = argbFromHex(color);
2432
- const scheme = new SchemeContent(
2433
- Hct.fromInt(argbColor),
2434
- false,
2435
- 0
2436
- );
2437
- return {
2438
- primary: scheme.primaryPalette,
2439
- secondary: scheme.secondaryPalette,
2440
- tertiary: scheme.tertiaryPalette,
2441
- neutral: scheme.neutralPalette,
2442
- neutralVariant: scheme.neutralVariantPalette,
2443
- error: scheme.errorPalette
2444
- };
2445
- } catch (e) {
2446
- throw new Error("Cannot parse the specified color " + color + ". Please verify it is a hex color (ex. #ffffff or ffffff).");
2447
- }
2448
- }
2449
- function getColorTonalPalettes(color) {
2450
- const tonalPalettes = getMaterialTonalPalettes(color);
2451
- const palettes = /* @__PURE__ */ new Map();
2452
- for (const [key, palette] of Object.entries(tonalPalettes)) {
2453
- const paletteKey = key.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
2454
- const tones = paletteKey === "neutral" ? NEUTRAL_HUE_TONES : HUE_TONES;
2455
- const colorPalette = /* @__PURE__ */ new Map();
2456
- for (const tone of tones) {
2457
- const color2 = hexFromArgb(palette.tone(tone));
2458
- colorPalette.set(tone, color2);
2459
- }
2460
- palettes.set(paletteKey, colorPalette);
2461
- }
2462
- return palettes;
2591
+ function getMaterialDynamicScheme(primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette, isDark, contrastLevel) {
2592
+ return new DynamicScheme({
2593
+ sourceColorArgb: primaryPalette.keyColor.toInt(),
2594
+ variant: 6,
2595
+ contrastLevel,
2596
+ isDark,
2597
+ primaryPalette,
2598
+ secondaryPalette,
2599
+ tertiaryPalette,
2600
+ neutralPalette,
2601
+ neutralVariantPalette
2602
+ });
2463
2603
  }
2464
2604
  function getColorPalettesSCSS(colorPalettes) {
2465
2605
  let scss = "(\n";
@@ -2473,16 +2613,38 @@ function getColorPalettesSCSS(colorPalettes) {
2473
2613
  scss += ");";
2474
2614
  return scss;
2475
2615
  }
2476
- function generateSCSSTheme(colorPalettes, themeTypes, colorComment, useSystemVariables) {
2616
+ function getMapFromColorTonalPalettes(primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette, errorPalette) {
2617
+ const tonalPalettes = {
2618
+ primary: primaryPalette,
2619
+ secondary: secondaryPalette,
2620
+ tertiary: tertiaryPalette,
2621
+ neutral: neutralPalette,
2622
+ neutralVariant: neutralVariantPalette,
2623
+ error: errorPalette
2624
+ };
2625
+ const palettes = /* @__PURE__ */ new Map();
2626
+ for (const [key, palette] of Object.entries(tonalPalettes)) {
2627
+ const paletteKey = key.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
2628
+ const tones = paletteKey === "neutral" ? NEUTRAL_HUE_TONES : HUE_TONES;
2629
+ const colorPalette = /* @__PURE__ */ new Map();
2630
+ for (const tone of tones) {
2631
+ const color = hexFromArgb(palette.tone(tone));
2632
+ colorPalette.set(tone, color);
2633
+ }
2634
+ palettes.set(paletteKey, colorPalette);
2635
+ }
2636
+ return palettes;
2637
+ }
2638
+ function generateSCSSTheme(colorPalettes, colorComment) {
2477
2639
  let scss = [
2478
- "// This file was generated by running 'ng generate @angular/material:m3-theme'.",
2640
+ "// This file was generated by running 'ng generate @angular/material:theme-color'.",
2479
2641
  "// Proceed with caution if making changes to this file.",
2480
2642
  "",
2481
2643
  "@use 'sass:map';",
2482
2644
  "@use '@angular/material' as mat;",
2483
2645
  "",
2484
2646
  "// Note: " + colorComment,
2485
- "$_palettes: " + getColorPalettesSCSS(patchMissingHues(colorPalettes)),
2647
+ "$_palettes: " + getColorPalettesSCSS(colorPalettes),
2486
2648
  "",
2487
2649
  "$_rest: (",
2488
2650
  " secondary: map.get($_palettes, secondary),",
@@ -2490,121 +2652,125 @@ function generateSCSSTheme(colorPalettes, themeTypes, colorComment, useSystemVar
2490
2652
  " neutral-variant: map.get($_palettes, neutral-variant),",
2491
2653
  " error: map.get($_palettes, error),",
2492
2654
  ");",
2493
- "$_primary: map.merge(map.get($_palettes, primary), $_rest);",
2494
- "$_tertiary: map.merge(map.get($_palettes, tertiary), $_rest);",
2495
- ""
2655
+ "",
2656
+ "$primary-palette: map.merge(map.get($_palettes, primary), $_rest);",
2657
+ "$tertiary-palette: map.merge(map.get($_palettes, tertiary), $_rest);"
2496
2658
  ];
2497
- let themes = themeTypes === "both" ? ["light", "dark"] : [themeTypes];
2498
- for (const themeType of themes) {
2499
- scss = scss.concat([
2500
- "$" + themeType + "-theme: mat.define-theme((",
2501
- " color: (",
2502
- " theme-type: " + themeType + ",",
2503
- " primary: $_primary,",
2504
- " tertiary: $_tertiary,",
2505
- ...useSystemVariables ? [" use-system-variables: true,"] : [],
2506
- " ),",
2507
- ...useSystemVariables ? [" typography: (", " use-system-variables: true,", " ),"] : [],
2508
- "));"
2509
- ]);
2510
- }
2511
2659
  return scss.join("\n");
2512
2660
  }
2661
+ function getHighContrastOverides(primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette, isDark) {
2662
+ const scheme = getMaterialDynamicScheme(primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette, isDark, 1);
2663
+ const overrides = /* @__PURE__ */ new Map();
2664
+ overrides.set("primary", hexFromArgb(scheme.primary));
2665
+ overrides.set("on-primary", hexFromArgb(scheme.onPrimary));
2666
+ overrides.set("primary-container", hexFromArgb(scheme.primaryContainer));
2667
+ overrides.set("on-primary-container", hexFromArgb(scheme.onPrimaryContainer));
2668
+ overrides.set("inverse-primary", hexFromArgb(scheme.inversePrimary));
2669
+ overrides.set("primary-fixed", hexFromArgb(scheme.primaryFixed));
2670
+ overrides.set("primary-fixed-dim", hexFromArgb(scheme.primaryFixedDim));
2671
+ overrides.set("on-primary-fixed", hexFromArgb(scheme.onPrimaryFixed));
2672
+ overrides.set("on-primary-fixed-variant", hexFromArgb(scheme.onPrimaryFixedVariant));
2673
+ overrides.set("secondary", hexFromArgb(scheme.secondary));
2674
+ overrides.set("on-secondary", hexFromArgb(scheme.onSecondary));
2675
+ overrides.set("secondary-container", hexFromArgb(scheme.secondaryContainer));
2676
+ overrides.set("on-secondary-container", hexFromArgb(scheme.onSecondaryContainer));
2677
+ overrides.set("secondary-fixed", hexFromArgb(scheme.secondaryFixed));
2678
+ overrides.set("secondary-fixed-dim", hexFromArgb(scheme.secondaryFixedDim));
2679
+ overrides.set("on-secondary-fixed", hexFromArgb(scheme.onSecondaryFixed));
2680
+ overrides.set("on-secondary-fixed-variant", hexFromArgb(scheme.onSecondaryFixedVariant));
2681
+ overrides.set("tertiary", hexFromArgb(scheme.tertiary));
2682
+ overrides.set("on-tertiary", hexFromArgb(scheme.onTertiary));
2683
+ overrides.set("tertiary-container", hexFromArgb(scheme.tertiaryContainer));
2684
+ overrides.set("on-tertiary-container", hexFromArgb(scheme.onTertiaryContainer));
2685
+ overrides.set("tertiary-fixed", hexFromArgb(scheme.tertiaryFixed));
2686
+ overrides.set("tertiary-fixed-dim", hexFromArgb(scheme.tertiaryFixedDim));
2687
+ overrides.set("on-tertiary-fixed", hexFromArgb(scheme.onTertiaryFixed));
2688
+ overrides.set("on-tertiary-fixed-variant", hexFromArgb(scheme.onTertiaryFixedVariant));
2689
+ overrides.set("background", hexFromArgb(scheme.background));
2690
+ overrides.set("on-background", hexFromArgb(scheme.onBackground));
2691
+ overrides.set("surface", hexFromArgb(scheme.surface));
2692
+ overrides.set("surface-dim", hexFromArgb(scheme.surfaceDim));
2693
+ overrides.set("surface-bright", hexFromArgb(scheme.surfaceBright));
2694
+ overrides.set("surface-container-lowest", hexFromArgb(scheme.surfaceContainerLowest));
2695
+ overrides.set("surface-container-lowest", hexFromArgb(scheme.surfaceContainerLow));
2696
+ overrides.set("surface-container", hexFromArgb(scheme.surfaceContainer));
2697
+ overrides.set("surface-container-high", hexFromArgb(scheme.surfaceContainerHigh));
2698
+ overrides.set("surface-container-highest", hexFromArgb(scheme.surfaceContainerHighest));
2699
+ overrides.set("on-surface", hexFromArgb(scheme.onSurface));
2700
+ overrides.set("shadow", hexFromArgb(scheme.shadow));
2701
+ overrides.set("scrim", hexFromArgb(scheme.scrim));
2702
+ overrides.set("surface-tint", hexFromArgb(scheme.surfaceTint));
2703
+ overrides.set("inverse-surface", hexFromArgb(scheme.inverseSurface));
2704
+ overrides.set("inverse-on-surface", hexFromArgb(scheme.inverseOnSurface));
2705
+ overrides.set("outline", hexFromArgb(scheme.outline));
2706
+ overrides.set("outline-variant", hexFromArgb(scheme.outlineVariant));
2707
+ overrides.set("error", hexFromArgb(scheme.error));
2708
+ overrides.set("on-error", hexFromArgb(scheme.onError));
2709
+ overrides.set("error-container", hexFromArgb(scheme.errorContainer));
2710
+ overrides.set("on-error-container", hexFromArgb(scheme.onErrorContainer));
2711
+ overrides.set("surface-variant", hexFromArgb(scheme.surfaceVariant));
2712
+ overrides.set("on-surface-variant", hexFromArgb(scheme.onSurfaceVariant));
2713
+ return overrides;
2714
+ }
2715
+ function generateHighContrastOverrideMixinsSCSS(primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette) {
2716
+ let scss = "\n";
2717
+ for (const themeType of ["light", "dark"]) {
2718
+ const overrides = getHighContrastOverides(primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette, themeType === "dark");
2719
+ scss += "\n@mixin high-contrast-" + themeType + "-theme-overrides {\n";
2720
+ for (const [key, value] of overrides.entries()) {
2721
+ scss += " --mat-sys-" + key + ": " + value + ";\n";
2722
+ }
2723
+ scss += "};\n";
2724
+ }
2725
+ return scss;
2726
+ }
2727
+ function getHctFromHex(color) {
2728
+ try {
2729
+ return Hct.fromInt(argbFromHex(color));
2730
+ } catch (e) {
2731
+ throw new Error("Cannot parse the specified color " + color + ". Please verify it is a hex color (ex. #ffffff or ffffff).");
2732
+ }
2733
+ }
2513
2734
  function createThemeFile(scss, tree, directory) {
2514
- const filePath = directory ? directory + "m3-theme.scss" : "m3-theme.scss";
2735
+ const filePath = directory ? directory + "_theme-colors.scss" : "_theme-colors.scss";
2515
2736
  tree.create(filePath, scss);
2516
2737
  }
2517
- function m3_theme_default(options) {
2738
+ function theme_color_default(options) {
2518
2739
  return (tree, context) => __async(this, null, function* () {
2519
- const colorPalettes = getColorTonalPalettes(options.primaryColor);
2520
2740
  let colorComment = "Color palettes are generated from primary: " + options.primaryColor;
2741
+ const primaryColorHct = getHctFromHex(options.primaryColor);
2742
+ const primaryPalette = TonalPalette.fromHct(primaryColorHct);
2743
+ let secondaryPalette;
2521
2744
  if (options.secondaryColor) {
2522
- colorPalettes.set("secondary", getColorTonalPalettes(options.secondaryColor).get("primary"));
2523
2745
  colorComment += ", secondary: " + options.secondaryColor;
2746
+ secondaryPalette = TonalPalette.fromHct(getHctFromHex(options.secondaryColor));
2747
+ } else {
2748
+ secondaryPalette = TonalPalette.fromHueAndChroma(primaryColorHct.hue, Math.max(primaryColorHct.chroma - 32, primaryColorHct.chroma * 0.5));
2524
2749
  }
2750
+ let tertiaryPalette;
2525
2751
  if (options.tertiaryColor) {
2526
- colorPalettes.set("tertiary", getColorTonalPalettes(options.tertiaryColor).get("primary"));
2527
2752
  colorComment += ", tertiary: " + options.tertiaryColor;
2753
+ tertiaryPalette = TonalPalette.fromHct(getHctFromHex(options.tertiaryColor));
2754
+ } else {
2755
+ tertiaryPalette = TonalPalette.fromInt(DislikeAnalyzer.fixIfDisliked(new TemperatureCache(primaryColorHct).analogous(3, 6)[2]).toInt());
2528
2756
  }
2757
+ let neutralPalette;
2529
2758
  if (options.neutralColor) {
2530
- colorPalettes.set("neutral", getColorTonalPalettes(options.neutralColor).get("primary"));
2531
2759
  colorComment += ", neutral: " + options.neutralColor;
2760
+ neutralPalette = TonalPalette.fromHct(getHctFromHex(options.neutralColor));
2761
+ } else {
2762
+ neutralPalette = TonalPalette.fromHueAndChroma(primaryColorHct.hue, primaryColorHct.chroma / 8);
2532
2763
  }
2533
- if (!options.themeTypes) {
2534
- context.logger.info("No theme types specified, creating both light and dark themes.");
2535
- options.themeTypes = "both";
2764
+ const neutralVariantPalette = TonalPalette.fromHueAndChroma(primaryColorHct.hue, primaryColorHct.chroma / 8 + 4);
2765
+ const errorPalette = getMaterialDynamicScheme(primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette, false, 0).errorPalette;
2766
+ const colorPalettes = getMapFromColorTonalPalettes(primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette, errorPalette);
2767
+ let themeScss = generateSCSSTheme(colorPalettes, colorComment);
2768
+ if (options.includeHighContrast) {
2769
+ themeScss += generateHighContrastOverrideMixinsSCSS(primaryPalette, secondaryPalette, tertiaryPalette, neutralPalette, neutralVariantPalette);
2536
2770
  }
2537
- const themeScss = generateSCSSTheme(colorPalettes, options.themeTypes, colorComment, options.useSystemVariables || false);
2538
2771
  createThemeFile(themeScss, tree, options.directory);
2539
2772
  });
2540
2773
  }
2541
- function patchMissingHues(palettes) {
2542
- const neutral = palettes.get("neutral");
2543
- if (!neutral) {
2544
- return palettes;
2545
- }
2546
- let newNeutral = null;
2547
- for (const [hue, { prev, next }] of NEUTRAL_HUES) {
2548
- if (!neutral.has(hue) && neutral.has(prev) && neutral.has(next)) {
2549
- const weight = (next - hue) / (next - prev);
2550
- const result = mixColors(neutral.get(prev), neutral.get(next), weight);
2551
- if (result !== null) {
2552
- newNeutral != null ? newNeutral : newNeutral = new Map(neutral.entries());
2553
- newNeutral.set(hue, result);
2554
- }
2555
- }
2556
- }
2557
- if (!newNeutral) {
2558
- return palettes;
2559
- }
2560
- const newPalettes = /* @__PURE__ */ new Map();
2561
- for (const [key, value] of palettes) {
2562
- if (key === "neutral") {
2563
- const sortedNeutral = Array.from(newNeutral.keys()).sort((a, b) => a - b).reduce((newHues, key2) => {
2564
- newHues.set(key2, newNeutral.get(key2));
2565
- return newHues;
2566
- }, /* @__PURE__ */ new Map());
2567
- newPalettes.set(key, sortedNeutral);
2568
- } else {
2569
- newPalettes.set(key, value);
2570
- }
2571
- }
2572
- return newPalettes;
2573
- }
2574
- function mixColors(c1, c2, weight) {
2575
- const normalizedWeight = weight * 2 - 1;
2576
- const weight1 = (normalizedWeight + 1) / 2;
2577
- const weight2 = 1 - weight1;
2578
- const color1 = parseHexColor(c1);
2579
- const color2 = parseHexColor(c2);
2580
- if (color1 === null || color2 === null) {
2581
- return null;
2582
- }
2583
- const red = Math.round(color1.red * weight1 + color2.red * weight2);
2584
- const green = Math.round(color1.green * weight1 + color2.green * weight2);
2585
- const blue = Math.round(color1.blue * weight1 + color2.blue * weight2);
2586
- const intToHex = (value) => value.toString(16).padStart(2, "0");
2587
- return `#${intToHex(red)}${intToHex(green)}${intToHex(blue)}`;
2588
- }
2589
- function parseHexColor(value) {
2590
- if (!/^#(?:[0-9a-fA-F]{3}){1,2}$/.test(value)) {
2591
- return null;
2592
- }
2593
- const hexToInt = (value2) => parseInt(value2, 16);
2594
- let red;
2595
- let green;
2596
- let blue;
2597
- if (value.length === 4) {
2598
- red = hexToInt(value[1] + value[1]);
2599
- green = hexToInt(value[2] + value[2]);
2600
- blue = hexToInt(value[3] + value[3]);
2601
- } else {
2602
- red = hexToInt(value.slice(1, 3));
2603
- green = hexToInt(value.slice(3, 5));
2604
- blue = hexToInt(value.slice(5, 7));
2605
- }
2606
- return { red, green, blue };
2607
- }
2608
2774
  // Annotate the CommonJS export names for ESM import in node:
2609
2775
  0 && (module.exports = {
2610
2776
  generateSCSSTheme