@tamagui/core 1.0.1-beta.44 → 1.0.1-beta.47

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 (68) hide show
  1. package/dist/cjs/Tamagui.js.map +1 -1
  2. package/dist/cjs/ThemeManager.js.map +1 -1
  3. package/dist/cjs/createComponent.js +23 -8
  4. package/dist/cjs/createComponent.js.map +2 -2
  5. package/dist/cjs/createVariable.js.map +1 -1
  6. package/dist/cjs/helpers/createPropMapper.js +5 -0
  7. package/dist/cjs/helpers/createPropMapper.js.map +2 -2
  8. package/dist/cjs/helpers/generateAtomicStyles.js.map +1 -1
  9. package/dist/cjs/helpers/getSplitStyles.js +23 -10
  10. package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
  11. package/dist/cjs/helpers/mergeTransform.js.map +1 -1
  12. package/dist/cjs/hooks/useFeatures.js +12 -7
  13. package/dist/cjs/hooks/useFeatures.js.map +2 -2
  14. package/dist/cjs/types.js.map +1 -1
  15. package/dist/cjs/views/Slot.js +5 -8
  16. package/dist/cjs/views/Slot.js.map +2 -2
  17. package/dist/esm/Tamagui.js.map +1 -1
  18. package/dist/esm/ThemeManager.js.map +1 -1
  19. package/dist/esm/constants/constants.js.map +1 -1
  20. package/dist/esm/createComponent.js +24 -8
  21. package/dist/esm/createComponent.js.map +2 -2
  22. package/dist/esm/createTamagui.js.map +1 -1
  23. package/dist/esm/createVariable.js.map +1 -1
  24. package/dist/esm/helpers/createPropMapper.js +5 -0
  25. package/dist/esm/helpers/createPropMapper.js.map +2 -2
  26. package/dist/esm/helpers/createShallowUpdate.js.map +1 -1
  27. package/dist/esm/helpers/createTamaguiProvider.js.map +1 -1
  28. package/dist/esm/helpers/extendStaticConfig.js.map +1 -1
  29. package/dist/esm/helpers/generateAtomicStyles.js.map +1 -1
  30. package/dist/esm/helpers/getSplitStyles.js +23 -10
  31. package/dist/esm/helpers/getSplitStyles.js.map +2 -2
  32. package/dist/esm/helpers/getStylesAtomic.js.map +1 -1
  33. package/dist/esm/helpers/mergeTransform.js.map +1 -1
  34. package/dist/esm/helpers/themeable.js.map +1 -1
  35. package/dist/esm/helpers/validate.js.map +1 -1
  36. package/dist/esm/hooks/useFeatures.js +12 -7
  37. package/dist/esm/hooks/useFeatures.js.map +2 -2
  38. package/dist/esm/hooks/useMedia.js.map +1 -1
  39. package/dist/esm/hooks/useTheme.js.map +1 -1
  40. package/dist/esm/styled.js.map +1 -1
  41. package/dist/esm/views/Slot.js +5 -8
  42. package/dist/esm/views/Slot.js.map +2 -2
  43. package/dist/esm/views/Stack.js.map +1 -1
  44. package/dist/esm/views/Text.js.map +1 -1
  45. package/dist/jsx/createComponent.js +24 -8
  46. package/dist/jsx/helpers/createPropMapper.js +5 -0
  47. package/dist/jsx/helpers/getSplitStyles.js +23 -10
  48. package/dist/jsx/hooks/useFeatures.js +12 -7
  49. package/dist/jsx/views/Slot.js +5 -8
  50. package/package.json +5 -5
  51. package/reset.css +1 -1
  52. package/types/createComponent.d.ts.map +1 -1
  53. package/types/helpers/createMediaStyle.d.ts +1 -1
  54. package/types/helpers/createMediaStyle.d.ts.map +1 -1
  55. package/types/helpers/createPropMapper.d.ts.map +1 -1
  56. package/types/helpers/getSplitStyles.d.ts +1 -1
  57. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  58. package/types/helpers/getStackSize.d.ts +3 -3
  59. package/types/helpers/getStackSize.d.ts.map +1 -1
  60. package/types/helpers/isTamaguiElement.d.ts +1 -1
  61. package/types/helpers/isTamaguiElement.d.ts.map +1 -1
  62. package/types/hooks/useFeatures.d.ts +8 -3
  63. package/types/hooks/useFeatures.d.ts.map +1 -1
  64. package/types/hooks/useTheme.d.ts +4 -4
  65. package/types/hooks/useTheme.d.ts.map +1 -1
  66. package/types/types.d.ts +1 -0
  67. package/types/types.d.ts.map +1 -1
  68. package/types/views/Slot.d.ts.map +1 -1
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useTheme.tsx"],
4
4
  "sourcesContent": ["import { useForceUpdate } from '@tamagui/use-force-update'\nimport React, { useContext, useLayoutEffect, useMemo, useRef, useState } from 'react'\n\nimport { getConfig } from '../conf'\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { areEqualSets } from '../helpers/areEqualSets'\nimport { ThemeContext } from '../ThemeContext'\nimport { GetNextThemeProps, ThemeManager, ThemeManagerContext, emptyManager } from '../ThemeManager'\nimport { ThemeName, ThemeObject } from '../types'\nimport { useConstant } from './useConstant'\n\nexport type ThemeProps = {\n className?: string\n disableThemeClass?: boolean\n name: Exclude<ThemeName, number> | null\n componentName?: string\n children?: any\n reset?: boolean\n debug?: boolean | 'verbose'\n}\n\ntype UseThemeState = {\n uuid: Object\n keys: Set<string>\n isRendering: boolean\n}\n\nexport const useTheme = (\n themeName?: string | null,\n componentName?: string,\n props?: ThemeProps,\n forceUpdate?: any\n): ThemeObject => {\n const { name, theme, themes, themeManager, className, didChangeTheme } = useChangeThemeEffect(\n themeName,\n componentName,\n props,\n forceUpdate\n )\n\n if (process.env.NODE_ENV === 'development') {\n if (props?.debug === 'verbose') {\n console.log(' \u00BB useTheme', { themeName, componentName, name, className })\n }\n }\n\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 = themeManager?.keys.get(st.uuid)\n if (!cur || !areEqualSets(st.keys, cur)) {\n themeManager?.track(st.uuid, st.keys)\n }\n })\n\n return useMemo(() => {\n if (!theme) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('No theme', { themeName, theme, componentName, className })\n }\n return themes[getConfig().defaultTheme || 'light' || Object.keys(themes)[0]]\n }\n return new Proxy(theme, {\n has(_, key) {\n if (typeof key === 'string') {\n if (key[0] === '$') {\n key = key.slice(1)\n }\n }\n return Reflect.has(theme, key)\n },\n get(_, key) {\n if (!name || key === '__proto__' || typeof key === 'symbol') {\n // TODO make this pattern better\n if (key === GetThemeManager) {\n if (process.env.NODE_ENV === 'development') {\n if (props?.debug) {\n // prettier-ignore\n console.log('did change', { themeName, didChangeTheme, name, componentName }, themeManager?.parentName)\n }\n }\n if (!didChangeTheme) {\n return null\n }\n return themeManager\n }\n return Reflect.get(_, key)\n }\n if (typeof key !== 'string' || key === '$typeof') {\n return Reflect.get(_, key)\n }\n if (process.env.NODE_ENV === 'development') {\n if (key === '__state') {\n return state.current\n }\n }\n if (key === 'name') {\n return name\n }\n if (key === 'className') {\n return className\n }\n if (!themeManager) {\n console.error('No themeManager')\n return\n }\n // auto convert variables to plain\n if (key[0] === '$') {\n key = key.slice(1)\n }\n const val = themeManager.getValue(key)\n if (val) {\n if (state.current.isRendering) {\n state.current.keys.add(key)\n if (process.env.NODE_ENV === 'development') {\n if (props?.['debug'] === 'verbose') {\n console.log(' \u00BB tracking theme key', key)\n }\n }\n }\n return val\n }\n // react native debuger uses toJSON\n if (process.env.NODE_ENV === 'development') {\n console.log(`No theme value \"${String(key)}\" in ${name}`)\n }\n return Reflect.get(_, key)\n },\n })\n }, [name, theme, className, didChangeTheme])\n}\n\nconst GetThemeManager = Symbol('GetThemeManager')\n\nexport const getThemeManagerIfChanged = (theme: any) => {\n return theme?.[GetThemeManager]\n}\n\nexport const useThemeName = (opts?: { parent?: true }) => {\n const parent = useContext(ThemeManagerContext)\n const [name, setName] = useState(parent?.name || '')\n\n useIsomorphicLayoutEffect(() => {\n if (!parent) return\n return parent.onChangeTheme((next, manager) => {\n const name = opts?.parent ? manager.parentName || next : next\n if (!name) return\n setName(name)\n })\n }, [parent])\n\n return name\n}\n\nexport const useDefaultThemeName = () => {\n return useContext(ThemeContext)?.defaultTheme\n}\n\nexport const useChangeThemeEffect = (\n name?: string | null,\n componentName?: string,\n props?: ThemeProps,\n forceUpdateProp?: any\n) => {\n const debug = props && props['debug']\n const parentManager = useContext(ThemeManagerContext) || emptyManager\n const { themes } = useContext(ThemeContext)!\n const reset = props?.reset || false\n const getThemeProps: GetNextThemeProps = { name, componentName, themes, reset }\n const next = parentManager.getNextTheme(getThemeProps, debug)\n const forceUpdate = forceUpdateProp || useForceUpdate()\n const themeManager = useConstant<ThemeManager | null>(() => {\n if (!next) return null\n return new ThemeManager(next.name, next.theme, parentManager, reset)\n })\n\n if (typeof document !== 'undefined') {\n useLayoutEffect(() => {\n if (!themeManager) return\n if (next?.name) {\n themeManager.update(next)\n }\n return parentManager.onChangeTheme(() => {\n const next = parentManager.getNextTheme(getThemeProps, debug)\n if (!next) return\n if (themeManager.update(next)) {\n forceUpdate()\n }\n })\n }, [themes, name, componentName, debug, next?.name])\n }\n\n const didChangeTheme = next && parentManager && next.name !== parentManager.fullName\n\n return {\n ...(parentManager && {\n name: parentManager.name,\n theme: parentManager.theme,\n }),\n ...next,\n didChangeTheme,\n themes,\n themeManager,\n }\n}\n"],
