@tamagui/use-direction 1.1.8 → 1.1.10

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.
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -34,10 +38,7 @@ var React = __toESM(require("react"));
34
38
  const DirectionContext = React.createContext(void 0);
35
39
  const DirectionProvider = (props) => {
36
40
  const { dir, children } = props;
37
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectionContext.Provider, {
38
- value: dir,
39
- children
40
- });
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectionContext.Provider, { value: dir, children });
41
42
  };
42
43
  function useDirection(localDir) {
43
44
  const globalDir = React.useContext(DirectionContext);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/useDirection.tsx"],
4
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": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeI;AAbJ,YAAuB;AAGvB,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SACE,4CAAC,iBAAiB,UAAjB;AAAA,IAA0B,OAAO;AAAA,IAAM;AAAA,GAAS;AAErD;AAEO,SAAS,aAAa,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeI;AAbJ,YAAuB;AAGvB,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SACE,4CAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAErD;AAEO,SAAS,aAAa,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
6
6
  "names": []
7
7
  }
@@ -3,10 +3,7 @@ import * as React from "react";
3
3
  const DirectionContext = React.createContext(void 0);
4
4
  const DirectionProvider = (props) => {
5
5
  const { dir, children } = props;
6
- return /* @__PURE__ */ jsx(DirectionContext.Provider, {
7
- value: dir,
8
- children
9
- });
6
+ return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });
10
7
  };
11
8
  function useDirection(localDir) {
12
9
  const globalDir = React.useContext(DirectionContext);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/useDirection.tsx"],
4
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": "AAeI;AAbJ,YAAY,WAAW;AAGvB,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SACE,oBAAC,iBAAiB,UAAjB;AAAA,IAA0B,OAAO;AAAA,IAAM;AAAA,GAAS;AAErD;AAEO,SAAS,aAAa,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
5
+ "mappings": "AAeI;AAbJ,YAAY,WAAW;AAGvB,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SACE,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAErD;AAEO,SAAS,aAAa,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-direction",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
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.1.8",
21
+ "@tamagui/build": "^1.1.10",
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,cAAc;",
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,YAAY,WAAW;AAGvB,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SACE,CAAC,iBAAiB,SAAS,OAAO,MAAM,SAAS,EAAhD,iBAAiB;AAEtB;AAEO,SAAS,aAAa,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
6
- "names": []
7
- }