Skip to content

Commit

Permalink
remove old ui package (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
emiljohansson authored Dec 24, 2024
1 parent 2f8fc77 commit b687533
Show file tree
Hide file tree
Showing 61 changed files with 6,589 additions and 5,669 deletions.
2 changes: 1 addition & 1 deletion apps/design/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PropsWithChildren } from 'react'

import 'ui/globals.css'
import '@repo/ui/styles.css'
import './styles.css'

import { Inter } from 'next/font/google'
Expand Down
2 changes: 1 addition & 1 deletion apps/design/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
Progress,
Slider,
CheckboxWithLabel,
} from 'ui'
} from '@repo/ui'

const RadioGroup = RadioGroupPrimitive.Root
const RadioGroupRadio = RadioGroupPrimitive.Item
Expand Down
12 changes: 8 additions & 4 deletions apps/design/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,25 @@
"dev": "PORT=3001 next dev",
"export": "next export",
"lint": "next lint",
"start": "PORT=3001 next start"
"start": "PORT=3001 next start",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@radix-ui/react-icons": "1.3.2",
"@radix-ui/react-label": "2.1.1",
"@radix-ui/react-progress": "1.1.1",
"@radix-ui/react-radio-group": "^1.2.2",
"lib": "workspace:*",
"@repo/lib": "workspace:*",
"@repo/ui": "workspace:*",
"motion": "11.15.0",
"next": "15.1.2",
"react": "19.0.0",
"react-dom": "19.0.0",
"ui": "workspace:*"
"react-dom": "19.0.0"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/tailwind-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"config": "workspace:*",
"tsconfig": "workspace:*"
}
Expand Down
35 changes: 5 additions & 30 deletions apps/design/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,11 @@
{
"extends": "tsconfig/nextjs.json",
"extends": "@repo/typescript-config/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [{ "name": "next" }],
"paths": {
"@/components/*": ["./components/*"]
},
"plugins": [
{
"name": "next"
}
]
"@/*": ["./src/*"]
}
},
"include": [
"next-env.d.ts",
"twin.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
1 change: 1 addition & 0 deletions apps/design/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions apps/games/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
"build": "next build",
"dev": "PORT=3002 next dev",
"lint": "next lint",
"start": "PORT=3002 next start"
"start": "PORT=3002 next start",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@faker-js/faker": "7.4.0",
"@nanostores/react": "0.7.1",
"@repo/lib": "workspace:*",
"@repo/ui": "workspace:*",
"just-shuffle": "4.1.1",
"lib": "workspace:*",
"lz-string": "1.5.0",
"million": "2.6.4",
"motion": "11.15.0",
"nanostores": "0.9.5",
"next": "15.1.2",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-icons": "4.7.1",
"ui": "workspace:*"
"react-icons": "4.7.1"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions apps/games/src/app/idiot/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import type { Card, Deck, Piles } from '@/types/card-games'
import { useRef, useState } from 'react'
import { FiRefreshCw } from 'react-icons/fi'
import { Header, HeaderAction } from '@repo/ui'
import { isDefined, isEmpty } from 'lib/utils/lang'
import { classNames } from 'lib/utils/string'
import { first, last, lastIndex, chunk } from 'lib/utils/array'
import { isDefined, isEmpty } from '@repo/lib/utils/lang'
import { classNames } from '@repo/lib/utils/string'
import { first, last, lastIndex, chunk } from '@repo/lib/utils/array'
import {
deselectAll,
moveCardsToPiles,
Expand Down
2 changes: 1 addition & 1 deletion apps/games/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PropsWithChildren } from 'react'

import 'ui/globals.css'
import '@repo/ui/styles.css'
import './globals.css'

import { Inter } from 'next/font/google'
Expand Down
2 changes: 1 addition & 1 deletion apps/games/src/app/ms/Board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type FunctionComponent,
type ReactNode,
} from 'react'
import useInterval from 'lib/hooks/useInterval'
import useInterval from '@repo/lib/hooks/useInterval'
import { type Difficulty, type Rows, type RowTile } from './types'
import { $boardStyles, $isDebugging } from './store'
import { useStore } from '@nanostores/react'
Expand Down
4 changes: 2 additions & 2 deletions apps/games/src/app/spider/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type { Card, Deck, Piles } from '@/types/card-games'
import { useRouter } from 'next/navigation'
import { useRef, useState } from 'react'
import { FiRefreshCw, FiRotateCcw } from 'react-icons/fi'
import { isDefined, isEmpty } from 'lib/utils/lang'
import { chunk, first, last } from 'lib/utils/array'
import { isDefined, isEmpty } from '@repo/lib/utils/lang'
import { chunk, first, last } from '@repo/lib/utils/array'
import { Header, HeaderAction } from '@repo/ui'
import {
deselectAll,
Expand Down
2 changes: 1 addition & 1 deletion apps/games/src/app/spider/Image.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Card } from '@/types/card-games'
import { classNames } from 'lib/utils/string'
import { classNames } from '@repo/lib/utils/string'

export const Image = ({
card,
Expand Down
2 changes: 1 addition & 1 deletion apps/games/src/app/spider/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import shuffle from 'just-shuffle'
import { Game } from './Game'
import { createBaseDeck } from './createBaseDeck'
import { useEffect, useState } from 'react'
import { isDefined } from 'lib/utils/lang'
import { isDefined } from '@repo/lib/utils/lang'
import { Deck, Piles } from '@/types/card-games'
import { restoreGameFromHash } from './state'

Expand Down
2 changes: 1 addition & 1 deletion apps/games/src/lib/deck.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { uniqueId } from 'lib/utils/string'
import { uniqueId } from '@repo/lib/utils/string'
import type { Card, Rank, Suit } from '@/types/card-games'

export const ranks: Rank[] = ['A', 2, 3, 4, 5, 6, 7, 8, 9, 10, 'J', 'Q', 'K']
Expand Down
1 change: 1 addition & 0 deletions apps/games/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions apps/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
"start": "next start",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@emiljohansson/random-string": "1.1.2",
Expand All @@ -25,23 +26,22 @@
"@radix-ui/react-progress": "1.1.1",
"@radix-ui/react-select": "2.1.4",
"@radix-ui/react-tabs": "1.1.2",
"@repo/lib": "workspace:*",
"@repo/ui": "workspace:*",
"@supabase/ssr": "0.0.10",
"@vercel/analytics": "1.1.1",
"@vercel/kv": "1.0.0",
"crypto-js": "4.2.0",
"jsonwebtoken": "9.0.2",
"just-range": "4.1.1",
"lib": "workspace:*",
"lucide-react": "0.323.0",
"motion": "11.15.0",
"nanostores": "0.9.5",
"next": "15.1.2",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-icons": "4.7.1",
"swr": "1.3.0",
"ui": "workspace:*"
"swr": "1.3.0"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/app/api/calculate/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextResponse } from 'next/server'
import { add } from 'lib/utils/math'
import { add } from '@repo/lib/utils/math'

const toNumber = (value: string): number => parseFloat(value)

Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/app/current-time/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import useCurrentTime from 'lib/hooks/useCurrentTime'
import useCurrentTime from '@repo/lib/hooks/useCurrentTime'

const CurrentTimePage = () => {
const { hours, minutes, meridiem } = useCurrentTime()
Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/app/password-generator/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type PropsWithChildren, useState } from 'react'
import * as Tabs from '@radix-ui/react-tabs'
import useSWR from 'swr'
import { Slider, CheckboxWithLabel } from '@repo/ui'
import { randomString } from 'lib/utils/string'
import { randomString } from '@repo/lib/utils/string'

interface Selection {
length: number
Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/app/random-string/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Ref } from '@/components/RandomString'
import { useRef, useState } from 'react'
import { RefreshCw, Check, Copy } from 'lucide-react'
import RandomString from '@/components/RandomString'
import { copyToClipboard } from 'lib/utils/string'
import { copyToClipboard } from '@repo/lib/utils/string'

export default function Content({ initialValue }: { initialValue: string }) {
const randomStringRef = useRef<Ref>(null)
Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/app/signals/LocalContent.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

// import { signal, computed, effect } from 'lib/hooks/signals'
// import { signal, computed, effect } from '@repo/lib/hooks/signals'
// import { useSignals } from '@preact/signals-react/runtime'
import { useSignal, useComputed, useSignalEffect } from '@preact/signals-react'
// import { signal, computed, effect } from '@preact/signals-core'
Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/components/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FunctionComponent } from 'lib/@types'
import type { FunctionComponent } from '@repo/lib/@types'

const Content: FunctionComponent = ({ children }) => {
return <section className="flex flex-col h-full">{children}</section>
Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/components/Section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FunctionComponent, ReactNode } from 'react'
import { classNames } from 'lib/utils/string'
import { classNames } from '@repo/lib/utils/string'

const Section: FunctionComponent<{
children: ReactNode
Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/hooks/useCounter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react'
import { clamp } from 'lib/utils/number'
import { clamp } from '@repo/lib/utils/number'

export const useCounter = (
initialValue = 0,
Expand Down
1 change: 1 addition & 0 deletions apps/next/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions apps/password-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
"dependencies": {
"@radix-ui/react-icons": "1.3.2",
"@radix-ui/react-label": "2.1.1",
"@repo/lib": "workspace:*",
"@supabase/auth-helpers-nextjs": "0.2.7",
"@supabase/auth-helpers-react": "0.2.3",
"@supabase/supabase-js": "1.35.6",
"@supabase/ui": "0.36.5",
"crypto-js": "4.2.0",
"lib": "workspace:*",
"next": "15.1.2",
"react": "19.0.0",
"react-dom": "19.0.0",
"ui": "workspace:*"
"react-dom": "19.0.0"
},
"devDependencies": {
"@types/crypto-js": "4.1.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/password-manager/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AppProps } from 'next/app'

import 'ui/globals.css'
// import '@repo/ui/styles.css'
import '../styles/globals.css'

import { UserProvider } from '@supabase/auth-helpers-react'
Expand Down
3 changes: 1 addition & 2 deletions apps/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"devDependencies": {
"@emiljohansson/random-string": "1.1.2",
"@faker-js/faker": "7.4.0",
"@repo/lib": "workspace:*",
"@sveltejs/adapter-auto": "2.1.1",
"@sveltejs/kit": "1.27.6",
"@types/feather-icons": "4.29.1",
Expand All @@ -26,15 +27,13 @@
"feather-icons": "4.29.0",
"just-debounce-it": "3.2.0",
"just-range": "4.1.1",
"lib": "workspace:*",
"prettier": "2.8.0",
"prettier-plugin-svelte": "3.1.2",
"svelte": "4.2.7",
"svelte-check": "3.6.2",
"tsconfig": "workspace:*",
"tslib": "2.4.1",
"typescript": "5.7.2",
"ui": "workspace:*",
"vite": "5.0.11"
},
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion apps/svelte/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import "ui/globals.css"
// import '@repo/ui/styles.css'
import "../app.css"
// import feather from "feather-icons"
</script>
Expand Down
2 changes: 1 addition & 1 deletion apps/svelte/src/routes/current-time/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { onDestroy } from "svelte"
import { getCurrentTime } from "lib/utils/date"
import { getCurrentTime } from "@repo/lib/utils/date"
let { hours, minutes, meridiem } = getCurrentTime()
Expand Down
2 changes: 1 addition & 1 deletion apps/svelte/src/routes/hooks/counter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { clamp } from 'lib/utils/number'
import { clamp } from '@repo/lib/utils/number'
import { writable } from 'svelte/store'

export function createCounter(
Expand Down
2 changes: 1 addition & 1 deletion apps/svelte/src/routes/password-generator/pin/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { randomString } from "lib/utils/string"
import { randomString } from "@repo/lib/utils/string"
const letters = false
const numeric = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { randomString } from "lib/utils/string"
import { randomString } from "@repo/lib/utils/string"
let value = randomString()
let length = 20
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
"turbo": "2.3.3",
"typescript": "5.7.2"
},
"packageManager": "pnpm@7.1.3"
"packageManager": "pnpm@9.15.1"
}
5 changes: 3 additions & 2 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "lib",
"name": "@repo/lib",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"lint": "eslint ./{hooks,tests,utils}/*.ts",
"test": "jest --coverage",
"test:ci": "npm run test",
"test:watch": "jest --coverage --watchAll"
"test:watch": "jest --coverage --watchAll",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@preact/signals-core": "1.8.0",
Expand Down
Loading

0 comments on commit b687533

Please sign in to comment.