@tamagui/helpers 1.0.0-alpha.31 → 1.0.0-alpha.38
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/.buildinfo +1 -0
- package/dist/concatClassName.js +43 -55
- package/dist/concatClassName.js.map +2 -2
- package/dist/getStylesAtomic.js +17 -12
- package/dist/getStylesAtomic.js.map +2 -2
- package/dist/index.cjs +226 -90
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +3 -1
- package/dist/index.js.map +2 -2
- package/dist/validStyleProps.js +11 -23
- package/dist/validStyleProps.js.map +2 -2
- package/package.json +3 -3
- package/dist/allRules.js +0 -9
- package/dist/allRules.js.map +0 -7
- package/dist/cjs/allRules.js +0 -15
- package/dist/cjs/allRules.js.map +0 -7
- package/dist/cjs/concatClassName.js +0 -78
- package/dist/cjs/concatClassName.js.map +0 -7
- package/dist/cjs/index.js +0 -24
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/simpleHash.js +0 -21
- package/dist/cjs/simpleHash.js.map +0 -7
- package/dist/cjs/types.js +0 -4
- package/dist/cjs/types.js.map +0 -7
- package/dist/cjs/validStyleProps.js +0 -163
- package/dist/cjs/validStyleProps.js.map +0 -7
- package/dist/esm/allRules.js +0 -9
- package/dist/esm/allRules.js.map +0 -7
- package/dist/esm/concatClassName.js +0 -72
- package/dist/esm/concatClassName.js.map +0 -7
- package/dist/esm/index.js +0 -5
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/simpleHash.js +0 -15
- package/dist/esm/simpleHash.js.map +0 -7
- package/dist/esm/types.js +0 -1
- package/dist/esm/types.js.map +0 -7
- package/dist/esm/validStyleProps.js +0 -150
- package/dist/esm/validStyleProps.js.map +0 -7
- package/dist/getStylesAtomic.native.js +0 -11
- package/dist/getStylesAtomic.native.js.map +0 -7
- package/dist/jsx/allRules.js +0 -8
- package/dist/jsx/concatClassName.js +0 -71
- package/dist/jsx/index.js +0 -4
- package/dist/jsx/simpleHash.js +0 -14
- package/dist/jsx/types.js +0 -0
- package/dist/jsx/validStyleProps.js +0 -149
- package/types/allRules.d.ts.map +0 -1
- package/types/concatClassName.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/simpleHash.d.ts.map +0 -1
- package/types/types.d.ts.map +0 -1
- package/types/validStyleProps.d.ts.map +0 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/index.ts", "../src/
|
|
4
|
-
"sourcesContent": ["export * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from './allRules'\n", "// perf sensitive so doing some weird stuff\n\n// testing caching\n// because we can hit these recent ones a ton of times in common cases\n// we're caching the simple case, this shouldn't be bad on memory either\n// const recently = new Map()\n// setInterval(() => {\n// recently.clear()\n// }, 1000)\n\nexport function concatClassName(_cn: any) {\n // if (arguments.length === 1) {\n // if (recently.has(arguments[0])) {\n // return recently.get(arguments[0])\n // }\n // }\n\n const classNamesOrPropObjects = arguments\n const usedPrefixes: string[] = []\n let final = ''\n\n const len = classNamesOrPropObjects.length\n let propObjects: any = null\n for (let x = len; x >= 0; x--) {\n const cns = classNamesOrPropObjects[x]\n if (!cns) continue\n if (!Array.isArray(cns) && typeof cns !== 'string') {\n // is prop object\n propObjects = propObjects || []\n propObjects.push(cns)\n continue\n }\n const names = Array.isArray(cns) ? cns : cns.split(' ')\n\n const numNames = names.length\n for (let i = numNames - 1; i >= 0; i--) {\n const name = names[i]\n if (!name || name === ' ') continue\n if (name[0] !== '_') {\n // not snack style (todo slightly stronger heuristic)\n final = name + ' ' + final\n continue\n }\n const splitIndex = name.indexOf('-')\n\n if (splitIndex < 1) {\n final = name + ' ' + final\n continue\n }\n const nextChar = name[splitIndex + 1]\n // synced to static-ui constants\n // MEDIA_SEP\n const isMediaQuery = nextChar === '_'\n // PSEUDO_SEP\n const isPsuedoQuery = nextChar === '-'\n\n const styleKey = name.slice(1, splitIndex)\n const mediaKey =\n isMediaQuery || isPsuedoQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null\n const uid = mediaKey ? styleKey + mediaKey : styleKey\n\n if (!isMediaQuery && !isPsuedoQuery) {\n if (usedPrefixes.indexOf(uid) > -1) {\n continue\n }\n usedPrefixes.push(uid)\n }\n\n // overrides for full safety\n const propName = styleKey\n if (propName && propObjects) {\n if (\n propObjects.some((po) => {\n if (mediaKey) {\n const propKey = pseudoInvert[mediaKey]\n return po && po[propKey] && propName in po[propKey] && po[propKey] !== null\n }\n const res = po && propName in po && po[propName] !== null\n return res\n })\n ) {\n continue\n }\n }\n\n final = name + ' ' + final\n }\n }\n\n // if (arguments.length === 1) {\n // recently.set(arguments[0], final)\n // }\n\n return final\n}\n\nconst pseudoInvert = {\n hover: 'hoverStyle',\n focus: 'focusStyle',\n press: 'pressStyle',\n}\n", "// flat transform props\nexport const stylePropsTransform = {\n x: true,\n y: true,\n scale: true,\n perspective: true,\n scaleX: true,\n scaleY: true,\n skewX: true,\n skewY: true,\n matrix: true,\n rotate: true,\n rotateY: true,\n rotateX: true,\n rotateZ: true,\n}\n\nexport const stylePropsView = Object.freeze({\n backfaceVisibility: true,\n backgroundColor: true,\n borderBottomColor: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderBottomWidth: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderLeftWidth: true,\n borderRadius: true,\n borderRightColor: true,\n borderRightWidth: true,\n borderStartColor: true,\n borderStyle: true,\n borderTopColor: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n borderTopWidth: true,\n borderWidth: true,\n opacity: true,\n transform: true,\n alignContent: true,\n alignItems: true,\n alignSelf: true,\n aspectRatio: true,\n borderEndWidth: true,\n borderStartWidth: true,\n bottom: true,\n display: true,\n end: true,\n flex: true,\n flexBasis: true,\n flexDirection: true,\n flexGrow: true,\n flexShrink: true,\n flexWrap: true,\n height: true,\n justifyContent: true,\n left: true,\n margin: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n maxHeight: true,\n maxWidth: true,\n minHeight: true,\n minWidth: true,\n overflow: true,\n padding: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n position: true,\n right: true,\n start: true,\n top: true,\n width: true,\n zIndex: true,\n direction: true,\n shadowColor: true,\n shadowOffset: true,\n shadowOpacity: true,\n shadowRadius: true,\n ...stylePropsTransform,\n\n // allow a few web only ones\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n userSelect: true,\n cursor: true,\n contain: true,\n pointerEvents: true,\n boxSizing: true,\n }),\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: true,\n\n // allow a few web only ones\n // TODO\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n whiteSpace: true,\n wordWrap: true,\n textOverflow: true,\n textDecorationDistance: true,\n }),\n})\n\nexport const stylePropsText = Object.freeze({\n ...stylePropsView,\n ...stylePropsTextOnly,\n})\n\nexport const stylePropsAll = stylePropsText\n\nexport const validStylesPseudo = {\n hoverStyle: true,\n pressStyle: true,\n focusStyle: true,\n}\n\nexport const validStyles = {\n ...validStylesPseudo,\n ...stylePropsView,\n}\n", "// ssr only\n\nexport const AllRules = new Set()\n\nexport const getStyleRules = () => AllRules\n"],
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": ["../src/index.ts", "../src/getNiceKey.ts", "../src/validStyleProps.ts", "../src/uniqueStyleKeys.ts", "../src/concatClassName.ts", "../src/getStylesAtomic.ts", "../src/simpleHash.ts"],
|
|
4
|
+
"sourcesContent": ["export * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './uniqueStyleKeys'\nexport * from './getNiceKey'\nexport * from './getStylesAtomic'\nexport * from './types'\n", "export function getNiceKey(name: string, len = 2) {\n let key = ''\n for (const [index, char] of name.split('').entries()) {\n if (index === 0 || char.toUpperCase() === char) {\n key += name.slice(index, index + len)\n }\n }\n return key\n}\n", "// flat transform props\nexport const stylePropsTransform = {\n x: true,\n y: true,\n perspective: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n skewX: true,\n skewY: true,\n matrix: true,\n rotate: true,\n rotateY: true,\n rotateX: true,\n rotateZ: true,\n}\n\nexport const stylePropsView = Object.freeze({\n pointerEvents: true,\n userSelect: true,\n cursor: true,\n backfaceVisibility: true,\n backgroundColor: true,\n boxSizing: true,\n borderBottomColor: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderBottomWidth: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderLeftWidth: true,\n borderRadius: true,\n borderRightColor: true,\n borderRightWidth: true,\n borderStartColor: true,\n borderStyle: true,\n borderTopColor: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n borderTopWidth: true,\n borderWidth: true,\n opacity: true,\n transform: true,\n alignContent: true,\n alignItems: true,\n alignSelf: true,\n aspectRatio: true,\n borderEndWidth: true,\n borderStartWidth: true,\n bottom: true,\n display: true,\n end: true,\n flex: true,\n flexBasis: true,\n flexDirection: true,\n flexGrow: true,\n flexShrink: true,\n flexWrap: true,\n height: true,\n justifyContent: true,\n left: true,\n margin: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n maxHeight: true,\n maxWidth: true,\n minHeight: true,\n minWidth: true,\n overflow: true,\n padding: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n position: true,\n right: true,\n start: true,\n top: true,\n width: true,\n zIndex: true,\n direction: true,\n shadowColor: true,\n shadowOffset: true,\n shadowOpacity: true,\n shadowRadius: true,\n contain: true,\n ...stylePropsTransform,\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: true,\n})\n\nexport const stylePropsText = Object.freeze({\n ...stylePropsView,\n ...stylePropsTextOnly,\n})\n\nexport const stylePropsAll = stylePropsText\n\nexport const validStyles = {\n hoverStyle: true,\n pressStyle: true,\n focusStyle: true,\n ...stylePropsView,\n}\n", "import { getNiceKey } from './getNiceKey'\nimport { stylePropsAll } from './validStyleProps'\n\nconst existing = new Set<string>()\n\n// unique shortkey for each style key\n// for atomic styles prefixing and collision dedupe\nexport const uniqueStyleKeys: { [key: string]: string } = {}\nexport const uniqueKeyToStyleName: { [key: string]: string } = {}\n\nfor (const name in stylePropsAll) {\n addStylePrefix(name)\n}\n\nexport function getOrCreateStylePrefix(name: string) {\n return uniqueStyleKeys[name] ?? addStylePrefix(name)\n}\n\nfunction addStylePrefix(name: string) {\n let len = 1\n let key = getNiceKey(name)\n while (existing.has(key)) {\n len++\n key = getNiceKey(name, len)\n }\n existing.add(key)\n uniqueStyleKeys[name] = key\n uniqueKeyToStyleName[key] = name\n return key\n}\n", "import { uniqueKeyToStyleName } from './uniqueStyleKeys'\n\nconst pseudoInvert = {\n hover: 'hoverStyle',\n focus: 'focusStyle',\n press: 'pressStyle',\n}\n\nexport function concatClassName(className: string, ...propObjects: any[]) {\n const usedPrefixes = new Set<string>()\n const final: string[] = []\n const names = className.split(' ')\n const hasPropObjects = propObjects.length\n // const shouldLog = className.includes('_col-varzzzcolor3z')\n // shouldLog && console.log('>>>>>>>>>>', className)\n\n for (let i = names.length - 1; i >= 0; i--) {\n const name = names[i]\n if (!name || name === ' ') continue\n if (name[0] !== '_') {\n // not snack style (todo slightly stronger heuristic)\n final.push(name)\n continue\n }\n const splitIndex = name.indexOf('-')\n if (splitIndex < 1) {\n final.push(name)\n continue\n }\n const nextChar = name[splitIndex + 1]\n // synced to static-ui constants\n // MEDIA_SEP\n const isMediaQuery = nextChar === '_'\n // PSEUDO_SEP\n const isPsuedoQuery = nextChar === '-'\n const styleKey = name.slice(1, splitIndex)\n const mediaKey =\n isMediaQuery || isPsuedoQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null\n const uid = mediaKey ? styleKey + mediaKey : styleKey\n // shouldLog && console.log('uid', uid)\n if (!isMediaQuery && !isPsuedoQuery) {\n if (usedPrefixes.has(uid)) {\n // shouldLog && console.log('used', uid)\n continue\n }\n usedPrefixes.add(uid)\n }\n const propName = uniqueKeyToStyleName[styleKey]\n // shouldLog && console.log('propName', propName)\n if (propName && hasPropObjects) {\n if (\n propObjects.some((po) => {\n if (mediaKey) {\n const propKey = pseudoInvert[mediaKey]\n return po && po[propKey] && propName in po[propKey] && po[propKey] !== null\n }\n const res = po && propName in po && po[propName] !== null\n // shouldLog && res && console.log('SKIP BECAUSE', propName, po)\n return res\n })\n ) {\n // shouldLog && console.log('SKIP PROP')\n continue\n }\n }\n // shouldLog && console.log('push', name)\n final.push(name)\n }\n\n // shouldLog && console.log(' in:', className, 'out:', final)\n\n return final.join(' ')\n}\n", "import type { ViewStyle } from 'react-native'\nimport { atomic } from 'react-native-web/dist/cjs/exports/StyleSheet/compile'\nimport createCompileableStyle from 'react-native-web/dist/cjs/exports/StyleSheet/createCompileableStyle'\nimport createReactDOMStyle from 'react-native-web/dist/cjs/exports/StyleSheet/createReactDOMStyle'\nimport i18Style from 'react-native-web/dist/cjs/exports/StyleSheet/i18nStyle'\n\nimport { simpleHash } from './simpleHash'\nimport { StyleObject } from './types'\nimport { getOrCreateStylePrefix } from './uniqueStyleKeys'\n\nexport const pseudos = {\n focusWithinStyle: {\n name: 'focus-within',\n priority: 4,\n },\n focusStyle: {\n name: 'focus',\n priority: 3,\n },\n pressStyle: {\n name: 'active',\n priority: 2,\n },\n hoverStyle: {\n name: 'hover',\n priority: 1,\n },\n}\n\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: 'borderBottomStyle',\n borderTopWidth: 'borderTopStyle',\n borderLeftWidth: 'borderLeftStyle',\n borderRightWidth: 'borderRightStyle',\n}\n\nexport function getStylesAtomic(style: any) {\n const styles: { [key: string]: ViewStyle } = {\n base: {},\n }\n // split psuedos\n for (const key in style) {\n if (!!pseudos[key]) {\n styles[key] = style[key]\n } else {\n styles.base[key] = style[key]\n }\n }\n return Object.keys(styles)\n .map((key) => {\n return getAtomicStyle(styles[key], pseudos[key])\n })\n .flat()\n}\n\nconst importantRegex = /\\!important*/g\n\nfunction getAtomicStyle(style: ViewStyle, pseudo?: { name: string; priority: number }): StyleObject[] {\n if (style == null || typeof style !== 'object') {\n throw new Error(`Wrong style type: \"${typeof style}\": ${style}`)\n }\n\n // why is this diff from react-native-web!? need to figure out\n for (const key in borderDefaults) {\n if (key in style) {\n style[borderDefaults[key]] = style[borderDefaults[key]] ?? 'solid'\n }\n }\n\n const all = {\n ...atomic(createCompileableStyle(createReactDOMStyle(i18Style(style)))),\n }\n\n return Object.keys(all).map((key) => {\n const val = all[key]\n const prefix = `_${getOrCreateStylePrefix(val.property)}`\n const hash = (() => {\n let s = `${val.value}`\n .replace(/[%]/g, 'pct')\n .replace(/[^a-z0-9]/gi, 'z')\n .replace(/\\s/, '-')\n if (s.length < 16) return s\n return simpleHash(val.identifier)\n })()\n\n // pseudos have a `--` to be easier to find with concatClassNames\n const psuedoPrefix = pseudo ? `-${pseudo.name}-` : ''\n const identifier = `${prefix}-${psuedoPrefix}${hash}`\n const className = `.${identifier}`\n const rules = val.rules.map((rule) => {\n if (pseudo) {\n const psuedoPrefixSelect = [...Array(pseudo.priority)].map(() => ':root').join('') + ' '\n let res = rule\n .replace(`.${val.identifier}`, `${psuedoPrefixSelect} ${className}`)\n .replace('{', `:${pseudo.name}{`)\n\n if (pseudo.name === 'hover') {\n // hover styles need to be conditional\n // perhaps this can be generalized but for now lets just shortcut\n // and hardcode for hover styles, if we need to later we can\n // WEIRD SYNTAX, SEE:\n // https://stackoverflow.com/questions/40532204/media-query-for-devices-supporting-hover\n res = `@media not all and (hover: none) { ${res} }`\n }\n return res\n }\n return rule.replace(`.${val.identifier}`, className).replace(importantRegex, '')\n })\n const result: StyleObject = {\n property: val.property,\n value: val.value,\n identifier,\n className,\n rules,\n }\n return result\n })\n}\n", "export const simpleHash = (str: string) => {\n let hash = 0\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = (hash << 5) - hash + char\n hash &= hash // Convert to 32bit integer\n }\n return new Uint32Array([hash])[0].toString(36)\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,oBAAoB,MAAc,MAAM,GAAG;AAChD,MAAI,MAAM;AACV,aAAW,CAAC,OAAO,SAAS,KAAK,MAAM,IAAI,WAAW;AACpD,QAAI,UAAU,KAAK,KAAK,kBAAkB,MAAM;AAC9C,aAAO,KAAK,MAAM,OAAO,QAAQ;AAAA;AAAA;AAGrC,SAAO;AAAA;AAPO;;;ACCT,IAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,aAAa;AAAA,EACb,OAAO;AAAA,EACP,Q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|
+
export * from "./getNiceKey";
|
|
5
|
+
export * from "./getStylesAtomic";
|
|
3
6
|
export * from "./types";
|
|
4
|
-
export * from "./allRules";
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './
|
|
5
|
-
"mappings": "AAAA;AACA;AACA;AACA;",
|
|
4
|
+
"sourcesContent": ["export * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './uniqueStyleKeys'\nexport * from './getNiceKey'\nexport * from './getStylesAtomic'\nexport * from './types'\n"],
|
|
5
|
+
"mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/validStyleProps.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const stylePropsTransform = {
|
|
2
2
|
x: true,
|
|
3
3
|
y: true,
|
|
4
|
-
scale: true,
|
|
5
4
|
perspective: true,
|
|
5
|
+
scale: true,
|
|
6
6
|
scaleX: true,
|
|
7
7
|
scaleY: true,
|
|
8
8
|
skewX: true,
|
|
@@ -14,8 +14,12 @@ const stylePropsTransform = {
|
|
|
14
14
|
rotateZ: true
|
|
15
15
|
};
|
|
16
16
|
const stylePropsView = Object.freeze({
|
|
17
|
+
pointerEvents: true,
|
|
18
|
+
userSelect: true,
|
|
19
|
+
cursor: true,
|
|
17
20
|
backfaceVisibility: true,
|
|
18
21
|
backgroundColor: true,
|
|
22
|
+
boxSizing: true,
|
|
19
23
|
borderBottomColor: true,
|
|
20
24
|
borderBottomEndRadius: true,
|
|
21
25
|
borderBottomLeftRadius: true,
|
|
@@ -92,14 +96,8 @@ const stylePropsView = Object.freeze({
|
|
|
92
96
|
shadowOffset: true,
|
|
93
97
|
shadowOpacity: true,
|
|
94
98
|
shadowRadius: true,
|
|
95
|
-
|
|
96
|
-
...
|
|
97
|
-
userSelect: true,
|
|
98
|
-
cursor: true,
|
|
99
|
-
contain: true,
|
|
100
|
-
pointerEvents: true,
|
|
101
|
-
boxSizing: true
|
|
102
|
-
}
|
|
99
|
+
contain: true,
|
|
100
|
+
...stylePropsTransform
|
|
103
101
|
});
|
|
104
102
|
const stylePropsTextOnly = Object.freeze({
|
|
105
103
|
color: true,
|
|
@@ -116,26 +114,17 @@ const stylePropsTextOnly = Object.freeze({
|
|
|
116
114
|
textShadowColor: true,
|
|
117
115
|
textShadowOffset: true,
|
|
118
116
|
textShadowRadius: true,
|
|
119
|
-
textTransform: true
|
|
120
|
-
...process.env.TAMAGUI_TARGET === "web" && {
|
|
121
|
-
whiteSpace: true,
|
|
122
|
-
wordWrap: true,
|
|
123
|
-
textOverflow: true,
|
|
124
|
-
textDecorationDistance: true
|
|
125
|
-
}
|
|
117
|
+
textTransform: true
|
|
126
118
|
});
|
|
127
119
|
const stylePropsText = Object.freeze({
|
|
128
120
|
...stylePropsView,
|
|
129
121
|
...stylePropsTextOnly
|
|
130
122
|
});
|
|
131
123
|
const stylePropsAll = stylePropsText;
|
|
132
|
-
const
|
|
124
|
+
const validStyles = {
|
|
133
125
|
hoverStyle: true,
|
|
134
126
|
pressStyle: true,
|
|
135
|
-
focusStyle: true
|
|
136
|
-
};
|
|
137
|
-
const validStyles = {
|
|
138
|
-
...validStylesPseudo,
|
|
127
|
+
focusStyle: true,
|
|
139
128
|
...stylePropsView
|
|
140
129
|
};
|
|
141
130
|
export {
|
|
@@ -144,7 +133,6 @@ export {
|
|
|
144
133
|
stylePropsTextOnly,
|
|
145
134
|
stylePropsTransform,
|
|
146
135
|
stylePropsView,
|
|
147
|
-
validStyles
|
|
148
|
-
validStylesPseudo
|
|
136
|
+
validStyles
|
|
149
137
|
};
|
|
150
138
|
//# sourceMappingURL=validStyleProps.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/validStyleProps.ts"],
|
|
4
|
-
"sourcesContent": ["// flat transform props\nexport const stylePropsTransform = {\n x: true,\n y: true,\n
|
|
5
|
-
"mappings": "AACO,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,
|
|
4
|
+
"sourcesContent": ["// flat transform props\nexport const stylePropsTransform = {\n x: true,\n y: true,\n perspective: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n skewX: true,\n skewY: true,\n matrix: true,\n rotate: true,\n rotateY: true,\n rotateX: true,\n rotateZ: true,\n}\n\nexport const stylePropsView = Object.freeze({\n pointerEvents: true,\n userSelect: true,\n cursor: true,\n backfaceVisibility: true,\n backgroundColor: true,\n boxSizing: true,\n borderBottomColor: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderBottomWidth: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderLeftWidth: true,\n borderRadius: true,\n borderRightColor: true,\n borderRightWidth: true,\n borderStartColor: true,\n borderStyle: true,\n borderTopColor: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n borderTopWidth: true,\n borderWidth: true,\n opacity: true,\n transform: true,\n alignContent: true,\n alignItems: true,\n alignSelf: true,\n aspectRatio: true,\n borderEndWidth: true,\n borderStartWidth: true,\n bottom: true,\n display: true,\n end: true,\n flex: true,\n flexBasis: true,\n flexDirection: true,\n flexGrow: true,\n flexShrink: true,\n flexWrap: true,\n height: true,\n justifyContent: true,\n left: true,\n margin: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n maxHeight: true,\n maxWidth: true,\n minHeight: true,\n minWidth: true,\n overflow: true,\n padding: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n position: true,\n right: true,\n start: true,\n top: true,\n width: true,\n zIndex: true,\n direction: true,\n shadowColor: true,\n shadowOffset: true,\n shadowOpacity: true,\n shadowRadius: true,\n contain: true,\n ...stylePropsTransform,\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: true,\n})\n\nexport const stylePropsText = Object.freeze({\n ...stylePropsView,\n ...stylePropsTextOnly,\n})\n\nexport const stylePropsAll = stylePropsText\n\nexport const validStyles = {\n hoverStyle: true,\n pressStyle: true,\n focusStyle: true,\n ...stylePropsView,\n}\n"],
|
|
5
|
+
"mappings": "AACO,MAAM,sBAAsB;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,aAAa;AAAA,EACb,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA;AAGJ,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,yBAAyB;AAAA,EACzB,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,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OAAO;AAAA,EACP,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AAAA;AAGV,MAAM,iBAAiB,OAAO,OAAO;AAAA,KACvC;AAAA,KACA;AAAA;AAGE,MAAM,gBAAgB;AAEtB,MAAM,cAAc;AAAA,EACzB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,KACT;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.38",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"typings": "types",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"watch": "tamagui-build --watch"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@tamagui/build": "^1.0.0-alpha.
|
|
18
|
+
"@tamagui/build": "^1.0.0-alpha.38",
|
|
19
19
|
"react-native": "*"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "155f989a05a70b2a9181cf820363f170a293f78b"
|
|
28
28
|
}
|
package/dist/allRules.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
const AllRules = new Set();
|
|
4
|
-
const getStyleRules = /* @__PURE__ */ __name(() => AllRules, "getStyleRules");
|
|
5
|
-
export {
|
|
6
|
-
AllRules,
|
|
7
|
-
getStyleRules
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=AllRules.js.map
|
package/dist/allRules.js.map
DELETED
package/dist/cjs/allRules.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
3
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __export = (target, all) => {
|
|
5
|
-
__markAsModule(target);
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
__export(exports, {
|
|
10
|
-
AllRules: () => AllRules,
|
|
11
|
-
getStyleRules: () => getStyleRules
|
|
12
|
-
});
|
|
13
|
-
const AllRules = new Set();
|
|
14
|
-
const getStyleRules = /* @__PURE__ */ __name(() => AllRules, "getStyleRules");
|
|
15
|
-
//# sourceMappingURL=allRules.js.map
|
package/dist/cjs/allRules.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/allRules.ts"],
|
|
4
|
-
"sourcesContent": ["// ssr only\n\nexport const AllRules = new Set()\n\nexport const getStyleRules = () => AllRules\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,WAAW,IAAI;AAErB,MAAM,gBAAgB,6BAAM,UAAN;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
3
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __export = (target, all) => {
|
|
5
|
-
__markAsModule(target);
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
__export(exports, {
|
|
10
|
-
concatClassName: () => concatClassName
|
|
11
|
-
});
|
|
12
|
-
function concatClassName(_cn) {
|
|
13
|
-
const classNamesOrPropObjects = arguments;
|
|
14
|
-
const usedPrefixes = [];
|
|
15
|
-
let final = "";
|
|
16
|
-
const len = classNamesOrPropObjects.length;
|
|
17
|
-
let propObjects = null;
|
|
18
|
-
for (let x = len; x >= 0; x--) {
|
|
19
|
-
const cns = classNamesOrPropObjects[x];
|
|
20
|
-
if (!cns)
|
|
21
|
-
continue;
|
|
22
|
-
if (!Array.isArray(cns) && typeof cns !== "string") {
|
|
23
|
-
propObjects = propObjects || [];
|
|
24
|
-
propObjects.push(cns);
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
const names = Array.isArray(cns) ? cns : cns.split(" ");
|
|
28
|
-
const numNames = names.length;
|
|
29
|
-
for (let i = numNames - 1; i >= 0; i--) {
|
|
30
|
-
const name = names[i];
|
|
31
|
-
if (!name || name === " ")
|
|
32
|
-
continue;
|
|
33
|
-
if (name[0] !== "_") {
|
|
34
|
-
final = name + " " + final;
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
const splitIndex = name.indexOf("-");
|
|
38
|
-
if (splitIndex < 1) {
|
|
39
|
-
final = name + " " + final;
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
const nextChar = name[splitIndex + 1];
|
|
43
|
-
const isMediaQuery = nextChar === "_";
|
|
44
|
-
const isPsuedoQuery = nextChar === "-";
|
|
45
|
-
const styleKey = name.slice(1, splitIndex);
|
|
46
|
-
const mediaKey = isMediaQuery || isPsuedoQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null;
|
|
47
|
-
const uid = mediaKey ? styleKey + mediaKey : styleKey;
|
|
48
|
-
if (!isMediaQuery && !isPsuedoQuery) {
|
|
49
|
-
if (usedPrefixes.indexOf(uid) > -1) {
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
usedPrefixes.push(uid);
|
|
53
|
-
}
|
|
54
|
-
const propName = styleKey;
|
|
55
|
-
if (propName && propObjects) {
|
|
56
|
-
if (propObjects.some((po) => {
|
|
57
|
-
if (mediaKey) {
|
|
58
|
-
const propKey = pseudoInvert[mediaKey];
|
|
59
|
-
return po && po[propKey] && propName in po[propKey] && po[propKey] !== null;
|
|
60
|
-
}
|
|
61
|
-
const res = po && propName in po && po[propName] !== null;
|
|
62
|
-
return res;
|
|
63
|
-
})) {
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
final = name + " " + final;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return final;
|
|
71
|
-
}
|
|
72
|
-
__name(concatClassName, "concatClassName");
|
|
73
|
-
const pseudoInvert = {
|
|
74
|
-
hover: "hoverStyle",
|
|
75
|
-
focus: "focusStyle",
|
|
76
|
-
press: "pressStyle"
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=concatClassName.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/concatClassName.ts"],
|
|
4
|
-
"sourcesContent": ["// perf sensitive so doing some weird stuff\n\n// testing caching\n// because we can hit these recent ones a ton of times in common cases\n// we're caching the simple case, this shouldn't be bad on memory either\n// const recently = new Map()\n// setInterval(() => {\n// recently.clear()\n// }, 1000)\n\nexport function concatClassName(_cn: any) {\n // if (arguments.length === 1) {\n // if (recently.has(arguments[0])) {\n // return recently.get(arguments[0])\n // }\n // }\n\n const classNamesOrPropObjects = arguments\n const usedPrefixes: string[] = []\n let final = ''\n\n const len = classNamesOrPropObjects.length\n let propObjects: any = null\n for (let x = len; x >= 0; x--) {\n const cns = classNamesOrPropObjects[x]\n if (!cns) continue\n if (!Array.isArray(cns) && typeof cns !== 'string') {\n // is prop object\n propObjects = propObjects || []\n propObjects.push(cns)\n continue\n }\n const names = Array.isArray(cns) ? cns : cns.split(' ')\n\n const numNames = names.length\n for (let i = numNames - 1; i >= 0; i--) {\n const name = names[i]\n if (!name || name === ' ') continue\n if (name[0] !== '_') {\n // not snack style (todo slightly stronger heuristic)\n final = name + ' ' + final\n continue\n }\n const splitIndex = name.indexOf('-')\n\n if (splitIndex < 1) {\n final = name + ' ' + final\n continue\n }\n const nextChar = name[splitIndex + 1]\n // synced to static-ui constants\n // MEDIA_SEP\n const isMediaQuery = nextChar === '_'\n // PSEUDO_SEP\n const isPsuedoQuery = nextChar === '-'\n\n const styleKey = name.slice(1, splitIndex)\n const mediaKey =\n isMediaQuery || isPsuedoQuery ? name.slice(splitIndex + 2, splitIndex + 7) : null\n const uid = mediaKey ? styleKey + mediaKey : styleKey\n\n if (!isMediaQuery && !isPsuedoQuery) {\n if (usedPrefixes.indexOf(uid) > -1) {\n continue\n }\n usedPrefixes.push(uid)\n }\n\n // overrides for full safety\n const propName = styleKey\n if (propName && propObjects) {\n if (\n propObjects.some((po) => {\n if (mediaKey) {\n const propKey = pseudoInvert[mediaKey]\n return po && po[propKey] && propName in po[propKey] && po[propKey] !== null\n }\n const res = po && propName in po && po[propName] !== null\n return res\n })\n ) {\n continue\n }\n }\n\n final = name + ' ' + final\n }\n }\n\n // if (arguments.length === 1) {\n // recently.set(arguments[0], final)\n // }\n\n return final\n}\n\nconst pseudoInvert = {\n hover: 'hoverStyle',\n focus: 'focusStyle',\n press: 'pressStyle',\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAAA;AAAA;AAAA;AAUO,yBAAyB,KAAU;AAOxC,QAAM,0BAA0B;AAChC,QAAM,eAAyB;AAC/B,MAAI,QAAQ;AAEZ,QAAM,MAAM,wBAAwB;AACpC,MAAI,cAAmB;AACvB,WAAS,IAAI,KAAK,KAAK,GAAG,KAAK;AAC7B,UAAM,M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AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __reExport = (target, module2, desc) => {
|
|
9
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(module2))
|
|
11
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __toModule = (module2) => {
|
|
17
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
-
};
|
|
19
|
-
__markAsModule(exports);
|
|
20
|
-
__reExport(exports, __toModule(require("./concatClassName")));
|
|
21
|
-
__reExport(exports, __toModule(require("./validStyleProps")));
|
|
22
|
-
__reExport(exports, __toModule(require("./types")));
|
|
23
|
-
__reExport(exports, __toModule(require("./allRules")));
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './concatClassName'\nexport * from './validStyleProps'\nexport * from './types'\nexport * from './allRules'\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA,oBAAc;AACd,oBAAc;AACd,oBAAc;AACd,oBAAc;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/simpleHash.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
3
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __export = (target, all) => {
|
|
5
|
-
__markAsModule(target);
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
__export(exports, {
|
|
10
|
-
simpleHash: () => simpleHash
|
|
11
|
-
});
|
|
12
|
-
const simpleHash = /* @__PURE__ */ __name((str) => {
|
|
13
|
-
let hash = 0;
|
|
14
|
-
for (let i = 0; i < str.length; i++) {
|
|
15
|
-
const char = str.charCodeAt(i);
|
|
16
|
-
hash = (hash << 5) - hash + char;
|
|
17
|
-
hash &= hash;
|
|
18
|
-
}
|
|
19
|
-
return new Uint32Array([hash])[0].toString(36);
|
|
20
|
-
}, "simpleHash");
|
|
21
|
-
//# sourceMappingURL=simpleHash.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/simpleHash.ts"],
|
|
4
|
-
"sourcesContent": ["export const simpleHash = (str: string) => {\n let hash = 0\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i)\n hash = (hash << 5) - hash + char\n hash &= hash // Convert to 32bit integer\n }\n return new Uint32Array([hash])[0].toString(36)\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAAA;AAAA;AAAA;AAAO,MAAM,aAAa,wBAAC,QAAgB;AACzC,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,UAAM,OAAO,IAAI,WAAW;AAC5B,WAAQ,SAAQ,KAAK,OAAO;AAC5B,YAAQ;AAAA;AAEV,SAAO,IAAI,YAAY,CAAC,OAAO,GAAG,SAAS;AAAA,GAPnB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/types.js
DELETED
package/dist/cjs/types.js.map
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
18
|
-
var __export = (target, all) => {
|
|
19
|
-
__markAsModule(target);
|
|
20
|
-
for (var name in all)
|
|
21
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
22
|
-
};
|
|
23
|
-
__export(exports, {
|
|
24
|
-
stylePropsAll: () => stylePropsAll,
|
|
25
|
-
stylePropsText: () => stylePropsText,
|
|
26
|
-
stylePropsTextOnly: () => stylePropsTextOnly,
|
|
27
|
-
stylePropsTransform: () => stylePropsTransform,
|
|
28
|
-
stylePropsView: () => stylePropsView,
|
|
29
|
-
validStyles: () => validStyles,
|
|
30
|
-
validStylesPseudo: () => validStylesPseudo
|
|
31
|
-
});
|
|
32
|
-
const stylePropsTransform = Object.freeze({
|
|
33
|
-
x: true,
|
|
34
|
-
y: true,
|
|
35
|
-
scale: true,
|
|
36
|
-
perspective: true,
|
|
37
|
-
scaleX: true,
|
|
38
|
-
scaleY: true,
|
|
39
|
-
skewX: true,
|
|
40
|
-
skewY: true,
|
|
41
|
-
matrix: true,
|
|
42
|
-
rotate: true,
|
|
43
|
-
rotateY: true,
|
|
44
|
-
rotateX: true,
|
|
45
|
-
rotateZ: true
|
|
46
|
-
});
|
|
47
|
-
const stylePropsView = Object.freeze(__spreadValues(__spreadValues({
|
|
48
|
-
backfaceVisibility: true,
|
|
49
|
-
backgroundColor: true,
|
|
50
|
-
borderBottomColor: true,
|
|
51
|
-
borderBottomEndRadius: true,
|
|
52
|
-
borderBottomLeftRadius: true,
|
|
53
|
-
borderBottomRightRadius: true,
|
|
54
|
-
borderBottomStartRadius: true,
|
|
55
|
-
borderBottomWidth: true,
|
|
56
|
-
borderColor: true,
|
|
57
|
-
borderEndColor: true,
|
|
58
|
-
borderLeftColor: true,
|
|
59
|
-
borderLeftWidth: true,
|
|
60
|
-
borderRadius: true,
|
|
61
|
-
borderRightColor: true,
|
|
62
|
-
borderRightWidth: true,
|
|
63
|
-
borderStartColor: true,
|
|
64
|
-
borderStyle: true,
|
|
65
|
-
borderTopColor: true,
|
|
66
|
-
borderTopEndRadius: true,
|
|
67
|
-
borderTopLeftRadius: true,
|
|
68
|
-
borderTopRightRadius: true,
|
|
69
|
-
borderTopStartRadius: true,
|
|
70
|
-
borderTopWidth: true,
|
|
71
|
-
borderWidth: true,
|
|
72
|
-
opacity: true,
|
|
73
|
-
transform: true,
|
|
74
|
-
alignContent: true,
|
|
75
|
-
alignItems: true,
|
|
76
|
-
alignSelf: true,
|
|
77
|
-
aspectRatio: true,
|
|
78
|
-
borderEndWidth: true,
|
|
79
|
-
borderStartWidth: true,
|
|
80
|
-
bottom: true,
|
|
81
|
-
display: true,
|
|
82
|
-
end: true,
|
|
83
|
-
flex: true,
|
|
84
|
-
flexBasis: true,
|
|
85
|
-
flexDirection: true,
|
|
86
|
-
flexGrow: true,
|
|
87
|
-
flexShrink: true,
|
|
88
|
-
flexWrap: true,
|
|
89
|
-
height: true,
|
|
90
|
-
justifyContent: true,
|
|
91
|
-
left: true,
|
|
92
|
-
margin: true,
|
|
93
|
-
marginBottom: true,
|
|
94
|
-
marginEnd: true,
|
|
95
|
-
marginHorizontal: true,
|
|
96
|
-
marginLeft: true,
|
|
97
|
-
marginRight: true,
|
|
98
|
-
marginStart: true,
|
|
99
|
-
marginTop: true,
|
|
100
|
-
marginVertical: true,
|
|
101
|
-
maxHeight: true,
|
|
102
|
-
maxWidth: true,
|
|
103
|
-
minHeight: true,
|
|
104
|
-
minWidth: true,
|
|
105
|
-
overflow: true,
|
|
106
|
-
padding: true,
|
|
107
|
-
paddingBottom: true,
|
|
108
|
-
paddingEnd: true,
|
|
109
|
-
paddingHorizontal: true,
|
|
110
|
-
paddingLeft: true,
|
|
111
|
-
paddingRight: true,
|
|
112
|
-
paddingStart: true,
|
|
113
|
-
paddingTop: true,
|
|
114
|
-
paddingVertical: true,
|
|
115
|
-
position: true,
|
|
116
|
-
right: true,
|
|
117
|
-
start: true,
|
|
118
|
-
top: true,
|
|
119
|
-
width: true,
|
|
120
|
-
zIndex: true,
|
|
121
|
-
direction: true,
|
|
122
|
-
shadowColor: true,
|
|
123
|
-
shadowOffset: true,
|
|
124
|
-
shadowOpacity: true,
|
|
125
|
-
shadowRadius: true
|
|
126
|
-
}, stylePropsTransform), process.env.TAMAGUI_TARGET === "web" && {
|
|
127
|
-
userSelect: true,
|
|
128
|
-
cursor: true,
|
|
129
|
-
contain: true,
|
|
130
|
-
pointerEvents: true,
|
|
131
|
-
boxSizing: true
|
|
132
|
-
}));
|
|
133
|
-
const stylePropsTextOnly = Object.freeze(__spreadValues({
|
|
134
|
-
color: true,
|
|
135
|
-
fontFamily: true,
|
|
136
|
-
fontSize: true,
|
|
137
|
-
fontStyle: true,
|
|
138
|
-
fontWeight: true,
|
|
139
|
-
letterSpacing: true,
|
|
140
|
-
lineHeight: true,
|
|
141
|
-
textAlign: true,
|
|
142
|
-
textDecorationLine: true,
|
|
143
|
-
textDecorationStyle: true,
|
|
144
|
-
textDecorationColor: true,
|
|
145
|
-
textShadowColor: true,
|
|
146
|
-
textShadowOffset: true,
|
|
147
|
-
textShadowRadius: true,
|
|
148
|
-
textTransform: true
|
|
149
|
-
}, process.env.TAMAGUI_TARGET === "web" && {
|
|
150
|
-
whiteSpace: true,
|
|
151
|
-
wordWrap: true,
|
|
152
|
-
textOverflow: true,
|
|
153
|
-
textDecorationDistance: true
|
|
154
|
-
}));
|
|
155
|
-
const stylePropsText = Object.freeze(__spreadValues(__spreadValues({}, stylePropsView), stylePropsTextOnly));
|
|
156
|
-
const stylePropsAll = stylePropsText;
|
|
157
|
-
const validStylesPseudo = Object.freeze({
|
|
158
|
-
hoverStyle: true,
|
|
159
|
-
pressStyle: true,
|
|
160
|
-
focusStyle: true
|
|
161
|
-
});
|
|
162
|
-
const validStyles = Object.freeze(__spreadValues(__spreadValues({}, validStylesPseudo), stylePropsView));
|
|
163
|
-
//# sourceMappingURL=validStyleProps.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/validStyleProps.ts"],
|
|
4
|
-
"sourcesContent": ["// flat transform props\nexport const stylePropsTransform = Object.freeze({\n x: true,\n y: true,\n scale: true,\n perspective: true,\n scaleX: true,\n scaleY: true,\n skewX: true,\n skewY: true,\n matrix: true,\n rotate: true,\n rotateY: true,\n rotateX: true,\n rotateZ: true,\n})\n\nexport const stylePropsView = Object.freeze({\n backfaceVisibility: true,\n backgroundColor: true,\n borderBottomColor: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderBottomWidth: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderLeftWidth: true,\n borderRadius: true,\n borderRightColor: true,\n borderRightWidth: true,\n borderStartColor: true,\n borderStyle: true,\n borderTopColor: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n borderTopWidth: true,\n borderWidth: true,\n opacity: true,\n transform: true,\n alignContent: true,\n alignItems: true,\n alignSelf: true,\n aspectRatio: true,\n borderEndWidth: true,\n borderStartWidth: true,\n bottom: true,\n display: true,\n end: true,\n flex: true,\n flexBasis: true,\n flexDirection: true,\n flexGrow: true,\n flexShrink: true,\n flexWrap: true,\n height: true,\n justifyContent: true,\n left: true,\n margin: true,\n marginBottom: true,\n marginEnd: true,\n marginHorizontal: true,\n marginLeft: true,\n marginRight: true,\n marginStart: true,\n marginTop: true,\n marginVertical: true,\n maxHeight: true,\n maxWidth: true,\n minHeight: true,\n minWidth: true,\n overflow: true,\n padding: true,\n paddingBottom: true,\n paddingEnd: true,\n paddingHorizontal: true,\n paddingLeft: true,\n paddingRight: true,\n paddingStart: true,\n paddingTop: true,\n paddingVertical: true,\n position: true,\n right: true,\n start: true,\n top: true,\n width: true,\n zIndex: true,\n direction: true,\n shadowColor: true,\n shadowOffset: true,\n shadowOpacity: true,\n shadowRadius: true,\n ...stylePropsTransform,\n\n // allow a few web only ones\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n userSelect: true,\n cursor: true,\n contain: true,\n pointerEvents: true,\n boxSizing: true,\n }),\n})\n\nexport const stylePropsTextOnly = Object.freeze({\n color: true,\n fontFamily: true,\n fontSize: true,\n fontStyle: true,\n fontWeight: true,\n letterSpacing: true,\n lineHeight: true,\n textAlign: true,\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationColor: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n textTransform: true,\n\n // allow a few web only ones\n // TODO\n ...(process.env.TAMAGUI_TARGET === 'web' && {\n whiteSpace: true,\n wordWrap: true,\n textOverflow: true,\n textDecorationDistance: true,\n }),\n})\n\nexport const stylePropsText = Object.freeze({\n ...stylePropsView,\n ...stylePropsTextOnly,\n})\n\nexport const stylePropsAll = stylePropsText\n\nexport const validStylesPseudo = Object.freeze({\n hoverStyle: true,\n pressStyle: true,\n focusStyle: true,\n})\n\nexport const validStyles = Object.freeze({\n ...validStylesPseudo,\n ...stylePropsView,\n})\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA;AAGJ,MAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,yBAAyB;AAAA,EACzB,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;AAA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,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AAAA,GAIX,QAAQ,IAAI,mBAAmB,SAAS;AAAA,EAC1C,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd,wBAAwB;AAAA;AAIrB,MAAM,iBAAiB,OAAO,OAAO,kCACvC,iBACA;AAGE,MAAM,gBAAgB;AAEtB,MAAM,oBAAoB,OAAO,OAAO;AAAA,EAC7C,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA;AAGP,MAAM,cAAc,OAAO,OAAO,kCACpC,oBACA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/esm/allRules.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
const AllRules = new Set();
|
|
4
|
-
const getStyleRules = /* @__PURE__ */ __name(() => AllRules, "getStyleRules");
|
|
5
|
-
export {
|
|
6
|
-
AllRules,
|
|
7
|
-
getStyleRules
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=allRules.js.map
|