@tamagui/helpers-tamagui 1.15.13 → 1.15.15
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/cjs/getSpace.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/prevent.js.map +0 -1
- package/dist/cjs/useCurrentColor.js.map +0 -1
- package/dist/cjs/useGetThemedIcon.js.map +0 -1
- package/dist/esm/getSpace.js.map +0 -1
- package/dist/esm/getSpace.mjs.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/prevent.js.map +0 -1
- package/dist/esm/prevent.mjs.map +0 -1
- package/dist/esm/useCurrentColor.js.map +0 -1
- package/dist/esm/useCurrentColor.mjs.map +0 -1
- package/dist/esm/useGetThemedIcon.js.map +0 -1
- package/dist/esm/useGetThemedIcon.mjs.map +0 -1
- package/package.json +4 -4
package/dist/cjs/getSpace.js.map
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/getSpace.tsx"],
|
|
4
|
-
"sourcesContent": ["import { SpaceTokens, getTokens } from '@tamagui/core'\n\nexport const getSpace = (token?: SpaceTokens | undefined, sizeUpOrDownBy = 0) => {\n const spaces = getTokens().space\n const spaceNames = Object.keys(spaces)\n const key =\n spaceNames[Math.max(0, spaceNames.indexOf(String(token || '$true')) + sizeUpOrDownBy)]\n return (spaces[key] || spaces['$true']) as SpaceTokens\n}\n"],
|
|
5
4
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AAEhC,MAAM,WAAW,CAAC,OAAiC,iBAAiB,MAAM;AAC/E,QAAM,aAAS,uBAAU,EAAE;AAC3B,QAAM,aAAa,OAAO,KAAK,MAAM;AACrC,QAAM,MACJ,WAAW,KAAK,IAAI,GAAG,WAAW,QAAQ,OAAO,SAAS,OAAO,CAAC,IAAI,cAAc,CAAC;AACvF,SAAQ,OAAO,GAAG,KAAK,OAAO,OAAO;AACvC;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from '@tamagui/helpers'\nexport * from './prevent'\nexport * from './getSpace'\nexport * from './useCurrentColor'\nexport * from './useGetThemedIcon'\n"],
|
|
5
4
|
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,6BAAd;AACA,wBAAc,sBADd;AAEA,wBAAc,uBAFd;AAGA,wBAAc,8BAHd;AAIA,wBAAc,+BAJd;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
package/dist/cjs/prevent.js.map
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/prevent.tsx"],
|
|
4
|
-
"sourcesContent": ["export const prevent = (e) => [e.preventDefault(), e.stopPropagation()]\n"],
|
|
5
4
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,EAAE,gBAAgB,CAAC;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n ColorTokens,\n UnionableString,\n Variable,\n useTheme,\n variableToString,\n} from '@tamagui/core'\nimport type { TextStyle } from 'react-native'\n\nexport const useCurrentColor = (colorProp: ColorProp) => {\n const theme = useTheme()\n return variableToString(theme[colorProp as any] || colorProp || theme.color)\n}\n\nexport type ColorProp =\n | UnionableString\n | Variable\n | ColorTokens\n | TextStyle['color']\n | undefined\n"],
|
|
5
4
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMO;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,YAAQ,sBAAS;AACvB,aAAO,8BAAiB,MAAM,SAAgB,KAAK,aAAa,MAAM,KAAK;AAC7E;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGetThemedIcon.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cloneElement, createElement, isValidElement } from 'react'\n\nimport { ColorProp, useCurrentColor } from './useCurrentColor'\n\nexport const useGetThemedIcon = (props: { color: ColorProp; size: number }) => {\n const color = useCurrentColor(props.color)\n return (el: any) => {\n if (!el) return el\n if (isValidElement(el)) {\n return cloneElement(el, {\n ...props,\n // @ts-expect-error\n ...el.props,\n })\n }\n return createElement(el, props)\n }\n}\n"],
|
|
5
4
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4D;AAE5D,6BAA2C;AAEpC,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,YAAQ,wCAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OAAY;AAClB,QAAI,CAAC;AAAI,aAAO;AAChB,YAAI,6BAAe,EAAE,GAAG;AACtB,iBAAO,2BAAa,IAAI;AAAA,QACtB,GAAG;AAAA;AAAA,QAEH,GAAG,GAAG;AAAA,MACR,CAAC;AAAA,IACH;AACA,eAAO,4BAAc,IAAI,KAAK;AAAA,EAChC;AACF;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
package/dist/esm/getSpace.js.map
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/getSpace.tsx"],
|
|
4
|
-
"sourcesContent": ["import { SpaceTokens, getTokens } from '@tamagui/core'\n\nexport const getSpace = (token?: SpaceTokens | undefined, sizeUpOrDownBy = 0) => {\n const spaces = getTokens().space\n const spaceNames = Object.keys(spaces)\n const key =\n spaceNames[Math.max(0, spaceNames.indexOf(String(token || '$true')) + sizeUpOrDownBy)]\n return (spaces[key] || spaces['$true']) as SpaceTokens\n}\n"],
|
|
5
4
|
"mappings": "AAAA,SAAsB,iBAAiB;AAEhC,MAAM,WAAW,CAAC,OAAiC,iBAAiB,MAAM;AAC/E,QAAM,SAAS,UAAU,EAAE;AAC3B,QAAM,aAAa,OAAO,KAAK,MAAM;AACrC,QAAM,MACJ,WAAW,KAAK,IAAI,GAAG,WAAW,QAAQ,OAAO,SAAS,OAAO,CAAC,IAAI,cAAc,CAAC;AACvF,SAAQ,OAAO,GAAG,KAAK,OAAO,OAAO;AACvC;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/getSpace.tsx"],
|
|
4
|
-
"sourcesContent": ["import { SpaceTokens, getTokens } from '@tamagui/core'\n\nexport const getSpace = (token?: SpaceTokens | undefined, sizeUpOrDownBy = 0) => {\n const spaces = getTokens().space\n const spaceNames = Object.keys(spaces)\n const key =\n spaceNames[Math.max(0, spaceNames.indexOf(String(token || '$true')) + sizeUpOrDownBy)]\n return (spaces[key] || spaces['$true']) as SpaceTokens\n}\n"],
|
|
5
4
|
"mappings": "AAAA,SAAsB,iBAAiB;AAEhC,MAAM,WAAW,CAAC,OAAiC,iBAAiB,MAAM;AAC/E,QAAM,SAAS,UAAU,EAAE;AAC3B,QAAM,aAAa,OAAO,KAAK,MAAM;AACrC,QAAM,MACJ,WAAW,KAAK,IAAI,GAAG,WAAW,QAAQ,OAAO,SAAS,OAAO,CAAC,IAAI,cAAc,CAAC;AACvF,SAAQ,OAAO,GAAG,KAAK,OAAO,OAAO;AACvC;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from '@tamagui/helpers'\nexport * from './prevent'\nexport * from './getSpace'\nexport * from './useCurrentColor'\nexport * from './useGetThemedIcon'\n"],
|
|
5
4
|
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from '@tamagui/helpers'\nexport * from './prevent'\nexport * from './getSpace'\nexport * from './useCurrentColor'\nexport * from './useGetThemedIcon'\n"],
|
|
5
4
|
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
package/dist/esm/prevent.js.map
CHANGED
package/dist/esm/prevent.mjs.map
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n ColorTokens,\n UnionableString,\n Variable,\n useTheme,\n variableToString,\n} from '@tamagui/core'\nimport type { TextStyle } from 'react-native'\n\nexport const useCurrentColor = (colorProp: ColorProp) => {\n const theme = useTheme()\n return variableToString(theme[colorProp as any] || colorProp || theme.color)\n}\n\nexport type ColorProp =\n | UnionableString\n | Variable\n | ColorTokens\n | TextStyle['color']\n | undefined\n"],
|
|
5
4
|
"mappings": "AAAA;AAAA,EAIE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AACvB,SAAO,iBAAiB,MAAM,SAAgB,KAAK,aAAa,MAAM,KAAK;AAC7E;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n ColorTokens,\n UnionableString,\n Variable,\n useTheme,\n variableToString,\n} from '@tamagui/core'\nimport type { TextStyle } from 'react-native'\n\nexport const useCurrentColor = (colorProp: ColorProp) => {\n const theme = useTheme()\n return variableToString(theme[colorProp as any] || colorProp || theme.color)\n}\n\nexport type ColorProp =\n | UnionableString\n | Variable\n | ColorTokens\n | TextStyle['color']\n | undefined\n"],
|
|
5
4
|
"mappings": "AAAA;AAAA,EAIE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AACvB,SAAO,iBAAiB,MAAM,SAAgB,KAAK,aAAa,MAAM,KAAK;AAC7E;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGetThemedIcon.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cloneElement, createElement, isValidElement } from 'react'\n\nimport { ColorProp, useCurrentColor } from './useCurrentColor'\n\nexport const useGetThemedIcon = (props: { color: ColorProp; size: number }) => {\n const color = useCurrentColor(props.color)\n return (el: any) => {\n if (!el) return el\n if (isValidElement(el)) {\n return cloneElement(el, {\n ...props,\n // @ts-expect-error\n ...el.props,\n })\n }\n return createElement(el, props)\n }\n}\n"],
|
|
5
4
|
"mappings": "AAAA,SAAS,cAAc,eAAe,sBAAsB;AAE5D,SAAoB,uBAAuB;AAEpC,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,QAAQ,gBAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OAAY;AAClB,QAAI,CAAC;AAAI,aAAO;AAChB,QAAI,eAAe,EAAE,GAAG;AACtB,aAAO,aAAa,IAAI;AAAA,QACtB,GAAG;AAAA;AAAA,QAEH,GAAG,GAAG;AAAA,MACR,CAAC;AAAA,IACH;AACA,WAAO,cAAc,IAAI,KAAK;AAAA,EAChC;AACF;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGetThemedIcon.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cloneElement, createElement, isValidElement } from 'react'\n\nimport { ColorProp, useCurrentColor } from './useCurrentColor'\n\nexport const useGetThemedIcon = (props: { color: ColorProp; size: number }) => {\n const color = useCurrentColor(props.color)\n return (el: any) => {\n if (!el) return el\n if (isValidElement(el)) {\n return cloneElement(el, {\n ...props,\n // @ts-expect-error\n ...el.props,\n })\n }\n return createElement(el, props)\n }\n}\n"],
|
|
5
4
|
"mappings": "AAAA,SAAS,cAAc,eAAe,sBAAsB;AAE5D,SAAoB,uBAAuB;AAEpC,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,QAAQ,gBAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OAAY;AAClB,QAAI,CAAC;AAAI,aAAO;AAChB,QAAI,eAAe,EAAE,GAAG;AACtB,aAAO,aAAa,IAAI;AAAA,QACtB,GAAG;AAAA;AAAA,QAEH,GAAG,GAAG;AAAA,MACR,CAAC;AAAA,IACH;AACA,WAAO,cAAc,IAAI,KAAK;AAAA,EAChC;AACF;",
|
|
6
5
|
"names": []
|
|
7
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-tamagui",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.15",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"clean:build": "tamagui-build clean:build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@tamagui/core": "1.15.
|
|
23
|
-
"@tamagui/helpers": "1.15.
|
|
22
|
+
"@tamagui/core": "1.15.15",
|
|
23
|
+
"@tamagui/helpers": "1.15.15"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@tamagui/build": "1.15.
|
|
26
|
+
"@tamagui/build": "1.15.15",
|
|
27
27
|
"react": "^18.2.0",
|
|
28
28
|
"react-native": "^0.71.4",
|
|
29
29
|
"vitest": "^0.26.3"
|