Skip to content

Commit

Permalink
Merge pull request #255 from MeshJS/v1.6.3
Browse files Browse the repository at this point in the history
V1.6.3
  • Loading branch information
jinglescode authored Aug 10, 2024
2 parents 8d89257 + cdea190 commit 24427cb
Show file tree
Hide file tree
Showing 300 changed files with 6,461 additions and 3,617 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
ignorePatterns: ["apps/**", "packages/**"],
extends: ["@meshsdk/eslint-config/library.js"],
extends: ["@meshsdk/configs/eslint/library.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ yarn-error.log*

apps/docs/src/data/mesh-common.json
apps/docs/src/data/mesh-contracts.json
apps/docs/src/data/mesh-core.json
apps/docs/src/data/mesh-core-csl.json
apps/docs/src/data/mesh-core-cst.json
apps/docs/src/data/mesh-providers.json
apps/docs/src/data/mesh-react.json
apps/docs/src/data/mesh-transactions.json
apps/docs/src/data/mesh-wallets.json
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
![Mesh Logo](https://meshjs.dev/logo-mesh/mesh.png)
<div align="center">

![Mesh Logo](https://meshjs.dev/logos/mesh.png)

<hr />
<h2 align="center" style="border-bottom: none">Mesh SDK</h2>

[![Licence](https://img.shields.io/github/license/meshjs/mesh)](https://github.com/meshjs/mesh/blob/master/LICENSE)
[![Build](https://github.com/meshjs/mesh/actions/workflows/build.yml/badge.svg)](https://github.com/meshjs/mesh/actions/workflows/build.yml)
[![Package](https://github.com/meshjs/mesh/actions/workflows/publish.yml/badge.svg)](https://github.com/meshjs/mesh/actions/workflows/publish.yml)

[![Twitter/X](https://img.shields.io/badge/Follow%20us-@MeshJS-blue?logo=x&style=for-the-badge)](https://x.com/meshsdk)
[![NPM](https://img.shields.io/npm/v/%40meshsdk%2Fcore?style=for-the-badge)](https://www.npmjs.com/package/@meshsdk/core)

<hr/>
</div>

Mesh is an open-source library designed to make building dApps accessible. Whether you're a beginner developer, startup, web3 market leader, or a large enterprise, Mesh makes web3 development easy with reliable, scalable, and well-engineered APIs & developer tools.

Expand Down Expand Up @@ -58,3 +73,5 @@ To develop all apps and packages, run the following command:
```
npm run dev
```

![Alt](https://repobeats.axiom.co/api/embed/a55b792080ada8db32fb84c10addc7b4afab7679.svg "Repobeats analytics image")
5 changes: 1 addition & 4 deletions apps/docs/src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
"use client";

import Link from "next/link";
import { usePathname } from "next/navigation";

import { Button } from "@/components/Button";
import { discordUrl, githubUrl, twitterhUrl } from "@/config";
// import { navigation } from '@/components/Navigation'
import Link from "next/link";

function PageLink({
label,
Expand Down
1 change: 0 additions & 1 deletion apps/docs/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Link from "next/link";
import clsx from "clsx";
import { motion, useScroll, useTransform } from "framer-motion";

import { Button } from "@/components/Button";
import { Logo } from "@/components/Logo";
import {
MobileNavigation,
Expand Down
1 change: 0 additions & 1 deletion apps/docs/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import getInterfaces from "@/data/get-interfaces";
import getFunctions from "@/data/get-functions";
import { pageRoutes } from "@/data/page-routes";
import { useRouteContext } from "@/contexts/route-context";
import { log } from "console";

interface NavGroup {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@meshsdk/eslint-config/next.js"],
extends: ["@meshsdk/configs/eslint/next.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
Expand Down
6 changes: 2 additions & 4 deletions apps/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
"json-bigint": "^1.0.0"
},
"devDependencies": {
"@meshsdk/eslint-config": "*",
"@meshsdk/tailwind-config": "*",
"@meshsdk/typescript-config": "*",
"@meshsdk/configs": "*",
"@next/eslint-plugin-next": "^14.1.1",
"@tailwindcss/typography": "^0.5.13",
"@types/eslint": "^8.56.5",
Expand All @@ -52,5 +50,5 @@
"tailwindcss": "^3.4.3",
"typescript": "^5.3.3"
},
"prettier": "@meshsdk/prettier-config"
"prettier": "@meshsdk/configs/prettier"
}
1 change: 1 addition & 0 deletions apps/playground/src/components/button/button-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function ButtonGroup({
currentSelected == item.key &&
"z-10 border text-blue-700 ring-2 ring-blue-700 dark:text-white dark:ring-blue-500"
} border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-blue-700 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white`}
aria-label={item.label}
>
{item.label}
</button>
Expand Down
1 change: 1 addition & 0 deletions apps/playground/src/components/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default function Button({
className={_style}
onClick={onClick}
disabled={disabled}
aria-label={`button`}
>
{children}
</button>
Expand Down
4 changes: 2 additions & 2 deletions apps/playground/src/components/card/card-title-desc-image.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import Image from "next/image";
import Link from "next/link";
import Link from "~/components/link";

import Card from "./card";

Expand Down Expand Up @@ -32,7 +32,7 @@ export default function CardTitleDescImage({
<div className="text-2xl font-black">{title}</div>
</span>
<Image
src="/logo-mesh/black/logo-mesh-black-64x64.png"
src="/logos/black/logo-mesh-black-64x64.png"
className="absolute bottom-2 right-2 h-8"
layout="fill"
objectFit="contain"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ export default function ConnectBrowserWallet() {
const wallets = useWalletList();
const hasAvailableWallets = wallets.length > 0;
return (
<>{hasAvailableWallets ? <CardanoWallet /> : <>No wallets installed</>}</>
<>
{hasAvailableWallets ? (
<CardanoWallet extensions={[95]} />
) : (
<>No wallets installed</>
)}
</>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ export async function fetchAssetUtxo({
}) {
const blockchainProvider = getProvider();
const utxos = await blockchainProvider.fetchAddressUTxOs(address, asset);
console.log("utxos", utxos);

const dataHash = resolveDataHash(datum);

let utxo = utxos.find((utxo: any) => {
return utxo.output.dataHash == dataHash;
});
console.log("utxo", utxo);

return utxo;
}
3 changes: 2 additions & 1 deletion apps/playground/src/components/layouts/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default function Markdown({ children }: { children: React.ReactNode }) {
return (
<MDXProvider
components={{
pre: (props) => <Codeblock data={props.children} />,
//@ts-ignore
pre: (props) => <Codeblock data={props.children.props.children} />,
}}
>
{children}
Expand Down
4 changes: 2 additions & 2 deletions apps/playground/src/components/layouts/sidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Link from "next/link";
import Link from "~/components/link";
import { Link as RSLink } from "react-scroll";

export default function Sidebar({
Expand All @@ -10,7 +10,7 @@ export default function Sidebar({
<div className="mb-6 mr-6 hidden lg:w-72 xl:block">
<div className="sticky top-24">
<aside>
<nav className="overflow-y-auto rounded-lg border border-gray-200 p-6 font-medium text-gray-500 dark:border-gray-700 dark:text-gray-400">
<nav className="overflow-y-auto rounded-lg border border-gray-200 p-6 font-medium text-gray-500 dark:border-gray-700 dark:text-gray-400 h-96">
<ul className="space-y-4">
{sidebarItems.map((item, i) => {
return (
Expand Down
28 changes: 28 additions & 0 deletions apps/playground/src/components/link/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from "react";
import NextLink from "next/link";

export default function Link({
children,
href,
className,
icon,
target,
}: {
children: React.ReactNode;
href: string;
className?: string;
icon?: any;
target?: string;
}) {
return (
<NextLink
href={href}
className={className}
target={target ? target : href.startsWith("http") ? "_blank" : "_self"}
rel="noreferrer"
>
{icon && React.createElement(icon, { className: "mr-2 w-4 h-4" })}
{children}
</NextLink>
);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import Link from "next/link";

import Link from "~/components/link";
import Codeblock from "../text/codeblock";

export default function HeroTwoSections({
Expand Down Expand Up @@ -33,8 +33,6 @@ export default function HeroTwoSections({
<Link
href={link.href}
className="bg-primary-700 hover:bg-primary-800 mr-3 inline-flex items-center justify-center rounded-lg px-5 py-3 text-center text-base font-medium text-white"
target="_blank"
rel="noreferrer"
>
{link.label}
<svg
Expand Down
10 changes: 2 additions & 8 deletions apps/playground/src/components/site/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import Image from "next/image";
import Link from "next/link";

import Link from "~/components/link";
import { socials } from "~/data/social";
import Sitemap from "./sitemap";

Expand Down Expand Up @@ -41,8 +41,6 @@ export default function Footer() {
href={social.link}
className="text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
key={i}
target="_blank"
rel="noreferrer"
>
{React.createElement(social.icon, {
className: "w-5 h-5",
Expand All @@ -59,11 +57,7 @@ export default function Footer() {
<hr className="my-6 border-gray-200 sm:mx-auto lg:my-8 dark:border-gray-700" />
<span className="block text-center text-sm text-gray-500 dark:text-gray-400">
© {new Date().getFullYear()} Mesh.{" "}
<Link
href="https://github.com/MeshJS/mesh/blob/main/LICENSE.md"
target="_blank"
rel="noreferrer"
>
<Link href="https://github.com/MeshJS/mesh/blob/main/LICENSE.md">
Apache-2.0 license
</Link>
.
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/src/components/site/footer/sitemap.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Link from "next/link";
import Link from "~/components/link";

import { linksAbout } from "~/data/links-about";
import { linksApi } from "~/data/links-api";
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/src/components/site/metatags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default function Metatags({
title,
keywords,
description,
image = "/logo-mesh/mesh.png",
image = "/logos/mesh.png",
}: {
title?: string;
keywords?: string;
Expand Down
8 changes: 4 additions & 4 deletions apps/playground/src/components/site/navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useEffect, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import {
Bars4Icon,
Expand All @@ -8,11 +7,11 @@ import {
XMarkIcon,
} from "@heroicons/react/24/solid";

import Link from "~/components/link";
import SvgMesh from "~/components/svgs/mesh";
import { linksAbout } from "~/data/links-about";
import { linksApi } from "~/data/links-api";
import { linksGetStarted } from "~/data/links-get-started";
import { linksGuides } from "~/data/links-guides";
import { linksSmartContracts } from "~/data/links-smart-contracts";
import { socials } from "~/data/social";
import { useDarkmode } from "~/hooks/useDarkmode";
Expand Down Expand Up @@ -80,10 +79,9 @@ export default function Navbar() {
return (
<Link
href={social.link}
target="_blank"
rel="noreferrer"
className="rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
key={i}
aria-label={social.link}
>
{React.createElement(social.icon, { className: "w-6 h-6" })}
</Link>
Expand All @@ -96,6 +94,7 @@ export default function Navbar() {
onClick={() => {
toggle();
}}
aria-label="Toggle dark mode"
>
{isDark ? (
<MoonIcon className="h-4 w-4 text-gray-500" />
Expand All @@ -108,6 +107,7 @@ export default function Navbar() {
type="button"
className="ml-1 inline-flex items-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 lg:hidden dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
onClick={() => toggleMobileMenu()}
aria-label="Toggle mobile"
>
<span className="sr-only">Open main menu</span>
<Bars4Icon className={`${showMobileMenu && "hidden"} h-6 w-6`} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default function MenuItemDropdown({
<button
type="button"
className="lg:hover:text-primary-600 lg:dark:hover:text-primary-500 dark:hover:text-primary-500 flex w-full items-center justify-between border-b border-gray-100 py-2 pl-3 pr-4 font-medium text-gray-700 hover:bg-gray-50 lg:w-auto lg:border-0 lg:p-0 lg:hover:bg-transparent dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 lg:dark:hover:bg-transparent"
aria-label="More"
>
{title}
<ChevronDownIcon className="ml-1 h-5 w-5 lg:h-4 lg:w-4" />
Expand Down
2 changes: 1 addition & 1 deletion apps/playground/src/components/site/navbar/menu-item.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Link from "next/link";
import Link from "~/components/link";

export default function MenuItem({
title,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from "react";
import Link from "next/link";
import Link from "~/components/link";
import { ChevronRightIcon } from "@heroicons/react/24/solid";

import { MenuItem } from "~/types/menu-item";
Expand Down
4 changes: 3 additions & 1 deletion apps/playground/src/components/site/navbar/submenu-item.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import Link from "next/link";

import Link from "~/components/link";

export default function SubmenuItem({
title,
Expand All @@ -15,6 +16,7 @@ export default function SubmenuItem({
<Link
href={link}
className="hover:text-primary-600 dark:hover:text-primary-500 flex w-full items-center px-4 py-2"
target={link.startsWith("http") ? "_blank" : "_self"}
>
{icon && React.createElement(icon, { className: "mr-2 w-4 h-4" })}
{title}
Expand Down
Loading

0 comments on commit 24427cb

Please sign in to comment.