mirror of
https://github.com/lumehq/lume.git
synced 2025-04-06 10:58:32 +02:00
chore: clean up
This commit is contained in:
parent
a21da11a91
commit
a4069dae99
2
.gitignore
vendored
2
.gitignore
vendored
@ -29,7 +29,7 @@ dist/
|
||||
|
||||
|
||||
# Debug
|
||||
*.log*
|
||||
*.log.*
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
|
6
apps/desktop2/.gitignore
vendored
6
apps/desktop2/.gitignore
vendored
@ -1,6 +0,0 @@
|
||||
node_modules
|
||||
|
||||
/.cache
|
||||
/build
|
||||
/public/build
|
||||
.env
|
@ -1,37 +0,0 @@
|
||||
# templates/spa
|
||||
|
||||
This template leverages [Remix SPA Mode](https://remix.run/docs/en/main/future/spa-mode) to build your app as a Single-Page Application using [Client Data](https://remix.run/docs/en/main/guides/client-data) for all of you data loads and mutations.
|
||||
|
||||
⚠️ This is built on top of the Remix Vite template. Remix support for Vite is currently unstable and not recommended for production.
|
||||
|
||||
📖 See the [Remix Vite docs][remix-vite-docs] for details on supported features.
|
||||
|
||||
## Setup
|
||||
|
||||
```shellscript
|
||||
npx create-remix@latest --template remix-run/remix/templates/spa
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
You can develop your SPA app just like you would a normal Remix app, via:
|
||||
|
||||
```shellscript
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
When you are ready yo build a production version of your app, `npm run build` will generate your assets and an `index.html` for the SPA.
|
||||
|
||||
```shellscript
|
||||
npm run build
|
||||
```
|
||||
|
||||
You can serve this from any server of your choosing, for a simple example, you could use [http-server](https://www.npmjs.com/package/http-server):
|
||||
|
||||
```shellscript
|
||||
npx http-server build/client/
|
||||
```
|
||||
|
||||
[remix-vite-docs]: https://remix.run/docs/en/main/future/vite
|
@ -1,12 +0,0 @@
|
||||
import { RemixBrowser } from "@remix-run/react";
|
||||
import { startTransition, StrictMode } from "react";
|
||||
import { hydrateRoot } from "react-dom/client";
|
||||
|
||||
startTransition(() => {
|
||||
hydrateRoot(
|
||||
document,
|
||||
<StrictMode>
|
||||
<RemixBrowser />
|
||||
</StrictMode>
|
||||
);
|
||||
});
|
@ -1,21 +0,0 @@
|
||||
import type { EntryContext } from "@remix-run/node";
|
||||
import { RemixServer } from "@remix-run/react";
|
||||
import { renderToString } from "react-dom/server";
|
||||
|
||||
export default function handleRequest(
|
||||
request: Request,
|
||||
responseStatusCode: number,
|
||||
responseHeaders: Headers,
|
||||
remixContext: EntryContext
|
||||
) {
|
||||
let html = renderToString(
|
||||
<RemixServer context={remixContext} url={request.url} />
|
||||
);
|
||||
if (html.startsWith("<html")) {
|
||||
html = "<!DOCTYPE html>\n" + html;
|
||||
}
|
||||
return new Response(html, {
|
||||
headers: { "Content-Type": "text/html" },
|
||||
status: responseStatusCode,
|
||||
});
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
import {
|
||||
Links,
|
||||
Meta,
|
||||
Outlet,
|
||||
Scripts,
|
||||
ScrollRestoration,
|
||||
} from "@remix-run/react";
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<Meta />
|
||||
<Links />
|
||||
</head>
|
||||
<body>
|
||||
<Outlet />
|
||||
<ScrollRestoration />
|
||||
<Scripts />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
export function HydrateFallback() {
|
||||
return (
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<Meta />
|
||||
<Links />
|
||||
</head>
|
||||
<body>
|
||||
<p>Loading...</p>
|
||||
<Scripts />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
import type { MetaFunction } from "@remix-run/node";
|
||||
|
||||
export const meta: MetaFunction = () => {
|
||||
return [
|
||||
{ title: "New Remix SPA" },
|
||||
{ name: "description", content: "Welcome to Remix (SPA Mode)!" },
|
||||
];
|
||||
};
|
||||
|
||||
export default function Index() {
|
||||
return (
|
||||
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}>
|
||||
<h1>Welcome to Remix (SPA Mode)</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://remix.run/future/spa-mode"
|
||||
rel="noreferrer"
|
||||
>
|
||||
SPA Mode Guide
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" href="https://remix.run/docs" rel="noreferrer">
|
||||
Remix Docs
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
2
apps/desktop2/env.d.ts
vendored
2
apps/desktop2/env.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
/// <reference types="@remix-run/node" />
|
||||
/// <reference types="vite/client" />
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
"name": "@lume/desktop2",
|
||||
"private": true,
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "remix vite:build",
|
||||
"dev": "remix vite:dev",
|
||||
"start": "http-server build/client/",
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@remix-run/node": "^2.6.0",
|
||||
"@remix-run/react": "^2.6.0",
|
||||
"http-server": "^14.1.1",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@remix-run/dev": "^2.6.0",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "^5.0.0",
|
||||
"vite-tsconfig-paths": "^4.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
@ -1,24 +0,0 @@
|
||||
{
|
||||
"include": ["env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"compilerOptions": {
|
||||
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
||||
"isolatedModules": true,
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react-jsx",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"resolveJsonModule": true,
|
||||
"target": "ES2022",
|
||||
"strict": true,
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": ["./app/*"]
|
||||
},
|
||||
|
||||
// Remix takes care of building everything in `remix build`.
|
||||
"noEmit": true
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
import { unstable_vitePlugin as remix } from "@remix-run/dev";
|
||||
import { defineConfig } from "vite";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
remix({ unstable_ssr: false, buildDirectory: "../../dist" }),
|
||||
tsconfigPaths(),
|
||||
],
|
||||
});
|
@ -16,6 +16,6 @@
|
||||
"tailwindcss": "^3.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@evilmartians/harmony": "^1.2.0"
|
||||
"tailwindcss-radix-colors": "^1.2.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,53 +1,51 @@
|
||||
import harmonyPalette from "@evilmartians/harmony/tailwind";
|
||||
|
||||
const config = {
|
||||
theme: {
|
||||
colors: harmonyPalette,
|
||||
extend: {
|
||||
keyframes: {
|
||||
slideDownAndFade: {
|
||||
from: { opacity: 0, transform: "translateY(-2px)" },
|
||||
to: { opacity: 1, transform: "translateY(0)" },
|
||||
},
|
||||
slideLeftAndFade: {
|
||||
from: { opacity: 0, transform: "translateX(2px)" },
|
||||
to: { opacity: 1, transform: "translateX(0)" },
|
||||
},
|
||||
slideUpAndFade: {
|
||||
from: { opacity: 0, transform: "translateY(2px)" },
|
||||
to: { opacity: 1, transform: "translateY(0)" },
|
||||
},
|
||||
slideRightAndFade: {
|
||||
from: { opacity: 0, transform: "translateX(-2px)" },
|
||||
to: { opacity: 1, transform: "translateX(0)" },
|
||||
},
|
||||
overlayShow: {
|
||||
from: { opacity: 0 },
|
||||
to: { opacity: 1 },
|
||||
},
|
||||
contentShow: {
|
||||
from: { opacity: 0, transform: "translate(-50%, -48%) scale(0.96)" },
|
||||
to: { opacity: 1, transform: "translate(-50%, -50%) scale(1)" },
|
||||
},
|
||||
},
|
||||
animation: {
|
||||
slideDownAndFade:
|
||||
"slideDownAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
slideLeftAndFade:
|
||||
"slideLeftAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
slideUpAndFade: "slideUpAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
slideRightAndFade:
|
||||
"slideRightAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
overlayShow: "overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
contentShow: "contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
require("@tailwindcss/forms"),
|
||||
require("@tailwindcss/typography"),
|
||||
require("tailwind-scrollbar")({ nocompatible: true }),
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
keyframes: {
|
||||
slideDownAndFade: {
|
||||
from: { opacity: 0, transform: "translateY(-2px)" },
|
||||
to: { opacity: 1, transform: "translateY(0)" },
|
||||
},
|
||||
slideLeftAndFade: {
|
||||
from: { opacity: 0, transform: "translateX(2px)" },
|
||||
to: { opacity: 1, transform: "translateX(0)" },
|
||||
},
|
||||
slideUpAndFade: {
|
||||
from: { opacity: 0, transform: "translateY(2px)" },
|
||||
to: { opacity: 1, transform: "translateY(0)" },
|
||||
},
|
||||
slideRightAndFade: {
|
||||
from: { opacity: 0, transform: "translateX(-2px)" },
|
||||
to: { opacity: 1, transform: "translateX(0)" },
|
||||
},
|
||||
overlayShow: {
|
||||
from: { opacity: 0 },
|
||||
to: { opacity: 1 },
|
||||
},
|
||||
contentShow: {
|
||||
from: { opacity: 0, transform: "translate(-50%, -48%) scale(0.96)" },
|
||||
to: { opacity: 1, transform: "translate(-50%, -50%) scale(1)" },
|
||||
},
|
||||
},
|
||||
animation: {
|
||||
slideDownAndFade:
|
||||
"slideDownAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
slideLeftAndFade:
|
||||
"slideLeftAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
slideUpAndFade: "slideUpAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
slideRightAndFade:
|
||||
"slideRightAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
overlayShow: "overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
contentShow: "contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1)",
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
require("tailwindcss-radix-colors"),
|
||||
require("@tailwindcss/forms"),
|
||||
require("@tailwindcss/typography"),
|
||||
require("tailwind-scrollbar")({ nocompatible: true }),
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
33
pnpm-lock.yaml
generated
33
pnpm-lock.yaml
generated
@ -272,6 +272,9 @@ importers:
|
||||
specifier: ^18.2.0
|
||||
version: 18.2.0(react@18.2.0)
|
||||
devDependencies:
|
||||
'@lume/tailwindcss':
|
||||
specifier: workspace:^
|
||||
version: link:../../packages/tailwindcss
|
||||
'@remix-run/dev':
|
||||
specifier: ^2.6.0
|
||||
version: 2.6.0(typescript@5.3.3)(vite@5.0.12)
|
||||
@ -281,6 +284,15 @@ importers:
|
||||
'@types/react-dom':
|
||||
specifier: ^18.2.7
|
||||
version: 18.2.18
|
||||
autoprefixer:
|
||||
specifier: ^10.4.17
|
||||
version: 10.4.17(postcss@8.4.33)
|
||||
postcss:
|
||||
specifier: ^8.4.33
|
||||
version: 8.4.33
|
||||
tailwindcss:
|
||||
specifier: ^3.4.1
|
||||
version: 3.4.1
|
||||
typescript:
|
||||
specifier: ^5.1.6
|
||||
version: 5.3.3
|
||||
@ -1098,9 +1110,9 @@ importers:
|
||||
|
||||
packages/tailwindcss:
|
||||
dependencies:
|
||||
'@evilmartians/harmony':
|
||||
tailwindcss-radix-colors:
|
||||
specifier: ^1.2.0
|
||||
version: 1.2.0
|
||||
version: 1.2.0(tailwindcss@3.4.1)
|
||||
devDependencies:
|
||||
'@tailwindcss/forms':
|
||||
specifier: ^0.5.7
|
||||
@ -2263,10 +2275,6 @@ packages:
|
||||
requiresBuild: true
|
||||
optional: true
|
||||
|
||||
/@evilmartians/harmony@1.2.0:
|
||||
resolution: {integrity: sha512-Ua8gpC+28Eo9D2/xynTrrZIrSawgtobwtRLLYq4wH8N19qoMspWZ1vqfsDDVPgQFa+iHsVAk/SbdmoPAj6OH1g==}
|
||||
dev: false
|
||||
|
||||
/@floating-ui/core@1.6.0:
|
||||
resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==}
|
||||
dependencies:
|
||||
@ -2517,6 +2525,10 @@ packages:
|
||||
resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
|
||||
dev: false
|
||||
|
||||
/@radix-ui/colors@3.0.0:
|
||||
resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==}
|
||||
dev: false
|
||||
|
||||
/@radix-ui/number@1.0.1:
|
||||
resolution: {integrity: sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==}
|
||||
dependencies:
|
||||
@ -9355,6 +9367,15 @@ packages:
|
||||
tailwindcss: 3.4.1
|
||||
dev: true
|
||||
|
||||
/tailwindcss-radix-colors@1.2.0(tailwindcss@3.4.1):
|
||||
resolution: {integrity: sha512-2rr3l7NV89UEwRTJFN4LlQIm5aasi7OZeJFF7iaDJ2hKwylR8BNMAC6GoiDl0G7wq18keN1YQ3V5sMbvtREO6w==}
|
||||
peerDependencies:
|
||||
tailwindcss: '>=3.0.0'
|
||||
dependencies:
|
||||
'@radix-ui/colors': 3.0.0
|
||||
tailwindcss: 3.4.1
|
||||
dev: false
|
||||
|
||||
/tailwindcss@3.4.1:
|
||||
resolution: {integrity: sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
|
@ -1,81 +1,74 @@
|
||||
{
|
||||
"$schema": "./schemas/desktop-schema.json",
|
||||
"identifier": "desktop-capability",
|
||||
"description": "Capability for the desktop",
|
||||
"platforms": [
|
||||
"linux",
|
||||
"macOS",
|
||||
"windows"
|
||||
],
|
||||
"windows": [
|
||||
"main",
|
||||
"settings",
|
||||
"event-*",
|
||||
"user-*",
|
||||
"column-*"
|
||||
],
|
||||
"permissions": [
|
||||
"path:default",
|
||||
"event:default",
|
||||
"window:default",
|
||||
"app:default",
|
||||
"resources:default",
|
||||
"menu:default",
|
||||
"tray:default",
|
||||
"shell:open",
|
||||
"theme:allow-set-theme",
|
||||
"theme:allow-get-theme",
|
||||
{
|
||||
"identifier": "http:default",
|
||||
"allow": [
|
||||
{
|
||||
"url": "http://**/"
|
||||
},
|
||||
{
|
||||
"url": "https://**/"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifier": "fs:scope",
|
||||
"allow": [
|
||||
{
|
||||
"path": "$APPDATA/*"
|
||||
},
|
||||
{
|
||||
"path": "$LOCALDATA/*"
|
||||
},
|
||||
{
|
||||
"path": "$DESKTOP/*"
|
||||
},
|
||||
{
|
||||
"path": "$DOCUMENT/*"
|
||||
},
|
||||
{
|
||||
"path": "$DOWNLOAD/*"
|
||||
},
|
||||
{
|
||||
"path": "$HOME/*"
|
||||
},
|
||||
{
|
||||
"path": "$PICTURE/*"
|
||||
},
|
||||
{
|
||||
"path": "$PUBLIC/*"
|
||||
},
|
||||
{
|
||||
"path": "$VIDEO/*"
|
||||
},
|
||||
{
|
||||
"path": "$RESOURCE"
|
||||
},
|
||||
{
|
||||
"path": "$RESOURCE/*"
|
||||
},
|
||||
{
|
||||
"path": "$RESOURCE/locales/*"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"$schema": "./schemas/desktop-schema.json",
|
||||
"identifier": "desktop-capability",
|
||||
"description": "Capability for the desktop",
|
||||
"platforms": ["linux", "macOS", "windows"],
|
||||
"windows": ["main", "settings", "event-*", "user-*", "column-*"],
|
||||
"permissions": [
|
||||
"path:default",
|
||||
"event:default",
|
||||
"window:default",
|
||||
"app:default",
|
||||
"resources:default",
|
||||
"menu:default",
|
||||
"tray:default",
|
||||
"shell:open",
|
||||
"theme:allow-set-theme",
|
||||
"theme:allow-get-theme",
|
||||
"notification:allow-is-permission-granted",
|
||||
"notification:allow-request-permission",
|
||||
"notification:allow-notify",
|
||||
{
|
||||
"identifier": "http:default",
|
||||
"allow": [
|
||||
{
|
||||
"url": "http://**/"
|
||||
},
|
||||
{
|
||||
"url": "https://**/"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifier": "fs:scope",
|
||||
"allow": [
|
||||
{
|
||||
"path": "$APPDATA/*"
|
||||
},
|
||||
{
|
||||
"path": "$LOCALDATA/*"
|
||||
},
|
||||
{
|
||||
"path": "$DESKTOP/*"
|
||||
},
|
||||
{
|
||||
"path": "$DOCUMENT/*"
|
||||
},
|
||||
{
|
||||
"path": "$DOWNLOAD/*"
|
||||
},
|
||||
{
|
||||
"path": "$HOME/*"
|
||||
},
|
||||
{
|
||||
"path": "$PICTURE/*"
|
||||
},
|
||||
{
|
||||
"path": "$PUBLIC/*"
|
||||
},
|
||||
{
|
||||
"path": "$VIDEO/*"
|
||||
},
|
||||
{
|
||||
"path": "$RESOURCE"
|
||||
},
|
||||
{
|
||||
"path": "$RESOURCE/*"
|
||||
},
|
||||
{
|
||||
"path": "$RESOURCE/locales/*"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user