@tamagui/config-base 1.0.1-beta.53

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.
@@ -0,0 +1,26 @@
1
+ const demoMedia = [500, 620, 780, 900];
2
+ const widths = [660, 800, 1020, 1280];
3
+ const media = {
4
+ lg: { maxWidth: 1280 },
5
+ md: { maxWidth: 1020 },
6
+ sm: { maxWidth: 800 },
7
+ xs: { maxWidth: 660 },
8
+ xxs: { maxWidth: 390 },
9
+ gtXs: { minWidth: 660 + 1 },
10
+ gtSm: { minWidth: 800 + 1 },
11
+ gtMd: { minWidth: 1020 + 1 },
12
+ gtLg: { minWidth: 1280 + 1 },
13
+ tiny: { maxWidth: 500 },
14
+ gtTiny: { minWidth: 500 + 1 },
15
+ small: { maxWidth: 620 },
16
+ gtSmall: { minWidth: 620 + 1 },
17
+ medium: { maxWidth: 780 },
18
+ gtMedium: { minWidth: 780 + 1 },
19
+ large: { maxWidth: 900 },
20
+ gtLarge: { minWidth: 900 + 1 }
21
+ };
22
+ export {
23
+ demoMedia,
24
+ media,
25
+ widths
26
+ };
@@ -0,0 +1,60 @@
1
+ import { createInterFont } from "@tamagui/font-inter";
2
+ import { createSilkscreenFont } from "@tamagui/font-silkscreen";
3
+ import { shorthands } from "@tamagui/shorthands";
4
+ import { themes, tokens } from "@tamagui/theme-base";
5
+ import { animations } from "./animations";
6
+ import { createGenericFont } from "./createGenericFont";
7
+ import { media } from "./media";
8
+ const silkscreenFont = createSilkscreenFont();
9
+ const headingFont = createInterFont({
10
+ size: {
11
+ 6: 15
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: -1,
30
+ 9: -2,
31
+ 10: -2,
32
+ 12: -3,
33
+ 14: -4,
34
+ 15: -5
35
+ }
36
+ });
37
+ const bodyFont = createInterFont({}, {
38
+ sizeSize: (size) => Math.round(size * 1.1),
39
+ sizeLineHeight: (size) => Math.round(size * 1.1 + (size > 20 ? 10 : 10))
40
+ });
41
+ const monoFont = createGenericFont(`"ui-monospace", "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`);
42
+ const config = {
43
+ defaultTheme: "light",
44
+ shouldAddPrefersColorThemes: true,
45
+ themeClassNameOnRoot: true,
46
+ animations,
47
+ media,
48
+ shorthands,
49
+ themes,
50
+ tokens,
51
+ fonts: {
52
+ heading: headingFont,
53
+ body: bodyFont,
54
+ mono: monoFont,
55
+ silkscreen: silkscreenFont
56
+ }
57
+ };
58
+ export {
59
+ config
60
+ };
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@tamagui/config-base",
3
+ "version": "1.0.1-beta.53",
4
+ "types": "./types/index.d.ts",
5
+ "main": "dist/cjs",
6
+ "module": "dist/esm",
7
+ "module:jsx": "dist/jsx",
8
+ "files": [
9
+ "types",
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "build": "tamagui-build",
14
+ "watch": "tamagui-build --watch",
15
+ "clean": "tamagui-build clean",
16
+ "clean:build": "tamagui-build clean:build"
17
+ },
18
+ "dependencies": {
19
+ "@takeout/font-noto-emoji": "^1.0.1-beta.52",
20
+ "@tamagui/animations-reanimated": "^1.0.1-beta.53",
21
+ "@tamagui/colors": "^1.0.1-beta.53",
22
+ "@tamagui/core": "^1.0.1-beta.53",
23
+ "@tamagui/font-inter": "^1.0.1-beta.53",
24
+ "@tamagui/font-silkscreen": "^1.0.1-beta.53",
25
+ "@tamagui/shorthands": "^1.0.1-beta.53",
26
+ "@tamagui/theme-base": "^1.0.1-beta.53"
27
+ },
28
+ "devDependencies": {
29
+ "@tamagui/build": "^1.0.1-beta.53"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ }
34
+ }
@@ -0,0 +1,31 @@
1
+ export declare const animations: import("@tamagui/core").AnimationDriver<{
2
+ bouncy: {
3
+ type: "spring";
4
+ damping: number;
5
+ mass: number;
6
+ stiffness: number;
7
+ };
8
+ lazy: {
9
+ type: "spring";
10
+ damping: number;
11
+ stiffness: number;
12
+ };
13
+ slow: {
14
+ type: "spring";
15
+ damping: number;
16
+ stiffness: number;
17
+ };
18
+ quick: {
19
+ type: "spring";
20
+ damping: number;
21
+ mass: number;
22
+ stiffness: number;
23
+ };
24
+ tooltip: {
25
+ type: "spring";
26
+ damping: number;
27
+ mass: number;
28
+ stiffness: number;
29
+ };
30
+ }>;
31
+ //# sourceMappingURL=animations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../src/animations.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BrB,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { GenericFont } from '@tamagui/core';
2
+ declare const genericFontSizes: {
3
+ readonly 1: 10;
4
+ readonly 2: 11;
5
+ readonly 3: 12;
6
+ readonly 4: 14;
7
+ readonly 5: 15;
8
+ readonly 6: 16;
9
+ readonly 7: 20;
10
+ readonly 8: 22;
11
+ readonly 9: 30;
12
+ readonly 10: 42;
13
+ readonly 11: 52;
14
+ readonly 12: 62;
15
+ readonly 13: 72;
16
+ readonly 14: 92;
17
+ readonly 15: 114;
18
+ readonly 16: 124;
19
+ };
20
+ export declare function createGenericFont<A extends GenericFont<keyof typeof genericFontSizes>>(family: string, font?: Partial<A>): A;
21
+ export {};
22
+ //# sourceMappingURL=createGenericFont.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createGenericFont.d.ts","sourceRoot":"","sources":["../src/createGenericFont.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,eAAe,CAAA;AAEvD,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;CAiBZ,CAAA;AAEV,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,CAAC,MAAM,OAAO,gBAAgB,CAAC,EACpF,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,OAAO,CAAC,CAAC,CAAM,GACpB,CAAC,CAYH"}
@@ -0,0 +1,5 @@
1
+ export * from './tamagui.config';
2
+ export * from './animations';
3
+ export * from './media';
4
+ export * from './createGenericFont';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,56 @@
1
+ export declare const demoMedia: number[];
2
+ export declare const widths: number[];
3
+ export declare const media: {
4
+ lg: {
5
+ maxWidth: number;
6
+ };
7
+ md: {
8
+ maxWidth: number;
9
+ };
10
+ sm: {
11
+ maxWidth: number;
12
+ };
13
+ xs: {
14
+ maxWidth: number;
15
+ };
16
+ xxs: {
17
+ maxWidth: number;
18
+ };
19
+ gtXs: {
20
+ minWidth: number;
21
+ };
22
+ gtSm: {
23
+ minWidth: number;
24
+ };
25
+ gtMd: {
26
+ minWidth: number;
27
+ };
28
+ gtLg: {
29
+ minWidth: number;
30
+ };
31
+ tiny: {
32
+ maxWidth: number;
33
+ };
34
+ gtTiny: {
35
+ minWidth: number;
36
+ };
37
+ small: {
38
+ maxWidth: number;
39
+ };
40
+ gtSmall: {
41
+ minWidth: number;
42
+ };
43
+ medium: {
44
+ maxWidth: number;
45
+ };
46
+ gtMedium: {
47
+ minWidth: number;
48
+ };
49
+ large: {
50
+ maxWidth: number;
51
+ };
52
+ gtLarge: {
53
+ minWidth: number;
54
+ };
55
+ };
56
+ //# sourceMappingURL=media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,UAAuB,CAAA;AAC7C,eAAO,MAAM,MAAM,UAAyB,CAAA;AAE5C,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBjB,CAAA"}