neue Homepage auf react basis

This commit is contained in:
2026-08-07 21:39:30 +02:00
parent 164bdd19ad
commit ee89442c04
52191 changed files with 1230242 additions and 58 deletions
+6
View File
@@ -0,0 +1,6 @@
/**
* Returns the target element of an event, accounting for shadow DOM.
* @param event The event object.
* @returns The target element of the event.
*/
export declare function getTarget(event: Event): EventTarget | null;
+6
View File
@@ -0,0 +1,6 @@
/**
* Returns the target element of an event, accounting for shadow DOM.
* @param event The event object.
* @returns The target element of the event.
*/
export declare function getTarget(event: Event): EventTarget | null;
+20
View File
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getTarget = getTarget;
/**
* Returns the target element of an event, accounting for shadow DOM.
* @param event The event object.
* @returns The target element of the event.
*/
function getTarget(event) {
if ('composedPath' in event) {
return event.composedPath()[0] ?? event.target;
}
// Fallback for environments where `composedPath` is not available.
// TS narrows `event` to `never` here because it assumes `composedPath` always exists.
return event.target;
}
+14
View File
@@ -0,0 +1,14 @@
/**
* Returns the target element of an event, accounting for shadow DOM.
* @param event The event object.
* @returns The target element of the event.
*/
export function getTarget(event) {
if ('composedPath' in event) {
return event.composedPath()[0] ?? event.target;
}
// Fallback for environments where `composedPath` is not available.
// TS narrows `event` to `never` here because it assumes `composedPath` always exists.
return event.target;
}
+2
View File
@@ -0,0 +1,2 @@
export * from "./getTarget.mjs";
export * from "./isHTMLElement.mjs";
+2
View File
@@ -0,0 +1,2 @@
export * from "./getTarget.js";
export * from "./isHTMLElement.js";
+27
View File
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getTarget = require("./getTarget");
Object.keys(_getTarget).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _getTarget[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _getTarget[key];
}
});
});
var _isHTMLElement = require("./isHTMLElement");
Object.keys(_isHTMLElement).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _isHTMLElement[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _isHTMLElement[key];
}
});
});
+2
View File
@@ -0,0 +1,2 @@
export * from "./getTarget.mjs";
export * from "./isHTMLElement.mjs";
+4
View File
@@ -0,0 +1,4 @@
/**
* Checks if a value is an HTMLElement, including elements from other iframes/realms.
*/
export declare function isHTMLElement(value: unknown): value is HTMLElement;
+4
View File
@@ -0,0 +1,4 @@
/**
* Checks if a value is an HTMLElement, including elements from other iframes/realms.
*/
export declare function isHTMLElement(value: unknown): value is HTMLElement;
+27
View File
@@ -0,0 +1,27 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isHTMLElement = isHTMLElement;
var _ownerWindow = _interopRequireDefault(require("@mui/utils/ownerWindow"));
/**
* Checks if a value is an HTMLElement, including elements from other iframes/realms.
*/
function isHTMLElement(value) {
if (typeof window === 'undefined' || value == null) {
return false;
}
if (value instanceof HTMLElement) {
return true;
}
// Cross-realm: must be an element node (nodeType 1) from another window.
// The try/catch guards against detached/destroyed windows where accessing
// `.HTMLElement` on the owner window may throw.
try {
return value.nodeType === 1 && value instanceof (0, _ownerWindow.default)(value).HTMLElement;
} catch {
return false;
}
}
+21
View File
@@ -0,0 +1,21 @@
import ownerWindow from '@mui/utils/ownerWindow';
/**
* Checks if a value is an HTMLElement, including elements from other iframes/realms.
*/
export function isHTMLElement(value) {
if (typeof window === 'undefined' || value == null) {
return false;
}
if (value instanceof HTMLElement) {
return true;
}
// Cross-realm: must be an element node (nodeType 1) from another window.
// The try/catch guards against detached/destroyed windows where accessing
// `.HTMLElement` on the owner window may throw.
try {
return value.nodeType === 1 && value instanceof ownerWindow(value).HTMLElement;
} catch {
return false;
}
}