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 @@
/** WebKit: Safari, all iOS browsers, GNOME Web. Excludes Blink. */
export declare const webkit: boolean;
/** Gecko: Firefox. */
export declare const gecko: boolean;
/** Blink: Chrome, Edge, Opera, Brave, and other Chromium-based browsers. */
export declare const blink: boolean;
+6
View File
@@ -0,0 +1,6 @@
/** WebKit: Safari, all iOS browsers, GNOME Web. Excludes Blink. */
export declare const webkit: boolean;
/** Gecko: Firefox. */
export declare const gecko: boolean;
/** Blink: Chrome, Edge, Opera, Brave, and other Chromium-based browsers. */
export declare const blink: boolean;
+26
View File
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.webkit = exports.gecko = exports.blink = void 0;
var _shared = require("./shared");
// WebKit (Safari, all iOS browsers, GNOME Web). Distinguished from Blink by
// the legacy `-webkit-backdrop-filter` name — Blink forked from WebKit in 2013
// and only ships the unprefixed `backdrop-filter`.
/** WebKit: Safari, all iOS browsers, GNOME Web. Excludes Blink. */
const webkit = exports.webkit = typeof CSS !== 'undefined' && !!CSS.supports?.('-webkit-backdrop-filter:none');
// Anchored to `!webkit` so engines are mutually exclusive by construction.
// Firefox-on-iOS uses WebKit (its UA marker is `FxiOS/`, not `Firefox/`); the
// `!webkit` prefix also defends against future iOS-browser UA changes that
// might inject `Firefox` into a WebKit-based UA.
/** Gecko: Firefox. */
const gecko = exports.gecko = !webkit && _shared.lowerUserAgent.includes('firefox');
// All Chromium-based browsers ship `Chrome/` or `Chromium/` in their UA — both
// share the `chrom` prefix, so a single substring check covers Chrome, Edge,
// Opera, Brave, etc. Chrome-on-iOS uses `CriOS/` and stays WebKit. The positive
// UA check also makes this SSR-safe — an empty UA matches nothing.
/** Blink: Chrome, Edge, Opera, Brave, and other Chromium-based browsers. */
const blink = exports.blink = !webkit && _shared.lowerUserAgent.includes('chrom');
+21
View File
@@ -0,0 +1,21 @@
import { lowerUserAgent } from "./shared.mjs";
// WebKit (Safari, all iOS browsers, GNOME Web). Distinguished from Blink by
// the legacy `-webkit-backdrop-filter` name — Blink forked from WebKit in 2013
// and only ships the unprefixed `backdrop-filter`.
/** WebKit: Safari, all iOS browsers, GNOME Web. Excludes Blink. */
export const webkit = typeof CSS !== 'undefined' && !!CSS.supports?.('-webkit-backdrop-filter:none');
// Anchored to `!webkit` so engines are mutually exclusive by construction.
// Firefox-on-iOS uses WebKit (its UA marker is `FxiOS/`, not `Firefox/`); the
// `!webkit` prefix also defends against future iOS-browser UA changes that
// might inject `Firefox` into a WebKit-based UA.
/** Gecko: Firefox. */
export const gecko = !webkit && lowerUserAgent.includes('firefox');
// All Chromium-based browsers ship `Chrome/` or `Chromium/` in their UA — both
// share the `chrom` prefix, so a single substring check covers Chrome, Edge,
// Opera, Brave, etc. Chrome-on-iOS uses `CriOS/` and stays WebKit. The positive
// UA check also makes this SSR-safe — an empty UA matches nothing.
/** Blink: Chrome, Edge, Opera, Brave, and other Chromium-based browsers. */
export const blink = !webkit && lowerUserAgent.includes('chrom');
+2
View File
@@ -0,0 +1,2 @@
/** Running in jsdom or HappyDOM (used by unit tests). */
export declare const jsdom: boolean;
+2
View File
@@ -0,0 +1,2 @@
/** Running in jsdom or HappyDOM (used by unit tests). */
export declare const jsdom: boolean;
+9
View File
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.jsdom = void 0;
var _shared = require("./shared");
/** Running in jsdom or HappyDOM (used by unit tests). */
const jsdom = exports.jsdom = /jsdom|happydom/.test(_shared.lowerUserAgent);
+4
View File
@@ -0,0 +1,4 @@
import { lowerUserAgent } from "./shared.mjs";
/** Running in jsdom or HappyDOM (used by unit tests). */
export const jsdom = /jsdom|happydom/.test(lowerUserAgent);
+26
View File
@@ -0,0 +1,26 @@
/**
* Static platform-detection flags, evaluated once at module load. SSR-safe —
* every flag is `false` when `navigator` is undefined.
*
* Scope is intentionally limited to traits that don't change at runtime (OS,
* rendering engine, environment). Dynamic capabilities like input modality
* (pointer/touch/hover) belong in a separate feature-detection layer because
* they can change mid-session (e.g. plugging in a mouse).
*
* Import as a namespace and pick the most precise group for the quirk:
*
* ```ts
* import { platform } from '@base-ui/utils/platform';
* if (platform.os.mac) { ... }
* if (platform.engine.webkit) { ... }
* ```
*
* Each category is its own module under `./platform/*`, so unused namespaces
* tree-shake away.
*
* - `os.*` for OS-specific behavior (keyboard shortcuts, native menus).
* - `engine.*` for rendering-engine bugs (CSS, layout, focus).
* - `screenReader.*` for AT-specific accessibility workarounds.
* - `env.*` for test-environment gating.
*/
export * as platform from "./parts.mjs";
+26
View File
@@ -0,0 +1,26 @@
/**
* Static platform-detection flags, evaluated once at module load. SSR-safe —
* every flag is `false` when `navigator` is undefined.
*
* Scope is intentionally limited to traits that don't change at runtime (OS,
* rendering engine, environment). Dynamic capabilities like input modality
* (pointer/touch/hover) belong in a separate feature-detection layer because
* they can change mid-session (e.g. plugging in a mouse).
*
* Import as a namespace and pick the most precise group for the quirk:
*
* ```ts
* import { platform } from '@base-ui/utils/platform';
* if (platform.os.mac) { ... }
* if (platform.engine.webkit) { ... }
* ```
*
* Each category is its own module under `./platform/*`, so unused namespaces
* tree-shake away.
*
* - `os.*` for OS-specific behavior (keyboard shortcuts, native menus).
* - `engine.*` for rendering-engine bugs (CSS, layout, focus).
* - `screenReader.*` for AT-specific accessibility workarounds.
* - `env.*` for test-environment gating.
*/
export * as platform from "./parts.js";
+9
View File
@@ -0,0 +1,9 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.platform = void 0;
var _platform = _interopRequireWildcard(require("./parts"));
exports.platform = _platform;
+27
View File
@@ -0,0 +1,27 @@
/**
* Static platform-detection flags, evaluated once at module load. SSR-safe —
* every flag is `false` when `navigator` is undefined.
*
* Scope is intentionally limited to traits that don't change at runtime (OS,
* rendering engine, environment). Dynamic capabilities like input modality
* (pointer/touch/hover) belong in a separate feature-detection layer because
* they can change mid-session (e.g. plugging in a mouse).
*
* Import as a namespace and pick the most precise group for the quirk:
*
* ```ts
* import { platform } from '@base-ui/utils/platform';
* if (platform.os.mac) { ... }
* if (platform.engine.webkit) { ... }
* ```
*
* Each category is its own module under `./platform/*`, so unused namespaces
* tree-shake away.
*
* - `os.*` for OS-specific behavior (keyboard shortcuts, native menus).
* - `engine.*` for rendering-engine bugs (CSS, layout, focus).
* - `screenReader.*` for AT-specific accessibility workarounds.
* - `env.*` for test-environment gating.
*/
export * as platform from "./parts.mjs";
+11
View File
@@ -0,0 +1,11 @@
/** iPhone, iPad (including iPadOS 13+ reporting as macOS), iPod. */
export declare const ios: boolean;
export declare const android: boolean;
/** macOS desktop. Excludes iPadOS, which reports as `MacIntel`. */
export declare const mac: boolean;
/** Windows desktop. */
export declare const windows: boolean;
/** Linux desktop (including Chrome OS). */
export declare const linux: boolean;
/** Any Apple OS (`mac || ios`). */
export declare const apple: boolean;
+11
View File
@@ -0,0 +1,11 @@
/** iPhone, iPad (including iPadOS 13+ reporting as macOS), iPod. */
export declare const ios: boolean;
export declare const android: boolean;
/** macOS desktop. Excludes iPadOS, which reports as `MacIntel`. */
export declare const mac: boolean;
/** Windows desktop. */
export declare const windows: boolean;
/** Linux desktop (including Chrome OS). */
export declare const linux: boolean;
/** Any Apple OS (`mac || ios`). */
export declare const apple: boolean;
+28
View File
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.windows = exports.mac = exports.linux = exports.ios = exports.apple = exports.android = void 0;
var _shared = require("./shared");
// iPadOS 13+ reports `MacIntel` for `navigator.platform`; disambiguated via
// `maxTouchPoints` so iPad is classified as iOS, not macOS.
// https://github.com/mui/base-ui/issues/1309
/** iPhone, iPad (including iPadOS 13+ reporting as macOS), iPod. */
const ios = exports.ios = /^i(os$|p)/.test(_shared.lowerPlatform) || _shared.lowerPlatform === 'macintel' && _shared.maxTouchPoints > 1;
/** Android phones, tablets, and embedded Android browsers. */
const ANDROID_STRING = 'android';
const android = exports.android = _shared.lowerPlatform === ANDROID_STRING || _shared.lowerUserAgent.includes(ANDROID_STRING);
/** macOS desktop. Excludes iPadOS, which reports as `MacIntel`. */
const mac = exports.mac = !ios && _shared.lowerPlatform.startsWith('mac');
/** Windows desktop. */
const windows = exports.windows = _shared.lowerPlatform.startsWith('win');
/** Linux desktop (including Chrome OS). */
const linux = exports.linux = !android && /^(linux|chrome os)/.test(_shared.lowerPlatform);
/** Any Apple OS (`mac || ios`). */
const apple = exports.apple = mac || ios;
+23
View File
@@ -0,0 +1,23 @@
import { lowerUserAgent, lowerPlatform, maxTouchPoints } from "./shared.mjs";
// iPadOS 13+ reports `MacIntel` for `navigator.platform`; disambiguated via
// `maxTouchPoints` so iPad is classified as iOS, not macOS.
// https://github.com/mui/base-ui/issues/1309
/** iPhone, iPad (including iPadOS 13+ reporting as macOS), iPod. */
export const ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === 'macintel' && maxTouchPoints > 1;
/** Android phones, tablets, and embedded Android browsers. */
const ANDROID_STRING = 'android';
export const android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
/** macOS desktop. Excludes iPadOS, which reports as `MacIntel`. */
export const mac = !ios && lowerPlatform.startsWith('mac');
/** Windows desktop. */
export const windows = lowerPlatform.startsWith('win');
/** Linux desktop (including Chrome OS). */
export const linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
/** Any Apple OS (`mac || ios`). */
export const apple = mac || ios;
+4
View File
@@ -0,0 +1,4 @@
export * as os from "./os.mjs";
export * as engine from "./engine.mjs";
export * as screenReader from "./screen-reader.mjs";
export * as env from "./env.mjs";
+4
View File
@@ -0,0 +1,4 @@
export * as os from "./os.js";
export * as engine from "./engine.js";
export * as screenReader from "./screen-reader.js";
export * as env from "./env.js";
+15
View File
@@ -0,0 +1,15 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.screenReader = exports.os = exports.env = exports.engine = void 0;
var _os = _interopRequireWildcard(require("./os"));
exports.os = _os;
var _engine = _interopRequireWildcard(require("./engine"));
exports.engine = _engine;
var _screenReader = _interopRequireWildcard(require("./screen-reader"));
exports.screenReader = _screenReader;
var _env = _interopRequireWildcard(require("./env"));
exports.env = _env;
+4
View File
@@ -0,0 +1,4 @@
export * as os from "./os.mjs";
export * as engine from "./engine.mjs";
export * as screenReader from "./screen-reader.mjs";
export * as env from "./env.mjs";
+5
View File
@@ -0,0 +1,5 @@
/**
* The user *may* be using VoiceOver — actual activation is not detectable.
* True on any Apple platform (macOS, iOS, iPadOS).
*/
export declare const voiceOver: boolean;
+5
View File
@@ -0,0 +1,5 @@
/**
* The user *may* be using VoiceOver — actual activation is not detectable.
* True on any Apple platform (macOS, iOS, iPadOS).
*/
export declare const voiceOver: boolean;
+17
View File
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.voiceOver = void 0;
var _os = require("./os");
// Whether a screen reader is *actually* running cannot be detected. These flags
// identify platforms where a specific screen reader could be active. VoiceOver
// is the system screen reader on Apple platforms and works with every browser
// there, so the flag is purely an OS check; engine-specific quirks (e.g. the
// NSAccessibility virtual-cursor focus path) should be gated at the call site.
/**
* The user *may* be using VoiceOver — actual activation is not detectable.
* True on any Apple platform (macOS, iOS, iPadOS).
*/
const voiceOver = exports.voiceOver = _os.apple;
+12
View File
@@ -0,0 +1,12 @@
import { apple } from "./os.mjs";
// Whether a screen reader is *actually* running cannot be detected. These flags
// identify platforms where a specific screen reader could be active. VoiceOver
// is the system screen reader on Apple platforms and works with every browser
// there, so the flag is purely an OS check; engine-specific quirks (e.g. the
// NSAccessibility virtual-cursor focus path) should be gated at the call site.
/**
* The user *may* be using VoiceOver — actual activation is not detectable.
* True on any Apple platform (macOS, iOS, iPadOS).
*/
export const voiceOver = apple;
+4
View File
@@ -0,0 +1,4 @@
declare const maxTouchPoints: number;
export declare const lowerUserAgent: string;
export declare const lowerPlatform: string;
export { maxTouchPoints };
+4
View File
@@ -0,0 +1,4 @@
declare const maxTouchPoints: number;
export declare const lowerUserAgent: string;
export declare const lowerPlatform: string;
export { maxTouchPoints };
+51
View File
@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.maxTouchPoints = exports.lowerUserAgent = exports.lowerPlatform = void 0;
/**
* Reads `navigator.userAgent` / `navigator.platform` (legacy but universally
* supported) into a normalized shape. In development, prefers the modern
* `navigator.userAgentData` API on Chromium to avoid DevTools warnings about
* the deprecated reads; that branch is dead-code-eliminated in production
* builds to keep the bundle small.
*
* Returns empty/zero values when `navigator` is undefined (SSR), so every
* derived flag safely evaluates to `false`.
*/
function readRawData() {
if (typeof navigator === 'undefined') {
return {
userAgent: '',
platform: '',
maxTouchPoints: 0
};
}
if (process.env.NODE_ENV !== 'production') {
const uaData = navigator.userAgentData;
if (uaData && Array.isArray(uaData.brands)) {
return {
userAgent: uaData.brands.map(({
brand,
version
}) => `${brand}/${version}`).join(' '),
platform: uaData.platform ?? navigator.platform ?? '',
maxTouchPoints: navigator.maxTouchPoints ?? 0
};
}
}
return {
userAgent: navigator.userAgent,
platform: navigator.platform ?? '',
maxTouchPoints: navigator.maxTouchPoints ?? 0
};
}
const {
userAgent,
platform,
maxTouchPoints
} = readRawData();
exports.maxTouchPoints = maxTouchPoints;
const lowerUserAgent = exports.lowerUserAgent = userAgent.toLowerCase();
const lowerPlatform = exports.lowerPlatform = platform.toLowerCase();
+45
View File
@@ -0,0 +1,45 @@
/**
* Reads `navigator.userAgent` / `navigator.platform` (legacy but universally
* supported) into a normalized shape. In development, prefers the modern
* `navigator.userAgentData` API on Chromium to avoid DevTools warnings about
* the deprecated reads; that branch is dead-code-eliminated in production
* builds to keep the bundle small.
*
* Returns empty/zero values when `navigator` is undefined (SSR), so every
* derived flag safely evaluates to `false`.
*/
function readRawData() {
if (typeof navigator === 'undefined') {
return {
userAgent: '',
platform: '',
maxTouchPoints: 0
};
}
if (process.env.NODE_ENV !== 'production') {
const uaData = navigator.userAgentData;
if (uaData && Array.isArray(uaData.brands)) {
return {
userAgent: uaData.brands.map(({
brand,
version
}) => `${brand}/${version}`).join(' '),
platform: uaData.platform ?? navigator.platform ?? '',
maxTouchPoints: navigator.maxTouchPoints ?? 0
};
}
}
return {
userAgent: navigator.userAgent,
platform: navigator.platform ?? '',
maxTouchPoints: navigator.maxTouchPoints ?? 0
};
}
const {
userAgent,
platform,
maxTouchPoints
} = readRawData();
export const lowerUserAgent = userAgent.toLowerCase();
export const lowerPlatform = platform.toLowerCase();
export { maxTouchPoints };