@tamagui/core 1.0.0-alpha.23 → 1.0.0-alpha.27

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.
Files changed (97) hide show
  1. package/dist/cjs/hooks/useTheme.js.map +2 -2
  2. package/dist/esm/hooks/useTheme.js.map +2 -2
  3. package/package.json +5 -5
  4. package/types/constants/constants.d.ts +0 -8
  5. package/types/constants/constants.d.ts.map +0 -1
  6. package/types/constants/platform.d.ts +0 -9
  7. package/types/constants/platform.d.ts.map +0 -1
  8. package/types/constants/pseudos.d.ts +0 -15
  9. package/types/constants/pseudos.d.ts.map +0 -1
  10. package/types/constants/rnw.d.ts +0 -2
  11. package/types/constants/rnw.d.ts.map +0 -1
  12. package/types/createComponent.d.ts +0 -17
  13. package/types/createComponent.d.ts.map +0 -1
  14. package/types/createFont.d.ts +0 -3
  15. package/types/createFont.d.ts.map +0 -1
  16. package/types/createShorthands.d.ts +0 -2
  17. package/types/createShorthands.d.ts.map +0 -1
  18. package/types/createTamagui.d.ts +0 -54
  19. package/types/createTamagui.d.ts.map +0 -1
  20. package/types/createTheme.d.ts +0 -5
  21. package/types/createTheme.d.ts.map +0 -1
  22. package/types/createTokens.d.ts +0 -55
  23. package/types/createTokens.d.ts.map +0 -1
  24. package/types/createVariable.d.ts +0 -15
  25. package/types/createVariable.d.ts.map +0 -1
  26. package/types/helpers/addStylesUsingClassname.d.ts +0 -3
  27. package/types/helpers/addStylesUsingClassname.d.ts.map +0 -1
  28. package/types/helpers/createMediaStyle.d.ts +0 -8
  29. package/types/helpers/createMediaStyle.d.ts.map +0 -1
  30. package/types/helpers/createPropMapper.d.ts +0 -3
  31. package/types/helpers/createPropMapper.d.ts.map +0 -1
  32. package/types/helpers/createTamaguiProvider.d.ts +0 -5
  33. package/types/helpers/createTamaguiProvider.d.ts.map +0 -1
  34. package/types/helpers/extendStaticConfig.d.ts +0 -5
  35. package/types/helpers/extendStaticConfig.d.ts.map +0 -1
  36. package/types/helpers/fixNativeShadow.d.ts +0 -2
  37. package/types/helpers/fixNativeShadow.d.ts.map +0 -1
  38. package/types/helpers/fixNativeShadow.native.d.ts +0 -2
  39. package/types/helpers/fixNativeShadow.native.d.ts.map +0 -1
  40. package/types/helpers/getSplitStyles.d.ts +0 -15
  41. package/types/helpers/getSplitStyles.d.ts.map +0 -1
  42. package/types/helpers/getStylesAtomic.d.ts +0 -3
  43. package/types/helpers/getStylesAtomic.d.ts.map +0 -1
  44. package/types/helpers/getStylesAtomic.native.d.ts +0 -2
  45. package/types/helpers/getStylesAtomic.native.d.ts.map +0 -1
  46. package/types/helpers/insertStyleRule.d.ts +0 -2
  47. package/types/helpers/insertStyleRule.d.ts.map +0 -1
  48. package/types/helpers/isObj.d.ts +0 -2
  49. package/types/helpers/isObj.d.ts.map +0 -1
  50. package/types/helpers/isTamaguiElement.d.ts +0 -3
  51. package/types/helpers/isTamaguiElement.d.ts.map +0 -1
  52. package/types/helpers/matchMedia.d.ts +0 -2
  53. package/types/helpers/matchMedia.d.ts.map +0 -1
  54. package/types/helpers/matchMedia.native.d.ts +0 -3
  55. package/types/helpers/matchMedia.native.d.ts.map +0 -1
  56. package/types/helpers/themeable.d.ts +0 -10
  57. package/types/helpers/themeable.d.ts.map +0 -1
  58. package/types/helpers/validate.d.ts +0 -4
  59. package/types/helpers/validate.d.ts.map +0 -1
  60. package/types/hooks/useConstant.d.ts +0 -2
  61. package/types/hooks/useConstant.d.ts.map +0 -1
  62. package/types/hooks/useFeatures.d.ts +0 -5
  63. package/types/hooks/useFeatures.d.ts.map +0 -1
  64. package/types/hooks/useMedia.d.ts +0 -16
  65. package/types/hooks/useMedia.d.ts.map +0 -1
  66. package/types/hooks/usePressable.d.ts +0 -3
  67. package/types/hooks/usePressable.d.ts.map +0 -1
  68. package/types/hooks/useTheme.d.ts +0 -20
  69. package/types/hooks/useTheme.d.ts.map +0 -1
  70. package/types/index.d.ts +0 -29
  71. package/types/index.d.ts.map +0 -1
  72. package/types/static/postProcessStyles.d.ts +0 -7
  73. package/types/static/postProcessStyles.d.ts.map +0 -1
  74. package/types/static.d.ts +0 -15
  75. package/types/static.d.ts.map +0 -1
  76. package/types/styled.d.ts +0 -21
  77. package/types/styled.d.ts.map +0 -1
  78. package/types/types.d.ts +0 -306
  79. package/types/types.d.ts.map +0 -1
  80. package/types/views/Animated.d.ts +0 -15
  81. package/types/views/Animated.d.ts.map +0 -1
  82. package/types/views/Stack.d.ts +0 -3
  83. package/types/views/Stack.d.ts.map +0 -1
  84. package/types/views/Text.d.ts +0 -3
  85. package/types/views/Text.d.ts.map +0 -1
  86. package/types/views/TextAncestorContext.d.ts +0 -5
  87. package/types/views/TextAncestorContext.d.ts.map +0 -1
  88. package/types/views/Theme.d.ts +0 -8
  89. package/types/views/Theme.d.ts.map +0 -1
  90. package/types/views/ThemeContext.d.ts +0 -18
  91. package/types/views/ThemeContext.d.ts.map +0 -1
  92. package/types/views/ThemeInverse.d.ts +0 -10
  93. package/types/views/ThemeInverse.d.ts.map +0 -1
  94. package/types/views/ThemeManagerContext.d.ts +0 -22
  95. package/types/views/ThemeManagerContext.d.ts.map +0 -1
  96. package/types/views/ThemeProvider.d.ts +0 -10
  97. package/types/views/ThemeProvider.d.ts.map +0 -1