5
- "mappings": ";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAkBO,MAAM,WAAW,wBACtB,WACA,eACA,OACA,gBACgB;AAChB,QAAM,EAAE,MAAM,OAAO,QAAQ,cAAc,WAAW,mBAAmB,qBACvE,WACA,eACA,OACA,WACF;AAEA,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,gCAAO,WAAU,WAAW;AAC9B,cAAQ,IAAI,mBAAgB,EAAE,WAAW,eAAe,MAAM,UAAU,CAAC;AAAA,IAC3E;AAAA,EACF;AAEA,QAAM,QAAQ,OAAO;AACrB,MAAI,CAAC,MAAM,SAAS;AAClB,UAAM,UAAU;AAAA,MACd,MAAM,CAAC;AAAA,MACP,MAAM,oBAAI,IAAI;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AACA,QAAM,QAAQ,cAAc;AAG5B,4BAA0B,MAAM;AAC9B,UAAM,KAAK,MAAM;AACjB,OAAG,cAAc;AACjB,UAAM,MAAM,6CAAc,KAAK,IAAI,GAAG;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AO,cAAc,aAAa,eAAe,KAAK;AAC5D,YAAI,CAAC;AAAM;AACX,YAAI,aAAa,OAAO,KAAI,GAAG;AAC7B,sBAAY;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH,GAAG,CAAC,QAAQ,MAAM,eAAe,OAAO,6BAAM,IAAI,CAAC;AAAA,EACrD;AAEA,QAAM,iBAAiB,QAAQ,iBAAiB,KAAK,SAAS,cAAc;AAE5E,SAAO;AAAA,IACL,GAAI,iBAAiB;AAAA,MACnB,MAAM,cAAc;AAAA,MACpB,OAAO,cAAc;AAAA,IACvB;AAAA,IACA,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF,GA9CoC;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/styled.tsx"],
4
4
  "sourcesContent": ["import { Image, Text, TextInput } from 'react-native'\n\nimport { createComponent } from './createComponent'\nimport { RNComponents } from './helpers/RNComponents'\nimport {\n GetProps,\n GetVariantValues,\n MediaProps,\n PseudoProps,\n StaticConfig,\n StylableComponent,\n TamaguiComponent,\n VariantDefinitions,\n VariantSpreadFunction,\n} from './types'\nimport { Stack } from './views/Stack'\n\n// TODO may be able to use this in the options?: arg below directly\nexport type StyledOptions<ParentComponent extends StylableComponent> = GetProps<ParentComponent> & {\n name?: string\n variants?: VariantDefinitions<ParentComponent> | undefined\n defaultVariants?: { [key: string]: any }\n}\n\nexport function styled<\n ParentComponent extends StylableComponent,\n Variants extends VariantDefinitions<ParentComponent> | void = VariantDefinitions<ParentComponent> | void\n>(\n Component: ParentComponent,\n // this should be Partial<GetProps<ParentComponent>> but causes excessively deep type issues\n options?: GetProps<ParentComponent> & {\n name?: string\n variants?: Variants | undefined\n // thought i had this typed, but can't get it linked\n defaultVariants?: { [key: string]: any }\n },\n staticExtractionOptions?: Partial<StaticConfig>\n) {\n const staticConfigProps = (() => {\n if (options) {\n const { variants, name, defaultVariants, ...defaultProps } = options\n if (defaultVariants) {\n Object.assign(defaultProps, defaultVariants)\n }\n const isReactNativeWeb =\n 'staticConfig' in Component\n ? Component.staticConfig.isReactNativeWeb\n : RNComponents.has(Component)\n const reactNativeWebComponent = isReactNativeWeb\n ? Component['staticConfig']?.reactNativeWebComponent || Component\n : null\n const isTamagui = !isReactNativeWeb && 'staticConfig' in Component\n const Comp = reactNativeWebComponent || (Component as any)\n const isImage = !!(defaultProps.isImage || (!isTamagui ? Comp === Image : false))\n const isInput = !!(defaultProps.isInput || (!isTamagui ? Comp === TextInput : false))\n const isText = !!(defaultProps.isText || (!isTamagui ? isInput || Comp === Text : false))\n\n const conf: Partial<StaticConfig> = {\n ...staticExtractionOptions,\n ...(!isTamagui && {\n Component: Comp,\n }),\n isTamagui,\n // this type gets messed up by options?: Partial<GetProps<ParentComponent>> above\n // take away the Partial<> and it's fine\n variants,\n defaultProps,\n defaultVariants,\n componentName: name,\n isReactNativeWeb,\n // for nesting multiple levels of rnw styled() need keep use the OG component\n reactNativeWebComponent,\n isInput,\n isText,\n isImage,\n }\n\n return conf\n }\n return {}\n })()\n\n const component = createComponent(staticConfigProps, Component)\n\n // get parent props without pseudos and medias so we can rebuild both with new variants\n type ParentPropsBase = ParentComponent extends TamaguiComponent<any, any, infer P>\n ? P\n : GetProps<ParentComponent>\n type ParentVariants = ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : {}\n\n type OurVariants = Variants extends void\n ? {}\n : {\n [Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val>\n ? Val\n : GetVariantValues<keyof Variants[Key]>\n }\n\n type VariantProps = Omit<ParentVariants, keyof OurVariants> & OurVariants\n type OurPropsBase = ParentPropsBase & VariantProps\n\n type Props = Variants extends void\n ? GetProps<ParentComponent>\n : // start with base props\n OurPropsBase &\n // add in media (+ pseudos nested)\n MediaProps<Partial<OurPropsBase>> &\n // add in pseudos\n PseudoProps<Partial<OurPropsBase>>\n\n return component as TamaguiComponent<\n Props,\n // TODO infer ref\n any,\n ParentPropsBase,\n ParentVariants & OurVariants\n >\n}\n\n// breaking...\n// TODO see core/types.ts bug\n\n// export const XStack = styled(Stack, {\n// variants: {\n// horizontal: {\n// true: {\n// // flexDirection: 'row',\n// width: 0,\n// },\n// },\n// },\n// })\n\n// const Separator = styled(Stack, {\n// variants: {\n// vertical: {\n// true: {\n// flexDirection: 'row',\n// },\n// },\n// },\n// <--- have to add as const to get working???\n// })\n\n// type props = GetProps<typeof XStack>\n// type variants = typeof XStack extends TamaguiComponent<any, infer Variants> ? Variants : never\n// type variants2 = typeof Separator extends TamaguiComponent<any, infer Variants> ? Variants : never\n\n// const x = <XStack horizontal />\n// const x2 = <Separator vertical />\n"],
