@radix-ui/react-direction 1.1.0-rc.7 → 1.1.1-rc.1

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/index.js CHANGED
@@ -28,15 +28,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // packages/react/direction/src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  DirectionProvider: () => DirectionProvider,
34
34
  Provider: () => Provider,
35
35
  useDirection: () => useDirection
36
36
  });
37
- module.exports = __toCommonJS(src_exports);
37
+ module.exports = __toCommonJS(index_exports);
38
38
 
39
- // packages/react/direction/src/Direction.tsx
39
+ // packages/react/direction/src/direction.tsx
40
40
  var React = __toESM(require("react"));
41
41
  var import_jsx_runtime = require("react/jsx-runtime");
42
42
  var DirectionContext = React.createContext(void 0);
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/index.ts", "../src/Direction.tsx"],
4
- "sourcesContent": ["export {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n} from './Direction';\n", "import * as React from 'react';\n\ntype Direction = 'ltr' | 'rtl';\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode;\n dir: Direction;\n}\nconst DirectionProvider: React.FC<DirectionProviderProps> = (props) => {\n const { dir, children } = props;\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || 'ltr';\n}\n\nconst Provider = DirectionProvider;\n\nexport {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n};\n"],
3
+ "sources": ["../src/index.ts", "../src/direction.tsx"],
4
+ "sourcesContent": ["export {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n} from './direction';\n", "import * as React from 'react';\n\ntype Direction = 'ltr' | 'rtl';\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode;\n dir: Direction;\n}\nconst DirectionProvider: React.FC<DirectionProviderProps> = (props) => {\n const { dir, children } = props;\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || 'ltr';\n}\n\nconst Provider = DirectionProvider;\n\nexport {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n};\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAed;AAZT,IAAM,mBAAyB,oBAAqC,MAAS;AAU7E,IAAM,oBAAsD,CAAC,UAAU;AACrE,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,4CAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAC1D;AAIA,SAAS,aAAa,UAAsB;AAC1C,QAAM,YAAkB,iBAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEA,IAAM,WAAW;",
6
6
  "names": []
7
7
  }
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // packages/react/direction/src/Direction.tsx
1
+ // packages/react/direction/src/direction.tsx
2
2
  import * as React from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  var DirectionContext = React.createContext(void 0);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/Direction.tsx"],
3
+ "sources": ["../src/direction.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\n\ntype Direction = 'ltr' | 'rtl';\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode;\n dir: Direction;\n}\nconst DirectionProvider: React.FC<DirectionProviderProps> = (props) => {\n const { dir, children } = props;\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || 'ltr';\n}\n\nconst Provider = DirectionProvider;\n\nexport {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n};\n"],
5
5
  "mappings": ";AAAA,YAAY,WAAW;AAed;AAZT,IAAM,mBAAyB,oBAAqC,MAAS;AAU7E,IAAM,oBAAsD,CAAC,UAAU;AACrE,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAC1D;AAIA,SAAS,aAAa,UAAsB;AAC1C,QAAM,YAAkB,iBAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEA,IAAM,WAAW;",
6
6
  "names": []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-direction",
3
- "version": "1.1.0-rc.7",
3
+ "version": "1.1.1-rc.1",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -24,9 +24,20 @@
24
24
  ],
25
25
  "sideEffects": false,
26
26
  "scripts": {
27
+ "lint": "eslint --max-warnings 0 src",
27
28
  "clean": "rm -rf dist",
28
29
  "version": "yarn version"
29
30
  },
31
+ "devDependencies": {
32
+ "@repo/eslint-config": "0.0.0",
33
+ "@repo/typescript-config": "0.0.0",
34
+ "@types/react": "^19.0.7",
35
+ "@types/react-dom": "^19.0.3",
36
+ "eslint": "^9.18.0",
37
+ "react": "^19.0.0",
38
+ "react-dom": "^19.0.0",
39
+ "typescript": "^5.7.3"
40
+ },
30
41
  "peerDependencies": {
31
42
  "@types/react": "*",
32
43
  "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
@@ -44,5 +55,5 @@
44
55
  "bugs": {
45
56
  "url": "https://github.com/radix-ui/primitives/issues"
46
57
  },
47
- "stableVersion": "1.0.1"
58
+ "stableVersion": "1.1.0"
48
59
  }