net-art 0.0.0-stage → 0.0.2

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,280 @@
1
+ :root {
2
+ color-scheme: dark;
3
+ --graphite-bg: #0e1014;
4
+ --panel: #141821;
5
+ --panel-raised: #181d27;
6
+ --ink: #f3f6fb;
7
+ --muted: #aab4c4;
8
+ --hairline: #2a3240;
9
+ --hairline-strong: #3a4556;
10
+ --accent: #7dd3fc;
11
+ --accent-ink: #061018;
12
+ --hover: #1f2531;
13
+ --danger: #fb7185;
14
+ --transparent-a: #1a1d24;
15
+ --transparent-b: #22262f;
16
+ --focus: #7dd3fc;
17
+ --radius: 6px;
18
+ --space-1: 4px;
19
+ --space-2: 8px;
20
+ --space-3: 12px;
21
+ --space-4: 16px;
22
+ --space-5: 24px;
23
+ --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
24
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
25
+ }
26
+
27
+ * { box-sizing: border-box; }
28
+
29
+ html { background: var(--graphite-bg); color: var(--ink); }
30
+
31
+ body {
32
+ margin: 0;
33
+ font-family: var(--font-sans);
34
+ font-size: 14px;
35
+ line-height: 1.45;
36
+ min-height: 100vh;
37
+ display: grid;
38
+ grid-template-rows: auto 1fr auto;
39
+ background: var(--graphite-bg);
40
+ color: var(--ink);
41
+ -webkit-font-smoothing: antialiased;
42
+ }
43
+
44
+ ::selection { background: var(--accent); color: var(--accent-ink); }
45
+ ::-webkit-scrollbar { width: 10px; height: 10px; }
46
+ ::-webkit-scrollbar-track { background: var(--graphite-bg); }
47
+ ::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 4px; }
48
+
49
+ .skip-link {
50
+ position: absolute;
51
+ left: -999px;
52
+ top: 0;
53
+ z-index: 10;
54
+ padding: var(--space-2) var(--space-3);
55
+ background: var(--accent);
56
+ color: var(--accent-ink);
57
+ }
58
+ .skip-link:focus { left: var(--space-2); top: var(--space-2); }
59
+
60
+ .appbar {
61
+ display: flex;
62
+ align-items: center;
63
+ gap: var(--space-4);
64
+ padding: var(--space-3) var(--space-4);
65
+ border-bottom: 1px solid var(--hairline);
66
+ background: var(--panel);
67
+ flex-wrap: wrap;
68
+ }
69
+
70
+ .brand {
71
+ margin: 0;
72
+ font-size: 15px;
73
+ font-weight: 650;
74
+ letter-spacing: -0.01em;
75
+ white-space: nowrap;
76
+ }
77
+
78
+ .appbar-fields {
79
+ display: flex;
80
+ align-items: center;
81
+ gap: var(--space-4);
82
+ flex-wrap: wrap;
83
+ flex: 1;
84
+ }
85
+
86
+ .appbar-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
87
+
88
+ .field {
89
+ display: inline-flex;
90
+ align-items: center;
91
+ gap: var(--space-2);
92
+ min-width: 0;
93
+ }
94
+
95
+ .field-label {
96
+ font-size: 12px;
97
+ color: var(--muted);
98
+ white-space: nowrap;
99
+ }
100
+
101
+ .readout { display: inline-flex; align-items: baseline; gap: var(--space-2); white-space: nowrap; }
102
+ .readout-value, .readout strong {
103
+ font-family: var(--font-mono);
104
+ font-variant-numeric: tabular-nums;
105
+ font-size: 13px;
106
+ }
107
+
108
+ input, select, button { font: inherit; color: inherit; }
109
+
110
+ input[type="text"] {
111
+ width: 14ch;
112
+ padding: 6px 8px;
113
+ border: 1px solid var(--hairline);
114
+ border-radius: var(--radius);
115
+ background: var(--graphite-bg);
116
+ color: var(--ink);
117
+ }
118
+
119
+ input[type="text"]:focus-visible, select:focus-visible, button:focus-visible, canvas:focus-visible, input[type="color"]:focus-visible {
120
+ outline: 2px solid var(--focus);
121
+ outline-offset: 2px;
122
+ }
123
+
124
+ select {
125
+ padding: 6px 8px;
126
+ border: 1px solid var(--hairline);
127
+ border-radius: var(--radius);
128
+ background: var(--graphite-bg);
129
+ color: var(--ink);
130
+ }
131
+
132
+ .button, .tool {
133
+ border: 1px solid var(--hairline);
134
+ border-radius: var(--radius);
135
+ background: var(--panel-raised);
136
+ color: var(--ink);
137
+ padding: 7px 10px;
138
+ cursor: pointer;
139
+ min-height: 34px;
140
+ }
141
+ .button:hover, .tool:hover { border-color: var(--hairline-strong); background: var(--hover); }
142
+ .button:active, .tool:active { transform: translateY(1px); }
143
+ .button:disabled, .tool:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
144
+ .button.danger { color: var(--danger); border-color: var(--danger); }
145
+ .tool[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--panel); }
146
+
147
+ .workspace {
148
+ display: grid;
149
+ grid-template-columns: 132px minmax(0, 1fr) 280px;
150
+ gap: var(--space-3);
151
+ padding: var(--space-3);
152
+ min-height: 0;
153
+ }
154
+
155
+ .panel {
156
+ background: var(--panel);
157
+ border: 1px solid var(--hairline);
158
+ border-radius: var(--radius);
159
+ min-width: 0;
160
+ }
161
+
162
+ .toolrail {
163
+ display: flex;
164
+ flex-direction: column;
165
+ gap: var(--space-2);
166
+ padding: var(--space-3);
167
+ align-self: start;
168
+ }
169
+ .tool { width: 100%; text-align: left; }
170
+ .separator { border: 0; border-top: 1px solid var(--hairline); margin: var(--space-1) 0; width: 100%; }
171
+ .new-size { display: flex; flex-direction: column; gap: var(--space-1); }
172
+
173
+ .canvas-panel { display: grid; grid-template-rows: 1fr auto; min-height: 420px; }
174
+ .canvas-stage {
175
+ display: grid;
176
+ place-items: center;
177
+ padding: var(--space-4);
178
+ overflow: auto;
179
+ background:
180
+ linear-gradient(45deg, var(--transparent-a) 25%, transparent 25%),
181
+ linear-gradient(-45deg, var(--transparent-a) 25%, transparent 25%),
182
+ linear-gradient(45deg, transparent 75%, var(--transparent-a) 75%),
183
+ linear-gradient(-45deg, transparent 75%, var(--transparent-a) 75%),
184
+ var(--transparent-b);
185
+ background-size: 16px 16px;
186
+ background-position: 0 0, 0 8px, 8px -8px, -8px 0;
187
+ border-radius: var(--radius) var(--radius) 0 0;
188
+ }
189
+
190
+ canvas {
191
+ image-rendering: pixelated;
192
+ image-rendering: crisp-edges;
193
+ border: 1px solid var(--hairline-strong);
194
+ background: transparent;
195
+ cursor: crosshair;
196
+ touch-action: none;
197
+ max-width: 100%;
198
+ height: auto;
199
+ }
200
+
201
+ .canvas-status {
202
+ display: flex;
203
+ gap: var(--space-4);
204
+ padding: var(--space-2) var(--space-3);
205
+ border-top: 1px solid var(--hairline);
206
+ color: var(--muted);
207
+ font-family: var(--font-mono);
208
+ font-size: 12px;
209
+ font-variant-numeric: tabular-nums;
210
+ flex-wrap: wrap;
211
+ }
212
+
213
+ .inspector { display: flex; flex-direction: column; min-height: 0; overflow: auto; }
214
+ .inspector-section { padding: var(--space-3); border-bottom: 1px solid var(--hairline); }
215
+ .inspector-section:last-child { border-bottom: 0; }
216
+ .section-title { margin: 0 0 var(--space-2); font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
217
+
218
+ .color-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
219
+ input[type="color"] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--graphite-bg); }
220
+ #current-color { display: block; margin-bottom: var(--space-2); color: var(--muted); }
221
+
222
+ .palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: var(--space-2); }
223
+ .swatch {
224
+ aspect-ratio: 1;
225
+ min-width: 0;
226
+ border: 1px solid var(--hairline);
227
+ border-radius: 4px;
228
+ padding: 0;
229
+ cursor: pointer;
230
+ background:
231
+ linear-gradient(45deg, var(--transparent-a) 25%, transparent 25%),
232
+ linear-gradient(-45deg, var(--transparent-a) 25%, transparent 25%),
233
+ linear-gradient(45deg, transparent 75%, var(--transparent-a) 75%),
234
+ linear-gradient(-45deg, transparent 75%, var(--transparent-a) 75%),
235
+ var(--transparent-b);
236
+ background-size: 8px 8px;
237
+ }
238
+ .swatch:hover { border-color: var(--accent); }
239
+ .swatch[aria-pressed="true"] { border-color: var(--accent); outline: 1px solid var(--accent); }
240
+ .swatch-color { display: block; width: 100%; height: 100%; border-radius: 4px; }
241
+
242
+ .op-log { margin: 0; padding-left: 18px; max-height: 160px; overflow: auto; color: var(--muted); font-size: 12px; }
243
+ .op-log li { margin-bottom: 4px; }
244
+ .danger-zone { margin-top: auto; }
245
+
246
+ .statusbar {
247
+ display: flex;
248
+ gap: var(--space-4);
249
+ justify-content: space-between;
250
+ padding: var(--space-2) var(--space-4);
251
+ border-top: 1px solid var(--hairline);
252
+ color: var(--muted);
253
+ font-size: 12px;
254
+ flex-wrap: wrap;
255
+ }
256
+
257
+ .revision-pulse { animation: revision-pulse 220ms ease-out; }
258
+ @keyframes revision-pulse {
259
+ 0% { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 0; }
260
+ 100% { outline: 2px solid transparent; outline-offset: 6px; }
261
+ }
262
+
263
+ @media (prefers-reduced-motion: reduce) {
264
+ *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
265
+ }
266
+
267
+ @media (max-width: 980px) {
268
+ .workspace { grid-template-columns: 112px minmax(0, 1fr); }
269
+ .inspector { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
270
+ .inspector-section { border-right: 1px solid var(--hairline); }
271
+ }
272
+
273
+ @media (max-width: 680px) {
274
+ .workspace { grid-template-columns: 1fr; padding: var(--space-2); }
275
+ .toolrail { display: grid; grid-template-columns: repeat(3, 1fr); }
276
+ .separator { display: none; }
277
+ .inspector { display: flex; }
278
+ .inspector-section { border-right: 0; }
279
+ .canvas-panel { min-height: 320px; order: -1; }
280
+ }
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "net-art",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.2",
4
+ "description": "Agent-native pixel art engine for extremely fast pixel art generation with a self-hosted live web UI.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/beast-ofcourse/Net-art.git"
10
+ },
11
+ "homepage": "https://github.com/beast-ofcourse/Net-art#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/beast-ofcourse/Net-art/issues"
14
+ },
15
+ "files": [
16
+ "dist",
17
+ ".opencode/skills/net-art/SKILL.md"
18
+ ],
19
+ "bin": {
20
+ "pixelart": "dist/cli/pixelart.js"
21
+ },
22
+ "scripts": {
23
+ "build": "tsc -p tsconfig.json && node scripts/copy-web-assets.mjs",
24
+ "typecheck": "tsc -p tsconfig.json --noEmit",
25
+ "test": "npm run test:all",
26
+ "test:unit": "npm run build && vitest run tests/unit",
27
+ "test:cli": "npm run build && vitest run tests/cli",
28
+ "test:server": "npm run build && vitest run tests/server",
29
+ "test:e2e": "npm run build && playwright test",
30
+ "test:all": "npm run build && vitest run tests/unit tests/cli tests/server && playwright test",
31
+ "test:bench": "npm run build && vitest bench --run tests/unit",
32
+ "clean": "node -e \"import('node:fs').then(fs=>fs.rmSync('dist',{recursive:true,force:true}))\""
33
+ },
34
+ "dependencies": {
35
+ "commander": "^14.0.0",
36
+ "pngjs": "^7.0.0",
37
+ "ws": "^8.18.3"
38
+ },
39
+ "devDependencies": {
40
+ "@playwright/test": "^1.56.1",
41
+ "@types/node": "^22.15.0",
42
+ "@types/pngjs": "^6.0.5",
43
+ "@types/ws": "^8.5.13",
44
+ "tsx": "^4.20.6",
45
+ "typescript": "^5.9.0",
46
+ "vitest": "^3.2.4"
47
+ },
48
+ "engines": {
49
+ "node": ">=22"
50
+ }
51
+ }