@tamagui/use-direction 1.0.10 → 1.0.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.
package/dist/cjs/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/dist/esm/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-direction",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -18,7 +18,7 @@
18
18
  "clean:build": "tamagui-build clean:build"
19
19
  },
20
20
  "devDependencies": {
21
- "@tamagui/build": "^1.0.10",
21
+ "@tamagui/build": "^1.0.12",
22
22
  "react": "^18.2.0"
23
23
  },
24
24
  "peerDependencies": {
package/dist/jsx/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from "./useDirection";
2
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './useDirection'\n"],
5
- "mappings": "AAAA;",
6
- "names": []
7
- }
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- const DirectionContext = React.createContext(void 0);
3
- const DirectionProvider = (props) => {
4
- const { dir, children } = props;
5
- return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;
6
- };
7
- function useDirection(localDir) {
8
- const globalDir = React.useContext(DirectionContext);
9
- return localDir || globalDir || "ltr";
10
- }
11
- const Provider = DirectionProvider;
12
- export {
13
- DirectionProvider,
14
- Provider,
15
- useDirection
16
- };
17
- //# sourceMappingURL=useDirection.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useDirection.tsx"],
4
- "sourcesContent": ["// 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 (\n <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>\n )\n}\n\nexport function useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext)\n return localDir || globalDir || 'ltr'\n}\n\nexport const Provider = DirectionProvider\n"],
5
- "mappings": "AAEA;AAGA,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,aAAa;AAC1B,SACE,CAAC,iBAAiB,SAAS,OAAO,MAAM,SAAS,EAAhD,iBAAiB;AAEtB;AAEO,sBAAsB,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
6
- "names": []
7
- }