tamagui 1.129.4 → 1.129.5-1751184593158
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/native.js +117 -72
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +117 -72
- package/dist/test.native.js.map +3 -3
- package/package.json +55 -55
- package/types/views/Input.d.ts +1 -1
package/dist/test.native.js
CHANGED
|
@@ -222,7 +222,7 @@ var require_index_native2 = __commonJS({
|
|
|
222
222
|
if (typeof document > "u") return React4.useMemo(function() {
|
|
223
223
|
return fn();
|
|
224
224
|
}, []);
|
|
225
|
-
var ref = React4.useRef();
|
|
225
|
+
var ref = React4.useRef(void 0);
|
|
226
226
|
return ref.current || (ref.current = {
|
|
227
227
|
v: fn()
|
|
228
228
|
}), ref.current.v;
|
|
@@ -2994,7 +2994,7 @@ var require_useMedia_native = __commonJS({
|
|
|
2994
2994
|
};
|
|
2995
2995
|
}
|
|
2996
2996
|
function useMedia3(cc, debug) {
|
|
2997
|
-
var componentState = cc ? States.get(cc) : null, internalRef = (0, import_react3.useRef)();
|
|
2997
|
+
var componentState = cc ? States.get(cc) : null, internalRef = (0, import_react3.useRef)(null);
|
|
2998
2998
|
internalRef.current || (internalRef.current = {
|
|
2999
2999
|
keys: /* @__PURE__ */ new Set()
|
|
3000
3000
|
});
|
|
@@ -6339,7 +6339,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6339
6339
|
conf = conf || (0, import_config.getConfig)();
|
|
6340
6340
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
6341
6341
|
import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
6342
|
-
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles), styleState = {
|
|
6342
|
+
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles), styleState = {
|
|
6343
6343
|
classNames,
|
|
6344
6344
|
conf,
|
|
6345
6345
|
props,
|
|
@@ -6429,7 +6429,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6429
6429
|
var style2 = styleState.style;
|
|
6430
6430
|
if (0) {
|
|
6431
6431
|
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
6432
|
-
if (!
|
|
6432
|
+
if (!styleProps.isAnimated && isReactNative) {
|
|
6433
6433
|
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
6434
6434
|
try {
|
|
6435
6435
|
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
|
|
@@ -6501,7 +6501,6 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6501
6501
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
6502
6502
|
}, useInsertEffectCompat = import_constants4.isWeb ? import_react3.default.useInsertionEffect || import_constants4.useIsomorphicLayoutEffect : function() {
|
|
6503
6503
|
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k) {
|
|
6504
|
-
conf = conf || (0, import_config.getConfig)();
|
|
6505
6504
|
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k);
|
|
6506
6505
|
return res;
|
|
6507
6506
|
};
|
|
@@ -6689,9 +6688,9 @@ var require_setElementProps_native = __commonJS({
|
|
|
6689
6688
|
}
|
|
6690
6689
|
});
|
|
6691
6690
|
|
|
6692
|
-
// ../../core/web/dist/cjs/helpers/
|
|
6693
|
-
var
|
|
6694
|
-
"../../core/web/dist/cjs/helpers/
|
|
6691
|
+
// ../../core/web/dist/cjs/helpers/useCreateShallowSetState.native.js
|
|
6692
|
+
var require_useCreateShallowSetState_native = __commonJS({
|
|
6693
|
+
"../../core/web/dist/cjs/helpers/useCreateShallowSetState.native.js"(exports2, module2) {
|
|
6695
6694
|
"use strict";
|
|
6696
6695
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6697
6696
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -6725,43 +6724,31 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
6725
6724
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6726
6725
|
value: !0
|
|
6727
6726
|
}), mod);
|
|
6728
|
-
},
|
|
6729
|
-
__export2(
|
|
6730
|
-
createShallowSetState: function() {
|
|
6731
|
-
return createShallowSetState;
|
|
6732
|
-
},
|
|
6727
|
+
}, useCreateShallowSetState_exports = {};
|
|
6728
|
+
__export2(useCreateShallowSetState_exports, {
|
|
6733
6729
|
isEqualShallow: function() {
|
|
6734
6730
|
return isEqualShallow;
|
|
6735
6731
|
},
|
|
6736
6732
|
mergeIfNotShallowEqual: function() {
|
|
6737
6733
|
return mergeIfNotShallowEqual;
|
|
6734
|
+
},
|
|
6735
|
+
useCreateShallowSetState: function() {
|
|
6736
|
+
return useCreateShallowSetState;
|
|
6738
6737
|
}
|
|
6739
6738
|
});
|
|
6740
|
-
module2.exports = __toCommonJS2(
|
|
6741
|
-
var import_react3 = require("react")
|
|
6742
|
-
|
|
6743
|
-
};
|
|
6744
|
-
function createShallowSetState(setter, onlyAllow, transition, debugIn) {
|
|
6739
|
+
module2.exports = __toCommonJS2(useCreateShallowSetState_exports);
|
|
6740
|
+
var import_react3 = require("react");
|
|
6741
|
+
function useCreateShallowSetState(setter, debugIn) {
|
|
6745
6742
|
return (0, import_react3.useCallback)(function(next) {
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
setter(function(prev) {
|
|
6749
|
-
return mergeIfNotShallowEqual(prev, next, onlyAllow, debugIn);
|
|
6750
|
-
});
|
|
6743
|
+
setter(function(prev) {
|
|
6744
|
+
return mergeIfNotShallowEqual(prev, next, debugIn);
|
|
6751
6745
|
});
|
|
6752
6746
|
}, [
|
|
6753
6747
|
setter,
|
|
6754
|
-
onlyAllow ? onlyAllow.join("") : "",
|
|
6755
|
-
transition,
|
|
6756
6748
|
debugIn
|
|
6757
6749
|
]);
|
|
6758
6750
|
}
|
|
6759
|
-
function mergeIfNotShallowEqual(prev, next,
|
|
6760
|
-
if (onlyAllow) {
|
|
6761
|
-
var allowed = {};
|
|
6762
|
-
for (var key in next) onlyAllow.includes(key) && (allowed[key] = next[key]);
|
|
6763
|
-
next = allowed;
|
|
6764
|
-
}
|
|
6751
|
+
function mergeIfNotShallowEqual(prev, next, debug) {
|
|
6765
6752
|
return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
6766
6753
|
...prev,
|
|
6767
6754
|
...next
|
|
@@ -6817,7 +6804,7 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
6817
6804
|
}
|
|
6818
6805
|
});
|
|
6819
6806
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
6820
|
-
var import_useMedia = require_useMedia_native(),
|
|
6807
|
+
var import_useMedia = require_useMedia_native(), import_useCreateShallowSetState = require_useCreateShallowSetState_native(), subscribeToContextGroup = function(param) {
|
|
6821
6808
|
var { setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
6822
6809
|
if (pseudoGroups || mediaGroups) {
|
|
6823
6810
|
var _componentContext_groups_subscribe, _componentContext_groups;
|
|
@@ -6828,7 +6815,7 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
6828
6815
|
};
|
|
6829
6816
|
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
6830
6817
|
else if (layout && mediaGroups) {
|
|
6831
|
-
var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0,
|
|
6818
|
+
var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_useCreateShallowSetState.mergeIfNotShallowEqual)(current.media || {}, mediaState3);
|
|
6832
6819
|
next !== current.media && (Object.assign(current.media, next), persist());
|
|
6833
6820
|
}
|
|
6834
6821
|
function persist() {
|
|
@@ -7739,10 +7726,15 @@ var require_index_native13 = __commonJS({
|
|
|
7739
7726
|
},
|
|
7740
7727
|
useDidFinishSSR: function() {
|
|
7741
7728
|
return useDidFinishSSR2;
|
|
7729
|
+
},
|
|
7730
|
+
useIsClientOnly: function() {
|
|
7731
|
+
return useIsClientOnly;
|
|
7742
7732
|
}
|
|
7743
7733
|
});
|
|
7744
7734
|
module2.exports = __toCommonJS2(index_exports2);
|
|
7745
|
-
var React4 = __toESM2(require("react")), import_ClientOnly = require_ClientOnly_native(), import_ClientOnly2 = require_ClientOnly_native()
|
|
7735
|
+
var React4 = __toESM2(require("react")), import_ClientOnly = require_ClientOnly_native(), import_ClientOnly2 = require_ClientOnly_native(), useIsClientOnly = function() {
|
|
7736
|
+
return React4.useContext(import_ClientOnly.ClientOnlyContext);
|
|
7737
|
+
};
|
|
7746
7738
|
function useDidFinishSSR2(value) {
|
|
7747
7739
|
var clientOnly = React4.useContext(import_ClientOnly.ClientOnlyContext);
|
|
7748
7740
|
return value ?? !0;
|
|
@@ -7797,10 +7789,12 @@ var require_useComponentState_native = __commonJS({
|
|
|
7797
7789
|
}
|
|
7798
7790
|
});
|
|
7799
7791
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
7800
|
-
var import_constants4 = require_index_native6(), import_use_did_finish_ssr = require_index_native13(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(),
|
|
7801
|
-
var { animationDriver } = param, _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), [startedUnhydrated] = (0, import_react3.useState)(import_constants4.IS_REACT_19 ? !isHydrated : !1), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
7792
|
+
var import_constants4 = require_index_native6(), import_use_did_finish_ssr = require_index_native13(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_useCreateShallowSetState = require_useCreateShallowSetState_native(), useComponentState = function(props, param, staticConfig, config) {
|
|
7793
|
+
var { animationDriver } = param, _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(import_constants4.IS_REACT_19 ? !isHydrated : !1), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
7802
7794
|
stateRef.current || (stateRef.current = {});
|
|
7803
|
-
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current
|
|
7795
|
+
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current;
|
|
7796
|
+
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
7797
|
+
var willBeAnimatedClient = function() {
|
|
7804
7798
|
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
7805
7799
|
return !!(next || curStateRef.hasAnimated);
|
|
7806
7800
|
}(), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
|
|
@@ -7820,23 +7814,19 @@ var require_useComponentState_native = __commonJS({
|
|
|
7820
7814
|
...states[0],
|
|
7821
7815
|
[props.forceStyle]: !0
|
|
7822
7816
|
} : states[0], setState = states[1], isAnimated = willBeAnimated;
|
|
7823
|
-
import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), state.disabled = disabled, setState({
|
|
7824
|
-
|
|
7817
|
+
import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), state.disabled = disabled, setState(function(_) {
|
|
7818
|
+
return {
|
|
7819
|
+
...state
|
|
7820
|
+
};
|
|
7825
7821
|
}));
|
|
7826
|
-
var groupName = props.group, setStateShallow = (0,
|
|
7827
|
-
setState,
|
|
7828
|
-
void 0,
|
|
7829
|
-
// note: allows all state updates even when disabled for the enterStyle animation to work
|
|
7830
|
-
!1,
|
|
7831
|
-
props.debug
|
|
7832
|
-
);
|
|
7822
|
+
var groupName = props.group, setStateShallow = (0, import_useCreateShallowSetState.useCreateShallowSetState)(setState, props.debug);
|
|
7833
7823
|
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
7834
7824
|
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
7835
7825
|
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
7836
7826
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
7837
7827
|
state.unmounted && env && staticConfig.variants[env] ? props[env] = !0 : isExiting && exv && (props[exv] = exitVariant !== enterExitVariant);
|
|
7838
7828
|
}
|
|
7839
|
-
var noClass = !import_constants4.isWeb || !!props.forceStyle;
|
|
7829
|
+
var noClass = !import_constants4.isWeb || !!props.forceStyle || isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles);
|
|
7840
7830
|
if (import_constants4.isWeb && (!import_constants4.isServer || isHydrated)) {
|
|
7841
7831
|
var isAnimatedAndHydrated = isAnimated && !supportsCSSVars, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
7842
7832
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0);
|
|
@@ -7861,6 +7851,26 @@ var require_useComponentState_native = __commonJS({
|
|
|
7861
7851
|
}
|
|
7862
7852
|
};
|
|
7863
7853
|
}
|
|
7854
|
+
if (!curStateRef.stateEmitter && hasAnimationProp) {
|
|
7855
|
+
var listeners1 = /* @__PURE__ */ new Set();
|
|
7856
|
+
curStateRef.stateEmitter = {
|
|
7857
|
+
listeners: listeners1,
|
|
7858
|
+
emit(state2) {
|
|
7859
|
+
listeners1.forEach(function(l) {
|
|
7860
|
+
return l(state2);
|
|
7861
|
+
});
|
|
7862
|
+
},
|
|
7863
|
+
subscribe(cb) {
|
|
7864
|
+
return listeners1.add(cb), setStateShallow({
|
|
7865
|
+
hasDynGroupChildren: !0
|
|
7866
|
+
}), function() {
|
|
7867
|
+
listeners1.delete(cb), listeners1.size === 0 && setStateShallow({
|
|
7868
|
+
hasDynGroupChildren: !1
|
|
7869
|
+
});
|
|
7870
|
+
};
|
|
7871
|
+
}
|
|
7872
|
+
};
|
|
7873
|
+
}
|
|
7864
7874
|
return {
|
|
7865
7875
|
startedUnhydrated,
|
|
7866
7876
|
curStateRef,
|
|
@@ -8174,8 +8184,12 @@ var require_createComponent_native = __commonJS({
|
|
|
8174
8184
|
...styledContextProps
|
|
8175
8185
|
} : defaultProps, props = propsIn;
|
|
8176
8186
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
8177
|
-
var componentName2 = props.componentName || staticConfig.componentName, animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState,
|
|
8178
|
-
animationDriver && isAnimated &&
|
|
8187
|
+
var componentName2 = props.componentName || staticConfig.componentName, animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState, setStateShallow = componentState.setStateShallow, hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants4.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
8188
|
+
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
8189
|
+
// "needsWebStyles" basically with motion we just animate a plain div, but
|
|
8190
|
+
// we still have animated.View/Text for Sheet which wants to control
|
|
8191
|
+
// things declaratively
|
|
8192
|
+
!animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
8179
8193
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
8180
8194
|
props.themeShallow && (curStateRef.themeShallow = !0);
|
|
8181
8195
|
var themeStateProps = {
|
|
@@ -8204,8 +8218,28 @@ var require_createComponent_native = __commonJS({
|
|
|
8204
8218
|
isExiting,
|
|
8205
8219
|
isAnimated,
|
|
8206
8220
|
willBeAnimated,
|
|
8207
|
-
styledContextProps
|
|
8221
|
+
styledContextProps,
|
|
8222
|
+
noMergeStyle: isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles)
|
|
8208
8223
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "", splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
8224
|
+
if (hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8225
|
+
var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
8226
|
+
setStateShallow = function(next) {
|
|
8227
|
+
var avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
8228
|
+
"hover",
|
|
8229
|
+
"press",
|
|
8230
|
+
"pressIn"
|
|
8231
|
+
]), canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
8232
|
+
return avoidReRenderKeys.has(key3);
|
|
8233
|
+
});
|
|
8234
|
+
if (canAvoidReRender) {
|
|
8235
|
+
var updatedState = {
|
|
8236
|
+
...state,
|
|
8237
|
+
...next
|
|
8238
|
+
}, nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
8239
|
+
styleListener(nextStyles.style);
|
|
8240
|
+
} else ogSetStateShallow(next);
|
|
8241
|
+
};
|
|
8242
|
+
}
|
|
8209
8243
|
if (props.group && props.untilMeasured === "hide" && !curStateRef.hasMeasured) {
|
|
8210
8244
|
var _splitStyles;
|
|
8211
8245
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
@@ -8244,10 +8278,15 @@ var require_createComponent_native = __commonJS({
|
|
|
8244
8278
|
(supportsCSSVars ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
|
|
8245
8279
|
);
|
|
8246
8280
|
if (shouldUseAnimation) {
|
|
8247
|
-
var
|
|
8281
|
+
var useStyleEmitter = animationDriver != null && animationDriver.avoidReRenders ? function(listener) {
|
|
8282
|
+
stateRef.current.useStyleListener = listener;
|
|
8283
|
+
} : void 0, animations = useAnimations({
|
|
8248
8284
|
props: propsWithAnimation,
|
|
8249
8285
|
// if hydrating, send empty style
|
|
8250
8286
|
style: splitStylesStyle || {},
|
|
8287
|
+
// @ts-ignore
|
|
8288
|
+
styleState: splitStyles,
|
|
8289
|
+
useStyleEmitter,
|
|
8251
8290
|
presence,
|
|
8252
8291
|
componentState: state,
|
|
8253
8292
|
styleProps,
|
|
@@ -11059,7 +11098,7 @@ var require_index_native14 = __commonJS({
|
|
|
11059
11098
|
__reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
|
|
11060
11099
|
__reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
|
|
11061
11100
|
__reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
|
|
11062
|
-
__reExport2(index_exports2,
|
|
11101
|
+
__reExport2(index_exports2, require_useCreateShallowSetState_native(), module2.exports);
|
|
11063
11102
|
__reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
|
|
11064
11103
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
11065
11104
|
__reExport2(index_exports2, require_getExpandedShorthands_native(), module2.exports);
|
|
@@ -13663,11 +13702,11 @@ var require_Collection_native = __commonJS({
|
|
|
13663
13702
|
function createCollection(name) {
|
|
13664
13703
|
var { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = (0, import_core12.createStyledContext)({
|
|
13665
13704
|
collectionRef: {
|
|
13666
|
-
current:
|
|
13705
|
+
current: void 0
|
|
13667
13706
|
},
|
|
13668
13707
|
itemMap: /* @__PURE__ */ new Map()
|
|
13669
13708
|
}), CollectionProvider = function(props) {
|
|
13670
|
-
var { __scopeCollection, children } = props, ref = import_react3.default.useRef(
|
|
13709
|
+
var { __scopeCollection, children } = props, ref = import_react3.default.useRef(void 0), itemMap = import_react3.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
13671
13710
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollectionProviderImpl, {
|
|
13672
13711
|
scope: __scopeCollection,
|
|
13673
13712
|
itemMap,
|
|
@@ -13685,7 +13724,7 @@ var require_Collection_native = __commonJS({
|
|
|
13685
13724
|
});
|
|
13686
13725
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
13687
13726
|
var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
13688
|
-
var { __scopeCollection, children, ...itemData } = props, ref = import_react3.default.useRef(
|
|
13727
|
+
var { __scopeCollection, children, ...itemData } = props, ref = import_react3.default.useRef(void 0), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
|
|
13689
13728
|
return import_react3.default.useEffect(function() {
|
|
13690
13729
|
return context.itemMap.set(ref, {
|
|
13691
13730
|
ref,
|
|
@@ -17696,7 +17735,7 @@ var require_nativeSheet_native = __commonJS({
|
|
|
17696
17735
|
function setupNativeSheet(platform2, RNIOSModal) {
|
|
17697
17736
|
var { ModalSheetView, ModalSheetViewMainContent } = RNIOSModal;
|
|
17698
17737
|
platform2 === "ios" && (nativeSheets[platform2] = function(props) {
|
|
17699
|
-
var state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0, import_react3.useRef)();
|
|
17738
|
+
var state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0, import_react3.useRef)(void 0);
|
|
17700
17739
|
(0, import_react3.useEffect)(function() {
|
|
17701
17740
|
if (open) {
|
|
17702
17741
|
var _ref_current;
|
|
@@ -17927,7 +17966,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17927
17966
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native29(), import_animate_presence = require_index_native4(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native18(), import_portal2 = require_index_native28(), import_react3 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_contexts = require_contexts_native(), import_helpers = require_helpers_native2(), import_SheetContext = require_SheetContext_native(), import_useSheetOpenState = require_useSheetOpenState_native(), import_useSheetProviderProps = require_useSheetProviderProps_native(), hiddenSize = 10000.1, sheetHiddenStyleSheet = null, relativeDimensionTo = import_constants4.isWeb ? "window" : "screen", SheetImplementationCustom = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
17928
17967
|
var parentSheet = import_react3.default.useContext(import_contexts.ParentSheetContext), { animation, animationConfig: animationConfigProp, modal = !1, zIndex = parentSheet.zIndex + 1, moveOnKeyboardChange = !1, unmountChildrenWhenHidden = !1, portalProps, containerComponent: ContainerComponent = import_react3.default.Fragment } = props, state = (0, import_useSheetOpenState.useSheetOpenState)(props), [overlayComponent, setOverlayComponent] = import_react3.default.useState(null), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
|
|
17929
17968
|
onOverlayComponent: setOverlayComponent
|
|
17930
|
-
}), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(
|
|
17969
|
+
}), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(void 0), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef, providerProps.contentRef), { animationDriver } = (0, import_core12.useConfiguration)(), animationConfig = function() {
|
|
17931
17970
|
if (animationDriver.supportsCSSVars) return {};
|
|
17932
17971
|
var [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [
|
|
17933
17972
|
animation
|
|
@@ -17985,7 +18024,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17985
18024
|
}
|
|
17986
18025
|
});
|
|
17987
18026
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
17988
|
-
if (hasntMeasured && screenSize) {
|
|
18027
|
+
if (hasntMeasured && screenSize && frameSize) {
|
|
17989
18028
|
at.current = screenSize, animatedNumber.setValue(screenSize, {
|
|
17990
18029
|
type: "timing",
|
|
17991
18030
|
duration: 0
|
|
@@ -18148,10 +18187,9 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18148
18187
|
ref,
|
|
18149
18188
|
...panResponder == null ? void 0 : panResponder.panHandlers,
|
|
18150
18189
|
onLayout: handleAnimationViewLayout,
|
|
18151
|
-
|
|
18152
|
-
|
|
18153
|
-
|
|
18154
|
-
},
|
|
18190
|
+
// @ts-ignore for CSS driver this is necessary to attach the transition
|
|
18191
|
+
// also motion driver at least though i suspect all drivers?
|
|
18192
|
+
animation: isDragging || disableAnimation ? null : animation,
|
|
18155
18193
|
// @ts-ignore
|
|
18156
18194
|
disableClassName: !0,
|
|
18157
18195
|
style: [
|
|
@@ -19379,7 +19417,10 @@ var require_Dialog_native = __commonJS({
|
|
|
19379
19417
|
}
|
|
19380
19418
|
});
|
|
19381
19419
|
}), DialogContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19382
|
-
var { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(
|
|
19420
|
+
var { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(
|
|
19421
|
+
// TODO react 19 type workaround
|
|
19422
|
+
void 0
|
|
19423
|
+
), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
19383
19424
|
if (isAdapted) return !import_constants4.isWeb && !context.open ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19384
19425
|
children: contentProps.children
|
|
19385
19426
|
});
|
|
@@ -19841,7 +19882,10 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19841
19882
|
try {
|
|
19842
19883
|
for (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
19843
19884
|
var child = _step.value;
|
|
19844
|
-
/* @__PURE__ */ React4.isValidElement(child) && onChild(child)
|
|
19885
|
+
if (/* @__PURE__ */ React4.isValidElement(child) && onChild(child)) {
|
|
19886
|
+
var childProps = child.props;
|
|
19887
|
+
childProps.children && forEachChildDeep(React4.Children.toArray(childProps.children), onChild);
|
|
19888
|
+
}
|
|
19845
19889
|
}
|
|
19846
19890
|
} catch (err) {
|
|
19847
19891
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -21522,7 +21566,7 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
21522
21566
|
module2.exports = __toCommonJS2(focusableInputHOC_exports);
|
|
21523
21567
|
var import_compose_refs = require_index_native11(), import_web = require_index_native14(), import_react3 = __toESM2(require("react")), import_registerFocusable = require_registerFocusable_native();
|
|
21524
21568
|
function useFocusable2(param) {
|
|
21525
|
-
var { isInput, props, ref } = param, { id, onChangeText, value, defaultValue } = props, inputValue = import_react3.default.useRef(value || defaultValue || ""), unregisterFocusable = import_react3.default.useRef(), focusAndSelect = import_react3.default.useCallback(function(input) {
|
|
21569
|
+
var { isInput, props, ref } = param, { id, onChangeText, value, defaultValue } = props, inputValue = import_react3.default.useRef(value || defaultValue || ""), unregisterFocusable = import_react3.default.useRef(void 0), focusAndSelect = import_react3.default.useCallback(function(input) {
|
|
21526
21570
|
input.focus(), input.setSelection && typeof inputValue.current == "string" && input.setSelection(0, inputValue.current.length);
|
|
21527
21571
|
}, []), registerFocusableHandler = import_react3.default.useCallback(function(input) {
|
|
21528
21572
|
var _unregisterFocusable_current;
|
|
@@ -22819,7 +22863,7 @@ var require_Group_native = __commonJS({
|
|
|
22819
22863
|
}
|
|
22820
22864
|
var GroupItem = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
|
|
22821
22865
|
var { __scopeGroup, children, forcePlacement } = props, groupItemProps = useGroupItem({
|
|
22822
|
-
disabled: /* @__PURE__ */ import_react3.default.isValidElement(children) ? children.props.disabled :
|
|
22866
|
+
disabled: /* @__PURE__ */ import_react3.default.isValidElement(children) ? children.props.disabled : !1
|
|
22823
22867
|
}, forcePlacement, __scopeGroup);
|
|
22824
22868
|
return !/* @__PURE__ */ import_react3.default.isValidElement(children) || children.type === import_react3.default.Fragment ? children : /* @__PURE__ */ import_react3.default.cloneElement(children, groupItemProps);
|
|
22825
22869
|
}), useGroupItem = function(childrenProps, forcePlacement, __scopeGroup) {
|
|
@@ -24348,7 +24392,7 @@ var require_Popover_native = __commonJS({
|
|
|
24348
24392
|
Sheet: import_sheet.Sheet.Controlled,
|
|
24349
24393
|
FocusScope: import_focus_scope.FocusScopeController
|
|
24350
24394
|
}), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24351
|
-
var { children, open: openProp, defaultOpen, onOpenChange, __scopePopover, keepChildrenMounted, hoverable, disableFocus, id, ...restProps } = props, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
24395
|
+
var { children, open: openProp, defaultOpen, onOpenChange, __scopePopover, keepChildrenMounted, hoverable, disableFocus, id, ...restProps } = props, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(void 0), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
24352
24396
|
prop: openProp,
|
|
24353
24397
|
defaultProp: defaultOpen || !1,
|
|
24354
24398
|
onChange: function(val) {
|
|
@@ -24362,7 +24406,7 @@ var require_Popover_native = __commonJS({
|
|
|
24362
24406
|
disable: isAdapted,
|
|
24363
24407
|
hoverable,
|
|
24364
24408
|
disableFocus
|
|
24365
|
-
}), [anchorTo, setAnchorToRaw] = React4.useState(), setAnchorTo = (0, import_core12.
|
|
24409
|
+
}), [anchorTo, setAnchorToRaw] = React4.useState(), setAnchorTo = (0, import_core12.useCreateShallowSetState)(setAnchorToRaw);
|
|
24366
24410
|
React4.useImperativeHandle(forwardedRef, function() {
|
|
24367
24411
|
return {
|
|
24368
24412
|
anchorTo: setAnchorTo,
|
|
@@ -26304,7 +26348,7 @@ var require_SelectItemText_native = __commonJS({
|
|
|
26304
26348
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
26305
26349
|
}
|
|
26306
26350
|
}), SelectItemText = SelectItemTextFrame.styleable(function(props, forwardedRef) {
|
|
26307
|
-
var { __scopeSelect, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(ITEM_TEXT_NAME, __scopeSelect), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_TEXT_NAME, __scopeSelect), contents = React4.useRef();
|
|
26351
|
+
var { __scopeSelect, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(ITEM_TEXT_NAME, __scopeSelect), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_TEXT_NAME, __scopeSelect), contents = React4.useRef(null);
|
|
26308
26352
|
return contents.current = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemTextFrame, {
|
|
26309
26353
|
className,
|
|
26310
26354
|
size: itemParentContext.size,
|
|
@@ -26828,7 +26872,7 @@ var require_Select_native = __commonJS({
|
|
|
26828
26872
|
FocusScope: import_focus_scope.FocusScopeController
|
|
26829
26873
|
});
|
|
26830
26874
|
function useEmitter() {
|
|
26831
|
-
var listeners = React4.useRef();
|
|
26875
|
+
var listeners = React4.useRef(null);
|
|
26832
26876
|
listeners.current || (listeners.current = /* @__PURE__ */ new Set());
|
|
26833
26877
|
var emit = function(value) {
|
|
26834
26878
|
listeners.current.forEach(function(l) {
|
|
@@ -27447,7 +27491,7 @@ var require_Slider_native = __commonJS({
|
|
|
27447
27491
|
size: 0,
|
|
27448
27492
|
offset: 0
|
|
27449
27493
|
};
|
|
27450
|
-
}), setState = (0, import_core12.
|
|
27494
|
+
}), setState = (0, import_core12.useCreateShallowSetState)(setState_);
|
|
27451
27495
|
function getValueFromPointer(pointerPosition) {
|
|
27452
27496
|
var input = [
|
|
27453
27497
|
0,
|
|
@@ -27545,7 +27589,7 @@ var require_Slider_native = __commonJS({
|
|
|
27545
27589
|
size: 0,
|
|
27546
27590
|
offset: 0
|
|
27547
27591
|
};
|
|
27548
|
-
}), setState = (0, import_core12.
|
|
27592
|
+
}), setState = (0, import_core12.useCreateShallowSetState)(setState_), sliderRef = React4.useRef(null);
|
|
27549
27593
|
function getValueFromPointer(pointerPosition) {
|
|
27550
27594
|
var input = [
|
|
27551
27595
|
0,
|
|
@@ -28310,6 +28354,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
28310
28354
|
checked,
|
|
28311
28355
|
setChecked
|
|
28312
28356
|
],
|
|
28357
|
+
// @ts-ignore TODO tamagui react 19 type error
|
|
28313
28358
|
forwardedRef
|
|
28314
28359
|
);
|
|
28315
28360
|
React4.useEffect(function() {
|