@knapsack/renderer-react-components 4.89.10--canary.7232.815088c.0 → 4.89.10--canary.7234.13e0ca2.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.
package/dist/error-catcher.js
CHANGED
|
@@ -18,14 +18,15 @@ export default class ErrorCatcher extends React.Component {
|
|
|
18
18
|
const { componentStack } = errorInfo;
|
|
19
19
|
this.setState({
|
|
20
20
|
error,
|
|
21
|
-
componentStack: componentStack
|
|
21
|
+
componentStack: componentStack !== null && componentStack !== void 0 ? componentStack : '',
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
+
var _a, _b, _c, _d, _e, _f;
|
|
25
26
|
if (this.state.hasError) {
|
|
26
27
|
return (_jsxs("div", { style: {
|
|
27
28
|
padding: '5px',
|
|
28
|
-
}, children: [_jsx("h5", { children: "Error caught in React Components" }), this.state.error
|
|
29
|
+
}, children: [_jsx("h5", { children: "Error caught in React Components" }), ((_a = this.state.error) === null || _a === void 0 ? void 0 : _a.name) && (_jsxs("h5", { children: ["Error Name: ", _jsx("code", { children: (_b = this.state.error) === null || _b === void 0 ? void 0 : _b.name })] })), ((_c = this.state.error) === null || _c === void 0 ? void 0 : _c.message) && (_jsxs("h5", { children: ["Message:", (_d = this.state.error) === null || _d === void 0 ? void 0 : _d.message] })), this.state.componentStack && (_jsxs(_Fragment, { children: [_jsx("h6", { children: "Component Stack:" }), _jsx("pre", { children: _jsx("code", { children: this.state.componentStack }) }), _jsx("br", {})] })), ((_e = this.state.error) === null || _e === void 0 ? void 0 : _e.stack) && (_jsxs(_Fragment, { children: [_jsx("h6", { children: "Error Stack:" }), _jsx("pre", { children: _jsx("code", { children: (_f = this.state.error) === null || _f === void 0 ? void 0 : _f.stack }) })] }))] }));
|
|
29
30
|
}
|
|
30
31
|
return this.props.children;
|
|
31
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-catcher.js","sourceRoot":"","sources":["../src/error-catcher.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,SAG/C;IACC,YAAY,KAAoC;QAC9C,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACX,QAAQ,EAAE,KAAK;YACf,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,MAAa;QAC3C,6DAA6D;QAC7D,OAAO;YACL,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC;IAEQ,iBAAiB,CAAC,KAAY,EAAE,SAA0B;QACjE,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK;YACL,cAAc,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"error-catcher.js","sourceRoot":"","sources":["../src/error-catcher.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,SAG/C;IACC,YAAY,KAAoC;QAC9C,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACX,QAAQ,EAAE,KAAK;YACf,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,MAAa;QAC3C,6DAA6D;QAC7D,OAAO;YACL,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC;IAEQ,iBAAiB,CAAC,KAAY,EAAE,SAA0B;QACjE,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK;YACL,cAAc,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,EAAE;SACrC,CAAC,CAAC;IACL,CAAC;IAEQ,MAAM;;QACb,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACxB,OAAO,CACL,eACE,KAAK,EAAE;oBACL,OAAO,EAAE,KAAK;iBACf,aAED,4DAAyC,EACxC,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,IAAI,KAAI,CACzB,yCACc,yBAAO,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,IAAI,GAAQ,IAC9C,CACN,EACA,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,OAAO,KAAI,CAC5B,qCAEG,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,OAAO,IACvB,CACN,EACA,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,CAC5B,8BACE,4CAAyB,EACzB,wBACE,yBAAO,IAAI,CAAC,KAAK,CAAC,cAAc,GAAQ,GACpC,EACN,cAAM,IACL,CACJ,EACA,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,KAAK,KAAI,CAC1B,8BACE,wCAAqB,EACrB,wBACE,yBAAO,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,KAAK,GAAQ,GAClC,IACL,CACJ,IACG,CACP,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -3,6 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
* Component to test nullable union type inference
|
|
4
4
|
*/
|
|
5
5
|
export const NullableUnions = ({ label, value, description, }) => {
|
|
6
|
-
return (_jsxs("div", { children: [label && _jsx("h3", { children: label }), _jsxs("p", { children: ["Value: ", value
|
|
6
|
+
return (_jsxs("div", { children: [label && _jsx("h3", { children: label }), _jsxs("p", { children: ["Value: ", value !== null && value !== void 0 ? value : 'N/A'] }), description && _jsx("p", { children: description })] }));
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=nullable-unions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nullable-unions.js","sourceRoot":"","sources":["../../src/test-fixtures/nullable-unions.tsx"],"names":[],"mappings":";AAiBA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,KAAK,EACL,WAAW,GACZ,EAAE,EAAE;IACH,OAAO,CACL,0BACG,KAAK,IAAI,uBAAK,KAAK,GAAM,EAC1B,mCAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"nullable-unions.js","sourceRoot":"","sources":["../../src/test-fixtures/nullable-unions.tsx"],"names":[],"mappings":";AAiBA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,KAAK,EACL,WAAW,GACZ,EAAE,EAAE;IACH,OAAO,CACL,0BACG,KAAK,IAAI,uBAAK,KAAK,GAAM,EAC1B,mCAAW,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,KAAK,IAAK,EAC7B,WAAW,IAAI,sBAAI,WAAW,GAAK,IAChC,CACP,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knapsack/renderer-react-components",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "4.89.10--canary.
|
|
4
|
+
"version": "4.89.10--canary.7234.13e0ca2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./demo-wrapper": {
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"lint": "eslint ./"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@knapsack/eslint-config-starter": "4.89.10--canary.
|
|
39
|
-
"@knapsack/prettier-config": "4.89.10--canary.
|
|
40
|
-
"@knapsack/types": "4.89.10--canary.
|
|
41
|
-
"@knapsack/typescript-config-starter": "4.89.10--canary.
|
|
42
|
-
"@types/node": "^
|
|
38
|
+
"@knapsack/eslint-config-starter": "4.89.10--canary.7234.13e0ca2.0",
|
|
39
|
+
"@knapsack/prettier-config": "4.89.10--canary.7234.13e0ca2.0",
|
|
40
|
+
"@knapsack/types": "4.89.10--canary.7234.13e0ca2.0",
|
|
41
|
+
"@knapsack/typescript-config-starter": "4.89.10--canary.7234.13e0ca2.0",
|
|
42
|
+
"@types/node": "^20.19.25",
|
|
43
43
|
"@types/prop-types": "^15.7.15",
|
|
44
44
|
"@types/react": "^19.2.3",
|
|
45
45
|
"eslint": "^9.20.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"directory": "apps/client/libs/renderer-react-components",
|
|
57
57
|
"type": "git"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "13e0ca2b14df7c1cb96568714bf08d5ee6c92c84"
|
|
60
60
|
}
|