@tamagui/core 1.115.4 → 1.116.0
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 +238 -257
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +235 -252
- package/dist/test.native.js.map +3 -3
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -2858,8 +2858,8 @@ var require_useMedia_native = __commonJS({
|
|
|
2858
2858
|
}), mod);
|
|
2859
2859
|
}, useMedia_exports = {};
|
|
2860
2860
|
__export2(useMedia_exports, {
|
|
2861
|
-
|
|
2862
|
-
return
|
|
2861
|
+
_disableMediaTouch: function() {
|
|
2862
|
+
return _disableMediaTouch2;
|
|
2863
2863
|
},
|
|
2864
2864
|
configureMedia: function() {
|
|
2865
2865
|
return configureMedia2;
|
|
@@ -2908,7 +2908,7 @@ var require_useMedia_native = __commonJS({
|
|
|
2908
2908
|
}
|
|
2909
2909
|
});
|
|
2910
2910
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
2911
|
-
var import_react3 = __toESM2(require("react")),
|
|
2911
|
+
var import_constants2 = require_index_native3(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native(), mediaState2 = (
|
|
2912
2912
|
// development only safeguard
|
|
2913
2913
|
process.env.NODE_ENV === "development" ? new Proxy({}, {
|
|
2914
2914
|
get(target, key) {
|
|
@@ -2937,7 +2937,7 @@ var require_useMedia_native = __commonJS({
|
|
|
2937
2937
|
for (var key in media) mediaState2[key] = (mediaQueryDefaultActive == null ? void 0 : mediaQueryDefaultActive[key]) || !1, mediaKeys.add(`$${key}`);
|
|
2938
2938
|
Object.assign(mediaQueryConfig2, media), initState = {
|
|
2939
2939
|
...mediaState2
|
|
2940
|
-
}, mediaKeysOrdered = Object.keys(media),
|
|
2940
|
+
}, mediaKeysOrdered = Object.keys(media), setupMediaListeners();
|
|
2941
2941
|
}
|
|
2942
2942
|
};
|
|
2943
2943
|
function unlisten() {
|
|
@@ -2990,48 +2990,64 @@ var require_useMedia_native = __commonJS({
|
|
|
2990
2990
|
listeners.delete(subscriber);
|
|
2991
2991
|
};
|
|
2992
2992
|
}
|
|
2993
|
-
function useMedia2(
|
|
2994
|
-
var
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
if (!
|
|
3000
|
-
var
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
return initialState;
|
|
3009
|
-
});
|
|
3010
|
-
else {
|
|
3011
|
-
var [_state, setState] = import_react3.default.useState(initialState);
|
|
3012
|
-
state = _state, (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
3013
|
-
function update() {
|
|
3014
|
-
setState(getSnapshot);
|
|
2993
|
+
function useMedia2(cc, debug) {
|
|
2994
|
+
var disableSSR = (0, import_config.getSetting)("disableSSR") || (0, import_useDisableSSR.getDisableSSR)(cc), initialState = disableSSR || !import_constants2.isWeb ? mediaState2 : initState, [state, setState] = import_react3.default.useState(initialState), currentKeys, getCurrentKeys = function() {
|
|
2995
|
+
return currentKeys;
|
|
2996
|
+
};
|
|
2997
|
+
function getSnapshot(cur) {
|
|
2998
|
+
var keys = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : cur.lastKeys;
|
|
2999
|
+
if (!keys) return cur;
|
|
3000
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3001
|
+
try {
|
|
3002
|
+
for (var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
3003
|
+
var key = _step.value;
|
|
3004
|
+
if (mediaState2[key] !== cur[key]) return process.env.NODE_ENV === "development" && debug && console.warn("useMedia()\u270D\uFE0F", key, cur[key], ">", mediaState2[key]), {
|
|
3005
|
+
...mediaState2,
|
|
3006
|
+
lastKeys: new Set(keys)
|
|
3007
|
+
};
|
|
3015
3008
|
}
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3009
|
+
} catch (err) {
|
|
3010
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
3011
|
+
} finally {
|
|
3012
|
+
try {
|
|
3013
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
3014
|
+
} finally {
|
|
3015
|
+
if (_didIteratorError) throw _iteratorError;
|
|
3016
|
+
}
|
|
3017
|
+
}
|
|
3018
|
+
return cur;
|
|
3020
3019
|
}
|
|
3021
|
-
|
|
3020
|
+
var isRendering = !0, isInitialState = state === initialState;
|
|
3021
|
+
return (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
3022
|
+
isRendering = !1;
|
|
3023
|
+
}), (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
3024
|
+
var update = function() {
|
|
3025
|
+
return setState(function(prev) {
|
|
3026
|
+
return getSnapshot(
|
|
3027
|
+
prev,
|
|
3028
|
+
// because the !didHydrateOnce logic we can't update as we render
|
|
3029
|
+
// we need to get the current keys in case we added
|
|
3030
|
+
// these only ever add keys so likely ok?
|
|
3031
|
+
getCurrentKeys()
|
|
3032
|
+
);
|
|
3033
|
+
});
|
|
3034
|
+
};
|
|
3035
|
+
return update(), subscribe(update);
|
|
3036
|
+
}, []), new Proxy(state, {
|
|
3022
3037
|
get(_, key) {
|
|
3023
|
-
if (!disableMediaTouch) {
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3038
|
+
if (isRendering && !disableMediaTouch && typeof key == "string") {
|
|
3039
|
+
var needsUpdateKeys = !state.lastKeys || !state.lastKeys.has(key);
|
|
3040
|
+
if ((needsUpdateKeys || state[key] !== mediaState2[key]) && (process.env.NODE_ENV === "development" && debug && console.info("useMedia() TOUCH", key), currentKeys || (currentKeys = /* @__PURE__ */ new Set()), currentKeys.add(key), !isInitialState)) {
|
|
3041
|
+
var next = getSnapshot(state, currentKeys);
|
|
3042
|
+
next !== state && setState(next);
|
|
3027
3043
|
}
|
|
3028
|
-
return Reflect.get(state, key);
|
|
3029
3044
|
}
|
|
3045
|
+
return Reflect.get(state, key);
|
|
3030
3046
|
}
|
|
3031
3047
|
});
|
|
3032
3048
|
}
|
|
3033
3049
|
var disableMediaTouch = !1;
|
|
3034
|
-
function
|
|
3050
|
+
function _disableMediaTouch2(val) {
|
|
3035
3051
|
disableMediaTouch = val;
|
|
3036
3052
|
}
|
|
3037
3053
|
function getMediaState(mediaGroups, layout) {
|
|
@@ -4463,9 +4479,6 @@ var require_defaultComponentState_native = __commonJS({
|
|
|
4463
4479
|
},
|
|
4464
4480
|
defaultComponentStateMounted: function() {
|
|
4465
4481
|
return defaultComponentStateMounted;
|
|
4466
|
-
},
|
|
4467
|
-
defaultComponentStateShouldEnter: function() {
|
|
4468
|
-
return defaultComponentStateShouldEnter;
|
|
4469
4482
|
}
|
|
4470
4483
|
});
|
|
4471
4484
|
module2.exports = __toCommonJS2(defaultComponentState_exports);
|
|
@@ -4480,9 +4493,6 @@ var require_defaultComponentState_native = __commonJS({
|
|
|
4480
4493
|
}, defaultComponentStateMounted = {
|
|
4481
4494
|
...defaultComponentState,
|
|
4482
4495
|
unmounted: !1
|
|
4483
|
-
}, defaultComponentStateShouldEnter = {
|
|
4484
|
-
...defaultComponentState,
|
|
4485
|
-
unmounted: "should-enter"
|
|
4486
4496
|
};
|
|
4487
4497
|
}
|
|
4488
4498
|
});
|
|
@@ -5523,6 +5533,111 @@ var require_getStylesAtomic_native = __commonJS({
|
|
|
5523
5533
|
}
|
|
5524
5534
|
});
|
|
5525
5535
|
|
|
5536
|
+
// ../web/dist/cjs/helpers/isActivePlatform.native.js
|
|
5537
|
+
var require_isActivePlatform_native = __commonJS({
|
|
5538
|
+
"../web/dist/cjs/helpers/isActivePlatform.native.js"(exports2, module2) {
|
|
5539
|
+
"use strict";
|
|
5540
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
5541
|
+
for (var name in all) __defProp2(target, name, {
|
|
5542
|
+
get: all[name],
|
|
5543
|
+
enumerable: !0
|
|
5544
|
+
});
|
|
5545
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
5546
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
5547
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
5548
|
+
for (var _loop = function() {
|
|
5549
|
+
var key = _step.value;
|
|
5550
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
5551
|
+
get: function() {
|
|
5552
|
+
return from[key];
|
|
5553
|
+
},
|
|
5554
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
5555
|
+
});
|
|
5556
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
5557
|
+
} catch (err) {
|
|
5558
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
5559
|
+
} finally {
|
|
5560
|
+
try {
|
|
5561
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
5562
|
+
} finally {
|
|
5563
|
+
if (_didIteratorError)
|
|
5564
|
+
throw _iteratorError;
|
|
5565
|
+
}
|
|
5566
|
+
}
|
|
5567
|
+
return to;
|
|
5568
|
+
}, __toCommonJS2 = function(mod) {
|
|
5569
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
5570
|
+
value: !0
|
|
5571
|
+
}), mod);
|
|
5572
|
+
}, isActivePlatform_exports = {};
|
|
5573
|
+
__export2(isActivePlatform_exports, {
|
|
5574
|
+
isActivePlatform: function() {
|
|
5575
|
+
return isActivePlatform;
|
|
5576
|
+
}
|
|
5577
|
+
});
|
|
5578
|
+
module2.exports = __toCommonJS2(isActivePlatform_exports);
|
|
5579
|
+
var import_constants2 = require_index_native3();
|
|
5580
|
+
function isActivePlatform(key) {
|
|
5581
|
+
if (!key.startsWith("$platform")) return !0;
|
|
5582
|
+
var platform = key.slice(10);
|
|
5583
|
+
return (
|
|
5584
|
+
// web, ios, android
|
|
5585
|
+
platform === import_constants2.currentPlatform || // web, native
|
|
5586
|
+
platform === "native"
|
|
5587
|
+
);
|
|
5588
|
+
}
|
|
5589
|
+
}
|
|
5590
|
+
});
|
|
5591
|
+
|
|
5592
|
+
// ../web/dist/cjs/helpers/isActiveTheme.native.js
|
|
5593
|
+
var require_isActiveTheme_native = __commonJS({
|
|
5594
|
+
"../web/dist/cjs/helpers/isActiveTheme.native.js"(exports2, module2) {
|
|
5595
|
+
"use strict";
|
|
5596
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
5597
|
+
for (var name in all) __defProp2(target, name, {
|
|
5598
|
+
get: all[name],
|
|
5599
|
+
enumerable: !0
|
|
5600
|
+
});
|
|
5601
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
5602
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
5603
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
5604
|
+
for (var _loop = function() {
|
|
5605
|
+
var key = _step.value;
|
|
5606
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
5607
|
+
get: function() {
|
|
5608
|
+
return from[key];
|
|
5609
|
+
},
|
|
5610
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
5611
|
+
});
|
|
5612
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
5613
|
+
} catch (err) {
|
|
5614
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
5615
|
+
} finally {
|
|
5616
|
+
try {
|
|
5617
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
5618
|
+
} finally {
|
|
5619
|
+
if (_didIteratorError)
|
|
5620
|
+
throw _iteratorError;
|
|
5621
|
+
}
|
|
5622
|
+
}
|
|
5623
|
+
return to;
|
|
5624
|
+
}, __toCommonJS2 = function(mod) {
|
|
5625
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
5626
|
+
value: !0
|
|
5627
|
+
}), mod);
|
|
5628
|
+
}, isActiveTheme_exports = {};
|
|
5629
|
+
__export2(isActiveTheme_exports, {
|
|
5630
|
+
isActiveTheme: function() {
|
|
5631
|
+
return isActiveTheme;
|
|
5632
|
+
}
|
|
5633
|
+
});
|
|
5634
|
+
module2.exports = __toCommonJS2(isActiveTheme_exports);
|
|
5635
|
+
function isActiveTheme(key, activeThemeName) {
|
|
5636
|
+
if (key.startsWith("$theme-")) return key.slice(7).startsWith(activeThemeName);
|
|
5637
|
+
}
|
|
5638
|
+
}
|
|
5639
|
+
});
|
|
5640
|
+
|
|
5526
5641
|
// ../web/dist/cjs/helpers/log.native.js
|
|
5527
5642
|
var require_log_native = __commonJS({
|
|
5528
5643
|
"../web/dist/cjs/helpers/log.native.js"(exports2, module2) {
|
|
@@ -5570,11 +5685,11 @@ var require_log_native = __commonJS({
|
|
|
5570
5685
|
function log() {
|
|
5571
5686
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
5572
5687
|
if (process.env.NODE_ENV !== "production") {
|
|
5573
|
-
(0, import_useMedia.
|
|
5688
|
+
(0, import_useMedia._disableMediaTouch)(!0);
|
|
5574
5689
|
try {
|
|
5575
5690
|
return console.log(...args);
|
|
5576
5691
|
} finally {
|
|
5577
|
-
(0, import_useMedia.
|
|
5692
|
+
(0, import_useMedia._disableMediaTouch)(!1);
|
|
5578
5693
|
}
|
|
5579
5694
|
}
|
|
5580
5695
|
}
|
|
@@ -6637,9 +6752,9 @@ var require_propMapper_native = __commonJS({
|
|
|
6637
6752
|
}
|
|
6638
6753
|
});
|
|
6639
6754
|
|
|
6640
|
-
// ../web/dist/cjs/helpers/
|
|
6641
|
-
var
|
|
6642
|
-
"../web/dist/cjs/helpers/
|
|
6755
|
+
// ../web/dist/cjs/helpers/sortString.native.js
|
|
6756
|
+
var require_sortString_native = __commonJS({
|
|
6757
|
+
"../web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
|
|
6643
6758
|
"use strict";
|
|
6644
6759
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6645
6760
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -6673,31 +6788,22 @@ var require_transformsToString_native = __commonJS({
|
|
|
6673
6788
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6674
6789
|
value: !0
|
|
6675
6790
|
}), mod);
|
|
6676
|
-
},
|
|
6677
|
-
__export2(
|
|
6678
|
-
|
|
6679
|
-
return
|
|
6791
|
+
}, sortString_exports = {};
|
|
6792
|
+
__export2(sortString_exports, {
|
|
6793
|
+
sortString: function() {
|
|
6794
|
+
return sortString;
|
|
6680
6795
|
}
|
|
6681
6796
|
});
|
|
6682
|
-
module2.exports = __toCommonJS2(
|
|
6683
|
-
var
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
// { scale: 2 } => 'scale(2)'
|
|
6687
|
-
// { translateX: 20 } => 'translateX(20px)'
|
|
6688
|
-
// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
|
|
6689
|
-
function(transform) {
|
|
6690
|
-
var type = Object.keys(transform)[0], value = transform[type];
|
|
6691
|
-
return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
|
|
6692
|
-
}
|
|
6693
|
-
).join(" ");
|
|
6694
|
-
}
|
|
6797
|
+
module2.exports = __toCommonJS2(sortString_exports);
|
|
6798
|
+
var sortString = function(a, b) {
|
|
6799
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
6800
|
+
};
|
|
6695
6801
|
}
|
|
6696
6802
|
});
|
|
6697
6803
|
|
|
6698
|
-
// ../web/dist/cjs/helpers/
|
|
6699
|
-
var
|
|
6700
|
-
"../web/dist/cjs/helpers/
|
|
6804
|
+
// ../web/dist/cjs/helpers/transformsToString.native.js
|
|
6805
|
+
var require_transformsToString_native = __commonJS({
|
|
6806
|
+
"../web/dist/cjs/helpers/transformsToString.native.js"(exports2, module2) {
|
|
6701
6807
|
"use strict";
|
|
6702
6808
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6703
6809
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -6731,71 +6837,25 @@ var require_isActivePlatform_native = __commonJS({
|
|
|
6731
6837
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6732
6838
|
value: !0
|
|
6733
6839
|
}), mod);
|
|
6734
|
-
},
|
|
6735
|
-
__export2(
|
|
6736
|
-
|
|
6737
|
-
return
|
|
6840
|
+
}, transformsToString_exports = {};
|
|
6841
|
+
__export2(transformsToString_exports, {
|
|
6842
|
+
transformsToString: function() {
|
|
6843
|
+
return transformsToString;
|
|
6738
6844
|
}
|
|
6739
6845
|
});
|
|
6740
|
-
module2.exports = __toCommonJS2(
|
|
6741
|
-
var
|
|
6742
|
-
function
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
//
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
}
|
|
6751
|
-
});
|
|
6752
|
-
|
|
6753
|
-
// ../web/dist/cjs/helpers/sortString.native.js
|
|
6754
|
-
var require_sortString_native = __commonJS({
|
|
6755
|
-
"../web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
|
|
6756
|
-
"use strict";
|
|
6757
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
6758
|
-
for (var name in all) __defProp2(target, name, {
|
|
6759
|
-
get: all[name],
|
|
6760
|
-
enumerable: !0
|
|
6761
|
-
});
|
|
6762
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
6763
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6764
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
6765
|
-
for (var _loop = function() {
|
|
6766
|
-
var key = _step.value;
|
|
6767
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
6768
|
-
get: function() {
|
|
6769
|
-
return from[key];
|
|
6770
|
-
},
|
|
6771
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
6772
|
-
});
|
|
6773
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
6774
|
-
} catch (err) {
|
|
6775
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
6776
|
-
} finally {
|
|
6777
|
-
try {
|
|
6778
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
6779
|
-
} finally {
|
|
6780
|
-
if (_didIteratorError)
|
|
6781
|
-
throw _iteratorError;
|
|
6846
|
+
module2.exports = __toCommonJS2(transformsToString_exports);
|
|
6847
|
+
var import_normalizeValueWithProperty = require_normalizeValueWithProperty_native();
|
|
6848
|
+
function transformsToString(transforms) {
|
|
6849
|
+
return transforms.map(
|
|
6850
|
+
// { scale: 2 } => 'scale(2)'
|
|
6851
|
+
// { translateX: 20 } => 'translateX(20px)'
|
|
6852
|
+
// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
|
|
6853
|
+
function(transform) {
|
|
6854
|
+
var type = Object.keys(transform)[0], value = transform[type];
|
|
6855
|
+
return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
|
|
6782
6856
|
}
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
}, __toCommonJS2 = function(mod) {
|
|
6786
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
6787
|
-
value: !0
|
|
6788
|
-
}), mod);
|
|
6789
|
-
}, sortString_exports = {};
|
|
6790
|
-
__export2(sortString_exports, {
|
|
6791
|
-
sortString: function() {
|
|
6792
|
-
return sortString;
|
|
6793
|
-
}
|
|
6794
|
-
});
|
|
6795
|
-
module2.exports = __toCommonJS2(sortString_exports);
|
|
6796
|
-
var sortString = function(a, b) {
|
|
6797
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
6798
|
-
};
|
|
6857
|
+
).join(" ");
|
|
6858
|
+
}
|
|
6799
6859
|
}
|
|
6800
6860
|
});
|
|
6801
6861
|
|
|
@@ -6863,14 +6923,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6863
6923
|
}
|
|
6864
6924
|
});
|
|
6865
6925
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
6866
|
-
var
|
|
6926
|
+
var import_constants2 = require_index_native3(), import_helpers = require_index_native4(), import_react3 = __toESM2(require("react")), 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_isActivePlatform = require_isActivePlatform_native(), import_isActiveTheme = require_isActiveTheme_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_sortString = require_sortString_native(), import_transformsToString = require_transformsToString_native(), consoleGroupCollapsed = import_constants2.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
|
|
6867
6927
|
function isValidStyleKey(key, staticConfig) {
|
|
6868
6928
|
var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
6869
6929
|
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
6870
6930
|
}
|
|
6871
6931
|
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) {
|
|
6872
6932
|
conf = conf || (0, import_config.getConfig)(), import_constants2.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
6873
|
-
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants2.isWeb && !styleProps.
|
|
6933
|
+
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants2.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, styleState = {
|
|
6874
6934
|
classNames,
|
|
6875
6935
|
conf,
|
|
6876
6936
|
props,
|
|
@@ -6918,7 +6978,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6918
6978
|
}), console.groupEnd()), "continue";
|
|
6919
6979
|
if (isPseudo) {
|
|
6920
6980
|
if (!val) return "continue";
|
|
6921
|
-
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.
|
|
6981
|
+
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClass), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
6922
6982
|
if (!descriptor) return "continue";
|
|
6923
6983
|
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
6924
6984
|
var _pseudos, _key;
|
|
@@ -7005,7 +7065,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7005
7065
|
try {
|
|
7006
7066
|
for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
|
|
7007
7067
|
var style3 = _step12.value, property = style3[0];
|
|
7008
|
-
if (!(property[0] === "$" &&
|
|
7068
|
+
if (!(property[0] === "$" && !(0, import_isActivePlatform.isActivePlatform)(property))) {
|
|
7009
7069
|
var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
|
|
7010
7070
|
process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
|
|
7011
7071
|
var fullKey1 = `${style3[import_helpers.StyleObjectProperty]}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers.StyleObjectPseudo] || ""}`;
|
|
@@ -7034,9 +7094,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7034
7094
|
}
|
|
7035
7095
|
var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
|
|
7036
7096
|
if (isThemeMedia) {
|
|
7037
|
-
dynamicThemeAccess = !0;
|
|
7038
|
-
var mediaThemeName = mediaKeyShort.slice(6);
|
|
7039
|
-
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) return "continue";
|
|
7097
|
+
if (dynamicThemeAccess = !0, !(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return "continue";
|
|
7040
7098
|
} else if (isGroupMedia) {
|
|
7041
7099
|
var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
7042
7100
|
if (!groupContext) return process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`), "continue";
|
|
@@ -7067,7 +7125,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7067
7125
|
continue;
|
|
7068
7126
|
}
|
|
7069
7127
|
if (subKey[0] === "$") {
|
|
7070
|
-
if (!(0, import_isActivePlatform.isActivePlatform)(subKey)) continue;
|
|
7128
|
+
if (!(0, import_isActivePlatform.isActivePlatform)(subKey) || !(0, import_isActiveTheme.isActiveTheme)(subKey, themeName)) continue;
|
|
7071
7129
|
for (var subSubKey in mediaStyle1[subKey]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey][subSubKey]);
|
|
7072
7130
|
} else mergeMediaStyle2(subKey, mediaStyle1[subKey]);
|
|
7073
7131
|
}
|
|
@@ -7088,7 +7146,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7088
7146
|
if (accept) {
|
|
7089
7147
|
var accepted = accept[keyInit];
|
|
7090
7148
|
if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") {
|
|
7091
|
-
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.
|
|
7149
|
+
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass);
|
|
7092
7150
|
continue;
|
|
7093
7151
|
}
|
|
7094
7152
|
}
|
|
@@ -7749,7 +7807,7 @@ var require_Theme_native = __commonJS({
|
|
|
7749
7807
|
function getThemedChildren(themeState, children, props) {
|
|
7750
7808
|
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, { themeManager, isNewTheme } = themeState;
|
|
7751
7809
|
if (!themeManager) return children;
|
|
7752
|
-
var { shallow, forceClassName } = props, shouldRenderChildrenWithTheme = isNewTheme || isRoot ||
|
|
7810
|
+
var { shallow, forceClassName } = props, shouldRenderChildrenWithTheme = isNewTheme || isRoot || "inverse" in props || "name" in props || "reset" in props || "forceClassName" in props || stateRef.current.hasEverThemed;
|
|
7753
7811
|
if (shouldRenderChildrenWithTheme && (stateRef.current.hasEverThemed = !0), !shouldRenderChildrenWithTheme) return children;
|
|
7754
7812
|
process.env.NODE_ENV === "development" && shouldRenderChildrenWithTheme && props.debug === "verbose" && (0, import_log.log)(`adding theme: isRoot ${isRoot}, inverse ${"inverse" in props}, isNewTheme ${isNewTheme}, hasEver ${stateRef.current.hasEverThemed}`, props);
|
|
7755
7813
|
var next = children;
|
|
@@ -7773,7 +7831,7 @@ var require_Theme_native = __commonJS({
|
|
|
7773
7831
|
function wrapThemeElements(param) {
|
|
7774
7832
|
var { children, themeState, forceClassName, isRoot } = param;
|
|
7775
7833
|
if (isRoot && forceClassName === !1) return children;
|
|
7776
|
-
var inverse = themeState.inversed, requiresExtraWrapper = inverse
|
|
7834
|
+
var inverse = themeState.inversed, requiresExtraWrapper = typeof inverse == "boolean" || forceClassName, { className, style } = getThemeClassNameAndStyle(themeState, isRoot), themedChildren = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
7777
7835
|
className: `${className} _dsp_contents is_Theme`,
|
|
7778
7836
|
style,
|
|
7779
7837
|
children
|
|
@@ -7875,13 +7933,13 @@ var require_themeable_native = __commonJS({
|
|
|
7875
7933
|
...rest,
|
|
7876
7934
|
"data-disable-theme": !0
|
|
7877
7935
|
})
|
|
7878
|
-
),
|
|
7879
|
-
componentName: componentName || (staticConfig == null ? void 0 : staticConfig.componentName)
|
|
7880
|
-
|
|
7936
|
+
), filteredProps = {
|
|
7937
|
+
componentName: componentName || (staticConfig == null ? void 0 : staticConfig.componentName)
|
|
7938
|
+
};
|
|
7939
|
+
"debug" in props && (filteredProps.debug = props.debug), "theme" in props && (filteredProps.name = props.theme), "themeInverse" in props && (filteredProps.inverse = props.themeInverse), "themeReset" in props && (filteredProps.reset = themeReset);
|
|
7940
|
+
var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Theme.Theme, {
|
|
7881
7941
|
"disable-child-theme": !0,
|
|
7882
|
-
|
|
7883
|
-
inverse: themeInverse,
|
|
7884
|
-
reset: themeReset,
|
|
7942
|
+
...filteredProps,
|
|
7885
7943
|
children: element
|
|
7886
7944
|
});
|
|
7887
7945
|
if (context) {
|
|
@@ -7949,75 +8007,6 @@ var require_wrapStyleTags_native = __commonJS({
|
|
|
7949
8007
|
}
|
|
7950
8008
|
});
|
|
7951
8009
|
|
|
7952
|
-
// ../web/dist/cjs/hooks/useDidHydrateOnce.native.js
|
|
7953
|
-
var require_useDidHydrateOnce_native = __commonJS({
|
|
7954
|
-
"../web/dist/cjs/hooks/useDidHydrateOnce.native.js"(exports2, module2) {
|
|
7955
|
-
"use strict";
|
|
7956
|
-
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7957
|
-
for (var name in all) __defProp2(target, name, {
|
|
7958
|
-
get: all[name],
|
|
7959
|
-
enumerable: !0
|
|
7960
|
-
});
|
|
7961
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
7962
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7963
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
7964
|
-
for (var _loop = function() {
|
|
7965
|
-
var key = _step.value;
|
|
7966
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
7967
|
-
get: function() {
|
|
7968
|
-
return from[key];
|
|
7969
|
-
},
|
|
7970
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
7971
|
-
});
|
|
7972
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
7973
|
-
} catch (err) {
|
|
7974
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
7975
|
-
} finally {
|
|
7976
|
-
try {
|
|
7977
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7978
|
-
} finally {
|
|
7979
|
-
if (_didIteratorError)
|
|
7980
|
-
throw _iteratorError;
|
|
7981
|
-
}
|
|
7982
|
-
}
|
|
7983
|
-
return to;
|
|
7984
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
7985
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
7986
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
7987
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
7988
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
7989
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
7990
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
7991
|
-
value: mod,
|
|
7992
|
-
enumerable: !0
|
|
7993
|
-
}) : target,
|
|
7994
|
-
mod
|
|
7995
|
-
);
|
|
7996
|
-
}, __toCommonJS2 = function(mod) {
|
|
7997
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7998
|
-
value: !0
|
|
7999
|
-
}), mod);
|
|
8000
|
-
}, useDidHydrateOnce_exports = {};
|
|
8001
|
-
__export2(useDidHydrateOnce_exports, {
|
|
8002
|
-
useDidHydrateOnce: function() {
|
|
8003
|
-
return useDidHydrateOnce;
|
|
8004
|
-
},
|
|
8005
|
-
useDidHydrateOnceRoot: function() {
|
|
8006
|
-
return useDidHydrateOnceRoot;
|
|
8007
|
-
}
|
|
8008
|
-
});
|
|
8009
|
-
module2.exports = __toCommonJS2(useDidHydrateOnce_exports);
|
|
8010
|
-
var import_react3 = __toESM2(require("react")), import_config = require_config_native();
|
|
8011
|
-
function useDidHydrateOnceRoot() {
|
|
8012
|
-
return !0;
|
|
8013
|
-
}
|
|
8014
|
-
var last = Date.now();
|
|
8015
|
-
function useDidHydrateOnce() {
|
|
8016
|
-
return !0;
|
|
8017
|
-
}
|
|
8018
|
-
}
|
|
8019
|
-
});
|
|
8020
|
-
|
|
8021
8010
|
// ../web/dist/cjs/hooks/useComponentState.native.js
|
|
8022
8011
|
var require_useComponentState_native = __commonJS({
|
|
8023
8012
|
"../web/dist/cjs/hooks/useComponentState.native.js"(exports2, module2) {
|
|
@@ -8061,7 +8050,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
8061
8050
|
}
|
|
8062
8051
|
});
|
|
8063
8052
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
8064
|
-
var
|
|
8053
|
+
var import_constants2 = require_index_native3(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, param, staticConfig, config) {
|
|
8065
8054
|
var { animationDriver, groups } = param, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
8066
8055
|
stateRef.current || (stateRef.current = {});
|
|
8067
8056
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
@@ -8069,20 +8058,22 @@ var require_useComponentState_native = __commonJS({
|
|
|
8069
8058
|
return !!(next || curStateRef.hasAnimated);
|
|
8070
8059
|
}(), willBeAnimated = !import_constants2.isServer && willBeAnimatedClient;
|
|
8071
8060
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
8072
|
-
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,
|
|
8061
|
+
var { disableClassName } = props, 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, hasAnimationThatNeedsHydrate = hasAnimationProp && ((animationDriver == null ? void 0 : animationDriver.isReactNative) || !supportsCSSVars), hasEnterState = hasEnterStyle || isEntering, shouldEnter = hasEnterState || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate
|
|
8062
|
+
// this is just for a better ux, supports css variables for light/dark, media queries, etc
|
|
8063
|
+
disableClassName, initialState = shouldEnter ? (
|
|
8073
8064
|
// on the very first render we switch all spring animation drivers to css rendering
|
|
8074
8065
|
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
8075
8066
|
// without flickers of the wrong colors.
|
|
8076
8067
|
// but once we do that initial hydration and we are in client side rendering mode,
|
|
8077
8068
|
// we can avoid the extra re-render on mount
|
|
8078
|
-
|
|
8069
|
+
import_defaultComponentState.defaultComponentState
|
|
8079
8070
|
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
8080
8071
|
disabled != null && (initialState.disabled = disabled);
|
|
8081
8072
|
var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
|
|
8082
8073
|
...states[0],
|
|
8083
8074
|
[props.forceStyle]: !0
|
|
8084
|
-
} : states[0], setState = states[1], isHydrated = state.unmounted === !1
|
|
8085
|
-
import_constants2.isWeb &&
|
|
8075
|
+
} : states[0], setState = states[1], isHydrated = state.unmounted === !1, isAnimated = willBeAnimated;
|
|
8076
|
+
import_constants2.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({
|
|
8086
8077
|
...state
|
|
8087
8078
|
}));
|
|
8088
8079
|
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug);
|
|
@@ -8093,10 +8084,10 @@ var require_useComponentState_native = __commonJS({
|
|
|
8093
8084
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
8094
8085
|
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);
|
|
8095
8086
|
}
|
|
8096
|
-
var
|
|
8097
|
-
if (import_constants2.isWeb) {
|
|
8098
|
-
var
|
|
8099
|
-
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (
|
|
8087
|
+
var noClass = !import_constants2.isWeb || !!props.forceStyle;
|
|
8088
|
+
if (import_constants2.isWeb && (!import_constants2.isServer || isHydrated)) {
|
|
8089
|
+
var isAnimatedAndHydrated = isAnimated && !supportsCSSVars, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
8090
|
+
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
8100
8091
|
isAnimatedAndHydrated,
|
|
8101
8092
|
isDisabledManually,
|
|
8102
8093
|
isClassNameDisabled
|
|
@@ -8145,7 +8136,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
8145
8136
|
presenceState,
|
|
8146
8137
|
setState,
|
|
8147
8138
|
setStateShallow,
|
|
8148
|
-
|
|
8139
|
+
noClass,
|
|
8149
8140
|
state,
|
|
8150
8141
|
stateRef,
|
|
8151
8142
|
supportsCSSVars,
|
|
@@ -8492,7 +8483,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8492
8483
|
]), !1)
|
|
8493
8484
|
var timer;
|
|
8494
8485
|
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`;
|
|
8495
|
-
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow,
|
|
8486
|
+
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow, noClass, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config);
|
|
8496
8487
|
process.env.NODE_ENV === "development" && time && time`use-state`;
|
|
8497
8488
|
var hasTextAncestor = !!(import_constants2.isWeb && isText && componentContext.inText);
|
|
8498
8489
|
process.env.NODE_ENV === "development" && time && time`use-context`;
|
|
@@ -8509,11 +8500,10 @@ var require_createComponent_native = __commonJS({
|
|
|
8509
8500
|
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.shouldUpdate = function() {
|
|
8510
8501
|
return stateRef.current.isListeningToTheme;
|
|
8511
8502
|
}), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
8512
|
-
var name = `${componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (
|
|
8503
|
+
var name = `${componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (noClass ? "(noClass)" : " ") + (state.press || state.pressIn ? "(PRESSED)" : " ") + (state.hover ? "(HOVERED)" : " ") + (state.focus ? "(FOCUSED)" : " ") + ((presenceState == null ? void 0 : presenceState.isPresent) === !1 ? "(EXIT)" : ""), dataIs = propsIn["data-is"] || "", banner = `${internalID} ${name}${dataIs ? ` ${dataIs}` : ""} ${type}`;
|
|
8513
8504
|
if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"), import_constants2.isServer) (0, import_log.log)({
|
|
8514
|
-
|
|
8505
|
+
noClass,
|
|
8515
8506
|
isAnimated,
|
|
8516
|
-
shouldAvoidClasses,
|
|
8517
8507
|
isWeb: import_constants2.isWeb,
|
|
8518
8508
|
supportsCSSVars
|
|
8519
8509
|
});
|
|
@@ -8542,14 +8532,14 @@ var require_createComponent_native = __commonJS({
|
|
|
8542
8532
|
elementType = Component || elementType;
|
|
8543
8533
|
var isStringElement = typeof elementType == "string";
|
|
8544
8534
|
process.env.NODE_ENV === "development" && time && time`theme`;
|
|
8545
|
-
var mediaState2 = (0, import_useMedia.useMedia)(
|
|
8535
|
+
var mediaState2 = (0, import_useMedia.useMedia)(componentContext, debugProp);
|
|
8546
8536
|
(0, import_createVariable.setDidGetVariableValue)(!1), process.env.NODE_ENV === "development" && time && time`media`;
|
|
8547
8537
|
var resolveValues = (
|
|
8548
8538
|
// if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
|
|
8549
8539
|
isAnimated && !supportsCSSVars || isHOC && state.unmounted == !1 && hasAnimationProp ? "value" : "auto"
|
|
8550
8540
|
), styleProps = {
|
|
8551
8541
|
mediaState: mediaState2,
|
|
8552
|
-
|
|
8542
|
+
noClass,
|
|
8553
8543
|
resolveValues,
|
|
8554
8544
|
isExiting,
|
|
8555
8545
|
isAnimated,
|
|
@@ -8561,7 +8551,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8561
8551
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
8562
8552
|
}
|
|
8563
8553
|
process.env.NODE_ENV === "development" && time && time`split-styles`, curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
|
|
8564
|
-
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys ||
|
|
8554
|
+
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
8565
8555
|
process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(stateRef, shouldListenForMedia, mediaListeningKeys);
|
|
8566
8556
|
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
|
|
8567
8557
|
asChild,
|
|
@@ -8643,23 +8633,20 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8643
8633
|
}
|
|
8644
8634
|
}), import_react3.default.useEffect(function() {
|
|
8645
8635
|
if (!disabled) {
|
|
8636
|
+
var tm;
|
|
8646
8637
|
if (state.unmounted === !0 && hasEnterStyle) {
|
|
8647
8638
|
setStateShallow({
|
|
8648
8639
|
unmounted: "should-enter"
|
|
8649
8640
|
});
|
|
8650
8641
|
return;
|
|
8651
8642
|
}
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
animationDriver != null && animationDriver.supportsCSSVars ? tm = setTimeout(function() {
|
|
8655
|
-
setStateShallow({
|
|
8656
|
-
unmounted: !1
|
|
8657
|
-
});
|
|
8658
|
-
}) : setStateShallow({
|
|
8643
|
+
if (state.unmounted) return tm = setTimeout(function() {
|
|
8644
|
+
setStateShallow({
|
|
8659
8645
|
unmounted: !1
|
|
8660
8646
|
});
|
|
8661
|
-
|
|
8662
|
-
|
|
8647
|
+
}), function() {
|
|
8648
|
+
return clearTimeout(tm);
|
|
8649
|
+
};
|
|
8663
8650
|
var dispose = (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
8664
8651
|
disabled,
|
|
8665
8652
|
componentContext,
|
|
@@ -8682,7 +8669,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8682
8669
|
...mediaGroups
|
|
8683
8670
|
]).join("") : 0
|
|
8684
8671
|
]);
|
|
8685
|
-
var runtimePressStyle = !disabled &&
|
|
8672
|
+
var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants2.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimePressStyle);
|
|
8686
8673
|
process.env.NODE_ENV === "development" && time && time`events-setup`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("\u{1FAA9} events()", {
|
|
8687
8674
|
runtimeFocusStyle,
|
|
8688
8675
|
runtimePressStyle,
|
|
@@ -8851,8 +8838,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8851
8838
|
mediaListeningKeys,
|
|
8852
8839
|
pseudos,
|
|
8853
8840
|
shouldAttach,
|
|
8854
|
-
|
|
8855
|
-
shouldForcePseudo,
|
|
8841
|
+
noClass,
|
|
8856
8842
|
shouldListenForMedia,
|
|
8857
8843
|
splitStyles,
|
|
8858
8844
|
splitStylesStyle,
|
|
@@ -10721,22 +10707,14 @@ var require_index_native7 = __commonJS({
|
|
|
10721
10707
|
},
|
|
10722
10708
|
useDidFinishSSR: function() {
|
|
10723
10709
|
return useDidFinishSSR;
|
|
10724
|
-
},
|
|
10725
|
-
useDidFinishSSRSync: function() {
|
|
10726
|
-
return useDidFinishSSRSync;
|
|
10727
10710
|
}
|
|
10728
10711
|
});
|
|
10729
10712
|
module2.exports = __toCommonJS2(src_exports2);
|
|
10730
10713
|
var React3 = __toESM2(require("react"));
|
|
10731
|
-
function useDidFinishSSR(value
|
|
10714
|
+
function useDidFinishSSR(value) {
|
|
10732
10715
|
return value ?? !0;
|
|
10733
10716
|
var cur, setCur;
|
|
10734
10717
|
}
|
|
10735
|
-
function useDidFinishSSRSync(value) {
|
|
10736
|
-
return useDidFinishSSR(value, {
|
|
10737
|
-
sync: !0
|
|
10738
|
-
});
|
|
10739
|
-
}
|
|
10740
10718
|
function useClientValue(value) {
|
|
10741
10719
|
var done = useDidFinishSSR();
|
|
10742
10720
|
return done ? typeof value == "function" ? value() : value : void 0;
|
|
@@ -10932,7 +10910,7 @@ var require_useProps_native = __commonJS({
|
|
|
10932
10910
|
mediaState: mediaState2,
|
|
10933
10911
|
noSkip: !0,
|
|
10934
10912
|
noMergeStyle: !0,
|
|
10935
|
-
|
|
10913
|
+
noClass: !0,
|
|
10936
10914
|
resolveValues: "auto",
|
|
10937
10915
|
...opts
|
|
10938
10916
|
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
@@ -11303,10 +11281,10 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
11303
11281
|
}
|
|
11304
11282
|
});
|
|
11305
11283
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
11306
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_constants2 = require_index_native3(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(),
|
|
11284
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_constants2 = require_index_native3(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_ThemeProvider = require_ThemeProvider_native();
|
|
11307
11285
|
function TamaguiProvider(param) {
|
|
11308
11286
|
var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
|
|
11309
|
-
return
|
|
11287
|
+
return process.env.TAMAGUI_REACT_19 || import_constants2.isClient && (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
11310
11288
|
if (config && !disableInjectCSS) {
|
|
11311
11289
|
var style = document.createElement("style");
|
|
11312
11290
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
@@ -11628,6 +11606,9 @@ var require_index_native9 = __commonJS({
|
|
|
11628
11606
|
}), mod);
|
|
11629
11607
|
}, src_exports2 = {};
|
|
11630
11608
|
__export2(src_exports2, {
|
|
11609
|
+
_disableMediaTouch: function() {
|
|
11610
|
+
return import_useMedia._disableMediaTouch;
|
|
11611
|
+
},
|
|
11631
11612
|
configureMedia: function() {
|
|
11632
11613
|
return import_useMedia.configureMedia;
|
|
11633
11614
|
},
|