@tamagui/web 1.9.11 → 1.9.12

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.
@@ -58,7 +58,6 @@ const unitlessNumbers = {
58
58
  columnCount: true,
59
59
  flex: true,
60
60
  flexGrow: true,
61
- flexBasis: true,
62
61
  flexOrder: true,
63
62
  flexPositive: true,
64
63
  flexShrink: true,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/normalizeValueWithProperty.ts"],
4
- "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { isWeb } from '@tamagui/constants'\n\nimport { getAllSelectors } from './insertStyleRule.js'\nimport { names, normalizeColor } from './normalizeColor.js'\nimport { normalizeStylePropKeys } from './normalizeStylePropKeys'\n\nconst colorCache = {}\n\nexport function normalizeValueWithProperty(value: any, property?: string): any {\n if (value in colorCache) {\n return colorCache[value]\n }\n if (property && property in unitlessNumbers) {\n return value\n }\n let res = value\n if (property && (property in normalizeStylePropKeys || value in names)) {\n res = normalizeColor(value)\n colorCache[value] = res\n } else if (\n process.env.TAMAGUI_TARGET === 'web' &&\n typeof value === 'number' &&\n (property === undefined ||\n !(property in unitlessNumbers || property in stringNumbers))\n ) {\n res = `${value}px`\n } else if (isWeb && property !== undefined && property in stringNumbers) {\n res = `${res}`\n }\n return res\n}\n\nconst stringNumbers = {\n zIndex: true,\n}\n\nconst unitlessNumbers = {\n WebkitLineClamp: true,\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexBasis: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zoom: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n\n// getting real values for colors for animations (reverse mapped from CSS)\n// this isn't beautiful, but will do relatively fine performance for now\nconst rcache = {}\nexport function reverseMapClassNameToValue(key: string, className: string) {\n const selectors = getAllSelectors()\n const cssRule = selectors[className]\n if (rcache[cssRule]) return rcache[cssRule]\n if (!cssRule) {\n return\n }\n const cssVal = cssRule.replace(/.*:/, '').replace(/;.*/, '').trim()\n let res: any\n if (cssVal.startsWith('var(')) {\n res = cssVal\n } else if (unitlessNumbers[key]) {\n res = +cssVal\n } else if (cssVal.endsWith('px')) {\n res = +cssVal.replace('px', '')\n } else {\n res = cssVal\n }\n rcache[cssRule] = res\n if (process.env.NODE_ENV === 'development') {\n // ensure we are parsing properly\n if (typeof res === 'number' && isNaN(res)) {\n // eslint-disable-next-line no-console\n console.log('Tamagui invalid parsed value, NaN:', {\n res,\n cssVal,\n cssRule,\n key,\n className,\n })\n }\n }\n return res\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,uBAAsB;AAEtB,6BAAgC;AAChC,4BAAsC;AACtC,oCAAuC;AAEvC,MAAM,aAAa,CAAC;AAEb,SAAS,2BAA2B,OAAY,UAAwB;AAC7E,MAAI,SAAS,YAAY;AACvB,WAAO,WAAW,KAAK;AAAA,EACzB;AACA,MAAI,YAAY,YAAY,iBAAiB;AAC3C,WAAO;AAAA,EACT;AACA,MAAI,MAAM;AACV,MAAI,aAAa,YAAY,wDAA0B,SAAS,8BAAQ;AACtE,cAAM,sCAAe,KAAK;AAC1B,eAAW,KAAK,IAAI;AAAA,EACtB,WACE,QAAQ,IAAI,mBAAmB,SAC/B,OAAO,UAAU,aAChB,aAAa,UACZ,EAAE,YAAY,mBAAmB,YAAY,iBAC/C;AAC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,IAAI,GAAG;AAChC,UAAM,CAAC,OAAO,QAAQ,MAAM,EAAE;AAAA,EAChC,OAAO;AACL,UAAM;AAAA,EACR;AACA,SAAO,OAAO,IAAI;AAClB,MAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,QAAI,OAAO,QAAQ,YAAY,MAAM,GAAG,GAAG;AAEzC,cAAQ,IAAI,sCAAsC;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { isWeb } from '@tamagui/constants'\n\nimport { getAllSelectors } from './insertStyleRule.js'\nimport { names, normalizeColor } from './normalizeColor.js'\nimport { normalizeStylePropKeys } from './normalizeStylePropKeys'\n\nconst colorCache = {}\n\nexport function normalizeValueWithProperty(value: any, property?: string): any {\n if (value in colorCache) {\n return colorCache[value]\n }\n if (property && property in unitlessNumbers) {\n return value\n }\n let res = value\n if (property && (property in normalizeStylePropKeys || value in names)) {\n res = normalizeColor(value)\n colorCache[value] = res\n } else if (\n process.env.TAMAGUI_TARGET === 'web' &&\n typeof value === 'number' &&\n (property === undefined ||\n !(property in unitlessNumbers || property in stringNumbers))\n ) {\n res = `${value}px`\n } else if (isWeb && property !== undefined && property in stringNumbers) {\n res = `${res}`\n }\n return res\n}\n\nconst stringNumbers = {\n zIndex: true,\n}\n\nconst unitlessNumbers = {\n WebkitLineClamp: true,\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zoom: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n\n// getting real values for colors for animations (reverse mapped from CSS)\n// this isn't beautiful, but will do relatively fine performance for now\nconst rcache = {}\nexport function reverseMapClassNameToValue(key: string, className: string) {\n const selectors = getAllSelectors()\n const cssRule = selectors[className]\n if (rcache[cssRule]) return rcache[cssRule]\n if (!cssRule) {\n return\n }\n const cssVal = cssRule.replace(/.*:/, '').replace(/;.*/, '').trim()\n let res: any\n if (cssVal.startsWith('var(')) {\n res = cssVal\n } else if (unitlessNumbers[key]) {\n res = +cssVal\n } else if (cssVal.endsWith('px')) {\n res = +cssVal.replace('px', '')\n } else {\n res = cssVal\n }\n rcache[cssRule] = res\n if (process.env.NODE_ENV === 'development') {\n // ensure we are parsing properly\n if (typeof res === 'number' && isNaN(res)) {\n // eslint-disable-next-line no-console\n console.log('Tamagui invalid parsed value, NaN:', {\n res,\n cssVal,\n cssRule,\n key,\n className,\n })\n }\n }\n return res\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,uBAAsB;AAEtB,6BAAgC;AAChC,4BAAsC;AACtC,oCAAuC;AAEvC,MAAM,aAAa,CAAC;AAEb,SAAS,2BAA2B,OAAY,UAAwB;AAC7E,MAAI,SAAS,YAAY;AACvB,WAAO,WAAW,KAAK;AAAA,EACzB;AACA,MAAI,YAAY,YAAY,iBAAiB;AAC3C,WAAO;AAAA,EACT;AACA,MAAI,MAAM;AACV,MAAI,aAAa,YAAY,wDAA0B,SAAS,8BAAQ;AACtE,cAAM,sCAAe,KAAK;AAC1B,eAAW,KAAK,IAAI;AAAA,EACtB,WACE,QAAQ,IAAI,mBAAmB,SAC/B,OAAO,UAAU,aAChB,aAAa,UACZ,EAAE,YAAY,mBAAmB,YAAY,iBAC/C;AACA,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UAAM,CAAC,OAAO,QAAQ,MAAM,EAAE;AAAA,EAChC,OAAO;AACL,UAAM;AAAA,EACR;AACA,SAAO,OAAO,IAAI;AAClB,MAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,QAAI,OAAO,QAAQ,YAAY,MAAM,GAAG,GAAG;AAEzC,cAAQ,IAAI,sCAAsC;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -34,7 +34,6 @@ const unitlessNumbers = {
34
34
  columnCount: true,
35
35
  flex: true,
36
36
  flexGrow: true,
37
- flexBasis: true,
38
37
  flexOrder: true,
39
38
  flexPositive: true,
40
39
  flexShrink: true,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/normalizeValueWithProperty.ts"],
4
- "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { isWeb } from '@tamagui/constants'\n\nimport { getAllSelectors } from './insertStyleRule.js'\nimport { names, normalizeColor } from './normalizeColor.js'\nimport { normalizeStylePropKeys } from './normalizeStylePropKeys'\n\nconst colorCache = {}\n\nexport function normalizeValueWithProperty(value: any, property?: string): any {\n if (value in colorCache) {\n return colorCache[value]\n }\n if (property && property in unitlessNumbers) {\n return value\n }\n let res = value\n if (property && (property in normalizeStylePropKeys || value in names)) {\n res = normalizeColor(value)\n colorCache[value] = res\n } else if (\n process.env.TAMAGUI_TARGET === 'web' &&\n typeof value === 'number' &&\n (property === undefined ||\n !(property in unitlessNumbers || property in stringNumbers))\n ) {\n res = `${value}px`\n } else if (isWeb && property !== undefined && property in stringNumbers) {\n res = `${res}`\n }\n return res\n}\n\nconst stringNumbers = {\n zIndex: true,\n}\n\nconst unitlessNumbers = {\n WebkitLineClamp: true,\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexBasis: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zoom: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n\n// getting real values for colors for animations (reverse mapped from CSS)\n// this isn't beautiful, but will do relatively fine performance for now\nconst rcache = {}\nexport function reverseMapClassNameToValue(key: string, className: string) {\n const selectors = getAllSelectors()\n const cssRule = selectors[className]\n if (rcache[cssRule]) return rcache[cssRule]\n if (!cssRule) {\n return\n }\n const cssVal = cssRule.replace(/.*:/, '').replace(/;.*/, '').trim()\n let res: any\n if (cssVal.startsWith('var(')) {\n res = cssVal\n } else if (unitlessNumbers[key]) {\n res = +cssVal\n } else if (cssVal.endsWith('px')) {\n res = +cssVal.replace('px', '')\n } else {\n res = cssVal\n }\n rcache[cssRule] = res\n if (process.env.NODE_ENV === 'development') {\n // ensure we are parsing properly\n if (typeof res === 'number' && isNaN(res)) {\n // eslint-disable-next-line no-console\n console.log('Tamagui invalid parsed value, NaN:', {\n res,\n cssVal,\n cssRule,\n key,\n className,\n })\n }\n }\n return res\n}\n"],
5
- "mappings": "AAKA,SAAS,aAAa;AAEtB,SAAS,uBAAuB;AAChC,SAAS,OAAO,sBAAsB;AACtC,SAAS,8BAA8B;AAEvC,MAAM,aAAa,CAAC;AAEb,SAAS,2BAA2B,OAAY,UAAwB;AAC7E,MAAI,SAAS,YAAY;AACvB,WAAO,WAAW,KAAK;AAAA,EACzB;AACA,MAAI,YAAY,YAAY,iBAAiB;AAC3C,WAAO;AAAA,EACT;AACA,MAAI,MAAM;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,QAAQ,OAAO,EAAE,EAAE,QAAQ,OAAO,EAAE,EAAE,KAAK;AAClE,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM,GAAG;AAC7B,UAAM;AAAA,EACR,WAAW,gBAAgB,GAAG,GAAG;AAC/B,UAAM,CAAC;AAAA,EACT,WAAW,OAAO,SAAS,IAAI,GAAG;AAChC,UAAM,CAAC,OAAO,QAAQ,MAAM,EAAE;AAAA,EAChC,OAAO;AACL,UAAM;AAAA,EACR;AACA,SAAO,OAAO,IAAI;AAClB,MAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,QAAI,OAAO,QAAQ,YAAY,MAAM,GAAG,GAAG;AAEzC,cAAQ,IAAI,sCAAsC;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { isWeb } from '@tamagui/constants'\n\nimport { getAllSelectors } from './insertStyleRule.js'\nimport { names, normalizeColor } from './normalizeColor.js'\nimport { normalizeStylePropKeys } from './normalizeStylePropKeys'\n\nconst colorCache = {}\n\nexport function normalizeValueWithProperty(value: any, property?: string): any {\n if (value in colorCache) {\n return colorCache[value]\n }\n if (property && property in unitlessNumbers) {\n return value\n }\n let res = value\n if (property && (property in normalizeStylePropKeys || value in names)) {\n res = normalizeColor(value)\n colorCache[value] = res\n } else if (\n process.env.TAMAGUI_TARGET === 'web' &&\n typeof value === 'number' &&\n (property === undefined ||\n !(property in unitlessNumbers || property in stringNumbers))\n ) {\n res = `${value}px`\n } else if (isWeb && property !== undefined && property in stringNumbers) {\n res = `${res}`\n }\n return res\n}\n\nconst stringNumbers = {\n zIndex: true,\n}\n\nconst unitlessNumbers = {\n WebkitLineClamp: true,\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zoom: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n\n// getting real values for colors for animations (reverse mapped from CSS)\n// this isn't beautiful, but will do relatively fine performance for now\nconst rcache = {}\nexport function reverseMapClassNameToValue(key: string, className: string) {\n const selectors = getAllSelectors()\n const cssRule = selectors[className]\n if (rcache[cssRule]) return rcache[cssRule]\n if (!cssRule) {\n return\n }\n const cssVal = cssRule.replace(/.*:/, '').replace(/;.*/, '').trim()\n let res: any\n if (cssVal.startsWith('var(')) {\n res = cssVal\n } else if (unitlessNumbers[key]) {\n res = +cssVal\n } else if (cssVal.endsWith('px')) {\n res = +cssVal.replace('px', '')\n } else {\n res = cssVal\n }\n rcache[cssRule] = res\n if (process.env.NODE_ENV === 'development') {\n // ensure we are parsing properly\n if (typeof res === 'number' && isNaN(res)) {\n // eslint-disable-next-line no-console\n console.log('Tamagui invalid parsed value, NaN:', {\n res,\n cssVal,\n cssRule,\n key,\n className,\n })\n }\n }\n return res\n}\n"],
5
+ "mappings": "AAKA,SAAS,aAAa;AAEtB,SAAS,uBAAuB;AAChC,SAAS,OAAO,sBAAsB;AACtC,SAAS,8BAA8B;AAEvC,MAAM,aAAa,CAAC;AAEb,SAAS,2BAA2B,OAAY,UAAwB;AAC7E,MAAI,SAAS,YAAY;AACvB,WAAO,WAAW,KAAK;AAAA,EACzB;AACA,MAAI,YAAY,YAAY,iBAAiB;AAC3C,WAAO;AAAA,EACT;AACA,MAAI,MAAM;AACV,MAAI,aAAa,YAAY,0BAA0B,SAAS,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AAK;AAClE,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM,GAAG;AAC7B,UAAM;AAAA,EACR,WAAW,gBAAgB,GAAG,GAAG;AAC/B,UAAM,CAAC;AAAA,EACT,WAAW,OAAO,SAAS,IAAI,GAAG;AAChC,UAAM,CAAC,OAAO,QAAQ,MAAM,EAAE;AAAA,EAChC,OAAO;AACL,UAAM;AAAA,EACR;AACA,SAAO,OAAO,IAAI;AAClB,MAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,QAAI,OAAO,QAAQ,YAAY,MAAM,GAAG,GAAG;AAEzC,cAAQ,IAAI,sCAAsC;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -34,7 +34,6 @@ const unitlessNumbers = {
34
34
  columnCount: true,
