tamagui 1.112.1 → 1.112.2
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 +282 -154
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +277 -147
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -6858,6 +6858,55 @@ var require_isActivePlatform_native = __commonJS({
|
|
|
6858
6858
|
}
|
|
6859
6859
|
});
|
|
6860
6860
|
|
|
6861
|
+
// ../../core/web/dist/cjs/helpers/sortString.native.js
|
|
6862
|
+
var require_sortString_native = __commonJS({
|
|
6863
|
+
"../../core/web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
|
|
6864
|
+
"use strict";
|
|
6865
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6866
|
+
for (var name in all) __defProp2(target, name, {
|
|
6867
|
+
get: all[name],
|
|
6868
|
+
enumerable: !0
|
|
6869
|
+
});
|
|
6870
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
6871
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6872
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
6873
|
+
for (var _loop = function() {
|
|
6874
|
+
var key = _step.value;
|
|
6875
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
6876
|
+
get: function() {
|
|
6877
|
+
return from[key];
|
|
6878
|
+
},
|
|
6879
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
6880
|
+
});
|
|
6881
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
6882
|
+
} catch (err) {
|
|
6883
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
6884
|
+
} finally {
|
|
6885
|
+
try {
|
|
6886
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
6887
|
+
} finally {
|
|
6888
|
+
if (_didIteratorError)
|
|
6889
|
+
throw _iteratorError;
|
|
6890
|
+
}
|
|
6891
|
+
}
|
|
6892
|
+
return to;
|
|
6893
|
+
}, __toCommonJS2 = function(mod) {
|
|
6894
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6895
|
+
value: !0
|
|
6896
|
+
}), mod);
|
|
6897
|
+
}, sortString_exports = {};
|
|
6898
|
+
__export2(sortString_exports, {
|
|
6899
|
+
sortString: function() {
|
|
6900
|
+
return sortString;
|
|
6901
|
+
}
|
|
6902
|
+
});
|
|
6903
|
+
module2.exports = __toCommonJS2(sortString_exports);
|
|
6904
|
+
var sortString = function(a, b) {
|
|
6905
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
6906
|
+
};
|
|
6907
|
+
}
|
|
6908
|
+
});
|
|
6909
|
+
|
|
6861
6910
|
// ../../core/web/dist/cjs/helpers/getSplitStyles.native.js
|
|
6862
6911
|
var require_getSplitStyles_native = __commonJS({
|
|
6863
6912
|
"../../core/web/dist/cjs/helpers/getSplitStyles.native.js"(exports2, module2) {
|
|
@@ -6922,7 +6971,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6922
6971
|
}
|
|
6923
6972
|
});
|
|
6924
6973
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
6925
|
-
var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_transformsToString = require_transformsToString_native(), import_isActivePlatform = require_isActivePlatform_native(), consoleGroupCollapsed = import_constants4.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
|
|
6974
|
+
var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_transformsToString = require_transformsToString_native(), import_isActivePlatform = require_isActivePlatform_native(), import_sortString = require_sortString_native(), consoleGroupCollapsed = import_constants4.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
|
|
6926
6975
|
function isValidStyleKey(key, staticConfig) {
|
|
6927
6976
|
var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
6928
6977
|
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
@@ -7257,7 +7306,7 @@ current`, {
|
|
|
7257
7306
|
var _styleState1;
|
|
7258
7307
|
(_styleState1 = styleState).style || (_styleState1.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
|
|
7259
7308
|
var [a] = param, [b] = param1;
|
|
7260
|
-
return
|
|
7309
|
+
return (0, import_sortString.sortString)(a, b);
|
|
7261
7310
|
}).forEach(function(param) {
|
|
7262
7311
|
var [key5, val3] = param;
|
|
7263
7312
|
mergeTransform(styleState.style, key5, val3, !0);
|
|
@@ -7599,6 +7648,78 @@ var require_setElementProps_native = __commonJS({
|
|
|
7599
7648
|
}
|
|
7600
7649
|
});
|
|
7601
7650
|
|
|
7651
|
+
// ../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js
|
|
7652
|
+
var require_subscribeToContextGroup_native = __commonJS({
|
|
7653
|
+
"../../core/web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
|
|
7654
|
+
"use strict";
|
|
7655
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7656
|
+
for (var name in all) __defProp2(target, name, {
|
|
7657
|
+
get: all[name],
|
|
7658
|
+
enumerable: !0
|
|
7659
|
+
});
|
|
7660
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
7661
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7662
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
7663
|
+
for (var _loop = function() {
|
|
7664
|
+
var key = _step.value;
|
|
7665
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
7666
|
+
get: function() {
|
|
7667
|
+
return from[key];
|
|
7668
|
+
},
|
|
7669
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
7670
|
+
});
|
|
7671
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
7672
|
+
} catch (err) {
|
|
7673
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
7674
|
+
} finally {
|
|
7675
|
+
try {
|
|
7676
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7677
|
+
} finally {
|
|
7678
|
+
if (_didIteratorError)
|
|
7679
|
+
throw _iteratorError;
|
|
7680
|
+
}
|
|
7681
|
+
}
|
|
7682
|
+
return to;
|
|
7683
|
+
}, __toCommonJS2 = function(mod) {
|
|
7684
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7685
|
+
value: !0
|
|
7686
|
+
}), mod);
|
|
7687
|
+
}, subscribeToContextGroup_exports = {};
|
|
7688
|
+
__export2(subscribeToContextGroup_exports, {
|
|
7689
|
+
subscribeToContextGroup: function() {
|
|
7690
|
+
return subscribeToContextGroup;
|
|
7691
|
+
}
|
|
7692
|
+
});
|
|
7693
|
+
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
7694
|
+
var import_createShallowSetState = require_createShallowSetState_native(), import_useMedia = require_useMedia_native(), subscribeToContextGroup = function(param) {
|
|
7695
|
+
var { disabled = !1, setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
7696
|
+
if (pseudoGroups || mediaGroups) {
|
|
7697
|
+
var _componentContext_groups_subscribe, _componentContext_groups, current = {
|
|
7698
|
+
pseudo: {},
|
|
7699
|
+
media: {}
|
|
7700
|
+
};
|
|
7701
|
+
return process.env.NODE_ENV === "development" && !componentContext.groups && console.debug("No context group found"), (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 || (_componentContext_groups_subscribe = _componentContext_groups.subscribe) === null || _componentContext_groups_subscribe === void 0 ? void 0 : _componentContext_groups_subscribe.call(_componentContext_groups, function(name, param2) {
|
|
7702
|
+
var { layout, pseudo } = param2;
|
|
7703
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
7704
|
+
else if (layout && mediaGroups) {
|
|
7705
|
+
var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState3);
|
|
7706
|
+
next !== current.media && (Object.assign(current.media, next), persist());
|
|
7707
|
+
}
|
|
7708
|
+
function persist() {
|
|
7709
|
+
var group = {
|
|
7710
|
+
...state.group,
|
|
7711
|
+
[name]: current
|
|
7712
|
+
};
|
|
7713
|
+
setStateShallow({
|
|
7714
|
+
group
|
|
7715
|
+
});
|
|
7716
|
+
}
|
|
7717
|
+
});
|
|
7718
|
+
}
|
|
7719
|
+
};
|
|
7720
|
+
}
|
|
7721
|
+
});
|
|
7722
|
+
|
|
7602
7723
|
// ../../core/web/dist/cjs/views/ThemeDebug.native.js
|
|
7603
7724
|
var require_ThemeDebug_native = __commonJS({
|
|
7604
7725
|
"../../core/web/dist/cjs/views/ThemeDebug.native.js"(exports2, module2) {
|
|
@@ -7943,6 +8064,154 @@ var require_useDidHydrateOnce_native = __commonJS({
|
|
|
7943
8064
|
}
|
|
7944
8065
|
});
|
|
7945
8066
|
|
|
8067
|
+
// ../../core/web/dist/cjs/hooks/useComponentState.native.js
|
|
8068
|
+
var require_useComponentState_native = __commonJS({
|
|
8069
|
+
"../../core/web/dist/cjs/hooks/useComponentState.native.js"(exports2, module2) {
|
|
8070
|
+
"use strict";
|
|
8071
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
8072
|
+
for (var name in all) __defProp2(target, name, {
|
|
8073
|
+
get: all[name],
|
|
8074
|
+
enumerable: !0
|
|
8075
|
+
});
|
|
8076
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
8077
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
8078
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
8079
|
+
for (var _loop = function() {
|
|
8080
|
+
var key = _step.value;
|
|
8081
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
8082
|
+
get: function() {
|
|
8083
|
+
return from[key];
|
|
8084
|
+
},
|
|
8085
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
8086
|
+
});
|
|
8087
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
8088
|
+
} catch (err) {
|
|
8089
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
8090
|
+
} finally {
|
|
8091
|
+
try {
|
|
8092
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
8093
|
+
} finally {
|
|
8094
|
+
if (_didIteratorError)
|
|
8095
|
+
throw _iteratorError;
|
|
8096
|
+
}
|
|
8097
|
+
}
|
|
8098
|
+
return to;
|
|
8099
|
+
}, __toCommonJS2 = function(mod) {
|
|
8100
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
8101
|
+
value: !0
|
|
8102
|
+
}), mod);
|
|
8103
|
+
}, useComponentState_exports = {};
|
|
8104
|
+
__export2(useComponentState_exports, {
|
|
8105
|
+
useComponentState: function() {
|
|
8106
|
+
return useComponentState;
|
|
8107
|
+
}
|
|
8108
|
+
});
|
|
8109
|
+
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
8110
|
+
var import_defaultComponentState = require_defaultComponentState_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_native(), import_react3 = require("react"), import_constants4 = require_index_native6(), import_createShallowSetState = require_createShallowSetState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, param, staticConfig, config) {
|
|
8111
|
+
var { animationDriver, groups } = param, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
8112
|
+
stateRef.current || (stateRef.current = {});
|
|
8113
|
+
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
8114
|
+
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
8115
|
+
return !!(next || curStateRef.hasAnimated);
|
|
8116
|
+
}(), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
|
|
8117
|
+
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
8118
|
+
var presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationDriver == null ? void 0 : animationDriver.isReactNative), hasEnterState = hasEnterStyle || isEntering, didHydrateOnce = willBeAnimated ? (0, import_useDidHydrateOnce.useDidHydrateOnce)() : !0, shouldEnter = hasEnterState || !didHydrateOnce && hasRNAnimation, shouldEnterFromUnhydrated = import_constants4.isWeb && !didHydrateOnce, initialState = shouldEnter ? (
|
|
8119
|
+
// on the very first render we switch all spring animation drivers to css rendering
|
|
8120
|
+
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
8121
|
+
// without flickers of the wrong colors.
|
|
8122
|
+
// but once we do that initial hydration and we are in client side rendering mode,
|
|
8123
|
+
// we can avoid the extra re-render on mount
|
|
8124
|
+
shouldEnterFromUnhydrated ? import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateShouldEnter
|
|
8125
|
+
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
8126
|
+
disabled != null && (initialState.disabled = disabled);
|
|
8127
|
+
var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
|
|
8128
|
+
...states[0],
|
|
8129
|
+
[props.forceStyle]: !0
|
|
8130
|
+
} : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
|
|
8131
|
+
import_constants4.isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({
|
|
8132
|
+
...state
|
|
8133
|
+
}));
|
|
8134
|
+
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug);
|
|
8135
|
+
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
8136
|
+
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`has presenceState ${JSON.stringify(presenceState)}`);
|
|
8137
|
+
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
8138
|
+
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
8139
|
+
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
8140
|
+
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);
|
|
8141
|
+
}
|
|
8142
|
+
var shouldAvoidClasses = !import_constants4.isWeb;
|
|
8143
|
+
if (import_constants4.isWeb) {
|
|
8144
|
+
var { disableClassName } = props, isAnimatedAndHydrated = isAnimated && !supportsCSSVars && didHydrateOnce && !import_constants4.isServer, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || didHydrateOnce), isDisabledManually = disableClassName && !import_constants4.isServer && didHydrateOnce && state.unmounted === !0;
|
|
8145
|
+
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (shouldAvoidClasses = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
8146
|
+
isAnimatedAndHydrated,
|
|
8147
|
+
isDisabledManually,
|
|
8148
|
+
isClassNameDisabled
|
|
8149
|
+
}));
|
|
8150
|
+
}
|
|
8151
|
+
var groupName = props.group;
|
|
8152
|
+
if (groupName && !curStateRef.group) {
|
|
8153
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
8154
|
+
curStateRef.group = {
|
|
8155
|
+
listeners,
|
|
8156
|
+
emit(name, state2) {
|
|
8157
|
+
listeners.forEach(function(l) {
|
|
8158
|
+
return l(name, state2);
|
|
8159
|
+
});
|
|
8160
|
+
},
|
|
8161
|
+
subscribe(cb) {
|
|
8162
|
+
return listeners.add(cb), function() {
|
|
8163
|
+
listeners.delete(cb);
|
|
8164
|
+
};
|
|
8165
|
+
}
|
|
8166
|
+
};
|
|
8167
|
+
}
|
|
8168
|
+
if (groupName) {
|
|
8169
|
+
var groupContextState = groups.state, og = setStateShallow;
|
|
8170
|
+
setStateShallow = function(state2) {
|
|
8171
|
+
og(state2), curStateRef.group.emit(groupName, {
|
|
8172
|
+
pseudo: state2
|
|
8173
|
+
});
|
|
8174
|
+
var next = {
|
|
8175
|
+
...groupContextState[groupName],
|
|
8176
|
+
...state2
|
|
8177
|
+
};
|
|
8178
|
+
groupContextState[groupName] = next;
|
|
8179
|
+
};
|
|
8180
|
+
}
|
|
8181
|
+
return {
|
|
8182
|
+
curStateRef,
|
|
8183
|
+
disabled,
|
|
8184
|
+
groupName,
|
|
8185
|
+
hasAnimationProp,
|
|
8186
|
+
hasEnterStyle,
|
|
8187
|
+
isAnimated,
|
|
8188
|
+
isExiting,
|
|
8189
|
+
isHydrated,
|
|
8190
|
+
presence,
|
|
8191
|
+
presenceState,
|
|
8192
|
+
setState,
|
|
8193
|
+
setStateShallow,
|
|
8194
|
+
shouldAvoidClasses,
|
|
8195
|
+
state,
|
|
8196
|
+
stateRef,
|
|
8197
|
+
supportsCSSVars,
|
|
8198
|
+
willBeAnimated,
|
|
8199
|
+
willBeAnimatedClient
|
|
8200
|
+
};
|
|
8201
|
+
};
|
|
8202
|
+
function hasAnimatedStyleValue(style) {
|
|
8203
|
+
return Object.keys(style).some(function(k) {
|
|
8204
|
+
var val = style[k];
|
|
8205
|
+
return val && typeof val == "object" && "_animation" in val;
|
|
8206
|
+
});
|
|
8207
|
+
}
|
|
8208
|
+
var isDisabled = function(props) {
|
|
8209
|
+
var _props_accessibilityState;
|
|
8210
|
+
return props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
|
|
8211
|
+
};
|
|
8212
|
+
}
|
|
8213
|
+
});
|
|
8214
|
+
|
|
7946
8215
|
// ../../core/web/dist/cjs/setupHooks.native.js
|
|
7947
8216
|
var require_setupHooks_native = __commonJS({
|
|
7948
8217
|
"../../core/web/dist/cjs/setupHooks.native.js"(exports2, module2) {
|
|
@@ -8152,21 +8421,12 @@ var require_createComponent_native = __commonJS({
|
|
|
8152
8421
|
createComponent: function() {
|
|
8153
8422
|
return createComponent2;
|
|
8154
8423
|
},
|
|
8155
|
-
isDisabled: function() {
|
|
8156
|
-
return isDisabled;
|
|
8157
|
-
},
|
|
8158
8424
|
spacedChildren: function() {
|
|
8159
8425
|
return spacedChildren2;
|
|
8160
|
-
},
|
|
8161
|
-
subscribeToContextGroup: function() {
|
|
8162
|
-
return subscribeToContextGroup;
|
|
8163
|
-
},
|
|
8164
|
-
useComponentState: function() {
|
|
8165
|
-
return useComponentState;
|
|
8166
8426
|
}
|
|
8167
8427
|
});
|
|
8168
8428
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8169
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
8429
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), import_ThemeDebug = require_ThemeDebug_native(), tamaguiConfig, time, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
|
|
8170
8430
|
typeof document < "u" && (cancelTouches = function() {
|
|
8171
8431
|
componentSetStates.forEach(function(setState) {
|
|
8172
8432
|
return setState(function(prev) {
|
|
@@ -8203,100 +8463,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8203
8463
|
});
|
|
8204
8464
|
}
|
|
8205
8465
|
}));
|
|
8206
|
-
var cancelTouches,
|
|
8207
|
-
var { animationDriver, groups } = param, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = import_react3.default.useRef(void 0);
|
|
8208
|
-
stateRef.current || (stateRef.current = {});
|
|
8209
|
-
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
8210
|
-
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
8211
|
-
return !!(next || curStateRef.hasAnimated);
|
|
8212
|
-
}(), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
|
|
8213
|
-
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
8214
|
-
var presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationDriver == null ? void 0 : animationDriver.isReactNative);
|
|
8215
|
-
process.env.NODE_ENV === "development" && time && time`pre-use-state`;
|
|
8216
|
-
var hasEnterState = hasEnterStyle || isEntering, didHydrateOnce = willBeAnimated ? (0, import_useDidHydrateOnce.useDidHydrateOnce)() : !0, shouldEnter = hasEnterState || !didHydrateOnce && hasRNAnimation, shouldEnterFromUnhydrated = import_constants4.isWeb && !didHydrateOnce, initialState = shouldEnter ? (
|
|
8217
|
-
// on the very first render we switch all spring animation drivers to css rendering
|
|
8218
|
-
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
8219
|
-
// without flickers of the wrong colors.
|
|
8220
|
-
// but once we do that initial hydration and we are in client side rendering mode,
|
|
8221
|
-
// we can avoid the extra re-render on mount
|
|
8222
|
-
shouldEnterFromUnhydrated ? import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateShouldEnter
|
|
8223
|
-
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
8224
|
-
disabled != null && (initialState.disabled = disabled);
|
|
8225
|
-
var states = import_react3.default.useState(initialState), state = props.forceStyle ? {
|
|
8226
|
-
...states[0],
|
|
8227
|
-
[props.forceStyle]: !0
|
|
8228
|
-
} : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
|
|
8229
|
-
import_constants4.isWeb && hasRNAnimation && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({
|
|
8230
|
-
...state
|
|
8231
|
-
}));
|
|
8232
|
-
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug);
|
|
8233
|
-
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
8234
|
-
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`has presenceState ${JSON.stringify(presenceState)}`);
|
|
8235
|
-
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
8236
|
-
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
8237
|
-
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
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);
|
|
8239
|
-
}
|
|
8240
|
-
var shouldAvoidClasses = !import_constants4.isWeb;
|
|
8241
|
-
if (import_constants4.isWeb) {
|
|
8242
|
-
var { disableClassName } = props, isAnimatedAndHydrated = isAnimated && !supportsCSSVars && didHydrateOnce && !import_constants4.isServer, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || didHydrateOnce), isDisabledManually = disableClassName && !import_constants4.isServer && didHydrateOnce && state.unmounted === !0;
|
|
8243
|
-
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (shouldAvoidClasses = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
8244
|
-
isAnimatedAndHydrated,
|
|
8245
|
-
isDisabledManually,
|
|
8246
|
-
isClassNameDisabled
|
|
8247
|
-
}));
|
|
8248
|
-
}
|
|
8249
|
-
var groupName = props.group;
|
|
8250
|
-
if (groupName && !curStateRef.group) {
|
|
8251
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
8252
|
-
curStateRef.group = {
|
|
8253
|
-
listeners,
|
|
8254
|
-
emit(name, state2) {
|
|
8255
|
-
listeners.forEach(function(l) {
|
|
8256
|
-
return l(name, state2);
|
|
8257
|
-
});
|
|
8258
|
-
},
|
|
8259
|
-
subscribe(cb) {
|
|
8260
|
-
return listeners.add(cb), function() {
|
|
8261
|
-
listeners.delete(cb);
|
|
8262
|
-
};
|
|
8263
|
-
}
|
|
8264
|
-
};
|
|
8265
|
-
}
|
|
8266
|
-
if (groupName) {
|
|
8267
|
-
var groupContextState = groups.state, og = setStateShallow;
|
|
8268
|
-
setStateShallow = function(state2) {
|
|
8269
|
-
og(state2), curStateRef.group.emit(groupName, {
|
|
8270
|
-
pseudo: state2
|
|
8271
|
-
});
|
|
8272
|
-
var next = {
|
|
8273
|
-
...groupContextState[groupName],
|
|
8274
|
-
...state2
|
|
8275
|
-
};
|
|
8276
|
-
groupContextState[groupName] = next;
|
|
8277
|
-
};
|
|
8278
|
-
}
|
|
8279
|
-
return {
|
|
8280
|
-
curStateRef,
|
|
8281
|
-
disabled,
|
|
8282
|
-
groupName,
|
|
8283
|
-
hasAnimationProp,
|
|
8284
|
-
hasEnterStyle,
|
|
8285
|
-
isAnimated,
|
|
8286
|
-
isExiting,
|
|
8287
|
-
isHydrated,
|
|
8288
|
-
presence,
|
|
8289
|
-
presenceState,
|
|
8290
|
-
setState,
|
|
8291
|
-
setStateShallow,
|
|
8292
|
-
shouldAvoidClasses,
|
|
8293
|
-
state,
|
|
8294
|
-
stateRef,
|
|
8295
|
-
supportsCSSVars,
|
|
8296
|
-
willBeAnimated,
|
|
8297
|
-
willBeAnimatedClient
|
|
8298
|
-
};
|
|
8299
|
-
}, BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
8466
|
+
var cancelTouches, BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
8300
8467
|
value: !1
|
|
8301
8468
|
};
|
|
8302
8469
|
import_constants4.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
|
|
@@ -8317,7 +8484,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8317
8484
|
});
|
|
8318
8485
|
}
|
|
8319
8486
|
});
|
|
8320
|
-
var { Component, isText, isZStack, isHOC
|
|
8487
|
+
var { Component, isText, isZStack, isHOC } = staticConfig;
|
|
8321
8488
|
process.env.NODE_ENV === "development" && !((_staticConfig_defaultProps = staticConfig.defaultProps) === null || _staticConfig_defaultProps === void 0) && _staticConfig_defaultProps.debug && process.env.IS_STATIC !== "is_static" && (0, import_log.log)(`\u{1F41B} [${componentName || "Component"}]`, {
|
|
8322
8489
|
staticConfig,
|
|
8323
8490
|
defaultProps,
|
|
@@ -8370,7 +8537,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8370
8537
|
]), !1)
|
|
8371
8538
|
var timer;
|
|
8372
8539
|
process.env.NODE_ENV === "development" && time && time`start (ignore)`, process.env.NODE_ENV === "development" && time && time`did-finish-ssr`, process.env.NODE_ENV === "development" && time && time`stateref`;
|
|
8373
|
-
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow, shouldAvoidClasses, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient } = useComponentState(props, componentContext, staticConfig, config), shouldForcePseudo = !!propsIn.forceStyle, noClassNames = shouldAvoidClasses || shouldForcePseudo;
|
|
8540
|
+
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow, shouldAvoidClasses, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), shouldForcePseudo = !!propsIn.forceStyle, noClassNames = shouldAvoidClasses || shouldForcePseudo;
|
|
8374
8541
|
process.env.NODE_ENV === "development" && time && time`use-state`;
|
|
8375
8542
|
var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText);
|
|
8376
8543
|
process.env.NODE_ENV === "development" && time && time`use-context`;
|
|
@@ -8541,7 +8708,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8541
8708
|
});
|
|
8542
8709
|
return;
|
|
8543
8710
|
}
|
|
8544
|
-
var dispose = subscribeToContextGroup({
|
|
8711
|
+
var dispose = (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
8545
8712
|
disabled,
|
|
8546
8713
|
componentContext,
|
|
8547
8714
|
setStateShallow,
|
|
@@ -8905,43 +9072,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8905
9072
|
left: 0,
|
|
8906
9073
|
pointerEvents: "box-none"
|
|
8907
9074
|
}
|
|
8908
|
-
})
|
|
8909
|
-
function hasAnimatedStyleValue(style) {
|
|
8910
|
-
return Object.keys(style).some(function(k) {
|
|
8911
|
-
var val = style[k];
|
|
8912
|
-
return val && typeof val == "object" && "_animation" in val;
|
|
8913
|
-
});
|
|
8914
|
-
}
|
|
8915
|
-
var fromPx = function(val) {
|
|
9075
|
+
}), fromPx = function(val) {
|
|
8916
9076
|
return typeof val != "string" ? val : +val.replace("px", "");
|
|
8917
|
-
}, isDisabled = function(props) {
|
|
8918
|
-
var _props_accessibilityState;
|
|
8919
|
-
return props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
|
|
8920
|
-
}, subscribeToContextGroup = function(param) {
|
|
8921
|
-
var { disabled = !1, setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
8922
|
-
if (pseudoGroups || mediaGroups) {
|
|
8923
|
-
var _componentContext_groups_subscribe, _componentContext_groups, current = {
|
|
8924
|
-
pseudo: {},
|
|
8925
|
-
media: {}
|
|
8926
|
-
};
|
|
8927
|
-
return process.env.NODE_ENV === "development" && !componentContext.groups && console.debug("No context group found"), (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 || (_componentContext_groups_subscribe = _componentContext_groups.subscribe) === null || _componentContext_groups_subscribe === void 0 ? void 0 : _componentContext_groups_subscribe.call(_componentContext_groups, function(name, param2) {
|
|
8928
|
-
var { layout, pseudo } = param2;
|
|
8929
|
-
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
8930
|
-
else if (layout && mediaGroups) {
|
|
8931
|
-
var mediaState3 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState3);
|
|
8932
|
-
next !== current.media && (Object.assign(current.media, next), persist());
|
|
8933
|
-
}
|
|
8934
|
-
function persist() {
|
|
8935
|
-
var group = {
|
|
8936
|
-
...state.group,
|
|
8937
|
-
[name]: current
|
|
8938
|
-
};
|
|
8939
|
-
setStateShallow({
|
|
8940
|
-
group
|
|
8941
|
-
});
|
|
8942
|
-
}
|
|
8943
|
-
});
|
|
8944
|
-
}
|
|
8945
9077
|
};
|
|
8946
9078
|
}
|
|
8947
9079
|
});
|
|
@@ -9644,9 +9776,8 @@ var require_createTamagui_native = __commonJS({
|
|
|
9644
9776
|
var foundThemes;
|
|
9645
9777
|
if (configIn.themes) {
|
|
9646
9778
|
var noThemes = Object.keys(configIn.themes).length === 0;
|
|
9647
|
-
foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed);
|
|
9779
|
+
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed)), process.env.TAMAGUI_REACT_19 && process.env.TAMAGUI_SKIP_THEME_OPTIMIZATION || noThemes && (0, import_insertStyleRule.listenForSheetChanges)();
|
|
9648
9780
|
}
|
|
9649
|
-
(0, import_insertStyleRule.listenForSheetChanges)();
|
|
9650
9781
|
var fontSizeTokens = null, fontsParsed;
|
|
9651
9782
|
if (configIn.fonts) {
|
|
9652
9783
|
var fontTokens = Object.fromEntries(Object.entries(configIn.fonts).map(function(param) {
|
|
@@ -9696,9 +9827,7 @@ ${JSON.stringify(variable, null, 2)}`);
|
|
|
9696
9827
|
cssRuleSets.push(specificRuleSet);
|
|
9697
9828
|
}
|
|
9698
9829
|
}
|
|
9699
|
-
var themesIn =
|
|
9700
|
-
...configIn.themes
|
|
9701
|
-
}, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
|
|
9830
|
+
var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
|
|
9702
9831
|
return {
|
|
9703
9832
|
themes,
|
|
9704
9833
|
cssRuleSets,
|
|
@@ -10827,7 +10956,7 @@ var require_useProps_native = __commonJS({
|
|
|
10827
10956
|
}
|
|
10828
10957
|
});
|
|
10829
10958
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
10830
|
-
var import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(),
|
|
10959
|
+
var import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_getSplitStyles = require_getSplitStyles_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_Stack = require_Stack_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native();
|
|
10831
10960
|
function useProps2(props, opts) {
|
|
10832
10961
|
var [propsOut, styleOut] = usePropsAndStyle2(props, {
|
|
10833
10962
|
...opts,
|
|
@@ -10848,7 +10977,7 @@ var require_useProps_native = __commonJS({
|
|
|
10848
10977
|
componentName: staticConfig.componentName,
|
|
10849
10978
|
name: "theme" in props ? props.theme : void 0,
|
|
10850
10979
|
inverse: "themeInverse" in props ? props.themeInverse : void 0
|
|
10851
|
-
}), componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), { state, disabled, setStateShallow } = (0,
|
|
10980
|
+
}), componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), { state, disabled, setStateShallow } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, (0, import_config.getConfig)()), media = (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, ((_themeState_state = themeState.state) === null || _themeState_state === void 0 ? void 0 : _themeState_state.name) || "", state, {
|
|
10852
10981
|
isAnimated: !1,
|
|
10853
10982
|
mediaState: media,
|
|
10854
10983
|
noSkip: !0,
|
|
@@ -10865,7 +10994,7 @@ var require_useProps_native = __commonJS({
|
|
|
10865
10994
|
});
|
|
10866
10995
|
return;
|
|
10867
10996
|
}
|
|
10868
|
-
return (0,
|
|
10997
|
+
return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
10869
10998
|
disabled,
|
|
10870
10999
|
componentContext,
|
|
10871
11000
|
setStateShallow,
|
|
@@ -25124,7 +25253,6 @@ var require_Popover_native = __commonJS({
|
|
|
25124
25253
|
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
25125
25254
|
if (!props.children) return null;
|
|
25126
25255
|
var trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
25127
|
-
"aria-haspopup": "dialog",
|
|
25128
25256
|
"aria-expanded": context.open,
|
|
25129
25257
|
// TODO not matching
|
|
25130
25258
|
// aria-controls={context.contentId}
|