@tamagui/tamagui-dev-config 2.7.7 → 3.0.0-beta.643.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.
@@ -1,90 +1,55 @@
1
- const demoMedia = [500, 620, 780, 900];
2
- const widths = [660, 800, 1020, 1280];
1
+ const demoMedia = [
2
+ 500,
3
+ 620,
4
+ 780,
5
+ 900
6
+ ];
7
+ const widths = [
8
+ 660,
9
+ 800,
10
+ 1020,
11
+ 1280
12
+ ];
3
13
  const breakpoints = {
4
- "2xl": 1536,
5
- xl: 1280,
6
- lg: 1024,
7
- md: 768,
8
- sm: 640,
9
- xs: 460,
10
- "2xs": 340
14
+ "2xl": 1536,
15
+ xl: 1280,
16
+ lg: 1024,
17
+ md: 768,
18
+ sm: 640,
19
+ xs: 460,
20
+ "2xs": 340
11
21
  };
12
22
  const media = {
13
- // v4 Config
14
- maxXs: {
15
- maxWidth: breakpoints.xs
16
- },
17
- max2xs: {
18
- maxWidth: breakpoints["2xs"]
19
- },
20
- maxSm: {
21
- maxWidth: breakpoints.sm
22
- },
23
- maxMd: {
24
- maxWidth: breakpoints.md
25
- },
26
- maxLg: {
27
- maxWidth: breakpoints.lg
28
- },
29
- maxXl: {
30
- maxWidth: breakpoints.xl
31
- },
32
- max2Xl: {
33
- maxWidth: breakpoints["2xl"]
34
- },
35
- // for site
36
- xl: {
37
- maxWidth: 1650
38
- },
39
- // between lg and xl - for studio usage
40
- lg_xl: {
41
- maxWidth: 1400
42
- },
43
- lg: {
44
- maxWidth: 1280
45
- },
46
- md: {
47
- maxWidth: 1020
48
- },
49
- sm: {
50
- maxWidth: 800
51
- },
52
- xs: {
53
- maxWidth: 660
54
- },
55
- xxs: {
56
- maxWidth: 390
57
- },
58
- gtXxs: {
59
- minWidth: 390 + 1
60
- },
61
- gtXs: {
62
- minWidth: 660 + 1
63
- },
64
- gtSm: {
65
- minWidth: 800 + 1
66
- },
67
- gtMd: {
68
- minWidth: 1020 + 1
69
- },
70
- gtLg: {
71
- minWidth: 1280 + 1
72
- },
73
- gtXl: {
74
- minWidth: 1650 + 1
75
- },
76
- pointerFine: {
77
- pointer: "fine"
78
- }
23
+ "max-xs": { maxWidth: breakpoints.xs },
24
+ "max-2xs": { maxWidth: breakpoints["2xs"] },
25
+ "max-sm": { maxWidth: breakpoints.sm },
26
+ "max-md": { maxWidth: breakpoints.md },
27
+ "max-lg": { maxWidth: breakpoints.lg },
28
+ "max-xl": { maxWidth: breakpoints.xl },
29
+ "max-2xl": { maxWidth: breakpoints["2xl"] },
30
+ xl: { maxWidth: 1650 },
31
+ lg_xl: { maxWidth: 1400 },
32
+ lg: { maxWidth: 1280 },
33
+ md: { maxWidth: 1020 },
34
+ sm: { maxWidth: 800 },
35
+ xs: { maxWidth: 660 },
36
+ xxs: { maxWidth: 390 },
37
+ gtXxs: { minWidth: 390 + 1 },
38
+ gtXs: { minWidth: 660 + 1 },
39
+ gtSm: { minWidth: 800 + 1 },
40
+ gtMd: { minWidth: 1020 + 1 },
41
+ gtLg: { minWidth: 1280 + 1 },
42
+ gtXl: { minWidth: 1650 + 1 },
43
+ pointerFine: { pointer: "fine" }
79
44
  };
80
45
  const mediaQueryDefaultActive = {
81
- xl: true,
82
- lg: true,
83
- md: true,
84
- sm: true,
85
- xs: true,
86
- // false
87
- xxs: false
46
+ xl: true,
47
+ lg: true,
48
+ md: true,
49
+ sm: true,
50
+ xs: true,
51
+ xxs: false
88
52
  };
53
+
89
54
  export { demoMedia, media, mediaQueryDefaultActive, widths };
