@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,63 +1,54 @@
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 createGenericFont_exports = {};
24
- __export(createGenericFont_exports, {
25
- createGenericFont: () => createGenericFont
26
- });
23
+ __export(createGenericFont_exports, { createGenericFont: () => createGenericFont });
27
24
  module.exports = __toCommonJS(createGenericFont_exports);
28
25
  var import_core = require("@tamagui/core");
29
26
  const genericFontSizes = {
30
- 1: 10,
31
- 2: 11,
32
- 3: 12,
33
- 4: 14,
34
- 5: 15,
35
- 6: 16,
36
- 7: 20,
37
- 8: 22,
38
- 9: 30,
39
- 10: 42,
40
- 11: 52,
41
- 12: 62,
42
- 13: 72,
43
- 14: 92,
44
- 15: 114,
45
- 16: 124
27
+ 1: 10,
28
+ 2: 11,
29
+ 3: 12,
30
+ 4: 14,
31
+ 5: 15,
32
+ 6: 16,
33
+ 7: 20,
34
+ 8: 22,
35
+ 9: 30,
36
+ 10: 42,
37
+ 11: 52,
38
+ 12: 62,
39
+ 13: 72,
40
+ 14: 92,
41
+ 15: 114,
42
+ 16: 124
46
43
  };
47
- function createGenericFont(family, font = {}, {
48
- sizeLineHeight = val => val * 1.35
49
- } = {}) {
50
- const size = font.size || genericFontSizes;
51
- return (0, import_core.createFont)({
52
- family,
53
- size,
54
- lineHeight: Object.fromEntries(Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)])),
55
- weight: {
56
- 0: "300"
57
- },
58
- letterSpacing: {
59
- 4: 0
60
- },
61
- ...font
62
- });
63
- }
44
+ function createGenericFont(family, font = {}, { sizeLineHeight = (val) => val * 1.35 } = {}) {
45
+ const size = font.size || genericFontSizes;
46
+ return (0, import_core.createFont)({
47
+ family,
48
+ size,
49
+ lineHeight: Object.fromEntries(Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)])),
50
+ weight: { 0: "300" },
51
+ letterSpacing: { 4: 0 },
52
+ ...font
53
+ });
54
+ }
@@ -1,32 +1,31 @@
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 fonts_exports = {};
24
23
  __export(fonts_exports, {
25
- bodyFont: () => bodyFont,
26
- cherryBombFont: () => cherryBombFont,
27
- headingFont: () => headingFont,
28
- monoFont: () => monoFont,
29
- silkscreenFont: () => silkscreenFont
24
+ bodyFont: () => bodyFont,
25
+ cherryBombFont: () => cherryBombFont,
26
+ headingFont: () => headingFont,
27
+ monoFont: () => monoFont,
28
+ silkscreenFont: () => silkscreenFont
30
29
  });
31
30
  module.exports = __toCommonJS(fonts_exports);
32
31
  var import_font_cherry_bomb = require("@tamagui/font-cherry-bomb");
@@ -34,94 +33,74 @@ var import_font_inter = require("@tamagui/font-inter");
34
33
  var import_font_silkscreen = require("@tamagui/font-silkscreen");
35
34
  var import_createGenericFont = require("./createGenericFont.cjs");
36
35
  const cherryBombFont = (0, import_font_cherry_bomb.createCherryBombFont)({
37
- // Cherry Bomb is a heavy rounded display face; fall back to on-brand Inter,
38
- // then heavy web-safe faces, so the brief pre-load flash looks close to the
39
- // real thing instead of thin default Arial.
40
- family: '"Cherry Bomb", "Inter", "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif',
41
- // Cherry Bomb only ships weight 400 (so this doesn't change its look), but a
42
- // heavy weight makes the Inter fallback render at ExtraBold (already preloaded)
43
- // instead of thin, much closer to Cherry Bomb during the load flash.
44
- weight: {
45
- 4: "800"
46
- }
36
+ family: "\"Cherry Bomb\", \"Inter\", \"Arial Black\", \"Helvetica Neue\", Helvetica, Arial, sans-serif",
37
+ weight: { 4: "800" },
38
+ size: { true: 22.4 }
47
39
  });
48
40
  const silkscreenFont = (0, import_font_silkscreen.createSilkscreenFont)();
