@multiplatform.one/theme 8.3.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/audit/constraintAudit.native.js.map +1 -1
- package/dist/cjs/audit/designTokens.native.js.map +1 -1
- package/dist/cjs/audit/diffReport.native.js.map +1 -1
- package/dist/cjs/audit/index.native.js.map +1 -1
- package/dist/cjs/audit/themeMatrix.native.js.map +1 -1
- package/dist/cjs/dates.native.js.map +1 -1
- package/dist/cjs/devWarn.native.js.map +1 -1
- package/dist/cjs/expo.native.js.map +1 -1
- package/dist/cjs/figma/figmaTokens.native.js.map +1 -1
- package/dist/cjs/font.native.js.map +1 -1
- package/dist/cjs/fonts/createFontLoader.native.js.map +1 -1
- package/dist/cjs/fonts/index.native.js.map +1 -1
- package/dist/cjs/fonts/interFaces.native.js.map +1 -1
- package/dist/cjs/fonts/types.native.js.map +1 -1
- package/dist/cjs/index.gnome.cjs +4 -1
- package/dist/cjs/index.gnome.native.js +3 -0
- package/dist/cjs/index.gnome.native.js.map +1 -1
- package/dist/cjs/index.native.js +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/keyboardFocusRing.native.js.map +1 -1
- package/dist/cjs/menuRow.cjs +1 -1
- package/dist/cjs/menuRow.native.js +1 -1
- package/dist/cjs/menuRow.native.js.map +1 -1
- package/dist/cjs/nativeTwins.native.js.map +1 -1
- package/dist/cjs/numbers.native.js.map +1 -1
- package/dist/cjs/theme/Heading.native.js.map +1 -1
- package/dist/cjs/theme/IconSlot.native.js.map +1 -1
- package/dist/cjs/theme/Intent.native.js.map +1 -1
- package/dist/cjs/theme/Preset.native.js.map +1 -1
- package/dist/cjs/theme/PresetContext.native.js.map +1 -1
- package/dist/cjs/theme/Surface.native.js.map +1 -1
- package/dist/cjs/theme/Text.native.js.map +1 -1
- package/dist/cjs/theme/Tint.native.js.map +1 -1
- package/dist/cjs/theme/accentInk.cjs +6 -2
- package/dist/cjs/theme/accentInk.native.js +6 -2
- package/dist/cjs/theme/accentInk.native.js.map +1 -1
- package/dist/cjs/theme/activateThemeConfig.native.js.map +1 -1
- package/dist/cjs/theme/animations/css.native.js.map +1 -1
- package/dist/cjs/theme/animations/index.native.js.map +1 -1
- package/dist/cjs/theme/animations/reactNative.native.js.map +1 -1
- package/dist/cjs/theme/chartPalette.cjs +3 -3
- package/dist/cjs/theme/chartPalette.native.js +5 -4
- package/dist/cjs/theme/chartPalette.native.js.map +1 -1
- package/dist/cjs/theme/colorRules.cjs +5 -0
- package/dist/cjs/theme/colorRules.native.js +6 -0
- package/dist/cjs/theme/colorRules.native.js.map +1 -1
- package/dist/cjs/theme/controlTiers.cjs +9 -5
- package/dist/cjs/theme/controlTiers.native.js +10 -5
- package/dist/cjs/theme/controlTiers.native.js.map +1 -1
- package/dist/cjs/theme/cookies.native.js.map +1 -1
- package/dist/cjs/theme/createDefaultThemeConfig.native.js.map +1 -1
- package/dist/cjs/theme/createThemes.cjs +212 -8
- package/dist/cjs/theme/createThemes.native.js +397 -12
- package/dist/cjs/theme/createThemes.native.js.map +1 -1
- package/dist/cjs/theme/dedupeInherited.native.js.map +1 -1
- package/dist/cjs/theme/defaults/accent.native.js.map +1 -1
- package/dist/cjs/theme/defaults/base.native.js.map +1 -1
- package/dist/cjs/theme/defaults/builderOptions.cjs +9 -4
- package/dist/cjs/theme/defaults/builderOptions.native.js +9 -4
- package/dist/cjs/theme/defaults/builderOptions.native.js.map +1 -1
- package/dist/cjs/theme/defaults/categoryFonts.native.js.map +1 -1
- package/dist/cjs/theme/defaults/fonts.native.js.map +1 -1
- package/dist/cjs/theme/defaults/house.native.js.map +1 -1
- package/dist/cjs/theme/defaults/index.native.js.map +1 -1
- package/dist/cjs/theme/devtools/ColorLineVisualizer.native.js.map +1 -1
- package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.native.js.map +1 -1
- package/dist/cjs/theme/devtools/animationOptions.native.js.map +1 -1
- package/dist/cjs/theme/devtools/buildSnapshot.native.js.map +1 -1
- package/dist/cjs/theme/devtools/index.native.js.map +1 -1
- package/dist/cjs/theme/devtools/knobIcons.native.js.map +1 -1
- package/dist/cjs/theme/devtools/vizConstants.native.js.map +1 -1
- package/dist/cjs/theme/dynamicType.native.js.map +1 -1
- package/dist/cjs/theme/fieldFocus.native.js.map +1 -1
- package/dist/cjs/theme/fillContrast.cjs +4 -1
- package/dist/cjs/theme/fillContrast.native.js +4 -1
- package/dist/cjs/theme/fillContrast.native.js.map +1 -1
- package/dist/cjs/theme/focusState.native.js.map +1 -1
- package/dist/cjs/theme/fontCategoryMetrics.native.js.map +1 -1
- package/dist/cjs/theme/fontCategoryStacks.native.js.map +1 -1
- package/dist/cjs/theme/glyphPaint.native.js.map +1 -1
- package/dist/cjs/theme/glyphTint.native.js.map +1 -1
- package/dist/cjs/theme/groupGeometry.native.js.map +1 -1
- package/dist/cjs/theme/index.cjs +1 -0
- package/dist/cjs/theme/index.native.js +1 -0
- package/dist/cjs/theme/index.native.js.map +1 -1
- package/dist/cjs/theme/intents.native.js.map +1 -1
- package/dist/cjs/theme/knobs.native.js.map +1 -1
- package/dist/cjs/theme/layoutTokens.native.js.map +1 -1
- package/dist/cjs/theme/listRows.native.js.map +1 -1
- package/dist/cjs/theme/mergedTokens.native.js.map +1 -1
- package/dist/cjs/theme/motion.native.js.map +1 -1
- package/dist/cjs/theme/motionStops.native.js.map +1 -1
- package/dist/cjs/theme/motionTiming.native.js.map +1 -1
- package/dist/cjs/theme/nativeMonoFamily.native.js.map +1 -1
- package/dist/cjs/theme/nativePresetSwitch.native.js.map +1 -1
- package/dist/cjs/theme/nativeSchemePreference.native.js.map +1 -1
- package/dist/cjs/theme/nativeTheme.native.js.map +1 -1
- package/dist/cjs/theme/nativeTransitionProps.native.js.map +1 -1
- package/dist/cjs/theme/overlaySurfaces.native.js.map +1 -1
- package/dist/cjs/theme/pageGutter.native.js.map +1 -1
- package/dist/cjs/theme/preset.types.native.js.map +1 -1
- package/dist/cjs/theme/presetPreview.native.js.map +1 -1
- package/dist/cjs/theme/presetStore.native.js.map +1 -1
- package/dist/cjs/theme/presetUserSync.native.js.map +1 -1
- package/dist/cjs/theme/presets.native.js.map +1 -1
- package/dist/cjs/theme/radiusClass.native.js.map +1 -1
- package/dist/cjs/theme/radiusClassTable.generated.native.js.map +1 -1
- package/dist/cjs/theme/ramps.native.js.map +1 -1
- package/dist/cjs/theme/readableColor.cjs +20 -9
- package/dist/cjs/theme/readableColor.native.js +20 -9
- package/dist/cjs/theme/readableColor.native.js.map +1 -1
- package/dist/cjs/theme/recipeInputs.native.js.map +1 -1
- package/dist/cjs/theme/recipes.native.js.map +1 -1
- package/dist/cjs/theme/resolveKnobs.cjs +4 -1
- package/dist/cjs/theme/resolveKnobs.native.js +4 -1
- package/dist/cjs/theme/resolveKnobs.native.js.map +1 -1
- package/dist/cjs/theme/scale/activeScale.native.js.map +1 -1
- package/dist/cjs/theme/scale/deriveRecipeInputs.native.js.map +1 -1
- package/dist/cjs/theme/scale/generateScale.native.js.map +1 -1
- package/dist/cjs/theme/scale/index.native.js.map +1 -1
- package/dist/cjs/theme/scale/scaleAttribute.native.js.map +1 -1
- package/dist/cjs/theme/scale/scaleCss.native.js.map +1 -1
- package/dist/cjs/theme/scale/scaleFonts.native.js.map +1 -1
- package/dist/cjs/theme/scale/scaleInputs.native.js.map +1 -1
- package/dist/cjs/theme/scale/themeScales.native.js.map +1 -1
- package/dist/cjs/theme/scale/useActiveScale.native.js.map +1 -1
- package/dist/cjs/theme/schemeStore.native.js.map +1 -1
- package/dist/cjs/theme/shared.native.js.map +1 -1
- package/dist/cjs/theme/sizeRecipes.native.js.map +1 -1
- package/dist/cjs/theme/subsetThemes.native.js.map +1 -1
- package/dist/cjs/theme/themeValue.native.js.map +1 -1
- package/dist/cjs/theme/tileSizes.native.js.map +1 -1
- package/dist/cjs/theme/tintHues.native.js.map +1 -1
- package/dist/cjs/theme/tokenNumber.cjs +34 -0
- package/dist/cjs/theme/tokenNumber.native.js +39 -0
- package/dist/cjs/theme/tokenNumber.native.js.map +1 -0
- package/dist/cjs/theme/touchManipulation.native.js.map +1 -1
- package/dist/cjs/theme/useResolvedKnobs.native.js.map +1 -1
- package/dist/cjs/theme/useTouchSurface.native.js.map +1 -1
- package/dist/cjs/theme/v3TokenRoles.native.js.map +1 -1
- package/dist/esm/index.gnome.mjs +3 -2
- package/dist/esm/index.gnome.mjs.map +1 -1
- package/dist/esm/index.gnome.native.js +3 -2
- package/dist/esm/index.gnome.native.js.map +1 -1
- package/dist/esm/menuRow.mjs +1 -1
- package/dist/esm/menuRow.native.js +1 -1
- package/dist/esm/theme/accentInk.mjs +6 -3
- package/dist/esm/theme/accentInk.mjs.map +1 -1
- package/dist/esm/theme/accentInk.native.js +6 -3
- package/dist/esm/theme/accentInk.native.js.map +1 -1
- package/dist/esm/theme/chartPalette.mjs +3 -3
- package/dist/esm/theme/chartPalette.mjs.map +1 -1
- package/dist/esm/theme/chartPalette.native.js +5 -4
- package/dist/esm/theme/chartPalette.native.js.map +1 -1
- package/dist/esm/theme/colorRules.mjs +5 -1
- package/dist/esm/theme/colorRules.mjs.map +1 -1
- package/dist/esm/theme/colorRules.native.js +6 -1
- package/dist/esm/theme/colorRules.native.js.map +1 -1
- package/dist/esm/theme/controlTiers.mjs +9 -6
- package/dist/esm/theme/controlTiers.mjs.map +1 -1
- package/dist/esm/theme/controlTiers.native.js +10 -6
- package/dist/esm/theme/controlTiers.native.js.map +1 -1
- package/dist/esm/theme/createThemes.mjs +215 -12
- package/dist/esm/theme/createThemes.mjs.map +1 -1
- package/dist/esm/theme/createThemes.native.js +400 -16
- package/dist/esm/theme/createThemes.native.js.map +1 -1
- package/dist/esm/theme/defaults/builderOptions.mjs +10 -6
- package/dist/esm/theme/defaults/builderOptions.mjs.map +1 -1
- package/dist/esm/theme/defaults/builderOptions.native.js +10 -6
- package/dist/esm/theme/defaults/builderOptions.native.js.map +1 -1
- package/dist/esm/theme/fillContrast.mjs +5 -2
- package/dist/esm/theme/fillContrast.mjs.map +1 -1
- package/dist/esm/theme/fillContrast.native.js +5 -2
- package/dist/esm/theme/fillContrast.native.js.map +1 -1
- package/dist/esm/theme/index.mjs +1 -0
- package/dist/esm/theme/index.mjs.map +1 -1
- package/dist/esm/theme/index.native.js +1 -0
- package/dist/esm/theme/index.native.js.map +1 -1
- package/dist/esm/theme/nativeTheme.mjs.map +1 -1
- package/dist/esm/theme/nativeTheme.native.js.map +1 -1
- package/dist/esm/theme/readableColor.mjs +20 -9
- package/dist/esm/theme/readableColor.mjs.map +1 -1
- package/dist/esm/theme/readableColor.native.js +20 -9
- package/dist/esm/theme/readableColor.native.js.map +1 -1
- package/dist/esm/theme/resolveKnobs.mjs +4 -1
- package/dist/esm/theme/resolveKnobs.mjs.map +1 -1
- package/dist/esm/theme/resolveKnobs.native.js +4 -1
- package/dist/esm/theme/resolveKnobs.native.js.map +1 -1
- package/dist/esm/theme/tokenNumber.mjs +9 -0
- package/dist/esm/theme/tokenNumber.mjs.map +1 -0
- package/dist/esm/theme/tokenNumber.native.js +11 -0
- package/dist/esm/theme/tokenNumber.native.js.map +1 -0
- package/package.json +5 -5
- package/src/figma/figmaTokens.spec.ts +2 -1
- package/src/index.gnome.ts +2 -0
- package/src/menuRow.palette.spec.ts +20 -7
- package/src/menuRow.spec.ts +2 -2
- package/src/menuRow.ts +3 -3
- package/src/theme/accentInk.ts +8 -2
- package/src/theme/accentOnSurface.spec.tsx +6 -1
- package/src/theme/chartPalette.spec.ts +2 -2
- package/src/theme/chartPalette.ts +9 -9
- package/src/theme/colorRules.ts +13 -0
- package/src/theme/controlEdges.spec.ts +114 -0
- package/src/theme/controlTiers.ts +18 -9
- package/src/theme/createDefaultThemeConfig.spec.ts +135 -12
- package/src/theme/createThemes.ts +363 -24
- package/src/theme/defaults/builderOptions.ts +25 -8
- package/src/theme/defaults/secondaryInk.spec.ts +10 -5
- package/src/theme/fillContrast.spec.ts +8 -2
- package/src/theme/fillContrast.ts +10 -2
- package/src/theme/houseGround.spec.ts +1 -1
- package/src/theme/index.ts +1 -0
- package/src/theme/nativeTheme.tsx +1 -1
- package/src/theme/readableColor.ts +23 -11
- package/src/theme/recipes.ts +1 -0
- package/src/theme/resolveKnobs.spec.ts +4 -4
- package/src/theme/resolveKnobs.ts +6 -4
- package/src/theme/selectionFill.spec.ts +58 -0
- package/src/theme/switchThumb.spec.ts +13 -1
- package/src/theme/themeKeyRegistry.spec.ts +26 -0
- package/src/theme/tokenNumber.spec.tsx +47 -0
- package/src/theme/tokenNumber.ts +18 -0
- package/types/index.gnome.d.ts +2 -1
- package/types/index.gnome.d.ts.map +1 -1
- package/types/menuRow.d.ts +5 -5
- package/types/theme/accentInk.d.ts +1 -0
- package/types/theme/accentInk.d.ts.map +1 -1
- package/types/theme/chartPalette.d.ts +2 -2
- package/types/theme/colorRules.d.ts +9 -0
- package/types/theme/colorRules.d.ts.map +1 -1
- package/types/theme/controlTiers.d.ts +11 -5
- package/types/theme/controlTiers.d.ts.map +1 -1
- package/types/theme/createThemes.d.ts +21 -12
- package/types/theme/createThemes.d.ts.map +1 -1
- package/types/theme/defaults/builderOptions.d.ts +9 -1
- package/types/theme/defaults/builderOptions.d.ts.map +1 -1
- package/types/theme/fillContrast.d.ts.map +1 -1
- package/types/theme/index.d.ts +1 -0
- package/types/theme/index.d.ts.map +1 -1
- package/types/theme/nativeTheme.d.ts +1 -1
- package/types/theme/nativeTheme.d.ts.map +1 -1
- package/types/theme/readableColor.d.ts.map +1 -1
- package/types/theme/recipes.d.ts +3 -0
- package/types/theme/recipes.d.ts.map +1 -1
- package/types/theme/resolveKnobs.d.ts.map +1 -1
- package/types/theme/tokenNumber.d.ts +10 -0
- package/types/theme/tokenNumber.d.ts.map +1 -0
|
@@ -39,6 +39,7 @@ __export(createThemes_exports, {
|
|
|
39
39
|
houseComponentThemes: () => houseComponentThemes,
|
|
40
40
|
houseGrandChildrenThemes: () => houseGrandChildrenThemes,
|
|
41
41
|
houseTemplates: () => houseTemplates,
|
|
42
|
+
postPassThemeKeys: () => postPassThemeKeys,
|
|
42
43
|
tintHueNames: () => import_tintHues.tintHueNames
|
|
43
44
|
});
|
|
44
45
|
module.exports = __toCommonJS(createThemes_exports);
|
|
@@ -49,6 +50,7 @@ var import_colorRules = require("./colorRules.native.js");
|
|
|
49
50
|
var import_builderOptions = require("./defaults/builderOptions.native.js");
|
|
50
51
|
var import_ramps = require("./ramps.native.js");
|
|
51
52
|
var import_accentInk = require("./accentInk.native.js");
|
|
53
|
+
var import_dedupeInherited = require("./dedupeInherited.native.js");
|
|
52
54
|
var import_tintHues = require("./tintHues.native.js");
|
|
53
55
|
var intentInkFloor = {
|
|
54
56
|
/** Stored hsla(41, 99%, 30%, 1); 4.54:1 on $color2, dE76 2.54. */
|
|
@@ -70,9 +72,37 @@ var lightSurfaceGrouped = {
|
|
|
70
72
|
backgroundFocus: import_theme_builder.PALETTE_BACKGROUND_OFFSET,
|
|
71
73
|
backgroundActive: import_theme_builder.PALETTE_BACKGROUND_OFFSET
|
|
72
74
|
};
|
|
75
|
+
var fillKeys = ["background", "backgroundHover", "backgroundPress", "backgroundFocus", "backgroundActive"];
|
|
76
|
+
var edgeKeys = ["borderColor", "borderColorHover", "borderColorFocus", "borderColorPress"];
|
|
77
|
+
function liftOneStep(template) {
|
|
78
|
+
var lifted = {
|
|
79
|
+
...template
|
|
80
|
+
};
|
|
81
|
+
for (var _i = 0, _iter = [...fillKeys, ...edgeKeys]; _i < _iter.length; _i++) {
|
|
82
|
+
var key = _iter[_i];
|
|
83
|
+
lifted[key] = template[key] + 1;
|
|
84
|
+
}
|
|
85
|
+
return lifted;
|
|
86
|
+
}
|
|
87
|
+
var darkSurfaceGrouped = {
|
|
88
|
+
...liftOneStep(import_v5.v5Templates.dark_surface1),
|
|
89
|
+
selectFill: import_theme_builder.PALETTE_BACKGROUND_OFFSET + 4,
|
|
90
|
+
selectPress: import_theme_builder.PALETTE_BACKGROUND_OFFSET + 5
|
|
91
|
+
};
|
|
92
|
+
var darkBasePage = {
|
|
93
|
+
...import_v5.v5Templates.dark_base,
|
|
94
|
+
background: import_theme_builder.PALETTE_BACKGROUND_OFFSET,
|
|
95
|
+
backgroundActive: import_theme_builder.PALETTE_BACKGROUND_OFFSET,
|
|
96
|
+
backgroundFocus: import_theme_builder.PALETTE_BACKGROUND_OFFSET + 1,
|
|
97
|
+
backgroundHover: import_theme_builder.PALETTE_BACKGROUND_OFFSET + 1,
|
|
98
|
+
backgroundPress: import_theme_builder.PALETTE_BACKGROUND_OFFSET + 1
|
|
99
|
+
};
|
|
73
100
|
var houseTemplates = {
|
|
74
101
|
...import_v5.v5Templates,
|
|
75
|
-
light_surface1: lightSurfaceGrouped
|
|
102
|
+
light_surface1: lightSurfaceGrouped,
|
|
103
|
+
dark_base: darkBasePage,
|
|
104
|
+
dark_surface1: darkSurfaceGrouped,
|
|
105
|
+
dark_surface2: liftOneStep(import_v5.v5Templates.dark_surface2)
|
|
76
106
|
};
|
|
77
107
|
var houseComponentThemes = {
|
|
78
108
|
Button: {
|
|
@@ -337,7 +367,7 @@ function holdAccentFloor(themes) {
|
|
|
337
367
|
if (!(base === null || base === void 0 ? void 0 : base.accentBackground) || !base.accentColor) return "continue";
|
|
338
368
|
var paper = luminanceOf(base.color1);
|
|
339
369
|
var ink = luminanceOf(base.color12);
|
|
340
|
-
var surfaces = [base.color1, base.color2, base.color3, base.color4].map(luminanceOf);
|
|
370
|
+
var surfaces = [base.color1, base.color2, base.color3, base.color4, ...(scheme === "dark" ? [base.color5] : [])].map(luminanceOf);
|
|
341
371
|
if (paper === null || ink === null || surfaces.some(function (lum) {
|
|
342
372
|
return lum === null;
|
|
343
373
|
})) return "continue";
|
|
@@ -441,6 +471,9 @@ function holdSelectionSurface(themes) {
|
|
|
441
471
|
color4: held,
|
|
442
472
|
...(theme.borderColor === scope.color4 ? {
|
|
443
473
|
borderColor: held
|
|
474
|
+
} : null),
|
|
475
|
+
...(theme.selectFill === scope.color4 ? {
|
|
476
|
+
selectFill: held
|
|
444
477
|
} : null)
|
|
445
478
|
};
|
|
446
479
|
}
|
|
@@ -476,6 +509,261 @@ function holdSelectionSurface(themes) {
|
|
|
476
509
|
}
|
|
477
510
|
return out;
|
|
478
511
|
}
|
|
512
|
+
function holdDarkEdges(themes) {
|
|
513
|
+
var out = {
|
|
514
|
+
...themes
|
|
515
|
+
};
|
|
516
|
+
var scopes = Object.keys(themes).filter(function (name) {
|
|
517
|
+
return /^dark(_[a-z]+)?$/.test(name);
|
|
518
|
+
});
|
|
519
|
+
var ownerOf = function ownerOf2(name) {
|
|
520
|
+
return scopes.filter(function (scope) {
|
|
521
|
+
return name === scope || name.startsWith(`${scope}_`);
|
|
522
|
+
}).reduce(function (longest, scope) {
|
|
523
|
+
return scope.length > longest.length ? scope : longest;
|
|
524
|
+
}, "");
|
|
525
|
+
};
|
|
526
|
+
var _iteratorNormalCompletion = true,
|
|
527
|
+
_didIteratorError = false,
|
|
528
|
+
_iteratorError = void 0;
|
|
529
|
+
try {
|
|
530
|
+
var _loop = function () {
|
|
531
|
+
var scopeName = _step.value;
|
|
532
|
+
if (/_(accent|active)$/.test(scopeName)) return "continue";
|
|
533
|
+
var scope = themes[scopeName];
|
|
534
|
+
var ramp = Array.from({
|
|
535
|
+
length: 12
|
|
536
|
+
}, function (_, index) {
|
|
537
|
+
return scope[`color${index + 1}`];
|
|
538
|
+
});
|
|
539
|
+
var grounds = [scope.background, scope.color4].map(function (color) {
|
|
540
|
+
return luminanceOf(color);
|
|
541
|
+
});
|
|
542
|
+
if (grounds.some(function (ground) {
|
|
543
|
+
return ground === null;
|
|
544
|
+
})) return "continue";
|
|
545
|
+
var brightest = Math.max(...grounds);
|
|
546
|
+
var clears = function clears2(color) {
|
|
547
|
+
var luminance = luminanceOf(color);
|
|
548
|
+
return luminance !== null && luminance > brightest && grounds.every(function (ground) {
|
|
549
|
+
return (0, import_colorRules.contrastRatio)(luminance, ground) >= import_builderOptions.darkHairlineContrast;
|
|
550
|
+
});
|
|
551
|
+
};
|
|
552
|
+
var hairline = ramp.findIndex(function (color, index) {
|
|
553
|
+
return index < 11 && clears(color);
|
|
554
|
+
});
|
|
555
|
+
if (hairline < 0) return "continue";
|
|
556
|
+
var medium = hairline + 1;
|
|
557
|
+
var _iteratorNormalCompletion2 = true,
|
|
558
|
+
_didIteratorError2 = false,
|
|
559
|
+
_iteratorError2 = void 0;
|
|
560
|
+
try {
|
|
561
|
+
for (var _iterator2 = Object.entries(themes)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion2 = (_step1 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
562
|
+
var [name, theme] = _step1.value;
|
|
563
|
+
if (ownerOf(name) !== scopeName) continue;
|
|
564
|
+
var surface = name === scopeName || theme.background === scope.color4;
|
|
565
|
+
var step = ramp.indexOf(theme.borderColor);
|
|
566
|
+
var shift = surface && step >= 0 ? medium - step : 0;
|
|
567
|
+
var moved = {};
|
|
568
|
+
if ("borderColorHairline" in theme || name === scopeName) moved.borderColorHairline = ramp[hairline];
|
|
569
|
+
if (shift > 0) {
|
|
570
|
+
for (var _i = 0, _iter = ["borderColor", "borderColorHover", "borderColorFocus", "borderColorPress"]; _i < _iter.length; _i++) {
|
|
571
|
+
var key = _iter[_i];
|
|
572
|
+
var at = ramp.indexOf(theme[key]);
|
|
573
|
+
if (at >= 0) moved[key] = ramp[Math.min(11, at + shift)];
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
out[name] = {
|
|
577
|
+
...out[name],
|
|
578
|
+
...moved
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
} catch (err) {
|
|
582
|
+
_didIteratorError2 = true;
|
|
583
|
+
_iteratorError2 = err;
|
|
584
|
+
} finally {
|
|
585
|
+
try {
|
|
586
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
587
|
+
_iterator2.return();
|
|
588
|
+
}
|
|
589
|
+
} finally {
|
|
590
|
+
if (_didIteratorError2) {
|
|
591
|
+
throw _iteratorError2;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
for (var _iterator = scopes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();
|
|
597
|
+
} catch (err) {
|
|
598
|
+
_didIteratorError = true;
|
|
599
|
+
_iteratorError = err;
|
|
600
|
+
} finally {
|
|
601
|
+
try {
|
|
602
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
603
|
+
_iterator.return();
|
|
604
|
+
}
|
|
605
|
+
} finally {
|
|
606
|
+
if (_didIteratorError) {
|
|
607
|
+
throw _iteratorError;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
return out;
|
|
612
|
+
}
|
|
613
|
+
function holdControlEdges(themes) {
|
|
614
|
+
var _loop = function (_i2, _iter2) {
|
|
615
|
+
var scheme = _iter2[_i2];
|
|
616
|
+
var root = themes[scheme];
|
|
617
|
+
if (!root) return "continue";
|
|
618
|
+
var neutral = Array.from({
|
|
619
|
+
length: 12
|
|
620
|
+
}, function (_, index) {
|
|
621
|
+
return root[`color${index + 1}`];
|
|
622
|
+
});
|
|
623
|
+
var fieldEdges = function fieldEdges2(scopeName) {
|
|
624
|
+
var scope = themes[scopeName];
|
|
625
|
+
var field = `${scopeName}_Input`;
|
|
626
|
+
var edge = firstClearing(neutral, [scope.background, resolved(field, "background")]);
|
|
627
|
+
if (edge < 0) return void 0;
|
|
628
|
+
var ramp = Array.from({
|
|
629
|
+
length: 12
|
|
630
|
+
}, function (_, index) {
|
|
631
|
+
return scope[`color${index + 1}`];
|
|
632
|
+
});
|
|
633
|
+
var stepOf = function stepOf2(color) {
|
|
634
|
+
var lum = luminanceOf(color);
|
|
635
|
+
if (lum === null) return -1;
|
|
636
|
+
return ramp.reduce(function (best, step, index) {
|
|
637
|
+
var _luminanceOf, _luminanceOf1;
|
|
638
|
+
return Math.abs(((_luminanceOf = luminanceOf(step)) !== null && _luminanceOf !== void 0 ? _luminanceOf : 2) - lum) < Math.abs(((_luminanceOf1 = luminanceOf(ramp[best])) !== null && _luminanceOf1 !== void 0 ? _luminanceOf1 : 2) - lum) ? index : best;
|
|
639
|
+
}, 0);
|
|
640
|
+
};
|
|
641
|
+
var rest = stepOf(resolved(field, "borderColor"));
|
|
642
|
+
var hover = stepOf(resolved(field, "borderColorHover"));
|
|
643
|
+
return {
|
|
644
|
+
borderColorField: neutral[edge],
|
|
645
|
+
borderColorFieldHover: neutral[Math.min(11, Math.max(edge, edge + hover - rest))]
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
var rootFields = fieldEdges(scheme);
|
|
649
|
+
var rootControl = firstClearing(neutral, [root.background]);
|
|
650
|
+
if (!rootFields || rootControl < 0) return "continue";
|
|
651
|
+
out[scheme] = {
|
|
652
|
+
...out[scheme],
|
|
653
|
+
...rootFields,
|
|
654
|
+
borderColorControl: neutral[rootControl],
|
|
655
|
+
switchTrackOffBorder: scheme === "light" ? neutral[rootControl] : root.switchTrackOff
|
|
656
|
+
};
|
|
657
|
+
var scopes = Object.keys(themes).filter(function (name) {
|
|
658
|
+
return new RegExp(`^${scheme}_[a-z]+$`).test(name) && !/_(accent|active)$/.test(name);
|
|
659
|
+
});
|
|
660
|
+
var pages = [root.background, ...scopes.filter(function (name) {
|
|
661
|
+
return !semanticIntentNames.has(name.slice(scheme.length + 1));
|
|
662
|
+
}).map(function (name) {
|
|
663
|
+
return themes[name].background;
|
|
664
|
+
})];
|
|
665
|
+
var _iteratorNormalCompletion = true,
|
|
666
|
+
_didIteratorError = false,
|
|
667
|
+
_iteratorError = void 0;
|
|
668
|
+
try {
|
|
669
|
+
var _loop2 = function () {
|
|
670
|
+
var scopeName = _step.value;
|
|
671
|
+
var scope = themes[scopeName];
|
|
672
|
+
var patch = {};
|
|
673
|
+
if (scheme === "dark" && "switchTrackOff" in scope) patch.switchTrackOffBorder = scope.switchTrackOff;
|
|
674
|
+
if (semanticIntentNames.has(scopeName.slice(scheme.length + 1))) {
|
|
675
|
+
var field = `${scopeName}_Input`;
|
|
676
|
+
var ramp = Array.from({
|
|
677
|
+
length: 12
|
|
678
|
+
}, function (_, index) {
|
|
679
|
+
return scope[`color${index + 1}`];
|
|
680
|
+
});
|
|
681
|
+
var edge = firstClearing(ramp, [...pages, resolved(field, "background")]);
|
|
682
|
+
patch.borderColorField = edge < 0 ? resolved(field, "borderColor") : ramp[edge];
|
|
683
|
+
patch.borderColorFieldHover = edge < 0 ? resolved(field, "borderColorHover") : ramp[Math.min(11, edge + 1)];
|
|
684
|
+
} else {
|
|
685
|
+
var fields = fieldEdges(scopeName);
|
|
686
|
+
if (fields) {
|
|
687
|
+
var _iteratorNormalCompletion2 = true,
|
|
688
|
+
_didIteratorError2 = false,
|
|
689
|
+
_iteratorError2 = void 0;
|
|
690
|
+
try {
|
|
691
|
+
for (var _iterator2 = Object.entries(fields)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion2 = (_step1 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
692
|
+
var [key, value] = _step1.value;
|
|
693
|
+
if (value !== rootFields[key]) patch[key] = value;
|
|
694
|
+
}
|
|
695
|
+
} catch (err) {
|
|
696
|
+
_didIteratorError2 = true;
|
|
697
|
+
_iteratorError2 = err;
|
|
698
|
+
} finally {
|
|
699
|
+
try {
|
|
700
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
701
|
+
_iterator2.return();
|
|
702
|
+
}
|
|
703
|
+
} finally {
|
|
704
|
+
if (_didIteratorError2) {
|
|
705
|
+
throw _iteratorError2;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
var control = firstClearing(neutral, [scope.background]);
|
|
711
|
+
if (control >= 0 && control !== rootControl) patch.borderColorControl = neutral[control];
|
|
712
|
+
}
|
|
713
|
+
if (Object.keys(patch).length > 0) out[scopeName] = {
|
|
714
|
+
...out[scopeName],
|
|
715
|
+
...patch
|
|
716
|
+
};
|
|
717
|
+
};
|
|
718
|
+
for (var _iterator = scopes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop2();
|
|
719
|
+
} catch (err) {
|
|
720
|
+
_didIteratorError = true;
|
|
721
|
+
_iteratorError = err;
|
|
722
|
+
} finally {
|
|
723
|
+
try {
|
|
724
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
725
|
+
_iterator.return();
|
|
726
|
+
}
|
|
727
|
+
} finally {
|
|
728
|
+
if (_didIteratorError) {
|
|
729
|
+
throw _iteratorError;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
var out = {
|
|
735
|
+
...themes
|
|
736
|
+
};
|
|
737
|
+
var firstClearing = function firstClearing2(neutral, grounds) {
|
|
738
|
+
var lums = grounds.map(function (ground) {
|
|
739
|
+
return luminanceOf(ground);
|
|
740
|
+
});
|
|
741
|
+
if (lums.some(function (lum) {
|
|
742
|
+
return lum === null;
|
|
743
|
+
})) return -1;
|
|
744
|
+
var darkest = Math.min(...lums);
|
|
745
|
+
var brightest = Math.max(...lums);
|
|
746
|
+
var light = (0, import_colorRules.isLightGround)(grounds[0]);
|
|
747
|
+
return neutral.findIndex(function (color) {
|
|
748
|
+
var lum = luminanceOf(color);
|
|
749
|
+
return lum !== null && (light ? lum < darkest : lum > brightest) && lums.every(function (ground) {
|
|
750
|
+
return (0, import_colorRules.contrastRatio)(lum, ground) >= import_colorRules.minContrastRatio;
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
};
|
|
754
|
+
var resolved = function resolved2(name, key) {
|
|
755
|
+
for (var at = name; at; at = at.slice(0, Math.max(0, at.lastIndexOf("_")))) {
|
|
756
|
+
var _out_at;
|
|
757
|
+
var _this;
|
|
758
|
+
var value = (_this = (_out_at = out[at]) !== null && _out_at !== void 0 ? _out_at : themes[at]) === null || _this === void 0 ? void 0 : _this[key];
|
|
759
|
+
if (value !== void 0) return value;
|
|
760
|
+
if (!at.includes("_")) break;
|
|
761
|
+
}
|
|
762
|
+
return void 0;
|
|
763
|
+
};
|
|
764
|
+
for (var _i = 0, _iter = ["light", "dark"]; _i < _iter.length; _i++) _loop(_i, _iter);
|
|
765
|
+
return out;
|
|
766
|
+
}
|
|
479
767
|
var selectedTintContrastRatio = 1.1;
|
|
480
768
|
var neutralSelectedTintContrastRatio = 1.25;
|
|
481
769
|
var achromaticChannelSpread = 8;
|
|
@@ -570,7 +858,6 @@ var switchStateContrastRatio = 1.5;
|
|
|
570
858
|
var switchRaisedAlphas = [0.16, 0.2, 0.24, 0.28, 0.32, 0.36, 0.4];
|
|
571
859
|
var switchRaisedAlphaStep = 0.04;
|
|
572
860
|
function raisedGrounds(themes, scheme) {
|
|
573
|
-
var _themes_scheme;
|
|
574
861
|
if (scheme === "light") return [];
|
|
575
862
|
var hues = Object.entries(themes).filter(function (param) {
|
|
576
863
|
var [name] = param;
|
|
@@ -579,10 +866,12 @@ function raisedGrounds(themes, scheme) {
|
|
|
579
866
|
var [name] = param;
|
|
580
867
|
return !/_(accent|active)$/.test(name);
|
|
581
868
|
});
|
|
582
|
-
return [
|
|
869
|
+
return [themes[scheme], ...hues.map(function (param) {
|
|
583
870
|
var [, theme] = param;
|
|
584
|
-
return theme
|
|
585
|
-
})].
|
|
871
|
+
return theme;
|
|
872
|
+
})].flatMap(function (theme) {
|
|
873
|
+
return [theme === null || theme === void 0 ? void 0 : theme.color4, theme === null || theme === void 0 ? void 0 : theme.color5];
|
|
874
|
+
}).filter(function (color) {
|
|
586
875
|
return typeof color === "string";
|
|
587
876
|
});
|
|
588
877
|
}
|
|
@@ -594,11 +883,48 @@ function holdSwitchTrack(themes) {
|
|
|
594
883
|
var scheme = _iter[_i];
|
|
595
884
|
var base = themes[scheme];
|
|
596
885
|
if (!base) continue;
|
|
597
|
-
var paint = switchTrackPaint(base, base.accentBackground, base
|
|
886
|
+
var paint = switchTrackPaint(base, base.accentBackground, (0, import_colorRules.switchOffGround)(base), raisedGrounds(themes, scheme));
|
|
598
887
|
if (paint) out[scheme] = {
|
|
599
888
|
...base,
|
|
600
889
|
...paint
|
|
601
890
|
};
|
|
891
|
+
if (scheme !== "dark" || !paint) continue;
|
|
892
|
+
var _iteratorNormalCompletion = true,
|
|
893
|
+
_didIteratorError = false,
|
|
894
|
+
_iteratorError = void 0;
|
|
895
|
+
try {
|
|
896
|
+
var _loop = function () {
|
|
897
|
+
var intent = _step.value;
|
|
898
|
+
var _scope_accentBackground;
|
|
899
|
+
var scope = themes[`${scheme}_${intent}`];
|
|
900
|
+
var off = luminanceOf(paint.switchTrackOff);
|
|
901
|
+
if (!(scope === null || scope === void 0 ? void 0 : scope.color4) || !scope.color5 || off === null) return "continue";
|
|
902
|
+
var holds = (0, import_colorRules.inSwitchOffBand)(paint.switchTrackOff, scope.color4) && [scope.color4, scope.color5].every(function (ground) {
|
|
903
|
+
var _luminanceOf;
|
|
904
|
+
return (0, import_colorRules.contrastRatio)(off, (_luminanceOf = luminanceOf(ground)) !== null && _luminanceOf !== void 0 ? _luminanceOf : off) >= import_colorRules.plateContrastRatio;
|
|
905
|
+
});
|
|
906
|
+
if (holds) return "continue";
|
|
907
|
+
var track = switchTrackPaint(base, (_scope_accentBackground = scope.accentBackground) !== null && _scope_accentBackground !== void 0 ? _scope_accentBackground : base.accentBackground, scope.color4, [base.color4, scope.color4, scope.color5]);
|
|
908
|
+
if (track) out[`${scheme}_${intent}`] = {
|
|
909
|
+
...scope,
|
|
910
|
+
...track
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
for (var _iterator = semanticIntentNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();
|
|
914
|
+
} catch (err) {
|
|
915
|
+
_didIteratorError = true;
|
|
916
|
+
_iteratorError = err;
|
|
917
|
+
} finally {
|
|
918
|
+
try {
|
|
919
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
920
|
+
_iterator.return();
|
|
921
|
+
}
|
|
922
|
+
} finally {
|
|
923
|
+
if (_didIteratorError) {
|
|
924
|
+
throw _iteratorError;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
}
|
|
602
928
|
}
|
|
603
929
|
return out;
|
|
604
930
|
}
|
|
@@ -877,7 +1203,7 @@ function holdColorThemeAccent(themes) {
|
|
|
877
1203
|
try {
|
|
878
1204
|
var _loop2 = function () {
|
|
879
1205
|
var hue = _step.value;
|
|
880
|
-
var _ref, _walkToHoldingInk, _ref1;
|
|
1206
|
+
var _ref, _walkToHoldingInk, _ref1, _switchOffGround;
|
|
881
1207
|
var scopeName = `${scheme}_${hue}`;
|
|
882
1208
|
var scope = themes[scopeName];
|
|
883
1209
|
var ramp = Array.from({
|
|
@@ -890,7 +1216,7 @@ function holdColorThemeAccent(themes) {
|
|
|
890
1216
|
})) return "continue";
|
|
891
1217
|
var paper = luminanceOf(scope.color1);
|
|
892
1218
|
var ink = luminanceOf(scope.color12);
|
|
893
|
-
var surfaces = [scope.color1, scope.color2, scope.color3, scope.color4].map(luminanceOf);
|
|
1219
|
+
var surfaces = [scope.color1, scope.color2, scope.color3, scope.color4, ...(scheme === "dark" ? [scope.color5] : [])].map(luminanceOf);
|
|
894
1220
|
if (paper === null || ink === null || surfaces.some(function (lum) {
|
|
895
1221
|
return lum === null;
|
|
896
1222
|
})) return "continue";
|
|
@@ -916,8 +1242,12 @@ function holdColorThemeAccent(themes) {
|
|
|
916
1242
|
};
|
|
917
1243
|
var rootOn = luminanceOf(base.switchTrackOff);
|
|
918
1244
|
var fillLum = luminanceOf(fill);
|
|
919
|
-
var
|
|
920
|
-
var
|
|
1245
|
+
var switchGround = (_switchOffGround = (0, import_colorRules.switchOffGround)(scope)) !== null && _switchOffGround !== void 0 ? _switchOffGround : scope.background;
|
|
1246
|
+
var rootHolds = rootOn === null || fillLum === null || (0, import_colorRules.contrastRatio)(rootOn, fillLum) >= switchStateContrastRatio && (0, import_colorRules.inSwitchOffBand)(base.switchTrackOff, switchGround) && ((0, import_colorRules.isLightGround)(scope.background) ? [] : [scope.color4, scope.color5]).every(function (ground) {
|
|
1247
|
+
var _luminanceOf;
|
|
1248
|
+
return (0, import_colorRules.contrastRatio)(rootOn, (_luminanceOf = luminanceOf(ground)) !== null && _luminanceOf !== void 0 ? _luminanceOf : rootOn) >= import_colorRules.plateContrastRatio;
|
|
1249
|
+
});
|
|
1250
|
+
var track = rootHolds ? void 0 : switchTrackPaint(base, fill, switchGround, (0, import_colorRules.isLightGround)(scope.background) ? [] : [base.color4, scope.color4, scope.color5]);
|
|
921
1251
|
var _iteratorNormalCompletion2 = true,
|
|
922
1252
|
_didIteratorError2 = false,
|
|
923
1253
|
_iteratorError2 = void 0;
|
|
@@ -1106,6 +1436,60 @@ function holdHouseAccent(themes) {
|
|
|
1106
1436
|
}
|
|
1107
1437
|
return out;
|
|
1108
1438
|
}
|
|
1439
|
+
function holdHouseIdentityInk(themes) {
|
|
1440
|
+
var _loop = function (_i2, _iter2) {
|
|
1441
|
+
var scheme = _iter2[_i2];
|
|
1442
|
+
var _themes_;
|
|
1443
|
+
var base = themes[scheme];
|
|
1444
|
+
var blueInk = (_themes_ = themes[`${scheme}_blue`]) === null || _themes_ === void 0 ? void 0 : _themes_.identityInk;
|
|
1445
|
+
if (!(base === null || base === void 0 ? void 0 : base.identityInk) || !blueInk || base.identityInk === blueInk) return "continue";
|
|
1446
|
+
var held = Array.from({
|
|
1447
|
+
length: 12
|
|
1448
|
+
}, function (_, index) {
|
|
1449
|
+
return index + 1;
|
|
1450
|
+
}).every(function (step) {
|
|
1451
|
+
return base[`accent${step}`] !== void 0 && base[`accent${step}`] === base[`blue${step}`];
|
|
1452
|
+
});
|
|
1453
|
+
if (!held) return "continue";
|
|
1454
|
+
var _iteratorNormalCompletion = true,
|
|
1455
|
+
_didIteratorError = false,
|
|
1456
|
+
_iteratorError = void 0;
|
|
1457
|
+
try {
|
|
1458
|
+
for (var _iterator = Object.entries(themes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
1459
|
+
var [name, theme] = _step.value;
|
|
1460
|
+
if (name !== scheme && !name.startsWith(`${scheme}_`)) continue;
|
|
1461
|
+
var scope = name.split("_")[1];
|
|
1462
|
+
if (scope === "accent" || childrenHues.includes(scope)) continue;
|
|
1463
|
+
if (theme.identityInk !== base.identityInk) continue;
|
|
1464
|
+
var values = (0, import_dedupeInherited.resolveThemeThroughParents)(themes, name);
|
|
1465
|
+
if ((0, import_accentInk.pickIdentityInk)([blueInk], (0, import_accentInk.pageSurfaces)(name, values)) === blueInk) {
|
|
1466
|
+
out[name] = {
|
|
1467
|
+
...theme,
|
|
1468
|
+
identityInk: blueInk
|
|
1469
|
+
};
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
} catch (err) {
|
|
1473
|
+
_didIteratorError = true;
|
|
1474
|
+
_iteratorError = err;
|
|
1475
|
+
} finally {
|
|
1476
|
+
try {
|
|
1477
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1478
|
+
_iterator.return();
|
|
1479
|
+
}
|
|
1480
|
+
} finally {
|
|
1481
|
+
if (_didIteratorError) {
|
|
1482
|
+
throw _iteratorError;
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
var out = {
|
|
1488
|
+
...themes
|
|
1489
|
+
};
|
|
1490
|
+
for (var _i = 0, _iter = ["light", "dark"]; _i < _iter.length; _i++) _loop(_i, _iter);
|
|
1491
|
+
return out;
|
|
1492
|
+
}
|
|
1109
1493
|
var defaultLightShadows = {
|
|
1110
1494
|
shadow1: "rgba(0,0,0,0.04)",
|
|
1111
1495
|
shadow2: "rgba(0,0,0,0.08)",
|
|
@@ -1190,6 +1574,7 @@ function isChromatic(color) {
|
|
|
1190
1574
|
});
|
|
1191
1575
|
return Math.max(...channels) - Math.min(...channels) >= 24;
|
|
1192
1576
|
}
|
|
1577
|
+
var postPassThemeKeys = ["accentOnSurface", "borderColorControl", "borderColorField", "borderColorFieldHover", "borderColorHairline", "identityInk", "selectedBackground", "selectedColor", "switchTrackOff", "switchTrackOffBorder", "switchTrackOffHover", "switchTrackOffPress"];
|
|
1193
1578
|
function createThemesBuilder(baseTheme, accentTheme, options) {
|
|
1194
1579
|
var _ref, _ref1;
|
|
1195
1580
|
var _baseTheme_lightShadows, _baseTheme_darkShadows;
|
|
@@ -1265,7 +1650,7 @@ function createThemesBuilder(baseTheme, accentTheme, options) {
|
|
|
1265
1650
|
createThemesProps.getTheme = getTheme;
|
|
1266
1651
|
}
|
|
1267
1652
|
var initialTheme = (0, import_theme_builder.createThemes)(createThemesProps);
|
|
1268
|
-
var themes = (0, import_accentInk.withIdentityInk)((0, import_accentInk.withAccentOnSurface)(holdFocusRingAccent(holdHouseAccent(holdColorThemeAccent(holdSwitchTrack(holdSyntaxFloor(holdNamedInkFloor(holdSelectedState(holdAccentFloor(holdSelectionSurface(neutralizeSemanticEntryText(neutralizeTintText(initialTheme)))))))))))));
|
|
1653
|
+
var themes = holdHouseIdentityInk((0, import_accentInk.withIdentityInk)((0, import_accentInk.withAccentOnSurface)(holdFocusRingAccent(holdControlEdges(holdHouseAccent(holdColorThemeAccent(holdSwitchTrack(holdSyntaxFloor(holdNamedInkFloor(holdSelectedState(holdAccentFloor(holdDarkEdges(holdSelectionSurface(neutralizeSemanticEntryText(neutralizeTintText(initialTheme))))))))))))))));
|
|
1269
1654
|
return {
|
|
1270
1655
|
themes() {
|
|
1271
1656
|
return themes;
|