90
55
  //# sourceMappingURL=media.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["demoMedia","widths","breakpoints","xl","lg","md","sm","xs","media","maxXs","maxWidth","max2xs","maxSm","maxMd","maxLg","maxXl","max2Xl","lg_xl","xxs","gtXxs","minWidth","gtXs","gtSm","gtMd","gtLg","gtXl","pointerFine","pointer","mediaQueryDefaultActive"],"sources":["../../src/media.ts"],"sourcesContent":[null],"mappings":"AAAO,MAAMA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;EAC3BI,IAAA,EAAM;IAAEJ,QAAA,EAAU,OAAO;EAAE;EAC3BK,IAAA,EAAM;IAAEL,QAAA,EAAU,OAAO;EAAE;EAC3BM,WAAA,EAAa;IAAEC,OAAA,EAAS;EAAO;AACjC;AAIO,MAAMC,uBAAA,GAA0B;EACrCzB,EAAA,EAAI;EACJC,EAAA,EAAI;EACJC,EAAA,EAAI;EACJC,EAAA,EAAI;EACJC,EAAA,EAAI;EAAA;EAEJW,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"media.js","names":[],"sources":["esm/media.js"],"sourcesContent":["const demoMedia = [500, 620, 780, 900];\nconst widths = [660, 800, 1020, 1280];\nconst breakpoints = {\n \"2xl\": 1536,\n xl: 1280,\n lg: 1024,\n md: 768,\n sm: 640,\n xs: 460,\n \"2xs\": 340\n};\nconst media = {\n // v4 Config\n \"max-xs\": { maxWidth: breakpoints.xs },\n \"max-2xs\": { maxWidth: breakpoints[\"2xs\"] },\n \"max-sm\": { maxWidth: breakpoints.sm },\n \"max-md\": { maxWidth: breakpoints.md },\n \"max-lg\": { maxWidth: breakpoints.lg },\n \"max-xl\": { maxWidth: breakpoints.xl },\n \"max-2xl\": { maxWidth: breakpoints[\"2xl\"] },\n // for site\n xl: { maxWidth: 1650 },\n // between lg and xl - for studio usage\n lg_xl: { maxWidth: 1400 },\n lg: { maxWidth: 1280 },\n md: { maxWidth: 1020 },\n sm: { maxWidth: 800 },\n xs: { maxWidth: 660 },\n xxs: { maxWidth: 390 },\n gtXxs: { minWidth: 390 + 1 },\n gtXs: { minWidth: 660 + 1 },\n gtSm: { minWidth: 800 + 1 },\n gtMd: { minWidth: 1020 + 1 },\n gtLg: { minWidth: 1280 + 1 },\n gtXl: { minWidth: 1650 + 1 },\n pointerFine: { pointer: \"fine\" }\n};\nconst mediaQueryDefaultActive = {\n xl: true,\n lg: true,\n md: true,\n sm: true,\n xs: true,\n // false\n xxs: false\n};\nexport {\n demoMedia,\n media,\n mediaQueryDefaultActive,\n widths\n};\n//# sourceMappingURL=media.js.map\n"],"mappings":";AAAA,MAAM,YAAY;CAAC;CAAK;CAAK;CAAK;AAAG;AACrC,MAAM,SAAS;CAAC;CAAK;CAAK;CAAM;AAAI;AACpC,MAAM,cAAc;CAClB,OAAO;CACP,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;AACT;AACA,MAAM,QAAQ;CAEZ,UAAU,EAAE,UAAU,YAAY,GAAG;CACrC,WAAW,EAAE,UAAU,YAAY,OAAO;CAC1C,UAAU,EAAE,UAAU,YAAY,GAAG;CACrC,UAAU,EAAE,UAAU,YAAY,GAAG;CACrC,UAAU,EAAE,UAAU,YAAY,GAAG;CACrC,UAAU,EAAE,UAAU,YAAY,GAAG;CACrC,WAAW,EAAE,UAAU,YAAY,OAAO;CAE1C,IAAI,EAAE,UAAU,KAAK;CAErB,OAAO,EAAE,UAAU,KAAK;CACxB,IAAI,EAAE,UAAU,KAAK;CACrB,IAAI,EAAE,UAAU,KAAK;CACrB,IAAI,EAAE,UAAU,IAAI;CACpB,IAAI,EAAE,UAAU,IAAI;CACpB,KAAK,EAAE,UAAU,IAAI;CACrB,OAAO,EAAE,UAAU,MAAM,EAAE;CAC3B,MAAM,EAAE,UAAU,MAAM,EAAE;CAC1B,MAAM,EAAE,UAAU,MAAM,EAAE;CAC1B,MAAM,EAAE,UAAU,OAAO,EAAE;CAC3B,MAAM,EAAE,UAAU,OAAO,EAAE;CAC3B,MAAM,EAAE,UAAU,OAAO,EAAE;CAC3B,aAAa,EAAE,SAAS,OAAO;AACjC;AACA,MAAM,0BAA0B;CAC9B,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CAEJ,KAAK;AACP"}
@@ -1,79 +1,48 @@
1
- import { animationsCSS } from "@tamagui/config/v5-css";
2
- import { animationsMotion } from "@tamagui/config/v5-motion";
3
- import { createV5Theme, defaultConfig, subtleChildrenThemes } from "@tamagui/config/v5-subtle";
1
+ import { animationsCSS } from "@tamagui/config/animations-css";
2
+ import { animationsMotion } from "@tamagui/config/animations-motion";
3
+ import { defaultConfig } from "@tamagui/config/v5-subtle";
4
4
  import { setupDev } from "@tamagui/core";
5
5
  import { bodyFont, cherryBombFont, headingFont, monoFont, silkscreenFont } from "./fonts.mjs";
6
6
  import { media, mediaQueryDefaultActive } from "./media.mjs";
7
- const {
8
- gray,
9
- blue,
10
- red,
11
- yellow,
12
- green
13
- } = subtleChildrenThemes;
14
- const themes = createV5Theme({
15
- childrenThemes: {
16
- gray,
17
- blue,
18
- red,
19
- yellow,
20
- green
21
- }
22
- });
23
- setupDev({
24
- visualizer: true
25
- });
7
+ import { clientThemes } from "./themeMetadata.mjs";
8
+ import { themes } from "./themes.mjs";
9
+
10
+ setupDev({ visualizer: true });
26
11
  const fonts = {
27
- heading: headingFont,
28
- body: bodyFont,
29
- mono: monoFont,
30
- silkscreen: silkscreenFont,
31
- cherryBomb: cherryBombFont
12
+ heading: headingFont,
13
+ body: bodyFont,
14
+ mono: monoFont,
15
+ silkscreen: silkscreenFont,
16
+ cherryBomb: cherryBombFont
32
17
  };
