tamagui 1.75.6 → 1.75.8
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 +139 -111
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +139 -111
- package/dist/test.native.js.map +3 -3
- package/package.json +52 -52
package/dist/native.js
CHANGED
|
@@ -1719,14 +1719,14 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
1719
1719
|
mediaKeys.map((k, index) => [k, new Array(index + 1).fill(":root").join("")])
|
|
1720
1720
|
));
|
|
1721
1721
|
}
|
|
1722
|
-
let mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], mediaQuery = `${negate ? "not all and" : ""}
|
|
1722
|
+
let mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], mediaQuery = `${negate ? "not all and " : ""}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? "" : enableMediaPropOrder ? (
|
|
1723
1723
|
// this new array should be cached
|
|
1724
1724
|
new Array(priority).fill(":root").join("")
|
|
1725
1725
|
) : (
|
|
1726
1726
|
// @ts-ignore
|
|
1727
1727
|
prefixes[mediaKey]
|
|
1728
1728
|
), prefix = groupMediaKey ? `@container ${containerName}` : "@media";
|
|
1729
|
-
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`) : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}
|
|
1729
|
+
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`) : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: inline-size) {${styleRule}}`);
|
|
1730
1730
|
}
|
|
1731
1731
|
return {
|
|
1732
1732
|
property,
|
|
@@ -1737,65 +1737,6 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
1737
1737
|
}
|
|
1738
1738
|
});
|
|
1739
1739
|
|
|
1740
|
-
// ../web/dist/cjs/helpers/expandStyle.native.js
|
|
1741
|
-
var require_expandStyle_native = __commonJS({
|
|
1742
|
-
"../web/dist/cjs/helpers/expandStyle.native.js"(exports, module2) {
|
|
1743
|
-
"use strict";
|
|
1744
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all2) => {
|
|
1745
|
-
for (var name in all2)
|
|
1746
|
-
__defProp2(target, name, { get: all2[name], enumerable: !0 });
|
|
1747
|
-
}, __copyProps2 = (to, from, except, desc) => {
|
|
1748
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
1749
|
-
for (let key of __getOwnPropNames2(from))
|
|
1750
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
1751
|
-
return to;
|
|
1752
|
-
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStyle_exports = {};
|
|
1753
|
-
__export2(expandStyle_exports, {
|
|
1754
|
-
expandStyle: () => expandStyle
|
|
1755
|
-
});
|
|
1756
|
-
module2.exports = __toCommonJS2(expandStyle_exports);
|
|
1757
|
-
var import_constants = require_index_native2();
|
|
1758
|
-
function expandStyle(key, value) {
|
|
1759
|
-
if (!1)
|
|
1760
|
-
switch (key) {
|
|
1761
|
-
case "textAlignVertical":
|
|
1762
|
-
case "writingDirection":
|
|
1763
|
-
}
|
|
1764
|
-
if (import_constants.isAndroid && key === "elevationAndroid")
|
|
1765
|
-
return [["elevation", value]];
|
|
1766
|
-
if (key in EXPANSIONS)
|
|
1767
|
-
return EXPANSIONS[key].map((key2) => [key2, value]);
|
|
1768
|
-
}
|
|
1769
|
-
var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], xy = ["X", "Y"], EXPANSIONS = {
|
|
1770
|
-
borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
|
|
1771
|
-
borderRadius: [
|
|
1772
|
-
"TopLeftRadius",
|
|
1773
|
-
"TopRightRadius",
|
|
1774
|
-
"BottomRightRadius",
|
|
1775
|
-
"BottomLeftRadius"
|
|
1776
|
-
],
|
|
1777
|
-
borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
|
|
1778
|
-
margin: all,
|
|
1779
|
-
marginHorizontal: horiz,
|
|
1780
|
-
marginVertical: vert,
|
|
1781
|
-
overscrollBehavior: xy,
|
|
1782
|
-
padding: all,
|
|
1783
|
-
paddingHorizontal: horiz,
|
|
1784
|
-
paddingVertical: vert,
|
|
1785
|
-
...import_constants.isWeb && {
|
|
1786
|
-
// react-native only supports borderStyle
|
|
1787
|
-
borderStyle: ["TopStyle", "RightStyle", "BottomStyle", "LeftStyle"],
|
|
1788
|
-
// react-native doesn't support X / Y
|
|
1789
|
-
overflow: xy
|
|
1790
|
-
}
|
|
1791
|
-
}, _a;
|
|
1792
|
-
for (let parent in EXPANSIONS) {
|
|
1793
|
-
let prefix = parent.slice(0, ((_a = /[A-Z]/.exec(parent)) == null ? void 0 : _a.index) ?? parent.length);
|
|
1794
|
-
EXPANSIONS[parent] = EXPANSIONS[parent].map((k) => `${prefix}${k}`);
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
});
|
|
1798
|
-
|
|
1799
1740
|
// ../../node_modules/@react-native/normalize-color/index.js
|
|
1800
1741
|
var require_normalize_color = __commonJS({
|
|
1801
1742
|
"../../node_modules/@react-native/normalize-color/index.js"(exports, module2) {
|
|
@@ -2437,26 +2378,10 @@ var require_expandStyles_native = __commonJS({
|
|
|
2437
2378
|
return to;
|
|
2438
2379
|
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStyles_exports = {};
|
|
2439
2380
|
__export2(expandStyles_exports, {
|
|
2440
|
-
expandStylesAndRemoveNullishValues: () => expandStylesAndRemoveNullishValues,
|
|
2441
2381
|
fixStyles: () => fixStyles
|
|
2442
2382
|
});
|
|
2443
2383
|
module2.exports = __toCommonJS2(expandStyles_exports);
|
|
2444
|
-
var import_constants = require_index_native2(),
|
|
2445
|
-
function expandStylesAndRemoveNullishValues(style) {
|
|
2446
|
-
let res = {};
|
|
2447
|
-
for (let key in style) {
|
|
2448
|
-
let valIn = style[key];
|
|
2449
|
-
if (valIn == null)
|
|
2450
|
-
continue;
|
|
2451
|
-
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
2452
|
-
res[key] = expandStylesAndRemoveNullishValues(valIn);
|
|
2453
|
-
continue;
|
|
2454
|
-
}
|
|
2455
|
-
let val = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(valIn, key), out = (0, import_expandStyle.expandStyle)(key, val);
|
|
2456
|
-
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = val;
|
|
2457
|
-
}
|
|
2458
|
-
return fixStyles(res), res;
|
|
2459
|
-
}
|
|
2384
|
+
var import_constants = require_index_native2(), import_normalizeShadow = require_normalizeShadow_native();
|
|
2460
2385
|
function fixStyles(style) {
|
|
2461
2386
|
"elevationAndroid" in style && (style.elevation = style.elevationAndroid, delete style.elevationAndroid), (style.shadowRadius || style.shadowColor || style.shadowOpacity || style.shadowOffset) && Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
2462
2387
|
for (let key in borderDefaults)
|
|
@@ -2498,6 +2423,101 @@ var require_getStylesAtomic_native = __commonJS({
|
|
|
2498
2423
|
}
|
|
2499
2424
|
});
|
|
2500
2425
|
|
|
2426
|
+
// ../web/dist/cjs/helpers/expandStyle.native.js
|
|
2427
|
+
var require_expandStyle_native = __commonJS({
|
|
2428
|
+
"../web/dist/cjs/helpers/expandStyle.native.js"(exports, module2) {
|
|
2429
|
+
"use strict";
|
|
2430
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all2) => {
|
|
2431
|
+
for (var name in all2)
|
|
2432
|
+
__defProp2(target, name, { get: all2[name], enumerable: !0 });
|
|
2433
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
2434
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
2435
|
+
for (let key of __getOwnPropNames2(from))
|
|
2436
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2437
|
+
return to;
|
|
2438
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStyle_exports = {};
|
|
2439
|
+
__export2(expandStyle_exports, {
|
|
2440
|
+
expandStyle: () => expandStyle
|
|
2441
|
+
});
|
|
2442
|
+
module2.exports = __toCommonJS2(expandStyle_exports);
|
|
2443
|
+
var import_constants = require_index_native2();
|
|
2444
|
+
function expandStyle(key, value) {
|
|
2445
|
+
if (!1)
|
|
2446
|
+
switch (key) {
|
|
2447
|
+
case "textAlignVertical":
|
|
2448
|
+
case "writingDirection":
|
|
2449
|
+
}
|
|
2450
|
+
if (import_constants.isAndroid && key === "elevationAndroid")
|
|
2451
|
+
return [["elevation", value]];
|
|
2452
|
+
if (key in EXPANSIONS)
|
|
2453
|
+
return EXPANSIONS[key].map((key2) => [key2, value]);
|
|
2454
|
+
}
|
|
2455
|
+
var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], xy = ["X", "Y"], EXPANSIONS = {
|
|
2456
|
+
borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
|
|
2457
|
+
borderRadius: [
|
|
2458
|
+
"TopLeftRadius",
|
|
2459
|
+
"TopRightRadius",
|
|
2460
|
+
"BottomRightRadius",
|
|
2461
|
+
"BottomLeftRadius"
|
|
2462
|
+
],
|
|
2463
|
+
borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
|
|
2464
|
+
margin: all,
|
|
2465
|
+
marginHorizontal: horiz,
|
|
2466
|
+
marginVertical: vert,
|
|
2467
|
+
overscrollBehavior: xy,
|
|
2468
|
+
padding: all,
|
|
2469
|
+
paddingHorizontal: horiz,
|
|
2470
|
+
paddingVertical: vert,
|
|
2471
|
+
...import_constants.isWeb && {
|
|
2472
|
+
// react-native only supports borderStyle
|
|
2473
|
+
borderStyle: ["TopStyle", "RightStyle", "BottomStyle", "LeftStyle"],
|
|
2474
|
+
// react-native doesn't support X / Y
|
|
2475
|
+
overflow: xy
|
|
2476
|
+
}
|
|
2477
|
+
}, _a;
|
|
2478
|
+
for (let parent in EXPANSIONS) {
|
|
2479
|
+
let prefix = parent.slice(0, ((_a = /[A-Z]/.exec(parent)) == null ? void 0 : _a.index) ?? parent.length);
|
|
2480
|
+
EXPANSIONS[parent] = EXPANSIONS[parent].map((k) => `${prefix}${k}`);
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
});
|
|
2484
|
+
|
|
2485
|
+
// ../web/dist/cjs/helpers/expandStylesAndRemoveNullishValues.native.js
|
|
2486
|
+
var require_expandStylesAndRemoveNullishValues_native = __commonJS({
|
|
2487
|
+
"../web/dist/cjs/helpers/expandStylesAndRemoveNullishValues.native.js"(exports, module2) {
|
|
2488
|
+
"use strict";
|
|
2489
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
2490
|
+
for (var name in all)
|
|
2491
|
+
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
2492
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
2493
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
2494
|
+
for (let key of __getOwnPropNames2(from))
|
|
2495
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2496
|
+
return to;
|
|
2497
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), expandStylesAndRemoveNullishValues_exports = {};
|
|
2498
|
+
__export2(expandStylesAndRemoveNullishValues_exports, {
|
|
2499
|
+
expandStylesAndRemoveNullishValues: () => expandStylesAndRemoveNullishValues
|
|
2500
|
+
});
|
|
2501
|
+
module2.exports = __toCommonJS2(expandStylesAndRemoveNullishValues_exports);
|
|
2502
|
+
var import_expandStyle = require_expandStyle_native(), import_expandStyles = require_expandStyles_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_pseudoDescriptors = require_pseudoDescriptors_native();
|
|
2503
|
+
function expandStylesAndRemoveNullishValues(style, disableNormalize = !1) {
|
|
2504
|
+
let res = {};
|
|
2505
|
+
for (let key in style) {
|
|
2506
|
+
let prop = style[key];
|
|
2507
|
+
if (prop == null)
|
|
2508
|
+
continue;
|
|
2509
|
+
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
2510
|
+
res[key] = expandStylesAndRemoveNullishValues(prop, disableNormalize);
|
|
2511
|
+
continue;
|
|
2512
|
+
}
|
|
2513
|
+
let value = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key), out = (0, import_expandStyle.expandStyle)(key, value);
|
|
2514
|
+
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value;
|
|
2515
|
+
}
|
|
2516
|
+
return (0, import_expandStyles.fixStyles)(res), res;
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
});
|
|
2520
|
+
|
|
2501
2521
|
// ../web/dist/cjs/helpers/getVariantExtras.native.js
|
|
2502
2522
|
var require_getVariantExtras_native = __commonJS({
|
|
2503
2523
|
"../web/dist/cjs/helpers/getVariantExtras.native.js"(exports, module2) {
|
|
@@ -2604,7 +2624,7 @@ var require_propMapper_native = __commonJS({
|
|
|
2604
2624
|
propMapper: () => propMapper
|
|
2605
2625
|
});
|
|
2606
2626
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
2607
|
-
var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_config = require_config_native(), import_isDevTools = require_isDevTools_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(),
|
|
2627
|
+
var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_config = require_config_native(), import_isDevTools = require_isDevTools_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_expandStylesAndRemoveNullishValues = require_expandStylesAndRemoveNullishValues_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
2608
2628
|
if (!import_constants.isAndroid && key === "elevationAndroid")
|
|
2609
2629
|
return;
|
|
2610
2630
|
let subProps = styleStateIn.styleProps.fallbackProps || subPropsIn, styleState = subProps ? new Proxy(styleStateIn, {
|
|
@@ -2661,7 +2681,10 @@ var require_propMapper_native = __commonJS({
|
|
|
2661
2681
|
);
|
|
2662
2682
|
}
|
|
2663
2683
|
if (variantValue) {
|
|
2664
|
-
let expanded = (0,
|
|
2684
|
+
let expanded = (0, import_expandStylesAndRemoveNullishValues.expandStylesAndRemoveNullishValues)(
|
|
2685
|
+
variantValue,
|
|
2686
|
+
!!styleProps.noNormalize
|
|
2687
|
+
), next = Object.entries(expanded);
|
|
2665
2688
|
return fontFamilyResult && fontFamilyResult[0] === "$" && fontFamilyCache.set(next, (0, import_createVariable.getVariableValue)(fontFamilyResult)), next;
|
|
2666
2689
|
}
|
|
2667
2690
|
};
|
|
@@ -2826,7 +2849,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2826
2849
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
2827
2850
|
var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_react2 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), 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_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), fontFamilyKey = "fontFamily", IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-", getSplitStyles = (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) => {
|
|
2828
2851
|
var _a, _b, _c, _e, _f, _g;
|
|
2829
|
-
conf = conf || (0, import_config.getConfig)();
|
|
2852
|
+
conf = conf || (0, import_config.getConfig)(), import_constants.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
2830
2853
|
let { shorthands } = conf, {
|
|
2831
2854
|
isHOC,
|
|
2832
2855
|
isText,
|
|
@@ -2897,7 +2920,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2897
2920
|
continue;
|
|
2898
2921
|
}
|
|
2899
2922
|
if (keyInit[0] === "_" && keyInit.startsWith("_style")) {
|
|
2900
|
-
|
|
2923
|
+
mergeStylePropIntoStyle(styleState, valInit);
|
|
2901
2924
|
continue;
|
|
2902
2925
|
}
|
|
2903
2926
|
if (!1 && !(keyInit in accessibilityDirectMap))
|
|
@@ -3151,7 +3174,7 @@ current`, {
|
|
|
3151
3174
|
}
|
|
3152
3175
|
}
|
|
3153
3176
|
}
|
|
3154
|
-
if (props.style &&
|
|
3177
|
+
if (props.style && mergeStylePropIntoStyle(styleState, props.style), styleProps.noNormalize !== !1 && ((0, import_expandStyles.fixStyles)(style), import_constants.isWeb && !staticConfig.isReactNative && (0, import_getStylesAtomic.styleToCSS)(style), styleState.transforms && Object.entries(styleState.transforms).sort(([a], [b]) => a.localeCompare(b)).forEach(([key, val]) => {
|
|
3155
3178
|
mergeTransform(style, key, val, !0);
|
|
3156
3179
|
}), parentSplitStyles && !shouldDoClasses))
|
|
3157
3180
|
for (let key in parentSplitStyles.style)
|
|
@@ -3199,14 +3222,14 @@ current`, {
|
|
|
3199
3222
|
}
|
|
3200
3223
|
return result;
|
|
3201
3224
|
};
|
|
3202
|
-
function mergeStyle(styleState, key, val) {
|
|
3225
|
+
function mergeStyle(styleState, key, val, disableNormalize = !1) {
|
|
3203
3226
|
let { classNames, viewProps, style, usedKeys, styleProps } = styleState;
|
|
3204
3227
|
if (import_constants.isWeb && (val == null ? void 0 : val[0]) === "_")
|
|
3205
3228
|
classNames[key] = val, usedKeys[key] ||= 1;
|
|
3206
3229
|
else if (key in import_helpers.stylePropsTransform)
|
|
3207
3230
|
styleState.transforms ||= {}, styleState.transforms[key] = val;
|
|
3208
3231
|
else {
|
|
3209
|
-
let out = import_constants.isWeb && !styleProps.noNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
3232
|
+
let out = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
3210
3233
|
key in import_helpers.validStylesOnBaseProps ? viewProps[key] = out : style[key] = out;
|
|
3211
3234
|
}
|
|
3212
3235
|
}
|
|
@@ -3222,17 +3245,14 @@ current`, {
|
|
|
3222
3245
|
}
|
|
3223
3246
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
3224
3247
|
};
|
|
3225
|
-
function
|
|
3226
|
-
if (!
|
|
3248
|
+
function mergeStylePropIntoStyle(styleState, cur) {
|
|
3249
|
+
if (!cur)
|
|
3227
3250
|
return;
|
|
3228
|
-
let styles =
|
|
3229
|
-
for (let
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
else
|
|
3234
|
-
for (let key in cur)
|
|
3235
|
-
key in styleState.usedKeys || mergeStyle(styleState, key, cur[key]);
|
|
3251
|
+
let styles = Array.isArray(cur) ? cur : [cur];
|
|
3252
|
+
for (let style of styles) {
|
|
3253
|
+
let isRNW = style.$$css;
|
|
3254
|
+
Object.assign(isRNW ? styleState.classNames : styleState.style, style);
|
|
3255
|
+
}
|
|
3236
3256
|
}
|
|
3237
3257
|
var useInsertEffectCompat = import_constants.isWeb ? import_react2.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
|
|
3238
3258
|
}, useSplitStyles = (...args) => {
|
|
@@ -4556,11 +4576,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4556
4576
|
}
|
|
4557
4577
|
function styleable(Component2, options) {
|
|
4558
4578
|
var _a2;
|
|
4559
|
-
let
|
|
4560
|
-
|
|
4561
|
-
(0, import_react2.memo)((0, import_react2.forwardRef)(Component2))
|
|
4562
|
-
), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig), out = options != null && options.disableTheme ? ComponentForwardedRef : (0, import_themeable.themeable)(ComponentForwardedRef, extendedConfig);
|
|
4563
|
-
return out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
4579
|
+
let out = ((_a2 = Component2.render) == null ? void 0 : _a2.length) === 2 ? Component2 : (0, import_react2.forwardRef)(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
|
|
4580
|
+
return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = (0, import_react2.memo)(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
4564
4581
|
}
|
|
4565
4582
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
4566
4583
|
}
|
|
@@ -6046,6 +6063,7 @@ var require_index_native9 = __commonJS({
|
|
|
6046
6063
|
__reExport2(src_exports2, require_ComponentContext_native(), module2.exports);
|
|
6047
6064
|
__reExport2(src_exports2, require_createStyledContext_native(), module2.exports);
|
|
6048
6065
|
__reExport2(src_exports2, require_expandStyles_native(), module2.exports);
|
|
6066
|
+
__reExport2(src_exports2, require_expandStylesAndRemoveNullishValues_native(), module2.exports);
|
|
6049
6067
|
__reExport2(src_exports2, require_propMapper_native(), module2.exports);
|
|
6050
6068
|
__reExport2(src_exports2, require_getExpandedShorthands_native(), module2.exports);
|
|
6051
6069
|
__reExport2(src_exports2, require_getSplitStyles_native(), module2.exports);
|
|
@@ -7777,13 +7795,14 @@ var require_index_native15 = __commonJS({
|
|
|
7777
7795
|
}, __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
|
|
7778
7796
|
__export2(src_exports2, {
|
|
7779
7797
|
Stack: () => Stack3,
|
|
7780
|
-
Text: () => Text3
|
|
7798
|
+
Text: () => Text3,
|
|
7799
|
+
View: () => View2
|
|
7781
7800
|
});
|
|
7782
7801
|
module2.exports = __toCommonJS2(src_exports2);
|
|
7783
7802
|
var import_react_native_use_responder_events = require_index_native14(), import_web = require_index_native9(), import_react2 = require("react"), import_createOptimizedView = require_createOptimizedView_native(), import_getBaseViews = require_getBaseViews_native(), import_useElementLayout = require_useElementLayout_native(), import_usePlatformMethods = require_usePlatformMethods_native(), import_Pressability = require_Pressability_native();
|
|
7784
7803
|
__reExport2(src_exports2, require_index_native9(), module2.exports);
|
|
7785
7804
|
__reExport2(src_exports2, require_reactNativeTypes_native(), module2.exports);
|
|
7786
|
-
var Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7805
|
+
var View2 = import_web.View, Stack3 = import_web.Stack, Text3 = import_web.Text, baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
7787
7806
|
(0, import_web.setupHooks)({
|
|
7788
7807
|
getBaseViews: import_getBaseViews.getBaseViews,
|
|
7789
7808
|
usePropsTransform(elementType, propsIn, hostRef) {
|
|
@@ -10074,7 +10093,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10074
10093
|
},
|
|
10075
10094
|
(0, import_react2.useCallback)(
|
|
10076
10095
|
(value) => {
|
|
10077
|
-
|
|
10096
|
+
at.current = value, scrollBridge.paneY = value;
|
|
10078
10097
|
},
|
|
10079
10098
|
[animationDriver]
|
|
10080
10099
|
)
|
|
@@ -10109,18 +10128,18 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10109
10128
|
}, [hasntMeasured, screenSize]), (0, import_core13.useIsomorphicLayoutEffect)(() => {
|
|
10110
10129
|
!frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
|
|
10111
10130
|
}, [isHidden, frameSize, screenSize, open, position]);
|
|
10112
|
-
let disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = (0, import_core13.useThemeName)(), panResponder = (0, import_react2.useMemo)(
|
|
10131
|
+
let disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = (0, import_core13.useThemeName)(), [isDragging, setIsDragging] = (0, import_react2.useState)(!1), panResponder = (0, import_react2.useMemo)(
|
|
10113
10132
|
() => {
|
|
10114
10133
|
if (disableDrag || !frameSize || isShowingInnerSheet)
|
|
10115
10134
|
return;
|
|
10116
10135
|
let minY = positions[0];
|
|
10117
10136
|
scrollBridge.paneMinY = minY;
|
|
10118
10137
|
let startY = at.current;
|
|
10119
|
-
function
|
|
10120
|
-
import_constants.SHEET_HIDDEN_STYLESHEET && (val ? import_constants.SHEET_HIDDEN_STYLESHEET.innerText = ":root * { user-select: none !important; -webkit-user-select: none !important; }" : import_constants.SHEET_HIDDEN_STYLESHEET.innerText = "");
|
|
10138
|
+
function setPanning(val) {
|
|
10139
|
+
setIsDragging(val), import_constants.SHEET_HIDDEN_STYLESHEET && (val ? import_constants.SHEET_HIDDEN_STYLESHEET.innerText = ":root * { user-select: none !important; -webkit-user-select: none !important; }" : import_constants.SHEET_HIDDEN_STYLESHEET.innerText = "");
|
|
10121
10140
|
}
|
|
10122
10141
|
let release = ({ vy, dragAt }) => {
|
|
10123
|
-
isExternalDrag = !1, previouslyScrolling = !1,
|
|
10142
|
+
isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
|
|
10124
10143
|
let end = dragAt + startY + frameSize * vy * 0.2, closestPoint = 0, dist = 1 / 0;
|
|
10125
10144
|
for (let i = 0; i < positions.length; i++) {
|
|
10126
10145
|
let position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
|
|
@@ -10136,7 +10155,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10136
10155
|
let isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
10137
10156
|
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && !isScrolled && isDraggingUp ? !1 : Math.abs(dy) > 5;
|
|
10138
10157
|
}, grant = () => {
|
|
10139
|
-
|
|
10158
|
+
setPanning(!0), stopSpring(), startY = at.current;
|
|
10140
10159
|
}, isExternalDrag = !1;
|
|
10141
10160
|
return scrollBridge.drag = (dy) => {
|
|
10142
10161
|
isExternalDrag || (isExternalDrag = !0, grant());
|
|
@@ -10159,14 +10178,20 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10159
10178
|
), handleAnimationViewLayout = (0, import_react2.useCallback)(
|
|
10160
10179
|
(e) => {
|
|
10161
10180
|
var _a;
|
|
10162
|
-
let next = (
|
|
10181
|
+
let next = Math.min(
|
|
10182
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
10183
|
+
import_react_native4.Dimensions.get("window").height
|
|
10184
|
+
);
|
|
10163
10185
|
next && setFrameSize(next);
|
|
10164
10186
|
},
|
|
10165
10187
|
[keyboardIsVisible]
|
|
10166
10188
|
), handleMaxContentViewLayout = (0, import_react2.useCallback)(
|
|
10167
10189
|
(e) => {
|
|
10168
10190
|
var _a;
|
|
10169
|
-
let next = (
|
|
10191
|
+
let next = Math.min(
|
|
10192
|
+
(_a = e.nativeEvent) == null ? void 0 : _a.layout.height,
|
|
10193
|
+
import_react_native4.Dimensions.get("window").height
|
|
10194
|
+
);
|
|
10170
10195
|
next && setMaxContentSize(next);
|
|
10171
10196
|
},
|
|
10172
10197
|
[keyboardIsVisible]
|
|
@@ -10226,6 +10251,10 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
10226
10251
|
...panResponder == null ? void 0 : panResponder.panHandlers,
|
|
10227
10252
|
onLayout: handleAnimationViewLayout,
|
|
10228
10253
|
pointerEvents: open && !shouldHideParentSheet ? "auto" : "none",
|
|
10254
|
+
...!isDragging && {
|
|
10255
|
+
// @ts-ignore for CSS driver this is necessary to attach the transition
|
|
10256
|
+
animation
|
|
10257
|
+
},
|
|
10229
10258
|
style: [
|
|
10230
10259
|
{
|
|
10231
10260
|
position: "absolute",
|
|
@@ -16103,7 +16132,6 @@ var require_RadioGroup_native = __commonJS({
|
|
|
16103
16132
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16104
16133
|
RadioGroupFrame,
|
|
16105
16134
|
{
|
|
16106
|
-
"aria-valuetext": value,
|
|
16107
16135
|
role: "radiogroup",
|
|
16108
16136
|
"aria-orientation": orientation,
|
|
16109
16137
|
ref: forwardedRef,
|