@tamagui/config-base 1.46.2 → 1.47.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/index.js CHANGED
@@ -1,32 +1,5 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
- var src_exports = {};
17
- module.exports = __toCommonJS(src_exports);
18
- __reExport(src_exports, require("./tamagui.config"), module.exports);
19
- __reExport(src_exports, require("./media"), module.exports);
20
- __reExport(src_exports, require("./createGenericFont"), module.exports);
21
- if (process.env.NODE_ENV === "development") {
22
- console.log(
23
- `Note: We've moved @tamagui/config-base over to @tamagui/config. If you really want to keep this file, just copy and paste the contents into your app as it will be removed eventually.`
24
- );
25
- }
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
28
- ...require("./tamagui.config"),
29
- ...require("./media"),
30
- ...require("./createGenericFont")
31
- });
2
+ throw new Error(
3
+ `This package is deprecated and replaced with @tamagui/themes, please change`
4
+ );
32
5
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,6BAAd;AACA,wBAAc,oBADd;AAEA,wBAAc,gCAFd;AAIA,IAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,UAAQ;AAAA,IACN;AAAA,EACF;AACF;",
4
+ "mappings": ";AAAA,MAAM,IAAI;AAAA,EACR;AACF;",
5
5
  "names": []
6
6
  }
package/dist/esm/index.js CHANGED
@@ -1,9 +1,4 @@
1
- export * from "./tamagui.config";
2
- export * from "./media";
3
- export * from "./createGenericFont";
4
- if (process.env.NODE_ENV === "development") {
5
- console.log(
6
- `Note: We've moved @tamagui/config-base over to @tamagui/config. If you really want to keep this file, just copy and paste the contents into your app as it will be removed eventually.`
7
- );
8
- }
1
+ throw new Error(
2
+ `This package is deprecated and replaced with @tamagui/themes, please change`
3
+ );
9
4
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AAEd,IAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,UAAQ;AAAA,IACN;AAAA,EACF;AACF;",
4
+ "mappings": "AAAA,MAAM,IAAI;AAAA,EACR;AACF;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/config-base",
3
- "version": "1.46.2",
3
+ "version": "1.47.1",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -26,19 +26,8 @@
26
26
  "require": "./dist/cjs/index.js"
27
27
  }
28
28
  },
29
- "dependencies": {
30
- "@tamagui/animations-css": "1.46.2",
31
- "@tamagui/animations-react-native": "1.46.2",
32
- "@tamagui/colors": "1.46.2",
33
- "@tamagui/core": "1.46.2",
34
- "@tamagui/font-inter": "1.46.2",
35
- "@tamagui/font-silkscreen": "1.46.2",
36
- "@tamagui/react-native-media-driver": "1.46.2",
37
- "@tamagui/shorthands": "1.46.2",
38
- "@tamagui/theme-base": "1.46.2"
39
- },
40
29
  "devDependencies": {
41
- "@tamagui/build": "1.46.2"
30
+ "@tamagui/build": "1.47.1"
42
31
  },