33
18
  const animations = {
34
- default: animationsMotion,
35
- css: animationsCSS
19
+ default: animationsMotion,
20
+ css: animationsCSS
36
21
  };
22
+ const configuredThemes = process.env.VITE_ENVIRONMENT === "client" ? clientThemes : themes;
37
23
  const config = {
38
- ...defaultConfig,
39
- themes: process.env.VITE_ENVIRONMENT === "client" ? {} : themes,
40
- fonts,
41
- animations,
42
- media,
43
- settings: {
44
- ...defaultConfig.settings,
45
- mediaQueryDefaultActive,
46
- allowedStyleValues: "somewhat-strict-web",
47
- autocompleteSpecificTokens: "except-special",
48
- // Allow both shorthands and longhand names for flexibility
49
- onlyAllowShorthands: false
50
- }
24
+ ...defaultConfig,
25
+ themes: configuredThemes,
26
+ fonts,
27
+ animations,
28
+ media,
29
+ settings: {
30
+ ...defaultConfig.settings,
31
+ mediaQueryDefaultActive,
32
+ allowedStyleValues: "somewhat-strict-web",
33
+ onlyAllowShorthands: false
34
+ }
51
35
  };
52
36
  Object.assign(config.media, {
53
- tiny: {
54
- maxWidth: 500
55
- },
56
- gtTiny: {
57
- minWidth: 500 + 1
58
- },
59
- small: {
60
- maxWidth: 620
61
- },
62
- gtSmall: {
63
- minWidth: 620 + 1
64
- },
65
- medium: {
66
- maxWidth: 780
67
- },
68
- gtMedium: {
69
- minWidth: 780 + 1
70
- },
71
- large: {
72
- maxWidth: 900
73
- },
74
- gtLarge: {
75
- minWidth: 900 + 1
76
- }
37
+ tiny: { maxWidth: 500 },
38
+ gtTiny: { minWidth: 500 + 1 },
39
+ small: { maxWidth: 620 },
40
+ gtSmall: { minWidth: 620 + 1 },
41
+ medium: { maxWidth: 780 },
42
+ gtMedium: { minWidth: 780 + 1 },
43
+ large: { maxWidth: 900 },
44
+ gtLarge: { minWidth: 900 + 1 }
77
45
  });
46
+
78
47
  export { animations, config };
79
48
  //# sourceMappingURL=tamagui.dev.config.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["animationsCSS","animationsMotion","createV5Theme","defaultConfig","subtleChildrenThemes","setupDev","bodyFont","cherryBombFont","headingFont","monoFont","silkscreenFont","media","mediaQueryDefaultActive","gray","blue","red","yellow","green","themes","childrenThemes","visualizer","fonts","heading","body","mono","silkscreen","cherryBomb","animations","default","css","config","process","env","VITE_ENVIRONMENT","settings","allowedStyleValues","autocompleteSpecificTokens","onlyAllowShorthands","Object","assign","tiny","maxWidth","gtTiny","minWidth","small","gtSmall","medium","gtMedium","large","gtLarge"],"sources":["../../src/tamagui.dev.config.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,aAAA,QAAqB;AAC9B,SAASC,gBAAA,QAAwB;AACjC,SACEC,aAAA,EACAC,aAAA,EACAC,oBAAA,QACK;AAcP,SAASC,QAAA,QAAgB;AACzB,SAASC,QAAA,EAAUC,cAAA,EAAgBC,WAAA,EAAaC,QAAA,EAAUC,cAAA,QAAsB;AAChF,SAASC,KA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,KAAA,EAAO;IAAEP,QAAA,EAAU;EAAI;EACvBQ,OAAA,EAAS;IAAEN,QAAA,EAAU,MAAM;EAAE;AAC/B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"tamagui.dev.config.js","names":[],"sources":["esm/tamagui.dev.config.js"],"sourcesContent":["import { animationsCSS } from \"@tamagui/config/animations-css\";\nimport { animationsMotion } from \"@tamagui/config/animations-motion\";\nimport { defaultConfig } from \"@tamagui/config/v5-subtle\";\nimport { setupDev } from \"@tamagui/core\";\nimport { bodyFont, cherryBombFont, headingFont, monoFont, silkscreenFont } from \"./fonts\";\nimport { media, mediaQueryDefaultActive } from \"./media\";\nimport { clientThemes } from \"./themeMetadata\";\nimport { themes } from \"./themes\";\nsetupDev({\n visualizer: true\n});\nconst fonts = {\n heading: headingFont,\n body: bodyFont,\n mono: monoFont,\n silkscreen: silkscreenFont,\n cherryBomb: cherryBombFont\n};\nconst animations = {\n default: animationsMotion,\n css: animationsCSS\n};\nconst configuredThemes = process.env.VITE_ENVIRONMENT === \"client\" ? clientThemes : themes;\nconst config = {\n ...defaultConfig,\n themes: configuredThemes,\n fonts,\n animations,\n media,\n settings: {\n ...defaultConfig.settings,\n mediaQueryDefaultActive,\n allowedStyleValues: \"somewhat-strict-web\",\n // allow both shorthands and longhand names for flexibility\n onlyAllowShorthands: false\n }\n};\nObject.assign(config.media, {\n tiny: { maxWidth: 500 },\n gtTiny: { minWidth: 500 + 1 },\n small: { maxWidth: 620 },\n gtSmall: { minWidth: 620 + 1 },\n medium: { maxWidth: 780 },\n gtMedium: { minWidth: 780 + 1 },\n large: { maxWidth: 900 },\n gtLarge: { minWidth: 900 + 1 }\n});\nexport {\n animations,\n config\n};\n//# sourceMappingURL=tamagui.dev.config.js.map\n"],"mappings":";;;;;;;;;;AAQA,SAAS,EACP,YAAY,KACd,CAAC;AACD,MAAM,QAAQ;CACZ,SAAS;CACT,MAAM;CACN,MAAM;CACN,YAAY;CACZ,YAAY;AACd;AACA,MAAM,aAAa;CACjB,SAAS;CACT,KAAK;AACP;AACA,MAAM,mBAAmB,QAAQ,IAAI,qBAAqB,WAAW,eAAe;AACpF,MAAM,SAAS;CACb,GAAG;CACH,QAAQ;CACR;CACA;CACA;CACA,UAAU;EACR,GAAG,cAAc;EACjB;EACA,oBAAoB;EAEpB,qBAAqB;CACvB;AACF;AACA,OAAO,OAAO,OAAO,OAAO;CAC1B,MAAM,EAAE,UAAU,IAAI;CACtB,QAAQ,EAAE,UAAU,MAAM,EAAE;CAC5B,OAAO,EAAE,UAAU,IAAI;CACvB,SAAS,EAAE,UAAU,MAAM,EAAE;CAC7B,QAAQ,EAAE,UAAU,IAAI;CACxB,UAAU,EAAE,UAAU,MAAM,EAAE;CAC9B,OAAO,EAAE,UAAU,IAAI;CACvB,SAAS,EAAE,UAAU,MAAM,EAAE;AAC/B,CAAC"}
