@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
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED from docs/design-guidelines.md §13 "Radius resolution" (DG-RAD-01..05)
|
|
3
|
+
* by scripts/radius-class-registry.mjs — DO NOT EDIT BY HAND.
|
|
4
|
+
*
|
|
5
|
+
* Regenerate: node scripts/radius-class-registry.mjs --emit
|
|
6
|
+
* Verify: node scripts/radius-class-registry.mjs --check
|
|
7
|
+
*
|
|
8
|
+
* The doctrine is the source; this module is the resolver's copy of it. Editing the
|
|
9
|
+
* resolution here instead of in the doctrine is exactly the drift the generator exists
|
|
10
|
+
* to prevent (the same contract as scripts/radius-identity-registry.mjs).
|
|
11
|
+
*/
|
|
12
|
+
export declare const RADIUS_RESOLUTION_STOPS: readonly ["none", "small", "medium", "large", "full"];
|
|
13
|
+
/** The `borderRadius` knob stops as the doctrine table spells them. */
|
|
14
|
+
export type RadiusResolutionStop = (typeof RADIUS_RESOLUTION_STOPS)[number];
|
|
15
|
+
/**
|
|
16
|
+
* One doctrine table cell. `px` is a literal resolved radius; `half-height` is the
|
|
17
|
+
* part's own painted height over two (a true circle/pill); `min-token-padding` and
|
|
18
|
+
* `padding` are the CONTAINER-CAP spellings (Axiom 1 CLIP: never exceed own padding).
|
|
19
|
+
*/
|
|
20
|
+
export type RadiusResolutionCell = {
|
|
21
|
+
readonly kind: "px";
|
|
22
|
+
readonly px: number;
|
|
23
|
+
} | {
|
|
24
|
+
readonly kind: "half-height";
|
|
25
|
+
} | {
|
|
26
|
+
readonly kind: "min-token-padding";
|
|
27
|
+
readonly tokenPx: number;
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: "padding";
|
|
30
|
+
};
|
|
31
|
+
export type RadiusResolutionRow = Readonly<Record<RadiusResolutionStop, RadiusResolutionCell>>;
|
|
32
|
+
/** DG-RAD-01..04 — resolved radius per class per stop. */
|
|
33
|
+
export declare const RADIUS_RESOLUTION_TABLE: {
|
|
34
|
+
readonly DEFAULT: {
|
|
35
|
+
readonly none: {
|
|
36
|
+
readonly kind: "px";
|
|
37
|
+
readonly px: 0;
|
|
38
|
+
};
|
|
39
|
+
readonly small: {
|
|
40
|
+
readonly kind: "px";
|
|
41
|
+
readonly px: 5;
|
|
42
|
+
};
|
|
43
|
+
readonly medium: {
|
|
44
|
+
readonly kind: "px";
|
|
45
|
+
readonly px: 9;
|
|
46
|
+
};
|
|
47
|
+
readonly large: {
|
|
48
|
+
readonly kind: "px";
|
|
49
|
+
readonly px: 16;
|
|
50
|
+
};
|
|
51
|
+
readonly full: {
|
|
52
|
+
readonly kind: "px";
|
|
53
|
+
readonly px: 50;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly "CIRCULAR-AT-FULL": {
|
|
57
|
+
readonly none: {
|
|
58
|
+
readonly kind: "px";
|
|
59
|
+
readonly px: 0;
|
|
60
|
+
};
|
|
61
|
+
readonly small: {
|
|
62
|
+
readonly kind: "px";
|
|
63
|
+
readonly px: 5;
|
|
64
|
+
};
|
|
65
|
+
readonly medium: {
|
|
66
|
+
readonly kind: "px";
|
|
67
|
+
readonly px: 9;
|
|
68
|
+
};
|
|
69
|
+
readonly large: {
|
|
70
|
+
readonly kind: "px";
|
|
71
|
+
readonly px: 16;
|
|
72
|
+
};
|
|
73
|
+
readonly full: {
|
|
74
|
+
readonly kind: "half-height";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly BINARY: {
|
|
78
|
+
readonly none: {
|
|
79
|
+
readonly kind: "px";
|
|
80
|
+
readonly px: 0;
|
|
81
|
+
};
|
|
82
|
+
readonly small: {
|
|
83
|
+
readonly kind: "half-height";
|
|
84
|
+
};
|
|
85
|
+
readonly medium: {
|
|
86
|
+
readonly kind: "half-height";
|
|
87
|
+
};
|
|
88
|
+
readonly large: {
|
|
89
|
+
readonly kind: "half-height";
|
|
90
|
+
};
|
|
91
|
+
readonly full: {
|
|
92
|
+
readonly kind: "half-height";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
readonly "CONTAINER-CAP": {
|
|
96
|
+
readonly none: {
|
|
97
|
+
readonly kind: "px";
|
|
98
|
+
readonly px: 0;
|
|
99
|
+
};
|
|
100
|
+
readonly small: {
|
|
101
|
+
readonly kind: "min-token-padding";
|
|
102
|
+
readonly tokenPx: 5;
|
|
103
|
+
};
|
|
104
|
+
readonly medium: {
|
|
105
|
+
readonly kind: "min-token-padding";
|
|
106
|
+
readonly tokenPx: 9;
|
|
107
|
+
};
|
|
108
|
+
readonly large: {
|
|
109
|
+
readonly kind: "min-token-padding";
|
|
110
|
+
readonly tokenPx: 16;
|
|
111
|
+
};
|
|
112
|
+
readonly full: {
|
|
113
|
+
readonly kind: "padding";
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/** A part is in exactly one class; DEFAULT unless the doctrine assigns otherwise. */
|
|
118
|
+
export type RadiusResolutionClass = keyof typeof RADIUS_RESOLUTION_TABLE;
|
|
119
|
+
export interface RadiusOverrideEntry {
|
|
120
|
+
/** the component name as the doctrine's override table spells it */
|
|
121
|
+
readonly component: string;
|
|
122
|
+
readonly cells: RadiusResolutionRow;
|
|
123
|
+
/** the recorded reason the class would destroy meaning (the DG-RAD-05 bar) */
|
|
124
|
+
readonly why: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* DG-RAD-05 — declared per-component overrides. A row here WINS over the part's
|
|
128
|
+
* resolution class, and sweeps PASS these measurements instead of flagging them.
|
|
129
|
+
*/
|
|
130
|
+
export declare const RADIUS_OVERRIDE_TABLE: readonly RadiusOverrideEntry[];
|
|
131
|
+
/**
|
|
132
|
+
* The resolver's layering, as doctrine spells it: a declared knob-immunity
|
|
133
|
+
* (R-PILL / R-IDENTITY, LC-60/D-09) wins, then a declared override, then the class.
|
|
134
|
+
*/
|
|
135
|
+
export declare const RADIUS_RESOLUTION_COMPOSITION: readonly ["immunity", "override", "class"];
|
|
136
|
+
export interface OpenRadiusAdjudication {
|
|
137
|
+
readonly id: string;
|
|
138
|
+
readonly text: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Adjudications still open (MPO-56 AC-6): sweeps must EXCLUDE these parts
|
|
142
|
+
* from cell assertions and REPORT the exclusion — never silently skip it.
|
|
143
|
+
* An empty list is the closed state (R2 leftovers closed by RULINGS-2026-08-28).
|
|
144
|
+
*/
|
|
145
|
+
export declare const OPEN_RADIUS_ADJUDICATIONS: readonly OpenRadiusAdjudication[];
|
|
146
|
+
//# sourceMappingURL=radiusClassTable.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radiusClassTable.generated.d.ts","sourceRoot":"","sources":["../../src/theme/radiusClassTable.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,uBAAuB,uDAAwD,CAAC;AAE7F,uEAAuE;AACvE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE,GAChC;IAAE,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAChE;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAE/F,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BoB,CAAC;AAEzD,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,uBAAuB,CAAC;AAEzE,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,mBAAmB,EAuB/D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,4CAA6C,CAAC;AAExF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,sBAAsB,EAEtE,CAAC"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Size-recipe INPUTS (LC-
|
|
2
|
+
* Size-recipe INPUTS (LC-80 RECIPE-INPUTS).
|
|
3
3
|
*
|
|
4
|
-
* Stored numbers are the source of truth.
|
|
5
|
-
* box/type/icon variants, touch heights) are
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Stored numbers are the source of truth. Derived projections (heights,
|
|
5
|
+
* recipes, box/type/icon variants, touch heights, radii) are never
|
|
6
|
+
* handwritten at a call site. The DEFAULT ladder is the measured Tamagui
|
|
7
|
+
* v5 table (`tokenTable`): padX / font / icon / radius per size token,
|
|
8
|
+
* gap == radius at every stop. A linear ratio is only the fallback when
|
|
9
|
+
* a theme sets `{ baseHeight }` and drops the table — it is not the
|
|
10
|
+
* default ladder and is not a signed-off divergence (MPO-46 / R6).
|
|
11
|
+
*
|
|
12
|
+
* Radius steps with the size token. The borderRadius knob is an override
|
|
13
|
+
* that retargets gap through `applyRadiusStop` (gap == radius at every
|
|
14
|
+
* knob stop too). `radiusPx` on inputs is the $4 / medium default (9).
|
|
8
15
|
*
|
|
9
16
|
* Tamagui `createThemes` / theme-builder still emits COLOR palettes only.
|
|
10
17
|
* Do not stuff recipe keys into `getTheme()` / `themes`.
|
|
11
|
-
*
|
|
12
|
-
* DEFAULT uses `tokenHeights` pinned to the stock Tamagui `$size` scale as
|
|
13
|
-
* measured on tamagui.dev ($4=44, $3=36, $5=52, $6=64 — MPO-13 C1/C2: the
|
|
14
|
-
* recipe key and the raw token now agree). `{ baseHeight: 40 }` (no
|
|
15
|
-
* tokenHeights / sizeFactors) regenerates geometrically from
|
|
16
|
-
* `baseHeight * stepRatio ** step`.
|
|
17
18
|
*/
|
|
18
19
|
import { type TileSizeInputs, type TileSizeLadder } from "./tileSizes";
|
|
19
20
|
export declare const SIZE_RECIPE_TOKENS: readonly ["$1", "$1.5", "$2", "$2.5", "$3", "$3.5", "$4", "$true", "$5", "$6"];
|
|
@@ -27,6 +28,27 @@ export type SizeRecipeRatios = {
|
|
|
27
28
|
icon: number;
|
|
28
29
|
gap: number;
|
|
29
30
|
};
|
|
31
|
+
/** Per-token channels on the measured ladder. Gap is not stored — it equals `radius`. */
|
|
32
|
+
export type SizeRecipeTokenChannels = {
|
|
33
|
+
paddingHorizontal: number;
|
|
34
|
+
fontSize: number;
|
|
35
|
+
iconSize: number;
|
|
36
|
+
radius: number;
|
|
37
|
+
};
|
|
38
|
+
export type SizeRecipeTokenTable = Partial<Record<SizeRecipeToken, SizeRecipeTokenChannels>>;
|
|
39
|
+
/**
|
|
40
|
+
* borderRadius knob stops (px). Mirrors the v5 radius tokens the knob
|
|
41
|
+
* already resolves ($0/$2/$4/$6/$12 = 0/5/9/16/50). `applyRadiusStop`
|
|
42
|
+
* retargets recipe.gap to the same number so gap == radius at every stop.
|
|
43
|
+
*/
|
|
44
|
+
export declare const SIZE_RECIPE_RADIUS_STOPS: {
|
|
45
|
+
readonly none: 0;
|
|
46
|
+
readonly small: 5;
|
|
47
|
+
readonly medium: 9;
|
|
48
|
+
readonly large: 16;
|
|
49
|
+
readonly full: 50;
|
|
50
|
+
};
|
|
51
|
+
export type SizeRecipeRadiusStop = keyof typeof SIZE_RECIPE_RADIUS_STOPS;
|
|
30
52
|
export type SizeRecipeInputs = {
|
|
31
53
|
baseHeight: number;
|
|
32
54
|
stepRatio: number;
|
|
@@ -38,6 +60,21 @@ export type SizeRecipeInputs = {
|
|
|
38
60
|
* `tokenHeights` is omitted. Factors are `stepRatio ** exponent` otherwise.
|
|
39
61
|
*/
|
|
40
62
|
sizeFactors?: Partial<Record<SizeRecipeToken, number>>;
|
|
63
|
+
/**
|
|
64
|
+
* Measured per-token channels (padX / font / icon / radius). When
|
|
65
|
+
* present, enumerable recipes read this table and set gap = radius.
|
|
66
|
+
* `{ baseHeight }` without an explicit tokenTable drops it so the
|
|
67
|
+
* geometric fallback can run.
|
|
68
|
+
*/
|
|
69
|
+
tokenTable?: SizeRecipeTokenTable;
|
|
70
|
+
/** Same-height tighter family (Chip / `recipeFamily="controlCompact"`). */
|
|
71
|
+
compactTokenTable?: SizeRecipeTokenTable;
|
|
72
|
+
/**
|
|
73
|
+
* Input padX (one space half-step below the button at the same token).
|
|
74
|
+
* $4 = 16 vs the button's 18. Stored on inputs so the generator remains
|
|
75
|
+
* the single writer; Input consumes this, not a second handwritten map.
|
|
76
|
+
*/
|
|
77
|
+
inputPadX?: Partial<Record<SizeRecipeToken, number>>;
|
|
41
78
|
ratios: SizeRecipeRatios;
|
|
42
79
|
compactRatios: SizeRecipeRatios;
|
|
43
80
|
radiusPx: number;
|
|
@@ -82,6 +119,8 @@ export type SizeRecipeTables = {
|
|
|
82
119
|
heightVariants: Record<string, {
|
|
83
120
|
height: number;
|
|
84
121
|
}>;
|
|
122
|
+
/** Size-stepped radius (px). Gap on the matching recipe equals this value. */
|
|
123
|
+
radii: Record<string, number>;
|
|
85
124
|
};
|
|
86
125
|
export type SizeRecipeFamily = SizeRecipeTables & {
|
|
87
126
|
name: SizeRecipeFamilyName;
|
|
@@ -96,6 +135,7 @@ export type GeneratedSizeRecipes = {
|
|
|
96
135
|
boxVariants: Record<string, SizeRecipeBoxVariant>;
|
|
97
136
|
typeVariants: Record<string, SizeRecipeTypeVariant>;
|
|
98
137
|
iconVariants: Record<string, SizeRecipeIconVariant>;
|
|
138
|
+
radii: Record<string, number>;
|
|
99
139
|
families: RecipeFamilies;
|
|
100
140
|
/** Tile-size ladder (MPO-31) — derived from `inputs.tile` over the measured defaults. */
|
|
101
141
|
tiles: TileSizeLadder;
|
|
@@ -103,18 +143,49 @@ export type GeneratedSizeRecipes = {
|
|
|
103
143
|
export declare const SIZE_TOKEN_EXPONENTS: Record<SizeRecipeToken, number>;
|
|
104
144
|
/** Lossless relative table: the stock Tamagui 20/24/28/32/36/40/44/52/64 ramp at baseHeight 44. */
|
|
105
145
|
export declare const defaultSizeFactors: Record<SizeRecipeToken, number>;
|
|
146
|
+
/**
|
|
147
|
+
* Measured Tamagui v5 Button ladder (rendered reference §6.1) plus the
|
|
148
|
+
* integer token-scale fills for stops the site did not photograph.
|
|
149
|
+
*
|
|
150
|
+
* padX = `$space` at the same key (2/4/7/10/13/16/18/24/32).
|
|
151
|
+
* radius = `$radius` at the same key (3/5/7/9/10/16); half-steps sit
|
|
152
|
+
* halfway on that scale (4/6/8) because v5 has no $1.5/$2.5/$3.5 radius.
|
|
153
|
+
* font = Inter body at the same key (11/12/13/14/16/18); half-steps take
|
|
154
|
+
* the next integer stop.
|
|
155
|
+
* icon steps with size and keeps the existing $4 = 16 contract.
|
|
156
|
+
* $2/$3/$4/$6 padX / font / radius are the photographed values (7/13/18/32,
|
|
157
|
+
* 12/13/14/18, 5/7/9/16).
|
|
158
|
+
*/
|
|
159
|
+
export declare const TAMAGUI_CONTROL_SIZE_TABLE: Record<SizeRecipeToken, SizeRecipeTokenChannels>;
|
|
160
|
+
/**
|
|
161
|
+
* Input padX — `getSpace(val, { shift: -1 })` on the v5 space scale
|
|
162
|
+
* (rendered reference §6.2). $2/$3/$4 are the photographed 4/10/16;
|
|
163
|
+
* $4 is 16 against the button's 18.
|
|
164
|
+
*/
|
|
165
|
+
export declare const TAMAGUI_INPUT_PADX: Record<SizeRecipeToken, number>;
|
|
166
|
+
/**
|
|
167
|
+
* controlCompact: same height / radius (so gap == radius) as control;
|
|
168
|
+
* padX is the Input table (one space half-step tighter); font/icon sit
|
|
169
|
+
* one type step below the control table.
|
|
170
|
+
*/
|
|
171
|
+
export declare const TAMAGUI_COMPACT_SIZE_TABLE: Record<SizeRecipeToken, SizeRecipeTokenChannels>;
|
|
106
172
|
export declare const DEFAULT_SIZE_RECIPE_INPUTS: SizeRecipeInputs;
|
|
107
173
|
export declare const defaultRecipeInputs: SizeRecipeInputs;
|
|
108
174
|
export declare const TOUCH_HEIGHT_FLOOR: number;
|
|
109
175
|
export declare function cloneSizeRecipeInputs(inputs: SizeRecipeInputs): SizeRecipeInputs;
|
|
110
176
|
/**
|
|
111
|
-
* Fill defaults. `{ baseHeight: 36 }` drops handwritten tokenHeights/
|
|
112
|
-
* so every token regenerates from stepRatio.
|
|
177
|
+
* Fill defaults. `{ baseHeight: 36 }` drops handwritten tokenHeights /
|
|
178
|
+
* sizeFactors / token tables so every token regenerates from stepRatio.
|
|
113
179
|
*/
|
|
114
180
|
export declare function resolveSizeRecipeInputs(partial?: Partial<SizeRecipeInputs>): SizeRecipeInputs;
|
|
115
181
|
export declare const mergeRecipeInputs: typeof resolveSizeRecipeInputs;
|
|
116
182
|
export declare function sizeRecipeFromHeight(height: number, ratios?: SizeRecipeRatios): SizeRecipe;
|
|
117
|
-
export declare function
|
|
183
|
+
export declare function recipeFromTokenChannels(height: number, channels: SizeRecipeTokenChannels): SizeRecipe;
|
|
184
|
+
/** Retarget inner gap to a borderRadius knob stop so gap == that stop's radius. */
|
|
185
|
+
export declare function applyRadiusStop<T extends {
|
|
186
|
+
gap: number;
|
|
187
|
+
}>(recipe: T, stop: SizeRecipeRadiusStop): T;
|
|
188
|
+
export declare function generateSizeRecipeTables(inputs: SizeRecipeInputs, ratios?: SizeRecipeRatios, table?: SizeRecipeTokenTable | undefined): SizeRecipeTables;
|
|
118
189
|
export declare function createRecipeFamilies(inputs?: SizeRecipeInputs | Partial<SizeRecipeInputs>): RecipeFamilies;
|
|
119
190
|
export declare function generateSizeRecipes(partial?: Partial<SizeRecipeInputs>): GeneratedSizeRecipes;
|
|
120
191
|
//# sourceMappingURL=recipeInputs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipeInputs.d.ts","sourceRoot":"","sources":["../../src/theme/recipeInputs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"recipeInputs.d.ts","sourceRoot":"","sources":["../../src/theme/recipeInputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,kBAAkB,gFAWrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAChE,8CAA8C;AAC9C,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,yFAAyF;AACzF,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAA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CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAAG,gBAAgB,CAwDjG;AAED,eAAO,MAAM,iBAAiB,gCAA0B,CAAC;AAezD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,gBAAoD,GAC3D,UAAU,CASZ;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,uBAAuB,GAChC,UAAU,CAQZ;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EACvD,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,oBAAoB,GACzB,CAAC,CAEH;AA6CD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,gBAAgB,EACxB,MAAM,GAAE,gBAAgC,EACxC,KAAK,GAAE,oBAAoB,GAAG,SAA6B,GAC1D,gBAAgB,CAmDlB;AAED,wBAAgB,oBAAoB,CAClC,MAAM,GAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAM,GACxD,cAAc,CAYhB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAAG,oBAAoB,CAiBjG"}
|
package/types/theme/recipes.d.ts
CHANGED
|
@@ -18,9 +18,33 @@ export interface TextStateProps {
|
|
|
18
18
|
fontWeight?: string;
|
|
19
19
|
fontSize?: string;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface ElevationPaintProps {
|
|
22
|
+
shadowColor?: string;
|
|
23
|
+
shadowOffset?: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
shadowOpacity?: number;
|
|
28
|
+
shadowRadius?: number;
|
|
29
|
+
/** Web: raw boxShadow so paint does not depend on Tamagui's elevation variant. */
|
|
30
|
+
style?: {
|
|
31
|
+
boxShadow: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface ElevationStateProps extends ElevationPaintProps {
|
|
22
35
|
/** Size token on web ("$1"); numeric tokens.size value on native (RN-safe). */
|
|
23
36
|
elevation?: string | number;
|
|
37
|
+
/** Dark-scheme surface tint (existing $color ramp). Light leaves this unset. */
|
|
38
|
+
backgroundColor?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Complete elevation chrome to spread onto a raised frame (E-CONTROL wrappers,
|
|
42
|
+
* InputParts Box). Shadows + Android dp. No fill — filled inputs read
|
|
43
|
+
* `inputBackground`; overlays read `elevatedSurface.backgroundColor`.
|
|
44
|
+
*/
|
|
45
|
+
export interface ElevationChromeProps extends ElevationPaintProps {
|
|
46
|
+
/** Android dp (2/4/8), not the Tamagui size token. */
|
|
47
|
+
elevation?: number;
|
|
24
48
|
}
|
|
25
49
|
/** Text-bearing control chrome (Button, Chip, Input.Box): muted fill/border, no opacity. */
|
|
26
50
|
export interface DisabledSurfaceProps {
|
|
@@ -86,8 +110,8 @@ export interface KnobRecipe<T> {
|
|
|
86
110
|
* Corner smoothing carrier (Axiom 15 OPTICS): radius-bearing fragments gain
|
|
87
111
|
* `className: "mp-corner-smooth"` when `cornerSmoothing: "smooth"` (web
|
|
88
112
|
* only) — the mounted stylesheet in `cornerSmoothing.ts` resolves it to
|
|
89
|
-
* `corner-shape: squircle
|
|
90
|
-
*
|
|
113
|
+
* `corner-shape: squircle` (computed `superellipse(2)` on Chromium 152).
|
|
114
|
+
* Engines without the property drop the declaration; native is absent.
|
|
91
115
|
*/
|
|
92
116
|
export interface CornerSmoothingCarrier {
|
|
93
117
|
className?: string;
|
|
@@ -98,9 +122,46 @@ export interface KnobProps {
|
|
|
98
122
|
borderColor: string;
|
|
99
123
|
borderWidth: number;
|
|
100
124
|
} & CornerSmoothingCarrier;
|
|
125
|
+
/**
|
|
126
|
+
* The radius for chrome NESTED INSIDE a radius-bearing frame — a tab
|
|
127
|
+
* indicator inside a tab bar, a code block inside a card, a toast's action
|
|
128
|
+
* strip. It resolves one or more steps SMALLER than `borderRadius` at every
|
|
129
|
+
* knob stop (medium: `$3` inside `$4`, full: `$5` inside `$12`), because a
|
|
130
|
+
* child corner that matched its parent's would read as a second frame.
|
|
131
|
+
*
|
|
132
|
+
* MPO-19 X12 (00 L9c): this was `borderRadiusOuter`, which named the
|
|
133
|
+
* opposite of what it resolves to — every one of its consumers uses it for
|
|
134
|
+
* inner chrome, so the name told each of them the wrong story. Renamed;
|
|
135
|
+
* `borderRadiusOuter` stays as a deprecated alias for one release.
|
|
136
|
+
*/
|
|
137
|
+
borderRadiusNested: {
|
|
138
|
+
borderRadius: string;
|
|
139
|
+
} & CornerSmoothingCarrier;
|
|
140
|
+
/** @deprecated MPO-19 X12 — use `borderRadiusNested`. Removed after one release. */
|
|
101
141
|
borderRadiusOuter: {
|
|
102
142
|
borderRadius: string;
|
|
103
143
|
} & CornerSmoothingCarrier;
|
|
144
|
+
/**
|
|
145
|
+
* A FILLED control's border. Same width as the outlined one, so switching
|
|
146
|
+
* fill style never moves a layout by 2px, but `transparent` — which is what
|
|
147
|
+
* Tamagui paints and what the fill style means: the surface is the
|
|
148
|
+
* affordance, so a ring around it is a second one.
|
|
149
|
+
*
|
|
150
|
+
* MPO-19 X3: filled controls spread the `borderRadius` fragment, whose
|
|
151
|
+
* `borderColor` is `$borderColor`, so with the default `borderWidth: medium`
|
|
152
|
+
* every default Button carried a visible 1px ring that stock Tamagui does
|
|
153
|
+
* not draw. The width still resolves through the `borderWidth` knob — set it
|
|
154
|
+
* to `none` and both fragments go to 0.
|
|
155
|
+
*/
|
|
156
|
+
controlBorderFilled: {
|
|
157
|
+
borderColor: string;
|
|
158
|
+
borderWidth: number;
|
|
159
|
+
};
|
|
160
|
+
/** An OUTLINED control's border: the outline IS the affordance, so it is at least a hairline. */
|
|
161
|
+
controlBorderOutlined: {
|
|
162
|
+
borderColor: string;
|
|
163
|
+
borderWidth: number;
|
|
164
|
+
};
|
|
104
165
|
/**
|
|
105
166
|
* Axiom 1 child-clip cap for padded containers (Card/Panel/DialogContent):
|
|
106
167
|
* the radius token while it fits, or the padding px once it would exceed
|
|
@@ -111,6 +172,19 @@ export interface KnobProps {
|
|
|
111
172
|
} & CornerSmoothingCarrier;
|
|
112
173
|
/** Size token on web ("$1"); numeric tokens.size value on native (RN-safe). */
|
|
113
174
|
elevation: string | number | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Overlay elevation token (dialogs, popovers, Panel). Distinct from
|
|
177
|
+
* `elevation` so an overlay over a scrim is not the same $1 stop every
|
|
178
|
+
* Button carries. Spread via `elevatedSurface`; do not reuse `elevation`.
|
|
179
|
+
*/
|
|
180
|
+
overlayElevation: string | number | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* Complete shadow fragment for E-CONTROL / wrapper Views. Spread whole.
|
|
183
|
+
* Empty when `elevation=none`. Android `elevation` here is dp (2/4/8).
|
|
184
|
+
*/
|
|
185
|
+
elevationChrome: ElevationChromeProps;
|
|
186
|
+
/** Resolved scheme the fragments were built for (LC-85). */
|
|
187
|
+
scheme: "light" | "dark";
|
|
114
188
|
surface: {
|
|
115
189
|
backgroundColor: string;
|
|
116
190
|
borderColor: string;
|
|
@@ -129,7 +203,7 @@ export interface KnobProps {
|
|
|
129
203
|
borderWidth: number;
|
|
130
204
|
borderRadius: string;
|
|
131
205
|
elevation: string | number | undefined;
|
|
132
|
-
} & CornerSmoothingCarrier;
|
|
206
|
+
} & ElevationPaintProps & CornerSmoothingCarrier;
|
|
133
207
|
/** Feature/marketing tier (auth, hero cards): big radius + ultra-soft wide shadow. */
|
|
134
208
|
featureSurface: {
|
|
135
209
|
backgroundColor: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../src/theme/recipes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE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AU,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,WAAW,CAAA;KAAE,CAAC;IACtE,UAAU,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,UAAU,EAAE,cAAc,GAAG,SAAS,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAID,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;IACvC,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IACjC,SAAS,EAAE,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAC3C,mFAAmF;IACnF,aAAa,EAAE,cAAc,CAAC;CAC/B;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -17,6 +17,13 @@ export declare const compactSpaceMap: Record<Knobs["space"], Knobs["space"]>;
|
|
|
17
17
|
* `true` forces compact space stepping; `false` forces comfortable (no step).
|
|
18
18
|
*/
|
|
19
19
|
export declare function applyDensity(knobs: Knobs, compactOverride?: boolean): Knobs;
|
|
20
|
+
export declare const borderRadiusMap: {
|
|
21
|
+
readonly none: "$0";
|
|
22
|
+
readonly small: "$2";
|
|
23
|
+
readonly medium: "$4";
|
|
24
|
+
readonly large: "$6";
|
|
25
|
+
readonly full: "$12";
|
|
26
|
+
};
|
|
20
27
|
/**
|
|
21
28
|
* Resolve a page-title scale to its complete size fragment (D-11).
|
|
22
29
|
*
|
|
@@ -33,5 +40,9 @@ export declare function resolvePageTitleScale(scale: PageTitleScale): {
|
|
|
33
40
|
* while it fits, or the padding px number once the token would exceed it.
|
|
34
41
|
*/
|
|
35
42
|
export declare function capContainerRadius(borderRadius: Knobs["borderRadius"], space: Knobs["space"]): string | number;
|
|
36
|
-
export declare
|
|
43
|
+
export declare const elevationMap: Record<string, string | number | undefined>;
|
|
44
|
+
export declare const overlayElevationMap: Record<string, string | number | undefined>;
|
|
45
|
+
/** Scheme the resolver was invoked with. Defaults light so unit tests stay stable. */
|
|
46
|
+
export type ColorScheme = "light" | "dark";
|
|
47
|
+
export declare function resolveKnobs(knobs: Knobs, override?: KnobPropsOverride, scheme?: ColorScheme): ResolvedKnobs;
|
|
37
48
|
//# sourceMappingURL=resolveKnobs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveKnobs.d.ts","sourceRoot":"","sources":["../../src/theme/resolveKnobs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,SAAS,CAAC;AAU9D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"resolveKnobs.d.ts","sourceRoot":"","sources":["../../src/theme/resolveKnobs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,SAAS,CAAC;AAU9D,OAAO,KAAK,EAA8B,KAAK,EAAE,cAAc,EAAc,MAAM,SAAS,CAAC;AAE7F,OAAO,KAAK,EAOV,iBAAiB,EAEjB,aAAa,EAEd,MAAM,WAAW,CAAC;AAKnB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
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The default ladder is the measured Tamagui v5 table in recipeInputs
|
|
5
|
+
* (padX / font / icon / radius per size token). Gap equals radius at
|
|
6
|
+
* every size and at every borderRadius knob stop (`applyRadiusStop`).
|
|
7
|
+
* A linear ratio is only the `{ baseHeight }` fallback — not a
|
|
8
|
+
* documented divergence (MPO-46 / R6).
|
|
7
9
|
*
|
|
8
10
|
* Tables are GENERATED from `defaultRecipeInputs` at module eval (Tamagui
|
|
9
11
|
* 2.0.0-rc.41 flattens `styled(View, { variants: { size: tables } })` when
|
|
@@ -13,21 +15,21 @@
|
|
|
13
15
|
* reserve it for non-enumerable values only. Do NOT put recipe tables on a
|
|
14
16
|
* `createStyledContext` primitive (`neverFlatten`).
|
|
15
17
|
*
|
|
16
|
-
* Reference md ($4 / $true): height 44, padX 18, font 14, icon 16,
|
|
17
|
-
* (the measured tamagui.dev $4 control — MPO-13).
|
|
18
|
+
* Reference md ($4 / $true): height 44, padX 18, font 14, icon 16, radius 9,
|
|
19
|
+
* gap 9 (the measured tamagui.dev $4 control — MPO-13 / MPO-19 X1/X2).
|
|
18
20
|
* `sizeToken` remains the recipe KEY (string "$4") so styled() variants
|
|
19
21
|
* can switch; it is not a height scalar.
|
|
20
22
|
*
|
|
21
|
-
* Families: `control`
|
|
22
|
-
* `
|
|
23
|
+
* Families: `control` reads `inputs.tokenTable`. `controlCompact` reads
|
|
24
|
+
* `compactTokenTable` at the SAME heights (Input padX, tighter type).
|
|
23
25
|
*
|
|
24
|
-
* On touch (LC-
|
|
25
|
-
* lift painted height to ≥ 44
|
|
26
|
-
*
|
|
27
|
-
*
|
|
26
|
+
* On touch (LC-77), `applyTouchFloor` / `sizeRecipeForToken(token, { touch: true })`
|
|
27
|
+
* lift painted height to ≥ 44. Static `sizeRecipe*Variants` stay on the
|
|
28
|
+
* desktop table — runtime fragments carry the floor; consumers spread
|
|
29
|
+
* `knobProps.control` after `size`.
|
|
28
30
|
*/
|
|
29
|
-
export { DEFAULT_SIZE_RECIPE_INPUTS, SIZE_RECIPE_TOKENS, SIZE_TOKEN_EXPONENTS, TOUCH_HEIGHT_FLOOR, cloneSizeRecipeInputs, createRecipeFamilies, defaultRecipeInputs, defaultSizeFactors, generateSizeRecipeTables, generateSizeRecipes, mergeRecipeInputs, resolveSizeRecipeInputs, } from "./recipeInputs";
|
|
30
|
-
export type { GeneratedSizeRecipes, RecipeFamilies, RecipeFamilyName, RecipeInputs, SizeRecipe, SizeRecipeBoxVariant, SizeRecipeFamily, SizeRecipeFamilyName, SizeRecipeIconVariant, SizeRecipeInputs, SizeRecipeRatios, SizeRecipeTables, SizeRecipeToken, SizeRecipeTypeVariant, } from "./recipeInputs";
|
|
31
|
+
export { DEFAULT_SIZE_RECIPE_INPUTS, SIZE_RECIPE_RADIUS_STOPS, SIZE_RECIPE_TOKENS, SIZE_TOKEN_EXPONENTS, TAMAGUI_COMPACT_SIZE_TABLE, TAMAGUI_CONTROL_SIZE_TABLE, TAMAGUI_INPUT_PADX, TOUCH_HEIGHT_FLOOR, applyRadiusStop, cloneSizeRecipeInputs, createRecipeFamilies, defaultRecipeInputs, defaultSizeFactors, generateSizeRecipeTables, generateSizeRecipes, mergeRecipeInputs, recipeFromTokenChannels, resolveSizeRecipeInputs, } from "./recipeInputs";
|
|
32
|
+
export type { GeneratedSizeRecipes, RecipeFamilies, RecipeFamilyName, RecipeInputs, SizeRecipe, SizeRecipeBoxVariant, SizeRecipeFamily, SizeRecipeFamilyName, SizeRecipeIconVariant, SizeRecipeInputs, SizeRecipeRadiusStop, SizeRecipeRatios, SizeRecipeTables, SizeRecipeToken, SizeRecipeTokenChannels, SizeRecipeTokenTable, SizeRecipeTypeVariant, } from "./recipeInputs";
|
|
31
33
|
import { type GeneratedSizeRecipes, type RecipeFamilyName, type RecipeInputs, type SizeRecipe, type SizeRecipeFamily } from "./recipeInputs";
|
|
32
34
|
/**
|
|
33
35
|
* Module-eval default families. `styled()` variants MUST spread these
|
|
@@ -41,6 +43,7 @@ export declare const sizeRecipeTypeVariants: Record<string, import("./recipeInpu
|
|
|
41
43
|
export declare const sizeRecipeIconVariants: Record<string, import("./recipeInputs").SizeRecipeIconVariant>;
|
|
42
44
|
export declare const SIZE_RECIPE_HEIGHTS: Record<string, number>;
|
|
43
45
|
export declare const SIZE_RECIPE_HEIGHTS_TOUCH: Record<string, number>;
|
|
46
|
+
export declare const SIZE_RECIPE_RADII: Record<string, number>;
|
|
44
47
|
export declare const SIZE_RECIPE_RATIOS: import("./recipeInputs").SizeRecipeRatios;
|
|
45
48
|
export declare const SIZE_RECIPE_COMPACT_RATIOS: import("./recipeInputs").SizeRecipeRatios;
|
|
46
49
|
export declare const SIZE_RECIPE_FAMILY_NAMES: readonly ["control", "controlCompact"];
|
|
@@ -73,4 +76,14 @@ export declare function sizeRecipeForToken(token: string, options?: {
|
|
|
73
76
|
* statement. Pilot: Button/, InputParts/, fields/Select/.
|
|
74
77
|
*/
|
|
75
78
|
export declare function sizeRecipeEscape<T>(value: T): T;
|
|
79
|
+
/**
|
|
80
|
+
* LC-84 TEXT-INSET — optical vertical inset of a text field, never larger
|
|
81
|
+
* than the recipe padX. Extra horizontal space is legal only when an icon
|
|
82
|
+
* well occupies that side, not as empty-field padX.
|
|
83
|
+
*
|
|
84
|
+
* min(paddingHorizontal, floor((height − fontSize) / 2))
|
|
85
|
+
*
|
|
86
|
+
* `$4` (44 / 18 / 14) → 15. Button ladders keep recipe.paddingHorizontal (18).
|
|
87
|
+
*/
|
|
88
|
+
export declare function textFieldInset(recipe: Pick<SizeRecipe, "height" | "paddingHorizontal" | "fontSize">): number;
|
|
76
89
|
//# sourceMappingURL=sizeRecipes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizeRecipes.d.ts","sourceRoot":"","sources":["../../src/theme/sizeRecipes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sizeRecipes.d.ts","sourceRoot":"","sources":["../../src/the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C;AAC9F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme/theme.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,kBAAkB,EAAmB,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAS/C;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,IAAI,CAkB5D;AAMD,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CACjD,SAAQ,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC;IAChF,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,UAAU,CAAC,cAAc,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;KAChE,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAChC;AAMD,wBAAgB,aAAa,CAAC,CAAC,SAAS,kBAAkB,EAAE,EAC1D,QAAQ,EACR,MAAM,EACN,WAAqB,EACrB,GAAG,YAAY,EAChB,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CAiFvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.native.d.ts","sourceRoot":"","sources":["../../src/theme/theme.native.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAmB,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.native.d.ts","sourceRoot":"","sources":["../../src/theme/theme.native.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAmB,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAW/C,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CACjD,SAAQ,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC;IAChF,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,UAAU,CAAC,cAAc,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;KAChE,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAChC;AAMD,wBAAgB,aAAa,CAAC,CAAC,SAAS,kBAAkB,EAAE,EAC1D,QAAQ,EACR,MAAM,EACN,WAAqB,EACrB,GAAG,YAAY,EAChB,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CAevB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type SizeTokens } from "tamagui";
|
|
2
2
|
import type { KnobPropsOverride, ResolvedKnobs } from "./recipes";
|
|
3
3
|
export declare const IntentContext: import("react").Context<string | null>;
|
|
4
4
|
export declare function useIntentContext(): string | null;
|
|
@@ -30,7 +30,7 @@ export declare const solidButtonIntents: Set<string>;
|
|
|
30
30
|
* 6. Apply density (space only; compact option wins when provided)
|
|
31
31
|
* 7. Re-clamp to Surface ceiling (compact option cannot exceed parent)
|
|
32
32
|
* 8. OS reduced-motion forces animation="none"
|
|
33
|
-
* 9. Call resolveKnobs(mergedKnobs, override) — override merges last
|
|
33
|
+
* 9. Call resolveKnobs(mergedKnobs, override, scheme) — override merges last
|
|
34
34
|
*/
|
|
35
35
|
export declare function useResolvedKnobs(options?: UseResolvedKnobsOptions): ResolvedKnobs;
|
|
36
36
|
//# sourceMappingURL=useResolvedKnobs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResolvedKnobs.d.ts","sourceRoot":"","sources":["../../src/theme/useResolvedKnobs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useResolvedKnobs.d.ts","sourceRoot":"","sources":["../../src/theme/useResolvedKnobs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,SAAS,CAAC;AAGxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAWlE,eAAO,MAAM,aAAa,wCAAqC,CAAC;AAEhE,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEhD;AAsDD,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,mCAAmC;IACnC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAYD,eAAO,MAAM,kBAAkB,aAA2C,CAAC;AAE3E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,aAAa,CAqGjF"}
|