5
- "mappings": ";;AAAA;AAEA;AACA;AAqBO,gBAIL,WAEA,SAMA,yBACA;AACA,QAAM,oBAAqB,OAAM;AAtCnC;AAuCI,QAAI,SAAS;AACX,YAAM,EAAE,UAAU,MAAM,oBAAoB,iBAAiB;AAC7D,UAAI,iBAAiB;AACnB,eAAO,OAAO,cAAc,eAAe;AAAA,MAC7C;AACA,YAAM,mBACJ,kBAAkB,YACd,UAAU,aAAa,mBACvB,aAAa,IAAI,SAAS;AAChC,YAAM,0BAA0B,mBAC5B,iBAAU,oBAAV,mBAA2B,4BAA2B,YACtD;AACJ,YAAM,YAAY,CAAC,oBAAoB,kBAAkB;AACzD,YAAM,OAAO,2BAA4B;AACzC,YAAM,UAAU,CAAC,CAAE,cAAa,WAAY,EAAC,YAAY,SAAS,QAAQ;AAC1E,YAAM,UAAU,CAAC,CAAE,cAAa,WAAY,EAAC,YAAY,SAAS,YAAY;AAC9E,YAAM,SAAS,CAAC,CAAE,cAAa,UAAW,EAAC,YAAY,WAAW,SAAS,OAAO;AAElF,YAAM,OAA8B;AAAA,WAC/B;AAAA,WACC,CAAC,aAAa;AAAA,UAChB,WAAW;AAAA,QACb;AAAA,QACA;AAAA,QAGA;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QA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name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
  import { composeRefs } from "@tamagui/compose-refs";
4
4
  import * as React from "react";
5
+ import { isWeb } from "../constants/platform";
5
6
  const Slot = React.forwardRef((props, forwardedRef) => {
6
7
  const { children, ...slotProps } = props;
7
8
  return /* @__PURE__ */ React.createElement(SlotClone, {
@@ -25,15 +26,11 @@ SlotClone.displayName = "SlotClone";
25
26
  const Slottable = /* @__PURE__ */ __name(({ children }) => {
26
27
  return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
27
28
  }, "Slottable");
28
- function isSlottable(child) {
29
- return React.isValidElement(child);
30
- }
31
- __name(isSlottable, "isSlottable");
32
- const pressMap = {
29
+ const pressMap = isWeb ? {
33
30
  onPress: "onClick",
34
- onPressOut: "onMouseOut",
35
- onPressIn: "onMouseIn"
36
- };
31
+ onPressOut: "onMouseUp",
32
+ onPressIn: "onMouseDown"
33
+ } : {};
37
34
  function mergeProps(child, slotProps) {
38
35
  const childProps = child.props;
39
36
  const overrideProps = { ...childProps };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Slot.tsx"],
4
- "sourcesContent": ["// via radix\n\nimport { composeRefs } from '@tamagui/compose-refs'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\nexport type SlotProps = {\n children?: React.ReactNode\n}\n\nexport const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n )\n})\n\nSlot.displayName = 'Slot'\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode\n}\n\nconst SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n\n if (React.isValidElement(children)) {\n const childProps = {\n ...mergeProps(children, slotProps),\n ref: composeRefs(forwardedRef, (children as any).ref),\n }\n return React.cloneElement(children, childProps)\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null\n})\n\nSlotClone.displayName = 'SlotClone'\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nexport const Slottable = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>\n\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n return React.isValidElement(child)\n}\n\nconst pressMap = {\n onPress: 'onClick',\n onPressOut: 'onMouseOut',\n onPressIn: 'onMouseIn',\n}\n\nfunction mergeProps(child: any, slotProps: AnyProps) {\n const childProps = child.props\n\n // all child props should override\n const overrideProps = { ...childProps }\n\n const isHTMLChild = typeof child.type === 'string'\n\n if (isHTMLChild) {\n for (const key in pressMap) {\n if (key in slotProps) {\n slotProps[pressMap[key]] = slotProps[key]\n delete slotProps[key]\n }\n }\n }\n\n for (let propName in childProps) {\n const slotPropValue = slotProps[propName]\n const childPropValue = childProps[propName]\n\n if (isHTMLChild && pressMap[propName]) {\n propName = pressMap[propName]\n delete overrideProps[propName]\n }\n\n const isHandler = /^on[A-Z]/.test(propName)\n // if it's a handler, modify the override by composing the base handler\n if (isHandler) {\n overrideProps[propName] = (...args: unknown[]) => {\n childPropValue?.(...args)\n slotPropValue?.(...args)\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue }\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ')\n }\n }\n\n return { ...slotProps, ...overrideProps }\n}\n"],
5
- "mappings": ";;AAEA;AACA;AAUO,MAAM,OAAO,MAAM,WAAmC,CAAC,OAAO,iBAAiB;AACpF,QAAM,EAAE,aAAa,cAAc;AACnC,SACE,oCAAC;AAAA,OAAc;AAAA,I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AAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,YAAY,KAAK,kBAAkB,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,YAAY,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,KAAK,cAAc,cAAc;AAC1C;AA3CS;",
4
+ "sourcesContent": ["// via radix\n\nimport { composeRefs } from '@tamagui/compose-refs'\nimport * as React from 'react'\n\nimport { isWeb } from '../constants/platform'\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\nexport type SlotProps = {\n children?: React.ReactNode\n}\n\nexport const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n )\n})\n\nSlot.displayName = 'Slot'\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode\n}\n\nconst SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n\n if (React.isValidElement(children)) {\n const childProps = {\n ...mergeProps(children, slotProps),\n ref: composeRefs(forwardedRef, (children as any).ref),\n }\n return React.cloneElement(children, childProps)\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null\n})\n\nSlotClone.displayName = 'SlotClone'\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nexport const Slottable = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>\n\n// function isSlottable(child: React.ReactNode): child is React.ReactElement {\n// return React.isValidElement(child)\n// }\n\nconst pressMap = isWeb\n ? {\n onPress: 'onClick',\n onPressOut: 'onMouseUp',\n onPressIn: 'onMouseDown',\n }\n : {}\n\nfunction mergeProps(child: any, slotProps: AnyProps) {\n const childProps = child.props\n\n // all child props should override\n const overrideProps = { ...childProps }\n\n const isHTMLChild = typeof child.type === 'string'\n\n if (isHTMLChild) {\n for (const key in pressMap) {\n if (key in slotProps) {\n slotProps[pressMap[key]] = slotProps[key]\n delete slotProps[key]\n }\n }\n }\n\n for (let propName in childProps) {\n const slotPropValue = slotProps[propName]\n const childPropValue = childProps[propName]\n\n if (isHTMLChild && pressMap[propName]) {\n propName = pressMap[propName]\n delete overrideProps[propName]\n }\n\n const isHandler = /^on[A-Z]/.test(propName)\n // if it's a handler, modify the override by composing the base handler\n if (isHandler) {\n overrideProps[propName] = (...args: unknown[]) => {\n childPropValue?.(...args)\n slotPropValue?.(...args)\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue }\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ')\n }\n }\n\n return { ...slotProps, ...overrideProps }\n}\n"],
5
+ "mappings": ";;AAEA;AACA;AAEA;AAUO,MAAM,OAAO,MAAM,WAAmC,CAAC,OAAO,iBAAiB;AACpF,QAAM,EAAE,aAAa,cAAc;AACnC,SACE,oCAAC;AAAA,IAAW,GAAG;AAAA,IAAW,KAAK;AAAA,KAC5B,QACH;AAEJ,CAAC;AAED,KAAK,cAAc;AAUnB,MAAM,YAAY,MAAM,WAAgC,CAAC,OAAO,iBAAiB;AAC/E,QAAM,EAAE,aAAa,cAAc;AAEnC,MAAI,MAAM,eAAe,QAAQ,GAAG;AAClC,UAAM,aAAa;AAAA,MACjB,GAAG,WAAW,UAAU,SAAS;AAAA,MACjC,KAAK,YAAY,cAAe,SAAiB,GAAG;AAAA,IACtD;AACA,WAAO,MAAM,aAAa,UAAU,UAAU;AAAA,EAChD;AAEA,SAAO,MAAM,SAAS,MAAM,QAAQ,IAAI,IAAI,MAAM,SAAS,KAAK,IAAI,IAAI;AAC1E,CAAC;AAED,UAAU,cAAc;AAMjB,MAAM,YAAY,wBAAC,EAAE,eAA8C;AACxE,SAAO,0DAAG,QAAS;AACrB,GAFyB;AAYzB,MAAM,WAAW,QACb;AAAA,EACE,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AACb,IACA,CAAC;AAEL,oBAAoB,OAAY,WAAqB;AACnD,QAAM,aAAa,MAAM;AAGzB,QAAM,gBAAgB,EAAE,GAAG,WAAW;AAEtC,QAAM,cAAc,OAAO,MAAM,SAAS;AAE1C,MAAI,aAAa;AACf,eAAW,OAAO,UAAU;AAC1B,UAAI,OAAO,WAAW;AACpB,kBAAU,SAAS,QAAQ,UAAU;AACrC,eAAO,UAAU;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAEA,WAAS,YAAY,YAAY;AAC/B,UAAM,gBAAgB,UAAU;AAChC,UAAM,iBAAiB,WAAW;AAElC,QAAI,eAAe,SAAS,WAAW;AACrC,iBAAW,SAAS;AACpB,aAAO,cAAc;AAAA,IACvB;AAEA,UAAM,YAAY,WAAW,KAAK,QAAQ;AAE1C,QAAI,WAAW;AACb,oBAAc,YAAY,IAAI,SAAoB;AAChD,yDAAiB,GAAG;AACpB,uDAAgB,GAAG;AAAA,MACrB;AAAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,YAAY,EAAE,GAAG,eAAe,GAAG,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,YAAY,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AA3CS;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Stack.tsx"],
4
4
  "sourcesContent": ["import { View } from 'react-native'\n\nimport { stackDefaultStyles } from '../constants/constants'\nimport { createComponent } from '../createComponent'\nimport { StackProps, StackPropsBase } from '../types'\n\nexport const Stack = createComponent<StackProps, View, StackPropsBase>({\n componentName: 'Stack',\n defaultProps: {\n ...stackDefaultStyles,\n flexDirection: 'column',\n },\n})\n\n// test types\n// export const YStack = styled(Stack, {\n// flexDirection: 'column',\n// })\n// // test types\n// const x00 = <Stack missing={0} /> // should err\n// const x0 = <YStack missing={0} /> // should err\n// const x1 = (props: StackProps) => <YStack {...props} />\n// type ys = typeof YStack\n// type ysv = ys extends StaticComponent<any, infer V> ? V : unknown\n"],
5
- "mappings": "AAEA;AACA;AAGO,MAAM,QAAQ,gBAAkD;AAAA,EACrE,eAAe;AAAA,EACf,cAAc;AAAA,OACT;AAAA,IACH,eAAe;AAAA,EACjB;AACF,CAAC;",
5
+ "mappings": "AAEA;AACA;AAGO,MAAM,QAAQ,gBAAkD;AAAA,EACrE,eAAe;AAAA,EACf,cAAc;AAAA,IACZ,GAAG;AAAA,IACH,eAAe;AAAA,EACjB;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Text.tsx"],
4
4
  "sourcesContent": ["import { stylePropsTextOnly, validStyles } from '@tamagui/helpers'\nimport { Text as TextView } from 'react-native'\n\nimport { isWeb } from '../constants/platform'\nimport { createComponent } from '../createComponent'\nimport { TextProps, TextPropsBase } from '../types'\n\nconst ellipseStyle = {\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n}\n\nexport const Text = createComponent<TextProps, TextView, TextPropsBase>({\n componentName: 'Text',\n isText: true,\n\n defaultProps: {\n display: 'flex',\n fontFamily: 'System',\n ...(isWeb && {\n display: 'inline',\n boxSizing: 'border-box',\n wordWrap: 'break-word',\n }),\n },\n\n variants: {\n numberOfLines: {\n 1: isWeb ? ellipseStyle : { numberOfLines: 1 },\n\n ':number': (numberOfLines) =>\n isWeb\n ? numberOfLines >= 1\n ? { WebkitLineClamp: numberOfLines }\n : null\n : { numberOfLines },\n },\n\n selectable: {\n true: {\n userSelect: 'text',\n cursor: 'text',\n },\n false: {\n userSelect: 'none',\n },\n },\n\n pressable: {\n true: {\n cursor: 'pointer',\n },\n },\n\n ellipse: {\n true: isWeb\n ? ellipseStyle\n : {\n numberOfLines: 1,\n lineBreakMode: 'clip',\n },\n },\n },\n\n deoptProps: new Set(isWeb ? [] : ['ellipse']),\n\n validStyles: {\n ...validStyles,\n ...stylePropsTextOnly,\n },\n})\n"],
5
- "mappings": "AAAA;AAGA;AACA;AAGA,MAAM,eAAe;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AACd;AAEO,MAAM,OAAO,gBAAoD;AAAA,EACtE,eAAe;AAAA,EACf,QAAQ;AAAA,EAER,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,OACR,SAAS;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EAEA,UAAU;AAAA,IACR,eAAe;AAAA,MACb,GAAG,QAAQ,eAAe,EAAE,eAAe,EAAE;AAAA,MAE7C,WAAW,CAAC,kBACV,QACI,iBAAiB,IACf,EAAE,iBAAiB,cAAc,IACjC,OACF,EAAE,cAAc;AAAA,IACxB;AAAA,IAEA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,QAAQ;AAAA,MACV;AAAA,MACA,OAAO;AAAA,QACL,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,WAAW;AAAA,MACT,MAAM;AAAA,QACJ,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IAEA,SAAS;AAAA,MACP,MAAM,QACF,eACA;AAAA,QACE,eAAe;AAAA,QACf,eAAe;AAAA,MACjB;AAAA,IACN;AAAA,EACF;AAAA,EAEA,YAAY,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;AAAA,EAE5C,aAAa;AAAA,OACR;AAAA,OACA;AAAA,EACL;AACF,CAAC;",
5
+ "mappings": "AAAA;AAGA;AACA;AAGA,MAAM,eAAe;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AACd;AAEO,MAAM,OAAO,gBAAoD;AAAA,EACtE,eAAe;AAAA,EACf,QAAQ;AAAA,EAER,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,GAAI,SAAS;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EAEA,UAAU;AAAA,IACR,eAAe;AAAA,MACb,GAAG,QAAQ,eAAe,EAAE,eAAe,EAAE;AAAA,MAE7C,WAAW,CAAC,kBACV,QACI,iBAAiB,IACf,EAAE,iBAAiB,cAAc,IACjC,OACF,EAAE,cAAc;AAAA,IACxB;AAAA,IAEA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,QAAQ;AAAA,MACV;AAAA,MACA,OAAO;AAAA,QACL,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,WAAW;AAAA,MACT,MAAM;AAAA,QACJ,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IAEA,SAAS;AAAA,MACP,MAAM,QACF,eACA;AAAA,QACE,eAAe;AAAA,QACf,eAAe;AAAA,MACjB;AAAA,IACN;AAAA,EACF;AAAA,EAEA,YAAY,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;AAAA,EAE5C,aAAa;AAAA,IACX,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -27,6 +27,7 @@ import { proxyThemeVariables } from "./helpers/proxyThemeVariables";
27
27
  import { wrapThemeManagerContext } from "./helpers/wrapThemeManagerContext";
28
28
  import { useFeatures } from "./hooks/useFeatures";
29
29
  import { useIsTouchDevice } from "./hooks/useIsTouchDevice";
30
+ import { mediaState } from "./hooks/useMedia";
30
31
  import { usePressable } from "./hooks/usePressable";
31
32
  import { getThemeManagerIfChanged, useTheme } from "./hooks/useTheme";
32
33
  import { Slot } from "./views/Slot";
@@ -92,16 +93,16 @@ function createComponent(configIn, ParentComponent) {
92
93
  }
93
94
  }
94
95
  __name(addPseudoToStyles, "addPseudoToStyles");
95
- const component = forwardRef((props, forwardedRef) => {
96
+ const component = forwardRef((propsIn, forwardedRef) => {
96
97
  var _a, _b, _c;
97
- props = tamaguiDefaultProps && !props.asChild ? { ...tamaguiDefaultProps, ...props } : props;
98
+ const props = tamaguiDefaultProps && !propsIn.asChild ? { ...tamaguiDefaultProps, ...propsIn } : propsIn;
98
99
  const { Component, isText, isZStack } = staticConfig;
99
100
  const componentName = props.componentName || staticConfig.componentName;
100
101
  const componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName;
101
102
  if (process.env.NODE_ENV === "development") {
102
103
  if (props["debug"]) {
103
104
  console.log("\u26A0\uFE0F", componentName || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]", "debug on");
104
- console.log("props in:", props, Object.keys(props));
105
+ console.log("props in:", { propsIn, props, ordered: Object.keys(props) });
105
106
  if (props["debug"] === "break")
106
107
  debugger;
107
108
  }
@@ -111,9 +112,13 @@ function createComponent(configIn, ParentComponent) {
111
112
  const [state, set_] = useState(defaultComponentState);
112
113
  const setStateShallow = createShallowUpdate(set_);
113
114
  const shouldAvoidClasses = !!(props.animation && avoidClasses);
114
- const splitStyles = useSplitStyles(props, staticConfig, theme, !shouldAvoidClasses ? state : {
115
+ const splitStyles = useSplitStyles(props, staticConfig, theme, !shouldAvoidClasses ? {
116
+ ...state,
117
+ dynamicStylesInline: true
118
+ } : {
115
119
  ...state,
116
120
  noClassNames: true,
121
+ dynamicStylesInline: true,
117
122
  resolveVariablesAs: "value"
118
123
  }, shouldAvoidClasses || props.asChild ? null : initialSplitStyles.classNames);
119
124
  const { viewProps: viewPropsIn, pseudos, medias, style, classNames } = splitStyles;
@@ -143,7 +148,7 @@ function createComponent(configIn, ParentComponent) {
143
148
  onPressOut,
144
149
  onHoverIn,
145
150
  onHoverOut,
146
- space,
151
+ space: spaceProp,
147
152
  disabled: disabledProp,
148
153
  onMouseDown,
149
154
  onMouseEnter,
@@ -611,6 +616,16 @@ function createComponent(configIn, ParentComponent) {
611
616
  onPress == null ? void 0 : onPress(e);
612
617
  } : null
613
618
  } : null;
619
+ let space = spaceProp;
620
+ if (features.enabled.mediaQuery) {
621
+ for (const key in mediaState) {
622
+ if (!mediaState[key])
623
+ continue;
624
+ if (props[key] && props[key].space !== void 0) {
625
+ space = props[key].space;
626
+ }
627
+ }
628
+ }
614
629
  let childEls = !children || asChild ? children : wrapThemeManagerContext(spacedChildren({
615
630
  separator,
616
631
  children,
@@ -668,9 +683,9 @@ function createComponent(configIn, ParentComponent) {
668
683
  console.log(" \xBB ", { propsIn: { ...props }, propsOut: { ...viewProps }, state, splitStyles, animationStyles, isStringElement, classNamesIn: (_b = props.className) == null ? void 0 : _b.split(" "), classNamesOut: (_c = viewProps.className) == null ? void 0 : _c.split(" "), events, shouldAttach, ViewComponent: elementType, viewProps, styles, pseudos, content, childEls, shouldAvoidClasses, avoidClasses, animation: props.animation, style, defaultNativeStyle, initialSplitStyles, ...typeof window !== "undefined" ? { theme, themeState: theme.__state, themeClassName: theme.className, staticConfig, tamaguiConfig } : null });
669
684
  }
670
685
  }
671
- if (features.length) {
686
+ if (features.elements.length) {
672
687
  return <>
673
- {features}
688
+ {features.elements}
674
689
  {content}
675
690
  </>;
676
691
  }
@@ -783,7 +798,8 @@ const Spacer = createComponent({
783
798
  flex: {
784
799
  true: {
785
800
  flex: 1
786
- }
801
+ },
802
+ ":number": (flex) => ({ flex })
787
803
  },
788
804
  direction: {
789
805
  horizontal: {
@@ -54,6 +54,11 @@ const createPropMapper = /* @__PURE__ */ __name((staticConfig) => {
54
54
  variantValue = resolveTokens(variantValue, conf, theme, fontFamily, returnVariablesAs);
55
55
  }
56
56
  return Object.entries(expandStyles(variantValue));
57
+ } else {
58
+ if (process.env.NODE_ENV === "development") {
59
+ console.warn(`No variant found: ${staticConfig.componentName || "[UnnamedComponent]"} has variant "${key}", but no matching value "${value}"`);
60
+ }
61
+ return null;
57
62
  }
58
63
  }
59
64
  let shouldReturn = value !== void 0 && value !== null;
@@ -73,7 +73,9 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
73
73
  if (isWeb && val[0] !== "_") {
74
74
  transform = val;
75
75
  } else {
76
- console.trace("?", key, val, cur, props, state);
76
+ if (process.env.NODE_ENV === "development") {
77
+ console.trace("?", key, val, cur, props, state);
78
+ }
77
79
  }
78
80
  }
79
81
  if (process.env.NODE_ENV === "development" && props["debug"] === "verbose") {
@@ -168,8 +170,12 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
168
170
  if (isWeb && !state.noClassNames) {
169
171
  const pseudoStyles = getStylesAtomic({ [key]: pseudos[key] });
170
172
  for (const style2 of pseudoStyles) {
171
- addStyle(style2.identifier, style2.rules[0]);
172
- mergeClassName(`${style2.property}-${key}`, style2.identifier);
173
+ const fullKey = `${style2.property}-${key}`;
174
+ if (!usedKeys.has(fullKey)) {
175
+ usedKeys.add(fullKey);
176
+ addStyle(style2.identifier, style2.rules[0]);
177
+ mergeClassName(fullKey, style2.identifier);
178
+ }
173
179
  }
174
180
  }
175
181
  continue;
@@ -182,16 +188,20 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
182
188
  continue;
183
189
  }
184
190
  const mediaStyle = getSubStyle(val, staticConfig, theme, props, state);
191
+ const shouldDoClasses = isWeb && !state.noClassNames;
185
192
  if (process.env.NODE_ENV === "development" && props["debug"] === "verbose") {
186
- console.log(" \xBB getSplitStyles mediaStyle", mediaKey, mediaStyle, props);
193
+ console.log(" \xBB getSplitStyles mediaStyle", { mediaKey, mediaStyle, props, shouldDoClasses });
187
194
  }
188
- const shouldDoClasses = isWeb && !state.noClassNames;
189
195
  if (shouldDoClasses) {
190
196
  const mediaStyles = getStylesAtomic(mediaStyle);
191
197
  for (const style2 of mediaStyles) {
192
198
  const out = createMediaStyle(style2, mediaKeyShort, mediaQueryConfig);
193
- addStyle(out.identifier, out.styleRule);
194
- mergeClassName(`${out.identifier}-${mediaKey}`, out.identifier);
199
+ const fullKey = `${out.identifier}-${mediaKey}`;
200
+ if (!usedKeys.has(fullKey)) {
201
+ usedKeys.add(fullKey);
202
+ addStyle(out.identifier, out.styleRule);
203
+ mergeClassName(fullKey, out.identifier);
204
+ }
195
205
  }
196
206
  } else {
197
207
  if (mediaState[mediaKey]) {
@@ -239,10 +249,13 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
239
249
  const atomic = getStylesAtomic(style);
240
250
  for (const atomicStyle of atomic) {
241
251
  const key = atomicStyle.property;
242
- addStyle(atomicStyle.identifier, atomicStyle.rules[0]);
243
- mergeClassName(key, atomicStyle.identifier);
252
+ if (!state.dynamicStylesInline) {
253
+ addStyle(atomicStyle.identifier, atomicStyle.rules[0]);
254
+ mergeClassName(key, atomicStyle.identifier);
255
+ } else {
256
+ style[key] = atomicStyle.value;
257
+ }
244
258
  }
245
- style = {};
246
259
  }
247
260
  if (transforms) {
248
261
  for (const namespace in transforms) {
@@ -15,14 +15,19 @@ const useFeatures = /* @__PURE__ */ __name((props, utils) => {
15
15
  if (!featureDefinitions) {
16
16
  featureDefinitions = loadFeatures();
17
17
  }
18
- const features = [];
18
+ const elements = [];
19
+ const enabled = {};
19
20
  for (const name in featureDefinitions) {
20
21
  const { isEnabled, Component } = featureDefinitions[name];
21
22
  if (isEnabled(props) && Component) {
22
- features.push(<Component key={name} {...props} _utils={utils} />);
23
+ enabled[name] = true;
24
+ elements.push(<Component key={name} {...props} _utils={utils} />);
23
25
  }
24
26
  }
25
- return features;
27
+ return {
28
+ elements,
29
+ enabled
30
+ };
26
31
  }, "useFeatures");
27
32
  function loadFeatures() {
28
33
  return {
@@ -145,17 +150,17 @@ function loadMediaQueryFeature() {
145
150
  const mediaPropNames = Object.keys(mediaState);
146
151
  return createDefinition({
147
152
  Component: (props) => {
148
- const keys = mediaPropNames.filter((x) => x in props);
153
+ const mediaKeys = mediaPropNames.filter((x) => x in props);
149
154
  useIsomorphicLayoutEffect(() => {
150
- for (const key of keys) {
155
+ for (const key of mediaKeys) {
151
156
  addMediaQueryListener(key, props._utils.forceUpdate);
152
157
  }
153
158
  return () => {
154
- for (const key of keys) {
159
+ for (const key of mediaKeys) {
155
160
  removeMediaQueryListener(key, props._utils.forceUpdate);
156
161
  }
157
162
  };
158
- }, [keys.join(",")]);
163
+ }, [mediaKeys.join(",")]);
159
164
  return null;
160
165
  },
161
166
  propNames: mediaPropNames
@@ -2,6 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
  import { composeRefs } from "@tamagui/compose-refs";
4
4
  import * as React from "react";
5
+ import { isWeb } from "../constants/platform";
5
6
  const Slot = React.forwardRef((props, forwardedRef) => {
6
7
  const { children, ...slotProps } = props;
7
8
  return <SlotClone {...slotProps} ref={forwardedRef}>{children}</SlotClone>;
@@ -22,15 +23,11 @@ SlotClone.displayName = "SlotClone";
22
23
  const Slottable = /* @__PURE__ */ __name(({ children }) => {
23
24
  return <>{children}</>;
24
25
  }, "Slottable");
25
- function isSlottable(child) {
26
- return React.isValidElement(child);
27
- }
28
- __name(isSlottable, "isSlottable");
29
- const pressMap = {
26
+ const pressMap = isWeb ? {
30
27
  onPress: "onClick",
31
- onPressOut: "onMouseOut",
32
- onPressIn: "onMouseIn"
33
- };
28
+ onPressOut: "onMouseUp",
29
+ onPressIn: "onMouseDown"
30
+ } : {};
34
31
  function mergeProps(child, slotProps) {
35
32
  const childProps = child.props;
36
33
  const overrideProps = { ...childProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "1.0.1-beta.44",
3
+ "version": "1.0.1-beta.47",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -21,10 +21,10 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "@expo/match-media": "^0.3.0",
24
- "@tamagui/helpers": "^1.0.1-beta.44",
24
+ "@tamagui/helpers": "^1.0.1-beta.47",
25
25
  "@tamagui/ow": "^0.28.1",
26
- "@tamagui/use-debounce": "^1.0.1-beta.44",
27
- "@tamagui/use-force-update": "^1.0.1-beta.44",
26
+ "@tamagui/use-debounce": "^1.0.1-beta.47",
27
+ "@tamagui/use-force-update": "^1.0.1-beta.47",
28
28
  "expo-screen-orientation": "^4.2.0",
29
29
  "hyphenate-style-name": "^1.0.4",
30
30
  "inline-style-prefixer": "^6.0.0",
@@ -36,7 +36,7 @@
36
36
  "react-native-web": "*"
37
37
  },
38
38
  "devDependencies": {
39
- "@tamagui/build": "^1.0.1-beta.44",
39
+ "@tamagui/build": "^1.0.1-beta.47",
40
40
  "@types/react": "^17.0.35",
41
41
  "csstype": "^3.0.10",
42
42
  "esbuild": "^0.14.36",
package/reset.css CHANGED
@@ -20,6 +20,6 @@ h1, h2, h3, h4, h5, h6 {
20
20
  padding: 0;
21
21
  }
22
22
 
23
- input, button, [role="slider"] {
23
+ li, select, input, button, [role="slider"] {
24
24
  outline: none;
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAUN,MAAM,OAAO,CAAA;AAkBd,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAGhB,cAAc,EAGf,MAAM,SAAS,CAAA;AAgBhB,eAAO,MAAM,QAAQ,eAAsB,CAAA;AA0B3C,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,GAAG,EAAE,EACtC,GAAG,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IA_SEP = "_";
4
- export declare const createMediaStyle: ({ identifier, rules }: StyleObject, mediaKey: string, mediaQueries: MediaQueries, negate?: boolean | undefined, importance?: number | undefined) => {
4
+ export declare const createMediaStyle: ({ identifier, rules }: StyleObject, mediaKey: string, mediaQueries: MediaQueries, negate?: boolean, importance?: number) => {
5
5
  styleRule: string;
6
6
  identifier: string;
7
7
  };
@@ -1 +1 @@
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;AAIvC,eAAO,MAAM,SAAS,MAAM,CAAA;AAE5B,eAAO,MAAM,gBAAgB,0BACJ,WAAW,YACxB,MAAM,gBACF,YAAY;;;CAiC3B,CAAA"}
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;AAIvC,eAAO,MAAM,SAAS,MAAM,CAAA;AAE5B,eAAO,MAAM,gBAAgB,0BACJ,WAAW,YACxB,MAAM,gBACF,YAAY,WACjB,OAAO,eACH,MAAM;;;CA+BpB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"createPropMapper.d.ts","sourceRoot":"","sources":["../../src/helpers/createPropMapper.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EAEV,YAAY,EAIb,MAAM,UAAU,CAAA;AAKjB,oBAAY,oBAAoB,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAA;AA4BzE,eAAO,MAAM,gBAAgB,iBAAkB,QAAQ,YAAY,CAAC,eAyDnE,CAAA"}
1
+ {"version":3,"file":"createPropMapper.d.ts","sourceRoot":"","sources":["../../src/helpers/createPropMapper.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EAEV,YAAY,EAIb,MAAM,UAAU,CAAA;AAKjB,oBAAY,oBAAoB,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAA;AA4BzE,eAAO,MAAM,gBAAgB,iBAAkB,QAAQ,YAAY,CAAC,eAmEnE,CAAA"}
@@ -18,7 +18,7 @@ declare type StyleSplitter = (props: {
18
18
  export declare const getSplitStyles: StyleSplitter;
19
19
  export declare const insertSplitStyles: StyleSplitter;
20
20
  export declare const useSplitStyles: StyleSplitter;
21
- export declare const getSubStyle: (styleIn: Object, staticConfig: StaticConfigParsed, theme: ThemeObject, props: any, state: SplitStyleState, avoidDefaultProps?: boolean | undefined) => ViewStyle;
21
+ export declare const getSubStyle: (styleIn: Object, staticConfig: StaticConfigParsed, theme: ThemeObject, props: any, state: SplitStyleState, avoidDefaultProps?: boolean) => ViewStyle;
22
22
  export declare function normalizeStyleObject(style: any): void;
23
23
  export {};
24
24
  //# sourceMappingURL=getSplitStyles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,OAAO,EACL,SAAS,EAET,YAAY,EAEZ,eAAe,EACf,UAAU,EACV,kBAAkB,EAElB,WAAW,EACZ,MAAM,UAAU,CAAA;AAYjB,oBAAY,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAC3D,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACrD,oBAAY,gBAAgB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AA4BhE,aAAK,aAAa,GAAG,CACnB,KAAK,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EA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CAAA;CAAE,EAC7B,YAAY,EAAE,kBAAkB,EAChC,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,eAAe,GAAG;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,EACD,iBAAiB,CAAC,EAAE,GAAG,KACpB;IACH,OAAO,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IACpC,KAAK,EAAE,SAAS,CAAA;IAChB,UAAU,EAAE,gBAAgB,CAAA;IAC5B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;IACjC,SAAS,EAAE,UAAU,CAAA;CACtB,CAAA;AASD,eAAO,MAAM,cAAc,EAAE,aA0U5B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,aAM/B,CAAA;AAID,eAAO,MAAM,cAAc,EAAE,aAQ5B,CAAA;AAED,eAAO,MAAM,WAAW,YACb,MAAM,gBACD,kBAAkB,SACzB,WAAW,SACX,GAAG,SACH,eAAe,sBACF,OAAO,KAC1B,SAeF,CAAA;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,QAI9C"}
@@ -8,9 +8,9 @@ export declare type ScaleVariantExtras = Pick<VariantSpreadExtras<any>, 'tokens'
8
8
  export declare const getSizeScaledToFont: (val: string | number, { sizeX, sizeY }: ScaleProps, { tokens, props, fonts }: ScaleVariantExtras) => {
9
9
  px: number;
10
10
  py: number;
11
- radius: any;
12
- size: any;
13
- lineHeight: any;
11
+ radius: import("@tamagui/core").VariableVal;
12
+ size: import("@tamagui/core").VariableVal;
13
+ lineHeight: number | import("@tamagui/core").Variable | undefined;
14
14
  minHeight: number;
15
15
  };
16
16
  export declare const createGetStackSize: (scale: ScaleProps) => (val: SizeTokens | number, extras: VariantSpreadExtras<any>) => {
@@ -1 +1 @@
1
- {"version":3,"file":"getStackSize.d.ts","sourceRoot":"","sources":["../../src/helpers/getStackSize.ts"],"names":[],"mappings":"AA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CAAA;AAC1D,eAAO,MAAM,aAAa,QAZK,UAAU,GAAG,MAAM,UAAU,oBAAoB,GAAG,CAAC;;;;;CAYtB,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export declare const isTamaguiElement: (child: any, name?: string | undefined) => child is React.ReactElement<any, string | React.JSXElementConstructor<any>>;
2
+ export declare const isTamaguiElement: (child: any, name?: string) => child is React.ReactElement<any, string | React.JSXElementConstructor<any>>;
3
3
  //# sourceMappingURL=isTamaguiElement.d.ts.map
@@ -1 +1 @@
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,2GAO1C,CAAA"}
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,SAAS,MAAM,gFAOzD,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { RefObject } from 'react';
2
2
  import { View, ViewStyle } from 'react-native';
3
- import { PseudoStyles, SplitStyleState } from '../types';
4
- import { StaticConfigParsed, TamaguiComponentState, UseAnimationHook } from '../types';
3
+ import { PseudoStyles, SplitStyleState, StaticConfigParsed, TamaguiComponentState, UseAnimationHook } from '../types';
5
4
  declare type FeatureUtils = {
6
5
  forceUpdate: Function;
7
6
  state: SplitStyleState;
@@ -14,6 +13,12 @@ declare type FeatureUtils = {
14
13
  onDidAnimate?: () => void;
15
14
  hostRef: RefObject<HTMLElement | View>;
16
15
  };
17
- export declare const useFeatures: (props: any, utils?: FeatureUtils | undefined) => JSX.Element[];
16
+ export declare const useFeatures: (props: any, utils?: FeatureUtils) => {
17
+ elements: JSX.Element[];
18
+ enabled: {
19
+ animation?: boolean | undefined;
20
+ mediaQuery?: boolean | undefined;
21
+ };
22
+ };
18
23
  export {};
19
24
  //# sourceMappingURL=useFeatures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAK9C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,EAEL,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAEjB,MAAM,UAAU,CAAA;AAQjB,aAAK,YAAY,GAAG;IAClB,WAAW,EAAE,QAAQ,CAAA;IACrB,KAAK,EAAE,eAAe,CAAA;IACtB,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAA;IAC/D,aAAa,CAAC,EAAE,gBAAgB,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;IACnC,YAAY,EAAE,kBAAkB,CAAA;IAChC,KAAK,EAAE,GAAG,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CACvC,CAAA;AAeD,eAAO,MAAM,WAAW,UAAW,GAAG,oDAYrC,CAAA"}
1
+ {"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI9C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAEjB,MAAM,UAAU,CAAA;AAQjB,aAAK,YAAY,GAAG;IAClB,WAAW,EAAE,QAAQ,CAAA;IACrB,KAAK,EAAE,eAAe,CAAA;IACtB,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAA;IAC/D,aAAa,CAAC,EAAE,gBAAgB,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;IACnC,YAAY,EAAE,kBAAkB,CAAA;IAChC,KAAK,EAAE,GAAG,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CACvC,CAAA;AAiBD,eAAO,MAAM,WAAW,UAAW,GAAG,UAAU,YAAY;;;;;;CAiB3D,CAAA"}
@@ -9,13 +9,13 @@ export declare type ThemeProps = {
9
9
  reset?: boolean;
10
10
  debug?: boolean | 'verbose';
11
11
  };
12
- export declare const useTheme: (themeName?: string | null | undefined, componentName?: string | undefined, props?: ThemeProps | undefined, forceUpdate?: any) => ThemeObject;
12
+ export declare const useTheme: (themeName?: string | null, componentName?: string, props?: ThemeProps, forceUpdate?: any) => ThemeObject;
13
13
  export declare const getThemeManagerIfChanged: (theme: any) => any;
14
14
  export declare const useThemeName: (opts?: {
15
- parent?: true | undefined;
16
- } | undefined) => string;
15
+ parent?: true;
16
+ }) => string;
17
17
  export declare const useDefaultThemeName: () => ThemeName | undefined;
18
- export declare const useChangeThemeEffect: (name?: string | null | undefined, componentName?: string | undefined, props?: ThemeProps | undefined, forceUpdateProp?: any) => {
18
+ export declare const useChangeThemeEffect: (name?: string | null, componentName?: string, props?: ThemeProps, forceUpdateProp?: any) => {
19
19
  didChangeTheme: boolean;
20
20
  themes: {
21
21
  [key: string]: Partial<import("../types").TamaguiBaseTheme> & {
@@ -1 +1 @@
1
- {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAqB,YAAY,EAAqC,MAAM,iBAAiB,CAAA;AACpG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAGjD,oBAAY,UAAU,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,IAAI,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,CAAA;AAQD,eAAO,MAAM,QAAQ,4HAIL,GAAG,KAChB,WA6GF,CAAA;AAID,eAAO,MAAM,wBAAwB,UAAW,GAAG,QAElD,CAAA;AAED,eAAO,MAAM,YAAY;;wBAcxB,CAAA;AAED,eAAO,MAAM,mBAAmB,6BAE/B,CAAA;AAED,eAAO,MAAM,oBAAoB,2HAIb,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CtB,CAAA"}
1
+ {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAqB,YAAY,EAAqC,MAAM,iBAAiB,CAAA;AACpG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAGjD,oBAAY,UAAU,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,IAAI,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,CAAA;AAQD,eAAO,MAAM,QAAQ,eACP,MAAM,GAAG,IAAI,kBACT,MAAM,UACd,UAAU,gBACJ,GAAG,KAChB,WA6GF,CAAA;AAID,eAAO,MAAM,wBAAwB,UAAW,GAAG,QAElD,CAAA;AAED,eAAO,MAAM,YAAY,UAAW;IAAE,MAAM,CAAC,EAAE,IAAI,CAAA;CAAE,WAcpD,CAAA;AAED,eAAO,MAAM,mBAAmB,6BAE/B,CAAA;AAED,eAAO,MAAM,oBAAoB,UACxB,MAAM,GAAG,IAAI,kBACJ,MAAM,UACd,UAAU,oBACA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CtB,CAAA"}
package/types/types.d.ts CHANGED
@@ -394,6 +394,7 @@ export declare type TamaguiComponentState = {
394
394
  };
395
395
  export declare type SplitStyleState = TamaguiComponentState & {
396
396
  noClassNames?: boolean;
397
+ dynamicStylesInline?: boolean;
397
398
  resolveVariablesAs?: ResolveVariableTypes;
398
399
  fallbackProps?: Record<string, any>;
399
400
  };