@metamask-previews/design-system-react-native 0.0.0-preview.52473ea → 0.0.0-preview.58198a0
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/AvatarAccount/AvatarAccount.constants.d.ts +2 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.ts.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.js +19 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.js.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.d.ts +4 -0
- package/dist/components/AvatarAccount/AvatarAccount.d.ts.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.js +32 -0
- package/dist/components/AvatarAccount/AvatarAccount.js.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.types.d.ts +33 -0
- package/dist/components/AvatarAccount/AvatarAccount.types.d.ts.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.types.js +3 -0
- package/dist/components/AvatarAccount/AvatarAccount.types.js.map +1 -0
- package/dist/components/AvatarAccount/index.d.ts +4 -0
- package/dist/components/AvatarAccount/index.d.ts.map +1 -0
- package/dist/components/AvatarAccount/index.js +9 -0
- package/dist/components/AvatarAccount/index.js.map +1 -0
- package/dist/components/AvatarBase/AvatarBase.constants.d.ts +6 -0
- package/dist/components/AvatarBase/AvatarBase.constants.d.ts.map +1 -0
- package/dist/components/AvatarBase/AvatarBase.constants.js +33 -0
- package/dist/components/AvatarBase/AvatarBase.constants.js.map +1 -0
- package/dist/components/AvatarBase/AvatarBase.d.ts +4 -0
- package/dist/components/AvatarBase/AvatarBase.d.ts.map +1 -0
- package/dist/components/AvatarBase/AvatarBase.js +31 -0
- package/dist/components/AvatarBase/AvatarBase.js.map +1 -0
- package/dist/components/AvatarBase/AvatarBase.types.d.ts +59 -0
- package/dist/components/AvatarBase/AvatarBase.types.d.ts.map +1 -0
- package/dist/components/AvatarBase/AvatarBase.types.js +3 -0
- package/dist/components/AvatarBase/AvatarBase.types.js.map +1 -0
- package/dist/components/AvatarBase/index.d.ts +4 -0
- package/dist/components/AvatarBase/index.d.ts.map +1 -0
- package/dist/components/AvatarBase/index.js +9 -0
- package/dist/components/AvatarBase/index.js.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.d.ts +4 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.d.ts.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.js +50 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.js.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.types.d.ts +21 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.types.d.ts.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.types.js +3 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.types.js.map +1 -0
- package/dist/components/AvatarFavicon/index.d.ts +4 -0
- package/dist/components/AvatarFavicon/index.d.ts.map +1 -0
- package/dist/components/AvatarFavicon/index.js +8 -0
- package/dist/components/AvatarFavicon/index.js.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.ts +5 -0
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.constants.js +21 -0
- package/dist/components/AvatarGroup/AvatarGroup.constants.js.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +4 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +71 -0
- package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +68 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.js +3 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.js.map +1 -0
- package/dist/components/AvatarGroup/index.d.ts +4 -0
- package/dist/components/AvatarGroup/index.d.ts.map +1 -0
- package/dist/components/AvatarGroup/index.js +9 -0
- package/dist/components/AvatarGroup/index.js.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.ts +6 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.ts.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.js +28 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.js.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.d.ts +4 -0
- package/dist/components/AvatarIcon/AvatarIcon.d.ts.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.js +24 -0
- package/dist/components/AvatarIcon/AvatarIcon.js.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.types.d.ts +23 -0
- package/dist/components/AvatarIcon/AvatarIcon.types.d.ts.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.types.js +3 -0
- package/dist/components/AvatarIcon/AvatarIcon.types.js.map +1 -0
- package/dist/components/AvatarIcon/index.d.ts +4 -0
- package/dist/components/AvatarIcon/index.d.ts.map +1 -0
- package/dist/components/AvatarIcon/index.js +9 -0
- package/dist/components/AvatarIcon/index.js.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.d.ts +4 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.d.ts.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.js +50 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.js.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.ts +21 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.ts.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.types.js +3 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.types.js.map +1 -0
- package/dist/components/AvatarNetwork/index.d.ts +4 -0
- package/dist/components/AvatarNetwork/index.d.ts.map +1 -0
- package/dist/components/AvatarNetwork/index.js +8 -0
- package/dist/components/AvatarNetwork/index.js.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.d.ts +4 -0
- package/dist/components/AvatarToken/AvatarToken.d.ts.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.js +50 -0
- package/dist/components/AvatarToken/AvatarToken.js.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.types.d.ts +21 -0
- package/dist/components/AvatarToken/AvatarToken.types.d.ts.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.types.js +3 -0
- package/dist/components/AvatarToken/AvatarToken.types.js.map +1 -0
- package/dist/components/AvatarToken/index.d.ts +4 -0
- package/dist/components/AvatarToken/index.d.ts.map +1 -0
- package/dist/components/AvatarToken/index.js +8 -0
- package/dist/components/AvatarToken/index.js.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.constants.d.ts +6 -0
- package/dist/components/BadgeCount/BadgeCount.constants.d.ts.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.constants.js +19 -0
- package/dist/components/BadgeCount/BadgeCount.constants.js.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.d.ts +4 -0
- package/dist/components/BadgeCount/BadgeCount.d.ts.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.js +30 -0
- package/dist/components/BadgeCount/BadgeCount.js.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.types.d.ts +39 -0
- package/dist/components/BadgeCount/BadgeCount.types.d.ts.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.types.js +3 -0
- package/dist/components/BadgeCount/BadgeCount.types.js.map +1 -0
- package/dist/components/BadgeCount/index.d.ts +4 -0
- package/dist/components/BadgeCount/index.d.ts.map +1 -0
- package/dist/components/BadgeCount/index.js +8 -0
- package/dist/components/BadgeCount/index.js.map +1 -0
- package/dist/components/BadgeIcon/BadgeIcon.d.ts +4 -0
- package/dist/components/BadgeIcon/BadgeIcon.d.ts.map +1 -0
- package/dist/components/BadgeIcon/BadgeIcon.js +26 -0
- package/dist/components/BadgeIcon/BadgeIcon.js.map +1 -0
- package/dist/components/BadgeIcon/BadgeIcon.types.d.ts +20 -0
- package/dist/components/BadgeIcon/BadgeIcon.types.d.ts.map +1 -0
- package/dist/components/BadgeIcon/BadgeIcon.types.js +3 -0
- package/dist/components/BadgeIcon/BadgeIcon.types.js.map +1 -0
- package/dist/components/BadgeIcon/index.d.ts +3 -0
- package/dist/components/BadgeIcon/index.d.ts.map +1 -0
- package/dist/components/BadgeIcon/index.js +6 -0
- package/dist/components/BadgeIcon/index.js.map +1 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.d.ts +4 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.d.ts.map +1 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.js +11 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.js.map +1 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.types.d.ts +17 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.types.d.ts.map +1 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.types.js +3 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.types.js.map +1 -0
- package/dist/components/BadgeNetwork/index.d.ts +3 -0
- package/dist/components/BadgeNetwork/index.d.ts.map +1 -0
- package/dist/components/BadgeNetwork/index.js +6 -0
- package/dist/components/BadgeNetwork/index.js.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.constants.d.ts +4 -0
- package/dist/components/BadgeStatus/BadgeStatus.constants.d.ts.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.constants.js +17 -0
- package/dist/components/BadgeStatus/BadgeStatus.constants.js.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.d.ts +4 -0
- package/dist/components/BadgeStatus/BadgeStatus.d.ts.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.js +24 -0
- package/dist/components/BadgeStatus/BadgeStatus.js.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.types.d.ts +37 -0
- package/dist/components/BadgeStatus/BadgeStatus.types.d.ts.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.types.js +3 -0
- package/dist/components/BadgeStatus/BadgeStatus.types.js.map +1 -0
- package/dist/components/BadgeStatus/index.d.ts +4 -0
- package/dist/components/BadgeStatus/index.d.ts.map +1 -0
- package/dist/components/BadgeStatus/index.js +9 -0
- package/dist/components/BadgeStatus/index.js.map +1 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.d.ts +4 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.d.ts.map +1 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.js +110 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.js.map +1 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.types.d.ts +73 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.types.d.ts.map +1 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.types.js +3 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.types.js.map +1 -0
- package/dist/components/BadgeWrapper/index.d.ts +5 -0
- package/dist/components/BadgeWrapper/index.d.ts.map +1 -0
- package/dist/components/BadgeWrapper/index.js +9 -0
- package/dist/components/BadgeWrapper/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +26 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.types.d.ts +14 -0
- package/dist/components/Button/Button.types.d.ts.map +1 -0
- package/dist/components/Button/Button.types.js +3 -0
- package/dist/components/Button/Button.types.js.map +1 -0
- package/dist/components/Button/index.d.ts +4 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +9 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.ts +4 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.js +106 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.js.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.types.d.ts +19 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.types.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.types.js +3 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.types.js.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/index.d.ts +4 -0
- package/dist/components/Button/variants/ButtonPrimary/index.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/index.js +8 -0
- package/dist/components/Button/variants/ButtonPrimary/index.js.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.ts +4 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.js +102 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.js.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.types.d.ts +19 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.types.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.types.js +3 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.types.js.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/index.d.ts +4 -0
- package/dist/components/Button/variants/ButtonSecondary/index.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/index.js +8 -0
- package/dist/components/Button/variants/ButtonSecondary/index.js.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.ts +4 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.js +109 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.js.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.types.d.ts +19 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.types.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.types.js +3 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.types.js.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/index.d.ts +4 -0
- package/dist/components/Button/variants/ButtonTertiary/index.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/index.js +8 -0
- package/dist/components/Button/variants/ButtonTertiary/index.js.map +1 -0
- package/dist/components/ButtonBase/ButtonBase.d.ts +4 -0
- package/dist/components/ButtonBase/ButtonBase.d.ts.map +1 -0
- package/dist/components/ButtonBase/ButtonBase.js +48 -0
- package/dist/components/ButtonBase/ButtonBase.js.map +1 -0
- package/dist/components/ButtonBase/ButtonBase.types.d.ts +85 -0
- package/dist/components/ButtonBase/ButtonBase.types.d.ts.map +1 -0
- package/dist/components/ButtonBase/ButtonBase.types.js +3 -0
- package/dist/components/ButtonBase/ButtonBase.types.js.map +1 -0
- package/dist/components/ButtonBase/index.d.ts +4 -0
- package/dist/components/ButtonBase/index.d.ts.map +1 -0
- package/dist/components/ButtonBase/index.js +8 -0
- package/dist/components/ButtonBase/index.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.constants.d.ts +9 -0
- package/dist/components/ButtonIcon/ButtonIcon.constants.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.constants.js +17 -0
- package/dist/components/ButtonIcon/ButtonIcon.constants.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.d.ts +4 -0
- package/dist/components/ButtonIcon/ButtonIcon.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.js +57 -0
- package/dist/components/ButtonIcon/ButtonIcon.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.types.d.ts +52 -0
- package/dist/components/ButtonIcon/ButtonIcon.types.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.types.js +3 -0
- package/dist/components/ButtonIcon/ButtonIcon.types.js.map +1 -0
- package/dist/components/ButtonIcon/index.d.ts +4 -0
- package/dist/components/ButtonIcon/index.d.ts.map +1 -0
- package/dist/components/ButtonIcon/index.js +8 -0
- package/dist/components/ButtonIcon/index.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +17 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +122 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +57 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.types.js +3 -0
- package/dist/components/Checkbox/Checkbox.types.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Checkbox/index.js +6 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/Icon/Icon.assets.d.ts +6 -0
- package/dist/components/Icon/Icon.assets.d.ts.map +1 -0
- package/dist/components/Icon/Icon.assets.js +558 -0
- package/dist/components/Icon/Icon.assets.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +4 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -0
- package/dist/components/Icon/Icon.js +46 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Icon/Icon.types.d.ts +39 -0
- package/dist/components/Icon/Icon.types.d.ts.map +1 -0
- package/dist/components/Icon/Icon.types.js +3 -0
- package/dist/components/Icon/Icon.types.js.map +1 -0
- package/dist/components/Icon/Icon.utilities.d.ts +22 -0
- package/dist/components/Icon/Icon.utilities.d.ts.map +1 -0
- package/dist/components/Icon/Icon.utilities.js +31 -0
- package/dist/components/Icon/Icon.utilities.js.map +1 -0
- package/dist/components/Icon/assets/accessibility.svg +1 -0
- package/dist/components/Icon/assets/activity.svg +1 -0
- package/dist/components/Icon/assets/add-card.svg +1 -0
- package/dist/components/Icon/assets/add-circle.svg +1 -0
- package/dist/components/Icon/assets/add-square.svg +1 -0
- package/dist/components/Icon/assets/add.svg +1 -0
- package/dist/components/Icon/assets/ai.svg +1 -0
- package/dist/components/Icon/assets/alternate-email.svg +1 -0
- package/dist/components/Icon/assets/apps.svg +1 -0
- package/dist/components/Icon/assets/arrow-2-down.svg +1 -0
- package/dist/components/Icon/assets/arrow-2-left.svg +1 -0
- package/dist/components/Icon/assets/arrow-2-right.svg +1 -0
- package/dist/components/Icon/assets/arrow-2-up-right.svg +1 -0
- package/dist/components/Icon/assets/arrow-2-up.svg +1 -0
- package/dist/components/Icon/assets/arrow-circle-down.svg +1 -0
- package/dist/components/Icon/assets/arrow-circle-up.svg +1 -0
- package/dist/components/Icon/assets/arrow-double-left.svg +1 -0
- package/dist/components/Icon/assets/arrow-double-right.svg +1 -0
- package/dist/components/Icon/assets/arrow-down.svg +1 -0
- package/dist/components/Icon/assets/arrow-drop-down-circle.svg +1 -0
- package/dist/components/Icon/assets/arrow-left.svg +1 -0
- package/dist/components/Icon/assets/arrow-right.svg +1 -0
- package/dist/components/Icon/assets/arrow-up.svg +1 -0
- package/dist/components/Icon/assets/attachment.svg +1 -0
- package/dist/components/Icon/assets/ban.svg +1 -0
- package/dist/components/Icon/assets/bank-assured.svg +1 -0
- package/dist/components/Icon/assets/bank.svg +1 -0
- package/dist/components/Icon/assets/bold.svg +1 -0
- package/dist/components/Icon/assets/book.svg +1 -0
- package/dist/components/Icon/assets/bookmark.svg +1 -0
- package/dist/components/Icon/assets/bridge.svg +1 -0
- package/dist/components/Icon/assets/briefcase.svg +1 -0
- package/dist/components/Icon/assets/bulb.svg +1 -0
- package/dist/components/Icon/assets/buy-sell.svg +1 -0
- package/dist/components/Icon/assets/cake.svg +1 -0
- package/dist/components/Icon/assets/calculator.svg +1 -0
- package/dist/components/Icon/assets/calendar.svg +1 -0
- package/dist/components/Icon/assets/call.svg +1 -0
- package/dist/components/Icon/assets/camera.svg +1 -0
- package/dist/components/Icon/assets/campaign.svg +1 -0
- package/dist/components/Icon/assets/card-pos.svg +1 -0
- package/dist/components/Icon/assets/card.svg +1 -0
- package/dist/components/Icon/assets/cash.svg +1 -0
- package/dist/components/Icon/assets/category.svg +1 -0
- package/dist/components/Icon/assets/chart.svg +1 -0
- package/dist/components/Icon/assets/check-bold.svg +1 -0
- package/dist/components/Icon/assets/check.svg +1 -0
- package/dist/components/Icon/assets/circle-x.svg +1 -0
- package/dist/components/Icon/assets/clock-filled.svg +1 -0
- package/dist/components/Icon/assets/clock.svg +1 -0
- package/dist/components/Icon/assets/close.svg +1 -0
- package/dist/components/Icon/assets/cloud-download.svg +1 -0
- package/dist/components/Icon/assets/cloud-upload.svg +1 -0
- package/dist/components/Icon/assets/cloud.svg +1 -0
- package/dist/components/Icon/assets/code-circle.svg +1 -0
- package/dist/components/Icon/assets/code.svg +1 -0
- package/dist/components/Icon/assets/coin.svg +1 -0
- package/dist/components/Icon/assets/collapse.svg +1 -0
- package/dist/components/Icon/assets/confirmation.svg +1 -0
- package/dist/components/Icon/assets/connect.svg +1 -0
- package/dist/components/Icon/assets/copy-success.svg +1 -0
- package/dist/components/Icon/assets/copy.svg +1 -0
- package/dist/components/Icon/assets/credit-check.svg +1 -0
- package/dist/components/Icon/assets/currency-franc.svg +1 -0
- package/dist/components/Icon/assets/currency-lira.svg +1 -0
- package/dist/components/Icon/assets/currency-pound.svg +1 -0
- package/dist/components/Icon/assets/currency-yuan.svg +3 -0
- package/dist/components/Icon/assets/customize.svg +1 -0
- package/dist/components/Icon/assets/danger.svg +1 -0
- package/dist/components/Icon/assets/dark-filled.svg +1 -0
- package/dist/components/Icon/assets/dark.svg +1 -0
- package/dist/components/Icon/assets/data.svg +1 -0
- package/dist/components/Icon/assets/description.svg +1 -0
- package/dist/components/Icon/assets/details.svg +1 -0
- package/dist/components/Icon/assets/diagram.svg +1 -0
- package/dist/components/Icon/assets/document-code.svg +1 -0
- package/dist/components/Icon/assets/download.svg +1 -0
- package/dist/components/Icon/assets/draft.svg +1 -0
- package/dist/components/Icon/assets/eco-leaf.svg +1 -0
- package/dist/components/Icon/assets/edit-square.svg +1 -0
- package/dist/components/Icon/assets/edit.svg +1 -0
- package/dist/components/Icon/assets/encrypted-add.svg +1 -0
- package/dist/components/Icon/assets/eraser.svg +1 -0
- package/dist/components/Icon/assets/error.svg +1 -0
- package/dist/components/Icon/assets/ethereum.svg +1 -0
- package/dist/components/Icon/assets/exchange.svg +1 -0
- package/dist/components/Icon/assets/expand-vertical.svg +1 -0
- package/dist/components/Icon/assets/expand.svg +1 -0
- package/dist/components/Icon/assets/explore-filled.svg +1 -0
- package/dist/components/Icon/assets/explore.svg +1 -0
- package/dist/components/Icon/assets/export.svg +1 -0
- package/dist/components/Icon/assets/extension.svg +1 -0
- package/dist/components/Icon/assets/eye-slash.svg +1 -0
- package/dist/components/Icon/assets/eye.svg +1 -0
- package/dist/components/Icon/assets/face-id.svg +1 -0
- package/dist/components/Icon/assets/feedback.svg +1 -0
- package/dist/components/Icon/assets/file.svg +1 -0
- package/dist/components/Icon/assets/filter.svg +1 -0
- package/dist/components/Icon/assets/fingerprint.svg +1 -0
- package/dist/components/Icon/assets/fire.svg +1 -0
- package/dist/components/Icon/assets/first-page.svg +1 -0
- package/dist/components/Icon/assets/flag.svg +1 -0
- package/dist/components/Icon/assets/flash-slash.svg +1 -0
- package/dist/components/Icon/assets/flash.svg +1 -0
- package/dist/components/Icon/assets/flask.svg +1 -0
- package/dist/components/Icon/assets/flower.svg +1 -0
- package/dist/components/Icon/assets/folder.svg +1 -0
- package/dist/components/Icon/assets/forest.svg +1 -0
- package/dist/components/Icon/assets/full-circle.svg +1 -0
- package/dist/components/Icon/assets/gas.svg +1 -0
- package/dist/components/Icon/assets/gift.svg +1 -0
- package/dist/components/Icon/assets/global-search.svg +1 -0
- package/dist/components/Icon/assets/global.svg +1 -0
- package/dist/components/Icon/assets/graph.svg +1 -0
- package/dist/components/Icon/assets/hardware.svg +1 -0
- package/dist/components/Icon/assets/hash-tag.svg +1 -0
- package/dist/components/Icon/assets/heart-filled.svg +1 -0
- package/dist/components/Icon/assets/heart.svg +1 -0
- package/dist/components/Icon/assets/hierarchy.svg +1 -0
- package/dist/components/Icon/assets/home-filled.svg +1 -0
- package/dist/components/Icon/assets/home.svg +1 -0
- package/dist/components/Icon/assets/image.svg +1 -0
- package/dist/components/Icon/assets/info.svg +1 -0
- package/dist/components/Icon/assets/inventory.svg +1 -0
- package/dist/components/Icon/assets/joystick.svg +1 -0
- package/dist/components/Icon/assets/keep-filled.svg +1 -0
- package/dist/components/Icon/assets/keep.svg +1 -0
- package/dist/components/Icon/assets/key.svg +1 -0
- package/dist/components/Icon/assets/last-page.svg +1 -0
- package/dist/components/Icon/assets/light-filled.svg +1 -0
- package/dist/components/Icon/assets/light.svg +1 -0
- package/dist/components/Icon/assets/link.svg +1 -0
- package/dist/components/Icon/assets/loading.svg +1 -0
- package/dist/components/Icon/assets/location.svg +1 -0
- package/dist/components/Icon/assets/lock-slash.svg +1 -0
- package/dist/components/Icon/assets/lock.svg +1 -0
- package/dist/components/Icon/assets/locked-filled.svg +1 -0
- package/dist/components/Icon/assets/login.svg +1 -0
- package/dist/components/Icon/assets/logout.svg +1 -0
- package/dist/components/Icon/assets/mail.svg +1 -0
- package/dist/components/Icon/assets/map.svg +1 -0
- package/dist/components/Icon/assets/menu.svg +1 -0
- package/dist/components/Icon/assets/message-question.svg +1 -0
- package/dist/components/Icon/assets/messages.svg +1 -0
- package/dist/components/Icon/assets/mic.svg +1 -0
- package/dist/components/Icon/assets/minus-bold.svg +1 -0
- package/dist/components/Icon/assets/minus-square.svg +1 -0
- package/dist/components/Icon/assets/minus.svg +1 -0
- package/dist/components/Icon/assets/mobile.svg +1 -0
- package/dist/components/Icon/assets/money-bag.svg +1 -0
- package/dist/components/Icon/assets/money.svg +1 -0
- package/dist/components/Icon/assets/monitor.svg +1 -0
- package/dist/components/Icon/assets/more-horizontal.svg +1 -0
- package/dist/components/Icon/assets/more-vertical.svg +1 -0
- package/dist/components/Icon/assets/mountain-flag.svg +1 -0
- package/dist/components/Icon/assets/music-note.svg +1 -0
- package/dist/components/Icon/assets/notification.svg +1 -0
- package/dist/components/Icon/assets/page-info.svg +1 -0
- package/dist/components/Icon/assets/palette.svg +1 -0
- package/dist/components/Icon/assets/password-check.svg +1 -0
- package/dist/components/Icon/assets/pending.svg +1 -0
- package/dist/components/Icon/assets/people.svg +1 -0
- package/dist/components/Icon/assets/person-cancel.svg +1 -0
- package/dist/components/Icon/assets/pin.svg +1 -0
- package/dist/components/Icon/assets/plant.svg +1 -0
- package/dist/components/Icon/assets/plug.svg +1 -0
- package/dist/components/Icon/assets/plus-and-minus.svg +1 -0
- package/dist/components/Icon/assets/policy-alert.svg +1 -0
- package/dist/components/Icon/assets/print.svg +1 -0
- package/dist/components/Icon/assets/priority-high.svg +1 -0
- package/dist/components/Icon/assets/privacy-tip.svg +1 -0
- package/dist/components/Icon/assets/programming-arrows.svg +1 -0
- package/dist/components/Icon/assets/publish.svg +1 -0
- package/dist/components/Icon/assets/qr-code.svg +1 -0
- package/dist/components/Icon/assets/question.svg +1 -0
- package/dist/components/Icon/assets/receive.svg +1 -0
- package/dist/components/Icon/assets/received.svg +1 -0
- package/dist/components/Icon/assets/refresh.svg +1 -0
- package/dist/components/Icon/assets/remove-minus.svg +1 -0
- package/dist/components/Icon/assets/report.svg +1 -0
- package/dist/components/Icon/assets/rocket.svg +1 -0
- package/dist/components/Icon/assets/save-filled.svg +1 -0
- package/dist/components/Icon/assets/save.svg +1 -0
- package/dist/components/Icon/assets/saving.svg +1 -0
- package/dist/components/Icon/assets/scan-barcode.svg +1 -0
- package/dist/components/Icon/assets/scan-focus.svg +1 -0
- package/dist/components/Icon/assets/scan.svg +1 -0
- package/dist/components/Icon/assets/search.svg +1 -0
- package/dist/components/Icon/assets/security-alert.svg +1 -0
- package/dist/components/Icon/assets/security-cross.svg +1 -0
- package/dist/components/Icon/assets/security-key.svg +1 -0
- package/dist/components/Icon/assets/security-search.svg +1 -0
- package/dist/components/Icon/assets/security-slash.svg +1 -0
- package/dist/components/Icon/assets/security-tick.svg +1 -0
- package/dist/components/Icon/assets/security-time.svg +1 -0
- package/dist/components/Icon/assets/security-user.svg +1 -0
- package/dist/components/Icon/assets/security.svg +1 -0
- package/dist/components/Icon/assets/send.svg +1 -0
- package/dist/components/Icon/assets/sentiment-dissatisfied.svg +1 -0
- package/dist/components/Icon/assets/sentiment-neutral.svg +1 -0
- package/dist/components/Icon/assets/sentiment-satisfied.svg +1 -0
- package/dist/components/Icon/assets/sentiment-very-satisfied.svg +1 -0
- package/dist/components/Icon/assets/setting-filled.svg +1 -0
- package/dist/components/Icon/assets/setting.svg +1 -0
- package/dist/components/Icon/assets/share.svg +1 -0
- package/dist/components/Icon/assets/shield-lock.svg +1 -0
- package/dist/components/Icon/assets/shopping-bag.svg +1 -0
- package/dist/components/Icon/assets/shopping-cart.svg +1 -0
- package/dist/components/Icon/assets/signal-cellular.svg +1 -0
- package/dist/components/Icon/assets/slash.svg +1 -0
- package/dist/components/Icon/assets/sms.svg +1 -0
- package/dist/components/Icon/assets/snaps-mobile.svg +1 -0
- package/dist/components/Icon/assets/snaps-plus.svg +1 -0
- package/dist/components/Icon/assets/snaps-round.svg +1 -0
- package/dist/components/Icon/assets/snaps.svg +1 -0
- package/dist/components/Icon/assets/sort-by-alpha.svg +1 -0
- package/dist/components/Icon/assets/sort.svg +1 -0
- package/dist/components/Icon/assets/sparkle.svg +1 -0
- package/dist/components/Icon/assets/speed.svg +1 -0
- package/dist/components/Icon/assets/speedometer.svg +1 -0
- package/dist/components/Icon/assets/square.svg +1 -0
- package/dist/components/Icon/assets/stake.svg +1 -0
- package/dist/components/Icon/assets/star-filled.svg +1 -0
- package/dist/components/Icon/assets/star.svg +1 -0
- package/dist/components/Icon/assets/start.svg +1 -0
- package/dist/components/Icon/assets/storefront.svg +1 -0
- package/dist/components/Icon/assets/student.svg +1 -0
- package/dist/components/Icon/assets/swap-horizontal.svg +1 -0
- package/dist/components/Icon/assets/swap-vertical.svg +3 -0
- package/dist/components/Icon/assets/tab-close.svg +1 -0
- package/dist/components/Icon/assets/table-row.svg +1 -0
- package/dist/components/Icon/assets/tablet.svg +1 -0
- package/dist/components/Icon/assets/tag.svg +1 -0
- package/dist/components/Icon/assets/thumb-down-filled.svg +1 -0
- package/dist/components/Icon/assets/thumb-down.svg +1 -0
- package/dist/components/Icon/assets/thumb-up-filled.svg +1 -0
- package/dist/components/Icon/assets/thumb-up.svg +1 -0
- package/dist/components/Icon/assets/tint.svg +1 -0
- package/dist/components/Icon/assets/tooltip.svg +1 -0
- package/dist/components/Icon/assets/translate.svg +1 -0
- package/dist/components/Icon/assets/trash.svg +1 -0
- package/dist/components/Icon/assets/trend-down.svg +1 -0
- package/dist/components/Icon/assets/trend-up.svg +1 -0
- package/dist/components/Icon/assets/undo.svg +1 -0
- package/dist/components/Icon/assets/unfold.svg +1 -0
- package/dist/components/Icon/assets/unlocked-filled.svg +1 -0
- package/dist/components/Icon/assets/unpin.svg +1 -0
- package/dist/components/Icon/assets/upload-file.svg +1 -0
- package/dist/components/Icon/assets/upload.svg +1 -0
- package/dist/components/Icon/assets/usb.svg +1 -0
- package/dist/components/Icon/assets/user-check.svg +1 -0
- package/dist/components/Icon/assets/user-circle-add.svg +1 -0
- package/dist/components/Icon/assets/user-circle-remove.svg +1 -0
- package/dist/components/Icon/assets/user-circle.svg +1 -0
- package/dist/components/Icon/assets/user.svg +1 -0
- package/dist/components/Icon/assets/verified-filled.svg +1 -0
- package/dist/components/Icon/assets/verified.svg +1 -0
- package/dist/components/Icon/assets/videocam.svg +1 -0
- package/dist/components/Icon/assets/view-column.svg +1 -0
- package/dist/components/Icon/assets/view-in-ar.svg +1 -0
- package/dist/components/Icon/assets/volume-off.svg +1 -0
- package/dist/components/Icon/assets/volume-up.svg +1 -0
- package/dist/components/Icon/assets/wallet-filled.svg +1 -0
- package/dist/components/Icon/assets/wallet.svg +1 -0
- package/dist/components/Icon/assets/warning.svg +1 -0
- package/dist/components/Icon/assets/web-traffic.svg +1 -0
- package/dist/components/Icon/assets/widgets.svg +1 -0
- package/dist/components/Icon/assets/wifi-off.svg +1 -0
- package/dist/components/Icon/assets/wifi.svg +1 -0
- package/dist/components/Icon/assets/x.svg +1 -0
- package/dist/components/Icon/index.d.ts +4 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/Icon/index.js +10 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Text/Text.constants.d.ts +8 -0
- package/dist/components/Text/Text.constants.d.ts.map +1 -0
- package/dist/components/Text/Text.constants.js +23 -0
- package/dist/components/Text/Text.constants.js.map +1 -0
- package/dist/components/Text/Text.d.ts +4 -0
- package/dist/components/Text/Text.d.ts.map +1 -0
- package/dist/components/Text/Text.js +51 -0
- package/dist/components/Text/Text.js.map +1 -0
- package/dist/components/Text/Text.types.d.ts +45 -0
- package/dist/components/Text/Text.types.d.ts.map +1 -0
- package/dist/components/Text/Text.types.js +3 -0
- package/dist/components/Text/Text.types.js.map +1 -0
- package/dist/components/Text/Text.utilities.d.ts +32 -0
- package/dist/components/Text/Text.utilities.d.ts.map +1 -0
- package/dist/components/Text/Text.utilities.js +46 -0
- package/dist/components/Text/Text.utilities.js.map +1 -0
- package/dist/components/Text/index.d.ts +4 -0
- package/dist/components/Text/index.d.ts.map +1 -0
- package/dist/components/Text/index.js +12 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/TextButton/TextButton.constants.d.ts +4 -0
- package/dist/components/TextButton/TextButton.constants.d.ts.map +1 -0
- package/dist/components/TextButton/TextButton.constants.js +12 -0
- package/dist/components/TextButton/TextButton.constants.js.map +1 -0
- package/dist/components/TextButton/TextButton.d.ts +4 -0
- package/dist/components/TextButton/TextButton.d.ts.map +1 -0
- package/dist/components/TextButton/TextButton.js +68 -0
- package/dist/components/TextButton/TextButton.js.map +1 -0
- package/dist/components/TextButton/TextButton.types.d.ts +69 -0
- package/dist/components/TextButton/TextButton.types.d.ts.map +1 -0
- package/dist/components/TextButton/TextButton.types.js +3 -0
- package/dist/components/TextButton/TextButton.types.js.map +1 -0
- package/dist/components/TextButton/index.d.ts +4 -0
- package/dist/components/TextButton/index.d.ts.map +1 -0
- package/dist/components/TextButton/index.js +8 -0
- package/dist/components/TextButton/index.js.map +1 -0
- package/dist/components/index.d.ts +49 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +81 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/temp-components/Blockies/Blockies.d.ts +4 -0
- package/dist/components/temp-components/Blockies/Blockies.d.ts.map +1 -0
- package/dist/components/temp-components/Blockies/Blockies.js +14 -0
- package/dist/components/temp-components/Blockies/Blockies.js.map +1 -0
- package/dist/components/temp-components/Blockies/Blockies.types.d.ts +15 -0
- package/dist/components/temp-components/Blockies/Blockies.types.d.ts.map +1 -0
- package/dist/components/temp-components/Blockies/Blockies.types.js +3 -0
- package/dist/components/temp-components/Blockies/Blockies.types.js.map +1 -0
- package/dist/components/temp-components/Blockies/Blockies.utilities.d.ts +24 -0
- package/dist/components/temp-components/Blockies/Blockies.utilities.d.ts.map +1 -0
- package/dist/components/temp-components/Blockies/Blockies.utilities.js +492 -0
- package/dist/components/temp-components/Blockies/Blockies.utilities.js.map +1 -0
- package/dist/components/temp-components/Blockies/index.d.ts +3 -0
- package/dist/components/temp-components/Blockies/index.d.ts.map +1 -0
- package/dist/components/temp-components/Blockies/index.js +6 -0
- package/dist/components/temp-components/Blockies/index.js.map +1 -0
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.ts +4 -0
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.ts.map +1 -0
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.js +59 -0
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.js.map +1 -0
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.ts +6 -0
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.ts.map +1 -0
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.js +3 -0
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.js.map +1 -0
- package/dist/components/temp-components/ButtonAnimated/index.d.ts +3 -0
- package/dist/components/temp-components/ButtonAnimated/index.d.ts.map +1 -0
- package/dist/components/temp-components/ButtonAnimated/index.js +6 -0
- package/dist/components/temp-components/ButtonAnimated/index.js.map +1 -0
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.d.ts +4 -0
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.d.ts.map +1 -0
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.js +74 -0
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.js.map +1 -0
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.ts +64 -0
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.ts.map +1 -0
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.js +3 -0
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.js.map +1 -0
- package/dist/components/temp-components/ImageOrSvg/index.d.ts +3 -0
- package/dist/components/temp-components/ImageOrSvg/index.d.ts.map +1 -0
- package/dist/components/temp-components/ImageOrSvg/index.js +6 -0
- package/dist/components/temp-components/ImageOrSvg/index.js.map +1 -0
- package/dist/components/temp-components/Jazzicon/Jazzicon.d.ts +4 -0
- package/dist/components/temp-components/Jazzicon/Jazzicon.d.ts.map +1 -0
- package/dist/components/temp-components/Jazzicon/Jazzicon.js +14 -0
- package/dist/components/temp-components/Jazzicon/Jazzicon.js.map +1 -0
- package/dist/components/temp-components/Jazzicon/Jazzicon.types.d.ts +11 -0
- package/dist/components/temp-components/Jazzicon/Jazzicon.types.d.ts.map +1 -0
- package/dist/components/temp-components/Jazzicon/Jazzicon.types.js +3 -0
- package/dist/components/temp-components/Jazzicon/Jazzicon.types.js.map +1 -0
- package/dist/components/temp-components/Jazzicon/index.d.ts +3 -0
- package/dist/components/temp-components/Jazzicon/index.d.ts.map +1 -0
- package/dist/components/temp-components/Jazzicon/index.js +6 -0
- package/dist/components/temp-components/Jazzicon/index.js.map +1 -0
- package/dist/components/temp-components/Maskicon/Maskicon.d.ts +4 -0
- package/dist/components/temp-components/Maskicon/Maskicon.d.ts.map +1 -0
- package/dist/components/temp-components/Maskicon/Maskicon.js +52 -0
- package/dist/components/temp-components/Maskicon/Maskicon.js.map +1 -0
- package/dist/components/temp-components/Maskicon/Maskicon.types.d.ts +15 -0
- package/dist/components/temp-components/Maskicon/Maskicon.types.d.ts.map +1 -0
- package/dist/components/temp-components/Maskicon/Maskicon.types.js +3 -0
- package/dist/components/temp-components/Maskicon/Maskicon.types.js.map +1 -0
- package/dist/components/temp-components/Maskicon/Maskicon.utilities.d.ts +57 -0
- package/dist/components/temp-components/Maskicon/Maskicon.utilities.d.ts.map +1 -0
- package/dist/components/temp-components/Maskicon/Maskicon.utilities.js +282 -0
- package/dist/components/temp-components/Maskicon/Maskicon.utilities.js.map +1 -0
- package/dist/components/temp-components/Maskicon/index.d.ts +3 -0
- package/dist/components/temp-components/Maskicon/index.d.ts.map +1 -0
- package/dist/components/temp-components/Maskicon/index.js +6 -0
- package/dist/components/temp-components/Maskicon/index.js.map +1 -0
- package/dist/components/temp-components/Spinner/Spinner.d.ts +4 -0
- package/dist/components/temp-components/Spinner/Spinner.d.ts.map +1 -0
- package/dist/components/temp-components/Spinner/Spinner.js +68 -0
- package/dist/components/temp-components/Spinner/Spinner.js.map +1 -0
- package/dist/components/temp-components/Spinner/Spinner.types.d.ts +31 -0
- package/dist/components/temp-components/Spinner/Spinner.types.d.ts.map +1 -0
- package/dist/components/temp-components/Spinner/Spinner.types.js +3 -0
- package/dist/components/temp-components/Spinner/Spinner.types.js.map +1 -0
- package/dist/components/temp-components/Spinner/index.d.ts +3 -0
- package/dist/components/temp-components/Spinner/index.d.ts.map +1 -0
- package/dist/components/temp-components/Spinner/index.js +6 -0
- package/dist/components/temp-components/Spinner/index.js.map +1 -0
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.d.ts +4 -0
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.d.ts.map +1 -0
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.js +16 -0
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.js.map +1 -0
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.ts +16 -0
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.ts.map +1 -0
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.js +3 -0
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.js.map +1 -0
- package/dist/components/temp-components/TextOrChildren/index.d.ts +3 -0
- package/dist/components/temp-components/TextOrChildren/index.d.ts.map +1 -0
- package/dist/components/temp-components/TextOrChildren/index.js +6 -0
- package/dist/components/temp-components/TextOrChildren/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +618 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +629 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +39 -16
- package/dist/index.cjs +0 -13
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -8
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -8
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -10
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blockies.js","sourceRoot":"","sources":["../../../../src/components/temp-components/Blockies/Blockies.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+CAAqC;AAIrC,6DAAiD;AAE1C,MAAM,QAAQ,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,KAAK,EAAiB,EAAE,EAAE;IAC1E,OAAO,CACL,CAAC,oBAAK,CACJ,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,IAAA,8BAAS,EAAC,OAAO,CAAC,EAAE,CAAC,CACpC,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,MAAM,CAAC,CAAC,IAAI,CAAC,CACb,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,QAAQ,YASnB","sourcesContent":["import React from 'react';\nimport { Image } from 'react-native';\n\n// @ts-ignore\nimport type { BlockiesProps } from './Blockies.types';\nimport { toDataUrl } from './Blockies.utilities';\n\nexport const Blockies = ({ address, size = 32, ...props }: BlockiesProps) => {\n return (\n <Image\n source={{ uri: toDataUrl(address) }}\n width={size}\n height={size}\n {...props}\n />\n );\n};\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ImageProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Blockies component props.
|
|
4
|
+
*/
|
|
5
|
+
export type BlockiesProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Required address used as a unique identifier to generate the Blockies.
|
|
8
|
+
*/
|
|
9
|
+
address: string;
|
|
10
|
+
/**
|
|
11
|
+
* Optional prop to control the size of the Blockies.
|
|
12
|
+
*/
|
|
13
|
+
size?: number;
|
|
14
|
+
} & Omit<ImageProps, 'source' | 'width' | 'height'>;
|
|
15
|
+
//# sourceMappingURL=Blockies.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blockies.types.d.ts","sourceRoot":"","sources":["../../../../src/components/temp-components/Blockies/Blockies.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blockies.types.js","sourceRoot":"","sources":["../../../../src/components/temp-components/Blockies/Blockies.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ImageProps } from 'react-native';\n\n/**\n * Blockies component props.\n */\nexport type BlockiesProps = {\n /**\n * Required address used as a unique identifier to generate the Blockies.\n */\n address: string;\n /**\n * Optional prop to control the size of the Blockies.\n */\n size?: number;\n} & Omit<ImageProps, 'source' | 'width' | 'height'>;\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A handy class to calculate color values and generate PNG images.
|
|
3
|
+
*
|
|
4
|
+
* @version 1.0.0
|
|
5
|
+
* @author Robert Eisele <robert@xarg.org>
|
|
6
|
+
* @copyright Copyright (c) 2010, Robert Eisele
|
|
7
|
+
* @see {@link http://www.xarg.org/2010/03/generate-client-side-png-files-using-javascript/}
|
|
8
|
+
* @license BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Utility class with the single responsibility
|
|
12
|
+
* of caching Blockies Data URIs
|
|
13
|
+
*/
|
|
14
|
+
export declare class Blockies {
|
|
15
|
+
static cache: Record<string, string>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Generate a Blockies data URL for a given address
|
|
19
|
+
*
|
|
20
|
+
* @param address The address to generate a Blockies for
|
|
21
|
+
* @returns A data URL string containing the Blockies image
|
|
22
|
+
*/
|
|
23
|
+
export declare function toDataUrl(address: string): string;
|
|
24
|
+
//# sourceMappingURL=Blockies.utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blockies.utilities.d.ts","sourceRoot":"","sources":["../../../../src/components/temp-components/Blockies/Blockies.utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqjBH;;;GAGG;AACH,qBAAa,QAAQ;IACnB,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;CAC3C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAuCjD"}
|
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* A handy class to calculate color values and generate PNG images.
|
|
4
|
+
*
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
* @author Robert Eisele <robert@xarg.org>
|
|
7
|
+
* @copyright Copyright (c) 2010, Robert Eisele
|
|
8
|
+
* @see {@link http://www.xarg.org/2010/03/generate-client-side-png-files-using-javascript/}
|
|
9
|
+
* @license BSD-3-Clause
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.toDataUrl = exports.Blockies = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* Writes string arguments to a buffer starting at the specified offset.
|
|
15
|
+
*
|
|
16
|
+
* @param buffer - The buffer to write to
|
|
17
|
+
* @param offs - The offset to start writing at
|
|
18
|
+
* @param args - The string arguments to write
|
|
19
|
+
*/
|
|
20
|
+
function write(buffer, offs, ...args) {
|
|
21
|
+
for (const arg of args) {
|
|
22
|
+
for (let j = 0; j < arg.length; j += 1) {
|
|
23
|
+
// eslint-disable-next-line no-plusplus
|
|
24
|
+
buffer[offs++] = arg.charAt(j);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Converts a 16-bit number to a 2-byte string.
|
|
30
|
+
*
|
|
31
|
+
* @param w - The number to convert
|
|
32
|
+
* @returns A 2-byte string representation
|
|
33
|
+
*/
|
|
34
|
+
function byte2(w) {
|
|
35
|
+
// eslint-disable-next-line no-bitwise
|
|
36
|
+
return String.fromCharCode((w >> 8) & 255, w & 255);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Converts a 32-bit number to a 4-byte string.
|
|
40
|
+
*
|
|
41
|
+
* @param w - The number to convert
|
|
42
|
+
* @returns A 4-byte string representation
|
|
43
|
+
*/
|
|
44
|
+
function byte4(w) {
|
|
45
|
+
return String.fromCharCode(
|
|
46
|
+
// eslint-disable-next-line no-bitwise
|
|
47
|
+
(w >> 24) & 255,
|
|
48
|
+
// eslint-disable-next-line no-bitwise
|
|
49
|
+
(w >> 16) & 255,
|
|
50
|
+
// eslint-disable-next-line no-bitwise
|
|
51
|
+
(w >> 8) & 255,
|
|
52
|
+
// eslint-disable-next-line no-bitwise
|
|
53
|
+
w & 255);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Converts a 16-bit number to a 2-byte string in little-endian format.
|
|
57
|
+
*
|
|
58
|
+
* @param w - The number to convert
|
|
59
|
+
* @returns A 2-byte string representation in little-endian format
|
|
60
|
+
*/
|
|
61
|
+
function byte2lsb(w) {
|
|
62
|
+
// eslint-disable-next-line no-bitwise
|
|
63
|
+
return String.fromCharCode(w & 255, (w >> 8) & 255);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* PNG class for generating PNG images
|
|
67
|
+
*/
|
|
68
|
+
class PNG {
|
|
69
|
+
constructor(width, height, depth) {
|
|
70
|
+
this.width = width;
|
|
71
|
+
this.height = height;
|
|
72
|
+
this.depth = depth;
|
|
73
|
+
// pixel data and row filter identifier size
|
|
74
|
+
this.pix_size = height * (width + 1);
|
|
75
|
+
// deflate header, pix_size, block headers, adler32 checksum
|
|
76
|
+
this.data_size =
|
|
77
|
+
2 + this.pix_size + 5 * Math.floor((0xfffe + this.pix_size) / 0xffff) + 4;
|
|
78
|
+
// offsets and sizes of Png chunks
|
|
79
|
+
this.ihdr_offs = 0; // IHDR offset and size
|
|
80
|
+
this.ihdr_size = 4 + 4 + 13 + 4;
|
|
81
|
+
this.plte_offs = this.ihdr_offs + this.ihdr_size; // PLTE offset and size
|
|
82
|
+
this.plte_size = 4 + 4 + 3 * depth + 4;
|
|
83
|
+
this.trns_offs = this.plte_offs + this.plte_size; // tRNS offset and size
|
|
84
|
+
this.trns_size = 4 + 4 + depth + 4;
|
|
85
|
+
this.idat_offs = this.trns_offs + this.trns_size; // IDAT offset and size
|
|
86
|
+
this.idat_size = 4 + 4 + this.data_size + 4;
|
|
87
|
+
this.iend_offs = this.idat_offs + this.idat_size; // IEND offset and size
|
|
88
|
+
this.iend_size = 4 + 4 + 4;
|
|
89
|
+
this.buffer_size = this.iend_offs + this.iend_size; // total PNG size
|
|
90
|
+
this.buffer = new Array(this.buffer_size);
|
|
91
|
+
this.palette = {};
|
|
92
|
+
this.pindex = 0;
|
|
93
|
+
this._crc32 = new Array(256);
|
|
94
|
+
// initialize buffer with zero bytes
|
|
95
|
+
for (let i = 0; i < this.buffer_size; i += 1) {
|
|
96
|
+
this.buffer[i] = '\x00';
|
|
97
|
+
}
|
|
98
|
+
// initialize non-zero elements
|
|
99
|
+
write(this.buffer, this.ihdr_offs, byte4(this.ihdr_size - 12), 'IHDR', byte4(width), byte4(height), '\x08\x03');
|
|
100
|
+
write(this.buffer, this.plte_offs, byte4(this.plte_size - 12), 'PLTE');
|
|
101
|
+
write(this.buffer, this.trns_offs, byte4(this.trns_size - 12), 'tRNS');
|
|
102
|
+
write(this.buffer, this.idat_offs, byte4(this.idat_size - 12), 'IDAT');
|
|
103
|
+
write(this.buffer, this.iend_offs, byte4(this.iend_size - 12), 'IEND');
|
|
104
|
+
// initialize deflate header
|
|
105
|
+
// eslint-disable-next-line no-bitwise
|
|
106
|
+
let header = ((8 + (7 << 4)) << 8) | (3 << 6);
|
|
107
|
+
header += 31 - (header % 31);
|
|
108
|
+
write(this.buffer, this.idat_offs + 8, byte2(header));
|
|
109
|
+
// initialize deflate block headers
|
|
110
|
+
// eslint-disable-next-line no-bitwise
|
|
111
|
+
for (let i = 0; (i << 16) - 1 < this.pix_size; i += 1) {
|
|
112
|
+
let size;
|
|
113
|
+
let bits;
|
|
114
|
+
if (i + 0xffff < this.pix_size) {
|
|
115
|
+
size = 0xffff;
|
|
116
|
+
bits = '\x00';
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
// eslint-disable-next-line no-bitwise
|
|
120
|
+
size = this.pix_size - (i << 16) - i;
|
|
121
|
+
bits = '\x01';
|
|
122
|
+
}
|
|
123
|
+
write(this.buffer,
|
|
124
|
+
// eslint-disable-next-line no-bitwise
|
|
125
|
+
this.idat_offs + 8 + 2 + (i << 16) + (i << 2), bits, byte2lsb(size),
|
|
126
|
+
// eslint-disable-next-line no-bitwise
|
|
127
|
+
byte2lsb(~size));
|
|
128
|
+
}
|
|
129
|
+
/* Create crc32 lookup table */
|
|
130
|
+
for (let i = 0; i < 256; i += 1) {
|
|
131
|
+
let c = i;
|
|
132
|
+
for (let j = 0; j < 8; j += 1) {
|
|
133
|
+
// eslint-disable-next-line no-bitwise
|
|
134
|
+
if (c & 1) {
|
|
135
|
+
// eslint-disable-next-line no-bitwise
|
|
136
|
+
c = -306674912 ^ ((c >> 1) & 0x7fffffff);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
// eslint-disable-next-line no-bitwise
|
|
140
|
+
c = (c >> 1) & 0x7fffffff;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
this._crc32[i] = c;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Computes the index into a png for a given pixel.
|
|
148
|
+
*
|
|
149
|
+
* @param x - The x coordinate
|
|
150
|
+
* @param y - The y coordinate
|
|
151
|
+
* @returns The buffer index for the pixel
|
|
152
|
+
*/
|
|
153
|
+
index(x, y) {
|
|
154
|
+
const i = y * (this.width + 1) + x + 1;
|
|
155
|
+
const j = this.idat_offs + 8 + 2 + 5 * Math.floor(i / 0xffff + 1) + i;
|
|
156
|
+
return j;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Converts a color and builds up the palette.
|
|
160
|
+
*
|
|
161
|
+
* @param red - Red component (0-255)
|
|
162
|
+
* @param green - Green component (0-255)
|
|
163
|
+
* @param blue - Blue component (0-255)
|
|
164
|
+
* @param alpha - Alpha component (0-255)
|
|
165
|
+
* @returns The palette color string
|
|
166
|
+
*/
|
|
167
|
+
color(red, green, blue, alpha = 255) {
|
|
168
|
+
// eslint-disable-next-line no-bitwise
|
|
169
|
+
const color = (((((alpha << 8) | red) << 8) | green) << 8) | blue;
|
|
170
|
+
if (typeof this.palette[color] === 'undefined') {
|
|
171
|
+
if (this.pindex === this.depth) {
|
|
172
|
+
return '\x00';
|
|
173
|
+
}
|
|
174
|
+
const ndx = this.plte_offs + 8 + 3 * this.pindex;
|
|
175
|
+
this.buffer[ndx + 0] = String.fromCharCode(red);
|
|
176
|
+
this.buffer[ndx + 1] = String.fromCharCode(green);
|
|
177
|
+
this.buffer[ndx + 2] = String.fromCharCode(blue);
|
|
178
|
+
this.buffer[this.trns_offs + 8 + this.pindex] =
|
|
179
|
+
String.fromCharCode(alpha);
|
|
180
|
+
// eslint-disable-next-line no-plusplus
|
|
181
|
+
this.palette[color] = String.fromCharCode(this.pindex++);
|
|
182
|
+
}
|
|
183
|
+
return this.palette[color];
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Outputs a PNG string, Base64 encoded.
|
|
187
|
+
*
|
|
188
|
+
* @returns A Base64 encoded PNG string
|
|
189
|
+
*/
|
|
190
|
+
getBase64() {
|
|
191
|
+
const s = this.getDump();
|
|
192
|
+
const ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
193
|
+
let c1;
|
|
194
|
+
let c2;
|
|
195
|
+
let c3;
|
|
196
|
+
let e1;
|
|
197
|
+
let e2;
|
|
198
|
+
let e3;
|
|
199
|
+
let e4;
|
|
200
|
+
const l = s.length;
|
|
201
|
+
let i = 0;
|
|
202
|
+
let r = '';
|
|
203
|
+
do {
|
|
204
|
+
c1 = s.charCodeAt(i);
|
|
205
|
+
// eslint-disable-next-line no-bitwise
|
|
206
|
+
e1 = c1 >> 2;
|
|
207
|
+
c2 = s.charCodeAt(i + 1);
|
|
208
|
+
// eslint-disable-next-line no-bitwise
|
|
209
|
+
e2 = ((c1 & 3) << 4) | (c2 >> 4);
|
|
210
|
+
c3 = s.charCodeAt(i + 2);
|
|
211
|
+
if (l < i + 2) {
|
|
212
|
+
e3 = 64;
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
// eslint-disable-next-line no-bitwise
|
|
216
|
+
e3 = ((c2 & 0xf) << 2) | (c3 >> 6);
|
|
217
|
+
}
|
|
218
|
+
if (l < i + 3) {
|
|
219
|
+
e4 = 64;
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
// eslint-disable-next-line no-bitwise
|
|
223
|
+
e4 = c3 & 0x3f;
|
|
224
|
+
}
|
|
225
|
+
r += ch.charAt(e1) + ch.charAt(e2) + ch.charAt(e3) + ch.charAt(e4);
|
|
226
|
+
i += 3;
|
|
227
|
+
} while (i < l);
|
|
228
|
+
return r;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Outputs a PNG string.
|
|
232
|
+
*
|
|
233
|
+
* @returns A PNG string
|
|
234
|
+
*/
|
|
235
|
+
getDump() {
|
|
236
|
+
// compute adler32 of output pixels + row filter bytes
|
|
237
|
+
const BASE = 65521; /* largest prime smaller than 65536 */
|
|
238
|
+
const NMAX = 5552; /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
|
|
239
|
+
let s1 = 1;
|
|
240
|
+
let s2 = 0;
|
|
241
|
+
let n = NMAX;
|
|
242
|
+
for (let y = 0; y < this.height; y += 1) {
|
|
243
|
+
for (let x = -1; x < this.width; x += 1) {
|
|
244
|
+
s1 += this.buffer[this.index(x, y)].charCodeAt(0);
|
|
245
|
+
s2 += s1;
|
|
246
|
+
n -= 1;
|
|
247
|
+
if (n === 0) {
|
|
248
|
+
s1 %= BASE;
|
|
249
|
+
s2 %= BASE;
|
|
250
|
+
n = NMAX;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
s1 %= BASE;
|
|
255
|
+
s2 %= BASE;
|
|
256
|
+
write(this.buffer, this.idat_offs + this.idat_size - 8,
|
|
257
|
+
// eslint-disable-next-line no-bitwise
|
|
258
|
+
byte4((s2 << 16) | s1));
|
|
259
|
+
// compute crc32 of the PNG chunks
|
|
260
|
+
const crc32 = (png, offs, size) => {
|
|
261
|
+
let crc = -1;
|
|
262
|
+
for (let i = 4; i < size - 4; i += 1) {
|
|
263
|
+
crc =
|
|
264
|
+
// eslint-disable-next-line no-bitwise
|
|
265
|
+
this._crc32[(crc ^ png[offs + i].charCodeAt(0)) & 0xff] ^
|
|
266
|
+
// eslint-disable-next-line no-bitwise
|
|
267
|
+
((crc >> 8) & 0x00ffffff);
|
|
268
|
+
}
|
|
269
|
+
// eslint-disable-next-line no-bitwise
|
|
270
|
+
write(png, offs + size - 4, byte4(crc ^ -1));
|
|
271
|
+
};
|
|
272
|
+
crc32(this.buffer, this.ihdr_offs, this.ihdr_size);
|
|
273
|
+
crc32(this.buffer, this.plte_offs, this.plte_size);
|
|
274
|
+
crc32(this.buffer, this.trns_offs, this.trns_size);
|
|
275
|
+
crc32(this.buffer, this.idat_offs, this.idat_size);
|
|
276
|
+
crc32(this.buffer, this.iend_offs, this.iend_size);
|
|
277
|
+
// convert PNG to string
|
|
278
|
+
return `\x89PNG\r\n\x1A\n${this.buffer.join('')}`;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Fills a rectangle with the specified color.
|
|
282
|
+
*
|
|
283
|
+
* @param x - The x coordinate
|
|
284
|
+
* @param y - The y coordinate
|
|
285
|
+
* @param w - The width
|
|
286
|
+
* @param h - The height
|
|
287
|
+
* @param color - The color to fill with
|
|
288
|
+
*/
|
|
289
|
+
fillRect(x, y, w, h, color) {
|
|
290
|
+
for (let i = 0; i < w; i += 1) {
|
|
291
|
+
for (let j = 0; j < h; j += 1) {
|
|
292
|
+
this.buffer[this.index(x + i, y + j)] = color;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Converts HSL color to RGB helper function.
|
|
299
|
+
*
|
|
300
|
+
* @param p - First parameter
|
|
301
|
+
* @param q - Second parameter
|
|
302
|
+
* @param t - Third parameter
|
|
303
|
+
* @returns RGB value component
|
|
304
|
+
*/
|
|
305
|
+
function hue2rgb(p, q, t) {
|
|
306
|
+
let tValue = t;
|
|
307
|
+
if (tValue < 0) {
|
|
308
|
+
tValue += 1;
|
|
309
|
+
}
|
|
310
|
+
if (tValue > 1) {
|
|
311
|
+
tValue -= 1;
|
|
312
|
+
}
|
|
313
|
+
if (tValue < 1 / 6) {
|
|
314
|
+
return p + (q - p) * 6 * tValue;
|
|
315
|
+
}
|
|
316
|
+
if (tValue < 1 / 2) {
|
|
317
|
+
return q;
|
|
318
|
+
}
|
|
319
|
+
if (tValue < 2 / 3) {
|
|
320
|
+
return p + (q - p) * (2 / 3 - tValue) * 6;
|
|
321
|
+
}
|
|
322
|
+
return p;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Converts HSL color values to RGBA.
|
|
326
|
+
*
|
|
327
|
+
* @param h - Hue (0-1)
|
|
328
|
+
* @param s - Saturation (0-1)
|
|
329
|
+
* @param l - Lightness (0-1)
|
|
330
|
+
* @returns RGBA color array
|
|
331
|
+
*/
|
|
332
|
+
function hsl2rgb(h, s, l) {
|
|
333
|
+
let r;
|
|
334
|
+
let g;
|
|
335
|
+
let b;
|
|
336
|
+
if (s === 0) {
|
|
337
|
+
r = l;
|
|
338
|
+
g = l;
|
|
339
|
+
b = l; // achromatic
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
343
|
+
const p = 2 * l - q;
|
|
344
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
345
|
+
g = hue2rgb(p, q, h);
|
|
346
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
347
|
+
}
|
|
348
|
+
return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), 255];
|
|
349
|
+
}
|
|
350
|
+
// Random number generation
|
|
351
|
+
const randseed = new Array(4); // Xorshift: [x, y, z, w] 32 bit values
|
|
352
|
+
/**
|
|
353
|
+
* Seeds the random number generator.
|
|
354
|
+
*
|
|
355
|
+
* @param seed - The seed string
|
|
356
|
+
*/
|
|
357
|
+
function seedrand(seed) {
|
|
358
|
+
for (let i = 0; i < randseed.length; i += 1) {
|
|
359
|
+
randseed[i] = 0;
|
|
360
|
+
}
|
|
361
|
+
for (let i = 0; i < seed.length; i += 1) {
|
|
362
|
+
randseed[i % 4] =
|
|
363
|
+
// eslint-disable-next-line no-bitwise
|
|
364
|
+
(randseed[i % 4] << 5) - randseed[i % 4] + seed.charCodeAt(i);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Generates a random number using Xorshift algorithm.
|
|
369
|
+
*
|
|
370
|
+
* @returns A random number between 0 and 1
|
|
371
|
+
*/
|
|
372
|
+
function rand() {
|
|
373
|
+
// based on Java's String.hashCode(), expanded to 4 32bit values
|
|
374
|
+
// eslint-disable-next-line no-bitwise
|
|
375
|
+
const t = randseed[0] ^ (randseed[0] << 11);
|
|
376
|
+
randseed[0] = randseed[1];
|
|
377
|
+
randseed[1] = randseed[2];
|
|
378
|
+
randseed[2] = randseed[3];
|
|
379
|
+
// eslint-disable-next-line no-bitwise
|
|
380
|
+
randseed[3] = randseed[3] ^ (randseed[3] >> 19) ^ t ^ (t >> 8);
|
|
381
|
+
// eslint-disable-next-line no-bitwise
|
|
382
|
+
return (randseed[3] >>> 0) / ((1 << 31) >>> 0);
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Creates a random HSL color.
|
|
386
|
+
*
|
|
387
|
+
* @returns HSL color array
|
|
388
|
+
*/
|
|
389
|
+
function createColor() {
|
|
390
|
+
// saturation is the whole color spectrum
|
|
391
|
+
const h = Math.floor(rand() * 360);
|
|
392
|
+
// saturation goes from 40 to 100, it avoids greyish colors
|
|
393
|
+
const s = rand() * 60 + 40;
|
|
394
|
+
// lightness can be anything from 0 to 100, but probabilities are a bell curve around 50%
|
|
395
|
+
const l = (rand() + rand() + rand() + rand()) * 25;
|
|
396
|
+
return [h / 360, s / 100, l / 100];
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Creates image data for the Blockies pattern.
|
|
400
|
+
*
|
|
401
|
+
* @param size - The size of the image
|
|
402
|
+
* @returns Array of pixel data
|
|
403
|
+
*/
|
|
404
|
+
function createImageData(size) {
|
|
405
|
+
const width = size; // Only support square icons for now
|
|
406
|
+
const height = size;
|
|
407
|
+
const dataWidth = Math.ceil(width / 2);
|
|
408
|
+
const mirrorWidth = width - dataWidth;
|
|
409
|
+
const data = [];
|
|
410
|
+
for (let y = 0; y < height; y += 1) {
|
|
411
|
+
let row = [];
|
|
412
|
+
for (let x = 0; x < dataWidth; x += 1) {
|
|
413
|
+
// this makes foreground and background color to have a 43% (1/2.3) probability
|
|
414
|
+
// spot color has 13% chance
|
|
415
|
+
row[x] = Math.floor(rand() * 2.3);
|
|
416
|
+
}
|
|
417
|
+
const r = row.slice(0, mirrorWidth);
|
|
418
|
+
r.reverse();
|
|
419
|
+
row = row.concat(r);
|
|
420
|
+
for (const value of row) {
|
|
421
|
+
data.push(value);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return data;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Builds options for Blockies generation with defaults.
|
|
428
|
+
*
|
|
429
|
+
* @param opts - Partial options object
|
|
430
|
+
* @returns Complete options object
|
|
431
|
+
*/
|
|
432
|
+
function buildOpts(opts) {
|
|
433
|
+
if (!opts.seed) {
|
|
434
|
+
throw new Error('No seed provided');
|
|
435
|
+
}
|
|
436
|
+
seedrand(opts.seed);
|
|
437
|
+
return {
|
|
438
|
+
size: 8,
|
|
439
|
+
scale: 16,
|
|
440
|
+
color: createColor(),
|
|
441
|
+
bgcolor: createColor(),
|
|
442
|
+
spotcolor: createColor(),
|
|
443
|
+
...opts,
|
|
444
|
+
seed: opts.seed,
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Utility class with the single responsibility
|
|
449
|
+
* of caching Blockies Data URIs
|
|
450
|
+
*/
|
|
451
|
+
class Blockies {
|
|
452
|
+
}
|
|
453
|
+
exports.Blockies = Blockies;
|
|
454
|
+
Blockies.cache = {};
|
|
455
|
+
/**
|
|
456
|
+
* Generate a Blockies data URL for a given address
|
|
457
|
+
*
|
|
458
|
+
* @param address The address to generate a Blockies for
|
|
459
|
+
* @returns A data URL string containing the Blockies image
|
|
460
|
+
*/
|
|
461
|
+
function toDataUrl(address) {
|
|
462
|
+
const cache = Blockies.cache[address];
|
|
463
|
+
if (address && cache) {
|
|
464
|
+
return cache;
|
|
465
|
+
}
|
|
466
|
+
const opts = buildOpts({ seed: address.toLowerCase() });
|
|
467
|
+
const imageData = createImageData(opts.size);
|
|
468
|
+
const width = Math.sqrt(imageData.length);
|
|
469
|
+
const p = new PNG(opts.size * opts.scale, opts.size * opts.scale, 3);
|
|
470
|
+
// Register background color in PNG palette (needed for pixels with value 0)
|
|
471
|
+
// This call adds the background color as the first palette entry, which is
|
|
472
|
+
// essential for proper rendering of background pixels in the Blockies
|
|
473
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
474
|
+
const bgcolor = p.color(...hsl2rgb(...opts.bgcolor));
|
|
475
|
+
const color = p.color(...hsl2rgb(...opts.color));
|
|
476
|
+
const spotcolor = p.color(...hsl2rgb(...opts.spotcolor));
|
|
477
|
+
for (let i = 0; i < imageData.length; i += 1) {
|
|
478
|
+
const row = Math.floor(i / width);
|
|
479
|
+
const col = i % width;
|
|
480
|
+
// if data is 0, leave the background
|
|
481
|
+
if (imageData[i]) {
|
|
482
|
+
// if data is 2, choose spot color, if 1 choose foreground
|
|
483
|
+
const pngColor = imageData[i] === 1 ? color : spotcolor;
|
|
484
|
+
p.fillRect(col * opts.scale, row * opts.scale, opts.scale, opts.scale, pngColor);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
const ret = `data:image/png;base64,${p.getBase64()}`;
|
|
488
|
+
Blockies.cache[address] = ret;
|
|
489
|
+
return ret;
|
|
490
|
+
}
|
|
491
|
+
exports.toDataUrl = toDataUrl;
|
|
492
|
+
//# sourceMappingURL=Blockies.utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blockies.utilities.js","sourceRoot":"","sources":["../../../../src/components/temp-components/Blockies/Blockies.utilities.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAmBH;;;;;;GAMG;AACH,SAAS,KAAK,CAAC,MAAgB,EAAE,IAAY,EAAE,GAAG,IAAc;IAC9D,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;YACtC,uCAAuC;YACvC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SAChC;KACF;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAS,KAAK,CAAC,CAAS;IACtB,sCAAsC;IACtC,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,SAAS,KAAK,CAAC,CAAS;IACtB,OAAO,MAAM,CAAC,YAAY;IACxB,sCAAsC;IACtC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,GAAG;IACf,sCAAsC;IACtC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,GAAG;IACf,sCAAsC;IACtC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG;IACd,sCAAsC;IACtC,CAAC,GAAG,GAAG,CACR,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,S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CAAC,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAEzD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;QAClC,MAAM,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC;QACtB,qCAAqC;QACrC,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;YAChB,0DAA0D;YAC1D,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,CAAC,CAAC,QAAQ,CACR,GAAG,GAAG,IAAI,CAAC,KAAK,EAChB,GAAG,GAAG,IAAI,CAAC,KAAK,EAChB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,KAAK,EACV,QAAQ,CACT,CAAC;SACH;KACF;IACD,MAAM,GAAG,GAAG,yBAAyB,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC;IACrD,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;IAC9B,OAAO,GAAG,CAAC;AACb,CAAC;AAvCD,8BAuCC","sourcesContent":["/**\n * A handy class to calculate color values and generate PNG images.\n *\n * @version 1.0.0\n * @author Robert Eisele <robert@xarg.org>\n * @copyright Copyright (c) 2010, Robert Eisele\n * @see {@link http://www.xarg.org/2010/03/generate-client-side-png-files-using-javascript/}\n * @license BSD-3-Clause\n */\n\n// Type definitions\ntype BlockiesOptions = {\n seed: string;\n size?: number;\n scale?: number;\n color?: [number, number, number];\n bgcolor?: [number, number, number];\n spotcolor?: [number, number, number];\n};\n\ntype PaletteEntry = {\n [color: number]: string;\n};\n\ntype RGBAColor = [number, number, number, number];\ntype HSLColor = [number, number, number];\n\n/**\n * Writes string arguments to a buffer starting at the specified offset.\n *\n * @param buffer - The buffer to write to\n * @param offs - The offset to start writing at\n * @param args - The string arguments to write\n */\nfunction write(buffer: string[], offs: number, ...args: string[]): void {\n for (const arg of args) {\n for (let j = 0; j < arg.length; j += 1) {\n // eslint-disable-next-line no-plusplus\n buffer[offs++] = arg.charAt(j);\n }\n }\n}\n\n/**\n * Converts a 16-bit number to a 2-byte string.\n *\n * @param w - The number to convert\n * @returns A 2-byte string representation\n */\nfunction byte2(w: number): string {\n // eslint-disable-next-line no-bitwise\n return String.fromCharCode((w >> 8) & 255, w & 255);\n}\n\n/**\n * Converts a 32-bit number to a 4-byte string.\n *\n * @param w - The number to convert\n * @returns A 4-byte string representation\n */\nfunction byte4(w: number): string {\n return String.fromCharCode(\n // eslint-disable-next-line no-bitwise\n (w >> 24) & 255,\n // eslint-disable-next-line no-bitwise\n (w >> 16) & 255,\n // eslint-disable-next-line no-bitwise\n (w >> 8) & 255,\n // eslint-disable-next-line no-bitwise\n w & 255,\n );\n}\n\n/**\n * Converts a 16-bit number to a 2-byte string in little-endian format.\n *\n * @param w - The number to convert\n * @returns A 2-byte string representation in little-endian format\n */\nfunction byte2lsb(w: number): string {\n // eslint-disable-next-line no-bitwise\n return String.fromCharCode(w & 255, (w >> 8) & 255);\n}\n\n/**\n * PNG class for generating PNG images\n */\nclass PNG {\n public width: number;\n\n public height: number;\n\n public depth: number;\n\n public pix_size: number;\n\n public data_size: number;\n\n public ihdr_offs: number;\n\n public ihdr_size: number;\n\n public plte_offs: number;\n\n public plte_size: number;\n\n public trns_offs: number;\n\n public trns_size: number;\n\n public idat_offs: number;\n\n public idat_size: number;\n\n public iend_offs: number;\n\n public iend_size: number;\n\n public buffer_size: number;\n\n public buffer: string[];\n\n public palette: PaletteEntry;\n\n public pindex: number;\n\n private readonly _crc32: number[];\n\n constructor(width: number, height: number, depth: number) {\n this.width = width;\n this.height = height;\n this.depth = depth;\n\n // pixel data and row filter identifier size\n this.pix_size = height * (width + 1);\n\n // deflate header, pix_size, block headers, adler32 checksum\n this.data_size =\n 2 + this.pix_size + 5 * Math.floor((0xfffe + this.pix_size) / 0xffff) + 4;\n\n // offsets and sizes of Png chunks\n this.ihdr_offs = 0; // IHDR offset and size\n this.ihdr_size = 4 + 4 + 13 + 4;\n this.plte_offs = this.ihdr_offs + this.ihdr_size; // PLTE offset and size\n this.plte_size = 4 + 4 + 3 * depth + 4;\n this.trns_offs = this.plte_offs + this.plte_size; // tRNS offset and size\n this.trns_size = 4 + 4 + depth + 4;\n this.idat_offs = this.trns_offs + this.trns_size; // IDAT offset and size\n this.idat_size = 4 + 4 + this.data_size + 4;\n this.iend_offs = this.idat_offs + this.idat_size; // IEND offset and size\n this.iend_size = 4 + 4 + 4;\n this.buffer_size = this.iend_offs + this.iend_size; // total PNG size\n\n this.buffer = new Array(this.buffer_size);\n this.palette = {};\n this.pindex = 0;\n this._crc32 = new Array(256);\n\n // initialize buffer with zero bytes\n for (let i = 0; i < this.buffer_size; i += 1) {\n this.buffer[i] = '\\x00';\n }\n\n // initialize non-zero elements\n write(\n this.buffer,\n this.ihdr_offs,\n byte4(this.ihdr_size - 12),\n 'IHDR',\n byte4(width),\n byte4(height),\n '\\x08\\x03',\n );\n write(this.buffer, this.plte_offs, byte4(this.plte_size - 12), 'PLTE');\n write(this.buffer, this.trns_offs, byte4(this.trns_size - 12), 'tRNS');\n write(this.buffer, this.idat_offs, byte4(this.idat_size - 12), 'IDAT');\n write(this.buffer, this.iend_offs, byte4(this.iend_size - 12), 'IEND');\n\n // initialize deflate header\n // eslint-disable-next-line no-bitwise\n let header = ((8 + (7 << 4)) << 8) | (3 << 6);\n header += 31 - (header % 31);\n\n write(this.buffer, this.idat_offs + 8, byte2(header));\n\n // initialize deflate block headers\n // eslint-disable-next-line no-bitwise\n for (let i = 0; (i << 16) - 1 < this.pix_size; i += 1) {\n let size: number;\n let bits: string;\n if (i + 0xffff < this.pix_size) {\n size = 0xffff;\n bits = '\\x00';\n } else {\n // eslint-disable-next-line no-bitwise\n size = this.pix_size - (i << 16) - i;\n bits = '\\x01';\n }\n write(\n this.buffer,\n // eslint-disable-next-line no-bitwise\n this.idat_offs + 8 + 2 + (i << 16) + (i << 2),\n bits,\n byte2lsb(size),\n // eslint-disable-next-line no-bitwise\n byte2lsb(~size),\n );\n }\n\n /* Create crc32 lookup table */\n for (let i = 0; i < 256; i += 1) {\n let c = i;\n for (let j = 0; j < 8; j += 1) {\n // eslint-disable-next-line no-bitwise\n if (c & 1) {\n // eslint-disable-next-line no-bitwise\n c = -306674912 ^ ((c >> 1) & 0x7fffffff);\n } else {\n // eslint-disable-next-line no-bitwise\n c = (c >> 1) & 0x7fffffff;\n }\n }\n this._crc32[i] = c;\n }\n }\n\n /**\n * Computes the index into a png for a given pixel.\n *\n * @param x - The x coordinate\n * @param y - The y coordinate\n * @returns The buffer index for the pixel\n */\n public index(x: number, y: number): number {\n const i = y * (this.width + 1) + x + 1;\n const j = this.idat_offs + 8 + 2 + 5 * Math.floor(i / 0xffff + 1) + i;\n return j;\n }\n\n /**\n * Converts a color and builds up the palette.\n *\n * @param red - Red component (0-255)\n * @param green - Green component (0-255)\n * @param blue - Blue component (0-255)\n * @param alpha - Alpha component (0-255)\n * @returns The palette color string\n */\n public color(\n red: number,\n green: number,\n blue: number,\n alpha: number = 255,\n ): string {\n // eslint-disable-next-line no-bitwise\n const color = (((((alpha << 8) | red) << 8) | green) << 8) | blue;\n\n if (typeof this.palette[color] === 'undefined') {\n if (this.pindex === this.depth) {\n return '\\x00';\n }\n\n const ndx = this.plte_offs + 8 + 3 * this.pindex;\n\n this.buffer[ndx + 0] = String.fromCharCode(red);\n this.buffer[ndx + 1] = String.fromCharCode(green);\n this.buffer[ndx + 2] = String.fromCharCode(blue);\n this.buffer[this.trns_offs + 8 + this.pindex] =\n String.fromCharCode(alpha);\n\n // eslint-disable-next-line no-plusplus\n this.palette[color] = String.fromCharCode(this.pindex++);\n }\n return this.palette[color];\n }\n\n /**\n * Outputs a PNG string, Base64 encoded.\n *\n * @returns A Base64 encoded PNG string\n */\n public getBase64(): string {\n const s = this.getDump();\n\n const ch =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n let c1: number;\n let c2: number;\n let c3: number;\n let e1: number;\n let e2: number;\n let e3: number;\n let e4: number;\n const l = s.length;\n let i = 0;\n let r = '';\n\n do {\n c1 = s.charCodeAt(i);\n // eslint-disable-next-line no-bitwise\n e1 = c1 >> 2;\n c2 = s.charCodeAt(i + 1);\n // eslint-disable-next-line no-bitwise\n e2 = ((c1 & 3) << 4) | (c2 >> 4);\n c3 = s.charCodeAt(i + 2);\n if (l < i + 2) {\n e3 = 64;\n } else {\n // eslint-disable-next-line no-bitwise\n e3 = ((c2 & 0xf) << 2) | (c3 >> 6);\n }\n if (l < i + 3) {\n e4 = 64;\n } else {\n // eslint-disable-next-line no-bitwise\n e4 = c3 & 0x3f;\n }\n r += ch.charAt(e1) + ch.charAt(e2) + ch.charAt(e3) + ch.charAt(e4);\n i += 3;\n } while (i < l);\n return r;\n }\n\n /**\n * Outputs a PNG string.\n *\n * @returns A PNG string\n */\n public getDump(): string {\n // compute adler32 of output pixels + row filter bytes\n const BASE = 65521; /* largest prime smaller than 65536 */\n const NMAX = 5552; /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */\n let s1 = 1;\n let s2 = 0;\n let n = NMAX;\n\n for (let y = 0; y < this.height; y += 1) {\n for (let x = -1; x < this.width; x += 1) {\n s1 += this.buffer[this.index(x, y)].charCodeAt(0);\n s2 += s1;\n n -= 1;\n if (n === 0) {\n s1 %= BASE;\n s2 %= BASE;\n n = NMAX;\n }\n }\n }\n s1 %= BASE;\n s2 %= BASE;\n write(\n this.buffer,\n this.idat_offs + this.idat_size - 8,\n // eslint-disable-next-line no-bitwise\n byte4((s2 << 16) | s1),\n );\n\n // compute crc32 of the PNG chunks\n const crc32 = (png: string[], offs: number, size: number): void => {\n let crc = -1;\n for (let i = 4; i < size - 4; i += 1) {\n crc =\n // eslint-disable-next-line no-bitwise\n this._crc32[(crc ^ png[offs + i].charCodeAt(0)) & 0xff] ^\n // eslint-disable-next-line no-bitwise\n ((crc >> 8) & 0x00ffffff);\n }\n // eslint-disable-next-line no-bitwise\n write(png, offs + size - 4, byte4(crc ^ -1));\n };\n\n crc32(this.buffer, this.ihdr_offs, this.ihdr_size);\n crc32(this.buffer, this.plte_offs, this.plte_size);\n crc32(this.buffer, this.trns_offs, this.trns_size);\n crc32(this.buffer, this.idat_offs, this.idat_size);\n crc32(this.buffer, this.iend_offs, this.iend_size);\n\n // convert PNG to string\n return `\\x89PNG\\r\\n\\x1A\\n${this.buffer.join('')}`;\n }\n\n /**\n * Fills a rectangle with the specified color.\n *\n * @param x - The x coordinate\n * @param y - The y coordinate\n * @param w - The width\n * @param h - The height\n * @param color - The color to fill with\n */\n public fillRect(\n x: number,\n y: number,\n w: number,\n h: number,\n color: string,\n ): void {\n for (let i = 0; i < w; i += 1) {\n for (let j = 0; j < h; j += 1) {\n this.buffer[this.index(x + i, y + j)] = color;\n }\n }\n }\n}\n\n/**\n * Converts HSL color to RGB helper function.\n *\n * @param p - First parameter\n * @param q - Second parameter\n * @param t - Third parameter\n * @returns RGB value component\n */\nfunction hue2rgb(p: number, q: number, t: number): number {\n let tValue = t;\n if (tValue < 0) {\n tValue += 1;\n }\n if (tValue > 1) {\n tValue -= 1;\n }\n if (tValue < 1 / 6) {\n return p + (q - p) * 6 * tValue;\n }\n if (tValue < 1 / 2) {\n return q;\n }\n if (tValue < 2 / 3) {\n return p + (q - p) * (2 / 3 - tValue) * 6;\n }\n return p;\n}\n\n/**\n * Converts HSL color values to RGBA.\n *\n * @param h - Hue (0-1)\n * @param s - Saturation (0-1)\n * @param l - Lightness (0-1)\n * @returns RGBA color array\n */\nfunction hsl2rgb(h: number, s: number, l: number): RGBAColor {\n let r: number;\n let g: number;\n let b: number;\n\n if (s === 0) {\n r = l;\n g = l;\n b = l; // achromatic\n } else {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), 255];\n}\n\n// Random number generation\nconst randseed: number[] = new Array(4); // Xorshift: [x, y, z, w] 32 bit values\n\n/**\n * Seeds the random number generator.\n *\n * @param seed - The seed string\n */\nfunction seedrand(seed: string): void {\n for (let i = 0; i < randseed.length; i += 1) {\n randseed[i] = 0;\n }\n for (let i = 0; i < seed.length; i += 1) {\n randseed[i % 4] =\n // eslint-disable-next-line no-bitwise\n (randseed[i % 4] << 5) - randseed[i % 4] + seed.charCodeAt(i);\n }\n}\n\n/**\n * Generates a random number using Xorshift algorithm.\n *\n * @returns A random number between 0 and 1\n */\nfunction rand(): number {\n // based on Java's String.hashCode(), expanded to 4 32bit values\n // eslint-disable-next-line no-bitwise\n const t = randseed[0] ^ (randseed[0] << 11);\n\n randseed[0] = randseed[1];\n randseed[1] = randseed[2];\n randseed[2] = randseed[3];\n // eslint-disable-next-line no-bitwise\n randseed[3] = randseed[3] ^ (randseed[3] >> 19) ^ t ^ (t >> 8);\n\n // eslint-disable-next-line no-bitwise\n return (randseed[3] >>> 0) / ((1 << 31) >>> 0);\n}\n\n/**\n * Creates a random HSL color.\n *\n * @returns HSL color array\n */\nfunction createColor(): HSLColor {\n // saturation is the whole color spectrum\n const h = Math.floor(rand() * 360);\n // saturation goes from 40 to 100, it avoids greyish colors\n const s = rand() * 60 + 40;\n // lightness can be anything from 0 to 100, but probabilities are a bell curve around 50%\n const l = (rand() + rand() + rand() + rand()) * 25;\n\n return [h / 360, s / 100, l / 100];\n}\n\n/**\n * Creates image data for the Blockies pattern.\n *\n * @param size - The size of the image\n * @returns Array of pixel data\n */\nfunction createImageData(size: number): number[] {\n const width = size; // Only support square icons for now\n const height = size;\n\n const dataWidth = Math.ceil(width / 2);\n const mirrorWidth = width - dataWidth;\n\n const data: number[] = [];\n for (let y = 0; y < height; y += 1) {\n let row: number[] = [];\n for (let x = 0; x < dataWidth; x += 1) {\n // this makes foreground and background color to have a 43% (1/2.3) probability\n // spot color has 13% chance\n row[x] = Math.floor(rand() * 2.3);\n }\n const r = row.slice(0, mirrorWidth);\n r.reverse();\n row = row.concat(r);\n\n for (const value of row) {\n data.push(value);\n }\n }\n\n return data;\n}\n\n/**\n * Builds options for Blockies generation with defaults.\n *\n * @param opts - Partial options object\n * @returns Complete options object\n */\nfunction buildOpts(opts: Partial<BlockiesOptions>): Required<BlockiesOptions> {\n if (!opts.seed) {\n throw new Error('No seed provided');\n }\n\n seedrand(opts.seed);\n\n return {\n size: 8,\n scale: 16,\n color: createColor(),\n bgcolor: createColor(),\n spotcolor: createColor(),\n ...opts,\n seed: opts.seed,\n };\n}\n\n/**\n * Utility class with the single responsibility\n * of caching Blockies Data URIs\n */\nexport class Blockies {\n static cache: Record<string, string> = {};\n}\n\n/**\n * Generate a Blockies data URL for a given address\n *\n * @param address The address to generate a Blockies for\n * @returns A data URL string containing the Blockies image\n */\nexport function toDataUrl(address: string): string {\n const cache = Blockies.cache[address];\n if (address && cache) {\n return cache;\n }\n\n const opts = buildOpts({ seed: address.toLowerCase() });\n\n const imageData = createImageData(opts.size);\n const width = Math.sqrt(imageData.length);\n\n const p = new PNG(opts.size * opts.scale, opts.size * opts.scale, 3);\n // Register background color in PNG palette (needed for pixels with value 0)\n // This call adds the background color as the first palette entry, which is\n // essential for proper rendering of background pixels in the Blockies\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const bgcolor = p.color(...hsl2rgb(...opts.bgcolor));\n const color = p.color(...hsl2rgb(...opts.color));\n const spotcolor = p.color(...hsl2rgb(...opts.spotcolor));\n\n for (let i = 0; i < imageData.length; i += 1) {\n const row = Math.floor(i / width);\n const col = i % width;\n // if data is 0, leave the background\n if (imageData[i]) {\n // if data is 2, choose spot color, if 1 choose foreground\n const pngColor = imageData[i] === 1 ? color : spotcolor;\n p.fillRect(\n col * opts.scale,\n row * opts.scale,\n opts.scale,\n opts.scale,\n pngColor,\n );\n }\n }\n const ret = `data:image/png;base64,${p.getBase64()}`;\n Blockies.cache[address] = ret;\n return ret;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/temp-components/Blockies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Blockies = void 0;
|
|
4
|
+
var Blockies_1 = require("./Blockies");
|
|
5
|
+
Object.defineProperty(exports, "Blockies", { enumerable: true, get: function () { return Blockies_1.Blockies; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/temp-components/Blockies/index.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA","sourcesContent":["export { Blockies } from './Blockies';\nexport type { BlockiesProps } from './Blockies.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonAnimated.d.ts","sourceRoot":"","sources":["../../../../src/components/temp-components/ButtonAnimated/ButtonAnimated.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,eAAO,MAAM,cAAc,kDAKxB,mBAAmB,sBAoCrB,CAAC"}
|