Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tamagui/helpers

Package Overview
Dependencies
Maintainers
1
Versions
1175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tamagui/helpers - npm Package Compare versions

Comparing version 1.111.8 to 1.111.9

6

dist/esm/clamp.native.js

@@ -5,5 +5,3 @@ function clamp(value, param) {

}
export {
clamp
};
//# sourceMappingURL=clamp.js.map
export { clamp };
//# sourceMappingURL=clamp.native.js.map
function composeEventHandlers(og, next) {
var { checkDefaultPrevented = !0 } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
return !og || !next ? next || og || void 0 : function(event) {
if (og?.(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
"defaultPrevented" in event && !event.defaultPrevented)
return next?.(event);
var {
checkDefaultPrevented = !0
} = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
return !og || !next ? next || og || void 0 : function (event) {
if (og?.(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) ||
// @ts-ignore
"defaultPrevented" in event && !event.defaultPrevented) return next?.(event);
};
}
export {
composeEventHandlers
};
//# sourceMappingURL=composeEventHandlers.js.map
export { composeEventHandlers };
//# sourceMappingURL=composeEventHandlers.native.js.map
function concatClassName(_cn) {
for (var args = arguments, usedPrefixes = [], final = "", len = args.length, propObjects = null, x = len; x >= 0; x--) {
var _loop = function(i2) {
var name = names[i2];
if (!name || name === " ") return "continue";
if (name[0] !== "_")
return final = name + " " + final, "continue";
var splitIndex = name.indexOf("-");
if (splitIndex < 1)
return final = name + " " + final, "continue";
var nextChar = name[splitIndex + 1], isMediaQuery = nextChar === "_", styleKey = name.slice(1, name.lastIndexOf("-")), mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null, uid = mediaKey ? styleKey + mediaKey : styleKey;
if (usedPrefixes.indexOf(uid) > -1)
return "continue";
usedPrefixes.push(uid);
var propName = styleKey;
if (propName && propObjects && propObjects.some(function(po) {
if (mediaKey) {
var propKey = pseudoInvert[mediaKey];
return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
}
var res = po && propName in po && po[propName] !== null;
return res;
}))
return "continue";
final = name + " " + final;
}, cns = args[x];
var _loop = function (i2) {
var name = names[i2];
if (!name || name === " ") return "continue";
if (name[0] !== "_") return final = name + " " + final, "continue";
var splitIndex = name.indexOf("-");
if (splitIndex < 1) return final = name + " " + final, "continue";
var nextChar = name[splitIndex + 1],
isMediaQuery = nextChar === "_",
styleKey = name.slice(1, name.lastIndexOf("-")),
mediaKey = isMediaQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null,
uid = mediaKey ? styleKey + mediaKey : styleKey;
if (usedPrefixes.indexOf(uid) > -1) return "continue";
usedPrefixes.push(uid);
var propName = styleKey;
if (propName && propObjects && propObjects.some(function (po) {
if (mediaKey) {
var propKey = pseudoInvert[mediaKey];
return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
}
var res = po && propName in po && po[propName] !== null;
return res;
})) return "continue";
final = name + " " + final;
},
cns = args[x];
if (cns) {

@@ -44,5 +45,3 @@ if (!Array.isArray(cns) && typeof cns != "string") {

};
export {
concatClassName
};
//# sourceMappingURL=concatClassName.js.map
export { concatClassName };
//# sourceMappingURL=concatClassName.native.js.map
export * from "@tamagui/simple-hash";
export * from "./clamp";
export * from "./composeEventHandlers";
export * from "./concatClassName";
export * from "./types";
export * from "./shouldRenderNativePlatform";
export * from "./validStyleProps";
export * from "./withStaticProperties";
//# sourceMappingURL=index.js.map
export * from "./clamp.native.js";
export * from "./composeEventHandlers.native.js";
export * from "./concatClassName.native.js";
export * from "./types.native.js";
export * from "./shouldRenderNativePlatform.native.js";
export * from "./validStyleProps.native.js";
export * from "./withStaticProperties.native.js";
//# sourceMappingURL=index.native.js.map
import { currentPlatform } from "@tamagui/constants";
var ALL_PLATFORMS = [
"web",
"android",
"ios"
];
var ALL_PLATFORMS = ["web", "android", "ios"];
function shouldRenderNativePlatform(nativeProp) {
if (!nativeProp)
return null;
var userRequestedPlatforms = resolvePlatformNames(nativeProp), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
if (!nativeProp) return null;
var userRequestedPlatforms = resolvePlatformNames(nativeProp),
_iteratorNormalCompletion = !0,
_didIteratorError = !1,
_iteratorError = void 0;
try {
for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
var platform = _step.value;
if (platform === currentPlatform && userRequestedPlatforms.has(platform))
return platform;
if (platform === currentPlatform && userRequestedPlatforms.has(platform)) return platform;
}

@@ -23,4 +20,3 @@ } catch (err) {

} finally {
if (_didIteratorError)
throw _iteratorError;
if (_didIteratorError) throw _iteratorError;
}

@@ -31,16 +27,11 @@ }

function resolvePlatformNames(nativeProp) {
var platforms = nativeProp === !0 ? (
var platforms = nativeProp === !0 ?
// all native platforms
ALL_PLATFORMS
) : nativeProp === !1 ? (
ALL_PLATFORMS : nativeProp === !1 ?
// no native platform
[]
) : Array.isArray(nativeProp) ? nativeProp : [
nativeProp
], set = new Set(platforms);
[] : Array.isArray(nativeProp) ? nativeProp : [nativeProp],
set = new Set(platforms);
return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
}
export {
shouldRenderNativePlatform
};
//# sourceMappingURL=shouldRenderNativePlatform.js.map
export { shouldRenderNativePlatform };
//# sourceMappingURL=shouldRenderNativePlatform.native.js.map

@@ -1,9 +0,7 @@

var StyleObjectProperty = 0, StyleObjectValue = 1, StyleObjectIdentifier = 2, StyleObjectPseudo = 3, StyleObjectRules = 4;
export {
StyleObjectIdentifier,
StyleObjectProperty,
StyleObjectPseudo,
StyleObjectRules,
StyleObjectValue
};
//# sourceMappingURL=types.js.map
var StyleObjectProperty = 0,
StyleObjectValue = 1,
StyleObjectIdentifier = 2,
StyleObjectPseudo = 3,
StyleObjectRules = 4;
export { StyleObjectIdentifier, StyleObjectProperty, StyleObjectPseudo, StyleObjectRules, StyleObjectValue };
//# sourceMappingURL=types.native.js.map
import { isAndroid } from "@tamagui/constants";
var textColors = {
color: !0,
textDecorationColor: !0,
textShadowColor: !0
}, tokenCategories = {
radius: {
borderRadius: !0,
borderTopLeftRadius: !0,
borderTopRightRadius: !0,
borderBottomLeftRadius: !0,
borderBottomRightRadius: !0,
// logical
borderStartStartRadius: !0,
borderStartEndRadius: !0,
borderEndStartRadius: !0,
borderEndEndRadius: !0
color: !0,
textDecorationColor: !0,
textShadowColor: !0
},
size: {
width: !0,
height: !0,
minWidth: !0,
minHeight: !0,
maxWidth: !0,
maxHeight: !0,
blockSize: !0,
minBlockSize: !0,
maxBlockSize: !0,
inlineSize: !0,
minInlineSize: !0,
maxInlineSize: !0
tokenCategories = {
radius: {
borderRadius: !0,
borderTopLeftRadius: !0,
borderTopRightRadius: !0,
borderBottomLeftRadius: !0,
borderBottomRightRadius: !0,
// logical
borderStartStartRadius: !0,
borderStartEndRadius: !0,
borderEndStartRadius: !0,
borderEndEndRadius: !0
},
size: {
width: !0,
height: !0,
minWidth: !0,
minHeight: !0,
maxWidth: !0,
maxHeight: !0,
blockSize: !0,
minBlockSize: !0,
maxBlockSize: !0,
inlineSize: !0,
minInlineSize: !0,
maxInlineSize: !0
},
zIndex: {
zIndex: !0
},
color: {
backgroundColor: !0,
borderColor: !0,
borderBlockStartColor: !0,
borderBlockEndColor: !0,
borderBlockColor: !0,
borderBottomColor: !0,
borderInlineColor: !0,
borderInlineStartColor: !0,
borderInlineEndColor: !0,
borderTopColor: !0,
borderLeftColor: !0,
borderRightColor: !0,
borderEndColor: !0,
borderStartColor: !0,
shadowColor: !0,
...textColors
}
},
zIndex: {
zIndex: !0
stylePropsUnitless = {
WebkitLineClamp: !0,
animationIterationCount: !0,
aspectRatio: !0,
borderImageOutset: !0,
borderImageSlice: !0,
borderImageWidth: !0,
columnCount: !0,
flex: !0,
flexGrow: !0,
flexOrder: !0,
flexPositive: !0,
flexShrink: !0,
flexNegative: !0,
fontWeight: !0,
gridRow: !0,
gridRowEnd: !0,
gridRowGap: !0,
gridRowStart: !0,
gridColumn: !0,
gridColumnEnd: !0,
gridColumnGap: !0,
gridColumnStart: !0,
gridTemplateColumns: !0,
gridTemplateAreas: !0,
lineClamp: !0,
opacity: !0,
order: !0,
orphans: !0,
tabSize: !0,
widows: !0,
zIndex: !0,
zoom: !0,
scale: !0,
scaleX: !0,
scaleY: !0,
scaleZ: !0,
shadowOpacity: !0
},
color: {
backgroundColor: !0,
borderColor: !0,
borderBlockStartColor: !0,
borderBlockEndColor: !0,
borderBlockColor: !0,
borderBottomColor: !0,
borderInlineColor: !0,
borderInlineStartColor: !0,
borderInlineEndColor: !0,
borderTopColor: !0,
borderLeftColor: !0,
borderRightColor: !0,
borderEndColor: !0,
borderStartColor: !0,
shadowColor: !0,
...textColors
}
}, stylePropsUnitless = {
WebkitLineClamp: !0,
animationIterationCount: !0,
aspectRatio: !0,
borderImageOutset: !0,
borderImageSlice: !0,
borderImageWidth: !0,
columnCount: !0,
flex: !0,
flexGrow: !0,
flexOrder: !0,
flexPositive: !0,
flexShrink: !0,
flexNegative: !0,
fontWeight: !0,
gridRow: !0,
gridRowEnd: !0,
gridRowGap: !0,
gridRowStart: !0,
gridColumn: !0,
gridColumnEnd: !0,
gridColumnGap: !0,
gridColumnStart: !0,
gridTemplateColumns: !0,
gridTemplateAreas: !0,
lineClamp: !0,
opacity: !0,
order: !0,
orphans: !0,
tabSize: !0,
widows: !0,
zIndex: !0,
zoom: !0,
scale: !0,
scaleX: !0,
scaleY: !0,
scaleZ: !0,
shadowOpacity: !0
}, stylePropsTransform = {
x: !0,
y: !0,
scale: !0,
perspective: !0,
scaleX: !0,
scaleY: !0,
skewX: !0,
skewY: !0,
matrix: !0,
rotate: !0,
rotateY: !0,
rotateX: !0,
rotateZ: !0
}, stylePropsView = {
backfaceVisibility: !0,
borderBottomEndRadius: !0,
borderBottomStartRadius: !0,
borderBottomWidth: !0,
borderLeftWidth: !0,
borderRightWidth: !0,
borderBlockWidth: !0,
borderBlockEndWidth: !0,
borderBlockStartWidth: !0,
borderInlineWidth: !0,
borderInlineEndWidth: !0,
borderInlineStartWidth: !0,
borderStyle: !0,
borderBlockStyle: !0,
borderBlockEndStyle: !0,
borderBlockStartStyle: !0,
borderInlineStyle: !0,
borderInlineEndStyle: !0,
borderInlineStartStyle: !0,
borderTopEndRadius: !0,
borderTopStartRadius: !0,
borderTopWidth: !0,
borderWidth: !0,
transform: !0,
transformOrigin: !0,
alignContent: !0,
alignItems: !0,
alignSelf: !0,
borderEndWidth: !0,
borderStartWidth: !0,
bottom: !0,
display: !0,
end: !0,
flexBasis: !0,
flexDirection: !0,
flexWrap: !0,
gap: !0,
columnGap: !0,
rowGap: !0,
justifyContent: !0,
left: !0,
margin: !0,
marginBlock: !0,
marginBlockEnd: !0,
marginBlockStart: !0,
marginInline: !0,
marginInlineStart: !0,
marginInlineEnd: !0,
marginBottom: !0,
marginEnd: !0,
marginHorizontal: !0,
marginLeft: !0,
marginRight: !0,
marginStart: !0,
marginTop: !0,
marginVertical: !0,
overflow: !0,
padding: !0,
paddingBottom: !0,
paddingInline: !0,
paddingBlock: !0,
paddingBlockStart: !0,
paddingInlineEnd: !0,
paddingInlineStart: !0,
paddingEnd: !0,
paddingHorizontal: !0,
paddingLeft: !0,
paddingRight: !0,
paddingStart: !0,
paddingTop: !0,
paddingVertical: !0,
position: !0,
right: !0,
start: !0,
top: !0,
inset: !0,
insetBlock: !0,
insetBlockEnd: !0,
insetBlockStart: !0,
insetInline: !0,
insetInlineEnd: !0,
insetInlineStart: !0,
direction: !0,
shadowOffset: !0,
shadowRadius: !0,
...tokenCategories.color,
...tokenCategories.radius,
...tokenCategories.size,
...tokenCategories.radius,
...stylePropsTransform,
...stylePropsUnitless,
...isAndroid ? {
elevationAndroid: !0
} : {}
}, stylePropsFont = {
fontFamily: !0,
fontSize: !0,
fontStyle: !0,
fontWeight: !0,
letterSpacing: !0,
lineHeight: !0,
textTransform: !0
}, stylePropsTextOnly = {
...stylePropsFont,
textAlign: !0,
textDecorationLine: !0,
textDecorationStyle: !0,
...textColors,
textShadowOffset: !0,
textShadowRadius: !0,
userSelect: !0,
selectable: !0,
verticalAlign: !0
}, stylePropsText = {
...stylePropsView,
...stylePropsTextOnly
}, stylePropsAll = stylePropsText, validPseudoKeys = {
enterStyle: !0,
exitStyle: !0,
hoverStyle: !0,
pressStyle: !0,
focusStyle: !0,
disabledStyle: !0
}, validStyles = {
...validPseudoKeys,
...stylePropsView
};
export {
stylePropsAll,
stylePropsFont,
stylePropsText,
stylePropsTextOnly,
stylePropsTransform,
stylePropsUnitless,
stylePropsView,
tokenCategories,
validPseudoKeys,
validStyles
};
//# sourceMappingURL=validStyleProps.js.map
stylePropsTransform = {
x: !0,
y: !0,
scale: !0,
perspective: !0,
scaleX: !0,
scaleY: !0,
skewX: !0,
skewY: !0,
matrix: !0,
rotate: !0,
rotateY: !0,
rotateX: !0,
rotateZ: !0
},
stylePropsView = {
backfaceVisibility: !0,
borderBottomEndRadius: !0,
borderBottomStartRadius: !0,
borderBottomWidth: !0,
borderLeftWidth: !0,
borderRightWidth: !0,
borderBlockWidth: !0,
borderBlockEndWidth: !0,
borderBlockStartWidth: !0,
borderInlineWidth: !0,
borderInlineEndWidth: !0,
borderInlineStartWidth: !0,
borderStyle: !0,
borderBlockStyle: !0,
borderBlockEndStyle: !0,
borderBlockStartStyle: !0,
borderInlineStyle: !0,
borderInlineEndStyle: !0,
borderInlineStartStyle: !0,
borderTopEndRadius: !0,
borderTopStartRadius: !0,
borderTopWidth: !0,
borderWidth: !0,
transform: !0,
transformOrigin: !0,
alignContent: !0,
alignItems: !0,
alignSelf: !0,
borderEndWidth: !0,
borderStartWidth: !0,
bottom: !0,
display: !0,
end: !0,
flexBasis: !0,
flexDirection: !0,
flexWrap: !0,
gap: !0,
columnGap: !0,
rowGap: !0,
justifyContent: !0,
left: !0,
margin: !0,
marginBlock: !0,
marginBlockEnd: !0,
marginBlockStart: !0,
marginInline: !0,
marginInlineStart: !0,
marginInlineEnd: !0,
marginBottom: !0,
marginEnd: !0,
marginHorizontal: !0,
marginLeft: !0,
marginRight: !0,
marginStart: !0,
marginTop: !0,
marginVertical: !0,
overflow: !0,
padding: !0,
paddingBottom: !0,
paddingInline: !0,
paddingBlock: !0,
paddingBlockStart: !0,
paddingInlineEnd: !0,
paddingInlineStart: !0,
paddingEnd: !0,
paddingHorizontal: !0,
paddingLeft: !0,
paddingRight: !0,
paddingStart: !0,
paddingTop: !0,
paddingVertical: !0,
position: !0,
right: !0,
start: !0,
top: !0,
inset: !0,
insetBlock: !0,
insetBlockEnd: !0,
insetBlockStart: !0,
insetInline: !0,
insetInlineEnd: !0,
insetInlineStart: !0,
direction: !0,
shadowOffset: !0,
shadowRadius: !0,
...tokenCategories.color,
...tokenCategories.radius,
...tokenCategories.size,
...tokenCategories.radius,
...stylePropsTransform,
...stylePropsUnitless,
...(isAndroid ? {
elevationAndroid: !0
} : {})
},
stylePropsFont = {
fontFamily: !0,
fontSize: !0,
fontStyle: !0,
fontWeight: !0,
letterSpacing: !0,
lineHeight: !0,
textTransform: !0
},
stylePropsTextOnly = {
...stylePropsFont,
textAlign: !0,
textDecorationLine: !0,
textDecorationStyle: !0,
...textColors,
textShadowOffset: !0,
textShadowRadius: !0,
userSelect: !0,
selectable: !0,
verticalAlign: !0
},
stylePropsText = {
...stylePropsView,
...stylePropsTextOnly
},
stylePropsAll = stylePropsText,
validPseudoKeys = {
enterStyle: !0,
exitStyle: !0,
hoverStyle: !0,
pressStyle: !0,
focusStyle: !0,
disabledStyle: !0
},
validStyles = {
...validPseudoKeys,
...stylePropsView
};
export { stylePropsAll, stylePropsFont, stylePropsText, stylePropsTextOnly, stylePropsTransform, stylePropsUnitless, stylePropsView, tokenCategories, validPseudoKeys, validStyles };
//# sourceMappingURL=validStyleProps.native.js.map
import React from "react";
var Decorated = Symbol(), withStaticProperties = function(component, staticProps) {
var next = function() {
if (component[Decorated]) {
var _ = /* @__PURE__ */ React.forwardRef(function(props, ref) {
return /* @__PURE__ */ React.createElement(component, {
...props,
ref
var Decorated = Symbol(),
withStaticProperties = function (component, staticProps) {
var next = function () {
if (component[Decorated]) {
var _ = /* @__PURE__ */React.forwardRef(function (props, ref) {
return /* @__PURE__ */React.createElement(component, {
...props,
ref
});
});
});
for (var key in component) {
var v = component[key];
_[key] = v && typeof v == "object" ? {
...v
} : v;
for (var key in component) {
var v = component[key];
_[key] = v && typeof v == "object" ? {
...v
} : v;
}
}
}
return component;
}();
return Object.assign(next, staticProps), next[Decorated] = !0, next;
};
export {
withStaticProperties
};
//# sourceMappingURL=withStaticProperties.js.map
return component;
}();
return Object.assign(next, staticProps), next[Decorated] = !0, next;
};
export { withStaticProperties };
//# sourceMappingURL=withStaticProperties.native.js.map
{
"name": "@tamagui/helpers",
"version": "1.111.8",
"version": "1.111.9",
"source": "src/index.ts",

@@ -22,7 +22,7 @@ "types": "./types/index.d.ts",

"dependencies": {
"@tamagui/constants": "1.111.8",
"@tamagui/simple-hash": "1.111.8"
"@tamagui/constants": "1.111.9",
"@tamagui/simple-hash": "1.111.9"
},
"devDependencies": {
"@tamagui/build": "1.111.8"
"@tamagui/build": "1.111.9"
},

@@ -35,3 +35,3 @@ "publishConfig": {

".": {
"react-native-import": "./dist/esm/index.native.mjs",
"react-native-import": "./dist/esm/index.native.js",
"react-native": "./dist/cjs/index.native.js",

@@ -38,0 +38,0 @@ "types": "./types/index.d.ts",

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