@tamagui/web 2.0.0-1768636514428 → 2.0.0-1768696252732
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/animationDriverTypes.test-d.cjs +49 -0
- package/dist/cjs/animationDriverTypes.test-d.js +51 -0
- package/dist/cjs/animationDriverTypes.test-d.js.map +6 -0
- package/dist/cjs/animationDriverTypes.test-d.native.js +52 -0
- package/dist/cjs/animationDriverTypes.test-d.native.js.map +1 -0
- package/dist/cjs/config.cjs +14 -0
- package/dist/cjs/config.js +14 -0
- package/dist/cjs/config.js.map +1 -1
- package/dist/cjs/config.native.js +14 -0
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/createComponent.cjs +25 -7
- package/dist/cjs/createComponent.js +23 -7
- package/dist/cjs/createComponent.js.map +1 -1
- package/dist/cjs/createComponent.native.js +34 -8
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +3 -2
- package/dist/cjs/createTamagui.js +3 -2
- package/dist/cjs/createTamagui.js.map +1 -1
- package/dist/cjs/createTamagui.native.js +1 -1
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +2 -1
- package/dist/cjs/helpers/getSplitStyles.js +1 -1
- package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.native.js +1 -0
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.cjs +23 -26
- package/dist/cjs/helpers/getThemeCSSRules.js +2 -4
- package/dist/cjs/helpers/getThemeCSSRules.js.map +1 -1
- package/dist/cjs/helpers/mergeRenderElementProps.cjs +32 -0
- package/dist/cjs/helpers/mergeRenderElementProps.js +25 -0
- package/dist/cjs/helpers/mergeRenderElementProps.js.map +6 -0
- package/dist/cjs/helpers/mergeRenderElementProps.native.js +35 -0
- package/dist/cjs/helpers/mergeRenderElementProps.native.js.map +1 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.cjs +39 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.js +29 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.js.map +6 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js +42 -0
- package/dist/cjs/helpers/mergeSlotStyleProps.native.js.map +1 -0
- package/dist/cjs/helpers/skipProps.cjs +1 -1
- package/dist/cjs/helpers/skipProps.js +1 -1
- package/dist/cjs/helpers/skipProps.js.map +1 -1
- package/dist/cjs/helpers/skipProps.native.js +1 -1
- package/dist/cjs/helpers/skipProps.native.js.map +1 -1
- package/dist/cjs/helpers/useRenderElement.cjs +48 -0
- package/dist/cjs/helpers/useRenderElement.js +42 -0
- package/dist/cjs/helpers/useRenderElement.js.map +6 -0
- package/dist/cjs/helpers/useRenderElement.native.js +52 -0
- package/dist/cjs/helpers/useRenderElement.native.js.map +1 -0
- package/dist/cjs/hooks/getThemeProxied.js.map +1 -1
- package/dist/cjs/hooks/getThemeProxied.native.js +1 -1
- package/dist/cjs/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +1 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/styled.native.js.map +1 -1
- package/dist/cjs/views/Configuration.js.map +1 -1
- package/dist/cjs/views/Configuration.native.js.map +1 -1
- package/dist/cjs/views/Slot.cjs +7 -21
- package/dist/cjs/views/Slot.js +9 -13
- package/dist/cjs/views/Slot.js.map +1 -1
- package/dist/cjs/views/Slot.native.js +5 -21
- package/dist/cjs/views/Slot.native.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.cjs +6 -2
- package/dist/cjs/views/TamaguiProvider.js +5 -2
- package/dist/cjs/views/TamaguiProvider.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.native.js +5 -1
- package/dist/cjs/views/TamaguiProvider.native.js.map +1 -1
- package/dist/cjs/views/Theme.js.map +1 -1
- package/dist/cjs/views/Theme.native.js.map +1 -1
- package/dist/esm/animationDriverTypes.test-d.js +51 -0
- package/dist/esm/animationDriverTypes.test-d.js.map +6 -0
- package/dist/esm/animationDriverTypes.test-d.mjs +50 -0
- package/dist/esm/animationDriverTypes.test-d.mjs.map +1 -0
- package/dist/esm/animationDriverTypes.test-d.native.js +50 -0
- package/dist/esm/animationDriverTypes.test-d.native.js.map +1 -0
- package/dist/esm/config.js +14 -0
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/config.mjs +14 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +14 -1
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/createComponent.js +23 -6
- package/dist/esm/createComponent.js.map +1 -1
- package/dist/esm/createComponent.mjs +25 -7
- package/dist/esm/createComponent.mjs.map +1 -1
- package/dist/esm/createComponent.native.js +34 -8
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.js +3 -2
- package/dist/esm/createTamagui.js.map +1 -1
- package/dist/esm/createTamagui.mjs +3 -2
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +1 -1
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.js +1 -1
- package/dist/esm/helpers/getSplitStyles.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +2 -1
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +1 -0
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.js +2 -4
- package/dist/esm/helpers/getThemeCSSRules.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.mjs +23 -26
- package/dist/esm/helpers/getThemeCSSRules.mjs.map +1 -1
- package/dist/esm/helpers/mergeRenderElementProps.js +9 -0
- package/dist/esm/helpers/mergeRenderElementProps.js.map +6 -0
- package/dist/esm/helpers/mergeRenderElementProps.mjs +9 -0
- package/dist/esm/helpers/mergeRenderElementProps.mjs.map +1 -0
- package/dist/esm/helpers/mergeRenderElementProps.native.js +9 -0
- package/dist/esm/helpers/mergeRenderElementProps.native.js.map +1 -0
- package/dist/esm/helpers/mergeSlotStyleProps.js +14 -0
- package/dist/esm/helpers/mergeSlotStyleProps.js.map +6 -0
- package/dist/esm/helpers/mergeSlotStyleProps.mjs +16 -0
- package/dist/esm/helpers/mergeSlotStyleProps.mjs.map +1 -0
- package/dist/esm/helpers/mergeSlotStyleProps.native.js +16 -0
- package/dist/esm/helpers/mergeSlotStyleProps.native.js.map +1 -0
- package/dist/esm/helpers/skipProps.js +1 -1
- package/dist/esm/helpers/skipProps.js.map +1 -1
- package/dist/esm/helpers/skipProps.mjs +1 -1
- package/dist/esm/helpers/skipProps.mjs.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +1 -1
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/useRenderElement.js +28 -0
- package/dist/esm/helpers/useRenderElement.js.map +6 -0
- package/dist/esm/helpers/useRenderElement.mjs +25 -0
- package/dist/esm/helpers/useRenderElement.mjs.map +1 -0
- package/dist/esm/helpers/useRenderElement.native.js +26 -0
- package/dist/esm/helpers/useRenderElement.native.js.map +1 -0
- package/dist/esm/hooks/getThemeProxied.js.map +1 -1
- package/dist/esm/hooks/getThemeProxied.mjs.map +1 -1
- package/dist/esm/hooks/getThemeProxied.native.js +1 -1
- package/dist/esm/hooks/getThemeProxied.native.js.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/styled.mjs.map +1 -1
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/views/Configuration.js.map +1 -1
- package/dist/esm/views/Configuration.mjs.map +1 -1
- package/dist/esm/views/Configuration.native.js.map +1 -1
- package/dist/esm/views/Slot.js +10 -14
- package/dist/esm/views/Slot.js.map +1 -1
- package/dist/esm/views/Slot.mjs +7 -21
- package/dist/esm/views/Slot.mjs.map +1 -1
- package/dist/esm/views/Slot.native.js +7 -23
- package/dist/esm/views/Slot.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.js +5 -2
- package/dist/esm/views/TamaguiProvider.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.mjs +6 -2
- package/dist/esm/views/TamaguiProvider.mjs.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +5 -1
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Theme.js.map +1 -1
- package/dist/esm/views/Theme.mjs.map +1 -1
- package/dist/esm/views/Theme.native.js.map +1 -1
- package/package.json +12 -12
- package/src/animationDriverTypes.test-d.ts +256 -0
- package/src/config.ts +41 -0
- package/src/createComponent.tsx +45 -10
- package/src/createTamagui.ts +2 -2
- package/src/helpers/getSplitStyles.tsx +4 -2
- package/src/helpers/getThemeCSSRules.ts +2 -9
- package/src/helpers/mergeRenderElementProps.ts +17 -0
- package/src/helpers/mergeSlotStyleProps.ts +46 -0
- package/src/helpers/skipProps.ts +1 -1
- package/src/helpers/useRenderElement.tsx +66 -0
- package/src/hooks/getThemeProxied.ts +2 -1
- package/src/index.ts +1 -0
- package/src/interfaces/TamaguiComponentPropsBaseBase.tsx +19 -4
- package/src/styled.tsx +4 -3
- package/src/types.tsx +85 -25
- package/src/views/Configuration.tsx +0 -2
- package/src/views/Slot.tsx +14 -32
- package/src/views/TamaguiProvider.tsx +12 -1
- package/src/views/Theme.tsx +0 -6
- package/types/animationDriverTypes.type-test.d.ts +37 -0
- package/types/config.d.ts +15 -1
- package/types/config.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getThemeCSSRules.d.ts.map +1 -1
- package/types/helpers/mergeRenderElementProps.d.ts +7 -0
- package/types/helpers/mergeRenderElementProps.d.ts.map +1 -0
- package/types/helpers/mergeSlotStyleProps.d.ts +10 -0
- package/types/helpers/mergeSlotStyleProps.d.ts.map +1 -0
- package/types/helpers/skipProps.d.ts +1 -1
- package/types/helpers/useRenderElement.d.ts +13 -0
- package/types/helpers/useRenderElement.d.ts.map +1 -0
- package/types/hooks/getThemeProxied.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/interfaces/TamaguiComponentPropsBaseBase.d.ts +8 -4
- package/types/interfaces/TamaguiComponentPropsBaseBase.d.ts.map +1 -1
- package/types/styled.d.ts +1 -0
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +50 -22
- package/types/types.d.ts.map +1 -1
- package/types/views/Configuration.d.ts +0 -2
- package/types/views/Configuration.d.ts.map +1 -1
- package/types/views/Slot.d.ts.map +1 -1
- package/types/views/TamaguiProvider.d.ts.map +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { composeRefs } from '@tamagui/compose-refs'
|
|
2
|
+
import { composeEventHandlers } from '@tamagui/helpers'
|
|
3
|
+
|
|
4
|
+
const isEventHandler = /^on[A-Z]/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Merges props with special handling for style, className, ref, and event handlers.
|
|
8
|
+
* Used by Slot and render prop implementations.
|
|
9
|
+
*
|
|
10
|
+
* @param base - Base props (typically from parent/slot)
|
|
11
|
+
* @param overlay - Props to merge on top (typically from child/element)
|
|
12
|
+
* @returns Merged props object (mutates and returns base for perf)
|
|
13
|
+
*/
|
|
14
|
+
export function mergeSlotStyleProps(
|
|
15
|
+
base: Record<string, any>,
|
|
16
|
+
overlay: Record<string, any>
|
|
17
|
+
): Record<string, any> {
|
|
18
|
+
for (const key in overlay) {
|
|
19
|
+
const baseVal = base[key]
|
|
20
|
+
const overlayVal = overlay[key]
|
|
21
|
+
|
|
22
|
+
if (overlayVal === undefined) continue
|
|
23
|
+
|
|
24
|
+
if (key === 'style') {
|
|
25
|
+
base.style =
|
|
26
|
+
baseVal && overlayVal ? { ...baseVal, ...overlayVal } : overlayVal || baseVal
|
|
27
|
+
} else if (key === 'className') {
|
|
28
|
+
base.className =
|
|
29
|
+
baseVal && overlayVal ? `${baseVal} ${overlayVal}` : overlayVal || baseVal
|
|
30
|
+
} else if (key === 'ref') {
|
|
31
|
+
base.ref =
|
|
32
|
+
baseVal && overlayVal ? composeRefs(baseVal, overlayVal) : overlayVal || baseVal
|
|
33
|
+
} else if (
|
|
34
|
+
isEventHandler.test(key) &&
|
|
35
|
+
typeof baseVal === 'function' &&
|
|
36
|
+
typeof overlayVal === 'function'
|
|
37
|
+
) {
|
|
38
|
+
base[key] = composeEventHandlers(baseVal, overlayVal)
|
|
39
|
+
} else {
|
|
40
|
+
// overlay wins for regular props
|
|
41
|
+
base[key] = overlayVal
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return base
|
|
46
|
+
}
|
package/src/helpers/skipProps.ts
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type React from 'react'
|
|
2
|
+
import { cloneElement, createElement, isValidElement } from 'react'
|
|
3
|
+
import { composeRefs } from '@tamagui/compose-refs'
|
|
4
|
+
import type { TamaguiComponentState } from '../types'
|
|
5
|
+
import { mergeSlotStyleProps } from './mergeSlotStyleProps'
|
|
6
|
+
|
|
7
|
+
export type RenderProp<Props = Record<string, any>> =
|
|
8
|
+
| string
|
|
9
|
+
| React.ReactElement
|
|
10
|
+
| ((props: Props, state: TamaguiComponentState) => React.ReactElement)
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Evaluates a render prop and returns the element to render.
|
|
14
|
+
*
|
|
15
|
+
* @param render - The render prop (tag string, JSX element, or function)
|
|
16
|
+
* @param props - Props to pass to the rendered element (including ref)
|
|
17
|
+
* @param state - Component state for render functions
|
|
18
|
+
* @param defaultElement - Fallback element if render prop is not provided
|
|
19
|
+
*/
|
|
20
|
+
export function evaluateRenderProp(
|
|
21
|
+
render: RenderProp | undefined,
|
|
22
|
+
props: Record<string, any>,
|
|
23
|
+
state: TamaguiComponentState,
|
|
24
|
+
defaultElement: React.ReactElement<any>
|
|
25
|
+
): React.ReactElement {
|
|
26
|
+
if (!render) {
|
|
27
|
+
return defaultElement
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const defaultChildren = defaultElement.props.children
|
|
31
|
+
|
|
32
|
+
// String tag - swap element type, reuse props from defaultElement
|
|
33
|
+
if (typeof render === 'string') {
|
|
34
|
+
return createElement(render, props, defaultChildren)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Render function - call with props and state
|
|
38
|
+
if (typeof render === 'function') {
|
|
39
|
+
return render(props, state)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// JSX element - clone with merged props
|
|
43
|
+
if (isValidElement(render)) {
|
|
44
|
+
const renderProps = render.props as Record<string, any>
|
|
45
|
+
const renderRef = renderProps?.ref
|
|
46
|
+
|
|
47
|
+
// Fast path: no props to merge
|
|
48
|
+
if (!renderProps || Object.keys(renderProps).length === 0) {
|
|
49
|
+
if (renderRef) {
|
|
50
|
+
return cloneElement(
|
|
51
|
+
render,
|
|
52
|
+
{ ...props, ref: composeRefs(props.ref, renderRef) } as any,
|
|
53
|
+
defaultChildren
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
return cloneElement(render, props as any, defaultChildren)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Merge props (component props as base, render props as overlay)
|
|
60
|
+
const merged = mergeSlotStyleProps({ ...props }, renderProps)
|
|
61
|
+
const children = renderProps.children ?? defaultChildren
|
|
62
|
+
return cloneElement(render, merged as any, children)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return defaultElement
|
|
66
|
+
}
|
|
@@ -112,12 +112,13 @@ export function getThemeProxied(
|
|
|
112
112
|
|
|
113
113
|
if (process.env.TAMAGUI_TARGET === 'native') {
|
|
114
114
|
// ios can avoid re-rendering in some cases when we are using a root light/dark
|
|
115
|
-
// disabled in cases where we have animations
|
|
115
|
+
// disabled in cases where we have animations or when scheme changes from parent (isInverse)
|
|
116
116
|
const shouldOptimize =
|
|
117
117
|
scheme &&
|
|
118
118
|
platform !== 'web' &&
|
|
119
119
|
isIos &&
|
|
120
120
|
!curProps.deopt &&
|
|
121
|
+
!curState.isInverse &&
|
|
121
122
|
getSetting('fastSchemeChange') &&
|
|
122
123
|
doesRootSchemeMatchSystem()
|
|
123
124
|
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
DebugProp,
|
|
3
|
+
ThemeName,
|
|
4
|
+
GroupNames,
|
|
5
|
+
Role,
|
|
6
|
+
TamaguiComponentState,
|
|
7
|
+
} from '../types'
|
|
2
8
|
|
|
3
9
|
export type TamaguiComponentPropsBaseBase = {
|
|
4
10
|
target?: string
|
|
@@ -41,10 +47,19 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
41
47
|
id?: string
|
|
42
48
|
|
|
43
49
|
/**
|
|
44
|
-
* Controls the
|
|
45
|
-
*
|
|
50
|
+
* Controls the rendered element on web.
|
|
51
|
+
* - String: renders as that HTML element (e.g., `render="button"`)
|
|
52
|
+
* - JSX Element: clones element with merged props (e.g., `render={<a href="/" />}`)
|
|
53
|
+
* - Function: full control with props and state (e.g., `render={(props) => <Custom {...props} />}`)
|
|
46
54
|
*/
|
|
47
|
-
|
|
55
|
+
render?:
|
|
56
|
+
| keyof HTMLElementTagNameMap
|
|
57
|
+
| (string & {})
|
|
58
|
+
| React.ReactElement
|
|
59
|
+
| ((
|
|
60
|
+
props: Record<string, any> & { ref?: React.Ref<any> },
|
|
61
|
+
state: TamaguiComponentState
|
|
62
|
+
) => React.ReactElement)
|
|
48
63
|
|
|
49
64
|
/**
|
|
50
65
|
* Applies a theme to this element
|
package/src/styled.tsx
CHANGED
|
@@ -46,6 +46,7 @@ export function styled<
|
|
|
46
46
|
variants?: Variants | undefined
|
|
47
47
|
defaultVariants?: GetVariantAcceptedValues<Variants>
|
|
48
48
|
context?: StyledContext
|
|
49
|
+
render?: string
|
|
49
50
|
},
|
|
50
51
|
config?: StyledConfig
|
|
51
52
|
) {
|
|
@@ -289,13 +290,13 @@ export function styled<
|
|
|
289
290
|
// })
|
|
290
291
|
|
|
291
292
|
// const Test2 = styled(Text1, {
|
|
292
|
-
//
|
|
293
|
+
// render: 'p',
|
|
293
294
|
// userSelect: 'auto',
|
|
294
295
|
// color: '$color',
|
|
295
296
|
// })
|
|
296
297
|
|
|
297
298
|
// const Test3 = styled(Test2, {
|
|
298
|
-
//
|
|
299
|
+
// render: 'p',
|
|
299
300
|
// userSelect: 'auto',
|
|
300
301
|
// color: '$color',
|
|
301
302
|
|
|
@@ -307,7 +308,7 @@ export function styled<
|
|
|
307
308
|
// })
|
|
308
309
|
|
|
309
310
|
// const Test = styled(Paragraph, {
|
|
310
|
-
//
|
|
311
|
+
// render: 'p',
|
|
311
312
|
// userSelect: 'auto',
|
|
312
313
|
// color: '$color',
|
|
313
314
|
|
package/src/types.tsx
CHANGED
|
@@ -269,10 +269,22 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
269
269
|
id?: string
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
|
-
* Controls the
|
|
273
|
-
*
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
* Controls the rendered element on web.
|
|
273
|
+
* - String: renders as that HTML element (e.g., `render="button"`)
|
|
274
|
+
* - JSX Element: clones element with merged props (e.g., `render={<a href="/" />}`)
|
|
275
|
+
* - Function: full control with props and state (e.g., `render={(props) => <Custom {...props} />}`)
|
|
276
|
+
* @example render="button"
|
|
277
|
+
* @example render={<a href="/" />}
|
|
278
|
+
* @example render={(props, state) => <MyComponent {...props} isPressed={state.press} />}
|
|
279
|
+
*/
|
|
280
|
+
render?:
|
|
281
|
+
| keyof HTMLElementTagNameMap
|
|
282
|
+
| (string & {})
|
|
283
|
+
| React.ReactElement
|
|
284
|
+
| ((
|
|
285
|
+
props: Record<string, any> & { ref?: React.Ref<any> },
|
|
286
|
+
state: TamaguiComponentState
|
|
287
|
+
) => React.ReactElement)
|
|
276
288
|
|
|
277
289
|
/**
|
|
278
290
|
* Applies a theme to this element
|
|
@@ -327,6 +339,13 @@ export type TamaguiComponentPropsBaseBase = {
|
|
|
327
339
|
* Tamagui uses Pressable internally so it supports `number | Insets` rather than just `Insets`
|
|
328
340
|
*/
|
|
329
341
|
hitSlop?: number | Insets | null
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Select which animation driver to use for this component.
|
|
345
|
+
* Pass a string key matching a driver registered in the `animations` config.
|
|
346
|
+
* Example: `<View animatedBy="spring">` when config has `animations: { default: css, spring: moti }`
|
|
347
|
+
*/
|
|
348
|
+
animatedBy?: AnimationDriverKeys | null
|
|
330
349
|
}
|
|
331
350
|
|
|
332
351
|
export interface Insets {
|
|
@@ -727,7 +746,10 @@ export type CreateTamaguiConfig<
|
|
|
727
746
|
}
|
|
728
747
|
shorthands: C
|
|
729
748
|
media: D
|
|
730
|
-
|
|
749
|
+
// Support both single driver and multi-driver config
|
|
750
|
+
// Multi-driver: { default: cssDriver, spring: motiDriver }
|
|
751
|
+
// Single: AnimationDriver<E>
|
|
752
|
+
animations: AnimationDriver<E> | AnimationsConfigObject
|
|
731
753
|
settings: H
|
|
732
754
|
}
|
|
733
755
|
|
|
@@ -760,7 +782,7 @@ type ConfProps<A, B, C, D, E, F, I> = {
|
|
|
760
782
|
themes?: B
|
|
761
783
|
shorthands?: C
|
|
762
784
|
media?: D
|
|
763
|
-
animations?: E
|
|
785
|
+
animations?: E
|
|
764
786
|
fonts?: F
|
|
765
787
|
settings?: I
|
|
766
788
|
}
|
|
@@ -783,6 +805,15 @@ type EmptyTamaguiSettings = {
|
|
|
783
805
|
autocompleteSpecificTokens: 'except-special'
|
|
784
806
|
}
|
|
785
807
|
|
|
808
|
+
// Helper to extract animation config from AnimationDriver<Config> or multi-driver object
|
|
809
|
+
type ExtractAnimationConfig<E> = E extends AnimationDriver<infer Config>
|
|
810
|
+
? Config
|
|
811
|
+
: E extends { default: AnimationDriver<infer Config> }
|
|
812
|
+
? Config
|
|
813
|
+
: E extends GenericAnimations
|
|
814
|
+
? E
|
|
815
|
+
: EmptyAnimations
|
|
816
|
+
|
|
786
817
|
export type InferTamaguiConfig<Conf> = Conf extends ConfProps<
|
|
787
818
|
infer A,
|
|
788
819
|
infer B,
|
|
@@ -797,7 +828,7 @@ export type InferTamaguiConfig<Conf> = Conf extends ConfProps<
|
|
|
797
828
|
B extends GenericThemes ? B : EmptyThemes,
|
|
798
829
|
C extends GenericShorthands ? C : EmptyShorthands,
|
|
799
830
|
D extends GenericMedia ? D : EmptyMedia,
|
|
800
|
-
E
|
|
831
|
+
ExtractAnimationConfig<E>,
|
|
801
832
|
F extends GenericFonts ? F : EmptyFonts,
|
|
802
833
|
H extends GenericTamaguiSettings ? H : EmptyTamaguiSettings
|
|
803
834
|
>
|
|
@@ -855,11 +886,33 @@ export type Media = TamaguiConfig['media']
|
|
|
855
886
|
export type Themes = TamaguiConfig['themes']
|
|
856
887
|
export type ThemeName = Exclude<GetAltThemeNames<keyof Themes>, number>
|
|
857
888
|
export type ThemeTokens = `$${ThemeKeys}`
|
|
858
|
-
|
|
889
|
+
// Animation names (slow, fast, bouncy) for the `transition` prop
|
|
890
|
+
type InferredTransitionKeys = TamaguiConfig['animations'] extends AnimationDriver<
|
|
859
891
|
infer Config
|
|
860
892
|
>
|
|
861
893
|
? keyof Config
|
|
862
|
-
:
|
|
894
|
+
: TamaguiConfig['animations'] extends { default: AnimationDriver<infer Config> }
|
|
895
|
+
? keyof Config
|
|
896
|
+
: string
|
|
897
|
+
|
|
898
|
+
export type TransitionKeys = InferredTransitionKeys
|
|
899
|
+
|
|
900
|
+
// Driver keys (default, css, spring) for the `animatedBy` prop
|
|
901
|
+
type InferredAnimationDriverKeys =
|
|
902
|
+
TamaguiConfig['animations'] extends AnimationDriver<any>
|
|
903
|
+
? 'default'
|
|
904
|
+
: TamaguiConfig['animations'] extends Record<string, AnimationDriver<any>>
|
|
905
|
+
? keyof TamaguiConfig['animations']
|
|
906
|
+
: 'default'
|
|
907
|
+
|
|
908
|
+
// Combine inferred keys from config with TypeOverride keys
|
|
909
|
+
// This ensures both config-defined drivers AND lazy-loaded drivers are available
|
|
910
|
+
export type AnimationDriverKeys =
|
|
911
|
+
| 'default'
|
|
912
|
+
| InferredAnimationDriverKeys
|
|
913
|
+
| (ReturnType<TypeOverride['animationDrivers']> extends 1
|
|
914
|
+
? never
|
|
915
|
+
: ReturnType<TypeOverride['animationDrivers']>)
|
|
863
916
|
export type FontLanguages = ArrayIntersection<TamaguiConfig['fontLanguages']>
|
|
864
917
|
|
|
865
918
|
export interface ThemeProps {
|
|
@@ -1055,21 +1108,6 @@ export interface GenericTamaguiSettings {
|
|
|
1055
1108
|
*/
|
|
1056
1109
|
mediaQueryDefaultActive?: Record<string, boolean>
|
|
1057
1110
|
|
|
1058
|
-
/**
|
|
1059
|
-
* What's between each CSS style rule, set to "\n" to be easier to read
|
|
1060
|
-
* @default "\n" when NODE_ENV=development, "" otherwise
|
|
1061
|
-
*/
|
|
1062
|
-
cssStyleSeparator?: string
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* (Advanced) on the web, tamagui treats `dark` and `light` themes as special
|
|
1066
|
-
* and generates extra CSS to avoid having to re-render the entire page. this
|
|
1067
|
-
* CSS relies on specificity hacks that multiply by your sub-themes. this sets
|
|
1068
|
-
* the maxiumum number of nested dark/light themes you can do defaults to 3
|
|
1069
|
-
* for a balance, but can be higher if you nest them deeply.
|
|
1070
|
-
*/
|
|
1071
|
-
maxDarkLightNesting?: number
|
|
1072
|
-
|
|
1073
1111
|
/**
|
|
1074
1112
|
* Adds @media(prefers-color-scheme) media queries for dark/light, must be set
|
|
1075
1113
|
* true if you are supporting system preference for light and dark mode themes
|
|
@@ -1108,12 +1146,32 @@ export type BaseStyleProps = {
|
|
|
1108
1146
|
[Key in keyof StackStyleBase]?: StackStyle[Key] | GetThemeValueForKey<Key>
|
|
1109
1147
|
}
|
|
1110
1148
|
|
|
1149
|
+
/**
|
|
1150
|
+
* Animation drivers config - can be a single driver or named drivers object.
|
|
1151
|
+
* If object, must include a 'default' key.
|
|
1152
|
+
*/
|
|
1153
|
+
export type AnimationsConfig = AnimationDriver<any> | AnimationsConfigObject
|
|
1154
|
+
|
|
1155
|
+
export type AnimationsConfigObject = {
|
|
1156
|
+
default: AnimationDriver<any>
|
|
1157
|
+
[key: string]: AnimationDriver<any>
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1111
1160
|
export type CreateTamaguiProps = {
|
|
1112
1161
|
unset?: BaseStyleProps
|
|
1113
1162
|
reactNative?: any
|
|
1114
1163
|
shorthands?: CreateShorthands
|
|
1115
1164
|
media?: GenericTamaguiConfig['media']
|
|
1116
|
-
|
|
1165
|
+
/**
|
|
1166
|
+
* Animation driver(s) configuration.
|
|
1167
|
+
* Can be a single driver or an object of named drivers (must include 'default').
|
|
1168
|
+
* @example
|
|
1169
|
+
* // Single driver
|
|
1170
|
+
* animations: createAnimations({ slow: '...', fast: '...' })
|
|
1171
|
+
* // Multiple named drivers
|
|
1172
|
+
* animations: { default: cssDriver, spring: motiDriver }
|
|
1173
|
+
*/
|
|
1174
|
+
animations?: AnimationsConfig
|
|
1117
1175
|
fonts?: GenericTamaguiConfig['fonts']
|
|
1118
1176
|
tokens?: GenericTamaguiConfig['tokens']
|
|
1119
1177
|
themes?: {
|
|
@@ -1215,6 +1273,7 @@ export type PlatformMediaKeys = `$platform-${AllPlatforms}`
|
|
|
1215
1273
|
|
|
1216
1274
|
export interface TypeOverride {
|
|
1217
1275
|
groupNames(): 1
|
|
1276
|
+
animationDrivers(): 1
|
|
1218
1277
|
}
|
|
1219
1278
|
|
|
1220
1279
|
export type GroupNames = ReturnType<TypeOverride['groupNames']> extends 1
|
|
@@ -3005,6 +3064,7 @@ export type UseAnimationHook = (props: {
|
|
|
3005
3064
|
componentState: TamaguiComponentState
|
|
3006
3065
|
useStyleEmitter?: UseStyleEmitter
|
|
3007
3066
|
theme: ThemeParsed
|
|
3067
|
+
themeName: string
|
|
3008
3068
|
pseudos: WithPseudoProps<ViewStyle> | null
|
|
3009
3069
|
stateRef: { current: TamaguiComponentStateRef }
|
|
3010
3070
|
onDidAnimate?: any
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ClientOnly } from '@tamagui/use-did-finish-ssr'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { ComponentContext } from '../contexts/ComponentContext'
|
|
4
|
-
import type { AnimationDriver } from '../types'
|
|
5
4
|
|
|
6
5
|
interface ConfigurationProps {
|
|
7
|
-
animationDriver?: AnimationDriver | null
|
|
8
6
|
disableSSR?: boolean
|
|
9
7
|
children: React.ReactNode
|
|
10
8
|
}
|
package/src/views/Slot.tsx
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { composeRefs } from '@tamagui/compose-refs'
|
|
4
4
|
import { isWeb } from '@tamagui/constants'
|
|
5
|
-
import { composeEventHandlers } from '@tamagui/helpers'
|
|
6
5
|
import type { ReactNode } from 'react'
|
|
7
|
-
import { Children, cloneElement, forwardRef, isValidElement,
|
|
6
|
+
import { Children, cloneElement, forwardRef, isValidElement, memo } from 'react'
|
|
7
|
+
import { mergeSlotStyleProps } from '../helpers/mergeSlotStyleProps'
|
|
8
8
|
|
|
9
9
|
/* -------------------------------------------------------------------------------------------------
|
|
10
10
|
* Slot
|
|
@@ -14,8 +14,6 @@ interface SlotProps {
|
|
|
14
14
|
children: ReactNode
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const is19 = version.startsWith('19.')
|
|
18
|
-
|
|
19
17
|
export const Slot = memo(
|
|
20
18
|
forwardRef<any, SlotProps>(function Slot(props, forwardedRef) {
|
|
21
19
|
const { children, ...slotProps } = props
|
|
@@ -28,10 +26,7 @@ export const Slot = memo(
|
|
|
28
26
|
? mergedProps
|
|
29
27
|
: {
|
|
30
28
|
...mergedProps,
|
|
31
|
-
ref: composeRefs(
|
|
32
|
-
forwardedRef,
|
|
33
|
-
is19 ? (children as any).props.ref : (children as any).ref
|
|
34
|
-
),
|
|
29
|
+
ref: composeRefs(forwardedRef, (children as any).props.ref),
|
|
35
30
|
}
|
|
36
31
|
)
|
|
37
32
|
}
|
|
@@ -62,11 +57,9 @@ const pressMap = isWeb
|
|
|
62
57
|
|
|
63
58
|
function mergeSlotProps(child: any, slotProps: Record<string, any>) {
|
|
64
59
|
const childProps = child.props
|
|
65
|
-
|
|
66
|
-
// all child props should override
|
|
67
|
-
const overrideProps = { ...childProps }
|
|
68
60
|
const isHTMLChild = typeof child.type === 'string'
|
|
69
61
|
|
|
62
|
+
// convert RN press events to web events for HTML children
|
|
70
63
|
if (isHTMLChild) {
|
|
71
64
|
for (const key in pressMap) {
|
|
72
65
|
if (key in slotProps) {
|
|
@@ -76,29 +69,18 @@ function mergeSlotProps(child: any, slotProps: Record<string, any>) {
|
|
|
76
69
|
}
|
|
77
70
|
}
|
|
78
71
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const childPropValue = childProps[propName]
|
|
72
|
+
// merge slot props with child props (child wins via overlay)
|
|
73
|
+
const merged = mergeSlotStyleProps(slotProps, childProps)
|
|
82
74
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (isHandler) {
|
|
91
|
-
overrideProps[propName] = composeEventHandlers(childPropValue, slotPropValue)
|
|
92
|
-
}
|
|
93
|
-
// if it's `style`, we merge them
|
|
94
|
-
else if (propName === 'style') {
|
|
95
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue }
|
|
96
|
-
} else if (propName === 'className') {
|
|
97
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ')
|
|
75
|
+
// convert child's RN press events to web events after merge
|
|
76
|
+
if (isHTMLChild) {
|
|
77
|
+
for (const key in pressMap) {
|
|
78
|
+
if (key in merged) {
|
|
79
|
+
merged[pressMap[key]] = merged[key]
|
|
80
|
+
delete merged[key]
|
|
81
|
+
}
|
|
98
82
|
}
|
|
99
83
|
}
|
|
100
84
|
|
|
101
|
-
return
|
|
85
|
+
return merged
|
|
102
86
|
}
|
|
103
|
-
|
|
104
|
-
const handleRegex = /^on[A-Z]/
|
|
@@ -49,10 +49,21 @@ export function TamaguiProvider({
|
|
|
49
49
|
[insets?.top, insets?.right, insets?.bottom, insets?.left]
|
|
50
50
|
)
|
|
51
51
|
|
|
52
|
+
// Get the default animation driver from config
|
|
53
|
+
// animations can be a single driver or { default: driver, ...others }
|
|
54
|
+
const defaultAnimationDriver = React.useMemo(() => {
|
|
55
|
+
const animations = config?.animations
|
|
56
|
+
if (!animations) return null
|
|
57
|
+
if ('default' in animations) {
|
|
58
|
+
return (animations as { default: any }).default
|
|
59
|
+
}
|
|
60
|
+
return animations
|
|
61
|
+
}, [config?.animations])
|
|
62
|
+
|
|
52
63
|
let contents = (
|
|
53
64
|
<UnmountedClassName>
|
|
54
65
|
<ComponentContext.Provider
|
|
55
|
-
animationDriver={
|
|
66
|
+
animationDriver={defaultAnimationDriver}
|
|
56
67
|
insets={memoizedInsets}
|
|
57
68
|
>
|
|
58
69
|
<ThemeProvider defaultTheme={defaultTheme} reset={reset} className={className}>
|
package/src/views/Theme.tsx
CHANGED
|
@@ -215,12 +215,6 @@ function getThemeClassNameAndColor(
|
|
|
215
215
|
}
|
|
216
216
|
: undefined
|
|
217
217
|
|
|
218
|
-
// const maxInverses = getSetting('maxDarkLightNesting') || 3
|
|
219
|
-
// const themeClassName =
|
|
220
|
-
// themeState.inverses >= maxInverses
|
|
221
|
-
// ? themeState.name
|
|
222
|
-
// : themeState.name.replace(schemePrefix, '')
|
|
223
|
-
|
|
224
218
|
const themeClassName = themeState.name.replace(schemePrefix, '')
|
|
225
219
|
|
|
226
220
|
// Build full hierarchy of theme classes for CSS variable inheritance
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type tests for animatedBy prop and animation driver configuration.
|
|
3
|
+
*
|
|
4
|
+
* These tests ensure type-safe inference for:
|
|
5
|
+
* 1. Single animation driver config
|
|
6
|
+
* 2. Multiple animation drivers config
|
|
7
|
+
* 3. TypeOverride for lazy-loaded drivers
|
|
8
|
+
* 4. Combination scenarios
|
|
9
|
+
*
|
|
10
|
+
* Run with: yarn test:types
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
/**
|
|
14
|
+
* SUMMARY OF APPLIED TYPE FIXES:
|
|
15
|
+
*
|
|
16
|
+
* 1. CreateTamaguiConfig (line ~737):
|
|
17
|
+
* FIXED: Changed from `animations: AnimationDriver<E>`
|
|
18
|
+
* To: `animations: AnimationDriver<E> | AnimationsConfigObject`
|
|
19
|
+
* This preserves the multi-driver object shape for type inference.
|
|
20
|
+
*
|
|
21
|
+
* 2. AnimationDriverKeys (line ~888-895):
|
|
22
|
+
* FIXED: Changed from conditional (inferred OR override)
|
|
23
|
+
* To: Union of all sources:
|
|
24
|
+
* | 'default'
|
|
25
|
+
* | InferredAnimationDriverKeys
|
|
26
|
+
* | (TypeOverride extends 1 ? never : TypeOverride)
|
|
27
|
+
* This ensures both config-defined AND lazy-loaded drivers are available.
|
|
28
|
+
*
|
|
29
|
+
* 3. InferredAnimationDriverKeys (line 879-886):
|
|
30
|
+
* No changes needed - works correctly with the above fixes.
|
|
31
|
+
* Properly infers 'default' for single driver and keyof for multi-driver.
|
|
32
|
+
*
|
|
33
|
+
* 4. TransitionKeys (line 868-876):
|
|
34
|
+
* No changes needed - already handles both single and multi-driver cases.
|
|
35
|
+
* Uses default driver's config for animation names.
|
|
36
|
+
*/
|
|
37
|
+
//# sourceMappingURL=animationDriverTypes.type-test.d.ts.map
|
package/types/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfigListener, GenericTamaguiSettings, TamaguiInternalConfig, Token, Tokens, TokensMerged } from './types';
|
|
1
|
+
import type { AnimationDriver, ConfigListener, GenericTamaguiSettings, TamaguiInternalConfig, Token, Tokens, TokensMerged } from './types';
|
|
2
2
|
export declare const getSetting: <Key extends keyof GenericTamaguiSettings>(key: Key) => GenericTamaguiSettings[Key];
|
|
3
3
|
export declare const setConfig: (next: TamaguiInternalConfig) => void;
|
|
4
4
|
export declare const setConfigFont: (name: string, font: any, fontParsed: any) => void;
|
|
@@ -56,5 +56,19 @@ type DevConfig = {
|
|
|
56
56
|
};
|
|
57
57
|
export declare let devConfig: DevConfig | undefined;
|
|
58
58
|
export declare function setupDev(conf: DevConfig): void;
|
|
59
|
+
/**
|
|
60
|
+
* Dynamically load an animation driver at runtime.
|
|
61
|
+
* Useful for lazy loading heavier animation drivers after initial page load.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* // import loadAnimationDriver from tamagui
|
|
66
|
+
* // import createAnimations from your preferred driver (e.g. animations-reanimated)
|
|
67
|
+
*
|
|
68
|
+
* const driver = createAnimations({ bouncy: { type: 'spring', damping: 10 } })
|
|
69
|
+
* loadAnimationDriver('spring', driver)
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare function loadAnimationDriver(name: string, driver: AnimationDriver): void;
|
|
59
73
|
export {};
|
|
60
74
|
//# sourceMappingURL=config.d.ts.map
|
package/types/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,EACL,MAAM,EACN,YAAY,EACb,MAAM,SAAS,CAAA;AAgDhB,eAAO,MAAM,UAAU,GAAI,GAAG,SAAS,MAAM,sBAAsB,EACjE,KAAK,GAAG,KACP,sBAAsB,CAAC,GAAG,CAU5B,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,MAAM,qBAAqB,SAIpD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,MAAM,GAAG,EAAE,YAAY,GAAG,SAOrE,CAAA;AAED,eAAO,MAAM,SAAS,6BAUrB,CAAA;AAED,eAAO,MAAM,cAAc,oCAE1B,CAAA;AAGD,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,QAExC;AAED,eAAO,MAAM,SAAS,GAAI,gBAEvB;IACD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACd,KAAG,YASR,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,MAAM,oCAUhE,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,MAAM,EAAE,qBAAmB,QAG/E,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,GAAG,OAAO,GAAG,MAAM,EAAE,QAAQ,MAAM,MAAM,QAGlF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,mBAzCnB;IACD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,KAAQ,YAoCyB,CAAA;AAElC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAA6C,CAAA;AAEnE,eAAO,MAAM,eAAe,qBAA4B,CAAA;AAExD,eAAO,MAAM,gBAAgB,GAAI,IAAI,cAAc,SAOlD,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,OAAO,GAAG,SAInD,CAAA;AAGD,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,4DAQnC,CAAA;AAED,KAAK,SAAS,GAAG;IACf,UAAU,CAAC,EACP,OAAO,GACP;QACE,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACN,CAAA;AAED,eAAO,IAAI,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;AAE3C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,QAIvC"}
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,EACL,MAAM,EACN,YAAY,EACb,MAAM,SAAS,CAAA;AAgDhB,eAAO,MAAM,UAAU,GAAI,GAAG,SAAS,MAAM,sBAAsB,EACjE,KAAK,GAAG,KACP,sBAAsB,CAAC,GAAG,CAU5B,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,MAAM,qBAAqB,SAIpD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,MAAM,GAAG,EAAE,YAAY,GAAG,SAOrE,CAAA;AAED,eAAO,MAAM,SAAS,6BAUrB,CAAA;AAED,eAAO,MAAM,cAAc,oCAE1B,CAAA;AAGD,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,QAExC;AAED,eAAO,MAAM,SAAS,GAAI,gBAEvB;IACD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACd,KAAG,YASR,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,MAAM,oCAUhE,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,MAAM,EAAE,qBAAmB,QAG/E,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,GAAG,OAAO,GAAG,MAAM,EAAE,QAAQ,MAAM,MAAM,QAGlF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,mBAzCnB;IACD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,KAAQ,YAoCyB,CAAA;AAElC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAA6C,CAAA;AAEnE,eAAO,MAAM,eAAe,qBAA4B,CAAA;AAExD,eAAO,MAAM,gBAAgB,GAAI,IAAI,cAAc,SAOlD,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,OAAO,GAAG,SAInD,CAAA;AAGD,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,4DAQnC,CAAA;AAED,KAAK,SAAS,GAAG;IACf,UAAU,CAAC,EACP,OAAO,GACP;QACE,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACN,CAAA;AAED,eAAO,IAAI,SAAS,EAAE,SAAS,GAAG,SAAS,CAAA;AAE3C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,QAIvC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,QAyBxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAkB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAqBtC,OAAO,KAAK,EASV,YAAY,EAEZ,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EAQf,MAAM,SAAS,CAAA;AAYhB,KAAK,iBAAiB,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC,CAAA;AAEpF,eAAO,MAAM,kBAAkB,wBAA+B,CAAA;AA8J9D,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EACnD,GAAG,SAAS,cAAc,GAAG,cAAc,EAC3C,SAAS,GAAG,KAAK,EACjB,UAAU,SAAS,MAAM,GAAG,KAAK,EACjC,YAAY,EAAE,YAAY,wEAu6C3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EACV,gBAAgB,EAEhB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,
|
|
1
|
+
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EACV,gBAAgB,EAEhB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,EAIb,eAAe,EACf,YAAY,EAEZ,qBAAqB,EAErB,SAAS,EACT,WAAW,EAEZ,MAAM,UAAU,CAAA;AA0BjB,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAOhE,eAAO,MAAM,mBAAmB,sCAA6C,CAAA;AAE7E,KAAK,aAAa,GAAG,CACnB,KAAK,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAC7B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,qBAAqB,EACrC,UAAU,EAAE,eAAe,EAC3B,iBAAiB,CAAC,EAAE,cAAc,GAAG,IAAI,EACzC,OAAO,CAAC,EAAE,iBAAiB,EAC3B,YAAY,CAAC,EAAE,gBAAgB,GAAG,IAAI,EAEtC,WAAW,CAAC,EAAE,MAAM,EACpB,iBAAiB,CAAC,EAAE,OAAO,EAC3B,KAAK,CAAC,EAAE,SAAS,KACd,IAAI,GAAG,cAAc,CAAA;AAE1B,eAAO,MAAM,UAAU,MAAM,CAAA;AAoD7B,eAAO,MAAM,cAAc,EAAE,aAkuC5B,CAAA;AA+DD,eAAO,MAAM,WAAW,GACtB,YAAY,aAAa,EACzB,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,sBAAsB,OAAO,KAC5B,SAyFF,CAAA;AAQD,eAAO,MAAM,cAAc,EAAE,aAY5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThemeCSSRules.d.ts","sourceRoot":"","sources":["../../src/helpers/getThemeCSSRules.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAY,MAAM,UAAU,CAAA;AAOzE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,WAAW,CAAA;IAClB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,
|
|
1
|
+
{"version":3,"file":"getThemeCSSRules.d.ts","sourceRoot":"","sources":["../../src/helpers/getThemeCSSRules.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAY,MAAM,UAAU,CAAA;AAOzE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,WAAW,CAAA;IAClB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,YAkKA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merges props from a render element with viewProps from Tamagui.
|
|
3
|
+
* viewProps takes precedence, elementProps provides fallbacks.
|
|
4
|
+
* Style/className are merged, refs and event handlers are composed.
|
|
5
|
+
*/
|
|
6
|
+
export declare function mergeRenderElementProps(elementProps: Record<string, any>, viewProps: Record<string, any>, children: any): Record<string, any>;
|
|
7
|
+
//# sourceMappingURL=mergeRenderElementProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeRenderElementProps.d.ts","sourceRoot":"","sources":["../../src/helpers/mergeRenderElementProps.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9B,QAAQ,EAAE,GAAG,GACZ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAKrB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merges props with special handling for style, className, ref, and event handlers.
|
|
3
|
+
* Used by Slot and render prop implementations.
|
|
4
|
+
*
|
|
5
|
+
* @param base - Base props (typically from parent/slot)
|
|
6
|
+
* @param overlay - Props to merge on top (typically from child/element)
|
|
7
|
+
* @returns Merged props object (mutates and returns base for perf)
|
|
8
|
+
*/
|
|
9
|
+
export declare function mergeSlotStyleProps(base: Record<string, any>, overlay: Record<string, any>): Record<string, any>;
|
|
10
|
+
//# sourceMappingURL=mergeSlotStyleProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeSlotStyleProps.d.ts","sourceRoot":"","sources":["../../src/helpers/mergeSlotStyleProps.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CA6BrB"}
|