@@ -0,0 +1,109 @@
1
+ const schemes = ["light", "dark"];
2
+ const colors = [
3
+ "black",
4
+ "white",
5
+ "gray",
6
+ "blue",
7
+ "red",
8
+ "yellow",
9
+ "green"
10
+ ];
11
+ const paletteColors = [
12
+ "blue",
13
+ "gray",
14
+ "green",
15
+ "neutral",
16
+ "orange",
17
+ "pink",
18
+ "purple",
19
+ "red",
20
+ "teal",
21
+ "yellow"
22
+ ];
23
+ const componentThemes = [
24
+ "Button",
25
+ "Input",
26
+ "Progress",
27
+ "ProgressIndicator",
28
+ "Slider",
29
+ "SliderActive",
30
+ "SliderThumb",
31
+ "Switch",
32
+ "TextArea",
33
+ "Tooltip",
34
+ "SwitchThumb"
35
+ ];
36
+ const numbered = (prefix, count) => Array.from({ length: count }, (_, index) => `${prefix}${index + 1}`);
37
+ const baseThemeNames = schemes.flatMap((scheme) => [
38
+ scheme,
39
+ `${scheme}_accent`,
40
+ `${scheme}_surface1`,
41
+ `${scheme}_surface2`,
42
+ ...colors.flatMap((color) => [
43
+ `${scheme}_${color}`,
44
+ `${scheme}_${color}_accent`,
45
+ `${scheme}_${color}_surface1`,
46
+ `${scheme}_${color}_surface2`
47
+ ])
48
+ ]);
49
+ const levelThemeNames = baseThemeNames.flatMap((themeName) => themeName.endsWith("_surface1") ? [themeName.replace(/_surface1$/, "_level2")] : themeName.endsWith("_surface2") ? [themeName.replace(/_surface2$/, "_level3")] : []);
50
+ const componentThemeNames = [...baseThemeNames, ...levelThemeNames].flatMap((parent) => componentThemes.map((component) => `${parent}_${component}`));
51
+ const themeNames = [
52
+ ...baseThemeNames,
53
+ ...levelThemeNames,
54
+ ...componentThemeNames
55
+ ];
56
+ const alphaSteps = [
57
+ "0",
58
+ "01",
59
+ "02",
60
+ "04",
61
+ "06",
62
+ "08",
63
+ "001",
64
+ "002",
65
+ "0025",
66
+ "005",
67
+ "0075"
68
+ ];
69
+ const themeVariableNames = [
70
+ "accent-background",
71
+ "accent-color",
72
+ ...numbered("accent", 12),
73
+ "background",
74
+ "background-focus",
75
+ "background-hover",
76
+ "background-press",
77
+ ...alphaSteps.map((step) => `background${step}`),
78
+ "border-color",
79
+ "border-color-focus",
80
+ "border-color-hover",
81
+ "border-color-press",
82
+ "color",
83
+ "color-focus",
84
+ "color-hover",
85
+ "color-press",
86
+ "color-transparent",
87
+ ...alphaSteps.map((step) => `color${step}`),
88
+ ...numbered("color", 12),
89
+ "outline-color",
90
+ "placeholder-color",
91
+ "shadow-color",
92
+ ...["black", "white"].flatMap((color) => [
93
+ color,
94
+ `${color}0`,
95
+ `${color}02`,
96
+ `${color}04`,
97
+ `${color}06`,
98
+ `${color}08`,
99
+ ...numbered(color, 12)
100
+ ]),
101
+ ...paletteColors.flatMap((color) => numbered(color, 12)),
102
+ ...numbered("highlight", 8),
103
+ ...numbered("shadow", 8)
104
+ ];
105
+ const variableShape = Object.fromEntries(themeVariableNames.map((name) => [name, `var(--${name})`]));
106
+ const clientThemes = Object.fromEntries(themeNames.map((name) => [name, variableShape]));
107
+
108
+ export { clientThemes, componentThemes, themeNames, themeVariableNames };
109
+ //# sourceMappingURL=themeMetadata.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeMetadata.js","names":[],"sources":["esm/themeMetadata.js"],"sourcesContent":["const schemes = [\"light\", \"dark\"];\nconst colors = [\"black\", \"white\", \"gray\", \"blue\", \"red\", \"yellow\", \"green\"];\nconst paletteColors = [\n \"blue\",\n \"gray\",\n \"green\",\n \"neutral\",\n \"orange\",\n \"pink\",\n \"purple\",\n \"red\",\n \"teal\",\n \"yellow\"\n];\nconst componentThemes = [\n \"Button\",\n \"Input\",\n \"Progress\",\n \"ProgressIndicator\",\n \"Slider\",\n \"SliderActive\",\n \"SliderThumb\",\n \"Switch\",\n \"TextArea\",\n \"Tooltip\",\n \"SwitchThumb\"\n];\nconst numbered = (prefix, count) => Array.from({ length: count }, (_, index) => `${prefix}${index + 1}`);\nconst baseThemeNames = schemes.flatMap((scheme) => [\n scheme,\n `${scheme}_accent`,\n `${scheme}_surface1`,\n `${scheme}_surface2`,\n ...colors.flatMap((color) => [\n `${scheme}_${color}`,\n `${scheme}_${color}_accent`,\n `${scheme}_${color}_surface1`,\n `${scheme}_${color}_surface2`\n ])\n]);\nconst levelThemeNames = baseThemeNames.flatMap(\n (themeName) => themeName.endsWith(\"_surface1\") ? [themeName.replace(/_surface1$/, \"_level2\")] : themeName.endsWith(\"_surface2\") ? [themeName.replace(/_surface2$/, \"_level3\")] : []\n);\nconst componentThemeNames = [...baseThemeNames, ...levelThemeNames].flatMap(\n (parent) => componentThemes.map((component) => `${parent}_${component}`)\n);\nconst themeNames = [...baseThemeNames, ...levelThemeNames, ...componentThemeNames];\nconst alphaSteps = [\n \"0\",\n \"01\",\n \"02\",\n \"04\",\n \"06\",\n \"08\",\n \"001\",\n \"002\",\n \"0025\",\n \"005\",\n \"0075\"\n];\nconst themeVariableNames = [\n \"accent-background\",\n \"accent-color\",\n ...numbered(\"accent\", 12),\n \"background\",\n \"background-focus\",\n \"background-hover\",\n \"background-press\",\n ...alphaSteps.map((step) => `background${step}`),\n \"border-color\",\n \"border-color-focus\",\n \"border-color-hover\",\n \"border-color-press\",\n \"color\",\n \"color-focus\",\n \"color-hover\",\n \"color-press\",\n \"color-transparent\",\n ...alphaSteps.map((step) => `color${step}`),\n ...numbered(\"color\", 12),\n \"outline-color\",\n \"placeholder-color\",\n \"shadow-color\",\n ...[\"black\", \"white\"].flatMap((color) => [\n color,\n `${color}0`,\n `${color}02`,\n `${color}04`,\n `${color}06`,\n `${color}08`,\n ...numbered(color, 12)\n ]),\n ...paletteColors.flatMap((color) => numbered(color, 12)),\n ...numbered(\"highlight\", 8),\n ...numbered(\"shadow\", 8)\n];\nconst variableShape = Object.fromEntries(\n themeVariableNames.map((name) => [name, `var(--${name})`])\n);\nconst clientThemes = Object.fromEntries(\n themeNames.map((name) => [name, variableShape])\n);\nexport {\n clientThemes,\n componentThemes,\n themeNames,\n themeVariableNames\n};\n//# sourceMappingURL=themeMetadata.js.map\n"],"mappings":";AAAA,MAAM,UAAU,CAAC,SAAS,MAAM;AAChC,MAAM,SAAS;CAAC;CAAS;CAAS;CAAQ;CAAQ;CAAO;CAAU;AAAO;AAC1E,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,kBAAkB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,YAAY,QAAQ,UAAU,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,UAAU,GAAG,SAAS,QAAQ,GAAG;AACvG,MAAM,iBAAiB,QAAQ,SAAS,WAAW;CACjD;CACA,GAAG,OAAO;CACV,GAAG,OAAO;CACV,GAAG,OAAO;CACV,GAAG,OAAO,SAAS,UAAU;EAC3B,GAAG,OAAO,GAAG;EACb,GAAG,OAAO,GAAG,MAAM;EACnB,GAAG,OAAO,GAAG,MAAM;EACnB,GAAG,OAAO,GAAG,MAAM;CACrB,CAAC;AACH,CAAC;AACD,MAAM,kBAAkB,eAAe,SACpC,cAAc,UAAU,SAAS,WAAW,IAAI,CAAC,UAAU,QAAQ,cAAc,SAAS,CAAC,IAAI,UAAU,SAAS,WAAW,IAAI,CAAC,UAAU,QAAQ,cAAc,SAAS,CAAC,IAAI,CAAC,CACpL;AACA,MAAM,sBAAsB,CAAC,GAAG,gBAAgB,GAAG,eAAe,EAAE,SACjE,WAAW,gBAAgB,KAAK,cAAc,GAAG,OAAO,GAAG,WAAW,CACzE;AACA,MAAM,aAAa;CAAC,GAAG;CAAgB,GAAG;CAAiB,GAAG;AAAmB;AACjF,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,qBAAqB;CACzB;CACA;CACA,GAAG,SAAS,UAAU,EAAE;CACxB;CACA;CACA;CACA;CACA,GAAG,WAAW,KAAK,SAAS,aAAa,MAAM;CAC/C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,GAAG,WAAW,KAAK,SAAS,QAAQ,MAAM;CAC1C,GAAG,SAAS,SAAS,EAAE;CACvB;CACA;CACA;CACA,GAAG,CAAC,SAAS,OAAO,EAAE,SAAS,UAAU;EACvC;EACA,GAAG,MAAM;EACT,GAAG,MAAM;EACT,GAAG,MAAM;EACT,GAAG,MAAM;EACT,GAAG,MAAM;EACT,GAAG,SAAS,OAAO,EAAE;CACvB,CAAC;CACD,GAAG,cAAc,SAAS,UAAU,SAAS,OAAO,EAAE,CAAC;CACvD,GAAG,SAAS,aAAa,CAAC;CAC1B,GAAG,SAAS,UAAU,CAAC;AACzB;AACA,MAAM,gBAAgB,OAAO,YAC3B,mBAAmB,KAAK,SAAS,CAAC,MAAM,SAAS,KAAK,EAAE,CAAC,CAC3D;AACA,MAAM,eAAe,OAAO,YAC1B,WAAW,KAAK,SAAS,CAAC,MAAM,aAAa,CAAC,CAChD"}
@@ -0,0 +1,25 @@
1
+ import { toV6Themes } from "@tamagui/config/v6-base";
2
+ import { themes as themes$1 } from "@tamagui/themes/v5-subtle";
3
+ import { componentThemes, themeNames } from "./themeMetadata.mjs";
4
+
5
+ const themeNameSet = new Set(themeNames);
6
+ const selectedThemes = Object.fromEntries(Object.entries(themes$1).filter(([themeName]) => themeNameSet.has(themeName)));
7
+ for (const [themeName, theme] of Object.entries(selectedThemes)) {
8
+ if (themeName.endsWith("_surface1")) {
9
+ selectedThemes[themeName.replace(/_surface1$/, "_level2")] = theme;
10
+ } else if (themeName.endsWith("_surface2")) {
11
+ selectedThemes[themeName.replace(/_surface2$/, "_level3")] = theme;
12
+ }
13
+ }
14
+ for (const themeName of themeNames) {
15
+ const component = componentThemes.find((name) => themeName.endsWith(`_${name}`));
16
+ if (!component || selectedThemes[themeName]) continue;
17
+ const parentName = themeName.slice(0, -(component.length + 1));
18
+ if (selectedThemes[parentName]) {
19
+ selectedThemes[themeName] = selectedThemes[parentName];
20
+ }
21
+ }
22
+ const themes = toV6Themes(selectedThemes);
23
+
24
+ export { themes };
25
+ //# sourceMappingURL=themes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themes.js","names":["v5Themes"],"sources":["esm/themes.js"],"sourcesContent":["import { toV6Themes } from \"@tamagui/config/v6-base\";\nimport { themes as v5Themes } from \"@tamagui/themes/v5-subtle\";\nimport { componentThemes, themeNames } from \"./themeMetadata\";\nconst themeNameSet = new Set(themeNames);\nconst selectedThemes = Object.fromEntries(\n Object.entries(v5Themes).filter(([themeName]) => themeNameSet.has(themeName))\n);\nfor (const [themeName, theme] of Object.entries(selectedThemes)) {\n if (themeName.endsWith(\"_surface1\")) {\n selectedThemes[themeName.replace(/_surface1$/, \"_level2\")] = theme;\n } else if (themeName.endsWith(\"_surface2\")) {\n selectedThemes[themeName.replace(/_surface2$/, \"_level3\")] = theme;\n }\n}\nfor (const themeName of themeNames) {\n const component = componentThemes.find((name) => themeName.endsWith(`_${name}`));\n if (!component || selectedThemes[themeName]) continue;\n const parentName = themeName.slice(0, -(component.length + 1));\n if (selectedThemes[parentName]) {\n selectedThemes[themeName] = selectedThemes[parentName];\n }\n}\nconst themes = toV6Themes(selectedThemes);\nexport {\n themes\n};\n//# sourceMappingURL=themes.js.map\n"],"mappings":";;;;;AAGA,MAAM,eAAe,IAAI,IAAI,UAAU;AACvC,MAAM,iBAAiB,OAAO,YAC5B,OAAO,QAAQA,QAAQ,EAAE,QAAQ,CAAC,eAAe,aAAa,IAAI,SAAS,CAAC,CAC9E;AACA,KAAK,MAAM,CAAC,WAAW,UAAU,OAAO,QAAQ,cAAc,GAAG;CAC/D,IAAI,UAAU,SAAS,WAAW,GAAG;EACnC,eAAe,UAAU,QAAQ,cAAc,SAAS,KAAK;CAC/D,OAAO,IAAI,UAAU,SAAS,WAAW,GAAG;EAC1C,eAAe,UAAU,QAAQ,cAAc,SAAS,KAAK;CAC/D;AACF;AACA,KAAK,MAAM,aAAa,YAAY;CAClC,MAAM,YAAY,gBAAgB,MAAM,SAAS,UAAU,SAAS,IAAI,MAAM,CAAC;CAC/E,IAAI,CAAC,aAAa,eAAe,YAAY;CAC7C,MAAM,aAAa,UAAU,MAAM,GAAG,EAAE,UAAU,SAAS,EAAE;CAC7D,IAAI,eAAe,aAAa;EAC9B,eAAe,aAAa,eAAe;CAC7C;AACF;AACA,MAAM,SAAS,WAAW,cAAc"}
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@tamagui/tamagui-dev-config",
3
- "version": "2.7.7",
3
+ "version": "3.0.0-beta.643.1",
4
4
  "source": "src/index.ts",