@@ -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": ";;;;;;;;;;;;;;;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S,SAAQ,OAAO,OAAO,QAAQ,QAAQ,OAAO,UAAU,OAAO;AAE7E,SAAO,0BACL,MAAM;AACJ,WAAO,IAAI,MAAM,OAAO;AAAA,MACtB,IAAI,GAAG,KAAa;AAClB,cAAM,OAAO,QAAQ;AACrB,YAAI,CAAC,MAAM;AACT,iBAAO,QAAQ,IAAI,GAAG;AAAA;AAExB,YAAI,cAAc,OAAO;AACzB,YAAI,CAAC,aAAa;AAChB,kBAAQ,MAAM,oBAAoB,MAAM,SAAS,QAAQ;AACzD,wBAAc;AAAA;AAEhB,cAAM,MAAM,YAAY;AACxB,YAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,cAAI,OAAO,QAAQ,aAAa;AAC9B,oBAAQ,KAAK,mBAAmB,OAAO,aAAa,OAAO,KAAK;AAChE,mBAAO;AAAA;AAAA;AAGX,YAAI,MAAM,QAAQ,aAAa;AAC7B,gBAAM,QAAQ,KAAK,IAAI;AAAA;AAIzB,eAAO,IAAI,+BAAS,EAAE,KAAK,IAAI,KAAK,MAAM;AAAA;AAAA;AAAA,KAIhD;AAAA,GA3DoB;",
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;A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KAAa;AAClB,cAAM,OAAO,QAAQ;AACrB,YAAI,CAAC,MAAM;AACT,iBAAO,QAAQ,IAAI,GAAG;AAAA;AAExB,YAAI,cAAc,OAAO;AACzB,YAAI,CAAC,aAAa;AAChB,kBAAQ,MAAM,oBAAoB,MAAM,SAAS,QAAQ;AACzD,wBAAc;AAAA;AAEhB,cAAM,MAAM,YAAY;AACxB,YAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,cAAI,OAAO,QAAQ,aAAa;AAC9B,oBAAQ,KAAK,mBAAmB,OAAO,aAAa,OAAO,KAAK;AAChE,mBAAO;AAAA;AAAA;AAGX,YAAI,MAAM,QAAQ,aAAa;AAC7B,gBAAM,QAAQ,KAAK,IAAI;AAAA;AAIzB,eAAO,IAAI,+BAAS,EAAE,KAAK,IAAI,KAAK,MAAM;AAAA;AAAA;AAAA,KAIhD;AAAA,GA3DoB;",
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;AACA;AAEA;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;A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AA;AAEhB,cAAM,MAAM,YAAY;AACxB,YAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,cAAI,OAAO,QAAQ,aAAa;AAC9B,oBAAQ,KAAK,mBAAmB,OAAO,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;",
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;AAC9B,WAAO,OAAO,cAAc,CAAC,MAAM,YAAY;AAC7C,cAAQ,MAAM,SAAS,QAAQ,aAAa;AAAA;AAAA,KAE7C,CAAC;AAEJ,SAAO,QAAQ;AAAA,GAVW;A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,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.23",
3
+ "version": "1.0.0-alpha.27",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist",
@@ -14,10 +14,10 @@
14
14
  "dist"
