@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.
@@ -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
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
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
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
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
- animations: () => animations,
26
- config: () => config
24
+ animations: () => animations,
25
+ config: () => config
27
26
  });
28
27
  module.exports = __toCommonJS(tamagui_dev_config_exports);
29
- var import_v5_css = require("@tamagui/config/v5-css");
30
- var import_v5_motion = require("@tamagui/config/v5-motion");
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
- const {
36
- gray,
37
- blue,
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
- heading: import_fonts.headingFont,
56
- body: import_fonts.bodyFont,
57
- mono: import_fonts.monoFont,
58
- silkscreen: import_fonts.silkscreenFont,
59
- cherryBomb: import_fonts.cherryBombFont
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
- default: import_v5_motion.animationsMotion,
63
- css: import_v5_css.animationsCSS
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
- ...import_v5_subtle.defaultConfig,
67
- themes: process.env.VITE_ENVIRONMENT === "client" ? {} : themes,
68
- fonts,
69
- animations,
70
- media: import_media.media,
71
- settings: {
72
- ...import_v5_subtle.defaultConfig.settings,
73
- mediaQueryDefaultActive: import_media.mediaQueryDefaultActive,
74
- allowedStyleValues: "somewhat-strict-web",
75
- autocompleteSpecificTokens: "except-special",
76
- // Allow both shorthands and longhand names for flexibility
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
- tiny: {
82
- maxWidth: 500
83
- },
84
- gtTiny: {
85
- minWidth: 500 + 1
86
- },
87
- small: {
88
- maxWidth: 620
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
- 1: 10,
4
- 2: 11,
5
- 3: 12,
6
- 4: 14,
7
- 5: 15,
8
- 6: 16,
9
- 7: 20,
10
- 8: 22,
11
- 9: 30,
12
- 10: 42,
13
- 11: 52,
14
- 12: 62,
15
- 13: 72,
16
- 14: 92,
17
- 15: 114,
18
- 16: 124
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
- sizeLineHeight = val => val * 1.35
22
- } = {}) {
23
- const size = font.size || genericFontSizes;
24
- return createFont({
25
- family,
26
- size,
27
- lineHeight: Object.fromEntries(Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)])),
28
- weight: {
29
- 0: "300"
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,"names":["createFont","genericFontSizes","createGenericFont","family","font","sizeLineHeight","val","size","lineHeight","Object","fromEntries","entries","map","k","v","weight","letterSpacing"],"sources":["../../src/createGenericFont.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,UAAA,QAAkB;AAE3B,MAAMC,gBAAA,GAAmB;EACvB,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;AACN;AAEO,SAASC,kBACdC,MAAA,EACAC,IAAA,GAAmB,CAAC,GACpB;EACEC,cAAA,GAAkBC,GAAA,IAAQA,GAAA,GAAM;AAClC,IAEI,CAAC,GACF;EACH,MAAMC,IAAA,GAAOH,IAAA,CAAKG,IAAA,IAAQN,gBAAA;EAC1B,OAAOD,UAAA,CAAW;IAChBG,MAAA;IACAI,IAAA;IACAC,UAAA,EAAYC,MAAA,CAAOC,WAAA,CACjBD,MAAA,CAAOE,OAAA,CAAQJ,IAAI,EAAEK,GAAA,CAAI,CAAC,CAACC,CAAA,EAAGC,CAAC,MAAM,CAACD,CAAA,EAAGR,cAAA,CAAe,CAACS,CAAC,CAAC,CAAC,CAC9D;IACAC,MAAA,EAAQ;MAAE,GAAG;IAAM;IACnBC,aAAA,EAAe;MAAE,GAAG;IAAE;IACtB,GAAIZ;EACN,CAAC;AACH","ignoreList":[]}
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"}
@@ -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
- // Cherry Bomb is a heavy rounded display face; fall back to on-brand Inter,
7
- // then heavy web-safe faces, so the brief pre-load flash looks close to the
8
- // real thing instead of thin default Arial.
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
- size: {
20
- 5: 13,
21
- 6: 15,
22
- 9: 30,
23
- 10: 44
24
- },
25
- transform: {
26
- 6: "uppercase",
27
- 7: "none"
28
- },
29
- weight: {
30
- 6: "400",
31
- 7: "700"
32
- },
33
- color: {
34
- 6: "$colorFocus",
35
- 7: "$color"
36
- },
37
- letterSpacing: {
38
- 5: 2,
39
- 6: 1,
40
- 7: 0,
41
- 8: 0,
42
- 9: -0.1,
43
- 10: -0.25,
44
- 11: -0.5,
45
- 12: -0.75,
46
- 14: -1,
47
- 15: -2
48
- },
49
- // for native
50
- face: {
51
- 700: {
52
- normal: "InterBold"
53
- },
54
- 800: {
55
- normal: "InterBold"
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
- weight: {
66
- 1: "400"
67
- }
51
+ size: { true: 14 },
52
+ weight: { 1: "400" }
68
53
  }, {
69
- sizeSize: size => Math.round(size),
70
- sizeLineHeight: size => Math.round(size * 1.2 + (size >= 20 ? 12 : 8))
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
- weight: {
74
- 1: "400"
75
- },
76
- size: {
77
- 1: 11,
78
- 2: 12,
79
- 3: 13,
80
- 4: 14,
81
- 5: 16,
82
- 6: 18,
83
- 7: 20,
84
- 8: 22,
85
- 9: 24,
86
- 10: 32,
87
- 11: 46,
88
- 12: 62,
89
- 13: 72,
90
- 14: 92,
91
- 15: 114,
92
- 16: 124
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
@@ -1 +1 @@
1
- {"version":3,"names":["createCherryBombFont","createInterFont","createSilkscreenFont","createGenericFont","cherryBombFont","family","weight","silkscreenFont","headingFont","size","transform","color","letterSpacing","face","normal","sizeLineHeight","Math","round","bodyFont","sizeSize","monoFont","x"],"sources":["../../src/fonts.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,oBAAA,QAA4B;AACrC,SAASC,eAAA,QAAuB;AAChC,SAASC,oBAAA,QAA4B;AACrC,SAASC,iBAAA,QAAyB;AAE3B,MAAMC,cAAA,GAAiBJ,oBAAA,CAAqB;EAAA;EAAA;EAAA;EAIjDK,MAAA,EACE;EAAA;EAAA;EAAA;EAIFC,MAAA,EAAQ;IACN,GAAG;EACL;AACF,CAAC;AACM,MAAMC,cAAA,GAAiBL,oBAAA,CAAqB;AAC5C,MAAMM,WAAA,GAAcP,eAAA,CACzB;EACEQ,IAAA,EAAM;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;EACN;EACAC,SAAA,EAAW;IACT,GAAG;IACH,GAAG;EACL;EACAJ,MAAA,EAAQ;IACN,GAAG;IACH,GAAG;EACL;EACAK,KAAA,EAAO;IACL,GAAG;IACH,GAAG;EACL;EACAC,aAAA,EAAe;IACb,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;EACN;EAAA;EAEAC,IAAA,EAAM;IACJ,KAAK;MAAEC,MAAA,EAAQ;IAAY;IAC3B,KAAK;MAAEA,MAAA,EAAQ;IAAY;IAC3B,KAAK;MAAEA,MAAA,EAAQ;IAAY;EAC7B;AACF,GACA;EAAEC,cAAA,EAAiBN,IAAA,IAASO,IAAA,CAAKC,KAAA,CAAMR,IAAA,GAAO,OAAOA,IAAA,GAAO,KAAK,KAAK,EAAE;AAAE,CAC5E;AAEO,MAAMS,QAAA,GAAWjB,eAAA,CACtB;EACEK,MAAA,EAAQ;IACN,GAAG;EACL;AACF,GACA;EACEa,QAAA,EAAWV,IAAA,IAASO,IAAA,CAAKC,KAAA,CAAMR,IAAI;EACnCM,cAAA,EAAiBN,IAAA,IAASO,IAAA,CAAKC,KAAA,CAAMR,IAAA,GAAO,OAAOA,IAAA,IAAQ,KAAK,KAAK,EAAE;AACzE,CACF;AAEO,MAAMW,QAAA,GAAWjB,iBAAA,CACtB,+GACA;EACEG,MAAA,EAAQ;IACN,GAAG;EACL;EACAG,IAAA,EAAM;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;EACN;AACF,GACA;EACEM,cAAA,EAAiBM,CAAA,IAAMA,CAAA,GAAI,MAAM;AACnC,CACF","ignoreList":[]}
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
- export * from "./media.mjs";
3
- //# sourceMappingURL=index.js.map
1
+ export * from "./tamagui.dev.config.mjs"
2
+
3
+ export * from "./media.mjs"
@@ -1,3 +1,3 @@
1
- export * from "./tamagui.dev.config.mjs";
2
- export * from "./media.mjs";
3
- //# sourceMappingURL=index.mjs.map
1
+ export * from "./tamagui.dev.config.mjs"
2
+
3
+ export * from "./media.mjs"