@tamagui/core 1.112.6 → 1.112.7

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.
Files changed (33) hide show
  1. package/package.json +6 -6
  2. package/dist/cjs/hooks/usePlatformMethods.js +0 -32
  3. package/dist/cjs/hooks/usePlatformMethods.js.map +0 -6
  4. package/dist/cjs/hooks/usePlatformMethods.native.js +0 -46
  5. package/dist/cjs/hooks/usePlatformMethods.native.js.map +0 -6
  6. package/dist/cjs/react-native-web/Dimensions.js +0 -79
  7. package/dist/cjs/react-native-web/Dimensions.js.map +0 -6
  8. package/dist/cjs/react-native-web/Dimensions.native.js +0 -87
  9. package/dist/cjs/react-native-web/Dimensions.native.js.map +0 -6
  10. package/dist/cjs/react-native-web.js +0 -35
  11. package/dist/cjs/react-native-web.js.map +0 -6
  12. package/dist/esm/hooks/usePlatformMethods.js +0 -18
  13. package/dist/esm/hooks/usePlatformMethods.js.map +0 -6
  14. package/dist/esm/hooks/usePlatformMethods.mjs +0 -21
  15. package/dist/esm/hooks/usePlatformMethods.mjs.map +0 -1
  16. package/dist/esm/hooks/usePlatformMethods.native.js +0 -28
  17. package/dist/esm/hooks/usePlatformMethods.native.js.map +0 -1
  18. package/dist/esm/react-native-web/Dimensions.js +0 -63
  19. package/dist/esm/react-native-web/Dimensions.js.map +0 -6
  20. package/dist/esm/react-native-web/Dimensions.mjs +0 -61
  21. package/dist/esm/react-native-web/Dimensions.mjs.map +0 -1
  22. package/dist/esm/react-native-web/Dimensions.native.js +0 -67
  23. package/dist/esm/react-native-web/Dimensions.native.js.map +0 -1
  24. package/dist/esm/react-native-web.js +0 -19
  25. package/dist/esm/react-native-web.js.map +0 -6
  26. package/dist/esm/react-native-web.mjs +0 -17
  27. package/dist/esm/react-native-web.mjs.map +0 -1
  28. package/types/hooks/usePlatformMethods.d.ts +0 -4
  29. package/types/hooks/usePlatformMethods.d.ts.map +0 -1
  30. package/types/react-native-web/Dimensions.d.ts +0 -22
  31. package/types/react-native-web/Dimensions.d.ts.map +0 -1
  32. package/types/react-native-web.d.ts +0 -29
  33. package/types/react-native-web.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "1.112.6",
3
+ "version": "1.112.7",
4
4
  "source": "src/index.tsx",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -35,13 +35,13 @@
35
35
  "native-test.d.ts"
36
36
  ],
37
37
  "dependencies": {
38
- "@tamagui/react-native-use-pressable": "1.112.6",
39
- "@tamagui/react-native-use-responder-events": "1.112.6",
40
- "@tamagui/use-event": "1.112.6",
41
- "@tamagui/web": "1.112.6"
38
+ "@tamagui/react-native-use-pressable": "1.112.7",
39
+ "@tamagui/react-native-use-responder-events": "1.112.7",
40
+ "@tamagui/use-event": "1.112.7",
41
+ "@tamagui/web": "1.112.7"
42
42
  },