15
15
  ],
16
16
  "dependencies": {
17
- "@tamagui/helpers": "^1.0.0-alpha.23",
17
+ "@tamagui/helpers": "^1.0.0-alpha.26",
18
18
  "@tamagui/ow": "^0.28.1",
19
- "@tamagui/use-debounce": "^1.0.0-alpha.23",
20
- "@tamagui/use-force-update": "^1.0.0-alpha.23",
19
+ "@tamagui/use-debounce": "^1.0.0-alpha.26",
20
+ "@tamagui/use-force-update": "^1.0.0-alpha.26",
21
21
  "react": "*",
22
22
  "react-dom": "*"
23
23
  },
@@ -37,5 +37,5 @@
37
37
  "engines": {
38
38
  "node": ">=16"
39
39
  },
40
- "gitHead": "69fb1d82868a6525fee6b0750cb2113d88ffea79"
40
+ "gitHead": "cc26c6ae4216531cd878eaca33433256f7365c1e"
41
41
  }
@@ -1,8 +0,0 @@
1
- export declare const stackDefaultStyles: {
2
- display?: string | undefined;
3
- flexBasis?: string | undefined;
4
- boxSizing?: string | undefined;
5
- alignItems: string;
6
- flexShrink: number;
7
- };
8
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;;CAS9B,CAAA"}
@@ -1,9 +0,0 @@
1
- import { useEffect } from 'react';
2
- export declare const isWeb: boolean;
3
- export declare const isSSR: boolean;
4
- export declare const useIsomorphicLayoutEffect: typeof useEffect;
5
- export declare const isChrome: boolean;
6
- export declare const supportsTouchWeb: boolean;
7
- export declare const isTouchDevice: boolean;
8
- export declare const isWebIOS: boolean;
9
- //# sourceMappingURL=platform.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/constants/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAA;AAGlD,eAAO,MAAM,KAAK,SAAuE,CAAA;AACzF,eAAO,MAAM,KAAK,SAAyC,CAAA;AAC3D,eAAO,MAAM,yBAAyB,kBAAsC,CAAA;AAC5E,eAAO,MAAM,QAAQ,SAA+E,CAAA;AACpG,eAAO,MAAM,gBAAgB,SAA4D,CAAA;AACzF,eAAO,MAAM,aAAa,SAA6B,CAAA;AACvD,eAAO,MAAM,QAAQ,SAKA,CAAA"}
@@ -1,15 +0,0 @@
1
- export declare const pseudos: {
2
- focusStyle: {
3
- name: string;
4
- priority: number;
5
- };
6
- pressStyle: {
7
- name: string;
8
- priority: number;
9
- };
10
- hoverStyle: {
11
- name: string;
12
- priority: number;
13
- };
14
- };
15
- //# sourceMappingURL=pseudos.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pseudos.d.ts","sourceRoot":"","sources":["../../src/constants/pseudos.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAanB,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const rnw: Record<string, any>;
2
- //# sourceMappingURL=rnw.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rnw.d.ts","sourceRoot":"","sources":["../../src/constants/rnw.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,CAAA"}
@@ -1,17 +0,0 @@
1
- import { ViewStyle } from 'react-native';
2
- import { StaticComponent, StaticConfig, StaticConfigParsed } from './types';
3
- export declare const mouseUps: Set<Function>;
4
- declare type DefaultProps = {};
5
- export declare function createComponent<A extends Object = DefaultProps>(configIn: Partial<StaticConfig> | StaticConfigParsed): StaticComponent<A, void, StaticConfigParsed, any>;
6
- export declare const Spacer: StaticComponent<{
7
- size?: number | `$${string}` | `$${number}` | undefined;
8
- flex?: number | boolean | undefined;
9
- }, void, StaticConfigParsed, any>;
10
- export declare function spacedChildren({ isZStack, children, space, flexDirection, }: {
11
- isZStack?: boolean;
12
- children: any;
13
- space?: any;
14
- flexDirection?: ViewStyle['flexDirection'];
15
- }): any;
16
- export {};
17
- //# sourceMappingURL=createComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAaA,OAAO,EAA0B,SAAS,EAAE,MAAM,cAAc,CAAA;AAWhE,OAAO,EAEL,eAAe,EACf,YAAY,EACZ,kBAAkB,EAEnB,MAAM,SAAS,CAAA;AAIhB,eAAO,MAAM,QAAQ,eAAsB,CAAA;AAS3C,aAAK,YAAY,GAAG,EAAE,CAAA;AAEtB,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,EAC7D,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,kBAAkB,qDAudrD;AAOD,eAAO,MAAM,MAAM;;;iCAyBjB,CAAA;AAEF,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,aAAa,GACd,EAAE;IACD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,GAAG,CAAA;IACb,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,aAAa,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;CAC3C,OAwCA"}
@@ -1,3 +0,0 @@
1
- import { GenericFont } from './types';
2
- export declare const createFont: <A extends GenericFont>(font: A) => A;
3
- //# sourceMappingURL=createFont.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createFont.d.ts","sourceRoot":"","sources":["../src/createFont.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,eAAO,MAAM,UAAU,uCA2BtB,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare function createShorthands<A extends Record<string, string>>(shorthands: A): A;
2
- //# sourceMappingURL=createShorthands.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createShorthands.d.ts","sourceRoot":"","sources":["../src/createShorthands.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,CAEnF"}
@@ -1,54 +0,0 @@
1
- import { Variable } from './createVariable';
2
- import { CreateTamaguiConfig, GenericTamaguiConfig, MediaQueryKey, TamaguiInternalConfig, TamaguiProviderProps } from './types';
3
- export declare type CreateTamaguiProps = TamaguiProviderProps & Omit<GenericTamaguiConfig, 'themes'> & {
4
- themes: {
5
- [key: string]: {
6
- [key: string]: string | number | Variable;
7
- };
8
- };
9
- mediaQueryDefaultActive?: MediaQueryKey[];
10
- };
11
- export declare const getHasConfigured: () => boolean;
12
- export declare const getTamagui: () => TamaguiInternalConfig<import("./types").CreateTokens<string | number | Variable>, {
13
- [key: string]: {
14
- bg: string | Variable;
15
- bg2: string | Variable;
16
- bg3: string | Variable;
17
- bg4: string | Variable;
18
- color: string | Variable;
19
- color2: string | Variable;
20
- color3: string | Variable;
21
- color4: string | Variable;
22
- borderColor: string | Variable;
23
- borderColor2: string | Variable;
24
- shadowColor: string | Variable;
25
- shadowColor2: string | Variable;
26
- };
27
- }, {}, {
28
- [x: string]: {
29
- [key: string]: string | number;
30
- };
31
- }>;
32
- export declare const getTokens: () => import("./types").CreateTokens<Variable>;
33
- export declare const getThemes: () => {
34
- [key: string]: {
35
- bg: string | Variable;
36
- bg2: string | Variable;
37
- bg3: string | Variable;
38
- bg4: string | Variable;
39
- color: string | Variable;
40
- color2: string | Variable;
41
- color3: string | Variable;
42
- color4: string | Variable;
43
- borderColor: string | Variable;
44
- borderColor2: string | Variable;
45
- shadowColor: string | Variable;
46
- shadowColor2: string | Variable;
47
- };
48
- };
49
- declare type ConfigListener = (conf: TamaguiInternalConfig) => void;
50
- export declare const onConfiguredOnce: (cb: ConfigListener) => void;
51
- export declare function createTamagui<Conf extends CreateTamaguiProps>(config: Conf): Conf extends CreateTamaguiConfig<infer A, infer B, infer C, infer D> ? TamaguiInternalConfig<A, B, C, D> : unknown;
52
- export declare function getThemeParentClassName(themeName?: string | null): string;
53
- export {};
54
- //# sourceMappingURL=createTamagui.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createTamagui.d.ts","sourceRoot":"","sources":["../src/createTamagui.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAA8B,MAAM,kBAAkB,CAAA;AAIvE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAEhB,oBAAY,kBAAkB,GAAG,oBAAoB,GAGnD,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,GAAG;IACrC,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAA;SAC1C,CAAA;KACF,CAAA;IAED,uBAAuB,CAAC,EAAE,aAAa,EAAE,CAAA;CAC1C,CAAA;AAIH,eAAO,MAAM,gBAAgB,eAAe,CAAA;AAE5C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;EAAc,CAAA;AACrC,eAAO,MAAM,SAAS,gDAA2B,CAAA;AACjD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAAqB,CAAA;AAE3C,aAAK,cAAc,GAAG,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAA;AAE3D,eAAO,MAAM,gBAAgB,OAAQ,cAAc,SAMlD,CAAA;AAID,wBAAgB,aAAa,CAAC,IAAI,SAAS,kBAAkB,EAC3D,MAAM,EAAE,IAAI,GACX,IAAI,SAAS,mBAAmB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GACnE,qBAAqB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GACjC,OAAO,CAoIV;AAED,wBAAgB,uBAAuB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,UAEhE"}
@@ -1,5 +0,0 @@
1
- import { Variable } from './createVariable';
2
- export declare const createTheme: <Theme extends {
3
- [key: string]: string | Variable;
4
- }>(theme: Theme) => { [key in keyof Theme]: string | Variable; };
5
- //# sourceMappingURL=createTheme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createTheme.d.ts","sourceRoot":"","sources":["../src/createTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,kBAAkB,CAAA;AAE3D,eAAO,MAAM,WAAW;;gEAmBvB,CAAA"}
@@ -1,55 +0,0 @@
1
- import { Variable } from './createVariable';
2
- import { CreateTokens } from './types';
3
- export declare function createTokens<T extends CreateTokens>(tokens: T): MakeTokens<T>;
4
- export declare const mapTokensToVariables: (tokens: CreateTokens, parentPath?: string) => CreateTokens<Variable>;
5
- declare type MakeTokens<T> = T extends {
6
- font: {
7
- [key in infer A]: {
8
- size: infer B;
9
- lineHeight: infer C;
10
- letterSpacing: infer D;
11
- weight: infer Z;
12
- family: infer Y;
13
- };
14
- };
15
- color: infer E;
16
- space: infer F;
17
- size: infer G;
18
- radius: infer H;
19
- zIndex: infer J;
20
- } ? {
21
- font: {
22
- [key in A]: {
23
- size: {
24
- [key in keyof B]: Variable;
25
- };
26
- lineHeight: {
27
- [key in keyof C]: Variable;
28
- };
29
- letterSpacing: {
30
- [key in keyof D]: Variable;
31
- };
32
- weight: {
33
- [key in keyof Z]: Variable;
34
- };
35
- family: Y;
36
- };
37
- };
38
- color: {
39
- [key in keyof E]: Variable;
40
- };
41
- space: {
42
- [key in keyof F]: Variable;
43
- };
44
- size: {
45
- [key in keyof G]: Variable;
46
- };
47
- radius: {
48
- [key in keyof H]: Variable;
49
- };
50
- zIndex: {
51
- [key in keyof J]: Variable;
52
- };
53
- } : never;
54
- export {};
55
- //# sourceMappingURL=createTokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createTokens.d.ts","sourceRoot":"","sources":["../src/createTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,kBAAkB,CAAA;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAItC,wBAAgB,YAAY,CAAC,CAAC,SAAS,YAAY,EAAE,MAAM,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAM7E;AAMD,eAAO,MAAM,oBAAoB,WACvB,YAAY,0BAEnB,aAAa,QAAQ,CAavB,CAAA;AAGD,aAAK,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS;IAC7B,IAAI,EAAE;SACH,GAAG,IAAI,MAAM,CAAC,GAAG;YAChB,IAAI,EAAE,MAAM,CAAC,CAAA;YACb,UAAU,EAAE,MAAM,CAAC,CAAA;YACnB,aAAa,EAAE,MAAM,CAAC,CAAA;YACtB,MAAM,EAAE,MAAM,CAAC,CAAA;YACf,MAAM,EAAE,MAAM,CAAC,CAAA;SAChB;KACF,CAAA;IACD,KAAK,EAAE,MAAM,CAAC,CAAA;IACd,KAAK,EAAE,MAAM,CAAC,CAAA;IACd,IAAI,EAAE,MAAM,CAAC,CAAA;IACb,MAAM,EAAE,MAAM,CAAC,CAAA;IACf,MAAM,EAAE,MAAM,CAAC,CAAA;CAChB,GACG;IACE,IAAI,EAAE;SACH,GAAG,IAAI,CAAC,GAAG;YACV,IAAI,EAAE;iBACH,GAAG,IAAI,MAAM,CAAC,GAAG,QAAQ;aAC3B,CAAA;YACD,UAAU,EAAE;iBACT,GAAG,IAAI,MAAM,CAAC,GAAG,QAAQ;aAC3B,CAAA;YACD,aAAa,EAAE;iBACZ,GAAG,IAAI,MAAM,CAAC,GAAG,QAAQ;aAC3B,CAAA;YACD,MAAM,EAAE;iBACL,GAAG,IAAI,MAAM,CAAC,GAAG,QAAQ;aAC3B,CAAA;YACD,MAAM,EAAE,CAAC,CAAA;SACV;KACF,CAAA;IACD,KAAK,EAAE;SACJ,GAAG,IAAI,MAAM,CAAC,GAAG,QAAQ;KAC3B,CAAA;IACD,KAAK,EAAE;SACJ,GAAG,IAAI,MAAM,CAAC,GAAG,QAAQ;KAC3B,CAAA;IACD,IAAI,EAAE;SACH,GAAG,IAAI,MAAM,CAAC,GAAG,QAAQ;KAC3B,CAAA;IACD,MAAM,EAAE;SACL,GAAG,IAAI,MAAM,CAAC,GAAG,QAAQ;KAC3B,CAAA;IACD,MAAM,EAAE;SACL,GAAG,IAAI,MAAM,CAAC,GAAG,QAAQ;KAC3B,CAAA;CACF,GACD,KAAK,CAAA"}
@@ -1,15 +0,0 @@
1
- export declare class Variable {
2
- name: string;
3
- val: string | number;
4
- variable: string | number;
5
- constructor({ val, name }: VariableIn);
6
- toString(): string;
7
- }
8
- declare type VariableIn = {
9
- val: string | number;
10
- name: string;
11
- };
12
- export declare const createVariable: (props: VariableIn) => Variable;
13
- export declare function isVariable(v: Variable | any): v is Variable;
14
- export {};
15
- //# sourceMappingURL=createVariable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createVariable.d.ts","sourceRoot":"","sources":["../src/createVariable.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAQ;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;gBAEb,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,UAAU;IAOrC,QAAQ;CAGT;AAED,aAAK,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAExD,eAAO,MAAM,cAAc,UAAW,UAAU,aAAwB,CAAA;AAExE,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,GAAG,CAAC,IAAI,QAAQ,CAE3D"}
@@ -1,3 +0,0 @@
1
- export declare function useStylesAsClassname(styles: any[]): string;
2
- export declare function addStylesUsingClassname(styles: any[], onAdd?: (identifier: string, rules: string[]) => any): string;
3
- //# sourceMappingURL=addStylesUsingClassname.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addStylesUsingClassname.d.ts","sourceRoot":"","sources":["../../src/helpers/addStylesUsingClassname.tsx"],"names":[],"mappings":"AAWA,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,GAAG,EAAE,UAmBjD;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,GAAG,EAAE,EACb,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,UAyBrD"}
@@ -1,8 +0,0 @@
1
- import { StyleObject } from '@tamagui/helpers';
2
- import { MediaQueries } from '../types';
3
- export declare const MEDIA_SEP = "_";
4
- export declare const createMediaStyle: ({ identifier, rules }: StyleObject, mediaKey: string, mediaQueries: MediaQueries, negate?: boolean | undefined, importance?: number) => {
5
- styleRule: string;
6
- identifier: string;
7
- };
8
- //# sourceMappingURL=createMediaStyle.d.ts.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- import { StaticConfig } from '../types';
2
- export declare const createPropMapper: (c: StaticConfig) => (key: string, value: any, theme: any, props: any) => any;
3
- //# sourceMappingURL=createPropMapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createPropMapper.d.ts","sourceRoot":"","sources":["../../src/helpers/createPropMapper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAyB,MAAM,UAAU,CAAA;AAG9D,eAAO,MAAM,gBAAgB,MAAO,YAAY,WAKjC,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QA2DxD,CAAA"}
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { TamaguiProviderProps } from '../types';
3
- import { ThemeProviderProps } from '../views/ThemeProvider';
4
- export declare function createTamaguiProvider(themeProps: ThemeProviderProps): ({ initialWindowMetrics, fallback, children, ...themePropsProvider }: TamaguiProviderProps) => JSX.Element;
5
- //# sourceMappingURL=createTamaguiProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createTamaguiProvider.d.ts","sourceRoot":"","sources":["../../src/helpers/createTamaguiProvider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,OAAO,EAAiB,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE1E,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,kBAAkB,yEAM/D,oBAAoB,iBASxB"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { StaticComponent, StaticConfig, StaticConfigParsed } from '../types';
3
- export declare function extendStaticConfig(Component?: StaticComponent | React.Component<any>, config?: StaticConfig): StaticConfigParsed | null;
4
- export declare const parseStaticConfig: (config: StaticConfig) => StaticConfigParsed;
5
- //# sourceMappingURL=extendStaticConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extendStaticConfig.d.ts","sourceRoot":"","sources":["../../src/helpers/extendStaticConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAG5E,wBAAgB,kBAAkB,CAGhC,SAAS,CAAC,EAAE,eAAe,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,EAClD,MAAM,GAAE,YAAiB,GACxB,kBAAkB,GAAG,IAAI,CAiD3B;AAED,eAAO,MAAM,iBAAiB,WAAY,YAAY,KAAG,kBAMxD,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const fixNativeShadow: (a: any) => void;
2
- //# sourceMappingURL=fixNativeShadow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixNativeShadow.d.ts","sourceRoot":"","sources":["../../src/helpers/fixNativeShadow.tsx"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,MAAO,GAAG,SAAO,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare function fixNativeShadow(props: any): any;
2
- //# sourceMappingURL=fixNativeShadow.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixNativeShadow.native.d.ts","sourceRoot":"","sources":["../../src/helpers/fixNativeShadow.native.tsx"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,OAuBzC"}
@@ -1,15 +0,0 @@
1
- import { ViewStyle } from 'react-native';
2
- import { StaticConfigParsed, ThemeObject } from '../types';
3
- export declare type SplitStyles = ReturnType<typeof getSplitStyles>;
4
- export declare const getSplitStyles: (props: {
5
- [key: string]: any;
6
- }, staticConfig: StaticConfigParsed, theme: ThemeObject, isSplittingDefaultProps?: boolean | undefined) => {
7
- viewProps: Record<string, any>;
8
- style: any[];
9
- pseudos: {
10
- hoverStyle?: ViewStyle | undefined;
11
- pressStyle?: ViewStyle | undefined;
12
- } | null;
13
- classNames: string[] | null;
14
- };
15
- //# sourceMappingURL=getSplitStyles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAIxC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAM1D,oBAAY,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAI3D,eAAO,MAAM,cAAc;;iBAEX,kBAAkB,SACzB,WAAW;;;;;;;;CAuInB,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { StyleObject } from '@tamagui/helpers';
2
- export declare function getStylesAtomic(style: any, avoidCollection?: boolean): StyleObject[];
3
- //# sourceMappingURL=getStylesAtomic.d.ts.map
@@ -1 +0,0 @@
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,2 +0,0 @@
1
- export declare function getStylesAtomic(): void;
2
- //# sourceMappingURL=getStylesAtomic.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getStylesAtomic.native.d.ts","sourceRoot":"","sources":["../../src/helpers/getStylesAtomic.native.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,SAE9B"}
@@ -1,2 +0,0 @@
1
- export declare function insertStyleRule(rule: string): void;
2
- //# sourceMappingURL=insertStyleRule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"insertStyleRule.d.ts","sourceRoot":"","sources":["../../src/helpers/insertStyleRule.tsx"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,QAe3C"}
@@ -1,2 +0,0 @@
1
- export declare const isObj: (x: any) => any;
2
- //# sourceMappingURL=isObj.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isObj.d.ts","sourceRoot":"","sources":["../../src/helpers/isObj.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,MAAO,GAAG,QAAoD,CAAA"}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const isTamaguiElement: (child: any) => child is React.ReactElement<any, string | React.JSXElementConstructor<any>>;
3
- //# sourceMappingURL=isTamaguiElement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isTamaguiElement.d.ts","sourceRoot":"","sources":["../../src/helpers/isTamaguiElement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAA;AAE7C,eAAO,MAAM,gBAAgB,UAAW,GAAG,gFAE1C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const matchMedia: any;
2
- //# sourceMappingURL=matchMedia.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"matchMedia.d.ts","sourceRoot":"","sources":["../../src/helpers/matchMedia.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,KAgBZ,CAAA"}
@@ -1,3 +0,0 @@
1
- import MediaQueryList from '@expo/match-media/build/MediaQueryList.js';
2
- export declare const matchMedia: (media: string) => MediaQueryList;
3
- //# sourceMappingURL=matchMedia.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"matchMedia.native.d.ts","sourceRoot":"","sources":["../../src/helpers/matchMedia.native.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,2CAA2C,CAAA;AAEtE,eAAO,MAAM,UAAU,UAAW,MAAM,mBAA8B,CAAA"}
@@ -1,10 +0,0 @@
1
- import { ReactElement } from 'react';
2
- export declare type ThemeableProps = {
3
- theme?: string | null;
4
- themeInverse?: boolean;
5
- };
6
- export declare const themeable: ThemeableHOC;
7
- export interface ThemeableHOC {
8
- <R extends ReactElement<any, any> | null, P extends ThemeableProps = {}>(component: (props: P) => R): (props: P) => R;
9
- }
10
- //# sourceMappingURL=themeable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"themeable.d.ts","sourceRoot":"","sources":["../../src/helpers/themeable.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAc,MAAM,OAAO,CAAA;AAKvD,oBAAY,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,YAyBvB,CAAA;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,CAAC,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,SAAS,cAAc,GAAG,EAAE,EACrE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GACzB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAA;CACnB"}
@@ -1,4 +0,0 @@
1
- export declare const validateConfig: (conf: any) => void;
2
- export declare const validateTokens: (tokens: any) => void;
3
- export declare const validateFont: (font: any) => void;
4
- //# sourceMappingURL=validate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/helpers/validate.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,SAAU,GAAG,SAWvC,CAAA;AA4BD,eAAO,MAAM,cAAc,WAAY,GAAG,SAOzC,CAAA;AAED,eAAO,MAAM,YAAY,SAAU,GAAG,SAOrC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare function useConstant<T>(fn: () => T): T;
2
- //# sourceMappingURL=useConstant.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useConstant.d.ts","sourceRoot":"","sources":["../../src/hooks/useConstant.tsx"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAM7C"}
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const useFeatures: (props: any, utils?: {
3
- forceUpdate?: Function | undefined;
4
- } | undefined) => JSX.Element[];
5
- //# sourceMappingURL=useFeatures.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":";AAuBA,eAAO,MAAM,WAAW,UAAW,GAAG;;+BAYrC,CAAA"}
@@ -1,16 +0,0 @@
1
- import { ConfigureMediaQueryOptions, MediaQueries, MediaQueryObject, MediaQueryState } from '../types';
2
- export declare const mediaState: {
3
- [key in keyof MediaQueryState]: boolean;
4
- };
5
- export declare const addMediaQueryListener: (key: string, cb: any) => void;
6
- export declare const removeMediaQueryListener: (key: string, cb: any) => void;
7
- export declare const mediaQueryConfig: MediaQueries;
8
- export declare const getMedia: () => {
9
- [x: string]: boolean;
10
- };
11
- export declare const configureMedia: ({ queries, defaultActive, }?: ConfigureMediaQueryOptions) => void;
12
- export declare const useMedia: () => {
13
- [x: string]: boolean;
14
- };
15
- export declare function mediaObjectToString(query: string | MediaQueryObject): string;
16
- //# sourceMappingURL=useMedia.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../src/hooks/useMedia.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,UAAU,CAAA;AAGjB,eAAO,MAAM,UAAU,EAAE;KAAG,GAAG,IAAI,MAAM,eAAe,GAAG,OAAO;CAAc,CAAA;AAGhF,eAAO,MAAM,qBAAqB,QAAS,MAAM,MAAM,GAAG,SAGzD,CAAA;AAED,eAAO,MAAM,wBAAwB,QAAS,MAAM,MAAM,GAAG,SAE5D,CAAA;AAID,eAAO,MAAM,gBAAgB,cAqB3B,CAAA;AAEF,eAAO,MAAM,QAAQ;;CAKpB,CAAA;AAED,eAAO,MAAM,cAAc,iCAGxB,0BAA0B,SAuC5B,CAAA;AASD,eAAO,MAAM,QAAQ;;CAiEpB,CAAA;AAMD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,UAgBnE"}
@@ -1,3 +0,0 @@
1
- import { PressableProps } from 'react-native';
2
- export declare const usePressable: (props: PressableProps) => readonly [any, any];
3
- //# sourceMappingURL=usePressable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePressable.d.ts","sourceRoot":"","sources":["../../src/hooks/usePressable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAA;AAIxD,eAAO,MAAM,YAAY,UAAW,cAAc,wBAIjD,CAAA"}
@@ -1,20 +0,0 @@
1
- import { Variable } from '../createVariable';
2
- export declare const useThemeName: (opts?: {
3
- parent?: true | undefined;
4
- } | undefined) => string;
5
- 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
- };
20
- //# sourceMappingURL=useTheme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAsB5C,eAAO,MAAM,YAAY;;wBAWxB,CAAA;AAED,eAAO,MAAM,mBAAmB,uBAE/B,CAAA;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;CA+DpB,CAAA"}