@tamagui/use-direction 1.0.1-beta.99 → 1.0.1-rc.0

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
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
4
  "sourcesContent": ["export * from './useDirection'\n"],
5
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,2BAAd;",
5
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,2BAAd;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -16,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
16
17
  }
17
18
  return to;
18
19
  };
19
- 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
+ ));
20
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
25
  var useDirection_exports = {};
22
26
  __export(useDirection_exports, {
@@ -25,13 +29,15 @@ __export(useDirection_exports, {
25
29
  useDirection: () => useDirection
26
30
  });
27
31
  module.exports = __toCommonJS(useDirection_exports);
32
+ var import_jsx_runtime = require("react/jsx-runtime");
28
33
  var React = __toESM(require("react"));
29
34
  const DirectionContext = React.createContext(void 0);
30
35
  const DirectionProvider = (props) => {
31
36
  const { dir, children } = props;
32
- return /* @__PURE__ */ React.createElement(DirectionContext.Provider, {
33
- value: dir
34
- }, children);
37
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectionContext.Provider, {
38
+ value: dir,
39
+ children
40
+ });
35
41
  };
36
42
  function useDirection(localDir) {
37
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
  }
package/dist/esm/index.js CHANGED
File without changes
@@ -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
  }
package/dist/jsx/index.js CHANGED
File without changes
@@ -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
  }
File without changes
@@ -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,10 +1,9 @@
1
1
  {
2
2
  "name": "@tamagui/use-direction",
3
- "version": "1.0.1-beta.99",
3
+ "version": "1.0.1-rc.0",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
7
- "module:jsx": "dist/jsx",
8
7
  "files": [
9
8
  "src",
10
9
  "types",
@@ -13,15 +12,17 @@
13
12
  "scripts": {
14
13
  "build": "tamagui-build",
15
14
  "watch": "tamagui-build --watch",
15
+ "lint": "eslint src",
16
+ "lint:fix": "yarn lint --fix",
16
17
  "clean": "tamagui-build clean",
17
18
  "clean:build": "tamagui-build clean:build"
18
19
  },
19
20
  "devDependencies": {
20
- "@tamagui/build": "^1.0.1-beta.99",
21
- "react": "*"
21
+ "@tamagui/build": "^1.0.1-rc.0",
22
+ "react": ">=18"
22
23
  },
23
24
  "peerDependencies": {
24
- "react": "*"
25
+ "react": ">=18"
25
26
  },
26
27
  "publishConfig": {
27
28
  "access": "public"
package/types/index.d.ts CHANGED
File without changes
File without changes
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDirection.d.ts","sourceRoot":"","sources":["../src/useDirection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,aAAK,SAAS,GAAG,KAAK,GAAG,KAAK,CAAA;AAG9B,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,GAAG,EAAE,SAAS,CAAA;CACf;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAG9D,CAAA;AAED,wBAAgB,YAAY,CAAC,QAAQ,CAAC,EAAE,SAAS,aAGhD;AAED,eAAO,MAAM,QAAQ,kCAAoB,CAAA"}