49
41
  const headingFont = (0, import_font_inter.createInterFont)({
50
- size: {
51
- 5: 13,
52
- 6: 15,
53
- 9: 30,
54
- 10: 44
55
- },
56
- transform: {
57
- 6: "uppercase",
58
- 7: "none"
59
- },
60
- weight: {
61
- 6: "400",
62
- 7: "700"
63
- },
64
- color: {
65
- 6: "$colorFocus",
66
- 7: "$color"
67
- },
68
- letterSpacing: {
69
- 5: 2,
70
- 6: 1,
71
- 7: 0,
72
- 8: 0,
73
- 9: -0.1,
74
- 10: -0.25,
75
- 11: -0.5,
76
- 12: -0.75,
77
- 14: -1,
78
- 15: -2
79
- },
80
- // for native
81
- face: {
82
- 700: {
83
- normal: "InterBold"
84
- },
85
- 800: {
86
- normal: "InterBold"
87
- },
88
- 900: {
89
- normal: "InterBold"
90
- }
91
- }
92
- }, {
93
- sizeLineHeight: size => Math.round(size * 1.1 + (size < 30 ? 10 : 5))
94
- });
42
+ size: {
43
+ true: 14,
44
+ 5: 13,
45
+ 6: 15,
46
+ 9: 30,
47
+ 10: 44
48
+ },
49
+ transform: {
50
+ 6: "uppercase",
51
+ 7: "none"
52
+ },
53
+ weight: {
54
+ 6: "400",
55
+ 7: "700"
56
+ },
57
+ color: {
58
+ 6: "color-focus",
59
+ 7: "color"
60
+ },
61
+ letterSpacing: {
62
+ 5: 2,
63
+ 6: 1,
64
+ 7: 0,
65
+ 8: 0,
66
+ 9: -.1,
67
+ 10: -.25,
68
+ 11: -.5,
69
+ 12: -.75,
70
+ 14: -1,
71
+ 15: -2
72
+ },
73
+ face: {
74
+ 700: { normal: "InterBold" },
75
+ 800: { normal: "InterBold" },
76
+ 900: { normal: "InterBold" }
77
+ }
78
+ }, { sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) });
95
79
  const bodyFont = (0, import_font_inter.createInterFont)({
96
- weight: {
97
- 1: "400"
98
- }
80
+ size: { true: 14 },
81
+ weight: { 1: "400" }
99
82
  }, {
100
- sizeSize: size => Math.round(size),
101
- sizeLineHeight: size => Math.round(size * 1.2 + (size >= 20 ? 12 : 8))
83
+ sizeSize: (size) => Math.round(size),
84
+ sizeLineHeight: (size) => Math.round(size * 1.2 + (size >= 20 ? 12 : 8))
102
85
  });
103
86
  const monoFont = (0, import_createGenericFont.createGenericFont)(`"Berkeley Mono", "ui-monospace", "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`, {
104
- weight: {
105
- 1: "400"
106
- },
107
- size: {
108
- 1: 11,
109
- 2: 12,
110
- 3: 13,
111
- 4: 14,
112
- 5: 16,
113
- 6: 18,
114
- 7: 20,
115
- 8: 22,
116
- 9: 24,
117
- 10: 32,
118
- 11: 46,
119
- 12: 62,
120
- 13: 72,
121
- 14: 92,
122
- 15: 114,
123
- 16: 124
124
- }
125
- }, {
126
- sizeLineHeight: x => x * 1.5 + 2
127
- });
87
+ weight: { 1: "400" },
88
+ size: {
89
+ 1: 11,
90
+ 2: 12,
91
+ 3: 13,
92
+ 4: 14,
93
+ 5: 16,
94
+ 6: 18,
95
+ 7: 20,
96
+ 8: 22,
97
+ 9: 24,
98
+ 10: 32,
99
+ 11: 46,
100
+ 12: 62,
101
+ 13: 72,
102
+ 14: 92,
103
+ 15: 114,
104
+ 16: 124
105
+ }
106
+ }, { sizeLineHeight: (x) => x * 1.5 + 2 });
@@ -1,21 +1,20 @@
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 __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
- get: () => from[key],
9
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
- });
11
- }
12
- return to;
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
+ get: () => from[key],
10
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
+ });
12
+ }
13
+ return to;
13
14
  };
14
15
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: true
17
- }), mod);
16
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
17
  var index_exports = {};
19
18
  module.exports = __toCommonJS(index_exports);
20
- __reExport(index_exports, require("./tamagui.dev.config"), module.exports);
21
- __reExport(index_exports, require("./media.cjs"), module.exports);
19
+ __reExport(index_exports, require("./tamagui.dev.config.cjs"), module.exports);
20
+ __reExport(index_exports, require("./media.cjs"), module.exports);
@@ -1,118 +1,81 @@
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 media_exports = {};
24
23
  __export(media_exports, {
25
- demoMedia: () => demoMedia,
26
- media: () => media,
27
- mediaQueryDefaultActive: () => mediaQueryDefaultActive,
28
- widths: () => widths
24
+ demoMedia: () => demoMedia,
25
+ media: () => media,
26
+ mediaQueryDefaultActive: () => mediaQueryDefaultActive,
27
+ widths: () => widths
29
28
  });
