@udixio/theme 1.2.0 → 1.3.1
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/CHANGELOG.md +20 -0
- package/dist/bin.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/browser.cjs +3 -4
- package/dist/browser.js +11 -12
- package/dist/color/color.manager.d.ts.map +1 -1
- package/dist/color/default-color.d.ts.map +1 -1
- package/dist/{define-config-CGG8l3fb.js → define-config-BasMdCqD.js} +32 -2
- package/dist/{define-config-BFo7Sy7c.cjs → define-config-CKSsLMnc.cjs} +32 -2
- package/dist/{load-from-path-CFpw2P_Y.js → load-from-path-Bo1kCfh9.js} +1 -1
- package/dist/{load-from-path-BvdfXUD0.cjs → load-from-path-DoZnR1-p.cjs} +2 -2
- package/dist/loader/loader.d.ts.map +1 -1
- package/dist/{loader-C_BIrsO2.js → loader-C8_TyOuS.js} +132 -119
- package/dist/{loader-TksB6_mM.cjs → loader-R7hccp8_.cjs} +124 -111
- package/dist/material-color-utilities/dynamic_color.d.ts +9 -15
- package/dist/material-color-utilities/dynamic_color.d.ts.map +1 -1
- package/dist/material-color-utilities/toneDeltaPair.d.ts +9 -2
- package/dist/material-color-utilities/toneDeltaPair.d.ts.map +1 -1
- package/dist/node.cjs +4 -5
- package/dist/node.js +13 -14
- package/dist/theme/scheme.d.ts +1 -1
- package/dist/theme/scheme.d.ts.map +1 -1
- package/dist/theme/theme.api.d.ts +1 -0
- package/dist/theme/theme.api.d.ts.map +1 -1
- package/dist/theme/variants/fidelity.variant.d.ts +3 -0
- package/dist/theme/variants/fidelity.variant.d.ts.map +1 -0
- package/dist/theme/variants/index.d.ts +1 -0
- package/dist/theme/variants/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/color/color.manager.ts +10 -8
- package/src/color/default-color.ts +82 -34
- package/src/loader/loader.ts +1 -5
- package/src/material-color-utilities/dynamic_color.ts +18 -120
- package/src/material-color-utilities/toneDeltaPair.ts +91 -2
- package/src/theme/scheme.ts +7 -1
- package/src/theme/theme.api.ts +4 -0
- package/src/theme/variants/fidelity.variant.ts +38 -0
- package/src/theme/variants/index.ts +2 -0
|
@@ -899,34 +899,6 @@ class Hct {
|
|
|
899
899
|
* See the License for the specific language governing permissions and
|
|
900
900
|
* limitations under the License.
|
|
901
901
|
*/
|
|
902
|
-
function extendSpecVersion(originlColor, extendedColor) {
|
|
903
|
-
return DynamicColor.fromPalette({
|
|
904
|
-
name: originlColor.name,
|
|
905
|
-
palette: (s) => extendedColor.palette(s),
|
|
906
|
-
tone: (s) => extendedColor.tone(s),
|
|
907
|
-
isBackground: originlColor.isBackground,
|
|
908
|
-
chromaMultiplier: (s) => {
|
|
909
|
-
const chromaMultiplier = extendedColor.chromaMultiplier;
|
|
910
|
-
return chromaMultiplier !== void 0 ? chromaMultiplier(s) : 1;
|
|
911
|
-
},
|
|
912
|
-
background: (s) => {
|
|
913
|
-
const background = extendedColor.background;
|
|
914
|
-
return background !== void 0 ? background(s) : void 0;
|
|
915
|
-
},
|
|
916
|
-
secondBackground: (s) => {
|
|
917
|
-
const secondBackground = extendedColor.secondBackground;
|
|
918
|
-
return secondBackground !== void 0 ? secondBackground(s) : void 0;
|
|
919
|
-
},
|
|
920
|
-
contrastCurve: (s) => {
|
|
921
|
-
const contrastCurve = extendedColor.contrastCurve;
|
|
922
|
-
return contrastCurve !== void 0 ? contrastCurve(s) : void 0;
|
|
923
|
-
},
|
|
924
|
-
toneDeltaPair: (s) => {
|
|
925
|
-
const toneDeltaPair = extendedColor.toneDeltaPair;
|
|
926
|
-
return toneDeltaPair !== void 0 ? toneDeltaPair(s) : void 0;
|
|
927
|
-
}
|
|
928
|
-
});
|
|
929
|
-
}
|
|
930
902
|
class DynamicColor {
|
|
931
903
|
/**
|
|
932
904
|
* The base constructor for DynamicColor.
|
|
@@ -957,11 +929,11 @@ class DynamicColor {
|
|
|
957
929
|
* @param contrastCurve A `ContrastCurve` object specifying how its contrast
|
|
958
930
|
* against its background should behave in various contrast levels
|
|
959
931
|
* options.
|
|
960
|
-
* @param
|
|
932
|
+
* @param adjustTone A `AdjustTone` object specifying a tone delta
|
|
961
933
|
* constraint between two colors. One of them must be the color being
|
|
962
934
|
* constructed.
|
|
963
935
|
*/
|
|
964
|
-
constructor(name, palette, tone, isBackground, chromaMultiplier, background, secondBackground, contrastCurve,
|
|
936
|
+
constructor(name, palette, tone, isBackground, chromaMultiplier, background, secondBackground, contrastCurve, adjustTone) {
|
|
965
937
|
__publicField(this, "hctCache", /* @__PURE__ */ new Map());
|
|
966
938
|
this.name = name;
|
|
967
939
|
this.palette = palette;
|
|
@@ -971,7 +943,7 @@ class DynamicColor {
|
|
|
971
943
|
this.background = background;
|
|
972
944
|
this.secondBackground = secondBackground;
|
|
973
945
|
this.contrastCurve = contrastCurve;
|
|
974
|
-
this.
|
|
946
|
+
this.adjustTone = adjustTone;
|
|
975
947
|
if (!background && secondBackground) {
|
|
976
948
|
throw new Error(
|
|
977
949
|
`Color ${name} has secondBackgrounddefined, but background is not defined.`
|
|
@@ -1004,7 +976,7 @@ class DynamicColor {
|
|
|
1004
976
|
args.background,
|
|
1005
977
|
args.secondBackground,
|
|
1006
978
|
args.contrastCurve,
|
|
1007
|
-
args.
|
|
979
|
+
args.adjustTone
|
|
1008
980
|
);
|
|
1009
981
|
}
|
|
1010
982
|
static getInitialToneFromBackground(background) {
|
|
@@ -1079,7 +1051,7 @@ class DynamicColor {
|
|
|
1079
1051
|
background: this.background,
|
|
1080
1052
|
secondBackground: this.secondBackground,
|
|
1081
1053
|
contrastCurve: this.contrastCurve,
|
|
1082
|
-
|
|
1054
|
+
adjustTone: this.adjustTone
|
|
1083
1055
|
});
|
|
1084
1056
|
}
|
|
1085
1057
|
/**
|
|
@@ -1123,59 +1095,9 @@ class DynamicColor {
|
|
|
1123
1095
|
* contrast level is.
|
|
1124
1096
|
*/
|
|
1125
1097
|
getTone(scheme) {
|
|
1126
|
-
const
|
|
1127
|
-
if (
|
|
1128
|
-
|
|
1129
|
-
const roleB = toneDeltaPair.roleB;
|
|
1130
|
-
const polarity = toneDeltaPair.polarity;
|
|
1131
|
-
const constraint = toneDeltaPair.constraint;
|
|
1132
|
-
const absoluteDelta = polarity === "darker" || polarity === "relative_lighter" && scheme.isDark || polarity === "relative_darker" && !scheme.isDark ? -toneDeltaPair.delta : toneDeltaPair.delta;
|
|
1133
|
-
const amRoleA = this.name === roleA.name;
|
|
1134
|
-
const selfRole = amRoleA ? roleA : roleB;
|
|
1135
|
-
const refRole = amRoleA ? roleB : roleA;
|
|
1136
|
-
let selfTone = selfRole.tone(scheme);
|
|
1137
|
-
const refTone = refRole.getTone(scheme);
|
|
1138
|
-
const relativeDelta = absoluteDelta * (amRoleA ? 1 : -1);
|
|
1139
|
-
if (constraint === "exact") {
|
|
1140
|
-
selfTone = materialColorUtilities.clampDouble(0, 100, refTone + relativeDelta);
|
|
1141
|
-
} else if (constraint === "nearer") {
|
|
1142
|
-
if (relativeDelta > 0) {
|
|
1143
|
-
selfTone = materialColorUtilities.clampDouble(
|
|
1144
|
-
0,
|
|
1145
|
-
100,
|
|
1146
|
-
materialColorUtilities.clampDouble(refTone, refTone + relativeDelta, selfTone)
|
|
1147
|
-
);
|
|
1148
|
-
} else {
|
|
1149
|
-
selfTone = materialColorUtilities.clampDouble(
|
|
1150
|
-
0,
|
|
1151
|
-
100,
|
|
1152
|
-
materialColorUtilities.clampDouble(refTone + relativeDelta, refTone, selfTone)
|
|
1153
|
-
);
|
|
1154
|
-
}
|
|
1155
|
-
} else if (constraint === "farther") {
|
|
1156
|
-
if (relativeDelta > 0) {
|
|
1157
|
-
selfTone = materialColorUtilities.clampDouble(refTone + relativeDelta, 100, selfTone);
|
|
1158
|
-
} else {
|
|
1159
|
-
selfTone = materialColorUtilities.clampDouble(0, refTone + relativeDelta, selfTone);
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
if (this.background && this.contrastCurve) {
|
|
1163
|
-
const background = this.background(scheme);
|
|
1164
|
-
const contrastCurve = this.contrastCurve(scheme);
|
|
1165
|
-
if (background && contrastCurve) {
|
|
1166
|
-
const bgTone = background.getTone(scheme);
|
|
1167
|
-
const selfContrast = contrastCurve.get(scheme.contrastLevel);
|
|
1168
|
-
selfTone = materialColorUtilities.Contrast.ratioOfTones(bgTone, selfTone) >= selfContrast && scheme.contrastLevel >= 0 ? selfTone : DynamicColor.foregroundTone(bgTone, selfContrast);
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
if (this.isBackground && !this.name.endsWith("_fixed_dim")) {
|
|
1172
|
-
if (selfTone >= 57) {
|
|
1173
|
-
selfTone = materialColorUtilities.clampDouble(65, 100, selfTone);
|
|
1174
|
-
} else {
|
|
1175
|
-
selfTone = materialColorUtilities.clampDouble(0, 49, selfTone);
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
return selfTone;
|
|
1098
|
+
const adjustTone = this.adjustTone ? this.adjustTone(scheme) : void 0;
|
|
1099
|
+
if (adjustTone) {
|
|
1100
|
+
return adjustTone({ scheme, dynamicColor: this });
|
|
1179
1101
|
} else {
|
|
1180
1102
|
let answer = this.tone(scheme);
|
|
1181
1103
|
if (this.background == void 0 || this.background(scheme) === void 0 || this.contrastCurve == void 0 || this.contrastCurve(scheme) === void 0) {
|
|
@@ -1275,7 +1197,66 @@ class ToneDeltaPair {
|
|
|
1275
1197
|
this.constraint = constraint;
|
|
1276
1198
|
this.constraint = constraint ?? "exact";
|
|
1277
1199
|
}
|
|
1200
|
+
adjustedTone({
|
|
1201
|
+
scheme,
|
|
1202
|
+
dynamicColor
|
|
1203
|
+
}) {
|
|
1204
|
+
const roleA = this.roleA;
|
|
1205
|
+
const roleB = this.roleB;
|
|
1206
|
+
const polarity = this.polarity;
|
|
1207
|
+
const constraint = this.constraint;
|
|
1208
|
+
const absoluteDelta = polarity === "darker" || polarity === "relative_lighter" && scheme.isDark || polarity === "relative_darker" && !scheme.isDark ? -this.delta : this.delta;
|
|
1209
|
+
const amRoleA = dynamicColor.name === roleA.name;
|
|
1210
|
+
const selfRole = amRoleA ? roleA : roleB;
|
|
1211
|
+
const refRole = amRoleA ? roleB : roleA;
|
|
1212
|
+
let selfTone = selfRole.tone(scheme);
|
|
1213
|
+
const refTone = refRole.getTone(scheme);
|
|
1214
|
+
const relativeDelta = absoluteDelta * (amRoleA ? 1 : -1);
|
|
1215
|
+
if (constraint === "exact") {
|
|
1216
|
+
selfTone = materialColorUtilities.clampDouble(0, 100, refTone + relativeDelta);
|
|
1217
|
+
} else if (constraint === "nearer") {
|
|
1218
|
+
if (relativeDelta > 0) {
|
|
1219
|
+
selfTone = materialColorUtilities.clampDouble(
|
|
1220
|
+
0,
|
|
1221
|
+
100,
|
|
1222
|
+
materialColorUtilities.clampDouble(refTone, refTone + relativeDelta, selfTone)
|
|
1223
|
+
);
|
|
1224
|
+
} else {
|
|
1225
|
+
selfTone = materialColorUtilities.clampDouble(
|
|
1226
|
+
0,
|
|
1227
|
+
100,
|
|
1228
|
+
materialColorUtilities.clampDouble(refTone + relativeDelta, refTone, selfTone)
|
|
1229
|
+
);
|
|
1230
|
+
}
|
|
1231
|
+
} else if (constraint === "farther") {
|
|
1232
|
+
if (relativeDelta > 0) {
|
|
1233
|
+
selfTone = materialColorUtilities.clampDouble(refTone + relativeDelta, 100, selfTone);
|
|
1234
|
+
} else {
|
|
1235
|
+
selfTone = materialColorUtilities.clampDouble(0, refTone + relativeDelta, selfTone);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
if (dynamicColor.background && dynamicColor.contrastCurve) {
|
|
1239
|
+
const background = dynamicColor.background(scheme);
|
|
1240
|
+
const contrastCurve = dynamicColor.contrastCurve(scheme);
|
|
1241
|
+
if (background && contrastCurve) {
|
|
1242
|
+
const bgTone = background.getTone(scheme);
|
|
1243
|
+
const selfContrast = contrastCurve.get(scheme.contrastLevel);
|
|
1244
|
+
selfTone = materialColorUtilities.Contrast.ratioOfTones(bgTone, selfTone) >= selfContrast && scheme.contrastLevel >= 0 ? selfTone : DynamicColor.foregroundTone(bgTone, selfContrast);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
if (dynamicColor.isBackground && !dynamicColor.name.endsWith("_fixed_dim")) {
|
|
1248
|
+
if (selfTone >= 57) {
|
|
1249
|
+
selfTone = materialColorUtilities.clampDouble(65, 100, selfTone);
|
|
1250
|
+
} else {
|
|
1251
|
+
selfTone = materialColorUtilities.clampDouble(0, 49, selfTone);
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
return selfTone;
|
|
1255
|
+
}
|
|
1278
1256
|
}
|
|
1257
|
+
const toneDeltaPair = (...params) => {
|
|
1258
|
+
return (args) => new ToneDeltaPair(...params).adjustedTone(args);
|
|
1259
|
+
};
|
|
1279
1260
|
function argbToRgb(argb) {
|
|
1280
1261
|
return {
|
|
1281
1262
|
r: argb >> 16 & 255,
|
|
@@ -1454,7 +1435,7 @@ class ColorManager {
|
|
|
1454
1435
|
isBackground: true,
|
|
1455
1436
|
background: (s) => highestSurface(s, this),
|
|
1456
1437
|
contrastCurve: (s) => getCurve(4.5),
|
|
1457
|
-
|
|
1438
|
+
adjustTone: (s) => toneDeltaPair(
|
|
1458
1439
|
this.get(colorContainerKey).getMaterialColor(),
|
|
1459
1440
|
this.get(colorKey).getMaterialColor(),
|
|
1460
1441
|
5,
|
|
@@ -1475,7 +1456,7 @@ class ColorManager {
|
|
|
1475
1456
|
isBackground: true,
|
|
1476
1457
|
background: (s) => this.get("surfaceContainerHigh").getMaterialColor(),
|
|
1477
1458
|
contrastCurve: (s) => getCurve(4.5),
|
|
1478
|
-
|
|
1459
|
+
adjustTone: (s) => toneDeltaPair(
|
|
1479
1460
|
this.get(colorDimKey).getMaterialColor(),
|
|
1480
1461
|
this.get(colorKey).getMaterialColor(),
|
|
1481
1462
|
5,
|
|
@@ -1502,7 +1483,7 @@ class ColorManager {
|
|
|
1502
1483
|
},
|
|
1503
1484
|
isBackground: true,
|
|
1504
1485
|
background: (s) => highestSurface(s, this),
|
|
1505
|
-
|
|
1486
|
+
adjustTone: (s) => void 0,
|
|
1506
1487
|
contrastCurve: (s) => s.contrastLevel > 0 ? getCurve(1.5) : void 0
|
|
1507
1488
|
});
|
|
1508
1489
|
this.createOrUpdate(onColorContainerKey, {
|
|
@@ -1524,7 +1505,7 @@ class ColorManager {
|
|
|
1524
1505
|
palette: (s) => s.getPalette(colorKey),
|
|
1525
1506
|
tone: (s) => this.get(colorFixedKey).getMaterialColor().getTone(s),
|
|
1526
1507
|
isBackground: true,
|
|
1527
|
-
|
|
1508
|
+
adjustTone: (s) => toneDeltaPair(
|
|
1528
1509
|
this.get(colorFixedDimKey).getMaterialColor(),
|
|
1529
1510
|
this.get(colorFixedKey).getMaterialColor(),
|
|
1530
1511
|
5,
|
|
@@ -1714,6 +1695,9 @@ class ThemeApi {
|
|
|
1714
1695
|
// Object.assign(this.themeOptions, options);
|
|
1715
1696
|
// return this.theme();
|
|
1716
1697
|
// }
|
|
1698
|
+
get sourceColorHex() {
|
|
1699
|
+
return this.schemeManager.get().sourceColorHct;
|
|
1700
|
+
}
|
|
1717
1701
|
create(options) {
|
|
1718
1702
|
this.schemeManager.createOrUpdate({
|
|
1719
1703
|
...options,
|
|
@@ -1791,6 +1775,9 @@ const tonalSpotVariant = {
|
|
|
1791
1775
|
},
|
|
1792
1776
|
customPalettes: ({ colorHct }) => materialColorUtilities.TonalPalette.fromHueAndChroma(colorHct.hue, 16)
|
|
1793
1777
|
};
|
|
1778
|
+
const inverseTone = (tone) => {
|
|
1779
|
+
return 100 - tone;
|
|
1780
|
+
};
|
|
1794
1781
|
const defaultColors = (colorService) => {
|
|
1795
1782
|
const getColor = (key) => {
|
|
1796
1783
|
return colorService.getColor(key).getMaterialColor();
|
|
@@ -1805,6 +1792,9 @@ const defaultColors = (colorService) => {
|
|
|
1805
1792
|
if (s.isDark) {
|
|
1806
1793
|
return 4;
|
|
1807
1794
|
} else {
|
|
1795
|
+
if (s.variant == "fidelity") {
|
|
1796
|
+
return 100;
|
|
1797
|
+
}
|
|
1808
1798
|
if (Hct.isYellow(s.getPalette("neutral").hue)) {
|
|
1809
1799
|
return 99;
|
|
1810
1800
|
} else if (s.variant === "vibrant") {
|
|
@@ -2100,6 +2090,8 @@ const defaultColors = (colorService) => {
|
|
|
2100
2090
|
0,
|
|
2101
2091
|
Hct.isYellow(s.getPalette("primary").hue) ? 25 : Hct.isCyan(s.getPalette("primary").hue) ? 88 : 98
|
|
2102
2092
|
);
|
|
2093
|
+
} else if (s.variant == "fidelity") {
|
|
2094
|
+
return s.sourceColorHct.tone;
|
|
2103
2095
|
} else {
|
|
2104
2096
|
return tMaxC(
|
|
2105
2097
|
s.getPalette("primary"),
|
|
@@ -2111,7 +2103,18 @@ const defaultColors = (colorService) => {
|
|
|
2111
2103
|
isBackground: true,
|
|
2112
2104
|
background: (s) => highestSurface(s, colorService),
|
|
2113
2105
|
contrastCurve: (s) => getCurve(4.5),
|
|
2114
|
-
|
|
2106
|
+
adjustTone: (s) => s.variant == "fidelity" ? () => {
|
|
2107
|
+
const surfaceTone = colorService.getColor("surface").getMaterialColor().tone(s);
|
|
2108
|
+
const primaryTone = colorService.getColor("primary").getMaterialColor().tone(s);
|
|
2109
|
+
let selfTone = primaryTone;
|
|
2110
|
+
if (materialColorUtilities.Contrast.ratioOfTones(surfaceTone, selfTone) < 3) {
|
|
2111
|
+
const result = inverseTone(primaryTone);
|
|
2112
|
+
if (materialColorUtilities.Contrast.ratioOfTones(surfaceTone, result) >= 3) {
|
|
2113
|
+
selfTone = result;
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
return selfTone;
|
|
2117
|
+
} : toneDeltaPair(
|
|
2115
2118
|
colorService.getColor("primaryContainer").getMaterialColor(),
|
|
2116
2119
|
colorService.getColor("primary").getMaterialColor(),
|
|
2117
2120
|
5,
|
|
@@ -2134,7 +2137,7 @@ const defaultColors = (colorService) => {
|
|
|
2134
2137
|
isBackground: true,
|
|
2135
2138
|
background: (s) => getColor("surfaceContainerHigh"),
|
|
2136
2139
|
contrastCurve: (s) => getCurve(4.5),
|
|
2137
|
-
|
|
2140
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2138
2141
|
colorService.getColor("primaryDim").getMaterialColor(),
|
|
2139
2142
|
colorService.getColor("primary").getMaterialColor(),
|
|
2140
2143
|
5,
|
|
@@ -2161,6 +2164,13 @@ const defaultColors = (colorService) => {
|
|
|
2161
2164
|
78,
|
|
2162
2165
|
Hct.isCyan(s.getPalette("primary").hue) ? 88 : 90
|
|
2163
2166
|
);
|
|
2167
|
+
}
|
|
2168
|
+
if (s.variant == "fidelity") {
|
|
2169
|
+
return s.isDark ? tMaxC(s.getPalette("primary"), 30, 93) : tMaxC(
|
|
2170
|
+
s.getPalette("primary"),
|
|
2171
|
+
78,
|
|
2172
|
+
Hct.isCyan(s.getPalette("primary").hue) ? 88 : 90
|
|
2173
|
+
);
|
|
2164
2174
|
} else {
|
|
2165
2175
|
return s.isDark ? tMinC(s.getPalette("primary"), 66, 93) : tMaxC(
|
|
2166
2176
|
s.getPalette("primary"),
|
|
@@ -2171,7 +2181,14 @@ const defaultColors = (colorService) => {
|
|
|
2171
2181
|
},
|
|
2172
2182
|
isBackground: true,
|
|
2173
2183
|
background: (s) => highestSurface(s, colorService),
|
|
2174
|
-
|
|
2184
|
+
adjustTone: (s) => s.variant == "fidelity" ? toneDeltaPair(
|
|
2185
|
+
colorService.getColor("primary").getMaterialColor(),
|
|
2186
|
+
colorService.getColor("primaryContainer").getMaterialColor(),
|
|
2187
|
+
15,
|
|
2188
|
+
"relative_darker",
|
|
2189
|
+
true,
|
|
2190
|
+
"farther"
|
|
2191
|
+
) : void 0,
|
|
2175
2192
|
contrastCurve: (s) => s.contrastLevel > 0 ? getCurve(1.5) : void 0
|
|
2176
2193
|
},
|
|
2177
2194
|
onPrimaryContainer: {
|
|
@@ -2197,7 +2214,7 @@ const defaultColors = (colorService) => {
|
|
|
2197
2214
|
palette: (s) => s.getPalette("primary"),
|
|
2198
2215
|
tone: (s) => colorService.getColor("primaryFixed").getMaterialColor().getTone(s),
|
|
2199
2216
|
isBackground: true,
|
|
2200
|
-
|
|
2217
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2201
2218
|
getColor("primaryFixedDim"),
|
|
2202
2219
|
getColor("primaryFixed"),
|
|
2203
2220
|
5,
|
|
@@ -2239,7 +2256,7 @@ const defaultColors = (colorService) => {
|
|
|
2239
2256
|
isBackground: true,
|
|
2240
2257
|
background: (s) => highestSurface(s, colorService),
|
|
2241
2258
|
contrastCurve: (s) => getCurve(4.5),
|
|
2242
|
-
|
|
2259
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2243
2260
|
getColor("secondaryContainer"),
|
|
2244
2261
|
getColor("secondary"),
|
|
2245
2262
|
5,
|
|
@@ -2260,7 +2277,7 @@ const defaultColors = (colorService) => {
|
|
|
2260
2277
|
isBackground: true,
|
|
2261
2278
|
background: (s) => getColor("surfaceContainerHigh"),
|
|
2262
2279
|
contrastCurve: (s) => getCurve(4.5),
|
|
2263
|
-
|
|
2280
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2264
2281
|
getColor("secondaryDim"),
|
|
2265
2282
|
getColor("secondary"),
|
|
2266
2283
|
5,
|
|
@@ -2287,7 +2304,7 @@ const defaultColors = (colorService) => {
|
|
|
2287
2304
|
},
|
|
2288
2305
|
isBackground: true,
|
|
2289
2306
|
background: (s) => highestSurface(s, colorService),
|
|
2290
|
-
|
|
2307
|
+
adjustTone: (s) => void 0,
|
|
2291
2308
|
contrastCurve: (s) => s.contrastLevel > 0 ? getCurve(1.5) : void 0
|
|
2292
2309
|
},
|
|
2293
2310
|
onSecondaryContainer: {
|
|
@@ -2313,7 +2330,7 @@ const defaultColors = (colorService) => {
|
|
|
2313
2330
|
palette: (s) => s.getPalette("secondary"),
|
|
2314
2331
|
tone: (s) => getColor("secondaryFixed").getTone(s),
|
|
2315
2332
|
isBackground: true,
|
|
2316
|
-
|
|
2333
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2317
2334
|
getColor("secondaryFixedDim"),
|
|
2318
2335
|
getColor("secondaryFixed"),
|
|
2319
2336
|
5,
|
|
@@ -2351,7 +2368,7 @@ const defaultColors = (colorService) => {
|
|
|
2351
2368
|
isBackground: true,
|
|
2352
2369
|
background: (s) => highestSurface(s, colorService),
|
|
2353
2370
|
contrastCurve: (s) => getCurve(4.5),
|
|
2354
|
-
|
|
2371
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2355
2372
|
getColor("tertiaryContainer"),
|
|
2356
2373
|
getColor("tertiary"),
|
|
2357
2374
|
5,
|
|
@@ -2372,7 +2389,7 @@ const defaultColors = (colorService) => {
|
|
|
2372
2389
|
isBackground: true,
|
|
2373
2390
|
background: (s) => getColor("surfaceContainerHigh"),
|
|
2374
2391
|
contrastCurve: (s) => getCurve(4.5),
|
|
2375
|
-
|
|
2392
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2376
2393
|
getColor("tertiaryDim"),
|
|
2377
2394
|
getColor("tertiary"),
|
|
2378
2395
|
5,
|
|
@@ -2405,7 +2422,7 @@ const defaultColors = (colorService) => {
|
|
|
2405
2422
|
},
|
|
2406
2423
|
isBackground: true,
|
|
2407
2424
|
background: (s) => highestSurface(s, colorService),
|
|
2408
|
-
|
|
2425
|
+
adjustTone: (s) => void 0,
|
|
2409
2426
|
contrastCurve: (s) => s.contrastLevel > 0 ? getCurve(1.5) : void 0
|
|
2410
2427
|
},
|
|
2411
2428
|
onTertiaryContainer: {
|
|
@@ -2431,7 +2448,7 @@ const defaultColors = (colorService) => {
|
|
|
2431
2448
|
palette: (s) => s.getPalette("tertiary"),
|
|
2432
2449
|
tone: (s) => getColor("tertiaryFixed").getTone(s),
|
|
2433
2450
|
isBackground: true,
|
|
2434
|
-
|
|
2451
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2435
2452
|
getColor("tertiaryFixedDim"),
|
|
2436
2453
|
getColor("tertiaryFixed"),
|
|
2437
2454
|
5,
|
|
@@ -2461,7 +2478,7 @@ const defaultColors = (colorService) => {
|
|
|
2461
2478
|
isBackground: true,
|
|
2462
2479
|
background: (s) => highestSurface(s, colorService),
|
|
2463
2480
|
contrastCurve: (s) => getCurve(4.5),
|
|
2464
|
-
|
|
2481
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2465
2482
|
colorService.getColor("errorContainer").getMaterialColor(),
|
|
2466
2483
|
colorService.getColor("error").getMaterialColor(),
|
|
2467
2484
|
5,
|
|
@@ -2476,7 +2493,7 @@ const defaultColors = (colorService) => {
|
|
|
2476
2493
|
isBackground: true,
|
|
2477
2494
|
background: (s) => getColor("surfaceContainerHigh"),
|
|
2478
2495
|
contrastCurve: (s) => getCurve(4.5),
|
|
2479
|
-
|
|
2496
|
+
adjustTone: (s) => toneDeltaPair(
|
|
2480
2497
|
getColor("errorDim"),
|
|
2481
2498
|
getColor("error"),
|
|
2482
2499
|
5,
|
|
@@ -2497,7 +2514,7 @@ const defaultColors = (colorService) => {
|
|
|
2497
2514
|
},
|
|
2498
2515
|
isBackground: true,
|
|
2499
2516
|
background: (s) => highestSurface(s, colorService),
|
|
2500
|
-
|
|
2517
|
+
adjustTone: (s) => void 0,
|
|
2501
2518
|
contrastCurve: (s) => s.contrastLevel > 0 ? getCurve(1.5) : void 0
|
|
2502
2519
|
},
|
|
2503
2520
|
onErrorContainer: {
|
|
@@ -2647,11 +2664,8 @@ const loader = async (config) => {
|
|
|
2647
2664
|
api.plugins.initPlugins(api);
|
|
2648
2665
|
}
|
|
2649
2666
|
};
|
|
2650
|
-
const load = async () => {
|
|
2651
|
-
await api.plugins.loadPlugins();
|
|
2652
|
-
};
|
|
2653
2667
|
init();
|
|
2654
|
-
await load();
|
|
2668
|
+
await api.load();
|
|
2655
2669
|
return api;
|
|
2656
2670
|
};
|
|
2657
2671
|
exports.API = API;
|
|
@@ -2670,15 +2684,14 @@ exports.Scheme = Scheme;
|
|
|
2670
2684
|
exports.SchemeManager = SchemeManager;
|
|
2671
2685
|
exports.ThemeApi = ThemeApi;
|
|
2672
2686
|
exports.ThemeModule = ThemeModule;
|
|
2673
|
-
exports.ToneDeltaPair = ToneDeltaPair;
|
|
2674
2687
|
exports.Variant = Variant;
|
|
2675
2688
|
exports.VariantManager = VariantManager;
|
|
2676
2689
|
exports.bootstrap = bootstrap;
|
|
2677
2690
|
exports.defaultColors = defaultColors;
|
|
2678
|
-
exports.extendSpecVersion = extendSpecVersion;
|
|
2679
2691
|
exports.getPiecewiseHue = getPiecewiseHue;
|
|
2680
2692
|
exports.getRotatedHue = getRotatedHue;
|
|
2681
2693
|
exports.highestSurface = highestSurface;
|
|
2682
2694
|
exports.loader = loader;
|
|
2683
2695
|
exports.registerModule = registerModule;
|
|
2684
2696
|
exports.tonalSpotVariant = tonalSpotVariant;
|
|
2697
|
+
exports.toneDeltaPair = toneDeltaPair;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TonalPalette } from '@material/material-color-utilities';
|
|
2
2
|
import { ContrastCurve } from './contrastCurve';
|
|
3
|
-
import { ToneDeltaPair } from './toneDeltaPair';
|
|
4
3
|
import { Scheme } from '../theme/scheme';
|
|
5
4
|
import { Hct } from './htc';
|
|
6
5
|
/**
|
|
@@ -24,7 +23,7 @@ import { Hct } from './htc';
|
|
|
24
23
|
* against its background should behave in various contrast levels options.
|
|
25
24
|
* Must used together with `background`. When not provided or resolved as
|
|
26
25
|
* undefined, the contrast curve is calculated based on other constraints.
|
|
27
|
-
* @param
|
|
26
|
+
* @param adjustTone A `AdjustTone` object specifying a tone delta
|
|
28
27
|
* constraint between two colors. One of them must be the color being
|
|
29
28
|
* constructed. When not provided or resolved as undefined, the tone is
|
|
30
29
|
* calculated based on other constraints.
|
|
@@ -38,17 +37,12 @@ export interface FromPaletteOptions {
|
|
|
38
37
|
background?: (scheme: Scheme) => DynamicColor | undefined;
|
|
39
38
|
secondBackground?: (scheme: Scheme) => DynamicColor | undefined;
|
|
40
39
|
contrastCurve?: (scheme: Scheme) => ContrastCurve | undefined;
|
|
41
|
-
|
|
40
|
+
adjustTone?: (scheme: Scheme) => AdjustTone | undefined;
|
|
42
41
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* @param originlColor The original color.
|
|
48
|
-
* @param specVersion The spec version to extend.
|
|
49
|
-
* @param extendedColor The color with the values to extend.
|
|
50
|
-
*/
|
|
51
|
-
export declare function extendSpecVersion(originlColor: DynamicColor, extendedColor: DynamicColor): DynamicColor;
|
|
42
|
+
export type AdjustTone = (args: {
|
|
43
|
+
scheme: Scheme;
|
|
44
|
+
dynamicColor: DynamicColor;
|
|
45
|
+
}) => number;
|
|
52
46
|
/**
|
|
53
47
|
* A color that adjusts itself based on UI state provided by DynamicScheme.
|
|
54
48
|
*
|
|
@@ -69,7 +63,7 @@ export declare class DynamicColor {
|
|
|
69
63
|
readonly background?: ((scheme: Scheme) => DynamicColor | undefined) | undefined;
|
|
70
64
|
readonly secondBackground?: ((scheme: Scheme) => DynamicColor | undefined) | undefined;
|
|
71
65
|
readonly contrastCurve?: ((scheme: Scheme) => ContrastCurve | undefined) | undefined;
|
|
72
|
-
readonly
|
|
66
|
+
readonly adjustTone?: ((scheme: Scheme) => AdjustTone | undefined) | undefined;
|
|
73
67
|
private readonly hctCache;
|
|
74
68
|
/**
|
|
75
69
|
* The base constructor for DynamicColor.
|
|
@@ -100,11 +94,11 @@ export declare class DynamicColor {
|
|
|
100
94
|
* @param contrastCurve A `ContrastCurve` object specifying how its contrast
|
|
101
95
|
* against its background should behave in various contrast levels
|
|
102
96
|
* options.
|
|
103
|
-
* @param
|
|
97
|
+
* @param adjustTone A `AdjustTone` object specifying a tone delta
|
|
104
98
|
* constraint between two colors. One of them must be the color being
|
|
105
99
|
* constructed.
|
|
106
100
|
*/
|
|
107
|
-
constructor(name: string, palette: (scheme: Scheme) => TonalPalette, tone: (scheme: Scheme) => number, isBackground: boolean, chromaMultiplier?: ((scheme: Scheme) => number) | undefined, background?: ((scheme: Scheme) => DynamicColor | undefined) | undefined, secondBackground?: ((scheme: Scheme) => DynamicColor | undefined) | undefined, contrastCurve?: ((scheme: Scheme) => ContrastCurve | undefined) | undefined,
|
|
101
|
+
constructor(name: string, palette: (scheme: Scheme) => TonalPalette, tone: (scheme: Scheme) => number, isBackground: boolean, chromaMultiplier?: ((scheme: Scheme) => number) | undefined, background?: ((scheme: Scheme) => DynamicColor | undefined) | undefined, secondBackground?: ((scheme: Scheme) => DynamicColor | undefined) | undefined, contrastCurve?: ((scheme: Scheme) => ContrastCurve | undefined) | undefined, adjustTone?: ((scheme: Scheme) => AdjustTone | undefined) | undefined);
|
|
108
102
|
/**
|
|
109
103
|
* Create a DynamicColor defined by a TonalPalette and HCT tone.
|
|
110
104
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic_color.d.ts","sourceRoot":"","sources":["../../src/material-color-utilities/dynamic_color.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"dynamic_color.d.ts","sourceRoot":"","sources":["../../src/material-color-utilities/dynamic_color.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAGL,YAAY,EACb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,CAAC;IAC1C,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAC;IAC1D,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAC;IAChE,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC;IAC9D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;CACzD;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,YAAY,CAAC;CAC5B,KAAK,MAAM,CAAC;AAEb;;;;;;;;;;GAUG;AACH,qBAAa,YAAY;IAqCrB,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY;IAClD,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM;IACzC,QAAQ,CAAC,YAAY,EAAE,OAAO;IAC9B,QAAQ,CAAC,gBAAgB,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM;IACtD,QAAQ,CAAC,UAAU,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS;IAClE,QAAQ,CAAC,gBAAgB,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS;IACxE,QAAQ,CAAC,aAAa,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS;IACtE,QAAQ,CAAC,UAAU,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS;IA5ClE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;gBAEQ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,EACzC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,EAChC,YAAY,EAAE,OAAO,EACrB,gBAAgB,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,aAAA,EAC7C,UAAU,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,aAAA,EACzD,gBAAgB,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,aAAA,EAC/D,aAAa,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,aAAA,EAC7D,UAAU,CAAC,GAAE,CAAC,MAAM,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,aAAA;IAsBlE;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,YAAY;IAc1D,MAAM,CAAC,4BAA4B,CACjC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,GACxD,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM;IAO7B;;;;;;;;OAQG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAiC5D;;;;;;;;;;OAUG;IACH,MAAM,CAAC,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIxD;;;OAGG;IACH,MAAM,CAAC,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIvD;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAUlD;;OAEG;IACH,KAAK,IAAI,YAAY;IAcrB;;;OAGG;IACH,UAAU;IAIV;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI/B;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;IAW3B;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CA6FhC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DynamicColor } from './dynamic_color';
|
|
1
|
+
import { AdjustTone, DynamicColor } from './dynamic_color';
|
|
2
|
+
import { Scheme } from '../theme';
|
|
2
3
|
/**
|
|
3
4
|
* Describes the different in tone between colors.
|
|
4
5
|
*
|
|
@@ -17,7 +18,7 @@ export type DeltaConstraint = 'exact' | 'nearer' | 'farther';
|
|
|
17
18
|
* designers want tonal distance, literally contrast, between two colors that
|
|
18
19
|
* don't have a background / foreground relationship or a contrast guarantee.
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
+
declare class ToneDeltaPair {
|
|
21
22
|
readonly roleA: DynamicColor;
|
|
22
23
|
readonly roleB: DynamicColor;
|
|
23
24
|
readonly delta: number;
|
|
@@ -50,5 +51,11 @@ export declare class ToneDeltaPair {
|
|
|
50
51
|
* one role has two backgrounds.
|
|
51
52
|
*/
|
|
52
53
|
constructor(roleA: DynamicColor, roleB: DynamicColor, delta: number, polarity: TonePolarity, stayTogether: boolean, constraint?: DeltaConstraint | undefined);
|
|
54
|
+
adjustedTone({ scheme, dynamicColor, }: {
|
|
55
|
+
scheme: Scheme;
|
|
56
|
+
dynamicColor: DynamicColor;
|
|
57
|
+
}): number;
|
|
53
58
|
}
|
|
59
|
+
export declare const toneDeltaPair: (...params: ConstructorParameters<typeof ToneDeltaPair>) => AdjustTone;
|
|
60
|
+
export {};
|
|
54
61
|
//# sourceMappingURL=toneDeltaPair.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toneDeltaPair.d.ts","sourceRoot":"","sources":["../../src/material-color-utilities/toneDeltaPair.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"toneDeltaPair.d.ts","sourceRoot":"","sources":["../../src/material-color-utilities/toneDeltaPair.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,SAAS,GACT,iBAAiB,GACjB,kBAAkB,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE7D;;;;;;;GAOG;AACH,cAAM,aAAa;IA2Bf,QAAQ,CAAC,KAAK,EAAE,YAAY;IAC5B,QAAQ,CAAC,KAAK,EAAE,YAAY;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,QAAQ,EAAE,YAAY;IAC/B,QAAQ,CAAC,YAAY,EAAE,OAAO;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,eAAe;IA/BvC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;gBAEQ,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,YAAY,EACtB,YAAY,EAAE,OAAO,EACrB,UAAU,CAAC,EAAE,eAAe,YAAA;IAKvC,YAAY,CAAC,EACX,MAAM,EACN,YAAY,GACb,EAAE;QACD,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,YAAY,CAAC;KAC5B;CA0EF;AAED,eAAO,MAAM,aAAa,GACxB,GAAG,QAAQ,qBAAqB,CAAC,OAAO,aAAa,CAAC,KACrD,UAEF,CAAC"}
|
package/dist/node.cjs
CHANGED
|
@@ -22,9 +22,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
25
|
-
const loader = require("./loader-
|
|
26
|
-
const defineConfig = require("./define-config-
|
|
27
|
-
const loadFromPath = require("./load-from-path-
|
|
25
|
+
const loader = require("./loader-R7hccp8_.cjs");
|
|
26
|
+
const defineConfig = require("./define-config-CKSsLMnc.cjs");
|
|
27
|
+
const loadFromPath = require("./load-from-path-DoZnR1-p.cjs");
|
|
28
28
|
let unpluginInstance = null;
|
|
29
29
|
const createUnpluginTheme = async () => {
|
|
30
30
|
if (unpluginInstance) {
|
|
@@ -162,18 +162,17 @@ exports.Scheme = loader.Scheme;
|
|
|
162
162
|
exports.SchemeManager = loader.SchemeManager;
|
|
163
163
|
exports.ThemeApi = loader.ThemeApi;
|
|
164
164
|
exports.ThemeModule = loader.ThemeModule;
|
|
165
|
-
exports.ToneDeltaPair = loader.ToneDeltaPair;
|
|
166
165
|
exports.Variant = loader.Variant;
|
|
167
166
|
exports.VariantManager = loader.VariantManager;
|
|
168
167
|
exports.bootstrap = loader.bootstrap;
|
|
169
168
|
exports.defaultColors = loader.defaultColors;
|
|
170
|
-
exports.extendSpecVersion = loader.extendSpecVersion;
|
|
171
169
|
exports.getPiecewiseHue = loader.getPiecewiseHue;
|
|
172
170
|
exports.getRotatedHue = loader.getRotatedHue;
|
|
173
171
|
exports.highestSurface = loader.highestSurface;
|
|
174
172
|
exports.loader = loader.loader;
|
|
175
173
|
exports.registerModule = loader.registerModule;
|
|
176
174
|
exports.tonalSpotVariant = loader.tonalSpotVariant;
|
|
175
|
+
exports.toneDeltaPair = loader.toneDeltaPair;
|
|
177
176
|
exports.FontFamily = defineConfig.FontFamily;
|
|
178
177
|
exports.FontPlugin = defineConfig.FontPlugin;
|
|
179
178
|
exports.PluginAbstract = defineConfig.PluginAbstract;
|
package/dist/node.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b, A, a, C, c, d, e, i, D,
|
|
2
|
-
import { F, b as b2, P as P2, a as a2, V as V2, d as d2, e as e2, n as n2, v } from "./define-config-
|
|
3
|
-
import { l as loadFromPath } from "./load-from-path-
|
|
4
|
-
import { r as r2 } from "./load-from-path-
|
|
1
|
+
import { b, A, a, C, c, d, e, i, D, j, P, m, S, n, T, V, q, g, f, o, p, h, l, r, k, t } from "./loader-C8_TyOuS.js";
|
|
2
|
+
import { F, b as b2, P as P2, a as a2, V as V2, d as d2, e as e2, n as n2, v } from "./define-config-BasMdCqD.js";
|
|
3
|
+
import { l as loadFromPath } from "./load-from-path-Bo1kCfh9.js";
|
|
4
|
+
import { r as r2 } from "./load-from-path-Bo1kCfh9.js";
|
|
5
5
|
let unpluginInstance = null;
|
|
6
6
|
const createUnpluginTheme = async () => {
|
|
7
7
|
if (unpluginInstance) {
|
|
@@ -137,25 +137,23 @@ export {
|
|
|
137
137
|
F as FontFamily,
|
|
138
138
|
b2 as FontPlugin,
|
|
139
139
|
P2 as PluginAbstract,
|
|
140
|
-
|
|
140
|
+
j as PluginApi,
|
|
141
141
|
a2 as PluginImplAbstract,
|
|
142
142
|
P as PluginModule,
|
|
143
|
-
|
|
143
|
+
m as Scheme,
|
|
144
144
|
S as SchemeManager,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
T as ToneDeltaPair,
|
|
145
|
+
n as ThemeApi,
|
|
146
|
+
T as ThemeModule,
|
|
148
147
|
V as Variant,
|
|
149
|
-
|
|
148
|
+
q as VariantManager,
|
|
150
149
|
V2 as Variants,
|
|
151
150
|
g as bootstrap,
|
|
152
151
|
f as defaultColors,
|
|
153
152
|
d2 as defineConfig,
|
|
154
153
|
esbuildPlugin,
|
|
155
154
|
e2 as expressiveVariant,
|
|
156
|
-
|
|
157
|
-
p as
|
|
158
|
-
q as getRotatedHue,
|
|
155
|
+
o as getPiecewiseHue,
|
|
156
|
+
p as getRotatedHue,
|
|
159
157
|
h as highestSurface,
|
|
160
158
|
loadFromPath,
|
|
161
159
|
l as loader,
|
|
@@ -163,7 +161,8 @@ export {
|
|
|
163
161
|
r as registerModule,
|
|
164
162
|
r2 as resolveConfig,
|
|
165
163
|
rollupPlugin,
|
|
166
|
-
|
|
164
|
+
k as tonalSpotVariant,
|
|
165
|
+
t as toneDeltaPair,
|
|
167
166
|
unpluginUdixioTheme,
|
|
168
167
|
v as vibrantVariant,
|
|
169
168
|
vitePlugin,
|