open-vtop 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,121 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "hono/jsx/jsx-runtime";
2
+ export const BaseLayout = ({ title = "Open-VTOP", children, }) => {
3
+ return (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("meta", { charset: "UTF-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }), _jsx("title", { children: title }), _jsx("script", { src: "/static/htmx.js" }), _jsx("style", { children: `
4
+ * {
5
+ margin: 0;
6
+ padding: 0;
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ body {
11
+ font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Dank Mono', 'Source Code Pro', monospace;
12
+ background: #000;
13
+ color: #fff;
14
+ min-height: 100vh;
15
+ padding: 2rem;
16
+ line-height: 1.6;
17
+ }
18
+
19
+ h1 {
20
+ font-size: 2rem;
21
+ font-weight: 600;
22
+ margin-bottom: 2rem;
23
+ letter-spacing: -0.02em;
24
+ }
25
+
26
+ h2 {
27
+ font-size: 1.25rem;
28
+ font-weight: 500;
29
+ margin-bottom: 1rem;
30
+ letter-spacing: -0.01em;
31
+ }
32
+
33
+ .container {
34
+ max-width: 800px;
35
+ margin: 0 auto;
36
+ }
37
+
38
+ .section {
39
+ background: #111;
40
+ border: 1px solid #333;
41
+ border-radius: 8px;
42
+ padding: 2rem;
43
+ margin-bottom: 2rem;
44
+ transition: border-color 0.2s ease;
45
+ }
46
+
47
+ .section:hover {
48
+ border-color: #555;
49
+ }
50
+
51
+ button {
52
+ background: #fff;
53
+ color: #000;
54
+ border: none;
55
+ padding: 0.75rem 1.5rem;
56
+ border-radius: 6px;
57
+ cursor: pointer;
58
+ font-size: 0.875rem;
59
+ font-family: inherit;
60
+ font-weight: 500;
61
+ transition: all 0.2s ease;
62
+ }
63
+
64
+ button:hover {
65
+ background: #e6e6e6;
66
+ transform: translateY(-1px);
67
+ }
68
+
69
+ button:active {
70
+ transform: translateY(0);
71
+ }
72
+
73
+ input {
74
+ background: #111;
75
+ color: #fff;
76
+ border: 1px solid #333;
77
+ padding: 0.75rem 1rem;
78
+ border-radius: 6px;
79
+ font-size: 0.875rem;
80
+ font-family: inherit;
81
+ width: 100%;
82
+ transition: border-color 0.2s ease;
83
+ }
84
+
85
+ input:focus {
86
+ outline: none;
87
+ border-color: #fff;
88
+ }
89
+
90
+ input::placeholder {
91
+ color: #666;
92
+ }
93
+
94
+ #result {
95
+ margin-top: 1rem;
96
+ padding: 1rem;
97
+ background: #0a0a0a;
98
+ border: 1px solid #222;
99
+ border-radius: 6px;
100
+ min-height: 2rem;
101
+ font-size: 0.875rem;
102
+ }
103
+
104
+ .success {
105
+ color: #0f0;
106
+ }
107
+
108
+ .error {
109
+ color: #f00;
110
+ }
111
+
112
+ .htmx-swapping {
113
+ opacity: 0.5;
114
+ transition: opacity 0.2s;
115
+ }
116
+
117
+ .htmx-request {
118
+ opacity: 0.8;
119
+ }
120
+ ` })] }), _jsx("body", { children: _jsx("div", { class: "container", children: children }) })] }));
121
+ };
@@ -0,0 +1,4 @@
1
+ import { jsxs as _jsxs } from "hono/jsx/jsx-runtime";
2
+ export const SuccessMessage = ({ message }) => {
3
+ return _jsxs("p", { class: "success", children: ["\u2713 ", message] });
4
+ };
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "open-vtop",
3
+ "type": "module",
4
+ "scripts": {
5
+ "dev": "tsx watch src/index.tsx",
6
+ "build": "tsc",
7
+ "start": "node dist/index.js"
8
+ },
9
+ "dependencies": {
10
+ "@hono/node-server": "^1.19.9",
11
+ "canvas": "^3.2.1",
12
+ "hono": "^4.11.4",
13
+ "htmx.org": "^2.0.8"
14
+ },
15
+ "bin": {
16
+ "open-vtop": "dist/index.js"
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "devDependencies": {
22
+ "@types/node": "^20.11.17",
23
+ "tsx": "^4.7.1",
24
+ "typescript": "^5.8.3"
25
+ },
26
+ "version": "1.0.0"
27
+ }