@tamagui/core 1.0.0-alpha.22 → 1.0.0-alpha.26
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/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/hooks/useTheme.js.map +2 -2
- package/package.json +7 -8
- package/types/helpers/createMediaStyle.d.ts +1 -0
- package/types/helpers/createMediaStyle.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.d.ts +1 -0
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +1 -15
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/src/constants/constants.ts +0 -12
- package/src/constants/platform.ts +0 -15
- package/src/constants/pseudos.ts +0 -14
- package/src/constants/rnw.tsx +0 -20
- package/src/createComponent.tsx +0 -614
- package/src/createFont.ts +0 -31
- package/src/createShorthands.ts +0 -5
- package/src/createTamagui.ts +0 -218
- package/src/createTheme.ts +0 -22
- package/src/createTokens.ts +0 -88
- package/src/createVariable.ts +0 -26
- package/src/helpers/addStylesUsingClassname.tsx +0 -60
- package/src/helpers/createMediaStyle.ts +0 -46
- package/src/helpers/createPropMapper.ts +0 -192
- package/src/helpers/createTamaguiProvider.tsx +0 -22
- package/src/helpers/extendStaticConfig.ts +0 -68
- package/src/helpers/fixNativeShadow.native.tsx +0 -27
- package/src/helpers/fixNativeShadow.tsx +0 -2
- package/src/helpers/getSplitStyles.tsx +0 -200
- package/src/helpers/getStylesAtomic.native.ts +0 -3
- package/src/helpers/getStylesAtomic.ts +0 -103
- package/src/helpers/insertStyleRule.tsx +0 -18
- package/src/helpers/isObj.ts +0 -1
- package/src/helpers/isTamaguiElement.tsx +0 -5
- package/src/helpers/matchMedia.native.ts +0 -6
- package/src/helpers/matchMedia.ts +0 -17
- package/src/helpers/themeable.tsx +0 -42
- package/src/helpers/validate.ts +0 -59
- package/src/hooks/useConstant.tsx +0 -10
- package/src/hooks/useFeatures.tsx +0 -79
- package/src/hooks/useMedia.tsx +0 -196
- package/src/hooks/usePressable.tsx +0 -9
- package/src/hooks/useTheme.tsx +0 -107
- package/src/index.ts +0 -32
- package/src/static/postProcessStyles.tsx +0 -20
- package/src/static.ts +0 -22
- package/src/styled.ts +0 -82
- package/src/types.tsx +0 -562
- package/src/views/Animated.tsx +0 -121
- package/src/views/Stack.tsx +0 -21
- package/src/views/Text.tsx +0 -67
- package/src/views/TextAncestorContext.tsx +0 -11
- package/src/views/Theme.tsx +0 -94
- package/src/views/ThemeContext.tsx +0 -5
- package/src/views/ThemeInverse.tsx +0 -22
- package/src/views/ThemeManagerContext.tsx +0 -62
- package/src/views/ThemeProvider.tsx +0 -52
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/getStylesAtomic.ts"],
|
|
4
|
-
"sourcesContent": ["import { AllRules
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import { AllRules } from '@tamagui/helpers'\nimport type { StyleObject } from '@tamagui/helpers'\nimport { ViewStyle } from 'react-native'\n\nimport { pseudos } from '../constants/pseudos'\nimport { rnw } from '../constants/rnw'\n\nconst generateStyle = (style: any) => {\n const { atomic, createCompileableStyle, createReactDOMStyle, i18Style } = rnw\n return {\n ...atomic(createCompileableStyle(createReactDOMStyle(i18Style(style)))),\n }\n}\n\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: 'borderBottomStyle',\n borderTopWidth: 'borderTopStyle',\n borderLeftWidth: 'borderLeftStyle',\n borderRightWidth: 'borderRightStyle',\n}\n\nexport function getStylesAtomic(style: any, avoidCollection = false) {\n const styles: { [key: string]: ViewStyle } = {\n base: {},\n }\n // split pseudos\n for (const key in style) {\n if (!!pseudos[key]) {\n styles[key] = style[key]\n } else {\n styles.base[key] = style[key]\n }\n }\n return Object.keys(styles)\n .map((key) => {\n return getAtomicStyle(styles[key], pseudos[key], avoidCollection)\n })\n .flat()\n}\n\nconst importantRegex = /\\!important*/g\n\nfunction getAtomicStyle(\n style: ViewStyle,\n pseudo?: { name: string; priority: number },\n avoidCollection?: boolean\n): StyleObject[] {\n if (style == null || typeof style !== 'object') {\n throw new Error(`Wrong style type: \"${typeof style}\": ${style}`)\n }\n\n // why is this diff from react-native-web!? need to figure out\n for (const key in borderDefaults) {\n if (key in style) {\n style[borderDefaults[key]] = style[borderDefaults[key]] ?? 'solid'\n }\n }\n\n const all = generateStyle(style)\n return Object.keys(all).map((key) => {\n const val = all[key]\n const hash = val.identifier.slice(`${val.identifier}`.lastIndexOf('-') + 1)\n // pseudos have a `--` to be easier to find with concatClassNames\n const psuedoPrefix = pseudo ? `-${pseudo.name}-` : ''\n const identifier = `_${val.property}-${psuedoPrefix}${hash}`\n const className = `.${identifier}`\n const rules = val.rules.map((rule) => {\n if (pseudo) {\n const psuedoPrefixSelect = [...Array(pseudo.priority)].map(() => ':root').join('') + ' '\n let res = rule\n .replace(`.${val.identifier}`, `${psuedoPrefixSelect} ${className}`)\n .replace('{', `:${pseudo.name}{`)\n\n if (pseudo.name === 'hover') {\n // hover styles need to be conditional\n // perhaps this can be generalized but for now lets just shortcut\n // and hardcode for hover styles, if we need to later we can\n // WEIRD SYNTAX, SEE:\n // https://stackoverflow.com/questions/40532204/media-query-for-devices-supporting-hover\n res = `@media not all and (hover: none) { ${res} }`\n }\n return res\n }\n return rule.replace(`.${val.identifier}`, className).replace(importantRegex, '')\n })\n\n if (!avoidCollection) {\n if (rules.length > 1) {\n console.warn('have never seen more than one, verifying')\n }\n AllRules.add(rules[0])\n }\n\n const result: StyleObject = {\n property: val.property,\n value: val.value,\n identifier,\n className,\n rules,\n }\n return result\n })\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;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;AACtB,UAAM,QAAQ,IAAI,MAAM,IAAI,CAAC,SAAS;AACpC,UAAI,QAAQ;AACV,cAAM,qBAAqB,CAAC,GAAG,MAAM,OAAO,WAAW,IAAI,MAAM,SAAS,KAAK,MAAM;AACrF,YAAI,MAAM,KACP,QAAQ,IAAI,IAAI,cAAc,GAAG,sBAAsB,aACvD,QAAQ,KAAK,IAAI,OAAO;AAE3B,YAAI,OAAO,SAAS,SAAS;AAM3B,gBAAM,sCAAsC;AAAA;AAE9C,eAAO;AAAA;AAET,aAAO,KAAK,QAAQ,IAAI,IAAI,cAAc,WAAW,QAAQ,gBAAgB;AAAA;AAG/E,QAAI,CAAC,iBAAiB;AACpB,UAAI,MAAM,SAAS,GAAG;AACpB,gBAAQ,KAAK;AAAA;AAEf,8BAAS,IAAI,MAAM;AAAA;AAGrB,UAAM,SAAsB;AAAA,MAC1B,UAAU,IAAI;AAAA,MACd,OAAO,IAAI;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA;AAEF,WAAO;AAAA;AAAA;AA1DF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useTheme.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useForceUpdate } from '@tamagui/use-force-update'\nimport React, { useContext, useEffect, useMemo, useRef, useState } from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { Variable } from '../createVariable'\nimport { ThemeName } from '../types'\nimport { ThemeContext } from '../views/ThemeContext'\nimport { ThemeManagerContext } from '../views/ThemeManagerContext'\nimport { GET_DEFAULT_THEME } from '../views/ThemeProvider'\n\ntype UseThemeState = {\n uuid: Object\n keys: Set<string>\n isRendering: boolean\n}\n\nconst areEqualSets = (a: Set<string>, b: Set<string>) => {\n if (a.size !== b.size) return false\n for (const val in a) {\n if (!b.has(val)) {\n return false\n }\n }\n return true\n}\n\nexport const useThemeName = (opts?: { parent?: true }) => {\n const parent = useContext(ThemeManagerContext)\n const [name, setName] = useState(parent.name)\n\n useIsomorphicLayoutEffect(() => {\n return parent.onChangeTheme((next, manager) => {\n setName(opts?.parent ? manager.parentName : next)\n })\n }, [parent])\n\n return name || 'light'\n}\n\nexport const useDefaultThemeName = () => {\n return useContext(ThemeContext)[GET_DEFAULT_THEME] as any as ThemeName\n}\n\nexport const useTheme = () => {\n const forceUpdate = useForceUpdate()\n const manager = useContext(ThemeManagerContext)\n const themes = useContext(ThemeContext)\n const state = useRef() as React.MutableRefObject<UseThemeState>\n if (!state.current) {\n state.current = {\n uuid: {},\n keys: new Set(),\n isRendering: true,\n }\n }\n state.current.isRendering = true\n\n // track usage\n useIsomorphicLayoutEffect(() => {\n const st = state.current\n st.isRendering = false\n const cur = manager.keys.get(st.uuid)\n if (!cur || !areEqualSets(st.keys, cur)) {\n manager.track(st.uuid, st.keys)\n }\n })\n\n useEffect(() => {\n return manager.onUpdate(state.current.uuid, forceUpdate)\n }, [])\n\n const theme = (manager.name ? themes[manager.name] : themes.light) ?? themes.light\n\n return useMemo(\n () => {\n return new Proxy(theme, {\n get(_, key: string) {\n const name = manager.name\n if (!name) {\n return Reflect.get(_, key)\n }\n let activeTheme = themes[name]\n if (!activeTheme) {\n console.error('No theme by name', name, 'only:', themes, 'keeping current theme')\n activeTheme = theme\n }\n const val = activeTheme[key]\n if (process.env.NODE_ENV === 'development') {\n if (typeof val === 'undefined') {\n console.warn(`No theme value \"${String(key)}\" in: ${Object.keys(activeTheme)}`)\n return null\n }\n }\n if (state.current.isRendering) {\n state.current.keys.add(key)\n }\n // TODO costly, can make faster (we need name mapping to og name, but val pointing to new val)\n // console.log('returning new variable', val, key)\n return new Variable({ val: val.val, name: key })\n },\n })\n },\n [\n /* if concurrent mode wanted put manager.name here */\n ]\n )\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAA+B;AAC/B,mBAAwE;
|
|
4
|
+
"sourcesContent": ["import { useForceUpdate } from '@tamagui/use-force-update'\nimport React, { useContext, useEffect, useMemo, useRef, useState } from 'react'\n\nimport { ThemeObject } from '../../types'\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { Variable } from '../createVariable'\nimport { ThemeName } from '../types'\nimport { ThemeContext } from '../views/ThemeContext'\nimport { ThemeManagerContext } from '../views/ThemeManagerContext'\nimport { GET_DEFAULT_THEME } from '../views/ThemeProvider'\n\ntype UseThemeState = {\n uuid: Object\n keys: Set<string>\n isRendering: boolean\n}\n\nconst areEqualSets = (a: Set<string>, b: Set<string>) => {\n if (a.size !== b.size) return false\n for (const val in a) {\n if (!b.has(val)) {\n return false\n }\n }\n return true\n}\n\nexport const useThemeName = (opts?: { parent?: true }) => {\n const parent = useContext(ThemeManagerContext)\n const [name, setName] = useState(parent.name)\n\n useIsomorphicLayoutEffect(() => {\n return parent.onChangeTheme((next, manager) => {\n setName(opts?.parent ? manager.parentName : next)\n })\n }, [parent])\n\n return name || 'light'\n}\n\nexport const useDefaultThemeName = () => {\n return useContext(ThemeContext)[GET_DEFAULT_THEME] as any as ThemeName\n}\n\nexport const useTheme = (): ThemeObject => {\n const forceUpdate = useForceUpdate()\n const manager = useContext(ThemeManagerContext)\n const themes = useContext(ThemeContext)\n const state = useRef() as React.MutableRefObject<UseThemeState>\n if (!state.current) {\n state.current = {\n uuid: {},\n keys: new Set(),\n isRendering: true,\n }\n }\n state.current.isRendering = true\n\n // track usage\n useIsomorphicLayoutEffect(() => {\n const st = state.current\n st.isRendering = false\n const cur = manager.keys.get(st.uuid)\n if (!cur || !areEqualSets(st.keys, cur)) {\n manager.track(st.uuid, st.keys)\n }\n })\n\n useEffect(() => {\n return manager.onUpdate(state.current.uuid, forceUpdate)\n }, [])\n\n const theme = (manager.name ? themes[manager.name] : themes.light) ?? themes.light\n\n return useMemo(\n () => {\n return new Proxy(theme, {\n get(_, key: string) {\n const name = manager.name\n if (!name) {\n return Reflect.get(_, key)\n }\n let activeTheme = themes[name]\n if (!activeTheme) {\n console.error('No theme by name', name, 'only:', themes, 'keeping current theme')\n activeTheme = theme\n }\n const val = activeTheme[key]\n if (process.env.NODE_ENV === 'development') {\n if (typeof val === 'undefined') {\n console.warn(`No theme value \"${String(key)}\" in: ${Object.keys(activeTheme)}`)\n return null\n }\n }\n if (state.current.isRendering) {\n state.current.keys.add(key)\n }\n // TODO costly, can make faster (we need name mapping to og name, but val pointing to new val)\n // console.log('returning new variable', val, key)\n return new Variable({ val: val.val, name: key })\n },\n })\n },\n [\n /* if concurrent mode wanted put manager.name here */\n ]\n )\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAA+B;AAC/B,mBAAwE;AAGxE,sBAA0C;AAC1C,4BAAyB;AAEzB,0BAA6B;AAC7B,iCAAoC;AACpC,2BAAkC;AAQlC,MAAM,eAAe,wBAAC,GAAgB,MAAmB;AACvD,MAAI,EAAE,SAAS,EAAE;AAAM,WAAO;AAC9B,aAAW,OAAO,GAAG;AACnB,QAAI,CAAC,EAAE,IAAI,MAAM;AACf,aAAO;AAAA;AAAA;AAGX,SAAO;AAAA,GAPY;AAUd,MAAM,eAAe,wBAAC,SAA6B;AACxD,QAAM,SAAS,6BAAW;AAC1B,QAAM,CAAC,MAAM,WAAW,2BAAS,OAAO;AAExC,iDAA0B,MAAM;AAC9B,WAAO,OAAO,cAAc,CAAC,MAAM,YAAY;AAC7C,cAAQ,8BAAM,UAAS,QAAQ,aAAa;AAAA;AAAA,KAE7C,CAAC;AAEJ,SAAO,QAAQ;AAAA,GAVW;AAarB,MAAM,sBAAsB,6BAAM;AACvC,SAAO,6BAAW,kCAAc;AAAA,GADC;AAI5B,MAAM,WAAW,6BAAmB;AACzC,QAAM,cAAc;AACpB,QAAM,UAAU,6BAAW;AAC3B,QAAM,SAAS,6BAAW;AAC1B,QAAM,QAAQ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
3
3
|
"sources": ["../../../src/helpers/getStylesAtomic.ts"],
|
|
4
|
-
"sourcesContent": ["import { AllRules
|
|
5
|
-
"mappings": ";;AAAA;
|
|
4
|
+
"sourcesContent": ["import { AllRules } from '@tamagui/helpers'\nimport type { StyleObject } from '@tamagui/helpers'\nimport { ViewStyle } from 'react-native'\n\nimport { pseudos } from '../constants/pseudos'\nimport { rnw } from '../constants/rnw'\n\nconst generateStyle = (style: any) => {\n const { atomic, createCompileableStyle, createReactDOMStyle, i18Style } = rnw\n return {\n ...atomic(createCompileableStyle(createReactDOMStyle(i18Style(style)))),\n }\n}\n\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: 'borderBottomStyle',\n borderTopWidth: 'borderTopStyle',\n borderLeftWidth: 'borderLeftStyle',\n borderRightWidth: 'borderRightStyle',\n}\n\nexport function getStylesAtomic(style: any, avoidCollection = false) {\n const styles: { [key: string]: ViewStyle } = {\n base: {},\n }\n // split pseudos\n for (const key in style) {\n if (!!pseudos[key]) {\n styles[key] = style[key]\n } else {\n styles.base[key] = style[key]\n }\n }\n return Object.keys(styles)\n .map((key) => {\n return getAtomicStyle(styles[key], pseudos[key], avoidCollection)\n })\n .flat()\n}\n\nconst importantRegex = /\\!important*/g\n\nfunction getAtomicStyle(\n style: ViewStyle,\n pseudo?: { name: string; priority: number },\n avoidCollection?: boolean\n): StyleObject[] {\n if (style == null || typeof style !== 'object') {\n throw new Error(`Wrong style type: \"${typeof style}\": ${style}`)\n }\n\n // why is this diff from react-native-web!? need to figure out\n for (const key in borderDefaults) {\n if (key in style) {\n style[borderDefaults[key]] = style[borderDefaults[key]] ?? 'solid'\n }\n }\n\n const all = generateStyle(style)\n return Object.keys(all).map((key) => {\n const val = all[key]\n const hash = val.identifier.slice(`${val.identifier}`.lastIndexOf('-') + 1)\n // pseudos have a `--` to be easier to find with concatClassNames\n const psuedoPrefix = pseudo ? `-${pseudo.name}-` : ''\n const identifier = `_${val.property}-${psuedoPrefix}${hash}`\n const className = `.${identifier}`\n const rules = val.rules.map((rule) => {\n if (pseudo) {\n const psuedoPrefixSelect = [...Array(pseudo.priority)].map(() => ':root').join('') + ' '\n let res = rule\n .replace(`.${val.identifier}`, `${psuedoPrefixSelect} ${className}`)\n .replace('{', `:${pseudo.name}{`)\n\n if (pseudo.name === 'hover') {\n // hover styles need to be conditional\n // perhaps this can be generalized but for now lets just shortcut\n // and hardcode for hover styles, if we need to later we can\n // WEIRD SYNTAX, SEE:\n // https://stackoverflow.com/questions/40532204/media-query-for-devices-supporting-hover\n res = `@media not all and (hover: none) { ${res} }`\n }\n return res\n }\n return rule.replace(`.${val.identifier}`, className).replace(importantRegex, '')\n })\n\n if (!avoidCollection) {\n if (rules.length > 1) {\n console.warn('have never seen more than one, verifying')\n }\n AllRules.add(rules[0])\n }\n\n const result: StyleObject = {\n property: val.property,\n value: val.value,\n identifier,\n className,\n rules,\n }\n return result\n })\n}\n"],
|
|
5
|
+
"mappings": ";;AAAA;AAIA;AACA;AAEA,MAAM,gBAAgB,wBAAC,UAAe;AACpC,QAAM,EAAE,QAAQ,wBAAwB,qBAAqB,aAAa;AAC1E,SAAO;AAAA,OACF,OAAO,uBAAuB,oBAAoB,SAAS;AAAA;AAAA,GAH5C;AAOtB,MAAM,iBAAiB;AAAA,EACrB,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA;AAGb,yBAAyB,OAAY,kBAAkB,OAAO;AACnE,QAAM,SAAuC;AAAA,IAC3C,MAAM;AAAA;AAGR,aAAW,OAAO,OAAO;AACvB,QAAI,CAAC,CAAC,QAAQ,MAAM;AAClB,aAAO,OAAO,MAAM;AAAA,WACf;AACL,aAAO,KAAK,OAAO,MAAM;AAAA;AAAA;AAG7B,SAAO,OAAO,KAAK,QAChB,IAAI,CAAC,QAAQ;AACZ,WAAO,eAAe,OAAO,MAAM,QAAQ,MAAM;AAAA,KAElD;AAAA;AAhBW;A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|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useTheme.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useForceUpdate } from '@tamagui/use-force-update'\nimport React, { useContext, useEffect, useMemo, useRef, useState } from 'react'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { Variable } from '../createVariable'\nimport { ThemeName } from '../types'\nimport { ThemeContext } from '../views/ThemeContext'\nimport { ThemeManagerContext } from '../views/ThemeManagerContext'\nimport { GET_DEFAULT_THEME } from '../views/ThemeProvider'\n\ntype UseThemeState = {\n uuid: Object\n keys: Set<string>\n isRendering: boolean\n}\n\nconst areEqualSets = (a: Set<string>, b: Set<string>) => {\n if (a.size !== b.size) return false\n for (const val in a) {\n if (!b.has(val)) {\n return false\n }\n }\n return true\n}\n\nexport const useThemeName = (opts?: { parent?: true }) => {\n const parent = useContext(ThemeManagerContext)\n const [name, setName] = useState(parent.name)\n\n useIsomorphicLayoutEffect(() => {\n return parent.onChangeTheme((next, manager) => {\n setName(opts?.parent ? manager.parentName : next)\n })\n }, [parent])\n\n return name || 'light'\n}\n\nexport const useDefaultThemeName = () => {\n return useContext(ThemeContext)[GET_DEFAULT_THEME] as any as ThemeName\n}\n\nexport const useTheme = () => {\n const forceUpdate = useForceUpdate()\n const manager = useContext(ThemeManagerContext)\n const themes = useContext(ThemeContext)\n const state = useRef() as React.MutableRefObject<UseThemeState>\n if (!state.current) {\n state.current = {\n uuid: {},\n keys: new Set(),\n isRendering: true,\n }\n }\n state.current.isRendering = true\n\n // track usage\n useIsomorphicLayoutEffect(() => {\n const st = state.current\n st.isRendering = false\n const cur = manager.keys.get(st.uuid)\n if (!cur || !areEqualSets(st.keys, cur)) {\n manager.track(st.uuid, st.keys)\n }\n })\n\n useEffect(() => {\n return manager.onUpdate(state.current.uuid, forceUpdate)\n }, [])\n\n const theme = (manager.name ? themes[manager.name] : themes.light) ?? themes.light\n\n return useMemo(\n () => {\n return new Proxy(theme, {\n get(_, key: string) {\n const name = manager.name\n if (!name) {\n return Reflect.get(_, key)\n }\n let activeTheme = themes[name]\n if (!activeTheme) {\n console.error('No theme by name', name, 'only:', themes, 'keeping current theme')\n activeTheme = theme\n }\n const val = activeTheme[key]\n if (process.env.NODE_ENV === 'development') {\n if (typeof val === 'undefined') {\n console.warn(`No theme value \"${String(key)}\" in: ${Object.keys(activeTheme)}`)\n return null\n }\n }\n if (state.current.isRendering) {\n state.current.keys.add(key)\n }\n // TODO costly, can make faster (we need name mapping to og name, but val pointing to new val)\n // console.log('returning new variable', val, key)\n return new Variable({ val: val.val, name: key })\n },\n })\n },\n [\n /* if concurrent mode wanted put manager.name here */\n ]\n )\n}\n"],
|
|
5
|
-
"mappings": ";;AAAA;AACA;
|
|
4
|
+
"sourcesContent": ["import { useForceUpdate } from '@tamagui/use-force-update'\nimport React, { useContext, useEffect, useMemo, useRef, useState } from 'react'\n\nimport { ThemeObject } from '../../types'\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { Variable } from '../createVariable'\nimport { ThemeName } from '../types'\nimport { ThemeContext } from '../views/ThemeContext'\nimport { ThemeManagerContext } from '../views/ThemeManagerContext'\nimport { GET_DEFAULT_THEME } from '../views/ThemeProvider'\n\ntype UseThemeState = {\n uuid: Object\n keys: Set<string>\n isRendering: boolean\n}\n\nconst areEqualSets = (a: Set<string>, b: Set<string>) => {\n if (a.size !== b.size) return false\n for (const val in a) {\n if (!b.has(val)) {\n return false\n }\n }\n return true\n}\n\nexport const useThemeName = (opts?: { parent?: true }) => {\n const parent = useContext(ThemeManagerContext)\n const [name, setName] = useState(parent.name)\n\n useIsomorphicLayoutEffect(() => {\n return parent.onChangeTheme((next, manager) => {\n setName(opts?.parent ? manager.parentName : next)\n })\n }, [parent])\n\n return name || 'light'\n}\n\nexport const useDefaultThemeName = () => {\n return useContext(ThemeContext)[GET_DEFAULT_THEME] as any as ThemeName\n}\n\nexport const useTheme = (): ThemeObject => {\n const forceUpdate = useForceUpdate()\n const manager = useContext(ThemeManagerContext)\n const themes = useContext(ThemeContext)\n const state = useRef() as React.MutableRefObject<UseThemeState>\n if (!state.current) {\n state.current = {\n uuid: {},\n keys: new Set(),\n isRendering: true,\n }\n }\n state.current.isRendering = true\n\n // track usage\n useIsomorphicLayoutEffect(() => {\n const st = state.current\n st.isRendering = false\n const cur = manager.keys.get(st.uuid)\n if (!cur || !areEqualSets(st.keys, cur)) {\n manager.track(st.uuid, st.keys)\n }\n })\n\n useEffect(() => {\n return manager.onUpdate(state.current.uuid, forceUpdate)\n }, [])\n\n const theme = (manager.name ? themes[manager.name] : themes.light) ?? themes.light\n\n return useMemo(\n () => {\n return new Proxy(theme, {\n get(_, key: string) {\n const name = manager.name\n if (!name) {\n return Reflect.get(_, key)\n }\n let activeTheme = themes[name]\n if (!activeTheme) {\n console.error('No theme by name', name, 'only:', themes, 'keeping current theme')\n activeTheme = theme\n }\n const val = activeTheme[key]\n if (process.env.NODE_ENV === 'development') {\n if (typeof val === 'undefined') {\n console.warn(`No theme value \"${String(key)}\" in: ${Object.keys(activeTheme)}`)\n return null\n }\n }\n if (state.current.isRendering) {\n state.current.keys.add(key)\n }\n // TODO costly, can make faster (we need name mapping to og name, but val pointing to new val)\n // console.log('returning new variable', val, key)\n return new Variable({ val: val.val, name: key })\n },\n })\n },\n [\n /* if concurrent mode wanted put manager.name here */\n ]\n )\n}\n"],
|
|
5
|
+
"mappings": ";;AAAA;AACA;AAGA;AACA;AAEA;AACA;AACA;AAQA,MAAM,eAAe,wBAAC,GAAgB,MAAmB;AACvD,MAAI,EAAE,SAAS,EAAE;AAAM,WAAO;AAC9B,aAAW,OAAO,GAAG;AACnB,QAAI,CAAC,EAAE,IAAI,MAAM;AACf,aAAO;AAAA;AAAA;AAGX,SAAO;AAAA,GAPY;AAUd,MAAM,eAAe,wBAAC,SAA6B;AACxD,QAAM,SAAS,WAAW;AAC1B,QAAM,CAAC,MAAM,WAAW,SAAS,OAAO;AAExC,4BAA0B,MAAM;AAC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aAAa,OAAO,KAAK;AAChE,mBAAO;AAAA;AAAA;AAGX,YAAI,MAAM,QAAQ,aAAa;AAC7B,gBAAM,QAAQ,KAAK,IAAI;AAAA;AAIzB,eAAO,IAAI,SAAS,EAAE,KAAK,IAAI,KAAK,MAAM;AAAA;AAAA;AAAA,KAIhD;AAAA,GA3DoB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.26",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist",
|
|
@@ -11,14 +11,13 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"types",
|
|
14
|
-
"dist"
|
|
15
|
-
"src"
|
|
14
|
+
"dist"
|
|
16
15
|
],
|
|
17
16
|
"dependencies": {
|
|
18
|
-
"@tamagui/helpers": "^1.0.0-alpha.
|
|
17
|
+
"@tamagui/helpers": "^1.0.0-alpha.26",
|
|
19
18
|
"@tamagui/ow": "^0.28.1",
|
|
20
|
-
"@tamagui/use-debounce": "^1.0.0-alpha.
|
|
21
|
-
"@tamagui/use-force-update": "^1.0.0-alpha.
|
|
19
|
+
"@tamagui/use-debounce": "^1.0.0-alpha.26",
|
|
20
|
+
"@tamagui/use-force-update": "^1.0.0-alpha.26",
|
|
22
21
|
"react": "*",
|
|
23
22
|
"react-dom": "*"
|
|
24
23
|
},
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
"@types/react": "^17.0.35",
|
|
31
30
|
"esbuild": "^0.13.12",
|
|
32
31
|
"react-native-web": "^0.17.5",
|
|
33
|
-
"typescript": "^4.
|
|
32
|
+
"typescript": "^4.5.2"
|
|
34
33
|
},
|
|
35
34
|
"publishConfig": {
|
|
36
35
|
"access": "public"
|
|
@@ -38,5 +37,5 @@
|
|
|
38
37
|
"engines": {
|
|
39
38
|
"node": ">=16"
|
|
40
39
|
},
|
|
41
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "21a579f106f01cf6b669c42b64f270c16138bae1"
|
|
42
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StyleObject } from '@tamagui/helpers';
|
|
1
2
|
import { MediaQueries } from '../types';
|
|
2
3
|
export declare const MEDIA_SEP = "_";
|
|
3
4
|
export declare const createMediaStyle: ({ identifier, rules }: StyleObject, mediaKey: string, mediaQueries: MediaQueries, negate?: boolean | undefined, importance?: number) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMediaStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/createMediaStyle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createMediaStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/createMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAKvC,eAAO,MAAM,SAAS,MAAM,CAAA;AAE5B,eAAO,MAAM,gBAAgB,0BACJ,WAAW,YACxB,MAAM,gBACF,YAAY;;;CAgC3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStylesAtomic.d.ts","sourceRoot":"","sources":["../../src/helpers/getStylesAtomic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getStylesAtomic.d.ts","sourceRoot":"","sources":["../../src/helpers/getStylesAtomic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAqBnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,eAAe,UAAQ,iBAiBlE"}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import { Variable } from '../createVariable';
|
|
2
1
|
export declare const useThemeName: (opts?: {
|
|
3
2
|
parent?: true | undefined;
|
|
4
3
|
} | undefined) => string;
|
|
5
4
|
export declare const useDefaultThemeName: () => string | number;
|
|
6
|
-
export declare const useTheme: () =>
|
|
7
|
-
bg: string | Variable;
|
|
8
|
-
bg2: string | Variable;
|
|
9
|
-
bg3: string | Variable;
|
|
10
|
-
bg4: string | Variable;
|
|
11
|
-
color: string | Variable;
|
|
12
|
-
color2: string | Variable;
|
|
13
|
-
color3: string | Variable;
|
|
14
|
-
color4: string | Variable;
|
|
15
|
-
borderColor: string | Variable;
|
|
16
|
-
borderColor2: string | Variable;
|
|
17
|
-
shadowColor: string | Variable;
|
|
18
|
-
shadowColor2: string | Variable;
|
|
19
|
-
};
|
|
5
|
+
export declare const useTheme: () => ThemeObject;
|
|
20
6
|
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.tsx"],"names":[],"mappings":"AA2BA,eAAO,MAAM,YAAY;;wBAWxB,CAAA;AAED,eAAO,MAAM,mBAAmB,uBAE/B,CAAA;AAED,eAAO,MAAM,QAAQ,mBA+DpB,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { isWeb } from './platform'
|
|
2
|
-
|
|
3
|
-
export const stackDefaultStyles = {
|
|
4
|
-
alignItems: 'stretch',
|
|
5
|
-
flexShrink: 0,
|
|
6
|
-
// more accurately match react-native defaults on web
|
|
7
|
-
...(isWeb && {
|
|
8
|
-
display: 'flex',
|
|
9
|
-
flexBasis: 'auto',
|
|
10
|
-
boxSizing: 'border-box',
|
|
11
|
-
}),
|
|
12
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useEffect, useLayoutEffect } from 'react'
|
|
2
|
-
import { Platform } from 'react-native'
|
|
3
|
-
|
|
4
|
-
export const isWeb = process.env.TAMAGUI_TARGET === 'web' ? true : Platform?.OS === 'web'
|
|
5
|
-
export const isSSR = isWeb && typeof window === 'undefined'
|
|
6
|
-
export const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect
|
|
7
|
-
export const isChrome = typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent || '')
|
|
8
|
-
export const supportsTouchWeb = typeof window !== 'undefined' && 'ontouchstart' in window
|
|
9
|
-
export const isTouchDevice = !isWeb || supportsTouchWeb
|
|
10
|
-
export const isWebIOS =
|
|
11
|
-
isWeb &&
|
|
12
|
-
typeof navigator !== 'undefined' &&
|
|
13
|
-
(/iPad|iPhone|iPod/.test(navigator.platform) ||
|
|
14
|
-
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&
|
|
15
|
-
!window['MSStream']
|
package/src/constants/pseudos.ts
DELETED
package/src/constants/rnw.tsx
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const interopRequire = (src: any) => ('default' in src ? src.default : src)
|
|
2
|
-
|
|
3
|
-
export const rnw: Record<string, any> = {}
|
|
4
|
-
|
|
5
|
-
// in static mode, require them directly since we can't import react-native-web at all (it has flow stuff in it)
|
|
6
|
-
if (process.env.IS_STATIC === 'is_static') {
|
|
7
|
-
const createCompileableStyle = require('react-native-web/dist/cjs/exports/StyleSheet/createCompileableStyle')
|
|
8
|
-
const createReactDOMStyle = require('react-native-web/dist/cjs/exports/StyleSheet/createReactDOMStyle')
|
|
9
|
-
const i18Style = require('react-native-web/dist/cjs/exports/StyleSheet/i18nStyle')
|
|
10
|
-
const atomic = require('react-native-web/dist/cjs/exports/StyleSheet/compile').atomic
|
|
11
|
-
Object.assign(rnw, {
|
|
12
|
-
createCompileableStyle,
|
|
13
|
-
createReactDOMStyle,
|
|
14
|
-
i18Style,
|
|
15
|
-
atomic,
|
|
16
|
-
})
|
|
17
|
-
} else if (process.env.TAMAGUI_TARGET === 'web') {
|
|
18
|
-
// when targeting web (client) import it like so
|
|
19
|
-
Object.assign(rnw, interopRequire(require('react-native-web').TamaguiExports))
|
|
20
|
-
}
|