@tamagui/react-native-web 1.112.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/LICENSE +21 -0
- package/dist/cjs/Dimensions.js +79 -0
- package/dist/cjs/Dimensions.js.map +6 -0
- package/dist/cjs/Dimensions.native.js +87 -0
- package/dist/cjs/Dimensions.native.js.map +6 -0
- package/dist/cjs/index.js +50 -0
- package/dist/cjs/index.js.map +6 -0
- package/dist/cjs/index.native.js +85 -0
- package/dist/cjs/index.native.js.map +6 -0
- package/dist/esm/Dimensions.js +63 -0
- package/dist/esm/Dimensions.js.map +6 -0
- package/dist/esm/Dimensions.mjs +61 -0
- package/dist/esm/Dimensions.mjs.map +1 -0
- package/dist/esm/Dimensions.native.js +67 -0
- package/dist/esm/Dimensions.native.js.map +1 -0
- package/dist/esm/index.js +35 -0
- package/dist/esm/index.js.map +6 -0
- package/dist/esm/index.mjs +31 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +45 -0
- package/dist/esm/index.native.js.map +1 -0
- package/package.json +42 -0
- package/src/Dimensions.ts +117 -0
- package/src/index.tsx +59 -0
- package/types/Dimensions.d.ts +22 -0
- package/types/Dimensions.d.ts.map +1 -0
- package/types/index.d.ts +25 -0
- package/types/index.d.ts.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Nate Wienert
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var Dimensions_exports = {};
|
|
16
|
+
__export(Dimensions_exports, {
|
|
17
|
+
Dimensions: () => Dimensions
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(Dimensions_exports);
|
|
20
|
+
const dimensions = {
|
|
21
|
+
window: {
|
|
22
|
+
fontScale: 1,
|
|
23
|
+
height: 0,
|
|
24
|
+
scale: 1,
|
|
25
|
+
width: 0
|
|
26
|
+
},
|
|
27
|
+
screen: {
|
|
28
|
+
fontScale: 1,
|
|
29
|
+
height: 0,
|
|
30
|
+
scale: 1,
|
|
31
|
+
width: 0
|
|
32
|
+
}
|
|
33
|
+
}, listeners = {}, canUseDOM = typeof window < "u";
|
|
34
|
+
let shouldInit = canUseDOM;
|
|
35
|
+
function update() {
|
|
36
|
+
if (!canUseDOM)
|
|
37
|
+
return;
|
|
38
|
+
const win = window, docEl = win.document.documentElement;
|
|
39
|
+
dimensions.window = {
|
|
40
|
+
fontScale: 1,
|
|
41
|
+
height: docEl.clientHeight,
|
|
42
|
+
scale: win.devicePixelRatio || 1,
|
|
43
|
+
width: docEl.clientWidth
|
|
44
|
+
}, dimensions.screen = {
|
|
45
|
+
fontScale: 1,
|
|
46
|
+
height: win.screen.height,
|
|
47
|
+
scale: win.devicePixelRatio || 1,
|
|
48
|
+
width: win.screen.width
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function handleResize() {
|
|
52
|
+
update(), Array.isArray(listeners.change) && listeners.change.forEach((handler) => handler(dimensions));
|
|
53
|
+
}
|
|
54
|
+
const Dimensions = {
|
|
55
|
+
get(dimension) {
|
|
56
|
+
if (shouldInit && (shouldInit = !1, update()), dimensions[dimension] === void 0)
|
|
57
|
+
throw new Error(`No dimension set for key ${dimension}`);
|
|
58
|
+
return dimensions[dimension];
|
|
59
|
+
},
|
|
60
|
+
set(initialDimensions) {
|
|
61
|
+
if (initialDimensions) {
|
|
62
|
+
if (canUseDOM)
|
|
63
|
+
throw new Error("Dimensions cannot be set in the browser");
|
|
64
|
+
initialDimensions.screen != null && (dimensions.screen = initialDimensions.screen), initialDimensions.window != null && (dimensions.window = initialDimensions.window);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
addEventListener(type, handler) {
|
|
68
|
+
return listeners[type] = listeners[type] || [], listeners[type].push(handler), {
|
|
69
|
+
remove: () => {
|
|
70
|
+
this.removeEventListener(type, handler);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
removeEventListener(type, handler) {
|
|
75
|
+
Array.isArray(listeners[type]) && (listeners[type] = listeners[type].filter((_handler) => _handler !== handler));
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
canUseDOM && window.addEventListener("resize", handleResize, !1);
|
|
79
|
+
//# sourceMappingURL=Dimensions.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Dimensions.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA,MAAM,aAAa;AAAA,EACjB,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF,GAEM,YAAY,CAAC,GAEb,YAAY,OAAO,SAAW;AACpC,IAAI,aAAa;AAEjB,SAAS,SAAS;AAChB,MAAI,CAAC;AACH;AAGF,QAAM,MAAM,QACN,QAAQ,IAAI,SAAS;AAE3B,aAAW,SAAS;AAAA,IAClB,WAAW;AAAA,IACX,QAAQ,MAAM;AAAA,IACd,OAAO,IAAI,oBAAoB;AAAA,IAC/B,OAAO,MAAM;AAAA,EACf,GAEA,WAAW,SAAS;AAAA,IAClB,WAAW;AAAA,IACX,QAAQ,IAAI,OAAO;AAAA,IACnB,OAAO,IAAI,oBAAoB;AAAA,IAC/B,OAAO,IAAI,OAAO;AAAA,EACpB;AACF;AAEA,SAAS,eAAe;AACtB,SAAO,GACH,MAAM,QAAQ,UAAU,MAAS,KACnC,UAAU,OAAU,QAAQ,CAAC,YAAY,QAAQ,UAAU,CAAC;AAEhE;AAEO,MAAM,aAAa;AAAA,EACxB,IAAI,WAAyC;AAK3C,QAJI,eACF,aAAa,IACb,OAAO,IAEL,WAAW,SAAS,MAAM;AAC5B,YAAM,IAAI,MAAM,4BAA4B,SAAS,EAAE;AACzD,WAAO,WAAW,SAAS;AAAA,EAC7B;AAAA,EAEA,IAAI,mBAAiD;AACnD,QAAI,mBAAmB;AACrB,UAAI;AACF,cAAM,IAAI,MAAM,yCAAyC;AAE3D,MAAI,kBAAkB,UAAU,SAC9B,WAAW,SAAS,kBAAkB,SAEpC,kBAAkB,UAAU,SAC9B,WAAW,SAAS,kBAAkB;AAAA,IAE1C;AAAA,EACF;AAAA,EAEA,iBACE,MACA,SACA;AACA,qBAAU,IAAI,IAAI,UAAU,IAAI,KAAK,CAAC,GACtC,UAAU,IAAI,EAAE,KAAK,OAAO,GAErB;AAAA,MACL,QAAQ,MAAM;AACZ,aAAK,oBAAoB,MAAM,OAAO;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AAAA,EAEA,oBACE,MACA,SACM;AACN,IAAI,MAAM,QAAQ,UAAU,IAAI,CAAC,MAC/B,UAAU,IAAI,IAAI,UAAU,IAAI,EAAE,OAAO,CAAC,aAAa,aAAa,OAAO;AAAA,EAE/E;AACF;AAEI,aACF,OAAO,iBAAiB,UAAU,cAAc,EAAK;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var Dimensions_exports = {};
|
|
17
|
+
__export(Dimensions_exports, {
|
|
18
|
+
Dimensions: () => Dimensions
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(Dimensions_exports);
|
|
21
|
+
var dimensions = {
|
|
22
|
+
window: {
|
|
23
|
+
fontScale: 1,
|
|
24
|
+
height: 0,
|
|
25
|
+
scale: 1,
|
|
26
|
+
width: 0
|
|
27
|
+
},
|
|
28
|
+
screen: {
|
|
29
|
+
fontScale: 1,
|
|
30
|
+
height: 0,
|
|
31
|
+
scale: 1,
|
|
32
|
+
width: 0
|
|
33
|
+
}
|
|
34
|
+
}, listeners = {}, canUseDOM = typeof window < "u", shouldInit = canUseDOM;
|
|
35
|
+
function update() {
|
|
36
|
+
if (canUseDOM) {
|
|
37
|
+
var win = window, docEl = win.document.documentElement;
|
|
38
|
+
dimensions.window = {
|
|
39
|
+
fontScale: 1,
|
|
40
|
+
height: docEl.clientHeight,
|
|
41
|
+
scale: win.devicePixelRatio || 1,
|
|
42
|
+
width: docEl.clientWidth
|
|
43
|
+
}, dimensions.screen = {
|
|
44
|
+
fontScale: 1,
|
|
45
|
+
height: win.screen.height,
|
|
46
|
+
scale: win.devicePixelRatio || 1,
|
|
47
|
+
width: win.screen.width
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function handleResize() {
|
|
52
|
+
update(), Array.isArray(listeners.change) && listeners.change.forEach(function(handler) {
|
|
53
|
+
return handler(dimensions);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
var Dimensions = {
|
|
57
|
+
get(dimension) {
|
|
58
|
+
if (shouldInit && (shouldInit = !1, update()), dimensions[dimension] === void 0) throw new Error(`No dimension set for key ${dimension}`);
|
|
59
|
+
return dimensions[dimension];
|
|
60
|
+
},
|
|
61
|
+
set(initialDimensions) {
|
|
62
|
+
if (initialDimensions) {
|
|
63
|
+
if (canUseDOM)
|
|
64
|
+
throw new Error("Dimensions cannot be set in the browser");
|
|
65
|
+
initialDimensions.screen != null && (dimensions.screen = initialDimensions.screen), initialDimensions.window != null && (dimensions.window = initialDimensions.window);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
addEventListener(type, handler) {
|
|
69
|
+
var _this = this;
|
|
70
|
+
return listeners[type] = listeners[type] || [], listeners[type].push(handler), {
|
|
71
|
+
remove: function() {
|
|
72
|
+
_this.removeEventListener(type, handler);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
removeEventListener(type, handler) {
|
|
77
|
+
Array.isArray(listeners[type]) && (listeners[type] = listeners[type].filter(function(_handler) {
|
|
78
|
+
return _handler !== handler;
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
canUseDOM && window.addEventListener("resize", handleResize, !1);
|
|
83
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
84
|
+
0 && (module.exports = {
|
|
85
|
+
Dimensions
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=Dimensions.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/react-native-web/src/Dimensions.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAeA;;;;;IAAMA,aAAa;EACjBC,QAAQ;IACNC,WAAW;IACXC,QAAQ;IACRC,OAAO;IACPC,OAAO;EACT;EACAC,QAAQ;IACNJ,WAAW;IACXC,QAAQ;IACRC,OAAO;IACP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C,QAAQb,UAAUwB,IAAAA,CAAK,MAC/BxB,UAAUwB,IAAAA,IAAQxB,UAAUwB,IAAAA,EAAMI,OAAO,SAACC,UAAAA;aAAaA,aAAad;;EAExE;AACF;AAEId,aACFP,OAAO6B,iBAAiB,UAAUZ,cAAc,EAAA;",
|
|
5
|
+
"names": ["dimensions", "window", "fontScale", "height", "scale", "width", "screen", "listeners", "canUseDOM", "shouldInit", "update", "win", "docEl", "document", "documentElement", "clientHeight", "devicePixelRatio", "clientWidth", "handleResize", "Array", "isArray", "forEach", "handler", "Dimensions", "get", "dimension", "undefined", "Error", "set", "initialDimensions", "addEventListener", "type", "push", "remove", "removeEventListener", "filter", "_handler"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var src_exports = {};
|
|
16
|
+
__export(src_exports, {
|
|
17
|
+
ActivityIndicator: () => ActivityIndicator,
|
|
18
|
+
Animated: () => Animated,
|
|
19
|
+
Image: () => Image,
|
|
20
|
+
Keyboard: () => Keyboard,
|
|
21
|
+
Linking: () => Linking,
|
|
22
|
+
PanResponder: () => PanResponder,
|
|
23
|
+
Platform: () => Platform,
|
|
24
|
+
Pressable: () => Pressable,
|
|
25
|
+
ScrollView: () => ScrollView,
|
|
26
|
+
StyleSheet: () => StyleSheet,
|
|
27
|
+
Switch: () => Switch,
|
|
28
|
+
Text: () => import_web.Text,
|
|
29
|
+
TextInput: () => TextInput,
|
|
30
|
+
View: () => import_web.View
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(src_exports);
|
|
33
|
+
__reExport(src_exports, require("@tamagui/react-native-use-responder-events"), module.exports);
|
|
34
|
+
__reExport(src_exports, require("@tamagui/react-native-use-pressable"), module.exports);
|
|
35
|
+
var import_web = require("@tamagui/web"), import_web2 = require("@tamagui/web");
|
|
36
|
+
__reExport(src_exports, require("./Dimensions"), module.exports);
|
|
37
|
+
const Platform = {
|
|
38
|
+
OS: "web",
|
|
39
|
+
select(obj) {
|
|
40
|
+
return obj.web;
|
|
41
|
+
}
|
|
42
|
+
}, StyleSheet = {
|
|
43
|
+
create(obj) {
|
|
44
|
+
return obj;
|
|
45
|
+
}
|
|
46
|
+
}, Pressable = () => null, Animated = {
|
|
47
|
+
View: import_web2.View,
|
|
48
|
+
Text: import_web2.Text
|
|
49
|
+
}, ActivityIndicator = () => null, PanResponder = () => null, Switch = () => null, TextInput = () => null, ScrollView = () => null, Keyboard = {}, Image = () => null, Linking = {};
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,wBAAc,uDAFd;AAGA,wBAAc,gDAHd;AAIA,iBAA2B,yBAC3BA,cAA2B;AAE3B,wBAAc,yBAPd;AASO,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EAEJ,OAAO,KAAK;AACV,WAAO,IAAI;AAAA,EACb;AACF,GAEa,aAAa;AAAA,EACxB,OAAO,KAAK;AACV,WAAO;AAAA,EACT;AACF,GAEa,YAAY,MAChB,MAGI,WAAW;AAAA,EACtB;AAAA,EACA;AACF,GAEa,oBAAoB,MACxB,MAGI,eAAe,MACnB,MAGI,SAAS,MACb,MAGI,YAAY,MAChB,MAGI,aAAa,MACjB,MAGI,WAAW,CAAC,GAEZ,QAAQ,MACZ,MAGI,UAAU,CAAC;",
|
|
5
|
+
"names": ["import_web"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __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
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
__export(src_exports, {
|
|
18
|
+
ActivityIndicator: () => ActivityIndicator,
|
|
19
|
+
Animated: () => Animated,
|
|
20
|
+
Image: () => Image,
|
|
21
|
+
Keyboard: () => Keyboard,
|
|
22
|
+
Linking: () => Linking,
|
|
23
|
+
PanResponder: () => PanResponder,
|
|
24
|
+
Platform: () => Platform,
|
|
25
|
+
Pressable: () => Pressable,
|
|
26
|
+
ScrollView: () => ScrollView,
|
|
27
|
+
StyleSheet: () => StyleSheet,
|
|
28
|
+
Switch: () => Switch,
|
|
29
|
+
Text: () => import_web.Text,
|
|
30
|
+
TextInput: () => TextInput,
|
|
31
|
+
View: () => import_web.View
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
|
34
|
+
__reExport(src_exports, require("@tamagui/react-native-use-responder-events"), module.exports);
|
|
35
|
+
__reExport(src_exports, require("@tamagui/react-native-use-pressable"), module.exports);
|
|
36
|
+
var import_web = require("@tamagui/web"), import_web2 = require("@tamagui/web");
|
|
37
|
+
__reExport(src_exports, require("./Dimensions"), module.exports);
|
|
38
|
+
var Platform = {
|
|
39
|
+
OS: "web",
|
|
40
|
+
select(obj) {
|
|
41
|
+
return obj.web;
|
|
42
|
+
}
|
|
43
|
+
}, StyleSheet = {
|
|
44
|
+
create(obj) {
|
|
45
|
+
return obj;
|
|
46
|
+
}
|
|
47
|
+
}, Pressable = function() {
|
|
48
|
+
return null;
|
|
49
|
+
}, Animated = {
|
|
50
|
+
View: import_web2.View,
|
|
51
|
+
Text: import_web2.Text
|
|
52
|
+
}, ActivityIndicator = function() {
|
|
53
|
+
return null;
|
|
54
|
+
}, PanResponder = function() {
|
|
55
|
+
return null;
|
|
56
|
+
}, Switch = function() {
|
|
57
|
+
return null;
|
|
58
|
+
}, TextInput = function() {
|
|
59
|
+
return null;
|
|
60
|
+
}, ScrollView = function() {
|
|
61
|
+
return null;
|
|
62
|
+
}, Keyboard = {}, Image = function() {
|
|
63
|
+
return null;
|
|
64
|
+
}, Linking = {};
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
ActivityIndicator,
|
|
68
|
+
Animated,
|
|
69
|
+
Image,
|
|
70
|
+
Keyboard,
|
|
71
|
+
Linking,
|
|
72
|
+
PanResponder,
|
|
73
|
+
Platform,
|
|
74
|
+
Pressable,
|
|
75
|
+
ScrollView,
|
|
76
|
+
StyleSheet,
|
|
77
|
+
Switch,
|
|
78
|
+
Text,
|
|
79
|
+
TextInput,
|
|
80
|
+
View,
|
|
81
|
+
...require("@tamagui/react-native-use-responder-events"),
|
|
82
|
+
...require("@tamagui/react-native-use-pressable"),
|
|
83
|
+
...require("./Dimensions")
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/react-native-web/src/index.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;AAEA,wBAAc,uDAFd;AAGA,wBAAc,gDAHd;AAIA,iBAA2B,yBAC3BA,cAA2B;AAE3B,wBAAc,yBAPd;AASO,IAAMC,WAAW;EACtBC,IAAI;EAEJC,OAAOC,KAAG;AACR,WAAOA,IAAIC;EACb;AACF,GAEaC,aAAa;EACxBC,OAAOH,KAAG;AACR,WAAOA;EACT;AACF,GAEaI,YAAY,WAAA;AACvB,SAAO;AACT,GAEaC,WAAW;EACtBC;EACAC;AACF,GAEaC,oBAAoB,WAAA;AAC/B,SAAO;AACT,GAEaC,eAAe,WAAA;AAC1B,SAAO;AACT,GAEaC,SAAS,WAAA;AACpB,SAAO;AACT,GAEaC,YAAY,WAAA;AACvB,SAAO;AACT,GAEaC,aAAa,WAAA;AACxB,SAAO;AACT,GAEaC,WAAW,CAAC,GAEZC,QAAQ,WAAA;AACnB,SAAO;AACT,GAEaC,UAAU,CAAC;",
|
|
5
|
+
"names": ["import_web", "Platform", "OS", "select", "obj", "web", "StyleSheet", "create", "Pressable", "Animated", "View", "Text", "ActivityIndicator", "PanResponder", "Switch", "TextInput", "ScrollView", "Keyboard", "Image", "Linking"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const dimensions = {
|
|
2
|
+
window: {
|
|
3
|
+
fontScale: 1,
|
|
4
|
+
height: 0,
|
|
5
|
+
scale: 1,
|
|
6
|
+
width: 0
|
|
7
|
+
},
|
|
8
|
+
screen: {
|
|
9
|
+
fontScale: 1,
|
|
10
|
+
height: 0,
|
|
11
|
+
scale: 1,
|
|
12
|
+
width: 0
|
|
13
|
+
}
|
|
14
|
+
}, listeners = {}, canUseDOM = typeof window < "u";
|
|
15
|
+
let shouldInit = canUseDOM;
|
|
16
|
+
function update() {
|
|
17
|
+
if (!canUseDOM)
|
|
18
|
+
return;
|
|
19
|
+
const win = window, docEl = win.document.documentElement;
|
|
20
|
+
dimensions.window = {
|
|
21
|
+
fontScale: 1,
|
|
22
|
+
height: docEl.clientHeight,
|
|
23
|
+
scale: win.devicePixelRatio || 1,
|
|
24
|
+
width: docEl.clientWidth
|
|
25
|
+
}, dimensions.screen = {
|
|
26
|
+
fontScale: 1,
|
|
27
|
+
height: win.screen.height,
|
|
28
|
+
scale: win.devicePixelRatio || 1,
|
|
29
|
+
width: win.screen.width
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function handleResize() {
|
|
33
|
+
update(), Array.isArray(listeners.change) && listeners.change.forEach((handler) => handler(dimensions));
|
|
34
|
+
}
|
|
35
|
+
const Dimensions = {
|
|
36
|
+
get(dimension) {
|
|
37
|
+
if (shouldInit && (shouldInit = !1, update()), dimensions[dimension] === void 0)
|
|
38
|
+
throw new Error(`No dimension set for key ${dimension}`);
|
|
39
|
+
return dimensions[dimension];
|
|
40
|
+
},
|
|
41
|
+
set(initialDimensions) {
|
|
42
|
+
if (initialDimensions) {
|
|
43
|
+
if (canUseDOM)
|
|
44
|
+
throw new Error("Dimensions cannot be set in the browser");
|
|
45
|
+
initialDimensions.screen != null && (dimensions.screen = initialDimensions.screen), initialDimensions.window != null && (dimensions.window = initialDimensions.window);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
addEventListener(type, handler) {
|
|
49
|
+
return listeners[type] = listeners[type] || [], listeners[type].push(handler), {
|
|
50
|
+
remove: () => {
|
|
51
|
+
this.removeEventListener(type, handler);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
removeEventListener(type, handler) {
|
|
56
|
+
Array.isArray(listeners[type]) && (listeners[type] = listeners[type].filter((_handler) => _handler !== handler));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
canUseDOM && window.addEventListener("resize", handleResize, !1);
|
|
60
|
+
export {
|
|
61
|
+
Dimensions
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=Dimensions.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Dimensions.ts"],
|
|
4
|
+
"mappings": "AAeA,MAAM,aAAa;AAAA,EACjB,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF,GAEM,YAAY,CAAC,GAEb,YAAY,OAAO,SAAW;AACpC,IAAI,aAAa;AAEjB,SAAS,SAAS;AAChB,MAAI,CAAC;AACH;AAGF,QAAM,MAAM,QACN,QAAQ,IAAI,SAAS;AAE3B,aAAW,SAAS;AAAA,IAClB,WAAW;AAAA,IACX,QAAQ,MAAM;AAAA,IACd,OAAO,IAAI,oBAAoB;AAAA,IAC/B,OAAO,MAAM;AAAA,EACf,GAEA,WAAW,SAAS;AAAA,IAClB,WAAW;AAAA,IACX,QAAQ,IAAI,OAAO;AAAA,IACnB,OAAO,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ale: 1,
|
|
10
|
+
height: 0,
|
|
11
|
+
scale: 1,
|
|
12
|
+
width: 0
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
listeners = {},
|
|
16
|
+
canUseDOM = typeof window < "u";
|
|
17
|
+
let shouldInit = canUseDOM;
|
|
18
|
+
function update() {
|
|
19
|
+
if (!canUseDOM) return;
|
|
20
|
+
const win = window,
|
|
21
|
+
docEl = win.document.documentElement;
|
|
22
|
+
dimensions.window = {
|
|
23
|
+
fontScale: 1,
|
|
24
|
+
height: docEl.clientHeight,
|
|
25
|
+
scale: win.devicePixelRatio || 1,
|
|
26
|
+
width: docEl.clientWidth
|
|
27
|
+
}, dimensions.screen = {
|
|
28
|
+
fontScale: 1,
|
|
29
|
+
height: win.screen.height,
|
|
30
|
+
scale: win.devicePixelRatio || 1,
|
|
31
|
+
width: win.screen.width
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function handleResize() {
|
|
35
|
+
update(), Array.isArray(listeners.change) && listeners.change.forEach(handler => handler(dimensions));
|
|
36
|
+
}
|
|
37
|
+
const Dimensions = {
|
|
38
|
+
get(dimension) {
|
|
39
|
+
if (shouldInit && (shouldInit = !1, update()), dimensions[dimension] === void 0) throw new Error(`No dimension set for key ${dimension}`);
|
|
40
|
+
return dimensions[dimension];
|
|
41
|
+
},
|
|
42
|
+
set(initialDimensions) {
|
|
43
|
+
if (initialDimensions) {
|
|
44
|
+
if (canUseDOM) throw new Error("Dimensions cannot be set in the browser");
|
|
45
|
+
initialDimensions.screen != null && (dimensions.screen = initialDimensions.screen), initialDimensions.window != null && (dimensions.window = initialDimensions.window);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
addEventListener(type, handler) {
|
|
49
|
+
return listeners[type] = listeners[type] || [], listeners[type].push(handler), {
|
|
50
|
+
remove: () => {
|
|
51
|
+
this.removeEventListener(type, handler);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
removeEventListener(type, handler) {
|
|
56
|
+
Array.isArray(listeners[type]) && (listeners[type] = listeners[type].filter(_handler => _handler !== handler));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
canUseDOM && window.addEventListener("resize", handleResize, !1);
|
|
60
|
+
export { Dimensions };
|
|
61
|
+
//# sourceMappingURL=Dimensions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dimensions","window","fontScale","height","scale","width","screen","listeners","canUseDOM","shouldInit","update","win","docEl","document","documentElement","clientHeight","devicePixelRatio","clientWidth","handleResize","Array","isArray","change","forEach","handler","Dimensions","get","dimension","Error","set","initialDimensions","addEventListener","type","push","remove","removeEventListener","filter","_handler"],"sources":["../../src/Dimensions.ts"],"sourcesContent":[null],"mappings":"AAeA,MAAMA,UAAA,GAAa;IACjBC,MAAA,EAAQ;MACNC,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,KAAA,EAAO;MACPC,KAAA,EAAO;IACT;IACAC,MAAA,EAAQ;MACNJ,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,KAAA,EAAO;MACPC,KAAA,EAAO;IACT;EACF;EAEME,SAAA,GAAY,CAAC;EAEbC,SAAA,GAAY,OAAOP,MAAA,GAAW;AACpC,IAAIQ,UAAA,GAAaD,SAAA;AAEjB,SAASE,OAAA,EAAS;EAChB,IAAI,CAACF,SAAA,EACH;EAGF,MAAMG,GAAA,GAAMV,MAAA;IACNW,KAAA,GAAQD,GAAA,CAAIE,QAAA,CAASC,eAAA;EAE3Bd,UAAA,CAAWC,MAAA,GAAS;IAClBC,SAAA,EAAW;IACXC,MAAA,EAAQS,KAAA,CAAMG,YAAA;IACdX,KAAA,EAAOO,GAAA,CAAIK,gBAAA,IAAoB;IAC/BX,KAAA,EAAOO,KAAA,CAAMK;EACf,GAEAjB,UAAA,CAAWM,MAAA,GAAS;IAClBJ,SAAA,EAAW;IACXC,MAAA,EAAQQ,GAAA,CAAIL,MAAA,CAAOH,MAAA;IACnBC,KAA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wB,IAAI,IAAIxB,SAAA,CAAUwB,IAAI,EAAEI,MAAA,CAAQC,QAAA,IAAaA,QAAA,KAAab,OAAO;EAE/E;AACF;AAEIf,SAAA,IACFP,MAAA,CAAO6B,gBAAA,CAAiB,UAAUZ,YAAA,EAAc,EAAK","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var dimensions = {
|
|
2
|
+
window: {
|
|
3
|
+
fontScale: 1,
|
|
4
|
+
height: 0,
|
|
5
|
+
scale: 1,
|
|
6
|
+
width: 0
|
|
7
|
+
},
|
|
8
|
+
screen: {
|
|
9
|
+
fontScale: 1,
|
|
10
|
+
height: 0,
|
|
11
|
+
scale: 1,
|
|
12
|
+
width: 0
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
listeners = {},
|
|
16
|
+
canUseDOM = typeof window < "u",
|
|
17
|
+
shouldInit = canUseDOM;
|
|
18
|
+
function update() {
|
|
19
|
+
if (canUseDOM) {
|
|
20
|
+
var win = window,
|
|
21
|
+
docEl = win.document.documentElement;
|
|
22
|
+
dimensions.window = {
|
|
23
|
+
fontScale: 1,
|
|
24
|
+
height: docEl.clientHeight,
|
|
25
|
+
scale: win.devicePixelRatio || 1,
|
|
26
|
+
width: docEl.clientWidth
|
|
27
|
+
}, dimensions.screen = {
|
|
28
|
+
fontScale: 1,
|
|
29
|
+
height: win.screen.height,
|
|
30
|
+
scale: win.devicePixelRatio || 1,
|
|
31
|
+
width: win.screen.width
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function handleResize() {
|
|
36
|
+
update(), Array.isArray(listeners.change) && listeners.change.forEach(function (handler) {
|
|
37
|
+
return handler(dimensions);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
var Dimensions = {
|
|
41
|
+
get(dimension) {
|
|
42
|
+
if (shouldInit && (shouldInit = !1, update()), dimensions[dimension] === void 0) throw new Error(`No dimension set for key ${dimension}`);
|
|
43
|
+
return dimensions[dimension];
|
|
44
|
+
},
|
|
45
|
+
set(initialDimensions) {
|
|
46
|
+
if (initialDimensions) {
|
|
47
|
+
if (canUseDOM) throw new Error("Dimensions cannot be set in the browser");
|
|
48
|
+
initialDimensions.screen != null && (dimensions.screen = initialDimensions.screen), initialDimensions.window != null && (dimensions.window = initialDimensions.window);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
addEventListener(type, handler) {
|
|
52
|
+
var _this = this;
|
|
53
|
+
return listeners[type] = listeners[type] || [], listeners[type].push(handler), {
|
|
54
|
+
remove: function () {
|
|
55
|
+
_this.removeEventListener(type, handler);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
removeEventListener(type, handler) {
|
|
60
|
+
Array.isArray(listeners[type]) && (listeners[type] = listeners[type].filter(function (_handler) {
|
|
61
|
+
return _handler !== handler;
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
canUseDOM && window.addEventListener("resize", handleResize, !1);
|
|
66
|
+
export { Dimensions };
|
|
67
|
+
//# sourceMappingURL=Dimensions.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dimensions","window","fontScale","height","scale","width","screen","listeners","canUseDOM","shouldInit","update","win","docEl","document","documentElement","clientHeight","devicePixelRatio","clientWidth","handleResize","Array","isArray","change","forEach","handler","Dimensions","get","dimension","Error","set","initialDimensions","addEventListener","type","_this","push","remove","removeEventListener","filter","_handler"],"sources":["../../src/Dimensions.ts"],"sourcesContent":[null],"mappings":"AAeA,IAAAA,UAAM;IACJC,MAAA,EAAQ;MACNC,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,KAAA,EAAO;MACPC,KAAA,EAAO;IACT;IACAC,MAAA,EAAQ;MACNJ,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,KAAA,EAAO;MACPC,KAAA,EAAO;IACT;EACF;EAEME,SAAA,GAAY,CAAC;EAEbC,SAAA,GAAY,OAAOP,MA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;EACF;EAEA6B,iBACEC,IAAA,EACAR,OAAA,EACA;IACA,IAAAS,KAAA;IAGO,OACLzB,SAAc,CAAAwB,IAAA,IAAAxB,SAAA,CAAAwB,IAAA,SAAAxB,SAAA,CAAAwB,IAAA,EAAAE,IAAA,CAAAV,OAAA;MACZW,MAAA,EAAK,SAAAA,CAAA;QACPF,KAAA,CAAAG,mBAAA,CAAAJ,IAAA,EAAAR,OAAA;MACF;IACF;EAEA;EAIEY,mBAAkBA,CAAAJ,IAAA,EAAUR,OAAK;IAGnCJ,KAAA,CAAAC,OAAA,CAAAb,SAAA,CAAAwB,IAAA,OAAAxB,SAAA,CAAAwB,IAAA,IAAAxB,SAAA,CAAAwB,IAAA,EAAAK,MAAA,WAAAC,QAAA;MACF,OAAAA,QAAA,KAAAd,OAAA;IAEI","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export * from "@tamagui/react-native-use-responder-events";
|
|
2
|
+
export * from "@tamagui/react-native-use-pressable";
|
|
3
|
+
import { View, Text } from "@tamagui/web";
|
|
4
|
+
import { View as View2, Text as Text2 } from "@tamagui/web";
|
|
5
|
+
export * from "./Dimensions";
|
|
6
|
+
const Platform = {
|
|
7
|
+
OS: "web",
|
|
8
|
+
select(obj) {
|
|
9
|
+
return obj.web;
|
|
10
|
+
}
|
|
11
|
+
}, StyleSheet = {
|
|
12
|
+
create(obj) {
|
|
13
|
+
return obj;
|
|
14
|
+
}
|
|
15
|
+
}, Pressable = () => null, Animated = {
|
|
16
|
+
View: View2,
|
|
17
|
+
Text: Text2
|
|
18
|
+
}, ActivityIndicator = () => null, PanResponder = () => null, Switch = () => null, TextInput = () => null, ScrollView = () => null, Keyboard = {}, Image = () => null, Linking = {};
|
|
19
|
+
export {
|
|
20
|
+
ActivityIndicator,
|
|
21
|
+
Animated,
|
|
22
|
+
Image,
|
|
23
|
+
Keyboard,
|
|
24
|
+
Linking,
|
|
25
|
+
PanResponder,
|
|
26
|
+
Platform,
|
|
27
|
+
Pressable,
|
|
28
|
+
ScrollView,
|
|
29
|
+
StyleSheet,
|
|
30
|
+
Switch,
|
|
31
|
+
Text,
|
|
32
|
+
TextInput,
|
|
33
|
+
View
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx"],
|
|
4
|
+
"mappings": "AAEA,cAAc;AACd,cAAc;AACd,SAAS,MAAM,YAAY;AAC3B,SAAS,QAAAA,OAAM,QAAAC,aAAY;AAE3B,cAAc;AAEP,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EAEJ,OAAO,KAAK;AACV,WAAO,IAAI;AAAA,EACb;AACF,GAEa,aAAa;AAAA,EACxB,OAAO,KAAK;AACV,WAAO;AAAA,EACT;AACF,GAEa,YAAY,MAChB,MAGI,WAAW;AAAA,EACtB,MAAAD;AAAA,EACA,MAAAC;AACF,GAEa,oBAAoB,MACxB,MAGI,eAAe,MACnB,MAGI,SAAS,MACb,MAGI,YAAY,MAChB,MAGI,aAAa,MACjB,MAGI,WAAW,CAAC,GAEZ,QAAQ,MACZ,MAGI,UAAU,CAAC;",
|
|
5
|
+
"names": ["View", "Text"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from "@tamagui/react-native-use-responder-events";
|
|
2
|
+
export * from "@tamagui/react-native-use-pressable";
|
|
3
|
+
import { View, Text } from "@tamagui/web";
|
|
4
|
+
import { View as View2, Text as Text2 } from "@tamagui/web";
|
|
5
|
+
export * from "./Dimensions.mjs";
|
|
6
|
+
const Platform = {
|
|
7
|
+
OS: "web",
|
|
8
|
+
select(obj) {
|
|
9
|
+
return obj.web;
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
StyleSheet = {
|
|
13
|
+
create(obj) {
|
|
14
|
+
return obj;
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
Pressable = () => null,
|
|
18
|
+
Animated = {
|
|
19
|
+
View: View2,
|
|
20
|
+
Text: Text2
|
|
21
|
+
},
|
|
22
|
+
ActivityIndicator = () => null,
|
|
23
|
+
PanResponder = () => null,
|
|
24
|
+
Switch = () => null,
|
|
25
|
+
TextInput = () => null,
|
|
26
|
+
ScrollView = () => null,
|
|
27
|
+
Keyboard = {},
|
|
28
|
+
Image = () => null,
|
|
29
|
+
Linking = {};
|
|
30
|
+
export { ActivityIndicator, Animated, Image, Keyboard, Linking, PanResponder, Platform, Pressable, ScrollView, StyleSheet, Switch, Text, TextInput, View };
|
|
31
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Text","View2","Text2","Platform","OS","select","obj","web","StyleSheet","create","Pressable","Animated","ActivityIndicator","PanResponder","Switch","TextInput","ScrollView","Keyboard","Image","Linking"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAEA,cAAc;AACd,cAAc;AACd,SAASA,IAAA,EAAMC,IAAA,QAAY;AAC3B,SAASD,IAAA,IAAAE,KAAA,EAAMD,IAAA,IAAAE,KAAA,QAAY;AAE3B,cAAc;AAEP,MAAMC,QAAA,GAAW;IACtBC,EAAA,EAAI;IAEJC,OAAOC,GAAA,EAAK;MACV,OAAOA,GAAA,CAAIC,GAAA;IACb;EACF;EAEaC,UAAA,GAAa;IACxBC,OAAOH,GAAA,EAAK;MACV,OAAOA,GAAA;IACT;EACF;EAEaI,SAAA,GAAYA,CAAA,KAChB;EAGIC,QAAA,GAAW;IACtBZ,IAAA,EAAAE,KAAA;IACAD,IAAA,EAAAE;EACF;EAEaU,iBAAA,GAAoBA,CAAA,KACxB;EAGIC,YAAA,GAAeA,CAAA,KACnB;EAGIC,MAAA,GAASA,CAAA,KACb;EAGIC,SAAA,GAAYA,CAAA,KAChB;EAGIC,UAAA,GAAaA,CAAA,KACjB;EAGIC,QAAA,GAAW,CAAC;EAEZC,KAAA,GAAQA,CAAA,KACZ;EAGIC,OAAA,GAAU,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export * from "@tamagui/react-native-use-responder-events";
|
|
2
|
+
export * from "@tamagui/react-native-use-pressable";
|
|
3
|
+
import { View, Text } from "@tamagui/web";
|
|
4
|
+
import { View as View2, Text as Text2 } from "@tamagui/web";
|
|
5
|
+
export * from "./Dimensions.native.js";
|
|
6
|
+
var Platform = {
|
|
7
|
+
OS: "web",
|
|
8
|
+
select(obj) {
|
|
9
|
+
return obj.web;
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
StyleSheet = {
|
|
13
|
+
create(obj) {
|
|
14
|
+
return obj;
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
Pressable = function () {
|
|
18
|
+
return null;
|
|
19
|
+
},
|
|
20
|
+
Animated = {
|
|
21
|
+
View: View2,
|
|
22
|
+
Text: Text2
|
|
23
|
+
},
|
|
24
|
+
ActivityIndicator = function () {
|
|
25
|
+
return null;
|
|
26
|
+
},
|
|
27
|
+
PanResponder = function () {
|
|
28
|
+
return null;
|
|
29
|
+
},
|
|
30
|
+
Switch = function () {
|
|
31
|
+
return null;
|
|
32
|
+
},
|
|
33
|
+
TextInput = function () {
|
|
34
|
+
return null;
|
|
35
|
+
},
|
|
36
|
+
ScrollView = function () {
|
|
37
|
+
return null;
|
|
38
|
+
},
|
|
39
|
+
Keyboard = {},
|
|
40
|
+
Image = function () {
|
|
41
|
+
return null;
|
|
42
|
+
},
|
|
43
|
+
Linking = {};
|
|
44
|
+
export { ActivityIndicator, Animated, Image, Keyboard, Linking, PanResponder, Platform, Pressable, ScrollView, StyleSheet, Switch, Text, TextInput, View };
|
|
45
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Text","View2","Text2","Platform","OS","select","obj","web","StyleSheet","create","Pressable","Animated"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAEA,cAAc;AACd,cAAc;AACd,SAASA,IAAA,EAAMC,IAAA,QAAY;AAC3B,SAASD,IAAA,IAAAE,KAAA,EAAMD,IAAA,IAAAE,KAAA,QAAY;AAE3B,cAAc;AAEP,IAAAC,QAAM;IACXC,EAAA,EAAI;IAEJC,OAAOC,GAAA,EAAK;MACV,OAAOA,GAAA,CAAIC,GAAA;IACb;EACF;EAEaC,UAAA,GAAa;IACxBC,OAAOH,GAAA,EAAK;MACV,OAAOA,GAAA;IACT;EACF;EAEaI,SAAA,GAAY,SAAAA,CAAA,EAChB;IAIP;EAAA;EACAC,QAAA;IACFZ,IAEa,EAAAE,KAAA","ignoreList":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tamagui/react-native-web",
|
|
3
|
+
"version": "1.112.1",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"types": "./types/index.d.ts",
|
|
6
|
+
"main": "dist/cjs",
|
|
7
|
+
"module": "dist/esm",
|
|
8
|
+
"files": [
|
|
9
|
+
"src",
|
|
10
|
+
"types",
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tamagui-build",
|
|
15
|
+
"watch": "tamagui-build --watch",
|
|
16
|
+
"clean": "tamagui-build clean",
|
|
17
|
+
"clean:build": "tamagui-build clean:build",
|
|
18
|
+
"lint": "biome check src",
|
|
19
|
+
"lint:fix": "biome check --write src",
|
|
20
|
+
"check": "yarn check-circular-deps",
|
|
21
|
+
"check-circular-deps": "npx madge --circular ./src/index.ts"
|
|
22
|
+
},
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./types/index.d.ts",
|
|
26
|
+
"import": "./dist/esm/index.mjs",
|
|
27
|
+
"require": "./dist/cjs/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@tamagui/react-native-use-pressable": "1.112.1",
|
|
32
|
+
"@tamagui/react-native-use-responder-events": "1.112.1",
|
|
33
|
+
"@tamagui/web": "1.112.1"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@tamagui/build": "1.112.1",
|
|
37
|
+
"react": "^18.2.0 || ^19.0.0"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": "*"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
export type DisplayMetrics = {
|
|
2
|
+
fontScale: number
|
|
3
|
+
height: number
|
|
4
|
+
scale: number
|
|
5
|
+
width: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type DimensionsValue = {
|
|
9
|
+
window: DisplayMetrics
|
|
10
|
+
screen: DisplayMetrics
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type DimensionKey = 'window' | 'screen'
|
|
14
|
+
type DimensionEventListenerType = 'change'
|
|
15
|
+
|
|
16
|
+
const dimensions = {
|
|
17
|
+
window: {
|
|
18
|
+
fontScale: 1,
|
|
19
|
+
height: 0,
|
|
20
|
+
scale: 1,
|
|
21
|
+
width: 0,
|
|
22
|
+
},
|
|
23
|
+
screen: {
|
|
24
|
+
fontScale: 1,
|
|
25
|
+
height: 0,
|
|
26
|
+
scale: 1,
|
|
27
|
+
width: 0,
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const listeners = {}
|
|
32
|
+
|
|
33
|
+
const canUseDOM = typeof window !== 'undefined'
|
|
34
|
+
let shouldInit = canUseDOM
|
|
35
|
+
|
|
36
|
+
function update() {
|
|
37
|
+
if (!canUseDOM) {
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const win = window
|
|
42
|
+
const docEl = win.document.documentElement
|
|
43
|
+
|
|
44
|
+
dimensions.window = {
|
|
45
|
+
fontScale: 1,
|
|
46
|
+
height: docEl.clientHeight,
|
|
47
|
+
scale: win.devicePixelRatio || 1,
|
|
48
|
+
width: docEl.clientWidth,
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
dimensions.screen = {
|
|
52
|
+
fontScale: 1,
|
|
53
|
+
height: win.screen.height,
|
|
54
|
+
scale: win.devicePixelRatio || 1,
|
|
55
|
+
width: win.screen.width,
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function handleResize() {
|
|
60
|
+
update()
|
|
61
|
+
if (Array.isArray(listeners['change'])) {
|
|
62
|
+
listeners['change'].forEach((handler) => handler(dimensions))
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const Dimensions = {
|
|
67
|
+
get(dimension: DimensionKey): DisplayMetrics {
|
|
68
|
+
if (shouldInit) {
|
|
69
|
+
shouldInit = false
|
|
70
|
+
update()
|
|
71
|
+
}
|
|
72
|
+
if (dimensions[dimension] === undefined)
|
|
73
|
+
throw new Error(`No dimension set for key ${dimension}`)
|
|
74
|
+
return dimensions[dimension]
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
set(initialDimensions: DimensionsValue | null): void {
|
|
78
|
+
if (initialDimensions) {
|
|
79
|
+
if (canUseDOM) {
|
|
80
|
+
throw new Error('Dimensions cannot be set in the browser')
|
|
81
|
+
}
|
|
82
|
+
if (initialDimensions.screen != null) {
|
|
83
|
+
dimensions.screen = initialDimensions.screen
|
|
84
|
+
}
|
|
85
|
+
if (initialDimensions.window != null) {
|
|
86
|
+
dimensions.window = initialDimensions.window
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
addEventListener(
|
|
92
|
+
type: DimensionEventListenerType,
|
|
93
|
+
handler: (dimensionsValue: DimensionsValue) => void
|
|
94
|
+
) {
|
|
95
|
+
listeners[type] = listeners[type] || []
|
|
96
|
+
listeners[type].push(handler)
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
remove: () => {
|
|
100
|
+
this.removeEventListener(type, handler)
|
|
101
|
+
},
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
removeEventListener(
|
|
106
|
+
type: DimensionEventListenerType,
|
|
107
|
+
handler: (dimensionsValue: DimensionsValue) => void
|
|
108
|
+
): void {
|
|
109
|
+
if (Array.isArray(listeners[type])) {
|
|
110
|
+
listeners[type] = listeners[type].filter((_handler) => _handler !== handler)
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (canUseDOM) {
|
|
116
|
+
window.addEventListener('resize', handleResize, false)
|
|
117
|
+
}
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// TODO
|
|
2
|
+
|
|
3
|
+
export * from '@tamagui/react-native-use-responder-events'
|
|
4
|
+
export * from '@tamagui/react-native-use-pressable'
|
|
5
|
+
export { View, Text } from '@tamagui/web'
|
|
6
|
+
import { View, Text } from '@tamagui/web'
|
|
7
|
+
|
|
8
|
+
export * from './Dimensions'
|
|
9
|
+
|
|
10
|
+
export const Platform = {
|
|
11
|
+
OS: 'web',
|
|
12
|
+
|
|
13
|
+
select(obj) {
|
|
14
|
+
return obj.web
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const StyleSheet = {
|
|
19
|
+
create(obj) {
|
|
20
|
+
return obj
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const Pressable = () => {
|
|
25
|
+
return null
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const Animated = {
|
|
29
|
+
View,
|
|
30
|
+
Text,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const ActivityIndicator = () => {
|
|
34
|
+
return null
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const PanResponder = () => {
|
|
38
|
+
return null
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const Switch = () => {
|
|
42
|
+
return null
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const TextInput = () => {
|
|
46
|
+
return null
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const ScrollView = () => {
|
|
50
|
+
return null
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const Keyboard = {}
|
|
54
|
+
|
|
55
|
+
export const Image = () => {
|
|
56
|
+
return null
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const Linking = {}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type DisplayMetrics = {
|
|
2
|
+
fontScale: number;
|
|
3
|
+
height: number;
|
|
4
|
+
scale: number;
|
|
5
|
+
width: number;
|
|
6
|
+
};
|
|
7
|
+
type DimensionsValue = {
|
|
8
|
+
window: DisplayMetrics;
|
|
9
|
+
screen: DisplayMetrics;
|
|
10
|
+
};
|
|
11
|
+
type DimensionKey = 'window' | 'screen';
|
|
12
|
+
type DimensionEventListenerType = 'change';
|
|
13
|
+
export declare const Dimensions: {
|
|
14
|
+
get(dimension: DimensionKey): DisplayMetrics;
|
|
15
|
+
set(initialDimensions: DimensionsValue | null): void;
|
|
16
|
+
addEventListener(type: DimensionEventListenerType, handler: (dimensionsValue: DimensionsValue) => void): {
|
|
17
|
+
remove: () => void;
|
|
18
|
+
};
|
|
19
|
+
removeEventListener(type: DimensionEventListenerType, handler: (dimensionsValue: DimensionsValue) => void): void;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=Dimensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dimensions.d.ts","sourceRoot":"","sources":["../src/Dimensions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE,cAAc,CAAA;CACvB,CAAA;AAED,KAAK,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAA;AACvC,KAAK,0BAA0B,GAAG,QAAQ,CAAA;AAoD1C,eAAO,MAAM,UAAU;mBACN,YAAY,GAAG,cAAc;2BAUrB,eAAe,GAAG,IAAI,GAAG,IAAI;2BAe5C,0BAA0B,WACvB,CAAC,eAAe,EAAE,eAAe,KAAK,IAAI;;;8BAa7C,0BAA0B,WACvB,CAAC,eAAe,EAAE,eAAe,KAAK,IAAI,GAClD,IAAI;CAKR,CAAA"}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from '@tamagui/react-native-use-responder-events';
|
|
2
|
+
export * from '@tamagui/react-native-use-pressable';
|
|
3
|
+
export { View, Text } from '@tamagui/web';
|
|
4
|
+
export * from './Dimensions';
|
|
5
|
+
export declare const Platform: {
|
|
6
|
+
OS: string;
|
|
7
|
+
select(obj: any): any;
|
|
8
|
+
};
|
|
9
|
+
export declare const StyleSheet: {
|
|
10
|
+
create(obj: any): any;
|
|
11
|
+
};
|
|
12
|
+
export declare const Pressable: () => null;
|
|
13
|
+
export declare const Animated: {
|
|
14
|
+
View: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").StackProps, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, {}>;
|
|
15
|
+
Text: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TextProps, import("@tamagui/web").TamaguiTextElement, import("@tamagui/web").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {}, {}>;
|
|
16
|
+
};
|
|
17
|
+
export declare const ActivityIndicator: () => null;
|
|
18
|
+
export declare const PanResponder: () => null;
|
|
19
|
+
export declare const Switch: () => null;
|
|
20
|
+
export declare const TextInput: () => null;
|
|
21
|
+
export declare const ScrollView: () => null;
|
|
22
|
+
export declare const Keyboard: {};
|
|
23
|
+
export declare const Image: () => null;
|
|
24
|
+
export declare const Linking: {};
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,cAAc,4CAA4C,CAAA;AAC1D,cAAc,qCAAqC,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGzC,cAAc,cAAc,CAAA;AAE5B,eAAO,MAAM,QAAQ;;;CAMpB,CAAA;AAED,eAAO,MAAM,UAAU;;CAItB,CAAA;AAED,eAAO,MAAM,SAAS,YAErB,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAGpB,CAAA;AAED,eAAO,MAAM,iBAAiB,YAE7B,CAAA;AAED,eAAO,MAAM,YAAY,YAExB,CAAA;AAED,eAAO,MAAM,MAAM,YAElB,CAAA;AAED,eAAO,MAAM,SAAS,YAErB,CAAA;AAED,eAAO,MAAM,UAAU,YAEtB,CAAA;AAED,eAAO,MAAM,QAAQ,IAAK,CAAA;AAE1B,eAAO,MAAM,KAAK,YAEjB,CAAA;AAED,eAAO,MAAM,OAAO,IAAK,CAAA"}
|