@tamagui/web 1.9.15 → 1.9.16
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/contexts/AnimationDriverContext.js +30 -0
- package/dist/cjs/contexts/AnimationDriverContext.js.map +7 -0
- package/dist/cjs/createComponent.js +35 -36
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/helpers/getAnimationDriver.js.map +2 -2
- package/dist/cjs/hooks/useAnimationDriver.js +33 -0
- package/dist/cjs/hooks/useAnimationDriver.js.map +7 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/views/AnimationDriverProvider.js +33 -0
- package/dist/cjs/views/AnimationDriverProvider.js.map +7 -0
- package/dist/cjs/views/TamaguiProvider.js +3 -2
- package/dist/cjs/views/TamaguiProvider.js.map +2 -2
- package/dist/esm/contexts/AnimationDriverContext.js +6 -0
- package/dist/esm/contexts/AnimationDriverContext.js.map +7 -0
- package/dist/esm/contexts/AnimationDriverContext.mjs +6 -0
- package/dist/esm/contexts/AnimationDriverContext.mjs.map +7 -0
- package/dist/esm/createComponent.js +35 -36
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createComponent.mjs +35 -36
- package/dist/esm/createComponent.mjs.map +2 -2
- package/dist/esm/helpers/getAnimationDriver.js.map +2 -2
- package/dist/esm/helpers/getAnimationDriver.mjs.map +2 -2
- package/dist/esm/hooks/useAnimationDriver.js +9 -0
- package/dist/esm/hooks/useAnimationDriver.js.map +7 -0
- package/dist/esm/hooks/useAnimationDriver.mjs +9 -0
- package/dist/esm/hooks/useAnimationDriver.mjs.map +7 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +2 -2
- package/dist/esm/views/AnimationDriverProvider.js +9 -0
- package/dist/esm/views/AnimationDriverProvider.js.map +7 -0
- package/dist/esm/views/AnimationDriverProvider.mjs +9 -0
- package/dist/esm/views/AnimationDriverProvider.mjs.map +7 -0
- package/dist/esm/views/TamaguiProvider.js +3 -2
- package/dist/esm/views/TamaguiProvider.js.map +2 -2
- package/dist/esm/views/TamaguiProvider.mjs +3 -2
- package/dist/esm/views/TamaguiProvider.mjs.map +2 -2
- package/package.json +9 -9
- package/src/contexts/AnimationDriverContext.tsx +5 -0
- package/src/createComponent.tsx +52 -51
- package/src/helpers/getAnimationDriver.tsx +3 -0
- package/src/hooks/useAnimationDriver.tsx +7 -0
- package/src/index.ts +2 -0
- package/src/types.tsx +6 -2
- package/src/views/AnimationDriverProvider.tsx +16 -0
- package/src/views/TamaguiProvider.tsx +13 -8
- package/types/contexts/AnimationDriverContext.d.ts +6 -0
- package/types/contexts/AnimationDriverContext.d.ts.map +1 -0
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/getAnimationDriver.d.ts +3 -0
- package/types/helpers/getAnimationDriver.d.ts.map +1 -1
- package/types/hooks/useAnimationDriver.d.ts +4 -0
- package/types/hooks/useAnimationDriver.d.ts.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
- package/types/types.d.ts +4 -1
- package/types/types.d.ts.map +1 -1
- package/types/views/AnimationDriverProvider.d.ts +9 -0
- package/types/views/AnimationDriverProvider.d.ts.map +1 -0
- package/types/views/TamaguiProvider.d.ts.map +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var AnimationDriverContext_exports = {};
|
|
20
|
+
__export(AnimationDriverContext_exports, {
|
|
21
|
+
AnimationDriverContext: () => AnimationDriverContext
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(AnimationDriverContext_exports);
|
|
24
|
+
var import_react = require("react");
|
|
25
|
+
const AnimationDriverContext = (0, import_react.createContext)(null);
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
AnimationDriverContext
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=AnimationDriverContext.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/contexts/AnimationDriverContext.tsx"],
|
|
4
|
+
"sourcesContent": ["import { createContext } from 'react'\n\nimport { AnimationDriver } from '../types'\n\nexport const AnimationDriverContext = createContext<AnimationDriver | null>(null)\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8B;AAIvB,MAAM,6BAAyB,4BAAsC,IAAI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -52,6 +52,7 @@ var import_insertStyleRule = require("./helpers/insertStyleRule.js");
|
|
|
52
52
|
var import_mergeProps = require("./helpers/mergeProps.js");
|
|
53
53
|
var import_proxyThemeVariables = require("./helpers/proxyThemeVariables.js");
|
|
54
54
|
var import_useShallowSetState = require("./helpers/useShallowSetState.js");
|
|
55
|
+
var import_useAnimationDriver = require("./hooks/useAnimationDriver.js");
|
|
55
56
|
var import_useMedia = require("./hooks/useMedia.js");
|
|
56
57
|
var import_useServerHooks = require("./hooks/useServerHooks.js");
|
|
57
58
|
var import_useTheme = require("./hooks/useTheme.js");
|
|
@@ -105,7 +106,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
105
106
|
let tamaguiDefaultProps;
|
|
106
107
|
let defaultTag;
|
|
107
108
|
const component = (0, import_react.forwardRef)((propsIn, forwardedRef) => {
|
|
108
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n
|
|
109
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
109
110
|
if (process.env.TAMAGUI_TARGET === "native") {
|
|
110
111
|
if (!hasSetupBaseViews) {
|
|
111
112
|
hasSetupBaseViews = true;
|
|
@@ -131,24 +132,12 @@ function createComponent(configIn, ParentComponent) {
|
|
|
131
132
|
const debugProp = props["debug"];
|
|
132
133
|
const { Component, isText, isZStack } = staticConfig;
|
|
133
134
|
const componentName = props.componentName || staticConfig.componentName;
|
|
134
|
-
const componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName;
|
|
135
|
-
const animationsConfig = tamaguiConfig.animations;
|
|
136
|
-
const useAnimations = animationsConfig == null ? void 0 : animationsConfig.useAnimations;
|
|
137
|
-
const avoidClassesWhileAnimating = animationsConfig.isReactNative;
|
|
138
|
-
const hasEnterStyle = !!props.enterStyle;
|
|
139
|
-
const needsMount = Boolean(
|
|
140
|
-
(import_constants.isWeb ? import_constants.isClient : true) && (hasEnterStyle || props.animation)
|
|
141
|
-
);
|
|
142
|
-
const states = (0, import_useServerHooks.useServerState)(
|
|
143
|
-
needsMount ? defaultComponentState : defaultComponentStateMounted
|
|
144
|
-
);
|
|
145
|
-
const state = propsIn.forceStyle ? { ...states[0], [propsIn.forceStyle]: true } : states[0];
|
|
146
|
-
const setState = states[1];
|
|
147
|
-
const setStateShallow = (0, import_useShallowSetState.useShallowSetState)(setState, debugProp, componentName);
|
|
148
135
|
const stateRef = (0, import_react.useRef)(
|
|
149
136
|
void 0
|
|
150
137
|
);
|
|
151
138
|
stateRef.current ?? (stateRef.current = {});
|
|
139
|
+
const animationsConfig = (0, import_useAnimationDriver.useAnimationDriver)();
|
|
140
|
+
const useAnimations = animationsConfig == null ? void 0 : animationsConfig.useAnimations;
|
|
152
141
|
const isAnimated = (() => {
|
|
153
142
|
const next = !!(!staticConfig.isHOC && useAnimations && (props.animation || props.style && hasAnimatedStyleValue(props.style)));
|
|
154
143
|
if (next && !stateRef.current.hasAnimated) {
|
|
@@ -156,8 +145,30 @@ function createComponent(configIn, ParentComponent) {
|
|
|
156
145
|
}
|
|
157
146
|
return next || stateRef.current.hasAnimated;
|
|
158
147
|
})();
|
|
159
|
-
const
|
|
160
|
-
const
|
|
148
|
+
const componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName;
|
|
149
|
+
const hasTextAncestor = !!(import_constants.isWeb && isText ? (0, import_react.useContext)(import_TextAncestorContext.TextAncestorContext) : false);
|
|
150
|
+
const languageContext = import_constants.isRSC ? null : (0, import_react.useContext)(import_FontLanguageContext.FontLanguageContext);
|
|
151
|
+
const isDisabled = props.disabled ?? ((_d = props.accessibilityState) == null ? void 0 : _d.disabled);
|
|
152
|
+
const isTaggable = !Component || typeof Component === "string";
|
|
153
|
+
const element = import_constants.isWeb ? isTaggable ? props.tag || defaultTag || Component : Component : Component;
|
|
154
|
+
const BaseTextComponent = BaseText || element || "span";
|
|
155
|
+
const BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div");
|
|
156
|
+
AnimatedText = animationsConfig ? animationsConfig.Text : BaseTextComponent;
|
|
157
|
+
AnimatedView = animationsConfig ? animationsConfig.View : BaseViewComponent;
|
|
158
|
+
let elementType = isText ? (isAnimated ? AnimatedText : null) || BaseTextComponent : (isAnimated ? AnimatedView : null) || BaseViewComponent;
|
|
159
|
+
const avoidClassesWhileAnimating = animationsConfig == null ? void 0 : animationsConfig.isReactNative;
|
|
160
|
+
const hasEnterStyle = !!props.enterStyle;
|
|
161
|
+
const needsMount = Boolean(
|
|
162
|
+
(import_constants.isWeb ? import_constants.isClient : true) && (hasEnterStyle || props.animation)
|
|
163
|
+
);
|
|
164
|
+
const states = (0, import_useServerHooks.useServerState)(
|
|
165
|
+
needsMount ? defaultComponentState : defaultComponentStateMounted
|
|
166
|
+
);
|
|
167
|
+
const state = propsIn.forceStyle ? { ...states[0], [propsIn.forceStyle]: true } : states[0];
|
|
168
|
+
const setState = states[1];
|
|
169
|
+
const setStateShallow = (0, import_useShallowSetState.useShallowSetState)(setState, debugProp, componentName);
|
|
170
|
+
const usePresence = animationsConfig == null ? void 0 : animationsConfig.usePresence;
|
|
171
|
+
const presence = !import_constants.isRSC && isAnimated && usePresence ? usePresence() : null;
|
|
161
172
|
if (isAnimated && presence) {
|
|
162
173
|
const presenceState = presence[2];
|
|
163
174
|
if (presenceState) {
|
|
@@ -169,7 +180,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
169
180
|
}
|
|
170
181
|
}
|
|
171
182
|
}
|
|
172
|
-
const isAnimatedReactNative = isAnimated &&
|
|
183
|
+
const isAnimatedReactNative = isAnimated && (animationsConfig == null ? void 0 : animationsConfig.isReactNative);
|
|
173
184
|
const isReactNative = Boolean(staticConfig.isReactNative || isAnimatedReactNative);
|
|
174
185
|
if (process.env.NODE_ENV === "development") {
|
|
175
186
|
if (debugProp) {
|
|
@@ -196,14 +207,6 @@ function createComponent(configIn, ParentComponent) {
|
|
|
196
207
|
debug: props.debug,
|
|
197
208
|
shouldUpdate: () => !!stateRef.current.didAccessThemeVariableValue
|
|
198
209
|
});
|
|
199
|
-
const hasTextAncestor = !!(import_constants.isWeb && isText ? (0, import_react.useContext)(import_TextAncestorContext.TextAncestorContext) : false);
|
|
200
|
-
const languageContext = import_constants.isRSC ? null : (0, import_react.useContext)(import_FontLanguageContext.FontLanguageContext);
|
|
201
|
-
const isDisabled = props.disabled ?? ((_e = props.accessibilityState) == null ? void 0 : _e.disabled);
|
|
202
|
-
const isTaggable = !Component || typeof Component === "string";
|
|
203
|
-
const element = import_constants.isWeb ? isTaggable ? props.tag || defaultTag || Component : Component : Component;
|
|
204
|
-
const BaseTextComponent = BaseText || element || "span";
|
|
205
|
-
const BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div");
|
|
206
|
-
let elementType = isText ? (isAnimated ? AnimatedText : null) || BaseTextComponent : (isAnimated ? AnimatedView : null) || BaseViewComponent;
|
|
207
210
|
elementType = Component || elementType;
|
|
208
211
|
const isStringElement = typeof elementType === "string";
|
|
209
212
|
const isExiting = (presence == null ? void 0 : presence[0]) === false;
|
|
@@ -310,10 +313,10 @@ function createComponent(configIn, ParentComponent) {
|
|
|
310
313
|
defaultVariants,
|
|
311
314
|
...nonTamaguiProps
|
|
312
315
|
} = viewPropsIn;
|
|
313
|
-
const disabled = ((
|
|
316
|
+
const disabled = ((_e = props.accessibilityState) == null ? void 0 : _e.disabled) || props.accessibilityDisabled;
|
|
314
317
|
let viewProps = nonTamaguiProps;
|
|
315
318
|
if (process.env.TAMAGUI_TARGET === "web" && !isReactNative && !asChild) {
|
|
316
|
-
viewProps = (
|
|
319
|
+
viewProps = (_g = (_f = import_setupHooks.hooks).usePropsTransform) == null ? void 0 : _g.call(_f, elementType, nonTamaguiProps, hostRef);
|
|
317
320
|
} else {
|
|
318
321
|
viewProps = nonTamaguiProps;
|
|
319
322
|
}
|
|
@@ -407,7 +410,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
407
410
|
}
|
|
408
411
|
if (process.env.TAMAGUI_TARGET === "native") {
|
|
409
412
|
if (splitStyles.fontFamily) {
|
|
410
|
-
const faceInfo = (
|
|
413
|
+
const faceInfo = (_h = tamaguiConfig.fontsParsed[splitStyles.fontFamily]) == null ? void 0 : _h.face;
|
|
411
414
|
if (faceInfo) {
|
|
412
415
|
const [weight, style] = (() => {
|
|
413
416
|
var _a2, _b2;
|
|
@@ -419,7 +422,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
419
422
|
}
|
|
420
423
|
return [weight2 || "400", style2 || "normal"];
|
|
421
424
|
})();
|
|
422
|
-
const overrideFace = (
|
|
425
|
+
const overrideFace = (_j = (_i = faceInfo[weight]) == null ? void 0 : _i[style]) == null ? void 0 : _j.val;
|
|
423
426
|
if (overrideFace) {
|
|
424
427
|
for (const style2 of styles) {
|
|
425
428
|
if (style2 == null ? void 0 : style2.fontFamily) {
|
|
@@ -513,7 +516,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
513
516
|
});
|
|
514
517
|
}
|
|
515
518
|
}
|
|
516
|
-
(
|
|
519
|
+
(_l = (_k = import_setupHooks.hooks).useEvents) == null ? void 0 : _l.call(_k, viewProps, events, splitStyles, setStateShallow);
|
|
517
520
|
const shouldReset = !!(themeShallow && themeState.isNewTheme);
|
|
518
521
|
if (shouldReset) {
|
|
519
522
|
stateRef.current.themeShallow = true;
|
|
@@ -570,7 +573,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
570
573
|
console.log("children", content);
|
|
571
574
|
console.groupEnd();
|
|
572
575
|
if (typeof window !== "undefined") {
|
|
573
|
-
console.log({ state, themeState, isAnimated, isAnimatedReactNativeWeb, tamaguiDefaultProps, viewProps, splitStyles, animationStyles, handlesPressEvents, isStringElement, classNamesIn: (
|
|
576
|
+
console.log({ state, themeState, isAnimated, isAnimatedReactNativeWeb, tamaguiDefaultProps, viewProps, splitStyles, animationStyles, handlesPressEvents, isStringElement, classNamesIn: (_m = props.className) == null ? void 0 : _m.split(" "), classNamesOut: (_n = viewProps.className) == null ? void 0 : _n.split(" "), events, shouldAttach, styles, pseudos, content, shouldAvoidClasses, avoidClasses: avoidClassesWhileAnimating, animation: props.animation, style: splitStylesStyle, staticConfig, tamaguiConfig, shouldForcePseudo, classNamesFull: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, (0, import_insertStyleRule.getAllSelectors)()[v]])) });
|
|
574
577
|
}
|
|
575
578
|
console.groupEnd();
|
|
576
579
|
}
|
|
@@ -583,10 +586,6 @@ function createComponent(configIn, ParentComponent) {
|
|
|
583
586
|
(0, import_config.onConfiguredOnce)((conf) => {
|
|
584
587
|
if (!tamaguiConfig) {
|
|
585
588
|
tamaguiConfig = conf;
|
|
586
|
-
if (tamaguiConfig.animations) {
|
|
587
|
-
AnimatedText = tamaguiConfig.animations.Text;
|
|
588
|
-
AnimatedView = tamaguiConfig.animations.View;
|
|
589
|
-
}
|
|
590
589
|
if (!initialTheme) {
|
|
591
590
|
const next = conf.themes[Object.keys(conf.themes)[0]];
|
|
592
591
|
initialTheme = (0, import_proxyThemeVariables.proxyThemeVariables)(next);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/createComponent.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useComposedRefs } from '@tamagui/compose-refs'\nimport { isClient, isRSC, isServer, isWeb } from '@tamagui/constants'\nimport { stylePropsView, validPseudoKeys, validStyles } from '@tamagui/helpers'\nimport React, {\n Children,\n Fragment,\n createElement,\n forwardRef,\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from 'react'\n\nimport { onConfiguredOnce } from './config.js'\nimport { stackDefaultStyles } from './constants/constants.js'\nimport { FontLanguageContext } from './contexts/FontLanguageContext.js'\nimport { TextAncestorContext } from './contexts/TextAncestorContext.js'\nimport { didGetVariableValue, setDidGetVariableValue } from './createVariable.js'\nimport { extendStaticConfig, parseStaticConfig } from './helpers/extendStaticConfig.js'\nimport { useSplitStyles } from './helpers/getSplitStyles.js'\nimport { getAllSelectors } from './helpers/insertStyleRule.js'\nimport { mergeProps } from './helpers/mergeProps.js'\nimport { proxyThemeVariables } from './helpers/proxyThemeVariables.js'\nimport { useShallowSetState } from './helpers/useShallowSetState.js'\nimport { setMediaShouldUpdate, useMedia } from './hooks/useMedia.js'\nimport { useServerRef, useServerState } from './hooks/useServerHooks.js'\nimport { useThemeWithState } from './hooks/useTheme.js'\nimport { hooks } from './setupHooks.js'\nimport {\n DebugProp,\n SpaceDirection,\n SpaceTokens,\n SpacerProps,\n StaticConfig,\n StaticConfigParsed,\n StylableComponent,\n TamaguiComponent,\n TamaguiComponentEvents,\n TamaguiComponentState,\n TamaguiConfig,\n TamaguiElement,\n TamaguiInternalConfig,\n UseAnimationHook,\n UseAnimationProps,\n} from './types'\nimport { Slot } from './views/Slot.js'\nimport { useThemedChildren } from './views/Theme.js'\n\n// let t\n// import { timer } from '@tamagui/timer'\n// if (true || process.env.ANALYZE) {\n// t = require().timer()\n// setTimeout(() => {\n// const out = t.print()\n// if (isClient) {\n// alert(out)\n// }\n// }, 2000)\n// }\n\n// this appears to fix expo / babel not picking this up sometimes? really odd\nprocess.env.TAMAGUI_TARGET\n\nexport const defaultComponentState: TamaguiComponentState = {\n hover: false,\n press: false,\n pressIn: false,\n focus: false,\n unmounted: true,\n}\n\nconst defaultComponentStateMounted: TamaguiComponentState = {\n ...defaultComponentState,\n unmounted: false,\n}\n\n/**\n * All things that need one-time setup after createTamagui is called\n */\nlet tamaguiConfig: TamaguiInternalConfig\nlet AnimatedText: any\nlet AnimatedView: any\nlet initialTheme: any\n\nexport const mouseUps = new Set<Function>()\nif (typeof document !== 'undefined') {\n const cancelTouches = () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n }\n addEventListener('mouseup', cancelTouches)\n addEventListener('touchend', cancelTouches)\n addEventListener('touchcancel', cancelTouches)\n}\n\n// mutates\nfunction mergeShorthands(\n { defaultProps }: StaticConfigParsed,\n { shorthands }: TamaguiConfig\n) {\n // they are defined in correct order already { ...parent, ...child }\n for (const key of Object.keys(defaultProps)) {\n defaultProps[shorthands[key] || key] = defaultProps[key]\n }\n}\n\n/**\n * Only on native do we need the actual underlying View/Text\n * On the web we avoid react-native dep altogether.\n */\nlet BaseText: any\nlet BaseView: any\nlet hasSetupBaseViews = false\n\nexport function createComponent<\n ComponentPropTypes extends Object = {},\n Ref = TamaguiElement,\n BaseProps = never\n>(\n configIn: Partial<StaticConfig> | StaticConfigParsed,\n ParentComponent?: StylableComponent\n) {\n const staticConfig = (() => {\n const next = extendStaticConfig(configIn, ParentComponent)\n if ('parsed' in next) {\n return next\n } else {\n return parseStaticConfig(next)\n }\n })()\n\n const defaultComponentClassName = `is_${staticConfig.componentName}`\n let tamaguiDefaultProps: any\n let defaultTag: string | undefined\n\n // see onConfiguredOnce below which attaches a name then to this component\n const component = forwardRef<Ref, ComponentPropTypes>((propsIn: any, forwardedRef) => {\n if (process.env.TAMAGUI_TARGET === 'native') {\n // todo this could be moved to a cleaner location\n if (!hasSetupBaseViews) {\n hasSetupBaseViews = true\n const baseViews = hooks.getBaseViews?.()\n if (baseViews) {\n BaseText = baseViews.Text\n BaseView = baseViews.View\n }\n }\n }\n\n // test only\n if (process.env.NODE_ENV === 'test') {\n if (propsIn['data-test-renders']) {\n propsIn['data-test-renders']['current'] ??= 0\n propsIn['data-test-renders']['current'] += 1\n }\n }\n // const time = t.start({ quiet: true })\n\n // React inserts default props after your props for some reason...\n // order important so we do loops, you can't just spread because JS does weird things\n let props: any\n if (tamaguiDefaultProps && !propsIn.asChild) {\n props = mergeProps(tamaguiDefaultProps, propsIn)[0]\n } else {\n props = propsIn\n }\n\n const debugProp = props['debug'] as DebugProp\n const { Component, isText, isZStack } = staticConfig\n const componentName = props.componentName || staticConfig.componentName\n const componentClassName = props.asChild\n ? ''\n : props.componentName\n ? `is_${props.componentName}`\n : defaultComponentClassName\n\n /**\n * Component state for tracking animations, pseudos\n */\n const animationsConfig = tamaguiConfig.animations\n const useAnimations = animationsConfig?.useAnimations as UseAnimationHook | undefined\n const avoidClassesWhileAnimating = animationsConfig.isReactNative\n const hasEnterStyle = !!props.enterStyle\n const needsMount = Boolean(\n (isWeb ? isClient : true) && (hasEnterStyle || props.animation)\n )\n const states = useServerState<TamaguiComponentState>(\n needsMount ? defaultComponentState! : defaultComponentStateMounted!\n )\n\n const state = propsIn.forceStyle\n ? { ...states[0], [propsIn.forceStyle]: true }\n : states[0]\n const setState = states[1]\n const setStateShallow = useShallowSetState(setState, debugProp, componentName)\n\n // conditional but if ever true stays true\n // [animated, inversed]\n const stateRef = useRef(\n undefined as any as {\n hasAnimated?: boolean\n themeShallow?: boolean\n didAccessThemeVariableValue?: boolean\n }\n )\n stateRef.current ??= {}\n\n const isAnimated = (() => {\n const next = !!(\n !staticConfig.isHOC &&\n useAnimations &&\n (props.animation || (props.style && hasAnimatedStyleValue(props.style)))\n )\n if (next && !stateRef.current.hasAnimated) {\n stateRef.current.hasAnimated = true\n }\n return next || stateRef.current.hasAnimated\n })()\n\n const usePresence = tamaguiConfig.animations?.usePresence\n const presence = !isRSC && isAnimated ? usePresence() : null\n\n // set enter/exit variants onto our new props object\n if (isAnimated && presence) {\n const presenceState = presence[2]\n if (presenceState) {\n if (state.unmounted && presenceState.enterVariant) {\n props[presenceState.enterVariant] = true\n }\n if (!presenceState.isPresent && presenceState.exitVariant) {\n props[presenceState.exitVariant] = true\n }\n }\n }\n\n const isAnimatedReactNative = isAnimated && tamaguiConfig.animations.isReactNative\n const isReactNative = Boolean(staticConfig.isReactNative || isAnimatedReactNative)\n\n if (process.env.NODE_ENV === 'development') {\n if (debugProp) {\n // prettier-ignore\n const name = `${componentName || Component?.displayName || Component?.name || '[Unnamed Component]'}`\n const type = isAnimatedReactNative ? '(animated)' : isReactNative ? '(rnw)' : ''\n const dataIs = propsIn['data-is'] || ''\n const banner = `${name}${dataIs ? ` ${dataIs}` : ''} ${type}`\n console.group(`%c ${banner}`, 'background: yellow;')\n if (!isServer) {\n console.log('state', state)\n }\n }\n }\n\n const shouldAvoidClasses =\n !isWeb ||\n !!(props.animation && avoidClassesWhileAnimating) ||\n !staticConfig.acceptsClassName\n const shouldForcePseudo = !!propsIn.forceStyle\n const noClassNames = shouldAvoidClasses || shouldForcePseudo\n\n const themeState = useThemeWithState({\n name: props.theme,\n componentName,\n reset: props.reset,\n inverse: props.themeInverse,\n // @ts-expect-error\n disable: props['data-themeable'],\n debug: props.debug,\n shouldUpdate: () => !!stateRef.current.didAccessThemeVariableValue,\n })!\n\n const hasTextAncestor = !!(isWeb && isText ? useContext(TextAncestorContext) : false)\n const languageContext = isRSC ? null : useContext(FontLanguageContext)\n const isDisabled = props.disabled ?? props.accessibilityState?.disabled\n\n const isTaggable = !Component || typeof Component === 'string'\n // default to tag, fallback to component (when both strings)\n const element = isWeb\n ? isTaggable\n ? props.tag || defaultTag || Component\n : Component\n : Component\n\n const BaseTextComponent = BaseText || element || 'span'\n const BaseViewComponent = BaseView || element || (hasTextAncestor ? 'span' : 'div')\n let elementType = isText\n ? (isAnimated ? AnimatedText : null) || BaseTextComponent\n : (isAnimated ? AnimatedView : null) || BaseViewComponent\n\n elementType = Component || elementType\n const isStringElement = typeof elementType === 'string'\n\n const isExiting = presence?.[0] === false\n\n const mediaState = useMedia(\n // @ts-ignore, we just pass a stable object so we can get it later with\n // should match to the one used in `setMediaShouldUpdate` below\n stateRef,\n debugProp ? { props, staticConfig } : null\n )\n\n setDidGetVariableValue(false)\n\n const splitStyles = useSplitStyles(\n props,\n staticConfig,\n themeState.theme,\n {\n ...state,\n mediaState,\n noClassNames,\n dynamicStylesInline: noClassNames,\n hasTextAncestor,\n resolveVariablesAs: 'auto',\n isExiting,\n },\n null,\n languageContext || undefined,\n elementType,\n debugProp\n )\n\n // only listen for changes if we are using raw theme values or media space, or dynamic media (native)\n // array = space media breakpoints\n const isMediaSpaced = Array.isArray(splitStyles.hasMedia)\n const shouldListenForMedia =\n didGetVariableValue() ||\n isMediaSpaced ||\n (noClassNames && splitStyles.hasMedia === true)\n\n setMediaShouldUpdate(stateRef, {\n enabled: shouldListenForMedia,\n keys: noClassNames && isMediaSpaced ? (splitStyles.hasMedia as any) : null,\n })\n\n const hostRef = useServerRef<TamaguiElement>(null)\n\n // animation setup\n const isAnimatedReactNativeWeb = isAnimated && avoidClassesWhileAnimating\n\n if (process.env.NODE_ENV === 'development') {\n if (!process.env.TAMAGUI_TARGET) {\n console.error(\n `No process.env.TAMAGUI_TARGET set, please set it to \"native\" or \"web\".`\n )\n }\n\n if (debugProp) {\n console.groupCollapsed('props')\n // prettier-ignore\n console.log('props in', propsIn, 'mapped to', props, 'in order', Object.keys(props))\n console.log('splitStyles', splitStyles)\n // eslint-disable-next-line no-console\n console.log('shouldListenForMedia', shouldListenForMedia)\n // eslint-disable-next-line no-console\n console.log('className', Object.values(splitStyles.classNames))\n if (isClient) {\n console.log('ref', hostRef, '(click to view)')\n }\n console.groupEnd()\n if (debugProp === 'break') {\n // rome-ignore lint/suspicious/noDebugger: ok\n debugger\n }\n }\n }\n\n const {\n viewProps: viewPropsIn,\n pseudos,\n style: splitStylesStyle,\n classNames,\n space,\n } = splitStyles\n\n const propsWithAnimation = props as UseAnimationProps\n\n // once you set animation prop don't remove it, you can set to undefined/false\n // reason is animations are heavy - no way around it, and must be run inline here (\uD83D\uDE45 loading as a sub-component)\n let animationStyles: any\n if (!isRSC && isAnimated && useAnimations && !staticConfig.isHOC) {\n const animations = useAnimations({\n props: propsWithAnimation,\n style: splitStylesStyle,\n presence,\n state,\n pseudos: pseudos || null,\n onDidAnimate: props.onDidAnimate,\n hostRef,\n staticConfig,\n })\n if (animations) {\n animationStyles = animations.style\n }\n }\n\n const {\n asChild,\n children,\n onPress,\n onPressIn,\n onPressOut,\n onHoverIn,\n onHoverOut,\n themeShallow,\n spaceDirection: _spaceDirection,\n disabled: disabledProp,\n onMouseUp,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n separator,\n // ignore from here on out\n forceStyle: _forceStyle,\n // @ts-ignore for next/link compat etc\n onClick,\n theme: _themeProp,\n // @ts-ignore\n defaultVariants,\n\n ...nonTamaguiProps\n } = viewPropsIn\n\n const disabled = props.accessibilityState?.disabled || props.accessibilityDisabled\n\n // these can ultimately be for DOM, react-native-web views, or animated views\n // so the type is pretty loose\n let viewProps = nonTamaguiProps\n\n // if react-native-web view just pass all props down\n if (process.env.TAMAGUI_TARGET === 'web' && !isReactNative && !asChild) {\n viewProps = hooks.usePropsTransform?.(elementType, nonTamaguiProps, hostRef)\n } else {\n viewProps = nonTamaguiProps\n }\n\n viewProps.ref = useComposedRefs(hostRef as any, forwardedRef)\n\n if (process.env.NODE_ENV === 'development') {\n if (!isText && isWeb && !staticConfig.isHOC) {\n Children.toArray(props.children).forEach((item) => {\n // allow newlines because why not its annoying with mdx\n if (typeof item === 'string' && item !== '\\n') {\n console.error(\n `Unexpected text node: ${item}. A text node cannot be a child of a <View>.`\n )\n }\n })\n }\n }\n\n const unPress = useCallback(() => {\n setStateShallow({\n press: false,\n pressIn: false,\n })\n }, [setStateShallow])\n\n if (isWeb) {\n useEffect(() => {\n return () => {\n mouseUps.delete(unPress)\n }\n }, [])\n }\n\n const shouldSetMounted = needsMount && state.unmounted\n useEffect(() => {\n if (!shouldSetMounted) return\n if (state.unmounted === true && needsMount) {\n setStateShallow({\n unmounted: false,\n })\n return\n }\n\n setStateShallow({\n unmounted: false,\n })\n }, [shouldSetMounted, state.unmounted])\n\n let styles: Record<string, any>[]\n\n if (isStringElement && shouldAvoidClasses && !shouldForcePseudo) {\n styles = {\n ...(animationStyles ?? splitStylesStyle),\n }\n } else {\n styles = [animationStyles ?? splitStylesStyle]\n\n // ugly but for now...\n if (shouldForcePseudo) {\n const next = {}\n styles.forEach((style) => Object.assign(next, style))\n // @ts-ignore\n Object.assign(splitStyles.style, next)\n }\n }\n\n let fontFamily = isText\n ? splitStyles.fontFamily || staticConfig.defaultProps.fontFamily\n : null\n if (fontFamily && fontFamily[0] === '$') {\n fontFamily = fontFamily.slice(1)\n }\n const fontFamilyClassName = fontFamily ? `font_${fontFamily}` : ''\n\n const classList = [\n hasEnterStyle && ((state.unmounted && needsMount) || !isClient)\n ? 't_will-mount'\n : '',\n componentName ? componentClassName : '',\n fontFamilyClassName,\n classNames ? Object.values(classNames).join(' ') : '',\n ]\n\n const className = classList.join(' ')\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n const style = animationStyles ?? splitStyles.style\n\n if (isAnimatedReactNativeWeb) {\n viewProps.style = style\n } else if (isReactNative) {\n // TODO these shouldn't really return from getSplitStyles when in Native mode\n const cnStyles = { $$css: true }\n for (const name of className.split(' ')) {\n cnStyles[name] = name\n }\n viewProps.style = [...(Array.isArray(style) ? style : [style]), cnStyles]\n\n if (process.env.NODE_ENV === 'development') {\n // turn debug data- props into dataSet in dev mode\n Object.keys(viewProps).forEach((key) => {\n if (key.startsWith('data-')) {\n viewProps.dataSet ??= {}\n viewProps.dataSet[key.replace('data-', '')] = viewProps[key]\n delete viewProps[key]\n }\n })\n }\n } else {\n viewProps.className = className\n viewProps.style = style\n }\n }\n\n // TODO MOVE INTO HOOK\n if (process.env.TAMAGUI_TARGET === 'native') {\n // swap out the right family based on weight/style\n if (splitStyles.fontFamily) {\n const faceInfo = tamaguiConfig.fontsParsed[splitStyles.fontFamily]?.face\n if (faceInfo) {\n const [weight, style] = (() => {\n let weight: string | undefined\n let style: string | undefined\n for (let i = styles.length; i >= 0; i--) {\n weight ??= styles[i]?.fontWeight\n style ??= styles[i]?.fontStyle\n }\n return [weight || '400', style || 'normal'] as const\n })()\n const overrideFace = faceInfo[weight]?.[style]?.val\n if (overrideFace) {\n for (const style of styles) {\n if (style?.fontFamily) {\n style.fontFamily = overrideFace\n style.fontWeight = undefined\n style.fontStyle = undefined\n }\n }\n }\n }\n }\n\n // assign styles\n viewProps.style = styles\n }\n\n const runtimePressStyle = !disabled && noClassNames && pseudos?.pressStyle\n const attachPress = Boolean(\n runtimePressStyle || onPress || onPressOut || onPressIn || onClick\n )\n const runtimeHoverStyle = !disabled && noClassNames && pseudos?.hoverStyle\n const isHoverable =\n isWeb &&\n !!(runtimeHoverStyle || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave)\n\n const handlesPressEvents = !(isWeb || asChild)\n\n // check presence rather than value to prevent reparenting bugs\n // allows for onPress={x ? function : undefined} without re-ordering dom\n const shouldAttach = Boolean(\n attachPress ||\n isHoverable ||\n (noClassNames && 'pressStyle' in props) ||\n (isWeb && noClassNames && 'hoverStyle' in props)\n )\n\n const events: TamaguiComponentEvents | null =\n shouldAttach && !isRSC && !isDisabled && !asChild\n ? {\n onPressOut: attachPress\n ? (e) => {\n unPress()\n onPressOut?.(e)\n onMouseUp?.(e)\n }\n : undefined,\n ...(isHoverable && {\n onMouseEnter: isHoverable\n ? (e) => {\n const next: Partial<typeof state> = {}\n if (isHoverable) {\n next.hover = true\n }\n if (state.pressIn) {\n next.press = true\n }\n if (isHoverable || state.pressIn) {\n setStateShallow(next)\n }\n onHoverIn?.(e)\n onMouseEnter?.(e)\n }\n : undefined,\n onMouseLeave: isHoverable\n ? (e) => {\n const next: Partial<typeof state> = {}\n mouseUps.add(unPress)\n if (isHoverable) {\n next.hover = false\n }\n if (state.pressIn) {\n next.press = false\n next.pressIn = false\n }\n if (Object.keys(next).length) {\n setStateShallow(next)\n }\n onHoverOut?.(e)\n onMouseLeave?.(e)\n }\n : undefined,\n }),\n onPressIn: attachPress\n ? (e) => {\n setStateShallow({\n press: true,\n pressIn: true,\n hover: false,\n })\n onPressIn?.(e)\n onMouseDown?.(e)\n if (isWeb) {\n mouseUps.add(unPress)\n }\n }\n : undefined,\n onPress: attachPress\n ? (e) => {\n unPress()\n // @ts-ignore\n isWeb && onClick?.(e)\n onPress?.(e)\n }\n : undefined,\n }\n : null\n\n if (process.env.TAMAGUI_TARGET === 'native') {\n if (events) {\n // replicating TouchableWithoutFeedback\n Object.assign(events, {\n cancelable: !props.rejectResponderTermination,\n disabled: isDisabled,\n hitSlop: props.hitSlop,\n delayLongPress: props.delayLongPress,\n delayPressIn: props.delayPressIn,\n delayPressOut: props.delayPressOut,\n focusable: viewProps.focusable ?? true,\n minPressDuration: 0,\n })\n }\n }\n\n // EVENTS native\n hooks.useEvents?.(viewProps, events, splitStyles, setStateShallow)\n\n const shouldReset = !!(themeShallow && themeState.isNewTheme)\n if (shouldReset) {\n stateRef.current.themeShallow = true\n }\n\n let content =\n !children || asChild\n ? children\n : spacedChildren({\n separator,\n children,\n space,\n direction: props.spaceDirection || 'both',\n isZStack,\n debug: debugProp,\n })\n\n if (asChild) {\n elementType = Slot\n viewProps = {\n ...viewProps,\n onPress,\n onPressIn,\n onPressOut,\n }\n }\n\n content = createElement(elementType, viewProps, content)\n\n content = useThemedChildren(themeState, content, {\n shallow: stateRef.current.themeShallow,\n // passPropsToChildren: true,\n })\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n if (events || isAnimatedReactNativeWeb) {\n content = (\n <span\n className={`${isAnimatedReactNativeWeb ? className : ''} _dsp_contents`}\n {...(events && {\n onMouseEnter: events.onMouseEnter,\n onMouseLeave: events.onMouseLeave,\n onClick: events.onPress,\n onMouseDown: events.onPressIn,\n onMouseUp: events.onPressOut,\n onTouchStart: events.onPressIn,\n onTouchEnd: events.onPressOut,\n })}\n >\n {content}\n </span>\n )\n }\n }\n\n if (process.env.NODE_ENV === 'development' && process.env.DEBUG !== 'tamagui') {\n if (debugProp) {\n const element = typeof elementType === 'string' ? elementType : 'Component'\n console.groupCollapsed(`render <${element} /> with props`, viewProps)\n for (const key in viewProps) {\n console.log(key, viewProps[key])\n }\n console.log('children', content)\n console.groupEnd()\n if (typeof window !== 'undefined') {\n // prettier-ignore\n console.log({ state, themeState, isAnimated, isAnimatedReactNativeWeb, tamaguiDefaultProps, viewProps, splitStyles, animationStyles, handlesPressEvents, isStringElement, classNamesIn: props.className?.split(' '), classNamesOut: viewProps.className?.split(' '), events, shouldAttach, styles, pseudos, content, shouldAvoidClasses, avoidClasses: avoidClassesWhileAnimating, animation: props.animation, style: splitStylesStyle, staticConfig, tamaguiConfig, shouldForcePseudo, classNamesFull: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) })\n }\n console.groupEnd()\n }\n }\n\n return content\n })\n\n if (staticConfig.componentName) {\n component.displayName = staticConfig.componentName\n }\n\n onConfiguredOnce((conf) => {\n // one time only setup\n if (!tamaguiConfig) {\n tamaguiConfig = conf\n\n if (tamaguiConfig.animations) {\n AnimatedText = tamaguiConfig.animations.Text\n AnimatedView = tamaguiConfig.animations.View\n }\n\n if (!initialTheme) {\n const next = conf.themes[Object.keys(conf.themes)[0]]\n initialTheme = proxyThemeVariables(next)\n if (process.env.NODE_ENV === 'development') {\n if (!initialTheme) {\n console.log('Warning: Missing theme')\n }\n }\n }\n }\n\n // per-component setup\n // do this to make sure shorthands don't duplicate with.. longhands\n mergeShorthands(staticConfig, tamaguiConfig)\n\n let defaultPropsIn = staticConfig.defaultProps || {}\n\n // because we run createTamagui after styled() defs, have to do some work here\n // gather defaults props one time and merge downwards\n // find last unprocessed and process\n const parentNames = [...(staticConfig.parentNames || []), staticConfig.componentName]\n\n if (tamaguiConfig.defaultProps && parentNames && staticConfig.componentName) {\n defaultPropsIn = mergeConfigDefaultProps(\n staticConfig.componentName,\n defaultPropsIn,\n tamaguiConfig.defaultProps,\n parentNames,\n tamaguiConfig\n )\n }\n\n const debug = defaultPropsIn['debug']\n\n // remove all classNames\n const [ourProps, ourClassNames] = mergeProps(defaultPropsIn, {})\n\n if (ourProps.tag) {\n defaultTag = ourProps.tag\n }\n\n const noClassNames = !staticConfig.acceptsClassName\n const { name, variants, defaultVariants, ...restProps } = ourProps\n\n // must preserve prop order\n // leave out className because we handle that already with initialSplitStyles.classNames\n // otherwise it confuses variant functions getting className props\n const [defaults, defaultsClassnames] = mergeProps(component.defaultProps as any, {\n ...defaultVariants,\n ...restProps,\n })\n\n // split - keep variables on props to be processed using theme values at runtime (native)\n if (!isWeb) {\n for (const key in staticConfig.defaultProps) {\n const val = staticConfig.defaultProps[key]\n if (validPseudoKeys[key]) continue\n defaults[key] = val\n }\n }\n\n // set to global\n tamaguiDefaultProps = defaults\n\n // add debug logs\n if (process.env.NODE_ENV === 'development' && debug) {\n if (process.env.IS_STATIC !== 'is_static') {\n console.log(`\uD83D\uDC1B [${staticConfig.componentName || 'Component'}]`, {\n staticConfig,\n tamaguiDefaultProps,\n defaults,\n defaultPropsIn,\n defaultPropsKeyOrder: Object.keys(staticConfig.defaultProps),\n defaultPropsInKeyOrder: Object.keys(defaultPropsIn).map((k) => [\n k,\n defaultPropsIn[k],\n ]),\n ourProps,\n ourClassNames,\n defaultsClassnames,\n defaultTag,\n noClassNames,\n })\n }\n }\n })\n\n let res: TamaguiComponent<ComponentPropTypes, Ref, BaseProps> = component as any\n\n if (configIn.memo) {\n res = memo(res) as any\n }\n\n res.staticConfig = {\n validStyles: staticConfig.validStyles || stylePropsView,\n ...staticConfig,\n }\n\n // res.extractable HoC\n res.extractable = (Component: any, conf?: Partial<StaticConfig>) => {\n Component.staticConfig = extendStaticConfig(\n {\n Component,\n ...conf,\n neverFlatten: true,\n isHOC: true,\n defaultProps: {\n ...Component.defaultProps,\n ...conf?.defaultProps,\n },\n },\n res\n )\n return Component\n }\n\n return res\n}\n\n// for elements to avoid spacing\nexport const Unspaced = (props: { children?: any }) => props.children\nUnspaced['isUnspaced'] = true\n\n// dont used styled() here to avoid circular deps\n// keep inline to avoid circular deps\n\nexport const Spacer = createComponent<SpacerProps>({\n acceptsClassName: true,\n memo: true,\n componentName: 'Spacer',\n validStyles,\n\n defaultProps: {\n ...stackDefaultStyles,\n // avoid nesting issues\n tag: 'span',\n size: true,\n pointerEvents: 'none',\n },\n\n variants: {\n size: {\n '...size': (size, { tokens }) => {\n size = size === true ? '$true' : size\n const sizePx = tokens.space[size] ?? size\n return {\n width: sizePx,\n height: sizePx,\n minWidth: sizePx,\n minHeight: sizePx,\n }\n },\n },\n\n flex: {\n true: {\n flexGrow: 1,\n },\n },\n\n direction: {\n horizontal: {\n height: 0,\n minHeight: 0,\n },\n vertical: {\n width: 0,\n minWidth: 0,\n },\n both: {},\n },\n } as const,\n})\n\nexport type SpacedChildrenProps = {\n isZStack?: boolean\n children?: React.ReactNode\n space?: SpaceTokens | number | null\n spaceFlex?: boolean | number\n direction?: SpaceDirection\n separator?: React.ReactNode\n debug?: DebugProp\n}\n\nexport function spacedChildren(props: SpacedChildrenProps) {\n const { isZStack, children, space, direction, spaceFlex, separator } = props\n const hasSpace = !!(space || spaceFlex)\n const hasSeparator = !(separator === undefined || separator === null)\n if (!(hasSpace || hasSeparator || isZStack)) {\n return children\n }\n\n const childrenList = Children.toArray(children)\n\n const len = childrenList.length\n if (len <= 1 && !isZStack && !childrenList[0]?.['type']?.['shouldForwardSpace']) {\n return childrenList\n }\n\n const final: React.ReactNode[] = []\n for (let [index, child] of childrenList.entries()) {\n const isEmpty =\n child === null ||\n child === undefined ||\n (Array.isArray(child) && child.length === 0)\n\n // forward space\n if (!isEmpty && React.isValidElement(child) && child.type?.['shouldForwardSpace']) {\n child = React.cloneElement(child, {\n space,\n spaceFlex,\n separator,\n key: child.key,\n } as any)\n }\n\n // push them all, but wrap some in Fragment\n if (isEmpty || !child || (child['key'] && !isZStack)) {\n final.push(child)\n } else {\n final.push(\n <Fragment key={index}>\n {isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}\n </Fragment>\n )\n }\n\n // first child unspaced avoid insert space\n if (isUnspaced(child) && index === 0) continue\n // no spacing on ZStack\n if (isZStack) continue\n\n const next = childrenList[index + 1]\n\n if (next && !isUnspaced(next)) {\n if (separator) {\n if (hasSpace) {\n final.push(\n createSpacer({\n key: `_${index}_00tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n final.push(\n React.isValidElement(separator)\n ? React.cloneElement(separator, { key: `sep_${index}` })\n : separator\n )\n if (hasSpace) {\n final.push(\n createSpacer({\n key: `_${index}01tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n } else {\n final.push(\n createSpacer({\n key: `_${index}02tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (props.debug) {\n console.log(` Spaced children`, final, props)\n }\n }\n\n return final\n}\n\ntype CreateSpacerProps = SpacedChildrenProps & { key: string }\n\nfunction createSpacer({ key, direction, space, spaceFlex }: CreateSpacerProps) {\n return (\n <Spacer\n key={key}\n size={space}\n direction={direction}\n {...(typeof spaceFlex !== 'undefined' && {\n flex: spaceFlex === true ? 1 : spaceFlex === false ? 0 : spaceFlex,\n })}\n />\n )\n}\n\nfunction isUnspaced(child: React.ReactNode) {\n const t = child?.['type']\n return t?.['isVisuallyHidden'] || t?.['isUnspaced']\n}\n\nconst DefaultProps = new Map()\n\nfunction mergeConfigDefaultProps(\n name: string,\n props: Record<string, any>,\n configDefaults: Record<string, Object>,\n parentNames: (string | undefined)[],\n conf: TamaguiInternalConfig\n) {\n const len = parentNames.length\n let prev\n\n for (let i = 0; i < len; i++) {\n const n = parentNames[i]\n if (!n) continue\n if (DefaultProps.has(n)) {\n prev = DefaultProps.get(n)\n continue\n }\n const props = configDefaults[n]\n if (!props) {\n if (prev) {\n DefaultProps.set(n, prev)\n }\n continue\n }\n prev = mergeProps(prev || {}, props, false, conf.inverseShorthands)[0]\n DefaultProps.set(n, prev)\n }\n\n // overwrite the user defined defaults on top of internal defined defaults\n const ourDefaultsMerged = DefaultProps.get(name)\n if (ourDefaultsMerged) {\n return mergeProps(props, ourDefaultsMerged, false, conf.inverseShorthands)[0]\n }\n return props\n}\n\nconst AbsoluteFill: any = createComponent({\n defaultProps: {\n ...stackDefaultStyles,\n flexDirection: 'column',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n pointerEvents: 'box-none',\n },\n})\n\nfunction hasAnimatedStyleValue(style: Object) {\n return Object.keys(style).some((k) => {\n const val = style[k]\n return val && typeof val === 'object' && '_animation' in val\n })\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAutBU;AAvtBV,0BAAgC;AAChC,uBAAiD;AACjD,qBAA6D;AAC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er, isWeb } from '@tamagui/constants'\nimport { stylePropsView, validPseudoKeys, validStyles } from '@tamagui/helpers'\nimport React, {\n Children,\n Fragment,\n createElement,\n forwardRef,\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from 'react'\n\nimport { onConfiguredOnce } from './config.js'\nimport { stackDefaultStyles } from './constants/constants.js'\nimport { FontLanguageContext } from './contexts/FontLanguageContext.js'\nimport { TextAncestorContext } from './contexts/TextAncestorContext.js'\nimport { didGetVariableValue, setDidGetVariableValue } from './createVariable.js'\nimport { extendStaticConfig, parseStaticConfig } from './helpers/extendStaticConfig.js'\nimport { useSplitStyles } from './helpers/getSplitStyles.js'\nimport { getAllSelectors } from './helpers/insertStyleRule.js'\nimport { mergeProps } from './helpers/mergeProps.js'\nimport { proxyThemeVariables } from './helpers/proxyThemeVariables.js'\nimport { useShallowSetState } from './helpers/useShallowSetState.js'\nimport { useAnimationDriver } from './hooks/useAnimationDriver.js'\nimport { setMediaShouldUpdate, useMedia } from './hooks/useMedia.js'\nimport { useServerRef, useServerState } from './hooks/useServerHooks.js'\nimport { useThemeWithState } from './hooks/useTheme.js'\nimport { hooks } from './setupHooks.js'\nimport {\n DebugProp,\n SpaceDirection,\n SpaceTokens,\n SpacerProps,\n StaticConfig,\n StaticConfigParsed,\n StylableComponent,\n TamaguiComponent,\n TamaguiComponentEvents,\n TamaguiComponentState,\n TamaguiConfig,\n TamaguiElement,\n TamaguiInternalConfig,\n UseAnimationHook,\n UseAnimationProps,\n} from './types'\nimport { Slot } from './views/Slot.js'\nimport { Stack } from './views/Stack.js'\nimport { Text } from './views/Text.js'\nimport { useThemedChildren } from './views/Theme.js'\n\n// let t\n// import { timer } from '@tamagui/timer'\n// if (true || process.env.ANALYZE) {\n// t = require().timer()\n// setTimeout(() => {\n// const out = t.print()\n// if (isClient) {\n// alert(out)\n// }\n// }, 2000)\n// }\n\n// this appears to fix expo / babel not picking this up sometimes? really odd\nprocess.env.TAMAGUI_TARGET\n\nexport const defaultComponentState: TamaguiComponentState = {\n hover: false,\n press: false,\n pressIn: false,\n focus: false,\n unmounted: true,\n}\n\nconst defaultComponentStateMounted: TamaguiComponentState = {\n ...defaultComponentState,\n unmounted: false,\n}\n\n/**\n * All things that need one-time setup after createTamagui is called\n */\nlet tamaguiConfig: TamaguiInternalConfig\nlet AnimatedText: any\nlet AnimatedView: any\nlet initialTheme: any\n\nexport const mouseUps = new Set<Function>()\nif (typeof document !== 'undefined') {\n const cancelTouches = () => {\n mouseUps.forEach((x) => x())\n mouseUps.clear()\n }\n addEventListener('mouseup', cancelTouches)\n addEventListener('touchend', cancelTouches)\n addEventListener('touchcancel', cancelTouches)\n}\n\n// mutates\nfunction mergeShorthands(\n { defaultProps }: StaticConfigParsed,\n { shorthands }: TamaguiConfig\n) {\n // they are defined in correct order already { ...parent, ...child }\n for (const key of Object.keys(defaultProps)) {\n defaultProps[shorthands[key] || key] = defaultProps[key]\n }\n}\n\n/**\n * Only on native do we need the actual underlying View/Text\n * On the web we avoid react-native dep altogether.\n */\nlet BaseText: any\nlet BaseView: any\nlet hasSetupBaseViews = false\n\nexport function createComponent<\n ComponentPropTypes extends Object = {},\n Ref = TamaguiElement,\n BaseProps = never\n>(\n configIn: Partial<StaticConfig> | StaticConfigParsed,\n ParentComponent?: StylableComponent\n) {\n const staticConfig = (() => {\n const next = extendStaticConfig(configIn, ParentComponent)\n if ('parsed' in next) {\n return next\n } else {\n return parseStaticConfig(next)\n }\n })()\n\n const defaultComponentClassName = `is_${staticConfig.componentName}`\n let tamaguiDefaultProps: any\n let defaultTag: string | undefined\n\n // see onConfiguredOnce below which attaches a name then to this component\n const component = forwardRef<Ref, ComponentPropTypes>((propsIn: any, forwardedRef) => {\n if (process.env.TAMAGUI_TARGET === 'native') {\n // todo this could be moved to a cleaner location\n if (!hasSetupBaseViews) {\n hasSetupBaseViews = true\n const baseViews = hooks.getBaseViews?.()\n if (baseViews) {\n BaseText = baseViews.Text\n BaseView = baseViews.View\n }\n }\n }\n\n // test only\n if (process.env.NODE_ENV === 'test') {\n if (propsIn['data-test-renders']) {\n propsIn['data-test-renders']['current'] ??= 0\n propsIn['data-test-renders']['current'] += 1\n }\n }\n // const time = t.start({ quiet: true })\n\n // React inserts default props after your props for some reason...\n // order important so we do loops, you can't just spread because JS does weird things\n let props: any\n if (tamaguiDefaultProps && !propsIn.asChild) {\n props = mergeProps(tamaguiDefaultProps, propsIn)[0]\n } else {\n props = propsIn\n }\n\n const debugProp = props['debug'] as DebugProp\n const { Component, isText, isZStack } = staticConfig\n const componentName = props.componentName || staticConfig.componentName\n\n // conditional but if ever true stays true\n // [animated, inversed]\n const stateRef = useRef(\n undefined as any as {\n hasAnimated?: boolean\n themeShallow?: boolean\n didAccessThemeVariableValue?: boolean\n }\n )\n stateRef.current ??= {}\n\n /**\n * Component state for tracking animations, pseudos\n */\n const animationsConfig = useAnimationDriver()\n const useAnimations = animationsConfig?.useAnimations as UseAnimationHook | undefined\n const isAnimated = (() => {\n const next = !!(\n !staticConfig.isHOC &&\n useAnimations &&\n (props.animation || (props.style && hasAnimatedStyleValue(props.style)))\n )\n if (next && !stateRef.current.hasAnimated) {\n stateRef.current.hasAnimated = true\n }\n return next || stateRef.current.hasAnimated\n })()\n const componentClassName = props.asChild\n ? ''\n : props.componentName\n ? `is_${props.componentName}`\n : defaultComponentClassName\n const hasTextAncestor = !!(isWeb && isText ? useContext(TextAncestorContext) : false)\n const languageContext = isRSC ? null : useContext(FontLanguageContext)\n const isDisabled = props.disabled ?? props.accessibilityState?.disabled\n\n const isTaggable = !Component || typeof Component === 'string'\n // default to tag, fallback to component (when both strings)\n const element = isWeb\n ? isTaggable\n ? props.tag || defaultTag || Component\n : Component\n : Component\n\n const BaseTextComponent = BaseText || element || 'span'\n const BaseViewComponent = BaseView || element || (hasTextAncestor ? 'span' : 'div')\n\n AnimatedText = animationsConfig ? animationsConfig.Text : BaseTextComponent\n AnimatedView = animationsConfig ? animationsConfig.View : BaseViewComponent\n\n let elementType = isText\n ? (isAnimated ? AnimatedText : null) || BaseTextComponent\n : (isAnimated ? AnimatedView : null) || BaseViewComponent\n\n const avoidClassesWhileAnimating = animationsConfig?.isReactNative\n const hasEnterStyle = !!props.enterStyle\n const needsMount = Boolean(\n (isWeb ? isClient : true) && (hasEnterStyle || props.animation)\n )\n const states = useServerState<TamaguiComponentState>(\n needsMount ? defaultComponentState! : defaultComponentStateMounted!\n )\n\n const state = propsIn.forceStyle\n ? { ...states[0], [propsIn.forceStyle]: true }\n : states[0]\n const setState = states[1]\n const setStateShallow = useShallowSetState(setState, debugProp, componentName)\n\n const usePresence = animationsConfig?.usePresence\n const presence = !isRSC && isAnimated && usePresence ? usePresence() : null\n\n // set enter/exit variants onto our new props object\n if (isAnimated && presence) {\n const presenceState = presence[2]\n if (presenceState) {\n if (state.unmounted && presenceState.enterVariant) {\n props[presenceState.enterVariant] = true\n }\n if (!presenceState.isPresent && presenceState.exitVariant) {\n props[presenceState.exitVariant] = true\n }\n }\n }\n\n const isAnimatedReactNative = isAnimated && animationsConfig?.isReactNative\n const isReactNative = Boolean(staticConfig.isReactNative || isAnimatedReactNative)\n\n if (process.env.NODE_ENV === 'development') {\n if (debugProp) {\n // prettier-ignore\n const name = `${componentName || Component?.displayName || Component?.name || '[Unnamed Component]'}`\n const type = isAnimatedReactNative ? '(animated)' : isReactNative ? '(rnw)' : ''\n const dataIs = propsIn['data-is'] || ''\n const banner = `${name}${dataIs ? ` ${dataIs}` : ''} ${type}`\n console.group(`%c ${banner}`, 'background: yellow;')\n if (!isServer) {\n console.log('state', state)\n }\n }\n }\n\n const shouldAvoidClasses =\n !isWeb ||\n !!(props.animation && avoidClassesWhileAnimating) ||\n !staticConfig.acceptsClassName\n const shouldForcePseudo = !!propsIn.forceStyle\n const noClassNames = shouldAvoidClasses || shouldForcePseudo\n\n const themeState = useThemeWithState({\n name: props.theme,\n componentName,\n reset: props.reset,\n inverse: props.themeInverse,\n // @ts-expect-error\n disable: props['data-themeable'],\n debug: props.debug,\n shouldUpdate: () => !!stateRef.current.didAccessThemeVariableValue,\n })!\n\n elementType = Component || elementType\n const isStringElement = typeof elementType === 'string'\n\n const isExiting = presence?.[0] === false\n\n const mediaState = useMedia(\n // @ts-ignore, we just pass a stable object so we can get it later with\n // should match to the one used in `setMediaShouldUpdate` below\n stateRef,\n debugProp ? { props, staticConfig } : null\n )\n\n setDidGetVariableValue(false)\n\n const splitStyles = useSplitStyles(\n props,\n staticConfig,\n themeState.theme,\n {\n ...state,\n mediaState,\n noClassNames,\n dynamicStylesInline: noClassNames,\n hasTextAncestor,\n resolveVariablesAs: 'auto',\n isExiting,\n },\n null,\n languageContext || undefined,\n elementType,\n debugProp\n )\n\n // only listen for changes if we are using raw theme values or media space, or dynamic media (native)\n // array = space media breakpoints\n const isMediaSpaced = Array.isArray(splitStyles.hasMedia)\n const shouldListenForMedia =\n didGetVariableValue() ||\n isMediaSpaced ||\n (noClassNames && splitStyles.hasMedia === true)\n\n setMediaShouldUpdate(stateRef, {\n enabled: shouldListenForMedia,\n keys: noClassNames && isMediaSpaced ? (splitStyles.hasMedia as any) : null,\n })\n\n const hostRef = useServerRef<TamaguiElement>(null)\n\n // animation setup\n const isAnimatedReactNativeWeb = isAnimated && avoidClassesWhileAnimating\n\n if (process.env.NODE_ENV === 'development') {\n if (!process.env.TAMAGUI_TARGET) {\n console.error(\n `No process.env.TAMAGUI_TARGET set, please set it to \"native\" or \"web\".`\n )\n }\n\n if (debugProp) {\n console.groupCollapsed('props')\n // prettier-ignore\n console.log('props in', propsIn, 'mapped to', props, 'in order', Object.keys(props))\n console.log('splitStyles', splitStyles)\n // eslint-disable-next-line no-console\n console.log('shouldListenForMedia', shouldListenForMedia)\n // eslint-disable-next-line no-console\n console.log('className', Object.values(splitStyles.classNames))\n if (isClient) {\n console.log('ref', hostRef, '(click to view)')\n }\n console.groupEnd()\n if (debugProp === 'break') {\n // rome-ignore lint/suspicious/noDebugger: ok\n debugger\n }\n }\n }\n\n const {\n viewProps: viewPropsIn,\n pseudos,\n style: splitStylesStyle,\n classNames,\n space,\n } = splitStyles\n\n const propsWithAnimation = props as UseAnimationProps\n\n // once you set animation prop don't remove it, you can set to undefined/false\n // reason is animations are heavy - no way around it, and must be run inline here (\uD83D\uDE45 loading as a sub-component)\n let animationStyles: any\n if (!isRSC && isAnimated && useAnimations && !staticConfig.isHOC) {\n const animations = useAnimations({\n props: propsWithAnimation,\n style: splitStylesStyle,\n presence,\n state,\n pseudos: pseudos || null,\n onDidAnimate: props.onDidAnimate,\n hostRef,\n staticConfig,\n })\n if (animations) {\n animationStyles = animations.style\n }\n }\n\n const {\n asChild,\n children,\n onPress,\n onPressIn,\n onPressOut,\n onHoverIn,\n onHoverOut,\n themeShallow,\n spaceDirection: _spaceDirection,\n disabled: disabledProp,\n onMouseUp,\n onMouseDown,\n onMouseEnter,\n onMouseLeave,\n separator,\n // ignore from here on out\n forceStyle: _forceStyle,\n // @ts-ignore for next/link compat etc\n onClick,\n theme: _themeProp,\n // @ts-ignore\n defaultVariants,\n\n ...nonTamaguiProps\n } = viewPropsIn\n\n const disabled = props.accessibilityState?.disabled || props.accessibilityDisabled\n\n // these can ultimately be for DOM, react-native-web views, or animated views\n // so the type is pretty loose\n let viewProps = nonTamaguiProps\n\n // if react-native-web view just pass all props down\n if (process.env.TAMAGUI_TARGET === 'web' && !isReactNative && !asChild) {\n viewProps = hooks.usePropsTransform?.(elementType, nonTamaguiProps, hostRef)\n } else {\n viewProps = nonTamaguiProps\n }\n\n viewProps.ref = useComposedRefs(hostRef as any, forwardedRef)\n\n if (process.env.NODE_ENV === 'development') {\n if (!isText && isWeb && !staticConfig.isHOC) {\n Children.toArray(props.children).forEach((item) => {\n // allow newlines because why not its annoying with mdx\n if (typeof item === 'string' && item !== '\\n') {\n console.error(\n `Unexpected text node: ${item}. A text node cannot be a child of a <View>.`\n )\n }\n })\n }\n }\n\n const unPress = useCallback(() => {\n setStateShallow({\n press: false,\n pressIn: false,\n })\n }, [setStateShallow])\n\n if (isWeb) {\n useEffect(() => {\n return () => {\n mouseUps.delete(unPress)\n }\n }, [])\n }\n\n const shouldSetMounted = needsMount && state.unmounted\n useEffect(() => {\n if (!shouldSetMounted) return\n if (state.unmounted === true && needsMount) {\n setStateShallow({\n unmounted: false,\n })\n return\n }\n\n setStateShallow({\n unmounted: false,\n })\n }, [shouldSetMounted, state.unmounted])\n\n let styles: Record<string, any>[]\n\n if (isStringElement && shouldAvoidClasses && !shouldForcePseudo) {\n styles = {\n ...(animationStyles ?? splitStylesStyle),\n }\n } else {\n styles = [animationStyles ?? splitStylesStyle]\n\n // ugly but for now...\n if (shouldForcePseudo) {\n const next = {}\n styles.forEach((style) => Object.assign(next, style))\n // @ts-ignore\n Object.assign(splitStyles.style, next)\n }\n }\n\n let fontFamily = isText\n ? splitStyles.fontFamily || staticConfig.defaultProps.fontFamily\n : null\n if (fontFamily && fontFamily[0] === '$') {\n fontFamily = fontFamily.slice(1)\n }\n const fontFamilyClassName = fontFamily ? `font_${fontFamily}` : ''\n\n const classList = [\n hasEnterStyle && ((state.unmounted && needsMount) || !isClient)\n ? 't_will-mount'\n : '',\n componentName ? componentClassName : '',\n fontFamilyClassName,\n classNames ? Object.values(classNames).join(' ') : '',\n ]\n\n const className = classList.join(' ')\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n const style = animationStyles ?? splitStyles.style\n\n if (isAnimatedReactNativeWeb) {\n viewProps.style = style\n } else if (isReactNative) {\n // TODO these shouldn't really return from getSplitStyles when in Native mode\n const cnStyles = { $$css: true }\n for (const name of className.split(' ')) {\n cnStyles[name] = name\n }\n viewProps.style = [...(Array.isArray(style) ? style : [style]), cnStyles]\n\n if (process.env.NODE_ENV === 'development') {\n // turn debug data- props into dataSet in dev mode\n Object.keys(viewProps).forEach((key) => {\n if (key.startsWith('data-')) {\n viewProps.dataSet ??= {}\n viewProps.dataSet[key.replace('data-', '')] = viewProps[key]\n delete viewProps[key]\n }\n })\n }\n } else {\n viewProps.className = className\n viewProps.style = style\n }\n }\n\n // TODO MOVE INTO HOOK\n if (process.env.TAMAGUI_TARGET === 'native') {\n // swap out the right family based on weight/style\n if (splitStyles.fontFamily) {\n const faceInfo = tamaguiConfig.fontsParsed[splitStyles.fontFamily]?.face\n if (faceInfo) {\n const [weight, style] = (() => {\n let weight: string | undefined\n let style: string | undefined\n for (let i = styles.length; i >= 0; i--) {\n weight ??= styles[i]?.fontWeight\n style ??= styles[i]?.fontStyle\n }\n return [weight || '400', style || 'normal'] as const\n })()\n const overrideFace = faceInfo[weight]?.[style]?.val\n if (overrideFace) {\n for (const style of styles) {\n if (style?.fontFamily) {\n style.fontFamily = overrideFace\n style.fontWeight = undefined\n style.fontStyle = undefined\n }\n }\n }\n }\n }\n\n // assign styles\n viewProps.style = styles\n }\n\n const runtimePressStyle = !disabled && noClassNames && pseudos?.pressStyle\n const attachPress = Boolean(\n runtimePressStyle || onPress || onPressOut || onPressIn || onClick\n )\n const runtimeHoverStyle = !disabled && noClassNames && pseudos?.hoverStyle\n const isHoverable =\n isWeb &&\n !!(runtimeHoverStyle || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave)\n\n const handlesPressEvents = !(isWeb || asChild)\n\n // check presence rather than value to prevent reparenting bugs\n // allows for onPress={x ? function : undefined} without re-ordering dom\n const shouldAttach = Boolean(\n attachPress ||\n isHoverable ||\n (noClassNames && 'pressStyle' in props) ||\n (isWeb && noClassNames && 'hoverStyle' in props)\n )\n\n const events: TamaguiComponentEvents | null =\n shouldAttach && !isRSC && !isDisabled && !asChild\n ? {\n onPressOut: attachPress\n ? (e) => {\n unPress()\n onPressOut?.(e)\n onMouseUp?.(e)\n }\n : undefined,\n ...(isHoverable && {\n onMouseEnter: isHoverable\n ? (e) => {\n const next: Partial<typeof state> = {}\n if (isHoverable) {\n next.hover = true\n }\n if (state.pressIn) {\n next.press = true\n }\n if (isHoverable || state.pressIn) {\n setStateShallow(next)\n }\n onHoverIn?.(e)\n onMouseEnter?.(e)\n }\n : undefined,\n onMouseLeave: isHoverable\n ? (e) => {\n const next: Partial<typeof state> = {}\n mouseUps.add(unPress)\n if (isHoverable) {\n next.hover = false\n }\n if (state.pressIn) {\n next.press = false\n next.pressIn = false\n }\n if (Object.keys(next).length) {\n setStateShallow(next)\n }\n onHoverOut?.(e)\n onMouseLeave?.(e)\n }\n : undefined,\n }),\n onPressIn: attachPress\n ? (e) => {\n setStateShallow({\n press: true,\n pressIn: true,\n hover: false,\n })\n onPressIn?.(e)\n onMouseDown?.(e)\n if (isWeb) {\n mouseUps.add(unPress)\n }\n }\n : undefined,\n onPress: attachPress\n ? (e) => {\n unPress()\n // @ts-ignore\n isWeb && onClick?.(e)\n onPress?.(e)\n }\n : undefined,\n }\n : null\n\n if (process.env.TAMAGUI_TARGET === 'native') {\n if (events) {\n // replicating TouchableWithoutFeedback\n Object.assign(events, {\n cancelable: !props.rejectResponderTermination,\n disabled: isDisabled,\n hitSlop: props.hitSlop,\n delayLongPress: props.delayLongPress,\n delayPressIn: props.delayPressIn,\n delayPressOut: props.delayPressOut,\n focusable: viewProps.focusable ?? true,\n minPressDuration: 0,\n })\n }\n }\n\n // EVENTS native\n hooks.useEvents?.(viewProps, events, splitStyles, setStateShallow)\n\n const shouldReset = !!(themeShallow && themeState.isNewTheme)\n if (shouldReset) {\n stateRef.current.themeShallow = true\n }\n\n let content =\n !children || asChild\n ? children\n : spacedChildren({\n separator,\n children,\n space,\n direction: props.spaceDirection || 'both',\n isZStack,\n debug: debugProp,\n })\n\n if (asChild) {\n elementType = Slot\n viewProps = {\n ...viewProps,\n onPress,\n onPressIn,\n onPressOut,\n }\n }\n\n content = createElement(elementType, viewProps, content)\n\n content = useThemedChildren(themeState, content, {\n shallow: stateRef.current.themeShallow,\n // passPropsToChildren: true,\n })\n\n if (process.env.TAMAGUI_TARGET === 'web') {\n if (events || isAnimatedReactNativeWeb) {\n content = (\n <span\n className={`${isAnimatedReactNativeWeb ? className : ''} _dsp_contents`}\n {...(events && {\n onMouseEnter: events.onMouseEnter,\n onMouseLeave: events.onMouseLeave,\n onClick: events.onPress,\n onMouseDown: events.onPressIn,\n onMouseUp: events.onPressOut,\n onTouchStart: events.onPressIn,\n onTouchEnd: events.onPressOut,\n })}\n >\n {content}\n </span>\n )\n }\n }\n\n if (process.env.NODE_ENV === 'development' && process.env.DEBUG !== 'tamagui') {\n if (debugProp) {\n const element = typeof elementType === 'string' ? elementType : 'Component'\n console.groupCollapsed(`render <${element} /> with props`, viewProps)\n for (const key in viewProps) {\n console.log(key, viewProps[key])\n }\n console.log('children', content)\n console.groupEnd()\n if (typeof window !== 'undefined') {\n // prettier-ignore\n console.log({ state, themeState, isAnimated, isAnimatedReactNativeWeb, tamaguiDefaultProps, viewProps, splitStyles, animationStyles, handlesPressEvents, isStringElement, classNamesIn: props.className?.split(' '), classNamesOut: viewProps.className?.split(' '), events, shouldAttach, styles, pseudos, content, shouldAvoidClasses, avoidClasses: avoidClassesWhileAnimating, animation: props.animation, style: splitStylesStyle, staticConfig, tamaguiConfig, shouldForcePseudo, classNamesFull: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) })\n }\n console.groupEnd()\n }\n }\n\n return content\n })\n\n if (staticConfig.componentName) {\n component.displayName = staticConfig.componentName\n }\n\n onConfiguredOnce((conf) => {\n // one time only setup\n if (!tamaguiConfig) {\n tamaguiConfig = conf\n\n if (!initialTheme) {\n const next = conf.themes[Object.keys(conf.themes)[0]]\n initialTheme = proxyThemeVariables(next)\n if (process.env.NODE_ENV === 'development') {\n if (!initialTheme) {\n console.log('Warning: Missing theme')\n }\n }\n }\n }\n\n // per-component setup\n // do this to make sure shorthands don't duplicate with.. longhands\n mergeShorthands(staticConfig, tamaguiConfig)\n\n let defaultPropsIn = staticConfig.defaultProps || {}\n\n // because we run createTamagui after styled() defs, have to do some work here\n // gather defaults props one time and merge downwards\n // find last unprocessed and process\n const parentNames = [...(staticConfig.parentNames || []), staticConfig.componentName]\n\n if (tamaguiConfig.defaultProps && parentNames && staticConfig.componentName) {\n defaultPropsIn = mergeConfigDefaultProps(\n staticConfig.componentName,\n defaultPropsIn,\n tamaguiConfig.defaultProps,\n parentNames,\n tamaguiConfig\n )\n }\n\n const debug = defaultPropsIn['debug']\n\n // remove all classNames\n const [ourProps, ourClassNames] = mergeProps(defaultPropsIn, {})\n\n if (ourProps.tag) {\n defaultTag = ourProps.tag\n }\n\n const noClassNames = !staticConfig.acceptsClassName\n const { name, variants, defaultVariants, ...restProps } = ourProps\n\n // must preserve prop order\n // leave out className because we handle that already with initialSplitStyles.classNames\n // otherwise it confuses variant functions getting className props\n const [defaults, defaultsClassnames] = mergeProps(component.defaultProps as any, {\n ...defaultVariants,\n ...restProps,\n })\n\n // split - keep variables on props to be processed using theme values at runtime (native)\n if (!isWeb) {\n for (const key in staticConfig.defaultProps) {\n const val = staticConfig.defaultProps[key]\n if (validPseudoKeys[key]) continue\n defaults[key] = val\n }\n }\n\n // set to global\n tamaguiDefaultProps = defaults\n\n // add debug logs\n if (process.env.NODE_ENV === 'development' && debug) {\n if (process.env.IS_STATIC !== 'is_static') {\n console.log(`\uD83D\uDC1B [${staticConfig.componentName || 'Component'}]`, {\n staticConfig,\n tamaguiDefaultProps,\n defaults,\n defaultPropsIn,\n defaultPropsKeyOrder: Object.keys(staticConfig.defaultProps),\n defaultPropsInKeyOrder: Object.keys(defaultPropsIn).map((k) => [\n k,\n defaultPropsIn[k],\n ]),\n ourProps,\n ourClassNames,\n defaultsClassnames,\n defaultTag,\n noClassNames,\n })\n }\n }\n })\n\n let res: TamaguiComponent<ComponentPropTypes, Ref, BaseProps> = component as any\n\n if (configIn.memo) {\n res = memo(res) as any\n }\n\n res.staticConfig = {\n validStyles: staticConfig.validStyles || stylePropsView,\n ...staticConfig,\n }\n\n // res.extractable HoC\n res.extractable = (Component: any, conf?: Partial<StaticConfig>) => {\n Component.staticConfig = extendStaticConfig(\n {\n Component,\n ...conf,\n neverFlatten: true,\n isHOC: true,\n defaultProps: {\n ...Component.defaultProps,\n ...conf?.defaultProps,\n },\n },\n res\n )\n return Component\n }\n\n return res\n}\n\n// for elements to avoid spacing\nexport const Unspaced = (props: { children?: any }) => props.children\nUnspaced['isUnspaced'] = true\n\n// dont used styled() here to avoid circular deps\n// keep inline to avoid circular deps\n\nexport const Spacer = createComponent<SpacerProps>({\n acceptsClassName: true,\n memo: true,\n componentName: 'Spacer',\n validStyles,\n\n defaultProps: {\n ...stackDefaultStyles,\n // avoid nesting issues\n tag: 'span',\n size: true,\n pointerEvents: 'none',\n },\n\n variants: {\n size: {\n '...size': (size, { tokens }) => {\n size = size === true ? '$true' : size\n const sizePx = tokens.space[size] ?? size\n return {\n width: sizePx,\n height: sizePx,\n minWidth: sizePx,\n minHeight: sizePx,\n }\n },\n },\n\n flex: {\n true: {\n flexGrow: 1,\n },\n },\n\n direction: {\n horizontal: {\n height: 0,\n minHeight: 0,\n },\n vertical: {\n width: 0,\n minWidth: 0,\n },\n both: {},\n },\n } as const,\n})\n\nexport type SpacedChildrenProps = {\n isZStack?: boolean\n children?: React.ReactNode\n space?: SpaceTokens | number | null\n spaceFlex?: boolean | number\n direction?: SpaceDirection\n separator?: React.ReactNode\n debug?: DebugProp\n}\n\nexport function spacedChildren(props: SpacedChildrenProps) {\n const { isZStack, children, space, direction, spaceFlex, separator } = props\n const hasSpace = !!(space || spaceFlex)\n const hasSeparator = !(separator === undefined || separator === null)\n if (!(hasSpace || hasSeparator || isZStack)) {\n return children\n }\n\n const childrenList = Children.toArray(children)\n\n const len = childrenList.length\n if (len <= 1 && !isZStack && !childrenList[0]?.['type']?.['shouldForwardSpace']) {\n return childrenList\n }\n\n const final: React.ReactNode[] = []\n for (let [index, child] of childrenList.entries()) {\n const isEmpty =\n child === null ||\n child === undefined ||\n (Array.isArray(child) && child.length === 0)\n\n // forward space\n if (!isEmpty && React.isValidElement(child) && child.type?.['shouldForwardSpace']) {\n child = React.cloneElement(child, {\n space,\n spaceFlex,\n separator,\n key: child.key,\n } as any)\n }\n\n // push them all, but wrap some in Fragment\n if (isEmpty || !child || (child['key'] && !isZStack)) {\n final.push(child)\n } else {\n final.push(\n <Fragment key={index}>\n {isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}\n </Fragment>\n )\n }\n\n // first child unspaced avoid insert space\n if (isUnspaced(child) && index === 0) continue\n // no spacing on ZStack\n if (isZStack) continue\n\n const next = childrenList[index + 1]\n\n if (next && !isUnspaced(next)) {\n if (separator) {\n if (hasSpace) {\n final.push(\n createSpacer({\n key: `_${index}_00tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n final.push(\n React.isValidElement(separator)\n ? React.cloneElement(separator, { key: `sep_${index}` })\n : separator\n )\n if (hasSpace) {\n final.push(\n createSpacer({\n key: `_${index}01tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n } else {\n final.push(\n createSpacer({\n key: `_${index}02tmgui`,\n direction,\n space,\n spaceFlex,\n })\n )\n }\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (props.debug) {\n console.log(` Spaced children`, final, props)\n }\n }\n\n return final\n}\n\ntype CreateSpacerProps = SpacedChildrenProps & { key: string }\n\nfunction createSpacer({ key, direction, space, spaceFlex }: CreateSpacerProps) {\n return (\n <Spacer\n key={key}\n size={space}\n direction={direction}\n {...(typeof spaceFlex !== 'undefined' && {\n flex: spaceFlex === true ? 1 : spaceFlex === false ? 0 : spaceFlex,\n })}\n />\n )\n}\n\nfunction isUnspaced(child: React.ReactNode) {\n const t = child?.['type']\n return t?.['isVisuallyHidden'] || t?.['isUnspaced']\n}\n\nconst DefaultProps = new Map()\n\nfunction mergeConfigDefaultProps(\n name: string,\n props: Record<string, any>,\n configDefaults: Record<string, Object>,\n parentNames: (string | undefined)[],\n conf: TamaguiInternalConfig\n) {\n const len = parentNames.length\n let prev\n\n for (let i = 0; i < len; i++) {\n const n = parentNames[i]\n if (!n) continue\n if (DefaultProps.has(n)) {\n prev = DefaultProps.get(n)\n continue\n }\n const props = configDefaults[n]\n if (!props) {\n if (prev) {\n DefaultProps.set(n, prev)\n }\n continue\n }\n prev = mergeProps(prev || {}, props, false, conf.inverseShorthands)[0]\n DefaultProps.set(n, prev)\n }\n\n // overwrite the user defined defaults on top of internal defined defaults\n const ourDefaultsMerged = DefaultProps.get(name)\n if (ourDefaultsMerged) {\n return mergeProps(props, ourDefaultsMerged, false, conf.inverseShorthands)[0]\n }\n return props\n}\n\nconst AbsoluteFill: any = createComponent({\n defaultProps: {\n ...stackDefaultStyles,\n flexDirection: 'column',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n pointerEvents: 'box-none',\n },\n})\n\nfunction hasAnimatedStyleValue(style: Object) {\n return Object.keys(style).some((k) => {\n const val = style[k]\n return val && typeof val === 'object' && '_animation' in val\n })\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6tBU;AA7tBV,0BAAgC;AAChC,uBAAiD;AACjD,qBAA6D;AAC7D,mBAUO;AAEP,oBAAiC;AACjC,IAAAA,oBAAmC;AACnC,iCAAoC;AACpC,iCAAoC;AACpC,4BAA4D;AAC5D,gCAAsD;AACtD,4BAA+B;AAC/B,6BAAgC;AAChC,wBAA2B;AAC3B,iCAAoC;AACpC,gCAAmC;AACnC,gCAAmC;AACnC,sBAA+C;AAC/C,4BAA6C;AAC7C,sBAAkC;AAClC,wBAAsB;AAkBtB,kBAAqB;AAGrB,mBAAkC;AAelC,QAAQ,IAAI;AAEL,MAAM,wBAA+C;AAAA,EAC1D,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,WAAW;AACb;AAEA,MAAM,+BAAsD;AAAA,EAC1D,GAAG;AAAA,EACH,WAAW;AACb;AAKA,IAAI;AACJ,IAAI;AACJ,IAAI;AACJ,IAAI;AAEG,MAAM,WAAW,oBAAI,IAAc;AAC1C,IAAI,OAAO,aAAa,aAAa;AACn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AAA,EAC1B;AAGA,QAAM,oBAAoB,aAAa,IAAI,IAAI;AAC/C,MAAI,mBAAmB;AACrB,eAAO,8BAAW,OAAO,mBAAmB,OAAO,KAAK,iBAAiB,EAAE,CAAC;AAAA,EAC9E;AACA,SAAO;AACT;AAEA,MAAM,eAAoB,gBAAgB;AAAA,EACxC,cAAc;AAAA,IACZ,GAAG;AAAA,IACH,eAAe;AAAA,IACf,UAAU;AAAA,IACV,KAAK;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,eAAe;AAAA,EACjB;AACF,CAAC;AAED,SAAS,sBAAsB,OAAe;AAC5C,SAAO,OAAO,KAAK,KAAK,EAAE,KAAK,CAAC,MAAM;AACpC,UAAM,MAAM,MAAM,CAAC;AACnB,WAAO,OAAO,OAAO,QAAQ,YAAY,gBAAgB;AAAA,EAC3D,CAAC;AACH;",
|
|
6
6
|
"names": ["import_constants", "_a", "_b", "weight", "style", "element", "React", "props"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/getAnimationDriver.tsx"],
|
|
4
|
-
"sourcesContent": ["import { getConfig } from '../config.js'\n\nexport function getAnimationDriver() {\n return getConfig().animations\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;
|
|
4
|
+
"sourcesContent": ["import { getConfig } from '../config.js'\n\n/**\n * @deprecated use the `useAnimationDriver` hook instead\n */\nexport function getAnimationDriver() {\n return getConfig().animations\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAKnB,SAAS,qBAAqB;AACnC,aAAO,yBAAU,EAAE;AACrB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var useAnimationDriver_exports = {};
|
|
20
|
+
__export(useAnimationDriver_exports, {
|
|
21
|
+
useAnimationDriver: () => useAnimationDriver
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(useAnimationDriver_exports);
|
|
24
|
+
var import_react = require("react");
|
|
25
|
+
var import_AnimationDriverContext = require("../contexts/AnimationDriverContext");
|
|
26
|
+
const useAnimationDriver = () => {
|
|
27
|
+
return (0, import_react.useContext)(import_AnimationDriverContext.AnimationDriverContext);
|
|
28
|
+
};
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
useAnimationDriver
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=useAnimationDriver.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useAnimationDriver.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useContext } from 'react'\n\nimport { AnimationDriverContext } from '../contexts/AnimationDriverContext'\n\nexport const useAnimationDriver = () => {\n return useContext(AnimationDriverContext)\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAE3B,oCAAuC;AAEhC,MAAM,qBAAqB,MAAM;AACtC,aAAO,yBAAW,oDAAsB;AAC1C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -73,6 +73,7 @@ __reExport(src_exports, require("./hooks/useTheme.js"), module.exports);
|
|
|
73
73
|
__reExport(src_exports, require("./hooks/useThemeName.js"), module.exports);
|
|
74
74
|
__reExport(src_exports, require("./hooks/useSafeRef.js"), module.exports);
|
|
75
75
|
__reExport(src_exports, require("./hooks/useStyle.js"), module.exports);
|
|
76
|
+
__reExport(src_exports, require("./hooks/useAnimationDriver.js"), module.exports);
|
|
76
77
|
__reExport(src_exports, require("./views/Slot.js"), module.exports);
|
|
77
78
|
__reExport(src_exports, require("./views/Stack.js"), module.exports);
|
|
78
79
|
__reExport(src_exports, require("./views/Text.js"), module.exports);
|
|
@@ -81,6 +82,7 @@ __reExport(src_exports, require("./views/Theme.js"), module.exports);
|
|
|
81
82
|
__reExport(src_exports, require("./views/ThemeProvider.js"), module.exports);
|
|
82
83
|
__reExport(src_exports, require("./views/FontLanguage"), module.exports);
|
|
83
84
|
__reExport(src_exports, require("./views/TamaguiProvider.js"), module.exports);
|
|
85
|
+
__reExport(src_exports, require("./views/AnimationDriverProvider.js"), module.exports);
|
|
84
86
|
__reExport(src_exports, require("@tamagui/use-force-update"), module.exports);
|
|
85
87
|
__reExport(src_exports, require("@tamagui/use-did-finish-ssr"), module.exports);
|
|
86
88
|
__reExport(src_exports, require("@tamagui/use-event"), module.exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './Tamagui.js'\nexport * from './createComponent.js'\nexport * from './createShorthands.js'\nexport * from './createTheme.js'\nexport * from './createTamagui.js'\nexport * from './createFont.js'\nexport * from './createTokens.js'\nexport * from './createVariable.js'\nexport * from './createVariables.js'\nexport * from './insertFont.js'\nexport * from './addTheme.js'\nexport * from './updateTheme.js'\nexport * from './styled.js'\nexport * from './types.js'\nexport * from './setupReactNative.js'\n\nexport { getConfig, getThemes, getTokens, onConfiguredOnce } from './config.js'\n\nexport * from './constants/constants.js'\n\nexport * from './helpers/useShallowSetState.js'\nexport * from './helpers/getVariantExtras.js'\nexport * from './helpers/getAnimationDriver.js'\nexport * from './helpers/getExpandedShorthands.js'\nexport * from './helpers/getSplitStyles.js'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/pseudoDescriptors.js'\nexport * from './helpers/mergeProps.js'\nexport * from './helpers/expandStyles.js'\nexport * from './helpers/isTamaguiElement.js'\nexport * from './helpers/isTamaguiComponent.js'\nexport * from './helpers/matchMedia'\nexport * from './helpers/proxyThemeVariables.js'\nexport * from './helpers/themeable.js'\nexport * from './helpers/withStaticProperties.js'\nexport * from './helpers/normalizeColor.js'\n\nexport * from './contexts/ButtonNestingContext.js'\n\nexport * from './hooks/useId.js'\nexport * from './hooks/useIsTouchDevice.js'\n\nexport {\n configureMedia,\n getMedia,\n mediaState,\n useMedia,\n useMediaPropsActive,\n mediaObjectToString,\n mediaQueryConfig,\n} from './hooks/useMedia.js'\nexport * from './hooks/useTheme.js'\nexport * from './hooks/useThemeName.js'\nexport * from './hooks/useSafeRef.js'\nexport * from './hooks/useStyle.js'\n\nexport * from './views/Slot.js'\nexport * from './views/Stack.js'\nexport * from './views/Text.js'\nexport * from './contexts/TextAncestorContext.js'\nexport * from './views/Theme.js'\nexport * from './views/ThemeProvider.js'\nexport * from './views/FontLanguage'\nexport * from './views/TamaguiProvider.js'\n\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/use-did-finish-ssr'\nexport * from '@tamagui/use-event'\nexport * from '@tamagui/compose-refs'\nexport * from '@tamagui/helpers'\nexport * from '@tamagui/constants'\n\nexport * from './setupHooks.js'\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,yBAAd;AACA,wBAAc,iCADd;AAEA,wBAAc,kCAFd;AAGA,wBAAc,6BAHd;AAIA,wBAAc,+BAJd;AAKA,wBAAc,4BALd;AAMA,wBAAc,8BANd;AAOA,wBAAc,gCAPd;AAQA,wBAAc,iCARd;AASA,wBAAc,4BATd;AAUA,wBAAc,0BAVd;AAWA,wBAAc,6BAXd;AAYA,wBAAc,wBAZd;AAaA,wBAAc,uBAbd;AAcA,wBAAc,kCAdd;AAgBA,oBAAkE;AAElE,wBAAc,qCAlBd;AAoBA,wBAAc,4CApBd;AAqBA,wBAAc,0CArBd;AAsBA,wBAAc,4CAtBd;AAuBA,wBAAc,+CAvBd;AAwBA,wBAAc,wCAxBd;AAyBA,wBAAc,sCAzBd;AA0BA,wBAAc,2CA1Bd;AA2BA,wBAAc,oCA3Bd;AA4BA,wBAAc,sCA5Bd;AA6BA,wBAAc,0CA7Bd;AA8BA,wBAAc,4CA9Bd;AA+BA,wBAAc,iCA/Bd;AAgCA,wBAAc,6CAhCd;AAiCA,wBAAc,mCAjCd;AAkCA,wBAAc,8CAlCd;AAmCA,wBAAc,wCAnCd;AAqCA,wBAAc,+CArCd;AAuCA,wBAAc,6BAvCd;AAwCA,wBAAc,wCAxCd;AA0CA,sBAQO;AACP,wBAAc,gCAnDd;AAoDA,wBAAc,oCApDd;AAqDA,wBAAc,kCArDd;AAsDA,wBAAc,gCAtDd;
|
|
4
|
+
"sourcesContent": ["export * from './Tamagui.js'\nexport * from './createComponent.js'\nexport * from './createShorthands.js'\nexport * from './createTheme.js'\nexport * from './createTamagui.js'\nexport * from './createFont.js'\nexport * from './createTokens.js'\nexport * from './createVariable.js'\nexport * from './createVariables.js'\nexport * from './insertFont.js'\nexport * from './addTheme.js'\nexport * from './updateTheme.js'\nexport * from './styled.js'\nexport * from './types.js'\nexport * from './setupReactNative.js'\n\nexport { getConfig, getThemes, getTokens, onConfiguredOnce } from './config.js'\n\nexport * from './constants/constants.js'\n\nexport * from './helpers/useShallowSetState.js'\nexport * from './helpers/getVariantExtras.js'\nexport * from './helpers/getAnimationDriver.js'\nexport * from './helpers/getExpandedShorthands.js'\nexport * from './helpers/getSplitStyles.js'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/pseudoDescriptors.js'\nexport * from './helpers/mergeProps.js'\nexport * from './helpers/expandStyles.js'\nexport * from './helpers/isTamaguiElement.js'\nexport * from './helpers/isTamaguiComponent.js'\nexport * from './helpers/matchMedia'\nexport * from './helpers/proxyThemeVariables.js'\nexport * from './helpers/themeable.js'\nexport * from './helpers/withStaticProperties.js'\nexport * from './helpers/normalizeColor.js'\n\nexport * from './contexts/ButtonNestingContext.js'\n\nexport * from './hooks/useId.js'\nexport * from './hooks/useIsTouchDevice.js'\n\nexport {\n configureMedia,\n getMedia,\n mediaState,\n useMedia,\n useMediaPropsActive,\n mediaObjectToString,\n mediaQueryConfig,\n} from './hooks/useMedia.js'\nexport * from './hooks/useTheme.js'\nexport * from './hooks/useThemeName.js'\nexport * from './hooks/useSafeRef.js'\nexport * from './hooks/useStyle.js'\nexport * from './hooks/useAnimationDriver.js'\n\nexport * from './views/Slot.js'\nexport * from './views/Stack.js'\nexport * from './views/Text.js'\nexport * from './contexts/TextAncestorContext.js'\nexport * from './views/Theme.js'\nexport * from './views/ThemeProvider.js'\nexport * from './views/FontLanguage'\nexport * from './views/TamaguiProvider.js'\nexport * from './views/AnimationDriverProvider.js'\n\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/use-did-finish-ssr'\nexport * from '@tamagui/use-event'\nex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