@evlop/commons 1.0.315 → 1.0.316

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.
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface RenderInBackgroundProps {
3
+ children: React.ReactNode;
4
+ fallback?: React.ReactNode;
5
+ }
6
+ export declare const RenderInBackground: ({ children, fallback }: RenderInBackgroundProps) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=RenderInBackground.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderInBackground.d.ts","sourceRoot":"","sources":["../../../../src/components/RenderInBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAK9E,UAAU,uBAAuB;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,kBAAkB,GAAI,wBAGhC,uBAAuB,8EAczB,CAAA"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.RenderInBackground = void 0;
40
+ const react_1 = __importStar(require("react"));
41
+ const EmptyComponent_1 = __importDefault(require("./EmptyComponent"));
42
+ const defaultFallback = react_1.default.createElement(EmptyComponent_1.default, null);
43
+ const RenderInBackground = ({ children, fallback = defaultFallback }) => {
44
+ const [isReady, setIsReady] = (0, react_1.useState)(false);
45
+ (0, react_1.useEffect)(() => {
46
+ (0, react_1.startTransition)(() => {
47
+ setIsReady(true);
48
+ });
49
+ }, []);
50
+ if (!isReady) {
51
+ return fallback;
52
+ }
53
+ return react_1.default.createElement(react_1.Suspense, { fallback: fallback }, children);
54
+ };
55
+ exports.RenderInBackground = RenderInBackground;
56
+ //# sourceMappingURL=RenderInBackground.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderInBackground.js","sourceRoot":"","sources":["../../../../src/components/RenderInBackground.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8E;AAC9E,sEAA8C;AAE9C,MAAM,eAAe,GAAG,8BAAC,wBAAc,OAAG,CAAC;AAOpC,MAAM,kBAAkB,GAAG,CAAC,EAC/B,QAAQ,EACR,QAAQ,GAAG,eAAe,EACJ,EAAE,EAAE;IAC1B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,IAAA,uBAAe,EAAC,GAAG,EAAE;YACjB,UAAU,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,OAAO,8BAAC,gBAAQ,IAAC,QAAQ,EAAE,QAAQ,IAAG,QAAQ,CAAY,CAAC;AAC/D,CAAC,CAAA;AAjBY,QAAA,kBAAkB,sBAiB9B"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface RenderInBackgroundProps {
3
+ children: React.ReactNode;
4
+ fallback?: React.ReactNode;
5
+ }
6
+ export declare const RenderInBackground: ({ children, fallback }: RenderInBackgroundProps) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=RenderInBackground.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderInBackground.d.ts","sourceRoot":"","sources":["../../../../src/components/RenderInBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAK9E,UAAU,uBAAuB;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,kBAAkB,GAAI,wBAGhC,uBAAuB,8EAczB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import React, { Suspense, useEffect, useState, startTransition } from 'react';
2
+ import EmptyComponent from './EmptyComponent';
3
+ const defaultFallback = React.createElement(EmptyComponent, null);
4
+ export const RenderInBackground = ({ children, fallback = defaultFallback }) => {
5
+ const [isReady, setIsReady] = useState(false);
6
+ useEffect(() => {
7
+ startTransition(() => {
8
+ setIsReady(true);
9
+ });
10
+ }, []);
11
+ if (!isReady) {
12
+ return fallback;
13
+ }
14
+ return React.createElement(Suspense, { fallback: fallback }, children);
15
+ };
16
+ //# sourceMappingURL=RenderInBackground.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderInBackground.js","sourceRoot":"","sources":["../../../../src/components/RenderInBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,eAAe,GAAG,oBAAC,cAAc,OAAG,CAAC;AAO3C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAC/B,QAAQ,EACR,QAAQ,GAAG,eAAe,EACJ,EAAE,EAAE;IAC1B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,SAAS,CAAC,GAAG,EAAE;QACX,eAAe,CAAC,GAAG,EAAE;YACjB,UAAU,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,OAAO,oBAAC,QAAQ,IAAC,QAAQ,EAAE,QAAQ,IAAG,QAAQ,CAAY,CAAC;AAC/D,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface RenderInBackgroundProps {
3
+ children: React.ReactNode;
4
+ fallback?: React.ReactNode;
5
+ }
6
+ export declare const RenderInBackground: ({ children, fallback }: RenderInBackgroundProps) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=RenderInBackground.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RenderInBackground.d.ts","sourceRoot":"","sources":["../../../../src/components/RenderInBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAK9E,UAAU,uBAAuB;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,kBAAkB,GAAI,wBAGhC,uBAAuB,8EAczB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.315",
3
+ "version": "1.0.316",
4
4
  "description": "",
5
5
  "main": "dist/cjs/main.js",
6
6
  "module": "dist/esm/main.js",