35
35
  flex: true,
36
36
  flexGrow: true,
37
- flexBasis: true,
38
37
  flexOrder: true,
39
38
  flexPositive: true,
40
39
  flexShrink: true,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/normalizeValueWithProperty.ts"],
4
- "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { isWeb } from '@tamagui/constants'\n\nimport { getAllSelectors } from './insertStyleRule.js'\nimport { names, normalizeColor } from './normalizeColor.js'\nimport { normalizeStylePropKeys } from './normalizeStylePropKeys'\n\nconst colorCache = {}\n\nexport function normalizeValueWithProperty(value: any, property?: string): any {\n if (value in colorCache) {\n return colorCache[value]\n }\n if (property && property in unitlessNumbers) {\n return value\n }\n let res = value\n if (property && (property in normalizeStylePropKeys || value in names)) {\n res = normalizeColor(value)\n colorCache[value] = res\n } else if (\n process.env.TAMAGUI_TARGET === 'web' &&\n typeof value === 'number' &&\n (property === undefined ||\n !(property in unitlessNumbers || property in stringNumbers))\n ) {\n res = `${value}px`\n } else if (isWeb && property !== undefined && property in stringNumbers) {\n res = `${res}`\n }\n return res\n}\n\nconst stringNumbers = {\n zIndex: true,\n}\n\nconst unitlessNumbers = {\n WebkitLineClamp: true,\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexBasis: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zoom: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n\n// getting real values for colors for animations (reverse mapped from CSS)\n// this isn't beautiful, but will do relatively fine performance for now\nconst rcache = {}\nexport function reverseMapClassNameToValue(key: string, className: string) {\n const selectors = getAllSelectors()\n const cssRule = selectors[className]\n if (rcache[cssRule]) return rcache[cssRule]\n if (!cssRule) {\n return\n }\n const cssVal = cssRule.replace(/.*:/, '').replace(/;.*/, '').trim()\n let res: any\n if (cssVal.startsWith('var(')) {\n res = cssVal\n } else if (unitlessNumbers[key]) {\n res = +cssVal\n } else if (cssVal.endsWith('px')) {\n res = +cssVal.replace('px', '')\n } else {\n res = cssVal\n }\n rcache[cssRule] = res\n if (process.env.NODE_ENV === 'development') {\n // ensure we are parsing properly\n if (typeof res === 'number' && isNaN(res)) {\n // eslint-disable-next-line no-console\n console.log('Tamagui invalid parsed value, NaN:', {\n res,\n cssVal,\n cssRule,\n key,\n className,\n })\n }\n }\n return res\n}\n"],
5
- "mappings": "AAKA,SAAS,aAAa;AAEtB,SAAS,uBAAuB;AAChC,SAAS,OAAO,sBAAsB;AACtC,SAAS,8BAA8B;AAEvC,MAAM,aAAa,CAA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;AACzE,QAAM,YAAY,gBAAgB;AAClC,QAAM,UAAU,UAAU,SAAS;AACnC,MAAI,OAAO,OAAO;AAAG,WAAO,OAAO,OAAO;AAC1C,MAAI,CAAC,SAAS;AACZ;AAAA,EACF;AACA,QAAM,SAAS,QAAQ,QAAQ,OAAO,EAAE,EAAE,QAAQ,OAAO,EAAE,EAAE,KAAK;AAClE,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM,GAAG;AAC7B,UAAM;AAAA,EACR,WAAW,gBAAgB,GAAG,GAAG;AAC/B,UAAM,CAAC;AAAA,EACT,WAAW,OAAO,SAAS,IAAI,GAAG;AAChC,UAAM,CAAC,OAAO,QAAQ,MAAM,EAAE;AAAA,EAChC,OAAO;AACL,UAAM;AAAA,EACR;AACA,SAAO,OAAO,IAAI;AAClB,MAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,QAAI,OAAO,QAAQ,YAAY,MAAM,GAAG,GAAG;AAEzC,cAAQ,IAAI,sCAAsC;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { isWeb } from '@tamagui/constants'\n\nimport { getAllSelectors } from './insertStyleRule.js'\nimport { names, normalizeColor } from './normalizeColor.js'\nimport { normalizeStylePropKeys } from './normalizeStylePropKeys'\n\nconst colorCache = {}\n\nexport function normalizeValueWithProperty(value: any, property?: string): any {\n if (value in colorCache) {\n return colorCache[value]\n }\n if (property && property in unitlessNumbers) {\n return value\n }\n let res = value\n if (property && (property in normalizeStylePropKeys || value in names)) {\n res = normalizeColor(value)\n colorCache[value] = res\n } else if (\n process.env.TAMAGUI_TARGET === 'web' &&\n typeof value === 'number' &&\n (property === undefined ||\n !(property in unitlessNumbers || property in stringNumbers))\n ) {\n res = `${value}px`\n } else if (isWeb && property !== undefined && property in stringNumbers) {\n res = `${res}`\n }\n return res\n}\n\nconst stringNumbers = {\n zIndex: true,\n}\n\nconst unitlessNumbers = {\n WebkitLineClamp: true,\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zoom: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n\n// getting real values for colors for animations (reverse mapped from CSS)\n// this isn't beautiful, but will do relatively fine performance for now\nconst rcache = {}\nexport function reverseMapClassNameToValue(key: string, className: string) {\n const selectors = getAllSelectors()\n const cssRule = selectors[className]\n if (rcache[cssRule]) return rcache[cssRule]\n if (!cssRule) {\n return\n }\n const cssVal = cssRule.replace(/.*:/, '').replace(/;.*/, '').trim()\n let res: any\n if (cssVal.startsWith('var(')) {\n res = cssVal\n } else if (unitlessNumbers[key]) {\n res = +cssVal\n } else if (cssVal.endsWith('px')) {\n res = +cssVal.replace('px', '')\n } else {\n res = cssVal\n }\n rcache[cssRule] = res\n if (process.env.NODE_ENV === 'development') {\n // ensure we are parsing properly\n if (typeof res === 'number' && isNaN(res)) {\n // eslint-disable-next-line no-console\n console.log('Tamagui invalid parsed value, NaN:', {\n res,\n cssVal,\n cssRule,\n key,\n className,\n })\n }\n }\n return res\n}\n"],
5
+ "mappings": "AAKA,SAAS,aAAa;AAEtB,SAAS,uBAAuB;AAChC,SAAS,OAAO,sBAAsB;AACtC,SAAS,8BAA8B;AAEvC,MAAM,aAAa,CAAC;AAEb,SAAS,2BAA2B,OAAY,UAAwB;A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AS;AACnC,MAAI,OAAO,OAAO;AAAG,WAAO,OAAO,OAAO;AAC1C,MAAI,CAAC,SAAS;AACZ;AAAA,EACF;AACA,QAAM,SAAS,QAAQ,QAAQ,OAAO,EAAE,EAAE,QAAQ,OAAO,EAAE,EAAE,KAAK;AAClE,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM,GAAG;AAC7B,UAAM;AAAA,EACR,WAAW,gBAAgB,GAAG,GAAG;AAC/B,UAAM,CAAC;AAAA,EACT,WAAW,OAAO,SAAS,IAAI,GAAG;AAChC,UAAM,CAAC,OAAO,QAAQ,MAAM,EAAE;AAAA,EAChC,OAAO;AACL,UAAM;AAAA,EACR;AACA,SAAO,OAAO,IAAI;AAClB,MAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,QAAI,OAAO,QAAQ,YAAY,MAAM,GAAG,GAAG;AAEzC,cAAQ,IAAI,sCAAsC;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/web",
3
- "version": "1.9.11",
3
+ "version": "1.9.12",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -27,19 +27,19 @@
27
27
  "reset.css"
