@multiplatform.one/theme 7.4.1 → 7.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/README.md +2 -1
- package/package.json +5 -5
- package/src/figma/figmaTokens.spec.ts +25 -21
- package/src/figma/figmaTokens.ts +2 -2
- package/src/font.ts +6 -19
- package/src/keyboardFocusRing.ts +12 -6
- package/src/theme/FontKnobStyles.tsx +5 -3
- package/src/theme/Tint.tsx +3 -2
- package/src/theme/animations/css.ts +14 -1
- package/src/theme/colorRules.spec.ts +233 -2
- package/src/theme/colorRules.ts +118 -0
- package/src/theme/cornerSmoothing.native.ts +39 -2
- package/src/theme/cornerSmoothing.spec.ts +213 -3
- package/src/theme/cornerSmoothing.ts +132 -10
- package/src/theme/createDefaultThemeConfig.spec.ts +107 -1
- package/src/theme/createDefaultThemeConfig.ts +27 -8
- package/src/theme/defaults/builderOptions.ts +23 -10
- package/src/theme/defaults/categoryFonts.ts +21 -0
- package/src/theme/defaults/fonts.spec.ts +93 -10
- package/src/theme/defaults/fonts.theme.spec.tsx +128 -0
- package/src/theme/defaults/fonts.ts +155 -27
- package/src/theme/defaults/index.ts +1 -0
- package/src/theme/devtools/ThemeDevtoolsPanel.tsx +0 -11
- package/src/theme/focusState.spec.ts +110 -1
- package/src/theme/focusState.ts +32 -7
- package/src/theme/fontCategoryStacks.ts +24 -0
- package/src/theme/fontKnobStyles.spec.ts +15 -2
- package/src/theme/glyphPaint.spec.ts +26 -0
- package/src/theme/glyphPaint.ts +46 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/knobs.ts +18 -2
- package/src/theme/layoutTokens.spec.ts +3 -1
- package/src/theme/layoutTokens.ts +47 -4
- package/src/theme/mpo13Proof.spec.ts +3 -3
- package/src/theme/mpo19Proof.spec.ts +285 -0
- package/src/theme/presets.ts +1 -1
- package/src/theme/radiusClass.spec.ts +394 -0
- package/src/theme/radiusClass.ts +203 -4
- package/src/theme/radiusClassTable.generated.ts +121 -0
- package/src/theme/recipeInputs.ts +223 -36
- package/src/theme/recipes.ts +68 -4
- package/src/theme/resolveKnobs.spec.ts +139 -11
- package/src/theme/resolveKnobs.ts +190 -25
- package/src/theme/sizeLadder.spec.ts +84 -0
- package/src/theme/sizeRecipes.spec.ts +19 -6
- package/src/theme/sizeRecipes.ts +43 -13
- package/src/theme/theme.native.tsx +2 -0
- package/src/theme/theme.provider.spec.ts +9 -0
- package/src/theme/theme.tsx +6 -3
- package/src/theme/tint.spec.tsx +36 -35
- package/src/theme/useResolvedKnobs.ts +6 -3
- package/types/figma/figmaTokens.d.ts +1 -1
- package/types/figma/figmaTokens.d.ts.map +1 -1
- package/types/font.d.ts.map +1 -1
- package/types/keyboardFocusRing.d.ts +11 -5
- package/types/keyboardFocusRing.d.ts.map +1 -1
- package/types/theme/FontKnobStyles.d.ts +2 -1
- package/types/theme/FontKnobStyles.d.ts.map +1 -1
- package/types/theme/Tint.d.ts +2 -1
- package/types/theme/Tint.d.ts.map +1 -1
- package/types/theme/animations/css.d.ts +15 -2
- package/types/theme/animations/css.d.ts.map +1 -1
- package/types/theme/colorRules.d.ts +59 -1
- package/types/theme/colorRules.d.ts.map +1 -1
- package/types/theme/cornerSmoothing.d.ts +42 -20
- package/types/theme/cornerSmoothing.d.ts.map +1 -1
- package/types/theme/cornerSmoothing.native.d.ts +22 -2
- package/types/theme/cornerSmoothing.native.d.ts.map +1 -1
- package/types/theme/createDefaultThemeConfig.d.ts +21 -3
- package/types/theme/createDefaultThemeConfig.d.ts.map +1 -1
- package/types/theme/defaults/builderOptions.d.ts.map +1 -1
- package/types/theme/defaults/categoryFonts.d.ts +19 -0
- package/types/theme/defaults/categoryFonts.d.ts.map +1 -0
- package/types/theme/defaults/fonts.d.ts +135 -2
- package/types/theme/defaults/fonts.d.ts.map +1 -1
- package/types/theme/defaults/index.d.ts +1 -0
- package/types/theme/defaults/index.d.ts.map +1 -1
- package/types/theme/devtools/ThemeDevtoolsPanel.d.ts.map +1 -1
- package/types/theme/focusState.d.ts +32 -6
- package/types/theme/focusState.d.ts.map +1 -1
- package/types/theme/fontCategoryStacks.d.ts +11 -0
- package/types/theme/fontCategoryStacks.d.ts.map +1 -0
- package/types/theme/glyphPaint.d.ts +16 -0
- package/types/theme/glyphPaint.d.ts.map +1 -0
- package/types/theme/index.d.ts +3 -0
- package/types/theme/index.d.ts.map +1 -1
- package/types/theme/knobs.d.ts +10 -2
- package/types/theme/knobs.d.ts.map +1 -1
- package/types/theme/layoutTokens.d.ts +46 -4
- package/types/theme/layoutTokens.d.ts.map +1 -1
- package/types/theme/radiusClass.d.ts +96 -4
- package/types/theme/radiusClass.d.ts.map +1 -1
- package/types/theme/radiusClassTable.generated.d.ts +146 -0
- package/types/theme/radiusClassTable.generated.d.ts.map +1 -0
- package/types/theme/recipeInputs.d.ts +85 -14
- package/types/theme/recipeInputs.d.ts.map +1 -1
- package/types/theme/recipes.d.ts +78 -4
- package/types/theme/recipes.d.ts.map +1 -1
- package/types/theme/resolveKnobs.d.ts +12 -1
- package/types/theme/resolveKnobs.d.ts.map +1 -1
- package/types/theme/sizeRecipes.d.ts +27 -14
- package/types/theme/sizeRecipes.d.ts.map +1 -1
- package/types/theme/theme.d.ts.map +1 -1
- package/types/theme/theme.native.d.ts.map +1 -1
- package/types/theme/useResolvedKnobs.d.ts +2 -2
- package/types/theme/useResolvedKnobs.d.ts.map +1 -1
|
@@ -23,6 +23,64 @@ export declare function contrastRatio(l1: number, l2: number): number;
|
|
|
23
23
|
export declare const minContrastRatio = 3;
|
|
24
24
|
/** WCAG AA contrast floor for normal-size body/label text. */
|
|
25
25
|
export declare const aaTextContrastRatio = 4.5;
|
|
26
|
+
/** A foreground/background pair held to a WCAG contrast floor. */
|
|
27
|
+
export interface ContrastPair {
|
|
28
|
+
/** Text/glyph color, in any format `normalizeToHex` accepts. */
|
|
29
|
+
foreground: string;
|
|
30
|
+
/** The fill the foreground sits on. */
|
|
31
|
+
background: string;
|
|
32
|
+
/** Floor the pair owes. Defaults to `aaTextContrastRatio` (4.5). */
|
|
33
|
+
floor?: number;
|
|
34
|
+
/** Names the pair in reports, e.g. "light_accent: color on background". */
|
|
35
|
+
label?: string;
|
|
36
|
+
}
|
|
37
|
+
/** Measured outcome for one {@link ContrastPair}. */
|
|
38
|
+
export interface ContrastReport {
|
|
39
|
+
label: string;
|
|
40
|
+
/** The colors actually measured, as normalized 6-digit hex. */
|
|
41
|
+
foreground: string;
|
|
42
|
+
background: string;
|
|
43
|
+
/** WCAG 2.x ratio rounded to 2 decimals — the number a report reads. */
|
|
44
|
+
ratio: number;
|
|
45
|
+
floor: number;
|
|
46
|
+
pass: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Measure one pair against its floor. Throws when a color cannot be reduced
|
|
50
|
+
* to an opaque hex: an alpha color has no contrast of its own and the house
|
|
51
|
+
* ramps are fully opaque, so an unmeasurable pair is a genuine failure,
|
|
52
|
+
* never a skip. The verdict compares the REPORTED (2-decimal) ratio, so
|
|
53
|
+
* pass/fail always matches the printed number.
|
|
54
|
+
*/
|
|
55
|
+
export declare function measureContrast(pair: ContrastPair): ContrastReport;
|
|
56
|
+
/**
|
|
57
|
+
* The contrast floor assertion. Measures every pair and throws ONE error
|
|
58
|
+
* naming every pair under its floor — a sweep reports the whole damage, not
|
|
59
|
+
* the first miss. Returns the reports when all pass, so callers can attach
|
|
60
|
+
* the measured numbers as proof.
|
|
61
|
+
*/
|
|
62
|
+
export declare function assertContrast(pairs: ContrastPair | ContrastPair[]): ContrastReport[];
|
|
63
|
+
/** Addresses a {@link ContrastPair} inside built themes by name and keys. */
|
|
64
|
+
export interface ThemeContrastPair {
|
|
65
|
+
/** Theme name, e.g. "light_accent" or "dark". */
|
|
66
|
+
theme: string;
|
|
67
|
+
/** Theme key carrying the text/glyph color, e.g. "color" or "color11". */
|
|
68
|
+
foreground: string;
|
|
69
|
+
/** Theme key carrying the fill, e.g. "background" or "color2". */
|
|
70
|
+
background: string;
|
|
71
|
+
/** Floor the pair owes. Defaults to `aaTextContrastRatio` (4.5). */
|
|
72
|
+
floor?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Resolve a pair out of BUILT themes — the record `createThemesBuilder`
|
|
76
|
+
* returns, the same objects handed to createTamagui. Asserting on built
|
|
77
|
+
* themes rather than source ramps is the point: the pairing that fails is
|
|
78
|
+
* produced layers away by the theme-builder template, so reading a palette
|
|
79
|
+
* file tells you nothing about what lands under a label. Addressed by theme
|
|
80
|
+
* name + key so a failure names the thing a designer would change; a missing
|
|
81
|
+
* theme or key throws rather than skips.
|
|
82
|
+
*/
|
|
83
|
+
export declare function resolveThemeContrast(themes: Record<string, Record<string, string> | undefined>, pair: ThemeContrastPair): ContrastPair;
|
|
26
84
|
/**
|
|
27
85
|
* Axiom 15 OPTICS — pick whichever candidate foreground carries more WCAG
|
|
28
86
|
* contrast on a given `fill`. The canonical "readable foreground on a fill"
|
|
@@ -55,7 +113,7 @@ export interface ButtonColorConfig extends ComponentColorConfig {
|
|
|
55
113
|
}
|
|
56
114
|
export declare const buttonColors: ButtonColorConfig;
|
|
57
115
|
export declare const inputColors: ComponentColorConfig;
|
|
58
|
-
export declare function $color(step: ColorStep): "$color3" | "$color1" | "$color2" | "$color12" | "$color7" | "$color4" | "$color5" | "$
|
|
116
|
+
export declare function $color(step: ColorStep): "$color3" | "$color1" | "$color2" | "$color12" | "$color7" | "$color4" | "$color5" | "$color10" | "$color11" | "$color6" | "$color8" | "$color9";
|
|
59
117
|
export interface SemanticGroup {
|
|
60
118
|
key: string;
|
|
61
119
|
label: string;
|
|
@@ -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;AAC7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AE,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"}
|
|
@@ -1,31 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
* OPTICS corner smoothing (Axiom 15): `cornerSmoothing: "smooth"` upgrades
|
|
3
|
-
* circular-arc corners to continuous curvature — CSS
|
|
4
|
-
* `corner-shape: squircle` (≡ `superellipse(2)`, ≈ Apple's continuous
|
|
5
|
-
* corners / Figma smoothing 0.6) — as a WEB PROGRESSIVE ENHANCEMENT.
|
|
6
|
-
* Chromium 139+ paints it; every other engine drops the unknown declaration
|
|
7
|
-
* and keeps today's plain `border-radius` arc, so no `@supports` gate is
|
|
8
|
-
* needed for correctness.
|
|
9
|
-
*
|
|
10
|
-
* Delivery is a class + one mounted stylesheet (the hairline pattern):
|
|
11
|
-
* Tamagui strips unknown keys from the `style` prop (`style` is in
|
|
12
|
-
* skipProps and `cornerShape` is not a valid style key), but merges
|
|
13
|
-
* `className` into its atomic classes — so `resolveKnobs` attaches
|
|
14
|
-
* `className: cornerSmoothClassName` to every radius-bearing fragment when
|
|
15
|
-
* the knob is `smooth`, and this module owns the CSS those classes resolve
|
|
16
|
-
* against.
|
|
17
|
-
*
|
|
18
|
-
* Native twin: `cornerSmoothing.native.ts` (no CSS classes — native resolves
|
|
19
|
-
* to `round` until a SquircleView adoption lands, phase 2).
|
|
20
|
-
*/
|
|
1
|
+
import type { CornerSmoothing } from "./knobs";
|
|
21
2
|
/** Class attached to radius-bearing knob fragments at `cornerSmoothing: "smooth"`. */
|
|
22
3
|
export declare const cornerSmoothClassName = "mp-corner-smooth";
|
|
4
|
+
export declare const CORNER_SMOOTHING_STYLE_TAG_ID = "mp-corner-smoothing-styles";
|
|
5
|
+
/** Live knob stop, published on `<html>` by `CornerSmoothingStyles`. */
|
|
6
|
+
export declare const CORNER_SMOOTHING_ROOT_ATTR = "data-mp-corner-smoothing";
|
|
7
|
+
/** Specified `corner-shape` for the live stop, also on `<html>`. */
|
|
8
|
+
export declare const CORNER_SHAPE_CSS_VAR = "--mp-corner-shape";
|
|
9
|
+
/** Specified CSS value for `round` (initial / house default). */
|
|
10
|
+
export declare const CORNER_SHAPE_ROUND = "round";
|
|
11
|
+
/** Specified CSS value for `smooth` — the keyword the AC names. */
|
|
12
|
+
export declare const CORNER_SHAPE_SMOOTH = "squircle";
|
|
13
|
+
/** Chrome 152+ computed form of `round`. */
|
|
14
|
+
export declare const CORNER_SHAPE_ROUND_COMPUTED = "superellipse(1)";
|
|
15
|
+
/** Chrome 152+ computed form of `squircle`. */
|
|
16
|
+
export declare const CORNER_SHAPE_SMOOTH_COMPUTED = "superellipse(2)";
|
|
23
17
|
/**
|
|
24
18
|
* The squircle declaration. `corner-shape` composes with the element's
|
|
25
19
|
* existing `border-radius` (it reshapes the same corner box), so the
|
|
26
20
|
* fallback in non-supporting engines is automatic. Exported for unit tests.
|
|
27
21
|
*/
|
|
28
22
|
export declare const cornerSmoothingCss = ".mp-corner-smooth { corner-shape: squircle; }";
|
|
23
|
+
/**
|
|
24
|
+
* `CSS.supports("corner-shape","squircle")`. Pass `null` to probe a missing
|
|
25
|
+
* engine. Omit the arg to use the global `CSS` (happy-dom's `supports()`
|
|
26
|
+
* currently returns true — a lie; computed `corner-shape` stays empty).
|
|
27
|
+
*/
|
|
28
|
+
export declare function cssSupportsCornerShape(supports?: {
|
|
29
|
+
supports?(property: string, value: string): boolean;
|
|
30
|
+
} | null): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Read the painted `corner-shape`. Prefer the CSS property channel over the
|
|
33
|
+
* camelCase IDL — some Chromium builds expose `css.cornerShape` as the
|
|
34
|
+
* initial `round` even when `getPropertyValue("corner-shape")` has moved.
|
|
35
|
+
*/
|
|
36
|
+
export declare function readComputedCornerShape(style: Pick<CSSStyleDeclaration, "getPropertyValue"> & {
|
|
37
|
+
cornerShape?: string;
|
|
38
|
+
}): string;
|
|
39
|
+
/** True for specified `squircle` and the measured Chrome computed form `superellipse(2)`. */
|
|
40
|
+
export declare function isSmoothComputedCornerShape(value: string): boolean;
|
|
41
|
+
/** True for specified `round`, computed `superellipse(1)`, empty (unsupported), or `normal`. */
|
|
42
|
+
export declare function isRoundComputedCornerShape(value: string): boolean;
|
|
43
|
+
/** Publish the live stop on `<html>` so a probe can see the channel ran. */
|
|
44
|
+
export declare function applyRootCornerSmoothing(stop?: CornerSmoothing): void;
|
|
29
45
|
/** Idempotently mount the corner-smoothing stylesheet (no-op off-DOM). */
|
|
30
46
|
export declare function ensureCornerSmoothingStyles(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Mount ONCE near the root (inside KnobBridge / PresetContext). Re-asserts
|
|
49
|
+
* the squircle stylesheet and mirrors the live `cornerSmoothing` stop onto
|
|
50
|
+
* `<html>`. Renders nothing.
|
|
51
|
+
*/
|
|
52
|
+
export declare function CornerSmoothingStyles(): null;
|
|
31
53
|
//# sourceMappingURL=cornerSmoothing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cornerSmoothing.d.ts","sourceRoot":"","sources":["../../src/theme/cornerSmoothing.ts"],"names":[],"mappings":"
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ED,0EAA0E;AAC1E,wBAAgB,2BAA2B,IAAI,IAAI,CAOlD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAoB5C"}
|
|
@@ -2,13 +2,33 @@
|
|
|
2
2
|
* OPTICS corner smoothing (Axiom 15) — native twin of `cornerSmoothing.ts`.
|
|
3
3
|
*
|
|
4
4
|
* React Native has no `corner-shape`; native resolves `cornerSmoothing` to
|
|
5
|
-
* `round`
|
|
6
|
-
*
|
|
5
|
+
* `round` until a SquircleView adoption lands (phase 2). Exports stay
|
|
6
|
+
* shape-compatible so shared code and tests can import either file.
|
|
7
7
|
*/
|
|
8
|
+
import type { CornerSmoothing } from "./knobs";
|
|
8
9
|
/** Class attached on web only — never emitted into native fragments. */
|
|
9
10
|
export declare const cornerSmoothClassName = "mp-corner-smooth";
|
|
11
|
+
export declare const CORNER_SMOOTHING_STYLE_TAG_ID = "mp-corner-smoothing-styles";
|
|
12
|
+
export declare const CORNER_SMOOTHING_ROOT_ATTR = "data-mp-corner-smoothing";
|
|
13
|
+
export declare const CORNER_SHAPE_CSS_VAR = "--mp-corner-shape";
|
|
14
|
+
export declare const CORNER_SHAPE_ROUND = "round";
|
|
15
|
+
export declare const CORNER_SHAPE_SMOOTH = "squircle";
|
|
16
|
+
export declare const CORNER_SHAPE_ROUND_COMPUTED = "superellipse(1)";
|
|
17
|
+
export declare const CORNER_SHAPE_SMOOTH_COMPUTED = "superellipse(2)";
|
|
10
18
|
/** Web-only stylesheet — empty on native. */
|
|
11
19
|
export declare const cornerSmoothingCss = "";
|
|
20
|
+
/** Native has no CSS.supports corner-shape — measured no-op, not assumed. */
|
|
21
|
+
export declare function cssSupportsCornerShape(_supports?: {
|
|
22
|
+
supports?(property: string, value: string): boolean;
|
|
23
|
+
}): boolean;
|
|
24
|
+
export declare function readComputedCornerShape(_style?: Pick<CSSStyleDeclaration, "getPropertyValue"> & {
|
|
25
|
+
cornerShape?: string;
|
|
26
|
+
}): string;
|
|
27
|
+
export declare function isSmoothComputedCornerShape(_value: string): boolean;
|
|
28
|
+
export declare function isRoundComputedCornerShape(_value: string): boolean;
|
|
29
|
+
export declare function applyRootCornerSmoothing(_stop?: CornerSmoothing): void;
|
|
12
30
|
/** Web-only stylesheet mount — no-op on native. */
|
|
13
31
|
export declare function ensureCornerSmoothingStyles(): void;
|
|
32
|
+
/** Native no-op. Web mounts the squircle stylesheet from ThemeProvider. */
|
|
33
|
+
export declare function CornerSmoothingStyles(): null;
|
|
14
34
|
//# sourceMappingURL=cornerSmoothing.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cornerSmoothing.native.d.ts","sourceRoot":"","sources":["../../src/theme/cornerSmoothing.native.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"cornerSmoothing.native.d.ts","sourceRoot":"","sources":["../../src/theme/cornerSmoothing.native.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAC1E,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AACrE,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AACxD,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAC1C,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAE9D,6CAA6C;AAC7C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,6EAA6E;AAC7E,wBAAgB,sBAAsB,CAAC,SAAS,CAAC,EAAE;IACjD,QAAQ,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CACrD,GAAG,OAAO,CAEV;AAED,wBAAgB,uBAAuB,CACrC,MAAM,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAChF,MAAM,CAER;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAElE;AAED,wBAAgB,wBAAwB,CAAC,KAAK,CAAC,EAAE,eAAe,GAAG,IAAI,CAAG;AAE1E,mDAAmD;AACnD,wBAAgB,2BAA2B,IAAI,IAAI,CAAG;AAEtD,2EAA2E;AAC3E,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
|
|
@@ -3,6 +3,23 @@ import { type BaseThemeBuilderDefinition, type CreateThemesBuilderOptions, type
|
|
|
3
3
|
import type { Preset } from "./preset.types";
|
|
4
4
|
import { type SizeRecipeInputs } from "./recipeInputs";
|
|
5
5
|
import { type ThemeConfig } from "./shared";
|
|
6
|
+
/**
|
|
7
|
+
* The Tamagui era this theme config resolves against (MPO-19 X13; rendered
|
|
8
|
+
* reference §12.2 C9 "unpinned theme package"). Every era-bearing default in
|
|
9
|
+
* this file — the `@tamagui/config/v5` spread, its media map,
|
|
10
|
+
* `mediaQueryDefaultActive` and the non-color token values — resolves on the
|
|
11
|
+
* v5 branch, and the MPO-19 correction rows (X4 interaction ramp, X5/X6
|
|
12
|
+
* surface addressing, X8/X9 heading weight and body size/leading) re-derive
|
|
13
|
+
* against v5, never against v4 or the legacy root exports. Asserted by the
|
|
14
|
+
* era block in `createDefaultThemeConfig.spec.ts`.
|
|
15
|
+
*
|
|
16
|
+
* Tokens come from `defaultConfig` and from nothing else — the legacy
|
|
17
|
+
* `@tamagui/themes` override is gone (measured identical for size/space/
|
|
18
|
+
* radius/zIndex; its only addition was unused Radix color steps).
|
|
19
|
+
*/
|
|
20
|
+
export declare const TAMAGUI_ERA: "v5";
|
|
21
|
+
/** MPO-19 proof alias — same pin as `TAMAGUI_ERA`. */
|
|
22
|
+
export declare const tamaguiEra: "v5";
|
|
6
23
|
export interface CreateDefaultThemeConfigOptions {
|
|
7
24
|
/** Base theme palette (dark/light with optional shadows; defaults to the built-in neutral ramps) */
|
|
8
25
|
base?: BaseThemeBuilderDefinition;
|
|
@@ -10,7 +27,7 @@ export interface CreateDefaultThemeConfigOptions {
|
|
|
10
27
|
accent?: ThemeBuilderDefinition;
|
|
11
28
|
/** Map of extra named themes with their palettes */
|
|
12
29
|
additionalThemes?: Record<string, ThemeBuilderDefinition>;
|
|
13
|
-
/** Font definitions (merged over the default heading/body fonts) */
|
|
30
|
+
/** Font definitions (merged over the default heading/body and category fonts) */
|
|
14
31
|
fonts?: Record<string, GenericFont>;
|
|
15
32
|
/** Animation config (defaults to framework reanimated animations) */
|
|
16
33
|
animations?: CreateTamaguiProps["animations"];
|
|
@@ -37,10 +54,11 @@ export interface CreateDefaultThemeConfigOptions {
|
|
|
37
54
|
* Builds a complete Tamagui theme config with batteries included: calling it
|
|
38
55
|
* with zero options yields the framework's polished defaults — the neutral
|
|
39
56
|
* Radix-mauve-curve base ramps, the solid-surface brand accent ramps, Inter
|
|
40
|
-
* heading/body fonts
|
|
57
|
+
* heading/body fonts, the category fonts the bodyFont knob resolves, and the
|
|
58
|
+
* interaction-ramp `getTheme` theme builder.
|
|
41
59
|
* Every option overrides its piece independently: `base` and `accent` each
|
|
42
60
|
* replace their default, `fonts` are spread OVER the defaults so a partial
|
|
43
|
-
* font map keeps the default heading/body, and `builderOptions.getTheme`
|
|
61
|
+
* font map keeps the default heading/body and category faces, and `builderOptions.getTheme`
|
|
44
62
|
* COMPOSES with the default (consumer keys win; framework derivations like
|
|
45
63
|
* the solid `$outlineColor` focus ring survive partial overrides).
|
|
46
64
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDefaultThemeConfig.d.ts","sourceRoot":"","sources":["../../src/theme/createDefaultThemeConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createDefaultThemeConfig.d.ts","sourceRoot":"","sources":["../../src/theme/createDefaultThemeConfig.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/D,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAE/B,KAAK,sBAAsB,EAE5B,MAAM,gBAAgB,CAAC;AAKxB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,UAAU,CAAC;AAG/D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,EAAG,IAAa,CAAC;AACzC,sDAAsD;AACtD,eAAO,MAAM,UAAU,MAAc,CAAC;AAEtC,MAAM,WAAW,+BAA+B;IAC9C,oGAAoG;IACpG,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAClC,mEAAmE;IACnE,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IAC1D,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,qEAAqE;IACrE,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC9C,oEAAoE;IACpE,cAAc,CAAC,EAAE,0BAA0B,CAAC;IAC5C,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChE,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACtC,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC1C;AA6BD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,WAAW,CA8Db"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builderOptions.d.ts","sourceRoot":"","sources":["../../../src/theme/defaults/builderOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAiB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"builderOptions.d.ts","sourceRoot":"","sources":["../../../src/theme/defaults/builderOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAiB,MAAM,iBAAiB,CAAC;AA4HjF,eAAO,MAAM,qBAAqB,EAAE,0BA8DnC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Category fonts merged into createDefaultThemeConfig UNDER consumer
|
|
3
|
+
* heading/body overrides. FontKnobStyles looks these up as `$serif` etc.
|
|
4
|
+
* so headingFont=serif writes `--f-family` even when the app only customizes
|
|
5
|
+
* heading/body (SHC console Operator).
|
|
6
|
+
*/
|
|
7
|
+
export declare const defaultCategoryFonts: {
|
|
8
|
+
serif: import("tamagui").GenericFont;
|
|
9
|
+
mono: import("tamagui").GenericFont;
|
|
10
|
+
slab: import("tamagui").GenericFont;
|
|
11
|
+
rounded: import("tamagui").GenericFont;
|
|
12
|
+
condensed: import("tamagui").GenericFont;
|
|
13
|
+
cursive: import("tamagui").GenericFont;
|
|
14
|
+
handwriting: import("tamagui").GenericFont;
|
|
15
|
+
pixel: import("tamagui").GenericFont;
|
|
16
|
+
blackletter: import("tamagui").GenericFont;
|
|
17
|
+
geometric: import("tamagui").GenericFont;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=categoryFonts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categoryFonts.d.ts","sourceRoot":"","sources":["../../../src/theme/defaults/categoryFonts.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAWhC,CAAC"}
|
|
@@ -1,7 +1,140 @@
|
|
|
1
|
+
import type { GenericFont } from "tamagui";
|
|
1
2
|
/** Inter dynamic tracking for a rendered `sizePx`, in em. */
|
|
2
3
|
export declare function interTrackingEm(sizePx: number): number;
|
|
3
4
|
/** Inter dynamic tracking for a rendered `sizePx`, in px (2-decimal). */
|
|
4
5
|
export declare function interTrackingPx(sizePx: number): number;
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
6
|
+
/** Body leading stays on the ramp: size + 10 (14 → 24). Never CSS `normal`. */
|
|
7
|
+
export declare const BODY_LINE_HEIGHT_OFFSET = 10;
|
|
8
|
+
export declare function bodyLineHeightPx(sizePx: number): number;
|
|
9
|
+
export declare const bodyFontSizes: Record<string, number>;
|
|
10
|
+
/**
|
|
11
|
+
* Concrete family stacks for each `headingFont`/`bodyFont` category.
|
|
12
|
+
* Distinct first families so a text-node measurement cannot collapse three
|
|
13
|
+
* stops onto one system fallback. Matches `packages/config/fonts.ts`
|
|
14
|
+
* (serif/mono are explicit system aliases; the rest are shipped webfonts).
|
|
15
|
+
*/
|
|
16
|
+
export declare const fontFamilyStacks: {
|
|
17
|
+
readonly "sans-serif": "Inter, -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
|
|
18
|
+
readonly serif: "Georgia, 'Times New Roman', Times, serif";
|
|
19
|
+
readonly mono: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace";
|
|
20
|
+
readonly slab: "'Roboto Slab', 'Rockwell', 'Courier New', serif";
|
|
21
|
+
readonly rounded: "'Nunito', 'Varela Round', system-ui, sans-serif";
|
|
22
|
+
readonly condensed: "'Roboto Condensed', 'Arial Narrow', sans-serif";
|
|
23
|
+
readonly cursive: "'Dancing Script', 'Pacifico', cursive";
|
|
24
|
+
readonly handwriting: "'Caveat', 'Patrick Hand', 'Comic Sans MS', cursive";
|
|
25
|
+
readonly pixel: "'Silkscreen', 'Press Start 2P', monospace";
|
|
26
|
+
readonly blackletter: "'UnifrakturCook', 'Fraktur', serif";
|
|
27
|
+
readonly geometric: "'Futura', 'Poppins', 'Century Gothic', sans-serif";
|
|
28
|
+
};
|
|
29
|
+
export type FontFamilyCategory = keyof typeof fontFamilyStacks;
|
|
30
|
+
/**
|
|
31
|
+
* Category font on the body ramp: same size table as Inter (including
|
|
32
|
+
* `true: 14`) and lineHeight size+10. Inter tracking is NOT copied — that
|
|
33
|
+
* curve is Inter-specific (LC-11); FontKnobStyles applies per-category
|
|
34
|
+
* floors when the knob restyles `$heading`/`$body`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function createCategoryFont(family: string): GenericFont;
|
|
37
|
+
export declare const defaultHeadingFont: import("@tamagui/web").FillInFont<{
|
|
38
|
+
face: {
|
|
39
|
+
readonly 400: {
|
|
40
|
+
readonly normal: "Inter";
|
|
41
|
+
};
|
|
42
|
+
readonly 600: {
|
|
43
|
+
readonly normal: "InterSemiBold";
|
|
44
|
+
};
|
|
45
|
+
readonly 700: {
|
|
46
|
+
readonly normal: "InterBold";
|
|
47
|
+
};
|
|
48
|
+
readonly 800: {
|
|
49
|
+
readonly normal: "InterExtraBold";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
size: Record<string, number>;
|
|
53
|
+
lineHeight: Record<string, number>;
|
|
54
|
+
weight: Record<string, string>;
|
|
55
|
+
letterSpacing: Record<string, number>;
|
|
56
|
+
}, 3 | 1 | 2 | 12 | 7 | 4 | 5 | 10 | 11 | 13 | 14 | "true" | 16 | 6 | 8 | 9 | 15>;
|
|
57
|
+
export declare const defaultBodyFont: import("@tamagui/web").FillInFont<{
|
|
58
|
+
face: {
|
|
59
|
+
readonly 400: {
|
|
60
|
+
readonly normal: "Inter";
|
|
61
|
+
};
|
|
62
|
+
readonly 600: {
|
|
63
|
+
readonly normal: "InterSemiBold";
|
|
64
|
+
};
|
|
65
|
+
readonly 700: {
|
|
66
|
+
readonly normal: "InterBold";
|
|
67
|
+
};
|
|
68
|
+
readonly 800: {
|
|
69
|
+
readonly normal: "InterExtraBold";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
size: Record<string, number>;
|
|
73
|
+
lineHeight: Record<string, number>;
|
|
74
|
+
weight: Record<string, string>;
|
|
75
|
+
letterSpacing: Record<string, number>;
|
|
76
|
+
}, 3 | 1 | 2 | 12 | 7 | 4 | 5 | 10 | 11 | 13 | 14 | "true" | 16 | 6 | 8 | 9 | 15>;
|
|
77
|
+
export declare const defaultSerifFont: GenericFont;
|
|
78
|
+
export declare const defaultMonoFont: GenericFont;
|
|
79
|
+
export declare const defaultSlabFont: GenericFont;
|
|
80
|
+
export declare const defaultRoundedFont: GenericFont;
|
|
81
|
+
export declare const defaultCondensedFont: GenericFont;
|
|
82
|
+
export declare const defaultCursiveFont: GenericFont;
|
|
83
|
+
export declare const defaultHandwritingFont: GenericFont;
|
|
84
|
+
export declare const defaultPixelFont: GenericFont;
|
|
85
|
+
export declare const defaultBlackletterFont: GenericFont;
|
|
86
|
+
export declare const defaultGeometricFont: GenericFont;
|
|
87
|
+
/** All purpose + category fonts registered by `createDefaultThemeConfig`. */
|
|
88
|
+
export declare const defaultFonts: {
|
|
89
|
+
readonly heading: import("@tamagui/web").FillInFont<{
|
|
90
|
+
face: {
|
|
91
|
+
readonly 400: {
|
|
92
|
+
readonly normal: "Inter";
|
|
93
|
+
};
|
|
94
|
+
readonly 600: {
|
|
95
|
+
readonly normal: "InterSemiBold";
|
|
96
|
+
};
|
|
97
|
+
readonly 700: {
|
|
98
|
+
readonly normal: "InterBold";
|
|
99
|
+
};
|
|
100
|
+
readonly 800: {
|
|
101
|
+
readonly normal: "InterExtraBold";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
size: Record<string, number>;
|
|
105
|
+
lineHeight: Record<string, number>;
|
|
106
|
+
weight: Record<string, string>;
|
|
107
|
+
letterSpacing: Record<string, number>;
|
|
108
|
+
}, 3 | 1 | 2 | 12 | 7 | 4 | 5 | 10 | 11 | 13 | 14 | "true" | 16 | 6 | 8 | 9 | 15>;
|
|
109
|
+
readonly body: import("@tamagui/web").FillInFont<{
|
|
110
|
+
face: {
|
|
111
|
+
readonly 400: {
|
|
112
|
+
readonly normal: "Inter";
|
|
113
|
+
};
|
|
114
|
+
readonly 600: {
|
|
115
|
+
readonly normal: "InterSemiBold";
|
|
116
|
+
};
|
|
117
|
+
readonly 700: {
|
|
118
|
+
readonly normal: "InterBold";
|
|
119
|
+
};
|
|
120
|
+
readonly 800: {
|
|
121
|
+
readonly normal: "InterExtraBold";
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
size: Record<string, number>;
|
|
125
|
+
lineHeight: Record<string, number>;
|
|
126
|
+
weight: Record<string, string>;
|
|
127
|
+
letterSpacing: Record<string, number>;
|
|
128
|
+
}, 3 | 1 | 2 | 12 | 7 | 4 | 5 | 10 | 11 | 13 | 14 | "true" | 16 | 6 | 8 | 9 | 15>;
|
|
129
|
+
readonly serif: GenericFont;
|
|
130
|
+
readonly mono: GenericFont;
|
|
131
|
+
readonly slab: GenericFont;
|
|
132
|
+
readonly rounded: GenericFont;
|
|
133
|
+
readonly condensed: GenericFont;
|
|
134
|
+
readonly cursive: GenericFont;
|
|
135
|
+
readonly handwriting: GenericFont;
|
|
136
|
+
readonly pixel: GenericFont;
|
|
137
|
+
readonly blackletter: GenericFont;
|
|
138
|
+
readonly geometric: GenericFont;
|
|
139
|
+
};
|
|
7
140
|
//# sourceMappingURL=fonts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/theme/defaults/fonts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/theme/defaults/fonts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAwC3C,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAQD,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkBhD,CAAC;AA6CF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;CAanB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAU9D;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;iFAS9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;iFAS3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,aAA6C,CAAC;AAC3E,eAAO,MAAM,eAAe,aAA4C,CAAC;AACzE,eAAO,MAAM,eAAe,aAA4C,CAAC;AACzE,eAAO,MAAM,kBAAkB,aAA+C,CAAC;AAC/E,eAAO,MAAM,oBAAoB,aAAiD,CAAC;AACnF,eAAO,MAAM,kBAAkB,aAA+C,CAAC;AAC/E,eAAO,MAAM,sBAAsB,aAAmD,CAAC;AACvF,eAAO,MAAM,gBAAgB,aAA6C,CAAC;AAC3E,eAAO,MAAM,sBAAsB,aAAmD,CAAC;AACvF,eAAO,MAAM,oBAAoB,aAAiD,CAAC;AAEnF,6EAA6E;AAC7E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/defaults/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/defaults/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeDevtoolsPanel.d.ts","sourceRoot":"","sources":["../../../src/theme/devtools/ThemeDevtoolsPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAyMH,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IACrC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;CAC/C,CAAC;AAkiBF,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,UAAU,CAAC;IAEjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEjC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB;;;;OAIG;IACH,WAAW,CAAC,EAAE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B,CAAC,EACjC,aAAa,EACb,YAAY,EACZ,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,GACd,EAAE,uBAAuB,2CAs7BzB"}
|
|
@@ -15,19 +15,45 @@ export declare const FOCUS_RING_MIN_CONTRAST = 3;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function focusRingColorMeetsContrast(ringColor: string, surfaceColor: string): boolean;
|
|
17
17
|
/**
|
|
18
|
-
* ONE ring geometry (DG-A11Y-01): 2px solid `$outlineColor
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
18
|
+
* ONE ring geometry (DG-A11Y-01 / LC-71 §4): 2px solid `$outlineColor` at
|
|
19
|
+
* offset **0** — the band hugs the border box and paints OUTSIDE it, on the
|
|
20
|
+
* surface behind the control (reference §10; board F1 verify pass: offset 0,
|
|
21
|
+
* not −2 and not +2). Offset 0 is what makes the ≥3:1 floor computable: the
|
|
22
|
+
* ring contrasts against the page ground, not the control's own fill. The
|
|
23
|
+
* old flat inset (−2) painted the band INSIDE solid intent fills and sank to
|
|
24
|
+
* 1.17–1.31:1 (light accent 1.27, light error 1.17, dark error 1.31) where
|
|
25
|
+
* the same ring on the page ground clears 5.78–6.50:1 (MPO-41 / MPO-19 X7).
|
|
26
|
+
*
|
|
27
|
+
* The inset did not die — it moved to `FOCUS_VISIBLE_RING_INSET`, an
|
|
28
|
+
* explicit per-call-site carve-out for clipping ancestors. MPO-19 X7 names
|
|
29
|
+
* the same offset `FOCUS_RING_CLIPPED_OFFSET` so call sites do not type `-2`.
|
|
24
30
|
*/
|
|
31
|
+
export declare const FOCUS_RING_CLIPPED_OFFSET = -2;
|
|
25
32
|
export declare const FOCUS_VISIBLE_RING: {
|
|
26
33
|
outlineWidth: number;
|
|
27
34
|
outlineStyle: "solid";
|
|
28
35
|
outlineColor: string;
|
|
29
36
|
outlineOffset: number;
|
|
30
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* The LC-71 §4 clipping carve-out: the SAME ring, pulled fully inside the
|
|
40
|
+
* border box (offset −2 + width 2 ⇒ the band spans [−2, 0] from the edge, so
|
|
41
|
+
* no clipping ancestor can sever it). ONLY for items inside `overflow`
|
|
42
|
+
* clipping — fused/segmented groups clipped at the group radius, edge-to-edge
|
|
43
|
+
* menu rows under a clipped overlay (LC-72 CONTAINER-CLIP), table cells.
|
|
44
|
+
* Standalone controls take `FOCUS_VISIBLE_RING`; call sites opt into the
|
|
45
|
+
* inset explicitly (this constant, or
|
|
46
|
+
* `ensureFocusVisibleRing({ outlineOffset: -2 })`). Verification measures the
|
|
47
|
+
* painted composition, never the declared offset alone — a ring box inset
|
|
48
|
+
* from the boundary reports a compliant offset while painting inside it
|
|
49
|
+
* (the F1 pseudoInset trap, mpo-fields-measured.md §7).
|
|
50
|
+
*/
|
|
51
|
+
export declare const FOCUS_VISIBLE_RING_INSET: {
|
|
52
|
+
outlineOffset: number;
|
|
53
|
+
outlineWidth: number;
|
|
54
|
+
outlineStyle: "solid";
|
|
55
|
+
outlineColor: string;
|
|
56
|
+
};
|
|
31
57
|
/**
|
|
32
58
|
* DG-STATE-01 — Material-style state layers as theme tokens.
|
|
33
59
|
* Ramp lives in `defaults/builderOptions` (hover/press background steps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusState.d.ts","sourceRoot":"","sources":["../../src/theme/focusState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAuBzC;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAO5F;AAED
|
|
1
|
+
{"version":3,"file":"focusState.d.ts","sourceRoot":"","sources":["../../src/theme/focusState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAuBzC;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAO5F;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,eAAO,MAAM,kBAAkB;;;;;CAKF,CAAC;AAE9B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB;;;;;CAGR,CAAC;AAE9B;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;CAED,CAAC;AAE9B,eAAO,MAAM,iBAAiB;;CAED,CAAC;AAE9B;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,iBAAiB,EAChE,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,iBAAiB,CAAC,GAAG,IAAI,GACxC,CAAC,GAAG,iBAAiB,CAyBvB;AAED,mFAAmF;AACnF,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE,iBAAiB,GACvB,iBAAiB,CAKnB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FontCategory } from "./knobs";
|
|
2
|
+
/**
|
|
3
|
+
* Concrete stacks for each headingFont/bodyFont category. Used as the
|
|
4
|
+
* FontKnobStyles `--f-family` fallback when Tamagui has no `$serif` (etc.)
|
|
5
|
+
* font registered, and as the default category fonts on
|
|
6
|
+
* createDefaultThemeConfig so consumers do not have to pass a font map.
|
|
7
|
+
*
|
|
8
|
+
* Matches packages/config/fonts.ts (system serif/mono; webfonts for the rest).
|
|
9
|
+
*/
|
|
10
|
+
export declare const fontCategoryStacks: Record<FontCategory, string>;
|
|
11
|
+
//# sourceMappingURL=fontCategoryStacks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fontCategoryStacks.d.ts","sourceRoot":"","sources":["../../src/theme/fontCategoryStacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAa3D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type ThemeToken = {
|
|
2
|
+
val?: unknown;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* LC-84 — resolve a concrete glyph paint from a Tamagui theme token.
|
|
6
|
+
* Phosphor (and any SVG that defaults to `#000` / `currentColor` without a
|
|
7
|
+
* parent color) MUST receive this, never `theme.x.get("web")` which is
|
|
8
|
+
* undefined off-web and leaves the glyph black in dark mode.
|
|
9
|
+
*
|
|
10
|
+
* Never returns undefined.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveGlyphPaint(theme: Record<string, ThemeToken | undefined>, color?: string | null): string;
|
|
13
|
+
/** Live theme ink for Phosphor / SVG carets (LC-84). Never undefined. */
|
|
14
|
+
export declare function useGlyphColor(color?: string): string;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=glyphPaint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glyphPaint.d.ts","sourceRoot":"","sources":["../../src/theme/glyphPaint.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpC;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC,EAC7C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GACpB,MAAM,CAwBR;AAED,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAGpD"}
|
package/types/theme/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export * from "./createThemes";
|
|
|
8
8
|
export * from "./defaults/index";
|
|
9
9
|
export * from "./devtools/ThemeDevtoolsPanel";
|
|
10
10
|
export * from "./focusState";
|
|
11
|
+
export * from "./glyphPaint";
|
|
12
|
+
export * from "./fontCategoryStacks";
|
|
11
13
|
export * from "./FontKnobStyles";
|
|
12
14
|
export * from "./groupGeometry";
|
|
13
15
|
export * from "./hairline";
|
|
@@ -20,6 +22,7 @@ export type { Preset as PresetDefinition, IntentOverride } from "./preset.types"
|
|
|
20
22
|
export * from "./PresetContext";
|
|
21
23
|
export * from "./presets";
|
|
22
24
|
export * from "./radiusClass";
|
|
25
|
+
export * from "./radiusClassTable.generated";
|
|
23
26
|
export * from "./readableColor";
|
|
24
27
|
export * from "./recipes";
|
|
25
28
|
export * from "./resolveKnobs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,YAAY,EAAE,MAAM,IAAI,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAA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,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAE5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
|
package/types/theme/knobs.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Structural fill. Exactly two values (R9 G9): `filled` | `outlined`. Ghost is a Chip/Tag variant, not this knob. */
|
|
1
2
|
export declare const FillStyle: {
|
|
2
3
|
readonly Filled: "filled";
|
|
3
4
|
readonly Outlined: "outlined";
|
|
@@ -14,8 +15,10 @@ export type BorderRadius = (typeof BorderRadius)[keyof typeof BorderRadius];
|
|
|
14
15
|
/**
|
|
15
16
|
* Corner curvature continuity (Axiom 15 OPTICS). `smooth` renders
|
|
16
17
|
* continuous-curvature (superellipse/squircle) corners where the platform
|
|
17
|
-
* can (web:
|
|
18
|
-
*
|
|
18
|
+
* can (web: `corner-shape: squircle`, computed `superellipse(2)` on
|
|
19
|
+
* Chromium 152; engines without the property drop the declaration — that
|
|
20
|
+
* fallback is measured via `cssSupportsCornerShape`, not assumed); `round`
|
|
21
|
+
* is today's circular-arc border-radius everywhere.
|
|
19
22
|
* Two values, not a numeric dial: every shipped smoothing system converges
|
|
20
23
|
* on one blessed curve (Apple ≈ Figma 0.6 ≈ superellipse K=2), and a free
|
|
21
24
|
* number invites per-screen drift (Axiom 5). `none` is not needed —
|
|
@@ -211,6 +214,11 @@ export declare const interactionStates: readonly ["hover", "press", "focus", "fo
|
|
|
211
214
|
export type InteractionState = (typeof interactionStates)[number];
|
|
212
215
|
export interface Knobs {
|
|
213
216
|
fillStyle: FillStyle;
|
|
217
|
+
/**
|
|
218
|
+
* Per-role radius (MPO-21 R9): leftover radius maps onto DEFAULT /
|
|
219
|
+
* CIRCULAR-AT-FULL / BINARY / CONTAINER-CAP. No improvised radius prop
|
|
220
|
+
* and no fifth class on this interface.
|
|
221
|
+
*/
|
|
214
222
|
borderRadius: BorderRadius;
|
|
215
223
|
/**
|
|
216
224
|
* Corner curvature continuity (Axiom 15 OPTICS). Optional so existing
|