@tamagui/config-default 1.114.4 → 1.115.0

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,41 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var animations_exports = {};
22
+ __export(animations_exports, {
23
+ animations: () => animations
24
+ });
25
+ module.exports = __toCommonJS(animations_exports);
26
+ var import_animations_css = require("@tamagui/animations-css");
27
+ const smoothBezier = "cubic-bezier(0.215, 0.610, 0.355, 1.000)",
28
+ animations = (0, import_animations_css.createAnimations)({
29
+ "75ms": "ease-in 75ms",
30
+ "100ms": "ease-in 100ms",
31
+ "200ms": "ease-in 200ms",
32
+ bouncy: "ease-in 200ms",
33
+ superBouncy: "ease-in 500ms",
34
+ lazy: "ease-in 1000ms",
35
+ medium: "ease-in 300ms",
36
+ slow: "ease-in 500ms",
37
+ quick: `${smoothBezier} 400ms`,
38
+ quicker: `${smoothBezier} 300ms`,
39
+ quickest: `${smoothBezier} 200ms`,
40
+ tooltip: "ease-in 400ms"
41
+ });
@@ -0,0 +1,60 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var animations_native_exports = {};
22
+ __export(animations_native_exports, {
23
+ animations: () => animations
24
+ });
25
+ module.exports = __toCommonJS(animations_native_exports);
26
+ var import_animations_react_native = require("@tamagui/animations-react-native");
27
+ const animations = (0, import_animations_react_native.createAnimations)({
28
+ "100ms": {
29
+ type: "timing",
30
+ duration: 100
31
+ },
32
+ bouncy: {
33
+ damping: 9,
34
+ mass: 0.9,
35
+ stiffness: 150
36
+ },
37
+ lazy: {
38
+ damping: 18,
39
+ stiffness: 50
40
+ },
41
+ medium: {
42
+ damping: 15,
43
+ stiffness: 120,
44
+ mass: 1
45
+ },
46
+ slow: {
47
+ damping: 15,
48
+ stiffness: 40
49
+ },
50
+ quick: {
51
+ damping: 20,
52
+ mass: 1.2,
53
+ stiffness: 250
54
+ },
55
+ tooltip: {
56
+ damping: 10,
57
+ mass: 0.9,
58
+ stiffness: 100
59
+ }
60
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/animations.native.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qCAAiC;AAE1B,MAAM,iBAAa,iDAAiB;AAAA,EACzC,SAAS;AAAA,IACP,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,IACN,WAAW;AAAA,EACb;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA,EACA,OAAO;AAAA,IACL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,WAAW;AAAA,EACb;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,IACT,MAAM;AAAA,IACN,WAAW;AAAA,EACb;AACF,CAAC;",
5
+ "names": []
6
+ }
package/dist/index.cjs ADDED
@@ -0,0 +1,258 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ getDefaultTamaguiConfig: () => getDefaultTamaguiConfig
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+ var import_core = require("@tamagui/core"),
27
+ import_shorthands = require("@tamagui/shorthands");
28
+ function getDefaultTamaguiConfig(platform = "web") {
29
+ const headingFont = (0, import_core.createFont)({
30
+ family: "Heading",
31
+ size: {
32
+ 1: 15
33
+ },
34
+ lineHeight: {
35
+ 1: 15
36
+ },
37
+ transform: {},
38
+ weight: {
39
+ 1: "400"
40
+ },
41
+ color: {
42
+ 1: "$color"
43
+ },
44
+ letterSpacing: {
45
+ 1: 0
46
+ }
47
+ }),
48
+ font = (0, import_core.createFont)({
49
+ family: "System",
50
+ size: {
51
+ 1: 15
52
+ },
53
+ lineHeight: {
54
+ 1: 15
55
+ },
56
+ transform: {},
57
+ weight: {
58
+ 1: "400"
59
+ },
60
+ color: {
61
+ 1: "$color"
62
+ },
63
+ letterSpacing: {
64
+ 1: 0
65
+ }
66
+ }),
67
+ size = {
68
+ 0: 0,
69
+ 0.25: 2,
70
+ 0.5: 4,
71
+ 0.75: 8,
72
+ 1: 20,
73
+ 1.5: 24,
74
+ 2: 28,
75
+ 2.5: 32,
76
+ 3: 36,
77
+ 3.5: 40,
78
+ 4: 44,
79
+ true: 44,
80
+ 4.5: 48,
81
+ 5: 52,
82
+ 5.5: 59,
83
+ 6: 64,
84
+ 6.5: 69,
85
+ 7: 74,
86
+ 7.6: 79,
87
+ 8: 84,
88
+ 8.5: 89,
89
+ 9: 94,
90
+ 9.5: 99,
91
+ 10: 104,
92
+ 11: 124,
93
+ 12: 144,
94
+ 13: 164,
95
+ 14: 184,
96
+ 15: 204,
97
+ 16: 224,
98
+ 17: 224,
99
+ 18: 244,
100
+ 19: 264,
101
+ 20: 284
102
+ },
103
+ spaces = Object.entries(size).map(([k, v]) => [k, Math.max(0, v <= 16 ? Math.round(v * 0.333) : Math.floor(v * 0.7 - 12))]),
104
+ spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k}`, -v]),
105
+ space = {
106
+ ...Object.fromEntries(spaces),
107
+ ...Object.fromEntries(spacesNegative)
108
+ },
109
+ tokens = (0, import_core.createTokens)({
110
+ color: {
111
+ white: "#fff",
112
+ black: "#000"
113
+ },
114
+ radius: {
115
+ 0: 0,
116
+ 1: 3,
117
+ 2: 5,
118
+ 3: 7,
119
+ 4: 9,
120
+ 5: 10,
121
+ 6: 16,
122
+ 7: 19,
123
+ 8: 22,
124
+ 9: 26,
125
+ 10: 34,
126
+ 11: 42,
127
+ 12: 50
128
+ },
129
+ zIndex: {
130
+ 0: 0,
131
+ 1: 100,
132
+ 2: 200,
133
+ 3: 300,
134
+ 4: 400,
135
+ 5: 500
136
+ },
137
+ space,
138
+ size
139
+ }),
140
+ themes = {
141
+ light: {
142
+ background: tokens.color.white,
143
+ color: tokens.color.black
144
+ },
145
+ dark: {
146
+ background: tokens.color.black,
147
+ color: tokens.color.white
148
+ },
149
+ // most of these used for testing:
150
+ dark_blue: {
151
+ background: "blue",
152
+ color: "white"
153
+ },
154
+ dark_Card: {
155
+ background: "dark",
156
+ color: "card"
157
+ },
158
+ dark_Button: {
159
+ background: "dark",
160
+ color: "button"
161
+ },
162
+ dark_blue_Button: {
163
+ background: "blue",
164
+ color: "white"
165
+ },
166
+ dark_red: {
167
+ background: "darkred",
168
+ color: "white"
169
+ },
170
+ dark_red_alt1: {
171
+ background: "darkred",
172
+ color: "white"
173
+ },
174
+ dark_red_Button: {
175
+ background: "darkred",
176
+ color: "#ccc"
177
+ },
178
+ dark_yellow_Button: {
179
+ background: "brown",
180
+ color: "#ccc"
181
+ },
182
+ dark_red_active_ListItem: {
183
+ background: "darkred",
184
+ color: "red"
185
+ },
186
+ dark_red_alt2: {
187
+ background: "darkred",
188
+ color: "#555"
189
+ },
190
+ dark_red_alt2_Button: {
191
+ background: "darkred",
192
+ color: "#444"
193
+ },
194
+ red: {
195
+ background: "red",
196
+ color: "red"
197
+ }
198
+ };
199
+ return {
200
+ // animations: platform === 'web' ? animations : animationsNative,
201
+ shorthands: import_shorthands.shorthands,
202
+ fonts: {
203
+ heading: headingFont,
204
+ body: font
205
+ },
206
+ themes,
207
+ tokens,
208
+ media: {
209
+ xs: {
210
+ maxWidth: 660
211
+ },
212
+ sm: {
213
+ maxWidth: 800
214
+ },
215
+ md: {
216
+ maxWidth: 1020
217
+ },
218
+ lg: {
219
+ maxWidth: 1280
220
+ },
221
+ xl: {
222
+ maxWidth: 1420
223
+ },
224
+ xxl: {
225
+ maxWidth: 1600
226
+ },
227
+ gtXs: {
228
+ minWidth: 661
229
+ },
230
+ gtSm: {
231
+ minWidth: 801
232
+ },
233
+ gtMd: {
234
+ minWidth: 1021
235
+ },
236
+ gtLg: {
237
+ minWidth: 1281
238
+ },
239
+ short: {
240
+ maxHeight: 820
241
+ },
242
+ tall: {
243
+ minHeight: 820
244
+ },
245
+ hoverNone: {
246
+ hover: "none"
247
+ },
248
+ pointerCoarse: {
249
+ pointer: "coarse"
250
+ }
251
+ },
252
+ settings: {
253
+ shouldAddPrefersColorThemes: !0,
254
+ defaultFont: "body",
255
+ themeClassNameOnRoot: !0
256
+ }
257
+ };
258
+ }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tamagui/config-default",
3
- "version": "1.114.4",
3
+ "version": "1.115.0",
4
4
  "source": "src/index.ts",
5
- "main": "dist",
5
+ "main": "dist/index.cjs",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tamagui-build",
@@ -15,12 +15,12 @@
15
15
  "dist"
16
16
  ],
17
17
  "dependencies": {
18
- "@tamagui/animations-css": "1.114.4",
19
- "@tamagui/core": "1.114.4",
20
- "@tamagui/shorthands": "1.114.4"
18
+ "@tamagui/animations-css": "1.115.0",
19
+ "@tamagui/core": "1.115.0",
20
+ "@tamagui/shorthands": "1.115.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@tamagui/build": "1.114.4"
23
+ "@tamagui/build": "1.115.0"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"
@@ -1,35 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var animations_exports = {};
16
- __export(animations_exports, {
17
- animations: () => animations
18
- });
19
- module.exports = __toCommonJS(animations_exports);
20
- var import_animations_css = require("@tamagui/animations-css");
21
- const smoothBezier = "cubic-bezier(0.215, 0.610, 0.355, 1.000)", animations = (0, import_animations_css.createAnimations)({
22
- "75ms": "ease-in 75ms",
23
- "100ms": "ease-in 100ms",
24
- "200ms": "ease-in 200ms",
25
- bouncy: "ease-in 200ms",
26
- superBouncy: "ease-in 500ms",
27
- lazy: "ease-in 1000ms",
28
- medium: "ease-in 300ms",
29
- slow: "ease-in 500ms",
30
- quick: `${smoothBezier} 400ms`,
31
- quicker: `${smoothBezier} 300ms`,
32
- quickest: `${smoothBezier} 200ms`,
33
- tooltip: "ease-in 400ms"
34
- });
35
- //# sourceMappingURL=animations.js.map
package/dist/index.js DELETED
@@ -1,222 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var src_exports = {};
16
- __export(src_exports, {
17
- getDefaultTamaguiConfig: () => getDefaultTamaguiConfig
18
- });
19
- module.exports = __toCommonJS(src_exports);
20
- var import_core = require("@tamagui/core"), import_shorthands = require("@tamagui/shorthands");
21
- function getDefaultTamaguiConfig(platform = "web") {
22
- const headingFont = (0, import_core.createFont)({
23
- family: "Heading",
24
- size: {
25
- 1: 15
26
- },
27
- lineHeight: {
28
- 1: 15
29
- },
30
- transform: {},
31
- weight: {
32
- 1: "400"
33
- },
34
- color: {
35
- 1: "$color"
36
- },
37
- letterSpacing: {
38
- 1: 0
39
- }
40
- }), font = (0, import_core.createFont)({
41
- family: "System",
42
- size: {
43
- 1: 15
44
- },
45
- lineHeight: {
46
- 1: 15
47
- },
48
- transform: {},
49
- weight: {
50
- 1: "400"
51
- },
52
- color: {
53
- 1: "$color"
54
- },
55
- letterSpacing: {
56
- 1: 0
57
- }
58
- }), size = {
59
- 0: 0,
60
- 0.25: 2,
61
- 0.5: 4,
62
- 0.75: 8,
63
- 1: 20,
64
- 1.5: 24,
65
- 2: 28,
66
- 2.5: 32,
67
- 3: 36,
68
- 3.5: 40,
69
- 4: 44,
70
- true: 44,
71
- 4.5: 48,
72
- 5: 52,
73
- 5.5: 59,
74
- 6: 64,
75
- 6.5: 69,
76
- 7: 74,
77
- 7.6: 79,
78
- 8: 84,
79
- 8.5: 89,
80
- 9: 94,
81
- 9.5: 99,
82
- 10: 104,
83
- 11: 124,
84
- 12: 144,
85
- 13: 164,
86
- 14: 184,
87
- 15: 204,
88
- 16: 224,
89
- 17: 224,
90
- 18: 244,
91
- 19: 264,
92
- 20: 284
93
- }, spaces = Object.entries(size).map(
94
- ([k, v]) => [
95
- k,
96
- Math.max(0, v <= 16 ? Math.round(v * 0.333) : Math.floor(v * 0.7 - 12))
97
- ]
98
- ), spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k}`, -v]), space = {
99
- ...Object.fromEntries(spaces),
100
- ...Object.fromEntries(spacesNegative)
101
- }, tokens = (0, import_core.createTokens)({
102
- color: {
103
- white: "#fff",
104
- black: "#000"
105
- },
106
- radius: {
107
- 0: 0,
108
- 1: 3,
109
- 2: 5,
110
- 3: 7,
111
- 4: 9,
112
- 5: 10,
113
- 6: 16,
114
- 7: 19,
115
- 8: 22,
116
- 9: 26,
117
- 10: 34,
118
- 11: 42,
119
- 12: 50
120
- },
121
- zIndex: {
122
- 0: 0,
123
- 1: 100,
124
- 2: 200,
125
- 3: 300,
126
- 4: 400,
127
- 5: 500
128
- },
129
- space,
130
- size
131
- }), themes = {
132
- light: {
133
- background: tokens.color.white,
134
- color: tokens.color.black
135
- },
136
- dark: {
137
- background: tokens.color.black,
138
- color: tokens.color.white
139
- },
140
- // most of these used for testing:
141
- dark_blue: {
142
- background: "blue",
143
- color: "white"
144
- },
145
- dark_Card: {
146
- background: "dark",
147
- color: "card"
148
- },
149
- dark_Button: {
150
- background: "dark",
151
- color: "button"
152
- },
153
- dark_blue_Button: {
154
- background: "blue",
155
- color: "white"
156
- },
157
- dark_red: {
158
- background: "darkred",
159
- color: "white"
160
- },
161
- dark_red_alt1: {
162
- background: "darkred",
163
- color: "white"
164
- },
165
- dark_red_Button: {
166
- background: "darkred",
167
- color: "#ccc"
168
- },
169
- dark_yellow_Button: {
170
- background: "brown",
171
- color: "#ccc"
172
- },
173
- dark_red_active_ListItem: {
174
- background: "darkred",
175
- color: "red"
176
- },
177
- dark_red_alt2: {
178
- background: "darkred",
179
- color: "#555"
180
- },
181
- dark_red_alt2_Button: {
182
- background: "darkred",
183
- color: "#444"
184
- },
185
- red: {
186
- background: "red",
187
- color: "red"
188
- }
189
- };
190
- return {
191
- // animations: platform === 'web' ? animations : animationsNative,
192
- shorthands: import_shorthands.shorthands,
193
- fonts: {
194
- heading: headingFont,
195
- body: font
196
- },
197
- themes,
198
- tokens,
199
- media: {
200
- xs: { maxWidth: 660 },
201
- sm: { maxWidth: 800 },
202
- md: { maxWidth: 1020 },
203
- lg: { maxWidth: 1280 },
204
- xl: { maxWidth: 1420 },
205
- xxl: { maxWidth: 1600 },
206
- gtXs: { minWidth: 661 },
207
- gtSm: { minWidth: 801 },
208
- gtMd: { minWidth: 1021 },
209
- gtLg: { minWidth: 1281 },
210
- short: { maxHeight: 820 },
211
- tall: { minHeight: 820 },
212
- hoverNone: { hover: "none" },
213
- pointerCoarse: { pointer: "coarse" }
214
- },
215
- settings: {
216
- shouldAddPrefersColorThemes: !0,
217
- defaultFont: "body",
218
- themeClassNameOnRoot: !0
219
- }
220
- };
221
- }
222
- //# sourceMappingURL=index.js.map
File without changes
File without changes