@tamagui/core 1.0.1-beta.135 → 1.0.1-beta.136
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/views/ThemeInverse.js +8 -12
- package/dist/cjs/views/ThemeInverse.js.map +2 -2
- package/dist/esm/views/ThemeInverse.js +7 -10
- package/dist/esm/views/ThemeInverse.js.map +2 -2
- package/package.json +8 -8
- package/types/Pressability.d.ts +0 -0
- package/types/Pressability.native.d.ts +0 -0
- package/types/Tamagui.d.ts +0 -0
- package/types/ThemeContext.d.ts +0 -0
- package/types/ThemeManager.d.ts +0 -0
- package/types/conf.d.ts +0 -0
- package/types/constants/constants.d.ts +0 -0
- package/types/constants/platform.d.ts +0 -0
- package/types/contexts/ButtonInsideButtonContext.d.ts +0 -0
- package/types/contexts/FontLanguageContext.d.ts +0 -0
- package/types/createComponent.d.ts +0 -0
- package/types/createFont.d.ts +0 -0
- package/types/createShorthands.d.ts +0 -0
- package/types/createTamagui.d.ts +0 -0
- package/types/createTheme.d.ts +0 -0
- package/types/createTokens.d.ts +0 -0
- package/types/createVariable.d.ts +0 -0
- package/types/createVariables.d.ts +0 -0
- package/types/defaultComponentState.d.ts +0 -0
- package/types/helpers/RNComponents.d.ts +0 -0
- package/types/helpers/areEqualSets.d.ts +0 -0
- package/types/helpers/assignNativePropsToWeb.d.ts +0 -0
- package/types/helpers/assignNativePropsToWeb.native.d.ts +0 -0
- package/types/helpers/calc.d.ts +0 -0
- package/types/helpers/createMediaStyle.d.ts +0 -0
- package/types/helpers/createPropMapper.d.ts +0 -0
- package/types/helpers/createShallowUpdate.d.ts +0 -0
- package/types/helpers/createTamaguiProvider.d.ts +1 -0
- package/types/helpers/cssHash.d.ts +0 -0
- package/types/helpers/expandStyle.d.ts +0 -0
- package/types/helpers/expandStyles.d.ts +0 -0
- package/types/helpers/extendStaticConfig.d.ts +0 -0
- package/types/helpers/fixNativeShadow.d.ts +0 -0
- package/types/helpers/getExpandedShorthands.d.ts +0 -0
- package/types/helpers/getFont.d.ts +0 -0
- package/types/helpers/getFontLanguage.d.ts +0 -0
- package/types/helpers/getSize.d.ts +0 -0
- package/types/helpers/getSplitStyles.d.ts +0 -0
- package/types/helpers/getStackSize.d.ts +0 -0
- package/types/helpers/getStylesAtomic.d.ts +0 -0
- package/types/helpers/getStylesAtomic.native.d.ts +0 -0
- package/types/helpers/getVariantExtras.d.ts +0 -0
- package/types/helpers/insertStyleRule.d.ts +0 -0
- package/types/helpers/isObj.d.ts +0 -0
- package/types/helpers/isTamaguiComponent.d.ts +0 -0
- package/types/helpers/isTamaguiElement.d.ts +0 -0
- package/types/helpers/matchMedia.d.ts +0 -0
- package/types/helpers/matchMedia.native.d.ts +0 -0
- package/types/helpers/mergeProps.d.ts +0 -0
- package/types/helpers/mergeTransform.d.ts +0 -0
- package/types/helpers/nativeGestureHandler.native.d.ts +0 -0
- package/types/helpers/normalizeColor.d.ts +0 -0
- package/types/helpers/normalizeValueWithProperty.d.ts +0 -0
- package/types/helpers/proxyThemeVariables.d.ts +0 -0
- package/types/helpers/pseudoDescriptors.d.ts +0 -0
- package/types/helpers/registerCSSVariable.d.ts +0 -0
- package/types/helpers/startTransition.d.ts +0 -0
- package/types/helpers/themeable.d.ts +0 -0
- package/types/helpers/validate.d.ts +0 -0
- package/types/helpers/withStaticProperties.d.ts +0 -0
- package/types/hooks/getThemeUnwrapped.d.ts +0 -0
- package/types/hooks/useConstant.d.ts +0 -0
- package/types/hooks/useFeatures.d.ts +0 -0
- package/types/hooks/useId.d.ts +0 -0
- package/types/hooks/useIsMounted.d.ts +0 -0
- package/types/hooks/useIsSSR.d.ts +0 -0
- package/types/hooks/useIsTouchDevice.d.ts +0 -0
- package/types/hooks/useMedia.d.ts +0 -0
- package/types/hooks/usePressable.d.ts +0 -0
- package/types/hooks/useTheme.d.ts +0 -0
- package/types/hooks/useUnmountEffect.d.ts +0 -0
- package/types/index.d.ts +0 -0
- package/types/insertFont.d.ts +0 -0
- package/types/static.d.ts +0 -0
- package/types/styled.d.ts +0 -0
- package/types/types-rnw.d.ts +0 -0
- package/types/types.d.ts +0 -0
- package/types/views/FontLanguage.d.ts +1 -0
- package/types/views/FontLanguage.native.d.ts +1 -0
- package/types/views/FontLanguage.types.d.ts +0 -0
- package/types/views/Slot.d.ts +0 -0
- package/types/views/Stack.d.ts +0 -0
- package/types/views/Text.d.ts +0 -0
- package/types/views/TextAncestorContext.d.ts +0 -0
- package/types/views/Theme.d.ts +0 -0
- package/types/views/ThemeInverse.d.ts +0 -5
- package/types/views/ThemeProvider.d.ts +1 -0
- package/types/views/ThemeReset.d.ts +0 -0
|
@@ -21,21 +21,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
22
|
var ThemeInverse_exports = {};
|
|
23
23
|
__export(ThemeInverse_exports, {
|
|
24
|
-
ThemeInverse: () => ThemeInverse
|
|
25
|
-
setThemeInversions: () => setThemeInversions
|
|
24
|
+
ThemeInverse: () => ThemeInverse
|
|
26
25
|
});
|
|
27
26
|
module.exports = __toCommonJS(ThemeInverse_exports);
|
|
28
27
|
var import_react = __toESM(require("react"));
|
|
29
28
|
var import_platform = require("../constants/platform");
|
|
30
29
|
var import_useTheme = require("../hooks/useTheme");
|
|
31
30
|
var import_Theme = require("./Theme");
|
|
32
|
-
let inversions = {
|
|
33
|
-
light: "dark",
|
|
34
|
-
dark: "light"
|
|
35
|
-
};
|
|
36
|
-
function setThemeInversions(next) {
|
|
37
|
-
inversions = next;
|
|
38
|
-
}
|
|
39
31
|
const ThemeInverse = ({
|
|
40
32
|
children,
|
|
41
33
|
disable
|
|
@@ -44,7 +36,12 @@ const ThemeInverse = ({
|
|
|
44
36
|
const defaultTheme = (0, import_useTheme.useDefaultThemeName)();
|
|
45
37
|
const [name, setName] = (0, import_react.useState)(null);
|
|
46
38
|
(0, import_platform.useIsomorphicLayoutEffect)(() => {
|
|
47
|
-
|
|
39
|
+
if (themeName.startsWith("dark")) {
|
|
40
|
+
setName("light");
|
|
41
|
+
}
|
|
42
|
+
if (themeName.startsWith("light")) {
|
|
43
|
+
setName("dark");
|
|
44
|
+
}
|
|
48
45
|
}, [defaultTheme, themeName]);
|
|
49
46
|
if (disable) {
|
|
50
47
|
return children;
|
|
@@ -55,7 +52,6 @@ const ThemeInverse = ({
|
|
|
55
52
|
};
|
|
56
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
57
54
|
0 && (module.exports = {
|
|
58
|
-
ThemeInverse
|
|
59
|
-
setThemeInversions
|
|
55
|
+
ThemeInverse
|
|
60
56
|
});
|
|
61
57
|
//# sourceMappingURL=ThemeInverse.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeInverse.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useState } from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { useDefaultThemeName, useThemeName } from '../hooks/useTheme'\nimport { Theme } from './Theme'\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
|
4
|
+
"sourcesContent": ["import React, { useState } from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { useDefaultThemeName, useThemeName } from '../hooks/useTheme'\nimport { Theme } from './Theme'\n\nexport const ThemeInverse = ({\n children,\n disable,\n}: {\n children: React.ReactNode\n disable?: boolean\n}) => {\n const themeName = useThemeName()\n const defaultTheme = useDefaultThemeName()\n const [name, setName] = useState<null | string>(null)\n\n // ssr\n useIsomorphicLayoutEffect(() => {\n if (themeName.startsWith('dark')) {\n setName('light')\n }\n if (themeName.startsWith('light')) {\n setName('dark')\n }\n }, [defaultTheme, themeName])\n\n if (disable) {\n return children as JSX.Element\n }\n\n return <Theme name={name}>{children}</Theme>\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;AAEhC,sBAA0C;AAC1C,sBAAkD;AAClD,mBAAsB;AAEf,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,MAII;AACJ,QAAM,YAAY,kCAAa;AAC/B,QAAM,eAAe,yCAAoB;AACzC,QAAM,CAAC,MAAM,WAAW,2BAAwB,IAAI;AAGpD,iDAA0B,MAAM;AAC9B,QAAI,UAAU,WAAW,MAAM,GAAG;AAChC,cAAQ,OAAO;AAAA,IACjB;AACA,QAAI,UAAU,WAAW,OAAO,GAAG;AACjC,cAAQ,MAAM;AAAA,IAChB;AAAA,EACF,GAAG,CAAC,cAAc,SAAS,CAAC;AAE5B,MAAI,SAAS;AACX,WAAO;AAAA,EACT;AAEA,SAAO,mDAAC;AAAA,IAAM;AAAA,KAAa,QAAS;AACtC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,13 +2,6 @@ import React, { useState } from "react";
|
|
|
2
2
|
import { useIsomorphicLayoutEffect } from "../constants/platform";
|
|
3
3
|
import { useDefaultThemeName, useThemeName } from "../hooks/useTheme";
|
|
4
4
|
import { Theme } from "./Theme";
|
|
5
|
-
let inversions = {
|
|
6
|
-
light: "dark",
|
|
7
|
-
dark: "light"
|
|
8
|
-
};
|
|
9
|
-
function setThemeInversions(next) {
|
|
10
|
-
inversions = next;
|
|
11
|
-
}
|
|
12
5
|
const ThemeInverse = ({
|
|
13
6
|
children,
|
|
14
7
|
disable
|
|
@@ -17,7 +10,12 @@ const ThemeInverse = ({
|
|
|
17
10
|
const defaultTheme = useDefaultThemeName();
|
|
18
11
|
const [name, setName] = useState(null);
|
|
19
12
|
useIsomorphicLayoutEffect(() => {
|
|
20
|
-
|
|
13
|
+
if (themeName.startsWith("dark")) {
|
|
14
|
+
setName("light");
|
|
15
|
+
}
|
|
16
|
+
if (themeName.startsWith("light")) {
|
|
17
|
+
setName("dark");
|
|
18
|
+
}
|
|
21
19
|
}, [defaultTheme, themeName]);
|
|
22
20
|
if (disable) {
|
|
23
21
|
return children;
|
|
@@ -27,7 +25,6 @@ const ThemeInverse = ({
|
|
|
27
25
|
}, children);
|
|
28
26
|
};
|
|
29
27
|
export {
|
|
30
|
-
ThemeInverse
|
|
31
|
-
setThemeInversions
|
|
28
|
+
ThemeInverse
|
|
32
29
|
};
|
|
33
30
|
//# sourceMappingURL=ThemeInverse.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeInverse.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useState } from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { useDefaultThemeName, useThemeName } from '../hooks/useTheme'\nimport { Theme } from './Theme'\n\
|
|
5
|
-
"mappings": "AAAA;AAEA;AACA;AACA;
|
|
4
|
+
"sourcesContent": ["import React, { useState } from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { useDefaultThemeName, useThemeName } from '../hooks/useTheme'\nimport { Theme } from './Theme'\n\nexport const ThemeInverse = ({\n children,\n disable,\n}: {\n children: React.ReactNode\n disable?: boolean\n}) => {\n const themeName = useThemeName()\n const defaultTheme = useDefaultThemeName()\n const [name, setName] = useState<null | string>(null)\n\n // ssr\n useIsomorphicLayoutEffect(() => {\n if (themeName.startsWith('dark')) {\n setName('light')\n }\n if (themeName.startsWith('light')) {\n setName('dark')\n }\n }, [defaultTheme, themeName])\n\n if (disable) {\n return children as JSX.Element\n }\n\n return <Theme name={name}>{children}</Theme>\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AAEA;AACA;AACA;AAEO,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,MAII;AACJ,QAAM,YAAY,aAAa;AAC/B,QAAM,eAAe,oBAAoB;AACzC,QAAM,CAAC,MAAM,WAAW,SAAwB,IAAI;AAGpD,4BAA0B,MAAM;AAC9B,QAAI,UAAU,WAAW,MAAM,GAAG;AAChC,cAAQ,OAAO;AAAA,IACjB;AACA,QAAI,UAAU,WAAW,OAAO,GAAG;AACjC,cAAQ,MAAM;AAAA,IAChB;AAAA,EACF,GAAG,CAAC,cAAc,SAAS,CAAC;AAE5B,MAAI,SAAS;AACX,WAAO;AAAA,EACT;AAEA,SAAO,oCAAC;AAAA,IAAM;AAAA,KAAa,QAAS;AACtC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.136",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@expo/match-media": "^0.3.0",
|
|
25
|
-
"@tamagui/compose-refs": "^1.0.1-beta.
|
|
26
|
-
"@tamagui/helpers": "^1.0.1-beta.
|
|
27
|
-
"@tamagui/rnw": "^1.0.1-beta.
|
|
28
|
-
"@tamagui/use-debounce": "^1.0.1-beta.
|
|
29
|
-
"@tamagui/use-event": "^1.0.1-beta.
|
|
30
|
-
"@tamagui/use-force-update": "^1.0.1-beta.
|
|
25
|
+
"@tamagui/compose-refs": "^1.0.1-beta.136",
|
|
26
|
+
"@tamagui/helpers": "^1.0.1-beta.136",
|
|
27
|
+
"@tamagui/rnw": "^1.0.1-beta.136",
|
|
28
|
+
"@tamagui/use-debounce": "^1.0.1-beta.136",
|
|
29
|
+
"@tamagui/use-event": "^1.0.1-beta.136",
|
|
30
|
+
"@tamagui/use-force-update": "^1.0.1-beta.136",
|
|
31
31
|
"expo-screen-orientation": "^4.3.0",
|
|
32
32
|
"hyphenate-style-name": "^1.0.4",
|
|
33
33
|
"normalize-css-color": "^1.0.2",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-native-web": "*"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
41
|
+
"@tamagui/build": "^1.0.1-beta.136",
|
|
42
42
|
"@types/react": "^18.0.15",
|
|
43
43
|
"csstype": "^3.0.10",
|
|
44
44
|
"esbuild": "^0.14.49",
|
package/types/Pressability.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/types/Tamagui.d.ts
CHANGED
|
File without changes
|
package/types/ThemeContext.d.ts
CHANGED
|
File without changes
|
package/types/ThemeManager.d.ts
CHANGED
|
File without changes
|
package/types/conf.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/createFont.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/types/createTamagui.d.ts
CHANGED
|
File without changes
|
package/types/createTheme.d.ts
CHANGED
|
File without changes
|
package/types/createTokens.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/helpers/calc.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { TamaguiInternalConfig, TamaguiProviderProps } from '../types';
|
|
2
3
|
export declare function createTamaguiProvider(config: TamaguiInternalConfig): ({ disableInjectCSS, children, ...themePropsProvider }: TamaguiProviderProps) => JSX.Element;
|
|
3
4
|
//# sourceMappingURL=createTamaguiProvider.d.ts.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/helpers/isObj.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/hooks/useId.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/index.d.ts
CHANGED
|
File without changes
|
package/types/insertFont.d.ts
CHANGED
|
File without changes
|
package/types/static.d.ts
CHANGED
|
File without changes
|
package/types/styled.d.ts
CHANGED
|
File without changes
|
package/types/types-rnw.d.ts
CHANGED
|
File without changes
|
package/types/types.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/types/views/Slot.d.ts
CHANGED
|
File without changes
|
package/types/views/Stack.d.ts
CHANGED
|
File without changes
|
package/types/views/Text.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/types/views/Theme.d.ts
CHANGED
|
File without changes
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type StringRecord = {
|
|
3
|
-
[key: string]: string;
|
|
4
|
-
};
|
|
5
|
-
export declare function setThemeInversions(next: StringRecord): void;
|
|
6
2
|
export declare const ThemeInverse: ({ children, disable, }: {
|
|
7
3
|
children: React.ReactNode;
|
|
8
4
|
disable?: boolean | undefined;
|
|
9
5
|
}) => JSX.Element;
|
|
10
|
-
export {};
|
|
11
6
|
//# sourceMappingURL=ThemeInverse.d.ts.map
|
|
File without changes
|