@multiplatform.one/theme 7.4.1 → 7.6.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/audit/index.ts +19 -0
- package/src/audit/themeMatrix.spec.ts +274 -0
- package/src/audit/themeMatrix.ts +630 -0
- package/src/figma/figmaTokens.spec.ts +25 -21
- package/src/figma/figmaTokens.ts +2 -2
- package/src/font.ts +37 -25
- package/src/index.ts +12 -0
- package/src/keyboardFocusRing.ts +12 -6
- package/src/theme/FontKnobStyles.tsx +14 -31
- package/src/theme/Tint.tsx +3 -2
- package/src/theme/animations/css.ts +14 -1
- package/src/theme/colorRules.spec.ts +306 -2
- package/src/theme/colorRules.ts +118 -0
- package/src/theme/cornerSmoothing.native.ts +39 -2
- package/src/theme/cornerSmoothing.spec.ts +270 -3
- package/src/theme/cornerSmoothing.ts +147 -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 +24 -0
- package/src/theme/defaults/fonts.spec.ts +163 -10
- package/src/theme/defaults/fonts.theme.spec.tsx +139 -0
- package/src/theme/defaults/fonts.ts +214 -50
- package/src/theme/defaults/index.ts +1 -0
- package/src/theme/devtools/ThemeDevtoolsPanel.tsx +0 -11
- package/src/theme/focusState.spec.ts +119 -1
- package/src/theme/focusState.ts +32 -7
- package/src/theme/fontCategoryMetrics.ts +57 -0
- package/src/theme/fontCategoryStacks.ts +37 -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 +4 -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 +155 -13
- package/src/theme/resolveKnobs.ts +193 -27
- 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/audit/index.d.ts +2 -0
- package/types/audit/index.d.ts.map +1 -1
- package/types/audit/themeMatrix.d.ts +172 -0
- package/types/audit/themeMatrix.d.ts.map +1 -0
- 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/index.d.ts +2 -0
- package/types/index.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 +8 -12
- 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 +23 -0
- package/types/theme/defaults/categoryFonts.d.ts.map +1 -0
- package/types/theme/defaults/fonts.d.ts +140 -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/fontCategoryMetrics.d.ts +36 -0
- package/types/theme/fontCategoryMetrics.d.ts.map +1 -0
- package/types/theme/fontCategoryStacks.d.ts +24 -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 +4 -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
|
@@ -1,7 +1,145 @@
|
|
|
1
|
+
import { type GenericFont } from "@tamagui/web";
|
|
2
|
+
import type { FontCategory } from "../knobs";
|
|
1
3
|
/** Inter dynamic tracking for a rendered `sizePx`, in em. */
|
|
2
4
|
export declare function interTrackingEm(sizePx: number): number;
|
|
3
5
|
/** Inter dynamic tracking for a rendered `sizePx`, in px (2-decimal). */
|
|
4
6
|
export declare function interTrackingPx(sizePx: number): number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Legacy `size + 10` leading. Kept for `createDefaultFont` callers that pass
|
|
9
|
+
* their own size table and therefore have no era leading to floor.
|
|
10
|
+
*/
|
|
11
|
+
export declare const BODY_LINE_HEIGHT_OFFSET = 10;
|
|
12
|
+
export declare function bodyLineHeightPx(sizePx: number): number;
|
|
13
|
+
/**
|
|
14
|
+
* The era's body size table. Exported under its historical name because
|
|
15
|
+
* `createDefaultFont` defaults to it, so a consumer-registered category font
|
|
16
|
+
* lands on the same ladder as the built-in ones instead of a private copy
|
|
17
|
+
* that drifts at the next pin (MPO-19 X8/X9).
|
|
18
|
+
*/
|
|
19
|
+
export declare const bodyFontSizes: Record<string, number>;
|
|
20
|
+
/** The era's body leading, before any per-category floor. */
|
|
21
|
+
export declare const bodyFontLineHeights: Record<string, number>;
|
|
22
|
+
/**
|
|
23
|
+
* Concrete family stacks for each `headingFont`/`bodyFont` category. Alias of
|
|
24
|
+
* the one table in `fontCategoryStacks.ts`, which `FontKnobStyles` also reads
|
|
25
|
+
* for its `--f-family` fallback — one stop cannot render two faces.
|
|
26
|
+
*/
|
|
27
|
+
export declare const fontFamilyStacks: Record<FontCategory, string>;
|
|
28
|
+
export type FontFamilyCategory = FontCategory;
|
|
29
|
+
/**
|
|
30
|
+
* Leading for one category: the era's body table with the category's LC-11
|
|
31
|
+
* floor applied. Every text step comes back as `$body`'s own value; only the
|
|
32
|
+
* display steps, where the era's taper eases below the floor, move up.
|
|
33
|
+
*/
|
|
34
|
+
export declare function categoryLineHeights(category: FontCategory): Record<string, number>;
|
|
35
|
+
/**
|
|
36
|
+
* Category font on the `$body` ladder: same sizes (including `true`), same
|
|
37
|
+
* weights, leading floored per LC-11, tracking neutral. A missing `true` key
|
|
38
|
+
* is what collapsed `$serif`/`$mono`/`$rounded` to the system face at
|
|
39
|
+
* `line-height: normal` (MPO-44).
|
|
40
|
+
*/
|
|
41
|
+
export declare function createCategoryFont(category: FontCategory, family: string): GenericFont;
|
|
42
|
+
export declare const defaultHeadingFont: import("@tamagui/web").FillInFont<{
|
|
43
|
+
face: {
|
|
44
|
+
readonly 400: {
|
|
45
|
+
readonly normal: "Inter";
|
|
46
|
+
};
|
|
47
|
+
readonly 600: {
|
|
48
|
+
readonly normal: "InterSemiBold";
|
|
49
|
+
};
|
|
50
|
+
readonly 700: {
|
|
51
|
+
readonly normal: "InterBold";
|
|
52
|
+
};
|
|
53
|
+
readonly 800: {
|
|
54
|
+
readonly normal: "InterExtraBold";
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
size: Record<string, number>;
|
|
58
|
+
lineHeight: Record<string, number>;
|
|
59
|
+
weight: Record<string, string>;
|
|
60
|
+
letterSpacing: Record<string, number>;
|
|
61
|
+
}, 3 | 1 | 2 | 12 | 7 | 4 | 5 | 9 | 15 | 10 | 6 | 16 | 11 | 14 | 8 | 13 | "true">;
|
|
62
|
+
export declare const defaultBodyFont: import("@tamagui/web").FillInFont<{
|
|
63
|
+
face: {
|
|
64
|
+
readonly 400: {
|
|
65
|
+
readonly normal: "Inter";
|
|
66
|
+
};
|
|
67
|
+
readonly 600: {
|
|
68
|
+
readonly normal: "InterSemiBold";
|
|
69
|
+
};
|
|
70
|
+
readonly 700: {
|
|
71
|
+
readonly normal: "InterBold";
|
|
72
|
+
};
|
|
73
|
+
readonly 800: {
|
|
74
|
+
readonly normal: "InterExtraBold";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
size: Record<string, number>;
|
|
78
|
+
lineHeight: Record<string, number>;
|
|
79
|
+
weight: Record<string, string>;
|
|
80
|
+
letterSpacing: Record<string, number>;
|
|
81
|
+
}, 3 | 1 | 2 | 12 | 7 | 4 | 5 | 9 | 15 | 10 | 6 | 16 | 11 | 14 | 8 | 13 | "true">;
|
|
82
|
+
export declare const defaultSerifFont: GenericFont;
|
|
83
|
+
export declare const defaultMonoFont: GenericFont;
|
|
84
|
+
export declare const defaultSlabFont: GenericFont;
|
|
85
|
+
export declare const defaultRoundedFont: GenericFont;
|
|
86
|
+
export declare const defaultCondensedFont: GenericFont;
|
|
87
|
+
export declare const defaultCursiveFont: GenericFont;
|
|
88
|
+
export declare const defaultHandwritingFont: GenericFont;
|
|
89
|
+
export declare const defaultPixelFont: GenericFont;
|
|
90
|
+
export declare const defaultBlackletterFont: GenericFont;
|
|
91
|
+
export declare const defaultGeometricFont: GenericFont;
|
|
92
|
+
/** All purpose + category fonts registered by `createDefaultThemeConfig`. */
|
|
93
|
+
export declare const defaultFonts: {
|
|
94
|
+
readonly heading: import("@tamagui/web").FillInFont<{
|
|
95
|
+
face: {
|
|
96
|
+
readonly 400: {
|
|
97
|
+
readonly normal: "Inter";
|
|
98
|
+
};
|
|
99
|
+
readonly 600: {
|
|
100
|
+
readonly normal: "InterSemiBold";
|
|
101
|
+
};
|
|
102
|
+
readonly 700: {
|
|
103
|
+
readonly normal: "InterBold";
|
|
104
|
+
};
|
|
105
|
+
readonly 800: {
|
|
106
|
+
readonly normal: "InterExtraBold";
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
size: Record<string, number>;
|
|
110
|
+
lineHeight: Record<string, number>;
|
|
111
|
+
weight: Record<string, string>;
|
|
112
|
+
letterSpacing: Record<string, number>;
|
|
113
|
+
}, 3 | 1 | 2 | 12 | 7 | 4 | 5 | 9 | 15 | 10 | 6 | 16 | 11 | 14 | 8 | 13 | "true">;
|
|
114
|
+
readonly body: import("@tamagui/web").FillInFont<{
|
|
115
|
+
face: {
|
|
116
|
+
readonly 400: {
|
|
117
|
+
readonly normal: "Inter";
|
|
118
|
+
};
|
|
119
|
+
readonly 600: {
|
|
120
|
+
readonly normal: "InterSemiBold";
|
|
121
|
+
};
|
|
122
|
+
readonly 700: {
|
|
123
|
+
readonly normal: "InterBold";
|
|
124
|
+
};
|
|
125
|
+
readonly 800: {
|
|
126
|
+
readonly normal: "InterExtraBold";
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
size: Record<string, number>;
|
|
130
|
+
lineHeight: Record<string, number>;
|
|
131
|
+
weight: Record<string, string>;
|
|
132
|
+
letterSpacing: Record<string, number>;
|
|
133
|
+
}, 3 | 1 | 2 | 12 | 7 | 4 | 5 | 9 | 15 | 10 | 6 | 16 | 11 | 14 | 8 | 13 | "true">;
|
|
134
|
+
readonly serif: GenericFont;
|
|
135
|
+
readonly mono: GenericFont;
|
|
136
|
+
readonly slab: GenericFont;
|
|
137
|
+
readonly rounded: GenericFont;
|
|
138
|
+
readonly condensed: GenericFont;
|
|
139
|
+
readonly cursive: GenericFont;
|
|
140
|
+
readonly handwriting: GenericFont;
|
|
141
|
+
readonly pixel: GenericFont;
|
|
142
|
+
readonly blackletter: GenericFont;
|
|
143
|
+
readonly geometric: GenericFont;
|
|
144
|
+
};
|
|
7
145
|
//# 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":"AAKA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAG5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAsE7C,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,MAAM,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,EAAE,CAAC;IAEvB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,oEAAoE;IACpE,kBAAkB,CAAC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AuB,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,36 @@
|
|
|
1
|
+
import type { FontCategory } from "./knobs";
|
|
2
|
+
/**
|
|
3
|
+
* Per-category legibility floors (LC-11 FONT-FAMILY-METRICS).
|
|
4
|
+
*
|
|
5
|
+
* `heading` / `body` are minimum lineHeight:fontSize ratios. `letterSpacing:
|
|
6
|
+
* "neutral"` marks the families where Inter's tracking-by-size curve is
|
|
7
|
+
* actively wrong — fixed-pitch faces must keep their pitch, and connected
|
|
8
|
+
* scripts break when tracked apart.
|
|
9
|
+
*
|
|
10
|
+
* Two consumers read this table and they must never drift apart:
|
|
11
|
+
*
|
|
12
|
+
* - `FontKnobStyles` emits `--f-lineHeight-N` overrides on the `.font_body`
|
|
13
|
+
* / `.font_heading` CSS scopes, which is how the knob restyles text that
|
|
14
|
+
* never asked for a category token (web only).
|
|
15
|
+
* - `defaults/fonts.ts` bakes the same floors into each registered category
|
|
16
|
+
* font's own lineHeight table, which is the path the knob actually takes:
|
|
17
|
+
* `bodyFont: "serif"` renders `.font_serif`, and the CSS scope rules above
|
|
18
|
+
* are keyed to `.font_body`, so they never reach it. Native has no CSS at
|
|
19
|
+
* all and depends on the table entirely.
|
|
20
|
+
*
|
|
21
|
+
* "sans-serif" is the default scope and is listed for completeness — the
|
|
22
|
+
* `$body` / `$heading` tables are upstream's under the v5 era pin (MPO-19
|
|
23
|
+
* X8/X9) and this file does not rewrite them.
|
|
24
|
+
*/
|
|
25
|
+
export declare const fontCategoryMetrics: Record<FontCategory, {
|
|
26
|
+
heading: number;
|
|
27
|
+
body: number;
|
|
28
|
+
letterSpacing: "inherit" | "neutral";
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Leading for one size step: the era's own value, raised to the category's
|
|
32
|
+
* floor when the era's taper falls under it. Never below the base, so a
|
|
33
|
+
* category can only ever ask for MORE room than `$body` takes, never less.
|
|
34
|
+
*/
|
|
35
|
+
export declare function flooredLineHeight(sizePx: number, baseLineHeightPx: number, minRatio: number): number;
|
|
36
|
+
//# sourceMappingURL=fontCategoryMetrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fontCategoryMetrics.d.ts","sourceRoot":"","sources":["../../src/theme/fontCategoryMetrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,YAAY,EACZ;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE,CAgBxE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,GACf,MAAM,CAER"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FontCategory } from "./knobs";
|
|
2
|
+
/**
|
|
3
|
+
* The one concrete family stack per headingFont/bodyFont category.
|
|
4
|
+
*
|
|
5
|
+
* Both paths read THIS table, so a stop cannot render one face through the
|
|
6
|
+
* registered font and another through the CSS fallback:
|
|
7
|
+
*
|
|
8
|
+
* - `defaults/fonts.ts` builds the registered `$serif` / `$mono` / … fonts
|
|
9
|
+
* from it (the path the knob takes on every platform).
|
|
10
|
+
* - `FontKnobStyles` falls back to it for `--f-family` when a consumer's
|
|
11
|
+
* config has no font registered for the category (live SHC console had
|
|
12
|
+
* the style tag and skipped the family).
|
|
13
|
+
*
|
|
14
|
+
* Distinct FIRST families throughout, because a text-node measurement reads
|
|
15
|
+
* the first resolvable name — three stops that all begin at a system
|
|
16
|
+
* fallback is the MPO-44 defect.
|
|
17
|
+
*
|
|
18
|
+
* Tracks `packages/config/fonts.ts` (serif/mono/geometric are system aliases,
|
|
19
|
+
* the rest are shipped webfonts). `mono` is the one deliberate widening: the
|
|
20
|
+
* template's bare `monospace` keyword leaves the face to the UA, so this
|
|
21
|
+
* names the platform faces ahead of it and keeps the keyword last.
|
|
22
|
+
*/
|
|
23
|
+
export declare const fontCategoryStacks: Record<FontCategory, string>;
|
|
24
|
+
//# 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;;;;;;;;;;;;;;;;;;;;GAoBG;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,9 @@ 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 "./fontCategoryMetrics";
|
|
13
|
+
export * from "./fontCategoryStacks";
|
|
11
14
|
export * from "./FontKnobStyles";
|
|
12
15
|
export * from "./groupGeometry";
|
|
13
16
|
export * from "./hairline";
|
|
@@ -20,6 +23,7 @@ export type { Preset as PresetDefinition, IntentOverride } from "./preset.types"
|
|
|
20
23
|
export * from "./PresetContext";
|
|
21
24
|
export * from "./presets";
|
|
22
25
|
export * from "./radiusClass";
|
|
26
|
+
export * from "./radiusClassTable.generated";
|
|
23
27
|
export * from "./readableColor";
|
|
24
28
|
export * from "./recipes";
|
|
25
29
|
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,gBAAgB,CAAC;AACjF,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,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"}
|
|
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,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,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,gBAAgB,CAAC;AACjF,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knobs.d.ts","sourceRoot":"","sources":["../../src/theme/knobs.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;CAAsD,CAAC;AAC7E,MAAM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medium; Fluent lg=1024 matches large.
|
|
32
32
|
*/
|
|
33
33
|
export type LayoutSizeClass = "compact" | "medium" | "expanded" | "large" | "xl";
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Named min-widths. Prefer these over literals in layout code.
|
|
36
|
+
*
|
|
37
|
+
* MPO-19 X11: the four names below used to be the whole table, so a
|
|
38
|
+
* responsive design authored in Tamagui idiom named three breakpoints mpo
|
|
39
|
+
* layout code could not — `xs` 460, `md` 768 and `xxl` 1536 simply had no
|
|
40
|
+
* spelling here. The 860 pane threshold has an argument behind it and stays;
|
|
41
|
+
* the MISSING names had no argument at all, which is why they are added
|
|
42
|
+
* unconditionally and the pivot question is not settled here.
|
|
43
|
+
*
|
|
44
|
+
* The Tamagui-named entries carry Tamagui's numbers, exactly. A shared name
|
|
45
|
+
* meaning a different width is the failure this table is supposed to prevent.
|
|
46
|
+
*/
|
|
35
47
|
export declare const layoutBreakpoints: {
|
|
48
|
+
/** Tamagui `$xxs`. Smallest phones. */
|
|
49
|
+
readonly xxs: 340;
|
|
50
|
+
/** Tamagui `$xs`. */
|
|
51
|
+
readonly xs: 460;
|
|
36
52
|
/**
|
|
37
53
|
* End of compact / DeskShell narrow drawer threshold (Tamagui `$sm`).
|
|
38
54
|
* Also the overlay sheet↔float pivot and the DataTable card↔grid pivot —
|
|
39
55
|
* one idiom flip per viewport (MPO-13 C5).
|
|
40
56
|
*/
|
|
41
57
|
readonly medium: 640;
|
|
58
|
+
/**
|
|
59
|
+
* Tamagui `$md` — the width `<Adapt when="maxMd">` pivots on. Whether the
|
|
60
|
+
* overlay pivot should MOVE here from `medium`, and `expanded` be deleted,
|
|
61
|
+
* is the open half of X11; it decides together with GL-47 / MPO-21, so it
|
|
62
|
+
* is not decided here. Naming it costs nothing and is what lets that
|
|
63
|
+
* question be asked in code.
|
|
64
|
+
*/
|
|
65
|
+
readonly md: 768;
|
|
42
66
|
/** Two-pane budget threshold (~M3 expanded 840). Not an overlay pivot. */
|
|
43
67
|
readonly expanded: 860;
|
|
44
68
|
/** Tamagui `$lg`. */
|
|
45
69
|
readonly large: 1024;
|
|
46
70
|
/** Tamagui `$xl`. */
|
|
47
71
|
readonly xl: 1280;
|
|
72
|
+
/** Tamagui `$xxl`. */
|
|
73
|
+
readonly xxl: 1536;
|
|
48
74
|
};
|
|
49
75
|
export type LayoutBreakpointName = keyof typeof layoutBreakpoints;
|
|
50
76
|
/**
|
|
@@ -113,9 +139,9 @@ export declare function pressTargetHitSlop(visualSize: number, min?: number): Hi
|
|
|
113
139
|
* stay start-aligned (flush with the trigger's leading edge).
|
|
114
140
|
* - Pointer-positioned CONTEXT MENUS and free POPOVERS/TOOLTIPS size to
|
|
115
141
|
* content, start-aligned to their anchor.
|
|
116
|
-
* -
|
|
117
|
-
*
|
|
118
|
-
* shift/flip at viewport edges instead of overflowing.
|
|
142
|
+
* - FREE overlays (tooltips, pointer-positioned context menus, popovers with
|
|
143
|
+
* no owning control) keep `OVERLAY_ANCHOR_GAP` px between anchor edge and
|
|
144
|
+
* overlay, and shift/flip at viewport edges instead of overflowing.
|
|
119
145
|
* - ONE SURFACE OWNER per overlay: the overlay frame draws the single
|
|
120
146
|
* border + radius. When a panel intentionally covers its trigger
|
|
121
147
|
* (Select's macOS-style aligned listbox), the covered trigger must not
|
|
@@ -123,6 +149,22 @@ export declare function pressTargetHitSlop(visualSize: number, min?: number): Hi
|
|
|
123
149
|
* box would ghost around the overlay's corners as a doubled edge.
|
|
124
150
|
*/
|
|
125
151
|
export declare const OVERLAY_ANCHOR_GAP = 4;
|
|
152
|
+
/**
|
|
153
|
+
* Clay's FloatingPanel ruling, 2026-08-28 (MPO-38). COVER is the defining
|
|
154
|
+
* behaviour of the FloatingPanel family: a panel attaches to the trigger it
|
|
155
|
+
* was opened from and does not float clear of it. Floating 4px below is the
|
|
156
|
+
* EXCEPTION, not the rule, and no member takes it unless Clay rules it.
|
|
157
|
+
*
|
|
158
|
+
* So the family anchors at zero: the panel's top edge coincides with the
|
|
159
|
+
* trigger's bottom edge (or, for the covering members — Select and
|
|
160
|
+
* single-value Combobox — with the trigger's own top edge). `OVERLAY_ANCHOR_GAP`
|
|
161
|
+
* stays 4 for FREE overlays, which have no trigger to attach to.
|
|
162
|
+
*
|
|
163
|
+
* Measured before this landed (playwright, 1440x900 DPR 2, real components):
|
|
164
|
+
* DropdownMenu 3.96, DatePicker 4.00, TimePicker 4.00, ColorPicker 4.00 px of
|
|
165
|
+
* daylight between trigger bottom and panel top.
|
|
166
|
+
*/
|
|
167
|
+
export declare const OVERLAY_ATTACH_GAP = 0;
|
|
126
168
|
/**
|
|
127
169
|
* Semantic spacing roles map onto the space-knob recipes:
|
|
128
170
|
* `within-group` → `knobProps.gap`, `between-groups` → `knobProps.gapLg`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layoutTokens.d.ts","sourceRoot":"","sources":["../../src/theme/layoutTokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AASH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,CAAC;AAEjF
|
|
1
|
+
{"version":3,"file":"layoutTokens.d.ts","sourceRoot":"","sources":["../../src/theme/layoutTokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AASH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,CAAC;AAEjF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB;IAC5B,uCAAuC;;IAEvC,qBAAqB;;IAErB;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH,0EAA0E;;IAE1E,qBAAqB;;IAErB,qBAAqB;;IAErB,sBAAsB;;CAEd,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAElE;;;;;;;;;G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,CAElF;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,yEAAyE;AACzE,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,GAAG,GAAE,MAAyB,GAC7B,aAAa,CAGf;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAIpC;;;GAGG;AACH,wBAAgB,eAAe,IAAI;IACjC,WAAW,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7B,aAAa,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAChC,CAMA"}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Radius-class declarations (D-09 / LC-60)
|
|
2
|
+
* Radius-class declarations (D-09 / LC-60) and the radius RESOLUTION resolver
|
|
3
|
+
* (DG-RAD-01..05, Clay ruling 2026-08-28).
|
|
4
|
+
*
|
|
5
|
+
* Two axes live here, and they COMPOSE rather than replace each other:
|
|
6
|
+
*
|
|
7
|
+
* 1. Knob-IMMUNITY (`R-PILL` / `R-IDENTITY`, LC-60/D-09): the knob does not
|
|
8
|
+
* reach the part at all — roundness is the part's identity, so it stays
|
|
9
|
+
* round at every stop including `none`. Declared via `radiusClassProps`,
|
|
10
|
+
* registered in `docs/theme-propagation-spec.md` § Radius.
|
|
11
|
+
* 2. RESOLUTION (DG-RAD, `docs/design-guidelines.md` §13): given that a part
|
|
12
|
+
* listens to the knob, what a stop resolves to. Four classes (DEFAULT /
|
|
13
|
+
* CIRCULAR-AT-FULL / BINARY / CONTAINER-CAP), with a per-component
|
|
14
|
+
* override layer on top where meaning demands it (DG-RAD-05 — Checkbox
|
|
15
|
+
* never becomes a circle; the Radio disc never stops being one).
|
|
16
|
+
*
|
|
17
|
+
* `resolveRadiusForPart` layers them in doctrine order: immunity wins, then a
|
|
18
|
+
* declared override, then the class. The tables are GENERATED from the DG-RAD
|
|
19
|
+
* doctrine section (`scripts/radius-class-registry.mjs` --emit/--check), so
|
|
20
|
+
* code and doctrine cannot drift — the same contract the immunity axis has
|
|
21
|
+
* with `scripts/radius-identity-registry.mjs`.
|
|
3
22
|
*
|
|
4
23
|
* Most parts prove they obey the radius knob by simply going square at
|
|
5
24
|
* `borderRadius:none`. A few legitimately do not — an ornamental dot has no
|
|
@@ -14,13 +33,17 @@
|
|
|
14
33
|
* spell, or an R-IDENTITY part the spec never adjudicated, still fails. This
|
|
15
34
|
* module is the writing end; `docs/theme-propagation-spec.md` is the registry.
|
|
16
35
|
*/
|
|
36
|
+
import type { BorderRadius } from "./knobs";
|
|
37
|
+
import { RADIUS_RESOLUTION_COMPOSITION, type RadiusOverrideEntry, type RadiusResolutionClass } from "./radiusClassTable.generated";
|
|
17
38
|
/**
|
|
18
39
|
* The radius classes whose parts stay round at `borderRadius:none`.
|
|
19
40
|
*
|
|
20
41
|
* - `R-PILL` — a pill/circle at every radius value (ornamental dots, badge
|
|
21
|
-
* indicators
|
|
22
|
-
*
|
|
23
|
-
*
|
|
42
|
+
* indicators). Size still tracks the size knob. Icon wells are DEFAULT,
|
|
43
|
+
* not R-PILL (R2e) — unless the well IS a count badge.
|
|
44
|
+
* - `R-IDENTITY` — the shape IS the part's identity (Avatar, brand marks,
|
|
45
|
+
* Radio disc). Membership is enumerated in the spec table and enforced
|
|
46
|
+
* per part.
|
|
24
47
|
*/
|
|
25
48
|
export type KnobImmuneRadiusClass = "R-PILL" | "R-IDENTITY";
|
|
26
49
|
export interface RadiusClassDeclaration {
|
|
@@ -41,4 +64,73 @@ export interface RadiusClassDeclaration {
|
|
|
41
64
|
* <Frame {...radiusClassProps("R-IDENTITY", "Avatar")} circular />
|
|
42
65
|
*/
|
|
43
66
|
export declare function radiusClassProps(radiusClass: KnobImmuneRadiusClass, part: string): RadiusClassDeclaration;
|
|
67
|
+
/**
|
|
68
|
+
* The geometry a doctrine cell may need. `h/2` cells need the part's own
|
|
69
|
+
* painted height (shorter edge); CONTAINER-CAP cells need the container's own
|
|
70
|
+
* padding at the current space stop (13/18/32 — `panelPaddingPxMap`).
|
|
71
|
+
*/
|
|
72
|
+
export interface RadiusClassGeometry {
|
|
73
|
+
heightPx?: number;
|
|
74
|
+
paddingPx?: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Resolve one radius-resolution class at one knob stop to px (DG-RAD-01..04).
|
|
78
|
+
*
|
|
79
|
+
* This is the CLASS layer only — the doctrine's DEFAULT resolution. Parts with
|
|
80
|
+
* a declared per-component override or a knob-immunity declaration resolve
|
|
81
|
+
* through `resolveRadiusForPart`, which layers all three.
|
|
82
|
+
*
|
|
83
|
+
* Fails loudly on anything the doctrine table cannot spell: an unknown class,
|
|
84
|
+
* an unknown stop, or an `h/2`/padding cell without its geometry. Silent
|
|
85
|
+
* defaults are how tables widen.
|
|
86
|
+
*/
|
|
87
|
+
export declare function resolveRadiusClass(radiusClass: RadiusResolutionClass, stop: BorderRadius, geometry?: RadiusClassGeometry): number;
|
|
88
|
+
/**
|
|
89
|
+
* Look up a part's declared per-component override (DG-RAD-05), if any.
|
|
90
|
+
* Matching is by the doctrine's component name, case-insensitive — the same
|
|
91
|
+
* contract the R-IDENTITY membership registry uses. Sweeps use this to PASS a
|
|
92
|
+
* declared override instead of reporting it as a violation.
|
|
93
|
+
*/
|
|
94
|
+
export declare function radiusOverrideFor(part: string): RadiusOverrideEntry | undefined;
|
|
95
|
+
export type ResolvedRadiusSource = (typeof RADIUS_RESOLUTION_COMPOSITION)[number];
|
|
96
|
+
export interface ResolveRadiusForPartOptions extends RadiusClassGeometry {
|
|
97
|
+
/** the knob stop being resolved */
|
|
98
|
+
stop: BorderRadius;
|
|
99
|
+
/**
|
|
100
|
+
* the part's resolution class as doctrine assigns it — DEFAULT unless
|
|
101
|
+
* assigned otherwise (knobs-enumerated.md Part 2b / DG-RAD)
|
|
102
|
+
*/
|
|
103
|
+
radiusClass?: RadiusResolutionClass;
|
|
104
|
+
/**
|
|
105
|
+
* the part name as the doctrine's override table spells it (`Checkbox`,
|
|
106
|
+
* `Radio disc`) — enables the DG-RAD-05 override lookup
|
|
107
|
+
*/
|
|
108
|
+
part?: string;
|
|
109
|
+
/**
|
|
110
|
+
* the part's declared knob-immunity (`R-PILL` / `R-IDENTITY`, LC-60/D-09),
|
|
111
|
+
* if it carries one. Immunity COMPOSES above both other layers: the knob
|
|
112
|
+
* never reaches the part, so it stays round at every stop including `none`.
|
|
113
|
+
*/
|
|
114
|
+
immunity?: KnobImmuneRadiusClass;
|
|
115
|
+
}
|
|
116
|
+
export interface ResolvedPartRadius {
|
|
117
|
+
px: number;
|
|
118
|
+
/** which layer resolved it: declared immunity > declared override > class */
|
|
119
|
+
source: ResolvedRadiusSource;
|
|
120
|
+
/** the class the part would resolve by, for sweeps that report both */
|
|
121
|
+
radiusClass: RadiusResolutionClass;
|
|
122
|
+
/** the recorded DG-RAD-05 reason, when an override won */
|
|
123
|
+
overrideWhy?: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Resolve a part's radius at a knob stop through all three doctrine layers,
|
|
127
|
+
* in doctrine order (DG-RAD-05 composition note): a declared knob-immunity
|
|
128
|
+
* wins, then a declared per-component override, then the resolution class.
|
|
129
|
+
*
|
|
130
|
+
* A declared immunity is COMPOSED with, never replaced: even at `none` the
|
|
131
|
+
* part measures h/2, because roundness is its identity, not a radius (Clay
|
|
132
|
+
* 2026-08-28 resolving R2a — badge count pill, status dots, DotIndicator
|
|
133
|
+
* marks, presence pip stay round in the square world).
|
|
134
|
+
*/
|
|
135
|
+
export declare function resolveRadiusForPart(options: ResolveRadiusForPartOptions): ResolvedPartRadius;
|
|
44
136
|
//# sourceMappingURL=radiusClass.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radiusClass.d.ts","sourceRoot":"","sources":["../../src/theme/radiusClass.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"radiusClass.d.ts","sourceRoot":"","sources":["../../src/theme/radiusClass.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAEL,6BAA6B,EAE7B,KAAK,mBAAmB,EAExB,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE5D,MAAM,WAAW,sBAAsB;IACrC,mBAAmB,EAAE,qBAAqB,CAAC;IAC3C,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,qBAAqB,EAClC,IAAI,EAAE,MAAM,GACX,sBAAsB,CAExB;AAID;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqCD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,qBAAqB,EAClC,IAAI,EAAE,YAAY,EAClB,QAAQ,GAAE,mBAAwB,GACjC,MAAM,CAcR;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAG/E;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC;AAElF,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,mCAAmC;IACnC,IAAI,EAAE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