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,53 @@
import React from "react";
import { HtmlSelectOption } from "@dndbeyond/character-rules-engine/es";
import { DataLoadingStatusEnum } from "../../../componentConstants";
import { Button } from "../../../legacy/Button";
import { Select } from "../../../legacy/Select";
export interface DiceRollActionNodeProps {
rollKey: string;
rollStatus: DataLoadingStatusEnum;
rollTotal: number | null;
assignedValue: string | null;
options?: Array<HtmlSelectOption>;
rollButtonText?: string;
selectPlaceholderText?: string;
onRoll: () => void;
onChange?: (newValue: string | null) => void;
}
const DiceRollActionNode: React.FunctionComponent<DiceRollActionNodeProps> = ({
rollKey,
rollStatus,
rollTotal,
assignedValue,
options,
onRoll,
onChange,
rollButtonText = "Roll",
selectPlaceholderText = "--",
}) => {
if (options?.length && rollTotal !== null) {
return (
<Select
id={rollKey}
value={assignedValue}
options={options}
placeholder={selectPlaceholderText}
onChange={onChange}
/>
);
}
return (
<Button
size="large"
// style='outline'
onClick={onRoll}
>
{rollButtonText}
</Button>
);
};
export default React.memo(DiceRollActionNode);