30
29
  module.exports = __toCommonJS(media_exports);
31
- const demoMedia = [500, 620, 780, 900];
32
- const widths = [660, 800, 1020, 1280];
30
+ const demoMedia = [
31
+ 500,
32
+ 620,
33
+ 780,
34
+ 900
35
+ ];
36
+ const widths = [
37
+ 660,
38
+ 800,
39
+ 1020,
40
+ 1280
41
+ ];
33
42
  const breakpoints = {
34
- "2xl": 1536,
35
- xl: 1280,
36
- lg: 1024,
37
- md: 768,
38
- sm: 640,
39
- xs: 460,
40
- "2xs": 340
43
+ "2xl": 1536,
44
+ xl: 1280,
45
+ lg: 1024,
46
+ md: 768,
47
+ sm: 640,
48
+ xs: 460,
49
+ "2xs": 340
41
50
  };
42
51
  const media = {
43
- // v4 Config
44
- maxXs: {
45
- maxWidth: breakpoints.xs
46
- },
47
- max2xs: {
48
- maxWidth: breakpoints["2xs"]
49
- },
50
- maxSm: {
51
- maxWidth: breakpoints.sm
52
- },
53
- maxMd: {
54
- maxWidth: breakpoints.md
55
- },
56
- maxLg: {
57
- maxWidth: breakpoints.lg
58
- },
59
- maxXl: {
60
- maxWidth: breakpoints.xl
61
- },
62
- max2Xl: {
63
- maxWidth: breakpoints["2xl"]
64
- },
65
- // for site
66
- xl: {
67
- maxWidth: 1650
68
- },
69
- // between lg and xl - for studio usage
70
- lg_xl: {
71
- maxWidth: 1400
72
- },
73
- lg: {
74
- maxWidth: 1280
75
- },
76
- md: {
77
- maxWidth: 1020
78
- },
79
- sm: {
80
- maxWidth: 800
81
- },
82
- xs: {
83
- maxWidth: 660
84
- },
85
- xxs: {
86
- maxWidth: 390
87
- },
88
- gtXxs: {
89
- minWidth: 390 + 1
90
- },
91
- gtXs: {
92
- minWidth: 660 + 1
93
- },
94
- gtSm: {
95
- minWidth: 800 + 1
96
- },
97
- gtMd: {
98
- minWidth: 1020 + 1
99
- },
100
- gtLg: {
101
- minWidth: 1280 + 1
102
- },
103
- gtXl: {
104
- minWidth: 1650 + 1
105
- },
106
- pointerFine: {
107
- pointer: "fine"
108
- }
52
+ "max-xs": { maxWidth: breakpoints.xs },
53
+ "max-2xs": { maxWidth: breakpoints["2xs"] },
54
+ "max-sm": { maxWidth: breakpoints.sm },
55
+ "max-md": { maxWidth: breakpoints.md },
56
+ "max-lg": { maxWidth: breakpoints.lg },
57
+ "max-xl": { maxWidth: breakpoints.xl },
58
+ "max-2xl": { maxWidth: breakpoints["2xl"] },
59
+ xl: { maxWidth: 1650 },
60
+ lg_xl: { maxWidth: 1400 },
61
+ lg: { maxWidth: 1280 },
62
+ md: { maxWidth: 1020 },
63
+ sm: { maxWidth: 800 },
64
+ xs: { maxWidth: 660 },
65
+ xxs: { maxWidth: 390 },
66
+ gtXxs: { minWidth: 390 + 1 },
67
+ gtXs: { minWidth: 660 + 1 },
68
+ gtSm: { minWidth: 800 + 1 },
69
+ gtMd: { minWidth: 1020 + 1 },
70
+ gtLg: { minWidth: 1280 + 1 },
71
+ gtXl: { minWidth: 1650 + 1 },
72
+ pointerFine: { pointer: "fine" }
109
73
  };
110
74
  const mediaQueryDefaultActive = {
111
- xl: true,
112
- lg: true,
113
- md: true,
114
- sm: true,
115
- xs: true,
116
- // false
117
- xxs: false
118
- };
75
+ xl: true,
76
+ lg: true,
77
+ md: true,
78
+ sm: true,
79
+ xs: true,
80
+ xxs: false
81
+ };