@onepercentio/one-ui 0.29.2 → 0.29.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/hooks/useHero.js +3 -2
- package/dist-ts/components/Switch/Switch.d.ts +1 -1
- package/dist-ts/hooks/useHero.js +5 -4
- package/dist-ts/hooks/useHero.js.map +1 -1
- package/package.json +5 -1
- package/src/assets/img/svg/checkbox.svg +0 -3
- package/src/assets/styles/index.scss +0 -2
- package/src/assets/styles/mixins.scss +0 -12
- package/src/assets/styles/variables.scss +0 -49
- package/src/components/AdaptiveButton/AdaptiveButton.module.scss +0 -7
- package/src/components/AdaptiveButton/AdaptiveButton.tsx +0 -26
- package/src/components/AdaptiveButton/index.tsx +0 -2
- package/src/components/AdaptiveContainer/AdaptiveContainer.module.scss +0 -53
- package/src/components/AdaptiveContainer/AdaptiveContainer.tsx +0 -200
- package/src/components/AdaptiveContainer/index.tsx +0 -2
- package/src/components/AdaptiveDialog/AdaptiveDialog.module.scss +0 -147
- package/src/components/AdaptiveDialog/AdaptiveDialog.tsx +0 -97
- package/src/components/AdaptiveDialog/index.tsx +0 -2
- package/src/components/AdaptiveSidebar/AdaptiveSidebar.module.scss +0 -49
- package/src/components/AdaptiveSidebar/AdaptiveSidebar.sample.tsx +0 -10
- package/src/components/AdaptiveSidebar/AdaptiveSidebar.tsx +0 -123
- package/src/components/AdaptiveSidebar/index.tsx +0 -2
- package/src/components/AnchoredTooltip/AnchoredTooltip.module.scss +0 -64
- package/src/components/AnchoredTooltip/AnchoredTooltip.tsx +0 -250
- package/src/components/AnchoredTooltip/index.tsx +0 -2
- package/src/components/AnimatedEntrance/AnimatedEntrance.module.scss +0 -108
- package/src/components/AnimatedEntrance/AnimatedEntrance.tsx +0 -227
- package/src/components/AnimatedEntrance/index.tsx +0 -2
- package/src/components/AsyncWrapper/AsyncWrapper.tsx +0 -38
- package/src/components/AsyncWrapper/index.tsx +0 -2
- package/src/components/Avatar/Avatar.module.scss +0 -22
- package/src/components/Avatar/Avatar.tsx +0 -31
- package/src/components/Avatar/index.tsx +0 -2
- package/src/components/BucketFill/BucketFill.module.scss +0 -36
- package/src/components/BucketFill/BucketFill.tsx +0 -65
- package/src/components/BucketFill/index.tsx +0 -2
- package/src/components/Button/Button.module.scss +0 -45
- package/src/components/Button/Button.tsx +0 -40
- package/src/components/Button/index.tsx +0 -2
- package/src/components/Card/Card.module.scss +0 -12
- package/src/components/Card/Card.tsx +0 -9
- package/src/components/Card/index.tsx +0 -2
- package/src/components/Chart/Chart.e2e.ts +0 -4
- package/src/components/Chart/Chart.logic.tsx +0 -8
- package/src/components/Chart/Chart.module.scss +0 -58
- package/src/components/Chart/Chart.tsx +0 -2
- package/src/components/Chart/Chart.types.ts +0 -35
- package/src/components/Chart/Chart.view.tsx +0 -241
- package/src/components/Chart/index.tsx +0 -2
- package/src/components/CheckBox/CheckBox.module.scss +0 -36
- package/src/components/CheckBox/CheckBox.tsx +0 -63
- package/src/components/CheckBox/index.tsx +0 -2
- package/src/components/CodeInput/CodeInput.module.scss +0 -5
- package/src/components/CodeInput/CodeInput.tsx +0 -84
- package/src/components/CodeInput/index.tsx +0 -2
- package/src/components/Collapsable/Collapsable.module.scss +0 -42
- package/src/components/Collapsable/Collapsable.tsx +0 -253
- package/src/components/Collapsable/index.tsx +0 -2
- package/src/components/Countdown/Countdown.tsx +0 -130
- package/src/components/Countdown/index.tsx +0 -2
- package/src/components/CurrencyInput/CurrencyInput.hook.ts +0 -37
- package/src/components/CurrencyInput/CurrencyInput.tsx +0 -25
- package/src/components/CurrencyInput/index.tsx +0 -2
- package/src/components/Divider/Divider.module.scss +0 -7
- package/src/components/Divider/Divider.tsx +0 -13
- package/src/components/Divider/index.tsx +0 -2
- package/src/components/EmailInput/EmailInput.module.scss +0 -0
- package/src/components/EmailInput/EmailInput.tsx +0 -51
- package/src/components/EmailInput/index.tsx +0 -2
- package/src/components/FadeIn/FadeIn.module.scss +0 -9
- package/src/components/FadeIn/FadeIn.tsx +0 -77
- package/src/components/FadeIn/index.tsx +0 -2
- package/src/components/FileInput/FileInput.module.scss +0 -6
- package/src/components/FileInput/FileInput.tsx +0 -75
- package/src/components/FileInput/View/BigFactory/BigFactory.module.scss +0 -20
- package/src/components/FileInput/View/BigFactory/BigFactory.tsx +0 -48
- package/src/components/FileInput/View/BigFactory/index.tsx +0 -2
- package/src/components/FileInput/View/Compact/Compact.module.scss +0 -68
- package/src/components/FileInput/View/Compact/Compact.tsx +0 -151
- package/src/components/FileInput/View/Compact/index.tsx +0 -2
- package/src/components/FileInput/View/View.types.ts +0 -12
- package/src/components/FileInput/index.tsx +0 -2
- package/src/components/FlowController/FlowController.module.scss +0 -47
- package/src/components/FlowController/FlowController.tsx +0 -93
- package/src/components/FlowController/index.tsx +0 -2
- package/src/components/Form/Form.tsx +0 -243
- package/src/components/Form/index.ts +0 -2
- package/src/components/Form/v2/Form.hook.ts +0 -341
- package/src/components/Form/v2/Form.module.scss +0 -0
- package/src/components/Form/v2/Form.tsx +0 -78
- package/src/components/Form/v2/Form.types.ts +0 -118
- package/src/components/Form/v2/FormField/Extensions/DateField/DateField.module.scss +0 -0
- package/src/components/Form/v2/FormField/Extensions/DateField/DateField.tsx +0 -73
- package/src/components/Form/v2/FormField/Extensions/DateField/index.tsx +0 -2
- package/src/components/Form/v2/FormField/Extensions/PhoneField/PhoneField.module.scss +0 -0
- package/src/components/Form/v2/FormField/Extensions/PhoneField/PhoneField.tsx +0 -91
- package/src/components/Form/v2/FormField/Extensions/PhoneField/index.tsx +0 -2
- package/src/components/Form/v2/FormField/FormField.module.scss +0 -0
- package/src/components/Form/v2/FormField/FormField.tsx +0 -378
- package/src/components/Form/v2/FormField/FormField.types.ts +0 -129
- package/src/components/Form/v2/FormField/index.tsx +0 -2
- package/src/components/Form/v2/index.tsx +0 -2
- package/src/components/Freeze/Freeze.tsx +0 -9
- package/src/components/Freeze/index.tsx +0 -2
- package/src/components/HSForms/HSForms.tsx +0 -57
- package/src/components/HSForms/index.tsx +0 -2
- package/src/components/Header/Header.module.scss +0 -119
- package/src/components/Header/Header.tsx +0 -138
- package/src/components/Header/index.tsx +0 -2
- package/src/components/HeaderCloseBtn/HeaderCloseBtn.module.scss +0 -44
- package/src/components/HeaderCloseBtn/HeaderCloseBtn.tsx +0 -28
- package/src/components/HeaderCloseBtn/index.tsx +0 -2
- package/src/components/InfinityScroll/InfinityScroll.module.scss +0 -30
- package/src/components/InfinityScroll/InfinityScroll.tsx +0 -187
- package/src/components/InfinityScroll/index.tsx +0 -2
- package/src/components/Input/Input.module.scss +0 -71
- package/src/components/Input/Input.tsx +0 -134
- package/src/components/Input/index.tsx +0 -2
- package/src/components/InstantCounter/InstantCounter.tsx +0 -77
- package/src/components/InstantCounter/index.tsx +0 -2
- package/src/components/LavaLamp/LavaLamp.data.tsx +0 -114
- package/src/components/LavaLamp/LavaLamp.module.scss +0 -26
- package/src/components/LavaLamp/LavaLamp.tsx +0 -131
- package/src/components/LavaLamp/index.tsx +0 -2
- package/src/components/LavaLamp/v2/LavaLamp.module.scss +0 -23
- package/src/components/LavaLamp/v2/LavaLamp.tsx +0 -197
- package/src/components/LinkToId/LinkToId.module.scss +0 -4
- package/src/components/LinkToId/LinkToId.tsx +0 -51
- package/src/components/LinkToId/index.tsx +0 -2
- package/src/components/Loader/Loader.module.scss +0 -40
- package/src/components/Loader/Loader.tsx +0 -18
- package/src/components/Loader/index.tsx +0 -2
- package/src/components/LoaderDotsIndicator/LoaderDotsIndicator.tsx +0 -34
- package/src/components/LoaderDotsIndicator/index.tsx +0 -2
- package/src/components/LoopableVideo/LoopableVideo.tsx +0 -37
- package/src/components/LoopableVideo/index.tsx +0 -2
- package/src/components/MainGrid/MainGrid.module.scss +0 -28
- package/src/components/MainGrid/MainGrid.tsx +0 -68
- package/src/components/MainGrid/index.tsx +0 -2
- package/src/components/MutableHamburgerButton/MutableHamburgerButton.module.scss +0 -220
- package/src/components/MutableHamburgerButton/MutableHamburgerButton.tsx +0 -38
- package/src/components/MutableHamburgerButton/index.tsx +0 -2
- package/src/components/Notification/Notification.module.scss +0 -25
- package/src/components/Notification/Notification.tsx +0 -13
- package/src/components/Notification/index.tsx +0 -2
- package/src/components/OrderableList/OrderableList.module.scss +0 -98
- package/src/components/OrderableList/OrderableList.tsx +0 -564
- package/src/components/OrderableList/index.tsx +0 -2
- package/src/components/PaginationIndicator/PaginationIndicator.tsx +0 -365
- package/src/components/PaginationIndicator/index.tsx +0 -2
- package/src/components/Parallax/Parallax.module.scss +0 -28
- package/src/components/Parallax/Parallax.tsx +0 -225
- package/src/components/Parallax/index.tsx +0 -2
- package/src/components/Parallax/math/helpers.ts +0 -289
- package/src/components/PasswordInput/PasswordInput.module.scss +0 -17
- package/src/components/PasswordInput/PasswordInput.tsx +0 -154
- package/src/components/PasswordInput/index.tsx +0 -2
- package/src/components/PingPongText/PingPongText.module.scss +0 -4
- package/src/components/PingPongText/PingPongText.tsx +0 -83
- package/src/components/PingPongText/index.tsx +0 -2
- package/src/components/PixelatedScan/PixelatedScan.module.scss +0 -86
- package/src/components/PixelatedScan/PixelatedScan.tsx +0 -175
- package/src/components/PixelatedScan/index.tsx +0 -2
- package/src/components/Portal/Portal.module.scss +0 -3
- package/src/components/Portal/Portal.tsx +0 -68
- package/src/components/Portal/index.tsx +0 -2
- package/src/components/ProgressBar/ProgressBar.module.scss +0 -44
- package/src/components/ProgressBar/ProgressBar.tsx +0 -124
- package/src/components/ProgressBar/index.tsx +0 -2
- package/src/components/ProgressTexts/ProgressTexts.module.scss +0 -37
- package/src/components/ProgressTexts/ProgressTexts.tsx +0 -85
- package/src/components/ProgressTexts/index.tsx +0 -2
- package/src/components/Radio/Radio.module.scss +0 -36
- package/src/components/Radio/Radio.tsx +0 -53
- package/src/components/Radio/index.tsx +0 -2
- package/src/components/SectionContainer/SectionContainer.module.scss +0 -30
- package/src/components/SectionContainer/SectionContainer.tsx +0 -49
- package/src/components/SectionContainer/index.tsx +0 -2
- package/src/components/Select/Select.module.scss +0 -58
- package/src/components/Select/Select.tsx +0 -192
- package/src/components/Select/index.tsx +0 -2
- package/src/components/Skeleton/Skeleton.module.scss +0 -21
- package/src/components/Skeleton/Skeleton.tsx +0 -29
- package/src/components/Skeleton/index.tsx +0 -2
- package/src/components/Spacing/Spacing.module.scss +0 -13
- package/src/components/Spacing/Spacing.tsx +0 -24
- package/src/components/Spacing/index.tsx +0 -2
- package/src/components/StaticScroller/StaticScroller.module.scss +0 -14
- package/src/components/StaticScroller/StaticScroller.tsx +0 -83
- package/src/components/StaticScroller/index.tsx +0 -2
- package/src/components/Switch/Switch.module.scss +0 -43
- package/src/components/Switch/Switch.tsx +0 -41
- package/src/components/Switch/index.tsx +0 -2
- package/src/components/Table/Table.module.scss +0 -76
- package/src/components/Table/Table.tsx +0 -152
- package/src/components/Table/index.tsx +0 -2
- package/src/components/Tabs/Tabs.module.scss +0 -40
- package/src/components/Tabs/Tabs.tsx +0 -104
- package/src/components/Tabs/index.tsx +0 -2
- package/src/components/Text/Text.module.scss +0 -81
- package/src/components/Text/Text.tsx +0 -42
- package/src/components/Text/index.tsx +0 -2
- package/src/components/Transition/MasksFactory/DiagonalReveal.tsx +0 -47
- package/src/components/Transition/MasksFactory/DiagonalSquareToBalls.tsx +0 -78
- package/src/components/Transition/MasksFactory/PhysicsSquares.tsx +0 -106
- package/src/components/Transition/MasksFactory/SquareToBalls.tsx +0 -66
- package/src/components/Transition/MasksFactory/utils.ts +0 -35
- package/src/components/Transition/Transition.module.scss +0 -211
- package/src/components/Transition/Transition.tsx +0 -495
- package/src/components/Transition/index.tsx +0 -2
- package/src/components/UncontrolledTransition/UncontrolledTransition.ai.md +0 -9
- package/src/components/UncontrolledTransition/UncontrolledTransition.sample.tsx +0 -34
- package/src/components/UncontrolledTransition/UncontrolledTransition.tsx +0 -143
- package/src/components/UncontrolledTransition/index.tsx +0 -2
- package/src/components/WalletConnectionWrapper/WalletConnectionWrapper.tsx +0 -212
- package/src/components/WalletConnectionWrapper/index.tsx +0 -2
- package/src/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.module.scss +0 -5
- package/src/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.tsx +0 -52
- package/src/components/utilitary/ScrollAndFocusLock/index.tsx +0 -2
- package/src/context/AsyncProcess.tsx +0 -107
- package/src/context/ContextAsyncControl.tsx +0 -89
- package/src/context/CustomBrowserRouter.tsx +0 -55
- package/src/context/OneUIProvider.tsx +0 -308
- package/src/hooks/logs/useDependencyChangeDetection.ts +0 -25
- package/src/hooks/logs/useIsMounting.ts +0 -7
- package/src/hooks/persistence/useLocalStorage.ts +0 -45
- package/src/hooks/shims/ObjectWatchShim.ts +0 -56
- package/src/hooks/ui/useAdaptiveImage.tsx +0 -36
- package/src/hooks/ui/useAlternating.tsx +0 -22
- package/src/hooks/ui/useBreakpoint.tsx +0 -21
- package/src/hooks/ui/useCustomScrollbar.module.scss +0 -20
- package/src/hooks/ui/useCustomScrollbar.tsx +0 -22
- package/src/hooks/ui/useEffectIf.ts +0 -11
- package/src/hooks/ui/useMouseHover.tsx +0 -26
- package/src/hooks/ui/usePaginationControls.module.scss +0 -16
- package/src/hooks/ui/usePaginationControls.tsx +0 -176
- package/src/hooks/ui/useSnapToViewport.module.scss +0 -6
- package/src/hooks/ui/useSnapToViewport.ts +0 -28
- package/src/hooks/ui/useTilt.tsx +0 -219
- package/src/hooks/ui/useZoomable.module.scss +0 -34
- package/src/hooks/ui/useZoomable.tsx +0 -144
- package/src/hooks/useAsyncControl.ai.md +0 -25
- package/src/hooks/useAsyncControl.ts +0 -101
- package/src/hooks/useContainedRepositioning.ts +0 -110
- package/src/hooks/useCustomHistory.ts +0 -14
- package/src/hooks/useElementFit.ts +0 -82
- package/src/hooks/useFirestoreWatch.ts +0 -54
- package/src/hooks/useForm.ts +0 -49
- package/src/hooks/useFreeze.ts +0 -12
- package/src/hooks/useHero.module.scss +0 -41
- package/src/hooks/useHero.ts +0 -512
- package/src/hooks/useIntersection.ts +0 -32
- package/src/hooks/useMergeRefs.ts +0 -29
- package/src/hooks/useObserve.ts +0 -24
- package/src/hooks/usePagination.ts +0 -228
- package/src/hooks/usePooledOperation.ts +0 -54
- package/src/hooks/usePooling.ts +0 -46
- package/src/hooks/useRebound.ts +0 -23
- package/src/hooks/useShortIntl.ai.md +0 -5
- package/src/hooks/useShortIntl.ts +0 -97
- package/src/hooks/utility/useAsyncMemo.ts +0 -43
- package/src/hooks/utility/useDepChange.ts +0 -11
- package/src/hooks/utility/useEvents.ts +0 -33
- package/src/hooks/utility/useImmediate.ts +0 -8
- package/src/hooks/utility/useManualInit.ts +0 -24
- package/src/hooks/utility/useModule.ts +0 -15
- package/src/hooks/utility/useQuery.ts +0 -15
- package/src/hooks/utility/useUniqueEffect.ts +0 -22
- package/src/index.preprocess.ts +0 -82
- package/src/index.ts +0 -229
- package/src/models/DebugLogger.ts +0 -7
- package/src/models/GenericContract.ts +0 -169
- package/src/models/Orbs.ts +0 -97
- package/src/reac-app-env.d.ts +0 -6
- package/src/storybook/assets/video/txt-reversed.mp4 +0 -0
- package/src/storybookUtils/index.tsx +0 -53
- package/src/test.tsx +0 -0
- package/src/type-utils.ts +0 -49
- package/src/types.ts +0 -199
- package/src/utility.d.ts +0 -70
- package/src/utils/blockchain.ts +0 -43
- package/src/utils/e2e.ts +0 -55
- package/src/utils/flatten.ts +0 -17
- package/src/utils/formatters.ts +0 -36
- package/src/utils/html.utils.ts +0 -3
- package/src/utils/ownEvent.ts +0 -8
- package/src/utils/test.ts +0 -20
package/src/index.preprocess.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
fstat,
|
|
3
|
-
fstatSync,
|
|
4
|
-
lstatSync,
|
|
5
|
-
readdirSync,
|
|
6
|
-
readFileSync,
|
|
7
|
-
writeFileSync,
|
|
8
|
-
} from "fs";
|
|
9
|
-
import { join } from "path";
|
|
10
|
-
|
|
11
|
-
function preProcessIndex(indexPath: string) {
|
|
12
|
-
let [_index, componentName] = indexPath.split("/").reverse();
|
|
13
|
-
if (indexPath.includes("/v2/index.ts")) componentName = "Form";
|
|
14
|
-
writeFileSync(
|
|
15
|
-
indexPath,
|
|
16
|
-
`export { default } from "./${componentName}";
|
|
17
|
-
export * from "./${componentName}";`
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
let finalIndexTs = ``;
|
|
22
|
-
|
|
23
|
-
parseDir("./src");
|
|
24
|
-
|
|
25
|
-
function parseDir(path: string) {
|
|
26
|
-
let folders = readdirSync(path);
|
|
27
|
-
if (folders.includes("index.ts") || folders.includes("index.tsx")) {
|
|
28
|
-
folders = folders.filter((f) => {
|
|
29
|
-
const toCheck = join(path, f);
|
|
30
|
-
if (f.includes("index.ts")) {
|
|
31
|
-
preProcessIndex(toCheck);
|
|
32
|
-
return true;
|
|
33
|
-
} else {
|
|
34
|
-
return lstatSync(toCheck).isDirectory();
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
for (let folder of folders) {
|
|
39
|
-
const toCheck = join(path, folder);
|
|
40
|
-
if (
|
|
41
|
-
toCheck.endsWith(".d.ts") ||
|
|
42
|
-
folder.startsWith("__") ||
|
|
43
|
-
toCheck.includes(".DS_Store") ||
|
|
44
|
-
folder.includes("storybook") ||
|
|
45
|
-
folder.includes("preprocess") ||
|
|
46
|
-
toCheck === "src/index.ts" ||
|
|
47
|
-
toCheck === "src/test.ts" ||
|
|
48
|
-
folder.endsWith(".scss") ||
|
|
49
|
-
folder.endsWith(".svg") ||
|
|
50
|
-
folder.endsWith(".md") ||
|
|
51
|
-
folder.includes(".stories.") ||
|
|
52
|
-
folder.includes(".test.") ||
|
|
53
|
-
folder.includes("ObjectWatchShim") ||
|
|
54
|
-
folder.includes("MasksFactory")
|
|
55
|
-
)
|
|
56
|
-
continue;
|
|
57
|
-
if (lstatSync(toCheck).isDirectory()) {
|
|
58
|
-
parseDir(toCheck);
|
|
59
|
-
} else {
|
|
60
|
-
const componentName = toCheck.includes("/index.ts")
|
|
61
|
-
? toCheck.includes("Form/v2/index")
|
|
62
|
-
? "FormV2"
|
|
63
|
-
: toCheck.split("/").at(-2)
|
|
64
|
-
: undefined;
|
|
65
|
-
const isHook = toCheck.includes("hooks/");
|
|
66
|
-
const isContext = toCheck.includes("context");
|
|
67
|
-
const importPath = `${toCheck.replace("src", ".").replace(/\.tsx?/, "")}`;
|
|
68
|
-
const extraExport =
|
|
69
|
-
isHook || isContext
|
|
70
|
-
? `export {default as ${
|
|
71
|
-
toCheck.split("/").at(-1)!.split(".")[0]
|
|
72
|
-
}} from "${importPath}";\n`
|
|
73
|
-
: componentName
|
|
74
|
-
? `export {default as ${componentName}} from "${importPath}"\n`
|
|
75
|
-
: "";
|
|
76
|
-
finalIndexTs += `export * from "${importPath}";
|
|
77
|
-
${extraExport}`;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
writeFileSync("./src/index.ts", finalIndexTs);
|
package/src/index.ts
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
export * from "./context/AsyncProcess";
|
|
2
|
-
export {default as AsyncProcess} from "./context/AsyncProcess";
|
|
3
|
-
export * from "./context/CustomBrowserRouter";
|
|
4
|
-
export {default as CustomBrowserRouter} from "./context/CustomBrowserRouter";
|
|
5
|
-
export * from "./context/OneUIProvider";
|
|
6
|
-
export {default as OneUIProvider} from "./context/OneUIProvider";
|
|
7
|
-
export * from "./context/ContextAsyncControl";
|
|
8
|
-
export {default as ContextAsyncControl} from "./context/ContextAsyncControl";
|
|
9
|
-
export * from "./utils/blockchain";
|
|
10
|
-
export * from "./utils/html.utils";
|
|
11
|
-
export * from "./utils/e2e";
|
|
12
|
-
export * from "./utils/ownEvent";
|
|
13
|
-
export * from "./utils/test";
|
|
14
|
-
export * from "./utils/formatters";
|
|
15
|
-
export * from "./utils/flatten";
|
|
16
|
-
export * from "./models/DebugLogger";
|
|
17
|
-
export * from "./models/Orbs";
|
|
18
|
-
export * from "./models/GenericContract";
|
|
19
|
-
export * from "./components/Tabs/index";
|
|
20
|
-
export {default as Tabs} from "./components/Tabs/index"
|
|
21
|
-
export * from "./components/FlowController/index";
|
|
22
|
-
export {default as FlowController} from "./components/FlowController/index"
|
|
23
|
-
export * from "./components/Transition/index";
|
|
24
|
-
export {default as Transition} from "./components/Transition/index"
|
|
25
|
-
export * from "./components/Form/v2/index";
|
|
26
|
-
export {default as FormV2} from "./components/Form/v2/index"
|
|
27
|
-
export * from "./components/Form/v2/FormField/index";
|
|
28
|
-
export {default as FormField} from "./components/Form/v2/FormField/index"
|
|
29
|
-
export * from "./components/Form/v2/FormField/Extensions/PhoneField/index";
|
|
30
|
-
export {default as PhoneField} from "./components/Form/v2/FormField/Extensions/PhoneField/index"
|
|
31
|
-
export * from "./components/Form/v2/FormField/Extensions/DateField/index";
|
|
32
|
-
export {default as DateField} from "./components/Form/v2/FormField/Extensions/DateField/index"
|
|
33
|
-
export * from "./components/Form/index";
|
|
34
|
-
export {default as Form} from "./components/Form/index"
|
|
35
|
-
export * from "./components/InstantCounter/index";
|
|
36
|
-
export {default as InstantCounter} from "./components/InstantCounter/index"
|
|
37
|
-
export * from "./components/LinkToId/index";
|
|
38
|
-
export {default as LinkToId} from "./components/LinkToId/index"
|
|
39
|
-
export * from "./components/PixelatedScan/index";
|
|
40
|
-
export {default as PixelatedScan} from "./components/PixelatedScan/index"
|
|
41
|
-
export * from "./components/HeaderCloseBtn/index";
|
|
42
|
-
export {default as HeaderCloseBtn} from "./components/HeaderCloseBtn/index"
|
|
43
|
-
export * from "./components/PingPongText/index";
|
|
44
|
-
export {default as PingPongText} from "./components/PingPongText/index"
|
|
45
|
-
export * from "./components/Portal/index";
|
|
46
|
-
export {default as Portal} from "./components/Portal/index"
|
|
47
|
-
export * from "./components/Freeze/index";
|
|
48
|
-
export {default as Freeze} from "./components/Freeze/index"
|
|
49
|
-
export * from "./components/Radio/index";
|
|
50
|
-
export {default as Radio} from "./components/Radio/index"
|
|
51
|
-
export * from "./components/Card/index";
|
|
52
|
-
export {default as Card} from "./components/Card/index"
|
|
53
|
-
export * from "./components/OrderableList/index";
|
|
54
|
-
export {default as OrderableList} from "./components/OrderableList/index"
|
|
55
|
-
export * from "./components/utilitary/ScrollAndFocusLock/index";
|
|
56
|
-
export {default as ScrollAndFocusLock} from "./components/utilitary/ScrollAndFocusLock/index"
|
|
57
|
-
export * from "./components/Collapsable/index";
|
|
58
|
-
export {default as Collapsable} from "./components/Collapsable/index"
|
|
59
|
-
export * from "./components/Countdown/index";
|
|
60
|
-
export {default as Countdown} from "./components/Countdown/index"
|
|
61
|
-
export * from "./components/Input/index";
|
|
62
|
-
export {default as Input} from "./components/Input/index"
|
|
63
|
-
export * from "./components/SectionContainer/index";
|
|
64
|
-
export {default as SectionContainer} from "./components/SectionContainer/index"
|
|
65
|
-
export * from "./components/Notification/index";
|
|
66
|
-
export {default as Notification} from "./components/Notification/index"
|
|
67
|
-
export * from "./components/Skeleton/index";
|
|
68
|
-
export {default as Skeleton} from "./components/Skeleton/index"
|
|
69
|
-
export * from "./components/LavaLamp/index";
|
|
70
|
-
export {default as LavaLamp} from "./components/LavaLamp/index"
|
|
71
|
-
export * from "./components/LavaLamp/v2/LavaLamp";
|
|
72
|
-
export * from "./components/Chart/index";
|
|
73
|
-
export {default as Chart} from "./components/Chart/index"
|
|
74
|
-
export * from "./components/StaticScroller/index";
|
|
75
|
-
export {default as StaticScroller} from "./components/StaticScroller/index"
|
|
76
|
-
export * from "./components/CheckBox/index";
|
|
77
|
-
export {default as CheckBox} from "./components/CheckBox/index"
|
|
78
|
-
export * from "./components/InfinityScroll/index";
|
|
79
|
-
export {default as InfinityScroll} from "./components/InfinityScroll/index"
|
|
80
|
-
export * from "./components/ProgressBar/index";
|
|
81
|
-
export {default as ProgressBar} from "./components/ProgressBar/index"
|
|
82
|
-
export * from "./components/Parallax/index";
|
|
83
|
-
export {default as Parallax} from "./components/Parallax/index"
|
|
84
|
-
export * from "./components/Parallax/math/helpers";
|
|
85
|
-
export * from "./components/EmailInput/index";
|
|
86
|
-
export {default as EmailInput} from "./components/EmailInput/index"
|
|
87
|
-
export * from "./components/FadeIn/index";
|
|
88
|
-
export {default as FadeIn} from "./components/FadeIn/index"
|
|
89
|
-
export * from "./components/AnchoredTooltip/index";
|
|
90
|
-
export {default as AnchoredTooltip} from "./components/AnchoredTooltip/index"
|
|
91
|
-
export * from "./components/CodeInput/index";
|
|
92
|
-
export {default as CodeInput} from "./components/CodeInput/index"
|
|
93
|
-
export * from "./components/MutableHamburgerButton/index";
|
|
94
|
-
export {default as MutableHamburgerButton} from "./components/MutableHamburgerButton/index"
|
|
95
|
-
export * from "./components/MainGrid/index";
|
|
96
|
-
export {default as MainGrid} from "./components/MainGrid/index"
|
|
97
|
-
export * from "./components/Button/index";
|
|
98
|
-
export {default as Button} from "./components/Button/index"
|
|
99
|
-
export * from "./components/HSForms/index";
|
|
100
|
-
export {default as HSForms} from "./components/HSForms/index"
|
|
101
|
-
export * from "./components/Table/index";
|
|
102
|
-
export {default as Table} from "./components/Table/index"
|
|
103
|
-
export * from "./components/Loader/index";
|
|
104
|
-
export {default as Loader} from "./components/Loader/index"
|
|
105
|
-
export * from "./components/AdaptiveButton/index";
|
|
106
|
-
export {default as AdaptiveButton} from "./components/AdaptiveButton/index"
|
|
107
|
-
export * from "./components/Divider/index";
|
|
108
|
-
export {default as Divider} from "./components/Divider/index"
|
|
109
|
-
export * from "./components/Spacing/index";
|
|
110
|
-
export {default as Spacing} from "./components/Spacing/index"
|
|
111
|
-
export * from "./components/Avatar/index";
|
|
112
|
-
export {default as Avatar} from "./components/Avatar/index"
|
|
113
|
-
export * from "./components/PasswordInput/index";
|
|
114
|
-
export {default as PasswordInput} from "./components/PasswordInput/index"
|
|
115
|
-
export * from "./components/Switch/index";
|
|
116
|
-
export {default as Switch} from "./components/Switch/index"
|
|
117
|
-
export * from "./components/AdaptiveDialog/index";
|
|
118
|
-
export {default as AdaptiveDialog} from "./components/AdaptiveDialog/index"
|
|
119
|
-
export * from "./components/BucketFill/index";
|
|
120
|
-
export {default as BucketFill} from "./components/BucketFill/index"
|
|
121
|
-
export * from "./components/AsyncWrapper/index";
|
|
122
|
-
export {default as AsyncWrapper} from "./components/AsyncWrapper/index"
|
|
123
|
-
export * from "./components/AnimatedEntrance/index";
|
|
124
|
-
export {default as AnimatedEntrance} from "./components/AnimatedEntrance/index"
|
|
125
|
-
export * from "./components/LoaderDotsIndicator/index";
|
|
126
|
-
export {default as LoaderDotsIndicator} from "./components/LoaderDotsIndicator/index"
|
|
127
|
-
export * from "./components/Text/index";
|
|
128
|
-
export {default as Text} from "./components/Text/index"
|
|
129
|
-
export * from "./components/Select/index";
|
|
130
|
-
export {default as Select} from "./components/Select/index"
|
|
131
|
-
export * from "./components/ProgressTexts/index";
|
|
132
|
-
export {default as ProgressTexts} from "./components/ProgressTexts/index"
|
|
133
|
-
export * from "./components/UncontrolledTransition/index";
|
|
134
|
-
export {default as UncontrolledTransition} from "./components/UncontrolledTransition/index"
|
|
135
|
-
export * from "./components/PaginationIndicator/index";
|
|
136
|
-
export {default as PaginationIndicator} from "./components/PaginationIndicator/index"
|
|
137
|
-
export * from "./components/WalletConnectionWrapper/index";
|
|
138
|
-
export {default as WalletConnectionWrapper} from "./components/WalletConnectionWrapper/index"
|
|
139
|
-
export * from "./components/CurrencyInput/index";
|
|
140
|
-
export {default as CurrencyInput} from "./components/CurrencyInput/index"
|
|
141
|
-
export * from "./components/FileInput/index";
|
|
142
|
-
export {default as FileInput} from "./components/FileInput/index"
|
|
143
|
-
export * from "./components/FileInput/View/Compact/index";
|
|
144
|
-
export {default as Compact} from "./components/FileInput/View/Compact/index"
|
|
145
|
-
export * from "./components/FileInput/View/BigFactory/index";
|
|
146
|
-
export {default as BigFactory} from "./components/FileInput/View/BigFactory/index"
|
|
147
|
-
export * from "./components/FileInput/View/View.types";
|
|
148
|
-
export * from "./components/Header/index";
|
|
149
|
-
export {default as Header} from "./components/Header/index"
|
|
150
|
-
export * from "./components/LoopableVideo/index";
|
|
151
|
-
export {default as LoopableVideo} from "./components/LoopableVideo/index"
|
|
152
|
-
export * from "./components/AdaptiveSidebar/index";
|
|
153
|
-
export {default as AdaptiveSidebar} from "./components/AdaptiveSidebar/index"
|
|
154
|
-
export * from "./components/AdaptiveContainer/index";
|
|
155
|
-
export {default as AdaptiveContainer} from "./components/AdaptiveContainer/index"
|
|
156
|
-
export * from "./hooks/ui/useAlternating";
|
|
157
|
-
export {default as useAlternating} from "./hooks/ui/useAlternating";
|
|
158
|
-
export * from "./hooks/ui/useBreakpoint";
|
|
159
|
-
export {default as useBreakpoint} from "./hooks/ui/useBreakpoint";
|
|
160
|
-
export * from "./hooks/ui/useTilt";
|
|
161
|
-
export {default as useTilt} from "./hooks/ui/useTilt";
|
|
162
|
-
export * from "./hooks/ui/useAdaptiveImage";
|
|
163
|
-
export {default as useAdaptiveImage} from "./hooks/ui/useAdaptiveImage";
|
|
164
|
-
export * from "./hooks/ui/useSnapToViewport";
|
|
165
|
-
export {default as useSnapToViewport} from "./hooks/ui/useSnapToViewport";
|
|
166
|
-
export * from "./hooks/ui/useMouseHover";
|
|
167
|
-
export {default as useMouseHover} from "./hooks/ui/useMouseHover";
|
|
168
|
-
export * from "./hooks/ui/useEffectIf";
|
|
169
|
-
export {default as useEffectIf} from "./hooks/ui/useEffectIf";
|
|
170
|
-
export * from "./hooks/ui/useZoomable";
|
|
171
|
-
export {default as useZoomable} from "./hooks/ui/useZoomable";
|
|
172
|
-
export * from "./hooks/ui/usePaginationControls";
|
|
173
|
-
export {default as usePaginationControls} from "./hooks/ui/usePaginationControls";
|
|
174
|
-
export * from "./hooks/ui/useCustomScrollbar";
|
|
175
|
-
export {default as useCustomScrollbar} from "./hooks/ui/useCustomScrollbar";
|
|
176
|
-
export * from "./hooks/useAsyncControl";
|
|
177
|
-
export {default as useAsyncControl} from "./hooks/useAsyncControl";
|
|
178
|
-
export * from "./hooks/useForm";
|
|
179
|
-
export {default as useForm} from "./hooks/useForm";
|
|
180
|
-
export * from "./hooks/useMergeRefs";
|
|
181
|
-
export {default as useMergeRefs} from "./hooks/useMergeRefs";
|
|
182
|
-
export * from "./hooks/usePooledOperation";
|
|
183
|
-
export {default as usePooledOperation} from "./hooks/usePooledOperation";
|
|
184
|
-
export * from "./hooks/useElementFit";
|
|
185
|
-
export {default as useElementFit} from "./hooks/useElementFit";
|
|
186
|
-
export * from "./hooks/useHero";
|
|
187
|
-
export {default as useHero} from "./hooks/useHero";
|
|
188
|
-
export * from "./hooks/useObserve";
|
|
189
|
-
export {default as useObserve} from "./hooks/useObserve";
|
|
190
|
-
export * from "./hooks/useIntersection";
|
|
191
|
-
export {default as useIntersection} from "./hooks/useIntersection";
|
|
192
|
-
export * from "./hooks/useFirestoreWatch";
|
|
193
|
-
export {default as useFirestoreWatch} from "./hooks/useFirestoreWatch";
|
|
194
|
-
export * from "./hooks/usePooling";
|
|
195
|
-
export {default as usePooling} from "./hooks/usePooling";
|
|
196
|
-
export * from "./hooks/useFreeze";
|
|
197
|
-
export {default as useFreeze} from "./hooks/useFreeze";
|
|
198
|
-
export * from "./hooks/useContainedRepositioning";
|
|
199
|
-
export {default as useContainedRepositioning} from "./hooks/useContainedRepositioning";
|
|
200
|
-
export * from "./hooks/logs/useDependencyChangeDetection";
|
|
201
|
-
export {default as useDependencyChangeDetection} from "./hooks/logs/useDependencyChangeDetection";
|
|
202
|
-
export * from "./hooks/logs/useIsMounting";
|
|
203
|
-
export {default as useIsMounting} from "./hooks/logs/useIsMounting";
|
|
204
|
-
export * from "./hooks/persistence/useLocalStorage";
|
|
205
|
-
export {default as useLocalStorage} from "./hooks/persistence/useLocalStorage";
|
|
206
|
-
export * from "./hooks/usePagination";
|
|
207
|
-
export {default as usePagination} from "./hooks/usePagination";
|
|
208
|
-
export * from "./hooks/useCustomHistory";
|
|
209
|
-
export {default as useCustomHistory} from "./hooks/useCustomHistory";
|
|
210
|
-
export * from "./hooks/useRebound";
|
|
211
|
-
export {default as useRebound} from "./hooks/useRebound";
|
|
212
|
-
export * from "./hooks/utility/useImmediate";
|
|
213
|
-
export {default as useImmediate} from "./hooks/utility/useImmediate";
|
|
214
|
-
export * from "./hooks/utility/useEvents";
|
|
215
|
-
export {default as useEvents} from "./hooks/utility/useEvents";
|
|
216
|
-
export * from "./hooks/utility/useQuery";
|
|
217
|
-
export {default as useQuery} from "./hooks/utility/useQuery";
|
|
218
|
-
export * from "./hooks/utility/useDepChange";
|
|
219
|
-
export {default as useDepChange} from "./hooks/utility/useDepChange";
|
|
220
|
-
export * from "./hooks/utility/useManualInit";
|
|
221
|
-
export {default as useManualInit} from "./hooks/utility/useManualInit";
|
|
222
|
-
export * from "./hooks/utility/useUniqueEffect";
|
|
223
|
-
export {default as useUniqueEffect} from "./hooks/utility/useUniqueEffect";
|
|
224
|
-
export * from "./hooks/utility/useModule";
|
|
225
|
-
export {default as useModule} from "./hooks/utility/useModule";
|
|
226
|
-
export * from "./hooks/utility/useAsyncMemo";
|
|
227
|
-
export {default as useAsyncMemo} from "./hooks/utility/useAsyncMemo";
|
|
228
|
-
export * from "./hooks/useShortIntl";
|
|
229
|
-
export {default as useShortIntl} from "./hooks/useShortIntl";
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import {
|
|
3
|
-
Contract,
|
|
4
|
-
ContractOptions,
|
|
5
|
-
EventData,
|
|
6
|
-
PastEventOptions,
|
|
7
|
-
} from "web3-eth-contract";
|
|
8
|
-
import { AbiItem } from "web3-utils";
|
|
9
|
-
|
|
10
|
-
export type AllABIs = readonly any[];
|
|
11
|
-
|
|
12
|
-
type ExtractMethods<A extends AllABIs[number]> = A extends {
|
|
13
|
-
type: "function";
|
|
14
|
-
}
|
|
15
|
-
? A["name"]
|
|
16
|
-
: never;
|
|
17
|
-
|
|
18
|
-
type ExtractEvents<A extends AllABIs[number]> = A extends {
|
|
19
|
-
type: "event";
|
|
20
|
-
}
|
|
21
|
-
? A["name"]
|
|
22
|
-
: never;
|
|
23
|
-
|
|
24
|
-
type TypeOrInternalType<T> = T['internalType'] extends unknown ? T['type'] : T['internalType']
|
|
25
|
-
|
|
26
|
-
export type MapTypeToJS<L, C> =
|
|
27
|
-
L extends "tuple[]" ? TuplifyUnion<C[number], C[number]['name']>[] :
|
|
28
|
-
L extends "address" | "uint256" | "uint128" | "uint8" | "string" | "bytes32" | "uint64"
|
|
29
|
-
? string
|
|
30
|
-
: L extends "uint256[]" | "string[]"
|
|
31
|
-
? string[]
|
|
32
|
-
: L extends "bool"
|
|
33
|
-
? boolean
|
|
34
|
-
: L extends 'tuple'
|
|
35
|
-
? TuplifyUnion<C[number], C[number]['name']>
|
|
36
|
-
: unknown;
|
|
37
|
-
|
|
38
|
-
type ExtractFromObj<R extends (AllABIs[number] & { type: "function" })> = {
|
|
39
|
-
[K in R["outputs"][number]["name"]]: MapTypeToJS<
|
|
40
|
-
TypeOrInternalType<(R["outputs"][number] & {
|
|
41
|
-
name: K;
|
|
42
|
-
})>,
|
|
43
|
-
(R["outputs"][number] & {
|
|
44
|
-
name: K;
|
|
45
|
-
})["components"]
|
|
46
|
-
>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export type ExtractMethodDefinition<
|
|
50
|
-
A extends AllABIs,
|
|
51
|
-
N extends (AllABIs[number] & { type: "function" })["name"],
|
|
52
|
-
R = A[number] & {
|
|
53
|
-
type: "function";
|
|
54
|
-
name: N;
|
|
55
|
-
}
|
|
56
|
-
> = (
|
|
57
|
-
...args: TuplifyUnion<
|
|
58
|
-
(A[number] & {
|
|
59
|
-
type: "function";
|
|
60
|
-
name: N;
|
|
61
|
-
})["inputs"][number],
|
|
62
|
-
(A[number] & {
|
|
63
|
-
type: "function";
|
|
64
|
-
name: N;
|
|
65
|
-
})["inputs"][number]["name"]
|
|
66
|
-
>
|
|
67
|
-
) => {
|
|
68
|
-
call: () => Promise<
|
|
69
|
-
R extends { outputs: { length: 1 } }
|
|
70
|
-
? MapTypeToJS<
|
|
71
|
-
TypeOrInternalType<R["outputs"][0]>,
|
|
72
|
-
R["outputs"][0]['components']
|
|
73
|
-
>
|
|
74
|
-
: R extends { outputs: any }
|
|
75
|
-
? ExtractFromObj<R>
|
|
76
|
-
: void
|
|
77
|
-
>;
|
|
78
|
-
send: (prop: { from: string, maxPriorityFeePerGas?: number, gas?: number, gasPrice?: string }) => Promise<void>;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
// oh boy don't do this
|
|
82
|
-
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
|
|
83
|
-
k: infer I
|
|
84
|
-
) => void
|
|
85
|
-
? I
|
|
86
|
-
: never;
|
|
87
|
-
type LastOf<T> = UnionToIntersection<
|
|
88
|
-
T extends any ? () => T : never
|
|
89
|
-
> extends () => infer R
|
|
90
|
-
? R
|
|
91
|
-
: never;
|
|
92
|
-
|
|
93
|
-
// TS4.0+
|
|
94
|
-
type Push<T extends any[], V> = [...T, V];
|
|
95
|
-
|
|
96
|
-
// TS4.1+
|
|
97
|
-
export type TuplifyUnion<
|
|
98
|
-
FUNCS,
|
|
99
|
-
T,
|
|
100
|
-
L = LastOf<T>,
|
|
101
|
-
N = [T] extends [never] ? true : false
|
|
102
|
-
> = true extends N
|
|
103
|
-
? []
|
|
104
|
-
: Push<
|
|
105
|
-
TuplifyUnion<FUNCS, Exclude<T, L>>,
|
|
106
|
-
MapTypeToJS<
|
|
107
|
-
TypeOrInternalType<(FUNCS & { name: L })>,
|
|
108
|
-
(FUNCS & { name: L })['components']
|
|
109
|
-
>
|
|
110
|
-
>;
|
|
111
|
-
|
|
112
|
-
export class GenericContract<
|
|
113
|
-
A extends AllABIs = AllABIs,
|
|
114
|
-
E extends string = ExtractEvents<A[number]> | "allEvents"
|
|
115
|
-
> extends Contract {
|
|
116
|
-
events!: Exclude<E, "allEvents">;
|
|
117
|
-
constructor(jsonInterface: A, address?: string, options?: ContractOptions) {
|
|
118
|
-
super(jsonInterface as unknown as AbiItem[], address, options);
|
|
119
|
-
}
|
|
120
|
-
override methods!: {
|
|
121
|
-
[k in ExtractMethods<A[number]>]: ExtractMethodDefinition<A, k>;
|
|
122
|
-
};
|
|
123
|
-
override getPastEvents(event: E): Promise<GenericEventData<A>[]>;
|
|
124
|
-
override getPastEvents(
|
|
125
|
-
event: E,
|
|
126
|
-
options: PastEventOptions,
|
|
127
|
-
callback: (error: Error, event: EventData) => void
|
|
128
|
-
): Promise<GenericEventData<A>[]>;
|
|
129
|
-
override getPastEvents(
|
|
130
|
-
event: E,
|
|
131
|
-
options: PastEventOptions
|
|
132
|
-
): Promise<GenericEventData<A>[]>;
|
|
133
|
-
override getPastEvents(
|
|
134
|
-
event: E,
|
|
135
|
-
callback: (error: Error, event: EventData) => void
|
|
136
|
-
): Promise<GenericEventData<A>[]>;
|
|
137
|
-
override getPastEvents(
|
|
138
|
-
event: any,
|
|
139
|
-
options?: any,
|
|
140
|
-
callback?: any
|
|
141
|
-
): Promise<GenericEventData<A>[]> {
|
|
142
|
-
return super.getPastEvents(event, options, callback) as any;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export default GenericContract;
|
|
147
|
-
|
|
148
|
-
export type GenericEventData<E extends AllABIs> = EventData & GenericEvent<E>;
|
|
149
|
-
|
|
150
|
-
type ABIEvent = AllABIs[number] & { type: "event" };
|
|
151
|
-
|
|
152
|
-
type GenericEvent<
|
|
153
|
-
ABI extends AllABIs,
|
|
154
|
-
E extends string = ExtractEvents<ABI[number]>
|
|
155
|
-
> = {
|
|
156
|
-
event: E;
|
|
157
|
-
returnValues: ExtractReturnValues<ABIEvent & { name: E }>;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
type ExtractReturnValues<E extends ABIEvent> = ExtractInputType<
|
|
161
|
-
E["inputs"][number]
|
|
162
|
-
>;
|
|
163
|
-
|
|
164
|
-
type ExtractInputType<I extends ABIEvent["inputs"][number]> = {
|
|
165
|
-
[k in I["name"]]: MapTypeToJS<
|
|
166
|
-
TypeOrInternalType<I>,
|
|
167
|
-
I['components']
|
|
168
|
-
>;
|
|
169
|
-
};
|
package/src/models/Orbs.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
export interface OrbDrawer {
|
|
2
|
-
drawOrb(x: number, y: number, radius: number): void;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
class BaseOrb {
|
|
6
|
-
protected drawer: OrbDrawer;
|
|
7
|
-
constructor(drawer: OrbDrawer) {
|
|
8
|
-
this.drawer = drawer;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class Orb extends BaseOrb {
|
|
13
|
-
x: number;
|
|
14
|
-
y: number;
|
|
15
|
-
vx: number;
|
|
16
|
-
vy: number;
|
|
17
|
-
radius: number;
|
|
18
|
-
bounds: { width: number; height: number };
|
|
19
|
-
|
|
20
|
-
constructor(
|
|
21
|
-
drawer: OrbDrawer,
|
|
22
|
-
velocity: number,
|
|
23
|
-
bounds: Orb["bounds"],
|
|
24
|
-
radius: number
|
|
25
|
-
) {
|
|
26
|
-
super(drawer);
|
|
27
|
-
this.x = (Math.random() * bounds.width) | 0;
|
|
28
|
-
this.y = (Math.random() * bounds.height) | 0;
|
|
29
|
-
this.radius = radius;
|
|
30
|
-
this.bounds = bounds;
|
|
31
|
-
|
|
32
|
-
var radiant = Math.random() * Math.PI * 2,
|
|
33
|
-
vel = velocity;
|
|
34
|
-
|
|
35
|
-
vel *= 0.2;
|
|
36
|
-
|
|
37
|
-
this.vx = Math.cos(radiant) * vel;
|
|
38
|
-
this.vy = Math.sin(radiant) * vel;
|
|
39
|
-
}
|
|
40
|
-
step() {
|
|
41
|
-
this.x += this.vx;
|
|
42
|
-
this.y += this.vy;
|
|
43
|
-
|
|
44
|
-
var radius = this.radius / 2;
|
|
45
|
-
|
|
46
|
-
if (this.x < -radius || this.x > this.bounds.width + radius) this.vx *= -1;
|
|
47
|
-
|
|
48
|
-
if (this.y < -radius || this.y > this.bounds.height + radius) this.vy *= -1;
|
|
49
|
-
|
|
50
|
-
this.drawer.drawOrb(this.x | 0, this.y | 0, this.radius);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export class GuideOrb extends BaseOrb {
|
|
55
|
-
lastRadius!: number;
|
|
56
|
-
lastX!: number;
|
|
57
|
-
lastY!: number;
|
|
58
|
-
deflateDuration: number;
|
|
59
|
-
|
|
60
|
-
constructor(drawer: OrbDrawer, deflateDuration: number) {
|
|
61
|
-
super(drawer);
|
|
62
|
-
this.deflateDuration = deflateDuration;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
step(
|
|
66
|
-
size: number,
|
|
67
|
-
sizeToIncrease: number,
|
|
68
|
-
lastSizeTimestamp: number,
|
|
69
|
-
lastPositionTimestamp: number,
|
|
70
|
-
currPos: { x: number; y: number },
|
|
71
|
-
moveBy: {
|
|
72
|
-
x: number;
|
|
73
|
-
y: number;
|
|
74
|
-
}
|
|
75
|
-
) {
|
|
76
|
-
const deltaTime = Date.now() - lastSizeTimestamp;
|
|
77
|
-
const deltaTimePercent =
|
|
78
|
-
deltaTime > 250 ? 1 : (deltaTime * 100) / 250 / 100;
|
|
79
|
-
|
|
80
|
-
const radius = size - (sizeToIncrease - sizeToIncrease * deltaTimePercent);
|
|
81
|
-
|
|
82
|
-
this.lastRadius = radius;
|
|
83
|
-
|
|
84
|
-
const deltaTimePos = Date.now() - lastPositionTimestamp;
|
|
85
|
-
const deltaTimePosPercent =
|
|
86
|
-
deltaTimePos > this.deflateDuration
|
|
87
|
-
? 1
|
|
88
|
-
: (deltaTimePos * 100) / this.deflateDuration / 100;
|
|
89
|
-
|
|
90
|
-
const translateX = currPos.x - (moveBy.x - moveBy.x * deltaTimePosPercent);
|
|
91
|
-
this.lastX = translateX;
|
|
92
|
-
const translateY = currPos.y - (moveBy.y - moveBy.y * deltaTimePosPercent);
|
|
93
|
-
this.lastY = translateY;
|
|
94
|
-
|
|
95
|
-
this.drawer.drawOrb(translateX | 0, translateY | 0, radius);
|
|
96
|
-
}
|
|
97
|
-
}
|
package/src/reac-app-env.d.ts
DELETED
|
Binary file
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React, { ComponentProps, PropsWithChildren, forwardRef } from "react";
|
|
2
|
-
import Spacing from "../components/Spacing";
|
|
3
|
-
import { _Text } from "../components/Text/Text";
|
|
4
|
-
|
|
5
|
-
export function extractAllPossibilitiesFromEnumProp<
|
|
6
|
-
C extends (...args: any[]) => any,
|
|
7
|
-
K extends keyof P,
|
|
8
|
-
P extends ComponentProps<C> = ComponentProps<C>
|
|
9
|
-
>(component: C, propName: K): P[K][] {
|
|
10
|
-
if (component === _Text)
|
|
11
|
-
(_Text as any).__docgenInfo.props[propName] = {
|
|
12
|
-
type: {
|
|
13
|
-
value: [
|
|
14
|
-
"title",
|
|
15
|
-
"description",
|
|
16
|
-
"error",
|
|
17
|
-
"caption",
|
|
18
|
-
"highlightTitle",
|
|
19
|
-
"highlight",
|
|
20
|
-
"subtitle",
|
|
21
|
-
"boldTitle",
|
|
22
|
-
"link",
|
|
23
|
-
"boldTitleBig",
|
|
24
|
-
"content",
|
|
25
|
-
].map((a) => ({ value: JSON.stringify(a) })),
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
return (component as any).__docgenInfo.props[propName].type.value.map(
|
|
29
|
-
(a: { value: string }) => JSON.parse(a.value)
|
|
30
|
-
) as P[K][];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function SideBySideContainer({
|
|
34
|
-
children,
|
|
35
|
-
exampleName,
|
|
36
|
-
}: PropsWithChildren<{ exampleName: string }>) {
|
|
37
|
-
return (
|
|
38
|
-
<div
|
|
39
|
-
style={{
|
|
40
|
-
width: "25%",
|
|
41
|
-
marginRight: 24,
|
|
42
|
-
display: "inline-flex",
|
|
43
|
-
flexDirection: "column",
|
|
44
|
-
}}
|
|
45
|
-
>
|
|
46
|
-
<span style={{ borderBottom: "2px solid black", marginBottom: 14 }}>
|
|
47
|
-
Tipo: <b>{exampleName}</b>
|
|
48
|
-
</span>
|
|
49
|
-
{children}
|
|
50
|
-
<Spacing size="large" />
|
|
51
|
-
</div>
|
|
52
|
-
);
|
|
53
|
-
}
|
package/src/test.tsx
DELETED
|
File without changes
|