@tamagui/constants 1.0.1-beta.220 → 1.0.1-beta.221

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/constants",
3
- "version": "1.0.1-beta.220",
3
+ "version": "1.0.1-beta.221",
4
4
  "types": "./types/constants.d.ts",
5
5
  "main": "dist/cjs/constants",
6
6
  "module": "dist/esm/constants",
@@ -18,7 +18,7 @@
18
18
  "clean:build": "tamagui-build clean:build"
19
19
  },
20
20
  "devDependencies": {
21
- "@tamagui/build": "^1.0.1-beta.220",
21
+ "@tamagui/build": "^1.0.1-beta.221",
22
22
  "@types/react": "^18.0.15",
23
23
  "react": ">=18",
24
24
  "react-native": "*"
package/dist/cjs/index.js DELETED
@@ -1,45 +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: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var src_exports = {};
20
- __export(src_exports, {
21
- useWindowDimensions: () => useWindowDimensions
22
- });
23
- module.exports = __toCommonJS(src_exports);
24
- var import_react = require("react");
25
- var import_react_native = require("react-native");
26
- let lastKnownValue = {
27
- fontScale: 1,
28
- height: 800,
29
- width: 600,
30
- scale: 1
31
- };
32
- function useWindowDimensions() {
33
- const next = (0, import_react_native.useWindowDimensions)();
34
- const [current, setCurrent] = (0, import_react.useState)(lastKnownValue);
35
- if (next !== current) {
36
- setCurrent(next);
37
- lastKnownValue = next;
38
- }
39
- return current;
40
- }
41
- // Annotate the CommonJS export names for ESM import in node:
42
- 0 && (module.exports = {
43
- useWindowDimensions
44
- });
45
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["import { useState } from 'react'\nimport { ScaledSize, useWindowDimensions as useWindowDimensionsRN } from 'react-native'\n\n/**\n * SSR safe useWindowDimensions\n */\n\nlet lastKnownValue: ScaledSize = {\n fontScale: 1,\n height: 800,\n width: 600,\n scale: 1,\n}\n\nexport function useWindowDimensions() {\n const next = useWindowDimensionsRN()\n const [current, setCurrent] = useState(lastKnownValue)\n\n if (next !== current) {\n setCurrent(next)\n lastKnownValue = next\n }\n\n return current\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAyB;AACzB,0BAAyE;AAMzE,IAAI,iBAA6B;AAAA,EAC/B,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AACT;AAEO,SAAS,sBAAsB;AACpC,QAAM,WAAO,oBAAAA,qBAAsB;AACnC,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,cAAc;AAErD,MAAI,SAAS,SAAS;AACpB,eAAW,IAAI;AACf,qBAAiB;AAAA,EACnB;AAEA,SAAO;AACT;",
6
- "names": ["useWindowDimensionsRN"]
7
- }
package/dist/esm/index.js DELETED
@@ -1,21 +0,0 @@
1
- import { useState } from "react";
2
- import { useWindowDimensions as useWindowDimensionsRN } from "react-native";
3
- let lastKnownValue = {
4
- fontScale: 1,
5
- height: 800,
6
- width: 600,
7
- scale: 1
8
- };
9
- function useWindowDimensions() {
10
- const next = useWindowDimensionsRN();
11
- const [current, setCurrent] = useState(lastKnownValue);
12
- if (next !== current) {
13
- setCurrent(next);
14
- lastKnownValue = next;
15
- }
16
- return current;
17
- }
18
- export {
19
- useWindowDimensions
20
- };
21
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["import { useState } from 'react'\nimport { ScaledSize, useWindowDimensions as useWindowDimensionsRN } from 'react-native'\n\n/**\n * SSR safe useWindowDimensions\n */\n\nlet lastKnownValue: ScaledSize = {\n fontScale: 1,\n height: 800,\n width: 600,\n scale: 1,\n}\n\nexport function useWindowDimensions() {\n const next = useWindowDimensionsRN()\n const [current, setCurrent] = useState(lastKnownValue)\n\n if (next !== current) {\n setCurrent(next)\n lastKnownValue = next\n }\n\n return current\n}\n"],
5
- "mappings": "AAAA,SAAS,gBAAgB;AACzB,SAAqB,uBAAuB,6BAA6B;AAMzE,IAAI,iBAA6B;AAAA,EAC/B,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AACT;AAEO,SAAS,sBAAsB;AACpC,QAAM,OAAO,sBAAsB;AACnC,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,cAAc;AAErD,MAAI,SAAS,SAAS;AACpB,eAAW,IAAI;AACf,qBAAiB;AAAA,EACnB;AAEA,SAAO;AACT;",
6
- "names": []
7
- }
package/types/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { ScaledSize } from 'react-native';
2
- export declare function useWindowDimensions(): ScaledSize;
3
- //# sourceMappingURL=index.d.ts.map