@tamagui/theme-base 1.0.1-beta.141 → 1.0.1-beta.142

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/types/tokens.d.ts CHANGED
@@ -1,17 +1,5 @@
1
1
  import { Variable } from '@tamagui/core';
2
2
  export declare const darkColors: {
3
- teal1: string;
4
- teal2: string;
5
- teal3: string;
6
- teal4: string;
7
- teal5: string;
8
- teal6: string;
9
- teal7: string;
10
- teal8: string;
11
- teal9: string;
12
- teal10: string;
13
- teal11: string;
14
- teal12: string;
15
3
  yellow1: string;
16
4
  yellow2: string;
17
5
  yellow3: string;
@@ -24,18 +12,6 @@ export declare const darkColors: {
24
12
  yellow10: string;
25
13
  yellow11: string;
26
14
  yellow12: string;
27
- violet1: string;
28
- violet2: string;
29
- violet3: string;
30
- violet4: string;
31
- violet5: string;
32
- violet6: string;
33
- violet7: string;
34
- violet8: string;
35
- violet9: string;
36
- violet10: string;
37
- violet11: string;
38
- violet12: string;
39
15
  red1: string;
40
16
  red2: string;
41
17
  red3: string;
@@ -96,18 +72,6 @@ export declare const darkColors: {
96
72
  green10: string;
97
73
  green11: string;
98
74
  green12: string;
99
- grayA1: string;
100
- grayA2: string;
101
- grayA3: string;
102
- grayA4: string;
103
- grayA5: string;
104
- grayA6: string;
105
- grayA7: string;
106
- grayA8: string;
107
- grayA9: string;
108
- grayA10: string;
109
- grayA11: string;
110
- grayA12: string;
111
75
  gray1: string;
112
76
  gray2: string;
113
77
  gray3: string;
@@ -134,18 +98,6 @@ export declare const darkColors: {
134
98
  blue12: string;
135
99
  };
136
100
  export declare const lightColors: {
137
- teal1: string;
138
- teal2: string;
139
- teal3: string;
140
- teal4: string;
141
- teal5: string;
142
- teal6: string;
143
- teal7: string;
144
- teal8: string;
145
- teal9: string;
146
- teal10: string;
147
- teal11: string;
148
- teal12: string;
149
101
  yellow1: string;
150
102
  yellow2: string;
151
103
  yellow3: string;
@@ -158,18 +110,6 @@ export declare const lightColors: {
158
110
  yellow10: string;
159
111
  yellow11: string;
160
112
  yellow12: string;
161
- violet1: string;
162
- violet2: string;
163
- violet3: string;
164
- violet4: string;
165
- violet5: string;
166
- violet6: string;
167
- violet7: string;
168
- violet8: string;
169
- violet9: string;
170
- violet10: string;
171
- violet11: string;
172
- violet12: string;
173
113
  red1: string;
174
114
  red2: string;
175
115
  red3: string;
@@ -230,18 +170,6 @@ export declare const lightColors: {
230
170
  green10: string;
231
171
  green11: string;
232
172
  green12: string;
233
- grayA1: string;
234
- grayA2: string;
235
- grayA3: string;
236
- grayA4: string;
237
- grayA5: string;
238
- grayA6: string;
239
- grayA7: string;
240
- grayA8: string;
241
- grayA9: string;
242
- grayA10: string;
243
- grayA11: string;
244
- grayA12: string;
245
173
  gray1: string;
246
174
  gray2: string;
247
175
  gray3: string;
@@ -269,18 +197,6 @@ export declare const lightColors: {
269
197
  };
270
198
  export declare const tokens: {
271
199
  color: {
272
- teal1Dark: Variable<import("@tamagui/core").VariableValue>;
273
- teal2Dark: Variable<import("@tamagui/core").VariableValue>;
274
- teal3Dark: Variable<import("@tamagui/core").VariableValue>;
275
- teal4Dark: Variable<import("@tamagui/core").VariableValue>;
276
- teal5Dark: Variable<import("@tamagui/core").VariableValue>;
277
- teal6Dark: Variable<import("@tamagui/core").VariableValue>;
278
- teal7Dark: Variable<import("@tamagui/core").VariableValue>;
279
- teal8Dark: Variable<import("@tamagui/core").VariableValue>;
280
- teal9Dark: Variable<import("@tamagui/core").VariableValue>;
281
- teal10Dark: Variable<import("@tamagui/core").VariableValue>;
282
- teal11Dark: Variable<import("@tamagui/core").VariableValue>;
283
- teal12Dark: Variable<import("@tamagui/core").VariableValue>;
284
200
  yellow1Dark: Variable<import("@tamagui/core").VariableValue>;
285
201
  yellow2Dark: Variable<import("@tamagui/core").VariableValue>;
286
202
  yellow3Dark: Variable<import("@tamagui/core").VariableValue>;
@@ -293,18 +209,6 @@ export declare const tokens: {
293
209
  yellow10Dark: Variable<import("@tamagui/core").VariableValue>;
294
210
  yellow11Dark: Variable<import("@tamagui/core").VariableValue>;
295
211
  yellow12Dark: Variable<import("@tamagui/core").VariableValue>;
296
- violet1Dark: Variable<import("@tamagui/core").VariableValue>;
297
- violet2Dark: Variable<import("@tamagui/core").VariableValue>;
298
- violet3Dark: Variable<import("@tamagui/core").VariableValue>;
299
- violet4Dark: Variable<import("@tamagui/core").VariableValue>;
300
- violet5Dark: Variable<import("@tamagui/core").VariableValue>;
301
- violet6Dark: Variable<import("@tamagui/core").VariableValue>;
302
- violet7Dark: Variable<import("@tamagui/core").VariableValue>;
303
- violet8Dark: Variable<import("@tamagui/core").VariableValue>;
304
- violet9Dark: Variable<import("@tamagui/core").VariableValue>;
305
- violet10Dark: Variable<import("@tamagui/core").VariableValue>;
306
- violet11Dark: Variable<import("@tamagui/core").VariableValue>;
307
- violet12Dark: Variable<import("@tamagui/core").VariableValue>;
308
212
  red1Dark: Variable<import("@tamagui/core").VariableValue>;
309
213
  red2Dark: Variable<import("@tamagui/core").VariableValue>;
310
214
  red3Dark: Variable<import("@tamagui/core").VariableValue>;
@@ -365,18 +269,6 @@ export declare const tokens: {
365
269
  green10Dark: Variable<import("@tamagui/core").VariableValue>;
366
270
  green11Dark: Variable<import("@tamagui/core").VariableValue>;
367
271
  green12Dark: Variable<import("@tamagui/core").VariableValue>;
368
- grayA1Dark: Variable<import("@tamagui/core").VariableValue>;
369
- grayA2Dark: Variable<import("@tamagui/core").VariableValue>;
370
- grayA3Dark: Variable<import("@tamagui/core").VariableValue>;
371
- grayA4Dark: Variable<import("@tamagui/core").VariableValue>;
372
- grayA5Dark: Variable<import("@tamagui/core").VariableValue>;
373
- grayA6Dark: Variable<import("@tamagui/core").VariableValue>;
374
- grayA7Dark: Variable<import("@tamagui/core").VariableValue>;
375
- grayA8Dark: Variable<import("@tamagui/core").VariableValue>;
376
- grayA9Dark: Variable<import("@tamagui/core").VariableValue>;
377
- grayA10Dark: Variable<import("@tamagui/core").VariableValue>;
378
- grayA11Dark: Variable<import("@tamagui/core").VariableValue>;
379
- grayA12Dark: Variable<import("@tamagui/core").VariableValue>;
380
272
  gray1Dark: Variable<import("@tamagui/core").VariableValue>;
381
273
  gray2Dark: Variable<import("@tamagui/core").VariableValue>;
382
274
  gray3Dark: Variable<import("@tamagui/core").VariableValue>;
@@ -401,18 +293,6 @@ export declare const tokens: {
401
293
  blue10Dark: Variable<import("@tamagui/core").VariableValue>;
402
294
  blue11Dark: Variable<import("@tamagui/core").VariableValue>;
403
295
  blue12Dark: Variable<import("@tamagui/core").VariableValue>;
404
- teal1Light: Variable<import("@tamagui/core").VariableValue>;
405
- teal2Light: Variable<import("@tamagui/core").VariableValue>;
406
- teal3Light: Variable<import("@tamagui/core").VariableValue>;
407
- teal4Light: Variable<import("@tamagui/core").VariableValue>;
408
- teal5Light: Variable<import("@tamagui/core").VariableValue>;
409
- teal6Light: Variable<import("@tamagui/core").VariableValue>;
410
- teal7Light: Variable<import("@tamagui/core").VariableValue>;
411
- teal8Light: Variable<import("@tamagui/core").VariableValue>;
412
- teal9Light: Variable<import("@tamagui/core").VariableValue>;
413
- teal10Light: Variable<import("@tamagui/core").VariableValue>;
414
- teal11Light: Variable<import("@tamagui/core").VariableValue>;
415
- teal12Light: Variable<import("@tamagui/core").VariableValue>;
416
296
  yellow1Light: Variable<import("@tamagui/core").VariableValue>;
417
297
  yellow2Light: Variable<import("@tamagui/core").VariableValue>;
418
298
  yellow3Light: Variable<import("@tamagui/core").VariableValue>;
@@ -425,18 +305,6 @@ export declare const tokens: {
425
305
  yellow10Light: Variable<import("@tamagui/core").VariableValue>;
426
306
  yellow11Light: Variable<import("@tamagui/core").VariableValue>;
427
307
  yellow12Light: Variable<import("@tamagui/core").VariableValue>;
428
- violet1Light: Variable<import("@tamagui/core").VariableValue>;
429
- violet2Light: Variable<import("@tamagui/core").VariableValue>;
430
- violet3Light: Variable<import("@tamagui/core").VariableValue>;
431
- violet4Light: Variable<import("@tamagui/core").VariableValue>;
432
- violet5Light: Variable<import("@tamagui/core").VariableValue>;
433
- violet6Light: Variable<import("@tamagui/core").VariableValue>;
434
- violet7Light: Variable<import("@tamagui/core").VariableValue>;
435
- violet8Light: Variable<import("@tamagui/core").VariableValue>;
436
- violet9Light: Variable<import("@tamagui/core").VariableValue>;
437
- violet10Light: Variable<import("@tamagui/core").VariableValue>;
438
- violet11Light: Variable<import("@tamagui/core").VariableValue>;
439
- violet12Light: Variable<import("@tamagui/core").VariableValue>;
440
308
  red1Light: Variable<import("@tamagui/core").VariableValue>;
441
309
  red2Light: Variable<import("@tamagui/core").VariableValue>;
442
310
  red3Light: Variable<import("@tamagui/core").VariableValue>;
@@ -497,18 +365,6 @@ export declare const tokens: {
497
365
  green10Light: Variable<import("@tamagui/core").VariableValue>;
498
366
  green11Light: Variable<import("@tamagui/core").VariableValue>;
499
367
  green12Light: Variable<import("@tamagui/core").VariableValue>;
500
- grayA1Light: Variable<import("@tamagui/core").VariableValue>;
501
- grayA2Light: Variable<import("@tamagui/core").VariableValue>;
502
- grayA3Light: Variable<import("@tamagui/core").VariableValue>;
503
- grayA4Light: Variable<import("@tamagui/core").VariableValue>;
504
- grayA5Light: Variable<import("@tamagui/core").VariableValue>;
505
- grayA6Light: Variable<import("@tamagui/core").VariableValue>;
506
- grayA7Light: Variable<import("@tamagui/core").VariableValue>;
507
- grayA8Light: Variable<import("@tamagui/core").VariableValue>;
508
- grayA9Light: Variable<import("@tamagui/core").VariableValue>;
509
- grayA10Light: Variable<import("@tamagui/core").VariableValue>;
510
- grayA11Light: Variable<import("@tamagui/core").VariableValue>;
511
- grayA12Light: Variable<import("@tamagui/core").VariableValue>;
512
368
  gray1Light: Variable<import("@tamagui/core").VariableValue>;
513
369
  gray2Light: Variable<import("@tamagui/core").VariableValue>;
514
370
  gray3Light: Variable<import("@tamagui/core").VariableValue>;
@@ -1,40 +0,0 @@
1
- import { getVariableValue } from "@tamagui/core";
2
- const hexToRGBA = (hex, alpha = 1) => {
3
- if (!isValidHex(hex)) {
4
- throw new Error("Invalid HEX");
5
- }
6
- const chunkSize = Math.floor((hex.length - 1) / 3);
7
- const hexArr = getChunksFromString(hex.slice(1), chunkSize);
8
- const [r, g, b, a] = hexArr?.map(convertHexUnitTo256) ?? [];
9
- return `rgba(${r}, ${g}, ${b}, ${getAlphaFloat(a, alpha)})`;
10
- };
11
- const setColorAlpha = (colorIn, alpha = 1) => {
12
- let color = `${getVariableValue(colorIn)}`;
13
- if (color.startsWith("hsl(")) {
14
- return color.replace("hsl", "hsla").replace(")", `, ${alpha})`);
15
- }
16
- if (color.startsWith("#")) {
17
- return hexToRGBA(color, alpha);
18
- }
19
- if (color.startsWith("rgb(")) {
20
- return color.replace("rgb", "rgba").replace(")", `, ${alpha})`);
21
- }
22
- return color;
23
- };
24
- const isValidHex = (hex) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
25
- const getChunksFromString = (st, chunkSize = 0) => st.match(new RegExp(`.{${chunkSize}}`, "g"));
26
- const convertHexUnitTo256 = (hexStr) => parseInt(hexStr.repeat(2 / hexStr.length), 16);
27
- const getAlphaFloat = (a, alpha = 1) => {
28
- if (a !== void 0) {
29
- return a / 255;
30
- }
31
- if (typeof alpha != "number" || alpha < 0 || alpha > 1) {
32
- return 1;
33
- }
34
- return alpha;
35
- };
36
- export {
37
- hexToRGBA,
38
- setColorAlpha
39
- };
40
- //# sourceMappingURL=colorUtils.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/colorUtils.tsx"],
4
- "sourcesContent": ["import { Variable, getVariableValue } from '@tamagui/core'\n\nexport const hexToRGBA = (hex: string, alpha = 1) => {\n if (!isValidHex(hex)) {\n throw new Error('Invalid HEX')\n }\n const chunkSize = Math.floor((hex.length - 1) / 3)\n const hexArr = getChunksFromString(hex.slice(1), chunkSize)\n const [r, g, b, a] = hexArr?.map(convertHexUnitTo256) ?? []\n return `rgba(${r}, ${g}, ${b}, ${getAlphaFloat(a, alpha)})`\n}\n\nexport const setColorAlpha = (colorIn: string | Variable, alpha = 1) => {\n let color = `${getVariableValue(colorIn)}`\n if (color.startsWith('hsl(')) {\n return color.replace('hsl', 'hsla').replace(')', `, ${alpha})`)\n }\n if (color.startsWith('#')) {\n return hexToRGBA(color, alpha)\n }\n if (color.startsWith('rgb(')) {\n return color.replace('rgb', 'rgba').replace(')', `, ${alpha})`)\n }\n return color\n}\n\nconst isValidHex = (hex: string) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex)\n\nconst getChunksFromString = (st: string, chunkSize = 0) =>\n st.match(new RegExp(`.{${chunkSize}}`, 'g'))\n\nconst convertHexUnitTo256 = (hexStr: string) => parseInt(hexStr.repeat(2 / hexStr.length), 16)\n\nconst getAlphaFloat = (a: any, alpha = 1) => {\n if (a !== undefined) {\n return a / 255\n }\n if (typeof alpha != 'number' || alpha < 0 || alpha > 1) {\n return 1\n }\n return alpha\n}\n"],
5
- "mappings": "AAAA;AAEO,MAAM,YAAY,CAAC,KAAa,QAAQ,MAAM;AACnD,MAAI,CAAC,WAAW,GAAG,GAAG;AACpB,UAAM,IAAI,MAAM,aAAa;AAAA,EAC/B;AACA,QAAM,YAAY,KAAK,MAAO,KAAI,SAAS,KAAK,CAAC;AACjD,QAAM,SAAS,oBAAoB,IAAI,MAAM,CAAC,GAAG,SAAS;AAC1D,QAAM,CAAC,GAAG,GAAG,GAAG,KAAK,QAAQ,IAAI,mBAAmB,KAAK,CAAC;AAC1D,SAAO,QAAQ,MAAM,MAAM,MAAM,cAAc,GAAG,KAAK;AACzD;AAEO,MAAM,gBAAgB,CAAC,SAA4B,QAAQ,MAAM;AACtE,MAAI,QAAQ,GAAG,iBAAiB,OAAO;AACvC,MAAI,MAAM,WAAW,MAAM,GAAG;AAC5B,WAAO,MAAM,QAAQ,OAAO,MAAM,EAAE,QAAQ,KAAK,KAAK,QAAQ;AAAA,EAChE;AACA,MAAI,MAAM,WAAW,GAAG,GAAG;AACzB,WAAO,UAAU,OAAO,KAAK;AAAA,EAC/B;AACA,MAAI,MAAM,WAAW,MAAM,GAAG;AAC5B,WAAO,MAAM,QAAQ,OAAO,MAAM,EAAE,QAAQ,KAAK,KAAK,QAAQ;AAAA,EAChE;AACA,SAAO;AACT;AAEA,MAAM,aAAa,CAAC,QAAgB,6BAA6B,KAAK,GAAG;AAEzE,MAAM,sBAAsB,CAAC,IAAY,YAAY,MACnD,GAAG,MAAM,IAAI,OAAO,KAAK,cAAc,GAAG,CAAC;AAE7C,MAAM,sBAAsB,CAAC,WAAmB,SAAS,OAAO,OAAO,IAAI,OAAO,MAAM,GAAG,EAAE;AAE7F,MAAM,gBAAgB,CAAC,GAAQ,QAAQ,MAAM;AAC3C,MAAI,MAAM,QAAW;AACnB,WAAO,IAAI;AAAA,EACb;AACA,MAAI,OAAO,SAAS,YAAY,QAAQ,KAAK,QAAQ,GAAG;AACtD,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
6
- "names": []
7
- }
package/dist/jsx/index.js DELETED
@@ -1,4 +0,0 @@
1
- export * from "./themes";
2
- export * from "./tokens";
3
- export * from "@tamagui/colors";
4
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.tsx"],
4
- "sourcesContent": ["export * from './themes'\nexport * from './tokens'\nexport * from '@tamagui/colors'\n"],
5
- "mappings": "AAAA;AACA;AACA;",
6
- "names": []
7
- }
@@ -1,307 +0,0 @@
1
- import { createTheme, getVariableValue, isWeb } from "@tamagui/core";
2
- import { setColorAlpha } from "./colorUtils";
3
- import { darkColors, lightColors, tokens } from "./tokens";
4
- const { color } = tokens;
5
- const alternates = [1, 2, 3, 4];
6
- const alts = [1, 2, 3];
7
- function createThemesFrom(name, getTheme, props) {
8
- const { shift = 0 } = props;
9
- const theme = getTheme(0 + shift, props);
10
- let themeEntries = [[name, theme]];
11
- const altThemes = alternates.map((alt) => [
12
- `${name}_alt${alt}`,
13
- getTheme(alt * 1 + shift, props)
14
- ]);
15
- const altThemes2 = alternates.map((alt) => [
16
- `${name}_alt${alt}`,
17
- getTheme(alt + shift, props)
18
- ]);
19
- const altButtonThemes = alternates.map((_, i) => {
20
- const [bName, bTheme] = [altThemes2[i][0], (altThemes2[i + 1] || altThemes2[i])[1]];
21
- return [`${bName}_Button`, bTheme];
22
- });
23
- const darkerTheme = getTheme(Math.max(0, shift + (props.isLight ? 1 : -1)), props);
24
- const activeTheme = props.activeTheme || {
25
- ...theme,
26
- borderColor: props.backgrounds[7],
27
- background: props.backgrounds[6],
28
- backgroundHover: props.backgrounds[6],
29
- backgroundPress: props.backgrounds[6]
30
- };
31
- const inverted = altThemes.map(([_name, theme2]) => {
32
- return {
33
- ...theme2,
34
- background: theme2.color,
35
- backgroundHover: theme2.colorHover,
36
- backgroundFocus: theme2.colorFocus,
37
- backgroundPress: theme2.colorPress,
38
- color: theme2.background,
39
- colorHover: theme2.backgroundHover,
40
- colorFocus: theme2.backgroundFocus,
41
- colorPress: theme2.backgroundPress
42
- };
43
- });
44
- themeEntries = [
45
- ...themeEntries,
46
- ...altThemes.slice(0, alts.length),
47
- ...altButtonThemes.slice(0, alts.length),
48
- [`${name}_Button`, altThemes2[1][1]],
49
- [`${name}_DrawerFrame`, altThemes2[1][1]],
50
- [`${name}_SliderTrack`, altThemes[2][1]],
51
- [`${name}_SliderTrackActive`, altThemes[3][1]],
52
- [`${name}_SliderThumb`, inverted[2]],
53
- [`${name}_Progress`, altThemes[2][1]],
54
- [`${name}_ProgressIndicator`, inverted[2]],
55
- [`${name}_Switch`, altThemes[0][1]],
56
- [`${name}_SwitchThumb`, inverted[2]],
57
- [`${name}_TooltipArrow`, altThemes[1][1]],
58
- [`${name}_TooltipContent`, altThemes[1][1]],
59
- [`${name}_darker`, darkerTheme],
60
- [`${name}_active`, activeTheme]
61
- ];
62
- const themes2 = Object.fromEntries(themeEntries);
63
- return themes2;
64
- }
65
- const themeCreator = (str = 1, {
66
- backgrounds,
67
- isLight = true,
68
- isBase = false,
69
- colors = [...backgrounds].reverse(),
70
- borderColors = isLight ? colors : backgrounds,
71
- backgroundStrong,
72
- offsets: offsetsProp
73
- }) => {
74
- const offsets = {
75
- borderColor: offsetsProp?.borderColor ?? offsetsProp?.background ?? [0, 0, 0, 0],
76
- background: offsetsProp?.background ?? [0, 0, 0, 0],
77
- color: offsetsProp?.color ?? [0, 0, 0, 0]
78
- };
79
- const darkColors2 = isLight ? colors : backgrounds;
80
- const lighterDir = isLight ? -1 : 1;
81
- const darkerDir = -lighterDir;
82
- const strongerDir = isLight ? darkerDir : lighterDir;
83
- const softerDir = -strongerDir;
84
- const get = (arr, index, name = "background") => {
85
- return arr[Math.max(0, Math.min(index + (offsets[name][str] || 0), arr.length - 1))];
86
- };
87
- const colorTranslucent = setColorAlpha(getVariableValue(get(colors, 0 + str, "color")), 0.5);
88
- const theme = {
89
- background: get(backgrounds, str),
90
- backgroundStrong: backgroundStrong || get(backgrounds, str + strongerDir * 2),
91
- backgroundSoft: get(backgrounds, str + softerDir * 2),
92
- backgroundHover: get(backgrounds, str + lighterDir),
93
- backgroundPress: get(backgrounds, str + darkerDir),
94
- backgroundFocus: get(backgrounds, str + darkerDir * 2),
95
- backgroundTransparent: color.grayA1Light,
96
- color: get(colors, 0 + str, "color"),
97
- colorHover: get(colors, 1 + str, "color"),
98
- colorPress: get(colors, 2 + str, "color"),
99
- colorFocus: get(colors, 3 + str, "color"),
100
- colorTranslucent,
101
- colorMid: (isLight ? colors : backgrounds)[Math.floor(colors.length / 2)],
102
- shadowColor: isLight ? color.grayA2Light : color.grayA8Light,
103
- shadowColorHover: darkColors2[!isLight ? 1 : 8],
104
- shadowColorPress: darkColors2[!isLight ? 1 : 8],
105
- shadowColorFocus: darkColors2[!isLight ? 1 : 8],
106
- borderColor: null,
107
- borderColorHover: null,
108
- borderColorPress: null,
109
- borderColorFocus: null
110
- };
111
- if (process.env.ENABLE_STEPS) {
112
- Object.assign(theme, {
113
- step1: backgrounds[0],
114
- step2: backgrounds[1],
115
- step3: backgrounds[2],
116
- step4: backgrounds[3],
117
- step5: backgrounds[4],
118
- step6: backgrounds[5],
119
- step7: backgrounds[6],
120
- step8: backgrounds[7],
121
- step9: backgrounds[8],
122
- step10: backgrounds[9],
123
- step11: backgrounds[10],
124
- step12: backgrounds[11]
125
- });
126
- }
127
- if (isBase) {
128
- Object.assign(theme, {
129
- borderColor: isLight ? get(colors, 8 - str, "borderColor") : get(backgrounds, 2 + str, "borderColor"),
130
- borderColorHover: isLight ? get(colors, 6 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
131
- borderColorPress: isLight ? get(colors, 5 - str, "borderColor") : get(backgrounds, 1 + str, "borderColor"),
132
- borderColorFocus: isLight ? get(colors, 4 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor")
133
- });
134
- } else {
135
- Object.assign(theme, {
136
- borderColor: get(borderColors, 1 + strongerDir, "borderColor"),
137
- borderColorHover: get(borderColors, 2 + strongerDir, "borderColor"),
138
- borderColorPress: get(borderColors, 3 + strongerDir, "borderColor"),
139
- borderColorFocus: get(borderColors, 4 + strongerDir, "borderColor")
140
- });
141
- }
142
- return theme;
143
- };
144
- const themeColors = {
145
- light: [
146
- "#fff",
147
- "#f4f4f4",
148
- color.gray1Light,
149
- color.gray2Light,
150
- color.gray3Light,
151
- color.gray4Light,
152
- color.gray5Light,
153
- color.gray6Light,
154
- color.gray7Light,
155
- color.gray8Light,
156
- color.gray9Light,
157
- color.gray10Light,
158
- color.gray11Light,
159
- color.gray12Light
160
- ],
161
- dark: [
162
- "#111111",
163
- "#151515",
164
- "#191919",
165
- "#232323",
166
- "#282828",
167
- "#323232",
168
- "#383838",
169
- "#424242",
170
- "#494949",
171
- "#545454",
172
- "#626262",
173
- "#777777"
174
- ]
175
- };
176
- const lightThemes = createThemesFrom("light", themeCreator, {
177
- backgrounds: themeColors.light,
178
- backgroundStrong: isWeb ? "#fefefe" : "#f2f2f2",
179
- borderColors: themeColors.light.slice(2),
180
- isLight: true,
181
- offsets: {
182
- background: [2, 2, 2, 2, 2, 2]
183
- }
184
- });
185
- const darkThemes = createThemesFrom("dark", themeCreator, {
186
- backgrounds: themeColors.dark,
187
- colors: themeColors.light.slice(2),
188
- backgroundStrong: "#070707",
189
- isBase: true,
190
- isLight: false,
191
- shift: 1,
192
- offsets: {
193
- color: [0, 4, 5, 5, 5, 5]
194
- }
195
- });
196
- darkThemes.dark_darker.background = "#030303";
197
- darkThemes.dark_darker.backgroundStrong = "#000";
198
- const light = createTheme({
199
- ...lightColors,
200
- ...lightThemes.light
201
- });
202
- const dark = createTheme({
203
- ...darkColors,
204
- ...darkThemes.dark
205
- });
206
- const baseThemes = {
207
- ...lightThemes,
208
- light,
209
- light_active: lightThemes.light,
210
- light_Card: lightThemes.light,
211
- light_SliderTrack: lightThemes.light_alt2,
212
- light_SliderTrackActive: lightThemes.light_alt3,
213
- light_Switch: lightThemes.light_alt3,
214
- light_SwitchThumb: lightThemes.light,
215
- light_DrawerFrame: lightThemes.light_alt1,
216
- ...darkThemes,
217
- dark,
218
- dark_active: darkThemes.dark,
219
- dark_Card: darkThemes.dark,
220
- dark_DrawerFrame: darkThemes.dark_alt2,
221
- dark_SliderTrack: darkThemes.dark_darker,
222
- dark_SliderTrackActive: darkThemes.dark_alt3,
223
- dark_Switch: darkThemes.dark_alt3,
224
- dark_SwitchThumb: darkThemes.dark_darker,
225
- dark_Button: darkThemes.dark_alt1
226
- };
227
- const darkEntries = Object.entries(dark);
228
- const lightEntries = Object.entries(light);
229
- function findColors(prefix, dark2 = false) {
230
- return Object.fromEntries((dark2 ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix)));
231
- }
232
- const colorSchemes = [
233
- { name: "blue", colors: findColors("blue"), darkColors: findColors("blue", true) },
234
- { name: "gray", colors: findColors("gray"), darkColors: findColors("gray", true) },
235
- { name: "green", colors: findColors("green"), darkColors: findColors("green", true) },
236
- { name: "orange", colors: findColors("orange"), darkColors: findColors("orange", true) },
237
- { name: "pink", colors: findColors("pink"), darkColors: findColors("pink", true) },
238
- { name: "purple", colors: findColors("purple"), darkColors: findColors("purple", true) },
239
- { name: "red", colors: findColors("red"), darkColors: findColors("red", true) },
240
- { name: "yellow", colors: findColors("yellow"), darkColors: findColors("yellow", true) },
241
- { name: "teal", colors: findColors("teal"), darkColors: findColors("teal", true) }
242
- ];
243
- const colorNames = [
244
- "blue",
245
- "gray",
246
- "green",
247
- "orange",
248
- "pink",
249
- "purple",
250
- "red",
251
- "yellow",
252
- "teal"
253
- ];
254
- const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: darkColors2 }) => {
255
- const [altLightThemes, altDarkThemes] = [
256
- { colors: darkColors2, backgrounds: colors },
257
- { colors, backgrounds: darkColors2 }
258
- ].map((props, i) => {
259
- const isLight = i === 0;
260
- const colorsBase = Object.values(props.colors).slice(2);
261
- const [backgrounds, colors2] = [
262
- Object.values(props.backgrounds),
263
- isLight ? colorsBase : [colorsBase[0], "#ccc", ...colorsBase.slice(1)]
264
- ];
265
- const scheme = isLight ? "light" : "dark";
266
- const shift = isLight ? 0 : 1;
267
- const themeWithAlts = createThemesFrom(name, themeCreator, {
268
- colors: colors2,
269
- backgrounds,
270
- borderColors: backgrounds,
271
- isLight,
272
- shift,
273
- isBase: false,
274
- offsets: {
275
- background: isLight ? [2, 2, 2, 2, 2, 2] : null,
276
- borderColor: isLight ? [2, 2, 2, 3, 2] : null,
277
- color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1]
278
- }
279
- });
280
- return Object.entries(themeWithAlts).map(([k, v]) => [`${scheme}_${k}`, v]);
281
- });
282
- return [...altLightThemes, ...altDarkThemes];
283
- });
284
- const colorThemes = Object.fromEntries(colorThemeEntries);
285
- baseThemes.dark_active = {
286
- ...colorThemes.dark_blue_alt3,
287
- background: darkColors.blue10,
288
- backgroundHover: darkColors.blue11,
289
- backgroundPress: darkColors.blue9,
290
- backgroundFocus: darkColors.blue9,
291
- color: darkColors.blue12,
292
- colorHover: darkColors.blue12,
293
- colorPress: darkColors.blue12,
294
- colorFocus: darkColors.blue12
295
- };
296
- baseThemes.light_active = baseThemes.dark_active;
297
- const allThemes = {
298
- ...baseThemes,
299
- ...colorThemes
300
- };
301
- const themes = allThemes;
302
- export {
303
- colorNames,
304
- colorSchemes,
305
- themes
306
- };
307
- //# sourceMappingURL=themes.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/themes.tsx"],
4
- "sourcesContent": ["import { Variable, createTheme, getVariableValue, isWeb } from '@tamagui/core'\n\nimport { setColorAlpha } from './colorUtils'\nimport { darkColors, lightColors, tokens } from './tokens'\n\nconst { color } = tokens\n\n// spaghetti ahead\n\ntype ThemeCreatorProps = {\n shift?: number\n backgrounds: (string | Variable)[]\n backgroundStrong?: string | Variable\n borderColors?: (string | Variable)[]\n colors?: (string | Variable)[]\n activeTheme?: any\n offsets?: {\n color?: number[] | null\n background?: number[] | null\n borderColor?: number[] | null\n }\n isLight?: boolean\n isBase?: boolean\n}\n\n// helpers\n\nconst alternates = [1, 2, 3, 4] as const\nconst alts = [1, 2, 3] as const\ntype AltKeys = 1 | 2 | 3\ntype AltName<Name extends string, Keys extends string | number> = `${Name}_alt${Keys}`\ntype ThemeCreator<A = any> = (str: number, props: ThemeCreatorProps) => A\n\ninterface SubTheme {\n background: Variable<any> | string\n backgroundStrong: Variable<any> | string\n backgroundSoft: Variable<any> | string\n backgroundHover: Variable<any> | string\n backgroundPress: Variable<any> | string\n backgroundFocus: Variable<any> | string\n backgroundTransparent: Variable<any> | string\n color: Variable<any> | string\n colorHover: Variable<any> | string\n colorPress: Variable<any> | string\n colorFocus: Variable<any> | string\n colorTranslucent: Variable<any> | string\n colorMid: Variable<any> | string\n shadowColor: Variable<any> | string\n shadowColorHover: Variable<any> | string\n shadowColorPress: Variable<any> | string\n shadowColorFocus: Variable<any> | string\n borderColor: Variable<any> | string\n borderColorHover: Variable<any> | string\n borderColorPress: Variable<any> | string\n borderColorFocus: Variable<any> | string\n}\n\nfunction createThemesFrom<Name extends string, GetTheme extends ThemeCreator = ThemeCreator>(\n name: Name,\n getTheme: GetTheme,\n props: ThemeCreatorProps\n): {\n [key in `${Name}_alt${AltKeys}` | `${Name}` | `${Name}_darker`]: GetTheme extends ThemeCreator<\n infer Theme\n >\n ? Theme\n : never\n} {\n const { shift = 0 } = props\n const theme = getTheme(0 + shift, props)\n let themeEntries: any[] = [[name, theme]]\n\n // generate alternates (for use in other themes), but keep just alts\n const altThemes: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt * 1 + shift, props),\n ])\n const altThemes2: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt + shift, props),\n ])\n const altButtonThemes: any[] = alternates.map((_, i) => {\n const [bName, bTheme] = [altThemes2[i][0], (altThemes2[i + 1] || altThemes2[i])[1]]\n return [`${bName}_Button` as any, bTheme]\n })\n // add these after alts since we rely on positioning\n const darkerTheme = getTheme(Math.max(0, shift + (props.isLight ? 1 : -1)), props)\n const activeTheme = props.activeTheme || {\n ...theme,\n borderColor: props.backgrounds[7],\n background: props.backgrounds[6],\n backgroundHover: props.backgrounds[6],\n backgroundPress: props.backgrounds[6],\n }\n\n // TODO can be de-duped\n const inverted = altThemes.map(([_name, theme]) => {\n return {\n ...theme,\n background: theme.color,\n backgroundHover: theme.colorHover,\n backgroundFocus: theme.colorFocus,\n backgroundPress: theme.colorPress,\n color: theme.background,\n colorHover: theme.backgroundHover,\n colorFocus: theme.backgroundFocus,\n colorPress: theme.backgroundPress,\n }\n })\n\n themeEntries = [\n ...themeEntries,\n // keep just alts\n ...altThemes.slice(0, alts.length),\n ...altButtonThemes.slice(0, alts.length),\n [`${name}_Button`, altThemes2[1][1]],\n [`${name}_DrawerFrame`, altThemes2[1][1]],\n [`${name}_SliderTrack`, altThemes[2][1]],\n [`${name}_SliderTrackActive`, altThemes[3][1]],\n [`${name}_SliderThumb`, inverted[2]],\n [`${name}_Progress`, altThemes[2][1]],\n [`${name}_ProgressIndicator`, inverted[2]],\n [`${name}_Switch`, altThemes[0][1]],\n [`${name}_SwitchThumb`, inverted[2]],\n [`${name}_TooltipArrow`, altThemes[1][1]],\n [`${name}_TooltipContent`, altThemes[1][1]],\n [`${name}_darker`, darkerTheme],\n [`${name}_active`, activeTheme],\n ]\n const themes = Object.fromEntries(themeEntries)\n // if (props.isLight) {\n // console.log('themes', themes)\n // }\n return themes as any\n}\n\nconst themeCreator = (\n str = 1,\n {\n backgrounds,\n isLight = true,\n isBase = false,\n colors = [...backgrounds].reverse(),\n borderColors = isLight ? colors : backgrounds,\n backgroundStrong,\n offsets: offsetsProp,\n }: ThemeCreatorProps\n) => {\n const offsets = {\n borderColor: offsetsProp?.borderColor ?? offsetsProp?.background ?? [0, 0, 0, 0],\n background: offsetsProp?.background ?? [0, 0, 0, 0],\n color: offsetsProp?.color ?? [0, 0, 0, 0],\n }\n const darkColors = isLight ? colors : backgrounds\n const lighterDir = isLight ? -1 : 1\n const darkerDir = -lighterDir\n const strongerDir = isLight ? darkerDir : lighterDir\n const softerDir = -strongerDir\n const get = (arr: any[], index: number, name = 'background') => {\n return arr[Math.max(0, Math.min(index + (offsets[name][str] || 0), arr.length - 1))]\n }\n\n const colorTranslucent = setColorAlpha(getVariableValue(get(colors, 0 + str, 'color')), 0.5)\n\n const theme: SubTheme = {\n background: get(backgrounds, str),\n backgroundStrong: backgroundStrong || get(backgrounds, str + strongerDir * 2),\n backgroundSoft: get(backgrounds, str + softerDir * 2),\n backgroundHover: get(backgrounds, str + lighterDir),\n backgroundPress: get(backgrounds, str + darkerDir),\n backgroundFocus: get(backgrounds, str + darkerDir * 2),\n backgroundTransparent: color.grayA1Light,\n color: get(colors, 0 + str, 'color'),\n colorHover: get(colors, 1 + str, 'color'),\n colorPress: get(colors, 2 + str, 'color'),\n colorFocus: get(colors, 3 + str, 'color'),\n colorTranslucent,\n colorMid: (isLight ? colors : backgrounds)[Math.floor(colors.length / 2)],\n shadowColor: isLight ? color.grayA2Light : color.grayA8Light,\n shadowColorHover: darkColors[!isLight ? 1 : 8],\n shadowColorPress: darkColors[!isLight ? 1 : 8],\n shadowColorFocus: darkColors[!isLight ? 1 : 8],\n borderColor: null as any as string | Variable,\n borderColorHover: null as any as string | Variable,\n borderColorPress: null as any as string | Variable,\n borderColorFocus: null as any as string | Variable,\n }\n\n if (process.env.ENABLE_STEPS) {\n Object.assign(theme, {\n step1: backgrounds[0],\n step2: backgrounds[1],\n step3: backgrounds[2],\n step4: backgrounds[3],\n step5: backgrounds[4],\n step6: backgrounds[5],\n step7: backgrounds[6],\n step8: backgrounds[7],\n step9: backgrounds[8],\n step10: backgrounds[9],\n step11: backgrounds[10],\n step12: backgrounds[11],\n })\n }\n\n if (isBase) {\n Object.assign(theme, {\n borderColor: isLight\n ? get(colors, 8 - str, 'borderColor')\n : get(backgrounds, 2 + str, 'borderColor'),\n borderColorHover: isLight\n ? get(colors, 6 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n borderColorPress: isLight\n ? get(colors, 5 - str, 'borderColor')\n : get(backgrounds, 1 + str, 'borderColor'),\n borderColorFocus: isLight\n ? get(colors, 4 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n })\n } else {\n Object.assign(theme, {\n borderColor: get(borderColors, 1 + strongerDir, 'borderColor'),\n borderColorHover: get(borderColors, 2 + strongerDir, 'borderColor'),\n borderColorPress: get(borderColors, 3 + strongerDir, 'borderColor'),\n borderColorFocus: get(borderColors, 4 + strongerDir, 'borderColor'),\n })\n }\n\n return theme\n}\n\nconst themeColors = {\n light: [\n '#fff',\n '#f4f4f4',\n color.gray1Light,\n color.gray2Light,\n color.gray3Light,\n color.gray4Light,\n color.gray5Light,\n color.gray6Light,\n color.gray7Light,\n color.gray8Light,\n color.gray9Light,\n color.gray10Light,\n color.gray11Light,\n color.gray12Light,\n ],\n dark: [\n '#111111',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#383838',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#777777',\n ],\n}\n\nconst lightThemes = createThemesFrom('light', themeCreator, {\n backgrounds: themeColors.light,\n // for now web non-ios style native is...\n backgroundStrong: isWeb ? '#fefefe' : '#f2f2f2',\n borderColors: themeColors.light.slice(2),\n isLight: true,\n offsets: {\n background: [2, 2, 2, 2, 2, 2],\n },\n})\n\nconst darkThemes = createThemesFrom('dark', themeCreator, {\n backgrounds: themeColors.dark,\n colors: themeColors.light.slice(2),\n backgroundStrong: '#070707',\n isBase: true,\n isLight: false,\n shift: 1,\n offsets: {\n color: [0, 4, 5, 5, 5, 5],\n },\n})\n\ndarkThemes.dark_darker.background = '#030303'\ndarkThemes.dark_darker.backgroundStrong = '#000'\n\ntype BaseTheme = {\n [key in keyof typeof lightColors | keyof SubTheme]: Variable<string>\n}\n\nconst light = createTheme({\n ...lightColors,\n ...lightThemes.light,\n}) as BaseTheme\n\nconst dark = createTheme({\n ...darkColors,\n ...darkThemes.dark,\n}) as BaseTheme\n\nconst baseThemes = {\n // light\n ...lightThemes,\n light,\n // reserving in types, updating later\n light_active: lightThemes.light,\n light_Card: lightThemes.light,\n light_SliderTrack: lightThemes.light_alt2,\n light_SliderTrackActive: lightThemes.light_alt3,\n light_Switch: lightThemes.light_alt3,\n light_SwitchThumb: lightThemes.light,\n light_DrawerFrame: lightThemes.light_alt1,\n\n // dark\n ...darkThemes,\n dark,\n // reserving in types, updating later\n dark_active: darkThemes.dark,\n dark_Card: darkThemes.dark,\n dark_DrawerFrame: darkThemes.dark_alt2,\n dark_SliderTrack: darkThemes.dark_darker,\n dark_SliderTrackActive: darkThemes.dark_alt3,\n dark_Switch: darkThemes.dark_alt3,\n dark_SwitchThumb: darkThemes.dark_darker,\n dark_Button: darkThemes.dark_alt1,\n}\n\nconst darkEntries = Object.entries(dark)\nconst lightEntries = Object.entries(light)\nfunction findColors(prefix: string, dark = false): BaseTheme {\n return Object.fromEntries(\n (dark ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix))\n ) as any\n}\n\nexport const colorSchemes = [\n { name: 'blue', colors: findColors('blue'), darkColors: findColors('blue', true) },\n { name: 'gray', colors: findColors('gray'), darkColors: findColors('gray', true) },\n { name: 'green', colors: findColors('green'), darkColors: findColors('green', true) },\n { name: 'orange', colors: findColors('orange'), darkColors: findColors('orange', true) },\n { name: 'pink', colors: findColors('pink'), darkColors: findColors('pink', true) },\n { name: 'purple', colors: findColors('purple'), darkColors: findColors('purple', true) },\n { name: 'red', colors: findColors('red'), darkColors: findColors('red', true) },\n { name: 'yellow', colors: findColors('yellow'), darkColors: findColors('yellow', true) },\n { name: 'teal', colors: findColors('teal'), darkColors: findColors('teal', true) },\n] as const\n\nexport type ColorNames = typeof colorSchemes[number]['name']\n\n// nice and flat\nexport const colorNames: ColorNames[] = [\n 'blue',\n 'gray',\n 'green',\n 'orange',\n 'pink',\n 'purple',\n 'red',\n 'yellow',\n 'teal',\n]\n\ntype ColorThemeNames =\n | ColorNames\n | AltName<`light_${ColorNames}`, AltKeys>\n | AltName<`dark_${ColorNames}`, AltKeys>\n\nconst colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) => {\n const [altLightThemes, altDarkThemes] = [\n { colors: darkColors, backgrounds: colors },\n { colors, backgrounds: darkColors },\n ].map((props, i) => {\n const isLight = i === 0\n const colorsBase = Object.values(props.colors).slice(2)\n const [backgrounds, colors] = [\n Object.values(props.backgrounds),\n isLight ? colorsBase : [colorsBase[0], '#ccc', ...colorsBase.slice(1)],\n ] as const\n\n const scheme = isLight ? 'light' : 'dark'\n const shift = isLight ? 0 : 1\n\n // if (!isLight) {\n // const [_, h, sp, lp] = backgrounds[0].match(/hsl\\(([0-9\\.]+), ([0-9\\.]+)\\%, ([0-9\\.]+)\\%\\)/)!\n // backgrounds.unshift(`hsl(${h}, ${sp}%, ${parseFloat(lp) / 2}%)`)\n // }\n\n const themeWithAlts = createThemesFrom(name, themeCreator, {\n // @ts-ignore\n colors,\n // @ts-ignore\n backgrounds,\n // @ts-ignore\n borderColors: backgrounds,\n isLight,\n shift,\n isBase: false,\n offsets: {\n background: isLight ? [2, 2, 2, 2, 2, 2] : null,\n borderColor: isLight ? [2, 2, 2, 3, 2] : null,\n color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1],\n },\n })\n\n return Object.entries(themeWithAlts).map(([k, v]) => [`${scheme}_${k}`, v])\n })\n return [...altLightThemes, ...altDarkThemes]\n})\n\ntype TypedColorTheme = typeof lightThemes.light_alt1\ntype TypedTheme = typeof light\ntype TypedThemes = {\n [key in keyof typeof allThemes]: TypedTheme\n}\n\nconst colorThemes: {\n [key in ColorThemeNames]: TypedColorTheme\n} = Object.fromEntries(colorThemeEntries) as any\n\n// add in base _active themes\nbaseThemes.dark_active = {\n ...colorThemes.dark_blue_alt3,\n background: darkColors.blue10,\n backgroundHover: darkColors.blue11,\n backgroundPress: darkColors.blue9,\n backgroundFocus: darkColors.blue9,\n color: darkColors.blue12,\n colorHover: darkColors.blue12,\n colorPress: darkColors.blue12,\n colorFocus: darkColors.blue12,\n}\n\n// light active uses light foregound, ios style\nbaseThemes.light_active = baseThemes.dark_active\n\nconst allThemes = {\n ...baseThemes,\n ...colorThemes,\n} as const\n\nexport const themes: TypedThemes = allThemes as any\n"],
5
- "mappings": "AAAA;AAEA;AACA;AAEA,MAAM,EAAE,UAAU;AAsBlB,MAAM,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;AAC9B,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC;AA6BrB,0BACE,MACA,UACA,OAOA;AACA,QAAM,EAAE,QAAQ,MAAM;AACtB,QAAM,QAAQ,SAAS,IAAI,OAAO,KAAK;AACvC,MAAI,eAAsB,CAAC,CAAC,MAAM,KAAK,CAAC;AAGxC,QAAM,YAAmB,WAAW,IAAI,CAAC,QAAQ;AAAA,IAC/C,GAAG,WAAW;AAAA,IACd,SAAS,MAAM,IAAI,OAAO,KAAK;AAAA,EACjC,CAAC;AACD,QAAM,aA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