@tamagui/config 1.88.13 → 1.89.0-1706308641099

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Nate Wienert
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,11 @@
1
+ import { createAnimations } from "@tamagui/animations-css";
2
+ const animations = createAnimations({
3
+ "100ms": "ease-in 100ms",
4
+ bouncy: "ease-in 200ms",
5
+ lazy: "ease-in 600ms",
6
+ slow: "ease-in 500ms",
7
+ medium: "ease-in 300ms",
8
+ quick: "ease-in 100ms",
9
+ tooltip: "ease-in 400ms"
10
+ });
11
+ export { animations };
@@ -0,0 +1,36 @@
1
+ import { createAnimations } from "@tamagui/animations-react-native";
2
+ const animations = createAnimations({
3
+ "100ms": {
4
+ type: "timing",
5
+ duration: 100
6
+ },
7
+ bouncy: {
8
+ damping: 9,
9
+ mass: 0.9,
10
+ stiffness: 150
11
+ },
12
+ lazy: {
13
+ damping: 18,
14
+ stiffness: 50
15
+ },
16
+ medium: {
17
+ damping: 15,
18
+ stiffness: 120,
19
+ mass: 1
20
+ },
21
+ slow: {
22
+ damping: 15,
23
+ stiffness: 40
24
+ },
25
+ quick: {
26
+ damping: 20,
27
+ mass: 1.2,
28
+ stiffness: 250
29
+ },
30
+ tooltip: {
31
+ damping: 10,
32
+ mass: 0.9,
33
+ stiffness: 100
34
+ }
35
+ });
36
+ export { animations };
@@ -0,0 +1,41 @@
1
+ import { createAnimations } from "@tamagui/animations-moti";
2
+ const animations = createAnimations({
3
+ "100ms": {
4
+ type: "timing",
5
+ duration: 100
6
+ },
7
+ bouncy: {
8
+ type: "spring",
9
+ damping: 9,
10
+ mass: 0.9,
11
+ stiffness: 150
12
+ },
13
+ lazy: {
14
+ type: "spring",
15
+ damping: 18,
16
+ stiffness: 50
17
+ },
18
+ medium: {
19
+ damping: 15,
20
+ stiffness: 120,
21
+ mass: 1
22
+ },
23
+ slow: {
24
+ type: "spring",
25
+ damping: 15,
26
+ stiffness: 40
27
+ },
28
+ quick: {
29
+ type: "spring",
30
+ damping: 20,
31
+ mass: 1.2,
32
+ stiffness: 250
33
+ },
34
+ tooltip: {
35
+ type: "spring",
36
+ damping: 10,
37
+ mass: 0.9,
38
+ stiffness: 100
39
+ }
40
+ });
41
+ export { animations };
@@ -0,0 +1,20 @@
1
+ import { shorthands } from "@tamagui/shorthands";
2
+ import { themes, tokens } from "@tamagui/themes";
3
+ import { fonts } from "./fonts.mjs";
4
+ import { media, mediaQueryDefaultActive } from "./media.mjs";
5
+ const configWithoutAnimations = {
6
+ defaultFont: "body",
7
+ shouldAddPrefersColorThemes: !0,
8
+ themeClassNameOnRoot: !0,
9
+ themes,
10
+ media,
11
+ shorthands,
12
+ tokens,
13
+ fonts,
14
+ mediaQueryDefaultActive,
15
+ selectionStyles: theme => theme.color5 ? {
16
+ backgroundColor: theme.color5,
17
+ color: theme.color11
18
+ } : null
19
+ };
20
+ export { configWithoutAnimations };
@@ -0,0 +1,37 @@
1
+ import { createFont } from "@tamagui/web";
2
+ 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
19
+ };
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
+ });
36
+ }
37
+ export { createGenericFont };
@@ -0,0 +1,92 @@
1
+ import { createInterFont } from "@tamagui/font-inter";
2
+ import { createSilkscreenFont } from "@tamagui/font-silkscreen";
3
+ import { createGenericFont } from "./createGenericFont.mjs";
4
+ export * from "./animations.mjs";
5
+ const silkscreenFont = createSilkscreenFont(),
6
+ headingFont = createInterFont({
7
+ size: {
8
+ 5: 13,
9
+ 6: 15,
10
+ 9: 32,
11
+ 10: 44
12
+ },
13
+ transform: {
14
+ 6: "uppercase",
15
+ 7: "none"
16
+ },
17
+ weight: {
18
+ 6: "400",
19
+ 7: "700"
20
+ },
21
+ color: {
22
+ 6: "$colorFocus",
23
+ 7: "$color"
24
+ },
25
+ letterSpacing: {
26
+ 5: 2,
27
+ 6: 1,
28
+ 7: 0,
29
+ 8: 0,
30
+ 9: -1,
31
+ 10: -1.5,
32
+ 12: -2,
33
+ 14: -3,
34
+ 15: -4
35
+ },
36
+ // for native
37
+ face: {
38
+ 700: {
39
+ normal: "InterBold"
40
+ },
41
+ 800: {
42
+ normal: "InterBold"
43
+ },
44
+ 900: {
45
+ normal: "InterBold"
46
+ }
47
+ }
48
+ }, {
49
+ sizeLineHeight: size => Math.round(size * 1.1 + (size < 30 ? 10 : 5))
50
+ }),
51
+ bodyFont = createInterFont({
52
+ weight: {
53
+ 1: "400",
54
+ 7: "600"
55
+ }
56
+ }, {
57
+ sizeSize: size => Math.round(size),
58
+ sizeLineHeight: size => Math.round(size * 1.1 + (size >= 12 ? 8 : 4))
59
+ }),
60
+ monoFont = createGenericFont('"ui-monospace", "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace', {
61
+ weight: {
62
+ 1: "500"
63
+ },
64
+ size: {
65
+ 1: 11,
66
+ 2: 12,
67
+ 3: 13,
68
+ 4: 14,
69
+ 5: 16,
70
+ 6: 18,
71
+ 7: 20,
72
+ 8: 22,
73
+ 9: 30,
74
+ 10: 42,
75
+ 11: 52,
76
+ 12: 62,
77
+ 13: 72,
78
+ 14: 92,
79
+ 15: 114,
80
+ 16: 124
81
+ }
82
+ }, {
83
+ sizeLineHeight: x => x * 1.5
84
+ }),
85
+ fonts = {
86
+ // noto: notoFont as any,
87
+ heading: headingFont,
88
+ body: bodyFont,
89
+ mono: monoFont,
90
+ silkscreen: silkscreenFont
91
+ };
92
+ export { fonts };
@@ -0,0 +1,13 @@
1
+ import { themes } from "@tamagui/themes";
2
+ import { animations } from "./animations.mjs";
3
+ import { configWithoutAnimations } from "./config.mjs";
4
+ export * from "./media.mjs";
5
+ export * from "./createGenericFont.mjs";
6
+ export * from "./animations.mjs";
7
+ const config = {
8
+ ...configWithoutAnimations,
9
+ // fixes typescript exporting this using internal /types/ path
10
+ themes,
11
+ animations
12
+ };
13
+ export { config };
@@ -0,0 +1,10 @@
1
+ import { animations } from "./animations.reanimated";
2
+ import { configWithoutAnimations } from "./config.mjs";
3
+ export * from "./media.mjs";
4
+ export * from "./createGenericFont.mjs";
5
+ export * from "./animations.reanimated";
6
+ const config = {
7
+ ...configWithoutAnimations,
8
+ animations
9
+ };
10
+ export { config };
@@ -0,0 +1,49 @@
1
+ import { createMedia } from "@tamagui/react-native-media-driver";
2
+ const demoMedia = [500, 620, 780, 900],
3
+ widths = [660, 800, 1020, 1280],
4
+ media = createMedia({
5
+ // for site
6
+ xl: {
7
+ maxWidth: 1650
8
+ },
9
+ lg: {
10
+ maxWidth: 1280
11
+ },
12
+ md: {
13
+ maxWidth: 1020
14
+ },
15
+ sm: {
16
+ maxWidth: 800
17
+ },
18
+ xs: {
19
+ maxWidth: 660
20
+ },
21
+ xxs: {
22
+ maxWidth: 390
23
+ },
24
+ gtXs: {
25
+ minWidth: 661
26
+ },
27
+ gtSm: {
28
+ minWidth: 801
29
+ },
30
+ gtMd: {
31
+ minWidth: 1021
32
+ },
33
+ gtLg: {
34
+ minWidth: 1281
35
+ },
36
+ gtXl: {
37
+ minWidth: 1651
38
+ }
39
+ }),
40
+ mediaQueryDefaultActive = {
41
+ xl: !0,
42
+ lg: !0,
43
+ md: !0,
44
+ sm: !0,
45
+ xs: !0,
46
+ // false
47
+ xxs: !1
48
+ };
49
+ export { demoMedia, media, mediaQueryDefaultActive, widths };
@@ -0,0 +1,21 @@
1
+ import { shorthands } from "@tamagui/shorthands";
2
+ import { tokens } from "@tamagui/themes/v2";
3
+ import { themes } from "@tamagui/themes/v2-themes";
4
+ import { fonts } from "./fonts.mjs";
5
+ import { media, mediaQueryDefaultActive } from "./media.mjs";
6
+ const config = {
7
+ defaultFont: "body",
8
+ shouldAddPrefersColorThemes: !0,
9
+ themeClassNameOnRoot: !0,
10
+ themes,
11
+ media,
12
+ shorthands,
13
+ tokens,
14
+ fonts,
15
+ mediaQueryDefaultActive,
16
+ selectionStyles: theme => theme.color5 ? {
17
+ backgroundColor: theme.color5,
18
+ color: theme.color11
19
+ } : null
20
+ };
21
+ export { config };
@@ -0,0 +1,7 @@
1
+ import { animations } from "./animations.reanimated";
2
+ import { config as configBase } from "./v2-base.mjs";
3
+ const config = {
4
+ ...configBase,
5
+ animations
6
+ };
7
+ export { config };
@@ -0,0 +1,7 @@
1
+ import { animations } from "./animations.css";
2
+ import { config as configBase } from "./v2-base.mjs";
3
+ const config = {
4
+ ...configBase,
5
+ animations
6
+ };
7
+ export { config };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/config",
3
- "version": "1.88.13",
3
+ "version": "1.89.0-1706308641099",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -58,19 +58,19 @@
58
58
  }
