@tamagui/use-direction 2.0.0-rc.3 → 2.0.0-rc.31
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/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -6
- package/package.json +5 -8
- package/types/index.d.ts.map +2 -2
- package/types/useDirection.d.ts.map +4 -7
- package/dist/cjs/index.js +0 -15
- package/dist/cjs/index.js.map +0 -6
- package/dist/cjs/useDirection.js +0 -40
- package/dist/cjs/useDirection.js.map +0 -6
- package/dist/esm/useDirection.js +0 -17
- package/dist/esm/useDirection.js.map +0 -6
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
|
package/dist/esm/index.js.map
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-direction",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.31",
|
|
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
|
-
|
|
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/
|
|
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.
|
|
37
|
+
"@tamagui/build": "2.0.0-rc.31",
|
|
41
38
|
"react": ">=19"
|
|
42
39
|
},
|
|
43
40
|
"peerDependencies": {
|
package/types/index.d.ts.map
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"mappings": "AAEA,YAAY,WAAW;KAElB,YAAY,QAAQ;UAGf,uBAAuB;CAC/B,WAAW,MAAM;CACjB,KAAK;;AAGP,OAAO,
|
|
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
|
package/dist/cjs/index.js.map
DELETED
package/dist/cjs/useDirection.js
DELETED
|
@@ -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
|
-
}
|
package/dist/esm/useDirection.js
DELETED
|
@@ -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
|
-
}
|