tamagui 1.75.4 → 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 +21 -1
- package/dist/cjs/setup.js.map +1 -1
- package/dist/cjs/setup.native.js +21 -1
- package/dist/cjs/setup.native.js.map +1 -1
- package/dist/cjs/views/Anchor.js +1 -1
- package/dist/cjs/views/Input.js +1 -1
- package/dist/cjs/views/Spinner.js +1 -1
- package/dist/esm/setup.js +2 -0
- package/dist/esm/setup.js.map +1 -1
- package/dist/esm/setup.native.js +2 -0
- package/dist/esm/setup.native.js.map +1 -1
- package/dist/esm/views/Anchor.js +1 -1
- package/dist/esm/views/Input.js +1 -1
- package/dist/esm/views/Spinner.js +1 -1
- package/dist/jsx/setup.js +2 -0
- package/dist/jsx/setup.js.map +1 -1
- package/dist/jsx/setup.native.js +2 -0
- package/dist/jsx/setup.native.js.map +1 -1
- package/dist/jsx/views/Anchor.js +1 -1
- package/dist/jsx/views/Input.js +1 -1
- package/dist/jsx/views/Spinner.js +1 -1
- package/dist/native.js +9 -15
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +8 -7
- package/dist/test.native.js.map +1 -1
- package/package.json +52 -52
- package/src/setup.ts +6 -0
package/dist/cjs/setup.js
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
var
|
|
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
|
package/dist/cjs/setup.js.map
CHANGED
package/dist/cjs/setup.native.js
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
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
|
package/dist/cjs/views/Anchor.js
CHANGED
|
@@ -17,7 +17,7 @@ __export(Anchor_exports, {
|
|
|
17
17
|
Anchor: () => Anchor
|
|
18
18
|
});
|
|
19
19
|
module.exports = __toCommonJS(Anchor_exports);
|
|
20
|
-
var import_core = require("@tamagui/core"), import_text = require("@tamagui/text"), import_react_native = require("react-native"), import_jsx_runtime = require("react/jsx-runtime");
|
|
20
|
+
var import_core = require("@tamagui/core"), import_text = require("@tamagui/text"), import_react_native = require("react-native-web"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
21
|
const AnchorFrame = (0, import_core.styled)(import_text.SizableText, {
|
|
22
22
|
name: "Anchor",
|
|
23
23
|
tag: "a",
|
package/dist/cjs/views/Input.js
CHANGED
|
@@ -20,7 +20,7 @@ __export(Input_exports, {
|
|
|
20
20
|
useInputProps: () => useInputProps
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(Input_exports);
|
|
23
|
-
var import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react_native = require("react-native"), import_inputHelpers = require("../helpers/inputHelpers"), import_jsx_runtime = require("react/jsx-runtime");
|
|
23
|
+
var import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react_native = require("react-native-web"), import_inputHelpers = require("../helpers/inputHelpers"), import_jsx_runtime = require("react/jsx-runtime");
|
|
24
24
|
const defaultStyles = {
|
|
25
25
|
size: "$true",
|
|
26
26
|
fontFamily: "$body",
|
|
@@ -25,7 +25,7 @@ __export(Spinner_exports, {
|
|
|
25
25
|
Spinner: () => Spinner
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(Spinner_exports);
|
|
28
|
-
var import_core = require("@tamagui/core"), import_stacks = require("@tamagui/stacks"), React = __toESM(require("react")), import_react_native = require("react-native"), import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
+
var import_core = require("@tamagui/core"), import_stacks = require("@tamagui/stacks"), React = __toESM(require("react")), import_react_native = require("react-native-web"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
29
|
const Spinner = import_stacks.YStack.extractable(
|
|
30
30
|
(0, import_core.themeable)(
|
|
31
31
|
React.forwardRef((props, ref) => {
|
package/dist/esm/setup.js
CHANGED
package/dist/esm/setup.js.map
CHANGED
package/dist/esm/setup.native.js
CHANGED
package/dist/esm/views/Anchor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isWeb, styled } from "@tamagui/core";
|
|
2
2
|
import { SizableText } from "@tamagui/text";
|
|
3
|
-
import { Linking } from "react-native";
|
|
3
|
+
import { Linking } from "react-native-web";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const AnchorFrame = styled(SizableText, {
|
|
6
6
|
name: "Anchor",
|
package/dist/esm/views/Input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isWeb, styled, useTheme } from "@tamagui/core";
|
|
2
2
|
import { useFocusable } from "@tamagui/focusable";
|
|
3
|
-
import { TextInput } from "react-native";
|
|
3
|
+
import { TextInput } from "react-native-web";
|
|
4
4
|
import { inputSizeVariant } from "../helpers/inputHelpers";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
const defaultStyles = {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "@tamagui/core";
|
|
6
6
|
import { YStack } from "@tamagui/stacks";
|
|
7
7
|
import * as React from "react";
|
|
8
|
-
import { ActivityIndicator } from "react-native";
|
|
8
|
+
import { ActivityIndicator } from "react-native-web";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
const Spinner = YStack.extractable(
|
|
11
11
|
themeable(
|
package/dist/jsx/setup.js
CHANGED
package/dist/jsx/setup.js.map
CHANGED
package/dist/jsx/setup.native.js
CHANGED
package/dist/jsx/views/Anchor.js
CHANGED
package/dist/jsx/views/Input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isWeb, styled, useTheme } from "@tamagui/core";
|
|
2
2
|
import { useFocusable } from "@tamagui/focusable";
|
|
3
|
-
import { TextInput } from "react-native";
|
|
3
|
+
import { TextInput } from "react-native-web";
|
|
4
4
|
import { inputSizeVariant } from "../helpers/inputHelpers";
|
|
5
5
|
const defaultStyles = {
|
|
6
6
|
size: "$true",
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "@tamagui/core";
|
|
6
6
|
import { YStack } from "@tamagui/stacks";
|
|
7
7
|
import * as React from "react";
|
|
8
|
-
import { ActivityIndicator } from "react-native";
|
|
8
|
+
import { ActivityIndicator } from "react-native-web";
|
|
9
9
|
const Spinner = YStack.extractable(
|
|
10
10
|
themeable(
|
|
11
11
|
React.forwardRef((props, ref) => {
|
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 &&
|
|
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)(
|
|
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
|
});
|