@tamagui/timer 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/timer",
3
- "version": "1.0.1-beta.220",
3
+ "version": "1.0.1-beta.221",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -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
  },
23
23
  "exports": {
24
24
  "./package.json": "./package.json",
@@ -1,35 +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 useEvent_exports = {};
20
- __export(useEvent_exports, {
21
- useEvent: () => useEvent
22
- });
23
- module.exports = __toCommonJS(useEvent_exports);
24
- var import_useGet = require("./useGet");
25
- function useEvent(callback) {
26
- return (0, import_useGet.useGet)(callback, defaultValue, true);
27
- }
28
- const defaultValue = () => {
29
- throw new Error("Cannot call an event handler while rendering.");
30
- };
31
- // Annotate the CommonJS export names for ESM import in node:
32
- 0 && (module.exports = {
33
- useEvent
34
- });
35
- //# sourceMappingURL=useEvent.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useEvent.ts"],
4
- "sourcesContent": ["import { useGet } from './useGet'\n\ntype AnyFunction = (...args: any[]) => any\n\nexport function useEvent<T extends AnyFunction>(callback?: T): T {\n return useGet(callback, defaultValue, true) as T\n}\n\nconst defaultValue = () => {\n throw new Error('Cannot call an event handler while rendering.')\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AAIhB,SAAS,SAAgC,UAAiB;AAC/D,aAAO,sBAAO,UAAU,cAAc,IAAI;AAC5C;AAEA,MAAM,eAAe,MAAM;AACzB,QAAM,IAAI,MAAM,+CAA+C;AACjE;",
6
- "names": []
7
- }
@@ -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 useGet_exports = {};
20
- __export(useGet_exports, {
21
- useGet: () => useGet
22
- });
23
- module.exports = __toCommonJS(useGet_exports);
24
- var import_react = require("react");
25
- const isWeb = process.env.TAMAGUI_TARGET === "web";
26
- const isClient = typeof window !== "undefined";
27
- const useIsomorphicLayoutEffect = !isWeb || isClient ? import_react.useLayoutEffect : import_react.useEffect;
28
- function useGet(currentValue, initialValue, forwardToFunction) {
29
- const curRef = (0, import_react.useRef)(initialValue ?? currentValue);
30
- useIsomorphicLayoutEffect(() => {
31
- curRef.current = currentValue;
32
- });
33
- return (0, import_react.useCallback)(
34
- forwardToFunction ? (...args) => {
35
- var _a;
36
- return (_a = curRef.current) == null ? void 0 : _a.apply(null, args);
37
- } : () => curRef.current,
38
- []
39
- );
40
- }
41
- // Annotate the CommonJS export names for ESM import in node:
42
- 0 && (module.exports = {
43
- useGet
44
- });
45
- //# sourceMappingURL=useGet.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useGet.ts"],
4
- "sourcesContent": ["import { useCallback, useEffect, useLayoutEffect, useRef } from 'react'\n\nconst isWeb = process.env.TAMAGUI_TARGET === 'web'\nconst isClient = typeof window !== 'undefined'\nconst useIsomorphicLayoutEffect = !isWeb || isClient ? useLayoutEffect : useEffect\n\n// keeps a reference to the current value easily\n\nexport function useGet<A>(\n currentValue: A,\n initialValue?: any,\n forwardToFunction?: boolean\n): () => A {\n const curRef = useRef<any>(initialValue ?? currentValue)\n useIsomorphicLayoutEffect(() => {\n curRef.current = currentValue\n })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useCallback(\n forwardToFunction ? (...args) => curRef.current?.apply(null, args) : () => curRef.current,\n []\n )\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgE;AAEhE,MAAM,QAAQ,QAAQ,IAAI,mBAAmB;AAC7C,MAAM,WAAW,OAAO,WAAW;AACnC,MAAM,4BAA4B,CAAC,SAAS,WAAW,+BAAkB;AAIlE,SAAS,OACd,cACA,cACA,mBACS;AACT,QAAM,aAAS,qBAAY,gBAAgB,YAAY;AACvD,4BAA0B,MAAM;AAC9B,WAAO,UAAU;AAAA,EACnB,CAAC;AAED,aAAO;AAAA,IACL,oBAAoB,IAAI,SAAM;AAnBlC;AAmBqC,0BAAO,YAAP,mBAAgB,MAAM,MAAM;AAAA,QAAQ,MAAM,OAAO;AAAA,IAClF,CAAC;AAAA,EACH;AACF;",
6
- "names": []
7
- }
@@ -1,11 +0,0 @@
1
- import { useGet } from "./useGet";
2
- function useEvent(callback) {
3
- return useGet(callback, defaultValue, true);
4
- }
5
- const defaultValue = () => {
6
- throw new Error("Cannot call an event handler while rendering.");
7
- };
8
- export {
9
- useEvent
10
- };
11
- //# sourceMappingURL=useEvent.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useEvent.ts"],
4
- "sourcesContent": ["import { useGet } from './useGet'\n\ntype AnyFunction = (...args: any[]) => any\n\nexport function useEvent<T extends AnyFunction>(callback?: T): T {\n return useGet(callback, defaultValue, true) as T\n}\n\nconst defaultValue = () => {\n throw new Error('Cannot call an event handler while rendering.')\n}\n"],
5
- "mappings": "AAAA,SAAS,cAAc;AAIhB,SAAS,SAAgC,UAAiB;AAC/D,SAAO,OAAO,UAAU,cAAc,IAAI;AAC5C;AAEA,MAAM,eAAe,MAAM;AACzB,QAAM,IAAI,MAAM,+CAA+C;AACjE;",
6
- "names": []
7
- }
@@ -1,21 +0,0 @@
1
- import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
2
- const isWeb = process.env.TAMAGUI_TARGET === "web";
3
- const isClient = typeof window !== "undefined";
4
- const useIsomorphicLayoutEffect = !isWeb || isClient ? useLayoutEffect : useEffect;
5
- function useGet(currentValue, initialValue, forwardToFunction) {
6
- const curRef = useRef(initialValue ?? currentValue);
7
- useIsomorphicLayoutEffect(() => {
8
- curRef.current = currentValue;
9
- });
10
- return useCallback(
11
- forwardToFunction ? (...args) => {
12
- var _a;
13
- return (_a = curRef.current) == null ? void 0 : _a.apply(null, args);
14
- } : () => curRef.current,
15
- []
16
- );
17
- }
18
- export {
19
- useGet
20
- };
21
- //# sourceMappingURL=useGet.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useGet.ts"],
4
- "sourcesContent": ["import { useCallback, useEffect, useLayoutEffect, useRef } from 'react'\n\nconst isWeb = process.env.TAMAGUI_TARGET === 'web'\nconst isClient = typeof window !== 'undefined'\nconst useIsomorphicLayoutEffect = !isWeb || isClient ? useLayoutEffect : useEffect\n\n// keeps a reference to the current value easily\n\nexport function useGet<A>(\n currentValue: A,\n initialValue?: any,\n forwardToFunction?: boolean\n): () => A {\n const curRef = useRef<any>(initialValue ?? currentValue)\n useIsomorphicLayoutEffect(() => {\n curRef.current = currentValue\n })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useCallback(\n forwardToFunction ? (...args) => curRef.current?.apply(null, args) : () => curRef.current,\n []\n )\n}\n"],
5
- "mappings": "AAAA,SAAS,aAAa,WAAW,iBAAiB,cAAc;AAEhE,MAAM,QAAQ,QAAQ,IAAI,mBAAmB;AAC7C,MAAM,WAAW,OAAO,WAAW;AACnC,MAAM,4BAA4B,CAAC,SAAS,WAAW,kBAAkB;AAIlE,SAAS,OACd,cACA,cACA,mBACS;AACT,QAAM,SAAS,OAAY,gBAAgB,YAAY;AACvD,4BAA0B,MAAM;AAC9B,WAAO,UAAU;AAAA,EACnB,CAAC;AAED,SAAO;AAAA,IACL,oBAAoB,IAAI,SAAM;AAnBlC;AAmBqC,0BAAO,YAAP,mBAAgB,MAAM,MAAM;AAAA,QAAQ,MAAM,OAAO;AAAA,IAClF,CAAC;AAAA,EACH;AACF;",
6
- "names": []
7
- }
package/dist/jsx/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from "./useEvent";
2
- export * from "./useGet";
3
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './useEvent'\nexport * from './useGet'\n"],
5
- "mappings": "AAAA,cAAc;AACd,cAAc;",
6
- "names": []
7
- }
@@ -1,11 +0,0 @@
1
- import { useGet } from "./useGet";
2
- function useEvent(callback) {
3
- return useGet(callback, defaultValue, true);
4
- }
5
- const defaultValue = () => {
6
- throw new Error("Cannot call an event handler while rendering.");
7
- };
8
- export {
9
- useEvent
10
- };
11
- //# sourceMappingURL=useEvent.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useEvent.ts"],
4
- "sourcesContent": ["import { useGet } from './useGet'\n\ntype AnyFunction = (...args: any[]) => any\n\nexport function useEvent<T extends AnyFunction>(callback?: T): T {\n return useGet(callback, defaultValue, true) as T\n}\n\nconst defaultValue = () => {\n throw new Error('Cannot call an event handler while rendering.')\n}\n"],
5
- "mappings": "AAAA,SAAS,cAAc;AAIhB,SAAS,SAAgC,UAAiB;AAC/D,SAAO,OAAO,UAAU,cAAc,IAAI;AAC5C;AAEA,MAAM,eAAe,MAAM;AACzB,QAAM,IAAI,MAAM,+CAA+C;AACjE;",
6
- "names": []
7
- }
@@ -1,18 +0,0 @@
1
- import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
2
- const isWeb = process.env.TAMAGUI_TARGET === "web";
3
- const isClient = typeof window !== "undefined";
4
- const useIsomorphicLayoutEffect = !isWeb || isClient ? useLayoutEffect : useEffect;
5
- function useGet(currentValue, initialValue, forwardToFunction) {
6
- const curRef = useRef(initialValue ?? currentValue);
7
- useIsomorphicLayoutEffect(() => {
8
- curRef.current = currentValue;
9
- });
10
- return useCallback(
11
- forwardToFunction ? (...args) => curRef.current?.apply(null, args) : () => curRef.current,
12
- []
13
- );
14
- }
15
- export {
16
- useGet
17
- };
18
- //# sourceMappingURL=useGet.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useGet.ts"],
4
- "sourcesContent": ["import { useCallback, useEffect, useLayoutEffect, useRef } from 'react'\n\nconst isWeb = process.env.TAMAGUI_TARGET === 'web'\nconst isClient = typeof window !== 'undefined'\nconst useIsomorphicLayoutEffect = !isWeb || isClient ? useLayoutEffect : useEffect\n\n// keeps a reference to the current value easily\n\nexport function useGet<A>(\n currentValue: A,\n initialValue?: any,\n forwardToFunction?: boolean\n): () => A {\n const curRef = useRef<any>(initialValue ?? currentValue)\n useIsomorphicLayoutEffect(() => {\n curRef.current = currentValue\n })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useCallback(\n forwardToFunction ? (...args) => curRef.current?.apply(null, args) : () => curRef.current,\n []\n )\n}\n"],
5
- "mappings": "AAAA,SAAS,aAAa,WAAW,iBAAiB,cAAc;AAEhE,MAAM,QAAQ,QAAQ,IAAI,mBAAmB;AAC7C,MAAM,WAAW,OAAO,WAAW;AACnC,MAAM,4BAA4B,CAAC,SAAS,WAAW,kBAAkB;AAIlE,SAAS,OACd,cACA,cACA,mBACS;AACT,QAAM,SAAS,OAAY,gBAAgB,YAAY;AACvD,4BAA0B,MAAM;AAC9B,WAAO,UAAU;AAAA,EACnB,CAAC;AAED,SAAO;AAAA,IACL,oBAAoB,IAAI,SAAS,OAAO,SAAS,MAAM,MAAM,IAAI,IAAI,MAAM,OAAO;AAAA,IAClF,CAAC;AAAA,EACH;AACF;",
6
- "names": []
7
- }
@@ -1,4 +0,0 @@
1
- declare type AnyFunction = (...args: any[]) => any;
2
- export declare function useEvent<T extends AnyFunction>(callback?: T): T;
3
- export {};
4
- //# sourceMappingURL=useEvent.d.ts.map
package/types/useGet.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare function useGet<A>(currentValue: A, initialValue?: any, forwardToFunction?: boolean): () => A;
2
- //# sourceMappingURL=useGet.d.ts.map