This commit is contained in:
ryan 2025-02-08 22:40:36 -08:00
parent 09b3508a72
commit 89eadbd477
70 changed files with 9585 additions and 2783 deletions

View File

@ -1,19 +0,0 @@
#!/usr/bin/env bash
set -e
if [[ ! -d "/home/ryan/Documents/Code/nazara" ]]; then
echo "Cannot find source directory; Did you move it?"
echo "(Looking for "/home/ryan/Documents/Code/nazara")"
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
exit 1
fi
# rebuild the cache forcefully
_nix_direnv_force_reload=1 direnv exec "/home/ryan/Documents/Code/nazara" true
# Update the mtime for .envrc.
# This will cause direnv to reload again - but without re-building.
touch "/home/ryan/Documents/Code/nazara/.envrc"
# Also update the timestamp of whatever profile_rc we have.
# This makes sure that we know we are up to date.
touch -r "/home/ryan/Documents/Code/nazara/.envrc" "/home/ryan/Documents/Code/nazara/.direnv"/*.rc

View File

@ -1 +0,0 @@
/nix/store/01x5k4nlxcpyd85nnr0b9gm89rm8ff4x-source

View File

@ -1 +0,0 @@
/nix/store/m4wcdchjxw2fdyzjp8i6irpc613pchkr-source

View File

@ -1 +0,0 @@
/nix/store/v693fy6xqbw70nfw0gyv66blwpax2l67-source

View File

@ -1 +0,0 @@
/nix/store/yj1wxm9hh8610iyzqnz75kvs6xl8j3my-source

View File

@ -1 +0,0 @@
/nix/store/lr0337b15w70fzrxg79xi6zf3bgcm399-nix-shell-env

4
.envrc
View File

@ -1 +1,3 @@
use flake source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
use devenv

9
.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
# Devenv
.devenv*
devenv.local.nix
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml

100
devenv.lock Normal file
View File

@ -0,0 +1,100 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1739003866,
"owner": "cachix",
"repo": "devenv",
"rev": "ebaa7440666d6aadea574b723c9188cf6f56447f",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1739019272,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fa35a3c8e17a3de613240fea68f876e5b4896aec",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1737465171,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
}
},
"root": "root",
"version": 7
}

9
devenv.nix Normal file
View File

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
packages = with pkgs; [
nodejs
pnpm
postgresql
];
}

4
devenv.yaml Normal file
View File

@ -0,0 +1,4 @@
allowUnfree: true
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable

3
local.properties Normal file
View File

@ -0,0 +1,3 @@
# This file was automatically generated by nix-shell.
sdk.dir=/nix/store/3bhlykx0dp1rbd5z04sk40f3lapwalp4-androidsdk/libexec/android-sdk
ndk.dir=/nix/store/3bhlykx0dp1rbd5z04sk40f3lapwalp4-androidsdk/libexec/android-sdk/ndk/

View File

@ -18,9 +18,9 @@ This Turborepo includes the following packages/apps:
- `docs`: a [Next.js](https://nextjs.org/) app - `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app - `web`: another [Next.js](https://nextjs.org/) app
- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications - `@nazara/ui`: a stub React component library shared by both `web` and `docs` applications
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) - `@nazara/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo - `@nazara/typescript-config`: `tsconfig.json`s used throughout the monorepo
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

View File

@ -1,5 +1,5 @@
import Image, { type ImageProps } from "next/image"; import Image, { type ImageProps } from "next/image";
import { Button } from "@repo/ui/button"; import { Button } from "@nazara/ui/button";
import styles from "./page.module.css"; import styles from "./page.module.css";
type Props = Omit<ImageProps, "src"> & { type Props = Omit<ImageProps, "src"> & {

View File

@ -1,4 +1,4 @@
import { nextJsConfig } from "@repo/eslint-config/next-js"; import { nextJsConfig } from "@nazara/eslint-config/next-js";
/** @type {import("eslint").Linter.Config} */ /** @type {import("eslint").Linter.Config} */
export default nextJsConfig; export default nextJsConfig;

View File