43
43
  "devDependencies": {
44
- "@tamagui/build": "1.112.6",
44
+ "@tamagui/build": "1.112.7",
45
45
  "@testing-library/react": "^16.0.0",
46
46
  "csstype": "^3.0.10",
47
47
  "typescript": "^5.5.2",
@@ -1,32 +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 __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 usePlatformMethods_exports = {};
16
- __export(usePlatformMethods_exports, {
17
- usePlatformMethods: () => usePlatformMethods
18
- });
19
- module.exports = __toCommonJS(usePlatformMethods_exports);
20
- var import_constants = require("@tamagui/constants"), import_getRect = require("../helpers/getRect"), import_useElementLayout = require("./useElementLayout");
21
- function usePlatformMethods(hostRef) {
22
- (0, import_constants.useIsomorphicLayoutEffect)(() => {
23
- const node = hostRef.current;
24
- node && (node.measure ||= (callback) => (0, import_useElementLayout.measureLayout)(node, null, callback), node.measureLayout ||= (relativeToNode, success) => (0, import_useElementLayout.measureLayout)(node, relativeToNode, success), node.measureInWindow ||= (callback) => {
25
- node && setTimeout(() => {
26
- const { height, left, top, width } = (0, import_getRect.getRect)(node);
27
- callback(left, top, width, height);
28
- }, 0);
29
- });
30
- }, [hostRef]);
31
- }
32
- //# sourceMappingURL=usePlatformMethods.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/usePlatformMethods.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0C,+BAG1C,iBAAwB,+BACxB,0BAA8B;AAGvB,SAAS,mBAAmB,SAA6B;AAC9D,kDAA0B,MAAM;AAC9B,UAAM,OAAO,QAAQ;AACrB,IAAI,SAEF,KAAK,YAAY,CAAC,iBAAa,uCAAc,MAAM,MAAM,QAAQ,GAEjE,KAAK,kBAAkB,CAAC,gBAAgB,gBACtC,uCAAc,MAAqB,gBAAgB,OAAO,GAE5D,KAAK,oBAAoB,CAAC,aAAa;AACrC,MAAK,QACL,WAAW,MAAM;AACf,cAAM,EAAE,QAAQ,MAAM,KAAK,MAAM,QAAI,wBAAQ,IAAmB;AAChE,iBAAS,MAAM,KAAK,OAAO,MAAM;AAAA,MACnC,GAAG,CAAC;AAAA,IACN;AAAA,EAEJ,GAAG,CAAC,OAAO,CAAC;AACd;",
5
- "names": []
6
- }
@@ -1,46 +0,0 @@
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 usePlatformMethods_exports = {};
17
- __export(usePlatformMethods_exports, {
18
- usePlatformMethods: () => usePlatformMethods
19
- });
20
- module.exports = __toCommonJS(usePlatformMethods_exports);
21
- var import_constants = require("@tamagui/constants"), import_getRect = require("../helpers/getRect"), import_useElementLayout = require("./useElementLayout");
22
- function usePlatformMethods(hostRef) {
23
- (0, import_constants.useIsomorphicLayoutEffect)(function() {
24
- var node = hostRef.current;
25
- if (node) {
26
- var _node, _node1, _node2;
27
- (_node = node).measure || (_node.measure = function(callback) {
28
- return (0, import_useElementLayout.measureLayout)(node, null, callback);
29
- }), (_node1 = node).measureLayout || (_node1.measureLayout = function(relativeToNode, success) {
30
- return (0, import_useElementLayout.measureLayout)(node, relativeToNode, success);
31
- }), (_node2 = node).measureInWindow || (_node2.measureInWindow = function(callback) {
32
- node && setTimeout(function() {
33
- var { height, left, top, width } = (0, import_getRect.getRect)(node);
34
- callback(left, top, width, height);
35
- }, 0);
36
- });
37
- }
38
- }, [
39
- hostRef
40
- ]);
41
- }
42
- // Annotate the CommonJS export names for ESM import in node:
43
- 0 && (module.exports = {
44
- usePlatformMethods
45
- });
46
- //# sourceMappingURL=usePlatformMethods.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/Users/n8/tamagui/code/core/core/src/hooks/usePlatformMethods.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;uBAA0C,+BAG1C,iBAAwB,+BACxB,0BAA8B;AAGvB,SAASA,mBAAmBC,SAA2B;AAC5DC,kDAA0B,WAAA;AACxB,QAAMC,OAAOF,QAAQG;AACrB,QAAID,MAAM;UAERA,OAEAA,QAGAA;AALAA,OAAAA,QAAAA,MAAKE,YAALF,MAAKE,UAAY,SAACC,UAAAA;mBAAaC,uCAAcJ,MAAM,MAAMG,QAAAA;WAEzDH,SAAAA,MAAKI,kBAALJ,OAAKI,gBAAkB,SAACC,gBAAgBC,SAAAA;mBACtCF,uCAAcJ,MAAqBK,gBAAgBC,OAAAA;WAErDN,SAAAA,MAAKO,oBAALP,OAAKO,kBAAoB,SAACJ,UAAAA;AACxB,QAAKH,QACLQ,WAAW,WAAA;AACT,cAAM,EAAEC,QAAQC,MAAMC,KAAKC,MAAK,QAAKC,wBAAQb,IAAAA;AAC7CG,mBAASO,MAAMC,KAAKC,OAAOH,MAAAA;QAC7B,GAAG,CAAA;MACL;IACF;EACF,GAAG;IAACX;GAAQ;AACd;",
5
- "names": ["usePlatformMethods", "hostRef", "useIsomorphicLayoutEffect", "node", "current", "measure", "callback", "measureLayout", "relativeToNode", "success", "measureInWindow", "setTimeout", "height", "left", "top", "width", "getRect"]
6
- }
@@ -1,79 +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 __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
@@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AAkB,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
- }
@@ -1,87 +0,0 @@
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
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/react-native-web/Users/n8/tamagui/code/core/core/src/react-native-web/Dimensions.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAeA;;;;;IAAMA,aAAa;EACjBC,QAAQ;IACNC,WAAW;IACXC,QAAQ;IACRC,OAAO;IACPC,O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A;MACjC;IACF;EACF;EAEAY,oBACEH,MACAT,SAAmD;AAEnD,IAAIH,MAAMC,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
- }
@@ -1,35 +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 __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 react_native_web_exports = {};
16
- __export(react_native_web_exports, {
17
- Platform: () => Platform,
18
- Pressable: () => Pressable,
19
- StyleSheet: () => StyleSheet
20
- });
21
- module.exports = __toCommonJS(react_native_web_exports);
22
- __reExport(react_native_web_exports, require("@tamagui/react-native-use-responder-events"), module.exports);
23
- __reExport(react_native_web_exports, require("@tamagui/react-native-use-pressable"), module.exports);
24
- __reExport(react_native_web_exports, require("./index"), module.exports);
25
- const Platform = {
26
- OS: "web",
27
- select(obj) {
28
- return obj.web;
29
- }
30
- }, StyleSheet = {
31
- create(obj) {
32
- return obj;
33
- }
34
- }, Pressable = () => null;
35
- //# sourceMappingURL=react-native-web.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/react-native-web.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,qCAAc,uDAFd;AAGA,qCAAc,gDAHd;AAIA,qCAAc,oBAJd;AAMO,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;",
5
- "names": []
6
- }
@@ -1,18 +0,0 @@
1
- import { useIsomorphicLayoutEffect } from "@tamagui/constants";
2
- import { getRect } from "../helpers/getRect";
3
- import { measureLayout } from "./useElementLayout";
4
- function usePlatformMethods(hostRef) {
5
- useIsomorphicLayoutEffect(() => {
6
- const node = hostRef.current;
7
- node && (node.measure ||= (callback) => measureLayout(node, null, callback), node.measureLayout ||= (relativeToNode, success) => measureLayout(node, relativeToNode, success), node.measureInWindow ||= (callback) => {
8
- node && setTimeout(() => {
9
- const { height, left, top, width } = getRect(node);
10
- callback(left, top, width, height);
11
- }, 0);
12
- });
13
- }, [hostRef]);
14
- }
15
- export {
16
- usePlatformMethods
17
- };
18
- //# sourceMappingURL=usePlatformMethods.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/hooks/usePlatformMethods.ts"],
4
- "mappings": "AAAA,SAAS,iCAAiC;AAG1C,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAGvB,SAAS,mBAAmB,SAA6B;AAC9D,4BAA0B,MAAM;AAC9B,UAAM,OAAO,QAAQ;AACrB,IAAI,SAEF,KAAK,YAAY,CAAC,aAAa,cAAc,MAAM,MAAM,QAAQ,GAEjE,KAAK,kBAAkB,CAAC,gBAAgB,YACtC,cAAc,MAAqB,gBAAgB,OAAO,GAE5D,KAAK,oBAAoB,CAAC,aAAa;AACrC,MAAK,QACL,WAAW,MAAM;AACf,cAAM,EAAE,QAAQ,MAAM,KAAK,MAAM,IAAI,QAAQ,IAAmB;AAChE,iBAAS,MAAM,KAAK,OAAO,MAAM;AAAA,MACnC,GAAG,CAAC;AAAA,IACN;AAAA,EAEJ,GAAG,CAAC,OAAO,CAAC;AACd;",
5
- "names": []
6
- }
@@ -1,21 +0,0 @@
1
- import { useIsomorphicLayoutEffect } from "@tamagui/constants";
2
- import { getRect } from "../helpers/getRect.mjs";
3
- import { measureLayout } from "./useElementLayout.mjs";
4
- function usePlatformMethods(hostRef) {
5
- useIsomorphicLayoutEffect(() => {
6
- const node = hostRef.current;
7
- node && (node.measure ||= callback => measureLayout(node, null, callback), node.measureLayout ||= (relativeToNode, success) => measureLayout(node, relativeToNode, success), node.measureInWindow ||= callback => {
8
- node && setTimeout(() => {
9
- const {
10
- height,
11
- left,
12
- top,
13
- width
14
- } = getRect(node);
15
- callback(left, top, width, height);
16
- }, 0);
17
- });
18
- }, [hostRef]);
19
- }
20
- export { usePlatformMethods };
21
- //# sourceMappingURL=usePlatformMethods.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useIsomorphicLayoutEffect","getRect","measureLayout","usePlatformMethods","hostRef","node","current","measure","callback","relativeToNode","success","measureInWindow","setTimeout","height","left","top","width"],"sources":["../../../src/hooks/usePlatformMethods.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,yBAAA,QAAiC;AAG1C,SAASC,OAAA,QAAe;AACxB,SAASC,aAAA,QAAqB;AAGvB,SAASC,mBAAmBC,OAAA,EAA6B;EAC9DJ,yBAAA,CAA0B,MAAM;IAC9B,MAAMK,IAAA,GAAOD,OAAA,CAAQE,OAAA;IACjBD,IAAA,KAEFA,IAAA,CAAKE,OAAA,KAAaC,QAAA,IAAaN,aAAA,CAAcG,IAAA,EAAM,MAAMG,QAAQ,GAEjEH,IAAA,CAAKH,aAAA,KAAkB,CAACO,cAAA,EAAgBC,OAAA,KACtCR,aAAA,CAAcG,IAAA,EAAqBI,cAAA,EAAgBC,OAAO,GAE5DL,IAAA,CAAKM,eAAA,KAAqBH,QAAA,IAAa;MAChCH,IAAA,IACLO,UAAA,CAAW,MAAM;QACf,MAAM;UAAEC,MAAA;UAAQC,IAAA;UAAMC,GAAA;UAAKC;QAAM,IAAIf,OAAA,CAAQI,IAAmB;QAChEG,QAAA,CAASM,IAAA,EAAMC,GAAA,EAAKC,KAAA,EAAOH,MAAM;MACnC,GAAG,CAAC;IACN;EAEJ,GAAG,CAACT,OAAO,CAAC;AACd","ignoreList":[]}
@@ -1,28 +0,0 @@
1
- import { useIsomorphicLayoutEffect } from "@tamagui/constants";
2
- import { getRect } from "../helpers/getRect.native.js";
3
- import { measureLayout } from "./useElementLayout.native.js";
4
- function usePlatformMethods(hostRef) {
5
- useIsomorphicLayoutEffect(function () {
6
- var node = hostRef.current;
7
- if (node) {
8
- var _node, _node1, _node2;
9
- (_node = node).measure || (_node.measure = function (callback) {
10
- return measureLayout(node, null, callback);
11
- }), (_node1 = node).measureLayout || (_node1.measureLayout = function (relativeToNode, success) {
12
- return measureLayout(node, relativeToNode, success);
13
- }), (_node2 = node).measureInWindow || (_node2.measureInWindow = function (callback) {
14
- node && setTimeout(function () {
15
- var {
16
- height,
17
- left,
18
- top,
19
- width
20
- } = getRect(node);
21
- callback(left, top, width, height);
22
- }, 0);
23
- });
24
- }
25
- }, [hostRef]);
26
- }
27
- export { usePlatformMethods };
28
- //# sourceMappingURL=usePlatformMethods.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useIsomorphicLayoutEffect","getRect","measureLayout","usePlatformMethods","hostRef","node","current","_node","_node1","_node2","measure","callback","relativeToNode","success","measureInWindow","setTimeout"],"sources":["../../../src/hooks/usePlatformMethods.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,yBAAA,QAAiC;AAG1C,SAASC,OAAA,QAAe;AACxB,SAASC,aAAA,QAAqB;AAGvB,SAASC,mBAAmBC,OAAA,EAA6B;EAC9DJ,yBAAA,CAA0B,YAAM;IAC9B,IAAAK,IAAM,GAAAD,OAAO,CAAAE,OAAQ;IACjB,IAAAD,IAAA,EAEF;MAMO,IAAAE,KACL,EAAAC,MAAA,EAAWC,MAAM;MACf,CAAAF,KAAA,GAAMF,IAAE,EAAAK,OAAQ,KAAMH,KAAK,CAAAG,OAAU,aAA2BC,QAAA;QAChE,OAAAT,aAAoB,CAAAG,IAAA,EAAO,MAAMM,QAAA;MACnC,IAAI,CAAAH,MAAA,GAAAH,IAAA,EAAAH,aAAA,KAAAM,MAAA,CAAAN,aAAA,aAAAU,cAAA,EAAAC,OAAA;QACN,OAAAX,aAAA,CAAAG,IAAA,EAAAO,cAAA,EAAAC,OAAA;MAEA,KAAAJ,MAAQ,GAAAJ,IAAA,EAAAS,eAAA,KAAAL,MAAA,CAAAK,eAAA,aAAAH,QAAA;QACdN,IAAA,IAAAU,UAAA","ignoreList":[]}
@@ -1,63 +0,0 @@
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
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/react-native-web/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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
9
- fontScale: 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
@@ -1 +0,0 @@
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/react-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AAM,IAAIC,KAAA,CAAM,4BAA4BD,SAAS,EAAE;IACzD,OAAO1B,UAAA,CAAW0B,SAAS;EAC7B;EAEAE,IAAIC,iBAAA,EAAiD;IACnD,IAAIA,iBAAA,EAAmB;MACrB,IAAIrB,SAAA,EACF,MAAM,IAAImB,KAAA,CAAM,yCAAyC;MAEvDE,iBAAA,CAAkBvB,MAAA,IAAU,SAC9BN,UAAA,CAAWM,MAAA,GAASuB,iBAAA,CAAkBvB,MAAA,GAEpCuB,iBAAA,CAAkB5B,MAAA,IAAU,SAC9BD,UAAA,CAAWC,MAAA,GAAS4B,iBAAA,CAAkB5B,MAAA;IAE1C;EACF;EAEA6B,iBACEC,IAAA,EACAR,OAAA,EACA;IACA,OAAAhB,SAAA,CAAUwB,IAAI,IAAIxB,SAAA,CAAUwB,IAAI,KAAK,EAAC,EACtCxB,SAAA,CAAUwB,IAAI,EAAEC,IAAA,CAAKT,OAAO,GAErB;MACLU,MAAA,EAAQA,CAAA,KAAM;QACZ,KAAKC,mBAAA,CAAoBH,IAAA,EAAMR,OAAO;MACxC;IACF;EACF;EAEAW,oBACEH,IAAA,EACAR,OAAA,EACM;IACFJ,KAAA,CAAMC,OAAA,CAAQb,SAAA,CAAUwB,IAAI,CAAC,MAC/BxB,SAAA,CAAUwB,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":[]}
@@ -1,67 +0,0 @@
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
@@ -1 +0,0 @@
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/react-native-web/Dimensions.ts"],"sourcesContent":[null],"mappings":"AAeA,IAAAA,UAAM;IACJC,MAAA,EAAQ;MACNC,SAAA,EAAW;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AA,CAAM,yCAAyC;MAEvDE,iBAAA,CAAkBvB,MAAA,IAAU,SAC9BN,UAAA,CAAWM,MAAA,GAASuB,iBAAA,CAAkBvB,MAAA,GAEpCuB,iBAAA,CAAkB5B,MAAA,IAAU,SAC9BD,UAAA,CAAWC,MAAA,GAAS4B,iBAAA,CAAkB5B,MAAA;IAE1C;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":[]}
@@ -1,19 +0,0 @@
1
- export * from "@tamagui/react-native-use-responder-events";
2
- export * from "@tamagui/react-native-use-pressable";
3
- export * from "./index";
4
- const Platform = {
5
- OS: "web",
6
- select(obj) {
7
- return obj.web;
8
- }
9
- }, StyleSheet = {
10
- create(obj) {
11
- return obj;
12
- }
13
- }, Pressable = () => null;
14
- export {
15
- Platform,
16
- Pressable,
17
- StyleSheet
18
- };
19
- //# sourceMappingURL=react-native-web.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/react-native-web.ts"],
4
- "mappings": "AAEA,cAAc;AACd,cAAc;AACd,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;",
5
- "names": []
6
- }
@@ -1,17 +0,0 @@
1
- export * from "@tamagui/react-native-use-responder-events";
2
- export * from "@tamagui/react-native-use-pressable";
3
- export * from "./index.mjs";
4
- const Platform = {
5
- OS: "web",
6
- select(obj) {
7
- return obj.web;
8
- }
9
- },
10
- StyleSheet = {
11
- create(obj) {
12
- return obj;
13
- }
14
- },
15
- Pressable = () => null;
16
- export { Platform, Pressable, StyleSheet };
17
- //# sourceMappingURL=react-native-web.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Platform","OS","select","obj","web","StyleSheet","create","Pressable"],"sources":["../../src/react-native-web.ts"],"sourcesContent":[null],"mappings":"AAEA,cAAc;AACd,cAAc;AACd,cAAc;AAEP,MAAMA,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","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- import type { RefObject } from 'react';
2
- import type { TamaguiComponentStateRef } from '@tamagui/web';
3
- export declare function usePlatformMethods(stateRef: RefObject<TamaguiComponentStateRef>, props?: Object): void;
4
- //# sourceMappingURL=usePlatformMethods.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePlatformMethods.d.ts","sourceRoot":"","sources":["../../src/hooks/usePlatformMethods.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,QAmB7D"}
@@ -1,22 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"Dimensions.d.ts","sourceRoot":"","sources":["../../src/react-native-web/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"}
@@ -1,29 +0,0 @@
1
- export * from '@tamagui/react-native-use-responder-events';
2
- export * from '@tamagui/react-native-use-pressable';
3
- export { View, Text } from './index';
4
- export * from './react-native-web/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("react").ForwardRefExoticComponent<Omit<import("./index").RNTamaguiViewNonStyleProps, keyof import("@tamagui/web/types/types").StackStyleBase> & import("@tamagui/web/types/types").WithThemeValues<import("@tamagui/web/types/types").StackStyleBase> & import("@tamagui/web/types/types").WithShorthands<import("@tamagui/web/types/types").WithThemeValues<import("@tamagui/web/types/types").StackStyleBase>> & import("@tamagui/web/types/types").WithPseudoProps<import("@tamagui/web/types/types").WithThemeValues<import("@tamagui/web/types/types").StackStyleBase> & import("@tamagui/web/types/types").WithShorthands<import("@tamagui/web/types/types").WithThemeValues<import("@tamagui/web/types/types").StackStyleBase>>> & import("@tamagui/web/types/types").WithMediaProps<import("@tamagui/web/types/types").WithThemeShorthandsAndPseudos<import("@tamagui/web/types/types").StackStyleBase, {}>> & import("react").RefAttributes<import("@tamagui/web/types/types").TamaguiElement>> & import("@tamagui/web/types/types").StaticComponentObject<import("@tamagui/web/types/types").TamaDefer, import("@tamagui/web/types/types").TamaguiElement, import("./index").RNTamaguiViewNonStyleProps, import("@tamagui/web/types/types").StackStyleBase, {}, {}> & Omit<{}, "staticConfig" | "extractable" | "styleable"> & {
15
- __tama: [import("@tamagui/web/types/types").TamaDefer, import("@tamagui/web/types/types").TamaguiElement, import("./index").RNTamaguiViewNonStyleProps, import("@tamagui/web/types/types").StackStyleBase, {}, {}];
16
- };
17
- Text: import("react").ForwardRefExoticComponent<Omit<import("./index").RNTamaguiTextNonStyleProps, keyof import("@tamagui/web/types/types").TextStylePropsBase> & import("@tamagui/web/types/types").WithThemeValues<import("@tamagui/web/types/types").TextStylePropsBase> & import("@tamagui/web/types/types").WithShorthands<import("@tamagui/web/types/types").WithThemeValues<import("@tamagui/web/types/types").TextStylePropsBase>> & import("@tamagui/web/types/types").WithPseudoProps<import("@tamagui/web/types/types").WithThemeValues<import("@tamagui/web/types/types").TextStylePropsBase> & import("@tamagui/web/types/types").WithShorthands<import("@tamagui/web/types/types").WithThemeValues<import("@tamagui/web/types/types").TextStylePropsBase>>> & import("@tamagui/web/types/types").WithMediaProps<import("@tamagui/web/types/types").WithThemeShorthandsAndPseudos<import("@tamagui/web/types/types").TextStylePropsBase, {}>> & import("react").RefAttributes<import("@tamagui/web/types/types").TamaguiTextElement>> & import("@tamagui/web/types/types").StaticComponentObject<import("@tamagui/web/types/types").TamaDefer, import("@tamagui/web/types/types").TamaguiTextElement, import("./index").RNTamaguiTextNonStyleProps, import("@tamagui/web/types/types").TextStylePropsBase, {}, {}> & Omit<{}, "staticConfig" | "extractable" | "styleable"> & {
18
- __tama: [import("@tamagui/web/types/types").TamaDefer, import("@tamagui/web/types/types").TamaguiTextElement, import("./index").RNTamaguiTextNonStyleProps, import("@tamagui/web/types/types").TextStylePropsBase, {}, {}];
19
- };
20
- };
21
- export declare const ActivityIndicator: () => null;
22
- export declare const PanResponder: () => null;
23
- export declare const Switch: () => null;
24
- export declare const TextInput: () => null;
25
- export declare const ScrollView: () => null;
26
- export declare const Keyboard: {};
27
- export declare const Image: () => null;
28
- export declare const Linking: {};
29
- //# sourceMappingURL=react-native-web.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-native-web.d.ts","sourceRoot":"","sources":["../src/react-native-web.ts"],"names":[],"mappings":"AAEA,cAAc,4CAA4C,CAAA;AAC1D,cAAc,qCAAqC,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAIpC,cAAc,+BAA+B,CAAA;AAE7C,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"}