tamagui 1.75.5 → 1.75.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/setup.js CHANGED
@@ -1,3 +1,23 @@
1
- var import_polyfill_dev = require("@tamagui/polyfill-dev");
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ };
12
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
13
+ // If the importer is in node compatibility mode or this is not an ESM
14
+ // file that has been converted to a CommonJS file using a Babel-
15
+ // compatible transform (i.e. "__esModule" has not been set), then set
16
+ // "default" to the CommonJS "module.exports" for node compatibility.
17
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
18
+ mod
19
+ ));
20
+ var import_polyfill_dev = require("@tamagui/polyfill-dev"), React = __toESM(require("react"));
21
+ globalThis.React ||= React;
2
22
  typeof requestAnimationFrame > "u" && (globalThis.requestAnimationFrame = setImmediate);
3
23
  //# sourceMappingURL=setup.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/setup.ts"],
4
- "mappings": "AAAA,0BAAO;AAGH,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA,0BAAO,kCAEP,QAAuB;AAIvB,WAAW,UAAa;AAGpB,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
5
5
  "names": []
6
6
  }
@@ -1,4 +1,24 @@
1
1
  "use strict";
2
- var import_polyfill_dev = require("@tamagui/polyfill-dev");
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from == "object" || typeof from == "function")
9
+ for (let key of __getOwnPropNames(from))
10
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ return to;
12
+ };
13
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
14
+ // If the importer is in node compatibility mode or this is not an ESM
15
+ // file that has been converted to a CommonJS file using a Babel-
16
+ // compatible transform (i.e. "__esModule" has not been set), then set
17
+ // "default" to the CommonJS "module.exports" for node compatibility.
18
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
19
+ mod
20
+ ));
21
+ var import_polyfill_dev = require("@tamagui/polyfill-dev"), React = __toESM(require("react"));
22
+ globalThis.React ||= React;
3
23
  typeof requestAnimationFrame > "u" && (globalThis.requestAnimationFrame = setImmediate);
4
24
  //# sourceMappingURL=setup.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/setup.ts"],
4
- "mappings": ";AAAA,0BAAO;AAGH,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA,0BAAO,kCAEP,QAAuB;AAIvB,WAAW,UAAa;AAGpB,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
5
5
  "names": []
6
6
  }
package/dist/esm/setup.js CHANGED
@@ -1,3 +1,5 @@
1
1
  import "@tamagui/polyfill-dev";
2
+ import * as React from "react";
3
+ globalThis.React ||= React;
2
4
  typeof requestAnimationFrame > "u" && (globalThis.requestAnimationFrame = setImmediate);
3
5
  //# sourceMappingURL=setup.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/setup.ts"],
4
- "mappings": "AAAA,OAAO;AAGH,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
4
+ "mappings": "AAAA,OAAO;AAEP,YAAY,WAAW;AAIvB,WAAW,UAAa;AAGpB,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
5
5
  "names": []
6
6
  }
@@ -1,3 +1,5 @@
1
1
  import "@tamagui/polyfill-dev";
2
+ import * as React from "react";
3
+ globalThis.React ||= React;
2
4
  typeof requestAnimationFrame > "u" && (globalThis.requestAnimationFrame = setImmediate);
3
5
  //# sourceMappingURL=setup.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/setup.ts"],
4
- "mappings": "AAAA,OAAO;AAGH,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
4
+ "mappings": "AAAA,OAAO;AAEP,YAAY,WAAW;AAIvB,WAAW,UAAa;AAGpB,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
5
5
  "names": []
6
6
  }
package/dist/jsx/setup.js CHANGED
@@ -1,3 +1,5 @@
1
1
  import "@tamagui/polyfill-dev";
2
+ import * as React from "react";
3
+ globalThis.React ||= React;
2
4
  typeof requestAnimationFrame > "u" && (globalThis.requestAnimationFrame = setImmediate);
3
5
  //# sourceMappingURL=setup.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/setup.ts"],
4
- "mappings": "AAAA,OAAO;AAGH,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
4
+ "mappings": "AAAA,OAAO;AAEP,YAAY,WAAW;AAIvB,WAAW,UAAa;AAGpB,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
5
5
  "names": []
6
6
  }
@@ -1,3 +1,5 @@
1
1
  import "@tamagui/polyfill-dev";
2
+ import * as React from "react";
3
+ globalThis.React ||= React;
2
4
  typeof requestAnimationFrame > "u" && (globalThis.requestAnimationFrame = setImmediate);
3
5
  //# sourceMappingURL=setup.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/setup.ts"],
4
- "mappings": "AAAA,OAAO;AAGH,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
4
+ "mappings": "AAAA,OAAO;AAEP,YAAY,WAAW;AAIvB,WAAW,UAAa;AAGpB,OAAO,wBAA0B,QACnC,WAAW,wBAA2B;",
5
5
  "names": []