@ -1,5 +1,5 @@
{ {
"name": "docs", "name": "@nazara/docs",
"version": "0.1.0", "version": "0.1.0",
"type": "module", "type": "module",
"private": true, "private": true,
@ -11,18 +11,18 @@
"check-types": "tsc --noEmit" "check-types": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@repo/ui": "workspace:*", "@nazara/ui": "workspace:*",
"next": "^15.1.6", "next": "^15.1.6",
"react": "^19.0.0", "react": "^19.0.0",
"react-dom": "^19.0.0" "react-dom": "^19.0.0"
}, },
"devDependencies": { "devDependencies": {
"@repo/eslint-config": "workspace:*", "@nazara/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*", "@nazara/typescript-config": "workspace:*",
"@types/node": "^22", "@types/node": "^22",
"@types/react": "19.0.8", "@types/react": "19.0.8",
"@types/react-dom": "19.0.3", "@types/react-dom": "19.0.3",
"eslint": "^9.19.0", "eslint": "^9.19.0",
"typescript": "5.7.3" "typescript": "5.7.3"
} }
} }

View File

@ -1,5 +1,5 @@
{ {
"extends": "@repo/typescript-config/nextjs.json", "extends": "@nazara/typescript-config/nextjs.json",
"compilerOptions": { "compilerOptions": {
"plugins": [ "plugins": [
{ {
@ -17,4 +17,4 @@
"exclude": [ "exclude": [
"node_modules" "node_modules"
] ]
} }

View File

@ -7,6 +7,7 @@
"start": "next start" "start": "next start"
}, },
"dependencies": { "dependencies": {
"@nazara/ui": "workspace:^",
"@radix-ui/react-checkbox": "^1.1.1", "@radix-ui/react-checkbox": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1", "@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-label": "^2.1.0", "@radix-ui/react-label": "^2.1.0",
@ -22,6 +23,7 @@
"prettier": "^3.3.3", "prettier": "^3.3.3",
"react": "19.0.0", "react": "19.0.0",
"react-dom": "19.0.0", "react-dom": "19.0.0",
"react-native-web": "^0.19.13",
"spacetime": "^7.7.0", "spacetime": "^7.7.0",
"supabase": "^2.9.6" "supabase": "^2.9.6"
}, },
@ -29,6 +31,7 @@
"@types/node": "22.10.2", "@types/node": "22.10.2",
"@types/react": "^19.0.2", "@types/react": "^19.0.2",
"@types/react-dom": "19.0.2", "@types/react-dom": "19.0.2",
"babel-plugin-react-native-web": "^0.19.13",
"postcss": "8.4.49", "postcss": "8.4.49",
"supazod": "^1.1.2", "supazod": "^1.1.2",
"tailwind-merge": "^2.5.2", "tailwind-merge": "^2.5.2",

View File

@ -1,37 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
node_modules
.pnp
.pnp.js
# testing
coverage
# next.js
.next/
.swc/
out/
build
# expo
.expo
# misc
.DS_Store
*.pem
dist
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# turbo
.turbo

View File

@ -1,7 +0,0 @@
{
"eslint.workingDirectories": [
{
"mode": "auto"
}
]
}

View File

@ -1,32 +0,0 @@
# Turborepo react-native starter
This is a community-maintained example. If you experience a problem, please submit a pull request with a fix. GitHub Issues will be closed.
## Using this example
Run the following command:
```sh
npx create-turbo@latest -e with-react-native-web
```
## What's inside?
This Turborepo includes the following packages/apps:
### Apps and Packages
- `native`: a [react-native](https://reactnative.dev/) app built with [expo](https://docs.expo.dev/)
- `web`: a [Next.js](https://nextjs.org/) app built with [react-native-web](https://necolas.github.io/react-native-web/)
- `@repo/ui`: a stub [react-native](https://reactnative.dev/) component library shared by both `web` and `native` applications
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
### Utilities
This Turborepo has some additional tools already setup for you:
- [Expo](https://docs.expo.dev/) for native development
- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [Prettier](https://prettier.io) for code formatting

View File

@ -1,4 +0,0 @@
{
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
}

View File

@ -1,14 +0,0 @@
node_modules/
.expo/
dist/
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
# macOS
.DS_Store

View File

@ -1,3 +0,0 @@
# Native
A [react-native](https://reactnative.dev/) app built using [expo](https://docs.expo.dev/)

View File

@ -1,39 +0,0 @@
{
"expo": {
"name": "native",
"slug": "native",
"version": "1.0.0",
"scheme": "com.turbo.example",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.turbo.example"
},
"web": {
"favicon": "./assets/favicon.png",
"bundler": "metro"
},
"plugins": [
"expo-router"
]
}
}

View File

@ -1,7 +0,0 @@
import { Stack } from "expo-router"
const AppLayout = () => {
return <Stack />
}
export default AppLayout

View File

@ -1,33 +0,0 @@
import { StyleSheet, Text, View } from "react-native";
import { StatusBar } from "expo-status-bar";
import { Button } from "@repo/ui";
export default function Native() {
return (
<View style={styles.container}>
<Text style={styles.header}>Native</Text>
<Button
onClick={() => {
console.log("Pressed!");
alert("Pressed!");
}}
text="Boop"
/>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
header: {
fontWeight: "bold",
marginBottom: 20,
fontSize: 36,
},
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View File

@ -1,6 +0,0 @@
module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
};
};

View File

@ -1 +0,0 @@
import "expo-router/entry"

View File

@ -1,21 +0,0 @@
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require("expo/metro-config");
const path = require("path");
// Find the workspace root, this can be replaced with `find-yarn-workspace-root`
const workspaceRoot = path.resolve(__dirname, "../..");
const projectRoot = __dirname;
const config = getDefaultConfig(projectRoot);
// 1. Watch all files within the monorepo
config.watchFolders = [workspaceRoot];
// 2. Let Metro know where to resolve packages, and in what order
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, "node_modules"),
path.resolve(workspaceRoot, "node_modules"),
];
// 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`
config.resolver.disableHierarchicalLookup = true;
module.exports = config;

View File

@ -1,35 +0,0 @@
{
"name": "native",
"version": "1.0.0",
"private": true,
"main": "index.js",
"scripts": {
"dev": "expo start --web",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@repo/ui": "workspace:*",
"expo": "~51.0.39",
"expo-constants": "~16.0.2",
"expo-linking": "~6.3.1",
"expo-router": "~3.5.24",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.5",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-web": "~0.19.10"
},
"devDependencies": {
"@babel/core": "^7.23.7",
"@expo/webpack-config": "^19.0.0",
"@types/react": "~18.2.14",
"@types/react-native": "^0.73.0",
"typescript": "~5.3.3"
}
}

View File

@ -1,6 +0,0 @@
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true
}
}

View File

@ -1,3 +0,0 @@
{
"extends": "next/core-web-vitals"
}

View File

@ -1,34 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# vercel
.vercel

View File

@ -1,28 +0,0 @@
## Getting Started
First, run the development server:
```bash
yarn dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
To create [API routes](https://nextjs.org/docs/app/building-your-application/routing/router-handlers) add an `api/` directory to the `app/` directory with a `route.ts` file. For individual endpoints, create a subfolder in the `api` directory, like `api/hello/route.ts` would map to [http://localhost:3000/api/hello](http://localhost:3000/api/hello).
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

View File

@ -1,11 +0,0 @@
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}

View File

@ -1,14 +0,0 @@
"use client";
import { Button } from "@repo/ui";
import styles from "../styles/index.module.css";
export default function Web() {
return (
<div className={styles.container}>
<h1>Web</h1>
<Button onClick={() => console.log("Pressed!")} text="Boop" />
</div>
);
}

View File

@ -1,5 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

View File

@ -1,18 +0,0 @@
module.exports = {
reactStrictMode: true,
webpack: (config) => {
config.resolve.alias = {
...(config.resolve.alias || {}),
// Transform all direct `react-native` imports to `react-native-web`
"react-native$": "react-native-web",
};
config.resolve.extensions = [
".web.js",
".web.jsx",
".web.ts",
".web.tsx",
...config.resolve.extensions,
];
return config;
},
};

View File

@ -1,28 +0,0 @@
{
"name": "web",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@repo/ui": "workspace:*",
"next": "^14.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-native-web": "^0.19.10"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
"@types/node": "^20.10.6",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.18",
"babel-plugin-react-native-web": "^0.19.10",
"eslint": "^8.56.0",
"eslint-config-next": "14.0.4",
"typescript": "5.5.4"
}
}

View File

@ -1,8 +0,0 @@
body {
font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", "Helvetica",
"Arial", sans-serif;
display: flex;
height: 100vh;
align-items: center;
justify-content: center;
}

View File

@ -1,3 +0,0 @@
.container {
text-align: center;
}

View File

@ -1,8 +0,0 @@
{
"extends": "@repo/typescript-config/nextjs.json",
"compilerOptions": {
"plugins": [{ "name": "next" }]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}

View File

@ -1,18 +0,0 @@
{
"private": true,
"scripts": {
"dev": "turbo run dev",
"build": "turbo run build",
"clean": "turbo run clean && rm -rf node_modules",
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\" --ignore-path .gitignore"
},
"devDependencies": {
"prettier": "^3.1.1",
"turbo": "^2.4.0"
},
"engines": {
"node": ">=18"
},
"name": "with-react-native-web",
"packageManager": "pnpm@9.0.0"
}

View File

@ -1,19 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"composite": false,
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
"moduleResolution": "node",
"noUnusedLocals": false,
"noUnusedParameters": false,
"preserveWatchOutput": true,
"skipLibCheck": true,
"strict": true
},
"exclude": ["node_modules"]
}

View File

@ -1,19 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./base.json",
"compilerOptions": {
"allowJs": true,
"declaration": false,
"declarationMap": false,
"incremental": true,
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"noEmit": true,
"resolveJsonModule": true,
"strict": true,
"target": "es5"
},
"include": ["src", "next-env.d.ts"],
"exclude": ["node_modules"]
}

View File

@ -1,8 +0,0 @@
{
"name": "@repo/typescript-config",
"version": "0.0.0",
"private": true,
"publishConfig": {
"access": "public"
}
}

View File

@ -1,12 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./base.json",
"compilerOptions": {
"allowJs": true,
"jsx": "react",
"lib": ["DOM", "ESNext"],
"noEmit": true,
"resolveJsonModule": true,
"target": "ESNext"
}
}

View File

@ -1,22 +0,0 @@
{
"name": "@repo/ui",
"version": "0.0.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"clean": "rm -rf dist"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
"@types/react": "^18.2.14",
"@types/react-native": "^0.73.0",
"tsup": "^8.0.1",
"typescript": "5.5.4"
},
"dependencies": {
"react": "^18.2.0",
"react-native": "0.74.5"
}
}

View File

@ -1,37 +0,0 @@
import * as React from "react";
import {
StyleSheet,
GestureResponderEvent,
Text,
Pressable,
} from "react-native";
export interface ButtonProps {
text: string;
onClick?: (event: GestureResponderEvent) => void;
}
export function Button({ text, onClick }: ButtonProps) {
return (
<Pressable style={styles.button} onPress={onClick}>
<Text style={styles.text}>{text}</Text>
</Pressable>
);
}
const styles = StyleSheet.create({
button: {
maxWidth: 200,
textAlign: "center",
borderRadius: 10,
paddingTop: 14,
paddingBottom: 14,
paddingLeft: 30,
paddingRight: 30,
fontSize: 15,
backgroundColor: "#2f80ed",
},
text: {
color: "white",
},
});

View File

@ -1,8 +0,0 @@
{
"extends": "@repo/typescript-config/react-native-library",
"include": ["."],
"exclude": ["dist", "build", "node_modules"],
"compilerOptions": {
"strict": true
}
}

View File

@ -1,3 +0,0 @@
packages:
- "apps/*"
- "packages/*"

View File

@ -1,19 +0,0 @@
{
"$schema": "https://turbo.build/schema.json",
"ui": "tui",
"tasks": {
"build": {
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": ["dist/**", ".next/**", "!.next/cache/**"],
"dependsOn": ["^build"]
},
"dev": {
"cache": false,
"persistent": true
},
"lint": {},
"clean": {
"cache": false
}
}
}

View File

@ -1,5 +1,5 @@
{ {
"name": "@repo/eslint-config", "name": "@nazara/eslint-config",
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
"private": true, "private": true,
@ -21,4 +21,4 @@
"typescript": "^5.7.3", "typescript": "^5.7.3",
"typescript-eslint": "^8.23.0" "typescript-eslint": "^8.23.0"
} }
} }

View File

@ -1,9 +1,9 @@
{ {
"name": "@repo/typescript-config", "name": "@nazara/typescript-config",
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"license": "MIT", "license": "MIT",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
} }
} }

View File

@ -1,4 +1,4 @@
import { config } from "@repo/eslint-config/react-internal"; import { config } from "@nazara/eslint-config/react-internal";
/** @type {import("eslint").Linter.Config} */ /** @type {import("eslint").Linter.Config} */
export default config; export default config;

View File

@ -1,8 +1,9 @@
{ {
"name": "@repo/ui", "name": "@nazara/ui",
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"exports": { "exports": {
".": "./src/index.ts",
"./button": "./src/button.tsx", "./button": "./src/button.tsx",
"./card": "./src/card.tsx", "./card": "./src/card.tsx",
"./code": "./src/code.tsx" "./code": "./src/code.tsx"
@ -13,8 +14,8 @@
"check-types": "tsc --noEmit" "check-types": "tsc --noEmit"
}, },
"devDependencies": { "devDependencies": {
"@repo/eslint-config": "workspace:*", "@nazara/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*", "@nazara/typescript-config": "workspace:*",
"@turbo/gen": "^2.4.0", "@turbo/gen": "^2.4.0",
"@types/node": "^22.13.0", "@types/node": "^22.13.0",
"@types/react": "19.0.8", "@types/react": "19.0.8",
@ -26,4 +27,4 @@
"react": "^19.0.0", "react": "^19.0.0",
"react-dom": "^19.0.0" "react-dom": "^19.0.0"
} }
} }

View File

@ -1,20 +1,37 @@
"use client"; import * as React from "react";
import {
StyleSheet,
GestureResponderEvent,
Text,
Pressable,
} from "react-native";
import { ReactNode } from "react"; export interface ButtonProps {
text: string;
interface ButtonProps { onClick?: (event: GestureResponderEvent) => void;
children: ReactNode;
className?: string;
appName: string;
} }
export const Button = ({ children, className, appName }: ButtonProps) => { export function Button({ text, onClick }: ButtonProps) {
return ( return (
<button <Pressable style={styles.button} onPress={onClick}>
className={className} <Text style={styles.text}>{text}</Text>
onClick={() => alert(`Hello from your ${appName} app!`)} </Pressable>
>
{children}
</button>
); );
}; }
const styles = StyleSheet.create({
button: {
maxWidth: 200,
textAlign: "center",
borderRadius: 10,
paddingTop: 14,
paddingBottom: 14,
paddingLeft: 30,
paddingRight: 30,
fontSize: 15,
backgroundColor: "#2f80ed",
},
text: {
color: "white",
},
});

View File

@ -1,8 +1,13 @@
{ {
"extends": "@repo/typescript-config/react-library.json", "extends": "@nazara/typescript-config/react-library.json",
"compilerOptions": { "compilerOptions": {
"outDir": "dist" "outDir": "dist"
}, },
"include": ["src"], "include": [
"exclude": ["node_modules", "dist"] "src"
} ],
"exclude": [
"node_modules",
"dist"
]
}

View File

@ -1,30 +0,0 @@
import type { PlopTypes } from "@turbo/gen";
// Learn more about Turborepo Generators at https://turbo.build/repo/docs/core-concepts/monorepos/code-generation
export default function generator(plop: PlopTypes.NodePlopAPI): void {
// A simple generator to add a new React component to the internal UI library
plop.setGenerator("react-component", {
description: "Adds a new react component",
prompts: [
{
type: "input",
name: "name",
message: "What is the name of the component?",
},
],
actions: [
{
type: "add",
path: "src/{{kebabCase name}}.tsx",
templateFile: "templates/component.hbs",
},
{
type: "append",
path: "package.json",
pattern: /"exports": {(?<insertion>)/g,
template: ' "./{{kebabCase name}}": "./src/{{kebabCase name}}.tsx",',
},
],
});
}

View File

@ -1,8 +0,0 @@
export const {{ pascalCase name }} = ({ children }: { children: React.ReactNode }) => {
return (
<div>
<h1>{{ pascalCase name }} Component</h1>
{children}
</div>
);
};

9404
nazara/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff