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

feat: Create UI library & Revamp Visor App #88

Merged
merged 29 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"react/jsx-uses-react": "off",
"simple-import-sort/imports": "error",
"react/jsx-sort-props": "warn",
"react/prop-types": "off"
"react/prop-types": "off",
"react/self-closing-comp": "warn"
},
"overrides": [
{
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

* shinkai-message-ts: Typescript library that implements the features and networking layer to enable systems to interact with shinkai-nodes.
* shinkai-node-state: Typescript library which using @tanstack/react-query enables apps to interact with shinkai-node managing the state, caching and evictions.
* shinkai-ui: React UI library to build shinkai apps.

## Getting started

Expand Down
4 changes: 2 additions & 2 deletions apps/shinkai-app/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { dirname,join } from 'path';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);

export default {
plugins: {
"tailwindcss/nesting": {},
'tailwindcss/nesting': {},
tailwindcss: {
config: join(dirname(__filename), 'tailwind.config.js'),
},
Expand Down
15 changes: 10 additions & 5 deletions apps/shinkai-app/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": [
"node",
"vite/client"
]
"types": ["node", "vite/client"]
},
"exclude": [
"src/**/*.spec.ts",
Expand All @@ -17,5 +14,13 @@
"src/**/*.spec.jsx",
"src/**/*.test.jsx"
],
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx", "@nx/react/typings/cssmodule.d.ts", "@nx/react/typings/image.d.ts", "vite.config.ts"]
"include": [
"src/**/*.js",
"src/**/*.jsx",
"src/**/*.ts",
"src/**/*.tsx",
"@nx/react/typings/cssmodule.d.ts",
"@nx/react/typings/image.d.ts",
"vite.config.ts"
]
}
2 changes: 1 addition & 1 deletion apps/shinkai-tray/src/pages/generate-code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const GenerateCodePage = () => {
profile: auth?.profile ?? '',
shinkai_identity: auth?.shinkai_identity ?? '',
node_address: auth?.node_address ?? '',
//TODO: remove from network lib these unused params
//TODO: remove from network components these unused params
registration_code: '',
identity_type: '',
},
Expand Down
57 changes: 8 additions & 49 deletions apps/shinkai-tray/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,12 @@
/** @type {import('tailwindcss').Config} */
const sharedTailwindConfig = require('../../libs/shinkai-ui/src/shinkai-preset.js');

module.exports = {
darkMode: ["class"],
presets: [sharedTailwindConfig],
darkMode: ['class'],
content: [
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
],
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
fontFamily: {
inter: ["Inter", "sans-serif"],
newake: ["Newake", "sans-serif"],
},
colors: {
primary: {
600: "#FF7E7F",
700: "#FF5E5F",
800: "#FF3E3F",
},
foreground: "#FFFFFF",
"muted-foreground": "#c7c7c7",
},
backgroundImage: {
"app-gradient":
"linear-gradient(90deg, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.20) 100%)",
},
keyframes: {
"accordion-down": {
from: { height: 0 },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: 0 },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography")],
};
15 changes: 10 additions & 5 deletions apps/shinkai-tray/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": [
"node",
"vite/client"
]
"types": ["node", "vite/client"]
},
"exclude": [
"src/**/*.spec.ts",
Expand All @@ -17,5 +14,13 @@
"src/**/*.spec.jsx",
"src/**/*.test.jsx"
],
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx", "@nx/react/typings/cssmodule.d.ts", "@nx/react/typings/image.d.ts", "vite.config.ts"]
"include": [
"src/**/*.js",
"src/**/*.jsx",
"src/**/*.ts",
"src/**/*.tsx",
"@nx/react/typings/cssmodule.d.ts",
"@nx/react/typings/image.d.ts",
"vite.config.ts"
]
}
4 changes: 2 additions & 2 deletions apps/shinkai-tray/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"include": [],
"references": [
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.spec.json" }
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.spec.json" }
],
"extends": "../../tsconfig.base.json"
}
4 changes: 2 additions & 2 deletions apps/shinkai-visor/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dirname,join } from 'path';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);

Expand All @@ -10,4 +10,4 @@ export default {
},
autoprefixer: {},
},
}
};
Binary file added apps/shinkai-visor/public/welcome.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions apps/shinkai-visor/src/assets/icons/shinkai-min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading