@tamagui/use-direction 1.135.4 → 1.135.6

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.
@@ -1,20 +1,21 @@
1
1
  "use strict";
2
+
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
7
  var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from == "object" || typeof from == "function")
8
- for (let key of __getOwnPropNames(from))
9
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- return to;
11
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
12
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
8
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
+ get: () => from[key],
10
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
+ });
12
+ return to;
13
+ },
14
+ __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
+ value: !0
17
+ }), mod);
13
18
  var index_exports = {};
14
19
  module.exports = __toCommonJS(index_exports);
15
- __reExport(index_exports, require("./useDirection"), module.exports);
16
- // Annotate the CommonJS export names for ESM import in node:
17
- 0 && (module.exports = {
18
- ...require("./useDirection")
19
- });
20
- //# sourceMappingURL=index.js.map
20
+ __reExport(index_exports, require("./useDirection.native.js"), module.exports);
21
+ //# sourceMappingURL=index.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,2BAAd;",
5
- "names": []
6
- }
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":[]}
@@ -36,7 +36,7 @@ __export(useDirection_exports, {
36
36
  useDirection: () => useDirection
37
37
  });
38
38
  module.exports = __toCommonJS(useDirection_exports);
39
- var React = __toESM(require("react")),
39
+ var React = __toESM(require("react"), 1),
40
40
  import_jsx_runtime = require("react/jsx-runtime");
41
41
  const DirectionContext = React.createContext(void 0),
42
42
  DirectionProvider = props => {
@@ -27,7 +27,7 @@ __export(useDirection_exports, {
27
27
  useDirection: () => useDirection
28
28
  });
29
29
  module.exports = __toCommonJS(useDirection_exports);
30
- var React = __toESM(require("react")), import_jsx_runtime = require("react/jsx-runtime");
30
+ var React = __toESM(require("react"), 1), import_jsx_runtime = require("react/jsx-runtime");
31
31
  const DirectionContext = React.createContext(void 0), DirectionProvider = (props) => {
32
32
  const { dir, children } = props;
33
33
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectionContext.Provider, { value: dir, children });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/useDirection.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB,2BAYd;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;",
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
5
  "names": []
6
6
  }
@@ -1,26 +1,36 @@
1
1
  "use strict";
2
+
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf,
8
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: !0 });
10
- }, __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from == "object" || typeof from == "function")
12
- for (let key of __getOwnPropNames(from))
13
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- return to;
15
- };
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, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ return to;
21
+ };
16
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
23
  // If the importer is in node compatibility mode or this is not an ESM
18
24
  // file that has been converted to a CommonJS file using a Babel-
19
25
  // compatible transform (i.e. "__esModule" has not been set), then set
20
26
  // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
- mod
23
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
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);
24
34
  var useDirection_exports = {};
25
35
  __export(useDirection_exports, {
26
36
  DirectionProvider: () => DirectionProvider,
@@ -28,22 +38,22 @@ __export(useDirection_exports, {
28
38
  useDirection: () => useDirection
29
39
  });
30
40
  module.exports = __toCommonJS(useDirection_exports);
31
- var import_jsx_runtime = require("react/jsx-runtime"), React = __toESM(require("react")), DirectionContext = /* @__PURE__ */ React.createContext(void 0), DirectionProvider = function(props) {
32
- var { dir, children } = props;
33
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectionContext.Provider, {
34
- value: dir,
35
- children
36
- });
37
- };
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
+ };
38
54
  function useDirection(localDir) {
39
55
  var globalDir = React.useContext(DirectionContext);
40
56
  return localDir || globalDir || "ltr";
41
57
  }
42
58
  var Provider = DirectionProvider;
43
- // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- DirectionProvider,
46
- Provider,
47
- useDirection
48
- });
49
- //# sourceMappingURL=useDirection.js.map
59
+ //# sourceMappingURL=useDirection.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useDirection.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,yBAA4B,8BAC5B,QAAuB,2BACnB,mBAAiC,sBAAM,cAAc,MAAS,GACvD,oBAAoB,SAAS,OAAO;AAC3C,MAAI,EAAE,KAAK,SAAS,IAAI;AACxB,SAAqB,uCAAAA,KAAK,iBAAiB,UAAU;AAAA,IACjD,OAAO;AAAA,IACP;AAAA,EACJ,CAAC;AACL;AACO,SAAS,aAAa,UAAU;AACnC,MAAI,YAAY,MAAM,WAAW,gBAAgB;AACjD,SAAO,YAAY,aAAa;AACpC;AACO,IAAI,WAAW;",
5
- "names": ["_jsx"]
6
- }
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":[]}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@tamagui/use-direction",
3
- "version": "1.135.4",
3
+ "version": "1.135.6",
4
+ "type": "module",
4
5
  "types": "./types/index.d.ts",
5
6
  "main": "dist/cjs",
6
7
  "module": "dist/esm",
@@ -31,7 +32,7 @@
31
32
  }
32
33
  },
33
34
  "devDependencies": {
34
- "@tamagui/build": "1.135.4",
35
+ "@tamagui/build": "1.135.6",
35
36
  "react": "*"
36
37
  },
37
38
  "publishConfig": {
@@ -1,4 +1,3 @@
1
- // forked from https://github.com/radix-ui/primitives/blob/main/packages/react/direction/src/Direction.tsx
2
1
  import * as React from "react";
3
2
  type Direction = "ltr" | "rtl";
4
3
  interface DirectionProviderProps {
@@ -1,8 +1,7 @@
1
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",
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
3
  "names": [
4
4
  "DirectionProvider: React.FC<DirectionProviderProps>",
5
- "localDir?: Direction",
6
5
  "Provider: React.FC<DirectionProviderProps>"
7
6
  ],
8
7
  "sources": [