Latest repo

This commit is contained in:
Marc
2025-06-02 16:42:16 +00:00
parent 53ddf1a329
commit cde5fae175
27907 changed files with 3875388 additions and 1 deletions

12
node_modules/react-loading-skeleton/dist/Skeleton.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import React, { CSSProperties, PropsWithChildren, ReactElement } from 'react';
import { SkeletonStyleProps } from './SkeletonStyleProps.js';
export interface SkeletonProps extends SkeletonStyleProps {
count?: number;
wrapper?: React.FunctionComponent<PropsWithChildren<unknown>>;
className?: string;
containerClassName?: string;
containerTestId?: string;
circle?: boolean;
style?: CSSProperties;
}
export declare function Skeleton({ count, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle, style: styleProp, ...originalPropsStyleOptions }: SkeletonProps): ReactElement;

View File

@@ -0,0 +1,12 @@
export interface SkeletonStyleProps {
baseColor?: string;
highlightColor?: string;
width?: string | number;
height?: string | number;
borderRadius?: string | number;
inline?: boolean;
duration?: number;
direction?: 'ltr' | 'rtl';
enableAnimation?: boolean;
customHighlightBackground?: string;
}

View File

@@ -0,0 +1,4 @@
import { ReactElement, PropsWithChildren } from 'react';
import { SkeletonStyleProps } from './SkeletonStyleProps.js';
export type SkeletonThemeProps = PropsWithChildren<SkeletonStyleProps>;
export declare function SkeletonTheme({ children, ...styleOptions }: SkeletonThemeProps): ReactElement;

View File

@@ -0,0 +1,6 @@
import React from 'react';
import { SkeletonStyleProps } from './SkeletonStyleProps.js';
/**
* @internal
*/
export declare const SkeletonThemeContext: React.Context<SkeletonStyleProps>;

106
node_modules/react-loading-skeleton/dist/index.cjs generated vendored Normal file
View File

@@ -0,0 +1,106 @@
'use client';
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var React = require('react');
/**
* @internal
*/
const SkeletonThemeContext = React.createContext({});
/* eslint-disable react/no-array-index-key */
const defaultEnableAnimation = true;
// For performance & cleanliness, don't add any inline styles unless we have to
function styleOptionsToCssProperties({ baseColor, highlightColor, width, height, borderRadius, circle, direction, duration, enableAnimation = defaultEnableAnimation, customHighlightBackground, }) {
const style = {};
if (direction === 'rtl')
style['--animation-direction'] = 'reverse';
if (typeof duration === 'number')
style['--animation-duration'] = `${duration}s`;
if (!enableAnimation)
style['--pseudo-element-display'] = 'none';
if (typeof width === 'string' || typeof width === 'number')
style.width = width;
if (typeof height === 'string' || typeof height === 'number')
style.height = height;
if (typeof borderRadius === 'string' || typeof borderRadius === 'number')
style.borderRadius = borderRadius;
if (circle)
style.borderRadius = '50%';
if (typeof baseColor !== 'undefined')
style['--base-color'] = baseColor;
if (typeof highlightColor !== 'undefined')
style['--highlight-color'] = highlightColor;
if (typeof customHighlightBackground === 'string')
style['--custom-highlight-background'] = customHighlightBackground;
return style;
}
function Skeleton({ count = 1, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle = false, style: styleProp, ...originalPropsStyleOptions }) {
var _a, _b, _c;
const contextStyleOptions = React.useContext(SkeletonThemeContext);
const propsStyleOptions = { ...originalPropsStyleOptions };
// DO NOT overwrite style options from the context if `propsStyleOptions`
// has properties explicity set to undefined
for (const [key, value] of Object.entries(originalPropsStyleOptions)) {
if (typeof value === 'undefined') {
delete propsStyleOptions[key];
}
}
// Props take priority over context
const styleOptions = {
...contextStyleOptions,
...propsStyleOptions,
circle,
};
// `styleProp` has the least priority out of everything
const style = {
...styleProp,
...styleOptionsToCssProperties(styleOptions),
};
let className = 'react-loading-skeleton';
if (customClassName)
className += ` ${customClassName}`;
const inline = (_a = styleOptions.inline) !== null && _a !== void 0 ? _a : false;
const elements = [];
const countCeil = Math.ceil(count);
for (let i = 0; i < countCeil; i++) {
let thisStyle = style;
if (countCeil > count && i === countCeil - 1) {
// count is not an integer and we've reached the last iteration of
// the loop, so add a "fractional" skeleton.
//
// For example, if count is 3.5, we've already added 3 full
// skeletons, so now we add one more skeleton that is 0.5 times the
// original width.
const width = (_b = thisStyle.width) !== null && _b !== void 0 ? _b : '100%'; // 100% is the default since that's what's in the CSS
const fractionalPart = count % 1;
const fractionalWidth = typeof width === 'number'
? width * fractionalPart
: `calc(${width} * ${fractionalPart})`;
thisStyle = { ...thisStyle, width: fractionalWidth };
}
const skeletonSpan = (React.createElement("span", { className: className, style: thisStyle, key: i }, "\u200C"));
if (inline) {
elements.push(skeletonSpan);
}
else {
// Without the <br />, the skeleton lines will all run together if
// `width` is specified
elements.push(React.createElement(React.Fragment, { key: i },
skeletonSpan,
React.createElement("br", null)));
}
}
return (React.createElement("span", { className: containerClassName, "data-testid": containerTestId, "aria-live": "polite", "aria-busy": (_c = styleOptions.enableAnimation) !== null && _c !== void 0 ? _c : defaultEnableAnimation }, Wrapper
? elements.map((el, i) => React.createElement(Wrapper, { key: i }, el))
: elements));
}
function SkeletonTheme({ children, ...styleOptions }) {
return (React.createElement(SkeletonThemeContext.Provider, { value: styleOptions }, children));
}
exports.SkeletonTheme = SkeletonTheme;
exports.default = Skeleton;

