main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

19
node_modules/use-sidecar/dist/es5/hoc.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sidecar = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var hook_1 = require("./hook");
// eslint-disable-next-line @typescript-eslint/ban-types
function sidecar(importer, errorComponent) {
var ErrorCase = function () { return errorComponent; };
return function Sidecar(props) {
var _a = (0, hook_1.useSidecar)(importer, props.sideCar), Car = _a[0], error = _a[1];
if (error && errorComponent) {
return ErrorCase;
}
// @ts-expect-error type shenanigans
return Car ? React.createElement(Car, tslib_1.__assign({}, props)) : null;
};
}
exports.sidecar = sidecar;