@tamagui/theme 1.111.8 → 1.111.10

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.
@@ -3,18 +3,32 @@ import { isServer } from "@tamagui/constants";
3
3
  import { activeThemeManagers, ensureThemeVariable, getConfig, getThemeCSSRules, proxyThemeToParents, simpleHash, updateConfig } from "@tamagui/web";
4
4
  import { startTransition } from "@tamagui/start-transition";
5
5
  function mutateThemes(param) {
6
- var { themes, batch, insertCSS = !0, ...props } = param, allThemesProxied = {}, allThemesRaw = {}, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
6
+ var {
7
+ themes,
8
+ batch,
9
+ insertCSS = !0,
10
+ ...props
11
+ } = param,
12
+ allThemesProxied = {},
13
+ allThemesRaw = {},
14
+ _iteratorNormalCompletion = !0,
15
+ _didIteratorError = !1,
16
+ _iteratorError = void 0;
7
17
  try {
8
18
  for (var _iterator = themes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
9
- var { name, theme } = _step.value, res = _mutateTheme({
10
- ...props,
11
- name,
12
- theme,
13
- // we'll do one update at the end
14
- avoidUpdate: !0,
15
- // always add which also replaces but doesnt fail first time
16
- mutationType: "add"
17
- });
19
+ var {
20
+ name,
21
+ theme
22
+ } = _step.value,
23
+ res = _mutateTheme({
24
+ ...props,
25
+ name,
26
+ theme,
27
+ // we'll do one update at the end
28
+ avoidUpdate: !0,
29
+ // always add which also replaces but doesnt fail first time
30
+ mutationType: "add"
31
+ });
18
32
  res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
19
33
  }
20
34
  } catch (err) {
@@ -23,12 +37,11 @@ function mutateThemes(param) {
23
37
  try {
24
38
  !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
25
39
  } finally {
26
- if (_didIteratorError)
27
- throw _iteratorError;
40
+ if (_didIteratorError) throw _iteratorError;
28
41
  }
29
42
  }
30
43
  var cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
31
- return startTransition(function() {
44
+ return startTransition(function () {
32
45
  for (var themeName in allThemesProxied) {
33
46
  var theme2 = allThemesProxied[themeName];
34
47
  updateThemeConfig(themeName, theme2), notifyThemeManagersOfUpdate(themeName, theme2);
@@ -44,25 +57,30 @@ function _mutateTheme(props) {
44
57
  process.env.NODE_ENV === "development" && console.warn("Theme mutation is not supported on server side");
45
58
  return;
46
59
  }
47
- var config = getConfig(), { name: themeName, theme: themeIn, insertCSS, mutationType } = props;
60
+ var config = getConfig(),
61
+ {
62
+ name: themeName,
63
+ theme: themeIn,
64
+ insertCSS,
65
+ mutationType
66
+ } = props;
48
67
  if (process.env.NODE_ENV === "development") {
49
- if (!config)
50
- throw new Error("No config");
68
+ if (!config) throw new Error("No config");
51
69
  var theme = config.themes[props.name];
52
- if (mutationType !== "add" && !theme)
53
- throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
70
+ if (mutationType !== "add" && !theme) throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
54
71
  }
55
- var _config_themes_themeName, theme1 = {
56
- ...mutationType === "update" ? (_config_themes_themeName = config.themes[themeName]) !== null && _config_themes_themeName !== void 0 ? _config_themes_themeName : {} : {},
57
- ...themeIn
58
- };
59
- for (var key in theme1)
60
- ensureThemeVariable(theme1, key);
61
- var themeProxied = proxyThemeToParents(themeName, theme1), response = {
62
- themeRaw: theme1,
63
- theme: themeProxied,
64
- cssRules: []
65
- };
72
+ var _config_themes_themeName,
73
+ theme1 = {
74
+ ...(mutationType === "update" ? (_config_themes_themeName = config.themes[themeName]) !== null && _config_themes_themeName !== void 0 ? _config_themes_themeName : {} : {}),
75
+ ...themeIn
76
+ };
77
+ for (var key in theme1) ensureThemeVariable(theme1, key);
78
+ var themeProxied = proxyThemeToParents(themeName, theme1),
79
+ response = {
80
+ themeRaw: theme1,
81
+ theme: themeProxied,
82
+ cssRules: []
83
+ };
66
84
  return props.avoidUpdate || (insertCSS && (response.cssRules = insertThemeCSS({
67
85
  [themeName]: theme1
68
86
  })), updateThemeConfig(themeName, themeProxied), notifyThemeManagersOfUpdate(themeName, themeProxied)), response;
@@ -72,7 +90,7 @@ function updateThemeConfig(themeName, theme) {
72
90
  config.themes[themeName] = theme, updateConfig("themes", config.themes);
73
91
  }
74
92
  function notifyThemeManagersOfUpdate(themeName, theme) {
75
- activeThemeManagers.forEach(function(manager) {
93
+ activeThemeManagers.forEach(function (manager) {
76
94
  manager.state.name === themeName && manager.updateStateFromProps({
77
95
  name: themeName,
78
96
  forceTheme: theme
@@ -84,19 +102,15 @@ function insertThemeCSS(themes) {
84
102
  return [];
85
103
  var config, cssRules;
86
104
  for (var themeName in themes) {
87
- var theme = themes[themeName], rules = getThemeCSSRules({
88
- config,
89
- themeName,
90
- names: [
91
- themeName
92
- ],
93
- hasDarkLight: !0,
94
- theme
95
- });
96
- cssRules = [
97
- ...cssRules,
98
- ...rules
99
- ], batch || updateStyle(`t_theme_style_${themeName}`, rules);
105
+ var theme = themes[themeName],
106
+ rules = getThemeCSSRules({
107
+ config,
108
+ themeName,
109
+ names: [themeName],
110
+ hasDarkLight: !0,
111
+ theme
112
+ });
113
+ cssRules = [...cssRules, ...rules], batch || updateStyle(`t_theme_style_${themeName}`, rules);
100
114
  }
101
115
  if (batch) {
102
116
  var id;
@@ -104,15 +118,13 @@ function insertThemeCSS(themes) {
104
118
  }
105
119
  }
106
120
  function updateStyle(id, rules) {
107
- var existing = document.querySelector(`#${id}`), style = document.createElement("style");
121
+ var existing = document.querySelector(`#${id}`),
122
+ style = document.createElement("style");
108
123
  if (style.id = id, style.appendChild(document.createTextNode(rules.join(`
109
124
  `))), document.head.appendChild(style), existing) {
110
125
  var _existing_parentElement;
111
126
  (_existing_parentElement = existing.parentElement) === null || _existing_parentElement === void 0 || _existing_parentElement.removeChild(existing);
112
127
  }
113
128
  }
114
- export {
115
- _mutateTheme,
116
- mutateThemes
117
- };
118
- //# sourceMappingURL=_mutateTheme.js.map
129
+ export { _mutateTheme, mutateThemes };
130
+ //# sourceMappingURL=_mutateTheme.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/core/theme/src/_mutateTheme.ts"],
4
- "mappings": "AAAA,OAAkB;AAClB,SAASA,gBAAgB;AAEzB,SACEC,qBACAC,qBACAC,WACAC,kBACAC,qBACAC,YACAC,oBACK;AACP,SAASC,uBAAuB;AAmBzB,SAASC,aAAa;MAAA,EAC3BC,QACAC,OACAC,YAAY,IACZ,GAAGC,MAAAA,IAJwB,OAWrBC,mBAAgD,CAAC,GACjDC,eAA4C,CAAC,GAC9C,4BAAA,IAAA,oBAAA,IAAA,iBAAA;;AAAL,aAAK,YAAyBL,OAAAA,OAAAA,QAAAA,EAAAA,GAAzB,OAAA,EAAA,6BAAA,QAAA,UAAA,KAAA,GAAA,OAAA,4BAAA,IAAiC;AAAjC,UAAM,EAAEM,MAAMC,MAAK,IAAnB,MAAA,OACGC,MAAMC,aAAa;QACvB,GAAGN;QACHG;QACAC;;QAEAG,aAAa;;QAEbC,cAAc;MAChB,CAAA;AACA,MAAIH,QACFJ,iBAAiBE,IAAAA,IAAQE,IAAID,OAC7BF,aAAaC,IAAAA,IAAQE,IAAII;IAE7B;;AAdK,wBAAA,IAAA,iBAAA;;;OAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;UAAA;cAAA;;;AAgBL,MAAMC,WAAWX,YAAYY,eAAeT,cAAcJ,KAAAA,IAAS,CAAA;AAEnEH,yBAAgB,WAAA;AACd,aAAWiB,aAAaX,kBAAkB;AACxC,UAAMG,SAAQH,iBAAiBW,SAAAA;AAC/BC,wBAAkBD,WAAWR,MAAAA,GAC7BU,4BAA4BF,WAAWR,MAAAA;IACzC;EACF,CAAA,GAEO;IACLP,QAAQI;IACRc,WAAWb;IACXQ;EACF;AACF;AAEO,SAASJ,aA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ASS,aACzBgB,QAAQE,qBACN;MACE3B,MAAMS;MACNmB,YAAY3B;IACd,GACA,EAAA;EAGN,CAAA;AACF;AAEA,SAASO,eAAed,QAAoC;MAAEC,QAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAe;AAEzE,SAAO,CAAA;AAGT,MAAMuB,QACFX;AAEJ,WAAWE,aAAaf,QAAQ;AAC9B,QAAMO,QAAQP,OAAOe,SAAAA,GAEfoB,QAAQzC,iBAAiB;MAC7B8B;MACAT;MACAqB,OAAO;QAACrB;;MACRsB,cAAc;MACd9B;IACF,CAAA;AAEAM,eAAW;SAAIA;SAAasB;OAEvBlC,SACHqC,YAAY,iBAAiBvB,SAAAA,IAAaoB,KAAAA;EAE9C;AAEA,MAAIlC,OAAO;AACT,QAAMsC;AACND,gBAAY,iBAAiBC,EAAAA,IAAM1B,QAAAA;EACrC;AAGF;AAEA,SAASyB,YAAYC,IAAYJ,OAAe;AAC9C,MAAMK,WAAWC,SAASC,cAAc,IAAIH,EAAAA,EAAI,GAC1CI,QAAQF,SAASG,cAAc,OAAA;AAIrC,MAHAD,MAAMJ,KAAKA,IACXI,MAAME,YAAYJ,SAASK,eAAeX,MAAMY,KAAK;CAAA,CAAA,CAAA,GACrDN,SAASO,KAAKH,YAAYF,KAAAA,GACtBH,UAAU;QACZA;KAAAA,0BAAAA,SAASS,mBAAa,QAAtBT,4BAAAA,UAAAA,wBAAwBU,YAAYV,QAAAA;EACtC;AACF;",
5
- "names": ["isServer", "activeThemeManagers", "ensureThemeVariable", "getConfig", "getThemeCSSRules", "proxyThemeToParents", "simpleHash", "updateConfig", "startTransition", "mutateThemes", "themes", "batch", "insertCSS", "props", "allThemesProxied", "allThemesRaw", "name", "theme", "res", "_mutateTheme", "avoidUpdate", "mutationType", "themeRaw", "cssRules", "insertThemeCSS", "themeName", "updateThemeConfig", "notifyThemeManagersOfUpdate", "themesRaw", "process", "env", "NODE_ENV", "console", "warn", "config", "themeIn", "Error", "key", "themeProxied", "response", "forEach", "manager", "state", "updateStateFromProps", "forceTheme", "rules", "names", "hasDarkLight", "updateStyle", "id", "existing", "document", "querySelector", "style", "createElement", "appendChild", "createTextNode", "join", "head", "parentElement", "removeChild"]
6
- }
1
+ {"version":3,"names":["isServer","activeThemeManagers","ensureThemeVariable","getConfig","getThemeCSSRules","proxyThemeToParents","simpleHash","updateConfig","startTransition","mutateThemes","param","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","name","theme","value","res","_mutateTheme","avoidUpdate","mutationType","themeRaw","err","return","cssRules","insertThemeCSS","themeName","theme2","updateThemeConfig","notifyThemeManagersOfUpdate","themesRaw","process","env","NODE_ENV","console","warn","config","themeIn","Error","_config_themes_themeName","theme1","key","themeProxied","response","forEach","manager","state","updateStateFromProps","forceTheme","arguments","length","rules","names","hasDarkLight","updateStyle","id","existing","document","querySelector","style","createElement","appendChild","createTextNode","join","head","_existing_parentElement","parentElement","removeChild"],"sources":["../../src/_mutateTheme.ts"],"sourcesContent":[null],"mappings":"AACA,cAAS;AAET,SAAAA,QAAA;AAAA,SACEC,mBAAA,EAAAC,mBAAA,EAAAC,SAAA,EAAAC,gBAAA,EAAAC,mBAAA,EAAAC,UAAA,EAAAC,YAAA;AAAA,SACAC,eAAA;AAAA,SACAC,aAAAC,KAAA;EACA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,SAAA;MAAA,GAAAC;IAAA,IAAAJ,KAAA;IAAAK,gBAAA;IAAAC,YAAA;IAAAC,yBAAA;IAAAC,iBAAA;IAAAC,cAAA;EACA;IACA,SAAAC,SAAA,GAAAT,MAAA,CAAAU,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAN,yBAAA,IAAAM,KAAA,GAAAH,SAAA,CAAAI,IAAA,IAAAC,IAAA,GAAAR,yBAAA;MACA;UAAAS,IAAA;UAAAC;QAAA,IAAAJ,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EAAAjC;IACM;EACM;AACN;AACQ,SACNU,cAAYA,CAAA1B,MAAA;EAAA,IACdC,KAAA,GAAAiD,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EAAA,OACA;EAAA,IACFb,MAAA,EAAAZ,QAAA;EAEJ,KAAC,IAAAE,SAAA,IAAA3B,MAAA;IACH,IAAAgB,KAAA,GAAAhB,MAAA,CAAA2B,SAAA;MAAAyB,KAAA,GAAA3D,gBAAA;QAEA4C,MAAS;QAKPV,SAAM;QACF0B,KAAA,GAEJ1B,SAAW,CACT;QAGE2B,YAAA;QACAtC;MAAA,EACA;IAAiBS,QACjB,IACA,GAAAA,QAAA,EACD,GAAA2B,KAAA,CAED,EAAAnD,KAAA,IAAYsD,WAAG,kBAEV5B,SACH,IAAAyB,KAAY;EAEhB;EAEA,IAAInD,KAAA,EAAO;IACT,IAAAuD,EAAM;IACND,WAAA,CAAY,iBAAiBC,EAAE,IAAI/B,QAAQ;EAC7C;AAEA;AACF,SAAA8B,YAAAC,EAAA,EAAAJ,KAAA;EAEA,IAAAK,QAAS,GAAAC,QAAwB,CAAAC,aAAiB,KAAAH,EAAA;IAAAI,KAAA,GAAAF,QAAA,CAAAG,aAAA;EAChD,IAAAD,KAAM,CAAAJ,EAAA,GAAAA,EAAW,EAAAI,KAAA,CAAAE,WAAS,CAAAJ,QAAkB,CAAEK,cAChC,CAAAX,KAAA,CAAAY,IAAS;AACvB,MAAAN,QAAW,CAAAO,IACX,CAAAH,WAAM,CAAAF,KAAY,GAAAH,QAAS;IAAgC,IAC3DS,uBAAc;IAIhB,CAAAA,uBAAA,GAAAT,QAAA,CAAAU,aAAA,cAAAD,uBAAA,eAAAA,uBAAA,CAAAE,WAAA,CAAAX,QAAA","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { _mutateTheme } from "./_mutateTheme";
1
+ import { _mutateTheme } from "./_mutateTheme.native.js";
2
2
  function addTheme(props) {
3
3
  return _mutateTheme({
4
4
  ...props,
@@ -6,7 +6,5 @@ function addTheme(props) {
6
6
  mutationType: "add"
7
7
  });
8
8
  }
9
- export {
10
- addTheme
11
- };
12
- //# sourceMappingURL=addTheme.js.map
9
+ export { addTheme };
10
+ //# sourceMappingURL=addTheme.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/core/theme/src/addTheme.ts"],
4
- "mappings": "AAEA,SAASA,oBAAoB;AAEtB,SAASC,SAASC,OAIxB;AACC,SAAOF,aAAa;IAAE,GAAGE;IAAOC,WAAW;IAAMC,cAAc;EAAM,CAAA;AACvE;",
5
- "names": ["_mutateTheme", "addTheme", "props", "insertCSS", "mutationType"]
6
- }
1
+ {"version":3,"names":["_mutateTheme","addTheme","props"],"sources":["../../src/addTheme.ts"],"sourcesContent":[null],"mappings":"AAEA,SAASA,YAAA,QAAoB;AAEtB,SAASC,SAASC,KAAA,EAItB;EACD,OAAOF,YAAA,CAAa;IACtB,GAAAE,KAAA","ignoreList":[]}
@@ -1,8 +1,6 @@
1
- export * from "./addTheme";
2
- export * from "./updateTheme";
3
- export * from "./replaceTheme";
4
- import { mutateThemes } from "./_mutateTheme";
5
- export {
6
- mutateThemes
7
- };
8
- //# sourceMappingURL=index.js.map
1
+ export * from "./addTheme.native.js";
2
+ export * from "./updateTheme.native.js";
3
+ export * from "./replaceTheme.native.js";
4
+ import { mutateThemes } from "./_mutateTheme.native.js";
5
+ export { mutateThemes };
6
+ //# sourceMappingURL=index.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/core/theme/src/index.ts"],
4
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAASA,oBAAoB;",
5
- "names": ["mutateThemes"]
6
- }
1
+ {"version":3,"names":["mutateThemes"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAASA,YAAA,QAAoB","ignoreList":[]}
@@ -1,14 +1,16 @@
1
- import { _mutateTheme } from "./_mutateTheme";
1
+ import { _mutateTheme } from "./_mutateTheme.native.js";
2
2
  function replaceTheme(param) {
3
- var { name, theme } = param, next = _mutateTheme({
4
- name,
5
- theme,
6
- insertCSS: !0,
7
- mutationType: "replace"
8
- });
3
+ var {
4
+ name,
5
+ theme
6
+ } = param,
7
+ next = _mutateTheme({
8
+ name,
9
+ theme,
10
+ insertCSS: !0,
11
+ mutationType: "replace"
12
+ });
9
13
  return next;
10
14
  }
11
- export {
12
- replaceTheme
13
- };
14
- //# sourceMappingURL=replaceTheme.js.map
15
+ export { replaceTheme };
16
+ //# sourceMappingURL=replaceTheme.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/core/theme/src/replaceTheme.ts"],
4
- "mappings": "AAEA,SAASA,oBAAoB;AAEtB,SAASC,aAAa,OAM5B;MAN4B,EAC3BC,MACAC,MAAK,IAFsB,OAOrBC,OAAOJ,aAAa;IAAEE;IAAMC;IAAOE,WAAW;IAAMC,cAAc;EAAU,CAAA;AAClF,SAAOF;AACT;",
5
- "names": ["_mutateTheme", "replaceTheme", "name", "theme", "next", "insertCSS", "mutationType"]
6
- }
1
+ {"version":3,"names":["_mutateTheme","replaceTheme","param","name","theme","next","insertCSS","mutationType"],"sources":["../../src/replaceTheme.ts"],"sourcesContent":[null],"mappings":"AAEA,SAASA,YAAA,QAAoB;AAEtB,SAASC,aAAaC,KAAA;EAC3B;MAAAC,IAAA;MAAAC;IAAA,IAAAF,KAAA;IAAAG,IAAA,GAAAL,YAAA;MACAG,IAAA;MAICC,KAAA;MAEDE,SADa;MAEfC,YAAA","ignoreList":[]}
@@ -1,6 +1,9 @@
1
- import { _mutateTheme } from "./_mutateTheme";
1
+ import { _mutateTheme } from "./_mutateTheme.native.js";
2
2
  function updateTheme(param) {
3
- var { name, theme } = param;
3
+ var {
4
+ name,
5
+ theme
6
+ } = param;
4
7
  return _mutateTheme({
5
8
  name,
6
9
  theme,
@@ -8,7 +11,5 @@ function updateTheme(param) {
8
11
  mutationType: "update"
9
12
  });
10
13
  }
11
- export {
12
- updateTheme
13
- };
14
- //# sourceMappingURL=updateTheme.js.map
14
+ export { updateTheme };
15
+ //# sourceMappingURL=updateTheme.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/core/theme/src/updateTheme.ts"],
4
- "mappings": "AAEA,SAASA,oBAAoB;AAEtB,SAASC,YAAY,OAM3B;MAN2B,EAC1BC,MACAC,MAAK,IAFqB;AAO1B,SAAOH,aAAa;IAAEE;IAAMC;IAAOC,WAAW;IAAMC,cAAc;EAAS,CAAA;AAC7E;",
5
- "names": ["_mutateTheme", "updateTheme", "name", "theme", "insertCSS", "mutationType"]
6
- }
1
+ {"version":3,"names":["_mutateTheme","updateTheme","param","name","theme","insertCSS"],"sources":["../../src/updateTheme.ts"],"sourcesContent":[null],"mappings":"AAEA,SAASA,YAAA,QAAoB;AAEtB,SAASC,YAAYC,KAAA;EAC1B;IAAAC,IAAA;IAAAC;EAAA,IAAAF,KAAA;EACA,OAAAF,YAAA;IAICG,IAAA;IACDC,KAAO;IACTC,SAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/theme",
3
- "version": "1.111.8",
3
+ "version": "1.111.10",
4
4
  "sideEffects": false,
5
5
  "source": "src/index.ts",
6
6
  "types": "./types/index.d.ts",
@@ -21,11 +21,11 @@
21
21
  "clean:build": "tamagui-build clean:build"
22
22
  },
23
23
  "dependencies": {
24
- "@tamagui/constants": "1.111.8",
25
- "@tamagui/web": "1.111.8"
24
+ "@tamagui/constants": "1.111.10",
25
+ "@tamagui/web": "1.111.10"
26
26
  },
27
27
  "devDependencies": {
28
- "@tamagui/build": "1.111.8",
28
+ "@tamagui/build": "1.111.10",
29
29
  "react": "^18.2.0 || ^19.0.0"
30
30
  },
31
31
  "publishConfig": {
@@ -1,130 +0,0 @@
1
- import "react";
2
- import { isServer } from "@tamagui/constants";
3
- import { activeThemeManagers, ensureThemeVariable, getConfig, getThemeCSSRules, proxyThemeToParents, simpleHash, updateConfig } from "@tamagui/web";
4
- import { startTransition } from "@tamagui/start-transition";
5
- function mutateThemes(param) {
6
- var {
7
- themes,
8
- batch,
9
- insertCSS = !0,
10
- ...props
11
- } = param,
12
- allThemesProxied = {},
13
- allThemesRaw = {},
14
- _iteratorNormalCompletion = !0,
15
- _didIteratorError = !1,
16
- _iteratorError = void 0;
17
- try {
18
- for (var _iterator = themes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
19
- var {
20
- name,
21
- theme
22
- } = _step.value,
23
- res = _mutateTheme({
24
- ...props,
25
- name,
26
- theme,
27
- // we'll do one update at the end
28
- avoidUpdate: !0,
29
- // always add which also replaces but doesnt fail first time
30
- mutationType: "add"
31
- });
32
- res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
33
- }
34
- } catch (err) {
35
- _didIteratorError = !0, _iteratorError = err;
36
- } finally {
37
- try {
38
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
39
- } finally {
40
- if (_didIteratorError) throw _iteratorError;
41
- }
42
- }
43
- var cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
44
- return startTransition(function () {
45
- for (var themeName in allThemesProxied) {
46
- var theme2 = allThemesProxied[themeName];
47
- updateThemeConfig(themeName, theme2), notifyThemeManagersOfUpdate(themeName, theme2);
48
- }
49
- }), {
50
- themes: allThemesProxied,
51
- themesRaw: allThemesRaw,
52
- cssRules
53
- };
54
- }
55
- function _mutateTheme(props) {
56
- if (isServer) {
57
- process.env.NODE_ENV === "development" && console.warn("Theme mutation is not supported on server side");
58
- return;
59
- }
60
- var config = getConfig(),
61
- {
62
- name: themeName,
63
- theme: themeIn,
64
- insertCSS,
65
- mutationType
66
- } = props;
67
- if (process.env.NODE_ENV === "development") {
68
- if (!config) throw new Error("No config");
69
- var theme = config.themes[props.name];
70
- if (mutationType !== "add" && !theme) throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
71
- }
72
- var _config_themes_themeName,
73
- theme1 = {
74
- ...(mutationType === "update" ? (_config_themes_themeName = config.themes[themeName]) !== null && _config_themes_themeName !== void 0 ? _config_themes_themeName : {} : {}),
75
- ...themeIn
76
- };
77
- for (var key in theme1) ensureThemeVariable(theme1, key);
78
- var themeProxied = proxyThemeToParents(themeName, theme1),
79
- response = {
80
- themeRaw: theme1,
81
- theme: themeProxied,
82
- cssRules: []
83
- };
84
- return props.avoidUpdate || (insertCSS && (response.cssRules = insertThemeCSS({
85
- [themeName]: theme1
86
- })), updateThemeConfig(themeName, themeProxied), notifyThemeManagersOfUpdate(themeName, themeProxied)), response;
87
- }
88
- function updateThemeConfig(themeName, theme) {
89
- var config = getConfig();
90
- config.themes[themeName] = theme, updateConfig("themes", config.themes);
91
- }
92
- function notifyThemeManagersOfUpdate(themeName, theme) {
93
- activeThemeManagers.forEach(function (manager) {
94
- manager.state.name === themeName && manager.updateStateFromProps({
95
- name: themeName,
96
- forceTheme: theme
97
- }, !0);
98
- });
99
- }
100
- function insertThemeCSS(themes) {
101
- var batch = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
102
- return [];
103
- var config, cssRules;
104
- for (var themeName in themes) {
105
- var theme = themes[themeName],
106
- rules = getThemeCSSRules({
107
- config,
108
- themeName,
109
- names: [themeName],
110
- hasDarkLight: !0,
111
- theme
112
- });
113
- cssRules = [...cssRules, ...rules], batch || updateStyle(`t_theme_style_${themeName}`, rules);
114
- }
115
- if (batch) {
116
- var id;
117
- updateStyle(`t_theme_style_${id}`, cssRules);
118
- }
119
- }
120
- function updateStyle(id, rules) {
121
- var existing = document.querySelector(`#${id}`),
122
- style = document.createElement("style");
123
- if (style.id = id, style.appendChild(document.createTextNode(rules.join(`
124
- `))), document.head.appendChild(style), existing) {
125
- var _existing_parentElement;
126
- (_existing_parentElement = existing.parentElement) === null || _existing_parentElement === void 0 || _existing_parentElement.removeChild(existing);
127
- }
128
- }
129
- export { _mutateTheme, mutateThemes };
130
- //# sourceMappingURL=_mutateTheme.native.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isServer","activeThemeManagers","ensureThemeVariable","getConfig","getThemeCSSRules","proxyThemeToParents","simpleHash","updateConfig","startTransition","mutateThemes","param","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","name","theme","value","res","_mutateTheme","avoidUpdate","mutationType","themeRaw","err","return","cssRules","insertThemeCSS","themeName","theme2","updateThemeConfig","notifyThemeManagersOfUpdate","themesRaw","process","env","NODE_ENV","console","warn","config","themeIn","Error","_config_themes_themeName","theme1","key","themeProxied","response","forEach","manager","state","updateStateFromProps","forceTheme","arguments","length","rules","names","hasDarkLight","updateStyle","id","existing","document","querySelector","style","createElement","appendChild","createTextNode","join","head","_existing_parentElement","parentElement","removeChild"],"sources":["../../src/_mutateTheme.ts"],"sourcesContent":[null],"mappings":"AACA,cAAS;AAET,SAAAA,QAAA;AAAA,SACEC,mBAAA,EAAAC,mBAAA,EAAAC,SAAA,EAAAC,gBAAA,EAAAC,mBAAA,EAAAC,UAAA,EAAAC,YAAA;AAAA,SACAC,eAAA;AAAA,SACAC,aAAAC,KAAA;EACA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,SAAA;MAAA,GAAAC;IAAA,IAAAJ,KAAA;IAAAK,gBAAA;IAAAC,YAAA;IAAAC,yBAAA;IAAAC,iBAAA;IAAAC,cAAA;EACA;IACA,SAAAC,SAAA,GAAAT,MAAA,CAAAU,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAN,yBAAA,IAAAM,KAAA,GAAAH,SAAA,CAAAI,IAAA,IAAAC,IAAA,GAAAR,yBAAA;MACA;UAAAS,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,EAAAY,SAAA;MACPsB,UAAA,EAAAjC;IACM;EACM;AACN;AACQ,SACNU,cAAYA,CAAA1B,MAAA;EAAA,IACdC,KAAA,GAAAiD,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EAAA,OACA;EAAA,IACFb,MAAA,EAAAZ,QAAA;EAEJ,KAAC,IAAAE,SAAA,IAAA3B,MAAA;IACH,IAAAgB,KAAA,GAAAhB,MAAA,CAAA2B,SAAA;MAAAyB,KAAA,GAAA3D,gBAAA;QAEA4C,MAAS;QAKPV,SAAM;QACF0B,KAAA,GAEJ1B,SAAW,CACT;QAGE2B,YAAA;QACAtC;MAAA,EACA;IAAiBS,QACjB,IACA,GAAAA,QAAA,EACD,GAAA2B,KAAA,CAED,EAAAnD,KAAA,IAAYsD,WAAG,kBAEV5B,SACH,IAAAyB,KAAY;EAEhB;EAEA,IAAInD,KAAA,EAAO;IACT,IAAAuD,EAAM;IACND,WAAA,CAAY,iBAAiBC,EAAE,IAAI/B,QAAQ;EAC7C;AAEA;AACF,SAAA8B,YAAAC,EAAA,EAAAJ,KAAA;EAEA,IAAAK,QAAS,GAAAC,QAAwB,CAAAC,aAAiB,KAAAH,EAAA;IAAAI,KAAA,GAAAF,QAAA,CAAAG,aAAA;EAChD,IAAAD,KAAM,CAAAJ,EAAA,GAAAA,EAAW,EAAAI,KAAA,CAAAE,WAAS,CAAAJ,QAAkB,CAAEK,cAChC,CAAAX,KAAA,CAAAY,IAAS;AACvB,MAAAN,QAAW,CAAAO,IACX,CAAAH,WAAM,CAAAF,KAAY,GAAAH,QAAS;IAAgC,IAC3DS,uBAAc;IAIhB,CAAAA,uBAAA,GAAAT,QAAA,CAAAU,aAAA,cAAAD,uBAAA,eAAAA,uBAAA,CAAAE,WAAA,CAAAX,QAAA","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import { _mutateTheme } from "./_mutateTheme.native.mjs";
2
- function addTheme(props) {
3
- return _mutateTheme({
4
- ...props,
5
- insertCSS: !0,
6
- mutationType: "add"
7
- });
8
- }
9
- export { addTheme };
10
- //# sourceMappingURL=addTheme.native.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_mutateTheme","addTheme","props"],"sources":["../../src/addTheme.ts"],"sourcesContent":[null],"mappings":"AAEA,SAASA,YAAA,QAAoB;AAEtB,SAASC,SAASC,KAAA,EAItB;EACD,OAAOF,YAAA,CAAa;IACtB,GAAAE,KAAA","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- export * from "./addTheme.native.mjs";
2
- export * from "./updateTheme.native.mjs";
3
- export * from "./replaceTheme.native.mjs";
4
- import { mutateThemes } from "./_mutateTheme.native.mjs";
5
- export { mutateThemes };
6
- //# sourceMappingURL=index.native.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["mutateThemes"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAASA,YAAA,QAAoB","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- import { _mutateTheme } from "./_mutateTheme.native.mjs";
2
- function replaceTheme(param) {
3
- var {
4
- name,
5
- theme
6
- } = param,
7
- next = _mutateTheme({
8
- name,
9
- theme,
10
- insertCSS: !0,
11
- mutationType: "replace"
12
- });
13
- return next;
14
- }
15
- export { replaceTheme };
16
- //# sourceMappingURL=replaceTheme.native.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_mutateTheme","replaceTheme","param","name","theme","next","insertCSS","mutationType"],"sources":["../../src/replaceTheme.ts"],"sourcesContent":[null],"mappings":"AAEA,SAASA,YAAA,QAAoB;AAEtB,SAASC,aAAaC,KAAA;EAC3B;MAAAC,IAAA;MAAAC;IAAA,IAAAF,KAAA;IAAAG,IAAA,GAAAL,YAAA;MACAG,IAAA;MAICC,KAAA;MAEDE,SADa;MAEfC,YAAA","ignoreList":[]}
@@ -1,15 +0,0 @@
1
- import { _mutateTheme } from "./_mutateTheme.native.mjs";
2
- function updateTheme(param) {
3
- var {
4
- name,
5
- theme
6
- } = param;
7
- return _mutateTheme({
8
- name,
9
- theme,
10
- insertCSS: !0,
11
- mutationType: "update"
12
- });
13
- }
14
- export { updateTheme };
15
- //# sourceMappingURL=updateTheme.native.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_mutateTheme","updateTheme","param","name","theme","insertCSS"],"sources":["../../src/updateTheme.ts"],"sourcesContent":[null],"mappings":"AAEA,SAASA,YAAA,QAAoB;AAEtB,SAASC,YAAYC,KAAA;EAC1B;IAAAC,IAAA;IAAAC;EAAA,IAAAF,KAAA;EACA,OAAAF,YAAA;IAICG,IAAA;IACDC,KAAO;IACTC,SAAA","ignoreList":[]}