@tamagui/web 1.108.0 → 1.108.2
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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isClient","isWeb","useIsomorphicLayoutEffect","
|
|
1
|
+
{"version":3,"names":["React","isClient","isWeb","useIsomorphicLayoutEffect","ComponentContext","useDidHydrateOnceRoot","setupMediaListeners","ThemeProvider","getSetting","jsx","TamaguiProvider","children","disableInjectCSS","config","className","defaultTheme","disableRootThemeClass","reset","themeClassNameOnRoot","style","document","createElement","appendChild","createTextNode","getCSS","head","removeChild","UnmountedClassName","Provider","animationDriver","animations","Object","keys","themes","props","mounted","setMounted","useState","useEffect","display","displayName"],"sources":["../../../src/views/TamaguiProvider.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SAASC,QAAA,EAAUC,KAAA,EAAOC,yBAAA,QAAiC;AAE3D,SAASC,gBAAA,QAAwB;AACjC,SAASC,qBAAA,QAA6B;AACtC,SAASC,mBAAA,QAA2B;AAEpC,SAASC,aAAA,QAAqB;AAC9B,SAASC,UAAA,QAAkB;AAkCnB,SAAAC,GAAA;AAhCD,SAASC,gBAAgB;EAC9BC,QAAA;EACAC,gBAAA;EACAC,MAAA;EACAC,SAAA;EACAC,YAAA;EACAC,qBAAA;EACAC,KAAA;EACAC;AACF,GAAyB;EACvB,OAAAZ,mBAAA,CAAoB,GAEhBL,QAAA,KAEFI,qBAAA,CAAsB,GAEtBF,yBAAA,CAA0B,MAAM;IAC9B,IAAKU,MAAA,IACD,CAACD,gBAAA,EAAkB;MACrB,MAAMO,KAAA,GAAQC,QAAA,CAASC,aAAA,CAAc,OAAO;MAC5C,OAAAF,KAAA,CAAMG,WAAA,CAAYF,QAAA,CAASG,cAAA,CAAeV,MAAA,CAAOW,MAAA,CAAO,CAAC,CAAC,GAC1DJ,QAAA,CAASK,IAAA,CAAKH,WAAA,CAAYH,KAAK,GACxB,MAAM;QACXC,QAAA,CAASK,IAAA,CAAKC,WAAA,CAAYP,KAAK;MACjC;IACF;EACF,GAAG,CAACN,MAAA,EAAQD,gBAAgB,CAAC,IAI7B,eAAAH,GAAA,CAACkB,kBAAA;IACChB,QAAA,iBAAAF,GAAA,CAACL,gBAAA,CAAiBwB,QAAA,EAAjB;MAA0BC,eAAA,EAAiBhB,MAAA,EAAQiB,UAAA;MAClDnB,QAAA,iBAAAF,GAAA,CAACF,aAAA;QACCW,oBAAA,EACEA,oBAAA,IAAwBV,UAAA,CAAW,sBAAsB;QAE3DQ,qBAAA,EACEA,qBAAA,IAAyBR,UAAA,CAAW,uBAAuB;QAE7DO,YAAA,EAAcA,YAAA,KAAiBF,MAAA,GAASkB,MAAA,CAAOC,IAAA,CAAKnB,MAAA,CAAOoB,MAAM,EAAE,CAAC,IAAI;QACxEhB,KAAA;QACAH,SAAA;QAECH;MAAA,CACH;IAAA,CACF;EAAA,CACF;AAEJ;AAGA,SAASgB,mBAAmBO,KAAA,EAAsC;EAChE,MAAM,CAACC,OAAA,EAASC,UAAU,IAAIpC,KAAA,CAAMqC,QAAA,CAAS,EAAK;EAMlD,OAJArC,KAAA,CAAMsC,SAAA,CAAU,MAAM;IACpBF,UAAA,CAAW,EAAI;EACjB,GAAG,EAAE,GAEAlC,KAAA,GAKH,eAAAO,GAAA,CAAC;IAAKU,KAAA,EAAO;MAAEoB,OAAA,EAAS;IAAW;IAAGzB,SAAA,EAAWqB,OAAA,GAAU,KAAK;IAC7DxB,QAAA,EAAAuB,KAAA,CAAMvB;EAAA,CACT,IANOuB,KAAA,CAAMvB,QAAA;AAQjB;AAEAD,eAAA,CAAgB8B,WAAA,GAAiB","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { isClient, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
4
|
import { ComponentContext } from "../contexts/ComponentContext";
|
|
5
5
|
import { useDidHydrateOnceRoot } from "../hooks/useDidHydrateOnce";
|
|
6
6
|
import { setupMediaListeners } from "../hooks/useMedia";
|
|
@@ -74,8 +74,8 @@ function TamaguiProvider(param) {
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
function UnmountedClassName(props) {
|
|
77
|
-
var
|
|
78
|
-
return useEffect(function() {
|
|
77
|
+
var _React_useState = _sliced_to_array(React.useState(!1), 2), mounted = _React_useState[0], setMounted = _React_useState[1];
|
|
78
|
+
return React.useEffect(function() {
|
|
79
79
|
setMounted(!0);
|
|
80
80
|
}, []), isWeb ? /* @__PURE__ */ _jsx("span", {
|
|
81
81
|
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": ";AAAA,
|
|
5
|
-
"names": ["
|
|
4
|
+
"mappings": ";AAAA,OAAOA,WAAW;AAClB,SAASC,UAAUC,OAAOC,iCAAiC;AAE3D,SAASC,wBAAwB;AACjC,SAASC,6BAA6B;AACtC,SAASC,2BAA2B;AAEpC,SAASC,qBAAqB;AAC9B,SAASC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEpB,SAASC,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;AAEAX,6BAAAA,GAEIL,aAEFI,sBAAAA,GAEAF,0BAA0B,WAAA;AACxB,QAAKS,UACD,CAACD,kBAAkB;AACrB,UAAMO,QAAQC,SAASC,cAAc,OAAA;AACrCF,mBAAMG,YAAYF,SAASG,eAAeV,OAAOW,OAAM,CAAA,CAAA,GACvDJ,SAASK,KAAKH,YAAYH,KAAAA,GACnB,WAAA;AACLC,iBAASK,KAAKC,YAAYP,KAAAA;MAC5B;IACF;EACF,GAAG;IAACN;IAAQD;GAAiB,IAI7B,qBAACe,oBAAAA;cACC,qBAACtB,iBAAiBuB,UAAQ;MAACC,iBAAiBhB,UAAAA,OAAAA,SAAAA,OAAQiB;gBAClD,qBAACtB,eAAAA;QACCU,sBACEA,wBAAwBT,WAAW,sBAAA;QAErCO,uBACEA,yBAAyBP,WAAW,uBAAA;QAEtCM,cAAcA,iBAAiBF,SAASkB,OAAOC,KAAKnB,OAAOoB,MAAM,EAAE,CAAA,IAAK;QACxEhB;QACAH;;;;;AAOV;AAGA,SAASa,mBAAmBO,OAAoC;AAC9D,MAA8BjC,kBAAAA,iBAAAA,MAAMkC,SAAS,EAAA,GAAA,CAAA,GAAtCC,UAAuBnC,gBAAAA,CAAAA,GAAdoC,aAAcpC,gBAAAA,CAAAA;AAM9B,SAJAA,MAAMqC,UAAU,WAAA;AACdD,eAAW,EAAA;EACb,GAAG,CAAA,CAAE,GAEAlC,QAKH,qBAACoC,QAAAA;IAAKpB,OAAO;MAAEqB,SAAS;IAAW;IAAG1B,WAAWsB,UAAU,KAAK;cAC7DF,MAAMvB;OALFuB,MAAMvB;AAQjB;AAEAD,gBAAgB,cAAiB;",
|
|
5
|
+
"names": ["React", "isClient", "isWeb", "useIsomorphicLayoutEffect", "ComponentContext", "useDidHydrateOnceRoot", "setupMediaListeners", "ThemeProvider", "getSetting", "TamaguiProvider", "children", "disableInjectCSS", "config", "className", "defaultTheme", "disableRootThemeClass", "reset", "themeClassNameOnRoot", "style", "document", "createElement", "appendChild", "createTextNode", "getCSS", "head", "removeChild", "UnmountedClassName", "Provider", "animationDriver", "animations", "Object", "keys", "themes", "props", "useState", "mounted", "setMounted", "useEffect", "span", "display"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { useDidFinishSSR } from "@tamagui/use-did-finish-ssr";
|
|
2
3
|
import { useForceUpdate } from "@tamagui/use-force-update";
|
|
3
|
-
import { useEffect, useId, useState } from "react";
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
let node;
|
|
@@ -10,15 +10,15 @@ function ThemeDebug({
|
|
|
10
10
|
children
|
|
11
11
|
}) {
|
|
12
12
|
if (process.env.NODE_ENV === "development") {
|
|
13
|
-
const isHydrated = useDidFinishSSR(), [onChangeCount, setOnChangeCount] = useState(0), rerender = useForceUpdate(), id = useId();
|
|
14
|
-
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))), useEffect(() => {
|
|
13
|
+
const isHydrated = useDidFinishSSR(), [onChangeCount, setOnChangeCount] = React.useState(0), rerender = useForceUpdate(), id = React.useId();
|
|
14
|
+
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))), React.useEffect(() => {
|
|
15
15
|
themeState.themeManager?.parentManager?.onChangeTheme((name, manager) => {
|
|
16
16
|
setOnChangeCount((p) => ++p), console.warn(
|
|
17
17
|
`theme changed for ${themeState.themeManager?.id} from parent ${themeState.themeManager?.parentManager?.id} to new name`,
|
|
18
18
|
name
|
|
19
19
|
);
|
|
20
20
|
});
|
|
21
|
-
}, [themeState.themeManager]), useEffect(() => {
|
|
21
|
+
}, [themeState.themeManager]), React.useEffect(() => {
|
|
22
22
|
const tm = setInterval(rerender, 1e3);
|
|
23
23
|
return () => clearTimeout(tm);
|
|
24
24
|
}, []), themeProps["disable-child-theme"] || !isHydrated ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeDebug.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;
|
|
4
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAE/B,SAAS,oBAAoB;AAyDvB,mBAmCE,KAjCE,YAFJ;AApDN,IAAI;AAEG,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAAgF;AAC9E,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,UAAM,aAAa,gBAAgB,GAC7B,CAAC,eAAe,gBAAgB,IAAI,MAAM,SAAS,CAAC,GACpD,WAAW,eAAe,GAC1B,KAAK,MAAM,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,MAAM,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,MAAM,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,iCACG;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,oBAAC,SAAI,OAAO,EAAE,OAAO,MAAM,GAAI,cAAG;AAAA,MAEjC;AAAA,OACH;AAAA,EAEJ;AACA,SAAO;AACT;AAEA,WAAW,cAAiB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { useDidFinishSSR } from "@tamagui/use-did-finish-ssr";
|
|
2
3
|
import { useForceUpdate } from "@tamagui/use-force-update";
|
|
3
|
-
import { useEffect, useId, useState } from "react";
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
let node;
|
|
@@ -11,14 +11,14 @@ function ThemeDebug({
|
|
|
11
11
|
}) {
|
|
12
12
|
if (process.env.NODE_ENV === "development") {
|
|
13
13
|
const isHydrated = useDidFinishSSR(),
|
|
14
|
-
[onChangeCount, setOnChangeCount] = useState(0),
|
|
14
|
+
[onChangeCount, setOnChangeCount] = React.useState(0),
|
|
15
15
|
rerender = useForceUpdate(),
|
|
16
|
-
id = useId();
|
|
17
|
-
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))), useEffect(() => {
|
|
16
|
+
id = React.useId();
|
|
17
|
+
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))), React.useEffect(() => {
|
|
18
18
|
themeState.themeManager?.parentManager?.onChangeTheme((name, manager) => {
|
|
19
19
|
setOnChangeCount(p => ++p), console.warn(`theme changed for ${themeState.themeManager?.id} from parent ${themeState.themeManager?.parentManager?.id} to new name`, name);
|
|
20
20
|
});
|
|
21
|
-
}, [themeState.themeManager]), useEffect(() => {
|
|
21
|
+
}, [themeState.themeManager]), React.useEffect(() => {
|
|
22
22
|
const tm = setInterval(rerender, 1e3);
|
|
23
23
|
return () => clearTimeout(tm);
|
|
24
24
|
}, []), themeProps["disable-child-theme"] || !isHydrated ? children : /* @__PURE__ */jsxs(Fragment, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","useDidFinishSSR","useForceUpdate","createPortal","Fragment","jsx","jsxs","node","ThemeDebug","themeState","themeProps","children","process","env","NODE_ENV","isHydrated","onChangeCount","setOnChangeCount","useState","rerender","id","useId","document","createElement","style","height","overflowY","position","zIndex","bottom","left","right","display","border","flexDirection","background","body","appendChild","useEffect","themeManager","parentManager","onChangeTheme","name","manager","p","console","warn","tm","setInterval","clearTimeout","whiteSpace","maxWidth","overflow","padding","JSON","stringify","propsName","state","className","inverse","forceClassName","parent","parentName","parentId","isNew","isNewTheme","listening","_listeningIds","join","_numChangeEventsSent","color","displayName"],"sources":["../../../src/views/ThemeDebug.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { isClient } from "@tamagui/constants";
|
|
2
|
-
import { useLayoutEffect } from "react";
|
|
3
3
|
import { THEME_CLASSNAME_PREFIX } from "../constants/constants";
|
|
4
4
|
import { Theme } from "./Theme";
|
|
5
5
|
import { getSetting } from "../config";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
const ThemeProvider = (props) => (isClient && useLayoutEffect(() => {
|
|
7
|
+
const ThemeProvider = (props) => (isClient && React.useLayoutEffect(() => {
|
|
8
8
|
if (props.disableRootThemeClass) return;
|
|
9
9
|
const cn = `${THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = props.themeClassNameOnRoot ?? getSetting("themeClassNameOnRoot") ? document.documentElement : document.body;
|
|
10
10
|
return target.classList.add(cn), () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeProvider.tsx"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,gBAAgB;AAEzB,SAAS,8BAA8B;AACvC,SAAS,aAAa;AACtB,SAAS,kBAAkB;AA8BvB;AAlBG,MAAM,gBAAgB,CAAC,WAExB,YACF,MAAM,gBAAgB,MAAM;AAC1B,MAAI,MAAM,sBAAuB;AACjC,QAAM,KAAK,GAAG,sBAAsB,GAAG,MAAM,YAAY,IACnD,SACJ,MAAM,wBAAwB,WAAW,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
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { isClient } from "@tamagui/constants";
|
|
2
|
-
import { useLayoutEffect } from "react";
|
|
3
3
|
import { THEME_CLASSNAME_PREFIX } from "../constants/constants.mjs";
|
|
4
4
|
import { Theme } from "./Theme.mjs";
|
|
5
5
|
import { getSetting } from "../config.mjs";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
const ThemeProvider = props => (isClient && useLayoutEffect(() => {
|
|
7
|
+
const ThemeProvider = props => (isClient && React.useLayoutEffect(() => {
|
|
8
8
|
if (props.disableRootThemeClass) return;
|
|
9
9
|
const cn = `${THEME_CLASSNAME_PREFIX}${props.defaultTheme}`,
|
|
10
10
|
target = props.themeClassNameOnRoot ?? getSetting("themeClassNameOnRoot") ? document.documentElement : document.body;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","isClient","THEME_CLASSNAME_PREFIX","Theme","getSetting","jsx","ThemeProvider","props","useLayoutEffect","disableRootThemeClass","cn","defaultTheme","target","themeClassNameOnRoot","document","documentElement","body","classList","add","remove","className","name","forceClassName","_isRoot","children"],"sources":["../../../src/views/ThemeProvider.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SAASC,QAAA,QAAgB;AAEzB,SAASC,sBAAA,QAA8B;AACvC,SAASC,KAAA,QAAa;AACtB,SAASC,UAAA,QAAkB;AA8BvB,SAAAC,GAAA;AAlBG,MAAMC,aAAA,GAAiBC,KAAA,KAExBN,QAAA,IACFD,KAAA,CAAMQ,eAAA,CAAgB,MAAM;EAC1B,IAAID,KAAA,CAAME,qBAAA,EAAuB;EACjC,MAAMC,EAAA,GAAK,GAAGR,sBAAsB,GAAGK,KAAA,CAAMI,YAAY;IACnDC,MAAA,GACJL,KAAA,CAAMM,oBAAA,IAAwBT,UAAA,CAAW,sBAAsB,IAC3DU,QAAA,CAASC,eAAA,GACTD,QAAA,CAASE,IAAA;EACf,OAAAJ,MAAA,CAAOK,SAAA,CAAUC,GAAA,CAAIR,EAAE,GAChB,MAAM;IACXE,MAAA,CAAOK,SAAA,CAAUE,MAAA,CAAOT,EAAE;EAC5B;AACF,GAAG,CAACH,KAAA,CAAMI,YAAA,EAAcJ,KAAA,CAAME,qBAAA,EAAuBF,KAAA,CAAMM,oBAAoB,CAAC,GAIhF,eAAAR,GAAA,CAACF,KAAA;EACCiB,SAAA,EAAWb,KAAA,CAAMa,SAAA;EACjBC,IAAA,EAAMd,KAAA,CAAMI,YAAA;EAEZW,cAAA,EAAgB,CAACf,KAAA,CAAME,qBAAA;EAEvBc,OAAA,EAAO;EAENC,QAAA,EAAAjB,KAAA,CAAMiB;AAAA,CACT","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { isClient } from "@tamagui/constants";
|
|
3
|
-
import { useLayoutEffect } from "react";
|
|
4
4
|
import { THEME_CLASSNAME_PREFIX } from "../constants/constants";
|
|
5
5
|
import { Theme } from "./Theme";
|
|
6
6
|
import { getSetting } from "../config";
|
|
7
7
|
var ThemeProvider = function(props) {
|
|
8
|
-
return isClient && useLayoutEffect(function() {
|
|
8
|
+
return isClient && React.useLayoutEffect(function() {
|
|
9
9
|
if (!props.disableRootThemeClass) {
|
|
10
10
|
var cn = "".concat(THEME_CLASSNAME_PREFIX).concat(props.defaultTheme), _props_themeClassNameOnRoot, target = ((_props_themeClassNameOnRoot = props.themeClassNameOnRoot) !== null && _props_themeClassNameOnRoot !== void 0 ? _props_themeClassNameOnRoot : getSetting("themeClassNameOnRoot")) ? document.documentElement : document.body;
|
|
11
11
|
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": ";AAAA,
|
|
5
|
-
"names": ["
|
|
4
|
+
"mappings": ";AAAA,OAAOA,WAAW;AAClB,SAASC,gBAAgB;AAEzB,SAASC,8BAA8B;AACvC,SAASC,aAAa;AACtB,SAASC,kBAAkB;AAYpB,IAAMC,gBAAgB,SAACC,OAAAA;AAE5B,SAAIL,YACFD,MAAMO,gBAAgB,WAAA;AACpB,QAAID,OAAME,uBACV;UAAMC,KAAM,GAA2BH,OAAzBJ,sBAAAA,EAA4C,OAAnBI,MAAMI,YAAY,GAEvDJ,6BADIK,WACJL,8BAAAA,MAAMM,0BAAoB,QAA1BN,gCAAAA,SAAAA,8BAA8BF,WAAW,sBAAA,KACrCS,SAASC,kBACTD,SAASE;AACfJ,oBAAOK,UAAUC,IAAIR,EAAAA,GACd,WAAA;AACLE,eAAOK,UAAUE,OAAOT,EAAAA;MAC1B;;EACF,GAAG;IAACH,MAAMI;IAAcJ,MAAME;IAAuBF,MAAMM;GAAqB,GAIhF,qBAACT,OAAAA;IACCgB,WAAWb,MAAMa;IACjBC,MAAMd,MAAMI;;IAEZW,gBAAgB,CAACf,MAAME;;IAEvBc,SAAO;cAENhB,MAAMiB;;AAGb;",
|
|
5
|
+
"names": ["React", "isClient", "THEME_CLASSNAME_PREFIX", "Theme", "getSetting", "ThemeProvider", "props", "useLayoutEffect", "disableRootThemeClass", "cn", "defaultTheme", "target", "themeClassNameOnRoot", "document", "documentElement", "body", "classList", "add", "remove", "className", "name", "forceClassName", "_isRoot", "children"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/web",
|
|
3
|
-
"version": "1.108.
|
|
3
|
+
"version": "1.108.2",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"reset.css"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tamagui/compose-refs": "1.108.
|
|
31
|
-
"@tamagui/constants": "1.108.
|
|
32
|
-
"@tamagui/helpers": "1.108.
|
|
33
|
-
"@tamagui/normalize-css-color": "1.108.
|
|
34
|
-
"@tamagui/timer": "1.108.
|
|
35
|
-
"@tamagui/types": "1.108.
|
|
36
|
-
"@tamagui/use-did-finish-ssr": "1.108.
|
|
37
|
-
"@tamagui/use-event": "1.108.
|
|
38
|
-
"@tamagui/use-force-update": "1.108.
|
|
30
|
+
"@tamagui/compose-refs": "1.108.2",
|
|
31
|
+
"@tamagui/constants": "1.108.2",
|
|
32
|
+
"@tamagui/helpers": "1.108.2",
|
|
33
|
+
"@tamagui/normalize-css-color": "1.108.2",
|
|
34
|
+
"@tamagui/timer": "1.108.2",
|
|
35
|
+
"@tamagui/types": "1.108.2",
|
|
36
|
+
"@tamagui/use-did-finish-ssr": "1.108.2",
|
|
37
|
+
"@tamagui/use-event": "1.108.2",
|
|
38
|
+
"@tamagui/use-force-update": "1.108.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "1.108.
|
|
42
|
-
"@testing-library/react": "^
|
|
41
|
+
"@tamagui/build": "1.108.2",
|
|
42
|
+
"@testing-library/react": "^16.0.0",
|
|
43
43
|
"csstype": "^3.0.10",
|
|
44
44
|
"typescript": "^5.5.2",
|
|
45
45
|
"vitest": "^0.34.3"
|
package/src/_withStableStyle.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
2
|
import { useTheme } from './hooks/useTheme'
|
|
3
3
|
|
|
4
4
|
/** internal: this is for tamagui babel plugin usage only */
|
|
@@ -7,7 +7,7 @@ export const _withStableStyle = (
|
|
|
7
7
|
Component: any,
|
|
8
8
|
styleProvider: (theme: any, expressions: any[]) => Object
|
|
9
9
|
) =>
|
|
10
|
-
forwardRef((props: any, ref) => {
|
|
10
|
+
React.forwardRef((props: any, ref) => {
|
|
11
11
|
const { _expressions = [], ...rest } = props
|
|
12
12
|
const theme = useTheme()
|
|
13
13
|
return <Component ref={ref} style={styleProvider(theme, _expressions)} {...rest} />
|
package/src/createComponent.tsx
CHANGED
|
@@ -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
|
|
|
23
11
|
import { devConfig, getConfig, onConfiguredOnce } from './config'
|
|
24
12
|
import { stackDefaultStyles } from './constants/constants'
|
|
@@ -160,7 +148,7 @@ export const useComponentState = (
|
|
|
160
148
|
) => {
|
|
161
149
|
const useAnimations = animationDriver?.useAnimations as UseAnimationHook | undefined
|
|
162
150
|
|
|
163
|
-
const stateRef = useRef<TamaguiComponentStateRef>(
|
|
151
|
+
const stateRef = React.useRef<TamaguiComponentStateRef>(
|
|
164
152
|
undefined as any as TamaguiComponentStateRef
|
|
165
153
|
)
|
|
166
154
|
if (!stateRef.current) {
|
|
@@ -230,7 +218,7 @@ export const useComponentState = (
|
|
|
230
218
|
}
|
|
231
219
|
|
|
232
220
|
// HOOK
|
|
233
|
-
const states = useState<TamaguiComponentState>(initialState)
|
|
221
|
+
const states = React.useState<TamaguiComponentState>(initialState)
|
|
234
222
|
|
|
235
223
|
const state = props.forceStyle ? { ...states[0], [props.forceStyle]: true } : states[0]
|
|
236
224
|
const setState = states[1]
|
|
@@ -437,9 +425,9 @@ export function createComponent<
|
|
|
437
425
|
}
|
|
438
426
|
}
|
|
439
427
|
|
|
440
|
-
const component = forwardRef<Ref, ComponentPropTypes>((propsIn, forwardedRef) => {
|
|
428
|
+
const component = React.forwardRef<Ref, ComponentPropTypes>((propsIn, forwardedRef) => {
|
|
441
429
|
// HOOK
|
|
442
|
-
const internalID = process.env.NODE_ENV === 'development' ? useId() : ''
|
|
430
|
+
const internalID = process.env.NODE_ENV === 'development' ? React.useId() : ''
|
|
443
431
|
|
|
444
432
|
if (process.env.NODE_ENV === 'development') {
|
|
445
433
|
if (startVisualizer) {
|
|
@@ -469,7 +457,7 @@ export function createComponent<
|
|
|
469
457
|
}
|
|
470
458
|
|
|
471
459
|
// HOOK
|
|
472
|
-
const componentContext = useContext(ComponentContext)
|
|
460
|
+
const componentContext = React.useContext(ComponentContext)
|
|
473
461
|
|
|
474
462
|
// set variants through context
|
|
475
463
|
// order is after default props but before props
|
|
@@ -480,7 +468,7 @@ export function createComponent<
|
|
|
480
468
|
|
|
481
469
|
if (context) {
|
|
482
470
|
// HOOK 3 (-1 if production)
|
|
483
|
-
contextValue = useContext(context)
|
|
471
|
+
contextValue = React.useContext(context)
|
|
484
472
|
const { inverseShorthands } = getConfig()
|
|
485
473
|
for (const key in context.props) {
|
|
486
474
|
const propVal =
|
|
@@ -524,7 +512,7 @@ export function createComponent<
|
|
|
524
512
|
|
|
525
513
|
if (process.env.NODE_ENV === 'development' && isClient) {
|
|
526
514
|
// HOOK
|
|
527
|
-
useEffect(() => {
|
|
515
|
+
React.useEffect(() => {
|
|
528
516
|
let overlay: HTMLSpanElement | null = null
|
|
529
517
|
|
|
530
518
|
const debugVisualizerHandler = (show = false) => {
|
|
@@ -686,6 +674,7 @@ export function createComponent<
|
|
|
686
674
|
Component?.name ||
|
|
687
675
|
'[Unnamed Component]'
|
|
688
676
|
}`
|
|
677
|
+
|
|
689
678
|
const type =
|
|
690
679
|
(hasEnterStyle ? '(hasEnter)' : ' ') +
|
|
691
680
|
(isAnimated ? '(animated)' : ' ') +
|
|
@@ -936,7 +925,7 @@ export function createComponent<
|
|
|
936
925
|
|
|
937
926
|
if (process.env.NODE_ENV === 'development') {
|
|
938
927
|
if (!isReactNative && !isText && isWeb && !isHOC) {
|
|
939
|
-
Children.toArray(props.children).forEach((item) => {
|
|
928
|
+
React.Children.toArray(props.children).forEach((item) => {
|
|
940
929
|
// allow newlines because why not its annoying with mdx
|
|
941
930
|
if (typeof item === 'string' && item !== '\n') {
|
|
942
931
|
console.error(
|
|
@@ -967,7 +956,7 @@ export function createComponent<
|
|
|
967
956
|
})
|
|
968
957
|
}
|
|
969
958
|
|
|
970
|
-
useEffect(() => {
|
|
959
|
+
React.useEffect(() => {
|
|
971
960
|
if (disabled) {
|
|
972
961
|
return
|
|
973
962
|
}
|
|
@@ -1251,7 +1240,7 @@ export function createComponent<
|
|
|
1251
1240
|
if (useChildrenResult) {
|
|
1252
1241
|
content = useChildrenResult
|
|
1253
1242
|
} else {
|
|
1254
|
-
content = createElement(elementType, viewProps, content)
|
|
1243
|
+
content = React.createElement(elementType, viewProps, content)
|
|
1255
1244
|
}
|
|
1256
1245
|
|
|
1257
1246
|
// needs to reset the presence state for nested children
|
|
@@ -1270,7 +1259,7 @@ export function createComponent<
|
|
|
1270
1259
|
|
|
1271
1260
|
// must override context so siblings don't clobber initial state
|
|
1272
1261
|
const groupState = curStateRef.group
|
|
1273
|
-
const subGroupContext = useMemo(() => {
|
|
1262
|
+
const subGroupContext = React.useMemo(() => {
|
|
1274
1263
|
if (!groupState || !groupName) return
|
|
1275
1264
|
groupState.listeners.clear()
|
|
1276
1265
|
// change reference so context value updates
|
|
@@ -1475,7 +1464,7 @@ export function createComponent<
|
|
|
1475
1464
|
let res: ComponentType = component as any
|
|
1476
1465
|
|
|
1477
1466
|
if (process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) {
|
|
1478
|
-
res = memo(res) as any
|
|
1467
|
+
res = React.memo(res) as any
|
|
1479
1468
|
}
|
|
1480
1469
|
|
|
1481
1470
|
res.staticConfig = staticConfig
|
|
@@ -1499,14 +1488,16 @@ export function createComponent<
|
|
|
1499
1488
|
function styleable(Component: any, options?: StyleableOptions) {
|
|
1500
1489
|
const isForwardedRefAlready = Component.render?.length === 2
|
|
1501
1490
|
|
|
1502
|
-
let out = isForwardedRefAlready
|
|
1491
|
+
let out = isForwardedRefAlready
|
|
1492
|
+
? (Component as any)
|
|
1493
|
+
: React.forwardRef(Component as any)
|
|
1503
1494
|
|
|
1504
1495
|
const extendedConfig = extendStyledConfig(options?.staticConfig)
|
|
1505
1496
|
|
|
1506
1497
|
out = options?.disableTheme ? out : (themeable(out, extendedConfig) as any)
|
|
1507
1498
|
|
|
1508
1499
|
if (process.env.TAMAGUI_MEMOIZE_STYLEABLE) {
|
|
1509
|
-
out = memo(out)
|
|
1500
|
+
out = React.memo(out)
|
|
1510
1501
|
}
|
|
1511
1502
|
|
|
1512
1503
|
out.staticConfig = extendedConfig
|
|
@@ -1521,9 +1512,7 @@ export function createComponent<
|
|
|
1521
1512
|
}
|
|
1522
1513
|
|
|
1523
1514
|
type EventKeys = keyof (TamaguiComponentEvents & WebOnlyPressEvents)
|
|
1524
|
-
type EventLikeObject = {
|
|
1525
|
-
[key in EventKeys]?: any
|
|
1526
|
-
}
|
|
1515
|
+
type EventLikeObject = { [key in EventKeys]?: any }
|
|
1527
1516
|
|
|
1528
1517
|
function getWebEvents<E extends EventLikeObject>(events: E, webStyle = true) {
|
|
1529
1518
|
return {
|
|
@@ -1623,7 +1612,9 @@ export function spacedChildren(props: SpacedChildrenProps) {
|
|
|
1623
1612
|
return children
|
|
1624
1613
|
}
|
|
1625
1614
|
|
|
1626
|
-
const childrenList = areChildrenArray
|
|
1615
|
+
const childrenList = areChildrenArray
|
|
1616
|
+
? (children as any[])
|
|
1617
|
+
: React.Children.toArray(children)
|
|
1627
1618
|
|
|
1628
1619
|
const len = childrenList.length
|
|
1629
1620
|
if (len <= 1 && !isZStack && !childrenList[0]?.['type']?.['shouldForwardSpace']) {
|
|
@@ -1652,9 +1643,9 @@ export function spacedChildren(props: SpacedChildrenProps) {
|
|
|
1652
1643
|
final.push(child)
|
|
1653
1644
|
} else {
|
|
1654
1645
|
final.push(
|
|
1655
|
-
<Fragment key={`${index}0t`}>
|
|
1646
|
+
<React.Fragment key={`${index}0t`}>
|
|
1656
1647
|
{isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}
|
|
1657
|
-
</Fragment>
|
|
1648
|
+
</React.Fragment>
|
|
1658
1649
|
)
|
|
1659
1650
|
}
|
|
1660
1651
|
|
|
@@ -1677,7 +1668,7 @@ export function spacedChildren(props: SpacedChildrenProps) {
|
|
|
1677
1668
|
})
|
|
1678
1669
|
)
|
|
1679
1670
|
}
|
|
1680
|
-
final.push(<Fragment key={`${index}03t`}>{separator}</Fragment>)
|
|
1671
|
+
final.push(<React.Fragment key={`${index}03t`}>{separator}</React.Fragment>)
|
|
1681
1672
|
if (hasSpace) {
|
|
1682
1673
|
final.push(
|
|
1683
1674
|
createSpacer({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
|
-
export const ThemeManagerIDContext = createContext<number>(1)
|
|
3
|
+
export const ThemeManagerIDContext = React.createContext<number>(1)
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
useContext,
|
|
4
|
-
useMemo,
|
|
5
|
-
type Context,
|
|
6
|
-
type ProviderExoticComponent,
|
|
7
|
-
type ReactNode,
|
|
8
|
-
} from 'react'
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import type { Context, ProviderExoticComponent, ReactNode } from 'react'
|
|
9
3
|
|
|
10
4
|
import { objectIdentityKey } from './objectIdentityKey'
|
|
11
5
|
|
|
@@ -21,13 +15,14 @@ export type StyledContext<Props extends Object = any> = Omit<
|
|
|
21
15
|
scope?: string
|
|
22
16
|
}
|
|
23
17
|
>
|
|
18
|
+
|
|
24
19
|
useStyledContext: (scope?: string) => Props
|
|
25
20
|
}
|
|
26
21
|
|
|
27
22
|
export function createStyledContext<VariantProps extends Record<string, any>>(
|
|
28
23
|
defaultValues?: VariantProps
|
|
29
24
|
): StyledContext<VariantProps> {
|
|
30
|
-
const OGContext = createContext<VariantProps | undefined>(defaultValues)
|
|
25
|
+
const OGContext = React.createContext<VariantProps | undefined>(defaultValues)
|
|
31
26
|
const OGProvider = OGContext.Provider
|
|
32
27
|
const Context = OGContext as any as StyledContext<VariantProps>
|
|
33
28
|
const scopedContexts = new Map<string, Context<VariantProps | undefined>>()
|
|
@@ -37,7 +32,7 @@ export function createStyledContext<VariantProps extends Record<string, any>>(
|
|
|
37
32
|
scope,
|
|
38
33
|
...values
|
|
39
34
|
}: VariantProps & { children?: ReactNode; scope: string }) => {
|
|
40
|
-
const next = useMemo(() => {
|
|
35
|
+
const next = React.useMemo(() => {
|
|
41
36
|
return {
|
|
42
37
|
// this ! is a workaround for ts error
|
|
43
38
|
...defaultValues!,
|
|
@@ -48,7 +43,7 @@ export function createStyledContext<VariantProps extends Record<string, any>>(
|
|
|
48
43
|
if (scope) {
|
|
49
44
|
let ScopedContext = scopedContexts.get(scope)
|
|
50
45
|
if (!ScopedContext) {
|
|
51
|
-
ScopedContext = createContext<VariantProps | undefined>(defaultValues)
|
|
46
|
+
ScopedContext = React.createContext<VariantProps | undefined>(defaultValues)
|
|
52
47
|
scopedContexts.set(scope, ScopedContext)
|
|
53
48
|
}
|
|
54
49
|
Provider = ScopedContext.Provider
|
|
@@ -59,7 +54,7 @@ export function createStyledContext<VariantProps extends Record<string, any>>(
|
|
|
59
54
|
// use consumerComponent just to give a better error message
|
|
60
55
|
const useStyledContext = (scope?: string) => {
|
|
61
56
|
const context = scope ? scopedContexts.get(scope) : OGContext
|
|
62
|
-
return useContext(context!) as VariantProps
|
|
57
|
+
return React.useContext(context!) as VariantProps
|
|
63
58
|
}
|
|
64
59
|
|
|
65
60
|
// @ts-ignore
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react'
|
|
1
2
|
import {
|
|
2
3
|
isAndroid,
|
|
3
4
|
isClient,
|
|
@@ -16,7 +17,6 @@ import {
|
|
|
16
17
|
validPseudoKeys,
|
|
17
18
|
validStyles,
|
|
18
19
|
} from '@tamagui/helpers'
|
|
19
|
-
import { useInsertionEffect } from 'react'
|
|
20
20
|
|
|
21
21
|
import { getConfig, getFont } from '../config'
|
|
22
22
|
import { accessibilityDirectMap } from '../constants/accessibilityDirectMap'
|
|
@@ -904,6 +904,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
904
904
|
const fullKey = `${style[StyleObjectProperty]}${PROP_SPLIT}${mediaKeyShort}${
|
|
905
905
|
style[StyleObjectPseudo] || ''
|
|
906
906
|
}`
|
|
907
|
+
|
|
907
908
|
if (fullKey in usedKeys) continue
|
|
908
909
|
addStyleToInsertRules(rulesToInsert, out as any)
|
|
909
910
|
mergeClassName(
|
|
@@ -1526,7 +1527,7 @@ export const getSubStyle = (
|
|
|
1526
1527
|
|
|
1527
1528
|
// on native no need to insert any css
|
|
1528
1529
|
const useInsertEffectCompat = isWeb
|
|
1529
|
-
? useInsertionEffect || useIsomorphicLayoutEffect
|
|
1530
|
+
? React.useInsertionEffect || useIsomorphicLayoutEffect
|
|
1530
1531
|
: () => {}
|
|
1531
1532
|
|
|
1532
1533
|
// perf: ...args a bit expensive on native
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import type { StaticConfig } from '../types'
|
|
4
4
|
import { isTamaguiComponent } from './isTamaguiComponent'
|
|
@@ -7,5 +7,5 @@ export const isTamaguiElement = (
|
|
|
7
7
|
child: any,
|
|
8
8
|
name?: string
|
|
9
9
|
): child is React.ReactElement<any> & { type: { staticConfig: StaticConfig } } => {
|
|
10
|
-
return isValidElement(child) && isTamaguiComponent(child.type, name)
|
|
10
|
+
return React.isValidElement(child) && isTamaguiComponent(child.type, name)
|
|
11
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import type { StaticConfig, ThemeableProps } from '../types'
|
|
4
4
|
import { Theme } from '../views/Theme'
|
|
@@ -7,7 +7,10 @@ export function themeable<ComponentType extends (props: any) => any>(
|
|
|
7
7
|
Component: ComponentType,
|
|
8
8
|
staticConfig?: Partial<StaticConfig>
|
|
9
9
|
) {
|
|
10
|
-
const withThemeComponent = forwardRef(function WithTheme(
|
|
10
|
+
const withThemeComponent = React.forwardRef(function WithTheme(
|
|
11
|
+
props: ThemeableProps,
|
|
12
|
+
ref
|
|
13
|
+
) {
|
|
11
14
|
const { themeInverse, theme, componentName, themeReset, ...rest } = props
|
|
12
15
|
|
|
13
16
|
const element = (
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { getConfig } from '../config'
|
|
4
4
|
import { ComponentContext } from '../contexts/ComponentContext'
|
|
5
5
|
|
|
6
6
|
export const useConfiguration = () => {
|
|
7
|
-
const { groups, animationDriver, ...restComponentConfig } =
|
|
7
|
+
const { groups, animationDriver, ...restComponentConfig } =
|
|
8
|
+
React.useContext(ComponentContext)
|
|
8
9
|
const { animations, ...restConfig } = getConfig()
|
|
9
10
|
return {
|
|
10
11
|
...restConfig,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
2
|
|
|
3
3
|
let didHydrateOnce = false
|
|
4
4
|
|
|
@@ -35,4 +35,4 @@ const emptySubscribe = () => () => {}
|
|
|
35
35
|
const getClientSnapshot = () => true
|
|
36
36
|
const getServerSnapshot = () => false
|
|
37
37
|
const useDidHydrateSync = () =>
|
|
38
|
-
useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot)
|
|
38
|
+
React.useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot)
|