@tamagui/tamagui-dev-config 2.7.7 → 3.0.0-beta.643.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/createGenericFont.cjs +41 -50
- package/dist/cjs/fonts.cjs +82 -103
- package/dist/cjs/index.cjs +11 -12
- package/dist/cjs/media.cjs +64 -101
- package/dist/cjs/tamagui.dev.config.cjs +48 -82
- package/dist/cjs/themeMetadata.cjs +135 -0
- package/dist/cjs/themes.cjs +45 -0
- package/dist/esm/createGenericFont.mjs +28 -32
- package/dist/esm/createGenericFont.mjs.map +1 -1
- package/dist/esm/fonts.mjs +66 -84
- package/dist/esm/fonts.mjs.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/media.mjs +47 -82
- package/dist/esm/media.mjs.map +1 -1
- package/dist/esm/tamagui.dev.config.mjs +35 -66
- package/dist/esm/tamagui.dev.config.mjs.map +1 -1
- package/dist/esm/themeMetadata.mjs +109 -0
- package/dist/esm/themeMetadata.mjs.map +1 -0
- package/dist/esm/themes.mjs +25 -0
- package/dist/esm/themes.mjs.map +1 -0
- package/package.json +14 -25
- package/src/createGenericFont.ts +4 -4
- package/src/fonts.ts +9 -2
- package/src/media.ts +7 -7
- package/src/tamagui.dev.config.ts +12 -23
- package/src/themeMetadata.ts +128 -0
- package/src/themes.ts +34 -0
- package/dist/cjs/theme.dev.cjs +0 -302
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/theme.dev.mjs +0 -266
- package/dist/esm/theme.dev.mjs.map +0 -1
- package/motion.cjs +0 -1
- package/src/theme.dev.ts +0 -583
|
@@ -1,105 +1,71 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
10
11
|
};
|
|
11
12
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
19
20
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
22
|
var tamagui_dev_config_exports = {};
|
|
24
23
|
__export(tamagui_dev_config_exports, {
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
animations: () => animations,
|
|
25
|
+
config: () => config
|
|
27
26
|
});
|
|
28
27
|
module.exports = __toCommonJS(tamagui_dev_config_exports);
|
|
29
|
-
var
|
|
30
|
-
var
|
|
28
|
+
var import_animations_css = require("@tamagui/config/animations-css");
|
|
29
|
+
var import_animations_motion = require("@tamagui/config/animations-motion");
|
|
31
30
|
var import_v5_subtle = require("@tamagui/config/v5-subtle");
|
|
32
31
|
var import_core = require("@tamagui/core");
|
|
33
32
|
var import_fonts = require("./fonts.cjs");
|
|
34
33
|
var import_media = require("./media.cjs");
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
red,
|
|
39
|
-
yellow,
|
|
40
|
-
green
|
|
41
|
-
} = import_v5_subtle.subtleChildrenThemes;
|
|
42
|
-
const themes = (0, import_v5_subtle.createV5Theme)({
|
|
43
|
-
childrenThemes: {
|
|
44
|
-
gray,
|
|
45
|
-
blue,
|
|
46
|
-
red,
|
|
47
|
-
yellow,
|
|
48
|
-
green
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
(0, import_core.setupDev)({
|
|
52
|
-
visualizer: true
|
|
53
|
-
});
|
|
34
|
+
var import_themeMetadata = require("./themeMetadata.cjs");
|
|
35
|
+
var import_themes = require("./themes.cjs");
|
|
36
|
+
(0, import_core.setupDev)({ visualizer: true });
|
|
54
37
|
const fonts = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
heading: import_fonts.headingFont,
|
|
39
|
+
body: import_fonts.bodyFont,
|
|
40
|
+
mono: import_fonts.monoFont,
|
|
41
|
+
silkscreen: import_fonts.silkscreenFont,
|
|
42
|
+
cherryBomb: import_fonts.cherryBombFont
|
|
60
43
|
};
|
|
61
44
|
const animations = {
|
|
62
|
-
|
|
63
|
-
|
|
45
|
+
default: import_animations_motion.animationsMotion,
|
|
46
|
+
css: import_animations_css.animationsCSS
|
|
64
47
|
};
|
|
48
|
+
const configuredThemes = process.env.VITE_ENVIRONMENT === "client" ? import_themeMetadata.clientThemes : import_themes.themes;
|
|
65
49
|
const config = {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
onlyAllowShorthands: false
|
|
78
|
-
}
|
|
50
|
+
...import_v5_subtle.defaultConfig,
|
|
51
|
+
themes: configuredThemes,
|
|
52
|
+
fonts,
|
|
53
|
+
animations,
|
|
54
|
+
media: import_media.media,
|
|
55
|
+
settings: {
|
|
56
|
+
...import_v5_subtle.defaultConfig.settings,
|
|
57
|
+
mediaQueryDefaultActive: import_media.mediaQueryDefaultActive,
|
|
58
|
+
allowedStyleValues: "somewhat-strict-web",
|
|
59
|
+
onlyAllowShorthands: false
|
|
60
|
+
}
|
|
79
61
|
};
|
|
80
62
|
Object.assign(config.media, {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
gtSmall: {
|
|
91
|
-
minWidth: 620 + 1
|
|
92
|
-
},
|
|
93
|
-
medium: {
|
|
94
|
-
maxWidth: 780
|
|
95
|
-
},
|
|
96
|
-
gtMedium: {
|
|
97
|
-
minWidth: 780 + 1
|
|
98
|
-
},
|
|
99
|
-
large: {
|
|
100
|
-
maxWidth: 900
|
|
101
|
-
},
|
|
102
|
-
gtLarge: {
|
|
103
|
-
minWidth: 900 + 1
|
|
104
|
-
}
|
|
105
|
-
});
|
|
63
|
+
tiny: { maxWidth: 500 },
|
|
64
|
+
gtTiny: { minWidth: 500 + 1 },
|
|
65
|
+
small: { maxWidth: 620 },
|
|
66
|
+
gtSmall: { minWidth: 620 + 1 },
|
|
67
|
+
medium: { maxWidth: 780 },
|
|
68
|
+
gtMedium: { minWidth: 780 + 1 },
|
|
69
|
+
large: { maxWidth: 900 },
|
|
70
|
+
gtLarge: { minWidth: 900 + 1 }
|
|
71
|
+
});
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
var themeMetadata_exports = {};
|
|
23
|
+
__export(themeMetadata_exports, {
|
|
24
|
+
clientThemes: () => clientThemes,
|
|
25
|
+
componentThemes: () => componentThemes,
|
|
26
|
+
themeNames: () => themeNames,
|
|
27
|
+
themeVariableNames: () => themeVariableNames
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(themeMetadata_exports);
|
|
30
|
+
const schemes = ["light", "dark"];
|
|
31
|
+
const colors = [
|
|
32
|
+
"black",
|
|
33
|
+
"white",
|
|
34
|
+
"gray",
|
|
35
|
+
"blue",
|
|
36
|
+
"red",
|
|
37
|
+
"yellow",
|
|
38
|
+
"green"
|
|
39
|
+
];
|
|
40
|
+
const paletteColors = [
|
|
41
|
+
"blue",
|
|
42
|
+
"gray",
|
|
43
|
+
"green",
|
|
44
|
+
"neutral",
|
|
45
|
+
"orange",
|
|
46
|
+
"pink",
|
|
47
|
+
"purple",
|
|
48
|
+
"red",
|
|
49
|
+
"teal",
|
|
50
|
+
"yellow"
|
|
51
|
+
];
|
|
52
|
+
const componentThemes = [
|
|
53
|
+
"Button",
|
|
54
|
+
"Input",
|
|
55
|
+
"Progress",
|
|
56
|
+
"ProgressIndicator",
|
|
57
|
+
"Slider",
|
|
58
|
+
"SliderActive",
|
|
59
|
+
"SliderThumb",
|
|
60
|
+
"Switch",
|
|
61
|
+
"TextArea",
|
|
62
|
+
"Tooltip",
|
|
63
|
+
"SwitchThumb"
|
|
64
|
+
];
|
|
65
|
+
const numbered = (prefix, count) => Array.from({ length: count }, (_, index) => `${prefix}${index + 1}`);
|
|
66
|
+
const baseThemeNames = schemes.flatMap((scheme) => [
|
|
67
|
+
scheme,
|
|
68
|
+
`${scheme}_accent`,
|
|
69
|
+
`${scheme}_surface1`,
|
|
70
|
+
`${scheme}_surface2`,
|
|
71
|
+
...colors.flatMap((color) => [
|
|
72
|
+
`${scheme}_${color}`,
|
|
73
|
+
`${scheme}_${color}_accent`,
|
|
74
|
+
`${scheme}_${color}_surface1`,
|
|
75
|
+
`${scheme}_${color}_surface2`
|
|
76
|
+
])
|
|
77
|
+
]);
|
|
78
|
+
const levelThemeNames = baseThemeNames.flatMap((themeName) => themeName.endsWith("_surface1") ? [themeName.replace(/_surface1$/, "_level2")] : themeName.endsWith("_surface2") ? [themeName.replace(/_surface2$/, "_level3")] : []);
|
|
79
|
+
const componentThemeNames = [...baseThemeNames, ...levelThemeNames].flatMap((parent) => componentThemes.map((component) => `${parent}_${component}`));
|
|
80
|
+
const themeNames = [
|
|
81
|
+
...baseThemeNames,
|
|
82
|
+
...levelThemeNames,
|
|
83
|
+
...componentThemeNames
|
|
84
|
+
];
|
|
85
|
+
const alphaSteps = [
|
|
86
|
+
"0",
|
|
87
|
+
"01",
|
|
88
|
+
"02",
|
|
89
|
+
"04",
|
|
90
|
+
"06",
|
|
91
|
+
"08",
|
|
92
|
+
"001",
|
|
93
|
+
"002",
|
|
94
|
+
"0025",
|
|
95
|
+
"005",
|
|
96
|
+
"0075"
|
|
97
|
+
];
|
|
98
|
+
const themeVariableNames = [
|
|
99
|
+
"accent-background",
|
|
100
|
+
"accent-color",
|
|
101
|
+
...numbered("accent", 12),
|
|
102
|
+
"background",
|
|
103
|
+
"background-focus",
|
|
104
|
+
"background-hover",
|
|
105
|
+
"background-press",
|
|
106
|
+
...alphaSteps.map((step) => `background${step}`),
|
|
107
|
+
"border-color",
|
|
108
|
+
"border-color-focus",
|
|
109
|
+
"border-color-hover",
|
|
110
|
+
"border-color-press",
|
|
111
|
+
"color",
|
|
112
|
+
"color-focus",
|
|
113
|
+
"color-hover",
|
|
114
|
+
"color-press",
|
|
115
|
+
"color-transparent",
|
|
116
|
+
...alphaSteps.map((step) => `color${step}`),
|
|
117
|
+
...numbered("color", 12),
|
|
118
|
+
"outline-color",
|
|
119
|
+
"placeholder-color",
|
|
120
|
+
"shadow-color",
|
|
121
|
+
...["black", "white"].flatMap((color) => [
|
|
122
|
+
color,
|
|
123
|
+
`${color}0`,
|
|
124
|
+
`${color}02`,
|
|
125
|
+
`${color}04`,
|
|
126
|
+
`${color}06`,
|
|
127
|
+
`${color}08`,
|
|
128
|
+
...numbered(color, 12)
|
|
129
|
+
]),
|
|
130
|
+
...paletteColors.flatMap((color) => numbered(color, 12)),
|
|
131
|
+
...numbered("highlight", 8),
|
|
132
|
+
...numbered("shadow", 8)
|
|
133
|
+
];
|
|
134
|
+
const variableShape = Object.fromEntries(themeVariableNames.map((name) => [name, `var(--${name})`]));
|
|
135
|
+
const clientThemes = Object.fromEntries(themeNames.map((name) => [name, variableShape]));
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
var themes_exports = {};
|
|
23
|
+
__export(themes_exports, { themes: () => themes });
|
|
24
|
+
module.exports = __toCommonJS(themes_exports);
|
|
25
|
+
var import_v6_base = require("@tamagui/config/v6-base");
|
|
26
|
+
var import_v5_subtle = require("@tamagui/themes/v5-subtle");
|
|
27
|
+
var import_themeMetadata = require("./themeMetadata.cjs");
|
|
28
|
+
const themeNameSet = new Set(import_themeMetadata.themeNames);
|
|
29
|
+
const selectedThemes = Object.fromEntries(Object.entries(import_v5_subtle.themes).filter(([themeName]) => themeNameSet.has(themeName)));
|
|
30
|
+
for (const [themeName, theme] of Object.entries(selectedThemes)) {
|
|
31
|
+
if (themeName.endsWith("_surface1")) {
|
|
32
|
+
selectedThemes[themeName.replace(/_surface1$/, "_level2")] = theme;
|
|
33
|
+
} else if (themeName.endsWith("_surface2")) {
|
|
34
|
+
selectedThemes[themeName.replace(/_surface2$/, "_level3")] = theme;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
for (const themeName of import_themeMetadata.themeNames) {
|
|
38
|
+
const component = import_themeMetadata.componentThemes.find((name) => themeName.endsWith(`_${name}`));
|
|
39
|
+
if (!component || selectedThemes[themeName]) continue;
|
|
40
|
+
const parentName = themeName.slice(0, -(component.length + 1));
|
|
41
|
+
if (selectedThemes[parentName]) {
|
|
42
|
+
selectedThemes[themeName] = selectedThemes[parentName];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const themes = (0, import_v6_base.toV6Themes)(selectedThemes);
|
|
@@ -1,38 +1,34 @@
|
|
|
1
1
|
import { createFont } from "@tamagui/core";
|
|
2
|
+
|
|
2
3
|
const genericFontSizes = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
1: 10,
|
|
5
|
+
2: 11,
|
|
6
|
+
3: 12,
|
|
7
|
+
4: 14,
|
|
8
|
+
5: 15,
|
|
9
|
+
6: 16,
|
|
10
|
+
7: 20,
|
|
11
|
+
8: 22,
|
|
12
|
+
9: 30,
|
|
13
|
+
10: 42,
|
|
14
|
+
11: 52,
|
|
15
|
+
12: 62,
|
|
16
|
+
13: 72,
|
|
17
|
+
14: 92,
|
|
18
|
+
15: 114,
|
|
19
|
+
16: 124
|
|
19
20
|
};
|
|
20
|
-
function createGenericFont(family, font = {}, {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
letterSpacing: {
|
|
32
|
-
4: 0
|
|
33
|
-
},
|
|
34
|
-
...font
|
|
35
|
-
});
|
|
21
|
+
function createGenericFont(family, font = {}, { sizeLineHeight = (val) => val * 1.35 } = {}) {
|
|
22
|
+
const size = font.size || genericFontSizes;
|
|
23
|
+
return createFont({
|
|
24
|
+
family,
|
|
25
|
+
size,
|
|
26
|
+
lineHeight: Object.fromEntries(Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)])),
|
|
27
|
+
weight: { 0: "300" },
|
|
28
|
+
letterSpacing: { 4: 0 },
|
|
29
|
+
...font
|
|
30
|
+
});
|
|
36
31
|
}
|
|
32
|
+
|
|
37
33
|
export { createGenericFont };
|
|
38
34
|
//# sourceMappingURL=createGenericFont.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"createGenericFont.js","names":[],"sources":["esm/createGenericFont.js"],"sourcesContent":["import { createFont } from \"@tamagui/core\";\nconst genericFontSizes = {\n 1: 10,\n 2: 11,\n 3: 12,\n 4: 14,\n 5: 15,\n 6: 16,\n 7: 20,\n 8: 22,\n 9: 30,\n 10: 42,\n 11: 52,\n 12: 62,\n 13: 72,\n 14: 92,\n 15: 114,\n 16: 124\n};\nfunction createGenericFont(family, font = {}, {\n sizeLineHeight = (val) => val * 1.35\n} = {}) {\n const size = font.size || genericFontSizes;\n return createFont({\n family,\n size,\n lineHeight: Object.fromEntries(\n Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)])\n ),\n weight: { 0: \"300\" },\n letterSpacing: { 4: 0 },\n ...font\n });\n}\nexport {\n createGenericFont\n};\n//# sourceMappingURL=createGenericFont.js.map\n"],"mappings":";;;AACA,MAAM,mBAAmB;CACvB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AACA,SAAS,kBAAkB,QAAQ,OAAO,CAAC,GAAG,EAC5C,kBAAkB,QAAQ,MAAM,SAC9B,CAAC,GAAG;CACN,MAAM,OAAO,KAAK,QAAQ;CAC1B,OAAO,WAAW;EAChB;EACA;EACA,YAAY,OAAO,YACjB,OAAO,QAAQ,IAAI,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAC9D;EACA,QAAQ,EAAE,GAAG,MAAM;EACnB,eAAe,EAAE,GAAG,EAAE;EACtB,GAAG;CACL,CAAC;AACH"}
|
package/dist/esm/fonts.mjs
CHANGED
|
@@ -2,97 +2,79 @@ import { createCherryBombFont } from "@tamagui/font-cherry-bomb";
|
|
|
2
2
|
import { createInterFont } from "@tamagui/font-inter";
|
|
3
3
|
import { createSilkscreenFont } from "@tamagui/font-silkscreen";
|
|
4
4
|
import { createGenericFont } from "./createGenericFont.mjs";
|
|
5
|
+
|
|
5
6
|
const cherryBombFont = createCherryBombFont({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
family: '"Cherry Bomb", "Inter", "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
10
|
-
// Cherry Bomb only ships weight 400 (so this doesn't change its look), but a
|
|
11
|
-
// heavy weight makes the Inter fallback render at ExtraBold (already preloaded)
|
|
12
|
-
// instead of thin, much closer to Cherry Bomb during the load flash.
|
|
13
|
-
weight: {
|
|
14
|
-
4: "800"
|
|
15
|
-
}
|
|
7
|
+
family: "\"Cherry Bomb\", \"Inter\", \"Arial Black\", \"Helvetica Neue\", Helvetica, Arial, sans-serif",
|
|
8
|
+
weight: { 4: "800" },
|
|
9
|
+
size: { true: 22.4 }
|
|
16
10
|
});
|
|
17
11
|
const silkscreenFont = createSilkscreenFont();
|
|
18
12
|
const headingFont = createInterFont({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
900: {
|
|
58
|
-
normal: "InterBold"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}, {
|
|
62
|
-
sizeLineHeight: size => Math.round(size * 1.1 + (size < 30 ? 10 : 5))
|
|
63
|
-
});
|
|
13
|
+
size: {
|
|
14
|
+
true: 14,
|
|
15
|
+
5: 13,
|
|
16
|
+
6: 15,
|
|
17
|
+
9: 30,
|
|
18
|
+
10: 44
|
|
19
|
+
},
|
|
20
|
+
transform: {
|
|
21
|
+
6: "uppercase",
|
|
22
|
+
7: "none"
|
|
23
|
+
},
|
|
24
|
+
weight: {
|
|
25
|
+
6: "400",
|
|
26
|
+
7: "700"
|
|
27
|
+
},
|
|
28
|
+
color: {
|
|
29
|
+
6: "color-focus",
|
|
30
|
+
7: "color"
|
|
31
|
+
},
|
|
32
|
+
letterSpacing: {
|
|
33
|
+
5: 2,
|
|
34
|
+
6: 1,
|
|
35
|
+
7: 0,
|
|
36
|
+
8: 0,
|
|
37
|
+
9: -.1,
|
|
38
|
+
10: -.25,
|
|
39
|
+
11: -.5,
|
|
40
|
+
12: -.75,
|
|
41
|
+
14: -1,
|
|
42
|
+
15: -2
|
|
43
|
+
},
|
|
44
|
+
face: {
|
|
45
|
+
700: { normal: "InterBold" },
|
|
46
|
+
800: { normal: "InterBold" },
|
|
47
|
+
900: { normal: "InterBold" }
|
|
48
|
+
}
|
|
49
|
+
}, { sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) });
|
|
64
50
|
const bodyFont = createInterFont({
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
51
|
+
size: { true: 14 },
|
|
52
|
+
weight: { 1: "400" }
|
|
68
53
|
}, {
|
|
69
|
-
|
|
70
|
-
|
|
54
|
+
sizeSize: (size) => Math.round(size),
|
|
55
|
+
sizeLineHeight: (size) => Math.round(size * 1.2 + (size >= 20 ? 12 : 8))
|
|
71
56
|
});
|
|
72
57
|
const monoFont = createGenericFont(`"Berkeley Mono", "ui-monospace", "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`, {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}, {
|
|
95
|
-
sizeLineHeight: x => x * 1.5 + 2
|
|
96
|
-
});
|
|
58
|
+
weight: { 1: "400" },
|
|
59
|
+
size: {
|
|
60
|
+
1: 11,
|
|
61
|
+
2: 12,
|
|
62
|
+
3: 13,
|
|
63
|
+
4: 14,
|
|
64
|
+
5: 16,
|
|
65
|
+
6: 18,
|
|
66
|
+
7: 20,
|
|
67
|
+
8: 22,
|
|
68
|
+
9: 24,
|
|
69
|
+
10: 32,
|
|
70
|
+
11: 46,
|
|
71
|
+
12: 62,
|
|
72
|
+
13: 72,
|
|
73
|
+
14: 92,
|
|
74
|
+
15: 114,
|
|
75
|
+
16: 124
|
|
76
|
+
}
|
|
77
|
+
}, { sizeLineHeight: (x) => x * 1.5 + 2 });
|
|
78
|
+
|
|
97
79
|
export { bodyFont, cherryBombFont, headingFont, monoFont, silkscreenFont };
|
|
98
80
|
//# sourceMappingURL=fonts.mjs.map
|
package/dist/esm/fonts.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"file":"fonts.js","names":[],"sources":["esm/fonts.js"],"sourcesContent":["import { createCherryBombFont } from \"@tamagui/font-cherry-bomb\";\nimport { createInterFont } from \"@tamagui/font-inter\";\nimport { createSilkscreenFont } from \"@tamagui/font-silkscreen\";\nimport { createGenericFont } from \"./createGenericFont\";\nconst cherryBombFont = createCherryBombFont({\n // Cherry Bomb is a heavy rounded display face; fall back to on-brand Inter,\n // then heavy web-safe faces, so the brief pre-load flash looks close to the\n // real thing instead of thin default Arial.\n family: '\"Cherry Bomb\", \"Inter\", \"Arial Black\", \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n // Cherry Bomb only ships weight 400 (so this doesn't change its look), but a\n // heavy weight makes the Inter fallback render at ExtraBold (already preloaded)\n // instead of thin, much closer to Cherry Bomb during the load flash.\n weight: {\n 4: \"800\"\n },\n size: {\n true: 22.4\n }\n});\nconst silkscreenFont = createSilkscreenFont();\nconst headingFont = createInterFont(\n {\n size: {\n true: 14,\n 5: 13,\n 6: 15,\n 9: 30,\n 10: 44\n },\n transform: {\n 6: \"uppercase\",\n 7: \"none\"\n },\n weight: {\n 6: \"400\",\n 7: \"700\"\n },\n color: {\n 6: \"color-focus\",\n 7: \"color\"\n },\n letterSpacing: {\n 5: 2,\n 6: 1,\n 7: 0,\n 8: 0,\n 9: -0.1,\n 10: -0.25,\n 11: -0.5,\n 12: -0.75,\n 14: -1,\n 15: -2\n },\n // for native\n face: {\n 700: { normal: \"InterBold\" },\n 800: { normal: \"InterBold\" },\n 900: { normal: \"InterBold\" }\n }\n },\n { sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) }\n);\nconst bodyFont = createInterFont(\n {\n size: {\n true: 14\n },\n weight: {\n 1: \"400\"\n }\n },\n {\n sizeSize: (size) => Math.round(size),\n sizeLineHeight: (size) => Math.round(size * 1.2 + (size >= 20 ? 12 : 8))\n }\n);\nconst monoFont = createGenericFont(\n `\"Berkeley Mono\", \"ui-monospace\", \"SFMono-Regular\", \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace`,\n {\n weight: {\n 1: \"400\"\n },\n size: {\n 1: 11,\n 2: 12,\n 3: 13,\n 4: 14,\n 5: 16,\n 6: 18,\n 7: 20,\n 8: 22,\n 9: 24,\n 10: 32,\n 11: 46,\n 12: 62,\n 13: 72,\n 14: 92,\n 15: 114,\n 16: 124\n }\n },\n {\n sizeLineHeight: (x) => x * 1.5 + 2\n }\n);\nexport {\n bodyFont,\n cherryBombFont,\n headingFont,\n monoFont,\n silkscreenFont\n};\n//# sourceMappingURL=fonts.js.map\n"],"mappings":";;;;;;AAIA,MAAM,iBAAiB,qBAAqB;CAI1C,QAAQ;CAIR,QAAQ,EACN,GAAG,MACL;CACA,MAAM,EACJ,MAAM,KACR;AACF,CAAC;AACD,MAAM,iBAAiB,qBAAqB;AAC5C,MAAM,cAAc,gBAClB;CACE,MAAM;EACJ,MAAM;EACN,GAAG;EACH,GAAG;EACH,GAAG;EACH,IAAI;CACN;CACA,WAAW;EACT,GAAG;EACH,GAAG;CACL;CACA,QAAQ;EACN,GAAG;EACH,GAAG;CACL;CACA,OAAO;EACL,GAAG;EACH,GAAG;CACL;CACA,eAAe;EACb,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG,CAAC;EACJ,IAAI,CAAC;EACL,IAAI,CAAC;EACL,IAAI,CAAC;EACL,IAAI,CAAC;EACL,IAAI,CAAC;CACP;CAEA,MAAM;EACJ,KAAK,EAAE,QAAQ,YAAY;EAC3B,KAAK,EAAE,QAAQ,YAAY;EAC3B,KAAK,EAAE,QAAQ,YAAY;CAC7B;AACF,GACA,EAAE,iBAAiB,SAAS,KAAK,MAAM,OAAO,OAAO,OAAO,KAAK,KAAK,EAAE,EAAE,CAC5E;AACA,MAAM,WAAW,gBACf;CACE,MAAM,EACJ,MAAM,GACR;CACA,QAAQ,EACN,GAAG,MACL;AACF,GACA;CACE,WAAW,SAAS,KAAK,MAAM,IAAI;CACnC,iBAAiB,SAAS,KAAK,MAAM,OAAO,OAAO,QAAQ,KAAK,KAAK,EAAE;AACzE,CACF;AACA,MAAM,WAAW,kBACf,+GACA;CACE,QAAQ,EACN,GAAG,MACL;CACA,MAAM;EACJ,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;CACN;AACF,GACA,EACE,iBAAiB,MAAM,IAAI,MAAM,EACnC,CACF"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./tamagui.dev.config.mjs"
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export * from "./tamagui.dev.config.mjs"
|
|
2
|
+
|
|
3
|
+
export * from "./media.mjs"
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./tamagui.dev.config.mjs"
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export * from "./tamagui.dev.config.mjs"
|
|
2
|
+
|
|
3
|
+
export * from "./media.mjs"
|