Grabbed dndbeyond's source code

```
~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js
```
This commit is contained in:
2025-05-28 11:50:03 -07:00
commit 8df9031d27
3592 changed files with 319051 additions and 0 deletions
@@ -0,0 +1,26 @@
import * as React from "react";
import { SvgConstantBuilderTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asBuilderSvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsBuilderSvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asBuilderSvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
fillColor: SvgConstantBuilderTheme.fill,
secondaryFillColor: SvgConstantBuilderTheme.secondaryFill,
className: "ddbc-svg--builder",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,28 @@
import * as React from "react";
import { SvgConstantDarkModeNegativeTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asDarkModeNegativeSvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsDarkModeNegativeSvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asDarkModeNegativeSvg(${getDisplayName(
WrappedComponent
)})`;
static defaultProps = {
fillColor: SvgConstantDarkModeNegativeTheme.fill,
secondaryFillColor: SvgConstantDarkModeNegativeTheme.secondaryFill,
className: "ddbc-svg--positive",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,28 @@
import * as React from "react";
import { SvgConstantDarkModePositiveTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asDarkModePositiveSvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsDarkModePositiveSvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asDarkModePositiveSvg(${getDisplayName(
WrappedComponent
)})`;
static defaultProps = {
fillColor: SvgConstantDarkModePositiveTheme.fill,
secondaryFillColor: SvgConstantDarkModePositiveTheme.secondaryFill,
className: "ddbc-svg--positive",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,26 @@
import * as React from "react";
import { SvgConstantDarkTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asDarkSvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsDarkSvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asDarkSvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
fillColor: SvgConstantDarkTheme.fill,
secondaryFillColor: SvgConstantDarkTheme.secondaryFill,
className: "ddbc-svg--dark",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,26 @@
import * as React from "react";
import { SvgConstantDisabledTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asDisabledSvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsDisabledSvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asDisabledSvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
fillColor: SvgConstantDisabledTheme.fill,
secondaryFillColor: SvgConstantDisabledTheme.secondaryFill,
className: "ddbc-svg--disabled",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,26 @@
import * as React from "react";
import { SvgConstantEmptyTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asEmptySvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsEmptySvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asEmptySvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
fillColor: SvgConstantEmptyTheme.fill,
secondaryFillColor: SvgConstantEmptyTheme.secondaryFill,
className: "ddbc-svg--empty",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,26 @@
import * as React from "react";
import { SvgConstantGrayTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asGraySvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsGraySvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asGraySvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
fillColor: SvgConstantGrayTheme.fill,
secondaryFillColor: SvgConstantGrayTheme.secondaryFill,
className: "ddbc-svg--gray",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,26 @@
import * as React from "react";
import { SvgConstantLightTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asLightSvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsLightSvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asLightSvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
fillColor: SvgConstantLightTheme.fill,
secondaryFillColor: SvgConstantLightTheme.secondaryFill,
className: "ddbc-svg--light",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,26 @@
import * as React from "react";
import { SvgConstantModifiedTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asModifiedSvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsModifiedSvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asModifiedSvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
fillColor: SvgConstantModifiedTheme.fill,
secondaryFillColor: SvgConstantModifiedTheme.secondaryFill,
className: "ddbc-svg--modified",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,26 @@
import * as React from "react";
import { SvgConstantNegativeTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asNegativeSvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsNegativeSvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asNegativeSvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
fillColor: SvgConstantNegativeTheme.fill,
secondaryFillColor: SvgConstantNegativeTheme.secondaryFill,
className: "ddbc-svg--negative",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,26 @@
import * as React from "react";
import { SvgConstantPositiveTheme } from "../SvgConstants";
import { InjectedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asPositiveSvg<
C extends React.ComponentType<React.ComponentProps<C> & InjectedSvgProps>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsPositiveSvg extends React.PureComponent<
ResolvedProps & InjectedSvgProps
> {
static displayName = `asPositiveSvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
fillColor: SvgConstantPositiveTheme.fill,
secondaryFillColor: SvgConstantPositiveTheme.secondaryFill,
className: "ddbc-svg--positive",
};
render() {
return <WrappedComponent {...(this.props as any)} />;
}
};
}
@@ -0,0 +1,27 @@
import * as React from "react";
import { ThemedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asThemedSvg<
C extends React.ComponentType<React.ComponentProps<C>>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsThemedSvg extends React.PureComponent<ThemedSvgProps> {
static displayName = `asThemedSvg(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
className: "ddbc-svg--themed",
};
render() {
return (
<WrappedComponent
{...(this.props as any)}
fillColor={this.props.theme.themeColor}
backgroundColor={this.props.theme.backgroundColor}
/>
);
}
};
}
@@ -0,0 +1,33 @@
import Color from "color";
import * as React from "react";
import { ThemedSvgProps } from "./hocTypings";
import { getDisplayName } from "./utils";
export function asThemedWithOpacitySvg<
C extends React.ComponentType<React.ComponentProps<C>>,
ResolvedProps = JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>
>(WrappedComponent: C) {
return class AsThemedWithOpacitSvg extends React.PureComponent<ThemedSvgProps> {
static displayName = `asThemedWithOpacitySvg(${getDisplayName(
WrappedComponent
)})`;
static defaultProps = {
className: "ddbc-svg--themed",
};
render() {
return (
<WrappedComponent
{...(this.props as any)}
fillColor={Color(this.props.theme.themeColor)
.alpha(0.4)
.rgb()
.string()}
backgroundColor={this.props.theme.backgroundColor}
/>
);
}
};
}
@@ -0,0 +1,7 @@
import * as React from "react";
export function getDisplayName(
WrappedComponent: React.ComponentType<React.ComponentProps<any>>
) {
return WrappedComponent.displayName || WrappedComponent.name || "Component";
}