@tamagui/use-direction 2.0.0-rc.4 → 2.0.0-rc.40

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.
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
7
8
  get: () => from[key],
8
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
10
  });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
15
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
10
  get: () => from[key],
10
11
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
12
  });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
17
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
18
+ value: true
17
19
  }), mod);
18
20
  var index_exports = {};
19
21
  module.exports = __toCommonJS(index_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
@@ -2,33 +2,35 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  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.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: true
33
+ }), mod);
32
34
  var useDirection_exports = {};
33
35
  __export(useDirection_exports, {
34
36
  DirectionProvider: () => DirectionProvider,
@@ -36,19 +38,19 @@ __export(useDirection_exports, {
36
38
  useDirection: () => useDirection
37
39
  });
38
40
  module.exports = __toCommonJS(useDirection_exports);
39
- var React = __toESM(require("react"), 1),
40
- import_jsx_runtime = require("react/jsx-runtime");
41
- const DirectionContext = React.createContext(void 0),
42
- DirectionProvider = props => {
43
- const {
44
- dir,
45
- children
46
- } = props;
47
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(DirectionContext.Provider, {
48
- value: dir,
49
- children
50
- });
51
- };
41
+ var React = __toESM(require("react"), 1);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
43
+ const DirectionContext = React.createContext(void 0);
44
+ const DirectionProvider = props => {
45
+ const {
46
+ dir,
47
+ children
48
+ } = props;
49
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(DirectionContext.Provider, {
50
+ value: dir,
51
+ children
52
+ });
53
+ };
52
54
  function useDirection(localDir) {
53
55
  const globalDir = React.useContext(DirectionContext);
54
56
  return localDir || globalDir || "ltr";
@@ -4,33 +4,35 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
34
36
  var useDirection_exports = {};
35
37
  __export(useDirection_exports, {
36
38
  DirectionProvider: () => DirectionProvider,
@@ -38,19 +40,19 @@ __export(useDirection_exports, {
38
40
  useDirection: () => useDirection
39
41
  });
40
42
  module.exports = __toCommonJS(useDirection_exports);
41
- var import_jsx_runtime = require("react/jsx-runtime"),
42
- React = __toESM(require("react"), 1),
43
- DirectionContext = /* @__PURE__ */React.createContext(void 0),
44
- DirectionProvider = function (props) {
45
- var {
46
- dir,
47
- children
48
- } = props;
49
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(DirectionContext.Provider, {
50
- value: dir,
51
- children
52
- });
53
- };
43
+ var import_jsx_runtime = require("react/jsx-runtime");
44
+ var React = __toESM(require("react"), 1);
45
+ var DirectionContext = /* @__PURE__ */React.createContext(void 0);
46
+ var DirectionProvider = function (props) {
47
+ var {
48
+ dir,
49
+ children
50
+ } = props;
51
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(DirectionContext.Provider, {
52
+ value: dir,
53
+ children
54
+ });
55
+ };
54
56
  function useDirection(localDir) {
55
57
  var globalDir = React.useContext(DirectionContext);
56
58
  return localDir || globalDir || "ltr";
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useDirection_exports","__export","DirectionProvider","Provider","useDirection","module","exports","import_jsx_runtime","require","React","__toESM","DirectionContext","createContext","props","dir","children","jsx","localDir","globalDir","useContext"],"sources":["../../src/useDirection.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAuB,GAAAX,YAAA,CAAAK,oBAYd;AATT,IAAAO,kBAAM,GAAmBC,OAAM,oBAA8C;EAOhEC,KAAA,GAAAC,OAAA,CAAAF,OAAuD,QAAU;EAAAG,gBAAA,kBAAAF,KAAA,CAAAG,aAAA;EAAAV,iBAAA,YAAAA,CAAAW,KAAA;IAC5E;MAAMC,GAAE;MAAAC;IAAK,IAASF,KAAI;IAC1B,OAAO,mBAAAN,kBAAA,CAAAS,GAAA,EAACL,gBAAA,CAAiBR,QAAA,EAAjB;MACVJ,KAAA,EAAAe,GAAA;MAEOC;IACL;EACA;AACF,SAAAX,aAAAa,QAAA;EAEO,IAAMC,SAAA,GAA6CT,KAAA,CAAAU,UAAA,CAAAR,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useDirection_exports","__export","DirectionProvider","Provider","useDirection","module","exports","import_jsx_runtime","require","React","__toESM","DirectionContext","createContext","props","dir","children","jsx","localDir"],"sources":["../../src/useDirection.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAuB,GAAAX,YAAA,CAAAK,oBAAA;AAYd,IAAAO,kBAAA,GAAAC,OAAA;AATT,IAAAC,KAAM,GAAAC,OAAA,CAAAF,OAAmB,QAAM;AAOxB,IAAAG,gBAAM,kBAAiEF,KAAA,CAAAG,aAAA;AAC5E,IAAAV,iBAAa,GAAS,SAAAA,CAAIW,KAAA;EAC1B;IAAAC,GAAO;IAAAC;EAAA,IAAAF,KAAA;EACT,0BAAAN,kBAAA,CAAAS,GAAA,EAAAL,gBAAA,CAAAR,QAAA;IAEOJ,KAAS,EAAAe,GAAA;IACdC;EACA;AACF;AAEO,SAAMX,YAA6CA,CAAAa,QAAA","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./useDirection";
1
+ export * from "./useDirection.mjs";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": "AAAA,cAAc;",
5
- "names": []
6
- }
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -1,16 +1,16 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- const DirectionContext = React.createContext(void 0),
4
- DirectionProvider = props => {
5
- const {
6
- dir,
7
- children
8
- } = props;
9
- return /* @__PURE__ */jsx(DirectionContext.Provider, {
10
- value: dir,
11
- children
12
- });
13
- };
3
+ const DirectionContext = React.createContext(void 0);
4
+ const DirectionProvider = props => {
5
+ const {
6
+ dir,
7
+ children
8
+ } = props;
9
+ return /* @__PURE__ */jsx(DirectionContext.Provider, {
10
+ value: dir,
11
+ children
12
+ });
13
+ };
14
14
  function useDirection(localDir) {
15
15
  const globalDir = React.useContext(DirectionContext);
16
16
  return localDir || globalDir || "ltr";
@@ -1 +1 @@
1
- {"version":3,"names":["React","jsx","DirectionContext","createContext","DirectionProvider","props","dir","children","Provider","value","useDirection","localDir","globalDir","useContext"],"sources":["../../src/useDirection.tsx"],"sourcesContent":[null],"mappings":"AAEA,YAAYA,KAAA,MAAW;AAYd,SAAAC,GAAA;AATT,MAAMC,gBAAA,GAAmBF,KAAA,CAAMG,aAAA,CAAqC,MAAS;EAOhEC,iBAAA,GAAuDC,KAAA,IAAU;IAC5E,MAAM;MAAEC,GAAA;MAAKC;IAAS,IAAIF,KAAA;IAC1B,OAAO,eAAAJ,GAAA,CAACC,gBAAA,CAAiBM,QAAA,EAAjB;MAA0BC,KAAA,EAAOH,GAAA;MAAMC;IAAA,CAAS;EAC1D;AAEO,SAASG,aAAaC,QAAA,EAAiC;EAC5D,MAAMC,SAAA,GAAYZ,KAAA,CAAMa,UAAA,CAAWX,gBAAgB;EACnD,OAAOS,QAAA,IAAYC,SAAA,IAAa;AAClC;AAEO,MAAMJ,QAAA,GAA6CJ,iBAAA","ignoreList":[]}
1
+ {"version":3,"names":["React","jsx","DirectionContext","createContext","DirectionProvider","props","dir","children","Provider","value","useDirection","localDir","globalDir","useContext"],"sources":["../../src/useDirection.tsx"],"sourcesContent":[null],"mappings":"AAEA,YAAYA,KAAA,MAAW;AAYd,SAAAC,GAAA;AATT,MAAMC,gBAAA,GAAmBF,KAAA,CAAMG,aAAA,CAAqC,MAAS;AAOtE,MAAMC,iBAAA,GAAuDC,KAAA,IAAU;EAC5E,MAAM;IAAEC,GAAA;IAAKC;EAAS,IAAIF,KAAA;EAC1B,OAAO,eAAAJ,GAAA,CAACC,gBAAA,CAAiBM,QAAA,EAAjB;IAA0BC,KAAA,EAAOH,GAAA;IAAMC;EAAA,CAAS;AAC1D;AAEO,SAASG,aAAaC,QAAA,EAAiC;EAC5D,MAAMC,SAAA,GAAYZ,KAAA,CAAMa,UAAA,CAAWX,gBAAgB;EACnD,OAAOS,QAAA,IAAYC,SAAA,IAAa;AAClC;AAEO,MAAMJ,QAAA,GAA6CJ,iBAAA","ignoreList":[]}
@@ -1,16 +1,16 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- var DirectionContext = /* @__PURE__ */React.createContext(void 0),
4
- DirectionProvider = function (props) {
5
- var {
6
- dir,
7
- children
8
- } = props;
9
- return /* @__PURE__ */_jsx(DirectionContext.Provider, {
10
- value: dir,
11
- children
12
- });
13
- };
3
+ var DirectionContext = /* @__PURE__ */React.createContext(void 0);
4
+ var DirectionProvider = function (props) {
5
+ var {
6
+ dir,
7
+ children
8
+ } = props;
9
+ return /* @__PURE__ */_jsx(DirectionContext.Provider, {
10
+ value: dir,
11
+ children
12
+ });
13
+ };
14
14
  function useDirection(localDir) {
15
15
  var globalDir = React.useContext(DirectionContext);
16
16
  return localDir || globalDir || "ltr";
@@ -1 +1 @@
1
- {"version":3,"names":["jsx","_jsx","React","DirectionContext","createContext","DirectionProvider","props","dir","children","Provider","value","useDirection","localDir","globalDir","useContext"],"sources":["../../src/useDirection.tsx"],"sourcesContent":[null],"mappings":"AAEA,SAAAA,GAAY,IAAAC,IAAA,QAAW;AAYd,YAAAC,KAAA;AATT,IAAAC,gBAAM,kBAAyBD,KAAA,CAAqCE,aAOvD;EAAAC,iBAAiE,YAAAA,CAAAC,KAAA;IAC5E;MAAMC,GAAE;MAAAC;IAAK,IAASF,KAAI;IAC1B,OAAO,eAAAL,IAAC,CAAAE,gBAAiB,CAAAM,QAAA,EAAjB;MACVC,KAAA,EAAAH,GAAA;MAEOC;IACL;EACA;AACF,SAAAG,aAAAC,QAAA;EAEO,IAAMC,SAAA,GAA6CX,KAAA,CAAAY,UAAA,CAAAX,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["jsx","_jsx","React","DirectionContext","createContext","DirectionProvider","props","dir","children","Provider","value","useDirection","localDir","globalDir","useContext"],"sources":["../../src/useDirection.tsx"],"sourcesContent":[null],"mappings":"AAEA,SAAAA,GAAY,IAAAC,IAAA,QAAW;AAYd,YAAAC,KAAA;AATT,IAAAC,gBAAM,kBAAyBD,KAAA,CAAqCE,aAAS;AAOtE,IAAAC,iBAAM,YAAAA,CAAuDC,KAAU;EAC5E;IAAMC,GAAE;IAAAC;EAAK,IAASF,KAAI;EAC1B,OAAO,eAAAL,IAAC,CAAAE,gBAAiB,CAAAM,QAAA,EAAjB;IACVC,KAAA,EAAAH,GAAA;IAEOC;EACL;AACA;AACF,SAAAG,aAAAC,QAAA;EAEO,IAAMC,SAAA,GAA6CX,KAAA,CAAAY,UAAA,CAAAX,gBAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-direction",
3
- "version": "2.0.0-rc.4",
3
+ "version": "2.0.0-rc.40",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "files": [
6
6
  "src",
@@ -16,15 +16,12 @@
16
16
  "./package.json": "./package.json",
17
17
  ".": {
18
18
  "types": "./types/index.d.ts",
19
- "react-native": {
20
- "module": "./dist/esm/index.native.js",
21
- "import": "./dist/esm/index.native.js",
22
- "require": "./dist/cjs/index.native.js"
23
- },
19
+ "react-native": "./dist/esm/index.native.js",
20
+ "browser": "./dist/esm/index.mjs",
24
21
  "module": "./dist/esm/index.mjs",
25
22
  "import": "./dist/esm/index.mjs",
26
23
  "require": "./dist/cjs/index.cjs",
27
- "default": "./dist/cjs/index.native.js"
24
+ "default": "./dist/esm/index.mjs"
28
25
  }
29
26
  },
30
27
  "publishConfig": {
@@ -37,7 +34,7 @@
37
34
  "clean:build": "tamagui-build clean:build"
38
35
  },
39
36
  "devDependencies": {
40
- "@tamagui/build": "2.0.0-rc.4",
37
+ "@tamagui/build": "2.0.0-rc.40",
41
38
  "react": ">=19"
42
39
  },
43
40
  "peerDependencies": {
@@ -4,8 +4,8 @@
4
4
  "sources": [
5
5
  "src/index.ts"
6
6
  ],
7
+ "version": 3,
7
8
  "sourcesContent": [
8
9
  "export * from './useDirection'\n"
9
- ],
10
- "version": 3
10
+ ]
11
11
  }
@@ -1,14 +1,11 @@
1
1
  {
2
- "mappings": "AAEA,YAAY,WAAW;KAElB,YAAY,QAAQ;UAGf,uBAAuB;CAC/B,WAAW,MAAM;CACjB,KAAK;;AAGP,OAAO,cAAMA,mBAAmB,MAAM,GAAG;AAKzC,OAAO,iBAAS,aAAa,WAAW,YAAY;AAKpD,OAAO,cAAMC,UAAU,MAAM,GAAG",
3
- "names": [
4
- "DirectionProvider: React.FC<DirectionProviderProps>",
5
- "Provider: React.FC<DirectionProviderProps>"
6
- ],
2
+ "mappings": "AAEA,YAAY,WAAW;KAElB,YAAY,QAAQ;UAGf,uBAAuB;CAC/B,WAAW,MAAM;CACjB,KAAK;;AAGP,OAAO,cAAM,mBAAmB,MAAM,GAAG;AAKzC,OAAO,iBAAS,aAAa,WAAW,YAAY;AAKpD,OAAO,cAAM,UAAU,MAAM,GAAG",
3
+ "names": [],
7
4
  "sources": [
8
5
  "src/useDirection.tsx"
9
6
  ],
7
+ "version": 3,
10
8
  "sourcesContent": [
11
9
  "// 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"
12
- ],
13
- "version": 3
10
+ ]
14
11
  }
package/dist/cjs/index.js DELETED
@@ -1,15 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var index_exports = {};
13
- module.exports = __toCommonJS(index_exports);
14
- __reExport(index_exports, require("./useDirection"), module.exports);
15
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,2BAAd;",
5
- "names": []
6
- }
@@ -1,40 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var useDirection_exports = {};
24
- __export(useDirection_exports, {
25
- DirectionProvider: () => DirectionProvider,
26
- Provider: () => Provider,
27
- useDirection: () => useDirection
28
- });
29
- module.exports = __toCommonJS(useDirection_exports);
30
- var React = __toESM(require("react"), 1), import_jsx_runtime = require("react/jsx-runtime");
31
- const DirectionContext = React.createContext(void 0), DirectionProvider = (props) => {
32
- const { dir, children } = props;
33
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectionContext.Provider, { value: dir, children });
34
- };
35
- function useDirection(localDir) {
36
- const globalDir = React.useContext(DirectionContext);
37
- return localDir || globalDir || "ltr";
38
- }
39
- const Provider = DirectionProvider;
40
- //# sourceMappingURL=useDirection.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useDirection.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB,8BAYd;AATT,MAAM,mBAAmB,MAAM,cAAqC,MAAS,GAOhE,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,4CAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAC1D;AAEO,SAAS,aAAa,UAAiC;AAC5D,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAA6C;",
5
- "names": []
6
- }
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- import { jsx } from "react/jsx-runtime";
3
- const DirectionContext = React.createContext(void 0), DirectionProvider = (props) => {
4
- const { dir, children } = props;
5
- return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });
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,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useDirection.tsx"],
4
- "mappings": "AAEA,YAAY,WAAW;AAYd;AATT,MAAM,mBAAmB,MAAM,cAAqC,MAAS,GAOhE,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAC1D;AAEO,SAAS,aAAa,UAAiC;AAC5D,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAA6C;",
5
- "names": []
6
- }