@becklyn/next 4.0.0 → 4.2.0

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,16 @@
1
+ import { Component, type ReactNode } from "react";
2
+ export interface ErrorBoundaryProps {
3
+ children: ReactNode;
4
+ fallback: ReactNode;
5
+ }
6
+ export interface ErrorBoundaryState {
7
+ hasError: boolean;
8
+ }
9
+ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
10
+ constructor(props: ErrorBoundaryProps);
11
+ static getDerivedStateFromError(): {
12
+ hasError: boolean;
13
+ };
14
+ render(): ReactNode;
15
+ }
16
+ //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../error/ErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACpE,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB;;;IAI/B,MAAM;CAOT"}
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ErrorBoundary = void 0;
5
+ const react_1 = require("react");
6
+ class ErrorBoundary extends react_1.Component {
7
+ constructor(props) {
8
+ super(props);
9
+ this.state = { hasError: false };
10
+ }
11
+ static getDerivedStateFromError() {
12
+ return { hasError: true };
13
+ }
14
+ render() {
15
+ if (this.state.hasError) {
16
+ return this.props.fallback;
17
+ }
18
+ return this.props.children;
19
+ }
20
+ }
21
+ exports.ErrorBoundary = ErrorBoundary;
@@ -0,0 +1,2 @@
1
+ export declare const sleep: (ms: number) => Promise<unknown>;
2
+ //# sourceMappingURL=sleep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../lib/sleep.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,qBAAoD,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sleep = void 0;
4
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
5
+ exports.sleep = sleep;
@@ -0,0 +1,16 @@
1
+ import { Component, type ReactNode } from "react";
2
+ export interface ErrorBoundaryProps {
3
+ children: ReactNode;
4
+ fallback: ReactNode;
5
+ }
6
+ export interface ErrorBoundaryState {
7
+ hasError: boolean;
8
+ }
9
+ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
10
+ constructor(props: ErrorBoundaryProps);
11
+ static getDerivedStateFromError(): {
12
+ hasError: boolean;
13
+ };
14
+ render(): ReactNode;
15
+ }
16
+ //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../error/ErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACpE,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB;;;IAI/B,MAAM;CAOT"}
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ErrorBoundary = void 0;
5
+ const react_1 = require("react");
6
+ class ErrorBoundary extends react_1.Component {
7
+ constructor(props) {
8
+ super(props);
9
+ this.state = { hasError: false };
10
+ }
11
+ static getDerivedStateFromError() {
12
+ return { hasError: true };
13
+ }
14
+ render() {
15
+ if (this.state.hasError) {
16
+ return this.props.fallback;
17
+ }
18
+ return this.props.children;
19
+ }
20
+ }
21
+ exports.ErrorBoundary = ErrorBoundary;
@@ -0,0 +1,2 @@
1
+ export declare const sleep: (ms: number) => Promise<unknown>;
2
+ //# sourceMappingURL=sleep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../lib/sleep.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,qBAAoD,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sleep = void 0;
4
+ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
5
+ exports.sleep = sleep;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@becklyn/next",
3
- "version": "4.0.0",
3
+ "version": "4.2.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/Becklyn-Studios/ts-libs/tree/main/packages/next",
6
6
  "repository": {