5
5
  "files": [
6
6
  "src",
7
7
  "types",
8
- "dist",
9
- "motion.cjs"
8
+ "dist"
10
9
  ],
11
10
  "type": "module",
12
11
  "main": "dist/cjs",
@@ -21,13 +20,6 @@
21
20
  "import": "./dist/esm/index.mjs",
22
21
  "require": "./dist/cjs/index.cjs",
23
22
  "default": "./dist/esm/index.mjs"
24
- },
25
- "./motion": {
26
- "types": "./src/animations.motion.ts",
27
- "browser": "./dist/esm/animations.motion.mjs",
28
- "module": "./dist/esm/animations.motion.mjs",
29
- "import": "./dist/esm/animations.motion.mjs",
30
- "require": "./dist/cjs/animations.motion.cjs"
31
23
  }
32
24
  },
33
25
  "publishConfig": {
@@ -40,23 +32,20 @@
40
32
  "clean:build": "tamagui-build clean:build"
41
33
  },
42
34
  "dependencies": {
43
- "@tamagui/animations-css": "2.7.7",
44
- "@tamagui/animations-moti": "2.7.7",
45
- "@tamagui/animations-motion": "2.7.7",
46
- "@tamagui/animations-reanimated": "2.7.7",
47
- "@tamagui/colors": "2.7.7",
48
- "@tamagui/config": "2.7.7",
49
- "@tamagui/core": "2.7.7",
50
- "@tamagui/font-cherry-bomb": "2.7.7",
51
- "@tamagui/font-inter": "2.7.7",
52
- "@tamagui/font-silkscreen": "2.7.7",
53
- "@tamagui/shorthands": "2.7.7",
54
- "@tamagui/theme-builder": "2.7.7",
55
- "@tamagui/themes": "2.7.7",
56
- "color2k": "^2.0.2"
35
+ "@tamagui/animations-css": "3.0.0-beta.643.1",
36
+ "@tamagui/animations-motion": "3.0.0-beta.643.1",
37
+ "@tamagui/animations-reanimated": "3.0.0-beta.643.1",
38
+ "@tamagui/colors": "3.0.0-beta.643.1",
39
+ "@tamagui/config": "3.0.0-beta.643.1",
40
+ "@tamagui/core": "3.0.0-beta.643.1",
41
+ "@tamagui/font-cherry-bomb": "3.0.0-beta.643.1",
42
+ "@tamagui/font-inter": "3.0.0-beta.643.1",
43
+ "@tamagui/font-silkscreen": "3.0.0-beta.643.1",
44
+ "@tamagui/shorthands": "3.0.0-beta.643.1",
45
+ "@tamagui/themes": "3.0.0-beta.643.1"
57
46
  },