43
32
  "publishConfig": {
44
33
  "access": "public"
package/src/index.tsx CHANGED
@@ -1,10 +1,3 @@
1
- export * from './tamagui.config'
2
- export * from './media'
3
- export * from './createGenericFont'
4
-
5
- if (process.env.NODE_ENV === 'development') {
6
- // rome-ignore lint/nursery/noConsoleLog: <explanation>
7
- console.log(
8
- `Note: We've moved @tamagui/config-base over to @tamagui/config. If you really want to keep this file, just copy and paste the contents into your app as it will be removed eventually.`
9
- )
10
- }
1
+ throw new Error(
2
+ `This package is deprecated and replaced with @tamagui/themes, please change`
3
+ )
@@ -1,28 +1,28 @@
1
1
  export declare const animations: import("@tamagui/web").AnimationDriver<{
2
2
  bouncy: {
3
- type: "spring";
3
+ type: string;
4
4
  damping: number;
5
5
  mass: number;
6
6
  stiffness: number;
7
7
  };
8
8
  lazy: {
9
- type: "spring";
9
+ type: string;
10
10
  damping: number;
11
11
  stiffness: number;
12
12
  };
13
13
  slow: {
14
- type: "spring";
14
+ type: string;
15
15
  damping: number;
16
16
  stiffness: number;
17
17
  };
18
18
  quick: {
19
- type: "spring";
19
+ type: string;
20
20
  damping: number;
21
21
  mass: number;
22
22
  stiffness: number;
23
23
  };
24
24
  tooltip: {
25
- type: "spring";
25
+ type: string;
26
26
  damping: number;
27
27
  mass: number;
28
28
  stiffness: number;
package/types/index.d.ts CHANGED
@@ -1,4 +1 @@
1
- export * from './tamagui.config';
2
- export * from './media';
3
- export * from './createGenericFont';
4
1
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- import { createAnimations } from '@tamagui/animations-css'
2
-
3
- export const animations = createAnimations({
4
- bouncy: 'ease-in 200ms',
5
- lazy: 'ease-in 600ms',
6
- slow: 'ease-in 500ms',
7
- quick: 'ease-in 100ms',
8
- tooltip: 'ease-in 400ms',
9
- })
@@ -1,32 +0,0 @@
1
- import { createAnimations } from '@tamagui/animations-reanimated'
2
-
3
- export const animations = createAnimations({
4
- bouncy: {
5
- type: 'spring',
6
- damping: 9,
7
- mass: 0.9,
8
- stiffness: 150,
9
- },
10
- lazy: {
11
- type: 'spring',
12
- damping: 18,
13
- stiffness: 50,
14
- },
15
- slow: {
16
- type: 'spring',
17
- damping: 15,
18
- stiffness: 40,
19
- },
20
- quick: {
21
- type: 'spring',
22
- damping: 20,
23
- mass: 1.2,
24
- stiffness: 250,
25
- },
26
- tooltip: {
27
- type: 'spring',
28
- damping: 10,
29
- mass: 0.9,
30
- stiffness: 100,
31
- },
32
- })
package/src/animations.ts DELETED
@@ -1,31 +0,0 @@
1
- import { createAnimations } from '@tamagui/animations-react-native'
2
-
3
- export const animations = createAnimations({
4
- '100ms': {
5
- type: 'timing',
6
- duration: 100,
7
- },
8
- bouncy: {
9
- damping: 9,
10
- mass: 0.9,
11
- stiffness: 150,
12
- },
13
- lazy: {
14
- damping: 18,
15
- stiffness: 50,
16
- },
17
- slow: {
18
- damping: 15,
19
- stiffness: 40,
20
- },
21
- quick: {
22
- damping: 20,
23
- mass: 1.2,
24
- stiffness: 250,
25
- },
26
- tooltip: {
27
- damping: 10,
28
- mass: 0.9,
29
- stiffness: 100,
30
- },
31
- })
@@ -1,44 +0,0 @@
1
- import { GenericFont, createFont } from '@tamagui/core'
2
-
3
- const genericFontSizes = {
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,
20
- } as const
21
-
22
- export function createGenericFont<
23
- A extends GenericFont<keyof typeof genericFontSizes>,
24
- >(
25
- family: string,
26
- font: Partial<A> = {},
27
- {
28
- sizeLineHeight = (val) => val * 1.35,
29
- }: {
30
- sizeLineHeight?: (val: number) => number
31
- } = {},
32
- ): A {
33
- const size = font.size || genericFontSizes
34
- return createFont({
35
- family,
36
- size,
37
- lineHeight: Object.fromEntries(
38
- Object.entries(size).map(([k, v]) => [k, sizeLineHeight(+v)]),
39
- ) as typeof size,
40
- weight: { 0: '300' },
41
- letterSpacing: { 4: 0 },
42
- ...(font as any),
43
- })
44
- }
package/src/media.ts DELETED
@@ -1,34 +0,0 @@
1
- import { createMedia } from '@tamagui/react-native-media-driver'
2
-
3
- export const demoMedia = [500, 620, 780, 900]
4
- export const widths = [660, 800, 1020, 1280]
5
-
6
- // note order is important!
7
- // earlier defined = less important
8
-
9
- export const media = createMedia({
10
- // for site
11
- xl: { maxWidth: 1650 },
12
- lg: { maxWidth: 1280 },
13
- md: { maxWidth: 1020 },
14
- sm: { maxWidth: 800 },
15
- xs: { maxWidth: 660 },
16
- xxs: { maxWidth: 390 },
17
- gtXs: { minWidth: 660 + 1 },
18
- gtSm: { minWidth: 800 + 1 },
19
- gtMd: { minWidth: 1020 + 1 },
20
- gtLg: { minWidth: 1280 + 1 },
21
- gtXl: { minWidth: 1650 + 1 },
22
- })
23
-
24
- // note all the non "gt" ones should be true to start to match mobile-first
25
- // were aiming for "xs" to be the default to "gtXs" true too
26
- export const mediaQueryDefaultActive = {
27
- xl: true,
28
- lg: true,
29
- md: true,
30
- sm: true,
31
- xs: true,
32
- // false
33
- xxs: false,
34
- }
@@ -1,121 +0,0 @@
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
-
6
- import { animations } from './animations'
7
- import { createGenericFont } from './createGenericFont'
8
- import { media, mediaQueryDefaultActive } from './media'
9
-
10
- export * from './animations'
11
-
12
- const systemFamily =
13
- process.env.TAMAGUI_TARGET === 'native'
14
- ? 'Inter'
15
- : '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
16
-
17
- const silkscreenFont = createSilkscreenFont()
18
- const headingFont = createInterFont(
19
- {
20
- size: {
21
- 5: 13,
22
- 6: 15,
23
- 9: 32,
24
- 10: 44,
25
- },
26
- transform: {
27
- 6: 'uppercase',
28
- 7: 'none',
29
- },
30
- weight: {
31
- 6: '400',
32
- 7: '700',
33
- },
34
- color: {
35
- 6: '$colorFocus',
36
- 7: '$color',
37
- },
38
- letterSpacing: {
39
- 5: 2,
40
- 6: 1,
41
- 7: 0,
42
- 8: 0,
43
- 9: -1,
44
- 10: -1.5,
45
- 12: -2,
46
- 14: -3,
47
- 15: -4,
48
- },
49
- // for native
50
- face: {
51
- 700: { normal: 'InterBold' },
52
- 800: { normal: 'InterBold' },
53
- 900: { normal: 'InterBold' },
54
- },
55
- },
56
- { sizeLineHeight: (size) => Math.round(size * 1.1 + (size < 30 ? 10 : 5)) }
57
- )
58
-
59
- const bodyFont = createInterFont(
60
- {
61
- family: systemFamily,
62
- weight: {
63
- 1: '500',
64
- 7: '600',
65
- },
66
- },
67
- {
68
- sizeSize: (size) => Math.round(size),
69
- sizeLineHeight: (size) => Math.round(size * 1.1 + (size >= 12 ? 8 : 4)),
70
- }
71
- )
72
-
73
- const monoFont = createGenericFont(
74
- `"ui-monospace", "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,
75
- {
76
- weight: {
77
- 1: '500',
78
- },
79
- size: {
80
- 1: 11,
81
- 2: 12,
82
- 3: 13,
83
- 4: 14,
84
- 5: 16,
85
- 6: 18,
86
- 7: 20,
87
- 8: 22,
88
- 9: 30,
89
- 10: 42,
90
- 11: 52,
91
- 12: 62,
92
- 13: 72,
93
- 14: 92,
94
- 15: 114,
95
- 16: 124,
96
- },
97
- },
98
- {
99
- sizeLineHeight: (x) => x * 1.5,
100
- }
101
- )
102
-
103
- export const config = {
104
- shouldAddPrefersColorThemes: true,
105
- themeClassNameOnRoot: true,
106
- animations,
107
- media,
108
- shorthands,
109
- themes,
110
- tokens,
111
- fonts: {
112
- // noto: notoFont as any,
113
- heading: headingFont,
114
- body: bodyFont,
115
- mono: monoFont,
116
- silkscreen: silkscreenFont,
117
- },
118
- }
119
-
120
- // @ts-ignore bad types
121
- config.mediaQueryDefaultActive = mediaQueryDefaultActive