@tamagui/web 1.108.0 → 1.108.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.
- package/dist/cjs/_withStableStyle.js +12 -4
- package/dist/cjs/_withStableStyle.js.map +2 -2
- package/dist/cjs/_withStableStyle.native.js +12 -4
- package/dist/cjs/_withStableStyle.native.js.map +2 -2
- package/dist/cjs/createComponent.js +18 -18
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createComponent.native.js +18 -18
- package/dist/cjs/createComponent.native.js.map +2 -2
- package/dist/cjs/helpers/ThemeManagerContext.js +12 -4
- package/dist/cjs/helpers/ThemeManagerContext.js.map +2 -2
- package/dist/cjs/helpers/ThemeManagerContext.native.js +11 -3
- package/dist/cjs/helpers/ThemeManagerContext.native.js.map +2 -2
- package/dist/cjs/helpers/createStyledContext.js +15 -7
- package/dist/cjs/helpers/createStyledContext.js.map +2 -2
- package/dist/cjs/helpers/createStyledContext.native.js +15 -7
- package/dist/cjs/helpers/createStyledContext.native.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +12 -4
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.native.js +13 -5
- package/dist/cjs/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/cjs/helpers/isTamaguiElement.js +12 -4
- package/dist/cjs/helpers/isTamaguiElement.js.map +2 -2
- package/dist/cjs/helpers/isTamaguiElement.native.js +12 -4
- package/dist/cjs/helpers/isTamaguiElement.native.js.map +2 -2
- package/dist/cjs/helpers/themeable.js +12 -4
- package/dist/cjs/helpers/themeable.js.map +2 -2
- package/dist/cjs/helpers/themeable.native.js +12 -4
- package/dist/cjs/helpers/themeable.native.js.map +2 -2
- package/dist/cjs/hooks/useConfiguration.js +12 -4
- package/dist/cjs/hooks/useConfiguration.js.map +2 -2
- package/dist/cjs/hooks/useConfiguration.native.js +12 -4
- package/dist/cjs/hooks/useConfiguration.native.js.map +2 -2
- package/dist/cjs/hooks/useDidHydrateOnce.js +12 -4
- package/dist/cjs/hooks/useDidHydrateOnce.js.map +2 -2
- package/dist/cjs/hooks/useDidHydrateOnce.native.js +12 -4
- package/dist/cjs/hooks/useDidHydrateOnce.native.js.map +2 -2
- package/dist/cjs/hooks/useMedia.js +14 -6
- package/dist/cjs/hooks/useMedia.js.map +2 -2
- package/dist/cjs/hooks/useMedia.native.js +14 -6
- package/dist/cjs/hooks/useMedia.native.js.map +2 -2
- package/dist/cjs/hooks/useProps.js +13 -5
- package/dist/cjs/hooks/useProps.js.map +2 -2
- package/dist/cjs/hooks/useProps.native.js +13 -5
- package/dist/cjs/hooks/useProps.native.js.map +2 -2
- package/dist/cjs/hooks/useTheme.js +17 -9
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/cjs/hooks/useTheme.native.js +17 -9
- package/dist/cjs/hooks/useTheme.native.js.map +2 -2
- package/dist/cjs/hooks/useThemeName.js +12 -4
- package/dist/cjs/hooks/useThemeName.js.map +2 -2
- package/dist/cjs/hooks/useThemeName.native.js +12 -4
- package/dist/cjs/hooks/useThemeName.native.js.map +2 -2
- package/dist/cjs/html.js +219 -0
- package/dist/cjs/html.js.map +6 -0
- package/dist/cjs/html.native.js +437 -0
- package/dist/cjs/html.native.js.map +6 -0
- package/dist/cjs/setupHooks.native.js +1 -1
- package/dist/cjs/setupHooks.native.js.map +1 -1
- package/dist/cjs/views/Configuration.js +12 -4
- package/dist/cjs/views/Configuration.js.map +2 -2
- package/dist/cjs/views/Configuration.native.js +12 -4
- package/dist/cjs/views/Configuration.native.js.map +2 -2
- package/dist/cjs/views/FontLanguage.native.js +12 -4
- package/dist/cjs/views/FontLanguage.native.js.map +2 -2
- package/dist/cjs/views/TamaguiProvider.js +13 -5
- package/dist/cjs/views/TamaguiProvider.js.map +2 -2
- package/dist/cjs/views/TamaguiProvider.native.js +13 -5
- package/dist/cjs/views/TamaguiProvider.native.js.map +2 -2
- package/dist/cjs/views/ThemeDebug.js +14 -6
- package/dist/cjs/views/ThemeDebug.js.map +2 -2
- package/dist/cjs/views/ThemeProvider.js +12 -4
- package/dist/cjs/views/ThemeProvider.js.map +2 -2
- package/dist/cjs/views/ThemeProvider.native.js +12 -4
- package/dist/cjs/views/ThemeProvider.native.js.map +2 -2
- package/dist/esm/_withStableStyle.js +2 -2
- package/dist/esm/_withStableStyle.js.map +1 -1
- package/dist/esm/_withStableStyle.mjs +2 -2
- package/dist/esm/_withStableStyle.mjs.map +1 -1
- package/dist/esm/_withStableStyle.native.js +2 -2
- package/dist/esm/_withStableStyle.native.js.map +2 -2
- package/dist/esm/createComponent.js +20 -32
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createComponent.mjs +20 -20
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +18 -18
- package/dist/esm/createComponent.native.js.map +2 -2
- package/dist/esm/helpers/ThemeManagerContext.js +2 -2
- package/dist/esm/helpers/ThemeManagerContext.js.map +1 -1
- package/dist/esm/helpers/ThemeManagerContext.mjs +2 -2
- package/dist/esm/helpers/ThemeManagerContext.mjs.map +1 -1
- package/dist/esm/helpers/ThemeManagerContext.native.js +2 -2
- package/dist/esm/helpers/ThemeManagerContext.native.js.map +2 -2
- package/dist/esm/helpers/createStyledContext.js +5 -9
- package/dist/esm/helpers/createStyledContext.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.mjs +5 -5
- package/dist/esm/helpers/createStyledContext.mjs.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +5 -5
- package/dist/esm/helpers/createStyledContext.native.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +2 -2
- package/dist/esm/helpers/getSplitStyles.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +2 -2
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +3 -3
- package/dist/esm/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/esm/helpers/isTamaguiElement.js +2 -2
- package/dist/esm/helpers/isTamaguiElement.js.map +1 -1
- package/dist/esm/helpers/isTamaguiElement.mjs +2 -2
- package/dist/esm/helpers/isTamaguiElement.mjs.map +1 -1
- package/dist/esm/helpers/isTamaguiElement.native.js +2 -2
- package/dist/esm/helpers/isTamaguiElement.native.js.map +2 -2
- package/dist/esm/helpers/themeable.js +2 -2
- package/dist/esm/helpers/themeable.js.map +1 -1
- package/dist/esm/helpers/themeable.mjs +2 -2
- package/dist/esm/helpers/themeable.mjs.map +1 -1
- package/dist/esm/helpers/themeable.native.js +2 -2
- package/dist/esm/helpers/themeable.native.js.map +2 -2
- package/dist/esm/hooks/useConfiguration.js +2 -2
- package/dist/esm/hooks/useConfiguration.js.map +1 -1
- package/dist/esm/hooks/useConfiguration.mjs +2 -2
- package/dist/esm/hooks/useConfiguration.mjs.map +1 -1
- package/dist/esm/hooks/useConfiguration.native.js +2 -2
- package/dist/esm/hooks/useConfiguration.native.js.map +2 -2
- package/dist/esm/hooks/useDidHydrateOnce.js +2 -2
- package/dist/esm/hooks/useDidHydrateOnce.js.map +1 -1
- package/dist/esm/hooks/useDidHydrateOnce.mjs +2 -2
- package/dist/esm/hooks/useDidHydrateOnce.mjs.map +1 -1
- package/dist/esm/hooks/useDidHydrateOnce.native.js +2 -2
- package/dist/esm/hooks/useDidHydrateOnce.native.js.map +2 -2
- package/dist/esm/hooks/useMedia.js +4 -4
- package/dist/esm/hooks/useMedia.js.map +1 -1
- package/dist/esm/hooks/useMedia.mjs +4 -4
- package/dist/esm/hooks/useMedia.mjs.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +4 -4
- package/dist/esm/hooks/useMedia.native.js.map +2 -2
- package/dist/esm/hooks/useProps.js +3 -3
- package/dist/esm/hooks/useProps.js.map +1 -1
- package/dist/esm/hooks/useProps.mjs +3 -3
- package/dist/esm/hooks/useProps.mjs.map +1 -1
- package/dist/esm/hooks/useProps.native.js +3 -3
- package/dist/esm/hooks/useProps.native.js.map +2 -2
- package/dist/esm/hooks/useTheme.js +7 -7
- package/dist/esm/hooks/useTheme.js.map +1 -1
- package/dist/esm/hooks/useTheme.mjs +7 -7
- package/dist/esm/hooks/useTheme.mjs.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +7 -7
- package/dist/esm/hooks/useTheme.native.js.map +2 -2
- package/dist/esm/hooks/useThemeName.js +2 -2
- package/dist/esm/hooks/useThemeName.js.map +1 -1
- package/dist/esm/hooks/useThemeName.mjs +3 -3
- package/dist/esm/hooks/useThemeName.mjs.map +1 -1
- package/dist/esm/hooks/useThemeName.native.js +2 -2
- package/dist/esm/hooks/useThemeName.native.js.map +2 -2
- package/dist/esm/html.js +196 -0
- package/dist/esm/html.js.map +6 -0
- package/dist/esm/html.mjs +193 -0
- package/dist/esm/html.mjs.map +1 -0
- package/dist/esm/html.native.js +233 -0
- package/dist/esm/html.native.js.map +6 -0
- package/dist/esm/setupHooks.native.js +1 -0
- package/dist/esm/setupHooks.native.js.map +1 -1
- package/dist/esm/views/Configuration.js +2 -2
- package/dist/esm/views/Configuration.js.map +1 -1
- package/dist/esm/views/Configuration.mjs +2 -2
- package/dist/esm/views/Configuration.mjs.map +1 -1
- package/dist/esm/views/Configuration.native.js +2 -2
- package/dist/esm/views/Configuration.native.js.map +2 -2
- package/dist/esm/views/FontLanguage.native.js +2 -2
- package/dist/esm/views/FontLanguage.native.js.map +2 -2
- package/dist/esm/views/TamaguiProvider.js +3 -3
- package/dist/esm/views/TamaguiProvider.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs +3 -3
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +3 -3
- package/dist/esm/views/TamaguiProvider.native.js.map +2 -2
- package/dist/esm/views/ThemeDebug.js +4 -4
- package/dist/esm/views/ThemeDebug.js.map +1 -1
- package/dist/esm/views/ThemeDebug.mjs +5 -5
- package/dist/esm/views/ThemeDebug.mjs.map +1 -1
- package/dist/esm/views/ThemeProvider.js +2 -2
- package/dist/esm/views/ThemeProvider.js.map +1 -1
- package/dist/esm/views/ThemeProvider.mjs +2 -2
- package/dist/esm/views/ThemeProvider.mjs.map +1 -1
- package/dist/esm/views/ThemeProvider.native.js +2 -2
- package/dist/esm/views/ThemeProvider.native.js.map +2 -2
- package/package.json +12 -12
- package/src/_withStableStyle.tsx +2 -2
- package/src/createComponent.tsx +25 -34
- package/src/helpers/ThemeManagerContext.tsx +2 -2
- package/src/helpers/createStyledContext.tsx +7 -12
- package/src/helpers/getSplitStyles.tsx +3 -2
- package/src/helpers/isTamaguiElement.tsx +2 -2
- package/src/helpers/themeable.tsx +5 -2
- package/src/hooks/useConfiguration.tsx +3 -2
- package/src/hooks/useDidHydrateOnce.tsx +2 -2
- package/src/hooks/useMedia.tsx +4 -4
- package/src/hooks/useProps.tsx +3 -3
- package/src/hooks/useTheme.tsx +7 -7
- package/src/hooks/useThemeName.tsx +3 -3
- package/src/setupHooks.ts +1 -1
- package/src/views/Configuration.tsx +2 -2
- package/src/views/FontLanguage.native.tsx +2 -2
- package/src/views/TamaguiProvider.tsx +4 -3
- package/src/views/ThemeDebug.tsx +7 -10
- package/src/views/ThemeProvider.tsx +2 -2
- package/types/_withStableStyle.d.ts +2 -1
- package/types/_withStableStyle.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/ThemeManagerContext.d.ts +2 -1
- package/types/helpers/ThemeManagerContext.d.ts.map +1 -1
- package/types/helpers/createStyledContext.d.ts +1 -1
- package/types/helpers/createStyledContext.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/isTamaguiElement.d.ts +1 -0
- package/types/helpers/isTamaguiElement.d.ts.map +1 -1
- package/types/helpers/themeable.d.ts.map +1 -1
- package/types/hooks/useConfiguration.d.ts.map +1 -1
- package/types/html.d.ts.map +1 -0
- package/types/views/Configuration.d.ts +1 -0
- package/types/views/Configuration.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
- package/types/views/ThemeDebug.d.ts.map +1 -1
- package/types/views/html.d.ts.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
7
|
for (var name in all)
|
|
7
8
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -11,13 +12,20 @@ var __export = (target, all) => {
|
|
|
11
12
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
13
|
return to;
|
|
13
14
|
};
|
|
14
|
-
var
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
23
|
var TamaguiProvider_exports = {};
|
|
16
24
|
__export(TamaguiProvider_exports, {
|
|
17
25
|
TamaguiProvider: () => TamaguiProvider
|
|
18
26
|
});
|
|
19
27
|
module.exports = __toCommonJS(TamaguiProvider_exports);
|
|
20
|
-
var
|
|
28
|
+
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_ComponentContext = require("../contexts/ComponentContext"), import_useDidHydrateOnce = require("../hooks/useDidHydrateOnce"), import_useMedia = require("../hooks/useMedia"), import_ThemeProvider = require("./ThemeProvider"), import_config = require("../config"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
29
|
function TamaguiProvider({
|
|
22
30
|
children,
|
|
23
31
|
disableInjectCSS,
|
|
@@ -48,8 +56,8 @@ function TamaguiProvider({
|
|
|
48
56
|
) }) });
|
|
49
57
|
}
|
|
50
58
|
function UnmountedClassName(props) {
|
|
51
|
-
const [mounted, setMounted] =
|
|
52
|
-
return
|
|
59
|
+
const [mounted, setMounted] = import_react.default.useState(!1);
|
|
60
|
+
return import_react.default.useEffect(() => {
|
|
53
61
|
setMounted(!0);
|
|
54
62
|
}, []), import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { display: "contents" }, className: mounted ? "" : "t_unmounted", children: props.children }) : props.children;
|
|
55
63
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/TamaguiProvider.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": []
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,2BAClB,mBAA2D,+BAE3D,0BAAiC,yCACjC,2BAAsC,uCACtC,kBAAoC,8BAEpC,uBAA8B,4BAC9B,gBAA2B,sBAkCnB;AAhCD,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,kDAAoB,GAEhB,kCAEF,gDAAsB,OAEtB,4CAA0B,MAAM;AAC9B,QAAK,UACD,CAAC,kBAAkB;AACrB,YAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,mBAAM,YAAY,SAAS,eAAe,OAAO,OAAO,CAAC,CAAC,GAC1D,SAAS,KAAK,YAAY,KAAK,GACxB,MAAM;AACX,iBAAS,KAAK,YAAY,KAAK;AAAA,MACjC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC,IAI7B,4CAAC,sBACC,sDAAC,yCAAiB,UAAjB,EAA0B,iBAAiB,QAAQ,YAClD;AAAA,IAAC;AAAA;AAAA,MACC,sBACE,4BAAwB,0BAAW,sBAAsB;AAAA,MAE3D,uBACE,6BAAyB,0BAAW,uBAAuB;AAAA,MAE7D,cAAc,iBAAiB,SAAS,OAAO,KAAK,OAAO,MAAM,EAAE,CAAC,IAAI;AAAA,MACxE;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,EACH,GACF,GACF;AAEJ;AAGA,SAAS,mBAAmB,OAAsC;AAChE,QAAM,CAAC,SAAS,UAAU,IAAI,aAAAA,QAAM,SAAS,EAAK;AAMlD,SAJA,aAAAA,QAAM,UAAU,MAAM;AACpB,eAAW,EAAI;AAAA,EACjB,GAAG,CAAC,CAAC,GAEA,yBAKH,4CAAC,UAAK,OAAO,EAAE,SAAS,WAAW,GAAG,WAAW,UAAU,KAAK,eAC7D,gBAAM,UACT,IANO,MAAM;AAQjB;AAEA,gBAAgB,cAAiB;",
|
|
5
|
+
"names": ["React"]
|
|
6
6
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
8
|
for (var name in all)
|
|
8
9
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -12,13 +13,20 @@ var __export = (target, all) => {
|
|
|
12
13
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
14
|
return to;
|
|
14
15
|
};
|
|
15
|
-
var
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
24
|
var TamaguiProvider_exports = {};
|
|
17
25
|
__export(TamaguiProvider_exports, {
|
|
18
26
|
TamaguiProvider: () => TamaguiProvider
|
|
19
27
|
});
|
|
20
28
|
module.exports = __toCommonJS(TamaguiProvider_exports);
|
|
21
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_ComponentContext = require("../contexts/ComponentContext"), import_useDidHydrateOnce = require("../hooks/useDidHydrateOnce"), import_useMedia = require("../hooks/useMedia"), import_ThemeProvider = require("./ThemeProvider"), import_config = require("../config");
|
|
22
30
|
function _array_like_to_array(arr, len) {
|
|
23
31
|
(len == null || len > arr.length) && (len = arr.length);
|
|
24
32
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -87,8 +95,8 @@ function TamaguiProvider(param) {
|
|
|
87
95
|
});
|
|
88
96
|
}
|
|
89
97
|
function UnmountedClassName(props) {
|
|
90
|
-
var
|
|
91
|
-
return
|
|
98
|
+
var _React_useState = _sliced_to_array(import_react.default.useState(!1), 2), mounted = _React_useState[0], setMounted = _React_useState[1];
|
|
99
|
+
return import_react.default.useEffect(function() {
|
|
92
100
|
setMounted(!0);
|
|
93
101
|
}, []), import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
94
102
|
style: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Users/n8/tamagui/code/core/web/src/views/TamaguiProvider.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["TamaguiProvider", "children", "disableInjectCSS", "config", "className", "defaultTheme", "disableRootThemeClass", "reset", "themeClassNameOnRoot", "setupMediaListeners", "isClient", "useDidHydrateOnceRoot", "useIsomorphicLayoutEffect", "style", "document", "createElement", "appendChild", "createTextNode", "getCSS", "head", "removeChild", "_jsx", "UnmountedClassName", "ComponentContext", "Provider", "animationDriver", "animations", "ThemeProvider", "getSetting", "Object", "keys", "themes", "props", "useState", "mounted", "setMounted", "useEffect", "isWeb", "span", "display"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,eAAkB,2BAClB,mBAA2D,+BAE3D,0BAAiC,yCACjC,2BAAsC,uCACtC,kBAAoC,8BAEpC,uBAA8B,4BAC9B,gBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEpB,SAASA,gBAAgB,OAST;MARrBC,WAD8B,MAC9BA,UACAC,mBAF8B,MAE9BA,kBACAC,SAH8B,MAG9BA,QACAC,YAJ8B,MAI9BA,WACAC,eAL8B,MAK9BA,cACAC,wBAN8B,MAM9BA,uBACAC,QAP8B,MAO9BA,OACAC,uBAR8B,MAQ9BA;AAEAC,kDAAAA,GAEIC,kCAEFC,gDAAAA,OAEAC,4CAA0B,WAAA;AACxB,QAAKT,UACD,CAACD,kBAAkB;AACrB,UAAMW,QAAQC,SAASC,cAAc,OAAA;AACrCF,mBAAMG,YAAYF,SAASG,eAAed,OAAOe,OAAM,CAAA,CAAA,GACvDJ,SAASK,KAAKH,YAAYH,KAAAA,GACnB,WAAA;AACLC,iBAASK,KAAKC,YAAYP,KAAAA;MAC5B;IACF;EACF,GAAG;IAACV;IAAQD;GAAiB,IAI7B,uCAAAmB,KAACC,oBAAAA;cACC,uCAAAD,KAACE,yCAAiBC,UAAQ;MAACC,iBAAiBtB,UAAAA,OAAAA,SAAAA,OAAQuB;gBAClD,uCAAAL,KAACM,oCAAAA;QACCnB,sBACEA,4BAAwBoB,0BAAW,sBAAA;QAErCtB,uBACEA,6BAAyBsB,0BAAW,uBAAA;QAEtCvB,cAAcA,iBAAiBF,SAAS0B,OAAOC,KAAK3B,OAAO4B,MAAM,EAAE,CAAA,IAAK;QACxExB;QACAH;;;;;AAOV;AAGA,SAASkB,mBAAmBU,OAAoC;AAC9D,MAA8BC,kBAAAA,iBAAAA,aAAAA,QAAMC,SAAS,EAAA,GAAA,CAAA,GAAtCC,UAAuBF,gBAAAA,CAAAA,GAAdG,aAAcH,gBAAAA,CAAAA;AAM9B,SAJAA,aAAAA,QAAMI,UAAU,WAAA;AACdD,eAAW,EAAA;EACb,GAAG,CAAA,CAAE,GAEAE,yBAKH,uCAAAjB,KAACkB,QAAAA;IAAK1B,OAAO;MAAE2B,SAAS;IAAW;IAAGpC,WAAW+B,UAAU,KAAK;cAC7DH,MAAM/B;OALF+B,MAAM/B;AAQjB;AAEAD,gBAAgB,cAAiB;",
|
|
5
|
+
"names": ["TamaguiProvider", "children", "disableInjectCSS", "config", "className", "defaultTheme", "disableRootThemeClass", "reset", "themeClassNameOnRoot", "setupMediaListeners", "isClient", "useDidHydrateOnceRoot", "useIsomorphicLayoutEffect", "style", "document", "createElement", "appendChild", "createTextNode", "getCSS", "head", "removeChild", "_jsx", "UnmountedClassName", "ComponentContext", "Provider", "animationDriver", "animations", "ThemeProvider", "getSetting", "Object", "keys", "themes", "props", "React", "useState", "mounted", "setMounted", "useEffect", "isWeb", "span", "display"]
|
|
6
6
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
7
|
for (var name in all)
|
|
7
8
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -11,13 +12,20 @@ var __export = (target, all) => {
|
|
|
11
12
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
13
|
return to;
|
|
13
14
|
};
|
|
14
|
-
var
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
23
|
var ThemeDebug_exports = {};
|
|
16
24
|
__export(ThemeDebug_exports, {
|
|
17
25
|
ThemeDebug: () => ThemeDebug
|
|
18
26
|
});
|
|
19
27
|
module.exports = __toCommonJS(ThemeDebug_exports);
|
|
20
|
-
var import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"), import_use_force_update = require("@tamagui/use-force-update"),
|
|
28
|
+
var import_react = __toESM(require("react")), import_use_did_finish_ssr = require("@tamagui/use-did-finish-ssr"), import_use_force_update = require("@tamagui/use-force-update"), import_react_dom = require("react-dom"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
29
|
let node;
|
|
22
30
|
function ThemeDebug({
|
|
23
31
|
themeState,
|
|
@@ -25,15 +33,15 @@ function ThemeDebug({
|
|
|
25
33
|
children
|
|
26
34
|
}) {
|
|
27
35
|
if (process.env.NODE_ENV === "development") {
|
|
28
|
-
const isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), [onChangeCount, setOnChangeCount] =
|
|
29
|
-
return process.env.NODE_ENV === "development" && typeof document < "u" && (node || (node = document.createElement("div"), node.style.height = "200px", node.style.overflowY = "scroll", node.style.position = "fixed", node.style.zIndex = 1e7, node.style.bottom = "30px", node.style.left = "30px", node.style.right = "30px", node.style.display = "flex", node.style.border = "1px solid #888", node.style.flexDirection = "row", node.style.background = "var(--background)", document.body.appendChild(node))),
|
|
36
|
+
const isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), [onChangeCount, setOnChangeCount] = import_react.default.useState(0), rerender = (0, import_use_force_update.useForceUpdate)(), id = import_react.default.useId();
|
|
37
|
+
return process.env.NODE_ENV === "development" && typeof document < "u" && (node || (node = document.createElement("div"), node.style.height = "200px", node.style.overflowY = "scroll", node.style.position = "fixed", node.style.zIndex = 1e7, node.style.bottom = "30px", node.style.left = "30px", node.style.right = "30px", node.style.display = "flex", node.style.border = "1px solid #888", node.style.flexDirection = "row", node.style.background = "var(--background)", document.body.appendChild(node))), import_react.default.useEffect(() => {
|
|
30
38
|
themeState.themeManager?.parentManager?.onChangeTheme((name, manager) => {
|
|
31
39
|
setOnChangeCount((p) => ++p), console.warn(
|
|
32
40
|
`theme changed for ${themeState.themeManager?.id} from parent ${themeState.themeManager?.parentManager?.id} to new name`,
|
|
33
41
|
name
|
|
34
42
|
);
|
|
35
43
|
});
|
|
36
|
-
}, [themeState.themeManager]),
|
|
44
|
+
}, [themeState.themeManager]), import_react.default.useEffect(() => {
|
|
37
45
|
const tm = setInterval(rerender, 1e3);
|
|
38
46
|
return () => clearTimeout(tm);
|
|
39
47
|
}, []), themeProps["disable-child-theme"] || !isHydrated ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeDebug.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": []
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,2BAClB,4BAAgC,wCAChC,0BAA+B,sCAE/B,mBAA6B,sBAyDvB;AApDN,IAAI;AAEG,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAAgF;AAC9E,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,UAAM,iBAAa,2CAAgB,GAC7B,CAAC,eAAe,gBAAgB,IAAI,aAAAA,QAAM,SAAS,CAAC,GACpD,eAAW,wCAAe,GAC1B,KAAK,aAAAA,QAAM,MAAM;AAoCvB,WAlCI,QAAQ,IAAI,aAAa,iBAAiB,OAAO,WAAa,QAC3D,SACH,OAAO,SAAS,cAAc,KAAK,GACnC,KAAK,MAAM,SAAS,SACpB,KAAK,MAAM,YAAY,UACvB,KAAK,MAAM,WAAW,SACtB,KAAK,MAAM,SAAS,KACpB,KAAK,MAAM,SAAS,QACpB,KAAK,MAAM,OAAO,QAClB,KAAK,MAAM,QAAQ,QACnB,KAAK,MAAM,UAAU,QACrB,KAAK,MAAM,SAAS,kBACpB,KAAK,MAAM,gBAAgB,OAC3B,KAAK,MAAM,aAAa,qBACxB,SAAS,KAAK,YAAY,IAAI,KAIlC,aAAAA,QAAM,UAAU,MAAM;AACpB,iBAAW,cAAc,eAAe,cAAc,CAAC,MAAM,YAAY;AACvE,yBAAiB,CAAC,MAAM,EAAE,CAAC,GAC3B,QAAQ;AAAA,UACN,qBAAqB,WAAW,cAAc,EAAE,gBAAgB,WAAW,cAAc,eAAe,EAAE;AAAA,UAC1G;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,GAAG,CAAC,WAAW,YAAY,CAAC,GAE5B,aAAAA,QAAM,UAAU,MAAM;AAEpB,YAAM,KAAK,YAAY,UAAU,GAAI;AACrC,aAAO,MAAM,aAAa,EAAS;AAAA,IACrC,GAAG,CAAC,CAAC,GAED,WAAW,qBAAqB,KAAK,CAAC,aACjC,WAIP,4EACG;AAAA;AAAA,QACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,YAAY;AAAA,cACZ,UAAU;AAAA,cACV,UAAU;AAAA,cACV,SAAS;AAAA,YACX;AAAA,YACD;AAAA;AAAA,cACY;AAAA,cAAG;AAAA,cACb,KAAK;AAAA,gBACJ;AAAA,kBACE,WAAW,WAAW;AAAA,kBACtB,MAAM,YAAY,OAAO;AAAA,kBACzB,WAAW,YAAY,OAAO;AAAA,kBAC9B,SAAS,WAAW;AAAA,kBACpB,gBAAgB,WAAW;AAAA,kBAC3B,QAAQ,WAAW,cAAc,MAAM;AAAA,kBACvC,IAAI,WAAW,cAAc;AAAA,kBAC7B,UAAU,WAAW,cAAc,eAAe;AAAA,kBAClD,OAAO,WAAW;AAAA,kBAClB;AAAA,kBACA,WAAW,CAAC,GAAI,WAAW,cAAe,iBAAoB,CAAC,CAAE,EAAE;AAAA,oBACjE;AAAA,kBACF;AAAA,kBACA,sBAAsB,WAAW,cAAe;AAAA,gBAClD;AAAA,gBACA;AAAA,gBACA;AAAA,cACF;AAAA;AAAA;AAAA,QACF;AAAA,QACA;AAAA,MACF;AAAA,MAEA,4CAAC,SAAI,OAAO,EAAE,OAAO,MAAM,GAAI,cAAG;AAAA,MAEjC;AAAA,OACH;AAAA,EAEJ;AACA,SAAO;AACT;AAEA,WAAW,cAAiB;",
|
|
5
|
+
"names": ["React"]
|
|
6
6
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
7
|
for (var name in all)
|
|
7
8
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -11,14 +12,21 @@ var __export = (target, all) => {
|
|
|
11
12
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
13
|
return to;
|
|
13
14
|
};
|
|
14
|
-
var
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
23
|
var ThemeProvider_exports = {};
|
|
16
24
|
__export(ThemeProvider_exports, {
|
|
17
25
|
ThemeProvider: () => ThemeProvider
|
|
18
26
|
});
|
|
19
27
|
module.exports = __toCommonJS(ThemeProvider_exports);
|
|
20
|
-
var
|
|
21
|
-
const ThemeProvider = (props) => (import_constants.isClient &&
|
|
28
|
+
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_constants2 = require("../constants/constants"), import_Theme = require("./Theme"), import_config = require("../config"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
const ThemeProvider = (props) => (import_constants.isClient && import_react.default.useLayoutEffect(() => {
|
|
22
30
|
if (props.disableRootThemeClass) return;
|
|
23
31
|
const cn = `${import_constants2.THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = props.themeClassNameOnRoot ?? (0, import_config.getSetting)("themeClassNameOnRoot") ? document.documentElement : document.body;
|
|
24
32
|
return target.classList.add(cn), () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeProvider.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["import_constants"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,2BAClB,mBAAyB,+BAEzBA,oBAAuC,mCACvC,eAAsB,oBACtB,gBAA2B,sBA8BvB;AAlBG,MAAM,gBAAgB,CAAC,WAExB,6BACF,aAAAC,QAAM,gBAAgB,MAAM;AAC1B,MAAI,MAAM,sBAAuB;AACjC,QAAM,KAAK,GAAG,wCAAsB,GAAG,MAAM,YAAY,IACnD,SACJ,MAAM,4BAAwB,0BAAW,sBAAsB,IAC3D,SAAS,kBACT,SAAS;AACf,gBAAO,UAAU,IAAI,EAAE,GAChB,MAAM;AACX,WAAO,UAAU,OAAO,EAAE;AAAA,EAC5B;AACF,GAAG,CAAC,MAAM,cAAc,MAAM,uBAAuB,MAAM,oBAAoB,CAAC,GAIhF;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,MAAM;AAAA,IACjB,MAAM,MAAM;AAAA,IAEZ,gBAAgB,CAAC,MAAM;AAAA,IAEvB,SAAO;AAAA,IAEN,gBAAM;AAAA;AACT;",
|
|
5
|
+
"names": ["import_constants", "React"]
|
|
6
6
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
8
|
for (var name in all)
|
|
8
9
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -12,14 +13,21 @@ var __export = (target, all) => {
|
|
|
12
13
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
14
|
return to;
|
|
14
15
|
};
|
|
15
|
-
var
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
24
|
var ThemeProvider_exports = {};
|
|
17
25
|
__export(ThemeProvider_exports, {
|
|
18
26
|
ThemeProvider: () => ThemeProvider
|
|
19
27
|
});
|
|
20
28
|
module.exports = __toCommonJS(ThemeProvider_exports);
|
|
21
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
22
|
-
return import_constants.isClient &&
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_constants2 = require("../constants/constants"), import_Theme = require("./Theme"), import_config = require("../config"), ThemeProvider = function(props) {
|
|
30
|
+
return import_constants.isClient && import_react.default.useLayoutEffect(function() {
|
|
23
31
|
if (!props.disableRootThemeClass) {
|
|
24
32
|
var cn = "".concat(import_constants2.THEME_CLASSNAME_PREFIX).concat(props.defaultTheme), _props_themeClassNameOnRoot, target = ((_props_themeClassNameOnRoot = props.themeClassNameOnRoot) !== null && _props_themeClassNameOnRoot !== void 0 ? _props_themeClassNameOnRoot : (0, import_config.getSetting)("themeClassNameOnRoot")) ? document.documentElement : document.body;
|
|
25
33
|
return target.classList.add(cn), function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Users/n8/tamagui/code/core/web/src/views/ThemeProvider.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["import_constants", "ThemeProvider", "props", "isClient", "useLayoutEffect", "disableRootThemeClass", "cn", "THEME_CLASSNAME_PREFIX", "defaultTheme", "target", "themeClassNameOnRoot", "getSetting", "document", "documentElement", "body", "classList", "add", "remove", "_jsx", "Theme", "className", "name", "forceClassName", "_isRoot", "children"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,eAAkB,2BAClB,mBAAyB,+BAEzBA,oBAAuC,mCACvC,eAAsB,oBACtB,gBAA2B,sBAYdC,gBAAgB,SAACC,OAAAA;AAE5B,SAAIC,6BACFC,aAAAA,QAAMC,gBAAgB,WAAA;AACpB,QAAIH,OAAMI,uBACV;UAAMC,KAAM,GAA2BL,OAAzBM,wCAAAA,EAA4C,OAAnBN,MAAMO,YAAY,GAEvDP,6BADIQ,WACJR,8BAAAA,MAAMS,0BAAoB,QAA1BT,gCAAAA,SAAAA,kCAA8BU,0BAAW,sBAAA,KACrCC,SAASC,kBACTD,SAASE;AACfL,oBAAOM,UAAUC,IAAIV,EAAAA,GACd,WAAA;AACLG,eAAOM,UAAUE,OAAOX,EAAAA;MAC1B;;EACF,GAAG;IAACL,MAAMO;IAAcP,MAAMI;IAAuBJ,MAAMS;GAAqB,GAIhF,uCAAAQ,KAACC,oBAAAA;IACCC,WAAWnB,MAAMmB;IACjBC,MAAMpB,MAAMO;;IAEZc,gBAAgB,CAACrB,MAAMI;;IAEvBkB,SAAO;cAENtB,MAAMuB;;AAGb;",
|
|
5
|
+
"names": ["import_constants", "ThemeProvider", "props", "isClient", "React", "useLayoutEffect", "disableRootThemeClass", "cn", "THEME_CLASSNAME_PREFIX", "defaultTheme", "target", "themeClassNameOnRoot", "getSetting", "document", "documentElement", "body", "classList", "add", "remove", "_jsx", "Theme", "className", "name", "forceClassName", "_isRoot", "children"]
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { useTheme } from "./hooks/useTheme";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
const _withStableStyle = (Component, styleProvider) => forwardRef((props, ref) => {
|
|
4
|
+
const _withStableStyle = (Component, styleProvider) => React.forwardRef((props, ref) => {
|
|
5
5
|
const { _expressions = [], ...rest } = props, theme = useTheme();
|
|
6
6
|
return /* @__PURE__ */ jsx(Component, { ref, style: styleProvider(theme, _expressions), ...rest });
|
|
7
7
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/_withStableStyle.tsx"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,gBAAgB;AAWd;AAPJ,MAAM,mBAAmB,CAC9B,WACA,kBAEA,MAAM,WAAW,CAAC,OAAY,QAAQ;AACpC,QAAM,EAAE,eAAe,CAAC,GAAG,GAAG,KAAK,IAAI,OACjC,QAAQ,SAAS;AACvB,SAAO,oBAAC,aAAU,KAAU,OAAO,cAAc,OAAO,YAAY,GAAI,GAAG,MAAM;AACnF,CAAC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { useTheme } from "./hooks/useTheme.mjs";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
const _withStableStyle = (Component, styleProvider) => forwardRef((props, ref) => {
|
|
4
|
+
const _withStableStyle = (Component, styleProvider) => React.forwardRef((props, ref) => {
|
|
5
5
|
const {
|
|
6
6
|
_expressions = [],
|
|
7
7
|
...rest
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","useTheme","jsx","_withStableStyle","Component","styleProvider","forwardRef","props","ref","_expressions","rest","theme","style"],"sources":["../../src/_withStableStyle.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SAASC,QAAA,QAAgB;AAWd,SAAAC,GAAA;AAPJ,MAAMC,gBAAA,GAAmBA,CAC9BC,SAAA,EACAC,aAAA,KAEAL,KAAA,CAAMM,UAAA,CAAW,CAACC,KAAA,EAAYC,GAAA,KAAQ;EACpC,MAAM;MAAEC,YAAA,GAAe,EAAC;MAAG,GAAGC;IAAK,IAAIH,KAAA;IACjCI,KAAA,GAAQV,QAAA,CAAS;EACvB,OAAO,eAAAC,GAAA,CAACE,SAAA;IAAUI,GAAA;IAAUI,KAAA,EAAOP,aAAA,CAAcM,KAAA,EAAOF,YAAY;IAAI,GAAGC;EAAA,CAAM;AACnF,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { useTheme } from "./hooks/useTheme";
|
|
4
4
|
function _define_property(obj, key, value) {
|
|
5
5
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
@@ -38,7 +38,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
38
38
|
return target;
|
|
39
39
|
}
|
|
40
40
|
var _withStableStyle = function(Component, styleProvider) {
|
|
41
|
-
return /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
41
|
+
return /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
42
42
|
var _props__expressions = props._expressions, _expressions = _props__expressions === void 0 ? [] : _props__expressions, rest = _object_without_properties(props, [
|
|
43
43
|
"_expressions"
|
|
44
44
|
]), theme = useTheme();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/web/src/_withStableStyle.tsx"],
|
|
4
|
-
"mappings": ";AAAA,
|
|
5
|
-
"names": ["
|
|
4
|
+
"mappings": ";AAAA,OAAOA,WAAW;AAClB,SAASC,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIlB,IAAMC,mBAAmB,SAC9BC,WACAC,eAAAA;SAEAJ,sBAAMK,WAAW,SAACC,OAAYC,KAAAA;AAC5B,QAAA,sBAAuCD,MAA/BE,cAAAA,eAAAA,wBAAAA,SAAe,CAAA,IAAE,qBAAKC,OAAAA,2BAASH,OAAAA;MAA/BE;QACFE,QAAQT,SAAAA;AACd,WAAO,qBAACE,WAAAA,eAAAA;MAAUI;MAAUI,OAAOP,cAAcM,OAAOF,YAAAA;OAAmBC,IAAAA,CAAAA;EAC7E,CAAA;;",
|
|
5
|
+
"names": ["React", "useTheme", "_withStableStyle", "Component", "styleProvider", "forwardRef", "props", "ref", "_expressions", "rest", "theme", "style"]
|
|
6
6
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { composeRefs } from "@tamagui/compose-refs";
|
|
2
3
|
import { isClient, isServer, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
3
4
|
import {
|
|
@@ -6,19 +7,6 @@ import {
|
|
|
6
7
|
composeEventHandlers,
|
|
7
8
|
validStyles
|
|
8
9
|
} from "@tamagui/helpers";
|
|
9
|
-
import React, {
|
|
10
|
-
Children,
|
|
11
|
-
Fragment,
|
|
12
|
-
createElement,
|
|
13
|
-
forwardRef,
|
|
14
|
-
memo,
|
|
15
|
-
useContext,
|
|
16
|
-
useEffect,
|
|
17
|
-
useId,
|
|
18
|
-
useMemo,
|
|
19
|
-
useRef,
|
|
20
|
-
useState
|
|
21
|
-
} from "react";
|
|
22
10
|
import { devConfig, getConfig, onConfiguredOnce } from "./config";
|
|
23
11
|
import { stackDefaultStyles } from "./constants/constants";
|
|
24
12
|
import { isDevTools } from "./constants/isDevTools";
|
|
@@ -46,7 +34,7 @@ import { hooks } from "./setupHooks";
|
|
|
46
34
|
import { Slot } from "./views/Slot";
|
|
47
35
|
import { getThemedChildren } from "./views/Theme";
|
|
48
36
|
import { ThemeDebug } from "./views/ThemeDebug";
|
|
49
|
-
import { Fragment
|
|
37
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
50
38
|
let tamaguiConfig, time, debugKeyListeners, startVisualizer;
|
|
51
39
|
const componentSetStates = /* @__PURE__ */ new Set();
|
|
52
40
|
if (typeof document < "u") {
|
|
@@ -82,7 +70,7 @@ if (typeof document < "u") {
|
|
|
82
70
|
});
|
|
83
71
|
}
|
|
84
72
|
const useComponentState = (props, { animationDriver, groups }, staticConfig, config) => {
|
|
85
|
-
const useAnimations = animationDriver?.useAnimations, stateRef = useRef(
|
|
73
|
+
const useAnimations = animationDriver?.useAnimations, stateRef = React.useRef(
|
|
86
74
|
void 0
|
|
87
75
|
);
|
|
88
76
|
stateRef.current || (stateRef.current = {});
|
|
@@ -99,7 +87,7 @@ const useComponentState = (props, { animationDriver, groups }, staticConfig, con
|
|
|
99
87
|
isWeb && !didHydrateOnce ? defaultComponentState : defaultComponentStateShouldEnter
|
|
100
88
|
) : defaultComponentStateMounted, disabled = isDisabled(props);
|
|
101
89
|
disabled != null && (initialState.disabled = disabled);
|
|
102
|
-
const states = useState(initialState), state = props.forceStyle ? { ...states[0], [props.forceStyle]: !0 } : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter";
|
|
90
|
+
const states = React.useState(initialState), state = props.forceStyle ? { ...states[0], [props.forceStyle]: !0 } : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter";
|
|
103
91
|
let isAnimated = willBeAnimated;
|
|
104
92
|
isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, defaultComponentStateMounted), setState({ ...state }));
|
|
105
93
|
let setStateShallow = createShallowSetState(setState, disabled, !1, props.debug);
|
|
@@ -199,14 +187,14 @@ function createComponent(staticConfig) {
|
|
|
199
187
|
defaultProps,
|
|
200
188
|
defaultPropsKeyOrder: defaultProps ? Object.keys(defaultProps) : []
|
|
201
189
|
});
|
|
202
|
-
const component = forwardRef((propsIn, forwardedRef) => {
|
|
203
|
-
const internalID = process.env.NODE_ENV === "development" ? useId() : "";
|
|
190
|
+
const component = React.forwardRef((propsIn, forwardedRef) => {
|
|
191
|
+
const internalID = process.env.NODE_ENV === "development" ? React.useId() : "";
|
|
204
192
|
process.env.NODE_ENV === "development" && startVisualizer && (startVisualizer(), startVisualizer = void 0), process.env.NODE_ENV === "test" && propsIn["data-test-renders"] && (propsIn["data-test-renders"].current ??= 0, propsIn["data-test-renders"].current += 1);
|
|
205
|
-
const componentContext = useContext(ComponentContext);
|
|
193
|
+
const componentContext = React.useContext(ComponentContext);
|
|
206
194
|
let styledContextProps, overriddenContextProps, contextValue;
|
|
207
195
|
const { context, isReactNative } = staticConfig;
|
|
208
196
|
if (context) {
|
|
209
|
-
contextValue = useContext(context);
|
|
197
|
+
contextValue = React.useContext(context);
|
|
210
198
|
const { inverseShorthands } = getConfig();
|
|
211
199
|
for (const key in context.props) {
|
|
212
200
|
const propVal = (
|
|
@@ -220,7 +208,7 @@ function createComponent(staticConfig) {
|
|
|
220
208
|
let props = propsIn;
|
|
221
209
|
curDefaultProps && (props = mergeProps(curDefaultProps, propsIn));
|
|
222
210
|
const debugProp = props.debug, componentName2 = props.componentName || staticConfig.componentName;
|
|
223
|
-
process.env.NODE_ENV === "development" && isClient && useEffect(() => {
|
|
211
|
+
process.env.NODE_ENV === "development" && isClient && React.useEffect(() => {
|
|
224
212
|
let overlay = null;
|
|
225
213
|
const debugVisualizerHandler = (show = !1) => {
|
|
226
214
|
const node = curStateRef.host;
|
|
@@ -391,7 +379,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
391
379
|
(x) => stateRef.current.host = x,
|
|
392
380
|
forwardedRef,
|
|
393
381
|
setElementProps
|
|
394
|
-
)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && isWeb && !isHOC && Children.toArray(props.children).forEach((item) => {
|
|
382
|
+
)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && isWeb && !isHOC && React.Children.toArray(props.children).forEach((item) => {
|
|
395
383
|
typeof item == "string" && item !== `
|
|
396
384
|
` && console.error(
|
|
397
385
|
`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`
|
|
@@ -400,7 +388,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
400
388
|
const { pseudoGroups, mediaGroups } = splitStyles, unPress = () => setStateShallow({ press: !1, pressIn: !1 });
|
|
401
389
|
process.env.NODE_ENV === "development" && isWeb && useIsomorphicLayoutEffect(() => {
|
|
402
390
|
debugProp && (console.groupCollapsed("Rendered style >"), console.warn(getComputedStyle(stateRef.current.host)), console.groupEnd());
|
|
403
|
-
}), useEffect(() => {
|
|
391
|
+
}), React.useEffect(() => {
|
|
404
392
|
if (disabled)
|
|
405
393
|
return;
|
|
406
394
|
if (state.unmounted === !0 && hasEnterStyle) {
|
|
@@ -521,10 +509,10 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
521
509
|
viewProps,
|
|
522
510
|
events,
|
|
523
511
|
staticConfig
|
|
524
|
-
)), useChildrenResult ? content = useChildrenResult : content = createElement(elementType, viewProps, content);
|
|
512
|
+
)), useChildrenResult ? content = useChildrenResult : content = React.createElement(elementType, viewProps, content);
|
|
525
513
|
const ResetPresence = config?.animations?.ResetPresence;
|
|
526
514
|
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ jsx(ResetPresence, { children: content })), process.env.NODE_ENV === "development" && time && time`create-element`;
|
|
527
|
-
const groupState = curStateRef.group, subGroupContext = useMemo(() => {
|
|
515
|
+
const groupState = curStateRef.group, subGroupContext = React.useMemo(() => {
|
|
528
516
|
if (!(!groupState || !groupName))
|
|
529
517
|
return groupState.listeners.clear(), {
|
|
530
518
|
...componentContext.groups,
|
|
@@ -563,7 +551,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
563
551
|
}
|
|
564
552
|
if (process.env.TAMAGUI_REACT_19) {
|
|
565
553
|
const { rulesToInsert } = splitStyles, keys = Object.keys(splitStyles.rulesToInsert);
|
|
566
|
-
keys.length && (content = /* @__PURE__ */ jsxs(
|
|
554
|
+
keys.length && (content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
567
555
|
content,
|
|
568
556
|
keys.map((key) => {
|
|
569
557
|
const styleObject = rulesToInsert[key], identifier = styleObject[StyleObjectIdentifier];
|
|
@@ -630,7 +618,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
630
618
|
});
|
|
631
619
|
staticConfig.componentName && (component.displayName = staticConfig.componentName);
|
|
632
620
|
let res = component;
|
|
633
|
-
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = memo(res)), res.staticConfig = staticConfig;
|
|
621
|
+
(process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = React.memo(res)), res.staticConfig = staticConfig;
|
|
634
622
|
function extendStyledConfig(extended) {
|
|
635
623
|
return {
|
|
636
624
|
...staticConfig,
|
|
@@ -644,9 +632,9 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
644
632
|
return Component2.staticConfig = extendStyledConfig(extended), Component2.styleable = styleable, Component2;
|
|
645
633
|
}
|
|
646
634
|
function styleable(Component2, options) {
|
|
647
|
-
let out = Component2.render?.length === 2 ? Component2 : forwardRef(Component2);
|
|
635
|
+
let out = Component2.render?.length === 2 ? Component2 : React.forwardRef(Component2);
|
|
648
636
|
const extendedConfig = extendStyledConfig(options?.staticConfig);
|
|
649
|
-
return out = options?.disableTheme ? out : themeable(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
637
|
+
return out = options?.disableTheme ? out : themeable(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = React.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
650
638
|
}
|
|
651
639
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
652
640
|
}
|
|
@@ -714,7 +702,7 @@ function spacedChildren(props) {
|
|
|
714
702
|
const { isZStack, children, space, direction, spaceFlex, separator, ensureKeys } = props, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null, areChildrenArray = Array.isArray(children);
|
|
715
703
|
if (!ensureKeys && !(hasSpace || hasSeparator || isZStack))
|
|
716
704
|
return children;
|
|
717
|
-
const childrenList = areChildrenArray ? children : Children.toArray(children);
|
|
705
|
+
const childrenList = areChildrenArray ? children : React.Children.toArray(children);
|
|
718
706
|
if (childrenList.length <= 1 && !isZStack && !childrenList[0]?.type?.shouldForwardSpace)
|
|
719
707
|
return children;
|
|
720
708
|
const final = [];
|
|
@@ -726,7 +714,7 @@ function spacedChildren(props) {
|
|
|
726
714
|
separator,
|
|
727
715
|
key: child.key
|
|
728
716
|
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(
|
|
729
|
-
/* @__PURE__ */ jsx(Fragment, { children: isZStack ? /* @__PURE__ */ jsx(AbsoluteFill, { children: child }) : child }, `${index}0t`)
|
|
717
|
+
/* @__PURE__ */ jsx(React.Fragment, { children: isZStack ? /* @__PURE__ */ jsx(AbsoluteFill, { children: child }) : child }, `${index}0t`)
|
|
730
718
|
), isUnspaced(child) && index === 0 || isZStack) continue;
|
|
731
719
|
const next = childrenList[index + 1];
|
|
732
720
|
next && !isEmpty && !isUnspaced(next) && (separator ? (hasSpace && final.push(
|
|
@@ -736,7 +724,7 @@ function spacedChildren(props) {
|
|
|
736
724
|
space,
|
|
737
725
|
spaceFlex
|
|
738
726
|
})
|
|
739
|
-
), final.push(/* @__PURE__ */ jsx(Fragment, { children: separator }, `${index}03t`)), hasSpace && final.push(
|
|
727
|
+
), final.push(/* @__PURE__ */ jsx(React.Fragment, { children: separator }, `${index}03t`)), hasSpace && final.push(
|
|
740
728
|
createSpacer({
|
|
741
729
|
key: `_${index}01t`,
|
|
742
730
|
direction,
|