@tamagui/core 1.105.6 → 1.105.7
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 +19 -4
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +18 -4
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -2477,6 +2477,9 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2477
2477
|
scanAllSheets: function() {
|
|
2478
2478
|
return scanAllSheets;
|
|
2479
2479
|
},
|
|
2480
|
+
setNonce: function() {
|
|
2481
|
+
return setNonce2;
|
|
2482
|
+
},
|
|
2480
2483
|
shouldInsertStyleRules: function() {
|
|
2481
2484
|
return shouldInsertStyleRules;
|
|
2482
2485
|
},
|
|
@@ -2753,12 +2756,20 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2753
2756
|
var getIdentifierFromTamaguiSelector = function(selector) {
|
|
2754
2757
|
var dotIndex = selector.indexOf(":");
|
|
2755
2758
|
return dotIndex > -1 ? selector.slice(7, dotIndex) : selector.slice(7);
|
|
2756
|
-
}, sheet =
|
|
2759
|
+
}, sheet = null;
|
|
2757
2760
|
function updateRules(identifier, rules) {
|
|
2758
2761
|
if (!process.env.TAMAGUI_REACT_19) return identifier in allRules ? !1 : (allRules[identifier] = rules.join(" "), identifier.startsWith("_transform-") ? addTransform(identifier, rules[0]) : !0);
|
|
2759
2762
|
}
|
|
2763
|
+
var nonce = "";
|
|
2764
|
+
function setNonce2(_) {
|
|
2765
|
+
nonce = _;
|
|
2766
|
+
}
|
|
2760
2767
|
function insertStyleRules(rulesToInsert) {
|
|
2761
2768
|
if (!process.env.TAMAGUI_REACT_19) {
|
|
2769
|
+
if (!sheet && import_constants.isClient && document.head) {
|
|
2770
|
+
var styleTag = document.createElement("style");
|
|
2771
|
+
nonce && (styleTag.nonce = nonce), sheet = document.head.appendChild(styleTag).sheet;
|
|
2772
|
+
}
|
|
2762
2773
|
if (!sheet) return;
|
|
2763
2774
|
for (var key in rulesToInsert) {
|
|
2764
2775
|
var styleObject = rulesToInsert[key], identifier = styleObject[import_helpers.StyleObjectIdentifier];
|
|
@@ -8605,7 +8616,7 @@ var require_Theme_native = __commonJS({
|
|
|
8605
8616
|
}
|
|
8606
8617
|
});
|
|
8607
8618
|
module2.exports = __toCommonJS2(Theme_exports);
|
|
8608
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_constants = require_index_native3(), import_react3 = __toESM2(require("react")), import_createVariable = require_createVariable_native(), import_ThemeManagerContext = require_ThemeManagerContext_native(), import_useTheme = require_useTheme_native(), import_ThemeDebug = require_ThemeDebug_native();
|
|
8619
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_constants = require_index_native3(), import_react3 = __toESM2(require("react")), import_createVariable = require_createVariable_native(), import_ThemeManagerContext = require_ThemeManagerContext_native(), import_useTheme = require_useTheme_native(), import_ThemeDebug = require_ThemeDebug_native(), import_log = require_log_native();
|
|
8609
8620
|
function _define_property2(obj, key, value) {
|
|
8610
8621
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
8611
8622
|
value,
|
|
@@ -8658,8 +8669,9 @@ var require_Theme_native = __commonJS({
|
|
|
8658
8669
|
function getThemedChildren(themeState, children, props) {
|
|
8659
8670
|
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;
|
|
8660
8671
|
if (!themeManager) 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");
|
|
8661
|
-
var shallow = props.shallow, forceClassName = props.forceClassName, shouldRenderChildrenWithTheme = isNewTheme ||
|
|
8672
|
+
var shallow = props.shallow, forceClassName = props.forceClassName, shouldRenderChildrenWithTheme = isNewTheme || isRoot || stateRef.current.hasEverThemed || typeof props.inverse == "boolean";
|
|
8662
8673
|
if (shouldRenderChildrenWithTheme && (stateRef.current.hasEverThemed = !0), !shouldRenderChildrenWithTheme) return children;
|
|
8674
|
+
process.env.NODE_ENV === "development" && shouldRenderChildrenWithTheme && props.debug && (0, import_log.log)("adding theme: isRoot ".concat(isRoot, ", inverse ").concat("inverse" in props, ", isNewTheme ").concat(isNewTheme, ", hasEver ").concat(stateRef.current.hasEverThemed), props);
|
|
8663
8675
|
var next = children;
|
|
8664
8676
|
shallow && (next = import_react3.Children.toArray(children).map(function(child) {
|
|
8665
8677
|
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Theme, {
|
|
@@ -13317,6 +13329,9 @@ var require_index_native9 = __commonJS({
|
|
|
13317
13329
|
mediaState: function() {
|
|
13318
13330
|
return import_useMedia.mediaState;
|
|
13319
13331
|
},
|
|
13332
|
+
setNonce: function() {
|
|
13333
|
+
return import_insertStyleRule.setNonce;
|
|
13334
|
+
},
|
|
13320
13335
|
setupDev: function() {
|
|
13321
13336
|
return import_config.setupDev;
|
|
13322
13337
|
},
|
|
@@ -13341,7 +13356,7 @@ var require_index_native9 = __commonJS({
|
|
|
13341
13356
|
__reExport2(src_exports2, require_styled_native(), module2.exports);
|
|
13342
13357
|
__reExport2(src_exports2, require_setupReactNative_native(), module2.exports);
|
|
13343
13358
|
__reExport2(src_exports2, require_GetRef_native(), module2.exports);
|
|
13344
|
-
var import_config = require_config_native();
|
|
13359
|
+
var import_config = require_config_native(), import_insertStyleRule = require_insertStyleRule_native();
|
|
13345
13360
|
__reExport2(src_exports2, require_constants_native2(), module2.exports);
|
|
13346
13361
|
__reExport2(src_exports2, require_ComponentContext_native(), module2.exports);
|
|
13347
13362
|
__reExport2(src_exports2, require_withStableStyle_native(), module2.exports);
|