chore: clean up
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -29,7 +29,7 @@ dist/
|
|||||||
|
|
||||||
|
|
||||||
# Debug
|
# Debug
|
||||||
*.log*
|
*.log.*
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
.DS_Store
|
.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"
|
"tailwindcss": "^3.4.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@evilmartians/harmony": "^1.2.0"
|
"tailwindcss-radix-colors": "^1.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import harmonyPalette from "@evilmartians/harmony/tailwind";
|
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
theme: {
|
theme: {
|
||||||
colors: harmonyPalette,
|
|
||||||
extend: {
|
extend: {
|
||||||
keyframes: {
|
keyframes: {
|
||||||
slideDownAndFade: {
|
slideDownAndFade: {
|
||||||
@@ -44,6 +41,7 @@ const config = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
require("tailwindcss-radix-colors"),
|
||||||
require("@tailwindcss/forms"),
|
require("@tailwindcss/forms"),
|
||||||
require("@tailwindcss/typography"),
|
require("@tailwindcss/typography"),
|
||||||
require("tailwind-scrollbar")({ nocompatible: true }),
|
require("tailwind-scrollbar")({ nocompatible: true }),
|
||||||
|
|||||||
33
pnpm-lock.yaml
generated
33
pnpm-lock.yaml
generated
@@ -272,6 +272,9 @@ importers:
|
|||||||
specifier: ^18.2.0
|
specifier: ^18.2.0
|
||||||
version: 18.2.0(react@18.2.0)
|
version: 18.2.0(react@18.2.0)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
'@lume/tailwindcss':
|
||||||
|
specifier: workspace:^
|
||||||
|
version: link:../../packages/tailwindcss
|
||||||
'@remix-run/dev':
|
'@remix-run/dev':
|
||||||
specifier: ^2.6.0
|
specifier: ^2.6.0
|
||||||
version: 2.6.0(typescript@5.3.3)(vite@5.0.12)
|
version: 2.6.0(typescript@5.3.3)(vite@5.0.12)
|
||||||
@@ -281,6 +284,15 @@ importers:
|
|||||||
'@types/react-dom':
|
'@types/react-dom':
|
||||||
specifier: ^18.2.7
|
specifier: ^18.2.7
|
||||||
version: 18.2.18
|
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:
|
typescript:
|
||||||
specifier: ^5.1.6
|
specifier: ^5.1.6
|
||||||
version: 5.3.3
|
version: 5.3.3
|
||||||
@@ -1098,9 +1110,9 @@ importers:
|
|||||||
|
|
||||||
packages/tailwindcss:
|
packages/tailwindcss:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@evilmartians/harmony':
|
tailwindcss-radix-colors:
|
||||||
specifier: ^1.2.0
|
specifier: ^1.2.0
|
||||||
version: 1.2.0
|
version: 1.2.0(tailwindcss@3.4.1)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@tailwindcss/forms':
|
'@tailwindcss/forms':
|
||||||
specifier: ^0.5.7
|
specifier: ^0.5.7
|
||||||
@@ -2263,10 +2275,6 @@ packages:
|
|||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@evilmartians/harmony@1.2.0:
|
|
||||||
resolution: {integrity: sha512-Ua8gpC+28Eo9D2/xynTrrZIrSawgtobwtRLLYq4wH8N19qoMspWZ1vqfsDDVPgQFa+iHsVAk/SbdmoPAj6OH1g==}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@floating-ui/core@1.6.0:
|
/@floating-ui/core@1.6.0:
|
||||||
resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==}
|
resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -2517,6 +2525,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
|
resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/@radix-ui/colors@3.0.0:
|
||||||
|
resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@radix-ui/number@1.0.1:
|
/@radix-ui/number@1.0.1:
|
||||||
resolution: {integrity: sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==}
|
resolution: {integrity: sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -9355,6 +9367,15 @@ packages:
|
|||||||
tailwindcss: 3.4.1
|
tailwindcss: 3.4.1
|
||||||
dev: true
|
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:
|
/tailwindcss@3.4.1:
|
||||||
resolution: {integrity: sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==}
|
resolution: {integrity: sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
|
|||||||
@@ -2,18 +2,8 @@
|
|||||||
"$schema": "./schemas/desktop-schema.json",
|
"$schema": "./schemas/desktop-schema.json",
|
||||||
"identifier": "desktop-capability",
|
"identifier": "desktop-capability",
|
||||||
"description": "Capability for the desktop",
|
"description": "Capability for the desktop",
|
||||||
"platforms": [
|
"platforms": ["linux", "macOS", "windows"],
|
||||||
"linux",
|
"windows": ["main", "settings", "event-*", "user-*", "column-*"],
|
||||||
"macOS",
|
|
||||||
"windows"
|
|
||||||
],
|
|
||||||
"windows": [
|
|
||||||
"main",
|
|
||||||
"settings",
|
|
||||||
"event-*",
|
|
||||||
"user-*",
|
|
||||||
"column-*"
|
|
||||||
],
|
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"path:default",
|
"path:default",
|
||||||
"event:default",
|
"event:default",
|
||||||
@@ -25,6 +15,9 @@
|
|||||||
"shell:open",
|
"shell:open",
|
||||||
"theme:allow-set-theme",
|
"theme:allow-set-theme",
|
||||||
"theme:allow-get-theme",
|
"theme:allow-get-theme",
|
||||||
|
"notification:allow-is-permission-granted",
|
||||||
|
"notification:allow-request-permission",
|
||||||
|
"notification:allow-notify",
|
||||||
{
|
{
|
||||||
"identifier": "http:default",
|
"identifier": "http:default",
|
||||||
"allow": [
|
"allow": [
|
||||||
|
|||||||
Reference in New Issue
Block a user