@tamagui/config-default 1.13.3 → 1.14.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.
- package/dist/index.js +1 -210
- package/dist/index.js.map +2 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,211 +1,2 @@
|
|
|
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 __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var src_exports = {};
|
|
20
|
-
__export(src_exports, {
|
|
21
|
-
getDefaultTamaguiConfig: () => getDefaultTamaguiConfig
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(src_exports);
|
|
24
|
-
var import_core = require("@tamagui/core");
|
|
25
|
-
var import_shorthands = require("@tamagui/shorthands");
|
|
26
|
-
function getDefaultTamaguiConfig() {
|
|
27
|
-
const font = (0, import_core.createFont)({
|
|
28
|
-
family: "System",
|
|
29
|
-
size: {
|
|
30
|
-
1: 15
|
|
31
|
-
},
|
|
32
|
-
lineHeight: {
|
|
33
|
-
1: 15
|
|
34
|
-
},
|
|
35
|
-
transform: {},
|
|
36
|
-
weight: {
|
|
37
|
-
1: "400"
|
|
38
|
-
},
|
|
39
|
-
color: {
|
|
40
|
-
1: "$color"
|
|
41
|
-
},
|
|
42
|
-
letterSpacing: {
|
|
43
|
-
1: 0
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
const size = {
|
|
47
|
-
0: 0,
|
|
48
|
-
0.25: 2,
|
|
49
|
-
0.5: 4,
|
|
50
|
-
0.75: 8,
|
|
51
|
-
1: 20,
|
|
52
|
-
1.5: 24,
|
|
53
|
-
2: 28,
|
|
54
|
-
2.5: 32,
|
|
55
|
-
3: 36,
|
|
56
|
-
3.5: 40,
|
|
57
|
-
4: 44,
|
|
58
|
-
true: 44,
|
|
59
|
-
4.5: 48,
|
|
60
|
-
5: 52,
|
|
61
|
-
5.5: 59,
|
|
62
|
-
6: 64,
|
|
63
|
-
6.5: 69,
|
|
64
|
-
7: 74,
|
|
65
|
-
7.6: 79,
|
|
66
|
-
8: 84,
|
|
67
|
-
8.5: 89,
|
|
68
|
-
9: 94,
|
|
69
|
-
9.5: 99,
|
|
70
|
-
10: 104,
|
|
71
|
-
11: 124,
|
|
72
|
-
12: 144,
|
|
73
|
-
13: 164,
|
|
74
|
-
14: 184,
|
|
75
|
-
15: 204,
|
|
76
|
-
16: 224,
|
|
77
|
-
17: 224,
|
|
78
|
-
18: 244,
|
|
79
|
-
19: 264,
|
|
80
|
-
20: 284
|
|
81
|
-
};
|
|
82
|
-
const spaces = Object.entries(size).map(
|
|
83
|
-
([k, v]) => [
|
|
84
|
-
k,
|
|
85
|
-
Math.max(0, v <= 16 ? Math.round(v * 0.333) : Math.floor(v * 0.7 - 12))
|
|
86
|
-
]
|
|
87
|
-
);
|
|
88
|
-
const spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k}`, -v]);
|
|
89
|
-
const space = {
|
|
90
|
-
...Object.fromEntries(spaces),
|
|
91
|
-
...Object.fromEntries(spacesNegative)
|
|
92
|
-
};
|
|
93
|
-
const zIndex = {
|
|
94
|
-
0: 0,
|
|
95
|
-
1: 100,
|
|
96
|
-
2: 200,
|
|
97
|
-
3: 300,
|
|
98
|
-
4: 400,
|
|
99
|
-
5: 500
|
|
100
|
-
};
|
|
101
|
-
const radius = {
|
|
102
|
-
0: 0,
|
|
103
|
-
1: 3,
|
|
104
|
-
2: 5,
|
|
105
|
-
3: 7,
|
|
106
|
-
4: 9,
|
|
107
|
-
5: 10,
|
|
108
|
-
6: 16,
|
|
109
|
-
7: 19,
|
|
110
|
-
8: 22,
|
|
111
|
-
9: 26,
|
|
112
|
-
10: 34,
|
|
113
|
-
11: 42,
|
|
114
|
-
12: 50
|
|
115
|
-
};
|
|
116
|
-
const tokens = (0, import_core.createTokens)({
|
|
117
|
-
color: {
|
|
118
|
-
white: "#fff",
|
|
119
|
-
black: "#000"
|
|
120
|
-
},
|
|
121
|
-
radius,
|
|
122
|
-
zIndex,
|
|
123
|
-
space,
|
|
124
|
-
size
|
|
125
|
-
});
|
|
126
|
-
const themes = {
|
|
127
|
-
light: {
|
|
128
|
-
background: tokens.color.white,
|
|
129
|
-
color: tokens.color.black
|
|
130
|
-
},
|
|
131
|
-
dark: {
|
|
132
|
-
background: tokens.color.black,
|
|
133
|
-
color: tokens.color.white
|
|
134
|
-
},
|
|
135
|
-
// most of these used for testing:
|
|
136
|
-
dark_blue: {
|
|
137
|
-
background: "blue",
|
|
138
|
-
color: "white"
|
|
139
|
-
},
|
|
140
|
-
dark_Card: {
|
|
141
|
-
background: "dark",
|
|
142
|
-
color: "card"
|
|
143
|
-
},
|
|
144
|
-
dark_blue_Button: {
|
|
145
|
-
background: "blue",
|
|
146
|
-
color: "white"
|
|
147
|
-
},
|
|
148
|
-
dark_red: {
|
|
149
|
-
background: "darkred",
|
|
150
|
-
color: "white"
|
|
151
|
-
},
|
|
152
|
-
dark_red_alt1: {
|
|
153
|
-
background: "darkred",
|
|
154
|
-
color: "white"
|
|
155
|
-
},
|
|
156
|
-
dark_red_Button: {
|
|
157
|
-
background: "darkred",
|
|
158
|
-
color: "#ccc"
|
|
159
|
-
},
|
|
160
|
-
dark_yellow_Button: {
|
|
161
|
-
background: "brown",
|
|
162
|
-
color: "#ccc"
|
|
163
|
-
},
|
|
164
|
-
dark_red_alt2: {
|
|
165
|
-
background: "darkred",
|
|
166
|
-
color: "#555"
|
|
167
|
-
},
|
|
168
|
-
dark_red_alt2_Button: {
|
|
169
|
-
background: "darkred",
|
|
170
|
-
color: "#444"
|
|
171
|
-
},
|
|
172
|
-
red: {
|
|
173
|
-
background: "red",
|
|
174
|
-
color: "red"
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
const fonts = {
|
|
178
|
-
heading: font,
|
|
179
|
-
body: font
|
|
180
|
-
};
|
|
181
|
-
const media = {
|
|
182
|
-
xs: { maxWidth: 660 },
|
|
183
|
-
sm: { maxWidth: 800 },
|
|
184
|
-
md: { maxWidth: 1020 },
|
|
185
|
-
lg: { maxWidth: 1280 },
|
|
186
|
-
xl: { maxWidth: 1420 },
|
|
187
|
-
xxl: { maxWidth: 1600 },
|
|
188
|
-
gtXs: { minWidth: 660 + 1 },
|
|
189
|
-
gtSm: { minWidth: 800 + 1 },
|
|
190
|
-
gtMd: { minWidth: 1020 + 1 },
|
|
191
|
-
gtLg: { minWidth: 1280 + 1 },
|
|
192
|
-
short: { maxHeight: 820 },
|
|
193
|
-
tall: { minHeight: 820 },
|
|
194
|
-
hoverNone: { hover: "none" },
|
|
195
|
-
pointerCoarse: { pointer: "coarse" }
|
|
196
|
-
};
|
|
197
|
-
return (0, import_core.createTamagui)({
|
|
198
|
-
shouldAddPrefersColorThemes: true,
|
|
199
|
-
themeClassNameOnRoot: true,
|
|
200
|
-
shorthands: import_shorthands.shorthands,
|
|
201
|
-
fonts,
|
|
202
|
-
themes,
|
|
203
|
-
tokens,
|
|
204
|
-
media
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
208
|
-
0 && (module.exports = {
|
|
209
|
-
getDefaultTamaguiConfig
|
|
210
|
-
});
|
|
1
|
+
"use strict";var l=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var f=(r,o)=>{for(var t in o)l(r,t,{get:o[t],enumerable:!0})},_=(r,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of g(o))!b.call(r,e)&&e!==t&&l(r,e,{get:()=>o[e],enumerable:!(n=u(o,e))||n.enumerable});return r};var x=r=>_(l({},"__esModule",{value:!0}),r);var w={};f(w,{getDefaultTamaguiConfig:()=>p});module.exports=x(w);var a=require("@tamagui/core"),s=require("@tamagui/shorthands");function p(){const r=(0,a.createFont)({family:"System",size:{1:15},lineHeight:{1:15},transform:{},weight:{1:"400"},color:{1:"$color"},letterSpacing:{1:0}}),o={0:0,.25:2,.5:4,.75:8,1:20,1.5:24,2:28,2.5:32,3:36,3.5:40,4:44,true:44,4.5:48,5:52,5.5:59,6:64,6.5:69,7:74,7.6:79,8:84,8.5:89,9:94,9.5:99,10:104,11:124,12:144,13:164,14:184,15:204,16:224,17:224,18:244,19:264,20:284},t=Object.entries(o).map(([i,c])=>[i,Math.max(0,c<=16?Math.round(c*.333):Math.floor(c*.7-12))]),n=t.slice(1).map(([i,c])=>[`-${i}`,-c]),e={...Object.fromEntries(t),...Object.fromEntries(n)},d=(0,a.createTokens)({color:{white:"#fff",black:"#000"},radius:{0:0,1:3,2:5,3:7,4:9,5:10,6:16,7:19,8:22,9:26,10:34,11:42,12:50},zIndex:{0:0,1:100,2:200,3:300,4:400,5:500},space:e,size:o}),h={light:{background:d.color.white,color:d.color.black},dark:{background:d.color.black,color:d.color.white},dark_blue:{background:"blue",color:"white"},dark_Card:{background:"dark",color:"card"},dark_blue_Button:{background:"blue",color:"white"},dark_red:{background:"darkred",color:"white"},dark_red_alt1:{background:"darkred",color:"white"},dark_red_Button:{background:"darkred",color:"#ccc"},dark_yellow_Button:{background:"brown",color:"#ccc"},dark_red_alt2:{background:"darkred",color:"#555"},dark_red_alt2_Button:{background:"darkred",color:"#444"},red:{background:"red",color:"red"}},m={heading:r,body:r},k={xs:{maxWidth:660},sm:{maxWidth:800},md:{maxWidth:1020},lg:{maxWidth:1280},xl:{maxWidth:1420},xxl:{maxWidth:1600},gtXs:{minWidth:660+1},gtSm:{minWidth:800+1},gtMd:{minWidth:1020+1},gtLg:{minWidth:1280+1},short:{maxHeight:820},tall:{minHeight:820},hoverNone:{hover:"none"},pointerCoarse:{pointer:"coarse"}};return(0,a.createTamagui)({shouldAddPrefersColorThemes:!0,themeClassNameOnRoot:!0,shorthands:s.shorthands,fonts:m,themes:h,tokens:d,media:k})}0&&(module.exports={getDefaultTamaguiConfig});
|
|
211
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["// SEE config-default-node\n\nimport { createFont, createTamagui, createTokens } from '@tamagui/core'\nimport { shorthands } from '@tamagui/shorthands'\n\n// basic fallback theme just to have compiler load in decent tate\nexport function getDefaultTamaguiConfig() {\n const font = createFont({\n family: 'System',\n size: {\n 1: 15,\n },\n lineHeight: {\n 1: 15,\n },\n transform: {},\n weight: {\n 1: '400',\n },\n color: {\n 1: '$color',\n },\n letterSpacing: {\n 1: 0,\n },\n })\n\n const size = {\n 0: 0,\n 0.25: 2,\n 0.5: 4,\n 0.75: 8,\n 1: 20,\n 1.5: 24,\n 2: 28,\n 2.5: 32,\n 3: 36,\n 3.5: 40,\n 4: 44,\n true: 44,\n 4.5: 48,\n 5: 52,\n 5.5: 59,\n 6: 64,\n 6.5: 69,\n 7: 74,\n 7.6: 79,\n 8: 84,\n 8.5: 89,\n 9: 94,\n 9.5: 99,\n 10: 104,\n 11: 124,\n 12: 144,\n 13: 164,\n 14: 184,\n 15: 204,\n 16: 224,\n 17: 224,\n 18: 244,\n 19: 264,\n 20: 284,\n }\n\n const spaces = Object.entries(size).map(\n ([k, v]) =>\n [\n k,\n Math.max(0, v <= 16 ? Math.round(v * 0.333) : Math.floor(v * 0.7 - 12)),\n ] as const\n )\n\n const spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k}`, -v])\n\n const space = {\n ...Object.fromEntries(spaces),\n ...Object.fromEntries(spacesNegative),\n } as any\n\n const zIndex = {\n 0: 0,\n 1: 100,\n 2: 200,\n 3: 300,\n 4: 400,\n 5: 500,\n }\n\n const radius = {\n 0: 0,\n 1: 3,\n 2: 5,\n 3: 7,\n 4: 9,\n 5: 10,\n 6: 16,\n 7: 19,\n 8: 22,\n 9: 26,\n 10: 34,\n 11: 42,\n 12: 50,\n }\n\n const tokens = createTokens({\n color: {\n white: '#fff',\n black: '#000',\n },\n radius,\n zIndex,\n space,\n size,\n })\n\n const themes = {\n light: {\n background: tokens.color.white,\n color: tokens.color.black,\n },\n dark: {\n background: tokens.color.black,\n color: tokens.color.white,\n },\n // most of these used for testing:\n dark_blue: {\n background: 'blue',\n color: 'white',\n },\n dark_Card: {\n background: 'dark',\n color: 'card',\n },\n dark_blue_Button: {\n background: 'blue',\n color: 'white',\n },\n dark_red: {\n background: 'darkred',\n color: 'white',\n },\n dark_red_alt1: {\n background: 'darkred',\n color: 'white',\n },\n dark_red_Button: {\n background: 'darkred',\n color: '#ccc',\n },\n dark_yellow_Button: {\n background: 'brown',\n color: '#ccc',\n },\n dark_red_alt2: {\n background: 'darkred',\n color: '#555',\n },\n dark_red_alt2_Button: {\n background: 'darkred',\n color: '#444',\n },\n red: {\n background: 'red',\n color: 'red',\n },\n }\n\n const fonts = {\n heading: font,\n body: font,\n }\n\n const media = {\n xs: { maxWidth: 660 },\n sm: { maxWidth: 800 },\n md: { maxWidth: 1020 },\n lg: { maxWidth: 1280 },\n xl: { maxWidth: 1420 },\n xxl: { maxWidth: 1600 },\n gtXs: { minWidth: 660 + 1 },\n gtSm: { minWidth: 800 + 1 },\n gtMd: { minWidth: 1020 + 1 },\n gtLg: { minWidth: 1280 + 1 },\n short: { maxHeight: 820 },\n tall: { minHeight: 820 },\n hoverNone: { hover: 'none' },\n pointerCoarse: { pointer: 'coarse' },\n }\n\n return createTamagui({\n shouldAddPrefersColorThemes: true,\n themeClassNameOnRoot: true,\n shorthands,\n fonts,\n themes,\n tokens,\n media,\n })\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6BAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAAI,EAAwD,yBACxDC,EAA2B,+BAGpB,SAASH,GAA0B,CACxC,MAAMI,KAAO,cAAW,CACtB,OAAQ,SACR,KAAM,CACJ,EAAG,EACL,EACA,WAAY,CACV,EAAG,EACL,EACA,UAAW,CAAC,EACZ,OAAQ,CACN,EAAG,KACL,EACA,MAAO,CACL,EAAG,QACL,EACA,cAAe,CACb,EAAG,CACL,CACF,CAAC,EAEKC,EAAO,CACX,EAAG,EACH,IAAM,EACN,GAAK,EACL,IAAM,EACN,EAAG,GACH,IAAK,GACL,EAAG,GACH,IAAK,GACL,EAAG,GACH,IAAK,GACL,EAAG,GACH,KAAM,GACN,IAAK,GACL,EAAG,GACH,IAAK,GACL,EAAG,GACH,IAAK,GACL,EAAG,GACH,IAAK,GACL,EAAG,GACH,IAAK,GACL,EAAG,GACH,IAAK,GACL,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,IACJ,GAAI,GACN,EAEMC,EAAS,OAAO,QAAQD,CAAI,EAAE,IAClC,CAAC,CAACE,EAAGC,CAAC,IACJ,CACED,EACA,KAAK,IAAI,EAAGC,GAAK,GAAK,KAAK,MAAMA,EAAI,IAAK,EAAI,KAAK,MAAMA,EAAI,GAAM,EAAE,CAAC,CACxE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,SAAU,IAAK,EACrB,GAAI,CAAE,SAAU,IAAK,EACrB,GAAI,CAAE,SAAU,IAAK,EACrB,IAAK,CAAE,SAAU,IAAK,EACtB,KAAM,CAAE,SAAU,IAAM,CAAE,EAC1B,KAAM,CAAE,SAAU,IAAM,CAAE,EAC1B,KAAM,CAAE,SAAU,KAAO,CAAE,EAC3B,KAAM,CAAE,SAAU,KAAO,CAAE,EAC3B,MAAO,CAAE,UAAW,GAAI,EACxB,KAAM,CAAE,UAAW,GAAI,EACvB,UAAW,CAAE,MAAO,MAAO,EAC3B,cAAe,CAAE,QAAS,QAAS,CACrC,EAEA,SAAO,iBAAc,CACnB,4BAA6B,GAC7B,qBAAsB,GACtB,wBACA,MAAAD,EACA,OAAAD,EACA,OAAAD,EACA,MAAAG,CACF,CAAC,CACH",
|
|
6
|
+
"names": ["src_exports", "__export", "getDefaultTamaguiConfig", "__toCommonJS", "import_core", "import_shorthands", "font", "size", "spaces", "k", "v", "spacesNegative", "space", "tokens", "themes", "fonts", "media"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/config-default",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@tamagui/core": "1.
|
|
19
|
-
"@tamagui/shorthands": "1.
|
|
18
|
+
"@tamagui/core": "1.14.0",
|
|
19
|
+
"@tamagui/shorthands": "1.14.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@tamagui/build": "1.
|
|
22
|
+
"@tamagui/build": "1.14.0"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|