5
node_modules/react-loading-skeleton/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { Skeleton } from './Skeleton.js';
export default Skeleton;
export * from './SkeletonStyleProps.js';
export * from './SkeletonTheme.js';
export type { SkeletonProps } from './Skeleton.js';

101
node_modules/react-loading-skeleton/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,101 @@
'use client';
import React from 'react';
/**
* @internal
*/
const SkeletonThemeContext = React.createContext({});
/* eslint-disable react/no-array-index-key */
const defaultEnableAnimation = true;
// For performance & cleanliness, don't add any inline styles unless we have to
function styleOptionsToCssProperties({ baseColor, highlightColor, width, height, borderRadius, circle, direction, duration, enableAnimation = defaultEnableAnimation, customHighlightBackground, }) {
const style = {};
if (direction === 'rtl')
style['--animation-direction'] = 'reverse';
if (typeof duration === 'number')
style['--animation-duration'] = `${duration}s`;
if (!enableAnimation)
style['--pseudo-element-display'] = 'none';
if (typeof width === 'string' || typeof width === 'number')
style.width = width;
if (typeof height === 'string' || typeof height === 'number')
style.height = height;
if (typeof borderRadius === 'string' || typeof borderRadius === 'number')
style.borderRadius = borderRadius;
if (circle)
style.borderRadius = '50%';
if (typeof baseColor !== 'undefined')
style['--base-color'] = baseColor;
if (typeof highlightColor !== 'undefined')
style['--highlight-color'] = highlightColor;
if (typeof customHighlightBackground === 'string')
style['--custom-highlight-background'] = customHighlightBackground;
return style;
}
function Skeleton({ count = 1, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle = false, style: styleProp, ...originalPropsStyleOptions }) {
var _a, _b, _c;
const contextStyleOptions = React.useContext(SkeletonThemeContext);
const propsStyleOptions = { ...originalPropsStyleOptions };
// DO NOT overwrite style options from the context if `propsStyleOptions`
// has properties explicity set to undefined
for (const [key, value] of Object.entries(originalPropsStyleOptions)) {
if (typeof value === 'undefined') {
delete propsStyleOptions[key];
}
}
// Props take priority over context
const styleOptions = {
...contextStyleOptions,
...propsStyleOptions,
circle,
};
// `styleProp` has the least priority out of everything
const style = {
...styleProp,
...styleOptionsToCssProperties(styleOptions),
};
let className = 'react-loading-skeleton';
if (customClassName)
className += ` ${customClassName}`;
const inline = (_a = styleOptions.inline) !== null && _a !== void 0 ? _a : false;
const elements = [];
const countCeil = Math.ceil(count);
for (let i = 0; i < countCeil; i++) {
let thisStyle = style;
if (countCeil > count && i === countCeil - 1) {
// count is not an integer and we've reached the last iteration of
// the loop, so add a "fractional" skeleton.
//
// For example, if count is 3.5, we've already added 3 full
// skeletons, so now we add one more skeleton that is 0.5 times the
// original width.
const width = (_b = thisStyle.width) !== null && _b !== void 0 ? _b : '100%'; // 100% is the default since that's what's in the CSS
const fractionalPart = count % 1;
const fractionalWidth = typeof width === 'number'
? width * fractionalPart
: `calc(${width} * ${fractionalPart})`;
thisStyle = { ...thisStyle, width: fractionalWidth };
}
const skeletonSpan = (React.createElement("span", { className: className, style: thisStyle, key: i }, "\u200C"));
if (inline) {
elements.push(skeletonSpan);
}
else {
// Without the <br />, the skeleton lines will all run together if
// `width` is specified
elements.push(React.createElement(React.Fragment, { key: i },
skeletonSpan,
React.createElement("br", null)));
}
}
return (React.createElement("span", { className: containerClassName, "data-testid": containerTestId, "aria-live": "polite", "aria-busy": (_c = styleOptions.enableAnimation) !== null && _c !== void 0 ? _c : defaultEnableAnimation }, Wrapper
? elements.map((el, i) => React.createElement(Wrapper, { key: i }, el))
: elements));
}
function SkeletonTheme({ children, ...styleOptions }) {
return (React.createElement(SkeletonThemeContext.Provider, { value: styleOptions }, children));
}
export { SkeletonTheme, Skeleton as default };

57
node_modules/react-loading-skeleton/dist/skeleton.css generated vendored Normal file
View File

@@ -0,0 +1,57 @@
@keyframes react-loading-skeleton {
100% {
transform: translateX(100%);
}
}
.react-loading-skeleton {
--base-color: #ebebeb;
--highlight-color: #f5f5f5;
--animation-duration: 1.5s;
--animation-direction: normal;
--pseudo-element-display: block; /* Enable animation */
background-color: var(--base-color);
width: 100%;
border-radius: 0.25rem;
display: inline-flex;
line-height: 1;
position: relative;
user-select: none;
overflow: hidden;
}
.react-loading-skeleton::after {
content: ' ';
display: var(--pseudo-element-display);
position: absolute;
top: 0;
left: 0;
right: 0;
height: 100%;
background-repeat: no-repeat;
background-image: var(
--custom-highlight-background,
linear-gradient(
90deg,
var(--base-color) 0%,
var(--highlight-color) 50%,
var(--base-color) 100%
)
);
transform: translateX(-100%);
animation-name: react-loading-skeleton;
animation-direction: var(--animation-direction);
animation-duration: var(--animation-duration);
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
@media (prefers-reduced-motion) {
.react-loading-skeleton {
--pseudo-element-display: none; /* Disable animation */
}
}