28
28
  ],
29
29
  "dependencies": {
30
- "@tamagui/compose-refs": "1.9.11",
31
- "@tamagui/constants": "1.9.11",
32
- "@tamagui/helpers": "1.9.11",
33
- "@tamagui/normalize-css-color": "1.9.11",
34
- "@tamagui/use-did-finish-ssr": "1.9.11",
35
- "@tamagui/use-event": "1.9.11",
36
- "@tamagui/use-force-update": "1.9.11"
30
+ "@tamagui/compose-refs": "1.9.12",
31
+ "@tamagui/constants": "1.9.12",
32
+ "@tamagui/helpers": "1.9.12",
33
+ "@tamagui/normalize-css-color": "1.9.12",
34
+ "@tamagui/use-did-finish-ssr": "1.9.12",
35
+ "@tamagui/use-event": "1.9.12",
36
+ "@tamagui/use-force-update": "1.9.12"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "*"
40
40
  },
41
41
  "devDependencies": {
42
- "@tamagui/build": "1.9.11",
42
+ "@tamagui/build": "1.9.12",
43
43
  "@testing-library/react": "^13.4.0",
44
44
  "csstype": "^3.0.10",
45
45
  "react": "^18.2.0",
@@ -49,7 +49,6 @@ const unitlessNumbers = {
49
49
  columnCount: true,
50
50
  flex: true,
51
51
  flexGrow: true,
52
- flexBasis: true,
53
52
  flexOrder: true,
54
53
  flexPositive: true,
55
54
  flexShrink: true,
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeValueWithProperty.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeValueWithProperty.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,GAAG,CAsB7E;AA+CD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAiCxE"}
1
+ {"version":3,"file":"normalizeValueWithProperty.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeValueWithProperty.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,GAAG,CAsB7E;AA8CD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAiCxE"}