@tamagui/use-direction 1.125.21 → 1.125.22
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/package.json +2 -2
- package/types/index.d.ts.map +11 -0
- package/types/useDirection.d.ts.map +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-direction",
|
|
3
|
-
"version": "1.125.
|
|
3
|
+
"version": "1.125.22",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@tamagui/build": "1.125.
|
|
34
|
+
"@tamagui/build": "1.125.22",
|
|
35
35
|
"react": "*"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAEA,YAAY,WAAW,OAAO;KAEzB,YAAY,QAAQ;UAGf,uBAAuB;CAC/B,WAAW,MAAM;CACjB,KAAK;AACN;AAED,OAAO,cAAMA,mBAAmB,MAAM,GAAG;AAKzC,OAAO,iBAAS,aAAaC,WAAW,YAAY;AAKpD,OAAO,cAAMC,UAAU,MAAM,GAAG",
|
|
3
|
+
"names": [
|
|
4
|
+
"DirectionProvider: React.FC<DirectionProviderProps>",
|
|
5
|
+
"localDir?: Direction",
|
|
6
|
+
"Provider: React.FC<DirectionProviderProps>"
|
|
7
|
+
],
|
|
8
|
+
"sources": [
|
|
9
|
+
"src/useDirection.tsx"
|
|
10
|
+
],
|
|
11
|
+
"sourcesContent": [
|
|
12
|
+
"// forked from https://github.com/radix-ui/primitives/blob/main/packages/react/direction/src/Direction.tsx\n\nimport * as React from 'react'\n\ntype Direction = 'ltr' | 'rtl'\nconst DirectionContext = React.createContext<Direction | undefined>(undefined)\n\ninterface DirectionProviderProps {\n children?: React.ReactNode\n dir: Direction\n}\n\nexport const DirectionProvider: React.FC<DirectionProviderProps> = (props) => {\n const { dir, children } = props\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>\n}\n\nexport function useDirection(localDir?: Direction): Direction {\n const globalDir = React.useContext(DirectionContext)\n return localDir || globalDir || 'ltr'\n}\n\nexport const Provider: React.FC<DirectionProviderProps> = DirectionProvider\n"
|
|
13
|
+
],
|
|
14
|
+
"version": 3
|
|
15
|
+
}
|