tamagui 1.129.4 → 1.129.5-1751174117974
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/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;
|
|
@@ -3190,7 +3190,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3190
3190
|
};
|
|
3191
3191
|
}
|
|
3192
3192
|
function useMedia3(cc, debug) {
|
|
3193
|
-
var componentState = cc ? States.get(cc) : null, internalRef = (0, import_react3.useRef)();
|
|
3193
|
+
var componentState = cc ? States.get(cc) : null, internalRef = (0, import_react3.useRef)(null);
|
|
3194
3194
|
internalRef.current || (internalRef.current = {
|
|
3195
3195
|
keys: /* @__PURE__ */ new Set()
|
|
3196
3196
|
});
|
|
@@ -6679,7 +6679,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6679
6679
|
conf = conf || (0, import_config.getConfig)();
|
|
6680
6680
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
6681
6681
|
import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
6682
|
-
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);
|
|
6682
|
+
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);
|
|
6683
6683
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
|
|
6684
6684
|
var styleState = {
|
|
6685
6685
|
classNames,
|
|
@@ -6786,7 +6786,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6786
6786
|
var style2 = styleState.style;
|
|
6787
6787
|
if (0) {
|
|
6788
6788
|
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
6789
|
-
if (!
|
|
6789
|
+
if (!styleProps.isAnimated && isReactNative) {
|
|
6790
6790
|
var cnStyles, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
6791
6791
|
try {
|
|
6792
6792
|
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) var name;
|
|
@@ -6868,7 +6868,6 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6868
6868
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
6869
6869
|
}, useInsertEffectCompat = import_constants4.isWeb ? import_react3.default.useInsertionEffect || import_constants4.useIsomorphicLayoutEffect : function() {
|
|
6870
6870
|
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k) {
|
|
6871
|
-
conf = conf || (0, import_config.getConfig)();
|
|
6872
6871
|
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k);
|
|
6873
6872
|
return res;
|
|
6874
6873
|
};
|
|
@@ -7056,9 +7055,9 @@ var require_setElementProps_native = __commonJS({
|
|
|
7056
7055
|
}
|
|
7057
7056
|
});
|
|
7058
7057
|
|
|
7059
|
-
// ../../core/web/dist/cjs/helpers/
|
|
7060
|
-
var
|
|
7061
|
-
"../../core/web/dist/cjs/helpers/
|
|
7058
|
+
// ../../core/web/dist/cjs/helpers/useCreateShallowSetState.native.js
|
|
7059
|
+
var require_useCreateShallowSetState_native = __commonJS({
|
|
7060
|
+
"../../core/web/dist/cjs/helpers/useCreateShallowSetState.native.js"(exports2, module2) {
|
|
7062
7061
|
"use strict";
|
|
7063
7062
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7064
7063
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -7092,43 +7091,31 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
7092
7091
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7093
7092
|
value: !0
|
|
7094
7093
|
}), mod);
|
|
7095
|
-
},
|
|
7096
|
-
__export2(
|
|
7097
|
-
createShallowSetState: function() {
|
|
7098
|
-
return createShallowSetState;
|
|
7099
|
-
},
|
|
7094
|
+
}, useCreateShallowSetState_exports = {};
|
|
7095
|
+
__export2(useCreateShallowSetState_exports, {
|
|
7100
7096
|
isEqualShallow: function() {
|
|
7101
7097
|
return isEqualShallow;
|
|
7102
7098
|
},
|
|
7103
7099
|
mergeIfNotShallowEqual: function() {
|
|
7104
7100
|
return mergeIfNotShallowEqual;
|
|
7101
|
+
},
|
|
7102
|
+
useCreateShallowSetState: function() {
|
|
7103
|
+
return useCreateShallowSetState;
|
|
7105
7104
|
}
|
|
7106
7105
|
});
|
|
7107
|
-
module2.exports = __toCommonJS2(
|
|
7108
|
-
var import_react3 = require("react")
|
|
7109
|
-
|
|
7110
|
-
};
|
|
7111
|
-
function createShallowSetState(setter, onlyAllow, transition, debugIn) {
|
|
7106
|
+
module2.exports = __toCommonJS2(useCreateShallowSetState_exports);
|
|
7107
|
+
var import_react3 = require("react");
|
|
7108
|
+
function useCreateShallowSetState(setter, debugIn) {
|
|
7112
7109
|
return (0, import_react3.useCallback)(function(next) {
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
setter(function(prev) {
|
|
7116
|
-
return mergeIfNotShallowEqual(prev, next, onlyAllow, debugIn);
|
|
7117
|
-
});
|
|
7110
|
+
setter(function(prev) {
|
|
7111
|
+
return mergeIfNotShallowEqual(prev, next, debugIn);
|
|
7118
7112
|
});
|
|
7119
7113
|
}, [
|
|
7120
7114
|
setter,
|
|
7121
|
-
onlyAllow ? onlyAllow.join("") : "",
|
|
7122
|
-
transition,
|
|
7123
7115
|
debugIn
|
|
7124
7116
|
]);
|
|
7125
7117
|
}
|
|
7126
|
-
function mergeIfNotShallowEqual(prev, next,
|
|
7127
|
-
if (onlyAllow) {
|
|
7128
|
-
var allowed = {};
|
|
7129
|
-
for (var key in next) onlyAllow.includes(key) && (allowed[key] = next[key]);
|
|
7130
|
-
next = allowed;
|
|
7131
|
-
}
|
|
7118
|
+
function mergeIfNotShallowEqual(prev, next, debug) {
|
|
7132
7119
|
if (!prev || !next || isEqualShallow(prev, next)) return prev || next;
|
|
7133
7120
|
if (process.env.NODE_ENV === "development" && debug && (console.info("setStateShallow CHANGE", {
|
|
7134
7121
|
prev,
|
|
@@ -7189,7 +7176,7 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
7189
7176
|
}
|
|
7190
7177
|
});
|
|
7191
7178
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
7192
|
-
var import_useMedia = require_useMedia_native(),
|
|
7179
|
+
var import_useMedia = require_useMedia_native(), import_useCreateShallowSetState = require_useCreateShallowSetState_native(), subscribeToContextGroup = function(param) {
|
|
7193
7180
|
var { setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
7194
7181
|
if (pseudoGroups || mediaGroups) {
|
|
7195
7182
|
var _componentContext_groups_subscribe, _componentContext_groups;
|
|
@@ -7200,7 +7187,7 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
7200
7187
|
};
|
|
7201
7188
|
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
7202
7189
|
else if (layout && mediaGroups) {
|
|
7203
|
-
var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0,
|
|
7190
|
+
var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_useCreateShallowSetState.mergeIfNotShallowEqual)(current.media || {}, mediaState3);
|
|
7204
7191
|
next !== current.media && (Object.assign(current.media, next), persist());
|
|
7205
7192
|
}
|
|
7206
7193
|
function persist() {
|
|
@@ -8149,10 +8136,15 @@ var require_index_native13 = __commonJS({
|
|
|
8149
8136
|
},
|
|
8150
8137
|
useDidFinishSSR: function() {
|
|
8151
8138
|
return useDidFinishSSR2;
|
|
8139
|
+
},
|
|
8140
|
+
useIsClientOnly: function() {
|
|
8141
|
+
return useIsClientOnly;
|
|
8152
8142
|
}
|
|
8153
8143
|
});
|
|
8154
8144
|
module2.exports = __toCommonJS2(index_exports2);
|
|
8155
|
-
var React4 = __toESM2(require("react")), import_ClientOnly = require_ClientOnly_native(), import_ClientOnly2 = require_ClientOnly_native()
|
|
8145
|
+
var React4 = __toESM2(require("react")), import_ClientOnly = require_ClientOnly_native(), import_ClientOnly2 = require_ClientOnly_native(), useIsClientOnly = function() {
|
|
8146
|
+
return React4.useContext(import_ClientOnly.ClientOnlyContext);
|
|
8147
|
+
};
|
|
8156
8148
|
function useDidFinishSSR2(value) {
|
|
8157
8149
|
var clientOnly = React4.useContext(import_ClientOnly.ClientOnlyContext);
|
|
8158
8150
|
return value ?? !0;
|
|
@@ -8207,10 +8199,12 @@ var require_useComponentState_native = __commonJS({
|
|
|
8207
8199
|
}
|
|
8208
8200
|
});
|
|
8209
8201
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
8210
|
-
var import_constants4 = require_index_native6(), import_use_did_finish_ssr = require_index_native13(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(),
|
|
8211
|
-
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);
|
|
8202
|
+
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) {
|
|
8203
|
+
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);
|
|
8212
8204
|
stateRef.current || (stateRef.current = {});
|
|
8213
|
-
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current
|
|
8205
|
+
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current;
|
|
8206
|
+
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
8207
|
+
var willBeAnimatedClient = function() {
|
|
8214
8208
|
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
8215
8209
|
return !!(next || curStateRef.hasAnimated);
|
|
8216
8210
|
}(), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
|
|
@@ -8230,16 +8224,12 @@ var require_useComponentState_native = __commonJS({
|
|
|
8230
8224
|
...states[0],
|
|
8231
8225
|
[props.forceStyle]: !0
|
|
8232
8226
|
} : states[0], setState = states[1], isAnimated = willBeAnimated;
|
|
8233
|
-
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({
|
|
8234
|
-
|
|
8227
|
+
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(_) {
|
|
8228
|
+
return {
|
|
8229
|
+
...state
|
|
8230
|
+
};
|
|
8235
8231
|
}));
|
|
8236
|
-
var groupName = props.group, setStateShallow = (0,
|
|
8237
|
-
setState,
|
|
8238
|
-
void 0,
|
|
8239
|
-
// note: allows all state updates even when disabled for the enterStyle animation to work
|
|
8240
|
-
!1,
|
|
8241
|
-
props.debug
|
|
8242
|
-
);
|
|
8232
|
+
var groupName = props.group, setStateShallow = (0, import_useCreateShallowSetState.useCreateShallowSetState)(setState, props.debug);
|
|
8243
8233
|
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
8244
8234
|
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`has presenceState ${JSON.stringify(presenceState)}`);
|
|
8245
8235
|
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
@@ -8247,7 +8237,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
8247
8237
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
8248
8238
|
state.unmounted && env && staticConfig.variants[env] ? (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence ENTER "${env}"`), props[env] = !0) : isExiting && exv && (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence EXIT "${exv}"`), props[exv] = exitVariant !== enterExitVariant);
|
|
8249
8239
|
}
|
|
8250
|
-
var noClass = !import_constants4.isWeb || !!props.forceStyle;
|
|
8240
|
+
var noClass = !import_constants4.isWeb || !!props.forceStyle || isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles);
|
|
8251
8241
|
if (import_constants4.isWeb && (!import_constants4.isServer || isHydrated)) {
|
|
8252
8242
|
var isAnimatedAndHydrated = isAnimated && !supportsCSSVars, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
8253
8243
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
@@ -8276,6 +8266,26 @@ var require_useComponentState_native = __commonJS({
|
|
|
8276
8266
|
}
|
|
8277
8267
|
};
|
|
8278
8268
|
}
|
|
8269
|
+
if (!curStateRef.stateEmitter && hasAnimationProp) {
|
|
8270
|
+
var listeners1 = /* @__PURE__ */ new Set();
|
|
8271
|
+
curStateRef.stateEmitter = {
|
|
8272
|
+
listeners: listeners1,
|
|
8273
|
+
emit(state2) {
|
|
8274
|
+
listeners1.forEach(function(l) {
|
|
8275
|
+
return l(state2);
|
|
8276
|
+
});
|
|
8277
|
+
},
|
|
8278
|
+
subscribe(cb) {
|
|
8279
|
+
return listeners1.add(cb), setStateShallow({
|
|
8280
|
+
hasDynGroupChildren: !0
|
|
8281
|
+
}), function() {
|
|
8282
|
+
listeners1.delete(cb), listeners1.size === 0 && setStateShallow({
|
|
8283
|
+
hasDynGroupChildren: !1
|
|
8284
|
+
});
|
|
8285
|
+
};
|
|
8286
|
+
}
|
|
8287
|
+
};
|
|
8288
|
+
}
|
|
8279
8289
|
return {
|
|
8280
8290
|
startedUnhydrated,
|
|
8281
8291
|
curStateRef,
|
|
@@ -8639,10 +8649,14 @@ var require_createComponent_native = __commonJS({
|
|
|
8639
8649
|
}, [
|
|
8640
8650
|
componentName2
|
|
8641
8651
|
]);
|
|
8642
|
-
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState,
|
|
8652
|
+
var 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;
|
|
8643
8653
|
process.env.NODE_ENV === "development" && time2 && time2`use-state`;
|
|
8644
8654
|
var 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;
|
|
8645
|
-
animationDriver && isAnimated &&
|
|
8655
|
+
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
8656
|
+
// "needsWebStyles" basically with motion we just animate a plain div, but
|
|
8657
|
+
// we still have animated.View/Text for Sheet which wants to control
|
|
8658
|
+
// things declaratively
|
|
8659
|
+
!animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
8646
8660
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
8647
8661
|
process.env.NODE_ENV === "development" && time2 && time2`theme-props`, props.themeShallow && (curStateRef.themeShallow = !0);
|
|
8648
8662
|
var themeStateProps = {
|
|
@@ -8696,10 +8710,30 @@ var require_createComponent_native = __commonJS({
|
|
|
8696
8710
|
isExiting,
|
|
8697
8711
|
isAnimated,
|
|
8698
8712
|
willBeAnimated,
|
|
8699
|
-
styledContextProps
|
|
8713
|
+
styledContextProps,
|
|
8714
|
+
noMergeStyle: isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles)
|
|
8700
8715
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
8701
8716
|
process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
|
|
8702
8717
|
var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
8718
|
+
if (hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8719
|
+
var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
8720
|
+
setStateShallow = function(next) {
|
|
8721
|
+
var avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
8722
|
+
"hover",
|
|
8723
|
+
"press",
|
|
8724
|
+
"pressIn"
|
|
8725
|
+
]), canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
8726
|
+
return avoidReRenderKeys.has(key3);
|
|
8727
|
+
});
|
|
8728
|
+
if (canAvoidReRender) {
|
|
8729
|
+
var updatedState = {
|
|
8730
|
+
...state,
|
|
8731
|
+
...next
|
|
8732
|
+
}, nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, elementType, startedUnhydrated, debugProp);
|
|
8733
|
+
styleListener(nextStyles.style);
|
|
8734
|
+
} else ogSetStateShallow(next);
|
|
8735
|
+
};
|
|
8736
|
+
}
|
|
8703
8737
|
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, props.group && props.untilMeasured === "hide" && !curStateRef.hasMeasured) {
|
|
8704
8738
|
var _splitStyles;
|
|
8705
8739
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
@@ -8738,10 +8772,15 @@ var require_createComponent_native = __commonJS({
|
|
|
8738
8772
|
(supportsCSSVars ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
|
|
8739
8773
|
);
|
|
8740
8774
|
if (shouldUseAnimation) {
|
|
8741
|
-
var
|
|
8775
|
+
var useStyleEmitter = animationDriver != null && animationDriver.avoidReRenders ? function(listener) {
|
|
8776
|
+
stateRef.current.useStyleListener = listener;
|
|
8777
|
+
} : void 0, animations = useAnimations({
|
|
8742
8778
|
props: propsWithAnimation,
|
|
8743
8779
|
// if hydrating, send empty style
|
|
8744
8780
|
style: splitStylesStyle || {},
|
|
8781
|
+
// @ts-ignore
|
|
8782
|
+
styleState: splitStyles,
|
|
8783
|
+
useStyleEmitter,
|
|
8745
8784
|
presence,
|
|
8746
8785
|
componentState: state,
|
|
8747
8786
|
styleProps,
|
|
@@ -11632,7 +11671,7 @@ var require_index_native14 = __commonJS({
|
|
|
11632
11671
|
__reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
|
|
11633
11672
|
__reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
|
|
11634
11673
|
__reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
|
|
11635
|
-
__reExport2(index_exports2,
|
|
11674
|
+
__reExport2(index_exports2, require_useCreateShallowSetState_native(), module2.exports);
|
|
11636
11675
|
__reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
|
|
11637
11676
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
11638
11677
|
__reExport2(index_exports2, require_getExpandedShorthands_native(), module2.exports);
|
|
@@ -14247,11 +14286,11 @@ var require_Collection_native = __commonJS({
|
|
|
14247
14286
|
function createCollection(name) {
|
|
14248
14287
|
var { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = (0, import_core12.createStyledContext)({
|
|
14249
14288
|
collectionRef: {
|
|
14250
|
-
current:
|
|
14289
|
+
current: void 0
|
|
14251
14290
|
},
|
|
14252
14291
|
itemMap: /* @__PURE__ */ new Map()
|
|
14253
14292
|
}), CollectionProvider = function(props) {
|
|
14254
|
-
var { __scopeCollection, children } = props, ref = import_react3.default.useRef(
|
|
14293
|
+
var { __scopeCollection, children } = props, ref = import_react3.default.useRef(void 0), itemMap = import_react3.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
14255
14294
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollectionProviderImpl, {
|
|
14256
14295
|
scope: __scopeCollection,
|
|
14257
14296
|
itemMap,
|
|
@@ -14269,7 +14308,7 @@ var require_Collection_native = __commonJS({
|
|
|
14269
14308
|
});
|
|
14270
14309
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
14271
14310
|
var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
14272
|
-
var { __scopeCollection, children, ...itemData } = props, ref = import_react3.default.useRef(
|
|
14311
|
+
var { __scopeCollection, children, ...itemData } = props, ref = import_react3.default.useRef(void 0), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(__scopeCollection);
|
|
14273
14312
|
return import_react3.default.useEffect(function() {
|
|
14274
14313
|
return context.itemMap.set(ref, {
|
|
14275
14314
|
ref,
|
|
@@ -18301,7 +18340,7 @@ var require_nativeSheet_native = __commonJS({
|
|
|
18301
18340
|
function setupNativeSheet(platform2, RNIOSModal) {
|
|
18302
18341
|
var { ModalSheetView, ModalSheetViewMainContent } = RNIOSModal;
|
|
18303
18342
|
platform2 === "ios" && (nativeSheets[platform2] = function(props) {
|
|
18304
|
-
var state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0, import_react3.useRef)();
|
|
18343
|
+
var state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0, import_react3.useRef)(void 0);
|
|
18305
18344
|
(0, import_react3.useEffect)(function() {
|
|
18306
18345
|
if (open) {
|
|
18307
18346
|
var _ref_current;
|
|
@@ -18532,7 +18571,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18532
18571
|
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) {
|
|
18533
18572
|
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, {
|
|
18534
18573
|
onOverlayComponent: setOverlayComponent
|
|
18535
|
-
}), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(
|
|
18574
|
+
}), { 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() {
|
|
18536
18575
|
if (animationDriver.supportsCSSVars) return {};
|
|
18537
18576
|
var [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [
|
|
18538
18577
|
animation
|
|
@@ -18590,7 +18629,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18590
18629
|
}
|
|
18591
18630
|
});
|
|
18592
18631
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
18593
|
-
if (hasntMeasured && screenSize) {
|
|
18632
|
+
if (hasntMeasured && screenSize && frameSize) {
|
|
18594
18633
|
at.current = screenSize, animatedNumber.setValue(screenSize, {
|
|
18595
18634
|
type: "timing",
|
|
18596
18635
|
duration: 0
|
|
@@ -18753,10 +18792,9 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18753
18792
|
ref,
|
|
18754
18793
|
...panResponder == null ? void 0 : panResponder.panHandlers,
|
|
18755
18794
|
onLayout: handleAnimationViewLayout,
|
|
18756
|
-
|
|
18757
|
-
|
|
18758
|
-
|
|
18759
|
-
},
|
|
18795
|
+
// @ts-ignore for CSS driver this is necessary to attach the transition
|
|
18796
|
+
// also motion driver at least though i suspect all drivers?
|
|
18797
|
+
animation: isDragging || disableAnimation ? null : animation,
|
|
18760
18798
|
// @ts-ignore
|
|
18761
18799
|
disableClassName: !0,
|
|
18762
18800
|
style: [
|
|
@@ -19984,7 +20022,10 @@ var require_Dialog_native = __commonJS({
|
|
|
19984
20022
|
}
|
|
19985
20023
|
});
|
|
19986
20024
|
}), DialogContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19987
|
-
var { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(
|
|
20025
|
+
var { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(
|
|
20026
|
+
// TODO react 19 type workaround
|
|
20027
|
+
void 0
|
|
20028
|
+
), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
19988
20029
|
if (isAdapted) return !import_constants4.isWeb && !context.open ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19989
20030
|
children: contentProps.children
|
|
19990
20031
|
});
|
|
@@ -20514,7 +20555,10 @@ var require_AlertDialog_native = __commonJS({
|
|
|
20514
20555
|
try {
|
|
20515
20556
|
for (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
20516
20557
|
var child = _step.value;
|
|
20517
|
-
/* @__PURE__ */ React4.isValidElement(child) && onChild(child)
|
|
20558
|
+
if (/* @__PURE__ */ React4.isValidElement(child) && onChild(child)) {
|
|
20559
|
+
var childProps = child.props;
|
|
20560
|
+
childProps.children && forEachChildDeep(React4.Children.toArray(childProps.children), onChild);
|
|
20561
|
+
}
|
|
20518
20562
|
}
|
|
20519
20563
|
} catch (err) {
|
|
20520
20564
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -22216,7 +22260,7 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
22216
22260
|
module2.exports = __toCommonJS2(focusableInputHOC_exports);
|
|
22217
22261
|
var import_compose_refs = require_index_native11(), import_web = require_index_native14(), import_react3 = __toESM2(require("react")), import_registerFocusable = require_registerFocusable_native();
|
|
22218
22262
|
function useFocusable2(param) {
|
|
22219
|
-
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) {
|
|
22263
|
+
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) {
|
|
22220
22264
|
input.focus(), input.setSelection && typeof inputValue.current == "string" && input.setSelection(0, inputValue.current.length);
|
|
22221
22265
|
}, []), registerFocusableHandler = import_react3.default.useCallback(function(input) {
|
|
22222
22266
|
var _unregisterFocusable_current;
|
|
@@ -23513,7 +23557,7 @@ var require_Group_native = __commonJS({
|
|
|
23513
23557
|
}
|
|
23514
23558
|
var GroupItem = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
|
|
23515
23559
|
var { __scopeGroup, children, forcePlacement } = props, groupItemProps = useGroupItem({
|
|
23516
|
-
disabled: /* @__PURE__ */ import_react3.default.isValidElement(children) ? children.props.disabled :
|
|
23560
|
+
disabled: /* @__PURE__ */ import_react3.default.isValidElement(children) ? children.props.disabled : !1
|
|
23517
23561
|
}, forcePlacement, __scopeGroup);
|
|
23518
23562
|
return !/* @__PURE__ */ import_react3.default.isValidElement(children) || children.type === import_react3.default.Fragment ? children : /* @__PURE__ */ import_react3.default.cloneElement(children, groupItemProps);
|
|
23519
23563
|
}), useGroupItem = function(childrenProps, forcePlacement, __scopeGroup) {
|
|
@@ -25042,7 +25086,7 @@ var require_Popover_native = __commonJS({
|
|
|
25042
25086
|
Sheet: import_sheet.Sheet.Controlled,
|
|
25043
25087
|
FocusScope: import_focus_scope.FocusScopeController
|
|
25044
25088
|
}), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25045
|
-
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)({
|
|
25089
|
+
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)({
|
|
25046
25090
|
prop: openProp,
|
|
25047
25091
|
defaultProp: defaultOpen || !1,
|
|
25048
25092
|
onChange: function(val) {
|
|
@@ -25056,7 +25100,7 @@ var require_Popover_native = __commonJS({
|
|
|
25056
25100
|
disable: isAdapted,
|
|
25057
25101
|
hoverable,
|
|
25058
25102
|
disableFocus
|
|
25059
|
-
}), [anchorTo, setAnchorToRaw] = React4.useState(), setAnchorTo = (0, import_core12.
|
|
25103
|
+
}), [anchorTo, setAnchorToRaw] = React4.useState(), setAnchorTo = (0, import_core12.useCreateShallowSetState)(setAnchorToRaw);
|
|
25060
25104
|
React4.useImperativeHandle(forwardedRef, function() {
|
|
25061
25105
|
return {
|
|
25062
25106
|
anchorTo: setAnchorTo,
|
|
@@ -26998,7 +27042,7 @@ var require_SelectItemText_native = __commonJS({
|
|
|
26998
27042
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
26999
27043
|
}
|
|
27000
27044
|
}), SelectItemText = SelectItemTextFrame.styleable(function(props, forwardedRef) {
|
|
27001
|
-
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();
|
|
27045
|
+
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);
|
|
27002
27046
|
return contents.current = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemTextFrame, {
|
|
27003
27047
|
className,
|
|
27004
27048
|
size: itemParentContext.size,
|
|
@@ -27522,7 +27566,7 @@ var require_Select_native = __commonJS({
|
|
|
27522
27566
|
FocusScope: import_focus_scope.FocusScopeController
|
|
27523
27567
|
});
|
|
27524
27568
|
function useEmitter() {
|
|
27525
|
-
var listeners = React4.useRef();
|
|
27569
|
+
var listeners = React4.useRef(null);
|
|
27526
27570
|
listeners.current || (listeners.current = /* @__PURE__ */ new Set());
|
|
27527
27571
|
var emit = function(value) {
|
|
27528
27572
|
listeners.current.forEach(function(l) {
|
|
@@ -28141,7 +28185,7 @@ var require_Slider_native = __commonJS({
|
|
|
28141
28185
|
size: 0,
|
|
28142
28186
|
offset: 0
|
|
28143
28187
|
};
|
|
28144
|
-
}), setState = (0, import_core12.
|
|
28188
|
+
}), setState = (0, import_core12.useCreateShallowSetState)(setState_);
|
|
28145
28189
|
function getValueFromPointer(pointerPosition) {
|
|
28146
28190
|
var input = [
|
|
28147
28191
|
0,
|
|
@@ -28239,7 +28283,7 @@ var require_Slider_native = __commonJS({
|
|
|
28239
28283
|
size: 0,
|
|
28240
28284
|
offset: 0
|
|
28241
28285
|
};
|
|
28242
|
-
}), setState = (0, import_core12.
|
|
28286
|
+
}), setState = (0, import_core12.useCreateShallowSetState)(setState_), sliderRef = React4.useRef(null);
|
|
28243
28287
|
function getValueFromPointer(pointerPosition) {
|
|
28244
28288
|
var input = [
|
|
28245
28289
|
0,
|
|
@@ -29004,6 +29048,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
29004
29048
|
checked,
|
|
29005
29049
|
setChecked
|
|
29006
29050
|
],
|
|
29051
|
+
// @ts-ignore TODO tamagui react 19 type error
|
|
29007
29052
|
forwardedRef
|
|
29008
29053
|
);
|
|
29009
29054
|
React4.useEffect(function() {
|