6
6
  }
package/dist/native.js CHANGED
@@ -3437,9 +3437,7 @@ var require_ThemeManager_native = __commonJS({
3437
3437
  return this.updateState(nextState, shouldNotify), nextState;
3438
3438
  }
3439
3439
  updateState(nextState, shouldNotify = !0) {
3440
- this.state = nextState, this._allKeys = null, process.env.NODE_ENV !== "production" && (this._numChangeEventsSent ??= 0, this._numChangeEventsSent++), shouldNotify && queueMicrotask(() => {
3441
- this.notify();
3442
- });
3440
+ this.state = nextState, this._allKeys = null, process.env.NODE_ENV !== "production" && (this._numChangeEventsSent ??= 0, this._numChangeEventsSent++), shouldNotify && this.notify();
3443
3441
  }
3444
3442
  getStateIfChanged(props = this.props, state = this.state, parentManager = this.parentManager) {
3445
3443
  let _ = this.getState(props, parentManager);
@@ -3486,7 +3484,7 @@ var require_ThemeManager_native = __commonJS({
3486
3484
  let nextName = props.reset ? baseName : props.name || "", allComponentThemes = componentManagers.map((x) => (x == null ? void 0 : x.state.name) || "");
3487
3485
  isDirectParentAComponentTheme && allComponentThemes.shift();
3488
3486
  let base = baseName.split(import_constants2.THEME_NAME_SEPARATOR), max2 = base.length, min2 = props.componentName && !nextName ? max2 : 0;
3489
- process.env.NODE_ENV !== "production" && typeof props.debug == "string" && (console.groupCollapsed("ThemeManager.getState()"), console.info({ props, baseName, base, min: min2, max: max2 }));
3487
+ process.env.NODE_ENV !== "production" && typeof props.debug == "string" && typeof window < "u" && (console.groupCollapsed("ThemeManager.getState()"), console.info({ props, baseName, base, min: min2, max: max2 }));
3490
3488
  for (let i = max2; i >= min2; i--) {
3491
3489
  let prefix = base.slice(0, i).join(import_constants2.THEME_NAME_SEPARATOR);
3492
3490
  props.inverse && (prefix = inverseThemeName(prefix));
@@ -3676,9 +3674,9 @@ If this is intended and you are using Tamagui without any themes, you can disabl
3676
3674
  let cur = manager;
3677
3675
  for (; cur; ) {
3678
3676
  if (!cur.parentManager)
3679
- return !0;
3680
- if (cur.parentManager.state.scheme !== cur.state.scheme)
3681
3677
  return !1;
3678
+ if (cur.parentManager.state.scheme !== cur.state.scheme)
3679
+ return !0;
3682
3680
  cur = cur.parentManager;
3683
3681
  }
3684
3682
  }
@@ -3717,14 +3715,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
3717
3715
  }), disposeChangeListener = parentManager == null ? void 0 : parentManager.onChangeTheme(
3718
3716
  (name, manager, forced) => {
3719
3717
  let force = forced || (shouldUpdate == null ? void 0 : shouldUpdate()) || props.deopt || props["disable-child-theme"], shouldTryUpdate = force ?? !!(keys != null && keys.length || isNewTheme);
3720
- process.env.NODE_ENV === "development" && props.debug && console.info(" \u{1F538} onChange", themeManager.id, {
3721
- force,
3722
- shouldTryUpdate,
3723
- props,
3724
- name,
3725
- manager,
3726
- keys
3727
- }), shouldTryUpdate && setThemeState(createState);
3718
+ process.env.NODE_ENV === "development" && props.debug === "verbose" && console.info(" \u{1F538} onChange", themeManager.id, { force, shouldTryUpdate, props, name, manager, keys }), shouldTryUpdate && setThemeState(createState);
3728
3719
  },
3729
3720
  themeManager.id
3730
3721
  );
@@ -11892,8 +11883,11 @@ var require_useCurrentColor_native = __commonJS({
11892
11883
  });
11893
11884
  module2.exports = __toCommonJS2(useCurrentColor_exports);
11894
11885
  var import_web = require_index_native9(), useCurrentColor = (colorProp) => {
11886
+ var _a;
11895
11887
  let theme = (0, import_web.useTheme)();
11896
- return (0, import_web.getVariable)(colorProp || theme[colorProp] || theme.color);
11888
+ return (0, import_web.getVariable)(
11889
+ colorProp || ((_a = theme[colorProp]) == null ? void 0 : _a.get("web")) || theme.color.get("web")
11890
+ );
11897
11891
  };
11898
11892
  }
11899
11893
  });