@tamagui/helpers-tamagui 1.0.1-beta.151 → 1.0.1-beta.152
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 +1 -1
- package/dist/cjs/useCurrentColor.js.map +1 -1
- package/dist/cjs/useGetThemedIcon.js +4 -1
- package/dist/cjs/useGetThemedIcon.js.map +2 -2
- package/dist/esm/getSpace.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/useCurrentColor.js.map +1 -1
- package/dist/esm/useGetThemedIcon.js.map +1 -1
- package/dist/jsx/getSpace.js.map +1 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/useCurrentColor.js.map +1 -1
- package/dist/jsx/useGetThemedIcon.js.map +1 -1
- package/package.json +4 -4
package/dist/cjs/getSpace.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/getSpace.tsx"],
|
|
4
4
|
"sourcesContent": ["import { SpaceTokens, getTokens } from '@tamagui/core'\n\nexport const getSpace = (token?: SpaceTokens | undefined, sizeUpOrDownBy = 0) => {\n const spaces = getTokens().space as any as SpaceTokens\n const spaceNames = Object.keys(spaces)\n const key = spaceNames[Math.max(0, spaceNames.indexOf(String(token || '$4')) + sizeUpOrDownBy)]\n return (spaces[key] || spaces['$4']) as SpaceTokens\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AAEhC,MAAM,WAAW,CAAC,OAAiC,iBAAiB,MAAM;AAC/E,QAAM,
|
|
5
|
+
"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,MAAM,WAAW,KAAK,IAAI,GAAG,WAAW,QAAQ,OAAO,SAAS,IAAI,CAAC,IAAI,cAAc;AAC7F,SAAQ,OAAO,QAAQ,OAAO;AAChC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
4
|
"sourcesContent": ["import { ColorTokens, ThemeValueFallback, useTheme, variableToString } from '@tamagui/core'\nimport type { TextStyle } from 'react-native'\n\nexport const useCurrentColor = (colorProp: ColorProp) => {\n const theme = useTheme()\n // get color from prop or theme\n let color: any\n // @ts-expect-error\n if (theme && colorProp && colorProp in theme) {\n // @ts-expect-error\n color = theme[colorProp]\n } else if (colorProp) {\n color = colorProp\n } else {\n color = theme?.color\n }\n return variableToString(color)\n}\n\nexport type ColorProp = ThemeValueFallback | ColorTokens | TextStyle['color'] | undefined\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA4E;AAGrE,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA4E;AAGrE,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,YAAQ,sBAAS;AAEvB,MAAI;AAEJ,MAAI,SAAS,aAAa,aAAa,OAAO;AAE5C,YAAQ,MAAM;AAAA,EAChB,WAAW,WAAW;AACpB,YAAQ;AAAA,EACV,OAAO;AACL,YAAQ,+BAAO;AAAA,EACjB;AACA,aAAO,8BAAiB,KAAK;AAC/B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var useGetThemedIcon_exports = {};
|
|
23
26
|
__export(useGetThemedIcon_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGetThemedIcon.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { 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) {\n if (isValidElement(el)) {\n return React.cloneElement(el as any, {\n ...props,\n color,\n // @ts-ignore\n ...el.props,\n })\n }\n return React.createElement(el, {\n ...props,\n color,\n })\n }\n return el\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsC;AAEtC,6BAA2C;AAEpC,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,YAAQ,wCAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OAAY;AAClB,QAAI,IAAI;AACN,cAAI,6BAAe,EAAE,GAAG;AACtB,eAAO,aAAAA,QAAM,aAAa,IAAW;AAAA,UACnC,GAAG;AAAA,UACH;AAAA,UAEA,GAAG,GAAG;AAAA,QACR,CAAC;AAAA,MACH;AACA,aAAO,aAAAA,QAAM,cAAc,IAAI;AAAA,QAC7B,GAAG;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH;AACA,WAAO;AAAA,EACT;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
package/dist/esm/getSpace.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/getSpace.tsx"],
|
|
4
4
|
"sourcesContent": ["import { SpaceTokens, getTokens } from '@tamagui/core'\n\nexport const getSpace = (token?: SpaceTokens | undefined, sizeUpOrDownBy = 0) => {\n const spaces = getTokens().space as any as SpaceTokens\n const spaceNames = Object.keys(spaces)\n const key = spaceNames[Math.max(0, spaceNames.indexOf(String(token || '$4')) + sizeUpOrDownBy)]\n return (spaces[key] || spaces['$4']) as SpaceTokens\n}\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"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,MAAM,WAAW,KAAK,IAAI,GAAG,WAAW,QAAQ,OAAO,SAAS,IAAI,CAAC,IAAI,cAAc;AAC7F,SAAQ,OAAO,QAAQ,OAAO;AAChC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["export * from '@tamagui/helpers'\nexport * from './prevent'\nexport * from './getSpace'\nexport * from './useCurrentColor'\nexport * from './useGetThemedIcon'\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
4
|
"sourcesContent": ["import { ColorTokens, ThemeValueFallback, useTheme, variableToString } from '@tamagui/core'\nimport type { TextStyle } from 'react-native'\n\nexport const useCurrentColor = (colorProp: ColorProp) => {\n const theme = useTheme()\n // get color from prop or theme\n let color: any\n // @ts-expect-error\n if (theme && colorProp && colorProp in theme) {\n // @ts-expect-error\n color = theme[colorProp]\n } else if (colorProp) {\n color = colorProp\n } else {\n color = theme?.color\n }\n return variableToString(color)\n}\n\nexport type ColorProp = ThemeValueFallback | ColorTokens | TextStyle['color'] | undefined\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,SAA0C,UAAU,wBAAwB;AAGrE,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AAEvB,MAAI;AAEJ,MAAI,SAAS,aAAa,aAAa,OAAO;AAE5C,YAAQ,MAAM;AAAA,EAChB,WAAW,WAAW;AACpB,YAAQ;AAAA,EACV,OAAO;AACL,YAAQ,+BAAO;AAAA,EACjB;AACA,SAAO,iBAAiB,KAAK;AAC/B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGetThemedIcon.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { 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) {\n if (isValidElement(el)) {\n return React.cloneElement(el as any, {\n ...props,\n color,\n // @ts-ignore\n ...el.props,\n })\n }\n return React.createElement(el, {\n ...props,\n color,\n })\n }\n return el\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,OAAO,SAAS,sBAAsB;AAEtC,SAAoB,uBAAuB;AAEpC,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,QAAQ,gBAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OAAY;AAClB,QAAI,IAAI;AACN,UAAI,eAAe,EAAE,GAAG;AACtB,eAAO,MAAM,aAAa,IAAW;AAAA,UACnC,GAAG;AAAA,UACH;AAAA,UAEA,GAAG,GAAG;AAAA,QACR,CAAC;AAAA,MACH;AACA,aAAO,MAAM,cAAc,IAAI;AAAA,QAC7B,GAAG;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH;AACA,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/getSpace.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/getSpace.tsx"],
|
|
4
4
|
"sourcesContent": ["import { SpaceTokens, getTokens } from '@tamagui/core'\n\nexport const getSpace = (token?: SpaceTokens | undefined, sizeUpOrDownBy = 0) => {\n const spaces = getTokens().space as any as SpaceTokens\n const spaceNames = Object.keys(spaces)\n const key = spaceNames[Math.max(0, spaceNames.indexOf(String(token || '$4')) + sizeUpOrDownBy)]\n return (spaces[key] || spaces['$4']) as SpaceTokens\n}\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"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,MAAM,WAAW,KAAK,IAAI,GAAG,WAAW,QAAQ,OAAO,SAAS,IAAI,CAAC,IAAI,cAAc;AAC7F,SAAQ,OAAO,QAAQ,OAAO;AAChC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["export * from '@tamagui/helpers'\nexport * from './prevent'\nexport * from './getSpace'\nexport * from './useCurrentColor'\nexport * from './useGetThemedIcon'\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
4
|
"sourcesContent": ["import { ColorTokens, ThemeValueFallback, useTheme, variableToString } from '@tamagui/core'\nimport type { TextStyle } from 'react-native'\n\nexport const useCurrentColor = (colorProp: ColorProp) => {\n const theme = useTheme()\n // get color from prop or theme\n let color: any\n // @ts-expect-error\n if (theme && colorProp && colorProp in theme) {\n // @ts-expect-error\n color = theme[colorProp]\n } else if (colorProp) {\n color = colorProp\n } else {\n color = theme?.color\n }\n return variableToString(color)\n}\n\nexport type ColorProp = ThemeValueFallback | ColorTokens | TextStyle['color'] | undefined\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,SAA0C,UAAU,wBAAwB;AAGrE,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AAEvB,MAAI;AAEJ,MAAI,SAAS,aAAa,aAAa,OAAO;AAE5C,YAAQ,MAAM;AAAA,EAChB,WAAW,WAAW;AACpB,YAAQ;AAAA,EACV,OAAO;AACL,YAAQ,OAAO;AAAA,EACjB;AACA,SAAO,iBAAiB,KAAK;AAC/B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useGetThemedIcon.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { 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) {\n if (isValidElement(el)) {\n return React.cloneElement(el as any, {\n ...props,\n color,\n // @ts-ignore\n ...el.props,\n })\n }\n return React.createElement(el, {\n ...props,\n color,\n })\n }\n return el\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,OAAO,SAAS,sBAAsB;AAEtC,SAAoB,uBAAuB;AAEpC,MAAM,mBAAmB,CAAC,UAA8C;AAC7E,QAAM,QAAQ,gBAAgB,MAAM,KAAK;AACzC,SAAO,CAAC,OAAY;AAClB,QAAI,IAAI;AACN,UAAI,eAAe,EAAE,GAAG;AACtB,eAAO,MAAM,aAAa,IAAW;AAAA,UACnC,GAAG;AAAA,UACH;AAAA,UAEA,GAAG,GAAG;AAAA,QACR,CAAC;AAAA,MACH;AACA,aAAO,MAAM,cAAc,IAAI;AAAA,QAC7B,GAAG;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH;AACA,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-tamagui",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.152",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"clean:build": "tamagui-build clean:build"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tamagui/core": "^1.0.1-beta.
|
|
24
|
-
"@tamagui/helpers": "^1.0.1-beta.
|
|
23
|
+
"@tamagui/core": "^1.0.1-beta.152",
|
|
24
|
+
"@tamagui/helpers": "^1.0.1-beta.152"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
27
|
+
"@tamagui/build": "^1.0.1-beta.152",
|
|
28
28
|
"react": "*",
|
|
29
29
|
"react-native": "*",
|
|
30
30
|
"vitest": "^0.20.3"
|