58
47
  "devDependencies": {
59
- "@tamagui/build": "2.7.7",
48
+ "@tamagui/build": "3.0.0-beta.643.1",
60
49
  "react": ">=19"
61
50
  },
62
51
  "peerDependencies": {
@@ -20,15 +20,15 @@ const genericFontSizes = {
20
20
  16: 124,
21
21
  } as const
22
22
 
23
- export function createGenericFont<A extends GenericFont<keyof typeof genericFontSizes>>(
23
+ export function createGenericFont(
24
24
  family: string,
25
- font: Partial<A> = {},
25
+ font: Partial<GenericFont<keyof typeof genericFontSizes>> = {},
26
26
  {
27
27
  sizeLineHeight = (val) => val * 1.35,
28
28
  }: {
29
29
  sizeLineHeight?: (val: number) => number
30
30
  } = {}
31
- ): A {
31
+ ) {
32
32
  const size = font.size || genericFontSizes
33
33
  return createFont({
34
34
  family,
@@ -38,6 +38,6 @@ export function createGenericFont<A extends GenericFont<keyof typeof genericFont
38
38
  ) as typeof size,
39
39
  weight: { 0: '300' },
40
40
  letterSpacing: { 4: 0 },
41
- ...(font as any),
41
+ ...font,
42
42
  })
43
43
  }
package/src/fonts.ts CHANGED
@@ -15,11 +15,15 @@ export const cherryBombFont = createCherryBombFont({
15
15
  weight: {
16
16
  4: '800',
17
17
  },
18
+ size: {
19
+ true: 22.4,
20
+ },
18
21
  })
19
22
  export const silkscreenFont = createSilkscreenFont()
20
23
  export const headingFont = createInterFont(
21
24
  {
22
25
  size: {
26
+ true: 14,
23
27
  5: 13,
24
28
  6: 15,
25
29
  9: 30,
@@ -34,8 +38,8 @@ export const headingFont = createInterFont(
34
38
  7: '700',
35
39
  },
36
40
  color: {
37
- 6: '$colorFocus',
38
- 7: '$color',
41
+ 6: 'color-focus',
42
+ 7: 'color',
39
43
  },
40
44
  letterSpacing: {
41
45
  5: 2,
@@ -61,6 +65,9 @@ export const headingFont = createInterFont(
61
65
 
62
66
  export const bodyFont = createInterFont(
63
67
  {
68
+ size: {
69
+ true: 14,
70
+ },
64
71
  weight: {
65
72
  1: '400',
66
73
  },
package/src/media.ts CHANGED
@@ -17,13 +17,13 @@ const breakpoints = {
17
17
 
18
18
  export const media = {
19
19
  // v4 Config
20
- maxXs: { maxWidth: breakpoints.xs },
21
- max2xs: { maxWidth: breakpoints['2xs'] },
22
- maxSm: { maxWidth: breakpoints.sm },
23
- maxMd: { maxWidth: breakpoints.md },
24
- maxLg: { maxWidth: breakpoints.lg },
25
- maxXl: { maxWidth: breakpoints.xl },
26
- max2Xl: { maxWidth: breakpoints['2xl'] },
20
+ 'max-xs': { maxWidth: breakpoints.xs },
21
+ 'max-2xs': { maxWidth: breakpoints['2xs'] },
22
+ 'max-sm': { maxWidth: breakpoints.sm },
23
+ 'max-md': { maxWidth: breakpoints.md },
24
+ 'max-lg': { maxWidth: breakpoints.lg },
25
+ 'max-xl': { maxWidth: breakpoints.xl },
26
+ 'max-2xl': { maxWidth: breakpoints['2xl'] },
27
27
  // for site
28
28
  xl: { maxWidth: 1650 },
29
29
  // between lg and xl - for studio usage
@@ -1,26 +1,12 @@
1
- import { animationsCSS } from '@tamagui/config/v5-css'
2
- import { animationsMotion } from '@tamagui/config/v5-motion'
3
- import {
4
- createV5Theme,
5
- defaultConfig,
6
- subtleChildrenThemes,
7
- } from '@tamagui/config/v5-subtle'
8
-
9
- // only generate the accent themes the site actually uses: red/green/blue/gray/yellow
10
- // (the @tamagui/logo tint family). dropping orange/pink/purple/teal/neutral roughly
11
- // halves the render-blocking theme css. note: dropping an accent also removes its
12
- // color tokens (--pink10 etc.), so all $pink/$purple/$orange/$teal/$neutral usages are
13
- // collapsed to kept colors across the site. component themes are kept (they dedupe to
14
- // surfaces in css and the site shows them off). themes-as-js is still stripped to {}
15
- // on the client below and hydrated from css.
16
- const { gray, blue, red, yellow, green } = subtleChildrenThemes
17
- const themes = createV5Theme({
18
- childrenThemes: { gray, blue, red, yellow, green },
19
- })
1
+ import { animationsCSS } from '@tamagui/config/animations-css'
2
+ import { animationsMotion } from '@tamagui/config/animations-motion'
3
+ import { defaultConfig } from '@tamagui/config/v5-subtle'
20
4
  import type { CreateTamaguiProps } from '@tamagui/core'
21
5
  import { setupDev } from '@tamagui/core'
22
6
  import { bodyFont, cherryBombFont, headingFont, monoFont, silkscreenFont } from './fonts'
23
7
  import { media, mediaQueryDefaultActive } from './media'
8
+ import { clientThemes } from './themeMetadata'
9
+ import { themes } from './themes'
24
10
 
25
11
  setupDev({
26
12
  visualizer: true,
@@ -39,10 +25,14 @@ export const animations = {
39
25
  css: animationsCSS,
40
26
  }
41
27
 
42
- // Use v5 config as base, but with tamagui.dev custom themes
28
+ const configuredThemes =
29
+ process.env.VITE_ENVIRONMENT === 'client'
30
+ ? (clientThemes as unknown as typeof themes)
31
+ : themes
32
+
43
33
  export const config = {
44
34
  ...defaultConfig,
45
- themes: process.env.VITE_ENVIRONMENT === 'client' ? ({} as typeof themes) : themes,
35
+ themes: configuredThemes,
46
36
  fonts,
47
37
  animations,
48
38
  media,
@@ -50,8 +40,7 @@ export const config = {
50
40
  ...defaultConfig.settings,
51
41
  mediaQueryDefaultActive,
52
42
  allowedStyleValues: 'somewhat-strict-web',
53
- autocompleteSpecificTokens: 'except-special',
54
- // Allow both shorthands and longhand names for flexibility
43
+ // allow both shorthands and longhand names for flexibility
55
44
  onlyAllowShorthands: false,
56
45
  },
57
46
  } satisfies CreateTamaguiProps