@multiplatform.one/theme 7.83.2 → 7.84.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/expo.cjs +8 -1
- package/dist/cjs/expo.native.js +11 -1
- package/dist/cjs/expo.native.js.map +1 -1
- package/dist/cjs/fonts/createFontLoader.native.js +5 -4
- package/dist/cjs/fonts/index.cjs +1 -0
- package/dist/cjs/fonts/index.native.js +1 -0
- package/dist/cjs/fonts/index.native.js.map +1 -1
- package/dist/cjs/fonts/interFaces.cjs +38 -0
- package/dist/cjs/fonts/interFaces.native.js +41 -0
- package/dist/cjs/fonts/interFaces.native.js.map +1 -0
- package/dist/cjs/theme/colorRules.cjs +23 -0
- package/dist/cjs/theme/colorRules.native.js +29 -0
- package/dist/cjs/theme/colorRules.native.js.map +1 -1
- package/dist/cjs/theme/controlTiers.cjs +1 -1
- package/dist/cjs/theme/controlTiers.native.js +1 -1
- package/dist/cjs/theme/controlTiers.native.js.map +1 -1
- package/dist/cjs/theme/defaults/fonts.cjs +4 -17
- package/dist/cjs/theme/defaults/fonts.native.js +7 -17
- package/dist/cjs/theme/defaults/fonts.native.js.map +1 -1
- package/dist/cjs/theme/glyphTint.cjs +2 -25
- package/dist/cjs/theme/glyphTint.native.js +2 -31
- package/dist/cjs/theme/glyphTint.native.js.map +1 -1
- package/dist/cjs/theme/hairline.cjs +20 -3
- package/dist/cjs/theme/readableColor.cjs +36 -0
- package/dist/cjs/theme/readableColor.native.js +39 -0
- package/dist/cjs/theme/readableColor.native.js.map +1 -1
- package/dist/cjs/theme/resolveKnobs.cjs +162 -74
- package/dist/cjs/theme/resolveKnobs.native.js +170 -81
- package/dist/cjs/theme/resolveKnobs.native.js.map +1 -1
- package/dist/esm/expo.mjs +7 -1
- package/dist/esm/expo.mjs.map +1 -1
- package/dist/esm/expo.native.js +10 -1
- package/dist/esm/expo.native.js.map +1 -1
- package/dist/esm/fonts/createFontLoader.native.js +5 -4
- package/dist/esm/fonts/index.mjs +1 -0
- package/dist/esm/fonts/index.mjs.map +1 -1
- package/dist/esm/fonts/index.native.js +1 -0
- package/dist/esm/fonts/index.native.js.map +1 -1
- package/dist/esm/fonts/interFaces.mjs +12 -0
- package/dist/esm/fonts/interFaces.mjs.map +1 -0
- package/dist/esm/fonts/interFaces.native.js +12 -0
- package/dist/esm/fonts/interFaces.native.js.map +1 -0
- package/dist/esm/theme/colorRules.mjs +23 -1
- package/dist/esm/theme/colorRules.mjs.map +1 -1
- package/dist/esm/theme/colorRules.native.js +29 -1
- package/dist/esm/theme/colorRules.native.js.map +1 -1
- package/dist/esm/theme/controlTiers.mjs +1 -1
- package/dist/esm/theme/controlTiers.mjs.map +1 -1
- package/dist/esm/theme/controlTiers.native.js +1 -1
- package/dist/esm/theme/controlTiers.native.js.map +1 -1
- package/dist/esm/theme/defaults/fonts.mjs +4 -17
- package/dist/esm/theme/defaults/fonts.mjs.map +1 -1
- package/dist/esm/theme/defaults/fonts.native.js +7 -17
- package/dist/esm/theme/defaults/fonts.native.js.map +1 -1
- package/dist/esm/theme/glyphTint.mjs +2 -24
- package/dist/esm/theme/glyphTint.mjs.map +1 -1
- package/dist/esm/theme/glyphTint.native.js +2 -30
- package/dist/esm/theme/glyphTint.native.js.map +1 -1
- package/dist/esm/theme/hairline.mjs +20 -4
- package/dist/esm/theme/hairline.mjs.map +1 -1
- package/dist/esm/theme/readableColor.mjs +36 -2
- package/dist/esm/theme/readableColor.mjs.map +1 -1
- package/dist/esm/theme/readableColor.native.js +39 -2
- package/dist/esm/theme/readableColor.native.js.map +1 -1
- package/dist/esm/theme/resolveKnobs.mjs +162 -74
- package/dist/esm/theme/resolveKnobs.mjs.map +1 -1
- package/dist/esm/theme/resolveKnobs.native.js +170 -81
- package/dist/esm/theme/resolveKnobs.native.js.map +1 -1
- package/package.json +5 -5
- package/src/expo.ts +20 -0
- package/src/fonts/createFontLoader.ts +8 -4
- package/src/fonts/index.ts +1 -0
- package/src/fonts/interFaces.spec.ts +87 -0
- package/src/fonts/interFaces.ts +26 -0
- package/src/theme/accentButtonLabel.spec.ts +116 -0
- package/src/theme/colorRules.ts +41 -0
- package/src/theme/controlTiers.ts +6 -4
- package/src/theme/defaults/fonts.spec.ts +9 -2
- package/src/theme/defaults/fonts.ts +5 -8
- package/src/theme/glyphTint.spec.ts +30 -2
- package/src/theme/glyphTint.ts +1 -47
- package/src/theme/hairline.spec.ts +60 -3
- package/src/theme/hairline.ts +35 -5
- package/src/theme/readableColor.ts +49 -0
- package/src/theme/resolveKnobs.ts +172 -101
- package/types/expo.d.ts +10 -0
- package/types/expo.d.ts.map +1 -1
- package/types/fonts/createFontLoader.d.ts.map +1 -1
- package/types/fonts/index.d.ts +1 -0
- package/types/fonts/index.d.ts.map +1 -1
- package/types/fonts/interFaces.d.ts +23 -0
- package/types/fonts/interFaces.d.ts.map +1 -0
- package/types/theme/colorRules.d.ts +6 -0
- package/types/theme/colorRules.d.ts.map +1 -1
- package/types/theme/controlTiers.d.ts +5 -3
- package/types/theme/controlTiers.d.ts.map +1 -1
- package/types/theme/defaults/fonts.d.ts +30 -30
- package/types/theme/defaults/fonts.d.ts.map +1 -1
- package/types/theme/glyphTint.d.ts +0 -6
- package/types/theme/glyphTint.d.ts.map +1 -1
- package/types/theme/hairline.d.ts +14 -3
- package/types/theme/hairline.d.ts.map +1 -1
- package/types/theme/readableColor.d.ts +19 -0
- package/types/theme/readableColor.d.ts.map +1 -1
- package/types/theme/resolveKnobs.d.ts.map +1 -1
|
@@ -656,45 +656,26 @@ export interface ResolveKnobsEnvironment {
|
|
|
656
656
|
painted?: boolean;
|
|
657
657
|
}
|
|
658
658
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
const nestedHitSlop = pressTargetHitSlop(nestedPx);
|
|
671
|
-
const touch = environment?.touch ?? (isTouchable || isWebTouchable);
|
|
672
|
-
const sizeRecipe = sizeRecipeForToken(sizeToken, { touch });
|
|
673
|
-
const menuRowRecipe = sizeRecipeForToken(sizeToken, { touch, family: "menuRow" });
|
|
674
|
-
const tabRecipe = sizeRecipeForToken(sizeToken, { touch, family: "tab" });
|
|
675
|
-
const scaleTokens = getActiveScaleTokens();
|
|
676
|
-
const paddingToken = spacingRoles.panelPadding;
|
|
677
|
-
const fontWeightValue = fontWeightMap[knobs.fontWeight];
|
|
678
|
-
const bodyFontValue = bodyFontMap[knobs.bodyFont] ?? "$body";
|
|
679
|
-
const motion = motionFor(knobs.animation);
|
|
680
|
-
|
|
681
|
-
const containerRadiusValue = capContainerRadius(knobs.borderRadius);
|
|
682
|
-
|
|
683
|
-
// Corner smoothing rides every radius-bearing fragment so consumers need
|
|
684
|
-
// zero edits (KNOB-TOTALITY, LC-18). Identity guard (Axiom 3 NULL +
|
|
685
|
-
// R-BINARY/R-PILL): `none` has no arc to smooth, and at `full` the
|
|
686
|
-
// uncapped token turns control-tier parts into circles/capsules whose
|
|
687
|
-
// shape is identity — squircle ends would distort them — so the
|
|
688
|
-
// raw-radius fragments only smooth the arc classes (small/medium/large).
|
|
689
|
-
// Capped container fragments stay plain arcs at every knob (the Axiom 1
|
|
690
|
-
// cap = padding px, which superellipse corners under-fill, so the cap
|
|
691
|
-
// remains a safe over-approximation) and smooth whenever a nonzero arc
|
|
692
|
-
// exists. featureSurface smooths on the same rule: `none` has no arc.
|
|
659
|
+
// Corner smoothing rides every radius-bearing fragment so consumers need
|
|
660
|
+
// zero edits (KNOB-TOTALITY, LC-18). Identity guard (Axiom 3 NULL +
|
|
661
|
+
// R-BINARY/R-PILL): `none` has no arc to smooth, and at `full` the
|
|
662
|
+
// uncapped token turns control-tier parts into circles/capsules whose
|
|
663
|
+
// shape is identity — squircle ends would distort them — so the
|
|
664
|
+
// raw-radius fragments only smooth the arc classes (small/medium/large).
|
|
665
|
+
// Capped container fragments stay plain arcs at every knob (the Axiom 1
|
|
666
|
+
// cap = padding px, which superellipse corners under-fill, so the cap
|
|
667
|
+
// remains a safe over-approximation) and smooth whenever a nonzero arc
|
|
668
|
+
// exists. featureSurface smooths on the same rule: `none` has no arc.
|
|
669
|
+
function smoothingFor(knobs: Knobs) {
|
|
693
670
|
const smoothing = cornerSmoothingStyle[knobs.cornerSmoothing ?? "round"];
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
|
|
671
|
+
const arcless = knobs.borderRadius === "none";
|
|
672
|
+
return {
|
|
673
|
+
scaleSmoothing: arcless || knobs.borderRadius === "full" ? undefined : smoothing,
|
|
674
|
+
containerSmoothing: arcless ? undefined : smoothing,
|
|
675
|
+
};
|
|
676
|
+
}
|
|
697
677
|
|
|
678
|
+
function edgeRulesFor(knobs: Knobs) {
|
|
698
679
|
const outlined = knobs.fillStyle === "outlined";
|
|
699
680
|
// LC-86 OUTLINED-HAIRLINE: outlined implies a minimum border. none on an
|
|
700
681
|
// outlined control still draws the enumerated `small` stop. Chromeless
|
|
@@ -703,30 +684,22 @@ export function resolveKnobs(
|
|
|
703
684
|
const borderWidthValue = smallEdge ? borderWidthMap.small : borderWidthMap[knobs.borderWidth];
|
|
704
685
|
const edge = (color: string, width: number) =>
|
|
705
686
|
smallEdge && width >= borderWidthMap.medium ? fainterEdge(color) : color;
|
|
706
|
-
const elevationToken = elevationMap[knobs.elevation];
|
|
707
|
-
const overlayElevationToken = overlayElevationMap[knobs.elevation];
|
|
708
|
-
const overlayPaintProps = elevationPaint(overlayElevationToken);
|
|
709
687
|
const overlayEdgeWidth = Math.max(borderWidthValue, borderWidthMap.small);
|
|
710
688
|
// LC-85's floor is the small stop, so the floored edge takes its colour too.
|
|
689
|
+
const flooredSmall = smallEdge || knobs.borderWidth === "none";
|
|
711
690
|
const overlayEdge = (color: string) =>
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
const elevationChrome = elevationChromeFor(elevationToken);
|
|
716
|
-
const textAccentColor = textAccentColorMap[knobs.textAccent] ?? "$color";
|
|
717
|
-
// One input surface (DF-19 / Axiom 5 ONE SOURCE): Timeline's composer,
|
|
718
|
-
// RichEditor and form fields agree on what an input surface is.
|
|
719
|
-
// MPO-19 X6: `$background` not `$color2` so a surface sub-theme can move it.
|
|
720
|
-
const inputBackground = outlined ? "transparent" : "$background";
|
|
691
|
+
flooredSmall && overlayEdgeWidth >= borderWidthMap.medium ? fainterEdge(color) : color;
|
|
692
|
+
return { outlined, smallEdge, borderWidthValue, edge, overlayEdgeWidth, overlayEdge };
|
|
693
|
+
}
|
|
721
694
|
|
|
695
|
+
const nonEmpty = <T extends object>(obj: T): T | undefined =>
|
|
696
|
+
Object.keys(obj).length > 0 ? obj : undefined;
|
|
697
|
+
|
|
698
|
+
function stateRecipesFor(knobs: Knobs) {
|
|
722
699
|
const hover = resolveStateKnobs(knobs.hover);
|
|
723
700
|
const press = resolveStateKnobs(knobs.press);
|
|
724
701
|
const focus = resolveStateKnobs(knobs.focus);
|
|
725
702
|
const focusVisible = resolveStateKnobs(knobs.focusVisible);
|
|
726
|
-
|
|
727
|
-
const nonEmpty = <T extends object>(obj: T): T | undefined =>
|
|
728
|
-
Object.keys(obj).length > 0 ? obj : undefined;
|
|
729
|
-
|
|
730
703
|
// DG-STATE-01: hover/press always carry on-color state-layer fills.
|
|
731
704
|
// DG-A11Y-01: focus-visible ring is always present and non-removable.
|
|
732
705
|
const control: KnobRecipe<ControlStateProps> = {
|
|
@@ -747,6 +720,136 @@ export function resolveKnobs(
|
|
|
747
720
|
focusKnobProps: nonEmpty(focus.elevation),
|
|
748
721
|
focusVisibleKnobProps: nonEmpty(focusVisible.elevation),
|
|
749
722
|
};
|
|
723
|
+
return { control, text, elevation };
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
function boldWeight(knobs: Knobs): { fontWeight?: "700" } {
|
|
727
|
+
return knobs.fontWeight === "bold" ? { fontWeight: "700" } : {};
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
/** LC-151 card edge width: none draws none, large its stop, else the small hairline. */
|
|
731
|
+
function cardEdgeWidth(borderWidth: Knobs["borderWidth"]): number {
|
|
732
|
+
if (borderWidth === "none") return 0;
|
|
733
|
+
if (borderWidth === "large") return borderWidthMap.large;
|
|
734
|
+
return borderWidthMap.small;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
interface SurfaceFrame {
|
|
738
|
+
painted: boolean;
|
|
739
|
+
radius: string | number;
|
|
740
|
+
smoothing: { className: string } | undefined;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
// LC-151: a top-level card is the grouped white step ($background inside
|
|
744
|
+
// the Card template) with a hairline edge and a hair of lift. Under a
|
|
745
|
+
// painted ancestor it is one fill step off its parent, edge and lift off,
|
|
746
|
+
// so a card on a card never stacks a second shadow (WP-c2).
|
|
747
|
+
function cardSurfaceFor(
|
|
748
|
+
knobs: Knobs,
|
|
749
|
+
scheme: ColorScheme,
|
|
750
|
+
frame: SurfaceFrame & { padding: string },
|
|
751
|
+
) {
|
|
752
|
+
const { painted, radius, padding, smoothing } = frame;
|
|
753
|
+
if (painted) {
|
|
754
|
+
return { backgroundColor: paintedCardFill, borderRadius: radius, padding, ...smoothing };
|
|
755
|
+
}
|
|
756
|
+
return {
|
|
757
|
+
backgroundColor: "$background",
|
|
758
|
+
borderColor:
|
|
759
|
+
knobs.borderWidth === "large" ? "$borderColor" : edgeColorAt("$borderColor", "small"),
|
|
760
|
+
borderWidth: cardEdgeWidth(knobs.borderWidth),
|
|
761
|
+
borderRadius: radius,
|
|
762
|
+
padding,
|
|
763
|
+
...cardLiftFor(cardElevationMap[knobs.elevation], scheme),
|
|
764
|
+
...smoothing,
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
function elevatedSurfaceFor(
|
|
769
|
+
scheme: ColorScheme,
|
|
770
|
+
frame: Omit<SurfaceFrame, "radius"> & {
|
|
771
|
+
radius: string;
|
|
772
|
+
edge: string;
|
|
773
|
+
edgeWidth: number;
|
|
774
|
+
elevationToken: SizeKey | undefined;
|
|
775
|
+
},
|
|
776
|
+
) {
|
|
777
|
+
const { painted, radius, smoothing, edge, edgeWidth, elevationToken } = frame;
|
|
778
|
+
if (painted) {
|
|
779
|
+
return {
|
|
780
|
+
backgroundColor: "$background",
|
|
781
|
+
borderColor: edge,
|
|
782
|
+
borderWidth: edgeWidth,
|
|
783
|
+
borderRadius: radius,
|
|
784
|
+
elevation: undefined,
|
|
785
|
+
...smoothing,
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
if (scheme === "dark") {
|
|
789
|
+
// Dark draws no edge at all: on iOS a transparent border on a sheet
|
|
790
|
+
// mounted under a light OS painted the light $borderColor, and it lifts
|
|
791
|
+
// by its lighter fill, as the card lift does: a black shadow on a
|
|
792
|
+
// near-black page reads as a smudge (FZ-8116).
|
|
793
|
+
return {
|
|
794
|
+
backgroundColor: surface2.fill,
|
|
795
|
+
borderColor: "transparent",
|
|
796
|
+
borderWidth: 0,
|
|
797
|
+
borderRadius: radius,
|
|
798
|
+
elevation: undefined,
|
|
799
|
+
...smoothing,
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
// Light: an overlay fills the page's own white, so it always keeps at
|
|
803
|
+
// least the hairline, even on a chromeless preset (FZ-8116).
|
|
804
|
+
return {
|
|
805
|
+
backgroundColor: "$background",
|
|
806
|
+
borderColor: edge,
|
|
807
|
+
borderWidth: edgeWidth,
|
|
808
|
+
borderRadius: radius,
|
|
809
|
+
elevation: platformElevation(elevationToken),
|
|
810
|
+
...elevationPaint(elevationToken),
|
|
811
|
+
...smoothing,
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
export function resolveKnobs(
|
|
816
|
+
knobs: Knobs,
|
|
817
|
+
override?: KnobPropsOverride,
|
|
818
|
+
scheme: ColorScheme = "light",
|
|
819
|
+
environment?: ResolveKnobsEnvironment,
|
|
820
|
+
): ResolvedKnobs {
|
|
821
|
+
const radiusToken = borderRadiusMap[knobs.borderRadius];
|
|
822
|
+
const nestedRadiusToken = nestedRadiusMap[knobs.borderRadius];
|
|
823
|
+
const sizeToken = normalizeSizeToken(environment?.sizeToken);
|
|
824
|
+
const painted = environment?.painted ?? false;
|
|
825
|
+
const nestedPx = nestedControlPx(sizeToken);
|
|
826
|
+
const nestedHitSlop = pressTargetHitSlop(nestedPx);
|
|
827
|
+
const touch = environment?.touch ?? (isTouchable || isWebTouchable);
|
|
828
|
+
const sizeRecipe = sizeRecipeForToken(sizeToken, { touch });
|
|
829
|
+
const menuRowRecipe = sizeRecipeForToken(sizeToken, { touch, family: "menuRow" });
|
|
830
|
+
const tabRecipe = sizeRecipeForToken(sizeToken, { touch, family: "tab" });
|
|
831
|
+
const scaleTokens = getActiveScaleTokens();
|
|
832
|
+
const paddingToken = spacingRoles.panelPadding;
|
|
833
|
+
const fontWeightValue = fontWeightMap[knobs.fontWeight];
|
|
834
|
+
const bodyFontValue = bodyFontMap[knobs.bodyFont] ?? "$body";
|
|
835
|
+
const motion = motionFor(knobs.animation);
|
|
836
|
+
|
|
837
|
+
const containerRadiusValue = capContainerRadius(knobs.borderRadius);
|
|
838
|
+
|
|
839
|
+
const { scaleSmoothing, containerSmoothing } = smoothingFor(knobs);
|
|
840
|
+
const { outlined, smallEdge, borderWidthValue, edge, overlayEdgeWidth, overlayEdge } =
|
|
841
|
+
edgeRulesFor(knobs);
|
|
842
|
+
const elevationToken = elevationMap[knobs.elevation];
|
|
843
|
+
const overlayElevationToken = overlayElevationMap[knobs.elevation];
|
|
844
|
+
const elevationChrome = elevationChromeFor(elevationToken);
|
|
845
|
+
const textAccentColor = textAccentColorMap[knobs.textAccent] ?? "$color";
|
|
846
|
+
// One input surface (DF-19 / Axiom 5 ONE SOURCE): Timeline's composer,
|
|
847
|
+
// RichEditor and form fields agree on what an input surface is.
|
|
848
|
+
// MPO-19 X6: `$background` not `$color2` so a surface sub-theme can move it.
|
|
849
|
+
const inputBackground = outlined ? "transparent" : "$background";
|
|
850
|
+
|
|
851
|
+
const { control, text, elevation } = stateRecipesFor(knobs);
|
|
852
|
+
const bold = boldWeight(knobs);
|
|
750
853
|
|
|
751
854
|
const nestedRadius = { borderRadius: nestedRadiusToken, ...containerSmoothing };
|
|
752
855
|
|
|
@@ -786,52 +889,20 @@ export function resolveKnobs(
|
|
|
786
889
|
// the Card template) with a hairline edge and a hair of lift. Under a
|
|
787
890
|
// painted ancestor it is one fill step off its parent, edge and lift off,
|
|
788
891
|
// so a card on a card never stacks a second shadow (WP-c2).
|
|
789
|
-
cardSurface:
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
: knobs.borderWidth === "large"
|
|
804
|
-
? borderWidthMap.large
|
|
805
|
-
: borderWidthMap.small,
|
|
806
|
-
borderRadius: containerRadiusValue,
|
|
807
|
-
padding: paddingToken,
|
|
808
|
-
...cardLiftFor(cardElevationMap[knobs.elevation], scheme),
|
|
809
|
-
...containerSmoothing,
|
|
810
|
-
},
|
|
811
|
-
elevatedSurface: painted
|
|
812
|
-
? {
|
|
813
|
-
backgroundColor: "$background",
|
|
814
|
-
borderColor: overlayEdge("$borderColor"),
|
|
815
|
-
borderWidth: overlayEdgeWidth,
|
|
816
|
-
borderRadius: radiusToken,
|
|
817
|
-
elevation: undefined,
|
|
818
|
-
...scaleSmoothing,
|
|
819
|
-
}
|
|
820
|
-
: {
|
|
821
|
-
backgroundColor: scheme === "dark" ? surface2.fill : "$background",
|
|
822
|
-
// Light: an overlay fills the page's own white, so it always keeps at
|
|
823
|
-
// least the hairline, even on a chromeless preset (FZ-8116).
|
|
824
|
-
borderColor: scheme === "dark" ? "transparent" : overlayEdge("$borderColor"),
|
|
825
|
-
// Dark draws no edge at all: on iOS a transparent border on a sheet
|
|
826
|
-
// mounted under a light OS painted the light $borderColor (FZ-8116).
|
|
827
|
-
borderWidth: scheme === "dark" ? 0 : overlayEdgeWidth,
|
|
828
|
-
borderRadius: radiusToken,
|
|
829
|
-
elevation: scheme === "dark" ? undefined : platformElevation(overlayElevationToken),
|
|
830
|
-
// Dark lifts an overlay by its lighter fill, as the card lift does: a
|
|
831
|
-
// black shadow on a near-black page reads as a smudge (FZ-8116).
|
|
832
|
-
...(scheme === "dark" ? undefined : overlayPaintProps),
|
|
833
|
-
...scaleSmoothing,
|
|
834
|
-
},
|
|
892
|
+
cardSurface: cardSurfaceFor(knobs, scheme, {
|
|
893
|
+
painted,
|
|
894
|
+
radius: containerRadiusValue,
|
|
895
|
+
padding: paddingToken,
|
|
896
|
+
smoothing: containerSmoothing,
|
|
897
|
+
}),
|
|
898
|
+
elevatedSurface: elevatedSurfaceFor(scheme, {
|
|
899
|
+
painted,
|
|
900
|
+
radius: radiusToken,
|
|
901
|
+
smoothing: scaleSmoothing,
|
|
902
|
+
edge: overlayEdge("$borderColor"),
|
|
903
|
+
edgeWidth: overlayEdgeWidth,
|
|
904
|
+
elevationToken: overlayElevationToken,
|
|
905
|
+
}),
|
|
835
906
|
featureSurface: {
|
|
836
907
|
backgroundColor: "$background",
|
|
837
908
|
borderRadius: featureRadiusMap[knobs.borderRadius],
|
|
@@ -854,7 +925,7 @@ export function resolveKnobs(
|
|
|
854
925
|
label: {
|
|
855
926
|
fontSize: labelFontSizeFor(sizeToken),
|
|
856
927
|
fontFamily: bodyFontValue,
|
|
857
|
-
...
|
|
928
|
+
...bold,
|
|
858
929
|
},
|
|
859
930
|
nestedControl: {
|
|
860
931
|
px: nestedPx,
|
|
@@ -896,7 +967,7 @@ export function resolveKnobs(
|
|
|
896
967
|
},
|
|
897
968
|
heading: {
|
|
898
969
|
fontFamily: headingFontMap[knobs.headingFont],
|
|
899
|
-
...
|
|
970
|
+
...bold,
|
|
900
971
|
},
|
|
901
972
|
pageTitle: resolvePageTitleScale(knobs.pageTitleScale ?? "moderate"),
|
|
902
973
|
textRole: resolveTextRoles(sizeToken, knobs.fontWeight === "bold"),
|
package/types/expo.d.ts
CHANGED
|
@@ -26,4 +26,14 @@ export declare function createExpoThemeColors({ preset, presets, themes, adaptiv
|
|
|
26
26
|
backgroundColor: string;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* The expo-font config plugin entry that embeds MPO's Inter faces in the
|
|
31
|
+
* native binary (FZ-8572), plus any extra font files an app passes. A
|
|
32
|
+
* production vxrn bundle carries no .otf assets, so a face that is only
|
|
33
|
+
* loaded at runtime falls back to the system font. Embedding needs a
|
|
34
|
+
* prebuild and a new binary; an OTA cannot add it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function interExpoFontPlugin(extraFonts?: string[]): ["expo-font", {
|
|
37
|
+
fonts: string[];
|
|
38
|
+
}];
|
|
29
39
|
//# sourceMappingURL=expo.d.ts.map
|
package/types/expo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../src/expo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expo.d.ts","sourceRoot":"","sources":["../src/expo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAWxE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,CAAC;AAE5F,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,GAAG;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IACnE,kBAAkB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACvC;AAYD,wBAAgB,qBAAqB,CAAC,EACpC,MAAkB,EAClB,OAAwB,EACxB,MAIU,EACV,kBAA4B,GAC7B,GAAE,qBAA0B;;;;;;;;;;EAuB5B;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,GAAE,MAAM,EAAO,GAAG,CAAC,WAAW,EAAE;IAAE,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAUjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFontLoader.d.ts","sourceRoot":"","sources":["../../src/fonts/createFontLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"createFontLoader.d.ts","sourceRoot":"","sources":["../../src/fonts/createFontLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CAmBrE"}
|
package/types/fonts/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fonts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fonts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Inter faces MPO ships, by weight, named by each OTF's PostScript name
|
|
3
|
+
* (FZ-8572). One table feeds the native face map, the runtime font loader and
|
|
4
|
+
* the expo-font config plugin, so every name tamagui asks for on native is a
|
|
5
|
+
* font the app either embeds or loads.
|
|
6
|
+
*
|
|
7
|
+
* PostScript names, not aliases: the expo-font config plugin embeds a file
|
|
8
|
+
* and iOS registers it under its PostScript name, and Android resolves a
|
|
9
|
+
* family by the file's base name in assets/fonts. @tamagui/font-inter names
|
|
10
|
+
* each file after its PostScript name, so `Inter-SemiBold` is all three.
|
|
11
|
+
*/
|
|
12
|
+
export declare const interFaceNames: {
|
|
13
|
+
readonly 400: "Inter-Regular";
|
|
14
|
+
readonly 500: "Inter-Medium";
|
|
15
|
+
readonly 600: "Inter-SemiBold";
|
|
16
|
+
readonly 700: "Inter-Bold";
|
|
17
|
+
readonly 800: "Inter-ExtraBold";
|
|
18
|
+
};
|
|
19
|
+
export type InterWeight = keyof typeof interFaceNames;
|
|
20
|
+
export type InterFaceName = (typeof interFaceNames)[InterWeight];
|
|
21
|
+
/** The OTF file in @tamagui/font-inter for a face. */
|
|
22
|
+
export declare function interFaceFile(name: InterFaceName): string;
|
|
23
|
+
//# sourceMappingURL=interFaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interFaces.d.ts","sourceRoot":"","sources":["../../src/fonts/interFaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,cAAc,CAAC;AACtD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,WAAW,CAAC,CAAC;AAEjE,sDAAsD;AACtD,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAEzD"}
|
|
@@ -138,6 +138,12 @@ export declare function pickReadableForeground(fill: string, candidateA: string,
|
|
|
138
138
|
* fails to parse.
|
|
139
139
|
*/
|
|
140
140
|
export declare function holdInkFloor(fill: string, ink: string, floor?: number): string;
|
|
141
|
+
/**
|
|
142
|
+
* `hue` moved toward the scheme's ink pole (black on a light page, white on a
|
|
143
|
+
* dark one) by the least amount that clears `floor` on every surface, so the
|
|
144
|
+
* hue survives and only its lightness gives.
|
|
145
|
+
*/
|
|
146
|
+
export declare function holdHueToFloor(hue: string, surfaces: readonly (string | undefined)[], dark: boolean, floor: number): string;
|
|
141
147
|
/**
|
|
142
148
|
* Given a 12-color scale (hex strings), a background step, and a starting
|
|
143
149
|
* text step, scan towards `preferredDir` for the first step whose contrast
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorRules.d.ts","sourceRoot":"","sources":["../../src/theme/colorRules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAYH,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA6BzD;AAED,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED,yCAAyC;AACzC,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAG5D;AAQD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAarE;AAED,iEAAiE;AACjE,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;CAAuC,CAAC;AACvE,eAAO,MAAM,iBAAiB;;;CAAsD,CAAC;AAErF,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAGrD;AA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AAE,EAAE,SAAS,CAAC;IACd,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,iBAI1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,oBAGzB,CAAC;AAEF,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,oJAErC;AAID,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,cAAc,EAAE,aAAa,EAMzC,CAAC;AAEF,6FAA6F;AAC7F,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,IAAI,CASlE"}
|
|
@@ -15,9 +15,11 @@
|
|
|
15
15
|
* wash on hover and press. The bar's position carries the affordance.
|
|
16
16
|
*
|
|
17
17
|
* Disabled, both tiers drain the fill to transparent and set the ink on
|
|
18
|
-
* `$
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* `$textMuted`, the secondary ink (LC-152), which clears 7:1 on the page in
|
|
19
|
+
* both schemes. Under a tint it stays neutral: a tint's `$color9` is its
|
|
20
|
+
* hue's solid step, the colour of a live action, so a disabled label inked
|
|
21
|
+
* with it read as available (FZ-8939, LC-40). The tinted tier keeps LC-40's
|
|
22
|
+
* `$color6` edge so the drained box still reads as a control.
|
|
21
23
|
*/
|
|
22
24
|
export type ControlTier = "tinted" | "plain";
|
|
23
25
|
export interface ControlTierPaint {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controlTiers.d.ts","sourceRoot":"","sources":["../../src/theme/controlTiers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"controlTiers.d.ts","sourceRoot":"","sources":["../../src/theme/controlTiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAUD,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,UAAQ,GAAG,gBAAgB,CAGjF;AAED,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,OAAO,EACb,QAAQ,UAAQ,GACf,gBAAgB,CAGlB;AAED,mEAAmE;AACnE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG;IACtD,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAMA;AAED,uFAAuF;AACvF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAExE"}
|
|
@@ -35,19 +35,19 @@ export declare function createCategoryFont(category: FontCategory, family: strin
|
|
|
35
35
|
export declare function createHeadingFont(tables?: ScaleFonts): import("@tamagui/web").FillInFont<{
|
|
36
36
|
face: {
|
|
37
37
|
readonly 400: {
|
|
38
|
-
|
|
38
|
+
normal: "Inter-Regular";
|
|
39
39
|
};
|
|
40
40
|
readonly 500: {
|
|
41
|
-
|
|
41
|
+
normal: "Inter-Medium";
|
|
42
42
|
};
|
|
43
43
|
readonly 600: {
|
|
44
|
-
|
|
44
|
+
normal: "Inter-SemiBold";
|
|
45
45
|
};
|
|
46
46
|
readonly 700: {
|
|
47
|
-
|
|
47
|
+
normal: "Inter-Bold";
|
|
48
48
|
};
|
|
49
49
|
readonly 800: {
|
|
50
|
-
|
|
50
|
+
normal: "Inter-ExtraBold";
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
size: {
|
|
@@ -95,19 +95,19 @@ export declare function createHeadingFont(tables?: ScaleFonts): import("@tamagui
|
|
|
95
95
|
export declare function createBodyFont(tables?: ScaleFonts): import("@tamagui/web").FillInFont<{
|
|
96
96
|
face: {
|
|
97
97
|
readonly 400: {
|
|
98
|
-
|
|
98
|
+
normal: "Inter-Regular";
|
|
99
99
|
};
|
|
100
100
|
readonly 500: {
|
|
101
|
-
|
|
101
|
+
normal: "Inter-Medium";
|
|
102
102
|
};
|
|
103
103
|
readonly 600: {
|
|
104
|
-
|
|
104
|
+
normal: "Inter-SemiBold";
|
|
105
105
|
};
|
|
106
106
|
readonly 700: {
|
|
107
|
-
|
|
107
|
+
normal: "Inter-Bold";
|
|
108
108
|
};
|
|
109
109
|
readonly 800: {
|
|
110
|
-
|
|
110
|
+
normal: "Inter-ExtraBold";
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
size: {
|
|
@@ -154,19 +154,19 @@ export declare function createBodyFont(tables?: ScaleFonts): import("@tamagui/we
|
|
|
154
154
|
export declare const defaultHeadingFont: import("@tamagui/web").FillInFont<{
|
|
155
155
|
face: {
|
|
156
156
|
readonly 400: {
|
|
157
|
-
|
|
157
|
+
normal: "Inter-Regular";
|
|
158
158
|
};
|
|
159
159
|
readonly 500: {
|
|
160
|
-
|
|
160
|
+
normal: "Inter-Medium";
|
|
161
161
|
};
|
|
162
162
|
readonly 600: {
|
|
163
|
-
|
|
163
|
+
normal: "Inter-SemiBold";
|
|
164
164
|
};
|
|
165
165
|
readonly 700: {
|
|
166
|
-
|
|
166
|
+
normal: "Inter-Bold";
|
|
167
167
|
};
|
|
168
168
|
readonly 800: {
|
|
169
|
-
|
|
169
|
+
normal: "Inter-ExtraBold";
|
|
170
170
|
};
|
|
171
171
|
};
|
|
172
172
|
size: {
|
|
@@ -213,19 +213,19 @@ export declare const defaultHeadingFont: import("@tamagui/web").FillInFont<{
|
|
|
213
213
|
export declare const defaultBodyFont: import("@tamagui/web").FillInFont<{
|
|
214
214
|
face: {
|
|
215
215
|
readonly 400: {
|
|
216
|
-
|
|
216
|
+
normal: "Inter-Regular";
|
|
217
217
|
};
|
|
218
218
|
readonly 500: {
|
|
219
|
-
|
|
219
|
+
normal: "Inter-Medium";
|
|
220
220
|
};
|
|
221
221
|
readonly 600: {
|
|
222
|
-
|
|
222
|
+
normal: "Inter-SemiBold";
|
|
223
223
|
};
|
|
224
224
|
readonly 700: {
|
|
225
|
-
|
|
225
|
+
normal: "Inter-Bold";
|
|
226
226
|
};
|
|
227
227
|
readonly 800: {
|
|
228
|
-
|
|
228
|
+
normal: "Inter-ExtraBold";
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
231
|
size: {
|
|
@@ -306,19 +306,19 @@ export declare const defaultFonts: {
|
|
|
306
306
|
readonly heading: import("@tamagui/web").FillInFont<{
|
|
307
307
|
face: {
|
|
308
308
|
readonly 400: {
|
|
309
|
-
|
|
309
|
+
normal: "Inter-Regular";
|
|
310
310
|
};
|
|
311
311
|
readonly 500: {
|
|
312
|
-
|
|
312
|
+
normal: "Inter-Medium";
|
|
313
313
|
};
|
|
314
314
|
readonly 600: {
|
|
315
|
-
|
|
315
|
+
normal: "Inter-SemiBold";
|
|
316
316
|
};
|
|
317
317
|
readonly 700: {
|
|
318
|
-
|
|
318
|
+
normal: "Inter-Bold";
|
|
319
319
|
};
|
|
320
320
|
readonly 800: {
|
|
321
|
-
|
|
321
|
+
normal: "Inter-ExtraBold";
|
|
322
322
|
};
|
|
323
323
|
};
|
|
324
324
|
size: {
|
|
@@ -365,19 +365,19 @@ export declare const defaultFonts: {
|
|
|
365
365
|
readonly body: import("@tamagui/web").FillInFont<{
|
|
366
366
|
face: {
|
|
367
367
|
readonly 400: {
|
|
368
|
-
|
|
368
|
+
normal: "Inter-Regular";
|
|
369
369
|
};
|
|
370
370
|
readonly 500: {
|
|
371
|
-
|
|
371
|
+
normal: "Inter-Medium";
|
|
372
372
|
};
|
|
373
373
|
readonly 600: {
|
|
374
|
-
|
|
374
|
+
normal: "Inter-SemiBold";
|
|
375
375
|
};
|
|
376
376
|
readonly 700: {
|
|
377
|
-
|
|
377
|
+
normal: "Inter-Bold";
|
|
378
378
|
};
|
|
379
379
|
readonly 800: {
|
|
380
|
-
|
|
380
|
+
normal: "Inter-ExtraBold";
|
|
381
381
|
};
|
|
382
382
|
};
|
|
383
383
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/theme/defaults/fonts.ts"],"names":[],"mappings":"AAKA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/theme/defaults/fonts.ts"],"names":[],"mappings":"AAKA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAI5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAmBxE,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAmCD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAsC,CAAC;AAExF,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEtD,CAAC;AAOF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,8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M,gBAAgB,aAAsD,CAAC;AACpF,eAAO,MAAM,sBAAsB,aAGlC,CAAC;AACF,eAAO,MAAM,oBAAoB,aAA8D,CAAC;AAEhG,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAWoC,CAAC;AAEzE,eAAO,MAAM,uBAAuB,aAKnC,CAAC;AACF,eAAO,MAAM,sBAAsB,aAKlC,CAAC;AACF,eAAO,MAAM,sBAAsB,aAKlC,CAAC;AACF,eAAO,MAAM,yBAAyB,aAKrC,CAAC;AACF,eAAO,MAAM,2BAA2B,aAKvC,CAAC;AACF,eAAO,MAAM,yBAAyB,aAKrC,CAAC;AACF,eAAO,MAAM,6BAA6B,aAKzC,CAAC;AACF,eAAO,MAAM,uBAAuB,aAKnC,CAAC;AACF,eAAO,MAAM,6BAA6B,aAKzC,CAAC;AACF,eAAO,MAAM,2BAA2B,aAKvC,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBf,CAAC;AAsDX,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAClC,MAAM,GAAE,UAA8B,GACrC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAsB7B;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,UAAU,GACjB,WAAW,GAAG,SAAS,CAGzB"}
|
|
@@ -21,12 +21,6 @@ export declare const GLYPH_CONTRAST_FLOOR = 3;
|
|
|
21
21
|
export declare function platformSystemTint(dark: boolean): string;
|
|
22
22
|
/** Renders a subtree under another fallback, so one Storybook build can compare them. */
|
|
23
23
|
export declare const GlyphTintFallbackProvider: import("react").Provider<GlyphTintFallback>;
|
|
24
|
-
/**
|
|
25
|
-
* `hue` moved toward the scheme's ink pole (black on a light page, white on a
|
|
26
|
-
* dark one) by the least amount that clears `floor` on every surface, so the
|
|
27
|
-
* hue survives and only its lightness gives.
|
|
28
|
-
*/
|
|
29
|
-
export declare function holdHueToFloor(hue: string, surfaces: readonly (string | undefined)[], dark: boolean, floor: number): string;
|
|
30
24
|
export interface ResolveGlyphTintInput {
|
|
31
25
|
/** The theme's own identity hue on the page, when it has one. */
|
|
32
26
|
hue: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyphTint.d.ts","sourceRoot":"","sources":["../../src/theme/glyphTint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"glyphTint.d.ts","sourceRoot":"","sources":["../../src/theme/glyphTint.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAAyB,CAAC;AAQ1D,mEAAmE;AACnE,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAExD;AAID,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,6CAAoC,CAAC;AAE3E,MAAM,WAAW,qBAAqB;IACpC,iEAAiE;IACjE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;IAC1C,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,qBAAqB,GAAG;IAC/F,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CASA;AAED,kEAAkE;AAClE,wBAAgB,qBAAqB,IAAI;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAQxE"}
|