Skip to content

Commit

Permalink
Testing publishing step for /ui (#1)
Browse files Browse the repository at this point in the history
* removed previous /ui

* initial replacement of desired /ui contents

* ui building

* fixed web build and and tsconfig trees

* creacted clean script for all and clean:all

* previous

* previous
  • Loading branch information
artemis-prime authored Jan 22, 2024
1 parent 8828474 commit e5a09da
Show file tree
Hide file tree
Showing 39 changed files with 3,130 additions and 3,883 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ yarn-error.log*
.turbo

.contentlayer
tsconfig.tsbuildinfo
tsconfig.tsbuildinfo

**/dist

**/.npmrc
10 changes: 0 additions & 10 deletions .vscode/settings.json

This file was deleted.

7 changes: 4 additions & 3 deletions apps/www/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "www",
"name": "@luxdefi/ui-demo-www",
"version": "0.0.1",
"private": true,
"scripts": {
Expand All @@ -13,7 +13,8 @@
"preview": "next build && next start -p 3001",
"typecheck": "contentlayer build && tsc --noEmit",
"format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
"format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache"
"format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",
"clean": "rm -rf .next && rm -rf node_modules && rm -rf .contentlayer"
},
"dependencies": {
"@faker-js/faker": "^8.2.0",
Expand Down Expand Up @@ -81,7 +82,7 @@
"devDependencies": {
"@types/lodash.template": "^4.5.1",
"@types/node": "^17.0.45",
"@types/react": "^18.2.7",
"@types/react": "^18.2.48",
"@types/react-color": "^3.0.6",
"@types/react-dom": "^18.2.4",
"esbuild": "^0.17.19",
Expand Down
2 changes: 1 addition & 1 deletion apps/www/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.shadcn.json",
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
Expand Down
33 changes: 33 additions & 0 deletions old-package-dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"_dependencies": {
"@babel/core": "^7.22.1",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1",
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@ianvs/prettier-plugin-sort-imports": "^3.7.2",
"@manypkg/cli": "^0.20.0",
"@types/node": "^17.0.45",
"@types/react": "^18.2.7",
"@types/react-dom": "^18.2.4",
"@typescript-eslint/parser": "^5.59.7",
"autoprefixer": "^10.4.14",
"concurrently": "^8.0.1",
"cross-env": "^7.0.3",
"eslint": "^8.41.0",
"eslint-config-next": "13.3.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-turbo": "^1.9.9",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-tailwindcss": "^3.12.0",
"postcss": "^8.4.24",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"tailwindcss": "^3.4.0",
"tailwindcss-animate": "^1.0.5",
"ts-node": "^10.9.1",
"turbo": "^1.9.9",
"typescript": "^4.9.5",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.31.1"
}

54 changes: 12 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
{
"name": "@luxdefi/ui/cli",
"name": "@luxdefi/ui-mono",
"version": "0.0.1",
"license": "MIT",
"type": "module",
"author": {
"name": "@lx/ui",
"url": "https://twitter.com/luxdefi"
},
"workspaces": [
"apps/*",
"packages/*",
"templates/*"
],
"scripts": {
"build": "turbo run build",
"build:cli": "turbo --filter=luxdefi-ui build",
"build:cli": "turbo --filter=@luxdefi/uicli build",
"build:registry": "pnpm --filter=www build:registry",
"dev": "turbo run dev --parallel",
"dev:cli": "turbo --filter=luxdefi-ui dev",
"start:cli": "pnpm --filter=luxdefi-ui start:dev",
"dev:cli": "turbo --filter=@luxdefi/uicli dev",
"start:cli": "pnpm --filter=@luxdefi/uicli start:dev",
"lint": "turbo run lint",
"lint:fix": "turbo run lint:fix",
"preview": "turbo run preview",
Expand All @@ -31,40 +26,15 @@
"release": "changeset version",
"pub:beta": "cd packages/cli && pnpm pub:beta",
"pub:release": "cd packages/cli && pnpm pub:release",
"test": "turbo run test --force"
"test": "turbo run test --force",
"clean:all": "rm -rf node_modules && pnpm -r clean"
},
"packageManager": "pnpm@8.5.1",
"packageManager": "pnpm@8.14.1",
"dependencies": {
"@babel/core": "^7.22.1",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1",
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@ianvs/prettier-plugin-sort-imports": "^3.7.2",
"@manypkg/cli": "^0.20.0",
"@types/node": "^17.0.45",
"@types/react": "^18.2.7",
"@types/react-dom": "^18.2.4",
"@typescript-eslint/parser": "^5.59.7",
"autoprefixer": "^10.4.14",
"concurrently": "^8.0.1",
"cross-env": "^7.0.3",
"eslint": "^8.41.0",
"eslint-config-next": "13.3.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-turbo": "^1.9.9",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-tailwindcss": "^3.12.0",
"husky": "^8.0.3",
"postcss": "^8.4.24",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"tailwindcss": "^3.4.0",
"tailwindcss-animate": "^1.0.5",
"ts-node": "^10.9.1",
"turbo": "^1.9.9",
"typescript": "^4.9.5",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.31.1"
"husky": "^8.0.3"
},
"devDependencies": {
"typescript": "^5.3.3",
"ts-node": "^10.9.1"
}
}
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@luxdefi/ui/cli",
"name": "@luxdefi/uicli",
"version": "0.6.0",
"description": "Add components to your apps.",
"publishConfig": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"dev": "tsup --watch",
"build": "tsup",
"typecheck": "tsc --noEmit",
"clean": "rimraf dist && rimraf components",
"clean": "rm -rf dist && rm -rf node_modules",
"start:dev": "cross-env COMPONENTS_REGISTRY_URL=http://localhost:3001 node dist/index.js",
"start": "node dist/index.js",
"format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/fixtures/t3-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/eslint": "^8.37.0",
"@types/node": "^18.16.0",
"@types/prettier": "^2.7.2",
"@types/react": "^18.2.6",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.4",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.shadcn.json",
"compilerOptions": {
"isolatedModules": false,
"baseUrl": ".",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/ui/assets/lux-site-icons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/ui/assets/lux-site-icons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/ui/assets/lux-site-icons/favicon.ico
Binary file not shown.
Binary file not shown.
Binary file not shown.
158 changes: 158 additions & 0 deletions packages/ui/common/head-metadata/from-next/metadata-types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
/**
*
* Metadata types
*
*/

export interface DeprecatedMetadataFields {
/**
* Deprecated options that have a preferred method
* @deprecated Use appWebApp to configure apple-mobile-web-app-capable which provides
* @see https://www.appsloveworld.com/coding/iphone/11/difference-between-apple-mobile-web-app-capable-and-apple-touch-fullscreen-ipho
*/
'apple-touch-fullscreen'?: never

/**
* Obsolete since iOS 7.
* @see https://web.dev/apple-touch-icon/
* @deprecated use icons.apple or instead
*/
'apple-touch-icon-precomposed'?: never
}

export type TemplateString =
| DefaultTemplateString
| AbsoluteTemplateString
| AbsoluteString
export type DefaultTemplateString = {
default: string
template: string
}
export type AbsoluteTemplateString = {
absolute: string
template: string | null
}
export type AbsoluteString = {
absolute: string
}

export type Author = {
// renders as <link rel="author"...
url?: string | URL
// renders as <meta name="author"...
name?: string
}

// does not include "unsafe-URL". to use this users should
// use '"unsafe-URL" as ReferrerEnum'
export type ReferrerEnum =
| 'no-referrer'
| 'origin'
| 'no-referrer-when-downgrade'
| 'origin-when-cross-origin'
| 'same-origin'
| 'strict-origin'
| 'strict-origin-when-cross-origin'

export type ColorSchemeEnum =
| 'normal'
| 'light'
| 'dark'
| 'light dark'
| 'dark light'
| 'only light'

type RobotsInfo = {
// all and none will be inferred from index/follow boolean options
index?: boolean
follow?: boolean

/** @deprecated set index to false instead */
noindex?: never
/** @deprecated set follow to false instead */
nofollow?: never

noarchive?: boolean
nosnippet?: boolean
noimageindex?: boolean
nocache?: boolean
notranslate?: boolean
indexifembedded?: boolean
nositelinkssearchbox?: boolean
unavailable_after?: string
'max-video-preview'?: number | string
'max-image-preview'?: 'none' | 'standard' | 'large'
'max-snippet'?: number
}
export type Robots = RobotsInfo & {
// if you want to specify an alternate robots just for google
googleBot?: string | RobotsInfo
}

export type ResolvedRobots = {
basic: string | null
googleBot: string | null
}

export type IconURL = string | URL
export type Icon = IconURL | IconDescriptor
export type IconDescriptor = {
url: string | URL
type?: string
sizes?: string
color?: string
/** defaults to rel="icon" unless superseded by Icons map */
rel?: string
media?: string
/**
* @see https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority
*/
fetchPriority?: 'high' | 'low' | 'auto'
}

export type Icons = {
/** rel="icon" */
icon?: Icon | Icon[]
/** rel="shortcut icon" */
shortcut?: Icon | Icon[]
/**
* @see https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
* rel="apple-touch-icon"
*/
apple?: Icon | Icon[]
/** rel inferred from descriptor, defaults to "icon" */
other?: IconDescriptor | IconDescriptor[]
}

export type Verification = {
google?: null | string | number | (string | number)[]
yahoo?: null | string | number | (string | number)[]
yandex?: null | string | number | (string | number)[]
me?: null | string | number | (string | number)[]
// if you ad-hoc additional verification
other?: {
[name: string]: string | number | (string | number)[]
}
}

export type ResolvedVerification = {
google?: null | (string | number)[]
yahoo?: null | (string | number)[]
yandex?: null | (string | number)[]
me?: null | (string | number)[]
other?: {
[name: string]: (string | number)[]
}
}

export type ResolvedIcons = {
icon: IconDescriptor[]
apple: IconDescriptor[]
shortcut?: IconDescriptor[]
other?: IconDescriptor[]
}

export type ThemeColorDescriptor = {
color: string
media?: string
}
Loading

0 comments on commit e5a09da

Please sign in to comment.