59
59
  },
60
60
  "dependencies": {
61
- "@tamagui/animations-css": "1.88.13",
62
- "@tamagui/animations-moti": "1.88.13",
63
- "@tamagui/animations-react-native": "1.88.13",
64
- "@tamagui/colors": "1.88.13",
65
- "@tamagui/font-inter": "1.88.13",
66
- "@tamagui/font-silkscreen": "1.88.13",
67
- "@tamagui/react-native-media-driver": "1.88.13",
68
- "@tamagui/shorthands": "1.88.13",
69
- "@tamagui/themes": "1.88.13",
70
- "@tamagui/web": "1.88.13"
61
+ "@tamagui/animations-css": "1.89.0-1706308641099",
62
+ "@tamagui/animations-moti": "1.89.0-1706308641099",
63
+ "@tamagui/animations-react-native": "1.89.0-1706308641099",
64
+ "@tamagui/colors": "1.89.0-1706308641099",
65
+ "@tamagui/font-inter": "1.89.0-1706308641099",
66
+ "@tamagui/font-silkscreen": "1.89.0-1706308641099",
67
+ "@tamagui/react-native-media-driver": "1.89.0-1706308641099",
68
+ "@tamagui/shorthands": "1.89.0-1706308641099",
69
+ "@tamagui/themes": "1.89.0-1706308641099",
70
+ "@tamagui/web": "1.89.0-1706308641099"
71
71
  },
72
72
  "devDependencies": {
73
- "@tamagui/build": "1.88.13"
73
+ "@tamagui/build": "1.89.0-1706308641099"
74
74
  },
75
75
  "publishConfig": {
76
76
  "access": "public"