@tamagui/core 1.95.3 → 1.97.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 +69 -9
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +67 -8
- package/dist/test.native.js.map +3 -3
- package/package.json +6 -6
- package/reset.css +1 -1
- package/src/hooks/useElementLayout.tsx +1 -1
- package/types/hooks/useElementLayout.d.ts +1 -1
- package/types/hooks/useElementLayout.d.ts.map +1 -1
package/dist/native.js
CHANGED
|
@@ -6983,7 +6983,8 @@ var require_skipProps_native = __commonJS({
|
|
|
6983
6983
|
outlineStyle: 1,
|
|
6984
6984
|
outlineOffset: 1,
|
|
6985
6985
|
outlineWidth: 1,
|
|
6986
|
-
outlineColor: 1
|
|
6986
|
+
outlineColor: 1,
|
|
6987
|
+
scrollbarWidth: 1
|
|
6987
6988
|
});
|
|
6988
6989
|
}
|
|
6989
6990
|
});
|
|
@@ -8393,20 +8394,24 @@ var require_Theme_native = __commonJS({
|
|
|
8393
8394
|
});
|
|
8394
8395
|
} catch {
|
|
8395
8396
|
}
|
|
8396
|
-
|
|
8397
|
+
process.env.NODE_ENV === "development" && props.debug === "visualize" && (finalChildren = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeDebug.ThemeDebug, {
|
|
8397
8398
|
themeState,
|
|
8398
8399
|
themeProps: props,
|
|
8399
8400
|
children: finalChildren
|
|
8400
|
-
}))
|
|
8401
|
+
}));
|
|
8402
|
+
var stateRef = (0, import_react3.useRef)({
|
|
8403
|
+
hasEverThemed: !1
|
|
8404
|
+
});
|
|
8405
|
+
return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef);
|
|
8401
8406
|
});
|
|
8402
8407
|
Theme.displayName = "Theme";
|
|
8403
8408
|
Theme.avoidForwardRef = !0;
|
|
8404
8409
|
function getThemedChildren(themeState, children, props) {
|
|
8405
|
-
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, themeManager = themeState.themeManager, isNewTheme = themeState.isNewTheme;
|
|
8410
|
+
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, themeManager = themeState.themeManager, isNewTheme = themeState.isNewTheme;
|
|
8406
8411
|
if (!themeManager)
|
|
8407
8412
|
throw new Error(process.env.NODE_ENV === "development" ? "\u274C No theme found, either incorrect name, potential duplicate tamagui deps, or TamaguiProvider not providing themes." : "\u274C 005");
|
|
8408
|
-
var shallow = props.shallow, forceClassName = props.forceClassName,
|
|
8409
|
-
if (shouldRenderChildrenWithTheme && (
|
|
8413
|
+
var shallow = props.shallow, forceClassName = props.forceClassName, shouldRenderChildrenWithTheme = isNewTheme || "inverse" in props || "theme" in props || stateRef.current.hasEverThemed || forceClassName || isRoot;
|
|
8414
|
+
if (shouldRenderChildrenWithTheme && (stateRef.current.hasEverThemed = !0), !shouldRenderChildrenWithTheme)
|
|
8410
8415
|
return children;
|
|
8411
8416
|
var next = children;
|
|
8412
8417
|
shallow && (next = import_react3.Children.toArray(children).map(function(child) {
|
|
@@ -8797,6 +8802,61 @@ var require_Slot_native = __commonJS({
|
|
|
8797
8802
|
}
|
|
8798
8803
|
});
|
|
8799
8804
|
|
|
8805
|
+
// ../web/dist/cjs/helpers/setElementProps.native.js
|
|
8806
|
+
var require_setElementProps_native = __commonJS({
|
|
8807
|
+
"../web/dist/cjs/helpers/setElementProps.native.js"(exports2, module2) {
|
|
8808
|
+
"use strict";
|
|
8809
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
8810
|
+
for (var name in all)
|
|
8811
|
+
__defProp2(target, name, {
|
|
8812
|
+
get: all[name],
|
|
8813
|
+
enumerable: !0
|
|
8814
|
+
});
|
|
8815
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
8816
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
8817
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8818
|
+
try {
|
|
8819
|
+
for (var _loop = function() {
|
|
8820
|
+
var key = _step.value;
|
|
8821
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
8822
|
+
get: function() {
|
|
8823
|
+
return from[key];
|
|
8824
|
+
},
|
|
8825
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
8826
|
+
});
|
|
8827
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0)
|
|
8828
|
+
_loop();
|
|
8829
|
+
} catch (err) {
|
|
8830
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
8831
|
+
} finally {
|
|
8832
|
+
try {
|
|
8833
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
8834
|
+
} finally {
|
|
8835
|
+
if (_didIteratorError)
|
|
8836
|
+
throw _iteratorError;
|
|
8837
|
+
}
|
|
8838
|
+
}
|
|
8839
|
+
return to;
|
|
8840
|
+
}, __toCommonJS2 = function(mod) {
|
|
8841
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
8842
|
+
value: !0
|
|
8843
|
+
}), mod);
|
|
8844
|
+
}, setElementProps_native_exports = {};
|
|
8845
|
+
__export2(setElementProps_native_exports, {
|
|
8846
|
+
setElementProps: function() {
|
|
8847
|
+
return setElementProps;
|
|
8848
|
+
}
|
|
8849
|
+
});
|
|
8850
|
+
module2.exports = __toCommonJS2(setElementProps_native_exports);
|
|
8851
|
+
function setElementProps(element) {
|
|
8852
|
+
element && !element.getBoundingClientRect && (element.getBoundingClientRect = function() {
|
|
8853
|
+
if (element.unstable_getBoundingClientRect != null)
|
|
8854
|
+
return element.unstable_getBoundingClientRect();
|
|
8855
|
+
});
|
|
8856
|
+
}
|
|
8857
|
+
}
|
|
8858
|
+
});
|
|
8859
|
+
|
|
8800
8860
|
// ../web/dist/cjs/createComponent.native.js
|
|
8801
8861
|
var require_createComponent_native = __commonJS({
|
|
8802
8862
|
"../web/dist/cjs/createComponent.native.js"(exports2, module2) {
|
|
@@ -8880,7 +8940,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8880
8940
|
}
|
|
8881
8941
|
});
|
|
8882
8942
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8883
|
-
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_use_did_finish_ssr = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = require_constants_native2(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_themeable = require_themeable_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(), import_isDevTools = require_isDevTools_native();
|
|
8943
|
+
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_use_did_finish_ssr = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = require_constants_native2(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_themeable = require_themeable_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(), import_isDevTools = require_isDevTools_native(), import_setElementProps = require_setElementProps_native();
|
|
8884
8944
|
function _array_like_to_array(arr, len) {
|
|
8885
8945
|
(len == null || len > arr.length) && (len = arr.length);
|
|
8886
8946
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
@@ -9485,7 +9545,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9485
9545
|
}), stateRef.current.hasMeasured = !0;
|
|
9486
9546
|
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curStateRef.willHydrate)) || nonTamaguiProps, curStateRef.composedRef || (curStateRef.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
9487
9547
|
return stateRef.current.host = x;
|
|
9488
|
-
}, forwardedRef)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react3.Children.toArray(props.children).forEach(function(item) {
|
|
9548
|
+
}, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react3.Children.toArray(props.children).forEach(function(item) {
|
|
9489
9549
|
typeof item == "string" && item !== `
|
|
9490
9550
|
` && console.error("Unexpected text node: ".concat(item, ". A text node cannot be a child of a <View>."));
|
|
9491
9551
|
}), process.env.NODE_ENV === "development" && time && time(_templateObject13());
|
|
@@ -9634,7 +9694,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9634
9694
|
if (groupName && subGroupContext && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, _object_spread_props(_object_spread2({}, componentContext), {
|
|
9635
9695
|
groups: subGroupContext,
|
|
9636
9696
|
children: content
|
|
9637
|
-
}))), process.env.NODE_ENV === "development" && time && time(_templateObject19()), content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1), process.env.NODE_ENV === "development" && time && time(_templateObject20()), process.env.NODE_ENV === "development" && props.debug === "visualize" && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeDebug.ThemeDebug, {
|
|
9697
|
+
}))), process.env.NODE_ENV === "development" && time && time(_templateObject19()), content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time && time(_templateObject20()), process.env.NODE_ENV === "development" && props.debug === "visualize" && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeDebug.ThemeDebug, {
|
|
9638
9698
|
themeState,
|
|
9639
9699
|
themeProps: props,
|
|
9640
9700
|
children: content
|