Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: input and other untrackable stuff #1

Merged
merged 8 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["www", "**-template"]
"ignore": ["www"]
}
5 changes: 5 additions & 0 deletions .changeset/empty-eagles-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chyn": minor
---

Fixed the input and set up chyn cli.
8 changes: 4 additions & 4 deletions .github/workflows/prerelease-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
comment:
if: |
github.repository_owner == 'shadcn-ui' &&
github.repository_owner == 'spilnotaxyz' &&
${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
name: Write comment to the PR
Expand All @@ -28,8 +28,8 @@ jobs:

for (const artifact of allArtifacts.data.artifacts) {
// Extract the PR number and package version from the artifact name
const match = /^npm-package-shadcn-ui@(.*?)-pr-(\d+)/.exec(artifact.name);
const match = /^npm-package-chyn@(.*?)-pr-(\d+)/.exec(artifact.name);

if (match) {
require("fs").appendFileSync(
process.env.GITHUB_ENV,
Expand All @@ -49,7 +49,7 @@ jobs:
A new prerelease is available for testing:

```sh
npx shadcn-ui@${{ env.BETA_PACKAGE_VERSION }}
npx chyn@${{ env.BETA_PACKAGE_VERSION }}
```

- name: "Remove the autorelease label once published"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
prerelease:
if: |
github.repository_owner == 'shadcn-ui' &&
github.repository_owner == 'spilnotaxyz' &&
contains(github.event.pull_request.labels.*.name, '🚀 autorelease')
name: Build & Publish a beta release to NPM
runs-on: ubuntu-latest
Expand Down Expand Up @@ -40,9 +40,9 @@ jobs:
run: node .github/version-script-beta.js

- name: Authenticate to NPM
run: echo "//registry.npmjs.org/:_authToken=$NPM_ACCESS_TOKEN" >> packages/cli/.npmrc
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> packages/cli/.npmrc
env:
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish Beta to NPM
run: pnpm pub:beta
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
release:
if: ${{ github.repository_owner == 'shadcn-ui' }}
if: ${{ github.repository_owner == 'spilnotaxyz' }}
name: Create a PR for release workflow
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -49,5 +49,5 @@ jobs:
publish: npx changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_ENV: "production"
8 changes: 4 additions & 4 deletions apps/www/__registry__/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// @ts-nocheck
// This file is autogenerated by scripts/build-registry.ts
// This file is autogenerated by scripts/bchynld-registry.ts
// Do not edit this file directly.
import * as React from "react"

export const Index: Record<string, any> = {
default: {
"input-erc20": {
name: "input-erc20",
type: "components:ui",
type: "components:chyn",
registryDependencies: undefined,
component: React.lazy(() => import("@/registry/default/ui/input-erc20")),
files: ["registry/default/ui/input-erc20.tsx"],
component: React.lazy(() => import("@/registry/default/chyn/input-erc20")),
files: ["registry/default/chyn/input-erc20.tsx"],
},
"input-erc20-demo": {
name: "input-erc20-demo",
Expand Down
2 changes: 1 addition & 1 deletion apps/www/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export async function generateMetadata({
title: doc.title,
description: doc.description,
images: [siteConfig.ogImage],
creator: "@shadcn",
creator: "@dalechyn",
},
}
}
Expand Down
45 changes: 23 additions & 22 deletions apps/www/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { Toaster as NewYorkToaster } from "@/components/ui/toaster"
import { Analytics } from "@/components/analytics"
import { ThemeProvider } from "@/components/providers"
import { SiteFooter } from "@/components/site-footer"
import { WagmiProvider } from "@/components/wagmi-provider"
import { SiteHeader } from "@/components/site-header"
import { TailwindIndicator } from "@/components/tailwind-indicator"
import { ThemeSwitcher } from "@/components/theme-switcher"
import { WagmiProvider } from "@/components/wagmi-provider"

export const metadata: Metadata = {
title: {
Expand All @@ -22,7 +22,8 @@ export const metadata: Metadata = {
metadataBase: new URL(siteConfig.url),
description: siteConfig.description,
keywords: [
"wagmi",'viem',
"wagmi",
"viem",
"Next.js",
"React",
"Tailwind CSS",
Expand Down Expand Up @@ -89,27 +90,27 @@ export default function RootLayout({ children }: RootLayoutProps) {
fontSans.className
)}
>
<WagmiProvider>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<div vaul-drawer-wrapper="">
<div className="relative flex min-h-screen flex-col bg-background">
<SiteHeader />
<main className="flex-1">{children}</main>
<SiteFooter />
<WagmiProvider>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<div vaul-drawer-wrapper="">
<div className="relative flex min-h-screen flex-col bg-background">
<SiteHeader />
<main className="flex-1">{children}</main>
<SiteFooter />
</div>
</div>
</div>
<TailwindIndicator />
<ThemeSwitcher />
<Analytics />
<NewYorkToaster />
<NewYorkSonner />
</ThemeProvider>
</WagmiProvider>
<TailwindIndicator />
<ThemeSwitcher />
<Analytics />
<NewYorkToaster />
<NewYorkSonner />
</ThemeProvider>
</WagmiProvider>
</body>
</html>
</>
Expand Down
6 changes: 4 additions & 2 deletions apps/www/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ export default function IndexPage() {
return (
<div className="container relative">
<PageHeader>
<PageHeaderHeading>Build your web3 component library</PageHeaderHeading>
<PageHeaderHeading>
Build your web3 UI component library
</PageHeaderHeading>
<PageHeaderDescription>
Headless Web3 UI components based on shadcn/ui, wagmi and viem.
Headless Web3 UI components based on shadcn/ui, wagmi and viem.
</PageHeaderDescription>
<PageActions>
<Link href="/docs" className={cn(buttonVariants())}>
Expand Down
16 changes: 8 additions & 8 deletions apps/www/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ export const Icons = {
logo: (props: IconProps) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<rect width="256" height="256" fill="none" />
<path
strokeLinecap="round"
strokeLinejoin="round"
<path
strokeLinecap="round"
strokeLinejoin="round"
stroke="currentColor"
d="M19.404.995a.22.22 0 0 1 .4 0l1.052 2.255c.022.047.06.085.107.107l2.255 1.052a.22.22 0 0 1 0 .4l-2.255 1.052a.223.223 0 0 0-.107.107l-1.052 2.255a.22.22 0 0 1-.4 0l-1.052-2.255a.223.223 0 0 0-.107-.107L15.99 4.809a.22.22 0 0 1 0-.4l2.255-1.052a.223.223 0 0 0 .107-.107L19.404.995Z"
/>
<path
d="M.022 23.764c.301.184-.434-3.762 11.49-12.343 7.589-5.462 6.404-4.9 6.781-5.504"
d="M19.404.995a.22.22 0 0 1 .4 0l1.052 2.255c.022.047.06.085.107.107l2.255 1.052a.22.22 0 0 1 0 .4l-2.255 1.052a.223.223 0 0 0-.107.107l-1.052 2.255a.22.22 0 0 1-.4 0l-1.052-2.255a.223.223 0 0 0-.107-.107L15.99 4.809a.22.22 0 0 1 0-.4l2.255-1.052a.223.223 0 0 0 .107-.107L19.404.995Z"
/>
<path
d="M.022 23.764c.301.184-.434-3.762 11.49-12.343 7.589-5.462 6.404-4.9 6.781-5.504"
stroke="currentColor"
/>
/>
</svg>
),
twitter: (props: IconProps) => (
Expand Down
19 changes: 0 additions & 19 deletions apps/www/components/promo-video.tsx

This file was deleted.

9 changes: 9 additions & 0 deletions apps/www/components/site-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ export function SiteFooter() {
>
dalechyn
</a>
. Forked from{" "}
<a
href="https://ui.shadcn.com"
target="_blank"
rel="noreferrer"
className="font-medium underline underline-offset-4"
>
shadcn/ui
</a>
. The source code is available on{" "}
<a
href={siteConfig.links.github}
Expand Down
1 change: 0 additions & 1 deletion apps/www/components/ui/toast.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import * as React from "react"
import * as ToastPrimitives from "@radix-ui/react-toast"
import { cva, type VariantProps } from "class-variance-authority"
Expand Down
1 change: 0 additions & 1 deletion apps/www/components/ui/toaster.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

"use client"

import {
Expand Down
5 changes: 1 addition & 4 deletions apps/www/components/ui/use-toast.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
// Inspired by react-hot-toast library
import * as React from "react"

import type {
ToastActionElement,
ToastProps,
} from "@/components/ui/toast"
import type { ToastActionElement, ToastProps } from "@/components/ui/toast"

const TOAST_LIMIT = 1
const TOAST_REMOVE_DELAY = 1000000
Expand Down
17 changes: 9 additions & 8 deletions apps/www/components/wagmi-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
'use client'
"use client"

import { ReactNode } from 'react'
import { useState } from 'react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { http, WagmiProvider as LibWagmiProvider, createConfig } from 'wagmi'
import { mainnet } from 'wagmi/chains'
import { ReactNode, useState } from "react"
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
import { WagmiProvider as LibWagmiProvider, createConfig, http } from "wagmi"
import { mainnet } from "wagmi/chains"

export const config = createConfig({
ssr: true,
Expand All @@ -15,7 +14,9 @@ export const config = createConfig({
export function WagmiProvider({ children }: { children: ReactNode }) {
// Retrieved from the `trpc-provider.tsx`
const [queryClient] = useState(() => new QueryClient())
return <QueryClientProvider client={queryClient}>
<LibWagmiProvider config={config}>{children}</LibWagmiProvider>
return (
<QueryClientProvider client={queryClient}>
<LibWagmiProvider config={config}>{children}</LibWagmiProvider>
</QueryClientProvider>
)
}
40 changes: 21 additions & 19 deletions apps/www/config/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ export const docsConfig: DocsConfig = {
title: "Components",
href: "/docs/components/input-erc20",
},
{
title: "Figma",
href: "/docs/figma",
},
{
title: "GitHub",
href: "https://github.com/spilnotaxyz/chyn",
Expand Down Expand Up @@ -49,26 +45,11 @@ export const docsConfig: DocsConfig = {
// href: "/docs/components-json",
// items: [],
// },
{
title: "Theming",
href: "https://ui.shadcn.com/docs/theming",
items: [],
},
{
title: "Dark mode",
href: "https://ui.shadcn.com/docs/dark-mode",
items: [],
},
// {
// title: "CLI",
// href: "/docs/cli",
// items: [],
// },
{
title: "Typography",
href: "https://ui.shadcn.com/docs/components/typography",
items: [],
},
// {
// title: "Changelog",
// href: "/docs/changelog",
Expand All @@ -86,5 +67,26 @@ export const docsConfig: DocsConfig = {
},
],
},
{
title: "Shadcn",
items: [
{
title: "Typography",
href: "https://ui.shadcn.com/docs/components/typography",
items: [],
},

{
title: "Theming",
href: "https://ui.shadcn.com/docs/theming",
items: [],
},
{
title: "Dark mode",
href: "https://ui.shadcn.com/docs/dark-mode",
items: [],
},
],
},
],
}
1 change: 0 additions & 1 deletion apps/www/content/docs/components/input-erc20.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ import { InputERC20 } from "@/components/ui/input-erc20"
### Form

<ComponentPreview name="input-erc20-form" className="[&_input]:max-w-xs" />

Loading
Loading