@tamagui/core 1.112.0 → 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/cjs/react-native-web/Dimensions.js +79 -0
- package/dist/cjs/react-native-web/Dimensions.js.map +6 -0
- package/dist/cjs/react-native-web/Dimensions.native.js +87 -0
- package/dist/cjs/react-native-web/Dimensions.native.js.map +6 -0
- package/dist/esm/react-native-web/Dimensions.js +63 -0
- package/dist/esm/react-native-web/Dimensions.js.map +6 -0
- package/dist/esm/react-native-web/Dimensions.mjs +61 -0
- package/dist/esm/react-native-web/Dimensions.mjs.map +1 -0
- package/dist/esm/react-native-web/Dimensions.native.js +67 -0
- package/dist/esm/react-native-web/Dimensions.native.js.map +1 -0
- package/dist/native.js +327 -180
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +296 -165
- package/dist/test.native.js.map +3 -3
- package/package.json +8 -8
- package/types/react-native-web/Dimensions.d.ts +22 -0
- package/types/react-native-web/Dimensions.d.ts.map +1 -0
- package/types/react-native-web.d.ts +18 -1
- package/types/react-native-web.d.ts.map +1 -1
- package/src/react-native-web.ts +0 -23
package/dist/test.native.js
CHANGED
|
@@ -1995,7 +1995,7 @@ var require_config_native = __commonJS({
|
|
|
1995
1995
|
return onConfiguredOnce;
|
|
1996
1996
|
},
|
|
1997
1997
|
setConfig: function() {
|
|
1998
|
-
return
|
|
1998
|
+
return setConfig2;
|
|
1999
1999
|
},
|
|
2000
2000
|
setConfigFont: function() {
|
|
2001
2001
|
return setConfigFont;
|
|
@@ -2020,7 +2020,7 @@ var require_config_native = __commonJS({
|
|
|
2020
2020
|
// @ts-expect-error
|
|
2021
2021
|
conf[key]
|
|
2022
2022
|
);
|
|
2023
|
-
},
|
|
2023
|
+
}, setConfig2 = function(next) {
|
|
2024
2024
|
conf = next;
|
|
2025
2025
|
}, setConfigFont = function(name, font, fontParsed) {
|
|
2026
2026
|
conf.fonts[name] = font, conf.fontsParsed[`$${name}`] = fontParsed;
|
|
@@ -2306,23 +2306,20 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2306
2306
|
function scanAllSheets() {
|
|
2307
2307
|
var collectThemes = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, tokens = arguments.length > 1 ? arguments[1] : void 0;
|
|
2308
2308
|
if (0) {
|
|
2309
|
-
var themes, sheets, prev, current;
|
|
2310
|
-
|
|
2311
|
-
var
|
|
2309
|
+
var themes, sheets, prev, current, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
2310
|
+
try {
|
|
2311
|
+
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
2312
|
+
var sheet2;
|
|
2313
|
+
if (sheet2)
|
|
2314
|
+
var out;
|
|
2315
|
+
}
|
|
2316
|
+
} catch (err) {
|
|
2317
|
+
} finally {
|
|
2312
2318
|
try {
|
|
2313
|
-
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
2314
|
-
var sheet2;
|
|
2315
|
-
if (sheet2)
|
|
2316
|
-
var out;
|
|
2317
|
-
}
|
|
2318
|
-
} catch (err) {
|
|
2319
2319
|
} finally {
|
|
2320
|
-
try {
|
|
2321
|
-
} finally {
|
|
2322
|
-
}
|
|
2323
2320
|
}
|
|
2324
2321
|
}
|
|
2325
|
-
if (prev) {
|
|
2322
|
+
if (lastScannedSheets = current, prev) {
|
|
2326
2323
|
var _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1;
|
|
2327
2324
|
try {
|
|
2328
2325
|
for (var _iterator1, _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0)
|
|
@@ -6359,6 +6356,55 @@ var require_isActivePlatform_native = __commonJS({
|
|
|
6359
6356
|
}
|
|
6360
6357
|
});
|
|
6361
6358
|
|
|
6359
|
+
// ../web/dist/cjs/helpers/sortString.native.js
|
|
6360
|
+
var require_sortString_native = __commonJS({
|
|
6361
|
+
"../web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
|
|
6362
|
+
"use strict";
|
|
6363
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6364
|
+
for (var name in all) __defProp2(target, name, {
|
|
6365
|
+
get: all[name],
|
|
6366
|
+
enumerable: !0
|
|
6367
|
+
});
|
|
6368
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
6369
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6370
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
6371
|
+
for (var _loop = function() {
|
|
6372
|
+
var key = _step.value;
|
|
6373
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
6374
|
+
get: function() {
|
|
6375
|
+
return from[key];
|
|
6376
|
+
},
|
|
6377
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
6378
|
+
});
|
|
6379
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
6380
|
+
} catch (err) {
|
|
6381
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
6382
|
+
} finally {
|
|
6383
|
+
try {
|
|
6384
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
6385
|
+
} finally {
|
|
6386
|
+
if (_didIteratorError)
|
|
6387
|
+
throw _iteratorError;
|
|
6388
|
+
}
|
|
6389
|
+
}
|
|
6390
|
+
return to;
|
|
6391
|
+
}, __toCommonJS2 = function(mod) {
|
|
6392
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6393
|
+
value: !0
|
|
6394
|
+
}), mod);
|
|
6395
|
+
}, sortString_exports = {};
|
|
6396
|
+
__export2(sortString_exports, {
|
|
6397
|
+
sortString: function() {
|
|
6398
|
+
return sortString;
|
|
6399
|
+
}
|
|
6400
|
+
});
|
|
6401
|
+
module2.exports = __toCommonJS2(sortString_exports);
|
|
6402
|
+
var sortString = function(a, b) {
|
|
6403
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
6404
|
+
};
|
|
6405
|
+
}
|
|
6406
|
+
});
|
|
6407
|
+
|
|
6362
6408
|
// ../web/dist/cjs/helpers/getSplitStyles.native.js
|
|
6363
6409
|
var require_getSplitStyles_native = __commonJS({
|
|
6364
6410
|
"../web/dist/cjs/helpers/getSplitStyles.native.js"(exports2, module2) {
|
|
@@ -6423,7 +6469,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6423
6469
|
}
|
|
6424
6470
|
});
|
|
6425
6471
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
6426
|
-
var import_react3 = __toESM2(require("react")), import_constants = require_index_native3(), import_helpers = require_index_native4(), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = 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_constants.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
|
|
6472
|
+
var import_react3 = __toESM2(require("react")), import_constants = require_index_native3(), import_helpers = require_index_native4(), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = 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_constants.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
|
|
6427
6473
|
function isValidStyleKey(key, staticConfig) {
|
|
6428
6474
|
var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
6429
6475
|
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
@@ -6664,7 +6710,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6664
6710
|
var _styleState1;
|
|
6665
6711
|
(_styleState1 = styleState).style || (_styleState1.style = {}), Object.entries(styleState.flatTransforms).sort(function(param, param1) {
|
|
6666
6712
|
var [a] = param, [b] = param1;
|
|
6667
|
-
return
|
|
6713
|
+
return (0, import_sortString.sortString)(a, b);
|
|
6668
6714
|
}).forEach(function(param) {
|
|
6669
6715
|
var [key5, val3] = param;
|
|
6670
6716
|
mergeTransform(styleState.style, key5, val3, !0);
|
|
@@ -6994,6 +7040,78 @@ var require_setElementProps_native = __commonJS({
|
|
|
6994
7040
|
}
|
|
6995
7041
|
});
|
|
6996
7042
|
|
|
7043
|
+
// ../web/dist/cjs/helpers/subscribeToContextGroup.native.js
|
|
7044
|
+
var require_subscribeToContextGroup_native = __commonJS({
|
|
7045
|
+
"../web/dist/cjs/helpers/subscribeToContextGroup.native.js"(exports2, module2) {
|
|
7046
|
+
"use strict";
|
|
7047
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7048
|
+
for (var name in all) __defProp2(target, name, {
|
|
7049
|
+
get: all[name],
|
|
7050
|
+
enumerable: !0
|
|
7051
|
+
});
|
|
7052
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
7053
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7054
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
7055
|
+
for (var _loop = function() {
|
|
7056
|
+
var key = _step.value;
|
|
7057
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
7058
|
+
get: function() {
|
|
7059
|
+
return from[key];
|
|
7060
|
+
},
|
|
7061
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
7062
|
+
});
|
|
7063
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
7064
|
+
} catch (err) {
|
|
7065
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
7066
|
+
} finally {
|
|
7067
|
+
try {
|
|
7068
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7069
|
+
} finally {
|
|
7070
|
+
if (_didIteratorError)
|
|
7071
|
+
throw _iteratorError;
|
|
7072
|
+
}
|
|
7073
|
+
}
|
|
7074
|
+
return to;
|
|
7075
|
+
}, __toCommonJS2 = function(mod) {
|
|
7076
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7077
|
+
value: !0
|
|
7078
|
+
}), mod);
|
|
7079
|
+
}, subscribeToContextGroup_exports = {};
|
|
7080
|
+
__export2(subscribeToContextGroup_exports, {
|
|
7081
|
+
subscribeToContextGroup: function() {
|
|
7082
|
+
return subscribeToContextGroup;
|
|
7083
|
+
}
|
|
7084
|
+
});
|
|
7085
|
+
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
7086
|
+
var import_createShallowSetState = require_createShallowSetState_native(), import_useMedia = require_useMedia_native(), subscribeToContextGroup = function(param) {
|
|
7087
|
+
var { disabled = !1, setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
7088
|
+
if (pseudoGroups || mediaGroups) {
|
|
7089
|
+
var _componentContext_groups_subscribe, _componentContext_groups, current = {
|
|
7090
|
+
pseudo: {},
|
|
7091
|
+
media: {}
|
|
7092
|
+
};
|
|
7093
|
+
return (_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) {
|
|
7094
|
+
var { layout, pseudo } = param2;
|
|
7095
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
7096
|
+
else if (layout && mediaGroups) {
|
|
7097
|
+
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState2);
|
|
7098
|
+
next !== current.media && (Object.assign(current.media, next), persist());
|
|
7099
|
+
}
|
|
7100
|
+
function persist() {
|
|
7101
|
+
var group = {
|
|
7102
|
+
...state.group,
|
|
7103
|
+
[name]: current
|
|
7104
|
+
};
|
|
7105
|
+
setStateShallow({
|
|
7106
|
+
group
|
|
7107
|
+
});
|
|
7108
|
+
}
|
|
7109
|
+
});
|
|
7110
|
+
}
|
|
7111
|
+
};
|
|
7112
|
+
}
|
|
7113
|
+
});
|
|
7114
|
+
|
|
6997
7115
|
// ../web/dist/cjs/views/ThemeDebug.native.js
|
|
6998
7116
|
var require_ThemeDebug_native = __commonJS({
|
|
6999
7117
|
"../web/dist/cjs/views/ThemeDebug.native.js"(exports2, module2) {
|
|
@@ -7126,7 +7244,7 @@ var require_Theme_native = __commonJS({
|
|
|
7126
7244
|
Theme.avoidForwardRef = !0;
|
|
7127
7245
|
function getThemedChildren(themeState, children, props) {
|
|
7128
7246
|
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, { themeManager, isNewTheme } = themeState;
|
|
7129
|
-
if (!themeManager)
|
|
7247
|
+
if (!themeManager) return children;
|
|
7130
7248
|
var { shallow, forceClassName } = props, shouldRenderChildrenWithTheme = isNewTheme || isRoot || stateRef.current.hasEverThemed || typeof props.inverse == "boolean";
|
|
7131
7249
|
if (shouldRenderChildrenWithTheme && (stateRef.current.hasEverThemed = !0), !shouldRenderChildrenWithTheme) return children;
|
|
7132
7250
|
var next = children;
|
|
@@ -7332,6 +7450,149 @@ var require_useDidHydrateOnce_native = __commonJS({
|
|
|
7332
7450
|
}
|
|
7333
7451
|
});
|
|
7334
7452
|
|
|
7453
|
+
// ../web/dist/cjs/hooks/useComponentState.native.js
|
|
7454
|
+
var require_useComponentState_native = __commonJS({
|
|
7455
|
+
"../web/dist/cjs/hooks/useComponentState.native.js"(exports2, module2) {
|
|
7456
|
+
"use strict";
|
|
7457
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7458
|
+
for (var name in all) __defProp2(target, name, {
|
|
7459
|
+
get: all[name],
|
|
7460
|
+
enumerable: !0
|
|
7461
|
+
});
|
|
7462
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
7463
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7464
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
7465
|
+
for (var _loop = function() {
|
|
7466
|
+
var key = _step.value;
|
|
7467
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
7468
|
+
get: function() {
|
|
7469
|
+
return from[key];
|
|
7470
|
+
},
|
|
7471
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
7472
|
+
});
|
|
7473
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
7474
|
+
} catch (err) {
|
|
7475
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
7476
|
+
} finally {
|
|
7477
|
+
try {
|
|
7478
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7479
|
+
} finally {
|
|
7480
|
+
if (_didIteratorError)
|
|
7481
|
+
throw _iteratorError;
|
|
7482
|
+
}
|
|
7483
|
+
}
|
|
7484
|
+
return to;
|
|
7485
|
+
}, __toCommonJS2 = function(mod) {
|
|
7486
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7487
|
+
value: !0
|
|
7488
|
+
}), mod);
|
|
7489
|
+
}, useComponentState_exports = {};
|
|
7490
|
+
__export2(useComponentState_exports, {
|
|
7491
|
+
useComponentState: function() {
|
|
7492
|
+
return useComponentState;
|
|
7493
|
+
}
|
|
7494
|
+
});
|
|
7495
|
+
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
7496
|
+
var import_defaultComponentState = require_defaultComponentState_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_native(), import_react3 = require("react"), import_constants = require_index_native3(), import_createShallowSetState = require_createShallowSetState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, param, staticConfig, config) {
|
|
7497
|
+
var { animationDriver, groups } = param, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
7498
|
+
stateRef.current || (stateRef.current = {});
|
|
7499
|
+
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
7500
|
+
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
7501
|
+
return !!(next || curStateRef.hasAnimated);
|
|
7502
|
+
}(), willBeAnimated = !import_constants.isServer && willBeAnimatedClient;
|
|
7503
|
+
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
7504
|
+
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_constants.isWeb && !didHydrateOnce, initialState = shouldEnter ? (
|
|
7505
|
+
// on the very first render we switch all spring animation drivers to css rendering
|
|
7506
|
+
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
7507
|
+
// without flickers of the wrong colors.
|
|
7508
|
+
// but once we do that initial hydration and we are in client side rendering mode,
|
|
7509
|
+
// we can avoid the extra re-render on mount
|
|
7510
|
+
shouldEnterFromUnhydrated ? import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateShouldEnter
|
|
7511
|
+
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
7512
|
+
disabled != null && (initialState.disabled = disabled);
|
|
7513
|
+
var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
|
|
7514
|
+
...states[0],
|
|
7515
|
+
[props.forceStyle]: !0
|
|
7516
|
+
} : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
|
|
7517
|
+
import_constants.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({
|
|
7518
|
+
...state
|
|
7519
|
+
}));
|
|
7520
|
+
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug);
|
|
7521
|
+
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
7522
|
+
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
7523
|
+
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
7524
|
+
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
7525
|
+
state.unmounted && env && staticConfig.variants[env] ? props[env] = !0 : isExiting && exv && (props[exv] = exitVariant !== enterExitVariant);
|
|
7526
|
+
}
|
|
7527
|
+
var shouldAvoidClasses = !import_constants.isWeb;
|
|
7528
|
+
if (import_constants.isWeb) {
|
|
7529
|
+
var { disableClassName } = props, isAnimatedAndHydrated = isAnimated && !supportsCSSVars && didHydrateOnce && !import_constants.isServer, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || didHydrateOnce), isDisabledManually = disableClassName && !import_constants.isServer && didHydrateOnce && state.unmounted === !0;
|
|
7530
|
+
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (shouldAvoidClasses = !0);
|
|
7531
|
+
}
|
|
7532
|
+
var groupName = props.group;
|
|
7533
|
+
if (groupName && !curStateRef.group) {
|
|
7534
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
7535
|
+
curStateRef.group = {
|
|
7536
|
+
listeners,
|
|
7537
|
+
emit(name, state2) {
|
|
7538
|
+
listeners.forEach(function(l) {
|
|
7539
|
+
return l(name, state2);
|
|
7540
|
+
});
|
|
7541
|
+
},
|
|
7542
|
+
subscribe(cb) {
|
|
7543
|
+
return listeners.add(cb), function() {
|
|
7544
|
+
listeners.delete(cb);
|
|
7545
|
+
};
|
|
7546
|
+
}
|
|
7547
|
+
};
|
|
7548
|
+
}
|
|
7549
|
+
if (groupName) {
|
|
7550
|
+
var groupContextState = groups.state, og = setStateShallow;
|
|
7551
|
+
setStateShallow = function(state2) {
|
|
7552
|
+
og(state2), curStateRef.group.emit(groupName, {
|
|
7553
|
+
pseudo: state2
|
|
7554
|
+
});
|
|
7555
|
+
var next = {
|
|
7556
|
+
...groupContextState[groupName],
|
|
7557
|
+
...state2
|
|
7558
|
+
};
|
|
7559
|
+
groupContextState[groupName] = next;
|
|
7560
|
+
};
|
|
7561
|
+
}
|
|
7562
|
+
return {
|
|
7563
|
+
curStateRef,
|
|
7564
|
+
disabled,
|
|
7565
|
+
groupName,
|
|
7566
|
+
hasAnimationProp,
|
|
7567
|
+
hasEnterStyle,
|
|
7568
|
+
isAnimated,
|
|
7569
|
+
isExiting,
|
|
7570
|
+
isHydrated,
|
|
7571
|
+
presence,
|
|
7572
|
+
presenceState,
|
|
7573
|
+
setState,
|
|
7574
|
+
setStateShallow,
|
|
7575
|
+
shouldAvoidClasses,
|
|
7576
|
+
state,
|
|
7577
|
+
stateRef,
|
|
7578
|
+
supportsCSSVars,
|
|
7579
|
+
willBeAnimated,
|
|
7580
|
+
willBeAnimatedClient
|
|
7581
|
+
};
|
|
7582
|
+
};
|
|
7583
|
+
function hasAnimatedStyleValue(style) {
|
|
7584
|
+
return Object.keys(style).some(function(k) {
|
|
7585
|
+
var val = style[k];
|
|
7586
|
+
return val && typeof val == "object" && "_animation" in val;
|
|
7587
|
+
});
|
|
7588
|
+
}
|
|
7589
|
+
var isDisabled = function(props) {
|
|
7590
|
+
var _props_accessibilityState;
|
|
7591
|
+
return props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
|
|
7592
|
+
};
|
|
7593
|
+
}
|
|
7594
|
+
});
|
|
7595
|
+
|
|
7335
7596
|
// ../web/dist/cjs/setupHooks.native.js
|
|
7336
7597
|
var require_setupHooks_native = __commonJS({
|
|
7337
7598
|
"../web/dist/cjs/setupHooks.native.js"(exports2, module2) {
|
|
@@ -7541,21 +7802,12 @@ var require_createComponent_native = __commonJS({
|
|
|
7541
7802
|
createComponent: function() {
|
|
7542
7803
|
return createComponent;
|
|
7543
7804
|
},
|
|
7544
|
-
isDisabled: function() {
|
|
7545
|
-
return isDisabled;
|
|
7546
|
-
},
|
|
7547
7805
|
spacedChildren: function() {
|
|
7548
7806
|
return spacedChildren;
|
|
7549
|
-
},
|
|
7550
|
-
subscribeToContextGroup: function() {
|
|
7551
|
-
return subscribeToContextGroup;
|
|
7552
|
-
},
|
|
7553
|
-
useComponentState: function() {
|
|
7554
|
-
return useComponentState;
|
|
7555
7807
|
}
|
|
7556
7808
|
});
|
|
7557
7809
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
7558
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
7810
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require_index_native5(), import_constants = require_index_native3(), import_helpers = require_index_native4(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = 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(), componentSetStates = /* @__PURE__ */ new Set();
|
|
7559
7811
|
typeof document < "u" && (cancelTouches = function() {
|
|
7560
7812
|
componentSetStates.forEach(function(setState) {
|
|
7561
7813
|
return setState(function(prev) {
|
|
@@ -7567,93 +7819,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7567
7819
|
});
|
|
7568
7820
|
}), componentSetStates.clear();
|
|
7569
7821
|
}, addEventListener("mouseup", cancelTouches), addEventListener("touchend", cancelTouches), addEventListener("touchcancel", cancelTouches));
|
|
7570
|
-
var cancelTouches,
|
|
7571
|
-
var { animationDriver, groups } = param, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = import_react3.default.useRef(void 0);
|
|
7572
|
-
stateRef.current || (stateRef.current = {});
|
|
7573
|
-
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
7574
|
-
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
7575
|
-
return !!(next || curStateRef.hasAnimated);
|
|
7576
|
-
}(), willBeAnimated = !import_constants.isServer && willBeAnimatedClient;
|
|
7577
|
-
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
7578
|
-
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_constants.isWeb && !didHydrateOnce, initialState = shouldEnter ? (
|
|
7579
|
-
// on the very first render we switch all spring animation drivers to css rendering
|
|
7580
|
-
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
7581
|
-
// without flickers of the wrong colors.
|
|
7582
|
-
// but once we do that initial hydration and we are in client side rendering mode,
|
|
7583
|
-
// we can avoid the extra re-render on mount
|
|
7584
|
-
shouldEnterFromUnhydrated ? import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateShouldEnter
|
|
7585
|
-
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
7586
|
-
disabled != null && (initialState.disabled = disabled);
|
|
7587
|
-
var states = import_react3.default.useState(initialState), state = props.forceStyle ? {
|
|
7588
|
-
...states[0],
|
|
7589
|
-
[props.forceStyle]: !0
|
|
7590
|
-
} : states[0], setState = states[1], isHydrated = state.unmounted === !1 || state.unmounted === "should-enter", isAnimated = willBeAnimated;
|
|
7591
|
-
import_constants.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({
|
|
7592
|
-
...state
|
|
7593
|
-
}));
|
|
7594
|
-
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug);
|
|
7595
|
-
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
7596
|
-
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
7597
|
-
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
7598
|
-
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
7599
|
-
state.unmounted && env && staticConfig.variants[env] ? props[env] = !0 : isExiting && exv && (props[exv] = exitVariant !== enterExitVariant);
|
|
7600
|
-
}
|
|
7601
|
-
var shouldAvoidClasses = !import_constants.isWeb;
|
|
7602
|
-
if (import_constants.isWeb) {
|
|
7603
|
-
var { disableClassName } = props, isAnimatedAndHydrated = isAnimated && !supportsCSSVars && didHydrateOnce && !import_constants.isServer, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || didHydrateOnce), isDisabledManually = disableClassName && !import_constants.isServer && didHydrateOnce && state.unmounted === !0;
|
|
7604
|
-
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (shouldAvoidClasses = !0);
|
|
7605
|
-
}
|
|
7606
|
-
var groupName = props.group;
|
|
7607
|
-
if (groupName && !curStateRef.group) {
|
|
7608
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
7609
|
-
curStateRef.group = {
|
|
7610
|
-
listeners,
|
|
7611
|
-
emit(name, state2) {
|
|
7612
|
-
listeners.forEach(function(l) {
|
|
7613
|
-
return l(name, state2);
|
|
7614
|
-
});
|
|
7615
|
-
},
|
|
7616
|
-
subscribe(cb) {
|
|
7617
|
-
return listeners.add(cb), function() {
|
|
7618
|
-
listeners.delete(cb);
|
|
7619
|
-
};
|
|
7620
|
-
}
|
|
7621
|
-
};
|
|
7622
|
-
}
|
|
7623
|
-
if (groupName) {
|
|
7624
|
-
var groupContextState = groups.state, og = setStateShallow;
|
|
7625
|
-
setStateShallow = function(state2) {
|
|
7626
|
-
og(state2), curStateRef.group.emit(groupName, {
|
|
7627
|
-
pseudo: state2
|
|
7628
|
-
});
|
|
7629
|
-
var next = {
|
|
7630
|
-
...groupContextState[groupName],
|
|
7631
|
-
...state2
|
|
7632
|
-
};
|
|
7633
|
-
groupContextState[groupName] = next;
|
|
7634
|
-
};
|
|
7635
|
-
}
|
|
7636
|
-
return {
|
|
7637
|
-
curStateRef,
|
|
7638
|
-
disabled,
|
|
7639
|
-
groupName,
|
|
7640
|
-
hasAnimationProp,
|
|
7641
|
-
hasEnterStyle,
|
|
7642
|
-
isAnimated,
|
|
7643
|
-
isExiting,
|
|
7644
|
-
isHydrated,
|
|
7645
|
-
presence,
|
|
7646
|
-
presenceState,
|
|
7647
|
-
setState,
|
|
7648
|
-
setStateShallow,
|
|
7649
|
-
shouldAvoidClasses,
|
|
7650
|
-
state,
|
|
7651
|
-
stateRef,
|
|
7652
|
-
supportsCSSVars,
|
|
7653
|
-
willBeAnimated,
|
|
7654
|
-
willBeAnimatedClient
|
|
7655
|
-
};
|
|
7656
|
-
}, BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
7822
|
+
var cancelTouches, BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
7657
7823
|
value: !1
|
|
7658
7824
|
};
|
|
7659
7825
|
import_constants.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
|
|
@@ -7674,7 +7840,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7674
7840
|
});
|
|
7675
7841
|
}
|
|
7676
7842
|
});
|
|
7677
|
-
var { Component, isText, isZStack, isHOC
|
|
7843
|
+
var { Component, isText, isZStack, isHOC } = staticConfig, component = /* @__PURE__ */ import_react3.default.forwardRef(function(propsIn, forwardedRef) {
|
|
7678
7844
|
var _themeState_state, _hooks_usePropsTransform, _hooks_useEvents, _config_animations, internalID = "";
|
|
7679
7845
|
if (!hasSetupBaseViews) {
|
|
7680
7846
|
var _hooks_getBaseViews;
|
|
@@ -7706,7 +7872,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7706
7872
|
var debugProp = props.debug, componentName2 = props.componentName || staticConfig.componentName;
|
|
7707
7873
|
if (0)
|
|
7708
7874
|
var timer;
|
|
7709
|
-
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, hasTextAncestor = !!(import_constants.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
7875
|
+
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, hasTextAncestor = !!(import_constants.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
7710
7876
|
animationDriver && isAnimated && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
|
|
7711
7877
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
7712
7878
|
props.themeShallow && (curStateRef.themeShallow = !0);
|
|
@@ -7829,7 +7995,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7829
7995
|
});
|
|
7830
7996
|
return;
|
|
7831
7997
|
}
|
|
7832
|
-
var dispose = subscribeToContextGroup({
|
|
7998
|
+
var dispose = (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
7833
7999
|
disabled,
|
|
7834
8000
|
componentContext,
|
|
7835
8001
|
setStateShallow,
|
|
@@ -8134,43 +8300,8 @@ var require_createComponent_native = __commonJS({
|
|
|
8134
8300
|
left: 0,
|
|
8135
8301
|
pointerEvents: "box-none"
|
|
8136
8302
|
}
|
|
8137
|
-
})
|
|
8138
|
-
function hasAnimatedStyleValue(style) {
|
|
8139
|
-
return Object.keys(style).some(function(k) {
|
|
8140
|
-
var val = style[k];
|
|
8141
|
-
return val && typeof val == "object" && "_animation" in val;
|
|
8142
|
-
});
|
|
8143
|
-
}
|
|
8144
|
-
var fromPx = function(val) {
|
|
8303
|
+
}), fromPx = function(val) {
|
|
8145
8304
|
return typeof val != "string" ? val : +val.replace("px", "");
|
|
8146
|
-
}, isDisabled = function(props) {
|
|
8147
|
-
var _props_accessibilityState;
|
|
8148
|
-
return props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
|
|
8149
|
-
}, subscribeToContextGroup = function(param) {
|
|
8150
|
-
var { disabled = !1, setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
8151
|
-
if (pseudoGroups || mediaGroups) {
|
|
8152
|
-
var _componentContext_groups_subscribe, _componentContext_groups, current = {
|
|
8153
|
-
pseudo: {},
|
|
8154
|
-
media: {}
|
|
8155
|
-
};
|
|
8156
|
-
return (_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) {
|
|
8157
|
-
var { layout, pseudo } = param2;
|
|
8158
|
-
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
8159
|
-
else if (layout && mediaGroups) {
|
|
8160
|
-
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState2);
|
|
8161
|
-
next !== current.media && (Object.assign(current.media, next), persist());
|
|
8162
|
-
}
|
|
8163
|
-
function persist() {
|
|
8164
|
-
var group = {
|
|
8165
|
-
...state.group,
|
|
8166
|
-
[name]: current
|
|
8167
|
-
};
|
|
8168
|
-
setStateShallow({
|
|
8169
|
-
group
|
|
8170
|
-
});
|
|
8171
|
-
}
|
|
8172
|
-
});
|
|
8173
|
-
}
|
|
8174
8305
|
};
|
|
8175
8306
|
}
|
|
8176
8307
|
});
|
|
@@ -8873,9 +9004,8 @@ var require_createTamagui_native = __commonJS({
|
|
|
8873
9004
|
var foundThemes;
|
|
8874
9005
|
if (configIn.themes) {
|
|
8875
9006
|
var noThemes = Object.keys(configIn.themes).length === 0;
|
|
8876
|
-
foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed);
|
|
9007
|
+
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed)), process.env.TAMAGUI_REACT_19 && process.env.TAMAGUI_SKIP_THEME_OPTIMIZATION || noThemes && (0, import_insertStyleRule.listenForSheetChanges)();
|
|
8877
9008
|
}
|
|
8878
|
-
(0, import_insertStyleRule.listenForSheetChanges)();
|
|
8879
9009
|
var fontSizeTokens = null, fontsParsed;
|
|
8880
9010
|
if (configIn.fonts) {
|
|
8881
9011
|
var fontTokens = Object.fromEntries(Object.entries(configIn.fonts).map(function(param) {
|
|
@@ -8923,9 +9053,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8923
9053
|
cssRuleSets.push(specificRuleSet);
|
|
8924
9054
|
}
|
|
8925
9055
|
}
|
|
8926
|
-
var themesIn =
|
|
8927
|
-
...configIn.themes
|
|
8928
|
-
}, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
|
|
9056
|
+
var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
|
|
8929
9057
|
return {
|
|
8930
9058
|
themes,
|
|
8931
9059
|
cssRuleSets,
|
|
@@ -10052,7 +10180,7 @@ var require_useProps_native = __commonJS({
|
|
|
10052
10180
|
}
|
|
10053
10181
|
});
|
|
10054
10182
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
10055
|
-
var import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(),
|
|
10183
|
+
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();
|
|
10056
10184
|
function useProps(props, opts) {
|
|
10057
10185
|
var [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
10058
10186
|
...opts,
|
|
@@ -10073,7 +10201,7 @@ var require_useProps_native = __commonJS({
|
|
|
10073
10201
|
componentName: staticConfig.componentName,
|
|
10074
10202
|
name: "theme" in props ? props.theme : void 0,
|
|
10075
10203
|
inverse: "themeInverse" in props ? props.themeInverse : void 0
|
|
10076
|
-
}), componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), { state, disabled, setStateShallow } = (0,
|
|
10204
|
+
}), 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, {
|
|
10077
10205
|
isAnimated: !1,
|
|
10078
10206
|
mediaState: media,
|
|
10079
10207
|
noSkip: !0,
|
|
@@ -10090,7 +10218,7 @@ var require_useProps_native = __commonJS({
|
|
|
10090
10218
|
});
|
|
10091
10219
|
return;
|
|
10092
10220
|
}
|
|
10093
|
-
return (0,
|
|
10221
|
+
return (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
10094
10222
|
disabled,
|
|
10095
10223
|
componentContext,
|
|
10096
10224
|
setStateShallow,
|
|
@@ -10449,10 +10577,10 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
10449
10577
|
}
|
|
10450
10578
|
});
|
|
10451
10579
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
10452
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")),
|
|
10580
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_constants = require_index_native3(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native();
|
|
10453
10581
|
function TamaguiProvider(param) {
|
|
10454
10582
|
var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
|
|
10455
|
-
return (0, import_useMedia.setupMediaListeners)(), import_constants.isClient && (
|
|
10583
|
+
return (0, import_useMedia.setupMediaListeners)(), import_constants.isClient && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
10456
10584
|
if (config && !disableInjectCSS) {
|
|
10457
10585
|
var style = document.createElement("style");
|
|
10458
10586
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
@@ -10462,7 +10590,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
10462
10590
|
}, [
|
|
10463
10591
|
config,
|
|
10464
10592
|
disableInjectCSS
|
|
10465
|
-
])
|
|
10593
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UnmountedClassName, {
|
|
10466
10594
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
10467
10595
|
animationDriver: config == null ? void 0 : config.animations,
|
|
10468
10596
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeProvider.ThemeProvider, {
|
|
@@ -10795,6 +10923,9 @@ var require_index_native9 = __commonJS({
|
|
|
10795
10923
|
mediaState: function() {
|
|
10796
10924
|
return import_useMedia.mediaState;
|
|
10797
10925
|
},
|
|
10926
|
+
setConfig: function() {
|
|
10927
|
+
return import_config.setConfig;
|
|
10928
|
+
},
|
|
10798
10929
|
setNonce: function() {
|
|
10799
10930
|
return import_insertStyleRule.setNonce;
|
|
10800
10931
|
},
|