Socket
Socket
Sign inDemoInstall

@tamagui/web

Package Overview
Dependencies
Maintainers
2
Versions
799
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tamagui/web - npm Package Compare versions

Comparing version 1.20.6 to 1.20.7

6

dist/cjs/createComponent.js

@@ -597,3 +597,3 @@ "use strict";

}
if (process.env.NODE_ENV === "development" && process.env.DEBUG !== "tamagui") {
if (process.env.NODE_ENV === "development") {
if (debugProp) {

@@ -606,3 +606,2 @@ const element2 = typeof elementType === "string" ? elementType : "Component";

console.log("children", content);
console.groupEnd();
if (typeof window !== "undefined") {

@@ -612,2 +611,3 @@ console.log({ state, themeState, isAnimated, isAnimatedReactNativeWeb, tamaguiDefaultProps, viewProps, splitStyles, animationStyles, handlesPressEvents, isStringElement, classNamesIn: (_m = props.className) == null ? void 0 : _m.split(" "), classNamesOut: (_n = viewProps.className) == null ? void 0 : _n.split(" "), events, shouldAttach, styles, pseudos, content, shouldAvoidClasses, avoidClasses: avoidClassesWhileAnimating, animation: props.animation, style: splitStylesStyle, staticConfig, tamaguiConfig, shouldForcePseudo });

console.groupEnd();
console.groupEnd();
}

@@ -656,3 +656,3 @@ }

});
if (!import_constants.isWeb) {
if (process.env.TAMAGUI_TARGET === "native") {
for (const key in staticConfig.defaultProps) {

@@ -659,0 +659,0 @@ const val = staticConfig.defaultProps[key];

@@ -53,2 +53,9 @@ "use strict";

const deoptProps = config.deoptProps || /* @__PURE__ */ new Set();
const defaultProps = (0, import_mergeProps.mergeProps)(
{ ...parentStaticConfig.defaultProps },
{
...config.defaultVariants,
...config.defaultProps
}
)[0];
return parseStaticConfig({

@@ -65,12 +72,3 @@ ...parentStaticConfig,

} : parentStaticConfig.validStyles || import_helpers.stylePropsView,
defaultProps: (0, import_mergeProps.mergeProps)(
{
...parentStaticConfig.defaultProps,
...parentStaticConfig.defaultVariants
},
{
...config.defaultProps,
...config.defaultVariants
}
)[0]
defaultProps
});

@@ -77,0 +75,0 @@ }

@@ -165,3 +165,4 @@ "use strict";

};
if (process.env.NODE_ENV === "development" && debug === "verbose") {
if (process.env.NODE_ENV === "development" && debug) {
delete skipProps.debug;
console.groupCollapsed("getSplitStyles (looping backwards)");

@@ -208,3 +209,2 @@ console.log({ props, staticConfig, shouldDoClasses, state, IS_STATIC, propKeys, styleState, theme: { ...theme } });

function processProp(keyInit, valInit, special = false, fontFamilyOverride = null) {
var _a2;
if (keyInit === "className")

@@ -380,12 +380,25 @@ return;

const isVariant = variants && keyInit in variants;
const shouldPassProp = !(isMedia || isPseudo || isVariant || keyInit in validStyleProps || keyInit in shorthands);
const parentHasVariant = ((_a2 = staticConfig.parentStaticConfig) == null ? void 0 : _a2.variants) && keyInit in staticConfig.parentStaticConfig;
const isHOCShouldPassThrough = staticConfig.isHOC && isMediaOrPseudo;
const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough || parentHasVariant;
if (process.env.NODE_ENV === "development" && debug === "verbose" && shouldPassThrough) {
console.groupCollapsed(` \u{1F539} pass through ${keyInit}`);
console.log({ valInit, variants, parentHasVariant, isVariant, shouldPassProp });
console.groupEnd();
}
const shouldPassProp = !(isMediaOrPseudo || isVariant || keyInit in validStyleProps || keyInit in shorthands);
const isHOCShouldPassThrough = staticConfig.isHOC && (isMediaOrPseudo || isVariant);
const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
if (shouldPassThrough) {
if (process.env.NODE_ENV === "development" && debug === "verbose") {
console.groupCollapsed(` \u{1F539} pass through ${keyInit}`);
console.log({ valInit, variants, isVariant, shouldPassProp });
console.groupEnd();
}
if (isPseudo) {
const pseudoStyleObject = getSubStyle(
styleState,
keyInit,
valInit,
true,
state.noClassNames
);
const descriptor = import_pseudoDescriptors.pseudoDescriptors[keyInit];
for (const key in pseudoStyleObject) {
const fullKey = `${key}${PROP_SPLIT}${descriptor.name}`;
usedKeys[fullKey] = 1;
}
}
passDownProp(keyInit, valInit, isMediaOrPseudo);

@@ -396,6 +409,2 @@ if (!isVariant) {

}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
console.groupCollapsed(" \u{1F539} styles", keyInit, valInit);
console.log({ isVariant, shouldPassProp, isHOCShouldPassThrough, parentHasVariant });
}
const expanded = isMediaOrPseudo ? [[keyInit, valInit]] : propMapper(

@@ -411,2 +420,5 @@ keyInit,

);
if (!fontFamily) {
fontFamily = (0, import_createPropMapper.getPropMappedFontFamily)(expanded);
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {

@@ -419,12 +431,6 @@ console.groupCollapsed(" \u{1F539} styles", keyInit, valInit);

shouldPassProp,
isHOCShouldPassThrough,
parentHasVariant
isHOCShouldPassThrough
});
}
if (!fontFamily) {
fontFamily = (0, import_createPropMapper.getPropMappedFontFamily)(expanded);
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
if (!import_constants.isServer && import_isDevTools.isDevTools) {
console.log("expanded", expanded, "\nusedKeys", usedKeys, "\ncurrent", {
console.log("expanded", expanded, "\nusedKeys", { ...usedKeys }, "\ncurrent", {
...style

@@ -460,3 +466,5 @@ });

passDownProp(key, val, true);
continue;
if (!isVariant) {
continue;
}
}

@@ -463,0 +471,0 @@ if (isPseudo) {

@@ -50,3 +50,3 @@ "use strict";

if (options) {
const {
let {
variants,

@@ -59,3 +59,6 @@ name,

if (defaultVariants) {
Object.assign(defaultProps, defaultVariants);
defaultProps = {
...defaultVariants,
...defaultProps
};
}

@@ -62,0 +65,0 @@ const nativeConf = isReactNative && import_setupReactNative.ReactNativeStaticConfigs.get(Component) || null;

@@ -575,3 +575,3 @@ import { jsx } from "react/jsx-runtime";

}
if (process.env.NODE_ENV === "development" && process.env.DEBUG !== "tamagui") {
if (process.env.NODE_ENV === "development") {
if (debugProp) {

@@ -584,3 +584,2 @@ const element2 = typeof elementType === "string" ? elementType : "Component";

console.log("children", content);
console.groupEnd();
if (typeof window !== "undefined") {

@@ -590,2 +589,3 @@ console.log({ state, themeState, isAnimated, isAnimatedReactNativeWeb, tamaguiDefaultProps, viewProps, splitStyles, animationStyles, handlesPressEvents, isStringElement, classNamesIn: (_l = props.className) == null ? void 0 : _l.split(" "), classNamesOut: (_m = viewProps.className) == null ? void 0 : _m.split(" "), events, shouldAttach, styles, pseudos, content, shouldAvoidClasses, avoidClasses: avoidClassesWhileAnimating, animation: props.animation, style: splitStylesStyle, staticConfig, tamaguiConfig, shouldForcePseudo });

console.groupEnd();
console.groupEnd();
}

@@ -634,3 +634,3 @@ }

});
if (!isWeb) {
if (process.env.TAMAGUI_TARGET === "native") {
for (const key in staticConfig.defaultProps) {

@@ -637,0 +637,0 @@ const val = staticConfig.defaultProps[key];

@@ -29,2 +29,9 @@ import { stylePropsView } from "@tamagui/helpers";

const deoptProps = config.deoptProps || /* @__PURE__ */ new Set();
const defaultProps = mergeProps(
{ ...parentStaticConfig.defaultProps },
{
...config.defaultVariants,
...config.defaultProps
}
)[0];
return parseStaticConfig({

@@ -41,12 +48,3 @@ ...parentStaticConfig,

} : parentStaticConfig.validStyles || stylePropsView,
defaultProps: mergeProps(
{
...parentStaticConfig.defaultProps,
...parentStaticConfig.defaultVariants
},
{
...config.defaultProps,
...config.defaultVariants
}
)[0]
defaultProps
});

@@ -53,0 +51,0 @@ }

@@ -168,3 +168,4 @@ import {

};
if (process.env.NODE_ENV === "development" && debug === "verbose") {
if (process.env.NODE_ENV === "development" && debug) {
delete skipProps.debug;
console.groupCollapsed("getSplitStyles (looping backwards)");

@@ -211,3 +212,2 @@ console.log({ props, staticConfig, shouldDoClasses, state, IS_STATIC, propKeys, styleState, theme: { ...theme } });

function processProp(keyInit, valInit, special = false, fontFamilyOverride = null) {
var _a2;
if (keyInit === "className")

@@ -383,12 +383,25 @@ return;

const isVariant = variants && keyInit in variants;
const shouldPassProp = !(isMedia || isPseudo || isVariant || keyInit in validStyleProps || keyInit in shorthands);
const parentHasVariant = ((_a2 = staticConfig.parentStaticConfig) == null ? void 0 : _a2.variants) && keyInit in staticConfig.parentStaticConfig;
const isHOCShouldPassThrough = staticConfig.isHOC && isMediaOrPseudo;
const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough || parentHasVariant;
if (process.env.NODE_ENV === "development" && debug === "verbose" && shouldPassThrough) {
console.groupCollapsed(` \u{1F539} pass through ${keyInit}`);
console.log({ valInit, variants, parentHasVariant, isVariant, shouldPassProp });
console.groupEnd();
}
const shouldPassProp = !(isMediaOrPseudo || isVariant || keyInit in validStyleProps || keyInit in shorthands);
const isHOCShouldPassThrough = staticConfig.isHOC && (isMediaOrPseudo || isVariant);
const shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
if (shouldPassThrough) {
if (process.env.NODE_ENV === "development" && debug === "verbose") {
console.groupCollapsed(` \u{1F539} pass through ${keyInit}`);
console.log({ valInit, variants, isVariant, shouldPassProp });
console.groupEnd();
}
if (isPseudo) {
const pseudoStyleObject = getSubStyle(
styleState,
keyInit,
valInit,
true,
state.noClassNames
);
const descriptor = pseudoDescriptors[keyInit];
for (const key in pseudoStyleObject) {
const fullKey = `${key}${PROP_SPLIT}${descriptor.name}`;
usedKeys[fullKey] = 1;
}
}
passDownProp(keyInit, valInit, isMediaOrPseudo);

@@ -399,6 +412,2 @@ if (!isVariant) {

}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
console.groupCollapsed(" \u{1F539} styles", keyInit, valInit);
console.log({ isVariant, shouldPassProp, isHOCShouldPassThrough, parentHasVariant });
}
const expanded = isMediaOrPseudo ? [[keyInit, valInit]] : propMapper(

@@ -414,2 +423,5 @@ keyInit,

);
if (!fontFamily) {
fontFamily = getPropMappedFontFamily(expanded);
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {

@@ -422,12 +434,6 @@ console.groupCollapsed(" \u{1F539} styles", keyInit, valInit);

shouldPassProp,
isHOCShouldPassThrough,
parentHasVariant
isHOCShouldPassThrough
});
}
if (!fontFamily) {
fontFamily = getPropMappedFontFamily(expanded);
}
if (process.env.NODE_ENV === "development" && debug === "verbose") {
if (!isServer && isDevTools) {
console.log("expanded", expanded, "\nusedKeys", usedKeys, "\ncurrent", {
console.log("expanded", expanded, "\nusedKeys", { ...usedKeys }, "\ncurrent", {
...style

@@ -463,3 +469,5 @@ });

passDownProp(key, val, true);
continue;
if (!isVariant) {
continue;
}
}

@@ -466,0 +474,0 @@ if (isPseudo) {

@@ -27,3 +27,3 @@ import { stylePropsAll } from "@tamagui/helpers";

if (options) {
const {
let {
variants,

@@ -36,3 +36,6 @@ name,

if (defaultVariants) {
Object.assign(defaultProps, defaultVariants);
defaultProps = {
...defaultVariants,
...defaultProps
};
}

@@ -39,0 +42,0 @@ const nativeConf = isReactNative && ReactNativeStaticConfigs.get(Component) || null;

{
"name": "@tamagui/web",
"version": "1.20.6",
"version": "1.20.7",
"source": "src/index.ts",

@@ -30,9 +30,9 @@ "main": "dist/cjs",

"dependencies": {
"@tamagui/compose-refs": "1.20.6",
"@tamagui/constants": "1.20.6",
"@tamagui/helpers": "1.20.6",
"@tamagui/normalize-css-color": "1.20.6",
"@tamagui/use-did-finish-ssr": "1.20.6",
"@tamagui/use-event": "1.20.6",
"@tamagui/use-force-update": "1.20.6"
"@tamagui/compose-refs": "1.20.7",
"@tamagui/constants": "1.20.7",
"@tamagui/helpers": "1.20.7",
"@tamagui/normalize-css-color": "1.20.7",
"@tamagui/use-did-finish-ssr": "1.20.7",
"@tamagui/use-event": "1.20.7",
"@tamagui/use-force-update": "1.20.7"
},

@@ -43,3 +43,3 @@ "peerDependencies": {

"devDependencies": {
"@tamagui/build": "1.20.6",
"@tamagui/build": "1.20.7",
"@testing-library/react": "^13.4.0",

@@ -46,0 +46,0 @@ "csstype": "^3.0.10",

@@ -43,2 +43,10 @@ import { stylePropsView } from '@tamagui/helpers'

const defaultProps = mergeProps(
{ ...parentStaticConfig.defaultProps },
{
...config.defaultVariants,
...config.defaultProps,
}
)[0]
return parseStaticConfig({

@@ -57,12 +65,3 @@ ...parentStaticConfig,

: parentStaticConfig.validStyles || stylePropsView,
defaultProps: mergeProps(
{
...parentStaticConfig.defaultProps,
...parentStaticConfig.defaultVariants,
},
{
...config.defaultProps,
...config.defaultVariants,
}
)[0],
defaultProps,
})

@@ -69,0 +68,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc