@tamagui/use-direction 1.0.1-beta.151 → 1.0.1-beta.154

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.
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var useDirection_exports = {};
23
26
  __export(useDirection_exports, {
@@ -26,13 +29,15 @@ __export(useDirection_exports, {
26
29
  useDirection: () => useDirection
27
30
  });
28
31
  module.exports = __toCommonJS(useDirection_exports);
32
+ var import_jsx_runtime = require("react/jsx-runtime");
29
33
  var React = __toESM(require("react"));
30
34
  const DirectionContext = React.createContext(void 0);
31
35
  const DirectionProvider = (props) => {
32
36
  const { dir, children } = props;
33
- return /* @__PURE__ */ React.createElement(DirectionContext.Provider, {
34
- value: dir
35
- }, children);
37
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectionContext.Provider, {
38
+ value: dir,
39
+ children
40
+ });
36
41
  };
37
42
  function useDirection(localDir) {
38
43
  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 <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>\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;AAEA,YAAuB;AAGvB,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,aAAa;AAC1B,SAAO,oCAAC,iBAAiB,UAAjB;AAAA,IAA0B,OAAO;AAAA,KAAM,QAAS;AAC1D;AAEO,sBAAsB,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcS;AAZT,YAAuB;AAGvB,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,4CAAC,iBAAiB,UAAjB;AAAA,IAA0B,OAAO;AAAA,IAAM;AAAA,GAAS;AAC1D;AAEO,SAAS,aAAa,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
4
  "sourcesContent": ["export * from './useDirection'\n"],
5
- "mappings": "AAAA;",
5
+ "mappings": "AAAA,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
1
2
  import * as React from "react";
2
3
  const DirectionContext = React.createContext(void 0);
3
4
  const DirectionProvider = (props) => {
4
5
  const { dir, children } = props;
5
- return /* @__PURE__ */ React.createElement(DirectionContext.Provider, {
6
- value: dir
7
- }, children);
6
+ return /* @__PURE__ */ jsx(DirectionContext.Provider, {
7
+ value: dir,
8
+ children
9
+ });
8
10
  };
9
11
  function useDirection(localDir) {
10
12
  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 <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>\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,SAAO,oCAAC,iBAAiB,UAAjB;AAAA,IAA0B,OAAO;AAAA,KAAM,QAAS;AAC1D;AAEO,sBAAsB,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
5
+ "mappings": "AAcS;AAZT,YAAY,WAAW;AAGvB,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,oBAAC,iBAAiB,UAAjB;AAAA,IAA0B,OAAO;AAAA,IAAM;AAAA,GAAS;AAC1D;AAEO,SAAS,aAAa,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
4
  "sourcesContent": ["export * from './useDirection'\n"],
5
- "mappings": "AAAA;",
5
+ "mappings": "AAAA,cAAc;",
6
6
  "names": []
7
7
  }
@@ -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 <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>\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,SAAO,CAAC,iBAAiB,SAAS,OAAO,MAAM,SAAS,EAAhD,iBAAiB;AAC3B;AAEO,sBAAsB,UAAsB;AACjD,QAAM,YAAY,MAAM,WAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEO,MAAM,WAAW;",
5
+ "mappings": "AAEA,YAAY,WAAW;AAGvB,MAAM,mBAAmB,MAAM,cAAqC,MAAS;AAOtE,MAAM,oBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,CAAC,iBAAiB,SAAS,OAAO,MAAM,SAAS,EAAhD,iBAAiB;AAC3B;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.0.1-beta.151",
3
+ "version": "1.0.1-beta.154",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -19,7 +19,7 @@
19
19
  "clean:build": "tamagui-build clean:build"
20
20
  },
21
21
  "devDependencies": {
22
- "@tamagui/build": "^1.0.1-beta.151",
22
+ "@tamagui/build": "^1.0.1-beta.154",
23
23
  "react": "*"
24
24
  },
25
25
  "peerDependencies": {